Codebase list enchant-2 / b18d96b
New upstream version 2.2.8 Laurent Bigonville 4 years ago
149 changed file(s) with 114033 addition(s) and 6209 deletion(s). Raw diff Collapse all Expand all
+0
-4
.dir-locals.el less more
0 ((c-mode . ((c-file-style . "K&R")
1 (c-basic-offset . 8)
2 (tab-width . 8)
3 (indent-tabs-mode . t))))
+0
-28
.gitignore less more
0 *~
1 *.o
2 *.lo
3 *.la
4 *.trs
5 *.log
6 enchant-*.tar.gz
7 .libs
8 .deps
9 .dirstamp
10 Makefile
11 Makefile.in
12 /aclocal.m4
13 /autom4te.cache
14 /build-aux
15 /compile
16 /configure
17 /config.*
18 /depcomp
19 /doc
20 /enchant-*.pc
21 /install-sh
22 /libtool
23 /ltmain.sh
24 /missing
25 /INSTALL
26 /test-driver
27 /stamp-h1
+0
-6
.gitmodules less more
0 [submodule "gnulib"]
1 path = gnulib
2 url = https://git.savannah.gnu.org/git/gnulib.git
3 [submodule "gl-mod/bootstrap"]
4 path = gl-mod/bootstrap
5 url = https://github.com/gnulib-modules/bootstrap.git
+0
-41
.travis.yml less more
0 language: cpp
1
2 dist: bionic
3 sudo: required
4
5 addons:
6 apt:
7 packages:
8 - libglib2.0-dev
9 - libaspell-dev
10 - hspell
11 - libhunspell-dev
12 - libvoikko-dev
13 - voikko-fi
14 - aspell-en
15 - libunittest++-dev
16
17 env:
18 global:
19 - VERBOSE=1 # Get test logs in Travis logs
20
21 matrix:
22 include:
23 - os: linux
24 env:
25 - CONFIGURE_ARGS=("CFLAGS=\"-g3 -fsanitize=address -fsanitize=undefined\"" "LDFLAGS=\"-fsanitize=address -fsanitize=undefined\"")
26 - os: osx
27 osx_image: xcode9.2
28
29 before_install:
30 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
31 # Note: aspell should work on macOS, but has been removed from the next
32 # line because one of the tests fails; see
33 # https://github.com/Homebrew/homebrew-core/issues/40976
34 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install glib dbus-glib hspell hunspell libvoikko unittest-cpp ; fi
35
36 script:
37 - ./bootstrap
38 - ./configure --enable-relocatable --with-zemberek=check "${CONFIGURE_ARGS[@]}"
39 - make
40 - make distcheck
88 Jonathan Springer
99 Heiko Becker
1010 Raphael Finkel
11 Sander van Geloven (Nuspell provider)
100100 existing code. Code clean-ups are always welcome.
101101
102102
103 API documentation
104 -----------------
105
106 To generate API documentation, simply run
107
108 doxygen
109
110 and see doxygen/html/index.html in a web browser.
111
112
103113 Making a release
104114 ----------------
105115
0 Building and installing libenchant
1 **********************************
2
3 For standard GNU autotools installation instructions, see below. There
4 follow some enchant-specific notes.
5
6 The usual GNU autotools package instructions apply, except that Enchant must
7 be built with --enable-relocatable for the tests to run successfully.
8
9 Note that for Enchant to find system-installed dictionaries, you may need
10 the relevant --with-foo-dir option (see ./configure --help).
11
12
13 Building from git
14 =================
15
16 See HACKING.
17
18
19 Parallel installation
20 =====================
21
22 Enchant mostly installs in versioned directories, so that different major
23 versions can be installed in parallel. The one exception is the data files
24 (under pkgdatadir), as these are compatible between different major
25 versions. To change e.g. /usr/share/enchant to /usr/share/enchant-2, set
26 pkgdatadir when running make, e.g.:
27
28 make pkgdatadir=/usr/share/enchant-2
29
30
31 Relocation
32 ==========
33
34 If Enchant is installed in a fixed location, and on Windows and Linux
35 systems, no further configuration should be needed to make it relocatable;
36 that is, work when copied from its original installation directory to
37 another location.
38
39 Otherwise, and in code intended to be portable to other systems, your code
40 should call enchant_set_prefix_dir (see enchant.h) before any other Enchant
41 function.
42
43 For more details of how the relocation support works, including how you can
44 use it in your own program, see doc/relocatable.texi and
45 gnulib/doc/relocatable-maint.texi.
46
47
48
49 Installation Instructions
50 *************************
51
52 Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
53 Foundation, Inc.
54
55 Copying and distribution of this file, with or without modification,
56 are permitted in any medium without royalty provided the copyright
57 notice and this notice are preserved. This file is offered as-is,
58 without warranty of any kind.
59
60 Basic Installation
61 ==================
62
63 Briefly, the shell command './configure && make && make install'
64 should configure, build, and install this package. The following
65 more-detailed instructions are generic; see the 'README' file for
66 instructions specific to this package. Some packages provide this
67 'INSTALL' file but do not implement all of the features documented
68 below. The lack of an optional feature in a given package is not
69 necessarily a bug. More recommendations for GNU packages can be found
70 in *note Makefile Conventions: (standards)Makefile Conventions.
71
72 The 'configure' shell script attempts to guess correct values for
73 various system-dependent variables used during compilation. It uses
74 those values to create a 'Makefile' in each directory of the package.
75 It may also create one or more '.h' files containing system-dependent
76 definitions. Finally, it creates a shell script 'config.status' that
77 you can run in the future to recreate the current configuration, and a
78 file 'config.log' containing compiler output (useful mainly for
79 debugging 'configure').
80
81 It can also use an optional file (typically called 'config.cache' and
82 enabled with '--cache-file=config.cache' or simply '-C') that saves the
83 results of its tests to speed up reconfiguring. Caching is disabled by
84 default to prevent problems with accidental use of stale cache files.
85
86 If you need to do unusual things to compile the package, please try
87 to figure out how 'configure' could check whether to do them, and mail
88 diffs or instructions to the address given in the 'README' so they can
89 be considered for the next release. If you are using the cache, and at
90 some point 'config.cache' contains results you don't want to keep, you
91 may remove or edit it.
92
93 The file 'configure.ac' (or 'configure.in') is used to create
94 'configure' by a program called 'autoconf'. You need 'configure.ac' if
95 you want to change it or regenerate 'configure' using a newer version of
96 'autoconf'.
97
98 The simplest way to compile this package is:
99
100 1. 'cd' to the directory containing the package's source code and type
101 './configure' to configure the package for your system.
102
103 Running 'configure' might take a while. While running, it prints
104 some messages telling which features it is checking for.
105
106 2. Type 'make' to compile the package.
107
108 3. Optionally, type 'make check' to run any self-tests that come with
109 the package, generally using the just-built uninstalled binaries.
110
111 4. Type 'make install' to install the programs and any data files and
112 documentation. When installing into a prefix owned by root, it is
113 recommended that the package be configured and built as a regular
114 user, and only the 'make install' phase executed with root
115 privileges.
116
117 5. Optionally, type 'make installcheck' to repeat any self-tests, but
118 this time using the binaries in their final installed location.
119 This target does not install anything. Running this target as a
120 regular user, particularly if the prior 'make install' required
121 root privileges, verifies that the installation completed
122 correctly.
123
124 6. You can remove the program binaries and object files from the
125 source code directory by typing 'make clean'. To also remove the
126 files that 'configure' created (so you can compile the package for
127 a different kind of computer), type 'make distclean'. There is
128 also a 'make maintainer-clean' target, but that is intended mainly
129 for the package's developers. If you use it, you may have to get
130 all sorts of other programs in order to regenerate files that came
131 with the distribution.
132
133 7. Often, you can also type 'make uninstall' to remove the installed
134 files again. In practice, not all packages have tested that
135 uninstallation works correctly, even though it is required by the
136 GNU Coding Standards.
137
138 8. Some packages, particularly those that use Automake, provide 'make
139 distcheck', which can by used by developers to test that all other
140 targets like 'make install' and 'make uninstall' work correctly.
141 This target is generally not run by end users.
142
143 Compilers and Options
144 =====================
145
146 Some systems require unusual options for compilation or linking that
147 the 'configure' script does not know about. Run './configure --help'
148 for details on some of the pertinent environment variables.
149
150 You can give 'configure' initial values for configuration parameters
151 by setting variables in the command line or in the environment. Here is
152 an example:
153
154 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
155
156 *Note Defining Variables::, for more details.
157
158 Compiling For Multiple Architectures
159 ====================================
160
161 You can compile the package for more than one kind of computer at the
162 same time, by placing the object files for each architecture in their
163 own directory. To do this, you can use GNU 'make'. 'cd' to the
164 directory where you want the object files and executables to go and run
165 the 'configure' script. 'configure' automatically checks for the source
166 code in the directory that 'configure' is in and in '..'. This is known
167 as a "VPATH" build.
168
169 With a non-GNU 'make', it is safer to compile the package for one
170 architecture at a time in the source code directory. After you have
171 installed the package for one architecture, use 'make distclean' before
172 reconfiguring for another architecture.
173
174 On MacOS X 10.5 and later systems, you can create libraries and
175 executables that work on multiple system types--known as "fat" or
176 "universal" binaries--by specifying multiple '-arch' options to the
177 compiler but only a single '-arch' option to the preprocessor. Like
178 this:
179
180 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
181 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
182 CPP="gcc -E" CXXCPP="g++ -E"
183
184 This is not guaranteed to produce working output in all cases, you
185 may have to build one architecture at a time and combine the results
186 using the 'lipo' tool if you have problems.
187
188 Installation Names
189 ==================
190
191 By default, 'make install' installs the package's commands under
192 '/usr/local/bin', include files under '/usr/local/include', etc. You
193 can specify an installation prefix other than '/usr/local' by giving
194 'configure' the option '--prefix=PREFIX', where PREFIX must be an
195 absolute file name.
196
197 You can specify separate installation prefixes for
198 architecture-specific files and architecture-independent files. If you
199 pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
200 PREFIX as the prefix for installing programs and libraries.
201 Documentation and other data files still use the regular prefix.
202
203 In addition, if you use an unusual directory layout you can give
204 options like '--bindir=DIR' to specify different values for particular
205 kinds of files. Run 'configure --help' for a list of the directories
206 you can set and what kinds of files go in them. In general, the default
207 for these options is expressed in terms of '${prefix}', so that
208 specifying just '--prefix' will affect all of the other directory
209 specifications that were not explicitly provided.
210
211 The most portable way to affect installation locations is to pass the
212 correct locations to 'configure'; however, many packages provide one or
213 both of the following shortcuts of passing variable assignments to the
214 'make install' command line to change installation locations without
215 having to reconfigure or recompile.
216
217 The first method involves providing an override variable for each
218 affected directory. For example, 'make install
219 prefix=/alternate/directory' will choose an alternate location for all
220 directory configuration variables that were expressed in terms of
221 '${prefix}'. Any directories that were specified during 'configure',
222 but not in terms of '${prefix}', must each be overridden at install time
223 for the entire installation to be relocated. The approach of makefile
224 variable overrides for each directory variable is required by the GNU
225 Coding Standards, and ideally causes no recompilation. However, some
226 platforms have known limitations with the semantics of shared libraries
227 that end up requiring recompilation when using this method, particularly
228 noticeable in packages that use GNU Libtool.
229
230 The second method involves providing the 'DESTDIR' variable. For
231 example, 'make install DESTDIR=/alternate/directory' will prepend
232 '/alternate/directory' before all installation names. The approach of
233 'DESTDIR' overrides is not required by the GNU Coding Standards, and
234 does not work on platforms that have drive letters. On the other hand,
235 it does better at avoiding recompilation issues, and works well even
236 when some directory options were not specified in terms of '${prefix}'
237 at 'configure' time.
238
239 Optional Features
240 =================
241
242 If the package supports it, you can cause programs to be installed
243 with an extra prefix or suffix on their names by giving 'configure' the
244 option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
245
246 Some packages pay attention to '--enable-FEATURE' options to
247 'configure', where FEATURE indicates an optional part of the package.
248 They may also pay attention to '--with-PACKAGE' options, where PACKAGE
249 is something like 'gnu-as' or 'x' (for the X Window System). The
250 'README' should mention any '--enable-' and '--with-' options that the
251 package recognizes.
252
253 For packages that use the X Window System, 'configure' can usually
254 find the X include and library files automatically, but if it doesn't,
255 you can use the 'configure' options '--x-includes=DIR' and
256 '--x-libraries=DIR' to specify their locations.
257
258 Some packages offer the ability to configure how verbose the
259 execution of 'make' will be. For these packages, running './configure
260 --enable-silent-rules' sets the default to minimal output, which can be
261 overridden with 'make V=1'; while running './configure
262 --disable-silent-rules' sets the default to verbose, which can be
263 overridden with 'make V=0'.
264
265 Particular systems
266 ==================
267
268 On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
269 is not installed, it is recommended to use the following options in
270 order to use an ANSI C compiler:
271
272 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
273
274 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
275
276 HP-UX 'make' updates targets which have the same time stamps as their
277 prerequisites, which makes it generally unusable when shipped generated
278 files such as 'configure' are involved. Use GNU 'make' instead.
279
280 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
281 parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
282 workaround. If GNU CC is not installed, it is therefore recommended to
283 try
284
285 ./configure CC="cc"
286
287 and if that doesn't work, try
288
289 ./configure CC="cc -nodtk"
290
291 On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
292 directory contains several dysfunctional programs; working variants of
293 these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
294 in your 'PATH', put it _after_ '/usr/bin'.
295
296 On Haiku, software installed for all users goes in '/boot/common',
297 not '/usr/local'. It is recommended to use the following options:
298
299 ./configure --prefix=/boot/common
300
301 Specifying the System Type
302 ==========================
303
304 There may be some features 'configure' cannot figure out
305 automatically, but needs to determine by the type of machine the package
306 will run on. Usually, assuming the package is built to be run on the
307 _same_ architectures, 'configure' can figure that out, but if it prints
308 a message saying it cannot guess the machine type, give it the
309 '--build=TYPE' option. TYPE can either be a short name for the system
310 type, such as 'sun4', or a canonical name which has the form:
311
312 CPU-COMPANY-SYSTEM
313
314 where SYSTEM can have one of these forms:
315
316 OS
317 KERNEL-OS
318
319 See the file 'config.sub' for the possible values of each field. If
320 'config.sub' isn't included in this package, then this package doesn't
321 need to know the machine type.
322
323 If you are _building_ compiler tools for cross-compiling, you should
324 use the option '--target=TYPE' to select the type of system they will
325 produce code for.
326
327 If you want to _use_ a cross compiler, that generates code for a
328 platform different from the build platform, you should specify the
329 "host" platform (i.e., that on which the generated programs will
330 eventually be run) with '--host=TYPE'.
331
332 Sharing Defaults
333 ================
334
335 If you want to set default values for 'configure' scripts to share,
336 you can create a site shell script called 'config.site' that gives
337 default values for variables like 'CC', 'cache_file', and 'prefix'.
338 'configure' looks for 'PREFIX/share/config.site' if it exists, then
339 'PREFIX/etc/config.site' if it exists. Or, you can set the
340 'CONFIG_SITE' environment variable to the location of the site script.
341 A warning: not all 'configure' scripts look for a site script.
342
343 Defining Variables
344 ==================
345
346 Variables not defined in a site shell script can be set in the
347 environment passed to 'configure'. However, some packages may run
348 configure again during the build, and the customized values of these
349 variables may be lost. In order to avoid this problem, you should set
350 them in the 'configure' command line, using 'VAR=value'. For example:
351
352 ./configure CC=/usr/local2/bin/gcc
353
354 causes the specified 'gcc' to be used as the C compiler (unless it is
355 overridden in the site shell script).
356
357 Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
358 Autoconf limitation. Until the limitation is lifted, you can use this
359 workaround:
360
361 CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
362
363 'configure' Invocation
364 ======================
365
366 'configure' recognizes the following options to control how it
367 operates.
368
369 '--help'
370 '-h'
371 Print a summary of all of the options to 'configure', and exit.
372
373 '--help=short'
374 '--help=recursive'
375 Print a summary of the options unique to this package's
376 'configure', and exit. The 'short' variant lists options used only
377 in the top level, while the 'recursive' variant lists options also
378 present in any nested packages.
379
380 '--version'
381 '-V'
382 Print the version of Autoconf used to generate the 'configure'
383 script, and exit.
384
385 '--cache-file=FILE'
386 Enable the cache: use and save the results of the tests in FILE,
387 traditionally 'config.cache'. FILE defaults to '/dev/null' to
388 disable caching.
389
390 '--config-cache'
391 '-C'
392 Alias for '--cache-file=config.cache'.
393
394 '--quiet'
395 '--silent'
396 '-q'
397 Do not print messages saying which checks are being made. To
398 suppress all normal output, redirect it to '/dev/null' (any error
399 messages will still be shown).
400
401 '--srcdir=DIR'
402 Look for the package's source code in directory DIR. Usually
403 'configure' can determine that directory automatically.
404
405 '--prefix=DIR'
406 Use DIR as the installation prefix. *note Installation Names:: for
407 more details, including other options available for fine-tuning the
408 installation locations.
409
410 '--no-create'
411 '-n'
412 Run the configure checks, but stop before creating any output
413 files.
414
415 'configure' also accepts some other, not widely useful, options. Run
416 'configure --help' for more details.
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
4
5 # This Makefile.in 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
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 am__is_gnu_make = { \
18 if test -z '$(MAKELEVEL)'; then \
19 false; \
20 elif test -n '$(MAKE_HOST)'; then \
21 true; \
22 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
23 true; \
24 else \
25 false; \
26 fi; \
27 }
28 am__make_running_with_option = \
29 case $${target_option-} in \
30 ?) ;; \
31 *) echo "am__make_running_with_option: internal error: invalid" \
32 "target option '$${target_option-}' specified" >&2; \
33 exit 1;; \
34 esac; \
35 has_opt=no; \
36 sane_makeflags=$$MAKEFLAGS; \
37 if $(am__is_gnu_make); then \
38 sane_makeflags=$$MFLAGS; \
39 else \
40 case $$MAKEFLAGS in \
41 *\\[\ \ ]*) \
42 bs=\\; \
43 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
44 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
45 esac; \
46 fi; \
47 skip_next=no; \
48 strip_trailopt () \
49 { \
50 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
51 }; \
52 for flg in $$sane_makeflags; do \
53 test $$skip_next = yes && { skip_next=no; continue; }; \
54 case $$flg in \
55 *=*|--*) continue;; \
56 -*I) strip_trailopt 'I'; skip_next=yes;; \
57 -*I?*) strip_trailopt 'I';; \
58 -*O) strip_trailopt 'O'; skip_next=yes;; \
59 -*O?*) strip_trailopt 'O';; \
60 -*l) strip_trailopt 'l'; skip_next=yes;; \
61 -*l?*) strip_trailopt 'l';; \
62 -[dEDm]) skip_next=yes;; \
63 -[JT]) skip_next=yes;; \
64 esac; \
65 case $$flg in \
66 *$$target_option*) has_opt=yes; break;; \
67 esac; \
68 done; \
69 test $$has_opt = yes
70 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
71 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
72 pkgdatadir = $(datadir)/@PACKAGE@
73 pkgincludedir = $(includedir)/@PACKAGE@
74 pkglibdir = $(libdir)/@PACKAGE@
75 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
76 install_sh_DATA = $(install_sh) -c -m 644
77 install_sh_PROGRAM = $(install_sh) -c
78 install_sh_SCRIPT = $(install_sh) -c
79 INSTALL_HEADER = $(INSTALL_DATA)
80 transform = $(program_transform_name)
81 NORMAL_INSTALL = :
82 PRE_INSTALL = :
83 POST_INSTALL = :
84 NORMAL_UNINSTALL = :
85 PRE_UNINSTALL = :
86 POST_UNINSTALL = :
87 build_triplet = @build@
88 host_triplet = @host@
89 subdir = .
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
92 $(top_srcdir)/m4/absolute-header.m4 \
93 $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
94 $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \
95 $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \
96 $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \
97 $(top_srcdir)/m4/gnulib-common.m4 \
98 $(top_srcdir)/m4/gnulib-comp.m4 \
99 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \
100 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
101 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
102 $(top_srcdir)/m4/malloc.m4 \
103 $(top_srcdir)/m4/manywarnings-c++.m4 \
104 $(top_srcdir)/m4/manywarnings.m4 \
105 $(top_srcdir)/m4/msvc-inval.m4 \
106 $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \
107 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/rawmemchr.m4 \
108 $(top_srcdir)/m4/relocatable-lib.m4 \
109 $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \
110 $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
111 $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \
112 $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \
113 $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \
114 $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
115 $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
116 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
117 $(ACLOCAL_M4)
118 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
119 $(am__configure_deps) $(am__DIST_COMMON)
120 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
121 configure.lineno config.status.lineno
122 mkinstalldirs = $(install_sh) -d
123 CONFIG_HEADER = config.h
124 CONFIG_CLEAN_FILES =
125 CONFIG_CLEAN_VPATH_FILES =
126 AM_V_P = $(am__v_P_@AM_V@)
127 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
128 am__v_P_0 = false
129 am__v_P_1 = :
130 AM_V_GEN = $(am__v_GEN_@AM_V@)
131 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
132 am__v_GEN_0 = @echo " GEN " $@;
133 am__v_GEN_1 =
134 AM_V_at = $(am__v_at_@AM_V@)
135 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
136 am__v_at_0 = @
137 am__v_at_1 =
138 SOURCES =
139 DIST_SOURCES =
140 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
141 ctags-recursive dvi-recursive html-recursive info-recursive \
142 install-data-recursive install-dvi-recursive \
143 install-exec-recursive install-html-recursive \
144 install-info-recursive install-pdf-recursive \
145 install-ps-recursive install-recursive installcheck-recursive \
146 installdirs-recursive pdf-recursive ps-recursive \
147 tags-recursive uninstall-recursive
148 am__can_run_installinfo = \
149 case $$AM_UPDATE_INFO_DIR in \
150 n|no|NO) false;; \
151 *) (install-info --version) >/dev/null 2>&1;; \
152 esac
153 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
154 am__vpath_adj = case $$p in \
155 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
156 *) f=$$p;; \
157 esac;
158 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
159 am__install_max = 40
160 am__nobase_strip_setup = \
161 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
162 am__nobase_strip = \
163 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
164 am__nobase_list = $(am__nobase_strip_setup); \
165 for p in $$list; do echo "$$p $$p"; done | \
166 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
167 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
168 if (++n[$$2] == $(am__install_max)) \
169 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
170 END { for (dir in files) print dir, files[dir] }'
171 am__base_list = \
172 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
173 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
174 am__uninstall_files_from_dir = { \
175 test -z "$$files" \
176 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
177 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
178 $(am__cd) "$$dir" && rm -f $$files; }; \
179 }
180 am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
181 DATA = $(pkgconfig_DATA)
182 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
183 distclean-recursive maintainer-clean-recursive
184 am__recursive_targets = \
185 $(RECURSIVE_TARGETS) \
186 $(RECURSIVE_CLEAN_TARGETS) \
187 $(am__extra_recursive_targets)
188 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
189 cscope distdir dist dist-all distcheck
190 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
191 $(LISP)config.h.in
192 # Read a list of newline-separated strings from the standard input,
193 # and print each of them once, without duplicates. Input order is
194 # *not* preserved.
195 am__uniquify_input = $(AWK) '\
196 BEGIN { nonempty = 0; } \
197 { items[$$0] = 1; nonempty = 1; } \
198 END { if (nonempty) { for (i in items) print i; }; } \
199 '
200 # Make sure the list of sources is unique. This is necessary because,
201 # e.g., the same source file might be shared among _SOURCES variables
202 # for different programs/libraries.
203 am__define_uniq_tagged_files = \
204 list='$(am__tagged_files)'; \
205 unique=`for i in $$list; do \
206 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
207 done | $(am__uniquify_input)`
208 ETAGS = etags
209 CTAGS = ctags
210 CSCOPE = cscope
211 DIST_SUBDIRS = $(SUBDIRS)
212 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
213 $(srcdir)/enchant.pc.in $(top_srcdir)/build-aux/config.guess \
214 $(top_srcdir)/build-aux/config.sub \
215 $(top_srcdir)/build-aux/install-sh \
216 $(top_srcdir)/build-aux/ltmain.sh \
217 $(top_srcdir)/build-aux/missing AUTHORS COPYING.LIB ChangeLog \
218 INSTALL NEWS README build-aux/ar-lib build-aux/compile \
219 build-aux/config.guess build-aux/config.sub build-aux/depcomp \
220 build-aux/install-sh build-aux/ltmain.sh build-aux/mdate-sh \
221 build-aux/missing build-aux/texinfo.tex compile config.guess \
222 config.sub depcomp install-sh ltmain.sh missing
223 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
224 distdir = $(PACKAGE)-$(VERSION)
225 top_distdir = $(distdir)
226 am__remove_distdir = \
227 if test -d "$(distdir)"; then \
228 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
229 && rm -rf "$(distdir)" \
230 || { sleep 5 && rm -rf "$(distdir)"; }; \
231 else :; fi
232 am__post_remove_distdir = $(am__remove_distdir)
233 am__relativize = \
234 dir0=`pwd`; \
235 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
236 sed_rest='s,^[^/]*/*,,'; \
237 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
238 sed_butlast='s,/*[^/]*$$,,'; \
239 while test -n "$$dir1"; do \
240 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
241 if test "$$first" != "."; then \
242 if test "$$first" = ".."; then \
243 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
244 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
245 else \
246 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
247 if test "$$first2" = "$$first"; then \
248 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
249 else \
250 dir2="../$$dir2"; \
251 fi; \
252 dir0="$$dir0"/"$$first"; \
253 fi; \
254 fi; \
255 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
256 done; \
257 reldir="$$dir2"
258 DIST_ARCHIVES = $(distdir).tar.gz
259 GZIP_ENV = --best
260 DIST_TARGETS = dist-gzip
261 distuninstallcheck_listfiles = find . -type f -print
262 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
263 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
264 distcleancheck_listfiles = find . -type f -print
265 pkglibexecdir = @pkglibexecdir@
266 ACLOCAL = @ACLOCAL@
267 AMTAR = @AMTAR@
268 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
269 AR = @AR@
270 ARFLAGS = @ARFLAGS@
271 AS = @AS@
272 AUTOCONF = @AUTOCONF@
273 AUTOHEADER = @AUTOHEADER@
274 AUTOMAKE = @AUTOMAKE@
275 AWK = @AWK@
276 CC = @CC@
277 CCDEPMODE = @CCDEPMODE@
278 CFLAGS = @CFLAGS@
279 CPP = @CPP@
280 CPPFLAGS = @CPPFLAGS@
281 CXX = @CXX@
282 CXXCPP = @CXXCPP@
283 CXXDEPMODE = @CXXDEPMODE@
284 CXXFLAGS = @CXXFLAGS@
285 CYGPATH_W = @CYGPATH_W@
286 DEFS = @DEFS@
287 DEPDIR = @DEPDIR@
288 DLLTOOL = @DLLTOOL@
289 DSYMUTIL = @DSYMUTIL@
290 DUMPBIN = @DUMPBIN@
291 ECHO_C = @ECHO_C@
292 ECHO_N = @ECHO_N@
293 ECHO_T = @ECHO_T@
294 EGREP = @EGREP@
295 ENCHANT_CFLAGS = @ENCHANT_CFLAGS@
296 ENCHANT_LIBS = @ENCHANT_LIBS@
297 ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@
298 ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@
299 ENCHANT_MINOR_VERSION = @ENCHANT_MINOR_VERSION@
300 EXEEXT = @EXEEXT@
301 FGREP = @FGREP@
302 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
303 GETOPT_H = @GETOPT_H@
304 GLIB_CFLAGS = @GLIB_CFLAGS@
305 GLIB_LIBS = @GLIB_LIBS@
306 GNULIB_ATOLL = @GNULIB_ATOLL@
307 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
308 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
309 GNULIB_CHDIR = @GNULIB_CHDIR@
310 GNULIB_CHOWN = @GNULIB_CHOWN@
311 GNULIB_CLOSE = @GNULIB_CLOSE@
312 GNULIB_DUP = @GNULIB_DUP@
313 GNULIB_DUP2 = @GNULIB_DUP2@
314 GNULIB_DUP3 = @GNULIB_DUP3@
315 GNULIB_ENVIRON = @GNULIB_ENVIRON@
316 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
317 GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
318 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
319 GNULIB_FCHDIR = @GNULIB_FCHDIR@
320 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
321 GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
322 GNULIB_FFSL = @GNULIB_FFSL@
323 GNULIB_FFSLL = @GNULIB_FFSLL@
324 GNULIB_FLOCK = @GNULIB_FLOCK@
325 GNULIB_FSYNC = @GNULIB_FSYNC@
326 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
327 GNULIB_GETCWD = @GNULIB_GETCWD@
328 GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
329 GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
330 GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
331 GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
332 GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
333 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
334 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
335 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
336 GNULIB_GETPASS = @GNULIB_GETPASS@
337 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
338 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
339 GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
340 GNULIB_GRANTPT = @GNULIB_GRANTPT@
341 GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
342 GNULIB_ISATTY = @GNULIB_ISATTY@
343 GNULIB_LCHOWN = @GNULIB_LCHOWN@
344 GNULIB_LINK = @GNULIB_LINK@
345 GNULIB_LINKAT = @GNULIB_LINKAT@
346 GNULIB_LSEEK = @GNULIB_LSEEK@
347 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
348 GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
349 GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
350 GNULIB_MBSCHR = @GNULIB_MBSCHR@
351 GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
352 GNULIB_MBSLEN = @GNULIB_MBSLEN@
353 GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
354 GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
355 GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
356 GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
357 GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
358 GNULIB_MBSSEP = @GNULIB_MBSSEP@
359 GNULIB_MBSSPN = @GNULIB_MBSSPN@
360 GNULIB_MBSSTR = @GNULIB_MBSSTR@
361 GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
362 GNULIB_MBTOWC = @GNULIB_MBTOWC@
363 GNULIB_MEMCHR = @GNULIB_MEMCHR@
364 GNULIB_MEMMEM = @GNULIB_MEMMEM@
365 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
366 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
367 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
368 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
369 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
370 GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
371 GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
372 GNULIB_PIPE = @GNULIB_PIPE@
373 GNULIB_PIPE2 = @GNULIB_PIPE2@
374 GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
375 GNULIB_PREAD = @GNULIB_PREAD@
376 GNULIB_PTSNAME = @GNULIB_PTSNAME@
377 GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
378 GNULIB_PUTENV = @GNULIB_PUTENV@
379 GNULIB_PWRITE = @GNULIB_PWRITE@
380 GNULIB_QSORT_R = @GNULIB_QSORT_R@
381 GNULIB_RANDOM = @GNULIB_RANDOM@
382 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
383 GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
384 GNULIB_READ = @GNULIB_READ@
385 GNULIB_READLINK = @GNULIB_READLINK@
386 GNULIB_READLINKAT = @GNULIB_READLINKAT@
387 GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
388 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
389 GNULIB_REALPATH = @GNULIB_REALPATH@
390 GNULIB_RMDIR = @GNULIB_RMDIR@
391 GNULIB_RPMATCH = @GNULIB_RPMATCH@
392 GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
393 GNULIB_SETENV = @GNULIB_SETENV@
394 GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
395 GNULIB_SLEEP = @GNULIB_SLEEP@
396 GNULIB_STPCPY = @GNULIB_STPCPY@
397 GNULIB_STPNCPY = @GNULIB_STPNCPY@
398 GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
399 GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
400 GNULIB_STRDUP = @GNULIB_STRDUP@
401 GNULIB_STRERROR = @GNULIB_STRERROR@
402 GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
403 GNULIB_STRNCAT = @GNULIB_STRNCAT@
404 GNULIB_STRNDUP = @GNULIB_STRNDUP@
405 GNULIB_STRNLEN = @GNULIB_STRNLEN@
406 GNULIB_STRPBRK = @GNULIB_STRPBRK@
407 GNULIB_STRSEP = @GNULIB_STRSEP@
408 GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
409 GNULIB_STRSTR = @GNULIB_STRSTR@
410 GNULIB_STRTOD = @GNULIB_STRTOD@
411 GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
412 GNULIB_STRTOLL = @GNULIB_STRTOLL@
413 GNULIB_STRTOULL = @GNULIB_STRTOULL@
414 GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
415 GNULIB_SYMLINK = @GNULIB_SYMLINK@
416 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
417 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
418 GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
419 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
420 GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
421 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
422 GNULIB_UNLINK = @GNULIB_UNLINK@
423 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
424 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
425 GNULIB_UNSETENV = @GNULIB_UNSETENV@
426 GNULIB_USLEEP = @GNULIB_USLEEP@
427 GNULIB_WCTOMB = @GNULIB_WCTOMB@
428 GNULIB_WRITE = @GNULIB_WRITE@
429 GNULIB__EXIT = @GNULIB__EXIT@
430 GREP = @GREP@
431 HAVE_ATOLL = @HAVE_ATOLL@
432 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
433 HAVE_CHOWN = @HAVE_CHOWN@
434 HAVE_CXX11 = @HAVE_CXX11@
435 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
436 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
437 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
438 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
439 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
440 HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
441 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
442 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
443 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
444 HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
445 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
446 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
447 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
448 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
449 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
450 HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
451 HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
452 HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
453 HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
454 HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
455 HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
456 HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
457 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
458 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
459 HAVE_DUP2 = @HAVE_DUP2@
460 HAVE_DUP3 = @HAVE_DUP3@
461 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
462 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
463 HAVE_FACCESSAT = @HAVE_FACCESSAT@
464 HAVE_FCHDIR = @HAVE_FCHDIR@
465 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
466 HAVE_FDATASYNC = @HAVE_FDATASYNC@
467 HAVE_FFSL = @HAVE_FFSL@
468 HAVE_FFSLL = @HAVE_FFSLL@
469 HAVE_FLOCK = @HAVE_FLOCK@
470 HAVE_FSYNC = @HAVE_FSYNC@
471 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
472 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
473 HAVE_GETGROUPS = @HAVE_GETGROUPS@
474 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
475 HAVE_GETLOGIN = @HAVE_GETLOGIN@
476 HAVE_GETOPT_H = @HAVE_GETOPT_H@
477 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
478 HAVE_GETPASS = @HAVE_GETPASS@
479 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
480 HAVE_GRANTPT = @HAVE_GRANTPT@
481 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
482 HAVE_LCHOWN = @HAVE_LCHOWN@
483 HAVE_LINK = @HAVE_LINK@
484 HAVE_LINKAT = @HAVE_LINKAT@
485 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
486 HAVE_MBSLEN = @HAVE_MBSLEN@
487 HAVE_MEMCHR = @HAVE_MEMCHR@
488 HAVE_MEMPCPY = @HAVE_MEMPCPY@
489 HAVE_MKDTEMP = @HAVE_MKDTEMP@
490 HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
491 HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
492 HAVE_MKSTEMP = @HAVE_MKSTEMP@
493 HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
494 HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
495 HAVE_OS_H = @HAVE_OS_H@
496 HAVE_PIPE = @HAVE_PIPE@
497 HAVE_PIPE2 = @HAVE_PIPE2@
498 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
499 HAVE_PREAD = @HAVE_PREAD@
500 HAVE_PTSNAME = @HAVE_PTSNAME@
501 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
502 HAVE_PWRITE = @HAVE_PWRITE@
503 HAVE_QSORT_R = @HAVE_QSORT_R@
504 HAVE_RANDOM = @HAVE_RANDOM@
505 HAVE_RANDOM_H = @HAVE_RANDOM_H@
506 HAVE_RANDOM_R = @HAVE_RANDOM_R@
507 HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
508 HAVE_READLINK = @HAVE_READLINK@
509 HAVE_READLINKAT = @HAVE_READLINKAT@
510 HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@
511 HAVE_REALPATH = @HAVE_REALPATH@
512 HAVE_RPMATCH = @HAVE_RPMATCH@
513 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
514 HAVE_SETENV = @HAVE_SETENV@
515 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
516 HAVE_SLEEP = @HAVE_SLEEP@
517 HAVE_STPCPY = @HAVE_STPCPY@
518 HAVE_STPNCPY = @HAVE_STPNCPY@
519 HAVE_STRCASESTR = @HAVE_STRCASESTR@
520 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
521 HAVE_STRPBRK = @HAVE_STRPBRK@
522 HAVE_STRSEP = @HAVE_STRSEP@
523 HAVE_STRTOD = @HAVE_STRTOD@
524 HAVE_STRTOLL = @HAVE_STRTOLL@
525 HAVE_STRTOULL = @HAVE_STRTOULL@
526 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
527 HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
528 HAVE_SYMLINK = @HAVE_SYMLINK@
529 HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
530 HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
531 HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@
532 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
533 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
534 HAVE_UNISTD_H = @HAVE_UNISTD_H@
535 HAVE_UNLINKAT = @HAVE_UNLINKAT@
536 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
537 HAVE_USLEEP = @HAVE_USLEEP@
538 HAVE_WCHAR_T = @HAVE_WCHAR_T@
539 HAVE__EXIT = @HAVE__EXIT@
540 HUNSPELL_CFLAGS = @HUNSPELL_CFLAGS@
541 HUNSPELL_LIBS = @HUNSPELL_LIBS@
542 INCLUDE_NEXT = @INCLUDE_NEXT@
543 INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
544 INSTALL = @INSTALL@
545 INSTALL_DATA = @INSTALL_DATA@
546 INSTALL_PROGRAM = @INSTALL_PROGRAM@
547 INSTALL_SCRIPT = @INSTALL_SCRIPT@
548 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
549 ISYSTEM = @ISYSTEM@
550 LD = @LD@
551 LDFLAGS = @LDFLAGS@
552 LIBINTL = @LIBINTL@
553 LIBOBJS = @LIBOBJS@
554 LIBS = @LIBS@
555 LIBTOOL = @LIBTOOL@
556 LIPO = @LIPO@
557 LN_S = @LN_S@
558 LTLIBINTL = @LTLIBINTL@
559 LTLIBOBJS = @LTLIBOBJS@
560 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
561 MAKEINFO = @MAKEINFO@
562 MANIFEST_TOOL = @MANIFEST_TOOL@
563 MKDIR_P = @MKDIR_P@
564 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
565 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
566 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
567 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
568 NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@
569 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
570 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
571 NEXT_GETOPT_H = @NEXT_GETOPT_H@
572 NEXT_STDDEF_H = @NEXT_STDDEF_H@
573 NEXT_STDLIB_H = @NEXT_STDLIB_H@
574 NEXT_STRING_H = @NEXT_STRING_H@
575 NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@
576 NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
577 NEXT_UNISTD_H = @NEXT_UNISTD_H@
578 NM = @NM@
579 NMEDIT = @NMEDIT@
580 NUSPELL_CFLAGS = @NUSPELL_CFLAGS@
581 NUSPELL_LIBS = @NUSPELL_LIBS@
582 OBJCXX = @OBJCXX@
583 OBJCXXCPP = @OBJCXXCPP@
584 OBJCXXDEPMODE = @OBJCXXDEPMODE@
585 OBJCXXFLAGS = @OBJCXXFLAGS@
586 OBJDUMP = @OBJDUMP@
587 OBJEXT = @OBJEXT@
588 OTOOL = @OTOOL@
589 OTOOL64 = @OTOOL64@
590 PACKAGE = @PACKAGE@
591 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
592 PACKAGE_NAME = @PACKAGE_NAME@
593 PACKAGE_STRING = @PACKAGE_STRING@
594 PACKAGE_TARNAME = @PACKAGE_TARNAME@
595 PACKAGE_URL = @PACKAGE_URL@
596 PACKAGE_VERSION = @PACKAGE_VERSION@
597 PATH_SEPARATOR = @PATH_SEPARATOR@
598 PKG_CONFIG = @PKG_CONFIG@
599 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
600 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
601 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
602 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
603 RANLIB = @RANLIB@
604 RC = @RC@
605 RELOCATABLE = @RELOCATABLE@
606 REPLACE_CALLOC = @REPLACE_CALLOC@
607 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
608 REPLACE_CHOWN = @REPLACE_CHOWN@
609 REPLACE_CLOSE = @REPLACE_CLOSE@
610 REPLACE_DUP = @REPLACE_DUP@
611 REPLACE_DUP2 = @REPLACE_DUP2@
612 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
613 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
614 REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
615 REPLACE_GETCWD = @REPLACE_GETCWD@
616 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
617 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
618 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
619 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
620 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
621 REPLACE_GETPASS = @REPLACE_GETPASS@
622 REPLACE_ISATTY = @REPLACE_ISATTY@
623 REPLACE_LCHOWN = @REPLACE_LCHOWN@
624 REPLACE_LINK = @REPLACE_LINK@
625 REPLACE_LINKAT = @REPLACE_LINKAT@
626 REPLACE_LSEEK = @REPLACE_LSEEK@
627 REPLACE_MALLOC = @REPLACE_MALLOC@
628 REPLACE_MBTOWC = @REPLACE_MBTOWC@
629 REPLACE_MEMCHR = @REPLACE_MEMCHR@
630 REPLACE_MEMMEM = @REPLACE_MEMMEM@
631 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
632 REPLACE_NULL = @REPLACE_NULL@
633 REPLACE_PREAD = @REPLACE_PREAD@
634 REPLACE_PTSNAME = @REPLACE_PTSNAME@
635 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
636 REPLACE_PUTENV = @REPLACE_PUTENV@
637 REPLACE_PWRITE = @REPLACE_PWRITE@
638 REPLACE_QSORT_R = @REPLACE_QSORT_R@
639 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
640 REPLACE_READ = @REPLACE_READ@
641 REPLACE_READLINK = @REPLACE_READLINK@
642 REPLACE_READLINKAT = @REPLACE_READLINKAT@
643 REPLACE_REALLOC = @REPLACE_REALLOC@
644 REPLACE_REALPATH = @REPLACE_REALPATH@
645 REPLACE_RMDIR = @REPLACE_RMDIR@
646 REPLACE_SETENV = @REPLACE_SETENV@
647 REPLACE_SLEEP = @REPLACE_SLEEP@
648 REPLACE_STPNCPY = @REPLACE_STPNCPY@
649 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
650 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
651 REPLACE_STRDUP = @REPLACE_STRDUP@
652 REPLACE_STRERROR = @REPLACE_STRERROR@
653 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
654 REPLACE_STRNCAT = @REPLACE_STRNCAT@
655 REPLACE_STRNDUP = @REPLACE_STRNDUP@
656 REPLACE_STRNLEN = @REPLACE_STRNLEN@
657 REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
658 REPLACE_STRSTR = @REPLACE_STRSTR@
659 REPLACE_STRTOD = @REPLACE_STRTOD@
660 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
661 REPLACE_SYMLINK = @REPLACE_SYMLINK@
662 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
663 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
664 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
665 REPLACE_UNLINK = @REPLACE_UNLINK@
666 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
667 REPLACE_UNSETENV = @REPLACE_UNSETENV@
668 REPLACE_USLEEP = @REPLACE_USLEEP@
669 REPLACE_WCTOMB = @REPLACE_WCTOMB@
670 REPLACE_WRITE = @REPLACE_WRITE@
671 SED = @SED@
672 SET_MAKE = @SET_MAKE@
673 SHELL = @SHELL@
674 STDDEF_H = @STDDEF_H@
675 STRIP = @STRIP@
676 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
677 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
678 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
679 UNITTESTPP_CFLAGS = @UNITTESTPP_CFLAGS@
680 UNITTESTPP_LIBS = @UNITTESTPP_LIBS@
681 VERSION = @VERSION@
682 VERSION_INFO = @VERSION_INFO@
683 VOIKKO_CFLAGS = @VOIKKO_CFLAGS@
684 VOIKKO_LIBS = @VOIKKO_LIBS@
685 WARN_CFLAGS = @WARN_CFLAGS@
686 WARN_CXXFLAGS = @WARN_CXXFLAGS@
687 WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
688 WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
689 ZEMBEREK_CFLAGS = @ZEMBEREK_CFLAGS@
690 ZEMBEREK_LIBS = @ZEMBEREK_LIBS@
691 abs_builddir = @abs_builddir@
692 abs_srcdir = @abs_srcdir@
693 abs_top_builddir = @abs_top_builddir@
694 abs_top_srcdir = @abs_top_srcdir@
695 ac_ct_AR = @ac_ct_AR@
696 ac_ct_CC = @ac_ct_CC@
697 ac_ct_CXX = @ac_ct_CXX@
698 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
699 ac_ct_OBJCXX = @ac_ct_OBJCXX@
700 am__include = @am__include@
701 am__leading_dot = @am__leading_dot@
702 am__quote = @am__quote@
703 am__tar = @am__tar@
704 am__untar = @am__untar@
705 bindir = @bindir@
706 build = @build@
707 build_alias = @build_alias@
708 build_cpu = @build_cpu@
709 build_os = @build_os@
710 build_vendor = @build_vendor@
711 builddir = @builddir@
712 datadir = @datadir@
713 datarootdir = @datarootdir@
714 docdir = @docdir@
715 dvidir = @dvidir@
716 exec_prefix = @exec_prefix@
717 gl_LIBOBJS = @gl_LIBOBJS@
718 gl_LTLIBOBJS = @gl_LTLIBOBJS@
719 gltests_LIBOBJS = @gltests_LIBOBJS@
720 gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
721 gltests_WITNESS = @gltests_WITNESS@
722 host = @host@
723 host_alias = @host_alias@
724 host_cpu = @host_cpu@
725 host_os = @host_os@
726 host_vendor = @host_vendor@
727 htmldir = @htmldir@
728 includedir = @includedir@
729 infodir = @infodir@
730 install_sh = @install_sh@
731 libdir = @libdir@
732 libexecdir = @libexecdir@
733 lispdir = @lispdir@
734 localedir = @localedir@
735 localstatedir = @localstatedir@
736 mandir = @mandir@
737 mkdir_p = @mkdir_p@
738 objdir = @objdir@
739 oldincludedir = @oldincludedir@
740 pdfdir = @pdfdir@
741 prefix = @prefix@
742 program_transform_name = @program_transform_name@
743 psdir = @psdir@
744 runstatedir = @runstatedir@
745 sbindir = @sbindir@
746 sharedstatedir = @sharedstatedir@
747 shlibext = @shlibext@
748 srcdir = @srcdir@
749 sysconfdir = @sysconfdir@
750 target_alias = @target_alias@
751 top_build_prefix = @top_build_prefix@
752 top_builddir = @top_builddir@
753 top_srcdir = @top_srcdir@
754 ACLOCAL_AMFLAGS = -I m4
755 AM_DISTCHECK_CONFIGURE_FLAGS = --enable-relocatable
756 SUBDIRS = lib src providers tests
757
758 # Note that the template file is called library.pc.in, but generates a
759 # versioned .pc file using some magic in AC_CONFIG_FILES.
760 pkgconfigdir = $(libdir)/pkgconfig
761 pkgconfig_DATA = enchant-$(ENCHANT_MAJOR_VERSION).pc
762 DISTCLEANFILES = $(pkgconfig_DATA)
763 EXTRA_DIST = \
764 enchant.pc.in \
765 README \
766 HACKING \
767 NEWS \
768 ChangeLog \
769 AUTHORS \
770 COPYING.LIB \
771 m4/gnulib-cache.m4
772
773 ALL_SOURCE_FILES = \
774 bootstrap.conf \
775 configure.ac \
776 Makefile.am \
777 src/Makefile.am \
778 src/*.[chi] \
779 providers/Makefile.am \
780 providers/*.[ch] \
781 providers/*.cpp \
782 providers/*.mm
783
784 all: config.h
785 $(MAKE) $(AM_MAKEFLAGS) all-recursive
786
787 .SUFFIXES:
788 am--refresh: Makefile
789 @:
790 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
791 @for dep in $?; do \
792 case '$(am__configure_deps)' in \
793 *$$dep*) \
794 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
795 $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
796 && exit 0; \
797 exit 1;; \
798 esac; \
799 done; \
800 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
801 $(am__cd) $(top_srcdir) && \
802 $(AUTOMAKE) --gnu Makefile
803 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
804 @case '$?' in \
805 *config.status*) \
806 echo ' $(SHELL) ./config.status'; \
807 $(SHELL) ./config.status;; \
808 *) \
809 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
810 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
811 esac;
812
813 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
814 $(SHELL) ./config.status --recheck
815
816 $(top_srcdir)/configure: $(am__configure_deps)
817 $(am__cd) $(srcdir) && $(AUTOCONF)
818 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
819 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
820 $(am__aclocal_m4_deps):
821
822 config.h: stamp-h1
823 @test -f $@ || rm -f stamp-h1
824 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
825
826 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
827 @rm -f stamp-h1
828 cd $(top_builddir) && $(SHELL) ./config.status config.h
829 $(srcdir)/config.h.in: $(am__configure_deps)
830 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
831 rm -f stamp-h1
832 touch $@
833
834 distclean-hdr:
835 -rm -f config.h stamp-h1
836
837 mostlyclean-libtool:
838 -rm -f *.lo
839
840 clean-libtool:
841 -rm -rf .libs _libs
842
843 distclean-libtool:
844 -rm -f libtool config.lt
845 install-pkgconfigDATA: $(pkgconfig_DATA)
846 @$(NORMAL_INSTALL)
847 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
848 if test -n "$$list"; then \
849 echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
850 $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
851 fi; \
852 for p in $$list; do \
853 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
854 echo "$$d$$p"; \
855 done | $(am__base_list) | \
856 while read files; do \
857 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
858 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
859 done
860
861 uninstall-pkgconfigDATA:
862 @$(NORMAL_UNINSTALL)
863 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
864 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
865 dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
866
867 # This directory's subdirectories are mostly independent; you can cd
868 # into them and run 'make' without going through this Makefile.
869 # To change the values of 'make' variables: instead of editing Makefiles,
870 # (1) if the variable is set in 'config.status', edit 'config.status'
871 # (which will cause the Makefiles to be regenerated when you run 'make');
872 # (2) otherwise, pass the desired values on the 'make' command line.
873 $(am__recursive_targets):
874 @fail=; \
875 if $(am__make_keepgoing); then \
876 failcom='fail=yes'; \
877 else \
878 failcom='exit 1'; \
879 fi; \
880 dot_seen=no; \
881 target=`echo $@ | sed s/-recursive//`; \
882 case "$@" in \
883 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
884 *) list='$(SUBDIRS)' ;; \
885 esac; \
886 for subdir in $$list; do \
887 echo "Making $$target in $$subdir"; \
888 if test "$$subdir" = "."; then \
889 dot_seen=yes; \
890 local_target="$$target-am"; \
891 else \
892 local_target="$$target"; \
893 fi; \
894 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
895 || eval $$failcom; \
896 done; \
897 if test "$$dot_seen" = "no"; then \
898 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
899 fi; test -z "$$fail"
900
901 ID: $(am__tagged_files)
902 $(am__define_uniq_tagged_files); mkid -fID $$unique
903 tags: tags-recursive
904 TAGS: tags
905
906 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
907 set x; \
908 here=`pwd`; \
909 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
910 include_option=--etags-include; \
911 empty_fix=.; \
912 else \
913 include_option=--include; \
914 empty_fix=; \
915 fi; \
916 list='$(SUBDIRS)'; for subdir in $$list; do \
917 if test "$$subdir" = .; then :; else \
918 test ! -f $$subdir/TAGS || \
919 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
920 fi; \
921 done; \
922 $(am__define_uniq_tagged_files); \
923 shift; \
924 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
925 test -n "$$unique" || unique=$$empty_fix; \
926 if test $$# -gt 0; then \
927 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
928 "$$@" $$unique; \
929 else \
930 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
931 $$unique; \
932 fi; \
933 fi
934 ctags: ctags-recursive
935
936 CTAGS: ctags
937 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
938 $(am__define_uniq_tagged_files); \
939 test -z "$(CTAGS_ARGS)$$unique" \
940 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
941 $$unique
942
943 GTAGS:
944 here=`$(am__cd) $(top_builddir) && pwd` \
945 && $(am__cd) $(top_srcdir) \
946 && gtags -i $(GTAGS_ARGS) "$$here"
947 cscope: cscope.files
948 test ! -s cscope.files \
949 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
950 clean-cscope:
951 -rm -f cscope.files
952 cscope.files: clean-cscope cscopelist
953 cscopelist: cscopelist-recursive
954
955 cscopelist-am: $(am__tagged_files)
956 list='$(am__tagged_files)'; \
957 case "$(srcdir)" in \
958 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
959 *) sdir=$(subdir)/$(srcdir) ;; \
960 esac; \
961 for i in $$list; do \
962 if test -f "$$i"; then \
963 echo "$(subdir)/$$i"; \
964 else \
965 echo "$$sdir/$$i"; \
966 fi; \
967 done >> $(top_builddir)/cscope.files
968
969 distclean-tags:
970 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
971 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
972
973 distdir: $(DISTFILES)
974 $(am__remove_distdir)
975 test -d "$(distdir)" || mkdir "$(distdir)"
976 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
977 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
978 list='$(DISTFILES)'; \
979 dist_files=`for file in $$list; do echo $$file; done | \
980 sed -e "s|^$$srcdirstrip/||;t" \
981 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
982 case $$dist_files in \
983 */*) $(MKDIR_P) `echo "$$dist_files" | \
984 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
985 sort -u` ;; \
986 esac; \
987 for file in $$dist_files; do \
988 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
989 if test -d $$d/$$file; then \
990 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
991 if test -d "$(distdir)/$$file"; then \
992 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
993 fi; \
994 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
995 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
996 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
997 fi; \
998 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
999 else \
1000 test -f "$(distdir)/$$file" \
1001 || cp -p $$d/$$file "$(distdir)/$$file" \
1002 || exit 1; \
1003 fi; \
1004 done
1005 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
1006 if test "$$subdir" = .; then :; else \
1007 $(am__make_dryrun) \
1008 || test -d "$(distdir)/$$subdir" \
1009 || $(MKDIR_P) "$(distdir)/$$subdir" \
1010 || exit 1; \
1011 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
1012 $(am__relativize); \
1013 new_distdir=$$reldir; \
1014 dir1=$$subdir; dir2="$(top_distdir)"; \
1015 $(am__relativize); \
1016 new_top_distdir=$$reldir; \
1017 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
1018 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
1019 ($(am__cd) $$subdir && \
1020 $(MAKE) $(AM_MAKEFLAGS) \
1021 top_distdir="$$new_top_distdir" \
1022 distdir="$$new_distdir" \
1023 am__remove_distdir=: \
1024 am__skip_length_check=: \
1025 am__skip_mode_fix=: \
1026 distdir) \
1027 || exit 1; \
1028 fi; \
1029 done
1030 -test -n "$(am__skip_mode_fix)" \
1031 || find "$(distdir)" -type d ! -perm -755 \
1032 -exec chmod u+rwx,go+rx {} \; -o \
1033 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
1034 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
1035 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
1036 || chmod -R a+r "$(distdir)"
1037 dist-gzip: distdir
1038 tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
1039 $(am__post_remove_distdir)
1040
1041 dist-bzip2: distdir
1042 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
1043 $(am__post_remove_distdir)
1044
1045 dist-lzip: distdir
1046 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
1047 $(am__post_remove_distdir)
1048
1049 dist-xz: distdir
1050 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
1051 $(am__post_remove_distdir)
1052
1053 dist-tarZ: distdir
1054 @echo WARNING: "Support for distribution archives compressed with" \
1055 "legacy program 'compress' is deprecated." >&2
1056 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
1057 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
1058 $(am__post_remove_distdir)
1059
1060 dist-shar: distdir
1061 @echo WARNING: "Support for shar distribution archives is" \
1062 "deprecated." >&2
1063 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
1064 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
1065 $(am__post_remove_distdir)
1066
1067 dist-zip: distdir
1068 -rm -f $(distdir).zip
1069 zip -rq $(distdir).zip $(distdir)
1070 $(am__post_remove_distdir)
1071
1072 dist dist-all:
1073 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
1074 $(am__post_remove_distdir)
1075
1076 # This target untars the dist file and tries a VPATH configuration. Then
1077 # it guarantees that the distribution is self-contained by making another
1078 # tarfile.
1079 distcheck: dist
1080 case '$(DIST_ARCHIVES)' in \
1081 *.tar.gz*) \
1082 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
1083 *.tar.bz2*) \
1084 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
1085 *.tar.lz*) \
1086 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
1087 *.tar.xz*) \
1088 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
1089 *.tar.Z*) \
1090 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
1091 *.shar.gz*) \
1092 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
1093 *.zip*) \
1094 unzip $(distdir).zip ;;\
1095 esac
1096 chmod -R a-w $(distdir)
1097 chmod u+w $(distdir)
1098 mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
1099 chmod a-w $(distdir)
1100 test -d $(distdir)/_build || exit 0; \
1101 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
1102 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
1103 && am__cwd=`pwd` \
1104 && $(am__cd) $(distdir)/_build/sub \
1105 && ../../configure \
1106 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
1107 $(DISTCHECK_CONFIGURE_FLAGS) \
1108 --srcdir=../.. --prefix="$$dc_install_base" \
1109 && $(MAKE) $(AM_MAKEFLAGS) \
1110 && $(MAKE) $(AM_MAKEFLAGS) dvi \
1111 && $(MAKE) $(AM_MAKEFLAGS) check \
1112 && $(MAKE) $(AM_MAKEFLAGS) install \
1113 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
1114 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
1115 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
1116 distuninstallcheck \
1117 && chmod -R a-w "$$dc_install_base" \
1118 && ({ \
1119 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
1120 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
1121 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
1122 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
1123 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
1124 } || { rm -rf "$$dc_destdir"; exit 1; }) \
1125 && rm -rf "$$dc_destdir" \
1126 && $(MAKE) $(AM_MAKEFLAGS) dist \
1127 && rm -rf $(DIST_ARCHIVES) \
1128 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
1129 && cd "$$am__cwd" \
1130 || exit 1
1131 $(am__post_remove_distdir)
1132 @(echo "$(distdir) archives ready for distribution: "; \
1133 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
1134 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
1135 distuninstallcheck:
1136 @test -n '$(distuninstallcheck_dir)' || { \
1137 echo 'ERROR: trying to run $@ with an empty' \
1138 '$$(distuninstallcheck_dir)' >&2; \
1139 exit 1; \
1140 }; \
1141 $(am__cd) '$(distuninstallcheck_dir)' || { \
1142 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
1143 exit 1; \
1144 }; \
1145 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
1146 || { echo "ERROR: files left after uninstall:" ; \
1147 if test -n "$(DESTDIR)"; then \
1148 echo " (check DESTDIR support)"; \
1149 fi ; \
1150 $(distuninstallcheck_listfiles) ; \
1151 exit 1; } >&2
1152 distcleancheck: distclean
1153 @if test '$(srcdir)' = . ; then \
1154 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
1155 exit 1 ; \
1156 fi
1157 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
1158 || { echo "ERROR: files left in build directory after distclean:" ; \
1159 $(distcleancheck_listfiles) ; \
1160 exit 1; } >&2
1161 check-am: all-am
1162 check: check-recursive
1163 all-am: Makefile $(DATA) config.h
1164 installdirs: installdirs-recursive
1165 installdirs-am:
1166 for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
1167 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
1168 done
1169 install: install-recursive
1170 install-exec: install-exec-recursive
1171 install-data: install-data-recursive
1172 uninstall: uninstall-recursive
1173
1174 install-am: all-am
1175 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1176
1177 installcheck: installcheck-recursive
1178 install-strip:
1179 if test -z '$(STRIP)'; then \
1180 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1181 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1182 install; \
1183 else \
1184 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1185 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1186 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
1187 fi
1188 mostlyclean-generic:
1189
1190 clean-generic:
1191
1192 distclean-generic:
1193 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1194 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1195 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
1196
1197 maintainer-clean-generic:
1198 @echo "This command is intended for maintainers to use"
1199 @echo "it deletes files that may require special tools to rebuild."
1200 clean: clean-recursive
1201
1202 clean-am: clean-generic clean-libtool mostlyclean-am
1203
1204 distclean: distclean-recursive
1205 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
1206 -rm -f Makefile
1207 distclean-am: clean-am distclean-generic distclean-hdr \
1208 distclean-libtool distclean-tags
1209
1210 dvi: dvi-recursive
1211
1212 dvi-am:
1213
1214 html: html-recursive
1215
1216 html-am:
1217
1218 info: info-recursive
1219
1220 info-am:
1221
1222 install-data-am: install-pkgconfigDATA
1223
1224 install-dvi: install-dvi-recursive
1225
1226 install-dvi-am:
1227
1228 install-exec-am:
1229
1230 install-html: install-html-recursive
1231
1232 install-html-am:
1233
1234 install-info: install-info-recursive
1235
1236 install-info-am:
1237
1238 install-man:
1239
1240 install-pdf: install-pdf-recursive
1241
1242 install-pdf-am:
1243
1244 install-ps: install-ps-recursive
1245
1246 install-ps-am:
1247
1248 installcheck-am:
1249
1250 maintainer-clean: maintainer-clean-recursive
1251 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
1252 -rm -rf $(top_srcdir)/autom4te.cache
1253 -rm -f Makefile
1254 maintainer-clean-am: distclean-am maintainer-clean-generic
1255
1256 mostlyclean: mostlyclean-recursive
1257
1258 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
1259
1260 pdf: pdf-recursive
1261
1262 pdf-am:
1263
1264 ps: ps-recursive
1265
1266 ps-am:
1267
1268 uninstall-am: uninstall-pkgconfigDATA
1269
1270 .MAKE: $(am__recursive_targets) all install-am install-strip
1271
1272 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
1273 am--refresh check check-am clean clean-cscope clean-generic \
1274 clean-libtool cscope cscopelist-am ctags ctags-am dist \
1275 dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
1276 dist-xz dist-zip distcheck distclean distclean-generic \
1277 distclean-hdr distclean-libtool distclean-tags distcleancheck \
1278 distdir distuninstallcheck dvi dvi-am html html-am info \
1279 info-am install install-am install-data install-data-am \
1280 install-dvi install-dvi-am install-exec install-exec-am \
1281 install-html install-html-am install-info install-info-am \
1282 install-man install-pdf install-pdf-am install-pkgconfigDATA \
1283 install-ps install-ps-am install-strip installcheck \
1284 installcheck-am installdirs installdirs-am maintainer-clean \
1285 maintainer-clean-generic mostlyclean mostlyclean-generic \
1286 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
1287 uninstall-am uninstall-pkgconfigDATA
1288
1289 .PRECIOUS: Makefile
1290
1291
1292 loc:
1293 cloc --force-lang="Bourne Shell",conf $(ALL_SOURCE_FILES)
1294
1295 release: distcheck
1296 git diff --exit-code && \
1297 git tag -a -m "Release tag" "v$(VERSION)" && \
1298 git push && git push --tags && \
1299 woger github \
1300 github_user=AbiWord \
1301 package=$(PACKAGE) \
1302 version=$(VERSION) \
1303 dist_type=tar.gz
1304
1305 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1306 # Otherwise a system limit (for SysV at least) may be exceeded.
1307 .NOEXPORT:
0 2.2.8 (February 27, 2020)
1 -------------------------
2
3 Add a provider back-end for Nuspell (thanks, Sander van Geloven). Nuspell is
4 a new spell-checker whose development has been supported by the Mozilla
5 foundation. It is backwards-compatible with Hunspell and Myspell
6 dictionaries, while supporting a wider range of language peculiarities,
7 improved suggestions, and easier maintainability of the code-base.
8
9 Doxygen documentation generation is now supported for Enchant (thanks,
10 Sander van Geloven).
11
12 The command-line parsing of the “enchant” program has been made more
13 friendly and reliable. The -L flag (show line numbers), which had not been
14 working for some time, has been fixed.
15
16 A buffer overflow in personal wordlist handling has been fixed.
17
18 Minor improvements were made to the tests (thanks, Sander van Geloven).
19
20
021 2.2.7 (September 9, 2019)
122 -------------------------
223
1616 Enchant currently works with the following spell-checkers:
1717
1818 * Hunspell (formerly Myspell)
19 * Nuspell
1920 * GNU Aspell
2021 * Hspell
2122 * Voikko
2930
3031 Python: https://github.com/rfk/pyenchant/
3132 Ruby: https://github.com/pennyapp/ruby-enchant
32 Go: http://pythonhosted.org/pyenchant/
33 Go: https://github.com/hermanschaaf/enchant
3334 Common Lisp: https://github.com/tlikonen/cl-enchant
3435
3536
3940 It is possible, and usually safe, to share Enchant’s personal word lists
4041 with other spelling checkers that use the same format (a simple plain text
4142 file with one word per line). The spell-checkers known to be compatible are
42 Hunspell and Ispell. (Although Enchant does not support Ispell as a
43 Hunspell, Nuspell and Ispell. (Although Enchant does not support Ispell as a
4344 back-end, it’s still fine to share word lists with it.) Other spell-checkers
4445 supported by Enchant are either incompatible, or have no personal word list
4546 mechanism. There may well be yet other spell-checkers, unknown to Enchant,
4647 that use the same format.
4748
48 Some applications use Hunspell, but store the personal word list under
49 another name or in another location. Firefox is one example. Firefox also
50 seems to reorder its word list when updating it; again, this is OK, as the
51 result is still in the same format.
49 Some applications use Hunspell or Nuspell, but store the personal word list
50 under another name or in another location. Firefox is one example. Firefox
51 also seems to reorder its word list when updating it; again, this is OK, as
52 the result is still in the same format. Anonther example is Thunderbird.
5253
5354 To share word lists with Enchant, find the other spelling checker’s word
54 list file, e.g. ~/.hunspell_fr_FR, and merge it with the corresponding
55 Enchant file, in this case ~/.config/enchant/fr_FR.dic (on a GNU or BSD
56 system). Use the following command, replacing ENCHANT-DICT and OTHER-DICT
57 with the corresponding dictionary file names:
55 list file, e.g. ~/.hunspell_fr_FR or ~/.config/nuspell/fr_FR, and merge it
56 with the corresponding Enchant file, in this case ~/.config/enchant/fr_FR.dic
57 (on a GNU or BSD system). Use the following command, replacing ENCHANT-DICT
58 and OTHER-DICT with the corresponding dictionary file names:
5859
5960 cat ENCHANT-DICT OTHER-DICT | sort -u > merged.txt
6061
0 # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
3
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17 [m4_warning([this file was generated for autoconf 2.69.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
23 #
24 # Copyright (C) 1999-2008, 2011-2015 Free Software Foundation, Inc.
25 # Written by Thomas Tanner, 1999
26 #
27 # This file is free software; the Free Software Foundation gives
28 # unlimited permission to copy and/or distribute it, with or without
29 # modifications, as long as this notice is preserved.
30
31 # serial 20 LTDL_INIT
32
33 # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
34 # ------------------------------------------
35 # DIRECTORY contains the libltdl sources. It is okay to call this
36 # function multiple times, as long as the same DIRECTORY is always given.
37 AC_DEFUN([LT_CONFIG_LTDL_DIR],
38 [AC_BEFORE([$0], [LTDL_INIT])
39 _$0($*)
40 ])# LT_CONFIG_LTDL_DIR
41
42 # We break this out into a separate macro, so that we can call it safely
43 # internally without being caught accidentally by the sed scan in libtoolize.
44 m4_defun([_LT_CONFIG_LTDL_DIR],
45 [dnl remove trailing slashes
46 m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
47 m4_case(_LTDL_DIR,
48 [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply '.'
49 m4_if(_ARG_DIR, [.],
50 [],
51 [m4_define([_LTDL_DIR], _ARG_DIR)
52 _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
53 [m4_if(_ARG_DIR, _LTDL_DIR,
54 [],
55 [m4_fatal([multiple libltdl directories: ']_LTDL_DIR[', ']_ARG_DIR['])])])
56 m4_popdef([_ARG_DIR])
57 ])# _LT_CONFIG_LTDL_DIR
58
59 # Initialise:
60 m4_define([_LTDL_DIR], [])
61
62
63 # _LT_BUILD_PREFIX
64 # ----------------
65 # If Autoconf is new enough, expand to '$(top_build_prefix)', otherwise
66 # to '$(top_builddir)/'.
67 m4_define([_LT_BUILD_PREFIX],
68 [m4_ifdef([AC_AUTOCONF_VERSION],
69 [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
70 [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
71 [$(top_build_prefix)],
72 [$(top_builddir)/])],
73 [$(top_build_prefix)])],
74 [$(top_builddir)/])[]dnl
75 ])
76
77
78 # LTDL_CONVENIENCE
79 # ----------------
80 # sets LIBLTDL to the link flags for the libltdl convenience library and
81 # LTDLINCL to the include flags for the libltdl header and adds
82 # --enable-ltdl-convenience to the configure arguments. Note that
83 # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
84 # '$(top_build_prefix)' if available, otherwise with '$(top_builddir)/',
85 # and LTDLINCL will be prefixed with '$(top_srcdir)/' (note the single
86 # quotes!). If your package is not flat and you're not using automake,
87 # define top_build_prefix, top_builddir, and top_srcdir appropriately
88 # in your Makefiles.
89 AC_DEFUN([LTDL_CONVENIENCE],
90 [AC_BEFORE([$0], [LTDL_INIT])dnl
91 dnl Although the argument is deprecated and no longer documented,
92 dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
93 dnl here make sure it is the same as any other declaration of libltdl's
94 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
95 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
96 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
97 _$0()
98 ])# LTDL_CONVENIENCE
99
100 # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
101 # now we have LT_CONFIG_LTDL_DIR:
102 AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
103 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
104 _LTDL_CONVENIENCE])
105
106 dnl aclocal-1.4 backwards compatibility:
107 dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
108
109
110 # _LTDL_CONVENIENCE
111 # -----------------
112 # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
113 m4_defun([_LTDL_CONVENIENCE],
114 [case $enable_ltdl_convenience in
115 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
116 "") enable_ltdl_convenience=yes
117 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
118 esac
119 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
120 LTDLDEPS=$LIBLTDL
121 LTDLINCL='-I$(top_srcdir)'"${lt_ltdl_dir+/$lt_ltdl_dir}"
122
123 AC_SUBST([LIBLTDL])
124 AC_SUBST([LTDLDEPS])
125 AC_SUBST([LTDLINCL])
126
127 # For backwards non-gettext consistent compatibility...
128 INCLTDL=$LTDLINCL
129 AC_SUBST([INCLTDL])
130 ])# _LTDL_CONVENIENCE
131
132
133 # LTDL_INSTALLABLE
134 # ----------------
135 # sets LIBLTDL to the link flags for the libltdl installable library
136 # and LTDLINCL to the include flags for the libltdl header and adds
137 # --enable-ltdl-install to the configure arguments. Note that
138 # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
139 # is not found, LIBLTDL will be prefixed with '$(top_build_prefix)' if
140 # available, otherwise with '$(top_builddir)/', and LTDLINCL will be
141 # prefixed with '$(top_srcdir)/' (note the single quotes!). If your
142 # package is not flat and you're not using automake, define top_build_prefix,
143 # top_builddir, and top_srcdir appropriately in your Makefiles.
144 # In the future, this macro may have to be called after LT_INIT.
145 AC_DEFUN([LTDL_INSTALLABLE],
146 [AC_BEFORE([$0], [LTDL_INIT])dnl
147 dnl Although the argument is deprecated and no longer documented,
148 dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
149 dnl here make sure it is the same as any other declaration of libltdl's
150 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
151 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
152 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
153 _$0()
154 ])# LTDL_INSTALLABLE
155
156 # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
157 # now we have LT_CONFIG_LTDL_DIR:
158 AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
159 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
160 _LTDL_INSTALLABLE])
161
162 dnl aclocal-1.4 backwards compatibility:
163 dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
164
165
166 # _LTDL_INSTALLABLE
167 # -----------------
168 # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
169 m4_defun([_LTDL_INSTALLABLE],
170 [if test -f "$prefix/lib/libltdl.la"; then
171 lt_save_LDFLAGS=$LDFLAGS
172 LDFLAGS="-L$prefix/lib $LDFLAGS"
173 AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
174 LDFLAGS=$lt_save_LDFLAGS
175 if test yes = "${lt_lib_ltdl-no}"; then
176 if test yes != "$enable_ltdl_install"; then
177 # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
178 AC_MSG_WARN([not overwriting libltdl at $prefix, force with '--enable-ltdl-install'])
179 enable_ltdl_install=no
180 fi
181 elif test no = "$enable_ltdl_install"; then
182 AC_MSG_WARN([libltdl not installed, but installation disabled])
183 fi
184 fi
185
186 # If configure.ac declared an installable ltdl, and the user didn't override
187 # with --disable-ltdl-install, we will install the shipped libltdl.
188 case $enable_ltdl_install in
189 no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
190 LIBLTDL=-lltdl
191 LTDLDEPS=
192 LTDLINCL=
193 ;;
194 *) enable_ltdl_install=yes
195 ac_configure_args="$ac_configure_args --enable-ltdl-install"
196 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
197 LTDLDEPS=$LIBLTDL
198 LTDLINCL='-I$(top_srcdir)'"${lt_ltdl_dir+/$lt_ltdl_dir}"
199 ;;
200 esac
201
202 AC_SUBST([LIBLTDL])
203 AC_SUBST([LTDLDEPS])
204 AC_SUBST([LTDLINCL])
205
206 # For backwards non-gettext consistent compatibility...
207 INCLTDL=$LTDLINCL
208 AC_SUBST([INCLTDL])
209 ])# LTDL_INSTALLABLE
210
211
212 # _LTDL_MODE_DISPATCH
213 # -------------------
214 m4_define([_LTDL_MODE_DISPATCH],
215 [dnl If _LTDL_DIR is '.', then we are configuring libltdl itself:
216 m4_if(_LTDL_DIR, [],
217 [],
218 dnl if _LTDL_MODE was not set already, the default value is 'subproject':
219 [m4_case(m4_default(_LTDL_MODE, [subproject]),
220 [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
221 _LT_SHELL_INIT([lt_dlopen_dir=$lt_ltdl_dir])],
222 [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir=$lt_ltdl_dir; lt_libobj_prefix=$lt_ltdl_dir/])],
223 [recursive], [],
224 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
225 dnl Be careful not to expand twice:
226 m4_define([$0], [])
227 ])# _LTDL_MODE_DISPATCH
228
229
230 # _LT_LIBOBJ(MODULE_NAME)
231 # -----------------------
232 # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
233 # of into LIBOBJS.
234 AC_DEFUN([_LT_LIBOBJ], [
235 m4_pattern_allow([^_LT_LIBOBJS$])
236 _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
237 ])# _LT_LIBOBJS
238
239
240 # LTDL_INIT([OPTIONS])
241 # --------------------
242 # Clients of libltdl can use this macro to allow the installer to
243 # choose between a shipped copy of the ltdl sources or a preinstalled
244 # version of the library. If the shipped ltdl sources are not in a
245 # subdirectory named libltdl, the directory name must be given by
246 # LT_CONFIG_LTDL_DIR.
247 AC_DEFUN([LTDL_INIT],
248 [dnl Parse OPTIONS
249 _LT_SET_OPTIONS([$0], [$1])
250
251 dnl We need to keep our own list of libobjs separate from our parent project,
252 dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
253 dnl we look for our own LIBOBJs.
254 m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
255 m4_pushdef([AC_LIBSOURCES])
256
257 dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
258 m4_if(_LTDL_MODE, [],
259 [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
260 m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
261 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
262
263 AC_ARG_WITH([included_ltdl],
264 [AS_HELP_STRING([--with-included-ltdl],
265 [use the GNU ltdl sources included here])])
266
267 if test yes != "$with_included_ltdl"; then
268 # We are not being forced to use the included libltdl sources, so
269 # decide whether there is a useful installed version we can use.
270 AC_CHECK_HEADER([ltdl.h],
271 [AC_CHECK_DECL([lt_dlinterface_register],
272 [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
273 [with_included_ltdl=no],
274 [with_included_ltdl=yes])],
275 [with_included_ltdl=yes],
276 [AC_INCLUDES_DEFAULT
277 #include <ltdl.h>])],
278 [with_included_ltdl=yes],
279 [AC_INCLUDES_DEFAULT]
280 )
281 fi
282
283 dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
284 dnl was called yet, then for old times' sake, we assume libltdl is in an
285 dnl eponymous directory:
286 AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
287
288 AC_ARG_WITH([ltdl_include],
289 [AS_HELP_STRING([--with-ltdl-include=DIR],
290 [use the ltdl headers installed in DIR])])
291
292 if test -n "$with_ltdl_include"; then
293 if test -f "$with_ltdl_include/ltdl.h"; then :
294 else
295 AC_MSG_ERROR([invalid ltdl include directory: '$with_ltdl_include'])
296 fi
297 else
298 with_ltdl_include=no
299 fi
300
301 AC_ARG_WITH([ltdl_lib],
302 [AS_HELP_STRING([--with-ltdl-lib=DIR],
303 [use the libltdl.la installed in DIR])])
304
305 if test -n "$with_ltdl_lib"; then
306 if test -f "$with_ltdl_lib/libltdl.la"; then :
307 else
308 AC_MSG_ERROR([invalid ltdl library directory: '$with_ltdl_lib'])
309 fi
310 else
311 with_ltdl_lib=no
312 fi
313
314 case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
315 ,yes,no,no,)
316 m4_case(m4_default(_LTDL_TYPE, [convenience]),
317 [convenience], [_LTDL_CONVENIENCE],
318 [installable], [_LTDL_INSTALLABLE],
319 [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
320 ;;
321 ,no,no,no,)
322 # If the included ltdl is not to be used, then use the
323 # preinstalled libltdl we found.
324 AC_DEFINE([HAVE_LTDL], [1],
325 [Define this if a modern libltdl is already installed])
326 LIBLTDL=-lltdl
327 LTDLDEPS=
328 LTDLINCL=
329 ;;
330 ,no*,no,*)
331 AC_MSG_ERROR(['--with-ltdl-include' and '--with-ltdl-lib' options must be used together])
332 ;;
333 *) with_included_ltdl=no
334 LIBLTDL="-L$with_ltdl_lib -lltdl"
335 LTDLDEPS=
336 LTDLINCL=-I$with_ltdl_include
337 ;;
338 esac
339 INCLTDL=$LTDLINCL
340
341 # Report our decision...
342 AC_MSG_CHECKING([where to find libltdl headers])
343 AC_MSG_RESULT([$LTDLINCL])
344 AC_MSG_CHECKING([where to find libltdl library])
345 AC_MSG_RESULT([$LIBLTDL])
346
347 _LTDL_SETUP
348
349 dnl restore autoconf definition.
350 m4_popdef([AC_LIBOBJ])
351 m4_popdef([AC_LIBSOURCES])
352
353 AC_CONFIG_COMMANDS_PRE([
354 _ltdl_libobjs=
355 _ltdl_ltlibobjs=
356 if test -n "$_LT_LIBOBJS"; then
357 # Remove the extension.
358 _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
359 for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
360 _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
361 _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
362 done
363 fi
364 AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
365 AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
366 ])
367
368 # Only expand once:
369 m4_define([LTDL_INIT])
370 ])# LTDL_INIT
371
372 # Old names:
373 AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
374 AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
375 AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
376 dnl aclocal-1.4 backwards compatibility:
377 dnl AC_DEFUN([AC_LIB_LTDL], [])
378 dnl AC_DEFUN([AC_WITH_LTDL], [])
379 dnl AC_DEFUN([LT_WITH_LTDL], [])
380
381
382 # _LTDL_SETUP
383 # -----------
384 # Perform all the checks necessary for compilation of the ltdl objects
385 # -- including compiler checks and header checks. This is a public
386 # interface mainly for the benefit of libltdl's own configure.ac, most
387 # other users should call LTDL_INIT instead.
388 AC_DEFUN([_LTDL_SETUP],
389 [AC_REQUIRE([AC_PROG_CC])dnl
390 AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
391 AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
392 AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
393 AC_REQUIRE([LT_LIB_DLLOAD])dnl
394 AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
395 AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
396 AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
397 AC_REQUIRE([LT_FUNC_ARGZ])dnl
398
399 m4_require([_LT_CHECK_OBJDIR])dnl
400 m4_require([_LT_HEADER_DLFCN])dnl
401 m4_require([_LT_CHECK_DLPREOPEN])dnl
402 m4_require([_LT_DECL_SED])dnl
403
404 dnl Don't require this, or it will be expanded earlier than the code
405 dnl that sets the variables it relies on:
406 _LT_ENABLE_INSTALL
407
408 dnl _LTDL_MODE specific code must be called at least once:
409 _LTDL_MODE_DISPATCH
410
411 # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
412 # the user used. This is so that ltdl.h can pick up the parent projects
413 # config.h file, The first file in AC_CONFIG_HEADERS must contain the
414 # definitions required by ltdl.c.
415 # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
416 AC_CONFIG_COMMANDS_PRE([dnl
417 m4_pattern_allow([^LT_CONFIG_H$])dnl
418 m4_ifset([AH_HEADER],
419 [LT_CONFIG_H=AH_HEADER],
420 [m4_ifset([AC_LIST_HEADERS],
421 [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's|^[[ ]]*||;s|[[ :]].*$||'`],
422 [])])])
423 AC_SUBST([LT_CONFIG_H])
424
425 AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
426 [], [], [AC_INCLUDES_DEFAULT])
427
428 AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
429 AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
430
431 m4_pattern_allow([LT_LIBEXT])dnl
432 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
433
434 name=
435 eval "lt_libprefix=\"$libname_spec\""
436 m4_pattern_allow([LT_LIBPREFIX])dnl
437 AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
438
439 name=ltdl
440 eval "LTDLOPEN=\"$libname_spec\""
441 AC_SUBST([LTDLOPEN])
442 ])# _LTDL_SETUP
443
444
445 # _LT_ENABLE_INSTALL
446 # ------------------
447 m4_define([_LT_ENABLE_INSTALL],
448 [AC_ARG_ENABLE([ltdl-install],
449 [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
450
451 case ,$enable_ltdl_install,$enable_ltdl_convenience in
452 *yes*) ;;
453 *) enable_ltdl_convenience=yes ;;
454 esac
455
456 m4_ifdef([AM_CONDITIONAL],
457 [AM_CONDITIONAL(INSTALL_LTDL, test no != "${enable_ltdl_install-no}")
458 AM_CONDITIONAL(CONVENIENCE_LTDL, test no != "${enable_ltdl_convenience-no}")])
459 ])# _LT_ENABLE_INSTALL
460
461
462 # LT_SYS_DLOPEN_DEPLIBS
463 # ---------------------
464 AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
465 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
466 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
467 [lt_cv_sys_dlopen_deplibs],
468 [# PORTME does your system automatically load deplibs for dlopen?
469 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
470 # For now, we just catch OSes we know something about -- in the
471 # future, we'll try test this programmatically.
472 lt_cv_sys_dlopen_deplibs=unknown
473 case $host_os in
474 aix3*|aix4.1.*|aix4.2.*)
475 # Unknown whether this is true for these versions of AIX, but
476 # we want this 'case' here to explicitly catch those versions.
477 lt_cv_sys_dlopen_deplibs=unknown
478 ;;
479 aix[[4-9]]*)
480 lt_cv_sys_dlopen_deplibs=yes
481 ;;
482 amigaos*)
483 case $host_cpu in
484 powerpc)
485 lt_cv_sys_dlopen_deplibs=no
486 ;;
487 esac
488 ;;
489 bitrig*)
490 lt_cv_sys_dlopen_deplibs=yes
491 ;;
492 darwin*)
493 # Assuming the user has installed a libdl from somewhere, this is true
494 # If you are looking for one http://www.opendarwin.org/projects/dlcompat
495 lt_cv_sys_dlopen_deplibs=yes
496 ;;
497 freebsd* | dragonfly*)
498 lt_cv_sys_dlopen_deplibs=yes
499 ;;
500 gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
501 # GNU and its variants, using gnu ld.so (Glibc)
502 lt_cv_sys_dlopen_deplibs=yes
503 ;;
504 hpux10*|hpux11*)
505 lt_cv_sys_dlopen_deplibs=yes
506 ;;
507 interix*)
508 lt_cv_sys_dlopen_deplibs=yes
509 ;;
510 irix[[12345]]*|irix6.[[01]]*)
511 # Catch all versions of IRIX before 6.2, and indicate that we don't
512 # know how it worked for any of those versions.
513 lt_cv_sys_dlopen_deplibs=unknown
514 ;;
515 irix*)
516 # The case above catches anything before 6.2, and it's known that
517 # at 6.2 and later dlopen does load deplibs.
518 lt_cv_sys_dlopen_deplibs=yes
519 ;;
520 netbsd* | netbsdelf*-gnu)
521 lt_cv_sys_dlopen_deplibs=yes
522 ;;
523 openbsd*)
524 lt_cv_sys_dlopen_deplibs=yes
525 ;;
526 osf[[1234]]*)
527 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
528 # it did *not* use an RPATH in a shared library to find objects the
529 # library depends on, so we explicitly say 'no'.
530 lt_cv_sys_dlopen_deplibs=no
531 ;;
532 osf5.0|osf5.0a|osf5.1)
533 # dlopen *does* load deplibs and with the right loader patch applied
534 # it even uses RPATH in a shared library to search for shared objects
535 # that the library depends on, but there's no easy way to know if that
536 # patch is installed. Since this is the case, all we can really
537 # say is unknown -- it depends on the patch being installed. If
538 # it is, this changes to 'yes'. Without it, it would be 'no'.
539 lt_cv_sys_dlopen_deplibs=unknown
540 ;;
541 osf*)
542 # the two cases above should catch all versions of osf <= 5.1. Read
543 # the comments above for what we know about them.
544 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
545 # is used to find them so we can finally say 'yes'.
546 lt_cv_sys_dlopen_deplibs=yes
547 ;;
548 qnx*)
549 lt_cv_sys_dlopen_deplibs=yes
550 ;;
551 solaris*)
552 lt_cv_sys_dlopen_deplibs=yes
553 ;;
554 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
555 libltdl_cv_sys_dlopen_deplibs=yes
556 ;;
557 esac
558 ])
559 if test yes != "$lt_cv_sys_dlopen_deplibs"; then
560 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
561 [Define if the OS needs help to load dependent libraries for dlopen().])
562 fi
563 ])# LT_SYS_DLOPEN_DEPLIBS
564
565 # Old name:
566 AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
567 dnl aclocal-1.4 backwards compatibility:
568 dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
569
570
571 # LT_SYS_MODULE_EXT
572 # -----------------
573 AC_DEFUN([LT_SYS_MODULE_EXT],
574 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
575 AC_CACHE_CHECK([what extension is used for runtime loadable modules],
576 [libltdl_cv_shlibext],
577 [
578 module=yes
579 eval libltdl_cv_shlibext=$shrext_cmds
580 module=no
581 eval libltdl_cv_shrext=$shrext_cmds
582 ])
583 if test -n "$libltdl_cv_shlibext"; then
584 m4_pattern_allow([LT_MODULE_EXT])dnl
585 AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
586 [Define to the extension used for runtime loadable modules, say, ".so".])
587 fi
588 if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
589 m4_pattern_allow([LT_SHARED_EXT])dnl
590 AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
591 [Define to the shared library suffix, say, ".dylib".])
592 fi
593 if test -n "$shared_archive_member_spec"; then
594 m4_pattern_allow([LT_SHARED_LIB_MEMBER])dnl
595 AC_DEFINE_UNQUOTED([LT_SHARED_LIB_MEMBER], ["($shared_archive_member_spec.o)"],
596 [Define to the shared archive member specification, say "(shr.o)".])
597 fi
598 ])# LT_SYS_MODULE_EXT
599
600 # Old name:
601 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
602 dnl aclocal-1.4 backwards compatibility:
603 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
604
605
606 # LT_SYS_MODULE_PATH
607 # ------------------
608 AC_DEFUN([LT_SYS_MODULE_PATH],
609 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
610 AC_CACHE_CHECK([what variable specifies run-time module search path],
611 [lt_cv_module_path_var], [lt_cv_module_path_var=$shlibpath_var])
612 if test -n "$lt_cv_module_path_var"; then
613 m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
614 AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
615 [Define to the name of the environment variable that determines the run-time module search path.])
616 fi
617 ])# LT_SYS_MODULE_PATH
618
619 # Old name:
620 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
621 dnl aclocal-1.4 backwards compatibility:
622 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
623
624
625 # LT_SYS_DLSEARCH_PATH
626 # --------------------
627 AC_DEFUN([LT_SYS_DLSEARCH_PATH],
628 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
629 AC_CACHE_CHECK([for the default library search path],
630 [lt_cv_sys_dlsearch_path],
631 [lt_cv_sys_dlsearch_path=$sys_lib_dlsearch_path_spec])
632 if test -n "$lt_cv_sys_dlsearch_path"; then
633 sys_dlsearch_path=
634 for dir in $lt_cv_sys_dlsearch_path; do
635 if test -z "$sys_dlsearch_path"; then
636 sys_dlsearch_path=$dir
637 else
638 sys_dlsearch_path=$sys_dlsearch_path$PATH_SEPARATOR$dir
639 fi
640 done
641 m4_pattern_allow([LT_DLSEARCH_PATH])dnl
642 AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
643 [Define to the system default library search path.])
644 fi
645 ])# LT_SYS_DLSEARCH_PATH
646
647 # Old name:
648 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
649 dnl aclocal-1.4 backwards compatibility:
650 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
651
652
653 # _LT_CHECK_DLPREOPEN
654 # -------------------
655 m4_defun([_LT_CHECK_DLPREOPEN],
656 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
657 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
658 [libltdl_cv_preloaded_symbols],
659 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
660 libltdl_cv_preloaded_symbols=yes
661 else
662 libltdl_cv_preloaded_symbols=no
663 fi
664 ])
665 if test yes = "$libltdl_cv_preloaded_symbols"; then
666 AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
667 [Define if libtool can extract symbol lists from object files.])
668 fi
669 ])# _LT_CHECK_DLPREOPEN
670
671
672 # LT_LIB_DLLOAD
673 # -------------
674 AC_DEFUN([LT_LIB_DLLOAD],
675 [m4_pattern_allow([^LT_DLLOADERS$])
676 LT_DLLOADERS=
677 AC_SUBST([LT_DLLOADERS])
678
679 AC_LANG_PUSH([C])
680 lt_dlload_save_LIBS=$LIBS
681
682 LIBADD_DLOPEN=
683 AC_SEARCH_LIBS([dlopen], [dl],
684 [AC_DEFINE([HAVE_LIBDL], [1],
685 [Define if you have the libdl library or equivalent.])
686 if test "$ac_cv_search_dlopen" != "none required"; then
687 LIBADD_DLOPEN=-ldl
688 fi
689 libltdl_cv_lib_dl_dlopen=yes
690 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
691 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
692 # include <dlfcn.h>
693 #endif
694 ]], [[dlopen(0, 0);]])],
695 [AC_DEFINE([HAVE_LIBDL], [1],
696 [Define if you have the libdl library or equivalent.])
697 libltdl_cv_func_dlopen=yes
698 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
699 [AC_CHECK_LIB([svld], [dlopen],
700 [AC_DEFINE([HAVE_LIBDL], [1],
701 [Define if you have the libdl library or equivalent.])
702 LIBADD_DLOPEN=-lsvld libltdl_cv_func_dlopen=yes
703 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
704 if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen"
705 then
706 lt_save_LIBS=$LIBS
707 LIBS="$LIBS $LIBADD_DLOPEN"
708 AC_CHECK_FUNCS([dlerror])
709 LIBS=$lt_save_LIBS
710 fi
711 AC_SUBST([LIBADD_DLOPEN])
712
713 LIBADD_SHL_LOAD=
714 AC_CHECK_FUNC([shl_load],
715 [AC_DEFINE([HAVE_SHL_LOAD], [1],
716 [Define if you have the shl_load function.])
717 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
718 [AC_CHECK_LIB([dld], [shl_load],
719 [AC_DEFINE([HAVE_SHL_LOAD], [1],
720 [Define if you have the shl_load function.])
721 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
722 LIBADD_SHL_LOAD=-ldld])])
723 AC_SUBST([LIBADD_SHL_LOAD])
724
725 case $host_os in
726 darwin[[1567]].*)
727 # We only want this for pre-Mac OS X 10.4.
728 AC_CHECK_FUNC([_dyld_func_lookup],
729 [AC_DEFINE([HAVE_DYLD], [1],
730 [Define if you have the _dyld_func_lookup function.])
731 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
732 ;;
733 beos*)
734 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
735 ;;
736 cygwin* | mingw* | pw32*)
737 AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
738 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
739 ;;
740 esac
741
742 AC_CHECK_LIB([dld], [dld_link],
743 [AC_DEFINE([HAVE_DLD], [1],
744 [Define if you have the GNU dld library.])
745 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
746 AC_SUBST([LIBADD_DLD_LINK])
747
748 m4_pattern_allow([^LT_DLPREOPEN$])
749 LT_DLPREOPEN=
750 if test -n "$LT_DLLOADERS"
751 then
752 for lt_loader in $LT_DLLOADERS; do
753 LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
754 done
755 AC_DEFINE([HAVE_LIBDLLOADER], [1],
756 [Define if libdlloader will be built on this platform])
757 fi
758 AC_SUBST([LT_DLPREOPEN])
759
760 dnl This isn't used anymore, but set it for backwards compatibility
761 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
762 AC_SUBST([LIBADD_DL])
763
764 LIBS=$lt_dlload_save_LIBS
765 AC_LANG_POP
766 ])# LT_LIB_DLLOAD
767
768 # Old name:
769 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
770 dnl aclocal-1.4 backwards compatibility:
771 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
772
773
774 # LT_SYS_SYMBOL_USCORE
775 # --------------------
776 # does the compiler prefix global symbols with an underscore?
777 AC_DEFUN([LT_SYS_SYMBOL_USCORE],
778 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
779 AC_CACHE_CHECK([for _ prefix in compiled symbols],
780 [lt_cv_sys_symbol_underscore],
781 [lt_cv_sys_symbol_underscore=no
782 cat > conftest.$ac_ext <<_LT_EOF
783 void nm_test_func(){}
784 int main(){nm_test_func;return 0;}
785 _LT_EOF
786 if AC_TRY_EVAL(ac_compile); then
787 # Now try to grab the symbols.
788 ac_nlist=conftest.nm
789 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
790 # See whether the symbols have a leading underscore.
791 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
792 lt_cv_sys_symbol_underscore=yes
793 else
794 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
795 :
796 else
797 echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
798 fi
799 fi
800 else
801 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
802 fi
803 else
804 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
805 cat conftest.c >&AS_MESSAGE_LOG_FD
806 fi
807 rm -rf conftest*
808 ])
809 sys_symbol_underscore=$lt_cv_sys_symbol_underscore
810 AC_SUBST([sys_symbol_underscore])
811 ])# LT_SYS_SYMBOL_USCORE
812
813 # Old name:
814 AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
815 dnl aclocal-1.4 backwards compatibility:
816 dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
817
818
819 # LT_FUNC_DLSYM_USCORE
820 # --------------------
821 AC_DEFUN([LT_FUNC_DLSYM_USCORE],
822 [AC_REQUIRE([_LT_COMPILER_PIC])dnl for lt_prog_compiler_wl
823 AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl for lt_cv_sys_symbol_underscore
824 AC_REQUIRE([LT_SYS_MODULE_EXT])dnl for libltdl_cv_shlibext
825 if test yes = "$lt_cv_sys_symbol_underscore"; then
826 if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen"; then
827 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
828 [libltdl_cv_need_uscore],
829 [libltdl_cv_need_uscore=unknown
830 dlsym_uscore_save_LIBS=$LIBS
831 LIBS="$LIBS $LIBADD_DLOPEN"
832 libname=conftmod # stay within 8.3 filename limits!
833 cat >$libname.$ac_ext <<_LT_EOF
834 [#line $LINENO "configure"
835 #include "confdefs.h"
836 /* When -fvisibility=hidden is used, assume the code has been annotated
837 correspondingly for the symbols needed. */
838 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
839 int fnord () __attribute__((visibility("default")));
840 #endif
841 int fnord () { return 42; }]
842 _LT_EOF
843
844 # ltfn_module_cmds module_cmds
845 # Execute tilde-delimited MODULE_CMDS with environment primed for
846 # $module_cmds or $archive_cmds type content.
847 ltfn_module_cmds ()
848 {( # subshell avoids polluting parent global environment
849 module_cmds_save_ifs=$IFS; IFS='~'
850 for cmd in @S|@1; do
851 IFS=$module_cmds_save_ifs
852 libobjs=$libname.$ac_objext; lib=$libname$libltdl_cv_shlibext
853 rpath=/not-exists; soname=$libname$libltdl_cv_shlibext; output_objdir=.
854 major=; versuffix=; verstring=; deplibs=
855 ECHO=echo; wl=$lt_prog_compiler_wl; allow_undefined_flag=
856 eval $cmd
857 done
858 IFS=$module_cmds_save_ifs
859 )}
860
861 # Compile a loadable module using libtool macro expansion results.
862 $CC $pic_flag -c $libname.$ac_ext
863 ltfn_module_cmds "${module_cmds:-$archive_cmds}"
864
865 # Try to fetch fnord with dlsym().
866 libltdl_dlunknown=0; libltdl_dlnouscore=1; libltdl_dluscore=2
867 cat >conftest.$ac_ext <<_LT_EOF
868 [#line $LINENO "configure"
869 #include "confdefs.h"
870 #if HAVE_DLFCN_H
871 #include <dlfcn.h>
872 #endif
873 #include <stdio.h>
874 #ifndef RTLD_GLOBAL
875 # ifdef DL_GLOBAL
876 # define RTLD_GLOBAL DL_GLOBAL
877 # else
878 # define RTLD_GLOBAL 0
879 # endif
880 #endif
881 #ifndef RTLD_NOW
882 # ifdef DL_NOW
883 # define RTLD_NOW DL_NOW
884 # else
885 # define RTLD_NOW 0
886 # endif
887 #endif
888 int main () {
889 void *handle = dlopen ("`pwd`/$libname$libltdl_cv_shlibext", RTLD_GLOBAL|RTLD_NOW);
890 int status = $libltdl_dlunknown;
891 if (handle) {
892 if (dlsym (handle, "fnord"))
893 status = $libltdl_dlnouscore;
894 else {
895 if (dlsym (handle, "_fnord"))
896 status = $libltdl_dluscore;
897 else
898 puts (dlerror ());
899 }
900 dlclose (handle);
901 } else
902 puts (dlerror ());
903 return status;
904 }]
905 _LT_EOF
906 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
907 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
908 libltdl_status=$?
909 case x$libltdl_status in
910 x$libltdl_dlnouscore) libltdl_cv_need_uscore=no ;;
911 x$libltdl_dluscore) libltdl_cv_need_uscore=yes ;;
912 x*) libltdl_cv_need_uscore=unknown ;;
913 esac
914 fi
915 rm -rf conftest* $libname*
916 LIBS=$dlsym_uscore_save_LIBS
917 ])
918 fi
919 fi
920
921 if test yes = "$libltdl_cv_need_uscore"; then
922 AC_DEFINE([NEED_USCORE], [1],
923 [Define if dlsym() requires a leading underscore in symbol names.])
924 fi
925 ])# LT_FUNC_DLSYM_USCORE
926
927 # Old name:
928 AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
929 dnl aclocal-1.4 backwards compatibility:
930 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
931
932 # Copyright (C) 2002-2017 Free Software Foundation, Inc.
933 #
934 # This file is free software; the Free Software Foundation
935 # gives unlimited permission to copy and/or distribute it,
936 # with or without modifications, as long as this notice is preserved.
937
938 # AM_AUTOMAKE_VERSION(VERSION)
939 # ----------------------------
940 # Automake X.Y traces this macro to ensure aclocal.m4 has been
941 # generated from the m4 files accompanying Automake X.Y.
942 # (This private macro should not be called outside this file.)
943 AC_DEFUN([AM_AUTOMAKE_VERSION],
944 [am__api_version='1.15'
945 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
946 dnl require some minimum version. Point them to the right macro.
947 m4_if([$1], [1.15.1], [],
948 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
949 ])
950
951 # _AM_AUTOCONF_VERSION(VERSION)
952 # -----------------------------
953 # aclocal traces this macro to find the Autoconf version.
954 # This is a private macro too. Using m4_define simplifies
955 # the logic in aclocal, which can simply ignore this definition.
956 m4_define([_AM_AUTOCONF_VERSION], [])
957
958 # AM_SET_CURRENT_AUTOMAKE_VERSION
959 # -------------------------------
960 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
961 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
962 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
963 [AM_AUTOMAKE_VERSION([1.15.1])dnl
964 m4_ifndef([AC_AUTOCONF_VERSION],
965 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
966 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
967
968 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
969
970 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
971 #
972 # This file is free software; the Free Software Foundation
973 # gives unlimited permission to copy and/or distribute it,
974 # with or without modifications, as long as this notice is preserved.
975
976 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
977 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
978 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
979 #
980 # Of course, Automake must honor this variable whenever it calls a
981 # tool from the auxiliary directory. The problem is that $srcdir (and
982 # therefore $ac_aux_dir as well) can be either absolute or relative,
983 # depending on how configure is run. This is pretty annoying, since
984 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
985 # source directory, any form will work fine, but in subdirectories a
986 # relative path needs to be adjusted first.
987 #
988 # $ac_aux_dir/missing
989 # fails when called from a subdirectory if $ac_aux_dir is relative
990 # $top_srcdir/$ac_aux_dir/missing
991 # fails if $ac_aux_dir is absolute,
992 # fails when called from a subdirectory in a VPATH build with
993 # a relative $ac_aux_dir
994 #
995 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
996 # are both prefixed by $srcdir. In an in-source build this is usually
997 # harmless because $srcdir is '.', but things will broke when you
998 # start a VPATH build or use an absolute $srcdir.
999 #
1000 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1001 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1002 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1003 # and then we would define $MISSING as
1004 # MISSING="\${SHELL} $am_aux_dir/missing"
1005 # This will work as long as MISSING is not called from configure, because
1006 # unfortunately $(top_srcdir) has no meaning in configure.
1007 # However there are other variables, like CC, which are often used in
1008 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1009 #
1010 # Another solution, used here, is to always expand $ac_aux_dir to an
1011 # absolute PATH. The drawback is that using absolute paths prevent a
1012 # configured tree to be moved without reconfiguration.
1013
1014 AC_DEFUN([AM_AUX_DIR_EXPAND],
1015 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1016 # Expand $ac_aux_dir to an absolute path.
1017 am_aux_dir=`cd "$ac_aux_dir" && pwd`
1018 ])
1019
1020 # AM_CONDITIONAL -*- Autoconf -*-
1021
1022 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
1023 #
1024 # This file is free software; the Free Software Foundation
1025 # gives unlimited permission to copy and/or distribute it,
1026 # with or without modifications, as long as this notice is preserved.
1027
1028 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1029 # -------------------------------------
1030 # Define a conditional.
1031 AC_DEFUN([AM_CONDITIONAL],
1032 [AC_PREREQ([2.52])dnl
1033 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1034 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1035 AC_SUBST([$1_TRUE])dnl
1036 AC_SUBST([$1_FALSE])dnl
1037 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1038 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1039 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1040 if $2; then
1041 $1_TRUE=
1042 $1_FALSE='#'
1043 else
1044 $1_TRUE='#'
1045 $1_FALSE=
1046 fi
1047 AC_CONFIG_COMMANDS_PRE(
1048 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1049 AC_MSG_ERROR([[conditional "$1" was never defined.
1050 Usually this means the macro was only invoked conditionally.]])
1051 fi])])
1052
1053 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
1054 #
1055 # This file is free software; the Free Software Foundation
1056 # gives unlimited permission to copy and/or distribute it,
1057 # with or without modifications, as long as this notice is preserved.
1058
1059
1060 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1061 # written in clear, in which case automake, when reading aclocal.m4,
1062 # will think it sees a *use*, and therefore will trigger all it's
1063 # C support machinery. Also note that it means that autoscan, seeing
1064 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1065
1066
1067 # _AM_DEPENDENCIES(NAME)
1068 # ----------------------
1069 # See how the compiler implements dependency checking.
1070 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1071 # We try a few techniques and use that to set a single cache variable.
1072 #
1073 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1074 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1075 # dependency, and given that the user is not expected to run this macro,
1076 # just rely on AC_PROG_CC.
1077 AC_DEFUN([_AM_DEPENDENCIES],
1078 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1079 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1080 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1081 AC_REQUIRE([AM_DEP_TRACK])dnl
1082
1083 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
1084 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
1085 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1086 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1087 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
1088 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1089 [depcc="$$1" am_compiler_list=])
1090
1091 AC_CACHE_CHECK([dependency style of $depcc],
1092 [am_cv_$1_dependencies_compiler_type],
1093 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1094 # We make a subdir and do the tests there. Otherwise we can end up
1095 # making bogus files that we don't know about and never remove. For
1096 # instance it was reported that on HP-UX the gcc test will end up
1097 # making a dummy file named 'D' -- because '-MD' means "put the output
1098 # in D".
1099 rm -rf conftest.dir
1100 mkdir conftest.dir
1101 # Copy depcomp to subdir because otherwise we won't find it if we're
1102 # using a relative directory.
1103 cp "$am_depcomp" conftest.dir
1104 cd conftest.dir
1105 # We will build objects and dependencies in a subdirectory because
1106 # it helps to detect inapplicable dependency modes. For instance
1107 # both Tru64's cc and ICC support -MD to output dependencies as a
1108 # side effect of compilation, but ICC will put the dependencies in
1109 # the current directory while Tru64 will put them in the object
1110 # directory.
1111 mkdir sub
1112
1113 am_cv_$1_dependencies_compiler_type=none
1114 if test "$am_compiler_list" = ""; then
1115 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1116 fi
1117 am__universal=false
1118 m4_case([$1], [CC],
1119 [case " $depcc " in #(
1120 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1121 esac],
1122 [CXX],
1123 [case " $depcc " in #(
1124 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1125 esac])
1126
1127 for depmode in $am_compiler_list; do
1128 # Setup a source with many dependencies, because some compilers
1129 # like to wrap large dependency lists on column 80 (with \), and
1130 # we should not choose a depcomp mode which is confused by this.
1131 #
1132 # We need to recreate these files for each test, as the compiler may
1133 # overwrite some of them when testing with obscure command lines.
1134 # This happens at least with the AIX C compiler.
1135 : > sub/conftest.c
1136 for i in 1 2 3 4 5 6; do
1137 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1138 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1139 # Solaris 10 /bin/sh.
1140 echo '/* dummy */' > sub/conftst$i.h
1141 done
1142 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1143
1144 # We check with '-c' and '-o' for the sake of the "dashmstdout"
1145 # mode. It turns out that the SunPro C++ compiler does not properly
1146 # handle '-M -o', and we need to detect this. Also, some Intel
1147 # versions had trouble with output in subdirs.
1148 am__obj=sub/conftest.${OBJEXT-o}
1149 am__minus_obj="-o $am__obj"
1150 case $depmode in
1151 gcc)
1152 # This depmode causes a compiler race in universal mode.
1153 test "$am__universal" = false || continue
1154 ;;
1155 nosideeffect)
1156 # After this tag, mechanisms are not by side-effect, so they'll
1157 # only be used when explicitly requested.
1158 if test "x$enable_dependency_tracking" = xyes; then
1159 continue
1160 else
1161 break
1162 fi
1163 ;;
1164 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1165 # This compiler won't grok '-c -o', but also, the minuso test has
1166 # not run yet. These depmodes are late enough in the game, and
1167 # so weak that their functioning should not be impacted.
1168 am__obj=conftest.${OBJEXT-o}
1169 am__minus_obj=
1170 ;;
1171 none) break ;;
1172 esac
1173 if depmode=$depmode \
1174 source=sub/conftest.c object=$am__obj \
1175 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1176 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1177 >/dev/null 2>conftest.err &&
1178 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1179 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1180 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1181 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1182 # icc doesn't choke on unknown options, it will just issue warnings
1183 # or remarks (even with -Werror). So we grep stderr for any message
1184 # that says an option was ignored or not supported.
1185 # When given -MP, icc 7.0 and 7.1 complain thusly:
1186 # icc: Command line warning: ignoring option '-M'; no argument required
1187 # The diagnosis changed in icc 8.0:
1188 # icc: Command line remark: option '-MP' not supported
1189 if (grep 'ignoring option' conftest.err ||
1190 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1191 am_cv_$1_dependencies_compiler_type=$depmode
1192 break
1193 fi
1194 fi
1195 done
1196
1197 cd ..
1198 rm -rf conftest.dir
1199 else
1200 am_cv_$1_dependencies_compiler_type=none
1201 fi
1202 ])
1203 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1204 AM_CONDITIONAL([am__fastdep$1], [
1205 test "x$enable_dependency_tracking" != xno \
1206 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1207 ])
1208
1209
1210 # AM_SET_DEPDIR
1211 # -------------
1212 # Choose a directory name for dependency files.
1213 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1214 AC_DEFUN([AM_SET_DEPDIR],
1215 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1216 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1217 ])
1218
1219
1220 # AM_DEP_TRACK
1221 # ------------
1222 AC_DEFUN([AM_DEP_TRACK],
1223 [AC_ARG_ENABLE([dependency-tracking], [dnl
1224 AS_HELP_STRING(
1225 [--enable-dependency-tracking],
1226 [do not reject slow dependency extractors])
1227 AS_HELP_STRING(
1228 [--disable-dependency-tracking],
1229 [speeds up one-time build])])
1230 if test "x$enable_dependency_tracking" != xno; then
1231 am_depcomp="$ac_aux_dir/depcomp"
1232 AMDEPBACKSLASH='\'
1233 am__nodep='_no'
1234 fi
1235 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1236 AC_SUBST([AMDEPBACKSLASH])dnl
1237 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1238 AC_SUBST([am__nodep])dnl
1239 _AM_SUBST_NOTMAKE([am__nodep])dnl
1240 ])
1241
1242 # Generate code to set up dependency tracking. -*- Autoconf -*-
1243
1244 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
1245 #
1246 # This file is free software; the Free Software Foundation
1247 # gives unlimited permission to copy and/or distribute it,
1248 # with or without modifications, as long as this notice is preserved.
1249
1250
1251 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1252 # ------------------------------
1253 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1254 [{
1255 # Older Autoconf quotes --file arguments for eval, but not when files
1256 # are listed without --file. Let's play safe and only enable the eval
1257 # if we detect the quoting.
1258 case $CONFIG_FILES in
1259 *\'*) eval set x "$CONFIG_FILES" ;;
1260 *) set x $CONFIG_FILES ;;
1261 esac
1262 shift
1263 for mf
1264 do
1265 # Strip MF so we end up with the name of the file.
1266 mf=`echo "$mf" | sed -e 's/:.*$//'`
1267 # Check whether this is an Automake generated Makefile or not.
1268 # We used to match only the files named 'Makefile.in', but
1269 # some people rename them; so instead we look at the file content.
1270 # Grep'ing the first line is not enough: some people post-process
1271 # each Makefile.in and add a new line on top of each file to say so.
1272 # Grep'ing the whole file is not good either: AIX grep has a line
1273 # limit of 2048, but all sed's we know have understand at least 4000.
1274 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1275 dirpart=`AS_DIRNAME("$mf")`
1276 else
1277 continue
1278 fi
1279 # Extract the definition of DEPDIR, am__include, and am__quote
1280 # from the Makefile without running 'make'.
1281 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1282 test -z "$DEPDIR" && continue
1283 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1284 test -z "$am__include" && continue
1285 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1286 # Find all dependency output files, they are included files with
1287 # $(DEPDIR) in their names. We invoke sed twice because it is the
1288 # simplest approach to changing $(DEPDIR) to its actual value in the
1289 # expansion.
1290 for file in `sed -n "
1291 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1292 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1293 # Make sure the directory exists.
1294 test -f "$dirpart/$file" && continue
1295 fdir=`AS_DIRNAME(["$file"])`
1296 AS_MKDIR_P([$dirpart/$fdir])
1297 # echo "creating $dirpart/$file"
1298 echo '# dummy' > "$dirpart/$file"
1299 done
1300 done
1301 }
1302 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1303
1304
1305 # AM_OUTPUT_DEPENDENCY_COMMANDS
1306 # -----------------------------
1307 # This macro should only be invoked once -- use via AC_REQUIRE.
1308 #
1309 # This code is only required when automatic dependency tracking
1310 # is enabled. FIXME. This creates each '.P' file that we will
1311 # need in order to bootstrap the dependency handling code.
1312 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1313 [AC_CONFIG_COMMANDS([depfiles],
1314 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1315 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1316 ])
1317
1318 # Do all the work for Automake. -*- Autoconf -*-
1319
1320 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
1321 #
1322 # This file is free software; the Free Software Foundation
1323 # gives unlimited permission to copy and/or distribute it,
1324 # with or without modifications, as long as this notice is preserved.
1325
1326 # This macro actually does too much. Some checks are only needed if
1327 # your package does certain things. But this isn't really a big deal.
1328
1329 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1330 m4_define([AC_PROG_CC],
1331 m4_defn([AC_PROG_CC])
1332 [_AM_PROG_CC_C_O
1333 ])
1334
1335 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1336 # AM_INIT_AUTOMAKE([OPTIONS])
1337 # -----------------------------------------------
1338 # The call with PACKAGE and VERSION arguments is the old style
1339 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1340 # and VERSION should now be passed to AC_INIT and removed from
1341 # the call to AM_INIT_AUTOMAKE.
1342 # We support both call styles for the transition. After
1343 # the next Automake release, Autoconf can make the AC_INIT
1344 # arguments mandatory, and then we can depend on a new Autoconf
1345 # release and drop the old call support.
1346 AC_DEFUN([AM_INIT_AUTOMAKE],
1347 [AC_PREREQ([2.65])dnl
1348 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1349 dnl the ones we care about.
1350 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1351 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1352 AC_REQUIRE([AC_PROG_INSTALL])dnl
1353 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1354 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1355 # is not polluted with repeated "-I."
1356 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1357 # test to see if srcdir already configured
1358 if test -f $srcdir/config.status; then
1359 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1360 fi
1361 fi
1362
1363 # test whether we have cygpath
1364 if test -z "$CYGPATH_W"; then
1365 if (cygpath --version) >/dev/null 2>/dev/null; then
1366 CYGPATH_W='cygpath -w'
1367 else
1368 CYGPATH_W=echo
1369 fi
1370 fi
1371 AC_SUBST([CYGPATH_W])
1372
1373 # Define the identity of the package.
1374 dnl Distinguish between old-style and new-style calls.
1375 m4_ifval([$2],
1376 [AC_DIAGNOSE([obsolete],
1377 [$0: two- and three-arguments forms are deprecated.])
1378 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1379 AC_SUBST([PACKAGE], [$1])dnl
1380 AC_SUBST([VERSION], [$2])],
1381 [_AM_SET_OPTIONS([$1])dnl
1382 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1383 m4_if(
1384 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1385 [ok:ok],,
1386 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1387 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1388 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1389
1390 _AM_IF_OPTION([no-define],,
1391 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1392 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1393
1394 # Some tools Automake needs.
1395 AC_REQUIRE([AM_SANITY_CHECK])dnl
1396 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1397 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1398 AM_MISSING_PROG([AUTOCONF], [autoconf])
1399 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1400 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1401 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1402 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1403 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1404 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1405 # For better backward compatibility. To be removed once Automake 1.9.x
1406 # dies out for good. For more background, see:
1407 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1408 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1409 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1410 # We need awk for the "check" target (and possibly the TAP driver). The
1411 # system "awk" is bad on some platforms.
1412 AC_REQUIRE([AC_PROG_AWK])dnl
1413 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1414 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1415 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1416 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1417 [_AM_PROG_TAR([v7])])])
1418 _AM_IF_OPTION([no-dependencies],,
1419 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1420 [_AM_DEPENDENCIES([CC])],
1421 [m4_define([AC_PROG_CC],
1422 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1423 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1424 [_AM_DEPENDENCIES([CXX])],
1425 [m4_define([AC_PROG_CXX],
1426 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1427 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1428 [_AM_DEPENDENCIES([OBJC])],
1429 [m4_define([AC_PROG_OBJC],
1430 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1431 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1432 [_AM_DEPENDENCIES([OBJCXX])],
1433 [m4_define([AC_PROG_OBJCXX],
1434 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1435 ])
1436 AC_REQUIRE([AM_SILENT_RULES])dnl
1437 dnl The testsuite driver may need to know about EXEEXT, so add the
1438 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1439 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1440 AC_CONFIG_COMMANDS_PRE(dnl
1441 [m4_provide_if([_AM_COMPILER_EXEEXT],
1442 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1443
1444 # POSIX will say in a future version that running "rm -f" with no argument
1445 # is OK; and we want to be able to make that assumption in our Makefile
1446 # recipes. So use an aggressive probe to check that the usage we want is
1447 # actually supported "in the wild" to an acceptable degree.
1448 # See automake bug#10828.
1449 # To make any issue more visible, cause the running configure to be aborted
1450 # by default if the 'rm' program in use doesn't match our expectations; the
1451 # user can still override this though.
1452 if rm -f && rm -fr && rm -rf; then : OK; else
1453 cat >&2 <<'END'
1454 Oops!
1455
1456 Your 'rm' program seems unable to run without file operands specified
1457 on the command line, even when the '-f' option is present. This is contrary
1458 to the behaviour of most rm programs out there, and not conforming with
1459 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1460
1461 Please tell bug-automake@gnu.org about your system, including the value
1462 of your $PATH and any error possibly output before this message. This
1463 can help us improve future automake versions.
1464
1465 END
1466 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1467 echo 'Configuration will proceed anyway, since you have set the' >&2
1468 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1469 echo >&2
1470 else
1471 cat >&2 <<'END'
1472 Aborting the configuration process, to ensure you take notice of the issue.
1473
1474 You can download and install GNU coreutils to get an 'rm' implementation
1475 that behaves properly: <http://www.gnu.org/software/coreutils/>.
1476
1477 If you want to complete the configuration process using your problematic
1478 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1479 to "yes", and re-run configure.
1480
1481 END
1482 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1483 fi
1484 fi
1485 dnl The trailing newline in this macro's definition is deliberate, for
1486 dnl backward compatibility and to allow trailing 'dnl'-style comments
1487 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1488 ])
1489
1490 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1491 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1492 dnl mangled by Autoconf and run in a shell conditional statement.
1493 m4_define([_AC_COMPILER_EXEEXT],
1494 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1495
1496 # When config.status generates a header, we must update the stamp-h file.
1497 # This file resides in the same directory as the config header
1498 # that is generated. The stamp files are numbered to have different names.
1499
1500 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1501 # loop where config.status creates the headers, so we can generate
1502 # our stamp files there.
1503 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1504 [# Compute $1's index in $config_headers.
1505 _am_arg=$1
1506 _am_stamp_count=1
1507 for _am_header in $config_headers :; do
1508 case $_am_header in
1509 $_am_arg | $_am_arg:* )
1510 break ;;
1511 * )
1512 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1513 esac
1514 done
1515 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1516
1517 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1518 #
1519 # This file is free software; the Free Software Foundation
1520 # gives unlimited permission to copy and/or distribute it,
1521 # with or without modifications, as long as this notice is preserved.
1522
1523 # AM_PROG_INSTALL_SH
1524 # ------------------
1525 # Define $install_sh.
1526 AC_DEFUN([AM_PROG_INSTALL_SH],
1527 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1528 if test x"${install_sh+set}" != xset; then
1529 case $am_aux_dir in
1530 *\ * | *\ *)
1531 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1532 *)
1533 install_sh="\${SHELL} $am_aux_dir/install-sh"
1534 esac
1535 fi
1536 AC_SUBST([install_sh])])
1537
1538 # Copyright (C) 2003-2017 Free Software Foundation, Inc.
1539 #
1540 # This file is free software; the Free Software Foundation
1541 # gives unlimited permission to copy and/or distribute it,
1542 # with or without modifications, as long as this notice is preserved.
1543
1544 # Check whether the underlying file-system supports filenames
1545 # with a leading dot. For instance MS-DOS doesn't.
1546 AC_DEFUN([AM_SET_LEADING_DOT],
1547 [rm -rf .tst 2>/dev/null
1548 mkdir .tst 2>/dev/null
1549 if test -d .tst; then
1550 am__leading_dot=.
1551 else
1552 am__leading_dot=_
1553 fi
1554 rmdir .tst 2>/dev/null
1555 AC_SUBST([am__leading_dot])])
1556
1557 # Check to see how 'make' treats includes. -*- Autoconf -*-
1558
1559 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1560 #
1561 # This file is free software; the Free Software Foundation
1562 # gives unlimited permission to copy and/or distribute it,
1563 # with or without modifications, as long as this notice is preserved.
1564
1565 # AM_MAKE_INCLUDE()
1566 # -----------------
1567 # Check to see how make treats includes.
1568 AC_DEFUN([AM_MAKE_INCLUDE],
1569 [am_make=${MAKE-make}
1570 cat > confinc << 'END'
1571 am__doit:
1572 @echo this is the am__doit target
1573 .PHONY: am__doit
1574 END
1575 # If we don't find an include directive, just comment out the code.
1576 AC_MSG_CHECKING([for style of include used by $am_make])
1577 am__include="#"
1578 am__quote=
1579 _am_result=none
1580 # First try GNU make style include.
1581 echo "include confinc" > confmf
1582 # Ignore all kinds of additional output from 'make'.
1583 case `$am_make -s -f confmf 2> /dev/null` in #(
1584 *the\ am__doit\ target*)
1585 am__include=include
1586 am__quote=
1587 _am_result=GNU
1588 ;;
1589 esac
1590 # Now try BSD make style include.
1591 if test "$am__include" = "#"; then
1592 echo '.include "confinc"' > confmf
1593 case `$am_make -s -f confmf 2> /dev/null` in #(
1594 *the\ am__doit\ target*)
1595 am__include=.include
1596 am__quote="\""
1597 _am_result=BSD
1598 ;;
1599 esac
1600 fi
1601 AC_SUBST([am__include])
1602 AC_SUBST([am__quote])
1603 AC_MSG_RESULT([$_am_result])
1604 rm -f confinc confmf
1605 ])
1606
1607 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1608
1609 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
1610 #
1611 # This file is free software; the Free Software Foundation
1612 # gives unlimited permission to copy and/or distribute it,
1613 # with or without modifications, as long as this notice is preserved.
1614
1615 # AM_MISSING_PROG(NAME, PROGRAM)
1616 # ------------------------------
1617 AC_DEFUN([AM_MISSING_PROG],
1618 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1619 $1=${$1-"${am_missing_run}$2"}
1620 AC_SUBST($1)])
1621
1622 # AM_MISSING_HAS_RUN
1623 # ------------------
1624 # Define MISSING if not defined so far and test if it is modern enough.
1625 # If it is, set am_missing_run to use it, otherwise, to nothing.
1626 AC_DEFUN([AM_MISSING_HAS_RUN],
1627 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1628 AC_REQUIRE_AUX_FILE([missing])dnl
1629 if test x"${MISSING+set}" != xset; then
1630 case $am_aux_dir in
1631 *\ * | *\ *)
1632 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1633 *)
1634 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1635 esac
1636 fi
1637 # Use eval to expand $SHELL
1638 if eval "$MISSING --is-lightweight"; then
1639 am_missing_run="$MISSING "
1640 else
1641 am_missing_run=
1642 AC_MSG_WARN(['missing' script is too old or missing])
1643 fi
1644 ])
1645
1646 # Helper functions for option handling. -*- Autoconf -*-
1647
1648 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1649 #
1650 # This file is free software; the Free Software Foundation
1651 # gives unlimited permission to copy and/or distribute it,
1652 # with or without modifications, as long as this notice is preserved.
1653
1654 # _AM_MANGLE_OPTION(NAME)
1655 # -----------------------
1656 AC_DEFUN([_AM_MANGLE_OPTION],
1657 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1658
1659 # _AM_SET_OPTION(NAME)
1660 # --------------------
1661 # Set option NAME. Presently that only means defining a flag for this option.
1662 AC_DEFUN([_AM_SET_OPTION],
1663 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1664
1665 # _AM_SET_OPTIONS(OPTIONS)
1666 # ------------------------
1667 # OPTIONS is a space-separated list of Automake options.
1668 AC_DEFUN([_AM_SET_OPTIONS],
1669 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1670
1671 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1672 # -------------------------------------------
1673 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1674 AC_DEFUN([_AM_IF_OPTION],
1675 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1676
1677 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1678
1679 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
1680 #
1681 # This file is free software; the Free Software Foundation
1682 # gives unlimited permission to copy and/or distribute it,
1683 # with or without modifications, as long as this notice is preserved.
1684
1685 # AM_SANITY_CHECK
1686 # ---------------
1687 AC_DEFUN([AM_SANITY_CHECK],
1688 [AC_MSG_CHECKING([whether build environment is sane])
1689 # Reject unsafe characters in $srcdir or the absolute working directory
1690 # name. Accept space and tab only in the latter.
1691 am_lf='
1692 '
1693 case `pwd` in
1694 *[[\\\"\#\$\&\'\`$am_lf]]*)
1695 AC_MSG_ERROR([unsafe absolute working directory name]);;
1696 esac
1697 case $srcdir in
1698 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1699 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1700 esac
1701
1702 # Do 'set' in a subshell so we don't clobber the current shell's
1703 # arguments. Must try -L first in case configure is actually a
1704 # symlink; some systems play weird games with the mod time of symlinks
1705 # (eg FreeBSD returns the mod time of the symlink's containing
1706 # directory).
1707 if (
1708 am_has_slept=no
1709 for am_try in 1 2; do
1710 echo "timestamp, slept: $am_has_slept" > conftest.file
1711 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1712 if test "$[*]" = "X"; then
1713 # -L didn't work.
1714 set X `ls -t "$srcdir/configure" conftest.file`
1715 fi
1716 if test "$[*]" != "X $srcdir/configure conftest.file" \
1717 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1718
1719 # If neither matched, then we have a broken ls. This can happen
1720 # if, for instance, CONFIG_SHELL is bash and it inherits a
1721 # broken ls alias from the environment. This has actually
1722 # happened. Such a system could not be considered "sane".
1723 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1724 alias in your environment])
1725 fi
1726 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1727 break
1728 fi
1729 # Just in case.
1730 sleep 1
1731 am_has_slept=yes
1732 done
1733 test "$[2]" = conftest.file
1734 )
1735 then
1736 # Ok.
1737 :
1738 else
1739 AC_MSG_ERROR([newly created file is older than distributed files!
1740 Check your system clock])
1741 fi
1742 AC_MSG_RESULT([yes])
1743 # If we didn't sleep, we still need to ensure time stamps of config.status and
1744 # generated files are strictly newer.
1745 am_sleep_pid=
1746 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1747 ( sleep 1 ) &
1748 am_sleep_pid=$!
1749 fi
1750 AC_CONFIG_COMMANDS_PRE(
1751 [AC_MSG_CHECKING([that generated files are newer than configure])
1752 if test -n "$am_sleep_pid"; then
1753 # Hide warnings about reused PIDs.
1754 wait $am_sleep_pid 2>/dev/null
1755 fi
1756 AC_MSG_RESULT([done])])
1757 rm -f conftest.file
1758 ])
1759
1760 # Copyright (C) 2009-2017 Free Software Foundation, Inc.
1761 #
1762 # This file is free software; the Free Software Foundation
1763 # gives unlimited permission to copy and/or distribute it,
1764 # with or without modifications, as long as this notice is preserved.
1765
1766 # AM_SILENT_RULES([DEFAULT])
1767 # --------------------------
1768 # Enable less verbose build rules; with the default set to DEFAULT
1769 # ("yes" being less verbose, "no" or empty being verbose).
1770 AC_DEFUN([AM_SILENT_RULES],
1771 [AC_ARG_ENABLE([silent-rules], [dnl
1772 AS_HELP_STRING(
1773 [--enable-silent-rules],
1774 [less verbose build output (undo: "make V=1")])
1775 AS_HELP_STRING(
1776 [--disable-silent-rules],
1777 [verbose build output (undo: "make V=0")])dnl
1778 ])
1779 case $enable_silent_rules in @%:@ (((
1780 yes) AM_DEFAULT_VERBOSITY=0;;
1781 no) AM_DEFAULT_VERBOSITY=1;;
1782 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1783 esac
1784 dnl
1785 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1786 dnl do not support nested variable expansions.
1787 dnl See automake bug#9928 and bug#10237.
1788 am_make=${MAKE-make}
1789 AC_CACHE_CHECK([whether $am_make supports nested variables],
1790 [am_cv_make_support_nested_variables],
1791 [if AS_ECHO([['TRUE=$(BAR$(V))
1792 BAR0=false
1793 BAR1=true
1794 V=1
1795 am__doit:
1796 @$(TRUE)
1797 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1798 am_cv_make_support_nested_variables=yes
1799 else
1800 am_cv_make_support_nested_variables=no
1801 fi])
1802 if test $am_cv_make_support_nested_variables = yes; then
1803 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1804 AM_V='$(V)'
1805 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1806 else
1807 AM_V=$AM_DEFAULT_VERBOSITY
1808 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1809 fi
1810 AC_SUBST([AM_V])dnl
1811 AM_SUBST_NOTMAKE([AM_V])dnl
1812 AC_SUBST([AM_DEFAULT_V])dnl
1813 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1814 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1815 AM_BACKSLASH='\'
1816 AC_SUBST([AM_BACKSLASH])dnl
1817 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1818 ])
1819
1820 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
1821 #
1822 # This file is free software; the Free Software Foundation
1823 # gives unlimited permission to copy and/or distribute it,
1824 # with or without modifications, as long as this notice is preserved.
1825
1826 # AM_PROG_INSTALL_STRIP
1827 # ---------------------
1828 # One issue with vendor 'install' (even GNU) is that you can't
1829 # specify the program used to strip binaries. This is especially
1830 # annoying in cross-compiling environments, where the build's strip
1831 # is unlikely to handle the host's binaries.
1832 # Fortunately install-sh will honor a STRIPPROG variable, so we
1833 # always use install-sh in "make install-strip", and initialize
1834 # STRIPPROG with the value of the STRIP variable (set by the user).
1835 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1836 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1837 # Installed binaries are usually stripped using 'strip' when the user
1838 # run "make install-strip". However 'strip' might not be the right
1839 # tool to use in cross-compilation environments, therefore Automake
1840 # will honor the 'STRIP' environment variable to overrule this program.
1841 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1842 if test "$cross_compiling" != no; then
1843 AC_CHECK_TOOL([STRIP], [strip], :)
1844 fi
1845 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1846 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1847
1848 # Copyright (C) 2006-2017 Free Software Foundation, Inc.
1849 #
1850 # This file is free software; the Free Software Foundation
1851 # gives unlimited permission to copy and/or distribute it,
1852 # with or without modifications, as long as this notice is preserved.
1853
1854 # _AM_SUBST_NOTMAKE(VARIABLE)
1855 # ---------------------------
1856 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1857 # This macro is traced by Automake.
1858 AC_DEFUN([_AM_SUBST_NOTMAKE])
1859
1860 # AM_SUBST_NOTMAKE(VARIABLE)
1861 # --------------------------
1862 # Public sister of _AM_SUBST_NOTMAKE.
1863 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1864
1865 # Check how to create a tarball. -*- Autoconf -*-
1866
1867 # Copyright (C) 2004-2017 Free Software Foundation, Inc.
1868 #
1869 # This file is free software; the Free Software Foundation
1870 # gives unlimited permission to copy and/or distribute it,
1871 # with or without modifications, as long as this notice is preserved.
1872
1873 # _AM_PROG_TAR(FORMAT)
1874 # --------------------
1875 # Check how to create a tarball in format FORMAT.
1876 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1877 #
1878 # Substitute a variable $(am__tar) that is a command
1879 # writing to stdout a FORMAT-tarball containing the directory
1880 # $tardir.
1881 # tardir=directory && $(am__tar) > result.tar
1882 #
1883 # Substitute a variable $(am__untar) that extract such
1884 # a tarball read from stdin.
1885 # $(am__untar) < result.tar
1886 #
1887 AC_DEFUN([_AM_PROG_TAR],
1888 [# Always define AMTAR for backward compatibility. Yes, it's still used
1889 # in the wild :-( We should find a proper way to deprecate it ...
1890 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1891
1892 # We'll loop over all known methods to create a tar archive until one works.
1893 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1894
1895 m4_if([$1], [v7],
1896 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1897
1898 [m4_case([$1],
1899 [ustar],
1900 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1901 # There is notably a 21 bits limit for the UID and the GID. In fact,
1902 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1903 # and bug#13588).
1904 am_max_uid=2097151 # 2^21 - 1
1905 am_max_gid=$am_max_uid
1906 # The $UID and $GID variables are not portable, so we need to resort
1907 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1908 # below are definitely unexpected, so allow the users to see them
1909 # (that is, avoid stderr redirection).
1910 am_uid=`id -u || echo unknown`
1911 am_gid=`id -g || echo unknown`
1912 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1913 if test $am_uid -le $am_max_uid; then
1914 AC_MSG_RESULT([yes])
1915 else
1916 AC_MSG_RESULT([no])
1917 _am_tools=none
1918 fi
1919 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1920 if test $am_gid -le $am_max_gid; then
1921 AC_MSG_RESULT([yes])
1922 else
1923 AC_MSG_RESULT([no])
1924 _am_tools=none
1925 fi],
1926
1927 [pax],
1928 [],
1929
1930 [m4_fatal([Unknown tar format])])
1931
1932 AC_MSG_CHECKING([how to create a $1 tar archive])
1933
1934 # Go ahead even if we have the value already cached. We do so because we
1935 # need to set the values for the 'am__tar' and 'am__untar' variables.
1936 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1937
1938 for _am_tool in $_am_tools; do
1939 case $_am_tool in
1940 gnutar)
1941 for _am_tar in tar gnutar gtar; do
1942 AM_RUN_LOG([$_am_tar --version]) && break
1943 done
1944 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1945 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1946 am__untar="$_am_tar -xf -"
1947 ;;
1948 plaintar)
1949 # Must skip GNU tar: if it does not support --format= it doesn't create
1950 # ustar tarball either.
1951 (tar --version) >/dev/null 2>&1 && continue
1952 am__tar='tar chf - "$$tardir"'
1953 am__tar_='tar chf - "$tardir"'
1954 am__untar='tar xf -'
1955 ;;
1956 pax)
1957 am__tar='pax -L -x $1 -w "$$tardir"'
1958 am__tar_='pax -L -x $1 -w "$tardir"'
1959 am__untar='pax -r'
1960 ;;
1961 cpio)
1962 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1963 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1964 am__untar='cpio -i -H $1 -d'
1965 ;;
1966 none)
1967 am__tar=false
1968 am__tar_=false
1969 am__untar=false
1970 ;;
1971 esac
1972
1973 # If the value was cached, stop now. We just wanted to have am__tar
1974 # and am__untar set.
1975 test -n "${am_cv_prog_tar_$1}" && break
1976
1977 # tar/untar a dummy directory, and stop if the command works.
1978 rm -rf conftest.dir
1979 mkdir conftest.dir
1980 echo GrepMe > conftest.dir/file
1981 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1982 rm -rf conftest.dir
1983 if test -s conftest.tar; then
1984 AM_RUN_LOG([$am__untar <conftest.tar])
1985 AM_RUN_LOG([cat conftest.dir/file])
1986 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1987 fi
1988 done
1989 rm -rf conftest.dir
1990
1991 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1992 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1993
1994 AC_SUBST([am__tar])
1995 AC_SUBST([am__untar])
1996 ]) # _AM_PROG_TAR
1997
1998 m4_include([m4/00gnulib.m4])
1999 m4_include([m4/absolute-header.m4])
2000 m4_include([m4/ax_cxx_compile_stdcxx.m4])
2001 m4_include([m4/configmake.m4])
2002 m4_include([m4/extensions.m4])
2003 m4_include([m4/extern-inline.m4])
2004 m4_include([m4/flock.m4])
2005 m4_include([m4/getopt.m4])
2006 m4_include([m4/gnu-make.m4])
2007 m4_include([m4/gnulib-common.m4])
2008 m4_include([m4/gnulib-comp.m4])
2009 m4_include([m4/include_next.m4])
2010 m4_include([m4/libtool.m4])
2011 m4_include([m4/ltoptions.m4])
2012 m4_include([m4/ltsugar.m4])
2013 m4_include([m4/ltversion.m4])
2014 m4_include([m4/lt~obsolete.m4])
2015 m4_include([m4/malloc.m4])
2016 m4_include([m4/manywarnings-c++.m4])
2017 m4_include([m4/manywarnings.m4])
2018 m4_include([m4/msvc-inval.m4])
2019 m4_include([m4/msvc-nothrow.m4])
2020 m4_include([m4/off_t.m4])
2021 m4_include([m4/pkg.m4])
2022 m4_include([m4/rawmemchr.m4])
2023 m4_include([m4/relocatable-lib.m4])
2024 m4_include([m4/ssize_t.m4])
2025 m4_include([m4/std-gnu11.m4])
2026 m4_include([m4/stddef_h.m4])
2027 m4_include([m4/stdlib_h.m4])
2028 m4_include([m4/strchrnul.m4])
2029 m4_include([m4/strdup.m4])
2030 m4_include([m4/string_h.m4])
2031 m4_include([m4/sys_file_h.m4])
2032 m4_include([m4/sys_types_h.m4])
2033 m4_include([m4/unistd_h.m4])
2034 m4_include([m4/warn-on-use.m4])
2035 m4_include([m4/warnings.m4])
2036 m4_include([m4/wchar_t.m4])
+0
-22
appveyor.yml less more
0 version: "{build}"
1 clone_folder: c:\projects\enchant
2
3 environment:
4 global:
5 # Only need one flavour of dictionary
6 CONFIGURE_FLAGS: --with-hunspell-dir=/mingw64/share/hunspell
7 VERBOSE: 1 # Get test logs in output
8 matrix:
9 - MSYSTEM: MSYS
10 - MSYSTEM: MINGW64
11 - MSYSTEM: MINGW32
12
13 init:
14 - git config --global core.autocrlf input
15
16 install:
17 - C:\msys64\usr\bin\bash.exe -l c:/projects/enchant/build-aux/appveyor-install.sh
18
19 # FIXME: add all available providers (just aspell?)
20 build_script:
21 - C:\msys64\usr\bin\bash.exe -lc "cd c:/projects/enchant && ./bootstrap && ./configure --enable-relocatable %CONFIGURE_FLAGS% && make && make DISTCHECK_CONFIGURE_FLAGS=\"--enable-relocatable %CONFIGURE_FLAGS%\" distcheck"
+0
-5431
bootstrap less more
0 #! /bin/sh
1 ## DO NOT EDIT - This file generated from build-aux/bootstrap.in
2 ## by inline-source v2019-02-19.15
3
4 # Bootstrap an Autotooled package from checked-out sources.
5 # Written by Gary V. Vaughan, 2010
6 # Inspired by a script written by Paul Eggert.
7
8 # This is free software. There is NO warranty; not even for
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 #
11 # Copyright (C) 2010-2019 Bootstrap Authors
12 #
13 # This file is dual licensed under the terms of the MIT license
14 # <https://opensource.org/license/MIT>, and GPL version 3 or later
15 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
16 # these licenses when using or redistributing this software or any of
17 # the files within it. See the URLs above, or the file `LICENSE`
18 # included in the Bootstrap distribution for the full license texts.
19
20 # You should place a copy of this script under version control in the
21 # top-level directory of your project. The intent is that all
22 # customization can be done with a `bootstrap.conf` file also maintained
23 # in your version control.
24
25 # Please report bugs or propose patches to:
26 # <https://github.com/gnulib-modules/bootstrap/issues>
27
28
29 ## ------ ##
30 ## Usage. ##
31 ## ------ ##
32
33 # Most GNUish projects do not keep all of the generated Autotool
34 # files under version control, but running all of the right tools
35 # with the right arguments, in the correct order to regenerate
36 # all of those files in readiness for configuration and building
37 # can be surprisingly involved! Many projects have a 'bootstrap'
38 # script under version control to invoke Autotools and perform
39 # other assorted book-keeping with version numbers and the like.
40 #
41 # This bootstrap script aims to probe the configure.ac and top
42 # Makefile.am of your project to automatically determine what
43 # the correct ordering and arguments are and then run the tools for
44 # you. In order to use it, you can generate an initial standalone
45 # script with:
46 #
47 # gl/build-aux/inline-source gl/build-aux/bootstrap.in > bootstrap
48 #
49 # You should then store than script in version control for other
50 # developers in you project. It will give you instructions about
51 # how to keep it up to date if the sources change.
52 #
53 # See gl/doc/bootstrap.texi for documentation on how to write
54 # a bootstrap.conf to customize it for your project's
55 # idiosyncracies.
56
57
58 ## ================================================================== ##
59 ## ##
60 ## DO NOT EDIT THIS FILE, CUSTOMIZE IT USING A BOOTSTRAP.CONF ##
61 ## ##
62 ## ================================================================== ##
63
64 ## ------------------------------- ##
65 ## User overridable command paths. ##
66 ## ------------------------------- ##
67
68 # All uppercase denotes values stored in the environment. These
69 # variables should generally be overridden by the user - however, we do
70 # set them to 'true' in some parts of this script to prevent them being
71 # called at the wrong time by other tools that we call ('autoreconf',
72 # for example).
73 #
74 # We also allow 'LIBTOOLIZE', 'M4', 'SHA1SUM' and some others to be
75 # overridden, and export the result for child processes, but they are
76 # handled by the function 'func_find_tool' and not defaulted in this
77 # section.
78
79 : ${ACLOCAL="aclocal"}
80 : ${AUTOCONF="autoconf"}
81 : ${AUTOHEADER="autoheader"}
82 : ${AUTOM4TE="autom4te"}
83 : ${AUTOHEADER="autoheader"}
84 : ${AUTOMAKE="automake"}
85 : ${AUTOPOINT="autopoint"}
86 : ${AUTORECONF="autoreconf"}
87 : ${CMP="cmp"}
88 : ${CONFIG_SHELL="/bin/sh"}
89 : ${DIFF="diff"}
90 : ${GIT="git"}
91 : ${LN_S="ln -s"}
92 : ${RM="rm"}
93
94 export ACLOCAL
95 export AUTOCONF
96 export AUTOHEADER
97 export AUTOM4TE
98 export AUTOHEADER
99 export AUTOMAKE
100 export AUTOPOINT
101 export AUTORECONF
102 export CONFIG_SHELL
103
104
105 ## -------------- ##
106 ## Configuration. ##
107 ## -------------- ##
108
109 # A newline delimited list of triples of programs (that respond to
110 # --version), the minimum version numbers required (or just '-' in the
111 # version field if any version will be sufficient) and homepage URLs
112 # to help locate missing packages.
113 buildreq=
114
115 # Name of a file containing instructions on installing missing packages
116 # required in 'buildreq'.
117 buildreq_readme=README-hacking
118
119 # These are extracted from AC_INIT in configure.ac, though you can
120 # override those values in 'bootstrap.conf' if you prefer.
121 build_aux=
122 macro_dir=
123 package=
124 package_name=
125 package_version=
126 package_bugreport=
127
128 # These are extracted from 'gnulib-cache.m4', or else fall-back
129 # automatically on the gnulib defaults; unless you set the values
130 # manually in 'bootstrap.conf'.
131 doc_base=
132 gnulib_mk=
133 gnulib_name=
134 local_gl_path=
135 source_base=
136 tests_base=
137
138 # The list of gnulib modules required at 'gnulib-tool' time. If you
139 # check 'gnulib-cache.m4' into your repository, then this list will be
140 # extracted automatically.
141 gnulib_modules=
142
143 # Extra gnulib files that are not in modules, which override files of
144 # the same name installed by other bootstrap tools.
145 gnulib_non_module_files="
146 build-aux/compile
147 build-aux/install-sh
148 build-aux/mdate-sh
149 build-aux/texinfo.tex
150 build-aux/depcomp
151 build-aux/config.guess
152 build-aux/config.sub
153 doc/INSTALL
154 "
155
156 # Relative path to the local gnulib submodule, and url to the upstream
157 # git repository. If you have a gnulib entry in your .gitmodules file,
158 # these values are ignored.
159 gnulib_path=
160 gnulib_url=
161
162 # Date from which to clone github, to avoid a full clone.
163 gnulib_clone_since=
164
165 # Additional gnulib-tool options to use.
166 gnulib_tool_options="
167 --no-changelog
168 "
169
170 # bootstrap removes any macro-files that are not included by aclocal.m4,
171 # except for files listed in this variable that are always kept.
172 gnulib_precious="
173 gnulib-tool.m4
174 "
175
176 # When truncating long commands for display, always allow at least this
177 # many characters before truncating.
178 min_cmd_len=160
179
180 # The command to download all .po files for a specified domain into
181 # a specified directory. Fill in the first %s is the domain name, and
182 # the second with the destination directory. Use rsync's -L and -r
183 # options because the latest/%s directory and the .po files within are
184 # all symlinks.
185 po_download_command_format=\
186 "rsync --delete --exclude '*.s1' -Lrtvz \
187 'translationproject.org::tp/latest/%s/' '%s'"
188
189 # Other locale categories that need message catalogs.
190 extra_locale_categories=
191
192 # Additional xgettext options to use. Gnulib might provide you with an
193 # extensive list of additional options to append to this, but gettext
194 # 0.16.1 and newer appends them automaticaly, so you can safely ignore
195 # the complaints from 'gnulib-tool' if your $configure_ac states:
196 #
197 # AM_GNU_GETTEXT_VERSION([0.16.1])
198 xgettext_options="
199 --flag=_:1:pass-c-format
200 --flag=N_:1:pass-c-format
201 "
202
203 # Package copyright holder for gettext files. Defaults to FSF if unset.
204 copyright_holder=
205
206 # File that should exist in the top directory of a checked out hierarchy,
207 # but not in a distribution tarball.
208 checkout_only_file=
209
210 # Whether to use copies instead of symlinks by default (if set to true,
211 # the --copy option has no effect).
212 copy=false
213
214 # Set this to ".cvsignore .gitignore" in 'bootstrap.conf' if you want
215 # those files to be generated in directories like 'lib/', 'm4/', and 'po/',
216 # or set it to "auto" to make this script select what to use based
217 # on what version control system (if any) is used in the source directory.
218 # Or set it to "none" to ignore VCS ignore files entirely. Default is
219 # "auto".
220 vc_ignore=
221
222
223 ## ------------------- ##
224 ## External Libraries. ##
225 ## ------------------- ##
226
227 # Source required external libraries:
228 # Set a version string for this script.
229 scriptversion=2019-02-19.15; # UTC
230
231 # General shell script boiler plate, and helper functions.
232 # Written by Gary V. Vaughan, 2004
233
234 # This is free software. There is NO warranty; not even for
235 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
236 #
237 # Copyright (C) 2004-2019 Bootstrap Authors
238 #
239 # This file is dual licensed under the terms of the MIT license
240 # <https://opensource.org/license/MIT>, and GPL version 3 or later
241 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
242 # these licenses when using or redistributing this software or any of
243 # the files within it. See the URLs above, or the file `LICENSE`
244 # included in the Bootstrap distribution for the full license texts.
245
246 # Please report bugs or propose patches to:
247 # <https://github.com/gnulib-modules/bootstrap/issues>
248
249
250 ## ------ ##
251 ## Usage. ##
252 ## ------ ##
253
254 # Evaluate this file near the top of your script to gain access to
255 # the functions and variables defined here:
256 #
257 # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
258 #
259 # If you need to override any of the default environment variable
260 # settings, do that before evaluating this file.
261
262
263 ## -------------------- ##
264 ## Shell normalisation. ##
265 ## -------------------- ##
266
267 # Some shells need a little help to be as Bourne compatible as possible.
268 # Before doing anything else, make sure all that help has been provided!
269
270 DUALCASE=1; export DUALCASE # for MKS sh
271 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
272 emulate sh
273 NULLCMD=:
274 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
275 # is contrary to our usage. Disable this feature.
276 alias -g '${1+"$@"}'='"$@"'
277 setopt NO_GLOB_SUBST
278 else
279 case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
280 fi
281
282 # NLS nuisances: We save the old values in case they are required later.
283 _G_user_locale=
284 _G_safe_locale=
285 for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
286 do
287 eval "if test set = \"\${$_G_var+set}\"; then
288 save_$_G_var=\$$_G_var
289 $_G_var=C
290 export $_G_var
291 _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
292 _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
293 fi"
294 done
295
296 # Make sure IFS has a sensible default
297 sp=' '
298 nl='
299 '
300 IFS="$sp $nl"
301
302 # There are apparently some retarded systems that use ';' as a PATH separator!
303 if test "${PATH_SEPARATOR+set}" != set; then
304 PATH_SEPARATOR=:
305 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
306 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
307 PATH_SEPARATOR=';'
308 }
309 fi
310
311
312 # func_unset VAR
313 # --------------
314 # Portably unset VAR.
315 # In some shells, an 'unset VAR' statement leaves a non-zero return
316 # status if VAR is already unset, which might be problematic if the
317 # statement is used at the end of a function (thus poisoning its return
318 # value) or when 'set -e' is active (causing even a spurious abort of
319 # the script in this case).
320 func_unset ()
321 {
322 { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
323 }
324
325
326 # Make sure CDPATH doesn't cause `cd` commands to output the target dir.
327 func_unset CDPATH
328
329 # Make sure ${,E,F}GREP behave sanely.
330 func_unset GREP_OPTIONS
331
332
333 ## ------------------------- ##
334 ## Locate command utilities. ##
335 ## ------------------------- ##
336
337
338 # func_executable_p FILE
339 # ----------------------
340 # Check that FILE is an executable regular file.
341 func_executable_p ()
342 {
343 test -f "$1" && test -x "$1"
344 }
345
346
347 # func_path_progs PROGS_LIST CHECK_FUNC [PATH]
348 # --------------------------------------------
349 # Search for either a program that responds to --version with output
350 # containing "GNU", or else returned by CHECK_FUNC otherwise, by
351 # trying all the directories in PATH with each of the elements of
352 # PROGS_LIST.
353 #
354 # CHECK_FUNC should accept the path to a candidate program, and
355 # set $func_check_prog_result if it truncates its output less than
356 # $_G_path_prog_max characters.
357 func_path_progs ()
358 {
359 _G_progs_list=$1
360 _G_check_func=$2
361 _G_PATH=${3-"$PATH"}
362
363 _G_path_prog_max=0
364 _G_path_prog_found=false
365 _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
366 for _G_dir in $_G_PATH; do
367 IFS=$_G_save_IFS
368 test -z "$_G_dir" && _G_dir=.
369 for _G_prog_name in $_G_progs_list; do
370 for _exeext in '' .EXE; do
371 _G_path_prog=$_G_dir/$_G_prog_name$_exeext
372 func_executable_p "$_G_path_prog" || continue
373 case `"$_G_path_prog" --version 2>&1` in
374 *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
375 *) $_G_check_func $_G_path_prog
376 func_path_progs_result=$func_check_prog_result
377 ;;
378 esac
379 $_G_path_prog_found && break 3
380 done
381 done
382 done
383 IFS=$_G_save_IFS
384 test -z "$func_path_progs_result" && {
385 echo "no acceptable sed could be found in \$PATH" >&2
386 exit 1
387 }
388 }
389
390
391 # We want to be able to use the functions in this file before configure
392 # has figured out where the best binaries are kept, which means we have
393 # to search for them ourselves - except when the results are already set
394 # where we skip the searches.
395
396 # Unless the user overrides by setting SED, search the path for either GNU
397 # sed, or the sed that truncates its output the least.
398 test -z "$SED" && {
399 _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
400 for _G_i in 1 2 3 4 5 6 7; do
401 _G_sed_script=$_G_sed_script$nl$_G_sed_script
402 done
403 echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
404 _G_sed_script=
405
406 func_check_prog_sed ()
407 {
408 _G_path_prog=$1
409
410 _G_count=0
411 printf 0123456789 >conftest.in
412 while :
413 do
414 cat conftest.in conftest.in >conftest.tmp
415 mv conftest.tmp conftest.in
416 cp conftest.in conftest.nl
417 echo '' >> conftest.nl
418 "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
419 diff conftest.out conftest.nl >/dev/null 2>&1 || break
420 _G_count=`expr $_G_count + 1`
421 if test "$_G_count" -gt "$_G_path_prog_max"; then
422 # Best one so far, save it but keep looking for a better one
423 func_check_prog_result=$_G_path_prog
424 _G_path_prog_max=$_G_count
425 fi
426 # 10*(2^10) chars as input seems more than enough
427 test 10 -lt "$_G_count" && break
428 done
429 rm -f conftest.in conftest.tmp conftest.nl conftest.out
430 }
431
432 func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
433 rm -f conftest.sed
434 SED=$func_path_progs_result
435 }
436
437
438 # Unless the user overrides by setting GREP, search the path for either GNU
439 # grep, or the grep that truncates its output the least.
440 test -z "$GREP" && {
441 func_check_prog_grep ()
442 {
443 _G_path_prog=$1
444
445 _G_count=0
446 _G_path_prog_max=0
447 printf 0123456789 >conftest.in
448 while :
449 do
450 cat conftest.in conftest.in >conftest.tmp
451 mv conftest.tmp conftest.in
452 cp conftest.in conftest.nl
453 echo 'GREP' >> conftest.nl
454 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
455 diff conftest.out conftest.nl >/dev/null 2>&1 || break
456 _G_count=`expr $_G_count + 1`
457 if test "$_G_count" -gt "$_G_path_prog_max"; then
458 # Best one so far, save it but keep looking for a better one
459 func_check_prog_result=$_G_path_prog
460 _G_path_prog_max=$_G_count
461 fi
462 # 10*(2^10) chars as input seems more than enough
463 test 10 -lt "$_G_count" && break
464 done
465 rm -f conftest.in conftest.tmp conftest.nl conftest.out
466 }
467
468 func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
469 GREP=$func_path_progs_result
470 }
471
472
473 ## ------------------------------- ##
474 ## User overridable command paths. ##
475 ## ------------------------------- ##
476
477 # All uppercase variable names are used for environment variables. These
478 # variables can be overridden by the user before calling a script that
479 # uses them if a suitable command of that name is not already available
480 # in the command search PATH.
481
482 : ${CP="cp -f"}
483 : ${ECHO="printf %s\n"}
484 : ${EGREP="$GREP -E"}
485 : ${FGREP="$GREP -F"}
486 : ${LN_S="ln -s"}
487 : ${MAKE="make"}
488 : ${MKDIR="mkdir"}
489 : ${MV="mv -f"}
490 : ${RM="rm -f"}
491 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
492
493
494 ## -------------------- ##
495 ## Useful sed snippets. ##
496 ## -------------------- ##
497
498 sed_dirname='s|/[^/]*$||'
499 sed_basename='s|^.*/||'
500
501 # Sed substitution that helps us do robust quoting. It backslashifies
502 # metacharacters that are still active within double-quoted strings.
503 sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
504
505 # Same as above, but do not quote variable references.
506 sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
507
508 # Sed substitution that turns a string into a regex matching for the
509 # string literally.
510 sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
511
512 # Sed substitution that converts a w32 file name or path
513 # that contains forward slashes, into one that contains
514 # (escaped) backslashes. A very naive implementation.
515 sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
516
517 # Re-'\' parameter expansions in output of sed_double_quote_subst that
518 # were '\'-ed in input to the same. If an odd number of '\' preceded a
519 # '$' in input to sed_double_quote_subst, that '$' was protected from
520 # expansion. Since each input '\' is now two '\'s, look for any number
521 # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
522 _G_bs='\\'
523 _G_bs2='\\\\'
524 _G_bs4='\\\\\\\\'
525 _G_dollar='\$'
526 sed_double_backslash="\
527 s/$_G_bs4/&\\
528 /g
529 s/^$_G_bs2$_G_dollar/$_G_bs&/
530 s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
531 s/\n//g"
532
533
534 ## ----------------- ##
535 ## Global variables. ##
536 ## ----------------- ##
537
538 # Except for the global variables explicitly listed below, the following
539 # functions in the '^func_' namespace, and the '^require_' namespace
540 # variables initialised in the 'Resource management' section, sourcing
541 # this file will not pollute your global namespace with anything
542 # else. There's no portable way to scope variables in Bourne shell
543 # though, so actually running these functions will sometimes place
544 # results into a variable named after the function, and often use
545 # temporary variables in the '^_G_' namespace. If you are careful to
546 # avoid using those namespaces casually in your sourcing script, things
547 # should continue to work as you expect. And, of course, you can freely
548 # overwrite any of the functions or variables defined here before
549 # calling anything to customize them.
550
551 EXIT_SUCCESS=0
552 EXIT_FAILURE=1
553 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
554 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
555
556 # Allow overriding, eg assuming that you follow the convention of
557 # putting '$debug_cmd' at the start of all your functions, you can get
558 # bash to show function call trace with:
559 #
560 # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
561 debug_cmd=${debug_cmd-":"}
562 exit_cmd=:
563
564 # By convention, finish your script with:
565 #
566 # exit $exit_status
567 #
568 # so that you can set exit_status to non-zero if you want to indicate
569 # something went wrong during execution without actually bailing out at
570 # the point of failure.
571 exit_status=$EXIT_SUCCESS
572
573 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
574 # is ksh but when the shell is invoked as "sh" and the current value of
575 # the _XPG environment variable is not equal to 1 (one), the special
576 # positional parameter $0, within a function call, is the name of the
577 # function.
578 progpath=$0
579
580 # The name of this program.
581 progname=`$ECHO "$progpath" |$SED "$sed_basename"`
582
583 # Make sure we have an absolute progpath for reexecution:
584 case $progpath in
585 [\\/]*|[A-Za-z]:\\*) ;;
586 *[\\/]*)
587 progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
588 progdir=`cd "$progdir" && pwd`
589 progpath=$progdir/$progname
590 ;;
591 *)
592 _G_IFS=$IFS
593 IFS=${PATH_SEPARATOR-:}
594 for progdir in $PATH; do
595 IFS=$_G_IFS
596 test -x "$progdir/$progname" && break
597 done
598 IFS=$_G_IFS
599 test -n "$progdir" || progdir=`pwd`
600 progpath=$progdir/$progname
601 ;;
602 esac
603
604
605 ## ----------------- ##
606 ## Standard options. ##
607 ## ----------------- ##
608
609 # The following options affect the operation of the functions defined
610 # below, and should be set appropriately depending on run-time para-
611 # meters passed on the command line.
612
613 opt_dry_run=false
614 opt_quiet=false
615 opt_verbose=false
616
617 # Categories 'all' and 'none' are always available. Append any others
618 # you will pass as the first argument to func_warning from your own
619 # code.
620 warning_categories=
621
622 # By default, display warnings according to 'opt_warning_types'. Set
623 # 'warning_func' to ':' to elide all warnings, or func_fatal_error to
624 # treat the next displayed warning as a fatal error.
625 warning_func=func_warn_and_continue
626
627 # Set to 'all' to display all warnings, 'none' to suppress all
628 # warnings, or a space delimited list of some subset of
629 # 'warning_categories' to display only the listed warnings.
630 opt_warning_types=all
631
632
633 ## -------------------- ##
634 ## Resource management. ##
635 ## -------------------- ##
636
637 # This section contains definitions for functions that each ensure a
638 # particular resource (a file, or a non-empty configuration variable for
639 # example) is available, and if appropriate to extract default values
640 # from pertinent package files. Call them using their associated
641 # 'require_*' variable to ensure that they are executed, at most, once.
642 #
643 # It's entirely deliberate that calling these functions can set
644 # variables that don't obey the namespace limitations obeyed by the rest
645 # of this file, in order that that they be as useful as possible to
646 # callers.
647
648
649 # require_term_colors
650 # -------------------
651 # Allow display of bold text on terminals that support it.
652 require_term_colors=func_require_term_colors
653 func_require_term_colors ()
654 {
655 $debug_cmd
656
657 test -t 1 && {
658 # COLORTERM and USE_ANSI_COLORS environment variables take
659 # precedence, because most terminfo databases neglect to describe
660 # whether color sequences are supported.
661 test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
662
663 if test 1 = "$USE_ANSI_COLORS"; then
664 # Standard ANSI escape sequences
665 tc_reset=''
666 tc_bold=''; tc_standout=''
667 tc_red=''; tc_green=''
668 tc_blue=''; tc_cyan=''
669 else
670 # Otherwise trust the terminfo database after all.
671 test -n "`tput sgr0 2>/dev/null`" && {
672 tc_reset=`tput sgr0`
673 test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
674 tc_standout=$tc_bold
675 test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
676 test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
677 test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
678 test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
679 test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
680 }
681 fi
682 }
683
684 require_term_colors=:
685 }
686
687
688 ## ----------------- ##
689 ## Function library. ##
690 ## ----------------- ##
691
692 # This section contains a variety of useful functions to call in your
693 # scripts. Take note of the portable wrappers for features provided by
694 # some modern shells, which will fall back to slower equivalents on
695 # less featureful shells.
696
697
698 # func_append VAR VALUE
699 # ---------------------
700 # Append VALUE onto the existing contents of VAR.
701
702 # We should try to minimise forks, especially on Windows where they are
703 # unreasonably slow, so skip the feature probes when bash or zsh are
704 # being used:
705 if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
706 : ${_G_HAVE_ARITH_OP="yes"}
707 : ${_G_HAVE_XSI_OPS="yes"}
708 # The += operator was introduced in bash 3.1
709 case $BASH_VERSION in
710 [12].* | 3.0 | 3.0*) ;;
711 *)
712 : ${_G_HAVE_PLUSEQ_OP="yes"}
713 ;;
714 esac
715 fi
716
717 # _G_HAVE_PLUSEQ_OP
718 # Can be empty, in which case the shell is probed, "yes" if += is
719 # useable or anything else if it does not work.
720 test -z "$_G_HAVE_PLUSEQ_OP" \
721 && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
722 && _G_HAVE_PLUSEQ_OP=yes
723
724 if test yes = "$_G_HAVE_PLUSEQ_OP"
725 then
726 # This is an XSI compatible shell, allowing a faster implementation...
727 eval 'func_append ()
728 {
729 $debug_cmd
730
731 eval "$1+=\$2"
732 }'
733 else
734 # ...otherwise fall back to using expr, which is often a shell builtin.
735 func_append ()
736 {
737 $debug_cmd
738
739 eval "$1=\$$1\$2"
740 }
741 fi
742
743
744 # func_append_quoted VAR VALUE
745 # ----------------------------
746 # Quote VALUE and append to the end of shell variable VAR, separated
747 # by a space.
748 if test yes = "$_G_HAVE_PLUSEQ_OP"; then
749 eval 'func_append_quoted ()
750 {
751 $debug_cmd
752
753 func_quote_arg pretty "$2"
754 eval "$1+=\\ \$func_quote_arg_result"
755 }'
756 else
757 func_append_quoted ()
758 {
759 $debug_cmd
760
761 func_quote_arg pretty "$2"
762 eval "$1=\$$1\\ \$func_quote_arg_result"
763 }
764 fi
765
766
767 # func_append_uniq VAR VALUE
768 # --------------------------
769 # Append unique VALUE onto the existing contents of VAR, assuming
770 # entries are delimited by the first character of VALUE. For example:
771 #
772 # func_append_uniq options " --another-option option-argument"
773 #
774 # will only append to $options if " --another-option option-argument "
775 # is not already present somewhere in $options already (note spaces at
776 # each end implied by leading space in second argument).
777 func_append_uniq ()
778 {
779 $debug_cmd
780
781 eval _G_current_value='`$ECHO $'$1'`'
782 _G_delim=`expr "$2" : '\(.\)'`
783
784 case $_G_delim$_G_current_value$_G_delim in
785 *"$2$_G_delim"*) ;;
786 *) func_append "$@" ;;
787 esac
788 }
789
790
791 # func_arith TERM...
792 # ------------------
793 # Set func_arith_result to the result of evaluating TERMs.
794 test -z "$_G_HAVE_ARITH_OP" \
795 && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
796 && _G_HAVE_ARITH_OP=yes
797
798 if test yes = "$_G_HAVE_ARITH_OP"; then
799 eval 'func_arith ()
800 {
801 $debug_cmd
802
803 func_arith_result=$(( $* ))
804 }'
805 else
806 func_arith ()
807 {
808 $debug_cmd
809
810 func_arith_result=`expr "$@"`
811 }
812 fi
813
814
815 # func_basename FILE
816 # ------------------
817 # Set func_basename_result to FILE with everything up to and including
818 # the last / stripped.
819 if test yes = "$_G_HAVE_XSI_OPS"; then
820 # If this shell supports suffix pattern removal, then use it to avoid
821 # forking. Hide the definitions single quotes in case the shell chokes
822 # on unsupported syntax...
823 _b='func_basename_result=${1##*/}'
824 _d='case $1 in
825 */*) func_dirname_result=${1%/*}$2 ;;
826 * ) func_dirname_result=$3 ;;
827 esac'
828
829 else
830 # ...otherwise fall back to using sed.
831 _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
832 _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
833 if test "X$func_dirname_result" = "X$1"; then
834 func_dirname_result=$3
835 else
836 func_append func_dirname_result "$2"
837 fi'
838 fi
839
840 eval 'func_basename ()
841 {
842 $debug_cmd
843
844 '"$_b"'
845 }'
846
847
848 # func_dirname FILE APPEND NONDIR_REPLACEMENT
849 # -------------------------------------------
850 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
851 # otherwise set result to NONDIR_REPLACEMENT.
852 eval 'func_dirname ()
853 {
854 $debug_cmd
855
856 '"$_d"'
857 }'
858
859
860 # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
861 # --------------------------------------------------------
862 # Perform func_basename and func_dirname in a single function
863 # call:
864 # dirname: Compute the dirname of FILE. If nonempty,
865 # add APPEND to the result, otherwise set result
866 # to NONDIR_REPLACEMENT.
867 # value returned in "$func_dirname_result"
868 # basename: Compute filename of FILE.
869 # value retuned in "$func_basename_result"
870 # For efficiency, we do not delegate to the functions above but instead
871 # duplicate the functionality here.
872 eval 'func_dirname_and_basename ()
873 {
874 $debug_cmd
875
876 '"$_b"'
877 '"$_d"'
878 }'
879
880
881 # func_echo ARG...
882 # ----------------
883 # Echo program name prefixed message.
884 func_echo ()
885 {
886 $debug_cmd
887
888 _G_message=$*
889
890 func_echo_IFS=$IFS
891 IFS=$nl
892 for _G_line in $_G_message; do
893 IFS=$func_echo_IFS
894 $ECHO "$progname: $_G_line"
895 done
896 IFS=$func_echo_IFS
897 }
898
899
900 # func_echo_all ARG...
901 # --------------------
902 # Invoke $ECHO with all args, space-separated.
903 func_echo_all ()
904 {
905 $ECHO "$*"
906 }
907
908
909 # func_echo_infix_1 INFIX ARG...
910 # ------------------------------
911 # Echo program name, followed by INFIX on the first line, with any
912 # additional lines not showing INFIX.
913 func_echo_infix_1 ()
914 {
915 $debug_cmd
916
917 $require_term_colors
918
919 _G_infix=$1; shift
920 _G_indent=$_G_infix
921 _G_prefix="$progname: $_G_infix: "
922 _G_message=$*
923
924 # Strip color escape sequences before counting printable length
925 for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
926 do
927 test -n "$_G_tc" && {
928 _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
929 _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
930 }
931 done
932 _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
933
934 func_echo_infix_1_IFS=$IFS
935 IFS=$nl
936 for _G_line in $_G_message; do
937 IFS=$func_echo_infix_1_IFS
938 $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
939 _G_prefix=$_G_indent
940 done
941 IFS=$func_echo_infix_1_IFS
942 }
943
944
945 # func_error ARG...
946 # -----------------
947 # Echo program name prefixed message to standard error.
948 func_error ()
949 {
950 $debug_cmd
951
952 $require_term_colors
953
954 func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
955 }
956
957
958 # func_fatal_error ARG...
959 # -----------------------
960 # Echo program name prefixed message to standard error, and exit.
961 func_fatal_error ()
962 {
963 $debug_cmd
964
965 func_error "$*"
966 exit $EXIT_FAILURE
967 }
968
969
970 # func_grep EXPRESSION FILENAME
971 # -----------------------------
972 # Check whether EXPRESSION matches any line of FILENAME, without output.
973 func_grep ()
974 {
975 $debug_cmd
976
977 $GREP "$1" "$2" >/dev/null 2>&1
978 }
979
980
981 # func_len STRING
982 # ---------------
983 # Set func_len_result to the length of STRING. STRING may not
984 # start with a hyphen.
985 test -z "$_G_HAVE_XSI_OPS" \
986 && (eval 'x=a/b/c;
987 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
988 && _G_HAVE_XSI_OPS=yes
989
990 if test yes = "$_G_HAVE_XSI_OPS"; then
991 eval 'func_len ()
992 {
993 $debug_cmd
994
995 func_len_result=${#1}
996 }'
997 else
998 func_len ()
999 {
1000 $debug_cmd
1001
1002 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
1003 }
1004 fi
1005
1006
1007 # func_mkdir_p DIRECTORY-PATH
1008 # ---------------------------
1009 # Make sure the entire path to DIRECTORY-PATH is available.
1010 func_mkdir_p ()
1011 {
1012 $debug_cmd
1013
1014 _G_directory_path=$1
1015 _G_dir_list=
1016
1017 if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
1018
1019 # Protect directory names starting with '-'
1020 case $_G_directory_path in
1021 -*) _G_directory_path=./$_G_directory_path ;;
1022 esac
1023
1024 # While some portion of DIR does not yet exist...
1025 while test ! -d "$_G_directory_path"; do
1026 # ...make a list in topmost first order. Use a colon delimited
1027 # list incase some portion of path contains whitespace.
1028 _G_dir_list=$_G_directory_path:$_G_dir_list
1029
1030 # If the last portion added has no slash in it, the list is done
1031 case $_G_directory_path in */*) ;; *) break ;; esac
1032
1033 # ...otherwise throw away the child directory and loop
1034 _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
1035 done
1036 _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
1037
1038 func_mkdir_p_IFS=$IFS; IFS=:
1039 for _G_dir in $_G_dir_list; do
1040 IFS=$func_mkdir_p_IFS
1041 # mkdir can fail with a 'File exist' error if two processes
1042 # try to create one of the directories concurrently. Don't
1043 # stop in that case!
1044 $MKDIR "$_G_dir" 2>/dev/null || :
1045 done
1046 IFS=$func_mkdir_p_IFS
1047
1048 # Bail out if we (or some other process) failed to create a directory.
1049 test -d "$_G_directory_path" || \
1050 func_fatal_error "Failed to create '$1'"
1051 fi
1052 }
1053
1054
1055 # func_mktempdir [BASENAME]
1056 # -------------------------
1057 # Make a temporary directory that won't clash with other running
1058 # libtool processes, and avoids race conditions if possible. If
1059 # given, BASENAME is the basename for that directory.
1060 func_mktempdir ()
1061 {
1062 $debug_cmd
1063
1064 _G_template=${TMPDIR-/tmp}/${1-$progname}
1065
1066 if test : = "$opt_dry_run"; then
1067 # Return a directory name, but don't create it in dry-run mode
1068 _G_tmpdir=$_G_template-$$
1069 else
1070
1071 # If mktemp works, use that first and foremost
1072 _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
1073
1074 if test ! -d "$_G_tmpdir"; then
1075 # Failing that, at least try and use $RANDOM to avoid a race
1076 _G_tmpdir=$_G_template-${RANDOM-0}$$
1077
1078 func_mktempdir_umask=`umask`
1079 umask 0077
1080 $MKDIR "$_G_tmpdir"
1081 umask $func_mktempdir_umask
1082 fi
1083
1084 # If we're not in dry-run mode, bomb out on failure
1085 test -d "$_G_tmpdir" || \
1086 func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
1087 fi
1088
1089 $ECHO "$_G_tmpdir"
1090 }
1091
1092
1093 # func_normal_abspath PATH
1094 # ------------------------
1095 # Remove doubled-up and trailing slashes, "." path components,
1096 # and cancel out any ".." path components in PATH after making
1097 # it an absolute path.
1098 func_normal_abspath ()
1099 {
1100 $debug_cmd
1101
1102 # These SED scripts presuppose an absolute path with a trailing slash.
1103 _G_pathcar='s|^/\([^/]*\).*$|\1|'
1104 _G_pathcdr='s|^/[^/]*||'
1105 _G_removedotparts=':dotsl
1106 s|/\./|/|g
1107 t dotsl
1108 s|/\.$|/|'
1109 _G_collapseslashes='s|/\{1,\}|/|g'
1110 _G_finalslash='s|/*$|/|'
1111
1112 # Start from root dir and reassemble the path.
1113 func_normal_abspath_result=
1114 func_normal_abspath_tpath=$1
1115 func_normal_abspath_altnamespace=
1116 case $func_normal_abspath_tpath in
1117 "")
1118 # Empty path, that just means $cwd.
1119 func_stripname '' '/' "`pwd`"
1120 func_normal_abspath_result=$func_stripname_result
1121 return
1122 ;;
1123 # The next three entries are used to spot a run of precisely
1124 # two leading slashes without using negated character classes;
1125 # we take advantage of case's first-match behaviour.
1126 ///*)
1127 # Unusual form of absolute path, do nothing.
1128 ;;
1129 //*)
1130 # Not necessarily an ordinary path; POSIX reserves leading '//'
1131 # and for example Cygwin uses it to access remote file shares
1132 # over CIFS/SMB, so we conserve a leading double slash if found.
1133 func_normal_abspath_altnamespace=/
1134 ;;
1135 /*)
1136 # Absolute path, do nothing.
1137 ;;
1138 *)
1139 # Relative path, prepend $cwd.
1140 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
1141 ;;
1142 esac
1143
1144 # Cancel out all the simple stuff to save iterations. We also want
1145 # the path to end with a slash for ease of parsing, so make sure
1146 # there is one (and only one) here.
1147 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
1148 -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
1149 while :; do
1150 # Processed it all yet?
1151 if test / = "$func_normal_abspath_tpath"; then
1152 # If we ascended to the root using ".." the result may be empty now.
1153 if test -z "$func_normal_abspath_result"; then
1154 func_normal_abspath_result=/
1155 fi
1156 break
1157 fi
1158 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
1159 -e "$_G_pathcar"`
1160 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
1161 -e "$_G_pathcdr"`
1162 # Figure out what to do with it
1163 case $func_normal_abspath_tcomponent in
1164 "")
1165 # Trailing empty path component, ignore it.
1166 ;;
1167 ..)
1168 # Parent dir; strip last assembled component from result.
1169 func_dirname "$func_normal_abspath_result"
1170 func_normal_abspath_result=$func_dirname_result
1171 ;;
1172 *)
1173 # Actual path component, append it.
1174 func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
1175 ;;
1176 esac
1177 done
1178 # Restore leading double-slash if one was found on entry.
1179 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
1180 }
1181
1182
1183 # func_notquiet ARG...
1184 # --------------------
1185 # Echo program name prefixed message only when not in quiet mode.
1186 func_notquiet ()
1187 {
1188 $debug_cmd
1189
1190 $opt_quiet || func_echo ${1+"$@"}
1191
1192 # A bug in bash halts the script if the last line of a function
1193 # fails when set -e is in force, so we need another command to
1194 # work around that:
1195 :
1196 }
1197
1198
1199 # func_relative_path SRCDIR DSTDIR
1200 # --------------------------------
1201 # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
1202 func_relative_path ()
1203 {
1204 $debug_cmd
1205
1206 func_relative_path_result=
1207 func_normal_abspath "$1"
1208 func_relative_path_tlibdir=$func_normal_abspath_result
1209 func_normal_abspath "$2"
1210 func_relative_path_tbindir=$func_normal_abspath_result
1211
1212 # Ascend the tree starting from libdir
1213 while :; do
1214 # check if we have found a prefix of bindir
1215 case $func_relative_path_tbindir in
1216 $func_relative_path_tlibdir)
1217 # found an exact match
1218 func_relative_path_tcancelled=
1219 break
1220 ;;
1221 $func_relative_path_tlibdir*)
1222 # found a matching prefix
1223 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
1224 func_relative_path_tcancelled=$func_stripname_result
1225 if test -z "$func_relative_path_result"; then
1226 func_relative_path_result=.
1227 fi
1228 break
1229 ;;
1230 *)
1231 func_dirname $func_relative_path_tlibdir
1232 func_relative_path_tlibdir=$func_dirname_result
1233 if test -z "$func_relative_path_tlibdir"; then
1234 # Have to descend all the way to the root!
1235 func_relative_path_result=../$func_relative_path_result
1236 func_relative_path_tcancelled=$func_relative_path_tbindir
1237 break
1238 fi
1239 func_relative_path_result=../$func_relative_path_result
1240 ;;
1241 esac
1242 done
1243
1244 # Now calculate path; take care to avoid doubling-up slashes.
1245 func_stripname '' '/' "$func_relative_path_result"
1246 func_relative_path_result=$func_stripname_result
1247 func_stripname '/' '/' "$func_relative_path_tcancelled"
1248 if test -n "$func_stripname_result"; then
1249 func_append func_relative_path_result "/$func_stripname_result"
1250 fi
1251
1252 # Normalisation. If bindir is libdir, return '.' else relative path.
1253 if test -n "$func_relative_path_result"; then
1254 func_stripname './' '' "$func_relative_path_result"
1255 func_relative_path_result=$func_stripname_result
1256 fi
1257
1258 test -n "$func_relative_path_result" || func_relative_path_result=.
1259
1260 :
1261 }
1262
1263
1264 # func_quote_portable EVAL ARG
1265 # ----------------------------
1266 # Internal function to portably implement func_quote_arg. Note that we still
1267 # keep attention to performance here so we as much as possible try to avoid
1268 # calling sed binary (so far O(N) complexity as long as func_append is O(1)).
1269 func_quote_portable ()
1270 {
1271 $debug_cmd
1272
1273 func_quote_portable_result=$2
1274
1275 # one-time-loop (easy break)
1276 while true
1277 do
1278 if $1; then
1279 func_quote_portable_result=`$ECHO "$2" | $SED \
1280 -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
1281 break
1282 fi
1283
1284 # Quote for eval.
1285 case $func_quote_portable_result in
1286 *[\\\`\"\$]*)
1287 case $func_quote_portable_result in
1288 *[\[\*\?]*)
1289 func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
1290 | $SED "$sed_quote_subst"`
1291 break
1292 ;;
1293 esac
1294
1295 func_quote_portable_old_IFS=$IFS
1296 for _G_char in '\' '`' '"' '$'
1297 do
1298 # STATE($1) PREV($2) SEPARATOR($3)
1299 set start "" ""
1300 func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
1301 IFS=$_G_char
1302 for _G_part in $func_quote_portable_result
1303 do
1304 case $1 in
1305 quote)
1306 func_append func_quote_portable_result "$3$2"
1307 set quote "$_G_part" "\\$_G_char"
1308 ;;
1309 start)
1310 set first "" ""
1311 func_quote_portable_result=
1312 ;;
1313 first)
1314 set quote "$_G_part" ""
1315 ;;
1316 esac
1317 done
1318 done
1319 IFS=$func_quote_portable_old_IFS
1320 ;;
1321 *) ;;
1322 esac
1323 break
1324 done
1325
1326 func_quote_portable_unquoted_result=$func_quote_portable_result
1327 case $func_quote_portable_result in
1328 # double-quote args containing shell metacharacters to delay
1329 # word splitting, command substitution and variable expansion
1330 # for a subsequent eval.
1331 # many bourne shells cannot handle close brackets correctly
1332 # in scan sets, so we specify it separately.
1333 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1334 func_quote_portable_result=\"$func_quote_portable_result\"
1335 ;;
1336 esac
1337 }
1338
1339
1340 # func_quotefast_eval ARG
1341 # -----------------------
1342 # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
1343 # but optimized for speed. Result is stored in $func_quotefast_eval.
1344 if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
1345 printf -v _GL_test_printf_tilde %q '~'
1346 if test '\~' = "$_GL_test_printf_tilde"; then
1347 func_quotefast_eval ()
1348 {
1349 printf -v func_quotefast_eval_result %q "$1"
1350 }
1351 else
1352 # Broken older Bash implementations. Make those faster too if possible.
1353 func_quotefast_eval ()
1354 {
1355 case $1 in
1356 '~'*)
1357 func_quote_portable false "$1"
1358 func_quotefast_eval_result=$func_quote_portable_result
1359 ;;
1360 *)
1361 printf -v func_quotefast_eval_result %q "$1"
1362 ;;
1363 esac
1364 }
1365 fi
1366 else
1367 func_quotefast_eval ()
1368 {
1369 func_quote_portable false "$1"
1370 func_quotefast_eval_result=$func_quote_portable_result
1371 }
1372 fi
1373
1374
1375 # func_quote_arg MODEs ARG
1376 # ------------------------
1377 # Quote one ARG to be evaled later. MODEs argument may contain zero or more
1378 # specifiers listed below separated by ',' character. This function returns two
1379 # values:
1380 # i) func_quote_arg_result
1381 # double-quoted (when needed), suitable for a subsequent eval
1382 # ii) func_quote_arg_unquoted_result
1383 # has all characters that are still active within double
1384 # quotes backslashified. Available only if 'unquoted' is specified.
1385 #
1386 # Available modes:
1387 # ----------------
1388 # 'eval' (default)
1389 # - escape shell special characters
1390 # 'expand'
1391 # - the same as 'eval'; but do not quote variable references
1392 # 'pretty'
1393 # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
1394 # be used later in func_quote to get output like: 'echo "a b"' instead
1395 # of 'echo a\ b'. This is slower than default on some shells.
1396 # 'unquoted'
1397 # - produce also $func_quote_arg_unquoted_result which does not contain
1398 # wrapping double-quotes.
1399 #
1400 # Examples for 'func_quote_arg pretty,unquoted string':
1401 #
1402 # string | *_result | *_unquoted_result
1403 # ------------+-----------------------+-------------------
1404 # " | \" | \"
1405 # a b | "a b" | a b
1406 # "a b" | "\"a b\"" | \"a b\"
1407 # * | "*" | *
1408 # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
1409 #
1410 # Examples for 'func_quote_arg pretty,unquoted,expand string':
1411 #
1412 # string | *_result | *_unquoted_result
1413 # --------------+---------------------+--------------------
1414 # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
1415 func_quote_arg ()
1416 {
1417 _G_quote_expand=false
1418 case ,$1, in
1419 *,expand,*)
1420 _G_quote_expand=:
1421 ;;
1422 esac
1423
1424 case ,$1, in
1425 *,pretty,*|*,expand,*|*,unquoted,*)
1426 func_quote_portable $_G_quote_expand "$2"
1427 func_quote_arg_result=$func_quote_portable_result
1428 func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
1429 ;;
1430 *)
1431 # Faster quote-for-eval for some shells.
1432 func_quotefast_eval "$2"
1433 func_quote_arg_result=$func_quotefast_eval_result
1434 ;;
1435 esac
1436 }
1437
1438
1439 # func_quote MODEs ARGs...
1440 # ------------------------
1441 # Quote all ARGs to be evaled later and join them into single command. See
1442 # func_quote_arg's description for more info.
1443 func_quote ()
1444 {
1445 $debug_cmd
1446 _G_func_quote_mode=$1 ; shift
1447 func_quote_result=
1448 while test 0 -lt $#; do
1449 func_quote_arg "$_G_func_quote_mode" "$1"
1450 if test -n "$func_quote_result"; then
1451 func_append func_quote_result " $func_quote_arg_result"
1452 else
1453 func_append func_quote_result "$func_quote_arg_result"
1454 fi
1455 shift
1456 done
1457 }
1458
1459
1460 # func_stripname PREFIX SUFFIX NAME
1461 # ---------------------------------
1462 # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
1463 # PREFIX and SUFFIX must not contain globbing or regex special
1464 # characters, hashes, percent signs, but SUFFIX may contain a leading
1465 # dot (in which case that matches only a dot).
1466 if test yes = "$_G_HAVE_XSI_OPS"; then
1467 eval 'func_stripname ()
1468 {
1469 $debug_cmd
1470
1471 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1472 # positional parameters, so assign one to ordinary variable first.
1473 func_stripname_result=$3
1474 func_stripname_result=${func_stripname_result#"$1"}
1475 func_stripname_result=${func_stripname_result%"$2"}
1476 }'
1477 else
1478 func_stripname ()
1479 {
1480 $debug_cmd
1481
1482 case $2 in
1483 .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
1484 *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
1485 esac
1486 }
1487 fi
1488
1489
1490 # func_show_eval CMD [FAIL_EXP]
1491 # -----------------------------
1492 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1493 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1494 # is given, then evaluate it.
1495 func_show_eval ()
1496 {
1497 $debug_cmd
1498
1499 _G_cmd=$1
1500 _G_fail_exp=${2-':'}
1501
1502 func_quote_arg pretty,expand "$_G_cmd"
1503 eval "func_notquiet $func_quote_arg_result"
1504
1505 $opt_dry_run || {
1506 eval "$_G_cmd"
1507 _G_status=$?
1508 if test 0 -ne "$_G_status"; then
1509 eval "(exit $_G_status); $_G_fail_exp"
1510 fi
1511 }
1512 }
1513
1514
1515 # func_show_eval_locale CMD [FAIL_EXP]
1516 # ------------------------------------
1517 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1518 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1519 # is given, then evaluate it. Use the saved locale for evaluation.
1520 func_show_eval_locale ()
1521 {
1522 $debug_cmd
1523
1524 _G_cmd=$1
1525 _G_fail_exp=${2-':'}
1526
1527 $opt_quiet || {
1528 func_quote_arg expand,pretty "$_G_cmd"
1529 eval "func_echo $func_quote_arg_result"
1530 }
1531
1532 $opt_dry_run || {
1533 eval "$_G_user_locale
1534 $_G_cmd"
1535 _G_status=$?
1536 eval "$_G_safe_locale"
1537 if test 0 -ne "$_G_status"; then
1538 eval "(exit $_G_status); $_G_fail_exp"
1539 fi
1540 }
1541 }
1542
1543
1544 # func_tr_sh
1545 # ----------
1546 # Turn $1 into a string suitable for a shell variable name.
1547 # Result is stored in $func_tr_sh_result. All characters
1548 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
1549 # if $1 begins with a digit, a '_' is prepended as well.
1550 func_tr_sh ()
1551 {
1552 $debug_cmd
1553
1554 case $1 in
1555 [0-9]* | *[!a-zA-Z0-9_]*)
1556 func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
1557 ;;
1558 * )
1559 func_tr_sh_result=$1
1560 ;;
1561 esac
1562 }
1563
1564
1565 # func_verbose ARG...
1566 # -------------------
1567 # Echo program name prefixed message in verbose mode only.
1568 func_verbose ()
1569 {
1570 $debug_cmd
1571
1572 $opt_verbose && func_echo "$*"
1573
1574 :
1575 }
1576
1577
1578 # func_warn_and_continue ARG...
1579 # -----------------------------
1580 # Echo program name prefixed warning message to standard error.
1581 func_warn_and_continue ()
1582 {
1583 $debug_cmd
1584
1585 $require_term_colors
1586
1587 func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
1588 }
1589
1590
1591 # func_warning CATEGORY ARG...
1592 # ----------------------------
1593 # Echo program name prefixed warning message to standard error. Warning
1594 # messages can be filtered according to CATEGORY, where this function
1595 # elides messages where CATEGORY is not listed in the global variable
1596 # 'opt_warning_types'.
1597 func_warning ()
1598 {
1599 $debug_cmd
1600
1601 # CATEGORY must be in the warning_categories list!
1602 case " $warning_categories " in
1603 *" $1 "*) ;;
1604 *) func_internal_error "invalid warning category '$1'" ;;
1605 esac
1606
1607 _G_category=$1
1608 shift
1609
1610 case " $opt_warning_types " in
1611 *" $_G_category "*) $warning_func ${1+"$@"} ;;
1612 esac
1613 }
1614
1615
1616 # func_sort_ver VER1 VER2
1617 # -----------------------
1618 # 'sort -V' is not generally available.
1619 # Note this deviates from the version comparison in automake
1620 # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
1621 # but this should suffice as we won't be specifying old
1622 # version formats or redundant trailing .0 in bootstrap.conf.
1623 # If we did want full compatibility then we should probably
1624 # use m4_version_compare from autoconf.
1625 func_sort_ver ()
1626 {
1627 $debug_cmd
1628
1629 printf '%s\n%s\n' "$1" "$2" \
1630 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
1631 }
1632
1633 # func_lt_ver PREV CURR
1634 # ---------------------
1635 # Return true if PREV and CURR are in the correct order according to
1636 # func_sort_ver, otherwise false. Use it like this:
1637 #
1638 # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
1639 func_lt_ver ()
1640 {
1641 $debug_cmd
1642
1643 test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
1644 }
1645
1646
1647 # Local variables:
1648 # mode: shell-script
1649 # sh-indentation: 2
1650 # eval: (add-hook 'before-save-hook 'time-stamp)
1651 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1652 # time-stamp-time-zone: "UTC"
1653 # End:
1654 #! /bin/sh
1655
1656 # A portable, pluggable option parser for Bourne shell.
1657 # Written by Gary V. Vaughan, 2010
1658
1659 # This is free software. There is NO warranty; not even for
1660 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1661 #
1662 # Copyright (C) 2010-2019 Bootstrap Authors
1663 #
1664 # This file is dual licensed under the terms of the MIT license
1665 # <https://opensource.org/license/MIT>, and GPL version 3 or later
1666 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
1667 # these licenses when using or redistributing this software or any of
1668 # the files within it. See the URLs above, or the file `LICENSE`
1669 # included in the Bootstrap distribution for the full license texts.
1670
1671 # Please report bugs or propose patches to:
1672 # <https://github.com/gnulib-modules/bootstrap/issues>
1673
1674 # Set a version string for this script.
1675 scriptversion=2019-02-19.15; # UTC
1676
1677
1678 ## ------ ##
1679 ## Usage. ##
1680 ## ------ ##
1681
1682 # This file is a library for parsing options in your shell scripts along
1683 # with assorted other useful supporting features that you can make use
1684 # of too.
1685 #
1686 # For the simplest scripts you might need only:
1687 #
1688 # #!/bin/sh
1689 # . relative/path/to/funclib.sh
1690 # . relative/path/to/options-parser
1691 # scriptversion=1.0
1692 # func_options ${1+"$@"}
1693 # eval set dummy "$func_options_result"; shift
1694 # ...rest of your script...
1695 #
1696 # In order for the '--version' option to work, you will need to have a
1697 # suitably formatted comment like the one at the top of this file
1698 # starting with '# Written by ' and ending with '# Copyright'.
1699 #
1700 # For '-h' and '--help' to work, you will also need a one line
1701 # description of your script's purpose in a comment directly above the
1702 # '# Written by ' line, like the one at the top of this file.
1703 #
1704 # The default options also support '--debug', which will turn on shell
1705 # execution tracing (see the comment above debug_cmd below for another
1706 # use), and '--verbose' and the func_verbose function to allow your script
1707 # to display verbose messages only when your user has specified
1708 # '--verbose'.
1709 #
1710 # After sourcing this file, you can plug in processing for additional
1711 # options by amending the variables from the 'Configuration' section
1712 # below, and following the instructions in the 'Option parsing'
1713 # section further down.
1714
1715 ## -------------- ##
1716 ## Configuration. ##
1717 ## -------------- ##
1718
1719 # You should override these variables in your script after sourcing this
1720 # file so that they reflect the customisations you have added to the
1721 # option parser.
1722
1723 # The usage line for option parsing errors and the start of '-h' and
1724 # '--help' output messages. You can embed shell variables for delayed
1725 # expansion at the time the message is displayed, but you will need to
1726 # quote other shell meta-characters carefully to prevent them being
1727 # expanded when the contents are evaled.
1728 usage='$progpath [OPTION]...'
1729
1730 # Short help message in response to '-h' and '--help'. Add to this or
1731 # override it after sourcing this library to reflect the full set of
1732 # options your script accepts.
1733 usage_message="\
1734 --debug enable verbose shell tracing
1735 -W, --warnings=CATEGORY
1736 report the warnings falling in CATEGORY [all]
1737 -v, --verbose verbosely report processing
1738 --version print version information and exit
1739 -h, --help print short or long help message and exit
1740 "
1741
1742 # Additional text appended to 'usage_message' in response to '--help'.
1743 long_help_message="
1744 Warning categories include:
1745 'all' show all warnings
1746 'none' turn off all the warnings
1747 'error' warnings are treated as fatal errors"
1748
1749 # Help message printed before fatal option parsing errors.
1750 fatal_help="Try '\$progname --help' for more information."
1751
1752
1753
1754 ## ------------------------- ##
1755 ## Hook function management. ##
1756 ## ------------------------- ##
1757
1758 # This section contains functions for adding, removing, and running hooks
1759 # in the main code. A hook is just a list of function names that can be
1760 # run in order later on.
1761
1762 # func_hookable FUNC_NAME
1763 # -----------------------
1764 # Declare that FUNC_NAME will run hooks added with
1765 # 'func_add_hook FUNC_NAME ...'.
1766 func_hookable ()
1767 {
1768 $debug_cmd
1769
1770 func_append hookable_fns " $1"
1771 }
1772
1773
1774 # func_add_hook FUNC_NAME HOOK_FUNC
1775 # ---------------------------------
1776 # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
1777 # first have been declared "hookable" by a call to 'func_hookable'.
1778 func_add_hook ()
1779 {
1780 $debug_cmd
1781
1782 case " $hookable_fns " in
1783 *" $1 "*) ;;
1784 *) func_fatal_error "'$1' does not accept hook functions." ;;
1785 esac
1786
1787 eval func_append ${1}_hooks '" $2"'
1788 }
1789
1790
1791 # func_remove_hook FUNC_NAME HOOK_FUNC
1792 # ------------------------------------
1793 # Remove HOOK_FUNC from the list of hook functions to be called by
1794 # FUNC_NAME.
1795 func_remove_hook ()
1796 {
1797 $debug_cmd
1798
1799 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
1800 }
1801
1802
1803 # func_propagate_result FUNC_NAME_A FUNC_NAME_B
1804 # ---------------------------------------------
1805 # If the *_result variable of FUNC_NAME_A _is set_, assign its value to
1806 # *_result variable of FUNC_NAME_B.
1807 func_propagate_result ()
1808 {
1809 $debug_cmd
1810
1811 func_propagate_result_result=:
1812 if eval "test \"\${${1}_result+set}\" = set"
1813 then
1814 eval "${2}_result=\$${1}_result"
1815 else
1816 func_propagate_result_result=false
1817 fi
1818 }
1819
1820
1821 # func_run_hooks FUNC_NAME [ARG]...
1822 # ---------------------------------
1823 # Run all hook functions registered to FUNC_NAME.
1824 # It's assumed that the list of hook functions contains nothing more
1825 # than a whitespace-delimited list of legal shell function names, and
1826 # no effort is wasted trying to catch shell meta-characters or preserve
1827 # whitespace.
1828 func_run_hooks ()
1829 {
1830 $debug_cmd
1831
1832 case " $hookable_fns " in
1833 *" $1 "*) ;;
1834 *) func_fatal_error "'$1' does not support hook functions." ;;
1835 esac
1836
1837 eval _G_hook_fns=\$$1_hooks; shift
1838
1839 for _G_hook in $_G_hook_fns; do
1840 func_unset "${_G_hook}_result"
1841 eval $_G_hook '${1+"$@"}'
1842 func_propagate_result $_G_hook func_run_hooks
1843 if $func_propagate_result_result; then
1844 eval set dummy "$func_run_hooks_result"; shift
1845 fi
1846 done
1847 }
1848
1849
1850
1851 ## --------------- ##
1852 ## Option parsing. ##
1853 ## --------------- ##
1854
1855 # In order to add your own option parsing hooks, you must accept the
1856 # full positional parameter list from your hook function. You may remove
1857 # or edit any options that you action, and then pass back the remaining
1858 # unprocessed options in '<hooked_function_name>_result', escaped
1859 # suitably for 'eval'.
1860 #
1861 # The '<hooked_function_name>_result' variable is automatically unset
1862 # before your hook gets called; for best performance, only set the
1863 # *_result variable when necessary (i.e. don't call the 'func_quote'
1864 # function unnecessarily because it can be an expensive operation on some
1865 # machines).
1866 #
1867 # Like this:
1868 #
1869 # my_options_prep ()
1870 # {
1871 # $debug_cmd
1872 #
1873 # # Extend the existing usage message.
1874 # usage_message=$usage_message'
1875 # -s, --silent don'\''t print informational messages
1876 # '
1877 # # No change in '$@' (ignored completely by this hook). Leave
1878 # # my_options_prep_result variable intact.
1879 # }
1880 # func_add_hook func_options_prep my_options_prep
1881 #
1882 #
1883 # my_silent_option ()
1884 # {
1885 # $debug_cmd
1886 #
1887 # args_changed=false
1888 #
1889 # # Note that, for efficiency, we parse as many options as we can
1890 # # recognise in a loop before passing the remainder back to the
1891 # # caller on the first unrecognised argument we encounter.
1892 # while test $# -gt 0; do
1893 # opt=$1; shift
1894 # case $opt in
1895 # --silent|-s) opt_silent=:
1896 # args_changed=:
1897 # ;;
1898 # # Separate non-argument short options:
1899 # -s*) func_split_short_opt "$_G_opt"
1900 # set dummy "$func_split_short_opt_name" \
1901 # "-$func_split_short_opt_arg" ${1+"$@"}
1902 # shift
1903 # args_changed=:
1904 # ;;
1905 # *) # Make sure the first unrecognised option "$_G_opt"
1906 # # is added back to "$@" in case we need it later,
1907 # # if $args_changed was set to 'true'.
1908 # set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1909 # esac
1910 # done
1911 #
1912 # # Only call 'func_quote' here if we processed at least one argument.
1913 # if $args_changed; then
1914 # func_quote eval ${1+"$@"}
1915 # my_silent_option_result=$func_quote_result
1916 # fi
1917 # }
1918 # func_add_hook func_parse_options my_silent_option
1919 #
1920 #
1921 # my_option_validation ()
1922 # {
1923 # $debug_cmd
1924 #
1925 # $opt_silent && $opt_verbose && func_fatal_help "\
1926 # '--silent' and '--verbose' options are mutually exclusive."
1927 # }
1928 # func_add_hook func_validate_options my_option_validation
1929 #
1930 # You'll also need to manually amend $usage_message to reflect the extra
1931 # options you parse. It's preferable to append if you can, so that
1932 # multiple option parsing hooks can be added safely.
1933
1934
1935 # func_options_finish [ARG]...
1936 # ----------------------------
1937 # Finishing the option parse loop (call 'func_options' hooks ATM).
1938 func_options_finish ()
1939 {
1940 $debug_cmd
1941
1942 func_run_hooks func_options ${1+"$@"}
1943 func_propagate_result func_run_hooks func_options_finish
1944 }
1945
1946
1947 # func_options [ARG]...
1948 # ---------------------
1949 # All the functions called inside func_options are hookable. See the
1950 # individual implementations for details.
1951 func_hookable func_options
1952 func_options ()
1953 {
1954 $debug_cmd
1955
1956 _G_options_quoted=false
1957
1958 for my_func in options_prep parse_options validate_options options_finish
1959 do
1960 func_unset func_${my_func}_result
1961 func_unset func_run_hooks_result
1962 eval func_$my_func '${1+"$@"}'
1963 func_propagate_result func_$my_func func_options
1964 if $func_propagate_result_result; then
1965 eval set dummy "$func_options_result"; shift
1966 _G_options_quoted=:
1967 fi
1968 done
1969
1970 $_G_options_quoted || {
1971 # As we (func_options) are top-level options-parser function and
1972 # nobody quoted "$@" for us yet, we need to do it explicitly for
1973 # caller.
1974 func_quote eval ${1+"$@"}
1975 func_options_result=$func_quote_result
1976 }
1977 }
1978
1979
1980 # func_options_prep [ARG]...
1981 # --------------------------
1982 # All initialisations required before starting the option parse loop.
1983 # Note that when calling hook functions, we pass through the list of
1984 # positional parameters. If a hook function modifies that list, and
1985 # needs to propagate that back to rest of this script, then the complete
1986 # modified list must be put in 'func_run_hooks_result' before returning.
1987 func_hookable func_options_prep
1988 func_options_prep ()
1989 {
1990 $debug_cmd
1991
1992 # Option defaults:
1993 opt_verbose=false
1994 opt_warning_types=
1995
1996 func_run_hooks func_options_prep ${1+"$@"}
1997 func_propagate_result func_run_hooks func_options_prep
1998 }
1999
2000
2001 # func_parse_options [ARG]...
2002 # ---------------------------
2003 # The main option parsing loop.
2004 func_hookable func_parse_options
2005 func_parse_options ()
2006 {
2007 $debug_cmd
2008
2009 _G_parse_options_requote=false
2010 # this just eases exit handling
2011 while test $# -gt 0; do
2012 # Defer to hook functions for initial option parsing, so they
2013 # get priority in the event of reusing an option name.
2014 func_run_hooks func_parse_options ${1+"$@"}
2015 func_propagate_result func_run_hooks func_parse_options
2016 if $func_propagate_result_result; then
2017 eval set dummy "$func_parse_options_result"; shift
2018 # Even though we may have changed "$@", we passed the "$@" array
2019 # down into the hook and it quoted it for us (because we are in
2020 # this if-branch). No need to quote it again.
2021 _G_parse_options_requote=false
2022 fi
2023
2024 # Break out of the loop if we already parsed every option.
2025 test $# -gt 0 || break
2026
2027 # We expect that one of the options parsed in this function matches
2028 # and thus we remove _G_opt from "$@" and need to re-quote.
2029 _G_match_parse_options=:
2030 _G_opt=$1
2031 shift
2032 case $_G_opt in
2033 --debug|-x) debug_cmd='set -x'
2034 func_echo "enabling shell trace mode" >&2
2035 $debug_cmd
2036 ;;
2037
2038 --no-warnings|--no-warning|--no-warn)
2039 set dummy --warnings none ${1+"$@"}
2040 shift
2041 ;;
2042
2043 --warnings|--warning|-W)
2044 if test $# = 0 && func_missing_arg $_G_opt; then
2045 _G_parse_options_requote=:
2046 break
2047 fi
2048 case " $warning_categories $1" in
2049 *" $1 "*)
2050 # trailing space prevents matching last $1 above
2051 func_append_uniq opt_warning_types " $1"
2052 ;;
2053 *all)
2054 opt_warning_types=$warning_categories
2055 ;;
2056 *none)
2057 opt_warning_types=none
2058 warning_func=:
2059 ;;
2060 *error)
2061 opt_warning_types=$warning_categories
2062 warning_func=func_fatal_error
2063 ;;
2064 *)
2065 func_fatal_error \
2066 "unsupported warning category: '$1'"
2067 ;;
2068 esac
2069 shift
2070 ;;
2071
2072 --verbose|-v) opt_verbose=: ;;
2073 --version) func_version ;;
2074 -\?|-h) func_usage ;;
2075 --help) func_help ;;
2076
2077 # Separate optargs to long options (plugins may need this):
2078 --*=*) func_split_equals "$_G_opt"
2079 set dummy "$func_split_equals_lhs" \
2080 "$func_split_equals_rhs" ${1+"$@"}
2081 shift
2082 ;;
2083
2084 # Separate optargs to short options:
2085 -W*)
2086 func_split_short_opt "$_G_opt"
2087 set dummy "$func_split_short_opt_name" \
2088 "$func_split_short_opt_arg" ${1+"$@"}
2089 shift
2090 ;;
2091
2092 # Separate non-argument short options:
2093 -\?*|-h*|-v*|-x*)
2094 func_split_short_opt "$_G_opt"
2095 set dummy "$func_split_short_opt_name" \
2096 "-$func_split_short_opt_arg" ${1+"$@"}
2097 shift
2098 ;;
2099
2100 --) _G_parse_options_requote=: ; break ;;
2101 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
2102 *) set dummy "$_G_opt" ${1+"$@"}; shift
2103 _G_match_parse_options=false
2104 break
2105 ;;
2106 esac
2107
2108 if $_G_match_parse_options; then
2109 _G_parse_options_requote=:
2110 fi
2111 done
2112
2113 if $_G_parse_options_requote; then
2114 # save modified positional parameters for caller
2115 func_quote eval ${1+"$@"}
2116 func_parse_options_result=$func_quote_result
2117 fi
2118 }
2119
2120
2121 # func_validate_options [ARG]...
2122 # ------------------------------
2123 # Perform any sanity checks on option settings and/or unconsumed
2124 # arguments.
2125 func_hookable func_validate_options
2126 func_validate_options ()
2127 {
2128 $debug_cmd
2129
2130 # Display all warnings if -W was not given.
2131 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
2132
2133 func_run_hooks func_validate_options ${1+"$@"}
2134 func_propagate_result func_run_hooks func_validate_options
2135
2136 # Bail if the options were screwed!
2137 $exit_cmd $EXIT_FAILURE
2138 }
2139
2140
2141
2142 ## ----------------- ##
2143 ## Helper functions. ##
2144 ## ----------------- ##
2145
2146 # This section contains the helper functions used by the rest of the
2147 # hookable option parser framework in ascii-betical order.
2148
2149
2150 # func_fatal_help ARG...
2151 # ----------------------
2152 # Echo program name prefixed message to standard error, followed by
2153 # a help hint, and exit.
2154 func_fatal_help ()
2155 {
2156 $debug_cmd
2157
2158 eval \$ECHO \""Usage: $usage"\"
2159 eval \$ECHO \""$fatal_help"\"
2160 func_error ${1+"$@"}
2161 exit $EXIT_FAILURE
2162 }
2163
2164
2165 # func_help
2166 # ---------
2167 # Echo long help message to standard output and exit.
2168 func_help ()
2169 {
2170 $debug_cmd
2171
2172 func_usage_message
2173 $ECHO "$long_help_message"
2174 exit 0
2175 }
2176
2177
2178 # func_missing_arg ARGNAME
2179 # ------------------------
2180 # Echo program name prefixed message to standard error and set global
2181 # exit_cmd.
2182 func_missing_arg ()
2183 {
2184 $debug_cmd
2185
2186 func_error "Missing argument for '$1'."
2187 exit_cmd=exit
2188 }
2189
2190
2191 # func_split_equals STRING
2192 # ------------------------
2193 # Set func_split_equals_lhs and func_split_equals_rhs shell variables
2194 # after splitting STRING at the '=' sign.
2195 test -z "$_G_HAVE_XSI_OPS" \
2196 && (eval 'x=a/b/c;
2197 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
2198 && _G_HAVE_XSI_OPS=yes
2199
2200 if test yes = "$_G_HAVE_XSI_OPS"
2201 then
2202 # This is an XSI compatible shell, allowing a faster implementation...
2203 eval 'func_split_equals ()
2204 {
2205 $debug_cmd
2206
2207 func_split_equals_lhs=${1%%=*}
2208 func_split_equals_rhs=${1#*=}
2209 if test "x$func_split_equals_lhs" = "x$1"; then
2210 func_split_equals_rhs=
2211 fi
2212 }'
2213 else
2214 # ...otherwise fall back to using expr, which is often a shell builtin.
2215 func_split_equals ()
2216 {
2217 $debug_cmd
2218
2219 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
2220 func_split_equals_rhs=
2221 test "x$func_split_equals_lhs" = "x$1" \
2222 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
2223 }
2224 fi #func_split_equals
2225
2226
2227 # func_split_short_opt SHORTOPT
2228 # -----------------------------
2229 # Set func_split_short_opt_name and func_split_short_opt_arg shell
2230 # variables after splitting SHORTOPT after the 2nd character.
2231 if test yes = "$_G_HAVE_XSI_OPS"
2232 then
2233 # This is an XSI compatible shell, allowing a faster implementation...
2234 eval 'func_split_short_opt ()
2235 {
2236 $debug_cmd
2237
2238 func_split_short_opt_arg=${1#??}
2239 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
2240 }'
2241 else
2242 # ...otherwise fall back to using expr, which is often a shell builtin.
2243 func_split_short_opt ()
2244 {
2245 $debug_cmd
2246
2247 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
2248 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
2249 }
2250 fi #func_split_short_opt
2251
2252
2253 # func_usage
2254 # ----------
2255 # Echo short help message to standard output and exit.
2256 func_usage ()
2257 {
2258 $debug_cmd
2259
2260 func_usage_message
2261 $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
2262 exit 0
2263 }
2264
2265
2266 # func_usage_message
2267 # ------------------
2268 # Echo short help message to standard output.
2269 func_usage_message ()
2270 {
2271 $debug_cmd
2272
2273 eval \$ECHO \""Usage: $usage"\"
2274 echo
2275 $SED -n 's|^# ||
2276 /^Written by/{
2277 x;p;x
2278 }
2279 h
2280 /^Written by/q' < "$progpath"
2281 echo
2282 eval \$ECHO \""$usage_message"\"
2283 }
2284
2285
2286 # func_version
2287 # ------------
2288 # Echo version message to standard output and exit.
2289 # The version message is extracted from the calling file's header
2290 # comments, with leading '# ' stripped:
2291 # 1. First display the progname and version
2292 # 2. Followed by the header comment line matching /^# Written by /
2293 # 3. Then a blank line followed by the first following line matching
2294 # /^# Copyright /
2295 # 4. Immediately followed by any lines between the previous matches,
2296 # except lines preceding the intervening completely blank line.
2297 # For example, see the header comments of this file.
2298 func_version ()
2299 {
2300 $debug_cmd
2301
2302 printf '%s\n' "$progname $scriptversion"
2303 $SED -n '
2304 /^# Written by /!b
2305 s|^# ||; p; n
2306
2307 :fwd2blnk
2308 /./ {
2309 n
2310 b fwd2blnk
2311 }
2312 p; n
2313
2314 :holdwrnt
2315 s|^# ||
2316 s|^# *$||
2317 /^Copyright /!{
2318 /./H
2319 n
2320 b holdwrnt
2321 }
2322
2323 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
2324 G
2325 s|\(\n\)\n*|\1|g
2326 p; q' < "$progpath"
2327
2328 exit $?
2329 }
2330
2331
2332 # Local variables:
2333 # mode: shell-script
2334 # sh-indentation: 2
2335 # eval: (add-hook 'before-save-hook 'time-stamp)
2336 # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
2337 # time-stamp-time-zone: "UTC"
2338 # End:
2339 #! /bin/sh
2340
2341 # Extract macro arguments from autotools input with GNU M4.
2342 # Written by Gary V. Vaughan, 2010
2343 #
2344 # This is free software. There is NO warranty; not even for
2345 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2346 #
2347 # Copyright (C) 2010-2019 Bootstrap Authors
2348 #
2349 # This file is dual licensed under the terms of the MIT license
2350 # <https://opensource.org/license/MIT>, and GPL version 3 or later
2351 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
2352 # these licenses when using or redistributing this software or any of
2353 # the files within it. See the URLs above, or the file `LICENSE`
2354 # included in the Bootstrap distribution for the full license texts.
2355
2356 # Please report bugs or propose patches to:
2357 # <https://github.com/gnulib-modules/bootstrap/issues>
2358
2359 # Make sure we've evaluated scripts we depend on.
2360 test -z "$progpath" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh
2361 test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
2362
2363 # Set a version string.
2364 scriptversion=2019-02-19.15; # UTC
2365
2366
2367 ## ------ ##
2368 ## Usage. ##
2369 ## ------ ##
2370
2371 # Run './extract-trace --help' for help with using this script from the
2372 # command line.
2373 #
2374 # Or source first 'options-parser' and then this file into your own
2375 # scripts in order to make use of the function and variable framework
2376 # they define, and also to avoid the overhead of forking to run this
2377 # script in its own process on every call.
2378
2379
2380
2381 ## ----------------- ##
2382 ## Helper functions. ##
2383 ## ----------------- ##
2384
2385 # This section contains the helper functions used by the rest of
2386 # 'extract-trace'.
2387
2388
2389 # func_autoconf_configure MAYBE-CONFIGURE-FILE
2390 # --------------------------------------------
2391 # Ensure that MAYBE-CONFIGURE-FILE is the name of a file in the current
2392 # directory that contains an uncommented call to AC_INIT.
2393 func_autoconf_configure ()
2394 {
2395 $debug_cmd
2396
2397 _G_sed_no_comment='
2398 s|#.*$||
2399 s|^dnl .*$||
2400 s| dnl .*$||'
2401 _G_ac_init=
2402
2403 # If we were passed a genuine file, make sure it calls AC_INIT.
2404 test -f "$1" \
2405 && _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |$GREP AC_INIT`
2406
2407 # Otherwise it is not a genuine Autoconf input file.
2408 test -n "$_G_ac_init"
2409 _G_status=$?
2410
2411 test 0 -ne "$_G_status" \
2412 && func_verbose "'$1' not using Autoconf"
2413
2414 (exit $_G_status)
2415 }
2416
2417
2418 # func_tool_version_output CMD [FATAL-ERROR-MSG]
2419 # ----------------------------------------------
2420 # Attempt to run 'CMD --version', discarding errors. The output can be
2421 # ignored by redirecting stdout, and this function used simply to test
2422 # whether the command exists and exits normally when passed a
2423 # '--version' argument.
2424 # When FATAL-ERROR-MSG is given, then this function will display the
2425 # message and exit if running 'CMD --version' returns a non-zero exit
2426 # status.
2427 func_tool_version_output ()
2428 {
2429 $debug_cmd
2430
2431 _G_cmd=$1
2432 _G_fatal_error_msg=$2
2433
2434 # Some tools, like 'git2cl' produce thousands of lines of output
2435 # unless stdin is /dev/null - in that case we want to return
2436 # successfully without saving all of that output. Other tools,
2437 # such as 'help2man' exit with a non-zero status when stdin comes
2438 # from /dev/null, so we re-execute without /dev/null if that
2439 # happens. This means that occasionally, the output from both calls
2440 # ends up in the result, but the alternative would be to discard the
2441 # output from one call, and hope the other produces something useful.
2442 { $_G_cmd --version </dev/null || $_G_cmd --version; } 2>/dev/null
2443 _G_status=$?
2444
2445 test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \
2446 && func_fatal_error "$_G_fatal_error_msg"
2447
2448 (exit $_G_status)
2449 }
2450
2451
2452 # func_tool_version_number CMD [FATAL-ERROR-MSG]
2453 # ----------------------------------------------
2454 # Pass arguments to func_tool_version_output, but set
2455 # $func_tool_version_number_result to the last dot delimited digit string
2456 # on the first line of output.
2457 func_tool_version_number ()
2458 {
2459 $debug_cmd
2460
2461 _G_verout=`func_tool_version_output "$@"`
2462 _G_status=$?
2463
2464 # A version number starts with a digit following a space on the first
2465 # line of output from `--version`.
2466 _G_verout=`echo "$_G_verout" |sed 1q`
2467 if test -n "$_G_verout"; then
2468 _G_vernum=`expr "$_G_verout" : '.* \([0-9][^ ]*\)'`
2469 fi
2470
2471 if test -n "$_G_vernum"; then
2472 printf '%s\n' "$_G_vernum"
2473 else
2474 printf '%s\n' "$_G_verout"
2475 fi
2476
2477 (exit $_G_status)
2478 }
2479
2480
2481 # func_find_tool ENVVAR NAMES...
2482 # ------------------------------
2483 # Search for a required program. Use the value of ENVVAR, if set,
2484 # otherwise find the first of the NAMES that can be run (i.e.,
2485 # supports --version). If found, set ENVVAR to the program name,
2486 # die otherwise.
2487 func_find_tool ()
2488 {
2489 $debug_cmd
2490
2491 _G_find_tool_envvar=$1
2492 shift
2493 _G_find_tool_names=$@
2494 eval "_G_find_tool_res=\$$_G_find_tool_envvar"
2495 if test -n "$_G_find_tool_res"; then
2496 _G_find_tool_error_prefix="\$$find_tool_envvar: "
2497 else
2498 _G_find_tool_res=
2499 _G_bestver=
2500 for _G_prog
2501 do
2502 _G_find_tool_save_IFS=$IFS
2503 IFS=${PATH_SEPARATOR-:}
2504 for _G_dir in $PATH; do
2505 IFS=$_G_find_tool_save_IFS
2506 _G_progpath=$_G_dir/$_G_prog
2507 test -r "$_G_progpath" && {
2508 _G_curver=`func_tool_version_number $_G_progpath`
2509 case $_G_bestver,$_G_curver in
2510 ,)
2511 # first non--version responsive prog sticks!
2512 test -n "$_G_progpath" || _G_find_tool_res=$_G_progpath
2513 ;;
2514 ,*)
2515 # first --version responsive prog beats non--version responsive!
2516 _G_find_tool_res=$_G_progpath
2517 _G_bestver=$_G_curver
2518 ;;
2519 *,*)
2520 # another --version responsive prog must be newer to beat previous one!
2521 test "x$_G_curver" = "x$_G_bestver" \
2522 || func_lt_ver "$_G_curver" "$_G_bestver" \
2523 || {
2524 _G_find_tool_res=$_G_progpath
2525 _G_bestver=$_G_curver
2526 }
2527 ;;
2528 esac
2529 }
2530 done
2531 IFS=$_G_find_tool_save_IFS
2532 done
2533 fi
2534 if test -n "$_G_find_tool_res"; then
2535 func_tool_version_number >/dev/null $_G_find_tool_res "\
2536 ${_G_find_tool_error_prefix}Cannot run '$_G_find_tool_res --version'"
2537
2538 # Make sure the result is exported to the environment for children
2539 # to use.
2540 eval "$_G_find_tool_envvar=\$_G_find_tool_res"
2541 eval "export $_G_find_tool_envvar"
2542 else
2543 func_error "\
2544 One of these is required:
2545 $_G_find_tool_names"
2546 fi
2547 }
2548
2549
2550
2551 ## -------------------- ##
2552 ## Resource management. ##
2553 ## -------------------- ##
2554
2555 # This section contains definitions for functions that each ensure a
2556 # particular resource (a file, or a non-empty configuration variable for
2557 # example) is available, and if appropriate to extract default values
2558 # from pertinent package files. Where a variable already has a non-
2559 # empty value (as set by the package's 'bootstrap.conf'), that value is
2560 # used in preference to deriving the default. Call them using their
2561 # associated 'require_*' variable to ensure that they are executed, at
2562 # most, once.
2563 #
2564 # It's entirely deliberate that calling these functions can set
2565 # variables that don't obey the namespace limitations obeyed by the rest
2566 # of this file, in order that that they be as useful as possible to
2567 # callers.
2568
2569
2570 # require_configure_ac
2571 # --------------------
2572 # Ensure that there is a 'configure.ac' or 'configure.in' file in the
2573 # current directory that contains an uncommented call to AC_INIT, and
2574 # that '$configure_ac' contains its name.
2575 require_configure_ac=func_require_configure_ac
2576 func_require_configure_ac ()
2577 {
2578 $debug_cmd
2579
2580 test -z "$configure_ac" \
2581 && func_autoconf_configure configure.ac && configure_ac=configure.ac
2582 test -z "$configure_ac" \
2583 && func_autoconf_configure configure.in && configure_ac=configure.in
2584 test -z "$configure_ac" \
2585 || func_verbose "found '$configure_ac'"
2586
2587 require_configure_ac=:
2588 }
2589
2590
2591 # require_gnu_m4
2592 # --------------
2593 # Search for GNU M4, and export it in $M4.
2594 require_gnu_m4=func_require_gnu_m4
2595 func_require_gnu_m4 ()
2596 {
2597 $debug_cmd
2598
2599 test -n "$M4" || {
2600 # Find the first m4 binary that responds to --version.
2601 func_find_tool M4 gm4 gnum4 m4
2602 }
2603
2604 test -n "$M4" || func_fatal_error "\
2605 Please install GNU M4, or 'export M4=/path/to/gnu/m4'."
2606
2607 func_verbose "export M4='$M4'"
2608
2609 # Make sure the search result is visible to subshells
2610 export M4
2611
2612 require_gnu_m4=:
2613 }
2614
2615
2616 ## --------------- ##
2617 ## Core functions. ##
2618 ## --------------- ##
2619
2620 # This section contains the high level functions used when calling this
2621 # file as a script. 'func_extract_trace' is probably the only one that you
2622 # won't want to replace if you source this file into your own script.
2623
2624
2625 # func_extract_trace MACRO_NAMES [FILENAME]...
2626 # --------------------------------------------
2627 # set '$func_extract_trace_result' to a colon delimited list of arguments
2628 # to any of the comma separated list of MACRO_NAMES in FILENAME. If no
2629 # FILENAME is given, then '$configure_ac' is assumed.
2630 func_extract_trace ()
2631 {
2632 $debug_cmd
2633
2634 $require_configure_ac
2635 $require_gnu_m4
2636
2637 _G_m4_traces=`$ECHO "--trace=$1" |$SED 's%,% --trace=%g'`
2638 _G_re_macros=`$ECHO "($1)" |$SED 's%,%|%g'`
2639 _G_macros="$1"; shift
2640 test $# -gt 0 || {
2641 set dummy $configure_ac
2642 shift
2643 }
2644
2645 # Generate an error if the first file is missing
2646 <"$1"
2647
2648 # Sadly, we can't use 'autom4te' tracing to extract macro arguments,
2649 # because it complains about things we want to ignore at bootstrap
2650 # time - like missing m4_include files; AC_PREREQ being newer than
2651 # the installed autoconf; and returns nothing when tracing
2652 # 'AM_INIT_AUTOMAKE' when aclocal hasn't been generated yet.
2653 #
2654 # The following tries to emulate a less persnickety version of (and
2655 # due to not having to wait for Perl startup on every invocation,
2656 # it's probably faster too):
2657 #
2658 # autom4te --language=Autoconf --trace=$my_macro:\$% "$@"
2659 #
2660 # First we give a minimal set of macro declarations to M4 to prime
2661 # it for reading Autoconf macros, while still providing some of the
2662 # functionality generally used at m4-time to supply dynamic
2663 # arguments to Autocof functions, but without following
2664 # 'm4_s?include' files.
2665 _G_mini='
2666 dnl Initialisation.
2667 m4_changequote([,])
2668 m4_define([m4_copy], [m4_define([$2], m4_defn([$1]))])
2669 m4_define([m4_rename], [m4_copy([$1], [$2])m4_undefine([$1])])
2670
2671 dnl Replace macros which may abort m4 with a no-op variant.
2672 m4_pushdef([m4_assert])
2673 m4_pushdef([m4_exit])
2674 m4_pushdef([m4_fatal])
2675 m4_pushdef([m4_m4exit])
2676
2677 dnl Replace macros that might break stderr of m4.
2678 m4_pushdef([m4_errprint])
2679 m4_pushdef([m4_errprintn])
2680 m4_pushdef([m4_include])
2681 m4_pushdef([m4_warn])
2682
2683 dnl Avoid side-effects of tracing by extract-trace.
2684 m4_pushdef([m4_maketemp])
2685 m4_pushdef([m4_mkstemp])
2686
2687 dnl TODO: reasons for this
2688 m4_pushdef([m4_dnl])
2689 m4_pushdef([m4_m4wrap])
2690
2691 dnl Copy and rename macros not handled by "m4 --prefix".
2692 m4_define([dnl], [m4_builtin([dnl])])
2693 m4_copy([m4_define], [m4_defun])
2694 m4_rename([m4_ifelse], [m4_if])
2695 m4_rename([m4_patsubst], [m4_bpatsubst])
2696 m4_rename([m4_regexp], [m4_bregexp])
2697
2698 dnl "m4sugar.mini" - useful m4-time macros for dynamic arguments.
2699 dnl If we discover packages that need more m4 macros defined in
2700 dnl order to bootstrap correctly, add them here:
2701 m4_define([m4_bmatch],
2702 [m4_if([$#], 0, [], [$#], 1, [], [$#], 2, [$2],
2703 [m4_if(m4_bregexp([$1], [$2]), -1,
2704 [$0([$1], m4_shift3($@))], [$3])])])
2705 m4_define([m4_ifndef], [m4_ifdef([$1], [$3], [$2])])
2706 m4_define([m4_ifset],
2707 [m4_ifdef([$1], [m4_ifval(m4_defn([$1]), [$2], [$3])], [$3])])
2708 m4_define([m4_require], [$1])
2709 m4_define([m4_shift3], [m4_shift(m4shift(m4shift($@)))])
2710
2711 dnl "autoconf.mini" - things from autoconf macros we care about.
2712 m4_copy([m4_defun], [AC_DEFUN])
2713
2714 dnl Dummy definitions for the macros we want to trace.
2715 dnl AM_INIT_AUTOMAKE at least produces no trace without this.
2716 '
2717
2718 _G_save=$IFS
2719 IFS=,
2720 for _G_macro in $_G_macros; do
2721 IFS=$_G_save
2722 func_append _G_mini "AC_DEFUN([$_G_macro])$nl"
2723 done
2724 IFS=$_G_save
2725
2726 # We discard M4's stdout, but the M4 trace output from reading our
2727 # "autoconf.mini" followed by any other files passed to this
2728 # function is then scanned by sed to transform it into a colon
2729 # delimited argument list assigned to a shell variable.
2730 _G_transform='s|#.*$||; s|^dnl .*$||; s| dnl .*$||;'
2731
2732 # Unfortunately, alternation in regexp addresses doesn't work in at
2733 # least BSD (and hence Mac OS X) sed, so we have to append a capture
2734 # and print block for each traced macro to the sed transform script.
2735 _G_save=$IFS
2736 IFS=,
2737 for _G_macro in $_G_macros; do
2738 IFS=$_G_save
2739 func_append _G_transform '
2740 /^m4trace: -1- '"$_G_macro"'/ {
2741 s|^m4trace: -1- '"$_G_macro"'[([]*||
2742 s|], [[]|:|g
2743 s|[])]*$|:|
2744 s|\(.\):$|\1|
2745 p
2746 }'
2747 done
2748 IFS=$_G_save
2749
2750 # Save the command pipeline results for further use by callers of
2751 # this function.
2752 func_extract_trace_result=`$ECHO "$_G_mini" \
2753 |$M4 -daq --prefix $_G_m4_traces - "$@" 2>&1 1>/dev/null \
2754 |$SED -n -e "$_G_transform"`
2755 }
2756
2757
2758 # func_extract_trace_first MACRO_NAMES [FILENAME]...
2759 # --------------------------------------------------
2760 # Exactly like func_extract_trace, except that only the first argument
2761 # to the first invocation of one of the comma separated MACRO_NAMES is
2762 # returned in '$func_extract_trace_first_result'.
2763 func_extract_trace_first ()
2764 {
2765 $debug_cmd
2766
2767 func_extract_trace ${1+"$@"}
2768 func_extract_trace_first_result=`$ECHO "$func_extract_trace_result" \
2769 |$SED -e 's|:.*$||g' -e 1q`
2770 }
2771
2772
2773 # func_main [ARG]...
2774 # ------------------
2775 func_main ()
2776 {
2777 $debug_cmd
2778
2779 # Configuration.
2780 usage='$progname MACRO_NAME FILE [...]'
2781
2782 long_help_message='
2783 The first argument to this program is the name of an autotools macro
2784 whose arguments you want to extract by examining the files listed in the
2785 remaining arguments using the same tool that Autoconf and Automake use,
2786 GNU M4.
2787
2788 The arguments are returned separated by colons, with each traced call
2789 on a separate line.'
2790
2791 # Option processing.
2792 func_options "$@"
2793 eval set dummy "$func_options_result"; shift
2794
2795 # Validate remaining non-option arguments.
2796 test $# -gt 1 \
2797 || func_fatal_help "not enough arguments"
2798
2799 # Pass non-option arguments to extraction function.
2800 func_extract_trace "$@"
2801
2802 # Display results.
2803 test -n "$func_extract_trace_result" \
2804 && $ECHO "$func_extract_trace_result"
2805
2806 # The End.
2807 exit $EXIT_SUCCESS
2808 }
2809
2810
2811 ## --------------------------- ##
2812 ## Actually perform the trace. ##
2813 ## --------------------------- ##
2814
2815 # Only call 'func_main' if this script was called directly.
2816 test extract-trace = "$progname" && func_main "$@"
2817
2818 # Local variables:
2819 # mode: shell-script
2820 # sh-indentation: 2
2821 # eval: (add-hook 'before-save-hook 'time-stamp)
2822 # time-stamp-pattern: "50/scriptversion=%:y-%02m-%02d.%02H; # UTC"
2823 # time-stamp-time-zone: "UTC"
2824 # End:
2825
2826 # Set a version string for *this* script.
2827 scriptversion=2019-03-22.11; # UTC
2828
2829
2830 ## ------------------- ##
2831 ## Hookable functions. ##
2832 ## ------------------- ##
2833
2834 # After 'bootstrap.conf' has been sourced, execution proceeds by calling
2835 # 'func_bootstrap'. Wherever a function is decorated with
2836 # 'func_hookable func_name', you will find a matching 'func_run_hooks
2837 # func_name', which executes all functions added with 'func_add_hook
2838 # func_name my_func'.
2839 #
2840 # You might notice that many of these functions begin with a series of
2841 # '$require_foo' lines. See the docu-comments at the start of the
2842 # 'Resource management' section for a description of what these are.
2843
2844
2845 # func_bootstrap [ARG]...
2846 # -----------------------
2847 # All the functions called inside func_bootstrap are hookable. See the
2848 # the individual implementations for details.
2849 func_bootstrap ()
2850 {
2851 $debug_cmd
2852
2853 # Save the current positional parameters to prevent them being
2854 # corrupted by calls to 'set' in 'func_init'.
2855 func_quote eval ${1+"$@"}
2856 _G_saved_positional_parameters=$func_quote_result
2857
2858 # Initialisation.
2859 func_init
2860
2861 # Option processing.
2862 eval func_options "$_G_saved_positional_parameters"
2863
2864 # Post-option preparation.
2865 func_prep
2866
2867 # Reconfigure the package.
2868 func_reconfigure
2869
2870 # Ensure .version is up-to-date.
2871 func_update_dotversion
2872
2873 # Finalisation.
2874 func_fini
2875 }
2876
2877
2878 # func_init
2879 # ---------
2880 # Any early initialisations can be hooked to this function. Consider
2881 # whether you can hook onto 'func_prep' instead, because if you hook
2882 # any slow to execute code in here, it will also add to the time before
2883 # './bootstrap --version' can respond.
2884 func_hookable func_init
2885 func_init ()
2886 {
2887 $debug_cmd
2888
2889 func_run_hooks func_init
2890 }
2891
2892
2893 # func_prep
2894 # ---------
2895 # Function to perform preparation for remaining bootstrap process. If
2896 # your hooked code relies on the outcome of 'func_options' hook it here
2897 # rather than to 'func_init'.
2898 #
2899 # All the functions called inside func_prep are hookable. See the
2900 # individual implementations for details.
2901 func_hookable func_prep
2902 func_prep ()
2903 {
2904 $debug_cmd
2905
2906 $require_buildtools_uptodate
2907 $require_checkout_only_file
2908
2909 $require_gnulib_merge_changelog
2910
2911 # Report the results of SED and GREP searches from funclib.sh.
2912 func_verbose "GREP='$GREP'"
2913 func_verbose "SED='$SED'"
2914
2915 # fetch update files from the translation project
2916 func_update_translations
2917
2918 func_run_hooks func_prep
2919 }
2920
2921
2922 # func_update_translations
2923 # ------------------------
2924 # Update package po files and translations.
2925 func_hookable func_update_translations
2926 func_update_translations ()
2927 {
2928 $debug_cmd
2929
2930 $opt_skip_po || {
2931 test -d po && {
2932 $require_package
2933
2934 func_update_po_files po $package || exit $?
2935 }
2936
2937 func_run_hooks func_update_translations
2938 }
2939 }
2940
2941
2942 # func_reconfigure
2943 # ----------------
2944 # Reconfigure the current package by running the appropriate autotools in a
2945 # suitable order.
2946 func_hookable func_reconfigure
2947 func_reconfigure ()
2948 {
2949 $debug_cmd
2950
2951 $require_automake_options
2952
2953 # Automake (without 'foreign' option) requires that NEWS & README exist.
2954 case " $automake_options " in
2955 " foreign ") ;;
2956 *)
2957 func_ensure_NEWS
2958 func_ensure_README
2959 ;;
2960 esac
2961
2962 # Ensure ChangeLog presence.
2963 if test -n "$gnulib_modules"; then
2964 func_ifcontains "$gnulib_modules" gitlog-to-changelog \
2965 func_ensure_changelog
2966 else
2967 $require_gnulib_cache
2968 if $SED -n '/^gl_MODULES(\[/,/^])$/p' $gnulib_cache 2>/dev/null |
2969 func_grep_q gitlog-to-changelog
2970 then
2971 func_ensure_changelog
2972 fi
2973 fi
2974
2975 # Released 'autopoint' has the tendency to install macros that have
2976 # been obsoleted in current 'gnulib', so run this before 'gnulib-tool'.
2977 func_autopoint
2978
2979 # Autoreconf runs 'aclocal' before 'libtoolize', which causes spurious
2980 # warnings if the initial 'aclocal' is confused by the libtoolized
2981 # (or worse: out-of-date) macro directory.
2982 func_libtoolize
2983
2984 # If you need to do anything after 'gnulib-tool' is done, but before
2985 # 'autoreconf' runs, you don't need to override this whole function,
2986 # because 'func_gnulib_tool' is hookable.
2987 func_gnulib_tool
2988
2989 func_autoreconf
2990
2991 func_run_hooks func_reconfigure
2992 }
2993
2994
2995 # func_gnulib_tool
2996 # ----------------
2997 # Run 'gnulib-tool' to fetch gnulib modules into the current package.
2998 #
2999 # It's assumed that since you are using gnulib's 'bootstrap' script,
3000 # you're also using gnulib elsewhere in your package. If not, then
3001 # you can replace this function in 'bootstrap.conf' with:
3002 #
3003 # func_gnulib_tool () { :; }
3004 #
3005 # (although the function returns immediately if $gnulib_tool is set to
3006 # true in any case).
3007 func_hookable func_gnulib_tool
3008 func_gnulib_tool ()
3009 {
3010 $debug_cmd
3011
3012 $require_gnulib_tool
3013 $require_libtoolize
3014
3015 test true = "$gnulib_tool" || {
3016 $require_gnulib_git_submodules
3017
3018 # bootstrap.conf written for gnulib bootstrap expects
3019 # gnulib_tool_option_extras to which --no-changelog is appended,
3020 # but libtool bootstrap expects you to append to gnulib_tool_options
3021 # so that you can override the --no-changelog default: make sure we
3022 # support both styles so users can migrate between them easily.
3023 gnulib_tool_all_options="$gnulib_tool_options $gnulib_tool_option_extras"
3024
3025 if test -n "$gnulib_modules"; then
3026 $require_gnulib_cache
3027 $require_gnulib_tool_base_options
3028
3029 gnulib_mode=--import
3030
3031 # Try not to pick up any stale values from 'gnulib-cache.m4'.
3032 rm -f "$gnulib_cache"
3033
3034 test -n "$gnulib_tool_base_options" \
3035 && func_append_uniq gnulib_tool_all_options " $gnulib_tool_base_options"
3036 test -n "$gnulib_mk" \
3037 && func_append_uniq gnulib_tool_all_options " --makefile-name=$gnulib_mk"
3038 test -n "$tests_base" && {
3039 func_append_uniq gnulib_tool_all_options " --tests-base=$tests_base"
3040 func_append_uniq gnulib_tool_all_options " --with-tests"
3041 }
3042 else
3043
3044 # 'gnulib_modules' and others are cached in 'gnulib-cache.m4':
3045 # Use 'gnulib --update' to fetch gnulib modules.
3046 gnulib_mode=--update
3047 fi
3048
3049 # Add a sensible default libtool option to gnulib_tool_options.
3050 # The embedded echo is to squash whitespace before globbing.
3051 case `echo " "$gnulib_tool_all_options" "` in
3052 *" --no-libtool "*|*" --libtool "*) ;;
3053 *) if test true = "$LIBTOOLIZE"; then
3054 func_append_uniq gnulib_tool_all_options " --no-libtool"
3055 else
3056 func_append_uniq gnulib_tool_all_options " --libtool"
3057 fi
3058 ;;
3059 esac
3060
3061 $opt_copy || func_append_uniq gnulib_tool_all_options " --symlink"
3062
3063 func_append_uniq gnulib_tool_all_options " $gnulib_mode"
3064 func_append gnulib_tool_all_options " $gnulib_modules"
3065
3066 # The embedded echo is to squash whitespace before display.
3067 gnulib_cmd=`echo $gnulib_tool $gnulib_tool_all_options`
3068
3069 func_show_eval "$gnulib_cmd" 'exit $?'
3070
3071 # Use 'gnulib-tool --copy-file' to install non-module files.
3072 func_install_gnulib_non_module_files
3073 }
3074
3075 func_run_hooks func_gnulib_tool
3076 }
3077
3078
3079 # func_fini
3080 # ---------
3081 # Function to perform all finalisation for the bootstrap process.
3082 func_hookable func_fini
3083 func_fini ()
3084 {
3085 $debug_cmd
3086
3087 func_gettext_configuration
3088 func_clean_dangling_symlinks
3089 func_clean_unused_macros
3090 func_skip_po_recommendation
3091
3092 func_run_hooks func_fini
3093
3094 $require_bootstrap_uptodate
3095
3096 func_echo "Done. Now you can run './configure'."
3097 }
3098
3099
3100 # func_gettext_configuration
3101 # --------------------------
3102 # Edit configuration values into po/Makevars.
3103 func_hookable func_gettext_configuration
3104 func_gettext_configuration ()
3105 {
3106 $debug_cmd
3107
3108 $require_autopoint
3109
3110 test true = "$AUTOPOINT" || {
3111 $require_copyright_holder
3112 $require_extra_locale_categories
3113 $require_package_bugreport
3114
3115 # Escape xgettext options for sed Makevars generation below.
3116 # We have to delete blank lines in a separate script so that we don't
3117 # append \\\ to the penultimate line, and then delete the last empty
3118 # line, which messes up the variable substitution later in this
3119 # function. Note that adding a literal \\\ requires double escaping
3120 # here, once for the execution subshell, and again for the assignment,
3121 # which is why there are actually 12 (!!) backslashes in the script.
3122 _G_xgettext_options=`echo "$xgettext_options$nl" |$SED '/^$/d' |$SED '
3123 $b
3124 s|$| \\\\\\\\\\\\|'`
3125
3126 # Create gettext configuration.
3127 func_echo "Creating po/Makevars from po/Makevars.template ..."
3128 $RM -f po/Makevars
3129 $SED '
3130 /^EXTRA_LOCALE_CATEGORIES *=/s|=.*|= '"$extra_locale_categories"'|
3131 /^COPYRIGHT_HOLDER *=/s|=.*|= '"$copyright_holder"'|
3132 /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$package_bugreport"'|
3133 /^XGETTEXT_OPTIONS *=/{
3134 s|$| \\|
3135 a\
3136 '"$_G_xgettext_options"' \\\
3137 $${end_of_xgettext_options+}
3138 }
3139 s/ *$//
3140 ' po/Makevars.template >po/Makevars || exit 1
3141 }
3142
3143 func_run_hooks func_gettext_configuration
3144 }
3145
3146
3147
3148 ## --------------- ##
3149 ## Core functions. ##
3150 ## --------------- ##
3151
3152 # This section contains the main functions called from the 'Hookable
3153 # functions' (shown above), and are the ones you're most likely
3154 # to want to replace with your own implementations in 'bootstrap.conf'.
3155
3156
3157 # func_autopoint
3158 # --------------
3159 # If this package uses gettext, then run 'autopoint'.
3160 func_autopoint ()
3161 {
3162 $debug_cmd
3163
3164 $require_autopoint
3165
3166 test true = "$AUTOPOINT" \
3167 || func_show_eval "$AUTOPOINT --force" 'exit $?'
3168 }
3169
3170
3171 # func_libtoolize
3172 # ---------------
3173 # If this package uses libtool, then run 'libtoolize'.
3174 func_libtoolize ()
3175 {
3176 $debug_cmd
3177
3178 $require_libtoolize
3179
3180 test true = "$LIBTOOLIZE" || {
3181 _G_libtoolize_options=
3182 $opt_copy && func_append _G_libtoolize_options " --copy"
3183 $opt_force && func_append _G_libtoolize_options " --force"
3184 $opt_verbose || func_append _G_libtoolize_options " --quiet"
3185 func_show_eval "$LIBTOOLIZE$_G_libtoolize_options" 'exit $?'
3186 }
3187 }
3188
3189
3190 # func_gnulib_tool_copy_file SRC DEST
3191 # -----------------------------------
3192 # Copy SRC, a path relative to the gnulib sub-tree, to DEST, a path
3193 # relative to the top-level source directory using gnulib-tool so that
3194 # any patches or replacements in $local_gl_path are applied.
3195 func_gnulib_tool_copy_file ()
3196 {
3197 $debug_cmd
3198
3199 $require_gnulib_tool
3200 $require_patch
3201
3202 if test true = "$gnulib_tool"; then
3203 # If gnulib-tool is not available (e.g. bootstrapping in a
3204 # distribution tarball), make sure that at least we have some
3205 # version of the required file already in place.
3206 test -f "$2" || func_fatal_error "\
3207 Can't find, copy or download '$2', a required
3208 gnulib supplied file, please provide the location of a
3209 complete 'gnulib' tree by setting 'gnulib_path' in your
3210 'bootstrap.conf' or with the '--gnulib-srcdir' option -
3211 or else specify the location of your 'git' binary by
3212 setting 'GIT' in the environment so that a fresh
3213 'gnulib' submodule can be cloned."
3214 else
3215 $require_gnulib_copy_cmd
3216
3217 $gnulib_copy_cmd $1 $2 2>/dev/null || {
3218 $require_gnulib_path
3219
3220 func_error "'$gnulib_path/$1' does not exist"
3221 return 1
3222 }
3223 fi
3224 }
3225
3226
3227 # func_install_gnulib_non_module_files
3228 # ------------------------------------
3229 # Get additional non-module files from gnulib, overriding existing files.
3230 func_install_gnulib_non_module_files ()
3231 {
3232 $debug_cmd
3233
3234 $require_build_aux
3235 $require_gnulib_tool
3236
3237 test -n "$gnulib_non_module_files" && {
3238 maybe_exit_cmd=:
3239
3240 for file in $gnulib_non_module_files; do
3241 case $file in
3242 */COPYING*) dest=COPYING;;
3243 */INSTALL) dest=INSTALL;;
3244 build-aux/missing) dest=
3245 func_warning settings "\
3246 Please remove build-aux/missing from gnulib_module_files in
3247 'bootstrap.conf', as it may clash with Automake's version."
3248 ;;
3249 build-aux/*) dest=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;;
3250 *) dest=$file;;
3251 esac
3252
3253 # Be sure to show all copying errors before bailing out
3254 test -z "$dest" \
3255 || func_gnulib_tool_copy_file "$file" "$dest" \
3256 || maybe_exit_cmd="exit $EXIT_FAILURE"
3257 done
3258
3259 $maybe_exit_cmd
3260 }
3261 }
3262
3263
3264 # func_ensure_changelog
3265 # ---------------------
3266 # Even with 'gitlog-to-changelog' generated ChangeLogs, automake
3267 # will not run to completion with no ChangeLog file.
3268 func_ensure_changelog ()
3269 {
3270 $debug_cmd
3271
3272 test -f ChangeLog && mv -f ChangeLog ChangeLog~
3273
3274 cat >ChangeLog <<'EOT'
3275 ## ---------------------- ##
3276 ## DO NOT EDIT THIS FILE! ##
3277 ## ---------------------- ##
3278
3279 ChangeLog is generated by gitlog-to-changelog.
3280 EOT
3281
3282 _G_message="creating dummy 'ChangeLog'"
3283 test -f ChangeLog~ \
3284 && func_append _G_message ' (backup in ChangeLog~)'
3285 func_verbose "$_G_message"
3286
3287 return 0
3288 }
3289
3290
3291 # func_ensure_NEWS
3292 # ----------------
3293 # Without AM_INIT_AUTOMAKE([foreign]), automake will not run to
3294 # completion with no NEWS file, even though NEWS.md or NEWS.txt
3295 # is often preferable.
3296 func_ensure_NEWS ()
3297 {
3298 $debug_cmd
3299
3300 test -f NEWS || {
3301 _G_NEWS=
3302 for _G_news in NEWS.txt NEWS.md NEWS.rst; do
3303 test -f "$_G_news" && break
3304 done
3305
3306 test -f "$_G_news" && $LN_S $_G_news NEWS
3307 func_verbose "$LN_S $_G_news NEWS"
3308 }
3309
3310 return 0
3311 }
3312
3313
3314 # func_ensure_README
3315 # ------------------
3316 # Without AM_INIT_AUTOMAKE([foreign]), automake will not run to
3317 # completion with no README file, even though README.md or README.txt
3318 # is often preferable.
3319 func_ensure_README ()
3320 {
3321 $debug_cmd
3322
3323 test -f README || {
3324 _G_README=
3325 for _G_readme in README.txt README.md README.rst; do
3326 test -f "$_G_readme" && break
3327 done
3328
3329 test -f "$_G_readme" && $LN_S $_G_readme README
3330 func_verbose "$LN_S $_G_readme README"
3331 }
3332
3333 return 0
3334 }
3335
3336
3337 # func_autoreconf [SUBDIR]
3338 # ------------------------
3339 # Being careful not to re-run 'autopoint' or 'libtoolize', and not to
3340 # try to run 'autopoint', 'libtoolize' or 'autoheader' on packages that
3341 # don't use them, defer to 'autoreconf' for execution of the remaining
3342 # autotools to bootstrap this package.
3343 #
3344 # Projects with multiple trees to reconfigure can hook another call to
3345 # this function onto func_reconfigure:
3346 #
3347 # my_autoreconf_foo ()
3348 # {
3349 # func_autoreconf foo
3350 # }
3351 # func_add_hook func_reconfigure my_autoreconf_foo
3352 func_autoreconf ()
3353 {
3354 $debug_cmd
3355
3356 $require_autoheader
3357 $require_build_aux # automake and others put files in here
3358 $require_macro_dir # aclocal and others put files in here
3359
3360 # We ran these manually already, and autoreconf won't exec ':'
3361 save_AUTOPOINT=$AUTOPOINT; AUTOPOINT=true
3362 save_LIBTOOLIZE=$LIBTOOLIZE; LIBTOOLIZE=true
3363
3364 _G_autoreconf_options=
3365 $opt_copy || func_append _G_autoreconf_options " --symlink"
3366 $opt_force && func_append _G_autoreconf_options " --force"
3367 $opt_verbose && func_append _G_autoreconf_options " --verbose"
3368 func_show_eval "$AUTORECONF$_G_autoreconf_options --install${1+ $1}" 'exit $?'
3369
3370 AUTOPOINT=$save_AUTOPOINT
3371 LIBTOOLIZE=$save_LIBTOOLIZE
3372 }
3373
3374
3375 # func_check_configuration VARNAME [CONFIGURE_MACRO]
3376 # --------------------------------------------------
3377 # Exit with a suitable diagnostic for an important configuration change
3378 # that needs to be made before bootstrap can run correctly.
3379 func_check_configuration ()
3380 {
3381 $debug_cmd
3382
3383 $require_configure_ac
3384
3385 eval 'test -n "$'$1'"' || {
3386 _G_error_msg="please set '$1' in 'bootstrap.conf'"
3387 if test -n "$configure_ac" && test -n "$2"; then
3388 func_append _G_error_msg "
3389 or add the following (or similar) to your '$configure_ac':
3390 $2"
3391 fi
3392
3393 func_fatal_error "$_G_error_msg"
3394 }
3395 }
3396
3397
3398 # func_clean_dangling_symlinks
3399 # ----------------------------
3400 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
3401 # gnulib-populated directories. Such .m4 files would cause aclocal to
3402 # fail. The following requires GNU find 4.2.3 or newer. Considering
3403 # the usual portability constraints of this script, that may seem a very
3404 # demanding requirement, but it should be ok. Ignore any failure,
3405 # which is fine, since this is only a convenience to help developers
3406 # avoid the relatively unusual case where a symlinked-to .m4 file is
3407 # git-removed from gnulib between successive runs of this script.
3408 func_clean_dangling_symlinks ()
3409 {
3410 $debug_cmd
3411
3412 $require_macro_dir
3413 $require_source_base
3414
3415 func_verbose "cleaning dangling symlinks"
3416
3417 find "$macro_dir" "$source_base" \
3418 -depth \( -name '*.m4' -o -name '*.[ch]' \) \
3419 -type l -xtype l -delete > /dev/null 2>&1
3420 }
3421
3422
3423 # func_clean_unused_macros
3424 # ------------------------
3425 # Autopoint can result in over-zealously adding macros into $macro_dir
3426 # even though they are not actually used, for example tests to help
3427 # build the 'intl' directory even though you have specified
3428 # 'AM_GNU_GETTEXT([external])' in your configure.ac. This function
3429 # looks removes any macro files that can be found in gnulib, but
3430 # are not 'm4_include'd by 'aclocal.m4'.
3431 func_clean_unused_macros ()
3432 {
3433 $debug_cmd
3434
3435 $require_gnulib_path
3436 $require_macro_dir
3437
3438 test -n "$gnulib_path" && test -f aclocal.m4 && {
3439 aclocal_m4s=`find . -name aclocal.m4 -print`
3440
3441 # We use 'ls|grep' instead of 'ls *.m4' to avoid exceeding
3442 # command line length limits in some shells.
3443 for file in `cd "$macro_dir" && ls -1 |$GREP '\.m4$'`; do
3444
3445 # Remove a macro file when aclocal.m4 does not m4_include it...
3446 func_grep_q 'm4_include([[]'$macro_dir/$file'])' $aclocal_m4s \
3447 || test ! -f "$gnulib_path/m4/$file" || {
3448
3449 # ...and there is an identical file in gnulib...
3450 if func_cmp_s "$gnulib_path/m4/$file" "$macro_dir/$file"; then
3451
3452 # ...and it's not in the precious list ('echo' is needed
3453 # here to squash whitespace for the match expression).
3454 case " "`echo $gnulib_precious`" " in
3455 *" $file "*) ;;
3456 *) rm -f "$macro_dir/$file"
3457 func_verbose \
3458 "removing unused gnulib file '$macro_dir/$file'"
3459 esac
3460 fi
3461 }
3462 done
3463 }
3464 }
3465
3466
3467 # func_skip_po_recommendation
3468 # ---------------------------
3469 # If there is a po directory, and '--skip-po' wasn't passed, let the
3470 # user know that they can use '--skip-po' on subsequent invocations.
3471 func_skip_po_recommendation ()
3472 {
3473 $debug_cmd
3474
3475 test ! -d po \
3476 || $opt_skip_po \
3477 || func_warning recommend "\
3478 If your pofiles are up-to-date, you can rerun bootstrap
3479 as '$progname --skip-po' to avoid redownloading."
3480 }
3481
3482
3483 # func_update_dotversion
3484 # ----------------------
3485 # Even with 'gitlog-to-changelog' generated ChangeLogs, automake
3486 # will not run to completion with no ChangeLog file.
3487 func_update_dotversion ()
3488 {
3489 $debug_cmd
3490
3491 test -f "$build_aux/git-version-gen" && {
3492 _G_message="updating .version"
3493 test -f .version && {
3494 mv .version .version~
3495 func_append _G_message " (backup in .version~)"
3496 }
3497 func_verbose "updating .version"
3498
3499 $build_aux/git-version-gen dummy-arg > .version
3500 }
3501 }
3502
3503
3504
3505 ## -------------------- ##
3506 ## Resource management. ##
3507 ## -------------------- ##
3508
3509 # This section contains definitions for functions that each ensure a
3510 # particular resource (a file, or a non-empty configuration variable for
3511 # example) is available, and if appropriate to extract default values
3512 # from pertinent package files. Where a variable already has a non-
3513 # empty value (as set by the package's 'bootstrap.conf'), that value is
3514 # used in preference to deriving the default. Call them using their
3515 # associated 'require_*' variable to ensure that they are executed, at
3516 # most, once.
3517
3518
3519 # require_gnulib_git_submodules
3520 # -----------------------------
3521 # Initialize all git modules from $gnulib_git_submodules before we
3522 # run 'gnulib-tool'.
3523 require_gnulib_git_submodules=func_require_gnulib_git_submodules
3524 func_require_gnulib_git_submodules ()
3525 {
3526 test -n "$gnulib_git_submodules" && {
3527 for _G_submodule in $gnulib_git_submodules
3528 do
3529 func_show_eval "git submodule init -- $_G_submodule" \
3530 && func_show_eval "git submodule update -- $_G_submodule" \
3531 || func_fatal_error "Unable to init git module '$_G_submodule'."
3532 done
3533 }
3534
3535 require_gnulib_git_submodules=:
3536 }
3537
3538
3539 # require_checkout_only_file
3540 # --------------------------
3541 # Bail out if this package only bootstraps properly from a repository
3542 # checkout.
3543 require_checkout_only_file=func_require_checkout_only_file
3544 func_require_checkout_only_file ()
3545 {
3546 $debug_cmd
3547
3548 $opt_force || {
3549 test -n "$checkout_only_file" && test ! -f "$checkout_only_file" \
3550 && func_fatal_error "\
3551 Bootstrapping from a non-checked-out distribution is risky.
3552 If you wish to bootstrap anyway, use the '--force' option."
3553 }
3554
3555 require_checkout_only_file=:
3556 }
3557
3558
3559 # require_aclocal_amflags
3560 # -----------------------
3561 # Ensure '$aclocal_amflags' has a sensible default, extracted from
3562 # 'Makefile.am' if necessary.
3563 require_aclocal_amflags=func_require_aclocal_amflags
3564 func_require_aclocal_amflags ()
3565 {
3566 $debug_cmd
3567
3568 $require_makefile_am
3569
3570 _G_sed_extract_aclocal_amflags='s|#.*$||
3571 /^[ ]*ACLOCAL_AMFLAGS[ ]*=/ {
3572 s|^.*=[ ]*\(.*\)|aclocal_amflags="\1"|
3573 p
3574 }'
3575
3576 _G_aclocal_flags_cmd=`$SED -n "$_G_sed_extract_aclocal_amflags" \
3577 "$makefile_am"`
3578 eval "$_G_aclocal_flags_cmd"
3579
3580 func_verbose "ACLOCAL_AMFLAGS='$aclocal_amflags'"
3581
3582 require_aclocal_amflags=:
3583 }
3584
3585
3586 # require_autoheader
3587 # ------------------
3588 # Skip autoheader if it's not needed.
3589 require_autoheader=func_require_autoheader
3590 func_require_autoheader ()
3591 {
3592 $debug_cmd
3593
3594 test true = "$AUTOHEADER" || {
3595 func_extract_trace AC_CONFIG_HEADERS
3596 test -n "$func_extract_trace_result" \
3597 || func_extract_trace AC_CONFIG_HEADER
3598
3599 test -n "$func_extract_trace_result" || {
3600 AUTOHEADER=true
3601
3602 func_verbose "export AUTOHEADER='$AUTOHEADER'"
3603
3604 # Make sure the search result is visible to subshells
3605 export AUTOHEADER
3606 }
3607 }
3608
3609 require_autoheader=:
3610 }
3611
3612
3613 # require_automake_options
3614 # ------------------------
3615 # Extract options from AM_AUTOMAKE_INIT.
3616 require_automake_options=func_require_automake_options
3617 func_require_automake_options ()
3618 {
3619 $debug_cmd
3620
3621 func_extract_trace AM_INIT_AUTOMAKE
3622 automake_options=$func_extract_trace_result
3623
3624 require_automake_options=:
3625 }
3626
3627
3628 # require_autopoint
3629 # -----------------
3630 # Skip autopoint if it's not needed.
3631 require_autopoint=func_require_autopoint
3632 func_require_autopoint ()
3633 {
3634 $debug_cmd
3635
3636 test true = "$AUTOPOINT" || {
3637 func_extract_trace AM_GNU_GETTEXT_VERSION
3638
3639 test -n "$func_extract_trace_result" || {
3640 AUTOPOINT=true
3641
3642 func_verbose "export AUTOPOINT='$AUTOPOINT'"
3643
3644 # Make sure the search result is visible to subshells
3645 export AUTOPOINT
3646 }
3647 }
3648
3649 require_autopoint=:
3650 }
3651
3652
3653 # require_bootstrap_uptodate
3654 # --------------------------
3655 # Complain if the version of bootstrap in the gnulib directory differs
3656 # from the one we are running.
3657 require_bootstrap_uptodate=func_require_bootstrap_uptodate
3658 func_require_bootstrap_uptodate ()
3659 {
3660 $debug_cmd
3661
3662 $require_build_aux
3663
3664 _G_bootstrap_sources="
3665 $build_aux/bootstrap.in
3666 $build_aux/extract-trace
3667 $build_aux/funclib.sh
3668 $build_aux/options-parser
3669 "
3670
3671 _G_missing_bootstrap_sources=false
3672 for _G_src in $_G_bootstrap_sources; do
3673 test -f "$_G_src" || _G_missing_bootstrap_sources=:
3674 done
3675
3676 if $_G_missing_bootstrap_sources; then
3677 func_warning upgrade "\
3678 Please add bootstrap to your gnulib_modules list in
3679 'bootstrap.conf', so that I can tell you when there are
3680 updates available."
3681 else
3682 rm -f bootstrap.new
3683 $build_aux/inline-source $build_aux/bootstrap.in > bootstrap.new
3684
3685 if func_cmp_s "$progpath" bootstrap.new; then
3686 rm -f bootstrap.new
3687 func_verbose "bootstrap script up to date"
3688 else
3689 chmod 555 bootstrap.new
3690 func_warning upgrade "\
3691 An updated bootstrap script has been generated for you in
3692 'bootstrap.new'. After you've verified that you want
3693 the changes, you can update with:
3694 mv -f bootstrap.new $progname
3695 ./$progname
3696
3697 Or you can disable this check permanently by adding the
3698 following to 'bootstrap.conf':
3699 require_bootstrap_uptodate=:"
3700 fi
3701 fi
3702
3703 require_bootstrap_uptodate=:
3704 }
3705
3706
3707 # require_build_aux
3708 # -----------------
3709 # Ensure that '$build_aux' is set, and if it doesn't already point to an
3710 # existing directory, create one.
3711 require_build_aux=func_require_build_aux
3712 func_require_build_aux ()
3713 {
3714 $debug_cmd
3715
3716 test -n "$build_aux" || {
3717 func_extract_trace_first AC_CONFIG_AUX_DIR
3718 build_aux=$func_extract_trace_first_result
3719 func_check_configuration build_aux \
3720 "AC_CONFIG_AUX_DIR([name of a directory for build scripts])"
3721
3722 func_verbose "build_aux='$build_aux'"
3723 }
3724
3725 $require_vc_ignore_files
3726
3727 # If the build_aux directory doesn't exist, create it now, and mark it
3728 # as ignored for the VCS.
3729 if test ! -d "$build_aux"; then
3730 func_show_eval "mkdir '$build_aux'"
3731
3732 test -n "$vc_ignore_files" \
3733 || func_insert_if_absent "$build_aux" $vc_ignore_files
3734 fi
3735
3736 require_build_aux=:
3737 }
3738
3739
3740 # require_buildreq_autobuild
3741 # --------------------------
3742 # Try to find whether the bootstrap requires autobuild.
3743 require_buildreq_autobuild=func_require_buildreq_autobuild
3744 func_require_buildreq_autobuild ()
3745 {
3746 $debug_cmd
3747
3748 $require_macro_dir
3749
3750 test -f "$macro_dir/autobuild.m4" \
3751 || printf '%s\n' "$buildreq" |func_grep_q '^[ ]*autobuild' \
3752 || {
3753 func_extract_trace AB_INIT
3754 test -n "$func_extract_trace_result" && {
3755 func_append buildreq 'autobuild - http://josefsson.org/autobuild/
3756 '
3757 func_verbose "auto-adding 'autobuild' to build requirements"
3758 }
3759 }
3760
3761 require_buildreq_autobuild=:
3762 }
3763
3764
3765 # require_buildreq_autoconf
3766 # require_buildreq_autopoint
3767 # require_buildreq_libtoolize
3768 # ---------------------------
3769 # Try to find the minimum compatible version of autoconf/libtool
3770 # required to bootstrap successfully, and add it to '$buildreq'.
3771 for tool in autoconf libtoolize autopoint; do
3772 b=$tool
3773 v=require_buildreq_${tool}
3774 f=func_$v
3775 case $tool in
3776 autoconf) m=AC_PREREQ ;;
3777 libtoolize) m=LT_PREREQ; b=libtool ;;
3778 autopoint) m=AM_GNU_GETTEXT_VERSION b=gettext ;;
3779 esac
3780
3781 eval $v'='$f'
3782 '$f' ()
3783 {
3784 $debug_cmd
3785
3786 # The following is ignored if undefined, but might be necessary
3787 # in order for `func_find_tool` to run.
3788 ${require_'$tool'-:}
3789
3790 printf '\''%s\n'\'' "$buildreq" |func_grep_q '\''^[ ]*'$tool\'' || {
3791 func_extract_trace '$m'
3792 _G_version=$func_extract_trace_result
3793 test -n "$_G_version" && {
3794 func_append buildreq "\
3795 '$tool' $_G_version http://www.gnu.org/s/'$b'
3796 "
3797 func_verbose \
3798 "auto-adding '\'$tool'-$_G_version'\'' to build requirements"
3799 }
3800 }
3801
3802 '$v'=:
3803 }
3804 '
3805 done
3806
3807
3808 # require_buildreq_automake
3809 # -------------------------
3810 # Try to find the minimum compatible version of automake required to
3811 # bootstrap successfully, and add it to '$buildreq'.
3812 require_buildreq_automake=func_require_buildreq_automake
3813 func_require_buildreq_automake ()
3814 {
3815 $debug_cmd
3816
3817 # if automake is not already listed in $buildreq...
3818 printf '%s\n' "$buildreq" |func_grep_q automake || {
3819 func_extract_trace AM_INIT_AUTOMAKE
3820
3821 # ...and AM_INIT_AUTOMAKE is declared...
3822 test -n "$func_extract_trace_result" && {
3823 automake_version=`$ECHO "$func_extract_trace_result" \
3824 |$SED -e 's|[^0-9]*||' -e 's| .*$||'`
3825 test -n "$automake_version" || automake_version=-
3826
3827 func_append buildreq "\
3828 automake $automake_version http://www.gnu.org/s/automake
3829 "
3830 func_verbose \
3831 "auto-adding 'automake-$automake_version' to build requirements"
3832 }
3833 }
3834
3835 require_buildreq_automake=:
3836 }
3837
3838
3839 # require_buildreq_patch
3840 # ----------------------
3841 # Automatically add a patch build-requirement if there are diff files
3842 # in $local_gl_path.
3843 require_buildreq_patch=func_require_buildreq_patch
3844 func_require_buildreq_patch ()
3845 {
3846 $debug_cmd
3847
3848 $require_local_gl_path
3849
3850 # This ensures PATCH is set appropriately by the time
3851 # func_check_versions enforces $buildreq.
3852 $require_patch
3853
3854 # If patch is not already listed in $buildreq...
3855 printf '%s\n' "$buildreq" |func_grep_q '^[ ]*patch' || {
3856 eval "set dummy $local_gl_path_quoted" ; shift
3857
3858 for _G_dir
3859 do
3860 # The ugly find invocation is necessary to exit with non-zero
3861 # status for old find binaries that don't support -exec fully.
3862 if test ! -d "$_G_dir" \
3863 || find "$_G_dir" -name "*.diff" -exec false {} \; ; then :
3864 else
3865 func_append buildreq "patch - http://www.gnu.org/s/patch$nl"
3866 break
3867 fi
3868 done
3869 }
3870
3871 require_buildreq_patch=:
3872 }
3873
3874
3875 # require_buildtools_uptodate
3876 # ---------------------------
3877 # Ensure all the packages listed in BUILDREQS are available on the build
3878 # machine at the minimum versions or better.
3879 require_buildtools_uptodate=func_require_buildtools_uptodate
3880 func_require_buildtools_uptodate ()
3881 {
3882 $debug_cmd
3883
3884 $require_buildreq_autobuild
3885 $require_buildreq_autoconf
3886 $require_buildreq_automake
3887 $require_buildreq_libtoolize
3888 $require_buildreq_autopoint
3889 $require_buildreq_patch
3890
3891 test -n "$buildreq" && {
3892 _G_error_hdr=
3893
3894 func_check_versions $buildreq
3895 $func_check_versions_result || {
3896 test -n "$buildreq_readme" \
3897 && test -f "$buildreq_readme" \
3898 && _G_error_hdr="\
3899 $buildreq_readme explains how to obtain these prerequisite programs:
3900 "
3901 func_strtable 0 11 12 36 \
3902 "Program" "Min_version" "Homepage" $buildreq
3903 func_fatal_error "$_G_error_hdr$func_strtable_result"
3904 }
3905 }
3906
3907 require_buildtools_uptodate=:
3908 }
3909
3910
3911 # require_copyright_holder
3912 # ------------------------
3913 # Ensure there is a sensible non-empty default value in '$copyright_holder'.
3914 require_copyright_holder=func_require_copyright_holder
3915 func_require_copyright_holder ()
3916 {
3917 $debug_cmd
3918
3919 test -n "$copyright_holder" || {
3920 copyright_holder='Free Software Foundation, Inc.'
3921 func_warning settings "\
3922 Please set copyright_holder explicitly in 'bootstrap.conf';
3923 defaulting to '$copyright_holder'."
3924 }
3925
3926 require_copyright_holder=:
3927 }
3928
3929
3930 # require_doc_base
3931 # ----------------
3932 # Ensure doc_base has a sensible value, extracted from 'gnulib-cache.m4'
3933 # if possible, otherwise letting 'gnulib-tool' pick a default.
3934 require_doc_base=func_require_doc_base
3935 func_require_doc_base ()
3936 {
3937 $debug_cmd
3938
3939 $require_gnulib_cache
3940
3941 test -f "$gnulib_cache" && test -z "$doc_base" && {
3942 func_extract_trace_first "gl_DOC_BASE" "$gnulib_cache"
3943 doc_base=$func_extract_trace_first_result
3944
3945 test -n "$doc_base" && func_verbose "doc_base='$doc_base'"
3946 }
3947
3948 require_doc_base=:
3949 }
3950
3951
3952 # require_dotgitmodules
3953 # ---------------------
3954 # Ensure we have a '.gitmodules' file, with appropriate 'gnulib' settings.
3955 require_dotgitmodules=func_require_dotgitmodules
3956 func_require_dotgitmodules ()
3957 {
3958 $debug_cmd
3959
3960 $require_git
3961
3962 test true = "$GIT" || {
3963 # A gnulib entry in .gitmodules always takes precedence.
3964 _G_path=`$GIT config --file .gitmodules submodule.gnulib.path 2>/dev/null`
3965
3966 test -n "$_G_path" || {
3967 $require_vc_ignore_files
3968
3969 func_verbose "creating '.gitmodules'"
3970
3971 # If the .gitmodules file doesn't exist, create it now, and mark
3972 # it as ignored for the VCS.
3973 test -n "$gnulib_path" || gnulib_path=gnulib
3974 test -n "$gnulib_url" || gnulib_url=git://git.sv.gnu.org/gnulib
3975
3976 {
3977 echo '[submodule "gnulib"]'
3978 echo " path = $gnulib_path"
3979 echo " url = $gnulib_url"
3980 } >> .gitmodules
3981
3982 test -n "$vc_ignore_files" \
3983 || func_insert_if_absent ".gitmodules" $vc_ignore_files
3984 }
3985 }
3986
3987 require_dotgitmodules=:
3988 }
3989
3990
3991 # require_extra_locale_categories
3992 # -------------------------------
3993 # Ensure there is a default value in '$extra_locale_categories'
3994 require_extra_locale_categories=func_require_extra_locale_categories
3995 func_require_extra_locale_categories ()
3996 {
3997 $debug_cmd
3998
3999 # Defaults to empty, so run with whatever value may have been set in
4000 # 'bootstrap.conf'.
4001 require_extra_locale_categories=:
4002 }
4003
4004
4005 # require_git
4006 # -----------
4007 # Ignore git if it's not available, or we're not in a git checkout tree.
4008 require_git=func_require_git
4009 func_require_git ()
4010 {
4011 $debug_cmd
4012
4013 $opt_skip_git && GIT=true
4014
4015 test true = "$GIT" || {
4016 if test -d .git/.; then
4017 ($GIT --version) >/dev/null 2>&1 || GIT=true
4018 fi
4019 }
4020
4021 func_verbose "GIT='$GIT'"
4022
4023 require_git=:
4024 }
4025
4026
4027 # require_gnulib_cache
4028 # --------------------
4029 # Ensure there is a non-empty default for '$gnulib_cache', and that it
4030 # names an existing file.
4031 require_gnulib_cache=func_require_gnulib_cache
4032 func_require_gnulib_cache ()
4033 {
4034 $debug_cmd
4035
4036 $require_macro_dir
4037
4038 test -n "$gnulib_cache" \
4039 || gnulib_cache=$macro_dir/gnulib-cache.m4
4040
4041 func_verbose "found '$gnulib_cache'"
4042
4043 require_gnulib_cache=:
4044 }
4045
4046
4047 # require_gnulib_copy_cmd
4048 # -----------------------
4049 # Only calculate the options for copying files with gnulib once.
4050 require_gnulib_copy_cmd=func_require_gnulib_copy_cmd
4051 func_require_gnulib_copy_cmd ()
4052 {
4053 $debug_cmd
4054
4055 $require_gnulib_tool
4056 $require_gnulib_tool_base_options
4057
4058 gnulib_copy_cmd="$gnulib_tool $gnulib_tool_base_options --copy-file"
4059 $opt_copy || func_append gnulib_copy_cmd " --symlink"
4060 $opt_quiet || func_append gnulib_copy_cmd " --verbose"
4061
4062 require_gnulib_copy_cmd=:
4063 }
4064
4065
4066 # require_gnulib_merge_changelog
4067 # ------------------------------
4068 # See if we can use gnulib's git-merge-changelog merge driver.
4069 require_gnulib_merge_changelog=func_require_gnulib_merge_changelog
4070 func_require_gnulib_merge_changelog ()
4071 {
4072 $debug_cmd
4073
4074 test -f ChangeLog && {
4075 $require_git
4076
4077 func_grep_q '^\(/\|\)ChangeLog$' .gitignore || test true = "$GIT" || {
4078 if $GIT config merge.merge-changelog.driver >/dev/null; then
4079 :
4080 elif (git-merge-changelog --version) >/dev/null 2>&1; then
4081 func_echo "initializing git-merge-changelog driver"
4082 $GIT config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
4083 $GIT config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
4084 else
4085 func_warning recommend \
4086 "Consider installing git-merge-changelog from gnulib."
4087 fi
4088 }
4089 }
4090
4091 require_gnulib_merge_changelog=:
4092 }
4093
4094
4095 # require_gnulib_mk
4096 # -----------------
4097 # Ensure gnulib_mk has a sensible value, extracted from 'gnulib-cache.m4'
4098 # if possible, otherwise letting 'gnulib-tool' pick a default.
4099 require_gnulib_mk=func_require_gnulib_mk
4100 func_require_gnulib_mk ()
4101 {
4102 $debug_cmd
4103
4104 $require_gnulib_cache
4105
4106 test -f "$gnulib_cache" && test -z "$gnulib_mk" && {
4107 func_extract_trace_first "gl_MAKEFILE_NAME" "$gnulib_cache"
4108 gnulib_mk=$func_extract_trace_first_result
4109
4110 test -n "$gnulib_mk" && func_verbose "gnulib_mk='$gnulib_mk'"
4111 }
4112
4113 require_gnulib_mk=:
4114 }
4115
4116
4117 # require_gnulib_name
4118 # -------------------
4119 # Ensure gnulib_name has a sensible value, extracted from 'gnulib-cache.m4'
4120 # if possible, otherwise letting 'gnulib-tool' pick a default.
4121 require_gnulib_name=func_require_gnulib_name
4122 func_require_gnulib_name ()
4123 {
4124 $debug_cmd
4125
4126 $require_gnulib_cache
4127
4128 test -f "$gnulib_cache" && test -z "$gnulib_name" && {
4129 func_extract_trace_first "gl_LIB" "$gnulib_cache"
4130 gnulib_name=$func_extract_trace_first_result
4131
4132 test -n "$gnulib_name" && func_verbose "gnulib_name='$gnulib_name'"
4133 }
4134
4135 require_gnulib_name=:
4136 }
4137
4138
4139 # require_gnulib_path
4140 # require_gnulib_url
4141 # -------------------
4142 # Ensure 'gnulib_path' and 'gnulib_url' are set.
4143 require_gnulib_path=func_require_dotgitmodules_parameters
4144 require_gnulib_url=func_require_dotgitmodules_parameters
4145 func_require_dotgitmodules_parameters ()
4146 {
4147 $debug_cmd
4148
4149 $require_git
4150
4151 test true = "$GIT" && {
4152 # If we can't find git (or if the user specified '--skip-git'),
4153 # then use an existing gnulib directory specified with
4154 # '--gnulib-srcdir' if possible.
4155 test -n "$gnulib_path" \
4156 || test ! -x "$opt_gnulib_srcdir/gnulib-tool" \
4157 || gnulib_path=$opt_gnulib_srcdir
4158 }
4159
4160
4161 $require_dotgitmodules
4162
4163 test -f .gitmodules && {
4164 # Extract the parameters with sed, since git may be missing
4165 test -n "$gnulib_path" \
4166 || gnulib_path=`$SED -e '/^.submodule "gnulib".$/,${
4167 /[ ]*path *= */{
4168 s|[ ]*||g;s|^[^=]*=||;p
4169 }
4170 }
4171 d' .gitmodules |$SED 1q`
4172 test -n "$gnulib_url" \
4173 || gnulib_url=`$SED -e '/^.submodule "gnulib".$/,${
4174 /[ ]*url *= */{
4175 s|[ ]*||g;s|^[^=]*=||;p
4176 }
4177 }
4178 d' .gitmodules |$SED 1q`
4179
4180 func_verbose "gnulib_path='$gnulib_path'"
4181 func_verbose "gnulib_url='$gnulib_url'"
4182 }
4183
4184 require_gnulib_path=:
4185 require_gnulib_url=:
4186 }
4187
4188
4189 # require_gnulib_submodule
4190 # ------------------------
4191 # Ensure that there is a current gnulib submodule at '$gnulib_path'.
4192 require_gnulib_submodule=func_require_gnulib_submodule
4193 func_require_gnulib_submodule ()
4194 {
4195 $debug_cmd
4196
4197 $require_git
4198
4199 if test true = "$GIT"; then
4200 func_warning recommend \
4201 "No 'git' found; imported gnulib modules may be outdated."
4202 else
4203 $require_gnulib_path
4204 $require_gnulib_url
4205
4206 if test -f .gitmodules && test -f "$gnulib_path/gnulib-tool"; then
4207 : All present and correct.
4208
4209 elif test -n "$opt_gnulib_srcdir"; then
4210 # Older git can't clone into an empty directory.
4211 rmdir "$gnulib_path" 2>/dev/null
4212 func_show_eval "$GIT clone --reference '$opt_gnulib_srcdir' \
4213 '$gnulib_url' '$gnulib_path'" \
4214 || func_fatal_error "Unable to fetch gnulib submodule."
4215
4216 # Without --gnulib-srcdir, and no existing checked out submodule, we
4217 # create a new shallow clone of the remote gnulib repository.
4218 else
4219 trap func_cleanup_gnulib 1 2 13 15
4220
4221 shallow=
4222 test -n "$gnulib_clone_since" && \
4223 $GIT clone -h 2>&1 |func_grep_q -- --shallow-since \
4224 && shallow="--shallow-since=$gnulib_clone_since"
4225
4226 func_show_eval "$GIT clone $shallow '$gnulib_url' '$gnulib_path'" \
4227 func_cleanup_gnulib
4228
4229 # FIXME: Solaris /bin/sh will try to execute '-' if any of
4230 # these signals are caught after this.
4231 trap - 1 2 13 15
4232 fi
4233
4234 # Make sure we've checked out the correct revision of gnulib.
4235 func_show_eval "$GIT submodule init -- $gnulib_path" \
4236 && func_show_eval "$GIT submodule update -- $gnulib_path" \
4237 || func_fatal_error "Unable to update gnulib submodule."
4238 fi
4239
4240 require_gnulib_submodule=:
4241 }
4242
4243
4244 # require_gnulib_tool
4245 # -------------------
4246 # Ensure that '$gnulib_tool' is set, and points to an executable file,
4247 # or else fall back to using the binary 'true' if the main gnulib
4248 # files appear to have been imported already.
4249 require_gnulib_tool=func_require_gnulib_tool
4250 func_require_gnulib_tool ()
4251 {
4252 $debug_cmd
4253
4254 test true = "$gnulib_tool" || {
4255 $require_gnulib_submodule
4256 $require_gnulib_path
4257
4258 test -n "$gnulib_tool" \
4259 || gnulib_tool=$gnulib_path/gnulib-tool
4260
4261 test -x "$gnulib_tool" || {
4262 gnulib_tool=true
4263 func_warning recommend \
4264 "No 'gnulib-tool' found; gnulib modules may be missing."
4265 }
4266
4267 test true = "$gnulib_tool" \
4268 || func_verbose "found '$gnulib_tool'"
4269 }
4270
4271 require_gnulib_tool=:
4272 }
4273
4274
4275 # require_gnulib_tool_base_options
4276 # --------------------------------
4277 # Ensure that '$gnulib_tool_base_options' contains all the base options
4278 # required according to user configuration from bootstrap.conf.
4279 require_gnulib_tool_base_options=func_require_gnulib_tool_base_options
4280 func_require_gnulib_tool_base_options ()
4281 {
4282 $debug_cmd
4283
4284 $require_gnulib_tool
4285
4286 gnulib_tool_base_options=
4287
4288 test true = "$gnulib_tool" || {
4289 # 'gnulib_modules' and others are maintained in 'bootstrap.conf':
4290 # Use 'gnulib --import' to fetch gnulib modules.
4291 $require_build_aux
4292 test -n "$build_aux" \
4293 && func_append_uniq gnulib_tool_base_options " --aux-dir=$build_aux"
4294 $require_macro_dir
4295 test -n "$macro_dir" \
4296 && func_append_uniq gnulib_tool_base_options " --m4-base=$macro_dir"
4297 $require_doc_base
4298 test -n "$doc_base" \
4299 && func_append_uniq gnulib_tool_base_options " --doc-base=$doc_base"
4300 $require_gnulib_name
4301 test -n "$gnulib_name" \
4302 && func_append_uniq gnulib_tool_base_options " --lib=$gnulib_name"
4303 $require_local_gl_path
4304 test -n "$local_gl_path" && {
4305 eval "set dummy $local_gl_path_quoted" ; shift
4306 for _G_dir
4307 do
4308 func_append_uniq gnulib_tool_base_options " --local-dir=$_G_dir"
4309 done
4310 }
4311 $require_source_base
4312 test -n "$source_base" \
4313 && func_append_uniq gnulib_tool_base_options " --source-base=$source_base"
4314 }
4315
4316 require_gnulib_tool_base_options=:
4317 }
4318
4319
4320 # require_libtoolize
4321 # ------------------
4322 # Skip libtoolize if it's not needed.
4323 require_libtoolize=func_require_libtoolize
4324 func_require_libtoolize ()
4325 {
4326 $debug_cmd
4327
4328 # Unless we're not searching for libtool use by this package, set
4329 # LIBTOOLIZE to true if none of 'LT_INIT', 'AC_PROG_LIBTOOL' and
4330 # 'AM_PROG_LIBTOOL' are used in configure.
4331 test true = "$LIBTOOLIZE" || {
4332 func_extract_trace LT_INIT
4333 test -n "$func_extract_trace_result" || func_extract_trace AC_PROG_LIBTOOL
4334 test -n "$func_extract_trace_result" || func_extract_trace AM_PROG_LIBTOOL
4335 test -n "$func_extract_trace_result" || LIBTOOLIZE=true
4336 }
4337
4338 test -n "$LIBTOOLIZE" || {
4339 # Find libtoolize, named glibtoolize in Mac Ports, but prefer
4340 # user-installed libtoolize to ancient glibtoolize shipped by
4341 # Apple with Mac OS X when Mac Ports is not installed.
4342 func_find_tool LIBTOOLIZE libtoolize glibtoolize
4343 }
4344
4345 test -n "$LIBTOOLIZE" || func_fatal_error "\
4346 Please install GNU Libtool, or 'export LIBTOOLIZE=/path/to/libtoolize'."
4347
4348 func_verbose "export LIBTOOLIZE='$LIBTOOLIZE'"
4349
4350 # Make sure the search result is visible to subshells
4351 export LIBTOOLIZE
4352
4353 require_libtoolize=:
4354 }
4355
4356
4357 # require_local_gl_path
4358 # ---------------------
4359 # Ensure local_gl_path has a sensible value, extracted from 'gnulib-cache.m4' if
4360 # possible, otherwise letting 'gnulib-tool' pick a default.
4361 require_local_gl_path=func_require_local_gl_path
4362 func_require_local_gl_path ()
4363 {
4364 $debug_cmd
4365
4366 $require_gnulib_cache
4367
4368 # Compat with older bootstrap versions.
4369 test -n "$local_gl_dir" && {
4370 func_warning settings "\
4371 Please use 'local_gl_path' instead of 'local_gl_dir' in your
4372 'bootstrap.conf' file."
4373 local_gl_path=$local_gl_dir
4374 local_gl_dir=
4375 }
4376
4377 test -f "$gnulib_cache" && test -z "$local_gl_path" && {
4378 func_extract_trace_first "gl_LOCAL_DIR" "$gnulib_cache"
4379 local_gl_path=$func_extract_trace_first_result
4380 test -n "$local_gl_path" && func_verbose "local_gl_path='$local_gl_path'"
4381 }
4382
4383 test -z "$local_gl_path_quoted" && test -n "$local_gl_path" && {
4384 save_IFS=$IFS
4385 set dummy
4386 # Don't use PATH_SEPARATOR here, gnulib must be fixed to store only ':' as
4387 # path separator into gnulib-cache.m4 (consistency reasons among systems).
4388 IFS=:
4389 for _G_dir in $local_gl_path
4390 do
4391 set "$@" "$_G_dir"
4392 done
4393 shift
4394 IFS=$save_IFS
4395 func_quote eval "$@"
4396 local_gl_path_quoted=$func_quote_result
4397 }
4398
4399 require_local_gl_path=:
4400 }
4401
4402
4403 # require_macro_dir
4404 # -----------------
4405 # Ensure that '$macro_dir' is set, and if it doesn't already point to an
4406 # existing directory, create one.
4407 require_macro_dir=func_require_macro_dir
4408 func_require_macro_dir ()
4409 {
4410 $debug_cmd
4411
4412 # Sometimes this is stored in 'configure.ac'.
4413 test -n "$macro_dir" || {
4414 # AC_CONFIG_MACRO_DIRS takes a space delimited list of directories,
4415 # but we only care about the first one in bootstrap.
4416 func_extract_trace_first AC_CONFIG_MACRO_DIRS
4417 macro_dir=`expr "x$func_extract_trace_first_result" : 'x\([^ ]*\)'`
4418 }
4419 test -n "$macro_dir" || {
4420 func_extract_trace_first AC_CONFIG_MACRO_DIR
4421 macro_dir=$func_extract_trace_first_result
4422 }
4423
4424 # Otherwise we might find it in 'Makefile.am'.
4425 test -n "$macro_dir" || {
4426 $require_aclocal_amflags
4427
4428 # Take the argument following the first '-I', if any.
4429 _G_minus_I_seen=false
4430 for _G_arg in $aclocal_amflags; do
4431 case $_G_minus_I_seen,$_G_arg in
4432 :,*) macro_dir=$_G_arg; break ;;
4433 *,-I) _G_minus_I_seen=: ;;
4434 *,-I*) macro_dir=`expr x$_G_arg : 'x-I\(.*\)$'`; break ;;
4435 esac
4436 done
4437 }
4438
4439 func_verbose "macro_dir='$macro_dir'"
4440
4441 func_check_configuration macro_dir \
4442 "AC_CONFIG_MACRO_DIRS([name of a directory for configure m4 files])"
4443
4444 $require_vc_ignore_files
4445
4446 # If the macro_dir directory doesn't exist, create it now, and mark it
4447 # as ignored for the VCS.
4448 if test ! -d "$macro_dir"; then
4449 mkdir "$macro_dir" || func_permissions_error "$macro_dir"
4450
4451 test -n "$vc_ignore_files" \
4452 || func_insert_if_absent "$macro_dir" $vc_ignore_files
4453 fi
4454
4455 require_macro_dir=:
4456 }
4457
4458
4459 # require_makefile_am
4460 # -------------------
4461 # Ensure there is a 'Makefile.am' in the current directory.
4462 require_makefile_am=func_require_makefile_am
4463 func_require_makefile_am ()
4464 {
4465 $debug_cmd
4466
4467 test -n "$makefile_am" \
4468 || makefile_am=Makefile.am
4469
4470 <"$makefile_am"
4471
4472 func_verbose "found '$makefile_am'"
4473
4474 require_makefile_am=:
4475 }
4476
4477
4478 # require_package
4479 # ---------------
4480 # Ensure that '$package' contains a sensible default value.
4481 require_package=func_require_package
4482 func_require_package ()
4483 {
4484 $debug_cmd
4485
4486 test -n "$package" || {
4487 $require_package_name
4488
4489 package=`echo "$package_name" \
4490 |$SED -e 's/GNU //' \
4491 -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
4492 }
4493
4494 func_verbose "package='$package'"
4495
4496 require_package=:
4497 }
4498
4499
4500 # require_package_bugreport
4501 # -------------------------
4502 # Ensure that this has a sensible value, extracted from 'configure.ac'
4503 # if appropriate (and possible!).
4504 require_package_bugreport=func_require_package_bugreport
4505 func_require_package_bugreport ()
4506 {
4507 $debug_cmd
4508
4509 func_extract_trace AC_INIT
4510
4511 save_ifs=$IFS
4512 IFS=:
4513 set dummy $func_extract_trace_result
4514 IFS=$save_ifs
4515 shift
4516
4517 test -n "$package_bugreport" || package_bugreport=$3
4518 func_check_configuration package_bugreport \
4519 "AC_INIT([$package_name], [$package_version], [bug-$package@gnu.org])"
4520 func_verbose "package_bugreport='$package_bugreport'"
4521
4522 require_package_bugreport=:
4523 }
4524
4525
4526 # require_package_name
4527 # --------------------
4528 # Ensure that this has a sensible value, extracted from 'configure.ac'
4529 # if appropriate (and possible!).
4530 require_package_name=func_require_package_name
4531 func_require_package_name ()
4532 {
4533 $debug_cmd
4534
4535 func_extract_trace AC_INIT
4536
4537 save_ifs=$IFS
4538 IFS=:
4539 set dummy $func_extract_trace_result
4540 IFS=$save_ifs
4541 shift
4542
4543 test -n "$package_name" || package_name=$1
4544 func_check_configuration package_name \
4545 "AC_INIT([name of your package], [package version number])"
4546 func_verbose "package_name='$package_name'"
4547
4548 require_package_name=:
4549 }
4550
4551
4552 # require_package_version
4553 # -----------------------
4554 # Ensure that this has a sensible value, extracted from 'configure.ac'
4555 # if appropriate (and possible!). While we might have set all the
4556 # parameters extracted from AC_INIT at once, 'package_version' in
4557 # particular is not necessarily available as early as the others, since
4558 # 'git-version-gen' is often involved, and until then we can't rely on
4559 # getting a correct version number from an AC_INIT extraction.
4560 require_package_version=func_require_package_version
4561 func_require_package_version ()
4562 {
4563 $debug_cmd
4564
4565 func_extract_trace AC_INIT
4566
4567 save_ifs=$IFS
4568 IFS=:
4569 set dummy $func_extract_trace_result
4570 IFS=$save_ifs
4571 shift
4572
4573 test -n "$package_version" || package_version=$2
4574 test -n "$package_version" || {
4575 # The embedded echo is to squash whitespace before globbing.
4576 case " "`echo $gnulib_modules`" " in
4577 *" git-version-gen "*)
4578 func_fatal_error "\
4579 cannot \$require_package_version in bootstrap.conf before
4580 func_gnulib_tool has installed the 'git-version-gen' script."
4581 ;;
4582 *)
4583 func_check_configuration package_version \
4584 "AC_INIT([name of your package], [package version number])"
4585 ;;
4586 esac
4587 }
4588 func_verbose "package_version='$package_version'"
4589
4590 require_package_version=:
4591 }
4592
4593
4594 # require_patch
4595 # -------------
4596 # Find patch, according to the PATCH environment variable, or else
4597 # searching the user's PATH.
4598 require_patch=func_require_patch
4599 func_require_patch ()
4600 {
4601 $debug_cmd
4602
4603 test -n "$PATCH" || {
4604 # Find a patch program, preferring gpatch, which is usually better
4605 # than the vendor patch.
4606 func_find_tool PATCH gpatch patch
4607 }
4608
4609 test -n "$PATCH" || func_fatal_error "\
4610 Please install GNU Patch, or 'export PATCH=/path/to/gnu/patch'."
4611
4612 func_verbose "export PATCH='$PATCH'"
4613
4614 # Make sure the search result is visible to subshells
4615 export PATCH
4616
4617 require_patch=:
4618 }
4619
4620
4621 # require_source_base
4622 # -------------------
4623 # Ensure that source_base has a sensible value, extracted from
4624 # 'gnulib-cache.m4' if possible.
4625 require_source_base=func_require_source_base
4626 func_require_source_base ()
4627 {
4628 $debug_cmd
4629
4630 $require_gnulib_cache
4631
4632 test -f "$gnulib_cache" && test -z "$source_base" && {
4633 func_extract_trace_first "gl_SOURCE_BASE" "$gnulib_cache"
4634
4635 source_base=$func_extract_trace_first_result
4636
4637 func_verbose "source_base='$source_base'"
4638 }
4639
4640 require_source_base=:
4641 }
4642
4643
4644 # require_vc_ignore_files
4645 # -----------------------
4646 # Ensure that '$vc_ignore' has been processed to list VCS ignore files
4647 # in '$vc_ignore_files'
4648 require_vc_ignore_files=func_require_vc_ignore_files
4649 func_require_vc_ignore_files ()
4650 {
4651 $debug_cmd
4652
4653 test -n "$vc_ignore" || vc_ignore=auto
4654
4655 if test auto = "$vc_ignore" && test -z "$vc_ignore_files"; then
4656 vc_ignore_files=
4657 test -d .git && vc_ignore_files=.gitignore
4658 test -d CVS && vc_ignore_files="$vc_ignore_files .cvsignore"
4659 else
4660 vc_ignore_files=$vc_ignore
4661 fi
4662
4663 func_verbose "vc_ignore_files='$vc_ignore_files'"
4664
4665 require_vc_ignore_files=:
4666 }
4667
4668
4669 ## ----------------- ##
4670 ## Helper functions. ##
4671 ## ----------------- ##
4672
4673 # This section contains the helper functions used by the rest of 'bootstrap'.
4674
4675 # func_len STRING
4676 # ---------------
4677 # STRING may not start with a hyphen.
4678 if (eval 'x=123; test x${#x} = "x3"') 2>/dev/null
4679 then
4680 # This is an XSI compatible shell, allowing a faster implementation...
4681 eval 'func_len ()
4682 {
4683 $debug_cmd
4684
4685 func_len_result=${#1}
4686 }'
4687 else
4688 # ...otherwise fall back to using expr, which is often a shell builtin.
4689 func_len ()
4690 {
4691 $debug_cmd
4692
4693 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo 0`
4694 }
4695 fi
4696
4697
4698 # func_cmp_s FILE1 FILE2
4699 # ----------------------
4700 # Return non-zero exit status unless FILE1 and FILE2 are identical, without
4701 # any output at all, even error messages.
4702 func_cmp_s ()
4703 {
4704 $debug_cmd
4705
4706 # This function relies on non-zero exit status, which will cause the
4707 # program to exit when running in 'set -e' mode.
4708 $CMP "$@" >/dev/null 2>&1
4709 }
4710
4711
4712 # func_grep_q EXPRESSION [FILENAME..]
4713 # -----------------------------------
4714 # Check whether EXPRESSION matches any line of any listed FILENAME,
4715 # without any output at all, even error messages.
4716 func_grep_q ()
4717 {
4718 $debug_cmd
4719
4720 # This function relies on non-zero exit status, which will cause the
4721 # program to exit when running in 'set -e' mode.
4722 $GREP "$@" >/dev/null 2>&1
4723 }
4724
4725
4726 # func_ifcontains LIST MEMBER YES-CMD [NO-CMD]
4727 # --------------------------------------------
4728 # If whitespace-separated LIST contains MEMBER then execute YES-CMD,
4729 # otherwise if NO-CMD was given, execute that.
4730 func_ifcontains ()
4731 {
4732 $debug_cmd
4733
4734 _G_wslist=$1
4735 _G_member=$2
4736 _G_yes_cmd=$3
4737 _G_no_cmd=${4-":"}
4738
4739 _G_found=false
4740 for _G_item in $_G_wslist; do
4741 test "x$_G_item" = "x$_G_member" && {
4742 _G_found=:
4743 break
4744 }
4745 done
4746 if $_G_found; then
4747 eval "$_G_yes_cmd"
4748 _G_status=$?
4749 else
4750 eval "$_G_no_cmd"
4751 _G_status=$?
4752 fi
4753
4754 test 0 -eq "$_G_status" || exit $_G_status
4755 }
4756
4757
4758 # func_strpad STR WIDTH CHAR
4759 # --------------------------
4760 # Trim STR, or pad with CHAR to force a total length of WIDTH.
4761 func_strpad ()
4762 {
4763 $debug_cmd
4764
4765 _G_width=`expr "$2" - 1`
4766 func_strpad_result=`$ECHO "$1" |$SED '
4767 :a
4768 s|^.\{0,'"$_G_width"'\}$|&'"$3"'|
4769 ta
4770 '`
4771 }
4772
4773
4774 # func_strrpad STR WIDTH CHAR
4775 # ---------------------------
4776 # Trim STR, or right-justify-pad with CHAR to force a total length of
4777 # WIDTH.
4778 func_strrpad ()
4779 {
4780 $debug_cmd
4781
4782 _G_width=`expr "$2" - 1`
4783 func_strrpad_result=`$ECHO "$1" |$SED '
4784 :a
4785 s|^.\{0,'"$_G_width"'\}$|'"$3"'&|
4786 ta
4787 '`
4788 }
4789
4790
4791 # func_strrow INDENT FIELD WIDTH [FIELDn WIDTHn]...
4792 # -------------------------------------------------
4793 # Return a string containing each FIELD left justified to WIDTH, with
4794 # the whole thing indented by INDENT spaces. This function is used to
4795 # render one row of aligned columns for a table by func_strtable().
4796 func_strrow ()
4797 {
4798 $debug_cmd
4799
4800 func_strrow_linelen=$1; shift
4801
4802 _G_row=
4803 while test $# -gt 0; do
4804 func_strrow_linelen=`expr $func_strrow_linelen + $2`
4805 func_strpad "$1" $2 " "
4806 func_append _G_row "$func_strpad_result"
4807 shift; shift
4808 done
4809
4810 func_strrpad "$_G_row" $func_strrow_linelen " "
4811 func_strrow_result=$func_strrpad_result
4812 }
4813
4814
4815 # func_strtable INDENT WIDTH1...WIDTHn HEADER1...HEADERn FIELD1...FIELDn
4816 # ----------------------------------------------------------------------
4817 # Generate a string of newline-separated rows arranged in lined-up
4818 # columns of the given WIDTHs, with the entire table indented by INDENT
4819 # spaces. The number of columns is determined by the number of integer
4820 # valued WIDTH arguments following INDENT. The next set (i.e. a number
4821 # of arguments equal to the number of WIDTH arguments) of fields are
4822 # treated as the table's column HEADERs, and are separated from the
4823 # remainder of the table by an indented row of '-' characters. Remaining
4824 # arguments are each aligned below the next available header, wrapping
4825 # to a new row as necessary. Finally another row of '-' characters is
4826 # added to mark the end of the table.
4827 #
4828 # For example an unindented 3 column table with 2 rows of data would be
4829 # generated by this call:
4830 #
4831 # func_strtable 3 20 10 25 \
4832 # Header1 Header2 Header3 \
4833 # Row1Col1 Row1Col2 Row1Col3 \
4834 # Row2Col1 Row2Col2 Row2Col3
4835 #
4836 # returning the following string:
4837 #
4838 # " Header1 Header2 Header3
4839 # -------------------------------------------------------
4840 # Row1Col1 Row1Col2 Row1Col3
4841 # Row2Col1 Row2Col2 Row2Col3
4842 # -------------------------------------------------------"
4843 func_strtable ()
4844 {
4845 $debug_cmd
4846
4847 # Save the indent value, we'll need it for each row we render.
4848 _G_indent=$1; shift
4849
4850 # Collect remaining numeric args into a list for reuse between
4851 # members of each row when we call func_strrow later.
4852 _G_widths=$1; shift
4853 while test 0 -lt `expr "$1" : '[1-9][0-9]*$'`; do
4854 func_append _G_widths " $1"; shift
4855 done
4856
4857 # Extract the same number of positional parameters as there are
4858 # width elements - we'll do the header rows separately so that
4859 # we can insert a divider line.
4860 _G_header=$_G_indent
4861 for _G_width in $_G_widths; do
4862 func_append _G_header " $1 $_G_width"; shift
4863 done
4864 func_strrow $_G_header
4865
4866 # Strip off the indent, and make a divider with '-' chars, then
4867 # reindent.
4868 _G_divider=`$ECHO "$func_strrow_result" \
4869 |$SED 's|[^ ]|-|g
4870 :a
4871 s|- |--|g
4872 ta
4873 '`
4874
4875 # Append the header and divider to the running result.
4876 func_append func_strtable_result "\
4877 $func_strrow_result
4878 $_G_divider
4879 "
4880
4881 # The remaining rows are zipped between the width values we
4882 # unwound earlier just like the header row above.
4883 while test $# -gt 0; do
4884 _G_row=$_G_indent
4885 for _G_width in $_G_widths; do
4886 func_append _G_row " $1 $_G_width"; shift
4887 done
4888 func_strrow $_G_row
4889 func_append func_strtable_result "\
4890 $func_strrow_result
4891 "
4892 done
4893
4894 # Mark the end of the table with a final divider line.
4895 func_append func_strtable_result "$_G_divider"
4896 }
4897
4898
4899 # func_internal_error ARG...
4900 # --------------------------
4901 # Echo program name prefixed message to standard error, and exit.
4902 func_internal_error ()
4903 {
4904 func_fatal_error "\
4905 INTERNAL: " ${1+"$@"} "
4906 Please report this bug to 'bug-gnulib@gnu.org'
4907 in as much detail as possible."
4908 }
4909
4910
4911 # func_permissions_error FILE-OR-DIRECTORY
4912 # ----------------------------------------
4913 # Echo program name prefixed permissions error message to standard
4914 # error, and exit.
4915 func_permissions_error ()
4916 {
4917 $debug_cmd
4918
4919 func_fatal_error "Failed to create '$1', check permissions."
4920 }
4921
4922
4923 # func_show_eval CMD [FAIL_EXP]
4924 # -----------------------------
4925 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
4926 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
4927 # is given, then evaluate it.
4928 func_show_eval ()
4929 {
4930 $debug_cmd
4931
4932 $require_term_colors
4933
4934 _G_cmd=$1
4935 _G_fail_exp=${2-':'}
4936
4937 ${opt_silent-'false'} || {
4938 func_quote eval $_G_cmd
4939 eval func_truncate_cmd $func_quote_result
4940 func_echo "running: $tc_bold$func_truncate_cmd_result$tc_reset"
4941 }
4942
4943 ${opt_dry_run-'false'} || {
4944 eval "$_G_cmd"
4945 _G_status=$?
4946 test 0 -eq "$_G_status" || eval "(exit $_G_status); $_G_fail_exp"
4947 }
4948 }
4949
4950
4951 # func_truncate_cmd CMD [ARG]...
4952 # ------------------------------
4953 # For unreasonably long commands (such as a gnulib-tool invocation with
4954 # the full module list for import), truncate CMD after the second non-
4955 # option ARG.
4956 func_truncate_cmd ()
4957 {
4958 $debug_cmd
4959
4960 _G_last_arg_opt_p=false
4961 func_truncate_cmd_result=
4962
4963 set dummy "$@"; shift
4964
4965 while test $# -gt 0; do
4966 _G_opt=$1; shift
4967
4968 test -n "$func_truncate_cmd_result" \
4969 && func_append func_truncate_cmd_result ' '
4970 func_append func_truncate_cmd_result "$_G_opt"
4971
4972 func_len "x$func_truncate_cmd_result"
4973
4974 case $_G_opt in
4975 -*) _G_last_arg_opt_p=: ;;
4976 *) $_G_last_arg_opt_p \
4977 || test "$min_cmd_len" -gt "$func_len_result" \
4978 || break
4979 _G_last_arg_opt_p=false
4980 ;;
4981 esac
4982 done
4983
4984 test $# -gt 0 && func_append func_truncate_cmd_result "..."
4985 }
4986
4987
4988 # func_gitignore_entries FILE...
4989 # ------------------------------
4990 # Strip blank and comment lines to leave significant entries.
4991 func_gitignore_entries ()
4992 {
4993 $debug_cmd
4994
4995 $SED -e '/^#/d' -e '/^$/d' "$@"
4996 }
4997
4998
4999 # func_insert_if_absent STR FILE...
5000 # ---------------------------------
5001 # If $STR is not already on a line by itself in $FILE, insert it, at the
5002 # start. Entries are inserted at the start of the ignore list to ensure
5003 # existing entries starting with ! are not overridden. Such entries
5004 # support whilelisting exceptions after a more generic blacklist pattern.
5005 # sorting the new contents of the file and replacing $FILE with the result.
5006 func_insert_if_absent ()
5007 {
5008 $debug_cmd
5009
5010 str=$1
5011 shift
5012
5013 for file
5014 do
5015 test -f "$file" || touch "$file"
5016
5017 duplicate_entries=`func_gitignore_entries "$file" |sort |uniq -d`
5018 test -n "$duplicate_entries" \
5019 && func_error "duplicate entries in $file: " $duplicate_entries
5020
5021 func_grep_q "^$str\$" "$file" \
5022 || func_verbose "inserting '$str' into '$file'"
5023
5024 linesold=`func_gitignore_entries "$file" |wc -l`
5025 linesnew=`{ $ECHO "$str"; cat "$file"; } \
5026 |func_gitignore_entries |sort -u |wc -l`
5027 test "$linesold" -eq "$linesnew" \
5028 || { $SED "1i\\$nl$str$nl" "$file" >"$file"T && mv "$file"T "$file"; } \
5029 || func_permissions_error "$file"
5030 done
5031 }
5032
5033
5034 # func_get_version APP
5035 # --------------------
5036 # echo the version number (if any) of APP, which is looked up along your
5037 # PATH.
5038 func_get_version ()
5039 {
5040 $debug_cmd
5041
5042 _G_app=$1
5043
5044 # Rather than uncomment the sed script in-situ, strip the comments
5045 # programatically before passing the result to $SED for evaluation.
5046 sed_get_version=`$ECHO '# extract version within line
5047 s|.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*|\1|
5048 t done
5049
5050 # extract version at start of line
5051 s|^\([0-9]\{1,\}\.[.a-z0-9-]*\).*|\1|
5052 t done
5053
5054 d
5055
5056 :done
5057 # the following essentially does s|5.005|5.5|
5058 s|\.0*\([1-9]\)|.\1|g
5059 p
5060 q' \
5061 |$SED '/^[ ]*#.*$/d'`
5062
5063 func_tool_version_output $_G_app >/dev/null
5064 _G_status=$?
5065
5066 test 0 -ne "$_G_status" \
5067 || $_G_app --version 2>&1 |$SED -n "$sed_get_version"
5068
5069 (exit $_G_status)
5070 }
5071
5072
5073 # func_check_tool APP
5074 # -------------------
5075 # Search PATH for an executable at APP.
5076 func_check_tool ()
5077 {
5078 $debug_cmd
5079
5080 func_check_tool_result=
5081
5082 case $1 in
5083 *[\\/]*)
5084 test -x "$1" && func_check_tool_result=$1
5085 ;;
5086 *)
5087 save_IFS=$IFS
5088 IFS=${PATH_SEPARATOR-:}
5089 for _G_check_tool_path in $PATH; do
5090 IFS=$save_IFS
5091 if test -x "$_G_check_tool_path/$1"; then
5092 func_check_tool_result=$_G_check_tool_path/$1
5093 break
5094 fi
5095 done
5096 IFS=$save_IFS
5097 ;;
5098 esac
5099 }
5100
5101
5102 # func_check_versions APP1 VER1 URL1 ...[APPN VERN URLN]
5103 # ------------------------------------------------------
5104 func_check_versions ()
5105 {
5106 $debug_cmd
5107
5108 func_check_versions_result=:
5109
5110 while test $# -gt 0; do
5111 _G_app=$1; shift
5112 _G_reqver=$1; shift
5113 _G_url=$1; shift
5114
5115 # Diagnose bad buildreq formatting.
5116 case $_G_url in
5117 [a-z]*://*) ;; # looks like a url
5118 *) func_fatal_error "\
5119 '$_G_url' from the buildreq table in
5120 'bootstrap.conf' does not look like the URL for downloading
5121 $_G_app. Please ensure that buildreq is a strict newline
5122 delimited list of triples; 'program min-version url'."
5123 ;;
5124 esac
5125
5126 # Honor $APP variables ($TAR, $AUTOCONF, etc.)
5127 _G_appvar=`echo $_G_app |tr '[a-z]' '[A-Z]'`
5128 test TAR = "$_G_appvar" && _G_appvar=AMTAR
5129 eval "_G_app=\${$_G_appvar-$_G_app}"
5130
5131 # Fail if no version specified, but the program can't be found.
5132 if test x- = "x$_G_reqver"; then
5133 func_check_tool $_G_app
5134 if test -z "$func_check_tool_result"; then
5135 func_error "Prerequisite '$_G_app' not not found. Please install it, or
5136 'export $_G_appvar=/path/to/$_G_app'."
5137 func_check_versions_result=false
5138 else
5139 func_verbose "found '$func_check_tool_result' for $_G_appvar."
5140 fi
5141 else
5142 _G_instver=`func_get_version $_G_app`
5143
5144 # Fail if --version didn't work.
5145 if test -z "$_G_instver"; then
5146 func_error "Prerequisite '$_G_app' not found. Please install it, or
5147 'export $_G_appvar=/path/to/$_G_app'."
5148 func_check_versions_result=false
5149
5150 # Fail if a newer version than what we have is required.
5151 else
5152 func_verbose "found '$_G_app' version $_G_instver."
5153
5154 case $_G_reqver in
5155 =*)
5156 # If $buildreq version starts with '=', version must
5157 # match the installed program exactly.
5158 test "x$_G_reqver" = "x=$_G_instver" || {
5159 func_error "\
5160 '$_G_app' version == $_G_instver is too old
5161 'exactly $_G_app-$_G_reqver is required"
5162 func_check_versions_result=false
5163 }
5164 ;;
5165 *)
5166 # Otherwise, anything that is not older is a match.
5167 func_lt_ver "$_G_reqver" "$_G_instver" || {
5168 func_error "\
5169 '$_G_app' version == $_G_instver is too old
5170 '$_G_app' version >= $_G_reqver is required"
5171 func_check_versions_result=false
5172 }
5173 ;;
5174 esac
5175 fi
5176 fi
5177 done
5178 }
5179
5180
5181 # func_cleanup_gnulib
5182 # -------------------
5183 # Recursively delete everything below the path in the global variable
5184 # GNULIB_PATH.
5185 func_cleanup_gnulib ()
5186 {
5187 $debug_cmd
5188
5189 _G_status=$?
5190 $RM -fr "$gnulib_path"
5191 exit $_G_status
5192 }
5193
5194
5195 # func_download_po_files SUBDIR DOMAIN
5196 # ------------------------------------
5197 func_download_po_files ()
5198 {
5199 $debug_cmd
5200
5201 func_echo "getting translations into $1 for $2..."
5202 _G_cmd=`printf "$po_download_command_format" "$2" "$1"`
5203 eval "$_G_cmd"
5204 }
5205
5206
5207 # func_update_po_files PO_DIR DOMAIN
5208 # ----------------------------------
5209 # Mirror .po files to $po_dir/.reference and copy only the new
5210 # or modified ones into $po_dir. Also update $po_dir/LINGUAS.
5211 # Note po files that exist locally only are left in $po_dir but will
5212 # not be included in LINGUAS and hence will not be distributed.
5213 func_update_po_files ()
5214 {
5215 $debug_cmd
5216
5217 # Directory containing primary .po files.
5218 # Overwrite them only when we're sure a .po file is new.
5219 _G_po_dir=$1
5220 _G_domain=$2
5221
5222 # Mirror *.po files into this dir.
5223 # Usually contains *.s1 checksum files.
5224 _G_ref_po_dir=$_G_po_dir/.reference
5225
5226 test -d "$_G_ref_po_dir" || mkdir $_G_ref_po_dir || return
5227 func_download_po_files $_G_ref_po_dir $_G_domain \
5228 && ls "$_G_ref_po_dir"/*.po 2>/dev/null \
5229 |$SED -e 's|.*/||' -e 's|\.po$||' > "$_G_po_dir/LINGUAS" || return
5230
5231 # Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6+.
5232 func_find_tool SHA1SUM sha1sum gsha1sum shasum sha1
5233
5234 test -n "$SHA1SUM" || func_fatal_error "\
5235 Please install GNU Coreutils, or 'export SHA1SUM=/path/to/sha1sum'."
5236
5237 _G_langs=`cd $_G_ref_po_dir && echo *.po|$SED 's|\.po||g'`
5238 test '*' = "$_G_langs" && _G_langs=x
5239 for _G_po in $_G_langs; do
5240 case $_G_po in x) continue;; esac
5241 _G_new_po=$_G_ref_po_dir/$_G_po.po
5242 _G_cksum_file=$_G_ref_po_dir/$_G_po.s1
5243 if ! test -f "$_G_cksum_file" ||
5244 ! test -f "$_G_po_dir/$_G_po.po" ||
5245 ! $SHA1SUM -c "$_G_cksum_file" \
5246 < "$_G_new_po" > /dev/null; then
5247 echo "updated $_G_po_dir/$_G_po.po..."
5248 cp "$_G_new_po" "$_G_po_dir/$_G_po.po" \
5249 && $SHA1SUM < "$_G_new_po" > "$_G_cksum_file" || return
5250 fi
5251 done
5252 }
5253
5254
5255
5256 ## --------------- ##
5257 ## Option parsing. ##
5258 ## --------------- ##
5259
5260 # Hook in the functions to make sure our own options are parsed during
5261 # the option parsing loop.
5262
5263 usage='$progpath [OPTION]...'
5264
5265 # Short help message in response to '-h'. Add to this in 'bootstrap.conf'
5266 # if you accept any additional options.
5267 usage_message="Common Bootstrap Options:
5268 -c, --copy copy files instead of creating symbolic links.
5269 --debug enable verbose shell tracing
5270 -n, --dry-run print commands rather than running them
5271 -f, --force attempt to bootstrap even if the sources seem not
5272 to have been checked out.
5273 --gnulib-srcdir=DIRNAME
5274 specify a local directory where gnulib sources
5275 reside. Use this if you already have the gnulib
5276 sources on your machine, and don't want to waste
5277 your bandwidth downloading them again. Defaults to
5278 \$GNULIB_SRCDIR.
5279 --no-warnings equivalent to '-Wnone'
5280 --skip-git do not fetch files from remote repositories
5281 --skip-po do not download po files.
5282 -v, --verbose verbosely report processing
5283 --version print version information and exit
5284 -W, --warnings=CATEGORY
5285 report the warnings falling in CATEGORY [all]
5286 -h, --help print short or long help message and exit
5287 "
5288
5289 # Additional text appended to 'usage_message' in response to '--help'.
5290 long_help_message=$long_help_message"
5291 'recommend' show warnings about missing recommended packages
5292 'settings' show warnings about missing '$progname.conf' settings
5293 'upgrade' show warnings about out-dated files
5294
5295 If the file '$progname.conf' exists in the same directory as this
5296 script, its contents are read as shell variables to configure the
5297 bootstrap.
5298
5299 For build prerequisites, environment variables like \$AUTOCONF and
5300 \$AMTAR are honored.
5301
5302 Running without arguments will suffice in most cases.
5303 "
5304
5305 # Warning categories used by 'bootstrap', append others if you use them
5306 # in your 'bootstrap.conf'.
5307 warning_categories='recommend settings upgrade'
5308
5309
5310 # bootstrap_options_prep [ARG]...
5311 # -------------------------------
5312 # Preparation for options parsed by Bootstrap.
5313 bootstrap_options_prep ()
5314 {
5315 $debug_cmd
5316
5317 # Option defaults:
5318 opt_copy=${copy-'false'}
5319 opt_dry_run=false
5320 opt_force=false
5321 opt_gnulib_srcdir=$GNULIB_SRCDIR
5322 opt_skip_git=false
5323 opt_skip_po=false
5324
5325 # Pass back the list of options we consumed.
5326 func_quote eval ${1+"$@"}
5327 bootstrap_options_prep_result=$func_quote_result
5328 }
5329 func_add_hook func_options_prep bootstrap_options_prep
5330
5331
5332 # bootstrap_parse_options [ARG]...
5333 # --------------------------------
5334 # Provide handling for Bootstrap specific options.
5335 bootstrap_parse_options ()
5336 {
5337 $debug_cmd
5338
5339 # Perform our own loop to consume as many options as possible in
5340 # each iteration.
5341 while test $# -gt 0; do
5342 _G_opt=$1
5343 shift
5344 case $_G_opt in
5345 --dry-run|--dryrun|-n)
5346 opt_dry_run=: ;;
5347 --copy|-c) opt_copy=: ;;
5348 --force|-f) opt_force=: ;;
5349
5350 --gnulib-srcdir)
5351 test $# = 0 && func_missing_arg $_G_opt && break
5352 opt_gnulib_srcdir=$1
5353 shift
5354 ;;
5355
5356 --skip-git|--no-git)
5357 opt_skip_git=:
5358 ;;
5359
5360 --skip-po|--no-po)
5361 opt_skip_po=:
5362 ;;
5363
5364 # Separate non-argument short options:
5365 -c*|-f*|-n*)
5366 func_split_short_opt "$_G_opt"
5367 set dummy "$func_split_short_opt_name" \
5368 "-$func_split_short_opt_arg" ${1+"$@"}
5369 shift
5370 ;;
5371
5372 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
5373 esac
5374 done
5375
5376 # save modified positional parameters for caller
5377 func_quote eval ${1+"$@"}
5378 bootstrap_parse_options_result=$func_quote_result
5379 }
5380 func_add_hook func_parse_options bootstrap_parse_options
5381
5382
5383 # bootstrap_validate_options [ARG]...
5384 # -----------------------------------
5385 # Perform any sanity checks on option settings and/or unconsumed
5386 # arguments.
5387 bootstrap_validate_options ()
5388 {
5389 $debug_cmd
5390
5391 # Validate options.
5392 test $# -gt 0 \
5393 && func_fatal_help "too many arguments"
5394
5395 # Pass back the (empty) list of unconsumed options.
5396 func_quote eval ${1+"$@"}
5397 bootstrap_validate_options_result=$func_quote_result
5398 }
5399 func_add_hook func_validate_options bootstrap_validate_options
5400
5401
5402 ## -------------------------------------------------- ##
5403 ## Source package customisations in 'bootstrap.conf'. ##
5404 ## -------------------------------------------------- ##
5405
5406 # Override the default configuration, if necessary.
5407 # Make sure that bootstrap.conf is sourced from the current directory
5408 # if we were invoked as "sh bootstrap".
5409 case $0 in
5410 */*) test -r "$0.conf" && . "$0.conf" ;;
5411 *) test -r "$0.conf" && . ./"$0.conf" ;;
5412 esac
5413
5414
5415 ## ------------------------------- ##
5416 ## Actually perform the bootstrap. ##
5417 ## ------------------------------- ##
5418
5419 func_bootstrap ${1+"$@"}
5420
5421 # The End.
5422 exit ${exit_status-$EXIT_SUCCESS}
5423
5424 # Local variables:
5425 # mode: shell-script
5426 # sh-indentation: 2
5427 # eval: (add-hook 'before-save-hook 'time-stamp)
5428 # time-stamp-pattern: "500/scriptversion=%:y-%02m-%02d.%02H; # UTC"
5429 # time-stamp-time-zone: "UTC"
5430 # End:
+0
-101
bootstrap.conf less more
0 # bootstrap.conf (Enchant) version 2019-09-11
1
2 # This file is part of Enchant.
3 #
4 # Enchant is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Lesser General Public License as published by
6 # the Free Software Foundation, either version 2.1 of the License, or
7 # (at your option) any later version.
8 #
9 # Enchant is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
18 ## -------------- ##
19 ## Configuration. ##
20 ## -------------- ##
21
22 # File that should exist relative to the top directory of a checked out
23 # hierarchy, but not in a distribution tarball.
24 checkout_only_file=.gitignore
25
26 # List of programs, minimum versions, and software urls required to
27 # bootstrap, maintain and release Enchant.
28
29 # Build prerequisites
30 buildreq='
31 git 1.5.5 https://git-scm.com
32 gpg 1.4.11 https://www.gnupg.org
33 tar - https://www.gnu.org/s/tar
34 '
35
36 # Non-default gnulib directory options.
37 local_gl_path=gl-mod/bootstrap:gl
38 gnulib_git_submodules=gl-mod/bootstrap
39
40 # Additional gnulib-tool options to use.
41 gnulib_tool_options='
42 --lgpl
43 --makefile-name=Makefile.gnulib
44 '
45
46 # gnulib modules used by this package.
47 gnulib_modules='
48 bootstrap
49 c99
50 configmake
51 flock
52 gnu-make
53 manywarnings
54 relocatable-lib-lgpl
55 snippet/unused-parameter
56 strchrnul
57 strdup-posix
58 ssize_t
59 '
60
61
62 ## --------------- ##
63 ## Hook functions. ##
64 ## --------------- ##
65
66 # enchant_ignore_gnulib_ignore
67 # -------------------------
68 # gnulib-tool updates m4/.gitignore and lib/.gitignore, and keeping
69 # generated files under version control does not make sense. Since
70 # lib is entirely ignored, we only need to prepopulate the m4 ignore
71 # files with generated files not tracked by gnulib-tool.
72 enchant_ignore_gnulib_ignore ()
73 {
74 $debug_cmd
75
76 $require_macro_dir
77
78 if test -f "$macro_dir/.gitignore" ; then
79 :
80 else
81 func_verbose "creating initial \`$macro_dir/.gitignore'"
82 cat > $macro_dir/.gitignore <<\EOF
83 # files created by gnulib, but that gnulib doesn't track
84 *~
85 .gitignore
86 gnulib-comp.m4
87 EOF
88 fi
89 }
90 func_add_hook func_prep enchant_ignore_gnulib_ignore
91
92
93 # Local variables:
94 # mode: shell-script
95 # sh-indentation: 2
96 # eval: (add-hook 'write-file-functions 'time-stamp)
97 # time-stamp-start: "# bootstrap.conf (Enchant) version "
98 # time-stamp-format: "%:y-%02m-%02d"
99 # time-stamp-end: "$"
100 # End:
+0
-42
build-aux/appveyor-install.sh less more
0 #!/bin/sh
1 # Pre-install script for appveyor: install build deps
2
3 # Get mingw type, if any, from MSYSTEM
4 case $MSYSTEM in
5 MINGW32)
6 MINGW_BITS=i686
7 PREFIX=/mingw32
8 ;;
9 MINGW64)
10 MINGW_BITS=x86_64
11 PREFIX=/mingw64
12 ;;
13 MSYS)
14 PREFIX=/usr
15 ;;
16 esac
17
18 # GLib
19 if test -n "$MINGW_BITS"; then
20 pacman --noconfirm -S mingw-w64-$MINGW_BITS-glib2
21 fi
22 pacman --noconfirm -S glib2-devel
23
24 # Hunspell dictionary (only need one flavour)
25 wget http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-hunspell-en-2016.11.20-2-any.pkg.tar.xz
26 pacman --noconfirm -U mingw-w64-x86_64-hunspell-en-2016.11.20-2-any.pkg.tar.xz
27
28 # Hunspell
29 wget https://github.com/hunspell/hunspell/archive/v1.6.0.tar.gz
30 tar zxvf v1.6.0.tar.gz || true # Error in unpacking (symlink README before file README.md)
31 cd hunspell-1.6.0
32 ln -s README.md README && autoreconf -vfi
33 ./configure --prefix=$PREFIX && make && make install
34 cd ..
35
36 # UnitTest++
37 wget https://github.com/unittest-cpp/unittest-cpp/releases/download/v1.6.1/unittest-cpp-1.6.1.tar.gz
38 tar zxvf unittest-cpp-1.6.1.tar.gz
39 cd unittest-cpp-1.6.1
40 ./configure --prefix=$PREFIX && make && make install
41 cd ..
0 #! /bin/sh
1 # Wrapper for Microsoft lib.exe
2
3 me=ar-lib
4 scriptversion=2012-03-01.08; # UTC
5
6 # Copyright (C) 2010-2017 Free Software Foundation, Inc.
7 # Written by Peter Rosin <peda@lysator.liu.se>.
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 # This file is maintained in Automake, please report
28 # bugs to <bug-automake@gnu.org> or send patches to
29 # <automake-patches@gnu.org>.
30
31
32 # func_error message
33 func_error ()
34 {
35 echo "$me: $1" 1>&2
36 exit 1
37 }
38
39 file_conv=
40
41 # func_file_conv build_file
42 # Convert a $build file to $host form and store it in $file
43 # Currently only supports Windows hosts.
44 func_file_conv ()
45 {
46 file=$1
47 case $file in
48 / | /[!/]*) # absolute file, and not a UNC file
49 if test -z "$file_conv"; then
50 # lazily determine how to convert abs files
51 case `uname -s` in
52 MINGW*)
53 file_conv=mingw
54 ;;
55 CYGWIN*)
56 file_conv=cygwin
57 ;;
58 *)
59 file_conv=wine
60 ;;
61 esac
62 fi
63 case $file_conv in
64 mingw)
65 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
66 ;;
67 cygwin)
68 file=`cygpath -m "$file" || echo "$file"`
69 ;;
70 wine)
71 file=`winepath -w "$file" || echo "$file"`
72 ;;
73 esac
74 ;;
75 esac
76 }
77
78 # func_at_file at_file operation archive
79 # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
80 # for each of them.
81 # When interpreting the content of the @FILE, do NOT use func_file_conv,
82 # since the user would need to supply preconverted file names to
83 # binutils ar, at least for MinGW.
84 func_at_file ()
85 {
86 operation=$2
87 archive=$3
88 at_file_contents=`cat "$1"`
89 eval set x "$at_file_contents"
90 shift
91
92 for member
93 do
94 $AR -NOLOGO $operation:"$member" "$archive" || exit $?
95 done
96 }
97
98 case $1 in
99 '')
100 func_error "no command. Try '$0 --help' for more information."
101 ;;
102 -h | --h*)
103 cat <<EOF
104 Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
105
106 Members may be specified in a file named with @FILE.
107 EOF
108 exit $?
109 ;;
110 -v | --v*)
111 echo "$me, version $scriptversion"
112 exit $?
113 ;;
114 esac
115
116 if test $# -lt 3; then
117 func_error "you must specify a program, an action and an archive"
118 fi
119
120 AR=$1
121 shift
122 while :
123 do
124 if test $# -lt 2; then
125 func_error "you must specify a program, an action and an archive"
126 fi
127 case $1 in
128 -lib | -LIB \
129 | -ltcg | -LTCG \
130 | -machine* | -MACHINE* \
131 | -subsystem* | -SUBSYSTEM* \
132 | -verbose | -VERBOSE \
133 | -wx* | -WX* )
134 AR="$AR $1"
135 shift
136 ;;
137 *)
138 action=$1
139 shift
140 break
141 ;;
142 esac
143 done
144 orig_archive=$1
145 shift
146 func_file_conv "$orig_archive"
147 archive=$file
148
149 # strip leading dash in $action
150 action=${action#-}
151
152 delete=
153 extract=
154 list=
155 quick=
156 replace=
157 index=
158 create=
159
160 while test -n "$action"
161 do
162 case $action in
163 d*) delete=yes ;;
164 x*) extract=yes ;;
165 t*) list=yes ;;
166 q*) quick=yes ;;
167 r*) replace=yes ;;
168 s*) index=yes ;;
169 S*) ;; # the index is always updated implicitly
170 c*) create=yes ;;
171 u*) ;; # TODO: don't ignore the update modifier
172 v*) ;; # TODO: don't ignore the verbose modifier
173 *)
174 func_error "unknown action specified"
175 ;;
176 esac
177 action=${action#?}
178 done
179
180 case $delete$extract$list$quick$replace,$index in
181 yes,* | ,yes)
182 ;;
183 yesyes*)
184 func_error "more than one action specified"
185 ;;
186 *)
187 func_error "no action specified"
188 ;;
189 esac
190
191 if test -n "$delete"; then
192 if test ! -f "$orig_archive"; then
193 func_error "archive not found"
194 fi
195 for member
196 do
197 case $1 in
198 @*)
199 func_at_file "${1#@}" -REMOVE "$archive"
200 ;;
201 *)
202 func_file_conv "$1"
203 $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
204 ;;
205 esac
206 done
207
208 elif test -n "$extract"; then
209 if test ! -f "$orig_archive"; then
210 func_error "archive not found"
211 fi
212 if test $# -gt 0; then
213 for member
214 do
215 case $1 in
216 @*)
217 func_at_file "${1#@}" -EXTRACT "$archive"
218 ;;
219 *)
220 func_file_conv "$1"
221 $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
222 ;;
223 esac
224 done
225 else
226 $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
227 do
228 $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
229 done
230 fi
231
232 elif test -n "$quick$replace"; then
233 if test ! -f "$orig_archive"; then
234 if test -z "$create"; then
235 echo "$me: creating $orig_archive"
236 fi
237 orig_archive=
238 else
239 orig_archive=$archive
240 fi
241
242 for member
243 do
244 case $1 in
245 @*)
246 func_file_conv "${1#@}"
247 set x "$@" "@$file"
248 ;;
249 *)
250 func_file_conv "$1"
251 set x "$@" "$file"
252 ;;
253 esac
254 shift
255 shift
256 done
257
258 if test -n "$orig_archive"; then
259 $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
260 else
261 $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
262 fi
263
264 elif test -n "$list"; then
265 if test ! -f "$orig_archive"; then
266 func_error "archive not found"
267 fi
268 $AR -NOLOGO -LIST "$archive" || exit $?
269 fi
0 #! /bin/sh
1
2 # Bootstrap an Autotooled package from checked-out sources.
3 # Written by Gary V. Vaughan, 2010
4 # Inspired by a script written by Paul Eggert.
5
6 # This is free software. There is NO warranty; not even for
7 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 #
9 # Copyright (C) 2010-2019 Bootstrap Authors
10 #
11 # This file is dual licensed under the terms of the MIT license
12 # <https://opensource.org/license/MIT>, and GPL version 3 or later
13 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
14 # these licenses when using or redistributing this software or any of
15 # the files within it. See the URLs above, or the file `LICENSE`
16 # included in the Bootstrap distribution for the full license texts.
17
18 # You should place a copy of this script under version control in the
19 # top-level directory of your project. The intent is that all
20 # customization can be done with a `bootstrap.conf` file also maintained
21 # in your version control.
22
23 # Please report bugs or propose patches to:
24 # <https://github.com/gnulib-modules/bootstrap/issues>
25
26
27 ## ------ ##
28 ## Usage. ##
29 ## ------ ##
30
31 # Most GNUish projects do not keep all of the generated Autotool
32 # files under version control, but running all of the right tools
33 # with the right arguments, in the correct order to regenerate
34 # all of those files in readiness for configuration and building
35 # can be surprisingly involved! Many projects have a 'bootstrap'
36 # script under version control to invoke Autotools and perform
37 # other assorted book-keeping with version numbers and the like.
38 #
39 # This bootstrap script aims to probe the configure.ac and top
40 # Makefile.am of your project to automatically determine what
41 # the correct ordering and arguments are and then run the tools for
42 # you. In order to use it, you can generate an initial standalone
43 # script with:
44 #
45 # gl/build-aux/inline-source gl/build-aux/bootstrap.in > bootstrap
46 #
47 # You should then store than script in version control for other
48 # developers in you project. It will give you instructions about
49 # how to keep it up to date if the sources change.
50 #
51 # See gl/doc/bootstrap.texi for documentation on how to write
52 # a bootstrap.conf to customize it for your project's
53 # idiosyncracies.
54
55
56 ## ================================================================== ##
57 ## ##
58 ## DO NOT EDIT THIS FILE, CUSTOMIZE IT USING A BOOTSTRAP.CONF ##
59 ## ##
60 ## ================================================================== ##
61
62 ## ------------------------------- ##
63 ## User overridable command paths. ##
64 ## ------------------------------- ##
65
66 # All uppercase denotes values stored in the environment. These
67 # variables should generally be overridden by the user - however, we do
68 # set them to 'true' in some parts of this script to prevent them being
69 # called at the wrong time by other tools that we call ('autoreconf',
70 # for example).
71 #
72 # We also allow 'LIBTOOLIZE', 'M4', 'SHA1SUM' and some others to be
73 # overridden, and export the result for child processes, but they are
74 # handled by the function 'func_find_tool' and not defaulted in this
75 # section.
76
77 : ${ACLOCAL="aclocal"}
78 : ${AUTOCONF="autoconf"}
79 : ${AUTOHEADER="autoheader"}
80 : ${AUTOM4TE="autom4te"}
81 : ${AUTOHEADER="autoheader"}
82 : ${AUTOMAKE="automake"}
83 : ${AUTOPOINT="autopoint"}
84 : ${AUTORECONF="autoreconf"}
85 : ${CMP="cmp"}
86 : ${CONFIG_SHELL="/bin/sh"}
87 : ${DIFF="diff"}
88 : ${GIT="git"}
89 : ${LN_S="ln -s"}
90 : ${RM="rm"}
91
92 export ACLOCAL
93 export AUTOCONF
94 export AUTOHEADER
95 export AUTOM4TE
96 export AUTOHEADER
97 export AUTOMAKE
98 export AUTOPOINT
99 export AUTORECONF
100 export CONFIG_SHELL
101
102
103 ## -------------- ##
104 ## Configuration. ##
105 ## -------------- ##
106
107 # A newline delimited list of triples of programs (that respond to
108 # --version), the minimum version numbers required (or just '-' in the
109 # version field if any version will be sufficient) and homepage URLs
110 # to help locate missing packages.
111 buildreq=
112
113 # Name of a file containing instructions on installing missing packages
114 # required in 'buildreq'.
115 buildreq_readme=README-hacking
116
117 # These are extracted from AC_INIT in configure.ac, though you can
118 # override those values in 'bootstrap.conf' if you prefer.
119 build_aux=
120 macro_dir=
121 package=
122 package_name=
123 package_version=
124 package_bugreport=
125
126 # These are extracted from 'gnulib-cache.m4', or else fall-back
127 # automatically on the gnulib defaults; unless you set the values
128 # manually in 'bootstrap.conf'.
129 doc_base=
130 gnulib_mk=
131 gnulib_name=
132 local_gl_path=
133 source_base=
134 tests_base=
135
136 # The list of gnulib modules required at 'gnulib-tool' time. If you
137 # check 'gnulib-cache.m4' into your repository, then this list will be
138 # extracted automatically.
139 gnulib_modules=
140
141 # Extra gnulib files that are not in modules, which override files of
142 # the same name installed by other bootstrap tools.
143 gnulib_non_module_files="
144 build-aux/compile
145 build-aux/install-sh
146 build-aux/mdate-sh
147 build-aux/texinfo.tex
148 build-aux/depcomp
149 build-aux/config.guess
150 build-aux/config.sub
151 doc/INSTALL
152 "
153
154 # Relative path to the local gnulib submodule, and url to the upstream
155 # git repository. If you have a gnulib entry in your .gitmodules file,
156 # these values are ignored.
157 gnulib_path=
158 gnulib_url=
159
160 # Date from which to clone github, to avoid a full clone.
161 gnulib_clone_since=
162
163 # Additional gnulib-tool options to use.
164 gnulib_tool_options="
165 --no-changelog
166 "
167
168 # bootstrap removes any macro-files that are not included by aclocal.m4,
169 # except for files listed in this variable that are always kept.
170 gnulib_precious="
171 gnulib-tool.m4
172 "
173
174 # When truncating long commands for display, always allow at least this
175 # many characters before truncating.
176 min_cmd_len=160
177
178 # The command to download all .po files for a specified domain into
179 # a specified directory. Fill in the first %s is the domain name, and
180 # the second with the destination directory. Use rsync's -L and -r
181 # options because the latest/%s directory and the .po files within are
182 # all symlinks.
183 po_download_command_format=\
184 "rsync --delete --exclude '*.s1' -Lrtvz \
185 'translationproject.org::tp/latest/%s/' '%s'"
186
187 # Other locale categories that need message catalogs.
188 extra_locale_categories=
189
190 # Additional xgettext options to use. Gnulib might provide you with an
191 # extensive list of additional options to append to this, but gettext
192 # 0.16.1 and newer appends them automaticaly, so you can safely ignore
193 # the complaints from 'gnulib-tool' if your $configure_ac states:
194 #
195 # AM_GNU_GETTEXT_VERSION([0.16.1])
196 xgettext_options="
197 --flag=_:1:pass-c-format
198 --flag=N_:1:pass-c-format
199 "
200
201 # Package copyright holder for gettext files. Defaults to FSF if unset.
202 copyright_holder=
203
204 # File that should exist in the top directory of a checked out hierarchy,
205 # but not in a distribution tarball.
206 checkout_only_file=
207
208 # Whether to use copies instead of symlinks by default (if set to true,
209 # the --copy option has no effect).
210 copy=false
211
212 # Set this to ".cvsignore .gitignore" in 'bootstrap.conf' if you want
213 # those files to be generated in directories like 'lib/', 'm4/', and 'po/',
214 # or set it to "auto" to make this script select what to use based
215 # on what version control system (if any) is used in the source directory.
216 # Or set it to "none" to ignore VCS ignore files entirely. Default is
217 # "auto".
218 vc_ignore=
219
220
221 ## ------------------- ##
222 ## External Libraries. ##
223 ## ------------------- ##
224
225 # Source required external libraries:
226 . `echo "$0" |${SED-sed} 's|[^/]*$||'`"funclib.sh"
227 . `echo "$0" |${SED-sed} 's|[^/]*$||'`"options-parser"
228 . `echo "$0" |${SED-sed} 's|[^/]*$||'`"extract-trace"
229
230 # Set a version string for *this* script.
231 scriptversion=2019-03-22.11; # UTC
232
233
234 ## ------------------- ##
235 ## Hookable functions. ##
236 ## ------------------- ##
237
238 # After 'bootstrap.conf' has been sourced, execution proceeds by calling
239 # 'func_bootstrap'. Wherever a function is decorated with
240 # 'func_hookable func_name', you will find a matching 'func_run_hooks
241 # func_name', which executes all functions added with 'func_add_hook
242 # func_name my_func'.
243 #
244 # You might notice that many of these functions begin with a series of
245 # '$require_foo' lines. See the docu-comments at the start of the
246 # 'Resource management' section for a description of what these are.
247
248
249 # func_bootstrap [ARG]...
250 # -----------------------
251 # All the functions called inside func_bootstrap are hookable. See the
252 # the individual implementations for details.
253 func_bootstrap ()
254 {
255 $debug_cmd
256
257 # Save the current positional parameters to prevent them being
258 # corrupted by calls to 'set' in 'func_init'.
259 func_quote eval ${1+"$@"}
260 _G_saved_positional_parameters=$func_quote_result
261
262 # Initialisation.
263 func_init
264
265 # Option processing.
266 eval func_options "$_G_saved_positional_parameters"
267
268 # Post-option preparation.
269 func_prep
270
271 # Reconfigure the package.
272 func_reconfigure
273
274 # Ensure .version is up-to-date.
275 func_update_dotversion
276
277 # Finalisation.
278 func_fini
279 }
280
281
282 # func_init
283 # ---------
284 # Any early initialisations can be hooked to this function. Consider
285 # whether you can hook onto 'func_prep' instead, because if you hook
286 # any slow to execute code in here, it will also add to the time before
287 # './bootstrap --version' can respond.
288 func_hookable func_init
289 func_init ()
290 {
291 $debug_cmd
292
293 func_run_hooks func_init
294 }
295
296
297 # func_prep
298 # ---------
299 # Function to perform preparation for remaining bootstrap process. If
300 # your hooked code relies on the outcome of 'func_options' hook it here
301 # rather than to 'func_init'.
302 #
303 # All the functions called inside func_prep are hookable. See the
304 # individual implementations for details.
305 func_hookable func_prep
306 func_prep ()
307 {
308 $debug_cmd
309
310 $require_buildtools_uptodate
311 $require_checkout_only_file
312
313 $require_gnulib_merge_changelog
314
315 # Report the results of SED and GREP searches from funclib.sh.
316 func_verbose "GREP='$GREP'"
317 func_verbose "SED='$SED'"
318
319 # fetch update files from the translation project
320 func_update_translations
321
322 func_run_hooks func_prep
323 }
324
325
326 # func_update_translations
327 # ------------------------
328 # Update package po files and translations.
329 func_hookable func_update_translations
330 func_update_translations ()
331 {
332 $debug_cmd
333
334 $opt_skip_po || {
335 test -d po && {
336 $require_package
337
338 func_update_po_files po $package || exit $?
339 }
340
341 func_run_hooks func_update_translations
342 }
343 }
344
345
346 # func_reconfigure
347 # ----------------
348 # Reconfigure the current package by running the appropriate autotools in a
349 # suitable order.
350 func_hookable func_reconfigure
351 func_reconfigure ()
352 {
353 $debug_cmd
354
355 $require_automake_options
356
357 # Automake (without 'foreign' option) requires that NEWS & README exist.
358 case " $automake_options " in
359 " foreign ") ;;
360 *)
361 func_ensure_NEWS
362 func_ensure_README
363 ;;
364 esac
365
366 # Ensure ChangeLog presence.
367 if test -n "$gnulib_modules"; then
368 func_ifcontains "$gnulib_modules" gitlog-to-changelog \
369 func_ensure_changelog
370 else
371 $require_gnulib_cache
372 if $SED -n '/^gl_MODULES(\[/,/^])$/p' $gnulib_cache 2>/dev/null |
373 func_grep_q gitlog-to-changelog
374 then
375 func_ensure_changelog
376 fi
377 fi
378
379 # Released 'autopoint' has the tendency to install macros that have
380 # been obsoleted in current 'gnulib', so run this before 'gnulib-tool'.
381 func_autopoint
382
383 # Autoreconf runs 'aclocal' before 'libtoolize', which causes spurious
384 # warnings if the initial 'aclocal' is confused by the libtoolized
385 # (or worse: out-of-date) macro directory.
386 func_libtoolize
387
388 # If you need to do anything after 'gnulib-tool' is done, but before
389 # 'autoreconf' runs, you don't need to override this whole function,
390 # because 'func_gnulib_tool' is hookable.
391 func_gnulib_tool
392
393 func_autoreconf
394
395 func_run_hooks func_reconfigure
396 }
397
398
399 # func_gnulib_tool
400 # ----------------
401 # Run 'gnulib-tool' to fetch gnulib modules into the current package.
402 #
403 # It's assumed that since you are using gnulib's 'bootstrap' script,
404 # you're also using gnulib elsewhere in your package. If not, then
405 # you can replace this function in 'bootstrap.conf' with:
406 #
407 # func_gnulib_tool () { :; }
408 #
409 # (although the function returns immediately if $gnulib_tool is set to
410 # true in any case).
411 func_hookable func_gnulib_tool
412 func_gnulib_tool ()
413 {
414 $debug_cmd
415
416 $require_gnulib_tool
417 $require_libtoolize
418
419 test true = "$gnulib_tool" || {
420 $require_gnulib_git_submodules
421
422 # bootstrap.conf written for gnulib bootstrap expects
423 # gnulib_tool_option_extras to which --no-changelog is appended,
424 # but libtool bootstrap expects you to append to gnulib_tool_options
425 # so that you can override the --no-changelog default: make sure we
426 # support both styles so users can migrate between them easily.
427 gnulib_tool_all_options="$gnulib_tool_options $gnulib_tool_option_extras"
428
429 if test -n "$gnulib_modules"; then
430 $require_gnulib_cache
431 $require_gnulib_tool_base_options
432
433 gnulib_mode=--import
434
435 # Try not to pick up any stale values from 'gnulib-cache.m4'.
436 rm -f "$gnulib_cache"
437
438 test -n "$gnulib_tool_base_options" \
439 && func_append_uniq gnulib_tool_all_options " $gnulib_tool_base_options"
440 test -n "$gnulib_mk" \
441 && func_append_uniq gnulib_tool_all_options " --makefile-name=$gnulib_mk"
442 test -n "$tests_base" && {
443 func_append_uniq gnulib_tool_all_options " --tests-base=$tests_base"
444 func_append_uniq gnulib_tool_all_options " --with-tests"
445 }
446 else
447
448 # 'gnulib_modules' and others are cached in 'gnulib-cache.m4':
449 # Use 'gnulib --update' to fetch gnulib modules.
450 gnulib_mode=--update
451 fi
452
453 # Add a sensible default libtool option to gnulib_tool_options.
454 # The embedded echo is to squash whitespace before globbing.
455 case `echo " "$gnulib_tool_all_options" "` in
456 *" --no-libtool "*|*" --libtool "*) ;;
457 *) if test true = "$LIBTOOLIZE"; then
458 func_append_uniq gnulib_tool_all_options " --no-libtool"
459 else
460 func_append_uniq gnulib_tool_all_options " --libtool"
461 fi
462 ;;
463 esac
464
465 $opt_copy || func_append_uniq gnulib_tool_all_options " --symlink"
466
467 func_append_uniq gnulib_tool_all_options " $gnulib_mode"
468 func_append gnulib_tool_all_options " $gnulib_modules"
469
470 # The embedded echo is to squash whitespace before display.
471 gnulib_cmd=`echo $gnulib_tool $gnulib_tool_all_options`
472
473 func_show_eval "$gnulib_cmd" 'exit $?'
474
475 # Use 'gnulib-tool --copy-file' to install non-module files.
476 func_install_gnulib_non_module_files
477 }
478
479 func_run_hooks func_gnulib_tool
480 }
481
482
483 # func_fini
484 # ---------
485 # Function to perform all finalisation for the bootstrap process.
486 func_hookable func_fini
487 func_fini ()
488 {
489 $debug_cmd
490
491 func_gettext_configuration
492 func_clean_dangling_symlinks
493 func_clean_unused_macros
494 func_skip_po_recommendation
495
496 func_run_hooks func_fini
497
498 $require_bootstrap_uptodate
499
500 func_echo "Done. Now you can run './configure'."
501 }
502
503
504 # func_gettext_configuration
505 # --------------------------
506 # Edit configuration values into po/Makevars.
507 func_hookable func_gettext_configuration
508 func_gettext_configuration ()
509 {
510 $debug_cmd
511
512 $require_autopoint
513
514 test true = "$AUTOPOINT" || {
515 $require_copyright_holder
516 $require_extra_locale_categories
517 $require_package_bugreport
518
519 # Escape xgettext options for sed Makevars generation below.
520 # We have to delete blank lines in a separate script so that we don't
521 # append \\\ to the penultimate line, and then delete the last empty
522 # line, which messes up the variable substitution later in this
523 # function. Note that adding a literal \\\ requires double escaping
524 # here, once for the execution subshell, and again for the assignment,
525 # which is why there are actually 12 (!!) backslashes in the script.
526 _G_xgettext_options=`echo "$xgettext_options$nl" |$SED '/^$/d' |$SED '
527 $b
528 s|$| \\\\\\\\\\\\|'`
529
530 # Create gettext configuration.
531 func_echo "Creating po/Makevars from po/Makevars.template ..."
532 $RM -f po/Makevars
533 $SED '
534 /^EXTRA_LOCALE_CATEGORIES *=/s|=.*|= '"$extra_locale_categories"'|
535 /^COPYRIGHT_HOLDER *=/s|=.*|= '"$copyright_holder"'|
536 /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$package_bugreport"'|
537 /^XGETTEXT_OPTIONS *=/{
538 s|$| \\|
539 a\
540 '"$_G_xgettext_options"' \\\
541 $${end_of_xgettext_options+}
542 }
543 s/ *$//
544 ' po/Makevars.template >po/Makevars || exit 1
545 }
546
547 func_run_hooks func_gettext_configuration
548 }
549
550
551
552 ## --------------- ##
553 ## Core functions. ##
554 ## --------------- ##
555
556 # This section contains the main functions called from the 'Hookable
557 # functions' (shown above), and are the ones you're most likely
558 # to want to replace with your own implementations in 'bootstrap.conf'.
559
560
561 # func_autopoint
562 # --------------
563 # If this package uses gettext, then run 'autopoint'.
564 func_autopoint ()
565 {
566 $debug_cmd
567
568 $require_autopoint
569
570 test true = "$AUTOPOINT" \
571 || func_show_eval "$AUTOPOINT --force" 'exit $?'
572 }
573
574
575 # func_libtoolize
576 # ---------------
577 # If this package uses libtool, then run 'libtoolize'.
578 func_libtoolize ()
579 {
580 $debug_cmd
581
582 $require_libtoolize
583
584 test true = "$LIBTOOLIZE" || {
585 _G_libtoolize_options=
586 $opt_copy && func_append _G_libtoolize_options " --copy"
587 $opt_force && func_append _G_libtoolize_options " --force"
588 $opt_verbose || func_append _G_libtoolize_options " --quiet"
589 func_show_eval "$LIBTOOLIZE$_G_libtoolize_options" 'exit $?'
590 }
591 }
592
593
594 # func_gnulib_tool_copy_file SRC DEST
595 # -----------------------------------
596 # Copy SRC, a path relative to the gnulib sub-tree, to DEST, a path
597 # relative to the top-level source directory using gnulib-tool so that
598 # any patches or replacements in $local_gl_path are applied.
599 func_gnulib_tool_copy_file ()
600 {
601 $debug_cmd
602
603 $require_gnulib_tool
604 $require_patch
605
606 if test true = "$gnulib_tool"; then
607 # If gnulib-tool is not available (e.g. bootstrapping in a
608 # distribution tarball), make sure that at least we have some
609 # version of the required file already in place.
610 test -f "$2" || func_fatal_error "\
611 Can't find, copy or download '$2', a required
612 gnulib supplied file, please provide the location of a
613 complete 'gnulib' tree by setting 'gnulib_path' in your
614 'bootstrap.conf' or with the '--gnulib-srcdir' option -
615 or else specify the location of your 'git' binary by
616 setting 'GIT' in the environment so that a fresh
617 'gnulib' submodule can be cloned."
618 else
619 $require_gnulib_copy_cmd
620
621 $gnulib_copy_cmd $1 $2 2>/dev/null || {
622 $require_gnulib_path
623
624 func_error "'$gnulib_path/$1' does not exist"
625 return 1
626 }
627 fi
628 }
629
630
631 # func_install_gnulib_non_module_files
632 # ------------------------------------
633 # Get additional non-module files from gnulib, overriding existing files.
634 func_install_gnulib_non_module_files ()
635 {
636 $debug_cmd
637
638 $require_build_aux
639 $require_gnulib_tool
640
641 test -n "$gnulib_non_module_files" && {
642 maybe_exit_cmd=:
643
644 for file in $gnulib_non_module_files; do
645 case $file in
646 */COPYING*) dest=COPYING;;
647 */INSTALL) dest=INSTALL;;
648 build-aux/missing) dest=
649 func_warning settings "\
650 Please remove build-aux/missing from gnulib_module_files in
651 'bootstrap.conf', as it may clash with Automake's version."
652 ;;
653 build-aux/*) dest=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;;
654 *) dest=$file;;
655 esac
656
657 # Be sure to show all copying errors before bailing out
658 test -z "$dest" \
659 || func_gnulib_tool_copy_file "$file" "$dest" \
660 || maybe_exit_cmd="exit $EXIT_FAILURE"
661 done
662
663 $maybe_exit_cmd
664 }
665 }
666
667
668 # func_ensure_changelog
669 # ---------------------
670 # Even with 'gitlog-to-changelog' generated ChangeLogs, automake
671 # will not run to completion with no ChangeLog file.
672 func_ensure_changelog ()
673 {
674 $debug_cmd
675
676 test -f ChangeLog && mv -f ChangeLog ChangeLog~
677
678 cat >ChangeLog <<'EOT'
679 ## ---------------------- ##
680 ## DO NOT EDIT THIS FILE! ##
681 ## ---------------------- ##
682
683 ChangeLog is generated by gitlog-to-changelog.
684 EOT
685
686 _G_message="creating dummy 'ChangeLog'"
687 test -f ChangeLog~ \
688 && func_append _G_message ' (backup in ChangeLog~)'
689 func_verbose "$_G_message"
690
691 return 0
692 }
693
694
695 # func_ensure_NEWS
696 # ----------------
697 # Without AM_INIT_AUTOMAKE([foreign]), automake will not run to
698 # completion with no NEWS file, even though NEWS.md or NEWS.txt
699 # is often preferable.
700 func_ensure_NEWS ()
701 {
702 $debug_cmd
703
704 test -f NEWS || {
705 _G_NEWS=
706 for _G_news in NEWS.txt NEWS.md NEWS.rst; do
707 test -f "$_G_news" && break
708 done
709
710 test -f "$_G_news" && $LN_S $_G_news NEWS
711 func_verbose "$LN_S $_G_news NEWS"
712 }
713
714 return 0
715 }
716
717
718 # func_ensure_README
719 # ------------------
720 # Without AM_INIT_AUTOMAKE([foreign]), automake will not run to
721 # completion with no README file, even though README.md or README.txt
722 # is often preferable.
723 func_ensure_README ()
724 {
725 $debug_cmd
726
727 test -f README || {
728 _G_README=
729 for _G_readme in README.txt README.md README.rst; do
730 test -f "$_G_readme" && break
731 done
732
733 test -f "$_G_readme" && $LN_S $_G_readme README
734 func_verbose "$LN_S $_G_readme README"
735 }
736
737 return 0
738 }
739
740
741 # func_autoreconf [SUBDIR]
742 # ------------------------
743 # Being careful not to re-run 'autopoint' or 'libtoolize', and not to
744 # try to run 'autopoint', 'libtoolize' or 'autoheader' on packages that
745 # don't use them, defer to 'autoreconf' for execution of the remaining
746 # autotools to bootstrap this package.
747 #
748 # Projects with multiple trees to reconfigure can hook another call to
749 # this function onto func_reconfigure:
750 #
751 # my_autoreconf_foo ()
752 # {
753 # func_autoreconf foo
754 # }
755 # func_add_hook func_reconfigure my_autoreconf_foo
756 func_autoreconf ()
757 {
758 $debug_cmd
759
760 $require_autoheader
761 $require_build_aux # automake and others put files in here
762 $require_macro_dir # aclocal and others put files in here
763
764 # We ran these manually already, and autoreconf won't exec ':'
765 save_AUTOPOINT=$AUTOPOINT; AUTOPOINT=true
766 save_LIBTOOLIZE=$LIBTOOLIZE; LIBTOOLIZE=true
767
768 _G_autoreconf_options=
769 $opt_copy || func_append _G_autoreconf_options " --symlink"
770 $opt_force && func_append _G_autoreconf_options " --force"
771 $opt_verbose && func_append _G_autoreconf_options " --verbose"
772 func_show_eval "$AUTORECONF$_G_autoreconf_options --install${1+ $1}" 'exit $?'
773
774 AUTOPOINT=$save_AUTOPOINT
775 LIBTOOLIZE=$save_LIBTOOLIZE
776 }
777
778
779 # func_check_configuration VARNAME [CONFIGURE_MACRO]
780 # --------------------------------------------------
781 # Exit with a suitable diagnostic for an important configuration change
782 # that needs to be made before bootstrap can run correctly.
783 func_check_configuration ()
784 {
785 $debug_cmd
786
787 $require_configure_ac
788
789 eval 'test -n "$'$1'"' || {
790 _G_error_msg="please set '$1' in 'bootstrap.conf'"
791 if test -n "$configure_ac" && test -n "$2"; then
792 func_append _G_error_msg "
793 or add the following (or similar) to your '$configure_ac':
794 $2"
795 fi
796
797 func_fatal_error "$_G_error_msg"
798 }
799 }
800
801
802 # func_clean_dangling_symlinks
803 # ----------------------------
804 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
805 # gnulib-populated directories. Such .m4 files would cause aclocal to
806 # fail. The following requires GNU find 4.2.3 or newer. Considering
807 # the usual portability constraints of this script, that may seem a very
808 # demanding requirement, but it should be ok. Ignore any failure,
809 # which is fine, since this is only a convenience to help developers
810 # avoid the relatively unusual case where a symlinked-to .m4 file is
811 # git-removed from gnulib between successive runs of this script.
812 func_clean_dangling_symlinks ()
813 {
814 $debug_cmd
815
816 $require_macro_dir
817 $require_source_base
818
819 func_verbose "cleaning dangling symlinks"
820
821 find "$macro_dir" "$source_base" \
822 -depth \( -name '*.m4' -o -name '*.[ch]' \) \
823 -type l -xtype l -delete > /dev/null 2>&1
824 }
825
826
827 # func_clean_unused_macros
828 # ------------------------
829 # Autopoint can result in over-zealously adding macros into $macro_dir
830 # even though they are not actually used, for example tests to help
831 # build the 'intl' directory even though you have specified
832 # 'AM_GNU_GETTEXT([external])' in your configure.ac. This function
833 # looks removes any macro files that can be found in gnulib, but
834 # are not 'm4_include'd by 'aclocal.m4'.
835 func_clean_unused_macros ()
836 {
837 $debug_cmd
838
839 $require_gnulib_path
840 $require_macro_dir
841
842 test -n "$gnulib_path" && test -f aclocal.m4 && {
843 aclocal_m4s=`find . -name aclocal.m4 -print`
844
845 # We use 'ls|grep' instead of 'ls *.m4' to avoid exceeding
846 # command line length limits in some shells.
847 for file in `cd "$macro_dir" && ls -1 |$GREP '\.m4$'`; do
848
849 # Remove a macro file when aclocal.m4 does not m4_include it...
850 func_grep_q 'm4_include([[]'$macro_dir/$file'])' $aclocal_m4s \
851 || test ! -f "$gnulib_path/m4/$file" || {
852
853 # ...and there is an identical file in gnulib...
854 if func_cmp_s "$gnulib_path/m4/$file" "$macro_dir/$file"; then
855
856 # ...and it's not in the precious list ('echo' is needed
857 # here to squash whitespace for the match expression).
858 case " "`echo $gnulib_precious`" " in
859 *" $file "*) ;;
860 *) rm -f "$macro_dir/$file"
861 func_verbose \
862 "removing unused gnulib file '$macro_dir/$file'"
863 esac
864 fi
865 }
866 done
867 }
868 }
869
870
871 # func_skip_po_recommendation
872 # ---------------------------
873 # If there is a po directory, and '--skip-po' wasn't passed, let the
874 # user know that they can use '--skip-po' on subsequent invocations.
875 func_skip_po_recommendation ()
876 {
877 $debug_cmd
878
879 test ! -d po \
880 || $opt_skip_po \
881 || func_warning recommend "\
882 If your pofiles are up-to-date, you can rerun bootstrap
883 as '$progname --skip-po' to avoid redownloading."
884 }
885
886
887 # func_update_dotversion
888 # ----------------------
889 # Even with 'gitlog-to-changelog' generated ChangeLogs, automake
890 # will not run to completion with no ChangeLog file.
891 func_update_dotversion ()
892 {
893 $debug_cmd
894
895 test -f "$build_aux/git-version-gen" && {
896 _G_message="updating .version"
897 test -f .version && {
898 mv .version .version~
899 func_append _G_message " (backup in .version~)"
900 }
901 func_verbose "updating .version"
902
903 $build_aux/git-version-gen dummy-arg > .version
904 }
905 }
906
907
908
909 ## -------------------- ##
910 ## Resource management. ##
911 ## -------------------- ##
912
913 # This section contains definitions for functions that each ensure a
914 # particular resource (a file, or a non-empty configuration variable for
915 # example) is available, and if appropriate to extract default values
916 # from pertinent package files. Where a variable already has a non-
917 # empty value (as set by the package's 'bootstrap.conf'), that value is
918 # used in preference to deriving the default. Call them using their
919 # associated 'require_*' variable to ensure that they are executed, at
920 # most, once.
921
922
923 # require_gnulib_git_submodules
924 # -----------------------------
925 # Initialize all git modules from $gnulib_git_submodules before we
926 # run 'gnulib-tool'.
927 require_gnulib_git_submodules=func_require_gnulib_git_submodules
928 func_require_gnulib_git_submodules ()
929 {
930 test -n "$gnulib_git_submodules" && {
931 for _G_submodule in $gnulib_git_submodules
932 do
933 func_show_eval "git submodule init -- $_G_submodule" \
934 && func_show_eval "git submodule update -- $_G_submodule" \
935 || func_fatal_error "Unable to init git module '$_G_submodule'."
936 done
937 }
938
939 require_gnulib_git_submodules=:
940 }
941
942
943 # require_checkout_only_file
944 # --------------------------
945 # Bail out if this package only bootstraps properly from a repository
946 # checkout.
947 require_checkout_only_file=func_require_checkout_only_file
948 func_require_checkout_only_file ()
949 {
950 $debug_cmd
951
952 $opt_force || {
953 test -n "$checkout_only_file" && test ! -f "$checkout_only_file" \
954 && func_fatal_error "\
955 Bootstrapping from a non-checked-out distribution is risky.
956 If you wish to bootstrap anyway, use the '--force' option."
957 }
958
959 require_checkout_only_file=:
960 }
961
962
963 # require_aclocal_amflags
964 # -----------------------
965 # Ensure '$aclocal_amflags' has a sensible default, extracted from
966 # 'Makefile.am' if necessary.
967 require_aclocal_amflags=func_require_aclocal_amflags
968 func_require_aclocal_amflags ()
969 {
970 $debug_cmd
971
972 $require_makefile_am
973
974 _G_sed_extract_aclocal_amflags='s|#.*$||
975 /^[ ]*ACLOCAL_AMFLAGS[ ]*=/ {
976 s|^.*=[ ]*\(.*\)|aclocal_amflags="\1"|
977 p
978 }'
979
980 _G_aclocal_flags_cmd=`$SED -n "$_G_sed_extract_aclocal_amflags" \
981 "$makefile_am"`
982 eval "$_G_aclocal_flags_cmd"
983
984 func_verbose "ACLOCAL_AMFLAGS='$aclocal_amflags'"
985
986 require_aclocal_amflags=:
987 }
988
989
990 # require_autoheader
991 # ------------------
992 # Skip autoheader if it's not needed.
993 require_autoheader=func_require_autoheader
994 func_require_autoheader ()
995 {
996 $debug_cmd
997
998 test true = "$AUTOHEADER" || {
999 func_extract_trace AC_CONFIG_HEADERS
1000 test -n "$func_extract_trace_result" \
1001 || func_extract_trace AC_CONFIG_HEADER
1002
1003 test -n "$func_extract_trace_result" || {
1004 AUTOHEADER=true
1005
1006 func_verbose "export AUTOHEADER='$AUTOHEADER'"
1007
1008 # Make sure the search result is visible to subshells
1009 export AUTOHEADER
1010 }
1011 }
1012
1013 require_autoheader=:
1014 }
1015
1016
1017 # require_automake_options
1018 # ------------------------
1019 # Extract options from AM_AUTOMAKE_INIT.
1020 require_automake_options=func_require_automake_options
1021 func_require_automake_options ()
1022 {
1023 $debug_cmd
1024
1025 func_extract_trace AM_INIT_AUTOMAKE
1026 automake_options=$func_extract_trace_result
1027
1028 require_automake_options=:
1029 }
1030
1031
1032 # require_autopoint
1033 # -----------------
1034 # Skip autopoint if it's not needed.
1035 require_autopoint=func_require_autopoint
1036 func_require_autopoint ()
1037 {
1038 $debug_cmd
1039
1040 test true = "$AUTOPOINT" || {
1041 func_extract_trace AM_GNU_GETTEXT_VERSION
1042
1043 test -n "$func_extract_trace_result" || {
1044 AUTOPOINT=true
1045
1046 func_verbose "export AUTOPOINT='$AUTOPOINT'"
1047
1048 # Make sure the search result is visible to subshells
1049 export AUTOPOINT
1050 }
1051 }
1052
1053 require_autopoint=:
1054 }
1055
1056
1057 # require_bootstrap_uptodate
1058 # --------------------------
1059 # Complain if the version of bootstrap in the gnulib directory differs
1060 # from the one we are running.
1061 require_bootstrap_uptodate=func_require_bootstrap_uptodate
1062 func_require_bootstrap_uptodate ()
1063 {
1064 $debug_cmd
1065
1066 $require_build_aux
1067
1068 _G_bootstrap_sources="
1069 $build_aux/bootstrap.in
1070 $build_aux/extract-trace
1071 $build_aux/funclib.sh
1072 $build_aux/options-parser
1073 "
1074
1075 _G_missing_bootstrap_sources=false
1076 for _G_src in $_G_bootstrap_sources; do
1077 test -f "$_G_src" || _G_missing_bootstrap_sources=:
1078 done
1079
1080 if $_G_missing_bootstrap_sources; then
1081 func_warning upgrade "\
1082 Please add bootstrap to your gnulib_modules list in
1083 'bootstrap.conf', so that I can tell you when there are
1084 updates available."
1085 else
1086 rm -f bootstrap.new
1087 $build_aux/inline-source $build_aux/bootstrap.in > bootstrap.new
1088
1089 if func_cmp_s "$progpath" bootstrap.new; then
1090 rm -f bootstrap.new
1091 func_verbose "bootstrap script up to date"
1092 else
1093 chmod 555 bootstrap.new
1094 func_warning upgrade "\
1095 An updated bootstrap script has been generated for you in
1096 'bootstrap.new'. After you've verified that you want
1097 the changes, you can update with:
1098 mv -f bootstrap.new $progname
1099 ./$progname
1100
1101 Or you can disable this check permanently by adding the
1102 following to 'bootstrap.conf':
1103 require_bootstrap_uptodate=:"
1104 fi
1105 fi
1106
1107 require_bootstrap_uptodate=:
1108 }
1109
1110
1111 # require_build_aux
1112 # -----------------
1113 # Ensure that '$build_aux' is set, and if it doesn't already point to an
1114 # existing directory, create one.
1115 require_build_aux=func_require_build_aux
1116 func_require_build_aux ()
1117 {
1118 $debug_cmd
1119
1120 test -n "$build_aux" || {
1121 func_extract_trace_first AC_CONFIG_AUX_DIR
1122 build_aux=$func_extract_trace_first_result
1123 func_check_configuration build_aux \
1124 "AC_CONFIG_AUX_DIR([name of a directory for build scripts])"
1125
1126 func_verbose "build_aux='$build_aux'"
1127 }
1128
1129 $require_vc_ignore_files
1130
1131 # If the build_aux directory doesn't exist, create it now, and mark it
1132 # as ignored for the VCS.
1133 if test ! -d "$build_aux"; then
1134 func_show_eval "mkdir '$build_aux'"
1135
1136 test -n "$vc_ignore_files" \
1137 || func_insert_if_absent "$build_aux" $vc_ignore_files
1138 fi
1139
1140 require_build_aux=:
1141 }
1142
1143
1144 # require_buildreq_autobuild
1145 # --------------------------
1146 # Try to find whether the bootstrap requires autobuild.
1147 require_buildreq_autobuild=func_require_buildreq_autobuild
1148 func_require_buildreq_autobuild ()
1149 {
1150 $debug_cmd
1151
1152 $require_macro_dir
1153
1154 test -f "$macro_dir/autobuild.m4" \
1155 || printf '%s\n' "$buildreq" |func_grep_q '^[ ]*autobuild' \
1156 || {
1157 func_extract_trace AB_INIT
1158 test -n "$func_extract_trace_result" && {
1159 func_append buildreq 'autobuild - http://josefsson.org/autobuild/
1160 '
1161 func_verbose "auto-adding 'autobuild' to build requirements"
1162 }
1163 }
1164
1165 require_buildreq_autobuild=:
1166 }
1167
1168
1169 # require_buildreq_autoconf
1170 # require_buildreq_autopoint
1171 # require_buildreq_libtoolize
1172 # ---------------------------
1173 # Try to find the minimum compatible version of autoconf/libtool
1174 # required to bootstrap successfully, and add it to '$buildreq'.
1175 for tool in autoconf libtoolize autopoint; do
1176 b=$tool
1177 v=require_buildreq_${tool}
1178 f=func_$v
1179 case $tool in
1180 autoconf) m=AC_PREREQ ;;
1181 libtoolize) m=LT_PREREQ; b=libtool ;;
1182 autopoint) m=AM_GNU_GETTEXT_VERSION b=gettext ;;
1183 esac
1184
1185 eval $v'='$f'
1186 '$f' ()
1187 {
1188 $debug_cmd
1189
1190 # The following is ignored if undefined, but might be necessary
1191 # in order for `func_find_tool` to run.
1192 ${require_'$tool'-:}
1193
1194 printf '\''%s\n'\'' "$buildreq" |func_grep_q '\''^[ ]*'$tool\'' || {
1195 func_extract_trace '$m'
1196 _G_version=$func_extract_trace_result
1197 test -n "$_G_version" && {
1198 func_append buildreq "\
1199 '$tool' $_G_version http://www.gnu.org/s/'$b'
1200 "
1201 func_verbose \
1202 "auto-adding '\'$tool'-$_G_version'\'' to build requirements"
1203 }
1204 }
1205
1206 '$v'=:
1207 }
1208 '
1209 done
1210
1211
1212 # require_buildreq_automake
1213 # -------------------------
1214 # Try to find the minimum compatible version of automake required to
1215 # bootstrap successfully, and add it to '$buildreq'.
1216 require_buildreq_automake=func_require_buildreq_automake
1217 func_require_buildreq_automake ()
1218 {
1219 $debug_cmd
1220
1221 # if automake is not already listed in $buildreq...
1222 printf '%s\n' "$buildreq" |func_grep_q automake || {
1223 func_extract_trace AM_INIT_AUTOMAKE
1224
1225 # ...and AM_INIT_AUTOMAKE is declared...
1226 test -n "$func_extract_trace_result" && {
1227 automake_version=`$ECHO "$func_extract_trace_result" \
1228 |$SED -e 's|[^0-9]*||' -e 's| .*$||'`
1229 test -n "$automake_version" || automake_version=-
1230
1231 func_append buildreq "\
1232 automake $automake_version http://www.gnu.org/s/automake
1233 "
1234 func_verbose \
1235 "auto-adding 'automake-$automake_version' to build requirements"
1236 }
1237 }
1238
1239 require_buildreq_automake=:
1240 }
1241
1242
1243 # require_buildreq_patch
1244 # ----------------------
1245 # Automatically add a patch build-requirement if there are diff files
1246 # in $local_gl_path.
1247 require_buildreq_patch=func_require_buildreq_patch
1248 func_require_buildreq_patch ()
1249 {
1250 $debug_cmd
1251
1252 $require_local_gl_path
1253
1254 # This ensures PATCH is set appropriately by the time
1255 # func_check_versions enforces $buildreq.
1256 $require_patch
1257
1258 # If patch is not already listed in $buildreq...
1259 printf '%s\n' "$buildreq" |func_grep_q '^[ ]*patch' || {
1260 eval "set dummy $local_gl_path_quoted" ; shift
1261
1262 for _G_dir
1263 do
1264 # The ugly find invocation is necessary to exit with non-zero
1265 # status for old find binaries that don't support -exec fully.
1266 if test ! -d "$_G_dir" \
1267 || find "$_G_dir" -name "*.diff" -exec false {} \; ; then :
1268 else
1269 func_append buildreq "patch - http://www.gnu.org/s/patch$nl"
1270 break
1271 fi
1272 done
1273 }
1274
1275 require_buildreq_patch=:
1276 }
1277
1278
1279 # require_buildtools_uptodate
1280 # ---------------------------
1281 # Ensure all the packages listed in BUILDREQS are available on the build
1282 # machine at the minimum versions or better.
1283 require_buildtools_uptodate=func_require_buildtools_uptodate
1284 func_require_buildtools_uptodate ()
1285 {
1286 $debug_cmd
1287
1288 $require_buildreq_autobuild
1289 $require_buildreq_autoconf
1290 $require_buildreq_automake
1291 $require_buildreq_libtoolize
1292 $require_buildreq_autopoint
1293 $require_buildreq_patch
1294
1295 test -n "$buildreq" && {
1296 _G_error_hdr=
1297
1298 func_check_versions $buildreq
1299 $func_check_versions_result || {
1300 test -n "$buildreq_readme" \
1301 && test -f "$buildreq_readme" \
1302 && _G_error_hdr="\
1303 $buildreq_readme explains how to obtain these prerequisite programs:
1304 "
1305 func_strtable 0 11 12 36 \
1306 "Program" "Min_version" "Homepage" $buildreq
1307 func_fatal_error "$_G_error_hdr$func_strtable_result"
1308 }
1309 }
1310
1311 require_buildtools_uptodate=:
1312 }
1313
1314
1315 # require_copyright_holder
1316 # ------------------------
1317 # Ensure there is a sensible non-empty default value in '$copyright_holder'.
1318 require_copyright_holder=func_require_copyright_holder
1319 func_require_copyright_holder ()
1320 {
1321 $debug_cmd
1322
1323 test -n "$copyright_holder" || {
1324 copyright_holder='Free Software Foundation, Inc.'
1325 func_warning settings "\
1326 Please set copyright_holder explicitly in 'bootstrap.conf';
1327 defaulting to '$copyright_holder'."
1328 }
1329
1330 require_copyright_holder=:
1331 }
1332
1333
1334 # require_doc_base
1335 # ----------------
1336 # Ensure doc_base has a sensible value, extracted from 'gnulib-cache.m4'
1337 # if possible, otherwise letting 'gnulib-tool' pick a default.
1338 require_doc_base=func_require_doc_base
1339 func_require_doc_base ()
1340 {
1341 $debug_cmd
1342
1343 $require_gnulib_cache
1344
1345 test -f "$gnulib_cache" && test -z "$doc_base" && {
1346 func_extract_trace_first "gl_DOC_BASE" "$gnulib_cache"
1347 doc_base=$func_extract_trace_first_result
1348
1349 test -n "$doc_base" && func_verbose "doc_base='$doc_base'"
1350 }
1351
1352 require_doc_base=:
1353 }
1354
1355
1356 # require_dotgitmodules
1357 # ---------------------
1358 # Ensure we have a '.gitmodules' file, with appropriate 'gnulib' settings.
1359 require_dotgitmodules=func_require_dotgitmodules
1360 func_require_dotgitmodules ()
1361 {
1362 $debug_cmd
1363
1364 $require_git
1365
1366 test true = "$GIT" || {
1367 # A gnulib entry in .gitmodules always takes precedence.
1368 _G_path=`$GIT config --file .gitmodules submodule.gnulib.path 2>/dev/null`
1369
1370 test -n "$_G_path" || {
1371 $require_vc_ignore_files
1372
1373 func_verbose "creating '.gitmodules'"
1374
1375 # If the .gitmodules file doesn't exist, create it now, and mark
1376 # it as ignored for the VCS.
1377 test -n "$gnulib_path" || gnulib_path=gnulib
1378 test -n "$gnulib_url" || gnulib_url=git://git.sv.gnu.org/gnulib
1379
1380 {
1381 echo '[submodule "gnulib"]'
1382 echo " path = $gnulib_path"
1383 echo " url = $gnulib_url"
1384 } >> .gitmodules
1385
1386 test -n "$vc_ignore_files" \
1387 || func_insert_if_absent ".gitmodules" $vc_ignore_files
1388 }
1389 }
1390
1391 require_dotgitmodules=:
1392 }
1393
1394
1395 # require_extra_locale_categories
1396 # -------------------------------
1397 # Ensure there is a default value in '$extra_locale_categories'
1398 require_extra_locale_categories=func_require_extra_locale_categories
1399 func_require_extra_locale_categories ()
1400 {
1401 $debug_cmd
1402
1403 # Defaults to empty, so run with whatever value may have been set in
1404 # 'bootstrap.conf'.
1405 require_extra_locale_categories=:
1406 }
1407
1408
1409 # require_git
1410 # -----------
1411 # Ignore git if it's not available, or we're not in a git checkout tree.
1412 require_git=func_require_git
1413 func_require_git ()
1414 {
1415 $debug_cmd
1416
1417 $opt_skip_git && GIT=true
1418
1419 test true = "$GIT" || {
1420 if test -d .git/.; then
1421 ($GIT --version) >/dev/null 2>&1 || GIT=true
1422 fi
1423 }
1424
1425 func_verbose "GIT='$GIT'"
1426
1427 require_git=:
1428 }
1429
1430
1431 # require_gnulib_cache
1432 # --------------------
1433 # Ensure there is a non-empty default for '$gnulib_cache', and that it
1434 # names an existing file.
1435 require_gnulib_cache=func_require_gnulib_cache
1436 func_require_gnulib_cache ()
1437 {
1438 $debug_cmd
1439
1440 $require_macro_dir
1441
1442 test -n "$gnulib_cache" \
1443 || gnulib_cache=$macro_dir/gnulib-cache.m4
1444
1445 func_verbose "found '$gnulib_cache'"
1446
1447 require_gnulib_cache=:
1448 }
1449
1450
1451 # require_gnulib_copy_cmd
1452 # -----------------------
1453 # Only calculate the options for copying files with gnulib once.
1454 require_gnulib_copy_cmd=func_require_gnulib_copy_cmd
1455 func_require_gnulib_copy_cmd ()
1456 {
1457 $debug_cmd
1458
1459 $require_gnulib_tool
1460 $require_gnulib_tool_base_options
1461
1462 gnulib_copy_cmd="$gnulib_tool $gnulib_tool_base_options --copy-file"
1463 $opt_copy || func_append gnulib_copy_cmd " --symlink"
1464 $opt_quiet || func_append gnulib_copy_cmd " --verbose"
1465
1466 require_gnulib_copy_cmd=:
1467 }
1468
1469
1470 # require_gnulib_merge_changelog
1471 # ------------------------------
1472 # See if we can use gnulib's git-merge-changelog merge driver.
1473 require_gnulib_merge_changelog=func_require_gnulib_merge_changelog
1474 func_require_gnulib_merge_changelog ()
1475 {
1476 $debug_cmd
1477
1478 test -f ChangeLog && {
1479 $require_git
1480
1481 func_grep_q '^\(/\|\)ChangeLog$' .gitignore || test true = "$GIT" || {
1482 if $GIT config merge.merge-changelog.driver >/dev/null; then
1483 :
1484 elif (git-merge-changelog --version) >/dev/null 2>&1; then
1485 func_echo "initializing git-merge-changelog driver"
1486 $GIT config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
1487 $GIT config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
1488 else
1489 func_warning recommend \
1490 "Consider installing git-merge-changelog from gnulib."
1491 fi
1492 }
1493 }
1494
1495 require_gnulib_merge_changelog=:
1496 }
1497
1498
1499 # require_gnulib_mk
1500 # -----------------
1501 # Ensure gnulib_mk has a sensible value, extracted from 'gnulib-cache.m4'
1502 # if possible, otherwise letting 'gnulib-tool' pick a default.
1503 require_gnulib_mk=func_require_gnulib_mk
1504 func_require_gnulib_mk ()
1505 {
1506 $debug_cmd
1507
1508 $require_gnulib_cache
1509
1510 test -f "$gnulib_cache" && test -z "$gnulib_mk" && {
1511 func_extract_trace_first "gl_MAKEFILE_NAME" "$gnulib_cache"
1512 gnulib_mk=$func_extract_trace_first_result
1513
1514 test -n "$gnulib_mk" && func_verbose "gnulib_mk='$gnulib_mk'"
1515 }
1516
1517 require_gnulib_mk=:
1518 }
1519
1520
1521 # require_gnulib_name
1522 # -------------------
1523 # Ensure gnulib_name has a sensible value, extracted from 'gnulib-cache.m4'
1524 # if possible, otherwise letting 'gnulib-tool' pick a default.
1525 require_gnulib_name=func_require_gnulib_name
1526 func_require_gnulib_name ()
1527 {
1528 $debug_cmd
1529
1530 $require_gnulib_cache
1531
1532 test -f "$gnulib_cache" && test -z "$gnulib_name" && {
1533 func_extract_trace_first "gl_LIB" "$gnulib_cache"
1534 gnulib_name=$func_extract_trace_first_result
1535
1536 test -n "$gnulib_name" && func_verbose "gnulib_name='$gnulib_name'"
1537 }
1538
1539 require_gnulib_name=:
1540 }
1541
1542
1543 # require_gnulib_path
1544 # require_gnulib_url
1545 # -------------------
1546 # Ensure 'gnulib_path' and 'gnulib_url' are set.
1547 require_gnulib_path=func_require_dotgitmodules_parameters
1548 require_gnulib_url=func_require_dotgitmodules_parameters
1549 func_require_dotgitmodules_parameters ()
1550 {
1551 $debug_cmd
1552
1553 $require_git
1554
1555 test true = "$GIT" && {
1556 # If we can't find git (or if the user specified '--skip-git'),
1557 # then use an existing gnulib directory specified with
1558 # '--gnulib-srcdir' if possible.
1559 test -n "$gnulib_path" \
1560 || test ! -x "$opt_gnulib_srcdir/gnulib-tool" \
1561 || gnulib_path=$opt_gnulib_srcdir
1562 }
1563
1564
1565 $require_dotgitmodules
1566
1567 test -f .gitmodules && {
1568 # Extract the parameters with sed, since git may be missing
1569 test -n "$gnulib_path" \
1570 || gnulib_path=`$SED -e '/^.submodule "gnulib".$/,${
1571 /[ ]*path *= */{
1572 s|[ ]*||g;s|^[^=]*=||;p
1573 }
1574 }
1575 d' .gitmodules |$SED 1q`
1576 test -n "$gnulib_url" \
1577 || gnulib_url=`$SED -e '/^.submodule "gnulib".$/,${
1578 /[ ]*url *= */{
1579 s|[ ]*||g;s|^[^=]*=||;p
1580 }
1581 }
1582 d' .gitmodules |$SED 1q`
1583
1584 func_verbose "gnulib_path='$gnulib_path'"
1585 func_verbose "gnulib_url='$gnulib_url'"
1586 }
1587
1588 require_gnulib_path=:
1589 require_gnulib_url=:
1590 }
1591
1592
1593 # require_gnulib_submodule
1594 # ------------------------
1595 # Ensure that there is a current gnulib submodule at '$gnulib_path'.
1596 require_gnulib_submodule=func_require_gnulib_submodule
1597 func_require_gnulib_submodule ()
1598 {
1599 $debug_cmd
1600
1601 $require_git
1602
1603 if test true = "$GIT"; then
1604 func_warning recommend \
1605 "No 'git' found; imported gnulib modules may be outdated."
1606 else
1607 $require_gnulib_path
1608 $require_gnulib_url
1609
1610 if test -f .gitmodules && test -f "$gnulib_path/gnulib-tool"; then
1611 : All present and correct.
1612
1613 elif test -n "$opt_gnulib_srcdir"; then
1614 # Older git can't clone into an empty directory.
1615 rmdir "$gnulib_path" 2>/dev/null
1616 func_show_eval "$GIT clone --reference '$opt_gnulib_srcdir' \
1617 '$gnulib_url' '$gnulib_path'" \
1618 || func_fatal_error "Unable to fetch gnulib submodule."
1619
1620 # Without --gnulib-srcdir, and no existing checked out submodule, we
1621 # create a new shallow clone of the remote gnulib repository.
1622 else
1623 trap func_cleanup_gnulib 1 2 13 15
1624
1625 shallow=
1626 test -n "$gnulib_clone_since" && \
1627 $GIT clone -h 2>&1 |func_grep_q -- --shallow-since \
1628 && shallow="--shallow-since=$gnulib_clone_since"
1629
1630 func_show_eval "$GIT clone $shallow '$gnulib_url' '$gnulib_path'" \
1631 func_cleanup_gnulib
1632
1633 # FIXME: Solaris /bin/sh will try to execute '-' if any of
1634 # these signals are caught after this.
1635 trap - 1 2 13 15
1636 fi
1637
1638 # Make sure we've checked out the correct revision of gnulib.
1639 func_show_eval "$GIT submodule init -- $gnulib_path" \
1640 && func_show_eval "$GIT submodule update -- $gnulib_path" \
1641 || func_fatal_error "Unable to update gnulib submodule."
1642 fi
1643
1644 require_gnulib_submodule=:
1645 }
1646
1647
1648 # require_gnulib_tool
1649 # -------------------
1650 # Ensure that '$gnulib_tool' is set, and points to an executable file,
1651 # or else fall back to using the binary 'true' if the main gnulib
1652 # files appear to have been imported already.
1653 require_gnulib_tool=func_require_gnulib_tool
1654 func_require_gnulib_tool ()
1655 {
1656 $debug_cmd
1657
1658 test true = "$gnulib_tool" || {
1659 $require_gnulib_submodule
1660 $require_gnulib_path
1661
1662 test -n "$gnulib_tool" \
1663 || gnulib_tool=$gnulib_path/gnulib-tool
1664
1665 test -x "$gnulib_tool" || {
1666 gnulib_tool=true
1667 func_warning recommend \
1668 "No 'gnulib-tool' found; gnulib modules may be missing."
1669 }
1670
1671 test true = "$gnulib_tool" \
1672 || func_verbose "found '$gnulib_tool'"
1673 }
1674
1675 require_gnulib_tool=:
1676 }
1677
1678
1679 # require_gnulib_tool_base_options
1680 # --------------------------------
1681 # Ensure that '$gnulib_tool_base_options' contains all the base options
1682 # required according to user configuration from bootstrap.conf.
1683 require_gnulib_tool_base_options=func_require_gnulib_tool_base_options
1684 func_require_gnulib_tool_base_options ()
1685 {
1686 $debug_cmd
1687
1688 $require_gnulib_tool
1689
1690 gnulib_tool_base_options=
1691
1692 test true = "$gnulib_tool" || {
1693 # 'gnulib_modules' and others are maintained in 'bootstrap.conf':
1694 # Use 'gnulib --import' to fetch gnulib modules.
1695 $require_build_aux
1696 test -n "$build_aux" \
1697 && func_append_uniq gnulib_tool_base_options " --aux-dir=$build_aux"
1698 $require_macro_dir
1699 test -n "$macro_dir" \
1700 && func_append_uniq gnulib_tool_base_options " --m4-base=$macro_dir"
1701 $require_doc_base
1702 test -n "$doc_base" \
1703 && func_append_uniq gnulib_tool_base_options " --doc-base=$doc_base"
1704 $require_gnulib_name
1705 test -n "$gnulib_name" \
1706 && func_append_uniq gnulib_tool_base_options " --lib=$gnulib_name"
1707 $require_local_gl_path
1708 test -n "$local_gl_path" && {
1709 eval "set dummy $local_gl_path_quoted" ; shift
1710 for _G_dir
1711 do
1712 func_append_uniq gnulib_tool_base_options " --local-dir=$_G_dir"
1713 done
1714 }
1715 $require_source_base
1716 test -n "$source_base" \
1717 && func_append_uniq gnulib_tool_base_options " --source-base=$source_base"
1718 }
1719
1720 require_gnulib_tool_base_options=:
1721 }
1722
1723
1724 # require_libtoolize
1725 # ------------------
1726 # Skip libtoolize if it's not needed.
1727 require_libtoolize=func_require_libtoolize
1728 func_require_libtoolize ()
1729 {
1730 $debug_cmd
1731
1732 # Unless we're not searching for libtool use by this package, set
1733 # LIBTOOLIZE to true if none of 'LT_INIT', 'AC_PROG_LIBTOOL' and
1734 # 'AM_PROG_LIBTOOL' are used in configure.
1735 test true = "$LIBTOOLIZE" || {
1736 func_extract_trace LT_INIT
1737 test -n "$func_extract_trace_result" || func_extract_trace AC_PROG_LIBTOOL
1738 test -n "$func_extract_trace_result" || func_extract_trace AM_PROG_LIBTOOL
1739 test -n "$func_extract_trace_result" || LIBTOOLIZE=true
1740 }
1741
1742 test -n "$LIBTOOLIZE" || {
1743 # Find libtoolize, named glibtoolize in Mac Ports, but prefer
1744 # user-installed libtoolize to ancient glibtoolize shipped by
1745 # Apple with Mac OS X when Mac Ports is not installed.
1746 func_find_tool LIBTOOLIZE libtoolize glibtoolize
1747 }
1748
1749 test -n "$LIBTOOLIZE" || func_fatal_error "\
1750 Please install GNU Libtool, or 'export LIBTOOLIZE=/path/to/libtoolize'."
1751
1752 func_verbose "export LIBTOOLIZE='$LIBTOOLIZE'"
1753
1754 # Make sure the search result is visible to subshells
1755 export LIBTOOLIZE
1756
1757 require_libtoolize=:
1758 }
1759
1760
1761 # require_local_gl_path
1762 # ---------------------
1763 # Ensure local_gl_path has a sensible value, extracted from 'gnulib-cache.m4' if
1764 # possible, otherwise letting 'gnulib-tool' pick a default.
1765 require_local_gl_path=func_require_local_gl_path
1766 func_require_local_gl_path ()
1767 {
1768 $debug_cmd
1769
1770 $require_gnulib_cache
1771
1772 # Compat with older bootstrap versions.
1773 test -n "$local_gl_dir" && {
1774 func_warning settings "\
1775 Please use 'local_gl_path' instead of 'local_gl_dir' in your
1776 'bootstrap.conf' file."
1777 local_gl_path=$local_gl_dir
1778 local_gl_dir=
1779 }
1780
1781 test -f "$gnulib_cache" && test -z "$local_gl_path" && {
1782 func_extract_trace_first "gl_LOCAL_DIR" "$gnulib_cache"
1783 local_gl_path=$func_extract_trace_first_result
1784 test -n "$local_gl_path" && func_verbose "local_gl_path='$local_gl_path'"
1785 }
1786
1787 test -z "$local_gl_path_quoted" && test -n "$local_gl_path" && {
1788 save_IFS=$IFS
1789 set dummy
1790 # Don't use PATH_SEPARATOR here, gnulib must be fixed to store only ':' as
1791 # path separator into gnulib-cache.m4 (consistency reasons among systems).
1792 IFS=:
1793 for _G_dir in $local_gl_path
1794 do
1795 set "$@" "$_G_dir"
1796 done
1797 shift
1798 IFS=$save_IFS
1799 func_quote eval "$@"
1800 local_gl_path_quoted=$func_quote_result
1801 }
1802
1803 require_local_gl_path=:
1804 }
1805
1806
1807 # require_macro_dir
1808 # -----------------
1809 # Ensure that '$macro_dir' is set, and if it doesn't already point to an
1810 # existing directory, create one.
1811 require_macro_dir=func_require_macro_dir
1812 func_require_macro_dir ()
1813 {
1814 $debug_cmd
1815
1816 # Sometimes this is stored in 'configure.ac'.
1817 test -n "$macro_dir" || {
1818 # AC_CONFIG_MACRO_DIRS takes a space delimited list of directories,
1819 # but we only care about the first one in bootstrap.
1820 func_extract_trace_first AC_CONFIG_MACRO_DIRS
1821 macro_dir=`expr "x$func_extract_trace_first_result" : 'x\([^ ]*\)'`
1822 }
1823 test -n "$macro_dir" || {
1824 func_extract_trace_first AC_CONFIG_MACRO_DIR
1825 macro_dir=$func_extract_trace_first_result
1826 }
1827
1828 # Otherwise we might find it in 'Makefile.am'.
1829 test -n "$macro_dir" || {
1830 $require_aclocal_amflags
1831
1832 # Take the argument following the first '-I', if any.
1833 _G_minus_I_seen=false
1834 for _G_arg in $aclocal_amflags; do
1835 case $_G_minus_I_seen,$_G_arg in
1836 :,*) macro_dir=$_G_arg; break ;;
1837 *,-I) _G_minus_I_seen=: ;;
1838 *,-I*) macro_dir=`expr x$_G_arg : 'x-I\(.*\)$'`; break ;;
1839 esac
1840 done
1841 }
1842
1843 func_verbose "macro_dir='$macro_dir'"
1844
1845 func_check_configuration macro_dir \
1846 "AC_CONFIG_MACRO_DIRS([name of a directory for configure m4 files])"
1847
1848 $require_vc_ignore_files
1849
1850 # If the macro_dir directory doesn't exist, create it now, and mark it
1851 # as ignored for the VCS.
1852 if test ! -d "$macro_dir"; then
1853 mkdir "$macro_dir" || func_permissions_error "$macro_dir"
1854
1855 test -n "$vc_ignore_files" \
1856 || func_insert_if_absent "$macro_dir" $vc_ignore_files
1857 fi
1858
1859 require_macro_dir=:
1860 }
1861
1862
1863 # require_makefile_am
1864 # -------------------
1865 # Ensure there is a 'Makefile.am' in the current directory.
1866 require_makefile_am=func_require_makefile_am
1867 func_require_makefile_am ()
1868 {
1869 $debug_cmd
1870
1871 test -n "$makefile_am" \
1872 || makefile_am=Makefile.am
1873
1874 <"$makefile_am"
1875
1876 func_verbose "found '$makefile_am'"
1877
1878 require_makefile_am=:
1879 }
1880
1881
1882 # require_package
1883 # ---------------
1884 # Ensure that '$package' contains a sensible default value.
1885 require_package=func_require_package
1886 func_require_package ()
1887 {
1888 $debug_cmd
1889
1890 test -n "$package" || {
1891 $require_package_name
1892
1893 package=`echo "$package_name" \
1894 |$SED -e 's/GNU //' \
1895 -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
1896 }
1897
1898 func_verbose "package='$package'"
1899
1900 require_package=:
1901 }
1902
1903
1904 # require_package_bugreport
1905 # -------------------------
1906 # Ensure that this has a sensible value, extracted from 'configure.ac'
1907 # if appropriate (and possible!).
1908 require_package_bugreport=func_require_package_bugreport
1909 func_require_package_bugreport ()
1910 {
1911 $debug_cmd
1912
1913 func_extract_trace AC_INIT
1914
1915 save_ifs=$IFS
1916 IFS=:
1917 set dummy $func_extract_trace_result
1918 IFS=$save_ifs
1919 shift
1920
1921 test -n "$package_bugreport" || package_bugreport=$3
1922 func_check_configuration package_bugreport \
1923 "AC_INIT([$package_name], [$package_version], [bug-$package@gnu.org])"
1924 func_verbose "package_bugreport='$package_bugreport'"
1925
1926 require_package_bugreport=:
1927 }
1928
1929
1930 # require_package_name
1931 # --------------------
1932 # Ensure that this has a sensible value, extracted from 'configure.ac'
1933 # if appropriate (and possible!).
1934 require_package_name=func_require_package_name
1935 func_require_package_name ()
1936 {
1937 $debug_cmd
1938
1939 func_extract_trace AC_INIT
1940
1941 save_ifs=$IFS
1942 IFS=:
1943 set dummy $func_extract_trace_result
1944 IFS=$save_ifs
1945 shift
1946
1947 test -n "$package_name" || package_name=$1
1948 func_check_configuration package_name \
1949 "AC_INIT([name of your package], [package version number])"
1950 func_verbose "package_name='$package_name'"
1951
1952 require_package_name=:
1953 }
1954
1955
1956 # require_package_version
1957 # -----------------------
1958 # Ensure that this has a sensible value, extracted from 'configure.ac'
1959 # if appropriate (and possible!). While we might have set all the
1960 # parameters extracted from AC_INIT at once, 'package_version' in
1961 # particular is not necessarily available as early as the others, since
1962 # 'git-version-gen' is often involved, and until then we can't rely on
1963 # getting a correct version number from an AC_INIT extraction.
1964 require_package_version=func_require_package_version
1965 func_require_package_version ()
1966 {
1967 $debug_cmd
1968
1969 func_extract_trace AC_INIT
1970
1971 save_ifs=$IFS
1972 IFS=:
1973 set dummy $func_extract_trace_result
1974 IFS=$save_ifs
1975 shift
1976
1977 test -n "$package_version" || package_version=$2
1978 test -n "$package_version" || {
1979 # The embedded echo is to squash whitespace before globbing.
1980 case " "`echo $gnulib_modules`" " in
1981 *" git-version-gen "*)
1982 func_fatal_error "\
1983 cannot \$require_package_version in bootstrap.conf before
1984 func_gnulib_tool has installed the 'git-version-gen' script."
1985 ;;
1986 *)
1987 func_check_configuration package_version \
1988 "AC_INIT([name of your package], [package version number])"
1989 ;;
1990 esac
1991 }
1992 func_verbose "package_version='$package_version'"
1993
1994 require_package_version=:
1995 }
1996
1997
1998 # require_patch
1999 # -------------
2000 # Find patch, according to the PATCH environment variable, or else
2001 # searching the user's PATH.
2002 require_patch=func_require_patch
2003 func_require_patch ()
2004 {
2005 $debug_cmd
2006
2007 test -n "$PATCH" || {
2008 # Find a patch program, preferring gpatch, which is usually better
2009 # than the vendor patch.
2010 func_find_tool PATCH gpatch patch
2011 }
2012
2013 test -n "$PATCH" || func_fatal_error "\
2014 Please install GNU Patch, or 'export PATCH=/path/to/gnu/patch'."
2015
2016 func_verbose "export PATCH='$PATCH'"
2017
2018 # Make sure the search result is visible to subshells
2019 export PATCH
2020
2021 require_patch=:
2022 }
2023
2024
2025 # require_source_base
2026 # -------------------
2027 # Ensure that source_base has a sensible value, extracted from
2028 # 'gnulib-cache.m4' if possible.
2029 require_source_base=func_require_source_base
2030 func_require_source_base ()
2031 {
2032 $debug_cmd
2033
2034 $require_gnulib_cache
2035
2036 test -f "$gnulib_cache" && test -z "$source_base" && {
2037 func_extract_trace_first "gl_SOURCE_BASE" "$gnulib_cache"
2038
2039 source_base=$func_extract_trace_first_result
2040
2041 func_verbose "source_base='$source_base'"
2042 }
2043
2044 require_source_base=:
2045 }
2046
2047
2048 # require_vc_ignore_files
2049 # -----------------------
2050 # Ensure that '$vc_ignore' has been processed to list VCS ignore files
2051 # in '$vc_ignore_files'
2052 require_vc_ignore_files=func_require_vc_ignore_files
2053 func_require_vc_ignore_files ()
2054 {
2055 $debug_cmd
2056
2057 test -n "$vc_ignore" || vc_ignore=auto
2058
2059 if test auto = "$vc_ignore" && test -z "$vc_ignore_files"; then
2060 vc_ignore_files=
2061 test -d .git && vc_ignore_files=.gitignore
2062 test -d CVS && vc_ignore_files="$vc_ignore_files .cvsignore"
2063 else
2064 vc_ignore_files=$vc_ignore
2065 fi
2066
2067 func_verbose "vc_ignore_files='$vc_ignore_files'"
2068
2069 require_vc_ignore_files=:
2070 }
2071
2072
2073 ## ----------------- ##
2074 ## Helper functions. ##
2075 ## ----------------- ##
2076
2077 # This section contains the helper functions used by the rest of 'bootstrap'.
2078
2079 # func_len STRING
2080 # ---------------
2081 # STRING may not start with a hyphen.
2082 if (eval 'x=123; test x${#x} = "x3"') 2>/dev/null
2083 then
2084 # This is an XSI compatible shell, allowing a faster implementation...
2085 eval 'func_len ()
2086 {
2087 $debug_cmd
2088
2089 func_len_result=${#1}
2090 }'
2091 else
2092 # ...otherwise fall back to using expr, which is often a shell builtin.
2093 func_len ()
2094 {
2095 $debug_cmd
2096
2097 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo 0`
2098 }
2099 fi
2100
2101
2102 # func_cmp_s FILE1 FILE2
2103 # ----------------------
2104 # Return non-zero exit status unless FILE1 and FILE2 are identical, without
2105 # any output at all, even error messages.
2106 func_cmp_s ()
2107 {
2108 $debug_cmd
2109
2110 # This function relies on non-zero exit status, which will cause the
2111 # program to exit when running in 'set -e' mode.
2112 $CMP "$@" >/dev/null 2>&1
2113 }
2114
2115
2116 # func_grep_q EXPRESSION [FILENAME..]
2117 # -----------------------------------
2118 # Check whether EXPRESSION matches any line of any listed FILENAME,
2119 # without any output at all, even error messages.
2120 func_grep_q ()
2121 {
2122 $debug_cmd
2123
2124 # This function relies on non-zero exit status, which will cause the
2125 # program to exit when running in 'set -e' mode.
2126 $GREP "$@" >/dev/null 2>&1
2127 }
2128
2129
2130 # func_ifcontains LIST MEMBER YES-CMD [NO-CMD]
2131 # --------------------------------------------
2132 # If whitespace-separated LIST contains MEMBER then execute YES-CMD,
2133 # otherwise if NO-CMD was given, execute that.
2134 func_ifcontains ()
2135 {
2136 $debug_cmd
2137
2138 _G_wslist=$1
2139 _G_member=$2
2140 _G_yes_cmd=$3
2141 _G_no_cmd=${4-":"}
2142
2143 _G_found=false
2144 for _G_item in $_G_wslist; do
2145 test "x$_G_item" = "x$_G_member" && {
2146 _G_found=:
2147 break
2148 }
2149 done
2150 if $_G_found; then
2151 eval "$_G_yes_cmd"
2152 _G_status=$?
2153 else
2154 eval "$_G_no_cmd"
2155 _G_status=$?
2156 fi
2157
2158 test 0 -eq "$_G_status" || exit $_G_status
2159 }
2160
2161
2162 # func_strpad STR WIDTH CHAR
2163 # --------------------------
2164 # Trim STR, or pad with CHAR to force a total length of WIDTH.
2165 func_strpad ()
2166 {
2167 $debug_cmd
2168
2169 _G_width=`expr "$2" - 1`
2170 func_strpad_result=`$ECHO "$1" |$SED '
2171 :a
2172 s|^.\{0,'"$_G_width"'\}$|&'"$3"'|
2173 ta
2174 '`
2175 }
2176
2177
2178 # func_strrpad STR WIDTH CHAR
2179 # ---------------------------
2180 # Trim STR, or right-justify-pad with CHAR to force a total length of
2181 # WIDTH.
2182 func_strrpad ()
2183 {
2184 $debug_cmd
2185
2186 _G_width=`expr "$2" - 1`
2187 func_strrpad_result=`$ECHO "$1" |$SED '
2188 :a
2189 s|^.\{0,'"$_G_width"'\}$|'"$3"'&|
2190 ta
2191 '`
2192 }
2193
2194
2195 # func_strrow INDENT FIELD WIDTH [FIELDn WIDTHn]...
2196 # -------------------------------------------------
2197 # Return a string containing each FIELD left justified to WIDTH, with
2198 # the whole thing indented by INDENT spaces. This function is used to
2199 # render one row of aligned columns for a table by func_strtable().
2200 func_strrow ()
2201 {
2202 $debug_cmd
2203
2204 func_strrow_linelen=$1; shift
2205
2206 _G_row=
2207 while test $# -gt 0; do
2208 func_strrow_linelen=`expr $func_strrow_linelen + $2`
2209 func_strpad "$1" $2 " "
2210 func_append _G_row "$func_strpad_result"
2211 shift; shift
2212 done
2213
2214 func_strrpad "$_G_row" $func_strrow_linelen " "
2215 func_strrow_result=$func_strrpad_result
2216 }
2217
2218
2219 # func_strtable INDENT WIDTH1...WIDTHn HEADER1...HEADERn FIELD1...FIELDn
2220 # ----------------------------------------------------------------------
2221 # Generate a string of newline-separated rows arranged in lined-up
2222 # columns of the given WIDTHs, with the entire table indented by INDENT
2223 # spaces. The number of columns is determined by the number of integer
2224 # valued WIDTH arguments following INDENT. The next set (i.e. a number
2225 # of arguments equal to the number of WIDTH arguments) of fields are
2226 # treated as the table's column HEADERs, and are separated from the
2227 # remainder of the table by an indented row of '-' characters. Remaining
2228 # arguments are each aligned below the next available header, wrapping
2229 # to a new row as necessary. Finally another row of '-' characters is
2230 # added to mark the end of the table.
2231 #
2232 # For example an unindented 3 column table with 2 rows of data would be
2233 # generated by this call:
2234 #
2235 # func_strtable 3 20 10 25 \
2236 # Header1 Header2 Header3 \
2237 # Row1Col1 Row1Col2 Row1Col3 \
2238 # Row2Col1 Row2Col2 Row2Col3
2239 #
2240 # returning the following string:
2241 #
2242 # " Header1 Header2 Header3
2243 # -------------------------------------------------------
2244 # Row1Col1 Row1Col2 Row1Col3
2245 # Row2Col1 Row2Col2 Row2Col3
2246 # -------------------------------------------------------"
2247 func_strtable ()
2248 {
2249 $debug_cmd
2250
2251 # Save the indent value, we'll need it for each row we render.
2252 _G_indent=$1; shift
2253
2254 # Collect remaining numeric args into a list for reuse between
2255 # members of each row when we call func_strrow later.
2256 _G_widths=$1; shift
2257 while test 0 -lt `expr "$1" : '[1-9][0-9]*$'`; do
2258 func_append _G_widths " $1"; shift
2259 done
2260
2261 # Extract the same number of positional parameters as there are
2262 # width elements - we'll do the header rows separately so that
2263 # we can insert a divider line.
2264 _G_header=$_G_indent
2265 for _G_width in $_G_widths; do
2266 func_append _G_header " $1 $_G_width"; shift
2267 done
2268 func_strrow $_G_header
2269
2270 # Strip off the indent, and make a divider with '-' chars, then
2271 # reindent.
2272 _G_divider=`$ECHO "$func_strrow_result" \
2273 |$SED 's|[^ ]|-|g
2274 :a
2275 s|- |--|g
2276 ta
2277 '`
2278
2279 # Append the header and divider to the running result.
2280 func_append func_strtable_result "\
2281 $func_strrow_result
2282 $_G_divider
2283 "
2284
2285 # The remaining rows are zipped between the width values we
2286 # unwound earlier just like the header row above.
2287 while test $# -gt 0; do
2288 _G_row=$_G_indent
2289 for _G_width in $_G_widths; do
2290 func_append _G_row " $1 $_G_width"; shift
2291 done
2292 func_strrow $_G_row
2293 func_append func_strtable_result "\
2294 $func_strrow_result
2295 "
2296 done
2297
2298 # Mark the end of the table with a final divider line.
2299 func_append func_strtable_result "$_G_divider"
2300 }
2301
2302
2303 # func_internal_error ARG...
2304 # --------------------------
2305 # Echo program name prefixed message to standard error, and exit.
2306 func_internal_error ()
2307 {
2308 func_fatal_error "\
2309 INTERNAL: " ${1+"$@"} "
2310 Please report this bug to 'bug-gnulib@gnu.org'
2311 in as much detail as possible."
2312 }
2313
2314
2315 # func_permissions_error FILE-OR-DIRECTORY
2316 # ----------------------------------------
2317 # Echo program name prefixed permissions error message to standard
2318 # error, and exit.
2319 func_permissions_error ()
2320 {
2321 $debug_cmd
2322
2323 func_fatal_error "Failed to create '$1', check permissions."
2324 }
2325
2326
2327 # func_show_eval CMD [FAIL_EXP]
2328 # -----------------------------
2329 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
2330 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
2331 # is given, then evaluate it.
2332 func_show_eval ()
2333 {
2334 $debug_cmd
2335
2336 $require_term_colors
2337
2338 _G_cmd=$1
2339 _G_fail_exp=${2-':'}
2340
2341 ${opt_silent-'false'} || {
2342 func_quote eval $_G_cmd
2343 eval func_truncate_cmd $func_quote_result
2344 func_echo "running: $tc_bold$func_truncate_cmd_result$tc_reset"
2345 }
2346
2347 ${opt_dry_run-'false'} || {
2348 eval "$_G_cmd"
2349 _G_status=$?
2350 test 0 -eq "$_G_status" || eval "(exit $_G_status); $_G_fail_exp"
2351 }
2352 }
2353
2354
2355 # func_truncate_cmd CMD [ARG]...
2356 # ------------------------------
2357 # For unreasonably long commands (such as a gnulib-tool invocation with
2358 # the full module list for import), truncate CMD after the second non-
2359 # option ARG.
2360 func_truncate_cmd ()
2361 {
2362 $debug_cmd
2363
2364 _G_last_arg_opt_p=false
2365 func_truncate_cmd_result=
2366
2367 set dummy "$@"; shift
2368
2369 while test $# -gt 0; do
2370 _G_opt=$1; shift
2371
2372 test -n "$func_truncate_cmd_result" \
2373 && func_append func_truncate_cmd_result ' '
2374 func_append func_truncate_cmd_result "$_G_opt"
2375
2376 func_len "x$func_truncate_cmd_result"
2377
2378 case $_G_opt in
2379 -*) _G_last_arg_opt_p=: ;;
2380 *) $_G_last_arg_opt_p \
2381 || test "$min_cmd_len" -gt "$func_len_result" \
2382 || break
2383 _G_last_arg_opt_p=false
2384 ;;
2385 esac
2386 done
2387
2388 test $# -gt 0 && func_append func_truncate_cmd_result "..."
2389 }
2390
2391
2392 # func_gitignore_entries FILE...
2393 # ------------------------------
2394 # Strip blank and comment lines to leave significant entries.
2395 func_gitignore_entries ()
2396 {
2397 $debug_cmd
2398
2399 $SED -e '/^#/d' -e '/^$/d' "$@"
2400 }
2401
2402
2403 # func_insert_if_absent STR FILE...
2404 # ---------------------------------
2405 # If $STR is not already on a line by itself in $FILE, insert it, at the
2406 # start. Entries are inserted at the start of the ignore list to ensure
2407 # existing entries starting with ! are not overridden. Such entries
2408 # support whilelisting exceptions after a more generic blacklist pattern.
2409 # sorting the new contents of the file and replacing $FILE with the result.
2410 func_insert_if_absent ()
2411 {
2412 $debug_cmd
2413
2414 str=$1
2415 shift
2416
2417 for file
2418 do
2419 test -f "$file" || touch "$file"
2420
2421 duplicate_entries=`func_gitignore_entries "$file" |sort |uniq -d`
2422 test -n "$duplicate_entries" \
2423 && func_error "duplicate entries in $file: " $duplicate_entries
2424
2425 func_grep_q "^$str\$" "$file" \
2426 || func_verbose "inserting '$str' into '$file'"
2427
2428 linesold=`func_gitignore_entries "$file" |wc -l`
2429 linesnew=`{ $ECHO "$str"; cat "$file"; } \
2430 |func_gitignore_entries |sort -u |wc -l`
2431 test "$linesold" -eq "$linesnew" \
2432 || { $SED "1i\\$nl$str$nl" "$file" >"$file"T && mv "$file"T "$file"; } \
2433 || func_permissions_error "$file"
2434 done
2435 }
2436
2437
2438 # func_get_version APP
2439 # --------------------
2440 # echo the version number (if any) of APP, which is looked up along your
2441 # PATH.
2442 func_get_version ()
2443 {
2444 $debug_cmd
2445
2446 _G_app=$1
2447
2448 # Rather than uncomment the sed script in-situ, strip the comments
2449 # programatically before passing the result to $SED for evaluation.
2450 sed_get_version=`$ECHO '# extract version within line
2451 s|.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*|\1|
2452 t done
2453
2454 # extract version at start of line
2455 s|^\([0-9]\{1,\}\.[.a-z0-9-]*\).*|\1|
2456 t done
2457
2458 d
2459
2460 :done
2461 # the following essentially does s|5.005|5.5|
2462 s|\.0*\([1-9]\)|.\1|g
2463 p
2464 q' \
2465 |$SED '/^[ ]*#.*$/d'`
2466
2467 func_tool_version_output $_G_app >/dev/null
2468 _G_status=$?
2469
2470 test 0 -ne "$_G_status" \
2471 || $_G_app --version 2>&1 |$SED -n "$sed_get_version"
2472
2473 (exit $_G_status)
2474 }
2475
2476
2477 # func_check_tool APP
2478 # -------------------
2479 # Search PATH for an executable at APP.
2480 func_check_tool ()
2481 {
2482 $debug_cmd
2483
2484 func_check_tool_result=
2485
2486 case $1 in
2487 *[\\/]*)
2488 test -x "$1" && func_check_tool_result=$1
2489 ;;
2490 *)
2491 save_IFS=$IFS
2492 IFS=${PATH_SEPARATOR-:}
2493 for _G_check_tool_path in $PATH; do
2494 IFS=$save_IFS
2495 if test -x "$_G_check_tool_path/$1"; then
2496 func_check_tool_result=$_G_check_tool_path/$1
2497 break
2498 fi
2499 done
2500 IFS=$save_IFS
2501 ;;
2502 esac
2503 }
2504
2505
2506 # func_check_versions APP1 VER1 URL1 ...[APPN VERN URLN]
2507 # ------------------------------------------------------
2508 func_check_versions ()
2509 {
2510 $debug_cmd
2511
2512 func_check_versions_result=:
2513
2514 while test $# -gt 0; do
2515 _G_app=$1; shift
2516 _G_reqver=$1; shift
2517 _G_url=$1; shift
2518
2519 # Diagnose bad buildreq formatting.
2520 case $_G_url in
2521 [a-z]*://*) ;; # looks like a url
2522 *) func_fatal_error "\
2523 '$_G_url' from the buildreq table in
2524 'bootstrap.conf' does not look like the URL for downloading
2525 $_G_app. Please ensure that buildreq is a strict newline
2526 delimited list of triples; 'program min-version url'."
2527 ;;
2528 esac
2529
2530 # Honor $APP variables ($TAR, $AUTOCONF, etc.)
2531 _G_appvar=`echo $_G_app |tr '[a-z]' '[A-Z]'`
2532 test TAR = "$_G_appvar" && _G_appvar=AMTAR
2533 eval "_G_app=\${$_G_appvar-$_G_app}"
2534
2535 # Fail if no version specified, but the program can't be found.
2536 if test x- = "x$_G_reqver"; then
2537 func_check_tool $_G_app
2538 if test -z "$func_check_tool_result"; then
2539 func_error "Prerequisite '$_G_app' not not found. Please install it, or
2540 'export $_G_appvar=/path/to/$_G_app'."
2541 func_check_versions_result=false
2542 else
2543 func_verbose "found '$func_check_tool_result' for $_G_appvar."
2544 fi
2545 else
2546 _G_instver=`func_get_version $_G_app`
2547
2548 # Fail if --version didn't work.
2549 if test -z "$_G_instver"; then
2550 func_error "Prerequisite '$_G_app' not found. Please install it, or
2551 'export $_G_appvar=/path/to/$_G_app'."
2552 func_check_versions_result=false
2553
2554 # Fail if a newer version than what we have is required.
2555 else
2556 func_verbose "found '$_G_app' version $_G_instver."
2557
2558 case $_G_reqver in
2559 =*)
2560 # If $buildreq version starts with '=', version must
2561 # match the installed program exactly.
2562 test "x$_G_reqver" = "x=$_G_instver" || {
2563 func_error "\
2564 '$_G_app' version == $_G_instver is too old
2565 'exactly $_G_app-$_G_reqver is required"
2566 func_check_versions_result=false
2567 }
2568 ;;
2569 *)
2570 # Otherwise, anything that is not older is a match.
2571 func_lt_ver "$_G_reqver" "$_G_instver" || {
2572 func_error "\
2573 '$_G_app' version == $_G_instver is too old
2574 '$_G_app' version >= $_G_reqver is required"
2575 func_check_versions_result=false
2576 }
2577 ;;
2578 esac
2579 fi
2580 fi
2581 done
2582 }
2583
2584
2585 # func_cleanup_gnulib
2586 # -------------------
2587 # Recursively delete everything below the path in the global variable
2588 # GNULIB_PATH.
2589 func_cleanup_gnulib ()
2590 {
2591 $debug_cmd
2592
2593 _G_status=$?
2594 $RM -fr "$gnulib_path"
2595 exit $_G_status
2596 }
2597
2598
2599 # func_download_po_files SUBDIR DOMAIN
2600 # ------------------------------------
2601 func_download_po_files ()
2602 {
2603 $debug_cmd
2604
2605 func_echo "getting translations into $1 for $2..."
2606 _G_cmd=`printf "$po_download_command_format" "$2" "$1"`
2607 eval "$_G_cmd"
2608 }
2609
2610
2611 # func_update_po_files PO_DIR DOMAIN
2612 # ----------------------------------
2613 # Mirror .po files to $po_dir/.reference and copy only the new
2614 # or modified ones into $po_dir. Also update $po_dir/LINGUAS.
2615 # Note po files that exist locally only are left in $po_dir but will
2616 # not be included in LINGUAS and hence will not be distributed.
2617 func_update_po_files ()
2618 {
2619 $debug_cmd
2620
2621 # Directory containing primary .po files.
2622 # Overwrite them only when we're sure a .po file is new.
2623 _G_po_dir=$1
2624 _G_domain=$2
2625
2626 # Mirror *.po files into this dir.
2627 # Usually contains *.s1 checksum files.
2628 _G_ref_po_dir=$_G_po_dir/.reference
2629
2630 test -d "$_G_ref_po_dir" || mkdir $_G_ref_po_dir || return
2631 func_download_po_files $_G_ref_po_dir $_G_domain \
2632 && ls "$_G_ref_po_dir"/*.po 2>/dev/null \
2633 |$SED -e 's|.*/||' -e 's|\.po$||' > "$_G_po_dir/LINGUAS" || return
2634
2635 # Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6+.
2636 func_find_tool SHA1SUM sha1sum gsha1sum shasum sha1
2637
2638 test -n "$SHA1SUM" || func_fatal_error "\
2639 Please install GNU Coreutils, or 'export SHA1SUM=/path/to/sha1sum'."
2640
2641 _G_langs=`cd $_G_ref_po_dir && echo *.po|$SED 's|\.po||g'`
2642 test '*' = "$_G_langs" && _G_langs=x
2643 for _G_po in $_G_langs; do
2644 case $_G_po in x) continue;; esac
2645 _G_new_po=$_G_ref_po_dir/$_G_po.po
2646 _G_cksum_file=$_G_ref_po_dir/$_G_po.s1
2647 if ! test -f "$_G_cksum_file" ||
2648 ! test -f "$_G_po_dir/$_G_po.po" ||
2649 ! $SHA1SUM -c "$_G_cksum_file" \
2650 < "$_G_new_po" > /dev/null; then
2651 echo "updated $_G_po_dir/$_G_po.po..."
2652 cp "$_G_new_po" "$_G_po_dir/$_G_po.po" \
2653 && $SHA1SUM < "$_G_new_po" > "$_G_cksum_file" || return
2654 fi
2655 done
2656 }
2657
2658
2659
2660 ## --------------- ##
2661 ## Option parsing. ##
2662 ## --------------- ##
2663
2664 # Hook in the functions to make sure our own options are parsed during
2665 # the option parsing loop.
2666
2667 usage='$progpath [OPTION]...'
2668
2669 # Short help message in response to '-h'. Add to this in 'bootstrap.conf'
2670 # if you accept any additional options.
2671 usage_message="Common Bootstrap Options:
2672 -c, --copy copy files instead of creating symbolic links.
2673 --debug enable verbose shell tracing
2674 -n, --dry-run print commands rather than running them
2675 -f, --force attempt to bootstrap even if the sources seem not
2676 to have been checked out.
2677 --gnulib-srcdir=DIRNAME
2678 specify a local directory where gnulib sources
2679 reside. Use this if you already have the gnulib
2680 sources on your machine, and don't want to waste
2681 your bandwidth downloading them again. Defaults to
2682 \$GNULIB_SRCDIR.
2683 --no-warnings equivalent to '-Wnone'
2684 --skip-git do not fetch files from remote repositories
2685 --skip-po do not download po files.
2686 -v, --verbose verbosely report processing
2687 --version print version information and exit
2688 -W, --warnings=CATEGORY
2689 report the warnings falling in CATEGORY [all]
2690 -h, --help print short or long help message and exit
2691 "
2692
2693 # Additional text appended to 'usage_message' in response to '--help'.
2694 long_help_message=$long_help_message"
2695 'recommend' show warnings about missing recommended packages
2696 'settings' show warnings about missing '$progname.conf' settings
2697 'upgrade' show warnings about out-dated files
2698
2699 If the file '$progname.conf' exists in the same directory as this
2700 script, its contents are read as shell variables to configure the
2701 bootstrap.
2702
2703 For build prerequisites, environment variables like \$AUTOCONF and
2704 \$AMTAR are honored.
2705
2706 Running without arguments will suffice in most cases.
2707 "
2708
2709 # Warning categories used by 'bootstrap', append others if you use them
2710 # in your 'bootstrap.conf'.
2711 warning_categories='recommend settings upgrade'
2712
2713
2714 # bootstrap_options_prep [ARG]...
2715 # -------------------------------
2716 # Preparation for options parsed by Bootstrap.
2717 bootstrap_options_prep ()
2718 {
2719 $debug_cmd
2720
2721 # Option defaults:
2722 opt_copy=${copy-'false'}
2723 opt_dry_run=false
2724 opt_force=false
2725 opt_gnulib_srcdir=$GNULIB_SRCDIR
2726 opt_skip_git=false
2727 opt_skip_po=false
2728
2729 # Pass back the list of options we consumed.
2730 func_quote eval ${1+"$@"}
2731 bootstrap_options_prep_result=$func_quote_result
2732 }
2733 func_add_hook func_options_prep bootstrap_options_prep
2734
2735
2736 # bootstrap_parse_options [ARG]...
2737 # --------------------------------
2738 # Provide handling for Bootstrap specific options.
2739 bootstrap_parse_options ()
2740 {
2741 $debug_cmd
2742
2743 # Perform our own loop to consume as many options as possible in
2744 # each iteration.
2745 while test $# -gt 0; do
2746 _G_opt=$1
2747 shift
2748 case $_G_opt in
2749 --dry-run|--dryrun|-n)
2750 opt_dry_run=: ;;
2751 --copy|-c) opt_copy=: ;;
2752 --force|-f) opt_force=: ;;
2753
2754 --gnulib-srcdir)
2755 test $# = 0 && func_missing_arg $_G_opt && break
2756 opt_gnulib_srcdir=$1
2757 shift
2758 ;;
2759
2760 --skip-git|--no-git)
2761 opt_skip_git=:
2762 ;;
2763
2764 --skip-po|--no-po)
2765 opt_skip_po=:
2766 ;;
2767
2768 # Separate non-argument short options:
2769 -c*|-f*|-n*)
2770 func_split_short_opt "$_G_opt"
2771 set dummy "$func_split_short_opt_name" \
2772 "-$func_split_short_opt_arg" ${1+"$@"}
2773 shift
2774 ;;
2775
2776 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
2777 esac
2778 done
2779
2780 # save modified positional parameters for caller
2781 func_quote eval ${1+"$@"}
2782 bootstrap_parse_options_result=$func_quote_result
2783 }
2784 func_add_hook func_parse_options bootstrap_parse_options
2785
2786
2787 # bootstrap_validate_options [ARG]...
2788 # -----------------------------------
2789 # Perform any sanity checks on option settings and/or unconsumed
2790 # arguments.
2791 bootstrap_validate_options ()
2792 {
2793 $debug_cmd
2794
2795 # Validate options.
2796 test $# -gt 0 \
2797 && func_fatal_help "too many arguments"
2798
2799 # Pass back the (empty) list of unconsumed options.
2800 func_quote eval ${1+"$@"}
2801 bootstrap_validate_options_result=$func_quote_result
2802 }
2803 func_add_hook func_validate_options bootstrap_validate_options
2804
2805
2806 ## -------------------------------------------------- ##
2807 ## Source package customisations in 'bootstrap.conf'. ##
2808 ## -------------------------------------------------- ##
2809
2810 # Override the default configuration, if necessary.
2811 # Make sure that bootstrap.conf is sourced from the current directory
2812 # if we were invoked as "sh bootstrap".
2813 case $0 in
2814 */*) test -r "$0.conf" && . "$0.conf" ;;
2815 *) test -r "$0.conf" && . ./"$0.conf" ;;
2816 esac
2817
2818
2819 ## ------------------------------- ##
2820 ## Actually perform the bootstrap. ##
2821 ## ------------------------------- ##
2822
2823 func_bootstrap ${1+"$@"}
2824
2825 # The End.
2826 exit ${exit_status-$EXIT_SUCCESS}
2827
2828 # Local variables:
2829 # mode: shell-script
2830 # sh-indentation: 2
2831 # eval: (add-hook 'before-save-hook 'time-stamp)
2832 # time-stamp-pattern: "500/scriptversion=%:y-%02m-%02d.%02H; # UTC"
2833 # time-stamp-time-zone: "UTC"
2834 # End:
0 #! /bin/sh
1 # Wrapper for compilers which do not understand '-c -o'.
2
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
6 # Written by Tom Tromey <tromey@cygnus.com>.
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # This file is maintained in Automake, please report
27 # bugs to <bug-automake@gnu.org> or send patches to
28 # <automake-patches@gnu.org>.
29
30 nl='
31 '
32
33 # We need space, tab and new line, in precisely that order. Quoting is
34 # there to prevent tools from complaining about whitespace usage.
35 IFS=" "" $nl"
36
37 file_conv=
38
39 # func_file_conv build_file lazy
40 # Convert a $build file to $host form and store it in $file
41 # Currently only supports Windows hosts. If the determined conversion
42 # type is listed in (the comma separated) LAZY, no conversion will
43 # take place.
44 func_file_conv ()
45 {
46 file=$1
47 case $file in
48 / | /[!/]*) # absolute file, and not a UNC file
49 if test -z "$file_conv"; then
50 # lazily determine how to convert abs files
51 case `uname -s` in
52 MINGW*)
53 file_conv=mingw
54 ;;
55 CYGWIN*)
56 file_conv=cygwin
57 ;;
58 *)
59 file_conv=wine
60 ;;
61 esac
62 fi
63 case $file_conv/,$2, in
64 *,$file_conv,*)
65 ;;
66 mingw/*)
67 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
68 ;;
69 cygwin/*)
70 file=`cygpath -m "$file" || echo "$file"`
71 ;;
72 wine/*)
73 file=`winepath -w "$file" || echo "$file"`
74 ;;
75 esac
76 ;;
77 esac
78 }
79
80 # func_cl_dashL linkdir
81 # Make cl look for libraries in LINKDIR
82 func_cl_dashL ()
83 {
84 func_file_conv "$1"
85 if test -z "$lib_path"; then
86 lib_path=$file
87 else
88 lib_path="$lib_path;$file"
89 fi
90 linker_opts="$linker_opts -LIBPATH:$file"
91 }
92
93 # func_cl_dashl library
94 # Do a library search-path lookup for cl
95 func_cl_dashl ()
96 {
97 lib=$1
98 found=no
99 save_IFS=$IFS
100 IFS=';'
101 for dir in $lib_path $LIB
102 do
103 IFS=$save_IFS
104 if $shared && test -f "$dir/$lib.dll.lib"; then
105 found=yes
106 lib=$dir/$lib.dll.lib
107 break
108 fi
109 if test -f "$dir/$lib.lib"; then
110 found=yes
111 lib=$dir/$lib.lib
112 break
113 fi
114 if test -f "$dir/lib$lib.a"; then
115 found=yes
116 lib=$dir/lib$lib.a
117 break
118 fi
119 done
120 IFS=$save_IFS
121
122 if test "$found" != yes; then
123 lib=$lib.lib
124 fi
125 }
126
127 # func_cl_wrapper cl arg...
128 # Adjust compile command to suit cl
129 func_cl_wrapper ()
130 {
131 # Assume a capable shell
132 lib_path=
133 shared=:
134 linker_opts=
135 for arg
136 do
137 if test -n "$eat"; then
138 eat=
139 else
140 case $1 in
141 -o)
142 # configure might choose to run compile as 'compile cc -o foo foo.c'.
143 eat=1
144 case $2 in
145 *.o | *.[oO][bB][jJ])
146 func_file_conv "$2"
147 set x "$@" -Fo"$file"
148 shift
149 ;;
150 *)
151 func_file_conv "$2"
152 set x "$@" -Fe"$file"
153 shift
154 ;;
155 esac
156 ;;
157 -I)
158 eat=1
159 func_file_conv "$2" mingw
160 set x "$@" -I"$file"
161 shift
162 ;;
163 -I*)
164 func_file_conv "${1#-I}" mingw
165 set x "$@" -I"$file"
166 shift
167 ;;
168 -l)
169 eat=1
170 func_cl_dashl "$2"
171 set x "$@" "$lib"
172 shift
173 ;;
174 -l*)
175 func_cl_dashl "${1#-l}"
176 set x "$@" "$lib"
177 shift
178 ;;
179 -L)
180 eat=1
181 func_cl_dashL "$2"
182 ;;
183 -L*)
184 func_cl_dashL "${1#-L}"
185 ;;
186 -static)
187 shared=false
188 ;;
189 -Wl,*)
190 arg=${1#-Wl,}
191 save_ifs="$IFS"; IFS=','
192 for flag in $arg; do
193 IFS="$save_ifs"
194 linker_opts="$linker_opts $flag"
195 done
196 IFS="$save_ifs"
197 ;;
198 -Xlinker)
199 eat=1
200 linker_opts="$linker_opts $2"
201 ;;
202 -*)
203 set x "$@" "$1"
204 shift
205 ;;
206 *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
207 func_file_conv "$1"
208 set x "$@" -Tp"$file"
209 shift
210 ;;
211 *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
212 func_file_conv "$1" mingw
213 set x "$@" "$file"
214 shift
215 ;;
216 *)
217 set x "$@" "$1"
218 shift
219 ;;
220 esac
221 fi
222 shift
223 done
224 if test -n "$linker_opts"; then
225 linker_opts="-link$linker_opts"
226 fi
227 exec "$@" $linker_opts
228 exit 1
229 }
230
231 eat=
232
233 case $1 in
234 '')
235 echo "$0: No command. Try '$0 --help' for more information." 1>&2
236 exit 1;
237 ;;
238 -h | --h*)
239 cat <<\EOF
240 Usage: compile [--help] [--version] PROGRAM [ARGS]
241
242 Wrapper for compilers which do not understand '-c -o'.
243 Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
244 arguments, and rename the output as expected.
245
246 If you are trying to build a whole package this is not the
247 right script to run: please start by reading the file 'INSTALL'.
248
249 Report bugs to <bug-automake@gnu.org>.
250 EOF
251 exit $?
252 ;;
253 -v | --v*)
254 echo "compile $scriptversion"
255 exit $?
256 ;;
257 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
258 icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
259 func_cl_wrapper "$@" # Doesn't return...
260 ;;
261 esac
262
263 ofile=
264 cfile=
265
266 for arg
267 do
268 if test -n "$eat"; then
269 eat=
270 else
271 case $1 in
272 -o)
273 # configure might choose to run compile as 'compile cc -o foo foo.c'.
274 # So we strip '-o arg' only if arg is an object.
275 eat=1
276 case $2 in
277 *.o | *.obj)
278 ofile=$2
279 ;;
280 *)
281 set x "$@" -o "$2"
282 shift
283 ;;
284 esac
285 ;;
286 *.c)
287 cfile=$1
288 set x "$@" "$1"
289 shift
290 ;;
291 *)
292 set x "$@" "$1"
293 shift
294 ;;
295 esac
296 fi
297 shift
298 done
299
300 if test -z "$ofile" || test -z "$cfile"; then
301 # If no '-o' option was seen then we might have been invoked from a
302 # pattern rule where we don't need one. That is ok -- this is a
303 # normal compilation that the losing compiler can handle. If no
304 # '.c' file was seen then we are probably linking. That is also
305 # ok.
306 exec "$@"
307 fi
308
309 # Name of file we expect compiler to create.
310 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
311
312 # Create the lock directory.
313 # Note: use '[/\\:.-]' here to ensure that we don't use the same name
314 # that we are using for the .o file. Also, base the name on the expected
315 # object file name, since that is what matters with a parallel build.
316 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
317 while true; do
318 if mkdir "$lockdir" >/dev/null 2>&1; then
319 break
320 fi
321 sleep 1
322 done
323 # FIXME: race condition here if user kills between mkdir and trap.
324 trap "rmdir '$lockdir'; exit 1" 1 2 15
325
326 # Run the compile.
327 "$@"
328 ret=$?
329
330 if test -f "$cofile"; then
331 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
332 elif test -f "${cofile}bj"; then
333 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
334 fi
335
336 rmdir "$lockdir"
337 exit $ret
338
339 # Local Variables:
340 # mode: shell-script
341 # sh-indentation: 2
342 # eval: (add-hook 'before-save-hook 'time-stamp)
343 # time-stamp-start: "scriptversion="
344 # time-stamp-format: "%:y-%02m-%02d.%02H"
345 # time-stamp-time-zone: "UTC0"
346 # time-stamp-end: "; # UTC"
347 # End:
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-08-29'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25 #
26 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
27 #
28 # You can get the latest version of this script from:
29 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
30 #
31 # Please send patches to <config-patches@gnu.org>.
32
33
34 me=`echo "$0" | sed -e 's,.*/,,'`
35
36 usage="\
37 Usage: $0 [OPTION]
38
39 Output the configuration name of the system \`$me' is run on.
40
41 Options:
42 -h, --help print this help, then exit
43 -t, --time-stamp print date of last modification, then exit
44 -v, --version print version number, then exit
45
46 Report bugs and patches to <config-patches@gnu.org>."
47
48 version="\
49 GNU config.guess ($timestamp)
50
51 Originally written by Per Bothner.
52 Copyright 1992-2018 Free Software Foundation, Inc.
53
54 This is free software; see the source for copying conditions. There is NO
55 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
56
57 help="
58 Try \`$me --help' for more information."
59
60 # Parse command line
61 while test $# -gt 0 ; do
62 case $1 in
63 --time-stamp | --time* | -t )
64 echo "$timestamp" ; exit ;;
65 --version | -v )
66 echo "$version" ; exit ;;
67 --help | --h* | -h )
68 echo "$usage"; exit ;;
69 -- ) # Stop option processing
70 shift; break ;;
71 - ) # Use stdin as input.
72 break ;;
73 -* )
74 echo "$me: invalid option $1$help" >&2
75 exit 1 ;;
76 * )
77 break ;;
78 esac
79 done
80
81 if test $# != 0; then
82 echo "$me: too many arguments$help" >&2
83 exit 1
84 fi
85
86 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
87 # compiler to aid in system detection is discouraged as it requires
88 # temporary files to be created and, as you can see below, it is a
89 # headache to deal with in a portable fashion.
90
91 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
92 # use `HOST_CC' if defined, but it is deprecated.
93
94 # Portable tmp directory creation inspired by the Autoconf team.
95
96 tmp=
97 # shellcheck disable=SC2172
98 trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
99 trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
100
101 set_cc_for_build() {
102 : "${TMPDIR=/tmp}"
103 # shellcheck disable=SC2039
104 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
105 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
106 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
107 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
108 dummy=$tmp/dummy
109 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
110 ,,) echo "int x;" > "$dummy.c"
111 for driver in cc gcc c89 c99 ; do
112 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
113 CC_FOR_BUILD="$driver"
114 break
115 fi
116 done
117 if test x"$CC_FOR_BUILD" = x ; then
118 CC_FOR_BUILD=no_compiler_found
119 fi
120 ;;
121 ,,*) CC_FOR_BUILD=$CC ;;
122 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
123 esac
124 }
125
126 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
127 # (ghazi@noc.rutgers.edu 1994-08-24)
128 if test -f /.attbin/uname ; then
129 PATH=$PATH:/.attbin ; export PATH
130 fi
131
132 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
133 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
134 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
135 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
136
137 case "$UNAME_SYSTEM" in
138 Linux|GNU|GNU/*)
139 # If the system lacks a compiler, then just pick glibc.
140 # We could probably try harder.
141 LIBC=gnu
142
143 set_cc_for_build
144 cat <<-EOF > "$dummy.c"
145 #include <features.h>
146 #if defined(__UCLIBC__)
147 LIBC=uclibc
148 #elif defined(__dietlibc__)
149 LIBC=dietlibc
150 #else
151 LIBC=gnu
152 #endif
153 EOF
154 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
155
156 # If ldd exists, use it to detect musl libc.
157 if command -v ldd >/dev/null && \
158 ldd --version 2>&1 | grep -q ^musl
159 then
160 LIBC=musl
161 fi
162 ;;
163 esac
164
165 # Note: order is significant - the case branches are not exclusive.
166
167 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
168 *:NetBSD:*:*)
169 # NetBSD (nbsd) targets should (where applicable) match one or
170 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
171 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
172 # switched to ELF, *-*-netbsd* would select the old
173 # object file format. This provides both forward
174 # compatibility and a consistent mechanism for selecting the
175 # object file format.
176 #
177 # Note: NetBSD doesn't particularly care about the vendor
178 # portion of the name. We always set it to "unknown".
179 sysctl="sysctl -n hw.machine_arch"
180 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
181 "/sbin/$sysctl" 2>/dev/null || \
182 "/usr/sbin/$sysctl" 2>/dev/null || \
183 echo unknown)`
184 case "$UNAME_MACHINE_ARCH" in
185 armeb) machine=armeb-unknown ;;
186 arm*) machine=arm-unknown ;;
187 sh3el) machine=shl-unknown ;;
188 sh3eb) machine=sh-unknown ;;
189 sh5el) machine=sh5le-unknown ;;
190 earmv*)
191 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
192 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
193 machine="${arch}${endian}"-unknown
194 ;;
195 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
196 esac
197 # The Operating System including object format, if it has switched
198 # to ELF recently (or will in the future) and ABI.
199 case "$UNAME_MACHINE_ARCH" in
200 earm*)
201 os=netbsdelf
202 ;;
203 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
204 set_cc_for_build
205 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
206 | grep -q __ELF__
207 then
208 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
209 # Return netbsd for either. FIX?
210 os=netbsd
211 else
212 os=netbsdelf
213 fi
214 ;;
215 *)
216 os=netbsd
217 ;;
218 esac
219 # Determine ABI tags.
220 case "$UNAME_MACHINE_ARCH" in
221 earm*)
222 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
223 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
224 ;;
225 esac
226 # The OS release
227 # Debian GNU/NetBSD machines have a different userland, and
228 # thus, need a distinct triplet. However, they do not need
229 # kernel version information, so it can be replaced with a
230 # suitable tag, in the style of linux-gnu.
231 case "$UNAME_VERSION" in
232 Debian*)
233 release='-gnu'
234 ;;
235 *)
236 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
237 ;;
238 esac
239 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
240 # contains redundant information, the shorter form:
241 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
242 echo "$machine-${os}${release}${abi-}"
243 exit ;;
244 *:Bitrig:*:*)
245 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
246 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
247 exit ;;
248 *:OpenBSD:*:*)
249 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
250 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
251 exit ;;
252 *:LibertyBSD:*:*)
253 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
254 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
255 exit ;;
256 *:MidnightBSD:*:*)
257 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
258 exit ;;
259 *:ekkoBSD:*:*)
260 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
261 exit ;;
262 *:SolidBSD:*:*)
263 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
264 exit ;;
265 macppc:MirBSD:*:*)
266 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
267 exit ;;
268 *:MirBSD:*:*)
269 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
270 exit ;;
271 *:Sortix:*:*)
272 echo "$UNAME_MACHINE"-unknown-sortix
273 exit ;;
274 *:Redox:*:*)
275 echo "$UNAME_MACHINE"-unknown-redox
276 exit ;;
277 mips:OSF1:*.*)
278 echo mips-dec-osf1
279 exit ;;
280 alpha:OSF1:*:*)
281 case $UNAME_RELEASE in
282 *4.0)
283 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
284 ;;
285 *5.*)
286 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
287 ;;
288 esac
289 # According to Compaq, /usr/sbin/psrinfo has been available on
290 # OSF/1 and Tru64 systems produced since 1995. I hope that
291 # covers most systems running today. This code pipes the CPU
292 # types through head -n 1, so we only detect the type of CPU 0.
293 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
294 case "$ALPHA_CPU_TYPE" in
295 "EV4 (21064)")
296 UNAME_MACHINE=alpha ;;
297 "EV4.5 (21064)")
298 UNAME_MACHINE=alpha ;;
299 "LCA4 (21066/21068)")
300 UNAME_MACHINE=alpha ;;
301 "EV5 (21164)")
302 UNAME_MACHINE=alphaev5 ;;
303 "EV5.6 (21164A)")
304 UNAME_MACHINE=alphaev56 ;;
305 "EV5.6 (21164PC)")
306 UNAME_MACHINE=alphapca56 ;;
307 "EV5.7 (21164PC)")
308 UNAME_MACHINE=alphapca57 ;;
309 "EV6 (21264)")
310 UNAME_MACHINE=alphaev6 ;;
311 "EV6.7 (21264A)")
312 UNAME_MACHINE=alphaev67 ;;
313 "EV6.8CB (21264C)")
314 UNAME_MACHINE=alphaev68 ;;
315 "EV6.8AL (21264B)")
316 UNAME_MACHINE=alphaev68 ;;
317 "EV6.8CX (21264D)")
318 UNAME_MACHINE=alphaev68 ;;
319 "EV6.9A (21264/EV69A)")
320 UNAME_MACHINE=alphaev69 ;;
321 "EV7 (21364)")
322 UNAME_MACHINE=alphaev7 ;;
323 "EV7.9 (21364A)")
324 UNAME_MACHINE=alphaev79 ;;
325 esac
326 # A Pn.n version is a patched version.
327 # A Vn.n version is a released version.
328 # A Tn.n version is a released field test version.
329 # A Xn.n version is an unreleased experimental baselevel.
330 # 1.2 uses "1.2" for uname -r.
331 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
332 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
333 exitcode=$?
334 trap '' 0
335 exit $exitcode ;;
336 Amiga*:UNIX_System_V:4.0:*)
337 echo m68k-unknown-sysv4
338 exit ;;
339 *:[Aa]miga[Oo][Ss]:*:*)
340 echo "$UNAME_MACHINE"-unknown-amigaos
341 exit ;;
342 *:[Mm]orph[Oo][Ss]:*:*)
343 echo "$UNAME_MACHINE"-unknown-morphos
344 exit ;;
345 *:OS/390:*:*)
346 echo i370-ibm-openedition
347 exit ;;
348 *:z/VM:*:*)
349 echo s390-ibm-zvmoe
350 exit ;;
351 *:OS400:*:*)
352 echo powerpc-ibm-os400
353 exit ;;
354 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
355 echo arm-acorn-riscix"$UNAME_RELEASE"
356 exit ;;
357 arm*:riscos:*:*|arm*:RISCOS:*:*)
358 echo arm-unknown-riscos
359 exit ;;
360 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
361 echo hppa1.1-hitachi-hiuxmpp
362 exit ;;
363 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
364 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
365 if test "`(/bin/universe) 2>/dev/null`" = att ; then
366 echo pyramid-pyramid-sysv3
367 else
368 echo pyramid-pyramid-bsd
369 fi
370 exit ;;
371 NILE*:*:*:dcosx)
372 echo pyramid-pyramid-svr4
373 exit ;;
374 DRS?6000:unix:4.0:6*)
375 echo sparc-icl-nx6
376 exit ;;
377 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
378 case `/usr/bin/uname -p` in
379 sparc) echo sparc-icl-nx7; exit ;;
380 esac ;;
381 s390x:SunOS:*:*)
382 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
383 exit ;;
384 sun4H:SunOS:5.*:*)
385 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
386 exit ;;
387 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
388 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
389 exit ;;
390 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
391 echo i386-pc-auroraux"$UNAME_RELEASE"
392 exit ;;
393 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
394 UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
395 case `isainfo -b` in
396 32)
397 echo i386-pc-solaris2"$UNAME_REL"
398 ;;
399 64)
400 echo x86_64-pc-solaris2"$UNAME_REL"
401 ;;
402 esac
403 exit ;;
404 sun4*:SunOS:6*:*)
405 # According to config.sub, this is the proper way to canonicalize
406 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
407 # it's likely to be more like Solaris than SunOS4.
408 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
409 exit ;;
410 sun4*:SunOS:*:*)
411 case "`/usr/bin/arch -k`" in
412 Series*|S4*)
413 UNAME_RELEASE=`uname -v`
414 ;;
415 esac
416 # Japanese Language versions have a version number like `4.1.3-JL'.
417 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
418 exit ;;
419 sun3*:SunOS:*:*)
420 echo m68k-sun-sunos"$UNAME_RELEASE"
421 exit ;;
422 sun*:*:4.2BSD:*)
423 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
424 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
425 case "`/bin/arch`" in
426 sun3)
427 echo m68k-sun-sunos"$UNAME_RELEASE"
428 ;;
429 sun4)
430 echo sparc-sun-sunos"$UNAME_RELEASE"
431 ;;
432 esac
433 exit ;;
434 aushp:SunOS:*:*)
435 echo sparc-auspex-sunos"$UNAME_RELEASE"
436 exit ;;
437 # The situation for MiNT is a little confusing. The machine name
438 # can be virtually everything (everything which is not
439 # "atarist" or "atariste" at least should have a processor
440 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
441 # to the lowercase version "mint" (or "freemint"). Finally
442 # the system name "TOS" denotes a system which is actually not
443 # MiNT. But MiNT is downward compatible to TOS, so this should
444 # be no problem.
445 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
446 echo m68k-atari-mint"$UNAME_RELEASE"
447 exit ;;
448 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
449 echo m68k-atari-mint"$UNAME_RELEASE"
450 exit ;;
451 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
452 echo m68k-atari-mint"$UNAME_RELEASE"
453 exit ;;
454 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
455 echo m68k-milan-mint"$UNAME_RELEASE"
456 exit ;;
457 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
458 echo m68k-hades-mint"$UNAME_RELEASE"
459 exit ;;
460 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
461 echo m68k-unknown-mint"$UNAME_RELEASE"
462 exit ;;
463 m68k:machten:*:*)
464 echo m68k-apple-machten"$UNAME_RELEASE"
465 exit ;;
466 powerpc:machten:*:*)
467 echo powerpc-apple-machten"$UNAME_RELEASE"
468 exit ;;
469 RISC*:Mach:*:*)
470 echo mips-dec-mach_bsd4.3
471 exit ;;
472 RISC*:ULTRIX:*:*)
473 echo mips-dec-ultrix"$UNAME_RELEASE"
474 exit ;;
475 VAX*:ULTRIX*:*:*)
476 echo vax-dec-ultrix"$UNAME_RELEASE"
477 exit ;;
478 2020:CLIX:*:* | 2430:CLIX:*:*)
479 echo clipper-intergraph-clix"$UNAME_RELEASE"
480 exit ;;
481 mips:*:*:UMIPS | mips:*:*:RISCos)
482 set_cc_for_build
483 sed 's/^ //' << EOF > "$dummy.c"
484 #ifdef __cplusplus
485 #include <stdio.h> /* for printf() prototype */
486 int main (int argc, char *argv[]) {
487 #else
488 int main (argc, argv) int argc; char *argv[]; {
489 #endif
490 #if defined (host_mips) && defined (MIPSEB)
491 #if defined (SYSTYPE_SYSV)
492 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
493 #endif
494 #if defined (SYSTYPE_SVR4)
495 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
496 #endif
497 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
498 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
499 #endif
500 #endif
501 exit (-1);
502 }
503 EOF
504 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
505 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
506 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
507 { echo "$SYSTEM_NAME"; exit; }
508 echo mips-mips-riscos"$UNAME_RELEASE"
509 exit ;;
510 Motorola:PowerMAX_OS:*:*)
511 echo powerpc-motorola-powermax
512 exit ;;
513 Motorola:*:4.3:PL8-*)
514 echo powerpc-harris-powermax
515 exit ;;
516 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
517 echo powerpc-harris-powermax
518 exit ;;
519 Night_Hawk:Power_UNIX:*:*)
520 echo powerpc-harris-powerunix
521 exit ;;
522 m88k:CX/UX:7*:*)
523 echo m88k-harris-cxux7
524 exit ;;
525 m88k:*:4*:R4*)
526 echo m88k-motorola-sysv4
527 exit ;;
528 m88k:*:3*:R3*)
529 echo m88k-motorola-sysv3
530 exit ;;
531 AViiON:dgux:*:*)
532 # DG/UX returns AViiON for all architectures
533 UNAME_PROCESSOR=`/usr/bin/uname -p`
534 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
535 then
536 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
537 [ "$TARGET_BINARY_INTERFACE"x = x ]
538 then
539 echo m88k-dg-dgux"$UNAME_RELEASE"
540 else
541 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
542 fi
543 else
544 echo i586-dg-dgux"$UNAME_RELEASE"
545 fi
546 exit ;;
547 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
548 echo m88k-dolphin-sysv3
549 exit ;;
550 M88*:*:R3*:*)
551 # Delta 88k system running SVR3
552 echo m88k-motorola-sysv3
553 exit ;;
554 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
555 echo m88k-tektronix-sysv3
556 exit ;;
557 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
558 echo m68k-tektronix-bsd
559 exit ;;
560 *:IRIX*:*:*)
561 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
562 exit ;;
563 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
564 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
565 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
566 i*86:AIX:*:*)
567 echo i386-ibm-aix
568 exit ;;
569 ia64:AIX:*:*)
570 if [ -x /usr/bin/oslevel ] ; then
571 IBM_REV=`/usr/bin/oslevel`
572 else
573 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
574 fi
575 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
576 exit ;;
577 *:AIX:2:3)
578 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
579 set_cc_for_build
580 sed 's/^ //' << EOF > "$dummy.c"
581 #include <sys/systemcfg.h>
582
583 main()
584 {
585 if (!__power_pc())
586 exit(1);
587 puts("powerpc-ibm-aix3.2.5");
588 exit(0);
589 }
590 EOF
591 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
592 then
593 echo "$SYSTEM_NAME"
594 else
595 echo rs6000-ibm-aix3.2.5
596 fi
597 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
598 echo rs6000-ibm-aix3.2.4
599 else
600 echo rs6000-ibm-aix3.2
601 fi
602 exit ;;
603 *:AIX:*:[4567])
604 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
605 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
606 IBM_ARCH=rs6000
607 else
608 IBM_ARCH=powerpc
609 fi
610 if [ -x /usr/bin/lslpp ] ; then
611 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
612 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
613 else
614 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
615 fi
616 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
617 exit ;;
618 *:AIX:*:*)
619 echo rs6000-ibm-aix
620 exit ;;
621 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
622 echo romp-ibm-bsd4.4
623 exit ;;
624 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
625 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
626 exit ;; # report: romp-ibm BSD 4.3
627 *:BOSX:*:*)
628 echo rs6000-bull-bosx
629 exit ;;
630 DPX/2?00:B.O.S.:*:*)
631 echo m68k-bull-sysv3
632 exit ;;
633 9000/[34]??:4.3bsd:1.*:*)
634 echo m68k-hp-bsd
635 exit ;;
636 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
637 echo m68k-hp-bsd4.4
638 exit ;;
639 9000/[34678]??:HP-UX:*:*)
640 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
641 case "$UNAME_MACHINE" in
642 9000/31?) HP_ARCH=m68000 ;;
643 9000/[34]??) HP_ARCH=m68k ;;
644 9000/[678][0-9][0-9])
645 if [ -x /usr/bin/getconf ]; then
646 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
647 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
648 case "$sc_cpu_version" in
649 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
650 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
651 532) # CPU_PA_RISC2_0
652 case "$sc_kernel_bits" in
653 32) HP_ARCH=hppa2.0n ;;
654 64) HP_ARCH=hppa2.0w ;;
655 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
656 esac ;;
657 esac
658 fi
659 if [ "$HP_ARCH" = "" ]; then
660 set_cc_for_build
661 sed 's/^ //' << EOF > "$dummy.c"
662
663 #define _HPUX_SOURCE
664 #include <stdlib.h>
665 #include <unistd.h>
666
667 int main ()
668 {
669 #if defined(_SC_KERNEL_BITS)
670 long bits = sysconf(_SC_KERNEL_BITS);
671 #endif
672 long cpu = sysconf (_SC_CPU_VERSION);
673
674 switch (cpu)
675 {
676 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
677 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
678 case CPU_PA_RISC2_0:
679 #if defined(_SC_KERNEL_BITS)
680 switch (bits)
681 {
682 case 64: puts ("hppa2.0w"); break;
683 case 32: puts ("hppa2.0n"); break;
684 default: puts ("hppa2.0"); break;
685 } break;
686 #else /* !defined(_SC_KERNEL_BITS) */
687 puts ("hppa2.0"); break;
688 #endif
689 default: puts ("hppa1.0"); break;
690 }
691 exit (0);
692 }
693 EOF
694 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
695 test -z "$HP_ARCH" && HP_ARCH=hppa
696 fi ;;
697 esac
698 if [ "$HP_ARCH" = hppa2.0w ]
699 then
700 set_cc_for_build
701
702 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
703 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
704 # generating 64-bit code. GNU and HP use different nomenclature:
705 #
706 # $ CC_FOR_BUILD=cc ./config.guess
707 # => hppa2.0w-hp-hpux11.23
708 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
709 # => hppa64-hp-hpux11.23
710
711 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
712 grep -q __LP64__
713 then
714 HP_ARCH=hppa2.0w
715 else
716 HP_ARCH=hppa64
717 fi
718 fi
719 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
720 exit ;;
721 ia64:HP-UX:*:*)
722 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
723 echo ia64-hp-hpux"$HPUX_REV"
724 exit ;;
725 3050*:HI-UX:*:*)
726 set_cc_for_build
727 sed 's/^ //' << EOF > "$dummy.c"
728 #include <unistd.h>
729 int
730 main ()
731 {
732 long cpu = sysconf (_SC_CPU_VERSION);
733 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
734 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
735 results, however. */
736 if (CPU_IS_PA_RISC (cpu))
737 {
738 switch (cpu)
739 {
740 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
741 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
742 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
743 default: puts ("hppa-hitachi-hiuxwe2"); break;
744 }
745 }
746 else if (CPU_IS_HP_MC68K (cpu))
747 puts ("m68k-hitachi-hiuxwe2");
748 else puts ("unknown-hitachi-hiuxwe2");
749 exit (0);
750 }
751 EOF
752 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
753 { echo "$SYSTEM_NAME"; exit; }
754 echo unknown-hitachi-hiuxwe2
755 exit ;;
756 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
757 echo hppa1.1-hp-bsd
758 exit ;;
759 9000/8??:4.3bsd:*:*)
760 echo hppa1.0-hp-bsd
761 exit ;;
762 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
763 echo hppa1.0-hp-mpeix
764 exit ;;
765 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
766 echo hppa1.1-hp-osf
767 exit ;;
768 hp8??:OSF1:*:*)
769 echo hppa1.0-hp-osf
770 exit ;;
771 i*86:OSF1:*:*)
772 if [ -x /usr/sbin/sysversion ] ; then
773 echo "$UNAME_MACHINE"-unknown-osf1mk
774 else
775 echo "$UNAME_MACHINE"-unknown-osf1
776 fi
777 exit ;;
778 parisc*:Lites*:*:*)
779 echo hppa1.1-hp-lites
780 exit ;;
781 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
782 echo c1-convex-bsd
783 exit ;;
784 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
785 if getsysinfo -f scalar_acc
786 then echo c32-convex-bsd
787 else echo c2-convex-bsd
788 fi
789 exit ;;
790 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
791 echo c34-convex-bsd
792 exit ;;
793 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
794 echo c38-convex-bsd
795 exit ;;
796 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
797 echo c4-convex-bsd
798 exit ;;
799 CRAY*Y-MP:*:*:*)
800 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
801 exit ;;
802 CRAY*[A-Z]90:*:*:*)
803 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
804 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
805 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
806 -e 's/\.[^.]*$/.X/'
807 exit ;;
808 CRAY*TS:*:*:*)
809 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
810 exit ;;
811 CRAY*T3E:*:*:*)
812 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
813 exit ;;
814 CRAY*SV1:*:*:*)
815 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
816 exit ;;
817 *:UNICOS/mp:*:*)
818 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
819 exit ;;
820 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
821 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
822 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
823 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
824 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
825 exit ;;
826 5000:UNIX_System_V:4.*:*)
827 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
828 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
829 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
830 exit ;;
831 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
832 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
833 exit ;;
834 sparc*:BSD/OS:*:*)
835 echo sparc-unknown-bsdi"$UNAME_RELEASE"
836 exit ;;
837 *:BSD/OS:*:*)
838 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
839 exit ;;
840 arm:FreeBSD:*:*)
841 UNAME_PROCESSOR=`uname -p`
842 set_cc_for_build
843 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
844 | grep -q __ARM_PCS_VFP
845 then
846 echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
847 else
848 echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
849 fi
850 exit ;;
851 *:FreeBSD:*:*)
852 UNAME_PROCESSOR=`/usr/bin/uname -p`
853 case "$UNAME_PROCESSOR" in
854 amd64)
855 UNAME_PROCESSOR=x86_64 ;;
856 i386)
857 UNAME_PROCESSOR=i586 ;;
858 esac
859 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
860 exit ;;
861 i*:CYGWIN*:*)
862 echo "$UNAME_MACHINE"-pc-cygwin
863 exit ;;
864 *:MINGW64*:*)
865 echo "$UNAME_MACHINE"-pc-mingw64
866 exit ;;
867 *:MINGW*:*)
868 echo "$UNAME_MACHINE"-pc-mingw32
869 exit ;;
870 *:MSYS*:*)
871 echo "$UNAME_MACHINE"-pc-msys
872 exit ;;
873 i*:PW*:*)
874 echo "$UNAME_MACHINE"-pc-pw32
875 exit ;;
876 *:Interix*:*)
877 case "$UNAME_MACHINE" in
878 x86)
879 echo i586-pc-interix"$UNAME_RELEASE"
880 exit ;;
881 authenticamd | genuineintel | EM64T)
882 echo x86_64-unknown-interix"$UNAME_RELEASE"
883 exit ;;
884 IA64)
885 echo ia64-unknown-interix"$UNAME_RELEASE"
886 exit ;;
887 esac ;;
888 i*:UWIN*:*)
889 echo "$UNAME_MACHINE"-pc-uwin
890 exit ;;
891 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
892 echo x86_64-pc-cygwin
893 exit ;;
894 prep*:SunOS:5.*:*)
895 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
896 exit ;;
897 *:GNU:*:*)
898 # the GNU system
899 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
900 exit ;;
901 *:GNU/*:*:*)
902 # other systems with GNU libc and userland
903 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
904 exit ;;
905 *:Minix:*:*)
906 echo "$UNAME_MACHINE"-unknown-minix
907 exit ;;
908 aarch64:Linux:*:*)
909 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
910 exit ;;
911 aarch64_be:Linux:*:*)
912 UNAME_MACHINE=aarch64_be
913 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
914 exit ;;
915 alpha:Linux:*:*)
916 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
917 EV5) UNAME_MACHINE=alphaev5 ;;
918 EV56) UNAME_MACHINE=alphaev56 ;;
919 PCA56) UNAME_MACHINE=alphapca56 ;;
920 PCA57) UNAME_MACHINE=alphapca56 ;;
921 EV6) UNAME_MACHINE=alphaev6 ;;
922 EV67) UNAME_MACHINE=alphaev67 ;;
923 EV68*) UNAME_MACHINE=alphaev68 ;;
924 esac
925 objdump --private-headers /bin/sh | grep -q ld.so.1
926 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
927 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
928 exit ;;
929 arc:Linux:*:* | arceb:Linux:*:*)
930 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
931 exit ;;
932 arm*:Linux:*:*)
933 set_cc_for_build
934 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
935 | grep -q __ARM_EABI__
936 then
937 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
938 else
939 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
940 | grep -q __ARM_PCS_VFP
941 then
942 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
943 else
944 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
945 fi
946 fi
947 exit ;;
948 avr32*:Linux:*:*)
949 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
950 exit ;;
951 cris:Linux:*:*)
952 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
953 exit ;;
954 crisv32:Linux:*:*)
955 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
956 exit ;;
957 e2k:Linux:*:*)
958 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
959 exit ;;
960 frv:Linux:*:*)
961 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
962 exit ;;
963 hexagon:Linux:*:*)
964 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
965 exit ;;
966 i*86:Linux:*:*)
967 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
968 exit ;;
969 ia64:Linux:*:*)
970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
971 exit ;;
972 k1om:Linux:*:*)
973 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
974 exit ;;
975 m32r*:Linux:*:*)
976 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
977 exit ;;
978 m68*:Linux:*:*)
979 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
980 exit ;;
981 mips:Linux:*:* | mips64:Linux:*:*)
982 set_cc_for_build
983 sed 's/^ //' << EOF > "$dummy.c"
984 #undef CPU
985 #undef ${UNAME_MACHINE}
986 #undef ${UNAME_MACHINE}el
987 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
988 CPU=${UNAME_MACHINE}el
989 #else
990 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
991 CPU=${UNAME_MACHINE}
992 #else
993 CPU=
994 #endif
995 #endif
996 EOF
997 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
998 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
999 ;;
1000 mips64el:Linux:*:*)
1001 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1002 exit ;;
1003 openrisc*:Linux:*:*)
1004 echo or1k-unknown-linux-"$LIBC"
1005 exit ;;
1006 or32:Linux:*:* | or1k*:Linux:*:*)
1007 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1008 exit ;;
1009 padre:Linux:*:*)
1010 echo sparc-unknown-linux-"$LIBC"
1011 exit ;;
1012 parisc64:Linux:*:* | hppa64:Linux:*:*)
1013 echo hppa64-unknown-linux-"$LIBC"
1014 exit ;;
1015 parisc:Linux:*:* | hppa:Linux:*:*)
1016 # Look for CPU level
1017 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1018 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1019 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1020 *) echo hppa-unknown-linux-"$LIBC" ;;
1021 esac
1022 exit ;;
1023 ppc64:Linux:*:*)
1024 echo powerpc64-unknown-linux-"$LIBC"
1025 exit ;;
1026 ppc:Linux:*:*)
1027 echo powerpc-unknown-linux-"$LIBC"
1028 exit ;;
1029 ppc64le:Linux:*:*)
1030 echo powerpc64le-unknown-linux-"$LIBC"
1031 exit ;;
1032 ppcle:Linux:*:*)
1033 echo powerpcle-unknown-linux-"$LIBC"
1034 exit ;;
1035 riscv32:Linux:*:* | riscv64:Linux:*:*)
1036 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1037 exit ;;
1038 s390:Linux:*:* | s390x:Linux:*:*)
1039 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
1040 exit ;;
1041 sh64*:Linux:*:*)
1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1043 exit ;;
1044 sh*:Linux:*:*)
1045 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1046 exit ;;
1047 sparc:Linux:*:* | sparc64:Linux:*:*)
1048 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1049 exit ;;
1050 tile*:Linux:*:*)
1051 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1052 exit ;;
1053 vax:Linux:*:*)
1054 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
1055 exit ;;
1056 x86_64:Linux:*:*)
1057 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1058 exit ;;
1059 xtensa*:Linux:*:*)
1060 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1061 exit ;;
1062 i*86:DYNIX/ptx:4*:*)
1063 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1064 # earlier versions are messed up and put the nodename in both
1065 # sysname and nodename.
1066 echo i386-sequent-sysv4
1067 exit ;;
1068 i*86:UNIX_SV:4.2MP:2.*)
1069 # Unixware is an offshoot of SVR4, but it has its own version
1070 # number series starting with 2...
1071 # I am not positive that other SVR4 systems won't match this,
1072 # I just have to hope. -- rms.
1073 # Use sysv4.2uw... so that sysv4* matches it.
1074 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
1075 exit ;;
1076 i*86:OS/2:*:*)
1077 # If we were able to find `uname', then EMX Unix compatibility
1078 # is probably installed.
1079 echo "$UNAME_MACHINE"-pc-os2-emx
1080 exit ;;
1081 i*86:XTS-300:*:STOP)
1082 echo "$UNAME_MACHINE"-unknown-stop
1083 exit ;;
1084 i*86:atheos:*:*)
1085 echo "$UNAME_MACHINE"-unknown-atheos
1086 exit ;;
1087 i*86:syllable:*:*)
1088 echo "$UNAME_MACHINE"-pc-syllable
1089 exit ;;
1090 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1091 echo i386-unknown-lynxos"$UNAME_RELEASE"
1092 exit ;;
1093 i*86:*DOS:*:*)
1094 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1095 exit ;;
1096 i*86:*:4.*:*)
1097 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
1098 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1099 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
1100 else
1101 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1102 fi
1103 exit ;;
1104 i*86:*:5:[678]*)
1105 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1106 case `/bin/uname -X | grep "^Machine"` in
1107 *486*) UNAME_MACHINE=i486 ;;
1108 *Pentium) UNAME_MACHINE=i586 ;;
1109 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1110 esac
1111 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1112 exit ;;
1113 i*86:*:3.2:*)
1114 if test -f /usr/options/cb.name; then
1115 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1116 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
1117 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1118 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1119 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1120 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1121 && UNAME_MACHINE=i586
1122 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1123 && UNAME_MACHINE=i686
1124 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1125 && UNAME_MACHINE=i686
1126 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
1127 else
1128 echo "$UNAME_MACHINE"-pc-sysv32
1129 fi
1130 exit ;;
1131 pc:*:*:*)
1132 # Left here for compatibility:
1133 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1134 # the processor, so we play safe by assuming i586.
1135 # Note: whatever this is, it MUST be the same as what config.sub
1136 # prints for the "djgpp" host, or else GDB configure will decide that
1137 # this is a cross-build.
1138 echo i586-pc-msdosdjgpp
1139 exit ;;
1140 Intel:Mach:3*:*)
1141 echo i386-pc-mach3
1142 exit ;;
1143 paragon:*:*:*)
1144 echo i860-intel-osf1
1145 exit ;;
1146 i860:*:4.*:*) # i860-SVR4
1147 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1148 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
1149 else # Add other i860-SVR4 vendors below as they are discovered.
1150 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
1151 fi
1152 exit ;;
1153 mini*:CTIX:SYS*5:*)
1154 # "miniframe"
1155 echo m68010-convergent-sysv
1156 exit ;;
1157 mc68k:UNIX:SYSTEM5:3.51m)
1158 echo m68k-convergent-sysv
1159 exit ;;
1160 M680?0:D-NIX:5.3:*)
1161 echo m68k-diab-dnix
1162 exit ;;
1163 M68*:*:R3V[5678]*:*)
1164 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1165 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)
1166 OS_REL=''
1167 test -r /etc/.relid \
1168 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1169 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1170 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1171 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1172 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1173 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1174 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1175 && { echo i486-ncr-sysv4; exit; } ;;
1176 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1177 OS_REL='.3'
1178 test -r /etc/.relid \
1179 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1180 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1181 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1182 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1183 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
1184 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1185 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1186 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1187 echo m68k-unknown-lynxos"$UNAME_RELEASE"
1188 exit ;;
1189 mc68030:UNIX_System_V:4.*:*)
1190 echo m68k-atari-sysv4
1191 exit ;;
1192 TSUNAMI:LynxOS:2.*:*)
1193 echo sparc-unknown-lynxos"$UNAME_RELEASE"
1194 exit ;;
1195 rs6000:LynxOS:2.*:*)
1196 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
1197 exit ;;
1198 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1199 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
1200 exit ;;
1201 SM[BE]S:UNIX_SV:*:*)
1202 echo mips-dde-sysv"$UNAME_RELEASE"
1203 exit ;;
1204 RM*:ReliantUNIX-*:*:*)
1205 echo mips-sni-sysv4
1206 exit ;;
1207 RM*:SINIX-*:*:*)
1208 echo mips-sni-sysv4
1209 exit ;;
1210 *:SINIX-*:*:*)
1211 if uname -p 2>/dev/null >/dev/null ; then
1212 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1213 echo "$UNAME_MACHINE"-sni-sysv4
1214 else
1215 echo ns32k-sni-sysv
1216 fi
1217 exit ;;
1218 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1219 # says <Richard.M.Bartel@ccMail.Census.GOV>
1220 echo i586-unisys-sysv4
1221 exit ;;
1222 *:UNIX_System_V:4*:FTX*)
1223 # From Gerald Hewes <hewes@openmarket.com>.
1224 # How about differentiating between stratus architectures? -djm
1225 echo hppa1.1-stratus-sysv4
1226 exit ;;
1227 *:*:*:FTX*)
1228 # From seanf@swdc.stratus.com.
1229 echo i860-stratus-sysv4
1230 exit ;;
1231 i*86:VOS:*:*)
1232 # From Paul.Green@stratus.com.
1233 echo "$UNAME_MACHINE"-stratus-vos
1234 exit ;;
1235 *:VOS:*:*)
1236 # From Paul.Green@stratus.com.
1237 echo hppa1.1-stratus-vos
1238 exit ;;
1239 mc68*:A/UX:*:*)
1240 echo m68k-apple-aux"$UNAME_RELEASE"
1241 exit ;;
1242 news*:NEWS-OS:6*:*)
1243 echo mips-sony-newsos6
1244 exit ;;
1245 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1246 if [ -d /usr/nec ]; then
1247 echo mips-nec-sysv"$UNAME_RELEASE"
1248 else
1249 echo mips-unknown-sysv"$UNAME_RELEASE"
1250 fi
1251 exit ;;
1252 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1253 echo powerpc-be-beos
1254 exit ;;
1255 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1256 echo powerpc-apple-beos
1257 exit ;;
1258 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1259 echo i586-pc-beos
1260 exit ;;
1261 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1262 echo i586-pc-haiku
1263 exit ;;
1264 x86_64:Haiku:*:*)
1265 echo x86_64-unknown-haiku
1266 exit ;;
1267 SX-4:SUPER-UX:*:*)
1268 echo sx4-nec-superux"$UNAME_RELEASE"
1269 exit ;;
1270 SX-5:SUPER-UX:*:*)
1271 echo sx5-nec-superux"$UNAME_RELEASE"
1272 exit ;;
1273 SX-6:SUPER-UX:*:*)
1274 echo sx6-nec-superux"$UNAME_RELEASE"
1275 exit ;;
1276 SX-7:SUPER-UX:*:*)
1277 echo sx7-nec-superux"$UNAME_RELEASE"
1278 exit ;;
1279 SX-8:SUPER-UX:*:*)
1280 echo sx8-nec-superux"$UNAME_RELEASE"
1281 exit ;;
1282 SX-8R:SUPER-UX:*:*)
1283 echo sx8r-nec-superux"$UNAME_RELEASE"
1284 exit ;;
1285 SX-ACE:SUPER-UX:*:*)
1286 echo sxace-nec-superux"$UNAME_RELEASE"
1287 exit ;;
1288 Power*:Rhapsody:*:*)
1289 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
1290 exit ;;
1291 *:Rhapsody:*:*)
1292 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1293 exit ;;
1294 *:Darwin:*:*)
1295 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1296 set_cc_for_build
1297 if test "$UNAME_PROCESSOR" = unknown ; then
1298 UNAME_PROCESSOR=powerpc
1299 fi
1300 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1301 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1302 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1303 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1304 grep IS_64BIT_ARCH >/dev/null
1305 then
1306 case $UNAME_PROCESSOR in
1307 i386) UNAME_PROCESSOR=x86_64 ;;
1308 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1309 esac
1310 fi
1311 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1312 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1313 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1314 grep IS_PPC >/dev/null
1315 then
1316 UNAME_PROCESSOR=powerpc
1317 fi
1318 fi
1319 elif test "$UNAME_PROCESSOR" = i386 ; then
1320 # Avoid executing cc on OS X 10.9, as it ships with a stub
1321 # that puts up a graphical alert prompting to install
1322 # developer tools. Any system running Mac OS X 10.7 or
1323 # later (Darwin 11 and later) is required to have a 64-bit
1324 # processor. This is not true of the ARM version of Darwin
1325 # that Apple uses in portable devices.
1326 UNAME_PROCESSOR=x86_64
1327 fi
1328 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1329 exit ;;
1330 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1331 UNAME_PROCESSOR=`uname -p`
1332 if test "$UNAME_PROCESSOR" = x86; then
1333 UNAME_PROCESSOR=i386
1334 UNAME_MACHINE=pc
1335 fi
1336 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
1337 exit ;;
1338 *:QNX:*:4*)
1339 echo i386-pc-qnx
1340 exit ;;
1341 NEO-*:NONSTOP_KERNEL:*:*)
1342 echo neo-tandem-nsk"$UNAME_RELEASE"
1343 exit ;;
1344 NSE-*:NONSTOP_KERNEL:*:*)
1345 echo nse-tandem-nsk"$UNAME_RELEASE"
1346 exit ;;
1347 NSR-*:NONSTOP_KERNEL:*:*)
1348 echo nsr-tandem-nsk"$UNAME_RELEASE"
1349 exit ;;
1350 NSV-*:NONSTOP_KERNEL:*:*)
1351 echo nsv-tandem-nsk"$UNAME_RELEASE"
1352 exit ;;
1353 NSX-*:NONSTOP_KERNEL:*:*)
1354 echo nsx-tandem-nsk"$UNAME_RELEASE"
1355 exit ;;
1356 *:NonStop-UX:*:*)
1357 echo mips-compaq-nonstopux
1358 exit ;;
1359 BS2000:POSIX*:*:*)
1360 echo bs2000-siemens-sysv
1361 exit ;;
1362 DS/*:UNIX_System_V:*:*)
1363 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
1364 exit ;;
1365 *:Plan9:*:*)
1366 # "uname -m" is not consistent, so use $cputype instead. 386
1367 # is converted to i386 for consistency with other x86
1368 # operating systems.
1369 # shellcheck disable=SC2154
1370 if test "$cputype" = 386; then
1371 UNAME_MACHINE=i386
1372 else
1373 UNAME_MACHINE="$cputype"
1374 fi
1375 echo "$UNAME_MACHINE"-unknown-plan9
1376 exit ;;
1377 *:TOPS-10:*:*)
1378 echo pdp10-unknown-tops10
1379 exit ;;
1380 *:TENEX:*:*)
1381 echo pdp10-unknown-tenex
1382 exit ;;
1383 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1384 echo pdp10-dec-tops20
1385 exit ;;
1386 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1387 echo pdp10-xkl-tops20
1388 exit ;;
1389 *:TOPS-20:*:*)
1390 echo pdp10-unknown-tops20
1391 exit ;;
1392 *:ITS:*:*)
1393 echo pdp10-unknown-its
1394 exit ;;
1395 SEI:*:*:SEIUX)
1396 echo mips-sei-seiux"$UNAME_RELEASE"
1397 exit ;;
1398 *:DragonFly:*:*)
1399 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
1400 exit ;;
1401 *:*VMS:*:*)
1402 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1403 case "$UNAME_MACHINE" in
1404 A*) echo alpha-dec-vms ; exit ;;
1405 I*) echo ia64-dec-vms ; exit ;;
1406 V*) echo vax-dec-vms ; exit ;;
1407 esac ;;
1408 *:XENIX:*:SysV)
1409 echo i386-pc-xenix
1410 exit ;;
1411 i*86:skyos:*:*)
1412 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
1413 exit ;;
1414 i*86:rdos:*:*)
1415 echo "$UNAME_MACHINE"-pc-rdos
1416 exit ;;
1417 i*86:AROS:*:*)
1418 echo "$UNAME_MACHINE"-pc-aros
1419 exit ;;
1420 x86_64:VMkernel:*:*)
1421 echo "$UNAME_MACHINE"-unknown-esx
1422 exit ;;
1423 amd64:Isilon\ OneFS:*:*)
1424 echo x86_64-unknown-onefs
1425 exit ;;
1426 esac
1427
1428 echo "$0: unable to guess system type" >&2
1429
1430 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1431 mips:Linux | mips64:Linux)
1432 # If we got here on MIPS GNU/Linux, output extra information.
1433 cat >&2 <<EOF
1434
1435 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1436 the system type. Please install a C compiler and try again.
1437 EOF
1438 ;;
1439 esac
1440
1441 cat >&2 <<EOF
1442
1443 This script (version $timestamp), has failed to recognize the
1444 operating system you are using. If your script is old, overwrite *all*
1445 copies of config.guess and config.sub with the latest versions from:
1446
1447 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1448 and
1449 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1450
1451 If $0 has already been updated, send the following data and any
1452 information you think might be pertinent to config-patches@gnu.org to
1453 provide the necessary information to handle your system.
1454
1455 config.guess timestamp = $timestamp
1456
1457 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1458 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1459 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1460 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1461
1462 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1463 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1464
1465 hostinfo = `(hostinfo) 2>/dev/null`
1466 /bin/universe = `(/bin/universe) 2>/dev/null`
1467 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1468 /bin/arch = `(/bin/arch) 2>/dev/null`
1469 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1470 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1471
1472 UNAME_MACHINE = "$UNAME_MACHINE"
1473 UNAME_RELEASE = "$UNAME_RELEASE"
1474 UNAME_SYSTEM = "$UNAME_SYSTEM"
1475 UNAME_VERSION = "$UNAME_VERSION"
1476 EOF
1477
1478 exit 1
1479
1480 # Local variables:
1481 # eval: (add-hook 'before-save-hook 'time-stamp)
1482 # time-stamp-start: "timestamp='"
1483 # time-stamp-format: "%:y-%02m-%02d"
1484 # time-stamp-end: "'"
1485 # End:
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-08-29'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25
26
27 # Please send patches to <config-patches@gnu.org>.
28 #
29 # Configuration subroutine to validate and canonicalize a configuration type.
30 # Supply the specified configuration type as an argument.
31 # If it is invalid, we print an error message on stderr and exit with code 1.
32 # Otherwise, we print the canonical config type on stdout and succeed.
33
34 # You can get the latest version of this script from:
35 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
36
37 # This file is supposed to be the same for all GNU packages
38 # and recognize all the CPU types, system types and aliases
39 # that are meaningful with *any* GNU software.
40 # Each package is responsible for reporting which valid configurations
41 # it does not support. The user should be able to distinguish
42 # a failure to support a valid configuration from a meaningless
43 # configuration.
44
45 # The goal of this file is to map all the various variations of a given
46 # machine specification into a single specification in the form:
47 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
48 # or in some cases, the newer four-part form:
49 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
50 # It is wrong to echo any other type of specification.
51
52 me=`echo "$0" | sed -e 's,.*/,,'`
53
54 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
56
57 Canonicalize a configuration name.
58
59 Options:
60 -h, --help print this help, then exit
61 -t, --time-stamp print date of last modification, then exit
62 -v, --version print version number, then exit
63
64 Report bugs and patches to <config-patches@gnu.org>."
65
66 version="\
67 GNU config.sub ($timestamp)
68
69 Copyright 1992-2018 Free Software Foundation, Inc.
70
71 This is free software; see the source for copying conditions. There is NO
72 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
73
74 help="
75 Try \`$me --help' for more information."
76
77 # Parse command line
78 while test $# -gt 0 ; do
79 case $1 in
80 --time-stamp | --time* | -t )
81 echo "$timestamp" ; exit ;;
82 --version | -v )
83 echo "$version" ; exit ;;
84 --help | --h* | -h )
85 echo "$usage"; exit ;;
86 -- ) # Stop option processing
87 shift; break ;;
88 - ) # Use stdin as input.
89 break ;;
90 -* )
91 echo "$me: invalid option $1$help" >&2
92 exit 1 ;;
93
94 *local*)
95 # First pass through any local machine types.
96 echo "$1"
97 exit ;;
98
99 * )
100 break ;;
101 esac
102 done
103
104 case $# in
105 0) echo "$me: missing argument$help" >&2
106 exit 1;;
107 1) ;;
108 *) echo "$me: too many arguments$help" >&2
109 exit 1;;
110 esac
111
112 # Split fields of configuration type
113 IFS="-" read -r field1 field2 field3 field4 <<EOF
114 $1
115 EOF
116
117 # Separate into logical components for further validation
118 case $1 in
119 *-*-*-*-*)
120 echo Invalid configuration \`"$1"\': more than four components >&2
121 exit 1
122 ;;
123 *-*-*-*)
124 basic_machine=$field1-$field2
125 os=$field3-$field4
126 ;;
127 *-*-*)
128 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
129 # parts
130 maybe_os=$field2-$field3
131 case $maybe_os in
132 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
133 | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
134 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
135 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
136 | storm-chaos* | os2-emx* | rtmk-nova*)
137 basic_machine=$field1
138 os=$maybe_os
139 ;;
140 android-linux)
141 basic_machine=$field1-unknown
142 os=linux-android
143 ;;
144 *)
145 basic_machine=$field1-$field2
146 os=$field3
147 ;;
148 esac
149 ;;
150 *-*)
151 # A lone config we happen to match not fitting any pattern
152 case $field1-$field2 in
153 decstation-3100)
154 basic_machine=mips-dec
155 os=
156 ;;
157 *-*)
158 # Second component is usually, but not always the OS
159 case $field2 in
160 # Prevent following clause from handling this valid os
161 sun*os*)
162 basic_machine=$field1
163 os=$field2
164 ;;
165 # Manufacturers
166 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
167 | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
168 | unicom* | ibm* | next | hp | isi* | apollo | altos* \
169 | convergent* | ncr* | news | 32* | 3600* | 3100* \
170 | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
171 | ultra | tti* | harris | dolphin | highlevel | gould \
172 | cbm | ns | masscomp | apple | axis | knuth | cray \
173 | microblaze* | sim | cisco \
174 | oki | wec | wrs | winbond)
175 basic_machine=$field1-$field2
176 os=
177 ;;
178 *)
179 basic_machine=$field1
180 os=$field2
181 ;;
182 esac
183 ;;
184 esac
185 ;;
186 *)
187 # Convert single-component short-hands not valid as part of
188 # multi-component configurations.
189 case $field1 in
190 386bsd)
191 basic_machine=i386-pc
192 os=bsd
193 ;;
194 a29khif)
195 basic_machine=a29k-amd
196 os=udi
197 ;;
198 adobe68k)
199 basic_machine=m68010-adobe
200 os=scout
201 ;;
202 alliant)
203 basic_machine=fx80-alliant
204 os=
205 ;;
206 altos | altos3068)
207 basic_machine=m68k-altos
208 os=
209 ;;
210 am29k)
211 basic_machine=a29k-none
212 os=bsd
213 ;;
214 amdahl)
215 basic_machine=580-amdahl
216 os=sysv
217 ;;
218 amiga)
219 basic_machine=m68k-unknown
220 os=
221 ;;
222 amigaos | amigados)
223 basic_machine=m68k-unknown
224 os=amigaos
225 ;;
226 amigaunix | amix)
227 basic_machine=m68k-unknown
228 os=sysv4
229 ;;
230 apollo68)
231 basic_machine=m68k-apollo
232 os=sysv
233 ;;
234 apollo68bsd)
235 basic_machine=m68k-apollo
236 os=bsd
237 ;;
238 aros)
239 basic_machine=i386-pc
240 os=aros
241 ;;
242 aux)
243 basic_machine=m68k-apple
244 os=aux
245 ;;
246 balance)
247 basic_machine=ns32k-sequent
248 os=dynix
249 ;;
250 blackfin)
251 basic_machine=bfin-unknown
252 os=linux
253 ;;
254 cegcc)
255 basic_machine=arm-unknown
256 os=cegcc
257 ;;
258 convex-c1)
259 basic_machine=c1-convex
260 os=bsd
261 ;;
262 convex-c2)
263 basic_machine=c2-convex
264 os=bsd
265 ;;
266 convex-c32)
267 basic_machine=c32-convex
268 os=bsd
269 ;;
270 convex-c34)
271 basic_machine=c34-convex
272 os=bsd
273 ;;
274 convex-c38)
275 basic_machine=c38-convex
276 os=bsd
277 ;;
278 cray)
279 basic_machine=j90-cray
280 os=unicos
281 ;;
282 crds | unos)
283 basic_machine=m68k-crds
284 os=
285 ;;
286 da30)
287 basic_machine=m68k-da30
288 os=
289 ;;
290 decstation | pmax | pmin | dec3100 | decstatn)
291 basic_machine=mips-dec
292 os=
293 ;;
294 delta88)
295 basic_machine=m88k-motorola
296 os=sysv3
297 ;;
298 dicos)
299 basic_machine=i686-pc
300 os=dicos
301 ;;
302 djgpp)
303 basic_machine=i586-pc
304 os=msdosdjgpp
305 ;;
306 ebmon29k)
307 basic_machine=a29k-amd
308 os=ebmon
309 ;;
310 es1800 | OSE68k | ose68k | ose | OSE)
311 basic_machine=m68k-ericsson
312 os=ose
313 ;;
314 gmicro)
315 basic_machine=tron-gmicro
316 os=sysv
317 ;;
318 go32)
319 basic_machine=i386-pc
320 os=go32
321 ;;
322 h8300hms)
323 basic_machine=h8300-hitachi
324 os=hms
325 ;;
326 h8300xray)
327 basic_machine=h8300-hitachi
328 os=xray
329 ;;
330 h8500hms)
331 basic_machine=h8500-hitachi
332 os=hms
333 ;;
334 harris)
335 basic_machine=m88k-harris
336 os=sysv3
337 ;;
338 hp300)
339 basic_machine=m68k-hp
340 ;;
341 hp300bsd)
342 basic_machine=m68k-hp
343 os=bsd
344 ;;
345 hp300hpux)
346 basic_machine=m68k-hp
347 os=hpux
348 ;;
349 hppaosf)
350 basic_machine=hppa1.1-hp
351 os=osf
352 ;;
353 hppro)
354 basic_machine=hppa1.1-hp
355 os=proelf
356 ;;
357 i386mach)
358 basic_machine=i386-mach
359 os=mach
360 ;;
361 vsta)
362 basic_machine=i386-pc
363 os=vsta
364 ;;
365 isi68 | isi)
366 basic_machine=m68k-isi
367 os=sysv
368 ;;
369 m68knommu)
370 basic_machine=m68k-unknown
371 os=linux
372 ;;
373 magnum | m3230)
374 basic_machine=mips-mips
375 os=sysv
376 ;;
377 merlin)
378 basic_machine=ns32k-utek
379 os=sysv
380 ;;
381 mingw64)
382 basic_machine=x86_64-pc
383 os=mingw64
384 ;;
385 mingw32)
386 basic_machine=i686-pc
387 os=mingw32
388 ;;
389 mingw32ce)
390 basic_machine=arm-unknown
391 os=mingw32ce
392 ;;
393 monitor)
394 basic_machine=m68k-rom68k
395 os=coff
396 ;;
397 morphos)
398 basic_machine=powerpc-unknown
399 os=morphos
400 ;;
401 moxiebox)
402 basic_machine=moxie-unknown
403 os=moxiebox
404 ;;
405 msdos)
406 basic_machine=i386-pc
407 os=msdos
408 ;;
409 msys)
410 basic_machine=i686-pc
411 os=msys
412 ;;
413 mvs)
414 basic_machine=i370-ibm
415 os=mvs
416 ;;
417 nacl)
418 basic_machine=le32-unknown
419 os=nacl
420 ;;
421 ncr3000)
422 basic_machine=i486-ncr
423 os=sysv4
424 ;;
425 netbsd386)
426 basic_machine=i386-pc
427 os=netbsd
428 ;;
429 netwinder)
430 basic_machine=armv4l-rebel
431 os=linux
432 ;;
433 news | news700 | news800 | news900)
434 basic_machine=m68k-sony
435 os=newsos
436 ;;
437 news1000)
438 basic_machine=m68030-sony
439 os=newsos
440 ;;
441 necv70)
442 basic_machine=v70-nec
443 os=sysv
444 ;;
445 nh3000)
446 basic_machine=m68k-harris
447 os=cxux
448 ;;
449 nh[45]000)
450 basic_machine=m88k-harris
451 os=cxux
452 ;;
453 nindy960)
454 basic_machine=i960-intel
455 os=nindy
456 ;;
457 mon960)
458 basic_machine=i960-intel
459 os=mon960
460 ;;
461 nonstopux)
462 basic_machine=mips-compaq
463 os=nonstopux
464 ;;
465 os400)
466 basic_machine=powerpc-ibm
467 os=os400
468 ;;
469 OSE68000 | ose68000)
470 basic_machine=m68000-ericsson
471 os=ose
472 ;;
473 os68k)
474 basic_machine=m68k-none
475 os=os68k
476 ;;
477 paragon)
478 basic_machine=i860-intel
479 os=osf
480 ;;
481 parisc)
482 basic_machine=hppa-unknown
483 os=linux
484 ;;
485 pw32)
486 basic_machine=i586-unknown
487 os=pw32
488 ;;
489 rdos | rdos64)
490 basic_machine=x86_64-pc
491 os=rdos
492 ;;
493 rdos32)
494 basic_machine=i386-pc
495 os=rdos
496 ;;
497 rom68k)
498 basic_machine=m68k-rom68k
499 os=coff
500 ;;
501 sa29200)
502 basic_machine=a29k-amd
503 os=udi
504 ;;
505 sei)
506 basic_machine=mips-sei
507 os=seiux
508 ;;
509 sequent)
510 basic_machine=i386-sequent
511 os=
512 ;;
513 sps7)
514 basic_machine=m68k-bull
515 os=sysv2
516 ;;
517 st2000)
518 basic_machine=m68k-tandem
519 os=
520 ;;
521 stratus)
522 basic_machine=i860-stratus
523 os=sysv4
524 ;;
525 sun2)
526 basic_machine=m68000-sun
527 os=
528 ;;
529 sun2os3)
530 basic_machine=m68000-sun
531 os=sunos3
532 ;;
533 sun2os4)
534 basic_machine=m68000-sun
535 os=sunos4
536 ;;
537 sun3)
538 basic_machine=m68k-sun
539 os=
540 ;;
541 sun3os3)
542 basic_machine=m68k-sun
543 os=sunos3
544 ;;
545 sun3os4)
546 basic_machine=m68k-sun
547 os=sunos4
548 ;;
549 sun4)
550 basic_machine=sparc-sun
551 os=
552 ;;
553 sun4os3)
554 basic_machine=sparc-sun
555 os=sunos3
556 ;;
557 sun4os4)
558 basic_machine=sparc-sun
559 os=sunos4
560 ;;
561 sun4sol2)
562 basic_machine=sparc-sun
563 os=solaris2
564 ;;
565 sun386 | sun386i | roadrunner)
566 basic_machine=i386-sun
567 os=
568 ;;
569 sv1)
570 basic_machine=sv1-cray
571 os=unicos
572 ;;
573 symmetry)
574 basic_machine=i386-sequent
575 os=dynix
576 ;;
577 t3e)
578 basic_machine=alphaev5-cray
579 os=unicos
580 ;;
581 t90)
582 basic_machine=t90-cray
583 os=unicos
584 ;;
585 toad1)
586 basic_machine=pdp10-xkl
587 os=tops20
588 ;;
589 tpf)
590 basic_machine=s390x-ibm
591 os=tpf
592 ;;
593 udi29k)
594 basic_machine=a29k-amd
595 os=udi
596 ;;
597 ultra3)
598 basic_machine=a29k-nyu
599 os=sym1
600 ;;
601 v810 | necv810)
602 basic_machine=v810-nec
603 os=none
604 ;;
605 vaxv)
606 basic_machine=vax-dec
607 os=sysv
608 ;;
609 vms)
610 basic_machine=vax-dec
611 os=vms
612 ;;
613 vxworks960)
614 basic_machine=i960-wrs
615 os=vxworks
616 ;;
617 vxworks68)
618 basic_machine=m68k-wrs
619 os=vxworks
620 ;;
621 vxworks29k)
622 basic_machine=a29k-wrs
623 os=vxworks
624 ;;
625 xbox)
626 basic_machine=i686-pc
627 os=mingw32
628 ;;
629 ymp)
630 basic_machine=ymp-cray
631 os=unicos
632 ;;
633 *)
634 basic_machine=$1
635 os=
636 ;;
637 esac
638 ;;
639 esac
640
641 # Decode 1-component or ad-hoc basic machines
642 case $basic_machine in
643 # Here we handle the default manufacturer of certain CPU types. It is in
644 # some cases the only manufacturer, in others, it is the most popular.
645 w89k)
646 cpu=hppa1.1
647 vendor=winbond
648 ;;
649 op50n)
650 cpu=hppa1.1
651 vendor=oki
652 ;;
653 op60c)
654 cpu=hppa1.1
655 vendor=oki
656 ;;
657 ibm*)
658 cpu=i370
659 vendor=ibm
660 ;;
661 orion105)
662 cpu=clipper
663 vendor=highlevel
664 ;;
665 mac | mpw | mac-mpw)
666 cpu=m68k
667 vendor=apple
668 ;;
669 pmac | pmac-mpw)
670 cpu=powerpc
671 vendor=apple
672 ;;
673
674 # Recognize the various machine names and aliases which stand
675 # for a CPU type and a company and sometimes even an OS.
676 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
677 cpu=m68000
678 vendor=att
679 ;;
680 3b*)
681 cpu=we32k
682 vendor=att
683 ;;
684 bluegene*)
685 cpu=powerpc
686 vendor=ibm
687 os=cnk
688 ;;
689 decsystem10* | dec10*)
690 cpu=pdp10
691 vendor=dec
692 os=tops10
693 ;;
694 decsystem20* | dec20*)
695 cpu=pdp10
696 vendor=dec
697 os=tops20
698 ;;
699 delta | 3300 | motorola-3300 | motorola-delta \
700 | 3300-motorola | delta-motorola)
701 cpu=m68k
702 vendor=motorola
703 ;;
704 dpx2*)
705 cpu=m68k
706 vendor=bull
707 os=sysv3
708 ;;
709 encore | umax | mmax)
710 cpu=ns32k
711 vendor=encore
712 ;;
713 elxsi)
714 cpu=elxsi
715 vendor=elxsi
716 os=${os:-bsd}
717 ;;
718 fx2800)
719 cpu=i860
720 vendor=alliant
721 ;;
722 genix)
723 cpu=ns32k
724 vendor=ns
725 ;;
726 h3050r* | hiux*)
727 cpu=hppa1.1
728 vendor=hitachi
729 os=hiuxwe2
730 ;;
731 hp3k9[0-9][0-9] | hp9[0-9][0-9])
732 cpu=hppa1.0
733 vendor=hp
734 ;;
735 hp9k2[0-9][0-9] | hp9k31[0-9])
736 cpu=m68000
737 vendor=hp
738 ;;
739 hp9k3[2-9][0-9])
740 cpu=m68k
741 vendor=hp
742 ;;
743 hp9k6[0-9][0-9] | hp6[0-9][0-9])
744 cpu=hppa1.0
745 vendor=hp
746 ;;
747 hp9k7[0-79][0-9] | hp7[0-79][0-9])
748 cpu=hppa1.1
749 vendor=hp
750 ;;
751 hp9k78[0-9] | hp78[0-9])
752 # FIXME: really hppa2.0-hp
753 cpu=hppa1.1
754 vendor=hp
755 ;;
756 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
757 # FIXME: really hppa2.0-hp
758 cpu=hppa1.1
759 vendor=hp
760 ;;
761 hp9k8[0-9][13679] | hp8[0-9][13679])
762 cpu=hppa1.1
763 vendor=hp
764 ;;
765 hp9k8[0-9][0-9] | hp8[0-9][0-9])
766 cpu=hppa1.0
767 vendor=hp
768 ;;
769 i*86v32)
770 cpu=`echo "$1" | sed -e 's/86.*/86/'`
771 vendor=pc
772 os=sysv32
773 ;;
774 i*86v4*)
775 cpu=`echo "$1" | sed -e 's/86.*/86/'`
776 vendor=pc
777 os=sysv4
778 ;;
779 i*86v)
780 cpu=`echo "$1" | sed -e 's/86.*/86/'`
781 vendor=pc
782 os=sysv
783 ;;
784 i*86sol2)
785 cpu=`echo "$1" | sed -e 's/86.*/86/'`
786 vendor=pc
787 os=solaris2
788 ;;
789 j90 | j90-cray)
790 cpu=j90
791 vendor=cray
792 os=${os:-unicos}
793 ;;
794 iris | iris4d)
795 cpu=mips
796 vendor=sgi
797 case $os in
798 irix*)
799 ;;
800 *)
801 os=irix4
802 ;;
803 esac
804 ;;
805 miniframe)
806 cpu=m68000
807 vendor=convergent
808 ;;
809 *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
810 cpu=m68k
811 vendor=atari
812 os=mint
813 ;;
814 news-3600 | risc-news)
815 cpu=mips
816 vendor=sony
817 os=newsos
818 ;;
819 next | m*-next)
820 cpu=m68k
821 vendor=next
822 case $os in
823 nextstep* )
824 ;;
825 ns2*)
826 os=nextstep2
827 ;;
828 *)
829 os=nextstep3
830 ;;
831 esac
832 ;;
833 np1)
834 cpu=np1
835 vendor=gould
836 ;;
837 op50n-* | op60c-*)
838 cpu=hppa1.1
839 vendor=oki
840 os=proelf
841 ;;
842 pa-hitachi)
843 cpu=hppa1.1
844 vendor=hitachi
845 os=hiuxwe2
846 ;;
847 pbd)
848 cpu=sparc
849 vendor=tti
850 ;;
851 pbb)
852 cpu=m68k
853 vendor=tti
854 ;;
855 pc532)
856 cpu=ns32k
857 vendor=pc532
858 ;;
859 pn)
860 cpu=pn
861 vendor=gould
862 ;;
863 power)
864 cpu=power
865 vendor=ibm
866 ;;
867 ps2)
868 cpu=i386
869 vendor=ibm
870 ;;
871 rm[46]00)
872 cpu=mips
873 vendor=siemens
874 ;;
875 rtpc | rtpc-*)
876 cpu=romp
877 vendor=ibm
878 ;;
879 sde)
880 cpu=mipsisa32
881 vendor=sde
882 os=${os:-elf}
883 ;;
884 simso-wrs)
885 cpu=sparclite
886 vendor=wrs
887 os=vxworks
888 ;;
889 tower | tower-32)
890 cpu=m68k
891 vendor=ncr
892 ;;
893 vpp*|vx|vx-*)
894 cpu=f301
895 vendor=fujitsu
896 ;;
897 w65)
898 cpu=w65
899 vendor=wdc
900 ;;
901 w89k-*)
902 cpu=hppa1.1
903 vendor=winbond
904 os=proelf
905 ;;
906 none)
907 cpu=none
908 vendor=none
909 ;;
910 leon|leon[3-9])
911 cpu=sparc
912 vendor=$basic_machine
913 ;;
914 leon-*|leon[3-9]-*)
915 cpu=sparc
916 vendor=`echo "$basic_machine" | sed 's/-.*//'`
917 ;;
918
919 *-*)
920 IFS="-" read -r cpu vendor <<EOF
921 $basic_machine
922 EOF
923 ;;
924 # We use `pc' rather than `unknown'
925 # because (1) that's what they normally are, and
926 # (2) the word "unknown" tends to confuse beginning users.
927 i*86 | x86_64)
928 cpu=$basic_machine
929 vendor=pc
930 ;;
931 # These rules are duplicated from below for sake of the special case above;
932 # i.e. things that normalized to x86 arches should also default to "pc"
933 pc98)
934 cpu=i386
935 vendor=pc
936 ;;
937 x64 | amd64)
938 cpu=x86_64
939 vendor=pc
940 ;;
941 # Recognize the basic CPU types without company name.
942 *)
943 cpu=$basic_machine
944 vendor=unknown
945 ;;
946 esac
947
948 unset -v basic_machine
949
950 # Decode basic machines in the full and proper CPU-Company form.
951 case $cpu-$vendor in
952 # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
953 # some cases the only manufacturer, in others, it is the most popular.
954 craynv-unknown)
955 vendor=cray
956 os=${os:-unicosmp}
957 ;;
958 c90-unknown | c90-cray)
959 vendor=cray
960 os=${os:-unicos}
961 ;;
962 fx80-unknown)
963 vendor=alliant
964 ;;
965 romp-unknown)
966 vendor=ibm
967 ;;
968 mmix-unknown)
969 vendor=knuth
970 ;;
971 microblaze-unknown | microblazeel-unknown)
972 vendor=xilinx
973 ;;
974 rs6000-unknown)
975 vendor=ibm
976 ;;
977 vax-unknown)
978 vendor=dec
979 ;;
980 pdp11-unknown)
981 vendor=dec
982 ;;
983 we32k-unknown)
984 vendor=att
985 ;;
986 cydra-unknown)
987 vendor=cydrome
988 ;;
989 i370-ibm*)
990 vendor=ibm
991 ;;
992 orion-unknown)
993 vendor=highlevel
994 ;;
995 xps-unknown | xps100-unknown)
996 cpu=xps100
997 vendor=honeywell
998 ;;
999
1000 # Here we normalize CPU types with a missing or matching vendor
1001 dpx20-unknown | dpx20-bull)
1002 cpu=rs6000
1003 vendor=bull
1004 os=${os:-bosx}
1005 ;;
1006
1007 # Here we normalize CPU types irrespective of the vendor
1008 amd64-*)
1009 cpu=x86_64
1010 ;;
1011 blackfin-*)
1012 cpu=bfin
1013 os=linux
1014 ;;
1015 c54x-*)
1016 cpu=tic54x
1017 ;;
1018 c55x-*)
1019 cpu=tic55x
1020 ;;
1021 c6x-*)
1022 cpu=tic6x
1023 ;;
1024 e500v[12]-*)
1025 cpu=powerpc
1026 os=$os"spe"
1027 ;;
1028 mips3*-*)
1029 cpu=mips64
1030 ;;
1031 ms1-*)
1032 cpu=mt
1033 ;;
1034 m68knommu-*)
1035 cpu=m68k
1036 os=linux
1037 ;;
1038 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1039 cpu=s12z
1040 ;;
1041 openrisc-*)
1042 cpu=or32
1043 ;;
1044 parisc-*)
1045 cpu=hppa
1046 os=linux
1047 ;;
1048 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1049 cpu=i586
1050 ;;
1051 pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1052 cpu=i686
1053 ;;
1054 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1055 cpu=i686
1056 ;;
1057 pentium4-*)
1058 cpu=i786
1059 ;;
1060 pc98-*)
1061 cpu=i386
1062 ;;
1063 ppc-* | ppcbe-*)
1064 cpu=powerpc
1065 ;;
1066 ppcle-* | powerpclittle-*)
1067 cpu=powerpcle
1068 ;;
1069 ppc64-*)
1070 cpu=powerpc64
1071 ;;
1072 ppc64le-* | powerpc64little-*)
1073 cpu=powerpc64le
1074 ;;
1075 sb1-*)
1076 cpu=mipsisa64sb1
1077 ;;
1078 sb1el-*)
1079 cpu=mipsisa64sb1el
1080 ;;
1081 sh5e[lb]-*)
1082 cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
1083 ;;
1084 spur-*)
1085 cpu=spur
1086 ;;
1087 strongarm-* | thumb-*)
1088 cpu=arm
1089 ;;
1090 tx39-*)
1091 cpu=mipstx39
1092 ;;
1093 tx39el-*)
1094 cpu=mipstx39el
1095 ;;
1096 x64-*)
1097 cpu=x86_64
1098 ;;
1099 xscale-* | xscalee[bl]-*)
1100 cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
1101 ;;
1102
1103 # Recognize the canonical CPU Types that limit and/or modify the
1104 # company names they are paired with.
1105 cr16-*)
1106 os=${os:-elf}
1107 ;;
1108 crisv32-* | etraxfs*-*)
1109 cpu=crisv32
1110 vendor=axis
1111 ;;
1112 cris-* | etrax*-*)
1113 cpu=cris
1114 vendor=axis
1115 ;;
1116 crx-*)
1117 os=${os:-elf}
1118 ;;
1119 neo-tandem)
1120 cpu=neo
1121 vendor=tandem
1122 ;;
1123 nse-tandem)
1124 cpu=nse
1125 vendor=tandem
1126 ;;
1127 nsr-tandem)
1128 cpu=nsr
1129 vendor=tandem
1130 ;;
1131 nsv-tandem)
1132 cpu=nsv
1133 vendor=tandem
1134 ;;
1135 nsx-tandem)
1136 cpu=nsx
1137 vendor=tandem
1138 ;;
1139 s390-*)
1140 cpu=s390
1141 vendor=ibm
1142 ;;
1143 s390x-*)
1144 cpu=s390x
1145 vendor=ibm
1146 ;;
1147 tile*-*)
1148 os=${os:-linux-gnu}
1149 ;;
1150
1151 *)
1152 # Recognize the canonical CPU types that are allowed with any
1153 # company name.
1154 case $cpu in
1155 1750a | 580 \
1156 | a29k \
1157 | aarch64 | aarch64_be \
1158 | abacus \
1159 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1160 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1161 | alphapca5[67] | alpha64pca5[67] \
1162 | am33_2.0 \
1163 | arc | arceb \
1164 | arm | arm[lb]e | arme[lb] | armv* \
1165 | avr | avr32 \
1166 | asmjs \
1167 | ba \
1168 | be32 | be64 \
1169 | bfin | bs2000 \
1170 | c[123]* | c30 | [cjt]90 | c4x \
1171 | c8051 | clipper | craynv | csky | cydra \
1172 | d10v | d30v | dlx | dsp16xx \
1173 | e2k | elxsi | epiphany \
1174 | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
1175 | h8300 | h8500 \
1176 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1177 | hexagon \
1178 | i370 | i*86 | i860 | i960 | ia16 | ia64 \
1179 | ip2k | iq2000 \
1180 | k1om \
1181 | le32 | le64 \
1182 | lm32 \
1183 | m32c | m32r | m32rle \
1184 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
1185 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
1186 | m88110 | m88k | maxq | mb | mcore | mep | metag \
1187 | microblaze | microblazeel \
1188 | mips | mipsbe | mipseb | mipsel | mipsle \
1189 | mips16 \
1190 | mips64 | mips64el \
1191 | mips64octeon | mips64octeonel \
1192 | mips64orion | mips64orionel \
1193 | mips64r5900 | mips64r5900el \
1194 | mips64vr | mips64vrel \
1195 | mips64vr4100 | mips64vr4100el \
1196 | mips64vr4300 | mips64vr4300el \
1197 | mips64vr5000 | mips64vr5000el \
1198 | mips64vr5900 | mips64vr5900el \
1199 | mipsisa32 | mipsisa32el \
1200 | mipsisa32r2 | mipsisa32r2el \
1201 | mipsisa32r6 | mipsisa32r6el \
1202 | mipsisa64 | mipsisa64el \
1203 | mipsisa64r2 | mipsisa64r2el \
1204 | mipsisa64r6 | mipsisa64r6el \
1205 | mipsisa64sb1 | mipsisa64sb1el \
1206 | mipsisa64sr71k | mipsisa64sr71kel \
1207 | mipsr5900 | mipsr5900el \
1208 | mipstx39 | mipstx39el \
1209 | mmix \
1210 | mn10200 | mn10300 \
1211 | moxie \
1212 | mt \
1213 | msp430 \
1214 | nds32 | nds32le | nds32be \
1215 | nfp \
1216 | nios | nios2 | nios2eb | nios2el \
1217 | none | np1 | ns16k | ns32k \
1218 | open8 \
1219 | or1k* \
1220 | or32 \
1221 | orion \
1222 | pdp10 | pdp11 | pj | pjl | pn | power \
1223 | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
1224 | pru \
1225 | pyramid \
1226 | riscv | riscv32 | riscv64 \
1227 | rl78 | romp | rs6000 | rx \
1228 | score \
1229 | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1230 | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
1231 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
1232 | sparclite \
1233 | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
1234 | spu \
1235 | tahoe \
1236 | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
1237 | tron \
1238 | ubicom32 \
1239 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
1240 | vax \
1241 | visium \
1242 | wasm32 \
1243 | we32k \
1244 | x86 | x86_64 | xc16x | xgate | xps100 \
1245 | xstormy16 | xtensa* \
1246 | ymp \
1247 | z8k | z80)
1248 ;;
1249
1250 *)
1251 echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1252 exit 1
1253 ;;
1254 esac
1255 ;;
1256 esac
1257
1258 # Here we canonicalize certain aliases for manufacturers.
1259 case $vendor in
1260 digital*)
1261 vendor=dec
1262 ;;
1263 commodore*)
1264 vendor=cbm
1265 ;;
1266 *)
1267 ;;
1268 esac
1269
1270 # Decode manufacturer-specific aliases for certain operating systems.
1271
1272 if [ x$os != x ]
1273 then
1274 case $os in
1275 # First match some system type aliases that might get confused
1276 # with valid system types.
1277 # solaris* is a basic system type, with this one exception.
1278 auroraux)
1279 os=auroraux
1280 ;;
1281 bluegene*)
1282 os=cnk
1283 ;;
1284 solaris1 | solaris1.*)
1285 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1286 ;;
1287 solaris)
1288 os=solaris2
1289 ;;
1290 unixware*)
1291 os=sysv4.2uw
1292 ;;
1293 gnu/linux*)
1294 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1295 ;;
1296 # es1800 is here to avoid being matched by es* (a different OS)
1297 es1800*)
1298 os=ose
1299 ;;
1300 # Some version numbers need modification
1301 chorusos*)
1302 os=chorusos
1303 ;;
1304 isc)
1305 os=isc2.2
1306 ;;
1307 sco6)
1308 os=sco5v6
1309 ;;
1310 sco5)
1311 os=sco3.2v5
1312 ;;
1313 sco4)
1314 os=sco3.2v4
1315 ;;
1316 sco3.2.[4-9]*)
1317 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
1318 ;;
1319 sco3.2v[4-9]* | sco5v6*)
1320 # Don't forget version if it is 3.2v4 or newer.
1321 ;;
1322 scout)
1323 # Don't match below
1324 ;;
1325 sco*)
1326 os=sco3.2v2
1327 ;;
1328 psos*)
1329 os=psos
1330 ;;
1331 # Now accept the basic system types.
1332 # The portable systems comes first.
1333 # Each alternative MUST end in a * to match a version number.
1334 # sysv* is not here because it comes later, after sysvr4.
1335 gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1336 | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
1337 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1338 | sym* | kopensolaris* | plan9* \
1339 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1340 | aos* | aros* | cloudabi* | sortix* \
1341 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1342 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1343 | knetbsd* | mirbsd* | netbsd* \
1344 | bitrig* | openbsd* | solidbsd* | libertybsd* \
1345 | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
1346 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1347 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1348 | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
1349 | chorusrdb* | cegcc* | glidix* \
1350 | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1351 | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
1352 | linux-newlib* | linux-musl* | linux-uclibc* \
1353 | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1354 | interix* | uwin* | mks* | rhapsody* | darwin* \
1355 | openstep* | oskit* | conix* | pw32* | nonstopux* \
1356 | storm-chaos* | tops10* | tenex* | tops20* | its* \
1357 | os2* | vos* | palmos* | uclinux* | nucleus* \
1358 | morphos* | superux* | rtmk* | windiss* \
1359 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1360 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1361 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1362 | midnightbsd*)
1363 # Remember, each alternative MUST END IN *, to match a version number.
1364 ;;
1365 qnx*)
1366 case $cpu in
1367 x86 | i*86)
1368 ;;
1369 *)
1370 os=nto-$os
1371 ;;
1372 esac
1373 ;;
1374 hiux*)
1375 os=hiuxwe2
1376 ;;
1377 nto-qnx*)
1378 ;;
1379 nto*)
1380 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1381 ;;
1382 sim | xray | os68k* | v88r* \
1383 | windows* | osx | abug | netware* | os9* \
1384 | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
1385 ;;
1386 linux-dietlibc)
1387 os=linux-dietlibc
1388 ;;
1389 linux*)
1390 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1391 ;;
1392 lynx*178)
1393 os=lynxos178
1394 ;;
1395 lynx*5)
1396 os=lynxos5
1397 ;;
1398 lynx*)
1399 os=lynxos
1400 ;;
1401 mac*)
1402 os=`echo "$os" | sed -e 's|mac|macos|'`
1403 ;;
1404 opened*)
1405 os=openedition
1406 ;;
1407 os400*)
1408 os=os400
1409 ;;
1410 sunos5*)
1411 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1412 ;;
1413 sunos6*)
1414 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1415 ;;
1416 wince*)
1417 os=wince
1418 ;;
1419 utek*)
1420 os=bsd
1421 ;;
1422 dynix*)
1423 os=bsd
1424 ;;
1425 acis*)
1426 os=aos
1427 ;;
1428 atheos*)
1429 os=atheos
1430 ;;
1431 syllable*)
1432 os=syllable
1433 ;;
1434 386bsd)
1435 os=bsd
1436 ;;
1437 ctix* | uts*)
1438 os=sysv
1439 ;;
1440 nova*)
1441 os=rtmk-nova
1442 ;;
1443 ns2)
1444 os=nextstep2
1445 ;;
1446 nsk*)
1447 os=nsk
1448 ;;
1449 # Preserve the version number of sinix5.
1450 sinix5.*)
1451 os=`echo $os | sed -e 's|sinix|sysv|'`
1452 ;;
1453 sinix*)
1454 os=sysv4
1455 ;;
1456 tpf*)
1457 os=tpf
1458 ;;
1459 triton*)
1460 os=sysv3
1461 ;;
1462 oss*)
1463 os=sysv3
1464 ;;
1465 svr4*)
1466 os=sysv4
1467 ;;
1468 svr3)
1469 os=sysv3
1470 ;;
1471 sysvr4)
1472 os=sysv4
1473 ;;
1474 # This must come after sysvr4.
1475 sysv*)
1476 ;;
1477 ose*)
1478 os=ose
1479 ;;
1480 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1481 os=mint
1482 ;;
1483 zvmoe)
1484 os=zvmoe
1485 ;;
1486 dicos*)
1487 os=dicos
1488 ;;
1489 pikeos*)
1490 # Until real need of OS specific support for
1491 # particular features comes up, bare metal
1492 # configurations are quite functional.
1493 case $cpu in
1494 arm*)
1495 os=eabi
1496 ;;
1497 *)
1498 os=elf
1499 ;;
1500 esac
1501 ;;
1502 nacl*)
1503 ;;
1504 ios)
1505 ;;
1506 none)
1507 ;;
1508 *-eabi)
1509 ;;
1510 *)
1511 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
1512 exit 1
1513 ;;
1514 esac
1515 else
1516
1517 # Here we handle the default operating systems that come with various machines.
1518 # The value should be what the vendor currently ships out the door with their
1519 # machine or put another way, the most popular os provided with the machine.
1520
1521 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1522 # "-sun"), then you have to tell the case statement up towards the top
1523 # that MANUFACTURER isn't an operating system. Otherwise, code above
1524 # will signal an error saying that MANUFACTURER isn't an operating
1525 # system, and we'll never get to this point.
1526
1527 case $cpu-$vendor in
1528 score-*)
1529 os=elf
1530 ;;
1531 spu-*)
1532 os=elf
1533 ;;
1534 *-acorn)
1535 os=riscix1.2
1536 ;;
1537 arm*-rebel)
1538 os=linux
1539 ;;
1540 arm*-semi)
1541 os=aout
1542 ;;
1543 c4x-* | tic4x-*)
1544 os=coff
1545 ;;
1546 c8051-*)
1547 os=elf
1548 ;;
1549 clipper-intergraph)
1550 os=clix
1551 ;;
1552 hexagon-*)
1553 os=elf
1554 ;;
1555 tic54x-*)
1556 os=coff
1557 ;;
1558 tic55x-*)
1559 os=coff
1560 ;;
1561 tic6x-*)
1562 os=coff
1563 ;;
1564 # This must come before the *-dec entry.
1565 pdp10-*)
1566 os=tops20
1567 ;;
1568 pdp11-*)
1569 os=none
1570 ;;
1571 *-dec | vax-*)
1572 os=ultrix4.2
1573 ;;
1574 m68*-apollo)
1575 os=domain
1576 ;;
1577 i386-sun)
1578 os=sunos4.0.2
1579 ;;
1580 m68000-sun)
1581 os=sunos3
1582 ;;
1583 m68*-cisco)
1584 os=aout
1585 ;;
1586 mep-*)
1587 os=elf
1588 ;;
1589 mips*-cisco)
1590 os=elf
1591 ;;
1592 mips*-*)
1593 os=elf
1594 ;;
1595 or32-*)
1596 os=coff
1597 ;;
1598 *-tti) # must be before sparc entry or we get the wrong os.
1599 os=sysv3
1600 ;;
1601 sparc-* | *-sun)
1602 os=sunos4.1.1
1603 ;;
1604 pru-*)
1605 os=elf
1606 ;;
1607 *-be)
1608 os=beos
1609 ;;
1610 *-ibm)
1611 os=aix
1612 ;;
1613 *-knuth)
1614 os=mmixware
1615 ;;
1616 *-wec)
1617 os=proelf
1618 ;;
1619 *-winbond)
1620 os=proelf
1621 ;;
1622 *-oki)
1623 os=proelf
1624 ;;
1625 *-hp)
1626 os=hpux
1627 ;;
1628 *-hitachi)
1629 os=hiux
1630 ;;
1631 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1632 os=sysv
1633 ;;
1634 *-cbm)
1635 os=amigaos
1636 ;;
1637 *-dg)
1638 os=dgux
1639 ;;
1640 *-dolphin)
1641 os=sysv3
1642 ;;
1643 m68k-ccur)
1644 os=rtu
1645 ;;
1646 m88k-omron*)
1647 os=luna
1648 ;;
1649 *-next)
1650 os=nextstep
1651 ;;
1652 *-sequent)
1653 os=ptx
1654 ;;
1655 *-crds)
1656 os=unos
1657 ;;
1658 *-ns)
1659 os=genix
1660 ;;
1661 i370-*)
1662 os=mvs
1663 ;;
1664 *-gould)
1665 os=sysv
1666 ;;
1667 *-highlevel)
1668 os=bsd
1669 ;;
1670 *-encore)
1671 os=bsd
1672 ;;
1673 *-sgi)
1674 os=irix
1675 ;;
1676 *-siemens)
1677 os=sysv4
1678 ;;
1679 *-masscomp)
1680 os=rtu
1681 ;;
1682 f30[01]-fujitsu | f700-fujitsu)
1683 os=uxpv
1684 ;;
1685 *-rom68k)
1686 os=coff
1687 ;;
1688 *-*bug)
1689 os=coff
1690 ;;
1691 *-apple)
1692 os=macos
1693 ;;
1694 *-atari*)
1695 os=mint
1696 ;;
1697 *-wrs)
1698 os=vxworks
1699 ;;
1700 *)
1701 os=none
1702 ;;
1703 esac
1704 fi
1705
1706 # Here we handle the case where we know the os, and the CPU type, but not the
1707 # manufacturer. We pick the logical manufacturer.
1708 case $vendor in
1709 unknown)
1710 case $os in
1711 riscix*)
1712 vendor=acorn
1713 ;;
1714 sunos*)
1715 vendor=sun
1716 ;;
1717 cnk*|-aix*)
1718 vendor=ibm
1719 ;;
1720 beos*)
1721 vendor=be
1722 ;;
1723 hpux*)
1724 vendor=hp
1725 ;;
1726 mpeix*)
1727 vendor=hp
1728 ;;
1729 hiux*)
1730 vendor=hitachi
1731 ;;
1732 unos*)
1733 vendor=crds
1734 ;;
1735 dgux*)
1736 vendor=dg
1737 ;;
1738 luna*)
1739 vendor=omron
1740 ;;
1741 genix*)
1742 vendor=ns
1743 ;;
1744 clix*)
1745 vendor=intergraph
1746 ;;
1747 mvs* | opened*)
1748 vendor=ibm
1749 ;;
1750 os400*)
1751 vendor=ibm
1752 ;;
1753 ptx*)
1754 vendor=sequent
1755 ;;
1756 tpf*)
1757 vendor=ibm
1758 ;;
1759 vxsim* | vxworks* | windiss*)
1760 vendor=wrs
1761 ;;
1762 aux*)
1763 vendor=apple
1764 ;;
1765 hms*)
1766 vendor=hitachi
1767 ;;
1768 mpw* | macos*)
1769 vendor=apple
1770 ;;
1771 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1772 vendor=atari
1773 ;;
1774 vos*)
1775 vendor=stratus
1776 ;;
1777 esac
1778 ;;
1779 esac
1780
1781 echo "$cpu-$vendor-$os"
1782 exit
1783
1784 # Local variables:
1785 # eval: (add-hook 'before-save-hook 'time-stamp)
1786 # time-stamp-start: "timestamp='"
1787 # time-stamp-format: "%:y-%02m-%02d"
1788 # time-stamp-end: "'"
1789 # End:
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
26
27 case $1 in
28 '')
29 echo "$0: No command. Try '$0 --help' for more information." 1>&2
30 exit 1;
31 ;;
32 -h | --h*)
33 cat <<\EOF
34 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
35
36 Run PROGRAMS ARGS to compile a file, generating dependencies
37 as side-effects.
38
39 Environment variables:
40 depmode Dependency tracking mode.
41 source Source file read by 'PROGRAMS ARGS'.
42 object Object file output by 'PROGRAMS ARGS'.
43 DEPDIR directory where to store dependencies.
44 depfile Dependency file to output.
45 tmpdepfile Temporary file to use when outputting dependencies.
46 libtool Whether libtool is used (yes/no).
47
48 Report bugs to <bug-automake@gnu.org>.
49 EOF
50 exit $?
51 ;;
52 -v | --v*)
53 echo "depcomp $scriptversion"
54 exit $?
55 ;;
56 esac
57
58 # Get the directory component of the given path, and save it in the
59 # global variables '$dir'. Note that this directory component will
60 # be either empty or ending with a '/' character. This is deliberate.
61 set_dir_from ()
62 {
63 case $1 in
64 */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
65 *) dir=;;
66 esac
67 }
68
69 # Get the suffix-stripped basename of the given path, and save it the
70 # global variable '$base'.
71 set_base_from ()
72 {
73 base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
74 }
75
76 # If no dependency file was actually created by the compiler invocation,
77 # we still have to create a dummy depfile, to avoid errors with the
78 # Makefile "include basename.Plo" scheme.
79 make_dummy_depfile ()
80 {
81 echo "#dummy" > "$depfile"
82 }
83
84 # Factor out some common post-processing of the generated depfile.
85 # Requires the auxiliary global variable '$tmpdepfile' to be set.
86 aix_post_process_depfile ()
87 {
88 # If the compiler actually managed to produce a dependency file,
89 # post-process it.
90 if test -f "$tmpdepfile"; then
91 # Each line is of the form 'foo.o: dependency.h'.
92 # Do two passes, one to just change these to
93 # $object: dependency.h
94 # and one to simply output
95 # dependency.h:
96 # which is needed to avoid the deleted-header problem.
97 { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
98 sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
99 } > "$depfile"
100 rm -f "$tmpdepfile"
101 else
102 make_dummy_depfile
103 fi
104 }
105
106 # A tabulation character.
107 tab=' '
108 # A newline character.
109 nl='
110 '
111 # Character ranges might be problematic outside the C locale.
112 # These definitions help.
113 upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
114 lower=abcdefghijklmnopqrstuvwxyz
115 digits=0123456789
116 alpha=${upper}${lower}
117
118 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
119 echo "depcomp: Variables source, object and depmode must be set" 1>&2
120 exit 1
121 fi
122
123 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
124 depfile=${depfile-`echo "$object" |
125 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
126 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
127
128 rm -f "$tmpdepfile"
129
130 # Avoid interferences from the environment.
131 gccflag= dashmflag=
132
133 # Some modes work just like other modes, but use different flags. We
134 # parameterize here, but still list the modes in the big case below,
135 # to make depend.m4 easier to write. Note that we *cannot* use a case
136 # here, because this file can only contain one case statement.
137 if test "$depmode" = hp; then
138 # HP compiler uses -M and no extra arg.
139 gccflag=-M
140 depmode=gcc
141 fi
142
143 if test "$depmode" = dashXmstdout; then
144 # This is just like dashmstdout with a different argument.
145 dashmflag=-xM
146 depmode=dashmstdout
147 fi
148
149 cygpath_u="cygpath -u -f -"
150 if test "$depmode" = msvcmsys; then
151 # This is just like msvisualcpp but w/o cygpath translation.
152 # Just convert the backslash-escaped backslashes to single forward
153 # slashes to satisfy depend.m4
154 cygpath_u='sed s,\\\\,/,g'
155 depmode=msvisualcpp
156 fi
157
158 if test "$depmode" = msvc7msys; then
159 # This is just like msvc7 but w/o cygpath translation.
160 # Just convert the backslash-escaped backslashes to single forward
161 # slashes to satisfy depend.m4
162 cygpath_u='sed s,\\\\,/,g'
163 depmode=msvc7
164 fi
165
166 if test "$depmode" = xlc; then
167 # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
168 gccflag=-qmakedep=gcc,-MF
169 depmode=gcc
170 fi
171
172 case "$depmode" in
173 gcc3)
174 ## gcc 3 implements dependency tracking that does exactly what
175 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
176 ## it if -MD -MP comes after the -MF stuff. Hmm.
177 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
178 ## the command line argument order; so add the flags where they
179 ## appear in depend2.am. Note that the slowdown incurred here
180 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
181 for arg
182 do
183 case $arg in
184 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
185 *) set fnord "$@" "$arg" ;;
186 esac
187 shift # fnord
188 shift # $arg
189 done
190 "$@"
191 stat=$?
192 if test $stat -ne 0; then
193 rm -f "$tmpdepfile"
194 exit $stat
195 fi
196 mv "$tmpdepfile" "$depfile"
197 ;;
198
199 gcc)
200 ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
201 ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
202 ## (see the conditional assignment to $gccflag above).
203 ## There are various ways to get dependency output from gcc. Here's
204 ## why we pick this rather obscure method:
205 ## - Don't want to use -MD because we'd like the dependencies to end
206 ## up in a subdir. Having to rename by hand is ugly.
207 ## (We might end up doing this anyway to support other compilers.)
208 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
209 ## -MM, not -M (despite what the docs say). Also, it might not be
210 ## supported by the other compilers which use the 'gcc' depmode.
211 ## - Using -M directly means running the compiler twice (even worse
212 ## than renaming).
213 if test -z "$gccflag"; then
214 gccflag=-MD,
215 fi
216 "$@" -Wp,"$gccflag$tmpdepfile"
217 stat=$?
218 if test $stat -ne 0; then
219 rm -f "$tmpdepfile"
220 exit $stat
221 fi
222 rm -f "$depfile"
223 echo "$object : \\" > "$depfile"
224 # The second -e expression handles DOS-style file names with drive
225 # letters.
226 sed -e 's/^[^:]*: / /' \
227 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
228 ## This next piece of magic avoids the "deleted header file" problem.
229 ## The problem is that when a header file which appears in a .P file
230 ## is deleted, the dependency causes make to die (because there is
231 ## typically no way to rebuild the header). We avoid this by adding
232 ## dummy dependencies for each header file. Too bad gcc doesn't do
233 ## this for us directly.
234 ## Some versions of gcc put a space before the ':'. On the theory
235 ## that the space means something, we add a space to the output as
236 ## well. hp depmode also adds that space, but also prefixes the VPATH
237 ## to the object. Take care to not repeat it in the output.
238 ## Some versions of the HPUX 10.20 sed can't process this invocation
239 ## correctly. Breaking it into two sed invocations is a workaround.
240 tr ' ' "$nl" < "$tmpdepfile" \
241 | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
242 | sed -e 's/$/ :/' >> "$depfile"
243 rm -f "$tmpdepfile"
244 ;;
245
246 hp)
247 # This case exists only to let depend.m4 do its work. It works by
248 # looking at the text of this script. This case will never be run,
249 # since it is checked for above.
250 exit 1
251 ;;
252
253 sgi)
254 if test "$libtool" = yes; then
255 "$@" "-Wp,-MDupdate,$tmpdepfile"
256 else
257 "$@" -MDupdate "$tmpdepfile"
258 fi
259 stat=$?
260 if test $stat -ne 0; then
261 rm -f "$tmpdepfile"
262 exit $stat
263 fi
264 rm -f "$depfile"
265
266 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
267 echo "$object : \\" > "$depfile"
268 # Clip off the initial element (the dependent). Don't try to be
269 # clever and replace this with sed code, as IRIX sed won't handle
270 # lines with more than a fixed number of characters (4096 in
271 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
272 # the IRIX cc adds comments like '#:fec' to the end of the
273 # dependency line.
274 tr ' ' "$nl" < "$tmpdepfile" \
275 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
276 | tr "$nl" ' ' >> "$depfile"
277 echo >> "$depfile"
278 # The second pass generates a dummy entry for each header file.
279 tr ' ' "$nl" < "$tmpdepfile" \
280 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
281 >> "$depfile"
282 else
283 make_dummy_depfile
284 fi
285 rm -f "$tmpdepfile"
286 ;;
287
288 xlc)
289 # This case exists only to let depend.m4 do its work. It works by
290 # looking at the text of this script. This case will never be run,
291 # since it is checked for above.
292 exit 1
293 ;;
294
295 aix)
296 # The C for AIX Compiler uses -M and outputs the dependencies
297 # in a .u file. In older versions, this file always lives in the
298 # current directory. Also, the AIX compiler puts '$object:' at the
299 # start of each line; $object doesn't have directory information.
300 # Version 6 uses the directory in both cases.
301 set_dir_from "$object"
302 set_base_from "$object"
303 if test "$libtool" = yes; then
304 tmpdepfile1=$dir$base.u
305 tmpdepfile2=$base.u
306 tmpdepfile3=$dir.libs/$base.u
307 "$@" -Wc,-M
308 else
309 tmpdepfile1=$dir$base.u
310 tmpdepfile2=$dir$base.u
311 tmpdepfile3=$dir$base.u
312 "$@" -M
313 fi
314 stat=$?
315 if test $stat -ne 0; then
316 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
317 exit $stat
318 fi
319
320 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
321 do
322 test -f "$tmpdepfile" && break
323 done
324 aix_post_process_depfile
325 ;;
326
327 tcc)
328 # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
329 # FIXME: That version still under development at the moment of writing.
330 # Make that this statement remains true also for stable, released
331 # versions.
332 # It will wrap lines (doesn't matter whether long or short) with a
333 # trailing '\', as in:
334 #
335 # foo.o : \
336 # foo.c \
337 # foo.h \
338 #
339 # It will put a trailing '\' even on the last line, and will use leading
340 # spaces rather than leading tabs (at least since its commit 0394caf7
341 # "Emit spaces for -MD").
342 "$@" -MD -MF "$tmpdepfile"
343 stat=$?
344 if test $stat -ne 0; then
345 rm -f "$tmpdepfile"
346 exit $stat
347 fi
348 rm -f "$depfile"
349 # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
350 # We have to change lines of the first kind to '$object: \'.
351 sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
352 # And for each line of the second kind, we have to emit a 'dep.h:'
353 # dummy dependency, to avoid the deleted-header problem.
354 sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
355 rm -f "$tmpdepfile"
356 ;;
357
358 ## The order of this option in the case statement is important, since the
359 ## shell code in configure will try each of these formats in the order
360 ## listed in this file. A plain '-MD' option would be understood by many
361 ## compilers, so we must ensure this comes after the gcc and icc options.
362 pgcc)
363 # Portland's C compiler understands '-MD'.
364 # Will always output deps to 'file.d' where file is the root name of the
365 # source file under compilation, even if file resides in a subdirectory.
366 # The object file name does not affect the name of the '.d' file.
367 # pgcc 10.2 will output
368 # foo.o: sub/foo.c sub/foo.h
369 # and will wrap long lines using '\' :
370 # foo.o: sub/foo.c ... \
371 # sub/foo.h ... \
372 # ...
373 set_dir_from "$object"
374 # Use the source, not the object, to determine the base name, since
375 # that's sadly what pgcc will do too.
376 set_base_from "$source"
377 tmpdepfile=$base.d
378
379 # For projects that build the same source file twice into different object
380 # files, the pgcc approach of using the *source* file root name can cause
381 # problems in parallel builds. Use a locking strategy to avoid stomping on
382 # the same $tmpdepfile.
383 lockdir=$base.d-lock
384 trap "
385 echo '$0: caught signal, cleaning up...' >&2
386 rmdir '$lockdir'
387 exit 1
388 " 1 2 13 15
389 numtries=100
390 i=$numtries
391 while test $i -gt 0; do
392 # mkdir is a portable test-and-set.
393 if mkdir "$lockdir" 2>/dev/null; then
394 # This process acquired the lock.
395 "$@" -MD
396 stat=$?
397 # Release the lock.
398 rmdir "$lockdir"
399 break
400 else
401 # If the lock is being held by a different process, wait
402 # until the winning process is done or we timeout.
403 while test -d "$lockdir" && test $i -gt 0; do
404 sleep 1
405 i=`expr $i - 1`
406 done
407 fi
408 i=`expr $i - 1`
409 done
410 trap - 1 2 13 15
411 if test $i -le 0; then
412 echo "$0: failed to acquire lock after $numtries attempts" >&2
413 echo "$0: check lockdir '$lockdir'" >&2
414 exit 1
415 fi
416
417 if test $stat -ne 0; then
418 rm -f "$tmpdepfile"
419 exit $stat
420 fi
421 rm -f "$depfile"
422 # Each line is of the form `foo.o: dependent.h',
423 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
424 # Do two passes, one to just change these to
425 # `$object: dependent.h' and one to simply `dependent.h:'.
426 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
427 # Some versions of the HPUX 10.20 sed can't process this invocation
428 # correctly. Breaking it into two sed invocations is a workaround.
429 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
430 | sed -e 's/$/ :/' >> "$depfile"
431 rm -f "$tmpdepfile"
432 ;;
433
434 hp2)
435 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
436 # compilers, which have integrated preprocessors. The correct option
437 # to use with these is +Maked; it writes dependencies to a file named
438 # 'foo.d', which lands next to the object file, wherever that
439 # happens to be.
440 # Much of this is similar to the tru64 case; see comments there.
441 set_dir_from "$object"
442 set_base_from "$object"
443 if test "$libtool" = yes; then
444 tmpdepfile1=$dir$base.d
445 tmpdepfile2=$dir.libs/$base.d
446 "$@" -Wc,+Maked
447 else
448 tmpdepfile1=$dir$base.d
449 tmpdepfile2=$dir$base.d
450 "$@" +Maked
451 fi
452 stat=$?
453 if test $stat -ne 0; then
454 rm -f "$tmpdepfile1" "$tmpdepfile2"
455 exit $stat
456 fi
457
458 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
459 do
460 test -f "$tmpdepfile" && break
461 done
462 if test -f "$tmpdepfile"; then
463 sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
464 # Add 'dependent.h:' lines.
465 sed -ne '2,${
466 s/^ *//
467 s/ \\*$//
468 s/$/:/
469 p
470 }' "$tmpdepfile" >> "$depfile"
471 else
472 make_dummy_depfile
473 fi
474 rm -f "$tmpdepfile" "$tmpdepfile2"
475 ;;
476
477 tru64)
478 # The Tru64 compiler uses -MD to generate dependencies as a side
479 # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
480 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
481 # dependencies in 'foo.d' instead, so we check for that too.
482 # Subdirectories are respected.
483 set_dir_from "$object"
484 set_base_from "$object"
485
486 if test "$libtool" = yes; then
487 # Libtool generates 2 separate objects for the 2 libraries. These
488 # two compilations output dependencies in $dir.libs/$base.o.d and
489 # in $dir$base.o.d. We have to check for both files, because
490 # one of the two compilations can be disabled. We should prefer
491 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
492 # automatically cleaned when .libs/ is deleted, while ignoring
493 # the former would cause a distcleancheck panic.
494 tmpdepfile1=$dir$base.o.d # libtool 1.5
495 tmpdepfile2=$dir.libs/$base.o.d # Likewise.
496 tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
497 "$@" -Wc,-MD
498 else
499 tmpdepfile1=$dir$base.d
500 tmpdepfile2=$dir$base.d
501 tmpdepfile3=$dir$base.d
502 "$@" -MD
503 fi
504
505 stat=$?
506 if test $stat -ne 0; then
507 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
508 exit $stat
509 fi
510
511 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
512 do
513 test -f "$tmpdepfile" && break
514 done
515 # Same post-processing that is required for AIX mode.
516 aix_post_process_depfile
517 ;;
518
519 msvc7)
520 if test "$libtool" = yes; then
521 showIncludes=-Wc,-showIncludes
522 else
523 showIncludes=-showIncludes
524 fi
525 "$@" $showIncludes > "$tmpdepfile"
526 stat=$?
527 grep -v '^Note: including file: ' "$tmpdepfile"
528 if test $stat -ne 0; then
529 rm -f "$tmpdepfile"
530 exit $stat
531 fi
532 rm -f "$depfile"
533 echo "$object : \\" > "$depfile"
534 # The first sed program below extracts the file names and escapes
535 # backslashes for cygpath. The second sed program outputs the file
536 # name when reading, but also accumulates all include files in the
537 # hold buffer in order to output them again at the end. This only
538 # works with sed implementations that can handle large buffers.
539 sed < "$tmpdepfile" -n '
540 /^Note: including file: *\(.*\)/ {
541 s//\1/
542 s/\\/\\\\/g
543 p
544 }' | $cygpath_u | sort -u | sed -n '
545 s/ /\\ /g
546 s/\(.*\)/'"$tab"'\1 \\/p
547 s/.\(.*\) \\/\1:/
548 H
549 $ {
550 s/.*/'"$tab"'/
551 G
552 p
553 }' >> "$depfile"
554 echo >> "$depfile" # make sure the fragment doesn't end with a backslash
555 rm -f "$tmpdepfile"
556 ;;
557
558 msvc7msys)
559 # This case exists only to let depend.m4 do its work. It works by
560 # looking at the text of this script. This case will never be run,
561 # since it is checked for above.
562 exit 1
563 ;;
564
565 #nosideeffect)
566 # This comment above is used by automake to tell side-effect
567 # dependency tracking mechanisms from slower ones.
568
569 dashmstdout)
570 # Important note: in order to support this mode, a compiler *must*
571 # always write the preprocessed file to stdout, regardless of -o.
572 "$@" || exit $?
573
574 # Remove the call to Libtool.
575 if test "$libtool" = yes; then
576 while test "X$1" != 'X--mode=compile'; do
577 shift
578 done
579 shift
580 fi
581
582 # Remove '-o $object'.
583 IFS=" "
584 for arg
585 do
586 case $arg in
587 -o)
588 shift
589 ;;
590 $object)
591 shift
592 ;;
593 *)
594 set fnord "$@" "$arg"
595 shift # fnord
596 shift # $arg
597 ;;
598 esac
599 done
600
601 test -z "$dashmflag" && dashmflag=-M
602 # Require at least two characters before searching for ':'
603 # in the target name. This is to cope with DOS-style filenames:
604 # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
605 "$@" $dashmflag |
606 sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
607 rm -f "$depfile"
608 cat < "$tmpdepfile" > "$depfile"
609 # Some versions of the HPUX 10.20 sed can't process this sed invocation
610 # correctly. Breaking it into two sed invocations is a workaround.
611 tr ' ' "$nl" < "$tmpdepfile" \
612 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
613 | sed -e 's/$/ :/' >> "$depfile"
614 rm -f "$tmpdepfile"
615 ;;
616
617 dashXmstdout)
618 # This case only exists to satisfy depend.m4. It is never actually
619 # run, as this mode is specially recognized in the preamble.
620 exit 1
621 ;;
622
623 makedepend)
624 "$@" || exit $?
625 # Remove any Libtool call
626 if test "$libtool" = yes; then
627 while test "X$1" != 'X--mode=compile'; do
628 shift
629 done
630 shift
631 fi
632 # X makedepend
633 shift
634 cleared=no eat=no
635 for arg
636 do
637 case $cleared in
638 no)
639 set ""; shift
640 cleared=yes ;;
641 esac
642 if test $eat = yes; then
643 eat=no
644 continue
645 fi
646 case "$arg" in
647 -D*|-I*)
648 set fnord "$@" "$arg"; shift ;;
649 # Strip any option that makedepend may not understand. Remove
650 # the object too, otherwise makedepend will parse it as a source file.
651 -arch)
652 eat=yes ;;
653 -*|$object)
654 ;;
655 *)
656 set fnord "$@" "$arg"; shift ;;
657 esac
658 done
659 obj_suffix=`echo "$object" | sed 's/^.*\././'`
660 touch "$tmpdepfile"
661 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
662 rm -f "$depfile"
663 # makedepend may prepend the VPATH from the source file name to the object.
664 # No need to regex-escape $object, excess matching of '.' is harmless.
665 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
666 # Some versions of the HPUX 10.20 sed can't process the last invocation
667 # correctly. Breaking it into two sed invocations is a workaround.
668 sed '1,2d' "$tmpdepfile" \
669 | tr ' ' "$nl" \
670 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
671 | sed -e 's/$/ :/' >> "$depfile"
672 rm -f "$tmpdepfile" "$tmpdepfile".bak
673 ;;
674
675 cpp)
676 # Important note: in order to support this mode, a compiler *must*
677 # always write the preprocessed file to stdout.
678 "$@" || exit $?
679
680 # Remove the call to Libtool.
681 if test "$libtool" = yes; then
682 while test "X$1" != 'X--mode=compile'; do
683 shift
684 done
685 shift
686 fi
687
688 # Remove '-o $object'.
689 IFS=" "
690 for arg
691 do
692 case $arg in
693 -o)
694 shift
695 ;;
696 $object)
697 shift
698 ;;
699 *)
700 set fnord "$@" "$arg"
701 shift # fnord
702 shift # $arg
703 ;;
704 esac
705 done
706
707 "$@" -E \
708 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
709 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
710 | sed '$ s: \\$::' > "$tmpdepfile"
711 rm -f "$depfile"
712 echo "$object : \\" > "$depfile"
713 cat < "$tmpdepfile" >> "$depfile"
714 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
715 rm -f "$tmpdepfile"
716 ;;
717
718 msvisualcpp)
719 # Important note: in order to support this mode, a compiler *must*
720 # always write the preprocessed file to stdout.
721 "$@" || exit $?
722
723 # Remove the call to Libtool.
724 if test "$libtool" = yes; then
725 while test "X$1" != 'X--mode=compile'; do
726 shift
727 done
728 shift
729 fi
730
731 IFS=" "
732 for arg
733 do
734 case "$arg" in
735 -o)
736 shift
737 ;;
738 $object)
739 shift
740 ;;
741 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
742 set fnord "$@"
743 shift
744 shift
745 ;;
746 *)
747 set fnord "$@" "$arg"
748 shift
749 shift
750 ;;
751 esac
752 done
753 "$@" -E 2>/dev/null |
754 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
755 rm -f "$depfile"
756 echo "$object : \\" > "$depfile"
757 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
758 echo "$tab" >> "$depfile"
759 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
760 rm -f "$tmpdepfile"
761 ;;
762
763 msvcmsys)
764 # This case exists only to let depend.m4 do its work. It works by
765 # looking at the text of this script. This case will never be run,
766 # since it is checked for above.
767 exit 1
768 ;;
769
770 none)
771 exec "$@"
772 ;;
773
774 *)
775 echo "Unknown depmode $depmode" 1>&2
776 exit 1
777 ;;
778 esac
779
780 exit 0
781
782 # Local Variables:
783 # mode: shell-script
784 # sh-indentation: 2
785 # eval: (add-hook 'before-save-hook 'time-stamp)
786 # time-stamp-start: "scriptversion="
787 # time-stamp-format: "%:y-%02m-%02d.%02H"
788 # time-stamp-time-zone: "UTC0"
789 # time-stamp-end: "; # UTC"
790 # End:
0 #! /bin/sh
1
2 # Extract macro arguments from autotools input with GNU M4.
3 # Written by Gary V. Vaughan, 2010
4 #
5 # This is free software. There is NO warranty; not even for
6 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 #
8 # Copyright (C) 2010-2019 Bootstrap Authors
9 #
10 # This file is dual licensed under the terms of the MIT license
11 # <https://opensource.org/license/MIT>, and GPL version 3 or later
12 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
13 # these licenses when using or redistributing this software or any of
14 # the files within it. See the URLs above, or the file `LICENSE`
15 # included in the Bootstrap distribution for the full license texts.
16
17 # Please report bugs or propose patches to:
18 # <https://github.com/gnulib-modules/bootstrap/issues>
19
20 # Make sure we've evaluated scripts we depend on.
21 test -z "$progpath" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh
22 test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
23
24 # Set a version string.
25 scriptversion=2019-02-19.15; # UTC
26
27
28 ## ------ ##
29 ## Usage. ##
30 ## ------ ##
31
32 # Run './extract-trace --help' for help with using this script from the
33 # command line.
34 #
35 # Or source first 'options-parser' and then this file into your own
36 # scripts in order to make use of the function and variable framework
37 # they define, and also to avoid the overhead of forking to run this
38 # script in its own process on every call.
39
40
41
42 ## ----------------- ##
43 ## Helper functions. ##
44 ## ----------------- ##
45
46 # This section contains the helper functions used by the rest of
47 # 'extract-trace'.
48
49
50 # func_autoconf_configure MAYBE-CONFIGURE-FILE
51 # --------------------------------------------
52 # Ensure that MAYBE-CONFIGURE-FILE is the name of a file in the current
53 # directory that contains an uncommented call to AC_INIT.
54 func_autoconf_configure ()
55 {
56 $debug_cmd
57
58 _G_sed_no_comment='
59 s|#.*$||
60 s|^dnl .*$||
61 s| dnl .*$||'
62 _G_ac_init=
63
64 # If we were passed a genuine file, make sure it calls AC_INIT.
65 test -f "$1" \
66 && _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |$GREP AC_INIT`
67
68 # Otherwise it is not a genuine Autoconf input file.
69 test -n "$_G_ac_init"
70 _G_status=$?
71
72 test 0 -ne "$_G_status" \
73 && func_verbose "'$1' not using Autoconf"
74
75 (exit $_G_status)
76 }
77
78
79 # func_tool_version_output CMD [FATAL-ERROR-MSG]
80 # ----------------------------------------------
81 # Attempt to run 'CMD --version', discarding errors. The output can be
82 # ignored by redirecting stdout, and this function used simply to test
83 # whether the command exists and exits normally when passed a
84 # '--version' argument.
85 # When FATAL-ERROR-MSG is given, then this function will display the
86 # message and exit if running 'CMD --version' returns a non-zero exit
87 # status.
88 func_tool_version_output ()
89 {
90 $debug_cmd
91
92 _G_cmd=$1
93 _G_fatal_error_msg=$2
94
95 # Some tools, like 'git2cl' produce thousands of lines of output
96 # unless stdin is /dev/null - in that case we want to return
97 # successfully without saving all of that output. Other tools,
98 # such as 'help2man' exit with a non-zero status when stdin comes
99 # from /dev/null, so we re-execute without /dev/null if that
100 # happens. This means that occasionally, the output from both calls
101 # ends up in the result, but the alternative would be to discard the
102 # output from one call, and hope the other produces something useful.
103 { $_G_cmd --version </dev/null || $_G_cmd --version; } 2>/dev/null
104 _G_status=$?
105
106 test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \
107 && func_fatal_error "$_G_fatal_error_msg"
108
109 (exit $_G_status)
110 }
111
112
113 # func_tool_version_number CMD [FATAL-ERROR-MSG]
114 # ----------------------------------------------
115 # Pass arguments to func_tool_version_output, but set
116 # $func_tool_version_number_result to the last dot delimited digit string
117 # on the first line of output.
118 func_tool_version_number ()
119 {
120 $debug_cmd
121
122 _G_verout=`func_tool_version_output "$@"`
123 _G_status=$?
124
125 # A version number starts with a digit following a space on the first
126 # line of output from `--version`.
127 _G_verout=`echo "$_G_verout" |sed 1q`
128 if test -n "$_G_verout"; then
129 _G_vernum=`expr "$_G_verout" : '.* \([0-9][^ ]*\)'`
130 fi
131
132 if test -n "$_G_vernum"; then
133 printf '%s\n' "$_G_vernum"
134 else
135 printf '%s\n' "$_G_verout"
136 fi
137
138 (exit $_G_status)
139 }
140
141
142 # func_find_tool ENVVAR NAMES...
143 # ------------------------------
144 # Search for a required program. Use the value of ENVVAR, if set,
145 # otherwise find the first of the NAMES that can be run (i.e.,
146 # supports --version). If found, set ENVVAR to the program name,
147 # die otherwise.
148 func_find_tool ()
149 {
150 $debug_cmd
151
152 _G_find_tool_envvar=$1
153 shift
154 _G_find_tool_names=$@
155 eval "_G_find_tool_res=\$$_G_find_tool_envvar"
156 if test -n "$_G_find_tool_res"; then
157 _G_find_tool_error_prefix="\$$find_tool_envvar: "
158 else
159 _G_find_tool_res=
160 _G_bestver=
161 for _G_prog
162 do
163 _G_find_tool_save_IFS=$IFS
164 IFS=${PATH_SEPARATOR-:}
165 for _G_dir in $PATH; do
166 IFS=$_G_find_tool_save_IFS
167 _G_progpath=$_G_dir/$_G_prog
168 test -r "$_G_progpath" && {
169 _G_curver=`func_tool_version_number $_G_progpath`
170 case $_G_bestver,$_G_curver in
171 ,)
172 # first non--version responsive prog sticks!
173 test -n "$_G_progpath" || _G_find_tool_res=$_G_progpath
174 ;;
175 ,*)
176 # first --version responsive prog beats non--version responsive!
177 _G_find_tool_res=$_G_progpath
178 _G_bestver=$_G_curver
179 ;;
180 *,*)
181 # another --version responsive prog must be newer to beat previous one!
182 test "x$_G_curver" = "x$_G_bestver" \
183 || func_lt_ver "$_G_curver" "$_G_bestver" \
184 || {
185 _G_find_tool_res=$_G_progpath
186 _G_bestver=$_G_curver
187 }
188 ;;
189 esac
190 }
191 done
192 IFS=$_G_find_tool_save_IFS
193 done
194 fi
195 if test -n "$_G_find_tool_res"; then
196 func_tool_version_number >/dev/null $_G_find_tool_res "\
197 ${_G_find_tool_error_prefix}Cannot run '$_G_find_tool_res --version'"
198
199 # Make sure the result is exported to the environment for children
200 # to use.
201 eval "$_G_find_tool_envvar=\$_G_find_tool_res"
202 eval "export $_G_find_tool_envvar"
203 else
204 func_error "\
205 One of these is required:
206 $_G_find_tool_names"
207 fi
208 }
209
210
211
212 ## -------------------- ##
213 ## Resource management. ##
214 ## -------------------- ##
215
216 # This section contains definitions for functions that each ensure a
217 # particular resource (a file, or a non-empty configuration variable for
218 # example) is available, and if appropriate to extract default values
219 # from pertinent package files. Where a variable already has a non-
220 # empty value (as set by the package's 'bootstrap.conf'), that value is
221 # used in preference to deriving the default. Call them using their
222 # associated 'require_*' variable to ensure that they are executed, at
223 # most, once.
224 #
225 # It's entirely deliberate that calling these functions can set
226 # variables that don't obey the namespace limitations obeyed by the rest
227 # of this file, in order that that they be as useful as possible to
228 # callers.
229
230
231 # require_configure_ac
232 # --------------------
233 # Ensure that there is a 'configure.ac' or 'configure.in' file in the
234 # current directory that contains an uncommented call to AC_INIT, and
235 # that '$configure_ac' contains its name.
236 require_configure_ac=func_require_configure_ac
237 func_require_configure_ac ()
238 {
239 $debug_cmd
240
241 test -z "$configure_ac" \
242 && func_autoconf_configure configure.ac && configure_ac=configure.ac
243 test -z "$configure_ac" \
244 && func_autoconf_configure configure.in && configure_ac=configure.in
245 test -z "$configure_ac" \
246 || func_verbose "found '$configure_ac'"
247
248 require_configure_ac=:
249 }
250
251
252 # require_gnu_m4
253 # --------------
254 # Search for GNU M4, and export it in $M4.
255 require_gnu_m4=func_require_gnu_m4
256 func_require_gnu_m4 ()
257 {
258 $debug_cmd
259
260 test -n "$M4" || {
261 # Find the first m4 binary that responds to --version.
262 func_find_tool M4 gm4 gnum4 m4
263 }
264
265 test -n "$M4" || func_fatal_error "\
266 Please install GNU M4, or 'export M4=/path/to/gnu/m4'."
267
268 func_verbose "export M4='$M4'"
269
270 # Make sure the search result is visible to subshells
271 export M4
272
273 require_gnu_m4=:
274 }
275
276
277 ## --------------- ##
278 ## Core functions. ##
279 ## --------------- ##
280
281 # This section contains the high level functions used when calling this
282 # file as a script. 'func_extract_trace' is probably the only one that you
283 # won't want to replace if you source this file into your own script.
284
285
286 # func_extract_trace MACRO_NAMES [FILENAME]...
287 # --------------------------------------------
288 # set '$func_extract_trace_result' to a colon delimited list of arguments
289 # to any of the comma separated list of MACRO_NAMES in FILENAME. If no
290 # FILENAME is given, then '$configure_ac' is assumed.
291 func_extract_trace ()
292 {
293 $debug_cmd
294
295 $require_configure_ac
296 $require_gnu_m4
297
298 _G_m4_traces=`$ECHO "--trace=$1" |$SED 's%,% --trace=%g'`
299 _G_re_macros=`$ECHO "($1)" |$SED 's%,%|%g'`
300 _G_macros="$1"; shift
301 test $# -gt 0 || {
302 set dummy $configure_ac
303 shift
304 }
305
306 # Generate an error if the first file is missing
307 <"$1"
308
309 # Sadly, we can't use 'autom4te' tracing to extract macro arguments,
310 # because it complains about things we want to ignore at bootstrap
311 # time - like missing m4_include files; AC_PREREQ being newer than
312 # the installed autoconf; and returns nothing when tracing
313 # 'AM_INIT_AUTOMAKE' when aclocal hasn't been generated yet.
314 #
315 # The following tries to emulate a less persnickety version of (and
316 # due to not having to wait for Perl startup on every invocation,
317 # it's probably faster too):
318 #
319 # autom4te --language=Autoconf --trace=$my_macro:\$% "$@"
320 #
321 # First we give a minimal set of macro declarations to M4 to prime
322 # it for reading Autoconf macros, while still providing some of the
323 # functionality generally used at m4-time to supply dynamic
324 # arguments to Autocof functions, but without following
325 # 'm4_s?include' files.
326 _G_mini='
327 dnl Initialisation.
328 m4_changequote([,])
329 m4_define([m4_copy], [m4_define([$2], m4_defn([$1]))])
330 m4_define([m4_rename], [m4_copy([$1], [$2])m4_undefine([$1])])
331
332 dnl Replace macros which may abort m4 with a no-op variant.
333 m4_pushdef([m4_assert])
334 m4_pushdef([m4_exit])
335 m4_pushdef([m4_fatal])
336 m4_pushdef([m4_m4exit])
337
338 dnl Replace macros that might break stderr of m4.
339 m4_pushdef([m4_errprint])
340 m4_pushdef([m4_errprintn])
341 m4_pushdef([m4_include])
342 m4_pushdef([m4_warn])
343
344 dnl Avoid side-effects of tracing by extract-trace.
345 m4_pushdef([m4_maketemp])
346 m4_pushdef([m4_mkstemp])
347
348 dnl TODO: reasons for this
349 m4_pushdef([m4_dnl])
350 m4_pushdef([m4_m4wrap])
351
352 dnl Copy and rename macros not handled by "m4 --prefix".
353 m4_define([dnl], [m4_builtin([dnl])])
354 m4_copy([m4_define], [m4_defun])
355 m4_rename([m4_ifelse], [m4_if])
356 m4_rename([m4_patsubst], [m4_bpatsubst])
357 m4_rename([m4_regexp], [m4_bregexp])
358
359 dnl "m4sugar.mini" - useful m4-time macros for dynamic arguments.
360 dnl If we discover packages that need more m4 macros defined in
361 dnl order to bootstrap correctly, add them here:
362 m4_define([m4_bmatch],
363 [m4_if([$#], 0, [], [$#], 1, [], [$#], 2, [$2],
364 [m4_if(m4_bregexp([$1], [$2]), -1,
365 [$0([$1], m4_shift3($@))], [$3])])])
366 m4_define([m4_ifndef], [m4_ifdef([$1], [$3], [$2])])
367 m4_define([m4_ifset],
368 [m4_ifdef([$1], [m4_ifval(m4_defn([$1]), [$2], [$3])], [$3])])
369 m4_define([m4_require], [$1])
370 m4_define([m4_shift3], [m4_shift(m4shift(m4shift($@)))])
371
372 dnl "autoconf.mini" - things from autoconf macros we care about.
373 m4_copy([m4_defun], [AC_DEFUN])
374
375 dnl Dummy definitions for the macros we want to trace.
376 dnl AM_INIT_AUTOMAKE at least produces no trace without this.
377 '
378
379 _G_save=$IFS
380 IFS=,
381 for _G_macro in $_G_macros; do
382 IFS=$_G_save
383 func_append _G_mini "AC_DEFUN([$_G_macro])$nl"
384 done
385 IFS=$_G_save
386
387 # We discard M4's stdout, but the M4 trace output from reading our
388 # "autoconf.mini" followed by any other files passed to this
389 # function is then scanned by sed to transform it into a colon
390 # delimited argument list assigned to a shell variable.
391 _G_transform='s|#.*$||; s|^dnl .*$||; s| dnl .*$||;'
392
393 # Unfortunately, alternation in regexp addresses doesn't work in at
394 # least BSD (and hence Mac OS X) sed, so we have to append a capture
395 # and print block for each traced macro to the sed transform script.
396 _G_save=$IFS
397 IFS=,
398 for _G_macro in $_G_macros; do
399 IFS=$_G_save
400 func_append _G_transform '
401 /^m4trace: -1- '"$_G_macro"'/ {
402 s|^m4trace: -1- '"$_G_macro"'[([]*||
403 s|], [[]|:|g
404 s|[])]*$|:|
405 s|\(.\):$|\1|
406 p
407 }'
408 done
409 IFS=$_G_save
410
411 # Save the command pipeline results for further use by callers of
412 # this function.
413 func_extract_trace_result=`$ECHO "$_G_mini" \
414 |$M4 -daq --prefix $_G_m4_traces - "$@" 2>&1 1>/dev/null \
415 |$SED -n -e "$_G_transform"`
416 }
417
418
419 # func_extract_trace_first MACRO_NAMES [FILENAME]...
420 # --------------------------------------------------
421 # Exactly like func_extract_trace, except that only the first argument
422 # to the first invocation of one of the comma separated MACRO_NAMES is
423 # returned in '$func_extract_trace_first_result'.
424 func_extract_trace_first ()
425 {
426 $debug_cmd
427
428 func_extract_trace ${1+"$@"}
429 func_extract_trace_first_result=`$ECHO "$func_extract_trace_result" \
430 |$SED -e 's|:.*$||g' -e 1q`
431 }
432
433
434 # func_main [ARG]...
435 # ------------------
436 func_main ()
437 {
438 $debug_cmd
439
440 # Configuration.
441 usage='$progname MACRO_NAME FILE [...]'
442
443 long_help_message='
444 The first argument to this program is the name of an autotools macro
445 whose arguments you want to extract by examining the files listed in the
446 remaining arguments using the same tool that Autoconf and Automake use,
447 GNU M4.
448
449 The arguments are returned separated by colons, with each traced call
450 on a separate line.'
451
452 # Option processing.
453 func_options "$@"
454 eval set dummy "$func_options_result"; shift
455
456 # Validate remaining non-option arguments.
457 test $# -gt 1 \
458 || func_fatal_help "not enough arguments"
459
460 # Pass non-option arguments to extraction function.
461 func_extract_trace "$@"
462
463 # Display results.
464 test -n "$func_extract_trace_result" \
465 && $ECHO "$func_extract_trace_result"
466
467 # The End.
468 exit $EXIT_SUCCESS
469 }
470
471
472 ## --------------------------- ##
473 ## Actually perform the trace. ##
474 ## --------------------------- ##
475
476 # Only call 'func_main' if this script was called directly.
477 test extract-trace = "$progname" && func_main "$@"
478
479 # Local variables:
480 # mode: shell-script
481 # sh-indentation: 2
482 # eval: (add-hook 'before-save-hook 'time-stamp)
483 # time-stamp-pattern: "50/scriptversion=%:y-%02m-%02d.%02H; # UTC"
484 # time-stamp-time-zone: "UTC"
485 # End:
0 # Set a version string for this script.
1 scriptversion=2019-02-19.15; # UTC
2
3 # General shell script boiler plate, and helper functions.
4 # Written by Gary V. Vaughan, 2004
5
6 # This is free software. There is NO warranty; not even for
7 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 #
9 # Copyright (C) 2004-2019 Bootstrap Authors
10 #
11 # This file is dual licensed under the terms of the MIT license
12 # <https://opensource.org/license/MIT>, and GPL version 3 or later
13 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
14 # these licenses when using or redistributing this software or any of
15 # the files within it. See the URLs above, or the file `LICENSE`
16 # included in the Bootstrap distribution for the full license texts.
17
18 # Please report bugs or propose patches to:
19 # <https://github.com/gnulib-modules/bootstrap/issues>
20
21
22 ## ------ ##
23 ## Usage. ##
24 ## ------ ##
25
26 # Evaluate this file near the top of your script to gain access to
27 # the functions and variables defined here:
28 #
29 # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
30 #
31 # If you need to override any of the default environment variable
32 # settings, do that before evaluating this file.
33
34
35 ## -------------------- ##
36 ## Shell normalisation. ##
37 ## -------------------- ##
38
39 # Some shells need a little help to be as Bourne compatible as possible.
40 # Before doing anything else, make sure all that help has been provided!
41
42 DUALCASE=1; export DUALCASE # for MKS sh
43 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
44 emulate sh
45 NULLCMD=:
46 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
47 # is contrary to our usage. Disable this feature.
48 alias -g '${1+"$@"}'='"$@"'
49 setopt NO_GLOB_SUBST
50 else
51 case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
52 fi
53
54 # NLS nuisances: We save the old values in case they are required later.
55 _G_user_locale=
56 _G_safe_locale=
57 for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
58 do
59 eval "if test set = \"\${$_G_var+set}\"; then
60 save_$_G_var=\$$_G_var
61 $_G_var=C
62 export $_G_var
63 _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
64 _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
65 fi"
66 done
67
68 # Make sure IFS has a sensible default
69 sp=' '
70 nl='
71 '
72 IFS="$sp $nl"
73
74 # There are apparently some retarded systems that use ';' as a PATH separator!
75 if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81 fi
82
83
84 # func_unset VAR
85 # --------------
86 # Portably unset VAR.
87 # In some shells, an 'unset VAR' statement leaves a non-zero return
88 # status if VAR is already unset, which might be problematic if the
89 # statement is used at the end of a function (thus poisoning its return
90 # value) or when 'set -e' is active (causing even a spurious abort of
91 # the script in this case).
92 func_unset ()
93 {
94 { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
95 }
96
97
98 # Make sure CDPATH doesn't cause `cd` commands to output the target dir.
99 func_unset CDPATH
100
101 # Make sure ${,E,F}GREP behave sanely.
102 func_unset GREP_OPTIONS
103
104
105 ## ------------------------- ##
106 ## Locate command utilities. ##
107 ## ------------------------- ##
108
109
110 # func_executable_p FILE
111 # ----------------------
112 # Check that FILE is an executable regular file.
113 func_executable_p ()
114 {
115 test -f "$1" && test -x "$1"
116 }
117
118
119 # func_path_progs PROGS_LIST CHECK_FUNC [PATH]
120 # --------------------------------------------
121 # Search for either a program that responds to --version with output
122 # containing "GNU", or else returned by CHECK_FUNC otherwise, by
123 # trying all the directories in PATH with each of the elements of
124 # PROGS_LIST.
125 #
126 # CHECK_FUNC should accept the path to a candidate program, and
127 # set $func_check_prog_result if it truncates its output less than
128 # $_G_path_prog_max characters.
129 func_path_progs ()
130 {
131 _G_progs_list=$1
132 _G_check_func=$2
133 _G_PATH=${3-"$PATH"}
134
135 _G_path_prog_max=0
136 _G_path_prog_found=false
137 _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
138 for _G_dir in $_G_PATH; do
139 IFS=$_G_save_IFS
140 test -z "$_G_dir" && _G_dir=.
141 for _G_prog_name in $_G_progs_list; do
142 for _exeext in '' .EXE; do
143 _G_path_prog=$_G_dir/$_G_prog_name$_exeext
144 func_executable_p "$_G_path_prog" || continue
145 case `"$_G_path_prog" --version 2>&1` in
146 *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
147 *) $_G_check_func $_G_path_prog
148 func_path_progs_result=$func_check_prog_result
149 ;;
150 esac
151 $_G_path_prog_found && break 3
152 done
153 done
154 done
155 IFS=$_G_save_IFS
156 test -z "$func_path_progs_result" && {
157 echo "no acceptable sed could be found in \$PATH" >&2
158 exit 1
159 }
160 }
161
162
163 # We want to be able to use the functions in this file before configure
164 # has figured out where the best binaries are kept, which means we have
165 # to search for them ourselves - except when the results are already set
166 # where we skip the searches.
167
168 # Unless the user overrides by setting SED, search the path for either GNU
169 # sed, or the sed that truncates its output the least.
170 test -z "$SED" && {
171 _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
172 for _G_i in 1 2 3 4 5 6 7; do
173 _G_sed_script=$_G_sed_script$nl$_G_sed_script
174 done
175 echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
176 _G_sed_script=
177
178 func_check_prog_sed ()
179 {
180 _G_path_prog=$1
181
182 _G_count=0
183 printf 0123456789 >conftest.in
184 while :
185 do
186 cat conftest.in conftest.in >conftest.tmp
187 mv conftest.tmp conftest.in
188 cp conftest.in conftest.nl
189 echo '' >> conftest.nl
190 "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
191 diff conftest.out conftest.nl >/dev/null 2>&1 || break
192 _G_count=`expr $_G_count + 1`
193 if test "$_G_count" -gt "$_G_path_prog_max"; then
194 # Best one so far, save it but keep looking for a better one
195 func_check_prog_result=$_G_path_prog
196 _G_path_prog_max=$_G_count
197 fi
198 # 10*(2^10) chars as input seems more than enough
199 test 10 -lt "$_G_count" && break
200 done
201 rm -f conftest.in conftest.tmp conftest.nl conftest.out
202 }
203
204 func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
205 rm -f conftest.sed
206 SED=$func_path_progs_result
207 }
208
209
210 # Unless the user overrides by setting GREP, search the path for either GNU
211 # grep, or the grep that truncates its output the least.
212 test -z "$GREP" && {
213 func_check_prog_grep ()
214 {
215 _G_path_prog=$1
216
217 _G_count=0
218 _G_path_prog_max=0
219 printf 0123456789 >conftest.in
220 while :
221 do
222 cat conftest.in conftest.in >conftest.tmp
223 mv conftest.tmp conftest.in
224 cp conftest.in conftest.nl
225 echo 'GREP' >> conftest.nl
226 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
227 diff conftest.out conftest.nl >/dev/null 2>&1 || break
228 _G_count=`expr $_G_count + 1`
229 if test "$_G_count" -gt "$_G_path_prog_max"; then
230 # Best one so far, save it but keep looking for a better one
231 func_check_prog_result=$_G_path_prog
232 _G_path_prog_max=$_G_count
233 fi
234 # 10*(2^10) chars as input seems more than enough
235 test 10 -lt "$_G_count" && break
236 done
237 rm -f conftest.in conftest.tmp conftest.nl conftest.out
238 }
239
240 func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
241 GREP=$func_path_progs_result
242 }
243
244
245 ## ------------------------------- ##
246 ## User overridable command paths. ##
247 ## ------------------------------- ##
248
249 # All uppercase variable names are used for environment variables. These
250 # variables can be overridden by the user before calling a script that
251 # uses them if a suitable command of that name is not already available
252 # in the command search PATH.
253
254 : ${CP="cp -f"}
255 : ${ECHO="printf %s\n"}
256 : ${EGREP="$GREP -E"}
257 : ${FGREP="$GREP -F"}
258 : ${LN_S="ln -s"}
259 : ${MAKE="make"}
260 : ${MKDIR="mkdir"}
261 : ${MV="mv -f"}
262 : ${RM="rm -f"}
263 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
264
265
266 ## -------------------- ##
267 ## Useful sed snippets. ##
268 ## -------------------- ##
269
270 sed_dirname='s|/[^/]*$||'
271 sed_basename='s|^.*/||'
272
273 # Sed substitution that helps us do robust quoting. It backslashifies
274 # metacharacters that are still active within double-quoted strings.
275 sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
276
277 # Same as above, but do not quote variable references.
278 sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
279
280 # Sed substitution that turns a string into a regex matching for the
281 # string literally.
282 sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
283
284 # Sed substitution that converts a w32 file name or path
285 # that contains forward slashes, into one that contains
286 # (escaped) backslashes. A very naive implementation.
287 sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
288
289 # Re-'\' parameter expansions in output of sed_double_quote_subst that
290 # were '\'-ed in input to the same. If an odd number of '\' preceded a
291 # '$' in input to sed_double_quote_subst, that '$' was protected from
292 # expansion. Since each input '\' is now two '\'s, look for any number
293 # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
294 _G_bs='\\'
295 _G_bs2='\\\\'
296 _G_bs4='\\\\\\\\'
297 _G_dollar='\$'
298 sed_double_backslash="\
299 s/$_G_bs4/&\\
300 /g
301 s/^$_G_bs2$_G_dollar/$_G_bs&/
302 s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
303 s/\n//g"
304
305
306 ## ----------------- ##
307 ## Global variables. ##
308 ## ----------------- ##
309
310 # Except for the global variables explicitly listed below, the following
311 # functions in the '^func_' namespace, and the '^require_' namespace
312 # variables initialised in the 'Resource management' section, sourcing
313 # this file will not pollute your global namespace with anything
314 # else. There's no portable way to scope variables in Bourne shell
315 # though, so actually running these functions will sometimes place
316 # results into a variable named after the function, and often use
317 # temporary variables in the '^_G_' namespace. If you are careful to
318 # avoid using those namespaces casually in your sourcing script, things
319 # should continue to work as you expect. And, of course, you can freely
320 # overwrite any of the functions or variables defined here before
321 # calling anything to customize them.
322
323 EXIT_SUCCESS=0
324 EXIT_FAILURE=1
325 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
326 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
327
328 # Allow overriding, eg assuming that you follow the convention of
329 # putting '$debug_cmd' at the start of all your functions, you can get
330 # bash to show function call trace with:
331 #
332 # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
333 debug_cmd=${debug_cmd-":"}
334 exit_cmd=:
335
336 # By convention, finish your script with:
337 #
338 # exit $exit_status
339 #
340 # so that you can set exit_status to non-zero if you want to indicate
341 # something went wrong during execution without actually bailing out at
342 # the point of failure.
343 exit_status=$EXIT_SUCCESS
344
345 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
346 # is ksh but when the shell is invoked as "sh" and the current value of
347 # the _XPG environment variable is not equal to 1 (one), the special
348 # positional parameter $0, within a function call, is the name of the
349 # function.
350 progpath=$0
351
352 # The name of this program.
353 progname=`$ECHO "$progpath" |$SED "$sed_basename"`
354
355 # Make sure we have an absolute progpath for reexecution:
356 case $progpath in
357 [\\/]*|[A-Za-z]:\\*) ;;
358 *[\\/]*)
359 progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
360 progdir=`cd "$progdir" && pwd`
361 progpath=$progdir/$progname
362 ;;
363 *)
364 _G_IFS=$IFS
365 IFS=${PATH_SEPARATOR-:}
366 for progdir in $PATH; do
367 IFS=$_G_IFS
368 test -x "$progdir/$progname" && break
369 done
370 IFS=$_G_IFS
371 test -n "$progdir" || progdir=`pwd`
372 progpath=$progdir/$progname
373 ;;
374 esac
375
376
377 ## ----------------- ##
378 ## Standard options. ##
379 ## ----------------- ##
380
381 # The following options affect the operation of the functions defined
382 # below, and should be set appropriately depending on run-time para-
383 # meters passed on the command line.
384
385 opt_dry_run=false
386 opt_quiet=false
387 opt_verbose=false
388
389 # Categories 'all' and 'none' are always available. Append any others
390 # you will pass as the first argument to func_warning from your own
391 # code.
392 warning_categories=
393
394 # By default, display warnings according to 'opt_warning_types'. Set
395 # 'warning_func' to ':' to elide all warnings, or func_fatal_error to
396 # treat the next displayed warning as a fatal error.
397 warning_func=func_warn_and_continue
398
399 # Set to 'all' to display all warnings, 'none' to suppress all
400 # warnings, or a space delimited list of some subset of
401 # 'warning_categories' to display only the listed warnings.
402 opt_warning_types=all
403
404
405 ## -------------------- ##
406 ## Resource management. ##
407 ## -------------------- ##
408
409 # This section contains definitions for functions that each ensure a
410 # particular resource (a file, or a non-empty configuration variable for
411 # example) is available, and if appropriate to extract default values
412 # from pertinent package files. Call them using their associated
413 # 'require_*' variable to ensure that they are executed, at most, once.
414 #
415 # It's entirely deliberate that calling these functions can set
416 # variables that don't obey the namespace limitations obeyed by the rest
417 # of this file, in order that that they be as useful as possible to
418 # callers.
419
420
421 # require_term_colors
422 # -------------------
423 # Allow display of bold text on terminals that support it.
424 require_term_colors=func_require_term_colors
425 func_require_term_colors ()
426 {
427 $debug_cmd
428
429 test -t 1 && {
430 # COLORTERM and USE_ANSI_COLORS environment variables take
431 # precedence, because most terminfo databases neglect to describe
432 # whether color sequences are supported.
433 test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
434
435 if test 1 = "$USE_ANSI_COLORS"; then
436 # Standard ANSI escape sequences
437 tc_reset=''
438 tc_bold=''; tc_standout=''
439 tc_red=''; tc_green=''
440 tc_blue=''; tc_cyan=''
441 else
442 # Otherwise trust the terminfo database after all.
443 test -n "`tput sgr0 2>/dev/null`" && {
444 tc_reset=`tput sgr0`
445 test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
446 tc_standout=$tc_bold
447 test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
448 test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
449 test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
450 test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
451 test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
452 }
453 fi
454 }
455
456 require_term_colors=:
457 }
458
459
460 ## ----------------- ##
461 ## Function library. ##
462 ## ----------------- ##
463
464 # This section contains a variety of useful functions to call in your
465 # scripts. Take note of the portable wrappers for features provided by
466 # some modern shells, which will fall back to slower equivalents on
467 # less featureful shells.
468
469
470 # func_append VAR VALUE
471 # ---------------------
472 # Append VALUE onto the existing contents of VAR.
473
474 # We should try to minimise forks, especially on Windows where they are
475 # unreasonably slow, so skip the feature probes when bash or zsh are
476 # being used:
477 if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
478 : ${_G_HAVE_ARITH_OP="yes"}
479 : ${_G_HAVE_XSI_OPS="yes"}
480 # The += operator was introduced in bash 3.1
481 case $BASH_VERSION in
482 [12].* | 3.0 | 3.0*) ;;
483 *)
484 : ${_G_HAVE_PLUSEQ_OP="yes"}
485 ;;
486 esac
487 fi
488
489 # _G_HAVE_PLUSEQ_OP
490 # Can be empty, in which case the shell is probed, "yes" if += is
491 # useable or anything else if it does not work.
492 test -z "$_G_HAVE_PLUSEQ_OP" \
493 && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
494 && _G_HAVE_PLUSEQ_OP=yes
495
496 if test yes = "$_G_HAVE_PLUSEQ_OP"
497 then
498 # This is an XSI compatible shell, allowing a faster implementation...
499 eval 'func_append ()
500 {
501 $debug_cmd
502
503 eval "$1+=\$2"
504 }'
505 else
506 # ...otherwise fall back to using expr, which is often a shell builtin.
507 func_append ()
508 {
509 $debug_cmd
510
511 eval "$1=\$$1\$2"
512 }
513 fi
514
515
516 # func_append_quoted VAR VALUE
517 # ----------------------------
518 # Quote VALUE and append to the end of shell variable VAR, separated
519 # by a space.
520 if test yes = "$_G_HAVE_PLUSEQ_OP"; then
521 eval 'func_append_quoted ()
522 {
523 $debug_cmd
524
525 func_quote_arg pretty "$2"
526 eval "$1+=\\ \$func_quote_arg_result"
527 }'
528 else
529 func_append_quoted ()
530 {
531 $debug_cmd
532
533 func_quote_arg pretty "$2"
534 eval "$1=\$$1\\ \$func_quote_arg_result"
535 }
536 fi
537
538
539 # func_append_uniq VAR VALUE
540 # --------------------------
541 # Append unique VALUE onto the existing contents of VAR, assuming
542 # entries are delimited by the first character of VALUE. For example:
543 #
544 # func_append_uniq options " --another-option option-argument"
545 #
546 # will only append to $options if " --another-option option-argument "
547 # is not already present somewhere in $options already (note spaces at
548 # each end implied by leading space in second argument).
549 func_append_uniq ()
550 {
551 $debug_cmd
552
553 eval _G_current_value='`$ECHO $'$1'`'
554 _G_delim=`expr "$2" : '\(.\)'`
555
556 case $_G_delim$_G_current_value$_G_delim in
557 *"$2$_G_delim"*) ;;
558 *) func_append "$@" ;;
559 esac
560 }
561
562
563 # func_arith TERM...
564 # ------------------
565 # Set func_arith_result to the result of evaluating TERMs.
566 test -z "$_G_HAVE_ARITH_OP" \
567 && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
568 && _G_HAVE_ARITH_OP=yes
569
570 if test yes = "$_G_HAVE_ARITH_OP"; then
571 eval 'func_arith ()
572 {
573 $debug_cmd
574
575 func_arith_result=$(( $* ))
576 }'
577 else
578 func_arith ()
579 {
580 $debug_cmd
581
582 func_arith_result=`expr "$@"`
583 }
584 fi
585
586
587 # func_basename FILE
588 # ------------------
589 # Set func_basename_result to FILE with everything up to and including
590 # the last / stripped.
591 if test yes = "$_G_HAVE_XSI_OPS"; then
592 # If this shell supports suffix pattern removal, then use it to avoid
593 # forking. Hide the definitions single quotes in case the shell chokes
594 # on unsupported syntax...
595 _b='func_basename_result=${1##*/}'
596 _d='case $1 in
597 */*) func_dirname_result=${1%/*}$2 ;;
598 * ) func_dirname_result=$3 ;;
599 esac'
600
601 else
602 # ...otherwise fall back to using sed.
603 _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
604 _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
605 if test "X$func_dirname_result" = "X$1"; then
606 func_dirname_result=$3
607 else
608 func_append func_dirname_result "$2"
609 fi'
610 fi
611
612 eval 'func_basename ()
613 {
614 $debug_cmd
615
616 '"$_b"'
617 }'
618
619
620 # func_dirname FILE APPEND NONDIR_REPLACEMENT
621 # -------------------------------------------
622 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
623 # otherwise set result to NONDIR_REPLACEMENT.
624 eval 'func_dirname ()
625 {
626 $debug_cmd
627
628 '"$_d"'
629 }'
630
631
632 # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
633 # --------------------------------------------------------
634 # Perform func_basename and func_dirname in a single function
635 # call:
636 # dirname: Compute the dirname of FILE. If nonempty,
637 # add APPEND to the result, otherwise set result
638 # to NONDIR_REPLACEMENT.
639 # value returned in "$func_dirname_result"
640 # basename: Compute filename of FILE.
641 # value retuned in "$func_basename_result"
642 # For efficiency, we do not delegate to the functions above but instead
643 # duplicate the functionality here.
644 eval 'func_dirname_and_basename ()
645 {
646 $debug_cmd
647
648 '"$_b"'
649 '"$_d"'
650 }'
651
652
653 # func_echo ARG...
654 # ----------------
655 # Echo program name prefixed message.
656 func_echo ()
657 {
658 $debug_cmd
659
660 _G_message=$*
661
662 func_echo_IFS=$IFS
663 IFS=$nl
664 for _G_line in $_G_message; do
665 IFS=$func_echo_IFS
666 $ECHO "$progname: $_G_line"
667 done
668 IFS=$func_echo_IFS
669 }
670
671
672 # func_echo_all ARG...
673 # --------------------
674 # Invoke $ECHO with all args, space-separated.
675 func_echo_all ()
676 {
677 $ECHO "$*"
678 }
679
680
681 # func_echo_infix_1 INFIX ARG...
682 # ------------------------------
683 # Echo program name, followed by INFIX on the first line, with any
684 # additional lines not showing INFIX.
685 func_echo_infix_1 ()
686 {
687 $debug_cmd
688
689 $require_term_colors
690
691 _G_infix=$1; shift
692 _G_indent=$_G_infix
693 _G_prefix="$progname: $_G_infix: "
694 _G_message=$*
695
696 # Strip color escape sequences before counting printable length
697 for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
698 do
699 test -n "$_G_tc" && {
700 _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
701 _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
702 }
703 done
704 _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
705
706 func_echo_infix_1_IFS=$IFS
707 IFS=$nl
708 for _G_line in $_G_message; do
709 IFS=$func_echo_infix_1_IFS
710 $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
711 _G_prefix=$_G_indent
712 done
713 IFS=$func_echo_infix_1_IFS
714 }
715
716
717 # func_error ARG...
718 # -----------------
719 # Echo program name prefixed message to standard error.
720 func_error ()
721 {
722 $debug_cmd
723
724 $require_term_colors
725
726 func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
727 }
728
729
730 # func_fatal_error ARG...
731 # -----------------------
732 # Echo program name prefixed message to standard error, and exit.
733 func_fatal_error ()
734 {
735 $debug_cmd
736
737 func_error "$*"
738 exit $EXIT_FAILURE
739 }
740
741
742 # func_grep EXPRESSION FILENAME
743 # -----------------------------
744 # Check whether EXPRESSION matches any line of FILENAME, without output.
745 func_grep ()
746 {
747 $debug_cmd
748
749 $GREP "$1" "$2" >/dev/null 2>&1
750 }
751
752
753 # func_len STRING
754 # ---------------
755 # Set func_len_result to the length of STRING. STRING may not
756 # start with a hyphen.
757 test -z "$_G_HAVE_XSI_OPS" \
758 && (eval 'x=a/b/c;
759 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
760 && _G_HAVE_XSI_OPS=yes
761
762 if test yes = "$_G_HAVE_XSI_OPS"; then
763 eval 'func_len ()
764 {
765 $debug_cmd
766
767 func_len_result=${#1}
768 }'
769 else
770 func_len ()
771 {
772 $debug_cmd
773
774 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
775 }
776 fi
777
778
779 # func_mkdir_p DIRECTORY-PATH
780 # ---------------------------
781 # Make sure the entire path to DIRECTORY-PATH is available.
782 func_mkdir_p ()
783 {
784 $debug_cmd
785
786 _G_directory_path=$1
787 _G_dir_list=
788
789 if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
790
791 # Protect directory names starting with '-'
792 case $_G_directory_path in
793 -*) _G_directory_path=./$_G_directory_path ;;
794 esac
795
796 # While some portion of DIR does not yet exist...
797 while test ! -d "$_G_directory_path"; do
798 # ...make a list in topmost first order. Use a colon delimited
799 # list incase some portion of path contains whitespace.
800 _G_dir_list=$_G_directory_path:$_G_dir_list
801
802 # If the last portion added has no slash in it, the list is done
803 case $_G_directory_path in */*) ;; *) break ;; esac
804
805 # ...otherwise throw away the child directory and loop
806 _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
807 done
808 _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
809
810 func_mkdir_p_IFS=$IFS; IFS=:
811 for _G_dir in $_G_dir_list; do
812 IFS=$func_mkdir_p_IFS
813 # mkdir can fail with a 'File exist' error if two processes
814 # try to create one of the directories concurrently. Don't
815 # stop in that case!
816 $MKDIR "$_G_dir" 2>/dev/null || :
817 done
818 IFS=$func_mkdir_p_IFS
819
820 # Bail out if we (or some other process) failed to create a directory.
821 test -d "$_G_directory_path" || \
822 func_fatal_error "Failed to create '$1'"
823 fi
824 }
825
826
827 # func_mktempdir [BASENAME]
828 # -------------------------
829 # Make a temporary directory that won't clash with other running
830 # libtool processes, and avoids race conditions if possible. If
831 # given, BASENAME is the basename for that directory.
832 func_mktempdir ()
833 {
834 $debug_cmd
835
836 _G_template=${TMPDIR-/tmp}/${1-$progname}
837
838 if test : = "$opt_dry_run"; then
839 # Return a directory name, but don't create it in dry-run mode
840 _G_tmpdir=$_G_template-$$
841 else
842
843 # If mktemp works, use that first and foremost
844 _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
845
846 if test ! -d "$_G_tmpdir"; then
847 # Failing that, at least try and use $RANDOM to avoid a race
848 _G_tmpdir=$_G_template-${RANDOM-0}$$
849
850 func_mktempdir_umask=`umask`
851 umask 0077
852 $MKDIR "$_G_tmpdir"
853 umask $func_mktempdir_umask
854 fi
855
856 # If we're not in dry-run mode, bomb out on failure
857 test -d "$_G_tmpdir" || \
858 func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
859 fi
860
861 $ECHO "$_G_tmpdir"
862 }
863
864
865 # func_normal_abspath PATH
866 # ------------------------
867 # Remove doubled-up and trailing slashes, "." path components,
868 # and cancel out any ".." path components in PATH after making
869 # it an absolute path.
870 func_normal_abspath ()
871 {
872 $debug_cmd
873
874 # These SED scripts presuppose an absolute path with a trailing slash.
875 _G_pathcar='s|^/\([^/]*\).*$|\1|'
876 _G_pathcdr='s|^/[^/]*||'
877 _G_removedotparts=':dotsl
878 s|/\./|/|g
879 t dotsl
880 s|/\.$|/|'
881 _G_collapseslashes='s|/\{1,\}|/|g'
882 _G_finalslash='s|/*$|/|'
883
884 # Start from root dir and reassemble the path.
885 func_normal_abspath_result=
886 func_normal_abspath_tpath=$1
887 func_normal_abspath_altnamespace=
888 case $func_normal_abspath_tpath in
889 "")
890 # Empty path, that just means $cwd.
891 func_stripname '' '/' "`pwd`"
892 func_normal_abspath_result=$func_stripname_result
893 return
894 ;;
895 # The next three entries are used to spot a run of precisely
896 # two leading slashes without using negated character classes;
897 # we take advantage of case's first-match behaviour.
898 ///*)
899 # Unusual form of absolute path, do nothing.
900 ;;
901 //*)
902 # Not necessarily an ordinary path; POSIX reserves leading '//'
903 # and for example Cygwin uses it to access remote file shares
904 # over CIFS/SMB, so we conserve a leading double slash if found.
905 func_normal_abspath_altnamespace=/
906 ;;
907 /*)
908 # Absolute path, do nothing.
909 ;;
910 *)
911 # Relative path, prepend $cwd.
912 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
913 ;;
914 esac
915
916 # Cancel out all the simple stuff to save iterations. We also want
917 # the path to end with a slash for ease of parsing, so make sure
918 # there is one (and only one) here.
919 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
920 -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
921 while :; do
922 # Processed it all yet?
923 if test / = "$func_normal_abspath_tpath"; then
924 # If we ascended to the root using ".." the result may be empty now.
925 if test -z "$func_normal_abspath_result"; then
926 func_normal_abspath_result=/
927 fi
928 break
929 fi
930 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
931 -e "$_G_pathcar"`
932 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
933 -e "$_G_pathcdr"`
934 # Figure out what to do with it
935 case $func_normal_abspath_tcomponent in
936 "")
937 # Trailing empty path component, ignore it.
938 ;;
939 ..)
940 # Parent dir; strip last assembled component from result.
941 func_dirname "$func_normal_abspath_result"
942 func_normal_abspath_result=$func_dirname_result
943 ;;
944 *)
945 # Actual path component, append it.
946 func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
947 ;;
948 esac
949 done
950 # Restore leading double-slash if one was found on entry.
951 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
952 }
953
954
955 # func_notquiet ARG...
956 # --------------------
957 # Echo program name prefixed message only when not in quiet mode.
958 func_notquiet ()
959 {
960 $debug_cmd
961
962 $opt_quiet || func_echo ${1+"$@"}
963
964 # A bug in bash halts the script if the last line of a function
965 # fails when set -e is in force, so we need another command to
966 # work around that:
967 :
968 }
969
970
971 # func_relative_path SRCDIR DSTDIR
972 # --------------------------------
973 # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
974 func_relative_path ()
975 {
976 $debug_cmd
977
978 func_relative_path_result=
979 func_normal_abspath "$1"
980 func_relative_path_tlibdir=$func_normal_abspath_result
981 func_normal_abspath "$2"
982 func_relative_path_tbindir=$func_normal_abspath_result
983
984 # Ascend the tree starting from libdir
985 while :; do
986 # check if we have found a prefix of bindir
987 case $func_relative_path_tbindir in
988 $func_relative_path_tlibdir)
989 # found an exact match
990 func_relative_path_tcancelled=
991 break
992 ;;
993 $func_relative_path_tlibdir*)
994 # found a matching prefix
995 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
996 func_relative_path_tcancelled=$func_stripname_result
997 if test -z "$func_relative_path_result"; then
998 func_relative_path_result=.
999 fi
1000 break
1001 ;;
1002 *)
1003 func_dirname $func_relative_path_tlibdir
1004 func_relative_path_tlibdir=$func_dirname_result
1005 if test -z "$func_relative_path_tlibdir"; then
1006 # Have to descend all the way to the root!
1007 func_relative_path_result=../$func_relative_path_result
1008 func_relative_path_tcancelled=$func_relative_path_tbindir
1009 break
1010 fi
1011 func_relative_path_result=../$func_relative_path_result
1012 ;;
1013 esac
1014 done
1015
1016 # Now calculate path; take care to avoid doubling-up slashes.
1017 func_stripname '' '/' "$func_relative_path_result"
1018 func_relative_path_result=$func_stripname_result
1019 func_stripname '/' '/' "$func_relative_path_tcancelled"
1020 if test -n "$func_stripname_result"; then
1021 func_append func_relative_path_result "/$func_stripname_result"
1022 fi
1023
1024 # Normalisation. If bindir is libdir, return '.' else relative path.
1025 if test -n "$func_relative_path_result"; then
1026 func_stripname './' '' "$func_relative_path_result"
1027 func_relative_path_result=$func_stripname_result
1028 fi
1029
1030 test -n "$func_relative_path_result" || func_relative_path_result=.
1031
1032 :
1033 }
1034
1035
1036 # func_quote_portable EVAL ARG
1037 # ----------------------------
1038 # Internal function to portably implement func_quote_arg. Note that we still
1039 # keep attention to performance here so we as much as possible try to avoid
1040 # calling sed binary (so far O(N) complexity as long as func_append is O(1)).
1041 func_quote_portable ()
1042 {
1043 $debug_cmd
1044
1045 func_quote_portable_result=$2
1046
1047 # one-time-loop (easy break)
1048 while true
1049 do
1050 if $1; then
1051 func_quote_portable_result=`$ECHO "$2" | $SED \
1052 -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
1053 break
1054 fi
1055
1056 # Quote for eval.
1057 case $func_quote_portable_result in
1058 *[\\\`\"\$]*)
1059 case $func_quote_portable_result in
1060 *[\[\*\?]*)
1061 func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
1062 | $SED "$sed_quote_subst"`
1063 break
1064 ;;
1065 esac
1066
1067 func_quote_portable_old_IFS=$IFS
1068 for _G_char in '\' '`' '"' '$'
1069 do
1070 # STATE($1) PREV($2) SEPARATOR($3)
1071 set start "" ""
1072 func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
1073 IFS=$_G_char
1074 for _G_part in $func_quote_portable_result
1075 do
1076 case $1 in
1077 quote)
1078 func_append func_quote_portable_result "$3$2"
1079 set quote "$_G_part" "\\$_G_char"
1080 ;;
1081 start)
1082 set first "" ""
1083 func_quote_portable_result=
1084 ;;
1085 first)
1086 set quote "$_G_part" ""
1087 ;;
1088 esac
1089 done
1090 done
1091 IFS=$func_quote_portable_old_IFS
1092 ;;
1093 *) ;;
1094 esac
1095 break
1096 done
1097
1098 func_quote_portable_unquoted_result=$func_quote_portable_result
1099 case $func_quote_portable_result in
1100 # double-quote args containing shell metacharacters to delay
1101 # word splitting, command substitution and variable expansion
1102 # for a subsequent eval.
1103 # many bourne shells cannot handle close brackets correctly
1104 # in scan sets, so we specify it separately.
1105 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1106 func_quote_portable_result=\"$func_quote_portable_result\"
1107 ;;
1108 esac
1109 }
1110
1111
1112 # func_quotefast_eval ARG
1113 # -----------------------
1114 # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
1115 # but optimized for speed. Result is stored in $func_quotefast_eval.
1116 if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
1117 printf -v _GL_test_printf_tilde %q '~'
1118 if test '\~' = "$_GL_test_printf_tilde"; then
1119 func_quotefast_eval ()
1120 {
1121 printf -v func_quotefast_eval_result %q "$1"
1122 }
1123 else
1124 # Broken older Bash implementations. Make those faster too if possible.
1125 func_quotefast_eval ()
1126 {
1127 case $1 in
1128 '~'*)
1129 func_quote_portable false "$1"
1130 func_quotefast_eval_result=$func_quote_portable_result
1131 ;;
1132 *)
1133 printf -v func_quotefast_eval_result %q "$1"
1134 ;;
1135 esac
1136 }
1137 fi
1138 else
1139 func_quotefast_eval ()
1140 {
1141 func_quote_portable false "$1"
1142 func_quotefast_eval_result=$func_quote_portable_result
1143 }
1144 fi
1145
1146
1147 # func_quote_arg MODEs ARG
1148 # ------------------------
1149 # Quote one ARG to be evaled later. MODEs argument may contain zero or more
1150 # specifiers listed below separated by ',' character. This function returns two
1151 # values:
1152 # i) func_quote_arg_result
1153 # double-quoted (when needed), suitable for a subsequent eval
1154 # ii) func_quote_arg_unquoted_result
1155 # has all characters that are still active within double
1156 # quotes backslashified. Available only if 'unquoted' is specified.
1157 #
1158 # Available modes:
1159 # ----------------
1160 # 'eval' (default)
1161 # - escape shell special characters
1162 # 'expand'
1163 # - the same as 'eval'; but do not quote variable references
1164 # 'pretty'
1165 # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
1166 # be used later in func_quote to get output like: 'echo "a b"' instead
1167 # of 'echo a\ b'. This is slower than default on some shells.
1168 # 'unquoted'
1169 # - produce also $func_quote_arg_unquoted_result which does not contain
1170 # wrapping double-quotes.
1171 #
1172 # Examples for 'func_quote_arg pretty,unquoted string':
1173 #
1174 # string | *_result | *_unquoted_result
1175 # ------------+-----------------------+-------------------
1176 # " | \" | \"
1177 # a b | "a b" | a b
1178 # "a b" | "\"a b\"" | \"a b\"
1179 # * | "*" | *
1180 # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
1181 #
1182 # Examples for 'func_quote_arg pretty,unquoted,expand string':
1183 #
1184 # string | *_result | *_unquoted_result
1185 # --------------+---------------------+--------------------
1186 # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
1187 func_quote_arg ()
1188 {
1189 _G_quote_expand=false
1190 case ,$1, in
1191 *,expand,*)
1192 _G_quote_expand=:
1193 ;;
1194 esac
1195
1196 case ,$1, in
1197 *,pretty,*|*,expand,*|*,unquoted,*)
1198 func_quote_portable $_G_quote_expand "$2"
1199 func_quote_arg_result=$func_quote_portable_result
1200 func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
1201 ;;
1202 *)
1203 # Faster quote-for-eval for some shells.
1204 func_quotefast_eval "$2"
1205 func_quote_arg_result=$func_quotefast_eval_result
1206 ;;
1207 esac
1208 }
1209
1210
1211 # func_quote MODEs ARGs...
1212 # ------------------------
1213 # Quote all ARGs to be evaled later and join them into single command. See
1214 # func_quote_arg's description for more info.
1215 func_quote ()
1216 {
1217 $debug_cmd
1218 _G_func_quote_mode=$1 ; shift
1219 func_quote_result=
1220 while test 0 -lt $#; do
1221 func_quote_arg "$_G_func_quote_mode" "$1"
1222 if test -n "$func_quote_result"; then
1223 func_append func_quote_result " $func_quote_arg_result"
1224 else
1225 func_append func_quote_result "$func_quote_arg_result"
1226 fi
1227 shift
1228 done
1229 }
1230
1231
1232 # func_stripname PREFIX SUFFIX NAME
1233 # ---------------------------------
1234 # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
1235 # PREFIX and SUFFIX must not contain globbing or regex special
1236 # characters, hashes, percent signs, but SUFFIX may contain a leading
1237 # dot (in which case that matches only a dot).
1238 if test yes = "$_G_HAVE_XSI_OPS"; then
1239 eval 'func_stripname ()
1240 {
1241 $debug_cmd
1242
1243 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1244 # positional parameters, so assign one to ordinary variable first.
1245 func_stripname_result=$3
1246 func_stripname_result=${func_stripname_result#"$1"}
1247 func_stripname_result=${func_stripname_result%"$2"}
1248 }'
1249 else
1250 func_stripname ()
1251 {
1252 $debug_cmd
1253
1254 case $2 in
1255 .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
1256 *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
1257 esac
1258 }
1259 fi
1260
1261
1262 # func_show_eval CMD [FAIL_EXP]
1263 # -----------------------------
1264 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1265 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1266 # is given, then evaluate it.
1267 func_show_eval ()
1268 {
1269 $debug_cmd
1270
1271 _G_cmd=$1
1272 _G_fail_exp=${2-':'}
1273
1274 func_quote_arg pretty,expand "$_G_cmd"
1275 eval "func_notquiet $func_quote_arg_result"
1276
1277 $opt_dry_run || {
1278 eval "$_G_cmd"
1279 _G_status=$?
1280 if test 0 -ne "$_G_status"; then
1281 eval "(exit $_G_status); $_G_fail_exp"
1282 fi
1283 }
1284 }
1285
1286
1287 # func_show_eval_locale CMD [FAIL_EXP]
1288 # ------------------------------------
1289 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1290 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1291 # is given, then evaluate it. Use the saved locale for evaluation.
1292 func_show_eval_locale ()
1293 {
1294 $debug_cmd
1295
1296 _G_cmd=$1
1297 _G_fail_exp=${2-':'}
1298
1299 $opt_quiet || {
1300 func_quote_arg expand,pretty "$_G_cmd"
1301 eval "func_echo $func_quote_arg_result"
1302 }
1303
1304 $opt_dry_run || {
1305 eval "$_G_user_locale
1306 $_G_cmd"
1307 _G_status=$?
1308 eval "$_G_safe_locale"
1309 if test 0 -ne "$_G_status"; then
1310 eval "(exit $_G_status); $_G_fail_exp"
1311 fi
1312 }
1313 }
1314
1315
1316 # func_tr_sh
1317 # ----------
1318 # Turn $1 into a string suitable for a shell variable name.
1319 # Result is stored in $func_tr_sh_result. All characters
1320 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
1321 # if $1 begins with a digit, a '_' is prepended as well.
1322 func_tr_sh ()
1323 {
1324 $debug_cmd
1325
1326 case $1 in
1327 [0-9]* | *[!a-zA-Z0-9_]*)
1328 func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
1329 ;;
1330 * )
1331 func_tr_sh_result=$1
1332 ;;
1333 esac
1334 }
1335
1336
1337 # func_verbose ARG...
1338 # -------------------
1339 # Echo program name prefixed message in verbose mode only.
1340 func_verbose ()
1341 {
1342 $debug_cmd
1343
1344 $opt_verbose && func_echo "$*"
1345
1346 :
1347 }
1348
1349
1350 # func_warn_and_continue ARG...
1351 # -----------------------------
1352 # Echo program name prefixed warning message to standard error.
1353 func_warn_and_continue ()
1354 {
1355 $debug_cmd
1356
1357 $require_term_colors
1358
1359 func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
1360 }
1361
1362
1363 # func_warning CATEGORY ARG...
1364 # ----------------------------
1365 # Echo program name prefixed warning message to standard error. Warning
1366 # messages can be filtered according to CATEGORY, where this function
1367 # elides messages where CATEGORY is not listed in the global variable
1368 # 'opt_warning_types'.
1369 func_warning ()
1370 {
1371 $debug_cmd
1372
1373 # CATEGORY must be in the warning_categories list!
1374 case " $warning_categories " in
1375 *" $1 "*) ;;
1376 *) func_internal_error "invalid warning category '$1'" ;;
1377 esac
1378
1379 _G_category=$1
1380 shift
1381
1382 case " $opt_warning_types " in
1383 *" $_G_category "*) $warning_func ${1+"$@"} ;;
1384 esac
1385 }
1386
1387
1388 # func_sort_ver VER1 VER2
1389 # -----------------------
1390 # 'sort -V' is not generally available.
1391 # Note this deviates from the version comparison in automake
1392 # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
1393 # but this should suffice as we won't be specifying old
1394 # version formats or redundant trailing .0 in bootstrap.conf.
1395 # If we did want full compatibility then we should probably
1396 # use m4_version_compare from autoconf.
1397 func_sort_ver ()
1398 {
1399 $debug_cmd
1400
1401 printf '%s\n%s\n' "$1" "$2" \
1402 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
1403 }
1404
1405 # func_lt_ver PREV CURR
1406 # ---------------------
1407 # Return true if PREV and CURR are in the correct order according to
1408 # func_sort_ver, otherwise false. Use it like this:
1409 #
1410 # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
1411 func_lt_ver ()
1412 {
1413 $debug_cmd
1414
1415 test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
1416 }
1417
1418
1419 # Local variables:
1420 # mode: shell-script
1421 # sh-indentation: 2
1422 # eval: (add-hook 'before-save-hook 'time-stamp)
1423 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1424 # time-stamp-time-zone: "UTC"
1425 # End:
0 #! /bin/sh
1
2 # Output the contents of a shell script with sourced files inlined.
3 # Written by Gary V. Vaughan, 2012
4
5 # This is free software. There is NO warranty; not even for
6 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 #
8 # Copyright (C) 2012-2019 Bootstrap Authors
9 #
10 # This file is dual licensed under the terms of the MIT license
11 # <https://opensource.org/license/MIT>, and GPL version 3 or later
12 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
13 # these licenses when using or redistributing this software or any of
14 # the files within it. See the URLs above, or the file `LICENSE`
15 # included in the Bootstrap distribution for the full license texts.
16
17 # Please report bugs or propose patches to:
18 # <https://github.com/gnulib-modules/bootstrap/issues>
19
20 # Source required external libraries:
21 . `echo "$0" |${SED-sed} 's|[^/]*$||'`"funclib.sh"
22 . `echo "$0" |${SED-sed} 's|[^/]*$||'`"options-parser"
23
24 # Set a version string for *this* script.
25 scriptversion=2019-02-19.15; # UTC
26
27
28 ## ------ ##
29 ## Usage. ##
30 ## ------ ##
31
32 # Run 'build-aux/inline-source --help' for help with using this script
33 # from the command line.
34
35 # Recursively scan through a FILE passed on the command line, replacing
36 # either of the following:
37 # . "relative/file"
38 # . `echo "$0" |edit`"relative/file"
39 # with the contents of the referenced files.
40
41
42 ## ---------------- ##
43 ## Options parsing. ##
44 ## ---------------- ##
45
46 usage='$progpath [OPTION]... FILE'
47
48 # Short help message in response to '-h'.
49 usage_message='Options:
50 --debug enable verbose shell tracing
51 --version print version information and exit
52 -h, --help print help message and exit
53 '
54
55 long_help_message="\
56 Report bugs to <bug-libtool@gnu.org>
57 General help using GNU software: <http://www.gnu.org/gethelp/>."
58
59 func_options ${1+"$@"}
60 eval set dummy "$func_options_result"; shift
61
62
63 ## -------------------- ##
64 ## Resource management. ##
65 ## -------------------- ##
66
67 # require_AWK
68 # -----------
69 # Search for a "not hopeless" awk.
70 require_AWK=func_require_AWK
71 func_require_AWK ()
72 {
73 $debug_cmd
74
75 test -n "$AWK" || {
76 # Find the first executable in the list.
77 for _G_prog in gawk mawk nawk awk
78 do
79 require_AWK_IFS=$IFS
80 IFS=${PATH_SEPARATOR-:}
81 for _G_dir in $PATH
82 do
83 IFS=$require_AWK_IFS
84 if test -f "$_G_dir/$_G_prog" && test -x "$_G_dir/$_G_prog"
85 then
86 AWK=$_G_dir/$_G_prog
87 break 2
88 fi
89 done
90 IFS=$require_AWK_IFS
91 done
92 }
93
94 test -n "$AWK" || func_fatal_error "\
95 Please install GNU Awk, or 'export AWK=/path/to/gnu/awk'."
96
97 func_verbose "found '$AWK'."
98
99 require_AWK=:
100 }
101
102
103 ## --------------- ##
104 ## Core functions. ##
105 ## --------------- ##
106
107 # func_include LINE
108 # -----------------
109 # Output the contents of file included by LINE.
110 func_include ()
111 {
112 $require_AWK
113
114 test -f "$1" \
115 || func_fatal_error "file '$1' not found"
116
117 _G_scriptdir=`echo "$1" |$SED 's|[^/]*$||'`
118 test -n "$_G_scriptdir" || _G_scriptdir="./"
119
120 $AWK '
121 BEGIN { magic = '${_RECURSE_MAGIC-0}'; }
122
123 /^#!/ && magic == 0 {
124 print $0;
125 print "## DO NOT EDIT - This file generated from '$1'";
126 print "## by '$progname' v'$scriptversion'";
127 magic++;
128 next;
129 }
130
131 /^\. ['\''"].*['\''"]$/ {
132 file = substr ($2, 2, length ($2) -2);
133 system (sprintf ("env _RECURSE_MAGIC=%d '$progpath' %s", magic, file));
134 next;
135 }
136
137 /^\. `echo [^`]*`['\''"][^'\''"]*['\''"]$/ {
138 tail = substr ($0, match ($0, /`['\''"]/));
139 file = substr (tail, 3, length (tail) -3);
140 system (sprintf ("env _RECURSE_MAGIC=%d '$progpath' '"$_G_scriptdir"'%s", magic, file));
141 next;
142 }
143
144 { print; }
145 ' < "$1"
146 }
147
148 func_include "$1"
149
150 exit 0
151
152 # Local variables:
153 # mode: shell-script
154 # sh-indentation: 2
155 # eval: (add-hook 'before-save-hook 'time-stamp)
156 # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
157 # time-stamp-time-zone: "UTC"
158 # End:
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2018-03-11.20; # UTC
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # 'make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 tab=' '
44 nl='
45 '
46 IFS=" $tab$nl"
47
48 # Set DOITPROG to "echo" to test this script.
49
50 doit=${DOITPROG-}
51 doit_exec=${doit:-exec}
52
53 # Put in absolute file names if you don't have them in your path;
54 # or use environment vars.
55
56 chgrpprog=${CHGRPPROG-chgrp}
57 chmodprog=${CHMODPROG-chmod}
58 chownprog=${CHOWNPROG-chown}
59 cmpprog=${CMPPROG-cmp}
60 cpprog=${CPPROG-cp}
61 mkdirprog=${MKDIRPROG-mkdir}
62 mvprog=${MVPROG-mv}
63 rmprog=${RMPROG-rm}
64 stripprog=${STRIPPROG-strip}
65
66 posix_mkdir=
67
68 # Desired mode of installed file.
69 mode=0755
70
71 chgrpcmd=
72 chmodcmd=$chmodprog
73 chowncmd=
74 mvcmd=$mvprog
75 rmcmd="$rmprog -f"
76 stripcmd=
77
78 src=
79 dst=
80 dir_arg=
81 dst_arg=
82
83 copy_on_change=false
84 is_target_a_directory=possibly
85
86 usage="\
87 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
88 or: $0 [OPTION]... SRCFILES... DIRECTORY
89 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
90 or: $0 [OPTION]... -d DIRECTORIES...
91
92 In the 1st form, copy SRCFILE to DSTFILE.
93 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
94 In the 4th, create DIRECTORIES.
95
96 Options:
97 --help display this help and exit.
98 --version display version info and exit.
99
100 -c (ignored)
101 -C install only if different (preserve the last data modification time)
102 -d create directories instead of installing files.
103 -g GROUP $chgrpprog installed files to GROUP.
104 -m MODE $chmodprog installed files to MODE.
105 -o USER $chownprog installed files to USER.
106 -s $stripprog installed files.
107 -t DIRECTORY install into DIRECTORY.
108 -T report an error if DSTFILE is a directory.
109
110 Environment variables override the default commands:
111 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
112 RMPROG STRIPPROG
113 "
114
115 while test $# -ne 0; do
116 case $1 in
117 -c) ;;
118
119 -C) copy_on_change=true;;
120
121 -d) dir_arg=true;;
122
123 -g) chgrpcmd="$chgrpprog $2"
124 shift;;
125
126 --help) echo "$usage"; exit $?;;
127
128 -m) mode=$2
129 case $mode in
130 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
131 echo "$0: invalid mode: $mode" >&2
132 exit 1;;
133 esac
134 shift;;
135
136 -o) chowncmd="$chownprog $2"
137 shift;;
138
139 -s) stripcmd=$stripprog;;
140
141 -t)
142 is_target_a_directory=always
143 dst_arg=$2
144 # Protect names problematic for 'test' and other utilities.
145 case $dst_arg in
146 -* | [=\(\)!]) dst_arg=./$dst_arg;;
147 esac
148 shift;;
149
150 -T) is_target_a_directory=never;;
151
152 --version) echo "$0 $scriptversion"; exit $?;;
153
154 --) shift
155 break;;
156
157 -*) echo "$0: invalid option: $1" >&2
158 exit 1;;
159
160 *) break;;
161 esac
162 shift
163 done
164
165 # We allow the use of options -d and -T together, by making -d
166 # take the precedence; this is for compatibility with GNU install.
167
168 if test -n "$dir_arg"; then
169 if test -n "$dst_arg"; then
170 echo "$0: target directory not allowed when installing a directory." >&2
171 exit 1
172 fi
173 fi
174
175 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
176 # When -d is used, all remaining arguments are directories to create.
177 # When -t is used, the destination is already specified.
178 # Otherwise, the last argument is the destination. Remove it from $@.
179 for arg
180 do
181 if test -n "$dst_arg"; then
182 # $@ is not empty: it contains at least $arg.
183 set fnord "$@" "$dst_arg"
184 shift # fnord
185 fi
186 shift # arg
187 dst_arg=$arg
188 # Protect names problematic for 'test' and other utilities.
189 case $dst_arg in
190 -* | [=\(\)!]) dst_arg=./$dst_arg;;
191 esac
192 done
193 fi
194
195 if test $# -eq 0; then
196 if test -z "$dir_arg"; then
197 echo "$0: no input file specified." >&2
198 exit 1
199 fi
200 # It's OK to call 'install-sh -d' without argument.
201 # This can happen when creating conditional directories.
202 exit 0
203 fi
204
205 if test -z "$dir_arg"; then
206 if test $# -gt 1 || test "$is_target_a_directory" = always; then
207 if test ! -d "$dst_arg"; then
208 echo "$0: $dst_arg: Is not a directory." >&2
209 exit 1
210 fi
211 fi
212 fi
213
214 if test -z "$dir_arg"; then
215 do_exit='(exit $ret); exit $ret'
216 trap "ret=129; $do_exit" 1
217 trap "ret=130; $do_exit" 2
218 trap "ret=141; $do_exit" 13
219 trap "ret=143; $do_exit" 15
220
221 # Set umask so as not to create temps with too-generous modes.
222 # However, 'strip' requires both read and write access to temps.
223 case $mode in
224 # Optimize common cases.
225 *644) cp_umask=133;;
226 *755) cp_umask=22;;
227
228 *[0-7])
229 if test -z "$stripcmd"; then
230 u_plus_rw=
231 else
232 u_plus_rw='% 200'
233 fi
234 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
235 *)
236 if test -z "$stripcmd"; then
237 u_plus_rw=
238 else
239 u_plus_rw=,u+rw
240 fi
241 cp_umask=$mode$u_plus_rw;;
242 esac
243 fi
244
245 for src
246 do
247 # Protect names problematic for 'test' and other utilities.
248 case $src in
249 -* | [=\(\)!]) src=./$src;;
250 esac
251
252 if test -n "$dir_arg"; then
253 dst=$src
254 dstdir=$dst
255 test -d "$dstdir"
256 dstdir_status=$?
257 else
258
259 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
260 # might cause directories to be created, which would be especially bad
261 # if $src (and thus $dsttmp) contains '*'.
262 if test ! -f "$src" && test ! -d "$src"; then
263 echo "$0: $src does not exist." >&2
264 exit 1
265 fi
266
267 if test -z "$dst_arg"; then
268 echo "$0: no destination specified." >&2
269 exit 1
270 fi
271 dst=$dst_arg
272
273 # If destination is a directory, append the input filename.
274 if test -d "$dst"; then
275 if test "$is_target_a_directory" = never; then
276 echo "$0: $dst_arg: Is a directory" >&2
277 exit 1
278 fi
279 dstdir=$dst
280 dstbase=`basename "$src"`
281 case $dst in
282 */) dst=$dst$dstbase;;
283 *) dst=$dst/$dstbase;;
284 esac
285 dstdir_status=0
286 else
287 dstdir=`dirname "$dst"`
288 test -d "$dstdir"
289 dstdir_status=$?
290 fi
291 fi
292
293 case $dstdir in
294 */) dstdirslash=$dstdir;;
295 *) dstdirslash=$dstdir/;;
296 esac
297
298 obsolete_mkdir_used=false
299
300 if test $dstdir_status != 0; then
301 case $posix_mkdir in
302 '')
303 # Create intermediate dirs using mode 755 as modified by the umask.
304 # This is like FreeBSD 'install' as of 1997-10-28.
305 umask=`umask`
306 case $stripcmd.$umask in
307 # Optimize common cases.
308 *[2367][2367]) mkdir_umask=$umask;;
309 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
310
311 *[0-7])
312 mkdir_umask=`expr $umask + 22 \
313 - $umask % 100 % 40 + $umask % 20 \
314 - $umask % 10 % 4 + $umask % 2
315 `;;
316 *) mkdir_umask=$umask,go-w;;
317 esac
318
319 # With -d, create the new directory with the user-specified mode.
320 # Otherwise, rely on $mkdir_umask.
321 if test -n "$dir_arg"; then
322 mkdir_mode=-m$mode
323 else
324 mkdir_mode=
325 fi
326
327 posix_mkdir=false
328 case $umask in
329 *[123567][0-7][0-7])
330 # POSIX mkdir -p sets u+wx bits regardless of umask, which
331 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
332 ;;
333 *)
334 # Note that $RANDOM variable is not portable (e.g. dash); Use it
335 # here however when possible just to lower collision chance.
336 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
337
338 trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
339
340 # Because "mkdir -p" follows existing symlinks and we likely work
341 # directly in world-writeable /tmp, make sure that the '$tmpdir'
342 # directory is successfully created first before we actually test
343 # 'mkdir -p' feature.
344 if (umask $mkdir_umask &&
345 $mkdirprog $mkdir_mode "$tmpdir" &&
346 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
347 then
348 if test -z "$dir_arg" || {
349 # Check for POSIX incompatibilities with -m.
350 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
351 # other-writable bit of parent directory when it shouldn't.
352 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
353 test_tmpdir="$tmpdir/a"
354 ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
355 case $ls_ld_tmpdir in
356 d????-?r-*) different_mode=700;;
357 d????-?--*) different_mode=755;;
358 *) false;;
359 esac &&
360 $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
361 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
362 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
363 }
364 }
365 then posix_mkdir=:
366 fi
367 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
368 else
369 # Remove any dirs left behind by ancient mkdir implementations.
370 rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
371 fi
372 trap '' 0;;
373 esac;;
374 esac
375
376 if
377 $posix_mkdir && (
378 umask $mkdir_umask &&
379 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
380 )
381 then :
382 else
383
384 # The umask is ridiculous, or mkdir does not conform to POSIX,
385 # or it failed possibly due to a race condition. Create the
386 # directory the slow way, step by step, checking for races as we go.
387
388 case $dstdir in
389 /*) prefix='/';;
390 [-=\(\)!]*) prefix='./';;
391 *) prefix='';;
392 esac
393
394 oIFS=$IFS
395 IFS=/
396 set -f
397 set fnord $dstdir
398 shift
399 set +f
400 IFS=$oIFS
401
402 prefixes=
403
404 for d
405 do
406 test X"$d" = X && 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=${dstdirslash}_inst.$$_
447 rmtmp=${dstdirslash}_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 set -f &&
471 set X $old && old=:$2:$4:$5:$6 &&
472 set X $new && new=:$2:$4:$5:$6 &&
473 set +f &&
474 test "$old" = "$new" &&
475 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
476 then
477 rm -f "$dsttmp"
478 else
479 # Rename the file to the real destination.
480 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
481
482 # The rename failed, perhaps because mv can't rename something else
483 # to itself, or perhaps because mv is so ancient that it does not
484 # support -f.
485 {
486 # Now remove or move aside any old file at destination location.
487 # We try this two ways since rm can't unlink itself on some
488 # systems and the destination file might be busy for other
489 # reasons. In this case, the final cleanup might fail but the new
490 # file should still install successfully.
491 {
492 test ! -f "$dst" ||
493 $doit $rmcmd -f "$dst" 2>/dev/null ||
494 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
495 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
496 } ||
497 { echo "$0: cannot unlink or rename $dst" >&2
498 (exit 1); exit 1
499 }
500 } &&
501
502 # Now rename the file to the real destination.
503 $doit $mvcmd "$dsttmp" "$dst"
504 }
505 fi || exit 1
506
507 trap '' 0
508 fi
509 done
510
511 # Local variables:
512 # eval: (add-hook 'before-save-hook 'time-stamp)
513 # time-stamp-start: "scriptversion="
514 # time-stamp-format: "%:y-%02m-%02d.%02H"
515 # time-stamp-time-zone: "UTC0"
516 # time-stamp-end: "; # UTC"
517 # End:
0 #! /bin/sh
1 ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
2 ## by inline-source v2014-01-03.01
3
4 # libtool (GNU libtool) 2.4.6
5 # Provide generalized library-building support services.
6 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7
8 # Copyright (C) 1996-2015 Free Software Foundation, Inc.
9 # This is free software; see the source for copying conditions. There is NO
10 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
12 # GNU Libtool is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # As a special exception to the GNU General Public License,
18 # if you distribute this file as part of a program or library that
19 # is built using GNU Libtool, you may include this file under the
20 # same distribution terms that you use for the rest of that program.
21 #
22 # GNU Libtool is distributed in the hope that it will be useful, but
23 # WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 # General Public License for more details.
26 #
27 # You should have received a copy of the GNU General Public License
28 # along with this program. If not, see <http://www.gnu.org/licenses/>.
29
30
31 PROGRAM=libtool
32 PACKAGE=libtool
33 VERSION="2.4.6 Debian-2.4.6-2"
34 package_revision=2.4.6
35
36
37 ## ------ ##
38 ## Usage. ##
39 ## ------ ##
40
41 # Run './libtool --help' for help with using this script from the
42 # command line.
43
44
45 ## ------------------------------- ##
46 ## User overridable command paths. ##
47 ## ------------------------------- ##
48
49 # After configure completes, it has a better idea of some of the
50 # shell tools we need than the defaults used by the functions shared
51 # with bootstrap, so set those here where they can still be over-
52 # ridden by the user, but otherwise take precedence.
53
54 : ${AUTOCONF="autoconf"}
55 : ${AUTOMAKE="automake"}
56
57
58 ## -------------------------- ##
59 ## Source external libraries. ##
60 ## -------------------------- ##
61
62 # Much of our low-level functionality needs to be sourced from external
63 # libraries, which are installed to $pkgauxdir.
64
65 # Set a version string for this script.
66 scriptversion=2015-01-20.17; # UTC
67
68 # General shell script boiler plate, and helper functions.
69 # Written by Gary V. Vaughan, 2004
70
71 # Copyright (C) 2004-2015 Free Software Foundation, Inc.
72 # This is free software; see the source for copying conditions. There is NO
73 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
74
75 # This program is free software; you can redistribute it and/or modify
76 # it under the terms of the GNU General Public License as published by
77 # the Free Software Foundation; either version 3 of the License, or
78 # (at your option) any later version.
79
80 # As a special exception to the GNU General Public License, if you distribute
81 # this file as part of a program or library that is built using GNU Libtool,
82 # you may include this file under the same distribution terms that you use
83 # for the rest of that program.
84
85 # This program is distributed in the hope that it will be useful,
86 # but WITHOUT ANY WARRANTY; without even the implied warranty of
87 # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
88 # General Public License for more details.
89
90 # You should have received a copy of the GNU General Public License
91 # along with this program. If not, see <http://www.gnu.org/licenses/>.
92
93 # Please report bugs or propose patches to gary@gnu.org.
94
95
96 ## ------ ##
97 ## Usage. ##
98 ## ------ ##
99
100 # Evaluate this file near the top of your script to gain access to
101 # the functions and variables defined here:
102 #
103 # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
104 #
105 # If you need to override any of the default environment variable
106 # settings, do that before evaluating this file.
107
108
109 ## -------------------- ##
110 ## Shell normalisation. ##
111 ## -------------------- ##
112
113 # Some shells need a little help to be as Bourne compatible as possible.
114 # Before doing anything else, make sure all that help has been provided!
115
116 DUALCASE=1; export DUALCASE # for MKS sh
117 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
118 emulate sh
119 NULLCMD=:
120 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
121 # is contrary to our usage. Disable this feature.
122 alias -g '${1+"$@"}'='"$@"'
123 setopt NO_GLOB_SUBST
124 else
125 case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
126 fi
127
128 # NLS nuisances: We save the old values in case they are required later.
129 _G_user_locale=
130 _G_safe_locale=
131 for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
132 do
133 eval "if test set = \"\${$_G_var+set}\"; then
134 save_$_G_var=\$$_G_var
135 $_G_var=C
136 export $_G_var
137 _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
138 _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
139 fi"
140 done
141
142 # CDPATH.
143 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
144
145 # Make sure IFS has a sensible default
146 sp=' '
147 nl='
148 '
149 IFS="$sp $nl"
150
151 # There are apparently some retarded systems that use ';' as a PATH separator!
152 if test "${PATH_SEPARATOR+set}" != set; then
153 PATH_SEPARATOR=:
154 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
155 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
156 PATH_SEPARATOR=';'
157 }
158 fi
159
160
161
162 ## ------------------------- ##
163 ## Locate command utilities. ##
164 ## ------------------------- ##
165
166
167 # func_executable_p FILE
168 # ----------------------
169 # Check that FILE is an executable regular file.
170 func_executable_p ()
171 {
172 test -f "$1" && test -x "$1"
173 }
174
175
176 # func_path_progs PROGS_LIST CHECK_FUNC [PATH]
177 # --------------------------------------------
178 # Search for either a program that responds to --version with output
179 # containing "GNU", or else returned by CHECK_FUNC otherwise, by
180 # trying all the directories in PATH with each of the elements of
181 # PROGS_LIST.
182 #
183 # CHECK_FUNC should accept the path to a candidate program, and
184 # set $func_check_prog_result if it truncates its output less than
185 # $_G_path_prog_max characters.
186 func_path_progs ()
187 {
188 _G_progs_list=$1
189 _G_check_func=$2
190 _G_PATH=${3-"$PATH"}
191
192 _G_path_prog_max=0
193 _G_path_prog_found=false
194 _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
195 for _G_dir in $_G_PATH; do
196 IFS=$_G_save_IFS
197 test -z "$_G_dir" && _G_dir=.
198 for _G_prog_name in $_G_progs_list; do
199 for _exeext in '' .EXE; do
200 _G_path_prog=$_G_dir/$_G_prog_name$_exeext
201 func_executable_p "$_G_path_prog" || continue
202 case `"$_G_path_prog" --version 2>&1` in
203 *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
204 *) $_G_check_func $_G_path_prog
205 func_path_progs_result=$func_check_prog_result
206 ;;
207 esac
208 $_G_path_prog_found && break 3
209 done
210 done
211 done
212 IFS=$_G_save_IFS
213 test -z "$func_path_progs_result" && {
214 echo "no acceptable sed could be found in \$PATH" >&2
215 exit 1
216 }
217 }
218
219
220 # We want to be able to use the functions in this file before configure
221 # has figured out where the best binaries are kept, which means we have
222 # to search for them ourselves - except when the results are already set
223 # where we skip the searches.
224
225 # Unless the user overrides by setting SED, search the path for either GNU
226 # sed, or the sed that truncates its output the least.
227 test -z "$SED" && {
228 _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
229 for _G_i in 1 2 3 4 5 6 7; do
230 _G_sed_script=$_G_sed_script$nl$_G_sed_script
231 done
232 echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
233 _G_sed_script=
234
235 func_check_prog_sed ()
236 {
237 _G_path_prog=$1
238
239 _G_count=0
240 printf 0123456789 >conftest.in
241 while :
242 do
243 cat conftest.in conftest.in >conftest.tmp
244 mv conftest.tmp conftest.in
245 cp conftest.in conftest.nl
246 echo '' >> conftest.nl
247 "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
248 diff conftest.out conftest.nl >/dev/null 2>&1 || break
249 _G_count=`expr $_G_count + 1`
250 if test "$_G_count" -gt "$_G_path_prog_max"; then
251 # Best one so far, save it but keep looking for a better one
252 func_check_prog_result=$_G_path_prog
253 _G_path_prog_max=$_G_count
254 fi
255 # 10*(2^10) chars as input seems more than enough
256 test 10 -lt "$_G_count" && break
257 done
258 rm -f conftest.in conftest.tmp conftest.nl conftest.out
259 }
260
261 func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
262 rm -f conftest.sed
263 SED=$func_path_progs_result
264 }
265
266
267 # Unless the user overrides by setting GREP, search the path for either GNU
268 # grep, or the grep that truncates its output the least.
269 test -z "$GREP" && {
270 func_check_prog_grep ()
271 {
272 _G_path_prog=$1
273
274 _G_count=0
275 _G_path_prog_max=0
276 printf 0123456789 >conftest.in
277 while :
278 do
279 cat conftest.in conftest.in >conftest.tmp
280 mv conftest.tmp conftest.in
281 cp conftest.in conftest.nl
282 echo 'GREP' >> conftest.nl
283 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
284 diff conftest.out conftest.nl >/dev/null 2>&1 || break
285 _G_count=`expr $_G_count + 1`
286 if test "$_G_count" -gt "$_G_path_prog_max"; then
287 # Best one so far, save it but keep looking for a better one
288 func_check_prog_result=$_G_path_prog
289 _G_path_prog_max=$_G_count
290 fi
291 # 10*(2^10) chars as input seems more than enough
292 test 10 -lt "$_G_count" && break
293 done
294 rm -f conftest.in conftest.tmp conftest.nl conftest.out
295 }
296
297 func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
298 GREP=$func_path_progs_result
299 }
300
301
302 ## ------------------------------- ##
303 ## User overridable command paths. ##
304 ## ------------------------------- ##
305
306 # All uppercase variable names are used for environment variables. These
307 # variables can be overridden by the user before calling a script that
308 # uses them if a suitable command of that name is not already available
309 # in the command search PATH.
310
311 : ${CP="cp -f"}
312 : ${ECHO="printf %s\n"}
313 : ${EGREP="$GREP -E"}
314 : ${FGREP="$GREP -F"}
315 : ${LN_S="ln -s"}
316 : ${MAKE="make"}
317 : ${MKDIR="mkdir"}
318 : ${MV="mv -f"}
319 : ${RM="rm -f"}
320 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
321
322
323 ## -------------------- ##
324 ## Useful sed snippets. ##
325 ## -------------------- ##
326
327 sed_dirname='s|/[^/]*$||'
328 sed_basename='s|^.*/||'
329
330 # Sed substitution that helps us do robust quoting. It backslashifies
331 # metacharacters that are still active within double-quoted strings.
332 sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
333
334 # Same as above, but do not quote variable references.
335 sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
336
337 # Sed substitution that turns a string into a regex matching for the
338 # string literally.
339 sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
340
341 # Sed substitution that converts a w32 file name or path
342 # that contains forward slashes, into one that contains
343 # (escaped) backslashes. A very naive implementation.
344 sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
345
346 # Re-'\' parameter expansions in output of sed_double_quote_subst that
347 # were '\'-ed in input to the same. If an odd number of '\' preceded a
348 # '$' in input to sed_double_quote_subst, that '$' was protected from
349 # expansion. Since each input '\' is now two '\'s, look for any number
350 # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
351 _G_bs='\\'
352 _G_bs2='\\\\'
353 _G_bs4='\\\\\\\\'
354 _G_dollar='\$'
355 sed_double_backslash="\
356 s/$_G_bs4/&\\
357 /g
358 s/^$_G_bs2$_G_dollar/$_G_bs&/
359 s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
360 s/\n//g"
361
362
363 ## ----------------- ##
364 ## Global variables. ##
365 ## ----------------- ##
366
367 # Except for the global variables explicitly listed below, the following
368 # functions in the '^func_' namespace, and the '^require_' namespace
369 # variables initialised in the 'Resource management' section, sourcing
370 # this file will not pollute your global namespace with anything
371 # else. There's no portable way to scope variables in Bourne shell
372 # though, so actually running these functions will sometimes place
373 # results into a variable named after the function, and often use
374 # temporary variables in the '^_G_' namespace. If you are careful to
375 # avoid using those namespaces casually in your sourcing script, things
376 # should continue to work as you expect. And, of course, you can freely
377 # overwrite any of the functions or variables defined here before
378 # calling anything to customize them.
379
380 EXIT_SUCCESS=0
381 EXIT_FAILURE=1
382 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
383 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
384
385 # Allow overriding, eg assuming that you follow the convention of
386 # putting '$debug_cmd' at the start of all your functions, you can get
387 # bash to show function call trace with:
388 #
389 # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
390 debug_cmd=${debug_cmd-":"}
391 exit_cmd=:
392
393 # By convention, finish your script with:
394 #
395 # exit $exit_status
396 #
397 # so that you can set exit_status to non-zero if you want to indicate
398 # something went wrong during execution without actually bailing out at
399 # the point of failure.
400 exit_status=$EXIT_SUCCESS
401
402 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
403 # is ksh but when the shell is invoked as "sh" and the current value of
404 # the _XPG environment variable is not equal to 1 (one), the special
405 # positional parameter $0, within a function call, is the name of the
406 # function.
407 progpath=$0
408
409 # The name of this program.
410 progname=`$ECHO "$progpath" |$SED "$sed_basename"`
411
412 # Make sure we have an absolute progpath for reexecution:
413 case $progpath in
414 [\\/]*|[A-Za-z]:\\*) ;;
415 *[\\/]*)
416 progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
417 progdir=`cd "$progdir" && pwd`
418 progpath=$progdir/$progname
419 ;;
420 *)
421 _G_IFS=$IFS
422 IFS=${PATH_SEPARATOR-:}
423 for progdir in $PATH; do
424 IFS=$_G_IFS
425 test -x "$progdir/$progname" && break
426 done
427 IFS=$_G_IFS
428 test -n "$progdir" || progdir=`pwd`
429 progpath=$progdir/$progname
430 ;;
431 esac
432
433
434 ## ----------------- ##
435 ## Standard options. ##
436 ## ----------------- ##
437
438 # The following options affect the operation of the functions defined
439 # below, and should be set appropriately depending on run-time para-
440 # meters passed on the command line.
441
442 opt_dry_run=false
443 opt_quiet=false
444 opt_verbose=false
445
446 # Categories 'all' and 'none' are always available. Append any others
447 # you will pass as the first argument to func_warning from your own
448 # code.
449 warning_categories=
450
451 # By default, display warnings according to 'opt_warning_types'. Set
452 # 'warning_func' to ':' to elide all warnings, or func_fatal_error to
453 # treat the next displayed warning as a fatal error.
454 warning_func=func_warn_and_continue
455
456 # Set to 'all' to display all warnings, 'none' to suppress all
457 # warnings, or a space delimited list of some subset of
458 # 'warning_categories' to display only the listed warnings.
459 opt_warning_types=all
460
461
462 ## -------------------- ##
463 ## Resource management. ##
464 ## -------------------- ##
465
466 # This section contains definitions for functions that each ensure a
467 # particular resource (a file, or a non-empty configuration variable for
468 # example) is available, and if appropriate to extract default values
469 # from pertinent package files. Call them using their associated
470 # 'require_*' variable to ensure that they are executed, at most, once.
471 #
472 # It's entirely deliberate that calling these functions can set
473 # variables that don't obey the namespace limitations obeyed by the rest
474 # of this file, in order that that they be as useful as possible to
475 # callers.
476
477
478 # require_term_colors
479 # -------------------
480 # Allow display of bold text on terminals that support it.
481 require_term_colors=func_require_term_colors
482 func_require_term_colors ()
483 {
484 $debug_cmd
485
486 test -t 1 && {
487 # COLORTERM and USE_ANSI_COLORS environment variables take
488 # precedence, because most terminfo databases neglect to describe
489 # whether color sequences are supported.
490 test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
491
492 if test 1 = "$USE_ANSI_COLORS"; then
493 # Standard ANSI escape sequences
494 tc_reset=''
495 tc_bold=''; tc_standout=''
496 tc_red=''; tc_green=''
497 tc_blue=''; tc_cyan=''
498 else
499 # Otherwise trust the terminfo database after all.
500 test -n "`tput sgr0 2>/dev/null`" && {
501 tc_reset=`tput sgr0`
502 test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
503 tc_standout=$tc_bold
504 test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
505 test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
506 test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
507 test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
508 test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
509 }
510 fi
511 }
512
513 require_term_colors=:
514 }
515
516
517 ## ----------------- ##
518 ## Function library. ##
519 ## ----------------- ##
520
521 # This section contains a variety of useful functions to call in your
522 # scripts. Take note of the portable wrappers for features provided by
523 # some modern shells, which will fall back to slower equivalents on
524 # less featureful shells.
525
526
527 # func_append VAR VALUE
528 # ---------------------
529 # Append VALUE onto the existing contents of VAR.
530
531 # We should try to minimise forks, especially on Windows where they are
532 # unreasonably slow, so skip the feature probes when bash or zsh are
533 # being used:
534 if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
535 : ${_G_HAVE_ARITH_OP="yes"}
536 : ${_G_HAVE_XSI_OPS="yes"}
537 # The += operator was introduced in bash 3.1
538 case $BASH_VERSION in
539 [12].* | 3.0 | 3.0*) ;;
540 *)
541 : ${_G_HAVE_PLUSEQ_OP="yes"}
542 ;;
543 esac
544 fi
545
546 # _G_HAVE_PLUSEQ_OP
547 # Can be empty, in which case the shell is probed, "yes" if += is
548 # useable or anything else if it does not work.
549 test -z "$_G_HAVE_PLUSEQ_OP" \
550 && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
551 && _G_HAVE_PLUSEQ_OP=yes
552
553 if test yes = "$_G_HAVE_PLUSEQ_OP"
554 then
555 # This is an XSI compatible shell, allowing a faster implementation...
556 eval 'func_append ()
557 {
558 $debug_cmd
559
560 eval "$1+=\$2"
561 }'
562 else
563 # ...otherwise fall back to using expr, which is often a shell builtin.
564 func_append ()
565 {
566 $debug_cmd
567
568 eval "$1=\$$1\$2"
569 }
570 fi
571
572
573 # func_append_quoted VAR VALUE
574 # ----------------------------
575 # Quote VALUE and append to the end of shell variable VAR, separated
576 # by a space.
577 if test yes = "$_G_HAVE_PLUSEQ_OP"; then
578 eval 'func_append_quoted ()
579 {
580 $debug_cmd
581
582 func_quote_for_eval "$2"
583 eval "$1+=\\ \$func_quote_for_eval_result"
584 }'
585 else
586 func_append_quoted ()
587 {
588 $debug_cmd
589
590 func_quote_for_eval "$2"
591 eval "$1=\$$1\\ \$func_quote_for_eval_result"
592 }
593 fi
594
595
596 # func_append_uniq VAR VALUE
597 # --------------------------
598 # Append unique VALUE onto the existing contents of VAR, assuming
599 # entries are delimited by the first character of VALUE. For example:
600 #
601 # func_append_uniq options " --another-option option-argument"
602 #
603 # will only append to $options if " --another-option option-argument "
604 # is not already present somewhere in $options already (note spaces at
605 # each end implied by leading space in second argument).
606 func_append_uniq ()
607 {
608 $debug_cmd
609
610 eval _G_current_value='`$ECHO $'$1'`'
611 _G_delim=`expr "$2" : '\(.\)'`
612
613 case $_G_delim$_G_current_value$_G_delim in
614 *"$2$_G_delim"*) ;;
615 *) func_append "$@" ;;
616 esac
617 }
618
619
620 # func_arith TERM...
621 # ------------------
622 # Set func_arith_result to the result of evaluating TERMs.
623 test -z "$_G_HAVE_ARITH_OP" \
624 && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
625 && _G_HAVE_ARITH_OP=yes
626
627 if test yes = "$_G_HAVE_ARITH_OP"; then
628 eval 'func_arith ()
629 {
630 $debug_cmd
631
632 func_arith_result=$(( $* ))
633 }'
634 else
635 func_arith ()
636 {
637 $debug_cmd
638
639 func_arith_result=`expr "$@"`
640 }
641 fi
642
643
644 # func_basename FILE
645 # ------------------
646 # Set func_basename_result to FILE with everything up to and including
647 # the last / stripped.
648 if test yes = "$_G_HAVE_XSI_OPS"; then
649 # If this shell supports suffix pattern removal, then use it to avoid
650 # forking. Hide the definitions single quotes in case the shell chokes
651 # on unsupported syntax...
652 _b='func_basename_result=${1##*/}'
653 _d='case $1 in
654 */*) func_dirname_result=${1%/*}$2 ;;
655 * ) func_dirname_result=$3 ;;
656 esac'
657
658 else
659 # ...otherwise fall back to using sed.
660 _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
661 _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
662 if test "X$func_dirname_result" = "X$1"; then
663 func_dirname_result=$3
664 else
665 func_append func_dirname_result "$2"
666 fi'
667 fi
668
669 eval 'func_basename ()
670 {
671 $debug_cmd
672
673 '"$_b"'
674 }'
675
676
677 # func_dirname FILE APPEND NONDIR_REPLACEMENT
678 # -------------------------------------------
679 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
680 # otherwise set result to NONDIR_REPLACEMENT.
681 eval 'func_dirname ()
682 {
683 $debug_cmd
684
685 '"$_d"'
686 }'
687
688
689 # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
690 # --------------------------------------------------------
691 # Perform func_basename and func_dirname in a single function
692 # call:
693 # dirname: Compute the dirname of FILE. If nonempty,
694 # add APPEND to the result, otherwise set result
695 # to NONDIR_REPLACEMENT.
696 # value returned in "$func_dirname_result"
697 # basename: Compute filename of FILE.
698 # value retuned in "$func_basename_result"
699 # For efficiency, we do not delegate to the functions above but instead
700 # duplicate the functionality here.
701 eval 'func_dirname_and_basename ()
702 {
703 $debug_cmd
704
705 '"$_b"'
706 '"$_d"'
707 }'
708
709
710 # func_echo ARG...
711 # ----------------
712 # Echo program name prefixed message.
713 func_echo ()
714 {
715 $debug_cmd
716
717 _G_message=$*
718
719 func_echo_IFS=$IFS
720 IFS=$nl
721 for _G_line in $_G_message; do
722 IFS=$func_echo_IFS
723 $ECHO "$progname: $_G_line"
724 done
725 IFS=$func_echo_IFS
726 }
727
728
729 # func_echo_all ARG...
730 # --------------------
731 # Invoke $ECHO with all args, space-separated.
732 func_echo_all ()
733 {
734 $ECHO "$*"
735 }
736
737
738 # func_echo_infix_1 INFIX ARG...
739 # ------------------------------
740 # Echo program name, followed by INFIX on the first line, with any
741 # additional lines not showing INFIX.
742 func_echo_infix_1 ()
743 {
744 $debug_cmd
745
746 $require_term_colors
747
748 _G_infix=$1; shift
749 _G_indent=$_G_infix
750 _G_prefix="$progname: $_G_infix: "
751 _G_message=$*
752
753 # Strip color escape sequences before counting printable length
754 for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
755 do
756 test -n "$_G_tc" && {
757 _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
758 _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
759 }
760 done
761 _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
762
763 func_echo_infix_1_IFS=$IFS
764 IFS=$nl
765 for _G_line in $_G_message; do
766 IFS=$func_echo_infix_1_IFS
767 $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
768 _G_prefix=$_G_indent
769 done
770 IFS=$func_echo_infix_1_IFS
771 }
772
773
774 # func_error ARG...
775 # -----------------
776 # Echo program name prefixed message to standard error.
777 func_error ()
778 {
779 $debug_cmd
780
781 $require_term_colors
782
783 func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
784 }
785
786
787 # func_fatal_error ARG...
788 # -----------------------
789 # Echo program name prefixed message to standard error, and exit.
790 func_fatal_error ()
791 {
792 $debug_cmd
793
794 func_error "$*"
795 exit $EXIT_FAILURE
796 }
797
798
799 # func_grep EXPRESSION FILENAME
800 # -----------------------------
801 # Check whether EXPRESSION matches any line of FILENAME, without output.
802 func_grep ()
803 {
804 $debug_cmd
805
806 $GREP "$1" "$2" >/dev/null 2>&1
807 }
808
809
810 # func_len STRING
811 # ---------------
812 # Set func_len_result to the length of STRING. STRING may not
813 # start with a hyphen.
814 test -z "$_G_HAVE_XSI_OPS" \
815 && (eval 'x=a/b/c;
816 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
817 && _G_HAVE_XSI_OPS=yes
818
819 if test yes = "$_G_HAVE_XSI_OPS"; then
820 eval 'func_len ()
821 {
822 $debug_cmd
823
824 func_len_result=${#1}
825 }'
826 else
827 func_len ()
828 {
829 $debug_cmd
830
831 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
832 }
833 fi
834
835
836 # func_mkdir_p DIRECTORY-PATH
837 # ---------------------------
838 # Make sure the entire path to DIRECTORY-PATH is available.
839 func_mkdir_p ()
840 {
841 $debug_cmd
842
843 _G_directory_path=$1
844 _G_dir_list=
845
846 if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
847
848 # Protect directory names starting with '-'
849 case $_G_directory_path in
850 -*) _G_directory_path=./$_G_directory_path ;;
851 esac
852
853 # While some portion of DIR does not yet exist...
854 while test ! -d "$_G_directory_path"; do
855 # ...make a list in topmost first order. Use a colon delimited
856 # list incase some portion of path contains whitespace.
857 _G_dir_list=$_G_directory_path:$_G_dir_list
858
859 # If the last portion added has no slash in it, the list is done
860 case $_G_directory_path in */*) ;; *) break ;; esac
861
862 # ...otherwise throw away the child directory and loop
863 _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
864 done
865 _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
866
867 func_mkdir_p_IFS=$IFS; IFS=:
868 for _G_dir in $_G_dir_list; do
869 IFS=$func_mkdir_p_IFS
870 # mkdir can fail with a 'File exist' error if two processes
871 # try to create one of the directories concurrently. Don't
872 # stop in that case!
873 $MKDIR "$_G_dir" 2>/dev/null || :
874 done
875 IFS=$func_mkdir_p_IFS
876
877 # Bail out if we (or some other process) failed to create a directory.
878 test -d "$_G_directory_path" || \
879 func_fatal_error "Failed to create '$1'"
880 fi
881 }
882
883
884 # func_mktempdir [BASENAME]
885 # -------------------------
886 # Make a temporary directory that won't clash with other running
887 # libtool processes, and avoids race conditions if possible. If
888 # given, BASENAME is the basename for that directory.
889 func_mktempdir ()
890 {
891 $debug_cmd
892
893 _G_template=${TMPDIR-/tmp}/${1-$progname}
894
895 if test : = "$opt_dry_run"; then
896 # Return a directory name, but don't create it in dry-run mode
897 _G_tmpdir=$_G_template-$$
898 else
899
900 # If mktemp works, use that first and foremost
901 _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
902
903 if test ! -d "$_G_tmpdir"; then
904 # Failing that, at least try and use $RANDOM to avoid a race
905 _G_tmpdir=$_G_template-${RANDOM-0}$$
906
907 func_mktempdir_umask=`umask`
908 umask 0077
909 $MKDIR "$_G_tmpdir"
910 umask $func_mktempdir_umask
911 fi
912
913 # If we're not in dry-run mode, bomb out on failure
914 test -d "$_G_tmpdir" || \
915 func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
916 fi
917
918 $ECHO "$_G_tmpdir"
919 }
920
921
922 # func_normal_abspath PATH
923 # ------------------------
924 # Remove doubled-up and trailing slashes, "." path components,
925 # and cancel out any ".." path components in PATH after making
926 # it an absolute path.
927 func_normal_abspath ()
928 {
929 $debug_cmd
930
931 # These SED scripts presuppose an absolute path with a trailing slash.
932 _G_pathcar='s|^/\([^/]*\).*$|\1|'
933 _G_pathcdr='s|^/[^/]*||'
934 _G_removedotparts=':dotsl
935 s|/\./|/|g
936 t dotsl
937 s|/\.$|/|'
938 _G_collapseslashes='s|/\{1,\}|/|g'
939 _G_finalslash='s|/*$|/|'
940
941 # Start from root dir and reassemble the path.
942 func_normal_abspath_result=
943 func_normal_abspath_tpath=$1
944 func_normal_abspath_altnamespace=
945 case $func_normal_abspath_tpath in
946 "")
947 # Empty path, that just means $cwd.
948 func_stripname '' '/' "`pwd`"
949 func_normal_abspath_result=$func_stripname_result
950 return
951 ;;
952 # The next three entries are used to spot a run of precisely
953 # two leading slashes without using negated character classes;
954 # we take advantage of case's first-match behaviour.
955 ///*)
956 # Unusual form of absolute path, do nothing.
957 ;;
958 //*)
959 # Not necessarily an ordinary path; POSIX reserves leading '//'
960 # and for example Cygwin uses it to access remote file shares
961 # over CIFS/SMB, so we conserve a leading double slash if found.
962 func_normal_abspath_altnamespace=/
963 ;;
964 /*)
965 # Absolute path, do nothing.
966 ;;
967 *)
968 # Relative path, prepend $cwd.
969 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
970 ;;
971 esac
972
973 # Cancel out all the simple stuff to save iterations. We also want
974 # the path to end with a slash for ease of parsing, so make sure
975 # there is one (and only one) here.
976 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
977 -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
978 while :; do
979 # Processed it all yet?
980 if test / = "$func_normal_abspath_tpath"; then
981 # If we ascended to the root using ".." the result may be empty now.
982 if test -z "$func_normal_abspath_result"; then
983 func_normal_abspath_result=/
984 fi
985 break
986 fi
987 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
988 -e "$_G_pathcar"`
989 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
990 -e "$_G_pathcdr"`
991 # Figure out what to do with it
992 case $func_normal_abspath_tcomponent in
993 "")
994 # Trailing empty path component, ignore it.
995 ;;
996 ..)
997 # Parent dir; strip last assembled component from result.
998 func_dirname "$func_normal_abspath_result"
999 func_normal_abspath_result=$func_dirname_result
1000 ;;
1001 *)
1002 # Actual path component, append it.
1003 func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
1004 ;;
1005 esac
1006 done
1007 # Restore leading double-slash if one was found on entry.
1008 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
1009 }
1010
1011
1012 # func_notquiet ARG...
1013 # --------------------
1014 # Echo program name prefixed message only when not in quiet mode.
1015 func_notquiet ()
1016 {
1017 $debug_cmd
1018
1019 $opt_quiet || func_echo ${1+"$@"}
1020
1021 # A bug in bash halts the script if the last line of a function
1022 # fails when set -e is in force, so we need another command to
1023 # work around that:
1024 :
1025 }
1026
1027
1028 # func_relative_path SRCDIR DSTDIR
1029 # --------------------------------
1030 # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
1031 func_relative_path ()
1032 {
1033 $debug_cmd
1034
1035 func_relative_path_result=
1036 func_normal_abspath "$1"
1037 func_relative_path_tlibdir=$func_normal_abspath_result
1038 func_normal_abspath "$2"
1039 func_relative_path_tbindir=$func_normal_abspath_result
1040
1041 # Ascend the tree starting from libdir
1042 while :; do
1043 # check if we have found a prefix of bindir
1044 case $func_relative_path_tbindir in
1045 $func_relative_path_tlibdir)
1046 # found an exact match
1047 func_relative_path_tcancelled=
1048 break
1049 ;;
1050 $func_relative_path_tlibdir*)
1051 # found a matching prefix
1052 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
1053 func_relative_path_tcancelled=$func_stripname_result
1054 if test -z "$func_relative_path_result"; then
1055 func_relative_path_result=.
1056 fi
1057 break
1058 ;;
1059 *)
1060 func_dirname $func_relative_path_tlibdir
1061 func_relative_path_tlibdir=$func_dirname_result
1062 if test -z "$func_relative_path_tlibdir"; then
1063 # Have to descend all the way to the root!
1064 func_relative_path_result=../$func_relative_path_result
1065 func_relative_path_tcancelled=$func_relative_path_tbindir
1066 break
1067 fi
1068 func_relative_path_result=../$func_relative_path_result
1069 ;;
1070 esac
1071 done
1072
1073 # Now calculate path; take care to avoid doubling-up slashes.
1074 func_stripname '' '/' "$func_relative_path_result"
1075 func_relative_path_result=$func_stripname_result
1076 func_stripname '/' '/' "$func_relative_path_tcancelled"
1077 if test -n "$func_stripname_result"; then
1078 func_append func_relative_path_result "/$func_stripname_result"
1079 fi
1080
1081 # Normalisation. If bindir is libdir, return '.' else relative path.
1082 if test -n "$func_relative_path_result"; then
1083 func_stripname './' '' "$func_relative_path_result"
1084 func_relative_path_result=$func_stripname_result
1085 fi
1086
1087 test -n "$func_relative_path_result" || func_relative_path_result=.
1088
1089 :
1090 }
1091
1092
1093 # func_quote_for_eval ARG...
1094 # --------------------------
1095 # Aesthetically quote ARGs to be evaled later.
1096 # This function returns two values:
1097 # i) func_quote_for_eval_result
1098 # double-quoted, suitable for a subsequent eval
1099 # ii) func_quote_for_eval_unquoted_result
1100 # has all characters that are still active within double
1101 # quotes backslashified.
1102 func_quote_for_eval ()
1103 {
1104 $debug_cmd
1105
1106 func_quote_for_eval_unquoted_result=
1107 func_quote_for_eval_result=
1108 while test 0 -lt $#; do
1109 case $1 in
1110 *[\\\`\"\$]*)
1111 _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
1112 *)
1113 _G_unquoted_arg=$1 ;;
1114 esac
1115 if test -n "$func_quote_for_eval_unquoted_result"; then
1116 func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
1117 else
1118 func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
1119 fi
1120
1121 case $_G_unquoted_arg in
1122 # Double-quote args containing shell metacharacters to delay
1123 # word splitting, command substitution and variable expansion
1124 # for a subsequent eval.
1125 # Many Bourne shells cannot handle close brackets correctly
1126 # in scan sets, so we specify it separately.
1127 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1128 _G_quoted_arg=\"$_G_unquoted_arg\"
1129 ;;
1130 *)
1131 _G_quoted_arg=$_G_unquoted_arg
1132 ;;
1133 esac
1134
1135 if test -n "$func_quote_for_eval_result"; then
1136 func_append func_quote_for_eval_result " $_G_quoted_arg"
1137 else
1138 func_append func_quote_for_eval_result "$_G_quoted_arg"
1139 fi
1140 shift
1141 done
1142 }
1143
1144
1145 # func_quote_for_expand ARG
1146 # -------------------------
1147 # Aesthetically quote ARG to be evaled later; same as above,
1148 # but do not quote variable references.
1149 func_quote_for_expand ()
1150 {
1151 $debug_cmd
1152
1153 case $1 in
1154 *[\\\`\"]*)
1155 _G_arg=`$ECHO "$1" | $SED \
1156 -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
1157 *)
1158 _G_arg=$1 ;;
1159 esac
1160
1161 case $_G_arg in
1162 # Double-quote args containing shell metacharacters to delay
1163 # word splitting and command substitution for a subsequent eval.
1164 # Many Bourne shells cannot handle close brackets correctly
1165 # in scan sets, so we specify it separately.
1166 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1167 _G_arg=\"$_G_arg\"
1168 ;;
1169 esac
1170
1171 func_quote_for_expand_result=$_G_arg
1172 }
1173
1174
1175 # func_stripname PREFIX SUFFIX NAME
1176 # ---------------------------------
1177 # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
1178 # PREFIX and SUFFIX must not contain globbing or regex special
1179 # characters, hashes, percent signs, but SUFFIX may contain a leading
1180 # dot (in which case that matches only a dot).
1181 if test yes = "$_G_HAVE_XSI_OPS"; then
1182 eval 'func_stripname ()
1183 {
1184 $debug_cmd
1185
1186 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1187 # positional parameters, so assign one to ordinary variable first.
1188 func_stripname_result=$3
1189 func_stripname_result=${func_stripname_result#"$1"}
1190 func_stripname_result=${func_stripname_result%"$2"}
1191 }'
1192 else
1193 func_stripname ()
1194 {
1195 $debug_cmd
1196
1197 case $2 in
1198 .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
1199 *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
1200 esac
1201 }
1202 fi
1203
1204
1205 # func_show_eval CMD [FAIL_EXP]
1206 # -----------------------------
1207 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1208 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1209 # is given, then evaluate it.
1210 func_show_eval ()
1211 {
1212 $debug_cmd
1213
1214 _G_cmd=$1
1215 _G_fail_exp=${2-':'}
1216
1217 func_quote_for_expand "$_G_cmd"
1218 eval "func_notquiet $func_quote_for_expand_result"
1219
1220 $opt_dry_run || {
1221 eval "$_G_cmd"
1222 _G_status=$?
1223 if test 0 -ne "$_G_status"; then
1224 eval "(exit $_G_status); $_G_fail_exp"
1225 fi
1226 }
1227 }
1228
1229
1230 # func_show_eval_locale CMD [FAIL_EXP]
1231 # ------------------------------------
1232 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1233 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1234 # is given, then evaluate it. Use the saved locale for evaluation.
1235 func_show_eval_locale ()
1236 {
1237 $debug_cmd
1238
1239 _G_cmd=$1
1240 _G_fail_exp=${2-':'}
1241
1242 $opt_quiet || {
1243 func_quote_for_expand "$_G_cmd"
1244 eval "func_echo $func_quote_for_expand_result"
1245 }
1246
1247 $opt_dry_run || {
1248 eval "$_G_user_locale
1249 $_G_cmd"
1250 _G_status=$?
1251 eval "$_G_safe_locale"
1252 if test 0 -ne "$_G_status"; then
1253 eval "(exit $_G_status); $_G_fail_exp"
1254 fi
1255 }
1256 }
1257
1258
1259 # func_tr_sh
1260 # ----------
1261 # Turn $1 into a string suitable for a shell variable name.
1262 # Result is stored in $func_tr_sh_result. All characters
1263 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
1264 # if $1 begins with a digit, a '_' is prepended as well.
1265 func_tr_sh ()
1266 {
1267 $debug_cmd
1268
1269 case $1 in
1270 [0-9]* | *[!a-zA-Z0-9_]*)
1271 func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
1272 ;;
1273 * )
1274 func_tr_sh_result=$1
1275 ;;
1276 esac
1277 }
1278
1279
1280 # func_verbose ARG...
1281 # -------------------
1282 # Echo program name prefixed message in verbose mode only.
1283 func_verbose ()
1284 {
1285 $debug_cmd
1286
1287 $opt_verbose && func_echo "$*"
1288
1289 :
1290 }
1291
1292
1293 # func_warn_and_continue ARG...
1294 # -----------------------------
1295 # Echo program name prefixed warning message to standard error.
1296 func_warn_and_continue ()
1297 {
1298 $debug_cmd
1299
1300 $require_term_colors
1301
1302 func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
1303 }
1304
1305
1306 # func_warning CATEGORY ARG...
1307 # ----------------------------
1308 # Echo program name prefixed warning message to standard error. Warning
1309 # messages can be filtered according to CATEGORY, where this function
1310 # elides messages where CATEGORY is not listed in the global variable
1311 # 'opt_warning_types'.
1312 func_warning ()
1313 {
1314 $debug_cmd
1315
1316 # CATEGORY must be in the warning_categories list!
1317 case " $warning_categories " in
1318 *" $1 "*) ;;
1319 *) func_internal_error "invalid warning category '$1'" ;;
1320 esac
1321
1322 _G_category=$1
1323 shift
1324
1325 case " $opt_warning_types " in
1326 *" $_G_category "*) $warning_func ${1+"$@"} ;;
1327 esac
1328 }
1329
1330
1331 # func_sort_ver VER1 VER2
1332 # -----------------------
1333 # 'sort -V' is not generally available.
1334 # Note this deviates from the version comparison in automake
1335 # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
1336 # but this should suffice as we won't be specifying old
1337 # version formats or redundant trailing .0 in bootstrap.conf.
1338 # If we did want full compatibility then we should probably
1339 # use m4_version_compare from autoconf.
1340 func_sort_ver ()
1341 {
1342 $debug_cmd
1343
1344 printf '%s\n%s\n' "$1" "$2" \
1345 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
1346 }
1347
1348 # func_lt_ver PREV CURR
1349 # ---------------------
1350 # Return true if PREV and CURR are in the correct order according to
1351 # func_sort_ver, otherwise false. Use it like this:
1352 #
1353 # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
1354 func_lt_ver ()
1355 {
1356 $debug_cmd
1357
1358 test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
1359 }
1360
1361
1362 # Local variables:
1363 # mode: shell-script
1364 # sh-indentation: 2
1365 # eval: (add-hook 'before-save-hook 'time-stamp)
1366 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1367 # time-stamp-time-zone: "UTC"
1368 # End:
1369 #! /bin/sh
1370
1371 # Set a version string for this script.
1372 scriptversion=2014-01-07.03; # UTC
1373
1374 # A portable, pluggable option parser for Bourne shell.
1375 # Written by Gary V. Vaughan, 2010
1376
1377 # Copyright (C) 2010-2015 Free Software Foundation, Inc.
1378 # This is free software; see the source for copying conditions. There is NO
1379 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1380
1381 # This program is free software: you can redistribute it and/or modify
1382 # it under the terms of the GNU General Public License as published by
1383 # the Free Software Foundation, either version 3 of the License, or
1384 # (at your option) any later version.
1385
1386 # This program is distributed in the hope that it will be useful,
1387 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1388 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1389 # GNU General Public License for more details.
1390
1391 # You should have received a copy of the GNU General Public License
1392 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1393
1394 # Please report bugs or propose patches to gary@gnu.org.
1395
1396
1397 ## ------ ##
1398 ## Usage. ##
1399 ## ------ ##
1400
1401 # This file is a library for parsing options in your shell scripts along
1402 # with assorted other useful supporting features that you can make use
1403 # of too.
1404 #
1405 # For the simplest scripts you might need only:
1406 #
1407 # #!/bin/sh
1408 # . relative/path/to/funclib.sh
1409 # . relative/path/to/options-parser
1410 # scriptversion=1.0
1411 # func_options ${1+"$@"}
1412 # eval set dummy "$func_options_result"; shift
1413 # ...rest of your script...
1414 #
1415 # In order for the '--version' option to work, you will need to have a
1416 # suitably formatted comment like the one at the top of this file
1417 # starting with '# Written by ' and ending with '# warranty; '.
1418 #
1419 # For '-h' and '--help' to work, you will also need a one line
1420 # description of your script's purpose in a comment directly above the
1421 # '# Written by ' line, like the one at the top of this file.
1422 #
1423 # The default options also support '--debug', which will turn on shell
1424 # execution tracing (see the comment above debug_cmd below for another
1425 # use), and '--verbose' and the func_verbose function to allow your script
1426 # to display verbose messages only when your user has specified
1427 # '--verbose'.
1428 #
1429 # After sourcing this file, you can plug processing for additional
1430 # options by amending the variables from the 'Configuration' section
1431 # below, and following the instructions in the 'Option parsing'
1432 # section further down.
1433
1434 ## -------------- ##
1435 ## Configuration. ##
1436 ## -------------- ##
1437
1438 # You should override these variables in your script after sourcing this
1439 # file so that they reflect the customisations you have added to the
1440 # option parser.
1441
1442 # The usage line for option parsing errors and the start of '-h' and
1443 # '--help' output messages. You can embed shell variables for delayed
1444 # expansion at the time the message is displayed, but you will need to
1445 # quote other shell meta-characters carefully to prevent them being
1446 # expanded when the contents are evaled.
1447 usage='$progpath [OPTION]...'
1448
1449 # Short help message in response to '-h' and '--help'. Add to this or
1450 # override it after sourcing this library to reflect the full set of
1451 # options your script accepts.
1452 usage_message="\
1453 --debug enable verbose shell tracing
1454 -W, --warnings=CATEGORY
1455 report the warnings falling in CATEGORY [all]
1456 -v, --verbose verbosely report processing
1457 --version print version information and exit
1458 -h, --help print short or long help message and exit
1459 "
1460
1461 # Additional text appended to 'usage_message' in response to '--help'.
1462 long_help_message="
1463 Warning categories include:
1464 'all' show all warnings
1465 'none' turn off all the warnings
1466 'error' warnings are treated as fatal errors"
1467
1468 # Help message printed before fatal option parsing errors.
1469 fatal_help="Try '\$progname --help' for more information."
1470
1471
1472
1473 ## ------------------------- ##
1474 ## Hook function management. ##
1475 ## ------------------------- ##
1476
1477 # This section contains functions for adding, removing, and running hooks
1478 # to the main code. A hook is just a named list of of function, that can
1479 # be run in order later on.
1480
1481 # func_hookable FUNC_NAME
1482 # -----------------------
1483 # Declare that FUNC_NAME will run hooks added with
1484 # 'func_add_hook FUNC_NAME ...'.
1485 func_hookable ()
1486 {
1487 $debug_cmd
1488
1489 func_append hookable_fns " $1"
1490 }
1491
1492
1493 # func_add_hook FUNC_NAME HOOK_FUNC
1494 # ---------------------------------
1495 # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
1496 # first have been declared "hookable" by a call to 'func_hookable'.
1497 func_add_hook ()
1498 {
1499 $debug_cmd
1500
1501 case " $hookable_fns " in
1502 *" $1 "*) ;;
1503 *) func_fatal_error "'$1' does not accept hook functions." ;;
1504 esac
1505
1506 eval func_append ${1}_hooks '" $2"'
1507 }
1508
1509
1510 # func_remove_hook FUNC_NAME HOOK_FUNC
1511 # ------------------------------------
1512 # Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
1513 func_remove_hook ()
1514 {
1515 $debug_cmd
1516
1517 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
1518 }
1519
1520
1521 # func_run_hooks FUNC_NAME [ARG]...
1522 # ---------------------------------
1523 # Run all hook functions registered to FUNC_NAME.
1524 # It is assumed that the list of hook functions contains nothing more
1525 # than a whitespace-delimited list of legal shell function names, and
1526 # no effort is wasted trying to catch shell meta-characters or preserve
1527 # whitespace.
1528 func_run_hooks ()
1529 {
1530 $debug_cmd
1531
1532 case " $hookable_fns " in
1533 *" $1 "*) ;;
1534 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
1535 esac
1536
1537 eval _G_hook_fns=\$$1_hooks; shift
1538
1539 for _G_hook in $_G_hook_fns; do
1540 eval $_G_hook '"$@"'
1541
1542 # store returned options list back into positional
1543 # parameters for next 'cmd' execution.
1544 eval _G_hook_result=\$${_G_hook}_result
1545 eval set dummy "$_G_hook_result"; shift
1546 done
1547
1548 func_quote_for_eval ${1+"$@"}
1549 func_run_hooks_result=$func_quote_for_eval_result
1550 }
1551
1552
1553
1554 ## --------------- ##
1555 ## Option parsing. ##
1556 ## --------------- ##
1557
1558 # In order to add your own option parsing hooks, you must accept the
1559 # full positional parameter list in your hook function, remove any
1560 # options that you action, and then pass back the remaining unprocessed
1561 # options in '<hooked_function_name>_result', escaped suitably for
1562 # 'eval'. Like this:
1563 #
1564 # my_options_prep ()
1565 # {
1566 # $debug_cmd
1567 #
1568 # # Extend the existing usage message.
1569 # usage_message=$usage_message'
1570 # -s, --silent don'\''t print informational messages
1571 # '
1572 #
1573 # func_quote_for_eval ${1+"$@"}
1574 # my_options_prep_result=$func_quote_for_eval_result
1575 # }
1576 # func_add_hook func_options_prep my_options_prep
1577 #
1578 #
1579 # my_silent_option ()
1580 # {
1581 # $debug_cmd
1582 #
1583 # # Note that for efficiency, we parse as many options as we can
1584 # # recognise in a loop before passing the remainder back to the
1585 # # caller on the first unrecognised argument we encounter.
1586 # while test $# -gt 0; do
1587 # opt=$1; shift
1588 # case $opt in
1589 # --silent|-s) opt_silent=: ;;
1590 # # Separate non-argument short options:
1591 # -s*) func_split_short_opt "$_G_opt"
1592 # set dummy "$func_split_short_opt_name" \
1593 # "-$func_split_short_opt_arg" ${1+"$@"}
1594 # shift
1595 # ;;
1596 # *) set dummy "$_G_opt" "$*"; shift; break ;;
1597 # esac
1598 # done
1599 #
1600 # func_quote_for_eval ${1+"$@"}
1601 # my_silent_option_result=$func_quote_for_eval_result
1602 # }
1603 # func_add_hook func_parse_options my_silent_option
1604 #
1605 #
1606 # my_option_validation ()
1607 # {
1608 # $debug_cmd
1609 #
1610 # $opt_silent && $opt_verbose && func_fatal_help "\
1611 # '--silent' and '--verbose' options are mutually exclusive."
1612 #
1613 # func_quote_for_eval ${1+"$@"}
1614 # my_option_validation_result=$func_quote_for_eval_result
1615 # }
1616 # func_add_hook func_validate_options my_option_validation
1617 #
1618 # You'll alse need to manually amend $usage_message to reflect the extra
1619 # options you parse. It's preferable to append if you can, so that
1620 # multiple option parsing hooks can be added safely.
1621
1622
1623 # func_options [ARG]...
1624 # ---------------------
1625 # All the functions called inside func_options are hookable. See the
1626 # individual implementations for details.
1627 func_hookable func_options
1628 func_options ()
1629 {
1630 $debug_cmd
1631
1632 func_options_prep ${1+"$@"}
1633 eval func_parse_options \
1634 ${func_options_prep_result+"$func_options_prep_result"}
1635 eval func_validate_options \
1636 ${func_parse_options_result+"$func_parse_options_result"}
1637
1638 eval func_run_hooks func_options \
1639 ${func_validate_options_result+"$func_validate_options_result"}
1640
1641 # save modified positional parameters for caller
1642 func_options_result=$func_run_hooks_result
1643 }
1644
1645
1646 # func_options_prep [ARG]...
1647 # --------------------------
1648 # All initialisations required before starting the option parse loop.
1649 # Note that when calling hook functions, we pass through the list of
1650 # positional parameters. If a hook function modifies that list, and
1651 # needs to propogate that back to rest of this script, then the complete
1652 # modified list must be put in 'func_run_hooks_result' before
1653 # returning.
1654 func_hookable func_options_prep
1655 func_options_prep ()
1656 {
1657 $debug_cmd
1658
1659 # Option defaults:
1660 opt_verbose=false
1661 opt_warning_types=
1662
1663 func_run_hooks func_options_prep ${1+"$@"}
1664
1665 # save modified positional parameters for caller
1666 func_options_prep_result=$func_run_hooks_result
1667 }
1668
1669
1670 # func_parse_options [ARG]...
1671 # ---------------------------
1672 # The main option parsing loop.
1673 func_hookable func_parse_options
1674 func_parse_options ()
1675 {
1676 $debug_cmd
1677
1678 func_parse_options_result=
1679
1680 # this just eases exit handling
1681 while test $# -gt 0; do
1682 # Defer to hook functions for initial option parsing, so they
1683 # get priority in the event of reusing an option name.
1684 func_run_hooks func_parse_options ${1+"$@"}
1685
1686 # Adjust func_parse_options positional parameters to match
1687 eval set dummy "$func_run_hooks_result"; shift
1688
1689 # Break out of the loop if we already parsed every option.
1690 test $# -gt 0 || break
1691
1692 _G_opt=$1
1693 shift
1694 case $_G_opt in
1695 --debug|-x) debug_cmd='set -x'
1696 func_echo "enabling shell trace mode"
1697 $debug_cmd
1698 ;;
1699
1700 --no-warnings|--no-warning|--no-warn)
1701 set dummy --warnings none ${1+"$@"}
1702 shift
1703 ;;
1704
1705 --warnings|--warning|-W)
1706 test $# = 0 && func_missing_arg $_G_opt && break
1707 case " $warning_categories $1" in
1708 *" $1 "*)
1709 # trailing space prevents matching last $1 above
1710 func_append_uniq opt_warning_types " $1"
1711 ;;
1712 *all)
1713 opt_warning_types=$warning_categories
1714 ;;
1715 *none)
1716 opt_warning_types=none
1717 warning_func=:
1718 ;;
1719 *error)
1720 opt_warning_types=$warning_categories
1721 warning_func=func_fatal_error
1722 ;;
1723 *)
1724 func_fatal_error \
1725 "unsupported warning category: '$1'"
1726 ;;
1727 esac
1728 shift
1729 ;;
1730
1731 --verbose|-v) opt_verbose=: ;;
1732 --version) func_version ;;
1733 -\?|-h) func_usage ;;
1734 --help) func_help ;;
1735
1736 # Separate optargs to long options (plugins may need this):
1737 --*=*) func_split_equals "$_G_opt"
1738 set dummy "$func_split_equals_lhs" \
1739 "$func_split_equals_rhs" ${1+"$@"}
1740 shift
1741 ;;
1742
1743 # Separate optargs to short options:
1744 -W*)
1745 func_split_short_opt "$_G_opt"
1746 set dummy "$func_split_short_opt_name" \
1747 "$func_split_short_opt_arg" ${1+"$@"}
1748 shift
1749 ;;
1750
1751 # Separate non-argument short options:
1752 -\?*|-h*|-v*|-x*)
1753 func_split_short_opt "$_G_opt"
1754 set dummy "$func_split_short_opt_name" \
1755 "-$func_split_short_opt_arg" ${1+"$@"}
1756 shift
1757 ;;
1758
1759 --) break ;;
1760 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1761 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1762 esac
1763 done
1764
1765 # save modified positional parameters for caller
1766 func_quote_for_eval ${1+"$@"}
1767 func_parse_options_result=$func_quote_for_eval_result
1768 }
1769
1770
1771 # func_validate_options [ARG]...
1772 # ------------------------------
1773 # Perform any sanity checks on option settings and/or unconsumed
1774 # arguments.
1775 func_hookable func_validate_options
1776 func_validate_options ()
1777 {
1778 $debug_cmd
1779
1780 # Display all warnings if -W was not given.
1781 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
1782
1783 func_run_hooks func_validate_options ${1+"$@"}
1784
1785 # Bail if the options were screwed!
1786 $exit_cmd $EXIT_FAILURE
1787
1788 # save modified positional parameters for caller
1789 func_validate_options_result=$func_run_hooks_result
1790 }
1791
1792
1793
1794 ## ----------------- ##
1795 ## Helper functions. ##
1796 ## ----------------- ##
1797
1798 # This section contains the helper functions used by the rest of the
1799 # hookable option parser framework in ascii-betical order.
1800
1801
1802 # func_fatal_help ARG...
1803 # ----------------------
1804 # Echo program name prefixed message to standard error, followed by
1805 # a help hint, and exit.
1806 func_fatal_help ()
1807 {
1808 $debug_cmd
1809
1810 eval \$ECHO \""Usage: $usage"\"
1811 eval \$ECHO \""$fatal_help"\"
1812 func_error ${1+"$@"}
1813 exit $EXIT_FAILURE
1814 }
1815
1816
1817 # func_help
1818 # ---------
1819 # Echo long help message to standard output and exit.
1820 func_help ()
1821 {
1822 $debug_cmd
1823
1824 func_usage_message
1825 $ECHO "$long_help_message"
1826 exit 0
1827 }
1828
1829
1830 # func_missing_arg ARGNAME
1831 # ------------------------
1832 # Echo program name prefixed message to standard error and set global
1833 # exit_cmd.
1834 func_missing_arg ()
1835 {
1836 $debug_cmd
1837
1838 func_error "Missing argument for '$1'."
1839 exit_cmd=exit
1840 }
1841
1842
1843 # func_split_equals STRING
1844 # ------------------------
1845 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1846 # splitting STRING at the '=' sign.
1847 test -z "$_G_HAVE_XSI_OPS" \
1848 && (eval 'x=a/b/c;
1849 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
1850 && _G_HAVE_XSI_OPS=yes
1851
1852 if test yes = "$_G_HAVE_XSI_OPS"
1853 then
1854 # This is an XSI compatible shell, allowing a faster implementation...
1855 eval 'func_split_equals ()
1856 {
1857 $debug_cmd
1858
1859 func_split_equals_lhs=${1%%=*}
1860 func_split_equals_rhs=${1#*=}
1861 test "x$func_split_equals_lhs" = "x$1" \
1862 && func_split_equals_rhs=
1863 }'
1864 else
1865 # ...otherwise fall back to using expr, which is often a shell builtin.
1866 func_split_equals ()
1867 {
1868 $debug_cmd
1869
1870 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
1871 func_split_equals_rhs=
1872 test "x$func_split_equals_lhs" = "x$1" \
1873 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
1874 }
1875 fi #func_split_equals
1876
1877
1878 # func_split_short_opt SHORTOPT
1879 # -----------------------------
1880 # Set func_split_short_opt_name and func_split_short_opt_arg shell
1881 # variables after splitting SHORTOPT after the 2nd character.
1882 if test yes = "$_G_HAVE_XSI_OPS"
1883 then
1884 # This is an XSI compatible shell, allowing a faster implementation...
1885 eval 'func_split_short_opt ()
1886 {
1887 $debug_cmd
1888
1889 func_split_short_opt_arg=${1#??}
1890 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
1891 }'
1892 else
1893 # ...otherwise fall back to using expr, which is often a shell builtin.
1894 func_split_short_opt ()
1895 {
1896 $debug_cmd
1897
1898 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
1899 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
1900 }
1901 fi #func_split_short_opt
1902
1903
1904 # func_usage
1905 # ----------
1906 # Echo short help message to standard output and exit.
1907 func_usage ()
1908 {
1909 $debug_cmd
1910
1911 func_usage_message
1912 $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
1913 exit 0
1914 }
1915
1916
1917 # func_usage_message
1918 # ------------------
1919 # Echo short help message to standard output.
1920 func_usage_message ()
1921 {
1922 $debug_cmd
1923
1924 eval \$ECHO \""Usage: $usage"\"
1925 echo
1926 $SED -n 's|^# ||
1927 /^Written by/{
1928 x;p;x
1929 }
1930 h
1931 /^Written by/q' < "$progpath"
1932 echo
1933 eval \$ECHO \""$usage_message"\"
1934 }
1935
1936
1937 # func_version
1938 # ------------
1939 # Echo version message to standard output and exit.
1940 func_version ()
1941 {
1942 $debug_cmd
1943
1944 printf '%s\n' "$progname $scriptversion"
1945 $SED -n '
1946 /(C)/!b go
1947 :more
1948 /\./!{
1949 N
1950 s|\n# | |
1951 b more
1952 }
1953 :go
1954 /^# Written by /,/# warranty; / {
1955 s|^# ||
1956 s|^# *$||
1957 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
1958 p
1959 }
1960 /^# Written by / {
1961 s|^# ||
1962 p
1963 }
1964 /^warranty; /q' < "$progpath"
1965
1966 exit $?
1967 }
1968
1969
1970 # Local variables:
1971 # mode: shell-script
1972 # sh-indentation: 2
1973 # eval: (add-hook 'before-save-hook 'time-stamp)
1974 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1975 # time-stamp-time-zone: "UTC"
1976 # End:
1977
1978 # Set a version string.
1979 scriptversion='(GNU libtool) 2.4.6'
1980
1981
1982 # func_echo ARG...
1983 # ----------------
1984 # Libtool also displays the current mode in messages, so override
1985 # funclib.sh func_echo with this custom definition.
1986 func_echo ()
1987 {
1988 $debug_cmd
1989
1990 _G_message=$*
1991
1992 func_echo_IFS=$IFS
1993 IFS=$nl
1994 for _G_line in $_G_message; do
1995 IFS=$func_echo_IFS
1996 $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
1997 done
1998 IFS=$func_echo_IFS
1999 }
2000
2001
2002 # func_warning ARG...
2003 # -------------------
2004 # Libtool warnings are not categorized, so override funclib.sh
2005 # func_warning with this simpler definition.
2006 func_warning ()
2007 {
2008 $debug_cmd
2009
2010 $warning_func ${1+"$@"}
2011 }
2012
2013
2014 ## ---------------- ##
2015 ## Options parsing. ##
2016 ## ---------------- ##
2017
2018 # Hook in the functions to make sure our own options are parsed during
2019 # the option parsing loop.
2020
2021 usage='$progpath [OPTION]... [MODE-ARG]...'
2022
2023 # Short help message in response to '-h'.
2024 usage_message="Options:
2025 --config show all configuration variables
2026 --debug enable verbose shell tracing
2027 -n, --dry-run display commands without modifying any files
2028 --features display basic configuration information and exit
2029 --mode=MODE use operation mode MODE
2030 --no-warnings equivalent to '-Wnone'
2031 --preserve-dup-deps don't remove duplicate dependency libraries
2032 --quiet, --silent don't print informational messages
2033 --tag=TAG use configuration variables from tag TAG
2034 -v, --verbose print more informational messages than default
2035 --version print version information
2036 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
2037 -h, --help, --help-all print short, long, or detailed help message
2038 "
2039
2040 # Additional text appended to 'usage_message' in response to '--help'.
2041 func_help ()
2042 {
2043 $debug_cmd
2044
2045 func_usage_message
2046 $ECHO "$long_help_message
2047
2048 MODE must be one of the following:
2049
2050 clean remove files from the build directory
2051 compile compile a source file into a libtool object
2052 execute automatically set library path, then run a program
2053 finish complete the installation of libtool libraries
2054 install install libraries or executables
2055 link create a library or an executable
2056 uninstall remove libraries from an installed directory
2057
2058 MODE-ARGS vary depending on the MODE. When passed as first option,
2059 '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
2060 Try '$progname --help --mode=MODE' for a more detailed description of MODE.
2061
2062 When reporting a bug, please describe a test case to reproduce it and
2063 include the following information:
2064
2065 host-triplet: $host
2066 shell: $SHELL
2067 compiler: $LTCC
2068 compiler flags: $LTCFLAGS
2069 linker: $LD (gnu? $with_gnu_ld)
2070 version: $progname $scriptversion Debian-2.4.6-2
2071 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
2072 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
2073
2074 Report bugs to <bug-libtool@gnu.org>.
2075 GNU libtool home page: <http://www.gnu.org/s/libtool/>.
2076 General help using GNU software: <http://www.gnu.org/gethelp/>."
2077 exit 0
2078 }
2079
2080
2081 # func_lo2o OBJECT-NAME
2082 # ---------------------
2083 # Transform OBJECT-NAME from a '.lo' suffix to the platform specific
2084 # object suffix.
2085
2086 lo2o=s/\\.lo\$/.$objext/
2087 o2lo=s/\\.$objext\$/.lo/
2088
2089 if test yes = "$_G_HAVE_XSI_OPS"; then
2090 eval 'func_lo2o ()
2091 {
2092 case $1 in
2093 *.lo) func_lo2o_result=${1%.lo}.$objext ;;
2094 * ) func_lo2o_result=$1 ;;
2095 esac
2096 }'
2097
2098 # func_xform LIBOBJ-OR-SOURCE
2099 # ---------------------------
2100 # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
2101 # suffix to a '.lo' libtool-object suffix.
2102 eval 'func_xform ()
2103 {
2104 func_xform_result=${1%.*}.lo
2105 }'
2106 else
2107 # ...otherwise fall back to using sed.
2108 func_lo2o ()
2109 {
2110 func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
2111 }
2112
2113 func_xform ()
2114 {
2115 func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
2116 }
2117 fi
2118
2119
2120 # func_fatal_configuration ARG...
2121 # -------------------------------
2122 # Echo program name prefixed message to standard error, followed by
2123 # a configuration failure hint, and exit.
2124 func_fatal_configuration ()
2125 {
2126 func__fatal_error ${1+"$@"} \
2127 "See the $PACKAGE documentation for more information." \
2128 "Fatal configuration error."
2129 }
2130
2131
2132 # func_config
2133 # -----------
2134 # Display the configuration for all the tags in this script.
2135 func_config ()
2136 {
2137 re_begincf='^# ### BEGIN LIBTOOL'
2138 re_endcf='^# ### END LIBTOOL'
2139
2140 # Default configuration.
2141 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
2142
2143 # Now print the configurations for the tags.
2144 for tagname in $taglist; do
2145 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
2146 done
2147
2148 exit $?
2149 }
2150
2151
2152 # func_features
2153 # -------------
2154 # Display the features supported by this script.
2155 func_features ()
2156 {
2157 echo "host: $host"
2158 if test yes = "$build_libtool_libs"; then
2159 echo "enable shared libraries"
2160 else
2161 echo "disable shared libraries"
2162 fi
2163 if test yes = "$build_old_libs"; then
2164 echo "enable static libraries"
2165 else
2166 echo "disable static libraries"
2167 fi
2168
2169 exit $?
2170 }
2171
2172
2173 # func_enable_tag TAGNAME
2174 # -----------------------
2175 # Verify that TAGNAME is valid, and either flag an error and exit, or
2176 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
2177 # variable here.
2178 func_enable_tag ()
2179 {
2180 # Global variable:
2181 tagname=$1
2182
2183 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
2184 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
2185 sed_extractcf=/$re_begincf/,/$re_endcf/p
2186
2187 # Validate tagname.
2188 case $tagname in
2189 *[!-_A-Za-z0-9,/]*)
2190 func_fatal_error "invalid tag name: $tagname"
2191 ;;
2192 esac
2193
2194 # Don't test for the "default" C tag, as we know it's
2195 # there but not specially marked.
2196 case $tagname in
2197 CC) ;;
2198 *)
2199 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
2200 taglist="$taglist $tagname"
2201
2202 # Evaluate the configuration. Be careful to quote the path
2203 # and the sed script, to avoid splitting on whitespace, but
2204 # also don't use non-portable quotes within backquotes within
2205 # quotes we have to do it in 2 steps:
2206 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
2207 eval "$extractedcf"
2208 else
2209 func_error "ignoring unknown tag $tagname"
2210 fi
2211 ;;
2212 esac
2213 }
2214
2215
2216 # func_check_version_match
2217 # ------------------------
2218 # Ensure that we are using m4 macros, and libtool script from the same
2219 # release of libtool.
2220 func_check_version_match ()
2221 {
2222 if test "$package_revision" != "$macro_revision"; then
2223 if test "$VERSION" != "$macro_version"; then
2224 if test -z "$macro_version"; then
2225 cat >&2 <<_LT_EOF
2226 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2227 $progname: definition of this LT_INIT comes from an older release.
2228 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2229 $progname: and run autoconf again.
2230 _LT_EOF
2231 else
2232 cat >&2 <<_LT_EOF
2233 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2234 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
2235 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2236 $progname: and run autoconf again.
2237 _LT_EOF
2238 fi
2239 else
2240 cat >&2 <<_LT_EOF
2241 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
2242 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
2243 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
2244 $progname: of $PACKAGE $VERSION and run autoconf again.
2245 _LT_EOF
2246 fi
2247
2248 exit $EXIT_MISMATCH
2249 fi
2250 }
2251
2252
2253 # libtool_options_prep [ARG]...
2254 # -----------------------------
2255 # Preparation for options parsed by libtool.
2256 libtool_options_prep ()
2257 {
2258 $debug_mode
2259
2260 # Option defaults:
2261 opt_config=false
2262 opt_dlopen=
2263 opt_dry_run=false
2264 opt_help=false
2265 opt_mode=
2266 opt_preserve_dup_deps=false
2267 opt_quiet=false
2268
2269 nonopt=
2270 preserve_args=
2271
2272 # Shorthand for --mode=foo, only valid as the first argument
2273 case $1 in
2274 clean|clea|cle|cl)
2275 shift; set dummy --mode clean ${1+"$@"}; shift
2276 ;;
2277 compile|compil|compi|comp|com|co|c)
2278 shift; set dummy --mode compile ${1+"$@"}; shift
2279 ;;
2280 execute|execut|execu|exec|exe|ex|e)
2281 shift; set dummy --mode execute ${1+"$@"}; shift
2282 ;;
2283 finish|finis|fini|fin|fi|f)
2284 shift; set dummy --mode finish ${1+"$@"}; shift
2285 ;;
2286 install|instal|insta|inst|ins|in|i)
2287 shift; set dummy --mode install ${1+"$@"}; shift
2288 ;;
2289 link|lin|li|l)
2290 shift; set dummy --mode link ${1+"$@"}; shift
2291 ;;
2292 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2293 shift; set dummy --mode uninstall ${1+"$@"}; shift
2294 ;;
2295 esac
2296
2297 # Pass back the list of options.
2298 func_quote_for_eval ${1+"$@"}
2299 libtool_options_prep_result=$func_quote_for_eval_result
2300 }
2301 func_add_hook func_options_prep libtool_options_prep
2302
2303
2304 # libtool_parse_options [ARG]...
2305 # ---------------------------------
2306 # Provide handling for libtool specific options.
2307 libtool_parse_options ()
2308 {
2309 $debug_cmd
2310
2311 # Perform our own loop to consume as many options as possible in
2312 # each iteration.
2313 while test $# -gt 0; do
2314 _G_opt=$1
2315 shift
2316 case $_G_opt in
2317 --dry-run|--dryrun|-n)
2318 opt_dry_run=:
2319 ;;
2320
2321 --config) func_config ;;
2322
2323 --dlopen|-dlopen)
2324 opt_dlopen="${opt_dlopen+$opt_dlopen
2325 }$1"
2326 shift
2327 ;;
2328
2329 --preserve-dup-deps)
2330 opt_preserve_dup_deps=: ;;
2331
2332 --features) func_features ;;
2333
2334 --finish) set dummy --mode finish ${1+"$@"}; shift ;;
2335
2336 --help) opt_help=: ;;
2337
2338 --help-all) opt_help=': help-all' ;;
2339
2340 --mode) test $# = 0 && func_missing_arg $_G_opt && break
2341 opt_mode=$1
2342 case $1 in
2343 # Valid mode arguments:
2344 clean|compile|execute|finish|install|link|relink|uninstall) ;;
2345
2346 # Catch anything else as an error
2347 *) func_error "invalid argument for $_G_opt"
2348 exit_cmd=exit
2349 break
2350 ;;
2351 esac
2352 shift
2353 ;;
2354
2355 --no-silent|--no-quiet)
2356 opt_quiet=false
2357 func_append preserve_args " $_G_opt"
2358 ;;
2359
2360 --no-warnings|--no-warning|--no-warn)
2361 opt_warning=false
2362 func_append preserve_args " $_G_opt"
2363 ;;
2364
2365 --no-verbose)
2366 opt_verbose=false
2367 func_append preserve_args " $_G_opt"
2368 ;;
2369
2370 --silent|--quiet)
2371 opt_quiet=:
2372 opt_verbose=false
2373 func_append preserve_args " $_G_opt"
2374 ;;
2375
2376 --tag) test $# = 0 && func_missing_arg $_G_opt && break
2377 opt_tag=$1
2378 func_append preserve_args " $_G_opt $1"
2379 func_enable_tag "$1"
2380 shift
2381 ;;
2382
2383 --verbose|-v) opt_quiet=false
2384 opt_verbose=:
2385 func_append preserve_args " $_G_opt"
2386 ;;
2387
2388 # An option not handled by this hook function:
2389 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
2390 esac
2391 done
2392
2393
2394 # save modified positional parameters for caller
2395 func_quote_for_eval ${1+"$@"}
2396 libtool_parse_options_result=$func_quote_for_eval_result
2397 }
2398 func_add_hook func_parse_options libtool_parse_options
2399
2400
2401
2402 # libtool_validate_options [ARG]...
2403 # ---------------------------------
2404 # Perform any sanity checks on option settings and/or unconsumed
2405 # arguments.
2406 libtool_validate_options ()
2407 {
2408 # save first non-option argument
2409 if test 0 -lt $#; then
2410 nonopt=$1
2411 shift
2412 fi
2413
2414 # preserve --debug
2415 test : = "$debug_cmd" || func_append preserve_args " --debug"
2416
2417 case $host in
2418 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
2419 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
2420 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
2421 # don't eliminate duplications in $postdeps and $predeps
2422 opt_duplicate_compiler_generated_deps=:
2423 ;;
2424 *)
2425 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
2426 ;;
2427 esac
2428
2429 $opt_help || {
2430 # Sanity checks first:
2431 func_check_version_match
2432
2433 test yes != "$build_libtool_libs" \
2434 && test yes != "$build_old_libs" \
2435 && func_fatal_configuration "not configured to build any kind of library"
2436
2437 # Darwin sucks
2438 eval std_shrext=\"$shrext_cmds\"
2439
2440 # Only execute mode is allowed to have -dlopen flags.
2441 if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
2442 func_error "unrecognized option '-dlopen'"
2443 $ECHO "$help" 1>&2
2444 exit $EXIT_FAILURE
2445 fi
2446
2447 # Change the help message to a mode-specific one.
2448 generic_help=$help
2449 help="Try '$progname --help --mode=$opt_mode' for more information."
2450 }
2451
2452 # Pass back the unparsed argument list
2453 func_quote_for_eval ${1+"$@"}
2454 libtool_validate_options_result=$func_quote_for_eval_result
2455 }
2456 func_add_hook func_validate_options libtool_validate_options
2457
2458
2459 # Process options as early as possible so that --help and --version
2460 # can return quickly.
2461 func_options ${1+"$@"}
2462 eval set dummy "$func_options_result"; shift
2463
2464
2465
2466 ## ----------- ##
2467 ## Main. ##
2468 ## ----------- ##
2469
2470 magic='%%%MAGIC variable%%%'
2471 magic_exe='%%%MAGIC EXE variable%%%'
2472
2473 # Global variables.
2474 extracted_archives=
2475 extracted_serial=0
2476
2477 # If this variable is set in any of the actions, the command in it
2478 # will be execed at the end. This prevents here-documents from being
2479 # left over by shells.
2480 exec_cmd=
2481
2482
2483 # A function that is used when there is no print builtin or printf.
2484 func_fallback_echo ()
2485 {
2486 eval 'cat <<_LTECHO_EOF
2487 $1
2488 _LTECHO_EOF'
2489 }
2490
2491 # func_generated_by_libtool
2492 # True iff stdin has been generated by Libtool. This function is only
2493 # a basic sanity check; it will hardly flush out determined imposters.
2494 func_generated_by_libtool_p ()
2495 {
2496 $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
2497 }
2498
2499 # func_lalib_p file
2500 # True iff FILE is a libtool '.la' library or '.lo' object file.
2501 # This function is only a basic sanity check; it will hardly flush out
2502 # determined imposters.
2503 func_lalib_p ()
2504 {
2505 test -f "$1" &&
2506 $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
2507 }
2508
2509 # func_lalib_unsafe_p file
2510 # True iff FILE is a libtool '.la' library or '.lo' object file.
2511 # This function implements the same check as func_lalib_p without
2512 # resorting to external programs. To this end, it redirects stdin and
2513 # closes it afterwards, without saving the original file descriptor.
2514 # As a safety measure, use it only where a negative result would be
2515 # fatal anyway. Works if 'file' does not exist.
2516 func_lalib_unsafe_p ()
2517 {
2518 lalib_p=no
2519 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
2520 for lalib_p_l in 1 2 3 4
2521 do
2522 read lalib_p_line
2523 case $lalib_p_line in
2524 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
2525 esac
2526 done
2527 exec 0<&5 5<&-
2528 fi
2529 test yes = "$lalib_p"
2530 }
2531
2532 # func_ltwrapper_script_p file
2533 # True iff FILE is a libtool wrapper script
2534 # This function is only a basic sanity check; it will hardly flush out
2535 # determined imposters.
2536 func_ltwrapper_script_p ()
2537 {
2538 test -f "$1" &&
2539 $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
2540 }
2541
2542 # func_ltwrapper_executable_p file
2543 # True iff FILE is a libtool wrapper executable
2544 # This function is only a basic sanity check; it will hardly flush out
2545 # determined imposters.
2546 func_ltwrapper_executable_p ()
2547 {
2548 func_ltwrapper_exec_suffix=
2549 case $1 in
2550 *.exe) ;;
2551 *) func_ltwrapper_exec_suffix=.exe ;;
2552 esac
2553 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
2554 }
2555
2556 # func_ltwrapper_scriptname file
2557 # Assumes file is an ltwrapper_executable
2558 # uses $file to determine the appropriate filename for a
2559 # temporary ltwrapper_script.
2560 func_ltwrapper_scriptname ()
2561 {
2562 func_dirname_and_basename "$1" "" "."
2563 func_stripname '' '.exe' "$func_basename_result"
2564 func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
2565 }
2566
2567 # func_ltwrapper_p file
2568 # True iff FILE is a libtool wrapper script or wrapper executable
2569 # This function is only a basic sanity check; it will hardly flush out
2570 # determined imposters.
2571 func_ltwrapper_p ()
2572 {
2573 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
2574 }
2575
2576
2577 # func_execute_cmds commands fail_cmd
2578 # Execute tilde-delimited COMMANDS.
2579 # If FAIL_CMD is given, eval that upon failure.
2580 # FAIL_CMD may read-access the current command in variable CMD!
2581 func_execute_cmds ()
2582 {
2583 $debug_cmd
2584
2585 save_ifs=$IFS; IFS='~'
2586 for cmd in $1; do
2587 IFS=$sp$nl
2588 eval cmd=\"$cmd\"
2589 IFS=$save_ifs
2590 func_show_eval "$cmd" "${2-:}"
2591 done
2592 IFS=$save_ifs
2593 }
2594
2595
2596 # func_source file
2597 # Source FILE, adding directory component if necessary.
2598 # Note that it is not necessary on cygwin/mingw to append a dot to
2599 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
2600 # behavior happens only for exec(3), not for open(2)! Also, sourcing
2601 # 'FILE.' does not work on cygwin managed mounts.
2602 func_source ()
2603 {
2604 $debug_cmd
2605
2606 case $1 in
2607 */* | *\\*) . "$1" ;;
2608 *) . "./$1" ;;
2609 esac
2610 }
2611
2612
2613 # func_resolve_sysroot PATH
2614 # Replace a leading = in PATH with a sysroot. Store the result into
2615 # func_resolve_sysroot_result
2616 func_resolve_sysroot ()
2617 {
2618 func_resolve_sysroot_result=$1
2619 case $func_resolve_sysroot_result in
2620 =*)
2621 func_stripname '=' '' "$func_resolve_sysroot_result"
2622 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
2623 ;;
2624 esac
2625 }
2626
2627 # func_replace_sysroot PATH
2628 # If PATH begins with the sysroot, replace it with = and
2629 # store the result into func_replace_sysroot_result.
2630 func_replace_sysroot ()
2631 {
2632 case $lt_sysroot:$1 in
2633 ?*:"$lt_sysroot"*)
2634 func_stripname "$lt_sysroot" '' "$1"
2635 func_replace_sysroot_result='='$func_stripname_result
2636 ;;
2637 *)
2638 # Including no sysroot.
2639 func_replace_sysroot_result=$1
2640 ;;
2641 esac
2642 }
2643
2644 # func_infer_tag arg
2645 # Infer tagged configuration to use if any are available and
2646 # if one wasn't chosen via the "--tag" command line option.
2647 # Only attempt this if the compiler in the base compile
2648 # command doesn't match the default compiler.
2649 # arg is usually of the form 'gcc ...'
2650 func_infer_tag ()
2651 {
2652 $debug_cmd
2653
2654 if test -n "$available_tags" && test -z "$tagname"; then
2655 CC_quoted=
2656 for arg in $CC; do
2657 func_append_quoted CC_quoted "$arg"
2658 done
2659 CC_expanded=`func_echo_all $CC`
2660 CC_quoted_expanded=`func_echo_all $CC_quoted`
2661 case $@ in
2662 # Blanks in the command may have been stripped by the calling shell,
2663 # but not from the CC environment variable when configure was run.
2664 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2665 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
2666 # Blanks at the start of $base_compile will cause this to fail
2667 # if we don't check for them as well.
2668 *)
2669 for z in $available_tags; do
2670 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
2671 # Evaluate the configuration.
2672 eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
2673 CC_quoted=
2674 for arg in $CC; do
2675 # Double-quote args containing other shell metacharacters.
2676 func_append_quoted CC_quoted "$arg"
2677 done
2678 CC_expanded=`func_echo_all $CC`
2679 CC_quoted_expanded=`func_echo_all $CC_quoted`
2680 case "$@ " in
2681 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2682 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
2683 # The compiler in the base compile command matches
2684 # the one in the tagged configuration.
2685 # Assume this is the tagged configuration we want.
2686 tagname=$z
2687 break
2688 ;;
2689 esac
2690 fi
2691 done
2692 # If $tagname still isn't set, then no tagged configuration
2693 # was found and let the user know that the "--tag" command
2694 # line option must be used.
2695 if test -z "$tagname"; then
2696 func_echo "unable to infer tagged configuration"
2697 func_fatal_error "specify a tag with '--tag'"
2698 # else
2699 # func_verbose "using $tagname tagged configuration"
2700 fi
2701 ;;
2702 esac
2703 fi
2704 }
2705
2706
2707
2708 # func_write_libtool_object output_name pic_name nonpic_name
2709 # Create a libtool object file (analogous to a ".la" file),
2710 # but don't create it if we're doing a dry run.
2711 func_write_libtool_object ()
2712 {
2713 write_libobj=$1
2714 if test yes = "$build_libtool_libs"; then
2715 write_lobj=\'$2\'
2716 else
2717 write_lobj=none
2718 fi
2719
2720 if test yes = "$build_old_libs"; then
2721 write_oldobj=\'$3\'
2722 else
2723 write_oldobj=none
2724 fi
2725
2726 $opt_dry_run || {
2727 cat >${write_libobj}T <<EOF
2728 # $write_libobj - a libtool object file
2729 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
2730 #
2731 # Please DO NOT delete this file!
2732 # It is necessary for linking the library.
2733
2734 # Name of the PIC object.
2735 pic_object=$write_lobj
2736
2737 # Name of the non-PIC object
2738 non_pic_object=$write_oldobj
2739
2740 EOF
2741 $MV "${write_libobj}T" "$write_libobj"
2742 }
2743 }
2744
2745
2746 ##################################################
2747 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
2748 ##################################################
2749
2750 # func_convert_core_file_wine_to_w32 ARG
2751 # Helper function used by file name conversion functions when $build is *nix,
2752 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
2753 # correctly configured wine environment available, with the winepath program
2754 # in $build's $PATH.
2755 #
2756 # ARG is the $build file name to be converted to w32 format.
2757 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
2758 # be empty on error (or when ARG is empty)
2759 func_convert_core_file_wine_to_w32 ()
2760 {
2761 $debug_cmd
2762
2763 func_convert_core_file_wine_to_w32_result=$1
2764 if test -n "$1"; then
2765 # Unfortunately, winepath does not exit with a non-zero error code, so we
2766 # are forced to check the contents of stdout. On the other hand, if the
2767 # command is not found, the shell will set an exit code of 127 and print
2768 # *an error message* to stdout. So we must check for both error code of
2769 # zero AND non-empty stdout, which explains the odd construction:
2770 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
2771 if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
2772 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
2773 $SED -e "$sed_naive_backslashify"`
2774 else
2775 func_convert_core_file_wine_to_w32_result=
2776 fi
2777 fi
2778 }
2779 # end: func_convert_core_file_wine_to_w32
2780
2781
2782 # func_convert_core_path_wine_to_w32 ARG
2783 # Helper function used by path conversion functions when $build is *nix, and
2784 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
2785 # configured wine environment available, with the winepath program in $build's
2786 # $PATH. Assumes ARG has no leading or trailing path separator characters.
2787 #
2788 # ARG is path to be converted from $build format to win32.
2789 # Result is available in $func_convert_core_path_wine_to_w32_result.
2790 # Unconvertible file (directory) names in ARG are skipped; if no directory names
2791 # are convertible, then the result may be empty.
2792 func_convert_core_path_wine_to_w32 ()
2793 {
2794 $debug_cmd
2795
2796 # unfortunately, winepath doesn't convert paths, only file names
2797 func_convert_core_path_wine_to_w32_result=
2798 if test -n "$1"; then
2799 oldIFS=$IFS
2800 IFS=:
2801 for func_convert_core_path_wine_to_w32_f in $1; do
2802 IFS=$oldIFS
2803 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
2804 if test -n "$func_convert_core_file_wine_to_w32_result"; then
2805 if test -z "$func_convert_core_path_wine_to_w32_result"; then
2806 func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
2807 else
2808 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
2809 fi
2810 fi
2811 done
2812 IFS=$oldIFS
2813 fi
2814 }
2815 # end: func_convert_core_path_wine_to_w32
2816
2817
2818 # func_cygpath ARGS...
2819 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
2820 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
2821 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
2822 # (2), returns the Cygwin file name or path in func_cygpath_result (input
2823 # file name or path is assumed to be in w32 format, as previously converted
2824 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
2825 # or path in func_cygpath_result (input file name or path is assumed to be in
2826 # Cygwin format). Returns an empty string on error.
2827 #
2828 # ARGS are passed to cygpath, with the last one being the file name or path to
2829 # be converted.
2830 #
2831 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
2832 # environment variable; do not put it in $PATH.
2833 func_cygpath ()
2834 {
2835 $debug_cmd
2836
2837 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
2838 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
2839 if test "$?" -ne 0; then
2840 # on failure, ensure result is empty
2841 func_cygpath_result=
2842 fi
2843 else
2844 func_cygpath_result=
2845 func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
2846 fi
2847 }
2848 #end: func_cygpath
2849
2850
2851 # func_convert_core_msys_to_w32 ARG
2852 # Convert file name or path ARG from MSYS format to w32 format. Return
2853 # result in func_convert_core_msys_to_w32_result.
2854 func_convert_core_msys_to_w32 ()
2855 {
2856 $debug_cmd
2857
2858 # awkward: cmd appends spaces to result
2859 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
2860 $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
2861 }
2862 #end: func_convert_core_msys_to_w32
2863
2864
2865 # func_convert_file_check ARG1 ARG2
2866 # Verify that ARG1 (a file name in $build format) was converted to $host
2867 # format in ARG2. Otherwise, emit an error message, but continue (resetting
2868 # func_to_host_file_result to ARG1).
2869 func_convert_file_check ()
2870 {
2871 $debug_cmd
2872
2873 if test -z "$2" && test -n "$1"; then
2874 func_error "Could not determine host file name corresponding to"
2875 func_error " '$1'"
2876 func_error "Continuing, but uninstalled executables may not work."
2877 # Fallback:
2878 func_to_host_file_result=$1
2879 fi
2880 }
2881 # end func_convert_file_check
2882
2883
2884 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
2885 # Verify that FROM_PATH (a path in $build format) was converted to $host
2886 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
2887 # func_to_host_file_result to a simplistic fallback value (see below).
2888 func_convert_path_check ()
2889 {
2890 $debug_cmd
2891
2892 if test -z "$4" && test -n "$3"; then
2893 func_error "Could not determine the host path corresponding to"
2894 func_error " '$3'"
2895 func_error "Continuing, but uninstalled executables may not work."
2896 # Fallback. This is a deliberately simplistic "conversion" and
2897 # should not be "improved". See libtool.info.
2898 if test "x$1" != "x$2"; then
2899 lt_replace_pathsep_chars="s|$1|$2|g"
2900 func_to_host_path_result=`echo "$3" |
2901 $SED -e "$lt_replace_pathsep_chars"`
2902 else
2903 func_to_host_path_result=$3
2904 fi
2905 fi
2906 }
2907 # end func_convert_path_check
2908
2909
2910 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
2911 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
2912 # and appending REPL if ORIG matches BACKPAT.
2913 func_convert_path_front_back_pathsep ()
2914 {
2915 $debug_cmd
2916
2917 case $4 in
2918 $1 ) func_to_host_path_result=$3$func_to_host_path_result
2919 ;;
2920 esac
2921 case $4 in
2922 $2 ) func_append func_to_host_path_result "$3"
2923 ;;
2924 esac
2925 }
2926 # end func_convert_path_front_back_pathsep
2927
2928
2929 ##################################################
2930 # $build to $host FILE NAME CONVERSION FUNCTIONS #
2931 ##################################################
2932 # invoked via '$to_host_file_cmd ARG'
2933 #
2934 # In each case, ARG is the path to be converted from $build to $host format.
2935 # Result will be available in $func_to_host_file_result.
2936
2937
2938 # func_to_host_file ARG
2939 # Converts the file name ARG from $build format to $host format. Return result
2940 # in func_to_host_file_result.
2941 func_to_host_file ()
2942 {
2943 $debug_cmd
2944
2945 $to_host_file_cmd "$1"
2946 }
2947 # end func_to_host_file
2948
2949
2950 # func_to_tool_file ARG LAZY
2951 # converts the file name ARG from $build format to toolchain format. Return
2952 # result in func_to_tool_file_result. If the conversion in use is listed
2953 # in (the comma separated) LAZY, no conversion takes place.
2954 func_to_tool_file ()
2955 {
2956 $debug_cmd
2957
2958 case ,$2, in
2959 *,"$to_tool_file_cmd",*)
2960 func_to_tool_file_result=$1
2961 ;;
2962 *)
2963 $to_tool_file_cmd "$1"
2964 func_to_tool_file_result=$func_to_host_file_result
2965 ;;
2966 esac
2967 }
2968 # end func_to_tool_file
2969
2970
2971 # func_convert_file_noop ARG
2972 # Copy ARG to func_to_host_file_result.
2973 func_convert_file_noop ()
2974 {
2975 func_to_host_file_result=$1
2976 }
2977 # end func_convert_file_noop
2978
2979
2980 # func_convert_file_msys_to_w32 ARG
2981 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
2982 # conversion to w32 is not available inside the cwrapper. Returns result in
2983 # func_to_host_file_result.
2984 func_convert_file_msys_to_w32 ()
2985 {
2986 $debug_cmd
2987
2988 func_to_host_file_result=$1
2989 if test -n "$1"; then
2990 func_convert_core_msys_to_w32 "$1"
2991 func_to_host_file_result=$func_convert_core_msys_to_w32_result
2992 fi
2993 func_convert_file_check "$1" "$func_to_host_file_result"
2994 }
2995 # end func_convert_file_msys_to_w32
2996
2997
2998 # func_convert_file_cygwin_to_w32 ARG
2999 # Convert file name ARG from Cygwin to w32 format. Returns result in
3000 # func_to_host_file_result.
3001 func_convert_file_cygwin_to_w32 ()
3002 {
3003 $debug_cmd
3004
3005 func_to_host_file_result=$1
3006 if test -n "$1"; then
3007 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
3008 # LT_CYGPATH in this case.
3009 func_to_host_file_result=`cygpath -m "$1"`
3010 fi
3011 func_convert_file_check "$1" "$func_to_host_file_result"
3012 }
3013 # end func_convert_file_cygwin_to_w32
3014
3015
3016 # func_convert_file_nix_to_w32 ARG
3017 # Convert file name ARG from *nix to w32 format. Requires a wine environment
3018 # and a working winepath. Returns result in func_to_host_file_result.
3019 func_convert_file_nix_to_w32 ()
3020 {
3021 $debug_cmd
3022
3023 func_to_host_file_result=$1
3024 if test -n "$1"; then
3025 func_convert_core_file_wine_to_w32 "$1"
3026 func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
3027 fi
3028 func_convert_file_check "$1" "$func_to_host_file_result"
3029 }
3030 # end func_convert_file_nix_to_w32
3031
3032
3033 # func_convert_file_msys_to_cygwin ARG
3034 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3035 # Returns result in func_to_host_file_result.
3036 func_convert_file_msys_to_cygwin ()
3037 {
3038 $debug_cmd
3039
3040 func_to_host_file_result=$1
3041 if test -n "$1"; then
3042 func_convert_core_msys_to_w32 "$1"
3043 func_cygpath -u "$func_convert_core_msys_to_w32_result"
3044 func_to_host_file_result=$func_cygpath_result
3045 fi
3046 func_convert_file_check "$1" "$func_to_host_file_result"
3047 }
3048 # end func_convert_file_msys_to_cygwin
3049
3050
3051 # func_convert_file_nix_to_cygwin ARG
3052 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
3053 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
3054 # in func_to_host_file_result.
3055 func_convert_file_nix_to_cygwin ()
3056 {
3057 $debug_cmd
3058
3059 func_to_host_file_result=$1
3060 if test -n "$1"; then
3061 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
3062 func_convert_core_file_wine_to_w32 "$1"
3063 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
3064 func_to_host_file_result=$func_cygpath_result
3065 fi
3066 func_convert_file_check "$1" "$func_to_host_file_result"
3067 }
3068 # end func_convert_file_nix_to_cygwin
3069
3070
3071 #############################################
3072 # $build to $host PATH CONVERSION FUNCTIONS #
3073 #############################################
3074 # invoked via '$to_host_path_cmd ARG'
3075 #
3076 # In each case, ARG is the path to be converted from $build to $host format.
3077 # The result will be available in $func_to_host_path_result.
3078 #
3079 # Path separators are also converted from $build format to $host format. If
3080 # ARG begins or ends with a path separator character, it is preserved (but
3081 # converted to $host format) on output.
3082 #
3083 # All path conversion functions are named using the following convention:
3084 # file name conversion function : func_convert_file_X_to_Y ()
3085 # path conversion function : func_convert_path_X_to_Y ()
3086 # where, for any given $build/$host combination the 'X_to_Y' value is the
3087 # same. If conversion functions are added for new $build/$host combinations,
3088 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
3089 # will break.
3090
3091
3092 # func_init_to_host_path_cmd
3093 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
3094 # appropriate value, based on the value of $to_host_file_cmd.
3095 to_host_path_cmd=
3096 func_init_to_host_path_cmd ()
3097 {
3098 $debug_cmd
3099
3100 if test -z "$to_host_path_cmd"; then
3101 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
3102 to_host_path_cmd=func_convert_path_$func_stripname_result
3103 fi
3104 }
3105
3106
3107 # func_to_host_path ARG
3108 # Converts the path ARG from $build format to $host format. Return result
3109 # in func_to_host_path_result.
3110 func_to_host_path ()
3111 {
3112 $debug_cmd
3113
3114 func_init_to_host_path_cmd
3115 $to_host_path_cmd "$1"
3116 }
3117 # end func_to_host_path
3118
3119
3120 # func_convert_path_noop ARG
3121 # Copy ARG to func_to_host_path_result.
3122 func_convert_path_noop ()
3123 {
3124 func_to_host_path_result=$1
3125 }
3126 # end func_convert_path_noop
3127
3128
3129 # func_convert_path_msys_to_w32 ARG
3130 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
3131 # conversion to w32 is not available inside the cwrapper. Returns result in
3132 # func_to_host_path_result.
3133 func_convert_path_msys_to_w32 ()
3134 {
3135 $debug_cmd
3136
3137 func_to_host_path_result=$1
3138 if test -n "$1"; then
3139 # Remove leading and trailing path separator characters from ARG. MSYS
3140 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
3141 # and winepath ignores them completely.
3142 func_stripname : : "$1"
3143 func_to_host_path_tmp1=$func_stripname_result
3144 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3145 func_to_host_path_result=$func_convert_core_msys_to_w32_result
3146 func_convert_path_check : ";" \
3147 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3148 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3149 fi
3150 }
3151 # end func_convert_path_msys_to_w32
3152
3153
3154 # func_convert_path_cygwin_to_w32 ARG
3155 # Convert path ARG from Cygwin to w32 format. Returns result in
3156 # func_to_host_file_result.
3157 func_convert_path_cygwin_to_w32 ()
3158 {
3159 $debug_cmd
3160
3161 func_to_host_path_result=$1
3162 if test -n "$1"; then
3163 # See func_convert_path_msys_to_w32:
3164 func_stripname : : "$1"
3165 func_to_host_path_tmp1=$func_stripname_result
3166 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
3167 func_convert_path_check : ";" \
3168 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3169 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3170 fi
3171 }
3172 # end func_convert_path_cygwin_to_w32
3173
3174
3175 # func_convert_path_nix_to_w32 ARG
3176 # Convert path ARG from *nix to w32 format. Requires a wine environment and
3177 # a working winepath. Returns result in func_to_host_file_result.
3178 func_convert_path_nix_to_w32 ()
3179 {
3180 $debug_cmd
3181
3182 func_to_host_path_result=$1
3183 if test -n "$1"; then
3184 # See func_convert_path_msys_to_w32:
3185 func_stripname : : "$1"
3186 func_to_host_path_tmp1=$func_stripname_result
3187 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3188 func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
3189 func_convert_path_check : ";" \
3190 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3191 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3192 fi
3193 }
3194 # end func_convert_path_nix_to_w32
3195
3196
3197 # func_convert_path_msys_to_cygwin ARG
3198 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3199 # Returns result in func_to_host_file_result.
3200 func_convert_path_msys_to_cygwin ()
3201 {
3202 $debug_cmd
3203
3204 func_to_host_path_result=$1
3205 if test -n "$1"; then
3206 # See func_convert_path_msys_to_w32:
3207 func_stripname : : "$1"
3208 func_to_host_path_tmp1=$func_stripname_result
3209 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3210 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
3211 func_to_host_path_result=$func_cygpath_result
3212 func_convert_path_check : : \
3213 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3214 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3215 fi
3216 }
3217 # end func_convert_path_msys_to_cygwin
3218
3219
3220 # func_convert_path_nix_to_cygwin ARG
3221 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
3222 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
3223 # func_to_host_file_result.
3224 func_convert_path_nix_to_cygwin ()
3225 {
3226 $debug_cmd
3227
3228 func_to_host_path_result=$1
3229 if test -n "$1"; then
3230 # Remove leading and trailing path separator characters from
3231 # ARG. msys behavior is inconsistent here, cygpath turns them
3232 # into '.;' and ';.', and winepath ignores them completely.
3233 func_stripname : : "$1"
3234 func_to_host_path_tmp1=$func_stripname_result
3235 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3236 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
3237 func_to_host_path_result=$func_cygpath_result
3238 func_convert_path_check : : \
3239 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3240 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3241 fi
3242 }
3243 # end func_convert_path_nix_to_cygwin
3244
3245
3246 # func_dll_def_p FILE
3247 # True iff FILE is a Windows DLL '.def' file.
3248 # Keep in sync with _LT_DLL_DEF_P in libtool.m4
3249 func_dll_def_p ()
3250 {
3251 $debug_cmd
3252
3253 func_dll_def_p_tmp=`$SED -n \
3254 -e 's/^[ ]*//' \
3255 -e '/^\(;.*\)*$/d' \
3256 -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
3257 -e q \
3258 "$1"`
3259 test DEF = "$func_dll_def_p_tmp"
3260 }
3261
3262
3263 # func_mode_compile arg...
3264 func_mode_compile ()
3265 {
3266 $debug_cmd
3267
3268 # Get the compilation command and the source file.
3269 base_compile=
3270 srcfile=$nonopt # always keep a non-empty value in "srcfile"
3271 suppress_opt=yes
3272 suppress_output=
3273 arg_mode=normal
3274 libobj=
3275 later=
3276 pie_flag=
3277
3278 for arg
3279 do
3280 case $arg_mode in
3281 arg )
3282 # do not "continue". Instead, add this to base_compile
3283 lastarg=$arg
3284 arg_mode=normal
3285 ;;
3286
3287 target )
3288 libobj=$arg
3289 arg_mode=normal
3290 continue
3291 ;;
3292
3293 normal )
3294 # Accept any command-line options.
3295 case $arg in
3296 -o)
3297 test -n "$libobj" && \
3298 func_fatal_error "you cannot specify '-o' more than once"
3299 arg_mode=target
3300 continue
3301 ;;
3302
3303 -pie | -fpie | -fPIE)
3304 func_append pie_flag " $arg"
3305 continue
3306 ;;
3307
3308 -shared | -static | -prefer-pic | -prefer-non-pic)
3309 func_append later " $arg"
3310 continue
3311 ;;
3312
3313 -no-suppress)
3314 suppress_opt=no
3315 continue
3316 ;;
3317
3318 -Xcompiler)
3319 arg_mode=arg # the next one goes into the "base_compile" arg list
3320 continue # The current "srcfile" will either be retained or
3321 ;; # replaced later. I would guess that would be a bug.
3322
3323 -Wc,*)
3324 func_stripname '-Wc,' '' "$arg"
3325 args=$func_stripname_result
3326 lastarg=
3327 save_ifs=$IFS; IFS=,
3328 for arg in $args; do
3329 IFS=$save_ifs
3330 func_append_quoted lastarg "$arg"
3331 done
3332 IFS=$save_ifs
3333 func_stripname ' ' '' "$lastarg"
3334 lastarg=$func_stripname_result
3335
3336 # Add the arguments to base_compile.
3337 func_append base_compile " $lastarg"
3338 continue
3339 ;;
3340
3341 *)
3342 # Accept the current argument as the source file.
3343 # The previous "srcfile" becomes the current argument.
3344 #
3345 lastarg=$srcfile
3346 srcfile=$arg
3347 ;;
3348 esac # case $arg
3349 ;;
3350 esac # case $arg_mode
3351
3352 # Aesthetically quote the previous argument.
3353 func_append_quoted base_compile "$lastarg"
3354 done # for arg
3355
3356 case $arg_mode in
3357 arg)
3358 func_fatal_error "you must specify an argument for -Xcompile"
3359 ;;
3360 target)
3361 func_fatal_error "you must specify a target with '-o'"
3362 ;;
3363 *)
3364 # Get the name of the library object.
3365 test -z "$libobj" && {
3366 func_basename "$srcfile"
3367 libobj=$func_basename_result
3368 }
3369 ;;
3370 esac
3371
3372 # Recognize several different file suffixes.
3373 # If the user specifies -o file.o, it is replaced with file.lo
3374 case $libobj in
3375 *.[cCFSifmso] | \
3376 *.ada | *.adb | *.ads | *.asm | \
3377 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
3378 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
3379 func_xform "$libobj"
3380 libobj=$func_xform_result
3381 ;;
3382 esac
3383
3384 case $libobj in
3385 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
3386 *)
3387 func_fatal_error "cannot determine name of library object from '$libobj'"
3388 ;;
3389 esac
3390
3391 func_infer_tag $base_compile
3392
3393 for arg in $later; do
3394 case $arg in
3395 -shared)
3396 test yes = "$build_libtool_libs" \
3397 || func_fatal_configuration "cannot build a shared library"
3398 build_old_libs=no
3399 continue
3400 ;;
3401
3402 -static)
3403 build_libtool_libs=no
3404 build_old_libs=yes
3405 continue
3406 ;;
3407
3408 -prefer-pic)
3409 pic_mode=yes
3410 continue
3411 ;;
3412
3413 -prefer-non-pic)
3414 pic_mode=no
3415 continue
3416 ;;
3417 esac
3418 done
3419
3420 func_quote_for_eval "$libobj"
3421 test "X$libobj" != "X$func_quote_for_eval_result" \
3422 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
3423 && func_warning "libobj name '$libobj' may not contain shell special characters."
3424 func_dirname_and_basename "$obj" "/" ""
3425 objname=$func_basename_result
3426 xdir=$func_dirname_result
3427 lobj=$xdir$objdir/$objname
3428
3429 test -z "$base_compile" && \
3430 func_fatal_help "you must specify a compilation command"
3431
3432 # Delete any leftover library objects.
3433 if test yes = "$build_old_libs"; then
3434 removelist="$obj $lobj $libobj ${libobj}T"
3435 else
3436 removelist="$lobj $libobj ${libobj}T"
3437 fi
3438
3439 # On Cygwin there's no "real" PIC flag so we must build both object types
3440 case $host_os in
3441 cygwin* | mingw* | pw32* | os2* | cegcc*)
3442 pic_mode=default
3443 ;;
3444 esac
3445 if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
3446 # non-PIC code in shared libraries is not supported
3447 pic_mode=default
3448 fi
3449
3450 # Calculate the filename of the output object if compiler does
3451 # not support -o with -c
3452 if test no = "$compiler_c_o"; then
3453 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
3454 lockfile=$output_obj.lock
3455 else
3456 output_obj=
3457 need_locks=no
3458 lockfile=
3459 fi
3460
3461 # Lock this critical section if it is needed
3462 # We use this script file to make the link, it avoids creating a new file
3463 if test yes = "$need_locks"; then
3464 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3465 func_echo "Waiting for $lockfile to be removed"
3466 sleep 2
3467 done
3468 elif test warn = "$need_locks"; then
3469 if test -f "$lockfile"; then
3470 $ECHO "\
3471 *** ERROR, $lockfile exists and contains:
3472 `cat $lockfile 2>/dev/null`
3473
3474 This indicates that another process is trying to use the same
3475 temporary object file, and libtool could not work around it because
3476 your compiler does not support '-c' and '-o' together. If you
3477 repeat this compilation, it may succeed, by chance, but you had better
3478 avoid parallel builds (make -j) in this platform, or get a better
3479 compiler."
3480
3481 $opt_dry_run || $RM $removelist
3482 exit $EXIT_FAILURE
3483 fi
3484 func_append removelist " $output_obj"
3485 $ECHO "$srcfile" > "$lockfile"
3486 fi
3487
3488 $opt_dry_run || $RM $removelist
3489 func_append removelist " $lockfile"
3490 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
3491
3492 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
3493 srcfile=$func_to_tool_file_result
3494 func_quote_for_eval "$srcfile"
3495 qsrcfile=$func_quote_for_eval_result
3496
3497 # Only build a PIC object if we are building libtool libraries.
3498 if test yes = "$build_libtool_libs"; then
3499 # Without this assignment, base_compile gets emptied.
3500 fbsd_hideous_sh_bug=$base_compile
3501
3502 if test no != "$pic_mode"; then
3503 command="$base_compile $qsrcfile $pic_flag"
3504 else
3505 # Don't build PIC code
3506 command="$base_compile $qsrcfile"
3507 fi
3508
3509 func_mkdir_p "$xdir$objdir"
3510
3511 if test -z "$output_obj"; then
3512 # Place PIC objects in $objdir
3513 func_append command " -o $lobj"
3514 fi
3515
3516 func_show_eval_locale "$command" \
3517 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
3518
3519 if test warn = "$need_locks" &&
3520 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
3521 $ECHO "\
3522 *** ERROR, $lockfile contains:
3523 `cat $lockfile 2>/dev/null`
3524
3525 but it should contain:
3526 $srcfile
3527
3528 This indicates that another process is trying to use the same
3529 temporary object file, and libtool could not work around it because
3530 your compiler does not support '-c' and '-o' together. If you
3531 repeat this compilation, it may succeed, by chance, but you had better
3532 avoid parallel builds (make -j) in this platform, or get a better
3533 compiler."
3534
3535 $opt_dry_run || $RM $removelist
3536 exit $EXIT_FAILURE
3537 fi
3538
3539 # Just move the object if needed, then go on to compile the next one
3540 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
3541 func_show_eval '$MV "$output_obj" "$lobj"' \
3542 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
3543 fi
3544
3545 # Allow error messages only from the first compilation.
3546 if test yes = "$suppress_opt"; then
3547 suppress_output=' >/dev/null 2>&1'
3548 fi
3549 fi
3550
3551 # Only build a position-dependent object if we build old libraries.
3552 if test yes = "$build_old_libs"; then
3553 if test yes != "$pic_mode"; then
3554 # Don't build PIC code
3555 command="$base_compile $qsrcfile$pie_flag"
3556 else
3557 command="$base_compile $qsrcfile $pic_flag"
3558 fi
3559 if test yes = "$compiler_c_o"; then
3560 func_append command " -o $obj"
3561 fi
3562
3563 # Suppress compiler output if we already did a PIC compilation.
3564 func_append command "$suppress_output"
3565 func_show_eval_locale "$command" \
3566 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
3567
3568 if test warn = "$need_locks" &&
3569 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
3570 $ECHO "\
3571 *** ERROR, $lockfile contains:
3572 `cat $lockfile 2>/dev/null`
3573
3574 but it should contain:
3575 $srcfile
3576
3577 This indicates that another process is trying to use the same
3578 temporary object file, and libtool could not work around it because
3579 your compiler does not support '-c' and '-o' together. If you
3580 repeat this compilation, it may succeed, by chance, but you had better
3581 avoid parallel builds (make -j) in this platform, or get a better
3582 compiler."
3583
3584 $opt_dry_run || $RM $removelist
3585 exit $EXIT_FAILURE
3586 fi
3587
3588 # Just move the object if needed
3589 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
3590 func_show_eval '$MV "$output_obj" "$obj"' \
3591 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
3592 fi
3593 fi
3594
3595 $opt_dry_run || {
3596 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
3597
3598 # Unlock the critical section if it was locked
3599 if test no != "$need_locks"; then
3600 removelist=$lockfile
3601 $RM "$lockfile"
3602 fi
3603 }
3604
3605 exit $EXIT_SUCCESS
3606 }
3607
3608 $opt_help || {
3609 test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
3610 }
3611
3612 func_mode_help ()
3613 {
3614 # We need to display help for each of the modes.
3615 case $opt_mode in
3616 "")
3617 # Generic help is extracted from the usage comments
3618 # at the start of this file.
3619 func_help
3620 ;;
3621
3622 clean)
3623 $ECHO \
3624 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
3625
3626 Remove files from the build directory.
3627
3628 RM is the name of the program to use to delete files associated with each FILE
3629 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
3630 to RM.
3631
3632 If FILE is a libtool library, object or program, all the files associated
3633 with it are deleted. Otherwise, only FILE itself is deleted using RM."
3634 ;;
3635
3636 compile)
3637 $ECHO \
3638 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
3639
3640 Compile a source file into a libtool library object.
3641
3642 This mode accepts the following additional options:
3643
3644 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3645 -no-suppress do not suppress compiler output for multiple passes
3646 -prefer-pic try to build PIC objects only
3647 -prefer-non-pic try to build non-PIC objects only
3648 -shared do not build a '.o' file suitable for static linking
3649 -static only build a '.o' file suitable for static linking
3650 -Wc,FLAG pass FLAG directly to the compiler
3651
3652 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
3653 from the given SOURCEFILE.
3654
3655 The output file name is determined by removing the directory component from
3656 SOURCEFILE, then substituting the C source code suffix '.c' with the
3657 library object suffix, '.lo'."
3658 ;;
3659
3660 execute)
3661 $ECHO \
3662 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
3663
3664 Automatically set library path, then run a program.
3665
3666 This mode accepts the following additional options:
3667
3668 -dlopen FILE add the directory containing FILE to the library path
3669
3670 This mode sets the library path environment variable according to '-dlopen'
3671 flags.
3672
3673 If any of the ARGS are libtool executable wrappers, then they are translated
3674 into their corresponding uninstalled binary, and any of their required library
3675 directories are added to the library path.
3676
3677 Then, COMMAND is executed, with ARGS as arguments."
3678 ;;
3679
3680 finish)
3681 $ECHO \
3682 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
3683
3684 Complete the installation of libtool libraries.
3685
3686 Each LIBDIR is a directory that contains libtool libraries.
3687
3688 The commands that this mode executes may require superuser privileges. Use
3689 the '--dry-run' option if you just want to see what would be executed."
3690 ;;
3691
3692 install)
3693 $ECHO \
3694 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
3695
3696 Install executables or libraries.
3697
3698 INSTALL-COMMAND is the installation command. The first component should be
3699 either the 'install' or 'cp' program.
3700
3701 The following components of INSTALL-COMMAND are treated specially:
3702
3703 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
3704
3705 The rest of the components are interpreted as arguments to that command (only
3706 BSD-compatible install options are recognized)."
3707 ;;
3708
3709 link)
3710 $ECHO \
3711 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
3712
3713 Link object files or libraries together to form another library, or to
3714 create an executable program.
3715
3716 LINK-COMMAND is a command using the C compiler that you would use to create
3717 a program from several object files.
3718
3719 The following components of LINK-COMMAND are treated specially:
3720
3721 -all-static do not do any dynamic linking at all
3722 -avoid-version do not add a version suffix if possible
3723 -bindir BINDIR specify path to binaries directory (for systems where
3724 libraries must be found in the PATH setting at runtime)
3725 -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
3726 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
3727 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
3728 -export-symbols SYMFILE
3729 try to export only the symbols listed in SYMFILE
3730 -export-symbols-regex REGEX
3731 try to export only the symbols matching REGEX
3732 -LLIBDIR search LIBDIR for required installed libraries
3733 -lNAME OUTPUT-FILE requires the installed library libNAME
3734 -module build a library that can dlopened
3735 -no-fast-install disable the fast-install mode
3736 -no-install link a not-installable executable
3737 -no-undefined declare that a library does not refer to external symbols
3738 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
3739 -objectlist FILE use a list of object files found in FILE to specify objects
3740 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
3741 -precious-files-regex REGEX
3742 don't remove output files matching REGEX
3743 -release RELEASE specify package release information
3744 -rpath LIBDIR the created library will eventually be installed in LIBDIR
3745 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
3746 -shared only do dynamic linking of libtool libraries
3747 -shrext SUFFIX override the standard shared library file extension
3748 -static do not do any dynamic linking of uninstalled libtool libraries
3749 -static-libtool-libs
3750 do not do any dynamic linking of libtool libraries
3751 -version-info CURRENT[:REVISION[:AGE]]
3752 specify library version info [each variable defaults to 0]
3753 -weak LIBNAME declare that the target provides the LIBNAME interface
3754 -Wc,FLAG
3755 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
3756 -Wl,FLAG
3757 -Xlinker FLAG pass linker-specific FLAG directly to the linker
3758 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
3759
3760 All other options (arguments beginning with '-') are ignored.
3761
3762 Every other argument is treated as a filename. Files ending in '.la' are
3763 treated as uninstalled libtool libraries, other files are standard or library
3764 object files.
3765
3766 If the OUTPUT-FILE ends in '.la', then a libtool library is created,
3767 only library objects ('.lo' files) may be specified, and '-rpath' is
3768 required, except when creating a convenience library.
3769
3770 If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
3771 using 'ar' and 'ranlib', or on Windows using 'lib'.
3772
3773 If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
3774 is created, otherwise an executable program is created."
3775 ;;
3776
3777 uninstall)
3778 $ECHO \
3779 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
3780
3781 Remove libraries from an installation directory.
3782
3783 RM is the name of the program to use to delete files associated with each FILE
3784 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
3785 to RM.
3786
3787 If FILE is a libtool library, all the files associated with it are deleted.
3788 Otherwise, only FILE itself is deleted using RM."
3789 ;;
3790
3791 *)
3792 func_fatal_help "invalid operation mode '$opt_mode'"
3793 ;;
3794 esac
3795
3796 echo
3797 $ECHO "Try '$progname --help' for more information about other modes."
3798 }
3799
3800 # Now that we've collected a possible --mode arg, show help if necessary
3801 if $opt_help; then
3802 if test : = "$opt_help"; then
3803 func_mode_help
3804 else
3805 {
3806 func_help noexit
3807 for opt_mode in compile link execute install finish uninstall clean; do
3808 func_mode_help
3809 done
3810 } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
3811 {
3812 func_help noexit
3813 for opt_mode in compile link execute install finish uninstall clean; do
3814 echo
3815 func_mode_help
3816 done
3817 } |
3818 $SED '1d
3819 /^When reporting/,/^Report/{
3820 H
3821 d
3822 }
3823 $x
3824 /information about other modes/d
3825 /more detailed .*MODE/d
3826 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
3827 fi
3828 exit $?
3829 fi
3830
3831
3832 # func_mode_execute arg...
3833 func_mode_execute ()
3834 {
3835 $debug_cmd
3836
3837 # The first argument is the command name.
3838 cmd=$nonopt
3839 test -z "$cmd" && \
3840 func_fatal_help "you must specify a COMMAND"
3841
3842 # Handle -dlopen flags immediately.
3843 for file in $opt_dlopen; do
3844 test -f "$file" \
3845 || func_fatal_help "'$file' is not a file"
3846
3847 dir=
3848 case $file in
3849 *.la)
3850 func_resolve_sysroot "$file"
3851 file=$func_resolve_sysroot_result
3852
3853 # Check to see that this really is a libtool archive.
3854 func_lalib_unsafe_p "$file" \
3855 || func_fatal_help "'$lib' is not a valid libtool archive"
3856
3857 # Read the libtool library.
3858 dlname=
3859 library_names=
3860 func_source "$file"
3861
3862 # Skip this library if it cannot be dlopened.
3863 if test -z "$dlname"; then
3864 # Warn if it was a shared library.
3865 test -n "$library_names" && \
3866 func_warning "'$file' was not linked with '-export-dynamic'"
3867 continue
3868 fi
3869
3870 func_dirname "$file" "" "."
3871 dir=$func_dirname_result
3872
3873 if test -f "$dir/$objdir/$dlname"; then
3874 func_append dir "/$objdir"
3875 else
3876 if test ! -f "$dir/$dlname"; then
3877 func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
3878 fi
3879 fi
3880 ;;
3881
3882 *.lo)
3883 # Just add the directory containing the .lo file.
3884 func_dirname "$file" "" "."
3885 dir=$func_dirname_result
3886 ;;
3887
3888 *)
3889 func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
3890 continue
3891 ;;
3892 esac
3893
3894 # Get the absolute pathname.
3895 absdir=`cd "$dir" && pwd`
3896 test -n "$absdir" && dir=$absdir
3897
3898 # Now add the directory to shlibpath_var.
3899 if eval "test -z \"\$$shlibpath_var\""; then
3900 eval "$shlibpath_var=\"\$dir\""
3901 else
3902 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
3903 fi
3904 done
3905
3906 # This variable tells wrapper scripts just to set shlibpath_var
3907 # rather than running their programs.
3908 libtool_execute_magic=$magic
3909
3910 # Check if any of the arguments is a wrapper script.
3911 args=
3912 for file
3913 do
3914 case $file in
3915 -* | *.la | *.lo ) ;;
3916 *)
3917 # Do a test to see if this is really a libtool program.
3918 if func_ltwrapper_script_p "$file"; then
3919 func_source "$file"
3920 # Transform arg to wrapped name.
3921 file=$progdir/$program
3922 elif func_ltwrapper_executable_p "$file"; then
3923 func_ltwrapper_scriptname "$file"
3924 func_source "$func_ltwrapper_scriptname_result"
3925 # Transform arg to wrapped name.
3926 file=$progdir/$program
3927 fi
3928 ;;
3929 esac
3930 # Quote arguments (to preserve shell metacharacters).
3931 func_append_quoted args "$file"
3932 done
3933
3934 if $opt_dry_run; then
3935 # Display what would be done.
3936 if test -n "$shlibpath_var"; then
3937 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
3938 echo "export $shlibpath_var"
3939 fi
3940 $ECHO "$cmd$args"
3941 exit $EXIT_SUCCESS
3942 else
3943 if test -n "$shlibpath_var"; then
3944 # Export the shlibpath_var.
3945 eval "export $shlibpath_var"
3946 fi
3947
3948 # Restore saved environment variables
3949 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
3950 do
3951 eval "if test \"\${save_$lt_var+set}\" = set; then
3952 $lt_var=\$save_$lt_var; export $lt_var
3953 else
3954 $lt_unset $lt_var
3955 fi"
3956 done
3957
3958 # Now prepare to actually exec the command.
3959 exec_cmd=\$cmd$args
3960 fi
3961 }
3962
3963 test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
3964
3965
3966 # func_mode_finish arg...
3967 func_mode_finish ()
3968 {
3969 $debug_cmd
3970
3971 libs=
3972 libdirs=
3973 admincmds=
3974
3975 for opt in "$nonopt" ${1+"$@"}
3976 do
3977 if test -d "$opt"; then
3978 func_append libdirs " $opt"
3979
3980 elif test -f "$opt"; then
3981 if func_lalib_unsafe_p "$opt"; then
3982 func_append libs " $opt"
3983 else
3984 func_warning "'$opt' is not a valid libtool archive"
3985 fi
3986
3987 else
3988 func_fatal_error "invalid argument '$opt'"
3989 fi
3990 done
3991
3992 if test -n "$libs"; then
3993 if test -n "$lt_sysroot"; then
3994 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
3995 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
3996 else
3997 sysroot_cmd=
3998 fi
3999
4000 # Remove sysroot references
4001 if $opt_dry_run; then
4002 for lib in $libs; do
4003 echo "removing references to $lt_sysroot and '=' prefixes from $lib"
4004 done
4005 else
4006 tmpdir=`func_mktempdir`
4007 for lib in $libs; do
4008 $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
4009 > $tmpdir/tmp-la
4010 mv -f $tmpdir/tmp-la $lib
4011 done
4012 ${RM}r "$tmpdir"
4013 fi
4014 fi
4015
4016 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4017 for libdir in $libdirs; do
4018 if test -n "$finish_cmds"; then
4019 # Do each command in the finish commands.
4020 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
4021 '"$cmd"'"'
4022 fi
4023 if test -n "$finish_eval"; then
4024 # Do the single finish_eval.
4025 eval cmds=\"$finish_eval\"
4026 $opt_dry_run || eval "$cmds" || func_append admincmds "
4027 $cmds"
4028 fi
4029 done
4030 fi
4031
4032 # Exit here if they wanted silent mode.
4033 $opt_quiet && exit $EXIT_SUCCESS
4034
4035 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4036 echo "----------------------------------------------------------------------"
4037 echo "Libraries have been installed in:"
4038 for libdir in $libdirs; do
4039 $ECHO " $libdir"
4040 done
4041 echo
4042 echo "If you ever happen to want to link against installed libraries"
4043 echo "in a given directory, LIBDIR, you must either use libtool, and"
4044 echo "specify the full pathname of the library, or use the '-LLIBDIR'"
4045 echo "flag during linking and do at least one of the following:"
4046 if test -n "$shlibpath_var"; then
4047 echo " - add LIBDIR to the '$shlibpath_var' environment variable"
4048 echo " during execution"
4049 fi
4050 if test -n "$runpath_var"; then
4051 echo " - add LIBDIR to the '$runpath_var' environment variable"
4052 echo " during linking"
4053 fi
4054 if test -n "$hardcode_libdir_flag_spec"; then
4055 libdir=LIBDIR
4056 eval flag=\"$hardcode_libdir_flag_spec\"
4057
4058 $ECHO " - use the '$flag' linker flag"
4059 fi
4060 if test -n "$admincmds"; then
4061 $ECHO " - have your system administrator run these commands:$admincmds"
4062 fi
4063 if test -f /etc/ld.so.conf; then
4064 echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
4065 fi
4066 echo
4067
4068 echo "See any operating system documentation about shared libraries for"
4069 case $host in
4070 solaris2.[6789]|solaris2.1[0-9])
4071 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
4072 echo "pages."
4073 ;;
4074 *)
4075 echo "more information, such as the ld(1) and ld.so(8) manual pages."
4076 ;;
4077 esac
4078 echo "----------------------------------------------------------------------"
4079 fi
4080 exit $EXIT_SUCCESS
4081 }
4082
4083 test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
4084
4085
4086 # func_mode_install arg...
4087 func_mode_install ()
4088 {
4089 $debug_cmd
4090
4091 # There may be an optional sh(1) argument at the beginning of
4092 # install_prog (especially on Windows NT).
4093 if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
4094 # Allow the use of GNU shtool's install command.
4095 case $nonopt in *shtool*) :;; *) false;; esac
4096 then
4097 # Aesthetically quote it.
4098 func_quote_for_eval "$nonopt"
4099 install_prog="$func_quote_for_eval_result "
4100 arg=$1
4101 shift
4102 else
4103 install_prog=
4104 arg=$nonopt
4105 fi
4106
4107 # The real first argument should be the name of the installation program.
4108 # Aesthetically quote it.
4109 func_quote_for_eval "$arg"
4110 func_append install_prog "$func_quote_for_eval_result"
4111 install_shared_prog=$install_prog
4112 case " $install_prog " in
4113 *[\\\ /]cp\ *) install_cp=: ;;
4114 *) install_cp=false ;;
4115 esac
4116
4117 # We need to accept at least all the BSD install flags.
4118 dest=
4119 files=
4120 opts=
4121 prev=
4122 install_type=
4123 isdir=false
4124 stripme=
4125 no_mode=:
4126 for arg
4127 do
4128 arg2=
4129 if test -n "$dest"; then
4130 func_append files " $dest"
4131 dest=$arg
4132 continue
4133 fi
4134
4135 case $arg in
4136 -d) isdir=: ;;
4137 -f)
4138 if $install_cp; then :; else
4139 prev=$arg
4140 fi
4141 ;;
4142 -g | -m | -o)
4143 prev=$arg
4144 ;;
4145 -s)
4146 stripme=" -s"
4147 continue
4148 ;;
4149 -*)
4150 ;;
4151 *)
4152 # If the previous option needed an argument, then skip it.
4153 if test -n "$prev"; then
4154 if test X-m = "X$prev" && test -n "$install_override_mode"; then
4155 arg2=$install_override_mode
4156 no_mode=false
4157 fi
4158 prev=
4159 else
4160 dest=$arg
4161 continue
4162 fi
4163 ;;
4164 esac
4165
4166 # Aesthetically quote the argument.
4167 func_quote_for_eval "$arg"
4168 func_append install_prog " $func_quote_for_eval_result"
4169 if test -n "$arg2"; then
4170 func_quote_for_eval "$arg2"
4171 fi
4172 func_append install_shared_prog " $func_quote_for_eval_result"
4173 done
4174
4175 test -z "$install_prog" && \
4176 func_fatal_help "you must specify an install program"
4177
4178 test -n "$prev" && \
4179 func_fatal_help "the '$prev' option requires an argument"
4180
4181 if test -n "$install_override_mode" && $no_mode; then
4182 if $install_cp; then :; else
4183 func_quote_for_eval "$install_override_mode"
4184 func_append install_shared_prog " -m $func_quote_for_eval_result"
4185 fi
4186 fi
4187
4188 if test -z "$files"; then
4189 if test -z "$dest"; then
4190 func_fatal_help "no file or destination specified"
4191 else
4192 func_fatal_help "you must specify a destination"
4193 fi
4194 fi
4195
4196 # Strip any trailing slash from the destination.
4197 func_stripname '' '/' "$dest"
4198 dest=$func_stripname_result
4199
4200 # Check to see that the destination is a directory.
4201 test -d "$dest" && isdir=:
4202 if $isdir; then
4203 destdir=$dest
4204 destname=
4205 else
4206 func_dirname_and_basename "$dest" "" "."
4207 destdir=$func_dirname_result
4208 destname=$func_basename_result
4209
4210 # Not a directory, so check to see that there is only one file specified.
4211 set dummy $files; shift
4212 test "$#" -gt 1 && \
4213 func_fatal_help "'$dest' is not a directory"
4214 fi
4215 case $destdir in
4216 [\\/]* | [A-Za-z]:[\\/]*) ;;
4217 *)
4218 for file in $files; do
4219 case $file in
4220 *.lo) ;;
4221 *)
4222 func_fatal_help "'$destdir' must be an absolute directory name"
4223 ;;
4224 esac
4225 done
4226 ;;
4227 esac
4228
4229 # This variable tells wrapper scripts just to set variables rather
4230 # than running their programs.
4231 libtool_install_magic=$magic
4232
4233 staticlibs=
4234 future_libdirs=
4235 current_libdirs=
4236 for file in $files; do
4237
4238 # Do each installation.
4239 case $file in
4240 *.$libext)
4241 # Do the static libraries later.
4242 func_append staticlibs " $file"
4243 ;;
4244
4245 *.la)
4246 func_resolve_sysroot "$file"
4247 file=$func_resolve_sysroot_result
4248
4249 # Check to see that this really is a libtool archive.
4250 func_lalib_unsafe_p "$file" \
4251 || func_fatal_help "'$file' is not a valid libtool archive"
4252
4253 library_names=
4254 old_library=
4255 relink_command=
4256 func_source "$file"
4257
4258 # Add the libdir to current_libdirs if it is the destination.
4259 if test "X$destdir" = "X$libdir"; then
4260 case "$current_libdirs " in
4261 *" $libdir "*) ;;
4262 *) func_append current_libdirs " $libdir" ;;
4263 esac
4264 else
4265 # Note the libdir as a future libdir.
4266 case "$future_libdirs " in
4267 *" $libdir "*) ;;
4268 *) func_append future_libdirs " $libdir" ;;
4269 esac
4270 fi
4271
4272 func_dirname "$file" "/" ""
4273 dir=$func_dirname_result
4274 func_append dir "$objdir"
4275
4276 if test -n "$relink_command"; then
4277 # Determine the prefix the user has applied to our future dir.
4278 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
4279
4280 # Don't allow the user to place us outside of our expected
4281 # location b/c this prevents finding dependent libraries that
4282 # are installed to the same prefix.
4283 # At present, this check doesn't affect windows .dll's that
4284 # are installed into $libdir/../bin (currently, that works fine)
4285 # but it's something to keep an eye on.
4286 test "$inst_prefix_dir" = "$destdir" && \
4287 func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
4288
4289 if test -n "$inst_prefix_dir"; then
4290 # Stick the inst_prefix_dir data into the link command.
4291 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
4292 else
4293 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
4294 fi
4295
4296 func_warning "relinking '$file'"
4297 func_show_eval "$relink_command" \
4298 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
4299 fi
4300
4301 # See the names of the shared library.
4302 set dummy $library_names; shift
4303 if test -n "$1"; then
4304 realname=$1
4305 shift
4306
4307 srcname=$realname
4308 test -n "$relink_command" && srcname=${realname}T
4309
4310 # Install the shared library and build the symlinks.
4311 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
4312 'exit $?'
4313 tstripme=$stripme
4314 case $host_os in
4315 cygwin* | mingw* | pw32* | cegcc*)
4316 case $realname in
4317 *.dll.a)
4318 tstripme=
4319 ;;
4320 esac
4321 ;;
4322 os2*)
4323 case $realname in
4324 *_dll.a)
4325 tstripme=
4326 ;;
4327 esac
4328 ;;
4329 esac
4330 if test -n "$tstripme" && test -n "$striplib"; then
4331 func_show_eval "$striplib $destdir/$realname" 'exit $?'
4332 fi
4333
4334 if test "$#" -gt 0; then
4335 # Delete the old symlinks, and create new ones.
4336 # Try 'ln -sf' first, because the 'ln' binary might depend on
4337 # the symlink we replace! Solaris /bin/ln does not understand -f,
4338 # so we also need to try rm && ln -s.
4339 for linkname
4340 do
4341 test "$linkname" != "$realname" \
4342 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
4343 done
4344 fi
4345
4346 # Do each command in the postinstall commands.
4347 lib=$destdir/$realname
4348 func_execute_cmds "$postinstall_cmds" 'exit $?'
4349 fi
4350
4351 # Install the pseudo-library for information purposes.
4352 func_basename "$file"
4353 name=$func_basename_result
4354 instname=$dir/${name}i
4355 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
4356
4357 # Maybe install the static library, too.
4358 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
4359 ;;
4360
4361 *.lo)
4362 # Install (i.e. copy) a libtool object.
4363
4364 # Figure out destination file name, if it wasn't already specified.
4365 if test -n "$destname"; then
4366 destfile=$destdir/$destname
4367 else
4368 func_basename "$file"
4369 destfile=$func_basename_result
4370 destfile=$destdir/$destfile
4371 fi
4372
4373 # Deduce the name of the destination old-style object file.
4374 case $destfile in
4375 *.lo)
4376 func_lo2o "$destfile"
4377 staticdest=$func_lo2o_result
4378 ;;
4379 *.$objext)
4380 staticdest=$destfile
4381 destfile=
4382 ;;
4383 *)
4384 func_fatal_help "cannot copy a libtool object to '$destfile'"
4385 ;;
4386 esac
4387
4388 # Install the libtool object if requested.
4389 test -n "$destfile" && \
4390 func_show_eval "$install_prog $file $destfile" 'exit $?'
4391
4392 # Install the old object if enabled.
4393 if test yes = "$build_old_libs"; then
4394 # Deduce the name of the old-style object file.
4395 func_lo2o "$file"
4396 staticobj=$func_lo2o_result
4397 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
4398 fi
4399 exit $EXIT_SUCCESS
4400 ;;
4401
4402 *)
4403 # Figure out destination file name, if it wasn't already specified.
4404 if test -n "$destname"; then
4405 destfile=$destdir/$destname
4406 else
4407 func_basename "$file"
4408 destfile=$func_basename_result
4409 destfile=$destdir/$destfile
4410 fi
4411
4412 # If the file is missing, and there is a .exe on the end, strip it
4413 # because it is most likely a libtool script we actually want to
4414 # install
4415 stripped_ext=
4416 case $file in
4417 *.exe)
4418 if test ! -f "$file"; then
4419 func_stripname '' '.exe' "$file"
4420 file=$func_stripname_result
4421 stripped_ext=.exe
4422 fi
4423 ;;
4424 esac
4425
4426 # Do a test to see if this is really a libtool program.
4427 case $host in
4428 *cygwin* | *mingw*)
4429 if func_ltwrapper_executable_p "$file"; then
4430 func_ltwrapper_scriptname "$file"
4431 wrapper=$func_ltwrapper_scriptname_result
4432 else
4433 func_stripname '' '.exe' "$file"
4434 wrapper=$func_stripname_result
4435 fi
4436 ;;
4437 *)
4438 wrapper=$file
4439 ;;
4440 esac
4441 if func_ltwrapper_script_p "$wrapper"; then
4442 notinst_deplibs=
4443 relink_command=
4444
4445 func_source "$wrapper"
4446
4447 # Check the variables that should have been set.
4448 test -z "$generated_by_libtool_version" && \
4449 func_fatal_error "invalid libtool wrapper script '$wrapper'"
4450
4451 finalize=:
4452 for lib in $notinst_deplibs; do
4453 # Check to see that each library is installed.
4454 libdir=
4455 if test -f "$lib"; then
4456 func_source "$lib"
4457 fi
4458 libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
4459 if test -n "$libdir" && test ! -f "$libfile"; then
4460 func_warning "'$lib' has not been installed in '$libdir'"
4461 finalize=false
4462 fi
4463 done
4464
4465 relink_command=
4466 func_source "$wrapper"
4467
4468 outputname=
4469 if test no = "$fast_install" && test -n "$relink_command"; then
4470 $opt_dry_run || {
4471 if $finalize; then
4472 tmpdir=`func_mktempdir`
4473 func_basename "$file$stripped_ext"
4474 file=$func_basename_result
4475 outputname=$tmpdir/$file
4476 # Replace the output file specification.
4477 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
4478
4479 $opt_quiet || {
4480 func_quote_for_expand "$relink_command"
4481 eval "func_echo $func_quote_for_expand_result"
4482 }
4483 if eval "$relink_command"; then :
4484 else
4485 func_error "error: relink '$file' with the above command before installing it"
4486 $opt_dry_run || ${RM}r "$tmpdir"
4487 continue
4488 fi
4489 file=$outputname
4490 else
4491 func_warning "cannot relink '$file'"
4492 fi
4493 }
4494 else
4495 # Install the binary that we compiled earlier.
4496 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
4497 fi
4498 fi
4499
4500 # remove .exe since cygwin /usr/bin/install will append another
4501 # one anyway
4502 case $install_prog,$host in
4503 */usr/bin/install*,*cygwin*)
4504 case $file:$destfile in
4505 *.exe:*.exe)
4506 # this is ok
4507 ;;
4508 *.exe:*)
4509 destfile=$destfile.exe
4510 ;;
4511 *:*.exe)
4512 func_stripname '' '.exe' "$destfile"
4513 destfile=$func_stripname_result
4514 ;;
4515 esac
4516 ;;
4517 esac
4518 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
4519 $opt_dry_run || if test -n "$outputname"; then
4520 ${RM}r "$tmpdir"
4521 fi
4522 ;;
4523 esac
4524 done
4525
4526 for file in $staticlibs; do
4527 func_basename "$file"
4528 name=$func_basename_result
4529
4530 # Set up the ranlib parameters.
4531 oldlib=$destdir/$name
4532 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
4533 tool_oldlib=$func_to_tool_file_result
4534
4535 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
4536
4537 if test -n "$stripme" && test -n "$old_striplib"; then
4538 func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
4539 fi
4540
4541 # Do each command in the postinstall commands.
4542 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
4543 done
4544
4545 test -n "$future_libdirs" && \
4546 func_warning "remember to run '$progname --finish$future_libdirs'"
4547
4548 if test -n "$current_libdirs"; then
4549 # Maybe just do a dry run.
4550 $opt_dry_run && current_libdirs=" -n$current_libdirs"
4551 exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
4552 else
4553 exit $EXIT_SUCCESS
4554 fi
4555 }
4556
4557 test install = "$opt_mode" && func_mode_install ${1+"$@"}
4558
4559
4560 # func_generate_dlsyms outputname originator pic_p
4561 # Extract symbols from dlprefiles and create ${outputname}S.o with
4562 # a dlpreopen symbol table.
4563 func_generate_dlsyms ()
4564 {
4565 $debug_cmd
4566
4567 my_outputname=$1
4568 my_originator=$2
4569 my_pic_p=${3-false}
4570 my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
4571 my_dlsyms=
4572
4573 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
4574 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4575 my_dlsyms=${my_outputname}S.c
4576 else
4577 func_error "not configured to extract global symbols from dlpreopened files"
4578 fi
4579 fi
4580
4581 if test -n "$my_dlsyms"; then
4582 case $my_dlsyms in
4583 "") ;;
4584 *.c)
4585 # Discover the nlist of each of the dlfiles.
4586 nlist=$output_objdir/$my_outputname.nm
4587
4588 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
4589
4590 # Parse the name list into a source file.
4591 func_verbose "creating $output_objdir/$my_dlsyms"
4592
4593 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
4594 /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
4595 /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
4596
4597 #ifdef __cplusplus
4598 extern \"C\" {
4599 #endif
4600
4601 #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
4602 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
4603 #endif
4604
4605 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4606 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4607 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4608 relocations are performed -- see ld's documentation on pseudo-relocs. */
4609 # define LT_DLSYM_CONST
4610 #elif defined __osf__
4611 /* This system does not cope well with relocations in const data. */
4612 # define LT_DLSYM_CONST
4613 #else
4614 # define LT_DLSYM_CONST const
4615 #endif
4616
4617 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
4618
4619 /* External symbol declarations for the compiler. */\
4620 "
4621
4622 if test yes = "$dlself"; then
4623 func_verbose "generating symbol list for '$output'"
4624
4625 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
4626
4627 # Add our own program objects to the symbol list.
4628 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
4629 for progfile in $progfiles; do
4630 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
4631 func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
4632 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
4633 done
4634
4635 if test -n "$exclude_expsyms"; then
4636 $opt_dry_run || {
4637 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4638 eval '$MV "$nlist"T "$nlist"'
4639 }
4640 fi
4641
4642 if test -n "$export_symbols_regex"; then
4643 $opt_dry_run || {
4644 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4645 eval '$MV "$nlist"T "$nlist"'
4646 }
4647 fi
4648
4649 # Prepare the list of exported symbols
4650 if test -z "$export_symbols"; then
4651 export_symbols=$output_objdir/$outputname.exp
4652 $opt_dry_run || {
4653 $RM $export_symbols
4654 eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4655 case $host in
4656 *cygwin* | *mingw* | *cegcc* )
4657 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4658 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4659 ;;
4660 esac
4661 }
4662 else
4663 $opt_dry_run || {
4664 eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4665 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4666 eval '$MV "$nlist"T "$nlist"'
4667 case $host in
4668 *cygwin* | *mingw* | *cegcc* )
4669 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4670 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4671 ;;
4672 esac
4673 }
4674 fi
4675 fi
4676
4677 for dlprefile in $dlprefiles; do
4678 func_verbose "extracting global C symbols from '$dlprefile'"
4679 func_basename "$dlprefile"
4680 name=$func_basename_result
4681 case $host in
4682 *cygwin* | *mingw* | *cegcc* )
4683 # if an import library, we need to obtain dlname
4684 if func_win32_import_lib_p "$dlprefile"; then
4685 func_tr_sh "$dlprefile"
4686 eval "curr_lafile=\$libfile_$func_tr_sh_result"
4687 dlprefile_dlbasename=
4688 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
4689 # Use subshell, to avoid clobbering current variable values
4690 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
4691 if test -n "$dlprefile_dlname"; then
4692 func_basename "$dlprefile_dlname"
4693 dlprefile_dlbasename=$func_basename_result
4694 else
4695 # no lafile. user explicitly requested -dlpreopen <import library>.
4696 $sharedlib_from_linklib_cmd "$dlprefile"
4697 dlprefile_dlbasename=$sharedlib_from_linklib_result
4698 fi
4699 fi
4700 $opt_dry_run || {
4701 if test -n "$dlprefile_dlbasename"; then
4702 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
4703 else
4704 func_warning "Could not compute DLL name from $name"
4705 eval '$ECHO ": $name " >> "$nlist"'
4706 fi
4707 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4708 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
4709 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
4710 }
4711 else # not an import lib
4712 $opt_dry_run || {
4713 eval '$ECHO ": $name " >> "$nlist"'
4714 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4715 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
4716 }
4717 fi
4718 ;;
4719 *)
4720 $opt_dry_run || {
4721 eval '$ECHO ": $name " >> "$nlist"'
4722 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4723 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
4724 }
4725 ;;
4726 esac
4727 done
4728
4729 $opt_dry_run || {
4730 # Make sure we have at least an empty file.
4731 test -f "$nlist" || : > "$nlist"
4732
4733 if test -n "$exclude_expsyms"; then
4734 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4735 $MV "$nlist"T "$nlist"
4736 fi
4737
4738 # Try sorting and uniquifying the output.
4739 if $GREP -v "^: " < "$nlist" |
4740 if sort -k 3 </dev/null >/dev/null 2>&1; then
4741 sort -k 3
4742 else
4743 sort +2
4744 fi |
4745 uniq > "$nlist"S; then
4746 :
4747 else
4748 $GREP -v "^: " < "$nlist" > "$nlist"S
4749 fi
4750
4751 if test -f "$nlist"S; then
4752 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
4753 else
4754 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
4755 fi
4756
4757 func_show_eval '$RM "${nlist}I"'
4758 if test -n "$global_symbol_to_import"; then
4759 eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
4760 fi
4761
4762 echo >> "$output_objdir/$my_dlsyms" "\
4763
4764 /* The mapping between symbol names and symbols. */
4765 typedef struct {
4766 const char *name;
4767 void *address;
4768 } lt_dlsymlist;
4769 extern LT_DLSYM_CONST lt_dlsymlist
4770 lt_${my_prefix}_LTX_preloaded_symbols[];\
4771 "
4772
4773 if test -s "$nlist"I; then
4774 echo >> "$output_objdir/$my_dlsyms" "\
4775 static void lt_syminit(void)
4776 {
4777 LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
4778 for (; symbol->name; ++symbol)
4779 {"
4780 $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
4781 echo >> "$output_objdir/$my_dlsyms" "\
4782 }
4783 }"
4784 fi
4785 echo >> "$output_objdir/$my_dlsyms" "\
4786 LT_DLSYM_CONST lt_dlsymlist
4787 lt_${my_prefix}_LTX_preloaded_symbols[] =
4788 { {\"$my_originator\", (void *) 0},"
4789
4790 if test -s "$nlist"I; then
4791 echo >> "$output_objdir/$my_dlsyms" "\
4792 {\"@INIT@\", (void *) &lt_syminit},"
4793 fi
4794
4795 case $need_lib_prefix in
4796 no)
4797 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
4798 ;;
4799 *)
4800 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
4801 ;;
4802 esac
4803 echo >> "$output_objdir/$my_dlsyms" "\
4804 {0, (void *) 0}
4805 };
4806
4807 /* This works around a problem in FreeBSD linker */
4808 #ifdef FREEBSD_WORKAROUND
4809 static const void *lt_preloaded_setup() {
4810 return lt_${my_prefix}_LTX_preloaded_symbols;
4811 }
4812 #endif
4813
4814 #ifdef __cplusplus
4815 }
4816 #endif\
4817 "
4818 } # !$opt_dry_run
4819
4820 pic_flag_for_symtable=
4821 case "$compile_command " in
4822 *" -static "*) ;;
4823 *)
4824 case $host in
4825 # compiling the symbol table file with pic_flag works around
4826 # a FreeBSD bug that causes programs to crash when -lm is
4827 # linked before any other PIC object. But we must not use
4828 # pic_flag when linking with -static. The problem exists in
4829 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4830 *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4831 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
4832 *-*-hpux*)
4833 pic_flag_for_symtable=" $pic_flag" ;;
4834 *)
4835 $my_pic_p && pic_flag_for_symtable=" $pic_flag"
4836 ;;
4837 esac
4838 ;;
4839 esac
4840 symtab_cflags=
4841 for arg in $LTCFLAGS; do
4842 case $arg in
4843 -pie | -fpie | -fPIE) ;;
4844 *) func_append symtab_cflags " $arg" ;;
4845 esac
4846 done
4847
4848 # Now compile the dynamic symbol file.
4849 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
4850
4851 # Clean up the generated files.
4852 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
4853
4854 # Transform the symbol file into the correct name.
4855 symfileobj=$output_objdir/${my_outputname}S.$objext
4856 case $host in
4857 *cygwin* | *mingw* | *cegcc* )
4858 if test -f "$output_objdir/$my_outputname.def"; then
4859 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
4860 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
4861 else
4862 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4863 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4864 fi
4865 ;;
4866 *)
4867 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4868 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4869 ;;
4870 esac
4871 ;;
4872 *)
4873 func_fatal_error "unknown suffix for '$my_dlsyms'"
4874 ;;
4875 esac
4876 else
4877 # We keep going just in case the user didn't refer to
4878 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4879 # really was required.
4880
4881 # Nullify the symbol file.
4882 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
4883 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
4884 fi
4885 }
4886
4887 # func_cygming_gnu_implib_p ARG
4888 # This predicate returns with zero status (TRUE) if
4889 # ARG is a GNU/binutils-style import library. Returns
4890 # with nonzero status (FALSE) otherwise.
4891 func_cygming_gnu_implib_p ()
4892 {
4893 $debug_cmd
4894
4895 func_to_tool_file "$1" func_convert_file_msys_to_w32
4896 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
4897 test -n "$func_cygming_gnu_implib_tmp"
4898 }
4899
4900 # func_cygming_ms_implib_p ARG
4901 # This predicate returns with zero status (TRUE) if
4902 # ARG is an MS-style import library. Returns
4903 # with nonzero status (FALSE) otherwise.
4904 func_cygming_ms_implib_p ()
4905 {
4906 $debug_cmd
4907
4908 func_to_tool_file "$1" func_convert_file_msys_to_w32
4909 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
4910 test -n "$func_cygming_ms_implib_tmp"
4911 }
4912
4913 # func_win32_libid arg
4914 # return the library type of file 'arg'
4915 #
4916 # Need a lot of goo to handle *both* DLLs and import libs
4917 # Has to be a shell function in order to 'eat' the argument
4918 # that is supplied when $file_magic_command is called.
4919 # Despite the name, also deal with 64 bit binaries.
4920 func_win32_libid ()
4921 {
4922 $debug_cmd
4923
4924 win32_libid_type=unknown
4925 win32_fileres=`file -L $1 2>/dev/null`
4926 case $win32_fileres in
4927 *ar\ archive\ import\ library*) # definitely import
4928 win32_libid_type="x86 archive import"
4929 ;;
4930 *ar\ archive*) # could be an import, or static
4931 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
4932 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
4933 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
4934 case $nm_interface in
4935 "MS dumpbin")
4936 if func_cygming_ms_implib_p "$1" ||
4937 func_cygming_gnu_implib_p "$1"
4938 then
4939 win32_nmres=import
4940 else
4941 win32_nmres=
4942 fi
4943 ;;
4944 *)
4945 func_to_tool_file "$1" func_convert_file_msys_to_w32
4946 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
4947 $SED -n -e '
4948 1,100{
4949 / I /{
4950 s|.*|import|
4951 p
4952 q
4953 }
4954 }'`
4955 ;;
4956 esac
4957 case $win32_nmres in
4958 import*) win32_libid_type="x86 archive import";;
4959 *) win32_libid_type="x86 archive static";;
4960 esac
4961 fi
4962 ;;
4963 *DLL*)
4964 win32_libid_type="x86 DLL"
4965 ;;
4966 *executable*) # but shell scripts are "executable" too...
4967 case $win32_fileres in
4968 *MS\ Windows\ PE\ Intel*)
4969 win32_libid_type="x86 DLL"
4970 ;;
4971 esac
4972 ;;
4973 esac
4974 $ECHO "$win32_libid_type"
4975 }
4976
4977 # func_cygming_dll_for_implib ARG
4978 #
4979 # Platform-specific function to extract the
4980 # name of the DLL associated with the specified
4981 # import library ARG.
4982 # Invoked by eval'ing the libtool variable
4983 # $sharedlib_from_linklib_cmd
4984 # Result is available in the variable
4985 # $sharedlib_from_linklib_result
4986 func_cygming_dll_for_implib ()
4987 {
4988 $debug_cmd
4989
4990 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
4991 }
4992
4993 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
4994 #
4995 # The is the core of a fallback implementation of a
4996 # platform-specific function to extract the name of the
4997 # DLL associated with the specified import library LIBNAME.
4998 #
4999 # SECTION_NAME is either .idata$6 or .idata$7, depending
5000 # on the platform and compiler that created the implib.
5001 #
5002 # Echos the name of the DLL associated with the
5003 # specified import library.
5004 func_cygming_dll_for_implib_fallback_core ()
5005 {
5006 $debug_cmd
5007
5008 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
5009 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
5010 $SED '/^Contents of section '"$match_literal"':/{
5011 # Place marker at beginning of archive member dllname section
5012 s/.*/====MARK====/
5013 p
5014 d
5015 }
5016 # These lines can sometimes be longer than 43 characters, but
5017 # are always uninteresting
5018 /:[ ]*file format pe[i]\{,1\}-/d
5019 /^In archive [^:]*:/d
5020 # Ensure marker is printed
5021 /^====MARK====/p
5022 # Remove all lines with less than 43 characters
5023 /^.\{43\}/!d
5024 # From remaining lines, remove first 43 characters
5025 s/^.\{43\}//' |
5026 $SED -n '
5027 # Join marker and all lines until next marker into a single line
5028 /^====MARK====/ b para
5029 H
5030 $ b para
5031 b
5032 :para
5033 x
5034 s/\n//g
5035 # Remove the marker
5036 s/^====MARK====//
5037 # Remove trailing dots and whitespace
5038 s/[\. \t]*$//
5039 # Print
5040 /./p' |
5041 # we now have a list, one entry per line, of the stringified
5042 # contents of the appropriate section of all members of the
5043 # archive that possess that section. Heuristic: eliminate
5044 # all those that have a first or second character that is
5045 # a '.' (that is, objdump's representation of an unprintable
5046 # character.) This should work for all archives with less than
5047 # 0x302f exports -- but will fail for DLLs whose name actually
5048 # begins with a literal '.' or a single character followed by
5049 # a '.'.
5050 #
5051 # Of those that remain, print the first one.
5052 $SED -e '/^\./d;/^.\./d;q'
5053 }
5054
5055 # func_cygming_dll_for_implib_fallback ARG
5056 # Platform-specific function to extract the
5057 # name of the DLL associated with the specified
5058 # import library ARG.
5059 #
5060 # This fallback implementation is for use when $DLLTOOL
5061 # does not support the --identify-strict option.
5062 # Invoked by eval'ing the libtool variable
5063 # $sharedlib_from_linklib_cmd
5064 # Result is available in the variable
5065 # $sharedlib_from_linklib_result
5066 func_cygming_dll_for_implib_fallback ()
5067 {
5068 $debug_cmd
5069
5070 if func_cygming_gnu_implib_p "$1"; then
5071 # binutils import library
5072 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
5073 elif func_cygming_ms_implib_p "$1"; then
5074 # ms-generated import library
5075 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
5076 else
5077 # unknown
5078 sharedlib_from_linklib_result=
5079 fi
5080 }
5081
5082
5083 # func_extract_an_archive dir oldlib
5084 func_extract_an_archive ()
5085 {
5086 $debug_cmd
5087
5088 f_ex_an_ar_dir=$1; shift
5089 f_ex_an_ar_oldlib=$1
5090 if test yes = "$lock_old_archive_extraction"; then
5091 lockfile=$f_ex_an_ar_oldlib.lock
5092 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
5093 func_echo "Waiting for $lockfile to be removed"
5094 sleep 2
5095 done
5096 fi
5097 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
5098 'stat=$?; rm -f "$lockfile"; exit $stat'
5099 if test yes = "$lock_old_archive_extraction"; then
5100 $opt_dry_run || rm -f "$lockfile"
5101 fi
5102 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
5103 :
5104 else
5105 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
5106 fi
5107 }
5108
5109
5110 # func_extract_archives gentop oldlib ...
5111 func_extract_archives ()
5112 {
5113 $debug_cmd
5114
5115 my_gentop=$1; shift
5116 my_oldlibs=${1+"$@"}
5117 my_oldobjs=
5118 my_xlib=
5119 my_xabs=
5120 my_xdir=
5121
5122 for my_xlib in $my_oldlibs; do
5123 # Extract the objects.
5124 case $my_xlib in
5125 [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
5126 *) my_xabs=`pwd`"/$my_xlib" ;;
5127 esac
5128 func_basename "$my_xlib"
5129 my_xlib=$func_basename_result
5130 my_xlib_u=$my_xlib
5131 while :; do
5132 case " $extracted_archives " in
5133 *" $my_xlib_u "*)
5134 func_arith $extracted_serial + 1
5135 extracted_serial=$func_arith_result
5136 my_xlib_u=lt$extracted_serial-$my_xlib ;;
5137 *) break ;;
5138 esac
5139 done
5140 extracted_archives="$extracted_archives $my_xlib_u"
5141 my_xdir=$my_gentop/$my_xlib_u
5142
5143 func_mkdir_p "$my_xdir"
5144
5145 case $host in
5146 *-darwin*)
5147 func_verbose "Extracting $my_xabs"
5148 # Do not bother doing anything if just a dry run
5149 $opt_dry_run || {
5150 darwin_orig_dir=`pwd`
5151 cd $my_xdir || exit $?
5152 darwin_archive=$my_xabs
5153 darwin_curdir=`pwd`
5154 func_basename "$darwin_archive"
5155 darwin_base_archive=$func_basename_result
5156 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
5157 if test -n "$darwin_arches"; then
5158 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
5159 darwin_arch=
5160 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
5161 for darwin_arch in $darwin_arches; do
5162 func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
5163 $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
5164 cd "unfat-$$/$darwin_base_archive-$darwin_arch"
5165 func_extract_an_archive "`pwd`" "$darwin_base_archive"
5166 cd "$darwin_curdir"
5167 $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
5168 done # $darwin_arches
5169 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
5170 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
5171 darwin_file=
5172 darwin_files=
5173 for darwin_file in $darwin_filelist; do
5174 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
5175 $LIPO -create -output "$darwin_file" $darwin_files
5176 done # $darwin_filelist
5177 $RM -rf unfat-$$
5178 cd "$darwin_orig_dir"
5179 else
5180 cd $darwin_orig_dir
5181 func_extract_an_archive "$my_xdir" "$my_xabs"
5182 fi # $darwin_arches
5183 } # !$opt_dry_run
5184 ;;
5185 *)
5186 func_extract_an_archive "$my_xdir" "$my_xabs"
5187 ;;
5188 esac
5189 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
5190 done
5191
5192 func_extract_archives_result=$my_oldobjs
5193 }
5194
5195
5196 # func_emit_wrapper [arg=no]
5197 #
5198 # Emit a libtool wrapper script on stdout.
5199 # Don't directly open a file because we may want to
5200 # incorporate the script contents within a cygwin/mingw
5201 # wrapper executable. Must ONLY be called from within
5202 # func_mode_link because it depends on a number of variables
5203 # set therein.
5204 #
5205 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
5206 # variable will take. If 'yes', then the emitted script
5207 # will assume that the directory where it is stored is
5208 # the $objdir directory. This is a cygwin/mingw-specific
5209 # behavior.
5210 func_emit_wrapper ()
5211 {
5212 func_emit_wrapper_arg1=${1-no}
5213
5214 $ECHO "\
5215 #! $SHELL
5216
5217 # $output - temporary wrapper script for $objdir/$outputname
5218 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
5219 #
5220 # The $output program cannot be directly executed until all the libtool
5221 # libraries that it depends on are installed.
5222 #
5223 # This wrapper script should never be moved out of the build directory.
5224 # If it is, it will not operate correctly.
5225
5226 # Sed substitution that helps us do robust quoting. It backslashifies
5227 # metacharacters that are still active within double-quoted strings.
5228 sed_quote_subst='$sed_quote_subst'
5229
5230 # Be Bourne compatible
5231 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5232 emulate sh
5233 NULLCMD=:
5234 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5235 # is contrary to our usage. Disable this feature.
5236 alias -g '\${1+\"\$@\"}'='\"\$@\"'
5237 setopt NO_GLOB_SUBST
5238 else
5239 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5240 fi
5241 BIN_SH=xpg4; export BIN_SH # for Tru64
5242 DUALCASE=1; export DUALCASE # for MKS sh
5243
5244 # The HP-UX ksh and POSIX shell print the target directory to stdout
5245 # if CDPATH is set.
5246 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5247
5248 relink_command=\"$relink_command\"
5249
5250 # This environment variable determines our operation mode.
5251 if test \"\$libtool_install_magic\" = \"$magic\"; then
5252 # install mode needs the following variables:
5253 generated_by_libtool_version='$macro_version'
5254 notinst_deplibs='$notinst_deplibs'
5255 else
5256 # When we are sourced in execute mode, \$file and \$ECHO are already set.
5257 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5258 file=\"\$0\""
5259
5260 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
5261 $ECHO "\
5262
5263 # A function that is used when there is no print builtin or printf.
5264 func_fallback_echo ()
5265 {
5266 eval 'cat <<_LTECHO_EOF
5267 \$1
5268 _LTECHO_EOF'
5269 }
5270 ECHO=\"$qECHO\"
5271 fi
5272
5273 # Very basic option parsing. These options are (a) specific to
5274 # the libtool wrapper, (b) are identical between the wrapper
5275 # /script/ and the wrapper /executable/ that is used only on
5276 # windows platforms, and (c) all begin with the string "--lt-"
5277 # (application programs are unlikely to have options that match
5278 # this pattern).
5279 #
5280 # There are only two supported options: --lt-debug and
5281 # --lt-dump-script. There is, deliberately, no --lt-help.
5282 #
5283 # The first argument to this parsing function should be the
5284 # script's $0 value, followed by "$@".
5285 lt_option_debug=
5286 func_parse_lt_options ()
5287 {
5288 lt_script_arg0=\$0
5289 shift
5290 for lt_opt
5291 do
5292 case \"\$lt_opt\" in
5293 --lt-debug) lt_option_debug=1 ;;
5294 --lt-dump-script)
5295 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
5296 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
5297 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
5298 cat \"\$lt_dump_D/\$lt_dump_F\"
5299 exit 0
5300 ;;
5301 --lt-*)
5302 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
5303 exit 1
5304 ;;
5305 esac
5306 done
5307
5308 # Print the debug banner immediately:
5309 if test -n \"\$lt_option_debug\"; then
5310 echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
5311 fi
5312 }
5313
5314 # Used when --lt-debug. Prints its arguments to stdout
5315 # (redirection is the responsibility of the caller)
5316 func_lt_dump_args ()
5317 {
5318 lt_dump_args_N=1;
5319 for lt_arg
5320 do
5321 \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
5322 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
5323 done
5324 }
5325
5326 # Core function for launching the target application
5327 func_exec_program_core ()
5328 {
5329 "
5330 case $host in
5331 # Backslashes separate directories on plain windows
5332 *-*-mingw | *-*-os2* | *-cegcc*)
5333 $ECHO "\
5334 if test -n \"\$lt_option_debug\"; then
5335 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
5336 func_lt_dump_args \${1+\"\$@\"} 1>&2
5337 fi
5338 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5339 "
5340 ;;
5341
5342 *)
5343 $ECHO "\
5344 if test -n \"\$lt_option_debug\"; then
5345 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
5346 func_lt_dump_args \${1+\"\$@\"} 1>&2
5347 fi
5348 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5349 "
5350 ;;
5351 esac
5352 $ECHO "\
5353 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
5354 exit 1
5355 }
5356
5357 # A function to encapsulate launching the target application
5358 # Strips options in the --lt-* namespace from \$@ and
5359 # launches target application with the remaining arguments.
5360 func_exec_program ()
5361 {
5362 case \" \$* \" in
5363 *\\ --lt-*)
5364 for lt_wr_arg
5365 do
5366 case \$lt_wr_arg in
5367 --lt-*) ;;
5368 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
5369 esac
5370 shift
5371 done ;;
5372 esac
5373 func_exec_program_core \${1+\"\$@\"}
5374 }
5375
5376 # Parse options
5377 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
5378
5379 # Find the directory that this script lives in.
5380 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
5381 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5382
5383 # Follow symbolic links until we get to the real thisdir.
5384 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
5385 while test -n \"\$file\"; do
5386 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
5387
5388 # If there was a directory component, then change thisdir.
5389 if test \"x\$destdir\" != \"x\$file\"; then
5390 case \"\$destdir\" in
5391 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5392 *) thisdir=\"\$thisdir/\$destdir\" ;;
5393 esac
5394 fi
5395
5396 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
5397 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
5398 done
5399
5400 # Usually 'no', except on cygwin/mingw when embedded into
5401 # the cwrapper.
5402 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
5403 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
5404 # special case for '.'
5405 if test \"\$thisdir\" = \".\"; then
5406 thisdir=\`pwd\`
5407 fi
5408 # remove .libs from thisdir
5409 case \"\$thisdir\" in
5410 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
5411 $objdir ) thisdir=. ;;
5412 esac
5413 fi
5414
5415 # Try to get the absolute directory name.
5416 absdir=\`cd \"\$thisdir\" && pwd\`
5417 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5418 "
5419
5420 if test yes = "$fast_install"; then
5421 $ECHO "\
5422 program=lt-'$outputname'$exeext
5423 progdir=\"\$thisdir/$objdir\"
5424
5425 if test ! -f \"\$progdir/\$program\" ||
5426 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
5427 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5428
5429 file=\"\$\$-\$program\"
5430
5431 if test ! -d \"\$progdir\"; then
5432 $MKDIR \"\$progdir\"
5433 else
5434 $RM \"\$progdir/\$file\"
5435 fi"
5436
5437 $ECHO "\
5438
5439 # relink executable if necessary
5440 if test -n \"\$relink_command\"; then
5441 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5442 else
5443 \$ECHO \"\$relink_command_output\" >&2
5444 $RM \"\$progdir/\$file\"
5445 exit 1
5446 fi
5447 fi
5448
5449 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5450 { $RM \"\$progdir/\$program\";
5451 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5452 $RM \"\$progdir/\$file\"
5453 fi"
5454 else
5455 $ECHO "\
5456 program='$outputname'
5457 progdir=\"\$thisdir/$objdir\"
5458 "
5459 fi
5460
5461 $ECHO "\
5462
5463 if test -f \"\$progdir/\$program\"; then"
5464
5465 # fixup the dll searchpath if we need to.
5466 #
5467 # Fix the DLL searchpath if we need to. Do this before prepending
5468 # to shlibpath, because on Windows, both are PATH and uninstalled
5469 # libraries must come first.
5470 if test -n "$dllsearchpath"; then
5471 $ECHO "\
5472 # Add the dll search path components to the executable PATH
5473 PATH=$dllsearchpath:\$PATH
5474 "
5475 fi
5476
5477 # Export our shlibpath_var if we have one.
5478 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5479 $ECHO "\
5480 # Add our own library path to $shlibpath_var
5481 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5482
5483 # Some systems cannot cope with colon-terminated $shlibpath_var
5484 # The second colon is a workaround for a bug in BeOS R4 sed
5485 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
5486
5487 export $shlibpath_var
5488 "
5489 fi
5490
5491 $ECHO "\
5492 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5493 # Run the actual program with our arguments.
5494 func_exec_program \${1+\"\$@\"}
5495 fi
5496 else
5497 # The program doesn't exist.
5498 \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
5499 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
5500 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
5501 exit 1
5502 fi
5503 fi\
5504 "
5505 }
5506
5507
5508 # func_emit_cwrapperexe_src
5509 # emit the source code for a wrapper executable on stdout
5510 # Must ONLY be called from within func_mode_link because
5511 # it depends on a number of variable set therein.
5512 func_emit_cwrapperexe_src ()
5513 {
5514 cat <<EOF
5515
5516 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5517 Generated by $PROGRAM (GNU $PACKAGE) $VERSION
5518
5519 The $output program cannot be directly executed until all the libtool
5520 libraries that it depends on are installed.
5521
5522 This wrapper executable should never be moved out of the build directory.
5523 If it is, it will not operate correctly.
5524 */
5525 EOF
5526 cat <<"EOF"
5527 #ifdef _MSC_VER
5528 # define _CRT_SECURE_NO_DEPRECATE 1
5529 #endif
5530 #include <stdio.h>
5531 #include <stdlib.h>
5532 #ifdef _MSC_VER
5533 # include <direct.h>
5534 # include <process.h>
5535 # include <io.h>
5536 #else
5537 # include <unistd.h>
5538 # include <stdint.h>
5539 # ifdef __CYGWIN__
5540 # include <io.h>
5541 # endif
5542 #endif
5543 #include <malloc.h>
5544 #include <stdarg.h>
5545 #include <assert.h>
5546 #include <string.h>
5547 #include <ctype.h>
5548 #include <errno.h>
5549 #include <fcntl.h>
5550 #include <sys/stat.h>
5551
5552 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
5553
5554 /* declarations of non-ANSI functions */
5555 #if defined __MINGW32__
5556 # ifdef __STRICT_ANSI__
5557 int _putenv (const char *);
5558 # endif
5559 #elif defined __CYGWIN__
5560 # ifdef __STRICT_ANSI__
5561 char *realpath (const char *, char *);
5562 int putenv (char *);
5563 int setenv (const char *, const char *, int);
5564 # endif
5565 /* #elif defined other_platform || defined ... */
5566 #endif
5567
5568 /* portability defines, excluding path handling macros */
5569 #if defined _MSC_VER
5570 # define setmode _setmode
5571 # define stat _stat
5572 # define chmod _chmod
5573 # define getcwd _getcwd
5574 # define putenv _putenv
5575 # define S_IXUSR _S_IEXEC
5576 #elif defined __MINGW32__
5577 # define setmode _setmode
5578 # define stat _stat
5579 # define chmod _chmod
5580 # define getcwd _getcwd
5581 # define putenv _putenv
5582 #elif defined __CYGWIN__
5583 # define HAVE_SETENV
5584 # define FOPEN_WB "wb"
5585 /* #elif defined other platforms ... */
5586 #endif
5587
5588 #if defined PATH_MAX
5589 # define LT_PATHMAX PATH_MAX
5590 #elif defined MAXPATHLEN
5591 # define LT_PATHMAX MAXPATHLEN
5592 #else
5593 # define LT_PATHMAX 1024
5594 #endif
5595
5596 #ifndef S_IXOTH
5597 # define S_IXOTH 0
5598 #endif
5599 #ifndef S_IXGRP
5600 # define S_IXGRP 0
5601 #endif
5602
5603 /* path handling portability macros */
5604 #ifndef DIR_SEPARATOR
5605 # define DIR_SEPARATOR '/'
5606 # define PATH_SEPARATOR ':'
5607 #endif
5608
5609 #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
5610 defined __OS2__
5611 # define HAVE_DOS_BASED_FILE_SYSTEM
5612 # define FOPEN_WB "wb"
5613 # ifndef DIR_SEPARATOR_2
5614 # define DIR_SEPARATOR_2 '\\'
5615 # endif
5616 # ifndef PATH_SEPARATOR_2
5617 # define PATH_SEPARATOR_2 ';'
5618 # endif
5619 #endif
5620
5621 #ifndef DIR_SEPARATOR_2
5622 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5623 #else /* DIR_SEPARATOR_2 */
5624 # define IS_DIR_SEPARATOR(ch) \
5625 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5626 #endif /* DIR_SEPARATOR_2 */
5627
5628 #ifndef PATH_SEPARATOR_2
5629 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5630 #else /* PATH_SEPARATOR_2 */
5631 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5632 #endif /* PATH_SEPARATOR_2 */
5633
5634 #ifndef FOPEN_WB
5635 # define FOPEN_WB "w"
5636 #endif
5637 #ifndef _O_BINARY
5638 # define _O_BINARY 0
5639 #endif
5640
5641 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5642 #define XFREE(stale) do { \
5643 if (stale) { free (stale); stale = 0; } \
5644 } while (0)
5645
5646 #if defined LT_DEBUGWRAPPER
5647 static int lt_debug = 1;
5648 #else
5649 static int lt_debug = 0;
5650 #endif
5651
5652 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
5653
5654 void *xmalloc (size_t num);
5655 char *xstrdup (const char *string);
5656 const char *base_name (const char *name);
5657 char *find_executable (const char *wrapper);
5658 char *chase_symlinks (const char *pathspec);
5659 int make_executable (const char *path);
5660 int check_executable (const char *path);
5661 char *strendzap (char *str, const char *pat);
5662 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
5663 void lt_fatal (const char *file, int line, const char *message, ...);
5664 static const char *nonnull (const char *s);
5665 static const char *nonempty (const char *s);
5666 void lt_setenv (const char *name, const char *value);
5667 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
5668 void lt_update_exe_path (const char *name, const char *value);
5669 void lt_update_lib_path (const char *name, const char *value);
5670 char **prepare_spawn (char **argv);
5671 void lt_dump_script (FILE *f);
5672 EOF
5673
5674 cat <<EOF
5675 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
5676 # define externally_visible volatile
5677 #else
5678 # define externally_visible __attribute__((externally_visible)) volatile
5679 #endif
5680 externally_visible const char * MAGIC_EXE = "$magic_exe";
5681 const char * LIB_PATH_VARNAME = "$shlibpath_var";
5682 EOF
5683
5684 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5685 func_to_host_path "$temp_rpath"
5686 cat <<EOF
5687 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
5688 EOF
5689 else
5690 cat <<"EOF"
5691 const char * LIB_PATH_VALUE = "";
5692 EOF
5693 fi
5694
5695 if test -n "$dllsearchpath"; then
5696 func_to_host_path "$dllsearchpath:"
5697 cat <<EOF
5698 const char * EXE_PATH_VARNAME = "PATH";
5699 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
5700 EOF
5701 else
5702 cat <<"EOF"
5703 const char * EXE_PATH_VARNAME = "";
5704 const char * EXE_PATH_VALUE = "";
5705 EOF
5706 fi
5707
5708 if test yes = "$fast_install"; then
5709 cat <<EOF
5710 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
5711 EOF
5712 else
5713 cat <<EOF
5714 const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
5715 EOF
5716 fi
5717
5718
5719 cat <<"EOF"
5720
5721 #define LTWRAPPER_OPTION_PREFIX "--lt-"
5722
5723 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
5724 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
5725 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
5726
5727 int
5728 main (int argc, char *argv[])
5729 {
5730 char **newargz;
5731 int newargc;
5732 char *tmp_pathspec;
5733 char *actual_cwrapper_path;
5734 char *actual_cwrapper_name;
5735 char *target_name;
5736 char *lt_argv_zero;
5737 int rval = 127;
5738
5739 int i;
5740
5741 program_name = (char *) xstrdup (base_name (argv[0]));
5742 newargz = XMALLOC (char *, (size_t) argc + 1);
5743
5744 /* very simple arg parsing; don't want to rely on getopt
5745 * also, copy all non cwrapper options to newargz, except
5746 * argz[0], which is handled differently
5747 */
5748 newargc=0;
5749 for (i = 1; i < argc; i++)
5750 {
5751 if (STREQ (argv[i], dumpscript_opt))
5752 {
5753 EOF
5754 case $host in
5755 *mingw* | *cygwin* )
5756 # make stdout use "unix" line endings
5757 echo " setmode(1,_O_BINARY);"
5758 ;;
5759 esac
5760
5761 cat <<"EOF"
5762 lt_dump_script (stdout);
5763 return 0;
5764 }
5765 if (STREQ (argv[i], debug_opt))
5766 {
5767 lt_debug = 1;
5768 continue;
5769 }
5770 if (STREQ (argv[i], ltwrapper_option_prefix))
5771 {
5772 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
5773 namespace, but it is not one of the ones we know about and
5774 have already dealt with, above (inluding dump-script), then
5775 report an error. Otherwise, targets might begin to believe
5776 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
5777 namespace. The first time any user complains about this, we'll
5778 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
5779 or a configure.ac-settable value.
5780 */
5781 lt_fatal (__FILE__, __LINE__,
5782 "unrecognized %s option: '%s'",
5783 ltwrapper_option_prefix, argv[i]);
5784 }
5785 /* otherwise ... */
5786 newargz[++newargc] = xstrdup (argv[i]);
5787 }
5788 newargz[++newargc] = NULL;
5789
5790 EOF
5791 cat <<EOF
5792 /* The GNU banner must be the first non-error debug message */
5793 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
5794 EOF
5795 cat <<"EOF"
5796 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
5797 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
5798
5799 tmp_pathspec = find_executable (argv[0]);
5800 if (tmp_pathspec == NULL)
5801 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
5802 lt_debugprintf (__FILE__, __LINE__,
5803 "(main) found exe (before symlink chase) at: %s\n",
5804 tmp_pathspec);
5805
5806 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
5807 lt_debugprintf (__FILE__, __LINE__,
5808 "(main) found exe (after symlink chase) at: %s\n",
5809 actual_cwrapper_path);
5810 XFREE (tmp_pathspec);
5811
5812 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
5813 strendzap (actual_cwrapper_path, actual_cwrapper_name);
5814
5815 /* wrapper name transforms */
5816 strendzap (actual_cwrapper_name, ".exe");
5817 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
5818 XFREE (actual_cwrapper_name);
5819 actual_cwrapper_name = tmp_pathspec;
5820 tmp_pathspec = 0;
5821
5822 /* target_name transforms -- use actual target program name; might have lt- prefix */
5823 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
5824 strendzap (target_name, ".exe");
5825 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
5826 XFREE (target_name);
5827 target_name = tmp_pathspec;
5828 tmp_pathspec = 0;
5829
5830 lt_debugprintf (__FILE__, __LINE__,
5831 "(main) libtool target name: %s\n",
5832 target_name);
5833 EOF
5834
5835 cat <<EOF
5836 newargz[0] =
5837 XMALLOC (char, (strlen (actual_cwrapper_path) +
5838 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
5839 strcpy (newargz[0], actual_cwrapper_path);
5840 strcat (newargz[0], "$objdir");
5841 strcat (newargz[0], "/");
5842 EOF
5843
5844 cat <<"EOF"
5845 /* stop here, and copy so we don't have to do this twice */
5846 tmp_pathspec = xstrdup (newargz[0]);
5847
5848 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
5849 strcat (newargz[0], actual_cwrapper_name);
5850
5851 /* DO want the lt- prefix here if it exists, so use target_name */
5852 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
5853 XFREE (tmp_pathspec);
5854 tmp_pathspec = NULL;
5855 EOF
5856
5857 case $host_os in
5858 mingw*)
5859 cat <<"EOF"
5860 {
5861 char* p;
5862 while ((p = strchr (newargz[0], '\\')) != NULL)
5863 {
5864 *p = '/';
5865 }
5866 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
5867 {
5868 *p = '/';
5869 }
5870 }
5871 EOF
5872 ;;
5873 esac
5874
5875 cat <<"EOF"
5876 XFREE (target_name);
5877 XFREE (actual_cwrapper_path);
5878 XFREE (actual_cwrapper_name);
5879
5880 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
5881 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
5882 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
5883 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
5884 because on Windows, both *_VARNAMEs are PATH but uninstalled
5885 libraries must come first. */
5886 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
5887 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
5888
5889 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
5890 nonnull (lt_argv_zero));
5891 for (i = 0; i < newargc; i++)
5892 {
5893 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
5894 i, nonnull (newargz[i]));
5895 }
5896
5897 EOF
5898
5899 case $host_os in
5900 mingw*)
5901 cat <<"EOF"
5902 /* execv doesn't actually work on mingw as expected on unix */
5903 newargz = prepare_spawn (newargz);
5904 rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
5905 if (rval == -1)
5906 {
5907 /* failed to start process */
5908 lt_debugprintf (__FILE__, __LINE__,
5909 "(main) failed to launch target \"%s\": %s\n",
5910 lt_argv_zero, nonnull (strerror (errno)));
5911 return 127;
5912 }
5913 return rval;
5914 EOF
5915 ;;
5916 *)
5917 cat <<"EOF"
5918 execv (lt_argv_zero, newargz);
5919 return rval; /* =127, but avoids unused variable warning */
5920 EOF
5921 ;;
5922 esac
5923
5924 cat <<"EOF"
5925 }
5926
5927 void *
5928 xmalloc (size_t num)
5929 {
5930 void *p = (void *) malloc (num);
5931 if (!p)
5932 lt_fatal (__FILE__, __LINE__, "memory exhausted");
5933
5934 return p;
5935 }
5936
5937 char *
5938 xstrdup (const char *string)
5939 {
5940 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
5941 string) : NULL;
5942 }
5943
5944 const char *
5945 base_name (const char *name)
5946 {
5947 const char *base;
5948
5949 #if defined HAVE_DOS_BASED_FILE_SYSTEM
5950 /* Skip over the disk name in MSDOS pathnames. */
5951 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
5952 name += 2;
5953 #endif
5954
5955 for (base = name; *name; name++)
5956 if (IS_DIR_SEPARATOR (*name))
5957 base = name + 1;
5958 return base;
5959 }
5960
5961 int
5962 check_executable (const char *path)
5963 {
5964 struct stat st;
5965
5966 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
5967 nonempty (path));
5968 if ((!path) || (!*path))
5969 return 0;
5970
5971 if ((stat (path, &st) >= 0)
5972 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
5973 return 1;
5974 else
5975 return 0;
5976 }
5977
5978 int
5979 make_executable (const char *path)
5980 {
5981 int rval = 0;
5982 struct stat st;
5983
5984 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
5985 nonempty (path));
5986 if ((!path) || (!*path))
5987 return 0;
5988
5989 if (stat (path, &st) >= 0)
5990 {
5991 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
5992 }
5993 return rval;
5994 }
5995
5996 /* Searches for the full path of the wrapper. Returns
5997 newly allocated full path name if found, NULL otherwise
5998 Does not chase symlinks, even on platforms that support them.
5999 */
6000 char *
6001 find_executable (const char *wrapper)
6002 {
6003 int has_slash = 0;
6004 const char *p;
6005 const char *p_next;
6006 /* static buffer for getcwd */
6007 char tmp[LT_PATHMAX + 1];
6008 size_t tmp_len;
6009 char *concat_name;
6010
6011 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
6012 nonempty (wrapper));
6013
6014 if ((wrapper == NULL) || (*wrapper == '\0'))
6015 return NULL;
6016
6017 /* Absolute path? */
6018 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6019 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
6020 {
6021 concat_name = xstrdup (wrapper);
6022 if (check_executable (concat_name))
6023 return concat_name;
6024 XFREE (concat_name);
6025 }
6026 else
6027 {
6028 #endif
6029 if (IS_DIR_SEPARATOR (wrapper[0]))
6030 {
6031 concat_name = xstrdup (wrapper);
6032 if (check_executable (concat_name))
6033 return concat_name;
6034 XFREE (concat_name);
6035 }
6036 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6037 }
6038 #endif
6039
6040 for (p = wrapper; *p; p++)
6041 if (*p == '/')
6042 {
6043 has_slash = 1;
6044 break;
6045 }
6046 if (!has_slash)
6047 {
6048 /* no slashes; search PATH */
6049 const char *path = getenv ("PATH");
6050 if (path != NULL)
6051 {
6052 for (p = path; *p; p = p_next)
6053 {
6054 const char *q;
6055 size_t p_len;
6056 for (q = p; *q; q++)
6057 if (IS_PATH_SEPARATOR (*q))
6058 break;
6059 p_len = (size_t) (q - p);
6060 p_next = (*q == '\0' ? q : q + 1);
6061 if (p_len == 0)
6062 {
6063 /* empty path: current directory */
6064 if (getcwd (tmp, LT_PATHMAX) == NULL)
6065 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
6066 nonnull (strerror (errno)));
6067 tmp_len = strlen (tmp);
6068 concat_name =
6069 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
6070 memcpy (concat_name, tmp, tmp_len);
6071 concat_name[tmp_len] = '/';
6072 strcpy (concat_name + tmp_len + 1, wrapper);
6073 }
6074 else
6075 {
6076 concat_name =
6077 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
6078 memcpy (concat_name, p, p_len);
6079 concat_name[p_len] = '/';
6080 strcpy (concat_name + p_len + 1, wrapper);
6081 }
6082 if (check_executable (concat_name))
6083 return concat_name;
6084 XFREE (concat_name);
6085 }
6086 }
6087 /* not found in PATH; assume curdir */
6088 }
6089 /* Relative path | not found in path: prepend cwd */
6090 if (getcwd (tmp, LT_PATHMAX) == NULL)
6091 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
6092 nonnull (strerror (errno)));
6093 tmp_len = strlen (tmp);
6094 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
6095 memcpy (concat_name, tmp, tmp_len);
6096 concat_name[tmp_len] = '/';
6097 strcpy (concat_name + tmp_len + 1, wrapper);
6098
6099 if (check_executable (concat_name))
6100 return concat_name;
6101 XFREE (concat_name);
6102 return NULL;
6103 }
6104
6105 char *
6106 chase_symlinks (const char *pathspec)
6107 {
6108 #ifndef S_ISLNK
6109 return xstrdup (pathspec);
6110 #else
6111 char buf[LT_PATHMAX];
6112 struct stat s;
6113 char *tmp_pathspec = xstrdup (pathspec);
6114 char *p;
6115 int has_symlinks = 0;
6116 while (strlen (tmp_pathspec) && !has_symlinks)
6117 {
6118 lt_debugprintf (__FILE__, __LINE__,
6119 "checking path component for symlinks: %s\n",
6120 tmp_pathspec);
6121 if (lstat (tmp_pathspec, &s) == 0)
6122 {
6123 if (S_ISLNK (s.st_mode) != 0)
6124 {
6125 has_symlinks = 1;
6126 break;
6127 }
6128
6129 /* search backwards for last DIR_SEPARATOR */
6130 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
6131 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
6132 p--;
6133 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
6134 {
6135 /* no more DIR_SEPARATORS left */
6136 break;
6137 }
6138 *p = '\0';
6139 }
6140 else
6141 {
6142 lt_fatal (__FILE__, __LINE__,
6143 "error accessing file \"%s\": %s",
6144 tmp_pathspec, nonnull (strerror (errno)));
6145 }
6146 }
6147 XFREE (tmp_pathspec);
6148
6149 if (!has_symlinks)
6150 {
6151 return xstrdup (pathspec);
6152 }
6153
6154 tmp_pathspec = realpath (pathspec, buf);
6155 if (tmp_pathspec == 0)
6156 {
6157 lt_fatal (__FILE__, __LINE__,
6158 "could not follow symlinks for %s", pathspec);
6159 }
6160 return xstrdup (tmp_pathspec);
6161 #endif
6162 }
6163
6164 char *
6165 strendzap (char *str, const char *pat)
6166 {
6167 size_t len, patlen;
6168
6169 assert (str != NULL);
6170 assert (pat != NULL);
6171
6172 len = strlen (str);
6173 patlen = strlen (pat);
6174
6175 if (patlen <= len)
6176 {
6177 str += len - patlen;
6178 if (STREQ (str, pat))
6179 *str = '\0';
6180 }
6181 return str;
6182 }
6183
6184 void
6185 lt_debugprintf (const char *file, int line, const char *fmt, ...)
6186 {
6187 va_list args;
6188 if (lt_debug)
6189 {
6190 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
6191 va_start (args, fmt);
6192 (void) vfprintf (stderr, fmt, args);
6193 va_end (args);
6194 }
6195 }
6196
6197 static void
6198 lt_error_core (int exit_status, const char *file,
6199 int line, const char *mode,
6200 const char *message, va_list ap)
6201 {
6202 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
6203 vfprintf (stderr, message, ap);
6204 fprintf (stderr, ".\n");
6205
6206 if (exit_status >= 0)
6207 exit (exit_status);
6208 }
6209
6210 void
6211 lt_fatal (const char *file, int line, const char *message, ...)
6212 {
6213 va_list ap;
6214 va_start (ap, message);
6215 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
6216 va_end (ap);
6217 }
6218
6219 static const char *
6220 nonnull (const char *s)
6221 {
6222 return s ? s : "(null)";
6223 }
6224
6225 static const char *
6226 nonempty (const char *s)
6227 {
6228 return (s && !*s) ? "(empty)" : nonnull (s);
6229 }
6230
6231 void
6232 lt_setenv (const char *name, const char *value)
6233 {
6234 lt_debugprintf (__FILE__, __LINE__,
6235 "(lt_setenv) setting '%s' to '%s'\n",
6236 nonnull (name), nonnull (value));
6237 {
6238 #ifdef HAVE_SETENV
6239 /* always make a copy, for consistency with !HAVE_SETENV */
6240 char *str = xstrdup (value);
6241 setenv (name, str, 1);
6242 #else
6243 size_t len = strlen (name) + 1 + strlen (value) + 1;
6244 char *str = XMALLOC (char, len);
6245 sprintf (str, "%s=%s", name, value);
6246 if (putenv (str) != EXIT_SUCCESS)
6247 {
6248 XFREE (str);
6249 }
6250 #endif
6251 }
6252 }
6253
6254 char *
6255 lt_extend_str (const char *orig_value, const char *add, int to_end)
6256 {
6257 char *new_value;
6258 if (orig_value && *orig_value)
6259 {
6260 size_t orig_value_len = strlen (orig_value);
6261 size_t add_len = strlen (add);
6262 new_value = XMALLOC (char, add_len + orig_value_len + 1);
6263 if (to_end)
6264 {
6265 strcpy (new_value, orig_value);
6266 strcpy (new_value + orig_value_len, add);
6267 }
6268 else
6269 {
6270 strcpy (new_value, add);
6271 strcpy (new_value + add_len, orig_value);
6272 }
6273 }
6274 else
6275 {
6276 new_value = xstrdup (add);
6277 }
6278 return new_value;
6279 }
6280
6281 void
6282 lt_update_exe_path (const char *name, const char *value)
6283 {
6284 lt_debugprintf (__FILE__, __LINE__,
6285 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
6286 nonnull (name), nonnull (value));
6287
6288 if (name && *name && value && *value)
6289 {
6290 char *new_value = lt_extend_str (getenv (name), value, 0);
6291 /* some systems can't cope with a ':'-terminated path #' */
6292 size_t len = strlen (new_value);
6293 while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
6294 {
6295 new_value[--len] = '\0';
6296 }
6297 lt_setenv (name, new_value);
6298 XFREE (new_value);
6299 }
6300 }
6301
6302 void
6303 lt_update_lib_path (const char *name, const char *value)
6304 {
6305 lt_debugprintf (__FILE__, __LINE__,
6306 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
6307 nonnull (name), nonnull (value));
6308
6309 if (name && *name && value && *value)
6310 {
6311 char *new_value = lt_extend_str (getenv (name), value, 0);
6312 lt_setenv (name, new_value);
6313 XFREE (new_value);
6314 }
6315 }
6316
6317 EOF
6318 case $host_os in
6319 mingw*)
6320 cat <<"EOF"
6321
6322 /* Prepares an argument vector before calling spawn().
6323 Note that spawn() does not by itself call the command interpreter
6324 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
6325 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
6326 GetVersionEx(&v);
6327 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
6328 }) ? "cmd.exe" : "command.com").
6329 Instead it simply concatenates the arguments, separated by ' ', and calls
6330 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
6331 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
6332 special way:
6333 - Space and tab are interpreted as delimiters. They are not treated as
6334 delimiters if they are surrounded by double quotes: "...".
6335 - Unescaped double quotes are removed from the input. Their only effect is
6336 that within double quotes, space and tab are treated like normal
6337 characters.
6338 - Backslashes not followed by double quotes are not special.
6339 - But 2*n+1 backslashes followed by a double quote become
6340 n backslashes followed by a double quote (n >= 0):
6341 \" -> "
6342 \\\" -> \"
6343 \\\\\" -> \\"
6344 */
6345 #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
6346 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
6347 char **
6348 prepare_spawn (char **argv)
6349 {
6350 size_t argc;
6351 char **new_argv;
6352 size_t i;
6353
6354 /* Count number of arguments. */
6355 for (argc = 0; argv[argc] != NULL; argc++)
6356 ;
6357
6358 /* Allocate new argument vector. */
6359 new_argv = XMALLOC (char *, argc + 1);
6360
6361 /* Put quoted arguments into the new argument vector. */
6362 for (i = 0; i < argc; i++)
6363 {
6364 const char *string = argv[i];
6365
6366 if (string[0] == '\0')
6367 new_argv[i] = xstrdup ("\"\"");
6368 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
6369 {
6370 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
6371 size_t length;
6372 unsigned int backslashes;
6373 const char *s;
6374 char *quoted_string;
6375 char *p;
6376
6377 length = 0;
6378 backslashes = 0;
6379 if (quote_around)
6380 length++;
6381 for (s = string; *s != '\0'; s++)
6382 {
6383 char c = *s;
6384 if (c == '"')
6385 length += backslashes + 1;
6386 length++;
6387 if (c == '\\')
6388 backslashes++;
6389 else
6390 backslashes = 0;
6391 }
6392 if (quote_around)
6393 length += backslashes + 1;
6394
6395 quoted_string = XMALLOC (char, length + 1);
6396
6397 p = quoted_string;
6398 backslashes = 0;
6399 if (quote_around)
6400 *p++ = '"';
6401 for (s = string; *s != '\0'; s++)
6402 {
6403 char c = *s;
6404 if (c == '"')
6405 {
6406 unsigned int j;
6407 for (j = backslashes + 1; j > 0; j--)
6408 *p++ = '\\';
6409 }
6410 *p++ = c;
6411 if (c == '\\')
6412 backslashes++;
6413 else
6414 backslashes = 0;
6415 }
6416 if (quote_around)
6417 {
6418 unsigned int j;
6419 for (j = backslashes; j > 0; j--)
6420 *p++ = '\\';
6421 *p++ = '"';
6422 }
6423 *p = '\0';
6424
6425 new_argv[i] = quoted_string;
6426 }
6427 else
6428 new_argv[i] = (char *) string;
6429 }
6430 new_argv[argc] = NULL;
6431
6432 return new_argv;
6433 }
6434 EOF
6435 ;;
6436 esac
6437
6438 cat <<"EOF"
6439 void lt_dump_script (FILE* f)
6440 {
6441 EOF
6442 func_emit_wrapper yes |
6443 $SED -n -e '
6444 s/^\(.\{79\}\)\(..*\)/\1\
6445 \2/
6446 h
6447 s/\([\\"]\)/\\\1/g
6448 s/$/\\n/
6449 s/\([^\n]*\).*/ fputs ("\1", f);/p
6450 g
6451 D'
6452 cat <<"EOF"
6453 }
6454 EOF
6455 }
6456 # end: func_emit_cwrapperexe_src
6457
6458 # func_win32_import_lib_p ARG
6459 # True if ARG is an import lib, as indicated by $file_magic_cmd
6460 func_win32_import_lib_p ()
6461 {
6462 $debug_cmd
6463
6464 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
6465 *import*) : ;;
6466 *) false ;;
6467 esac
6468 }
6469
6470 # func_suncc_cstd_abi
6471 # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
6472 # Several compiler flags select an ABI that is incompatible with the
6473 # Cstd library. Avoid specifying it if any are in CXXFLAGS.
6474 func_suncc_cstd_abi ()
6475 {
6476 $debug_cmd
6477
6478 case " $compile_command " in
6479 *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
6480 suncc_use_cstd_abi=no
6481 ;;
6482 *)
6483 suncc_use_cstd_abi=yes
6484 ;;
6485 esac
6486 }
6487
6488 # func_mode_link arg...
6489 func_mode_link ()
6490 {
6491 $debug_cmd
6492
6493 case $host in
6494 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
6495 # It is impossible to link a dll without this setting, and
6496 # we shouldn't force the makefile maintainer to figure out
6497 # what system we are compiling for in order to pass an extra
6498 # flag for every libtool invocation.
6499 # allow_undefined=no
6500
6501 # FIXME: Unfortunately, there are problems with the above when trying
6502 # to make a dll that has undefined symbols, in which case not
6503 # even a static library is built. For now, we need to specify
6504 # -no-undefined on the libtool link line when we can be certain
6505 # that all symbols are satisfied, otherwise we get a static library.
6506 allow_undefined=yes
6507 ;;
6508 *)
6509 allow_undefined=yes
6510 ;;
6511 esac
6512 libtool_args=$nonopt
6513 base_compile="$nonopt $@"
6514 compile_command=$nonopt
6515 finalize_command=$nonopt
6516
6517 compile_rpath=
6518 finalize_rpath=
6519 compile_shlibpath=
6520 finalize_shlibpath=
6521 convenience=
6522 old_convenience=
6523 deplibs=
6524 old_deplibs=
6525 compiler_flags=
6526 linker_flags=
6527 dllsearchpath=
6528 lib_search_path=`pwd`
6529 inst_prefix_dir=
6530 new_inherited_linker_flags=
6531
6532 avoid_version=no
6533 bindir=
6534 dlfiles=
6535 dlprefiles=
6536 dlself=no
6537 export_dynamic=no
6538 export_symbols=
6539 export_symbols_regex=
6540 generated=
6541 libobjs=
6542 ltlibs=
6543 module=no
6544 no_install=no
6545 objs=
6546 os2dllname=
6547 non_pic_objects=
6548 precious_files_regex=
6549 prefer_static_libs=no
6550 preload=false
6551 prev=
6552 prevarg=
6553 release=
6554 rpath=
6555 xrpath=
6556 perm_rpath=
6557 temp_rpath=
6558 thread_safe=no
6559 vinfo=
6560 vinfo_number=no
6561 weak_libs=
6562 single_module=$wl-single_module
6563 func_infer_tag $base_compile
6564
6565 # We need to know -static, to get the right output filenames.
6566 for arg
6567 do
6568 case $arg in
6569 -shared)
6570 test yes != "$build_libtool_libs" \
6571 && func_fatal_configuration "cannot build a shared library"
6572 build_old_libs=no
6573 break
6574 ;;
6575 -all-static | -static | -static-libtool-libs)
6576 case $arg in
6577 -all-static)
6578 if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
6579 func_warning "complete static linking is impossible in this configuration"
6580 fi
6581 if test -n "$link_static_flag"; then
6582 dlopen_self=$dlopen_self_static
6583 fi
6584 prefer_static_libs=yes
6585 ;;
6586 -static)
6587 if test -z "$pic_flag" && test -n "$link_static_flag"; then
6588 dlopen_self=$dlopen_self_static
6589 fi
6590 prefer_static_libs=built
6591 ;;
6592 -static-libtool-libs)
6593 if test -z "$pic_flag" && test -n "$link_static_flag"; then
6594 dlopen_self=$dlopen_self_static
6595 fi
6596 prefer_static_libs=yes
6597 ;;
6598 esac
6599 build_libtool_libs=no
6600 build_old_libs=yes
6601 break
6602 ;;
6603 esac
6604 done
6605
6606 # See if our shared archives depend on static archives.
6607 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
6608
6609 # Go through the arguments, transforming them on the way.
6610 while test "$#" -gt 0; do
6611 arg=$1
6612 shift
6613 func_quote_for_eval "$arg"
6614 qarg=$func_quote_for_eval_unquoted_result
6615 func_append libtool_args " $func_quote_for_eval_result"
6616
6617 # If the previous option needs an argument, assign it.
6618 if test -n "$prev"; then
6619 case $prev in
6620 output)
6621 func_append compile_command " @OUTPUT@"
6622 func_append finalize_command " @OUTPUT@"
6623 ;;
6624 esac
6625
6626 case $prev in
6627 bindir)
6628 bindir=$arg
6629 prev=
6630 continue
6631 ;;
6632 dlfiles|dlprefiles)
6633 $preload || {
6634 # Add the symbol object into the linking commands.
6635 func_append compile_command " @SYMFILE@"
6636 func_append finalize_command " @SYMFILE@"
6637 preload=:
6638 }
6639 case $arg in
6640 *.la | *.lo) ;; # We handle these cases below.
6641 force)
6642 if test no = "$dlself"; then
6643 dlself=needless
6644 export_dynamic=yes
6645 fi
6646 prev=
6647 continue
6648 ;;
6649 self)
6650 if test dlprefiles = "$prev"; then
6651 dlself=yes
6652 elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
6653 dlself=yes
6654 else
6655 dlself=needless
6656 export_dynamic=yes
6657 fi
6658 prev=
6659 continue
6660 ;;
6661 *)
6662 if test dlfiles = "$prev"; then
6663 func_append dlfiles " $arg"
6664 else
6665 func_append dlprefiles " $arg"
6666 fi
6667 prev=
6668 continue
6669 ;;
6670 esac
6671 ;;
6672 expsyms)
6673 export_symbols=$arg
6674 test -f "$arg" \
6675 || func_fatal_error "symbol file '$arg' does not exist"
6676 prev=
6677 continue
6678 ;;
6679 expsyms_regex)
6680 export_symbols_regex=$arg
6681 prev=
6682 continue
6683 ;;
6684 framework)
6685 case $host in
6686 *-*-darwin*)
6687 case "$deplibs " in
6688 *" $qarg.ltframework "*) ;;
6689 *) func_append deplibs " $qarg.ltframework" # this is fixed later
6690 ;;
6691 esac
6692 ;;
6693 esac
6694 prev=
6695 continue
6696 ;;
6697 inst_prefix)
6698 inst_prefix_dir=$arg
6699 prev=
6700 continue
6701 ;;
6702 mllvm)
6703 # Clang does not use LLVM to link, so we can simply discard any
6704 # '-mllvm $arg' options when doing the link step.
6705 prev=
6706 continue
6707 ;;
6708 objectlist)
6709 if test -f "$arg"; then
6710 save_arg=$arg
6711 moreargs=
6712 for fil in `cat "$save_arg"`
6713 do
6714 # func_append moreargs " $fil"
6715 arg=$fil
6716 # A libtool-controlled object.
6717
6718 # Check to see that this really is a libtool object.
6719 if func_lalib_unsafe_p "$arg"; then
6720 pic_object=
6721 non_pic_object=
6722
6723 # Read the .lo file
6724 func_source "$arg"
6725
6726 if test -z "$pic_object" ||
6727 test -z "$non_pic_object" ||
6728 test none = "$pic_object" &&
6729 test none = "$non_pic_object"; then
6730 func_fatal_error "cannot find name of object for '$arg'"
6731 fi
6732
6733 # Extract subdirectory from the argument.
6734 func_dirname "$arg" "/" ""
6735 xdir=$func_dirname_result
6736
6737 if test none != "$pic_object"; then
6738 # Prepend the subdirectory the object is found in.
6739 pic_object=$xdir$pic_object
6740
6741 if test dlfiles = "$prev"; then
6742 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
6743 func_append dlfiles " $pic_object"
6744 prev=
6745 continue
6746 else
6747 # If libtool objects are unsupported, then we need to preload.
6748 prev=dlprefiles
6749 fi
6750 fi
6751
6752 # CHECK ME: I think I busted this. -Ossama
6753 if test dlprefiles = "$prev"; then
6754 # Preload the old-style object.
6755 func_append dlprefiles " $pic_object"
6756 prev=
6757 fi
6758
6759 # A PIC object.
6760 func_append libobjs " $pic_object"
6761 arg=$pic_object
6762 fi
6763
6764 # Non-PIC object.
6765 if test none != "$non_pic_object"; then
6766 # Prepend the subdirectory the object is found in.
6767 non_pic_object=$xdir$non_pic_object
6768
6769 # A standard non-PIC object
6770 func_append non_pic_objects " $non_pic_object"
6771 if test -z "$pic_object" || test none = "$pic_object"; then
6772 arg=$non_pic_object
6773 fi
6774 else
6775 # If the PIC object exists, use it instead.
6776 # $xdir was prepended to $pic_object above.
6777 non_pic_object=$pic_object
6778 func_append non_pic_objects " $non_pic_object"
6779 fi
6780 else
6781 # Only an error if not doing a dry-run.
6782 if $opt_dry_run; then
6783 # Extract subdirectory from the argument.
6784 func_dirname "$arg" "/" ""
6785 xdir=$func_dirname_result
6786
6787 func_lo2o "$arg"
6788 pic_object=$xdir$objdir/$func_lo2o_result
6789 non_pic_object=$xdir$func_lo2o_result
6790 func_append libobjs " $pic_object"
6791 func_append non_pic_objects " $non_pic_object"
6792 else
6793 func_fatal_error "'$arg' is not a valid libtool object"
6794 fi
6795 fi
6796 done
6797 else
6798 func_fatal_error "link input file '$arg' does not exist"
6799 fi
6800 arg=$save_arg
6801 prev=
6802 continue
6803 ;;
6804 os2dllname)
6805 os2dllname=$arg
6806 prev=
6807 continue
6808 ;;
6809 precious_regex)
6810 precious_files_regex=$arg
6811 prev=
6812 continue
6813 ;;
6814 release)
6815 release=-$arg
6816 prev=
6817 continue
6818 ;;
6819 rpath | xrpath)
6820 # We need an absolute path.
6821 case $arg in
6822 [\\/]* | [A-Za-z]:[\\/]*) ;;
6823 *)
6824 func_fatal_error "only absolute run-paths are allowed"
6825 ;;
6826 esac
6827 if test rpath = "$prev"; then
6828 case "$rpath " in
6829 *" $arg "*) ;;
6830 *) func_append rpath " $arg" ;;
6831 esac
6832 else
6833 case "$xrpath " in
6834 *" $arg "*) ;;
6835 *) func_append xrpath " $arg" ;;
6836 esac
6837 fi
6838 prev=
6839 continue
6840 ;;
6841 shrext)
6842 shrext_cmds=$arg
6843 prev=
6844 continue
6845 ;;
6846 weak)
6847 func_append weak_libs " $arg"
6848 prev=
6849 continue
6850 ;;
6851 xcclinker)
6852 func_append linker_flags " $qarg"
6853 func_append compiler_flags " $qarg"
6854 prev=
6855 func_append compile_command " $qarg"
6856 func_append finalize_command " $qarg"
6857 continue
6858 ;;
6859 xcompiler)
6860 func_append compiler_flags " $qarg"
6861 prev=
6862 func_append compile_command " $qarg"
6863 func_append finalize_command " $qarg"
6864 continue
6865 ;;
6866 xlinker)
6867 func_append linker_flags " $qarg"
6868 func_append compiler_flags " $wl$qarg"
6869 prev=
6870 func_append compile_command " $wl$qarg"
6871 func_append finalize_command " $wl$qarg"
6872 continue
6873 ;;
6874 *)
6875 eval "$prev=\"\$arg\""
6876 prev=
6877 continue
6878 ;;
6879 esac
6880 fi # test -n "$prev"
6881
6882 prevarg=$arg
6883
6884 case $arg in
6885 -all-static)
6886 if test -n "$link_static_flag"; then
6887 # See comment for -static flag below, for more details.
6888 func_append compile_command " $link_static_flag"
6889 func_append finalize_command " $link_static_flag"
6890 fi
6891 continue
6892 ;;
6893
6894 -allow-undefined)
6895 # FIXME: remove this flag sometime in the future.
6896 func_fatal_error "'-allow-undefined' must not be used because it is the default"
6897 ;;
6898
6899 -avoid-version)
6900 avoid_version=yes
6901 continue
6902 ;;
6903
6904 -bindir)
6905 prev=bindir
6906 continue
6907 ;;
6908
6909 -dlopen)
6910 prev=dlfiles
6911 continue
6912 ;;
6913
6914 -dlpreopen)
6915 prev=dlprefiles
6916 continue
6917 ;;
6918
6919 -export-dynamic)
6920 export_dynamic=yes
6921 continue
6922 ;;
6923
6924 -export-symbols | -export-symbols-regex)
6925 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
6926 func_fatal_error "more than one -exported-symbols argument is not allowed"
6927 fi
6928 if test X-export-symbols = "X$arg"; then
6929 prev=expsyms
6930 else
6931 prev=expsyms_regex
6932 fi
6933 continue
6934 ;;
6935
6936 -framework)
6937 prev=framework
6938 continue
6939 ;;
6940
6941 -inst-prefix-dir)
6942 prev=inst_prefix
6943 continue
6944 ;;
6945
6946 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
6947 # so, if we see these flags be careful not to treat them like -L
6948 -L[A-Z][A-Z]*:*)
6949 case $with_gcc/$host in
6950 no/*-*-irix* | /*-*-irix*)
6951 func_append compile_command " $arg"
6952 func_append finalize_command " $arg"
6953 ;;
6954 esac
6955 continue
6956 ;;
6957
6958 -L*)
6959 func_stripname "-L" '' "$arg"
6960 if test -z "$func_stripname_result"; then
6961 if test "$#" -gt 0; then
6962 func_fatal_error "require no space between '-L' and '$1'"
6963 else
6964 func_fatal_error "need path for '-L' option"
6965 fi
6966 fi
6967 func_resolve_sysroot "$func_stripname_result"
6968 dir=$func_resolve_sysroot_result
6969 # We need an absolute path.
6970 case $dir in
6971 [\\/]* | [A-Za-z]:[\\/]*) ;;
6972 *)
6973 absdir=`cd "$dir" && pwd`
6974 test -z "$absdir" && \
6975 func_fatal_error "cannot determine absolute directory name of '$dir'"
6976 dir=$absdir
6977 ;;
6978 esac
6979 case "$deplibs " in
6980 *" -L$dir "* | *" $arg "*)
6981 # Will only happen for absolute or sysroot arguments
6982 ;;
6983 *)
6984 # Preserve sysroot, but never include relative directories
6985 case $dir in
6986 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
6987 *) func_append deplibs " -L$dir" ;;
6988 esac
6989 func_append lib_search_path " $dir"
6990 ;;
6991 esac
6992 case $host in
6993 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
6994 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
6995 case :$dllsearchpath: in
6996 *":$dir:"*) ;;
6997 ::) dllsearchpath=$dir;;
6998 *) func_append dllsearchpath ":$dir";;
6999 esac
7000 case :$dllsearchpath: in
7001 *":$testbindir:"*) ;;
7002 ::) dllsearchpath=$testbindir;;
7003 *) func_append dllsearchpath ":$testbindir";;
7004 esac
7005 ;;
7006 esac
7007 continue
7008 ;;
7009
7010 -l*)
7011 if test X-lc = "X$arg" || test X-lm = "X$arg"; then
7012 case $host in
7013 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
7014 # These systems don't actually have a C or math library (as such)
7015 continue
7016 ;;
7017 *-*-os2*)
7018 # These systems don't actually have a C library (as such)
7019 test X-lc = "X$arg" && continue
7020 ;;
7021 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7022 # Do not include libc due to us having libc/libc_r.
7023 test X-lc = "X$arg" && continue
7024 ;;
7025 *-*-rhapsody* | *-*-darwin1.[012])
7026 # Rhapsody C and math libraries are in the System framework
7027 func_append deplibs " System.ltframework"
7028 continue
7029 ;;
7030 *-*-sco3.2v5* | *-*-sco5v6*)
7031 # Causes problems with __ctype
7032 test X-lc = "X$arg" && continue
7033 ;;
7034 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
7035 # Compiler inserts libc in the correct place for threads to work
7036 test X-lc = "X$arg" && continue
7037 ;;
7038 esac
7039 elif test X-lc_r = "X$arg"; then
7040 case $host in
7041 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7042 # Do not include libc_r directly, use -pthread flag.
7043 continue
7044 ;;
7045 esac
7046 fi
7047 func_append deplibs " $arg"
7048 continue
7049 ;;
7050
7051 -mllvm)
7052 prev=mllvm
7053 continue
7054 ;;
7055
7056 -module)
7057 module=yes
7058 continue
7059 ;;
7060
7061 # Tru64 UNIX uses -model [arg] to determine the layout of C++
7062 # classes, name mangling, and exception handling.
7063 # Darwin uses the -arch flag to determine output architecture.
7064 -model|-arch|-isysroot|--sysroot)
7065 func_append compiler_flags " $arg"
7066 func_append compile_command " $arg"
7067 func_append finalize_command " $arg"
7068 prev=xcompiler
7069 continue
7070 ;;
7071
7072 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7073 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7074 func_append compiler_flags " $arg"
7075 func_append compile_command " $arg"
7076 func_append finalize_command " $arg"
7077 case "$new_inherited_linker_flags " in
7078 *" $arg "*) ;;
7079 * ) func_append new_inherited_linker_flags " $arg" ;;
7080 esac
7081 continue
7082 ;;
7083
7084 -multi_module)
7085 single_module=$wl-multi_module
7086 continue
7087 ;;
7088
7089 -no-fast-install)
7090 fast_install=no
7091 continue
7092 ;;
7093
7094 -no-install)
7095 case $host in
7096 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
7097 # The PATH hackery in wrapper scripts is required on Windows
7098 # and Darwin in order for the loader to find any dlls it needs.
7099 func_warning "'-no-install' is ignored for $host"
7100 func_warning "assuming '-no-fast-install' instead"
7101 fast_install=no
7102 ;;
7103 *) no_install=yes ;;
7104 esac
7105 continue
7106 ;;
7107
7108 -no-undefined)
7109 allow_undefined=no
7110 continue
7111 ;;
7112
7113 -objectlist)
7114 prev=objectlist
7115 continue
7116 ;;
7117
7118 -os2dllname)
7119 prev=os2dllname
7120 continue
7121 ;;
7122
7123 -o) prev=output ;;
7124
7125 -precious-files-regex)
7126 prev=precious_regex
7127 continue
7128 ;;
7129
7130 -release)
7131 prev=release
7132 continue
7133 ;;
7134
7135 -rpath)
7136 prev=rpath
7137 continue
7138 ;;
7139
7140 -R)
7141 prev=xrpath
7142 continue
7143 ;;
7144
7145 -R*)
7146 func_stripname '-R' '' "$arg"
7147 dir=$func_stripname_result
7148 # We need an absolute path.
7149 case $dir in
7150 [\\/]* | [A-Za-z]:[\\/]*) ;;
7151 =*)
7152 func_stripname '=' '' "$dir"
7153 dir=$lt_sysroot$func_stripname_result
7154 ;;
7155 *)
7156 func_fatal_error "only absolute run-paths are allowed"
7157 ;;
7158 esac
7159 case "$xrpath " in
7160 *" $dir "*) ;;
7161 *) func_append xrpath " $dir" ;;
7162 esac
7163 continue
7164 ;;
7165
7166 -shared)
7167 # The effects of -shared are defined in a previous loop.
7168 continue
7169 ;;
7170
7171 -shrext)
7172 prev=shrext
7173 continue
7174 ;;
7175
7176 -static | -static-libtool-libs)
7177 # The effects of -static are defined in a previous loop.
7178 # We used to do the same as -all-static on platforms that
7179 # didn't have a PIC flag, but the assumption that the effects
7180 # would be equivalent was wrong. It would break on at least
7181 # Digital Unix and AIX.
7182 continue
7183 ;;
7184
7185 -thread-safe)
7186 thread_safe=yes
7187 continue
7188 ;;
7189
7190 -version-info)
7191 prev=vinfo
7192 continue
7193 ;;
7194
7195 -version-number)
7196 prev=vinfo
7197 vinfo_number=yes
7198 continue
7199 ;;
7200
7201 -weak)
7202 prev=weak
7203 continue
7204 ;;
7205
7206 -Wc,*)
7207 func_stripname '-Wc,' '' "$arg"
7208 args=$func_stripname_result
7209 arg=
7210 save_ifs=$IFS; IFS=,
7211 for flag in $args; do
7212 IFS=$save_ifs
7213 func_quote_for_eval "$flag"
7214 func_append arg " $func_quote_for_eval_result"
7215 func_append compiler_flags " $func_quote_for_eval_result"
7216 done
7217 IFS=$save_ifs
7218 func_stripname ' ' '' "$arg"
7219 arg=$func_stripname_result
7220 ;;
7221
7222 -Wl,*)
7223 func_stripname '-Wl,' '' "$arg"
7224 args=$func_stripname_result
7225 arg=
7226 save_ifs=$IFS; IFS=,
7227 for flag in $args; do
7228 IFS=$save_ifs
7229 func_quote_for_eval "$flag"
7230 func_append arg " $wl$func_quote_for_eval_result"
7231 func_append compiler_flags " $wl$func_quote_for_eval_result"
7232 func_append linker_flags " $func_quote_for_eval_result"
7233 done
7234 IFS=$save_ifs
7235 func_stripname ' ' '' "$arg"
7236 arg=$func_stripname_result
7237 ;;
7238
7239 -Xcompiler)
7240 prev=xcompiler
7241 continue
7242 ;;
7243
7244 -Xlinker)
7245 prev=xlinker
7246 continue
7247 ;;
7248
7249 -XCClinker)
7250 prev=xcclinker
7251 continue
7252 ;;
7253
7254 # -msg_* for osf cc
7255 -msg_*)
7256 func_quote_for_eval "$arg"
7257 arg=$func_quote_for_eval_result
7258 ;;
7259
7260 # Flags to be passed through unchanged, with rationale:
7261 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
7262 # -r[0-9][0-9]* specify processor for the SGI compiler
7263 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
7264 # +DA*, +DD* enable 64-bit mode for the HP compiler
7265 # -q* compiler args for the IBM compiler
7266 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
7267 # -F/path path to uninstalled frameworks, gcc on darwin
7268 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
7269 # -fstack-protector* stack protector flags for GCC
7270 # @file GCC response files
7271 # -tp=* Portland pgcc target processor selection
7272 # --sysroot=* for sysroot support
7273 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7274 # -specs=* GCC specs files
7275 # -stdlib=* select c++ std lib with clang
7276 # -fsanitize=* Clang/GCC memory and address sanitizer
7277 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
7278 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
7279 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7280 -specs=*|-fsanitize=*)
7281 func_quote_for_eval "$arg"
7282 arg=$func_quote_for_eval_result
7283 func_append compile_command " $arg"
7284 func_append finalize_command " $arg"
7285 func_append compiler_flags " $arg"
7286 continue
7287 ;;
7288
7289 -Z*)
7290 if test os2 = "`expr $host : '.*\(os2\)'`"; then
7291 # OS/2 uses -Zxxx to specify OS/2-specific options
7292 compiler_flags="$compiler_flags $arg"
7293 func_append compile_command " $arg"
7294 func_append finalize_command " $arg"
7295 case $arg in
7296 -Zlinker | -Zstack)
7297 prev=xcompiler
7298 ;;
7299 esac
7300 continue
7301 else
7302 # Otherwise treat like 'Some other compiler flag' below
7303 func_quote_for_eval "$arg"
7304 arg=$func_quote_for_eval_result
7305 fi
7306 ;;
7307
7308 # Some other compiler flag.
7309 -* | +*)
7310 func_quote_for_eval "$arg"
7311 arg=$func_quote_for_eval_result
7312 ;;
7313
7314 *.$objext)
7315 # A standard object.
7316 func_append objs " $arg"
7317 ;;
7318
7319 *.lo)
7320 # A libtool-controlled object.
7321
7322 # Check to see that this really is a libtool object.
7323 if func_lalib_unsafe_p "$arg"; then
7324 pic_object=
7325 non_pic_object=
7326
7327 # Read the .lo file
7328 func_source "$arg"
7329
7330 if test -z "$pic_object" ||
7331 test -z "$non_pic_object" ||
7332 test none = "$pic_object" &&
7333 test none = "$non_pic_object"; then
7334 func_fatal_error "cannot find name of object for '$arg'"
7335 fi
7336
7337 # Extract subdirectory from the argument.
7338 func_dirname "$arg" "/" ""
7339 xdir=$func_dirname_result
7340
7341 test none = "$pic_object" || {
7342 # Prepend the subdirectory the object is found in.
7343 pic_object=$xdir$pic_object
7344
7345 if test dlfiles = "$prev"; then
7346 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
7347 func_append dlfiles " $pic_object"
7348 prev=
7349 continue
7350 else
7351 # If libtool objects are unsupported, then we need to preload.
7352 prev=dlprefiles
7353 fi
7354 fi
7355
7356 # CHECK ME: I think I busted this. -Ossama
7357 if test dlprefiles = "$prev"; then
7358 # Preload the old-style object.
7359 func_append dlprefiles " $pic_object"
7360 prev=
7361 fi
7362
7363 # A PIC object.
7364 func_append libobjs " $pic_object"
7365 arg=$pic_object
7366 }
7367
7368 # Non-PIC object.
7369 if test none != "$non_pic_object"; then
7370 # Prepend the subdirectory the object is found in.
7371 non_pic_object=$xdir$non_pic_object
7372
7373 # A standard non-PIC object
7374 func_append non_pic_objects " $non_pic_object"
7375 if test -z "$pic_object" || test none = "$pic_object"; then
7376 arg=$non_pic_object
7377 fi
7378 else
7379 # If the PIC object exists, use it instead.
7380 # $xdir was prepended to $pic_object above.
7381 non_pic_object=$pic_object
7382 func_append non_pic_objects " $non_pic_object"
7383 fi
7384 else
7385 # Only an error if not doing a dry-run.
7386 if $opt_dry_run; then
7387 # Extract subdirectory from the argument.
7388 func_dirname "$arg" "/" ""
7389 xdir=$func_dirname_result
7390
7391 func_lo2o "$arg"
7392 pic_object=$xdir$objdir/$func_lo2o_result
7393 non_pic_object=$xdir$func_lo2o_result
7394 func_append libobjs " $pic_object"
7395 func_append non_pic_objects " $non_pic_object"
7396 else
7397 func_fatal_error "'$arg' is not a valid libtool object"
7398 fi
7399 fi
7400 ;;
7401
7402 *.$libext)
7403 # An archive.
7404 func_append deplibs " $arg"
7405 func_append old_deplibs " $arg"
7406 continue
7407 ;;
7408
7409 *.la)
7410 # A libtool-controlled library.
7411
7412 func_resolve_sysroot "$arg"
7413 if test dlfiles = "$prev"; then
7414 # This library was specified with -dlopen.
7415 func_append dlfiles " $func_resolve_sysroot_result"
7416 prev=
7417 elif test dlprefiles = "$prev"; then
7418 # The library was specified with -dlpreopen.
7419 func_append dlprefiles " $func_resolve_sysroot_result"
7420 prev=
7421 else
7422 func_append deplibs " $func_resolve_sysroot_result"
7423 fi
7424 continue
7425 ;;
7426
7427 # Some other compiler argument.
7428 *)
7429 # Unknown arguments in both finalize_command and compile_command need
7430 # to be aesthetically quoted because they are evaled later.
7431 func_quote_for_eval "$arg"
7432 arg=$func_quote_for_eval_result
7433 ;;
7434 esac # arg
7435
7436 # Now actually substitute the argument into the commands.
7437 if test -n "$arg"; then
7438 func_append compile_command " $arg"
7439 func_append finalize_command " $arg"
7440 fi
7441 done # argument parsing loop
7442
7443 test -n "$prev" && \
7444 func_fatal_help "the '$prevarg' option requires an argument"
7445
7446 if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
7447 eval arg=\"$export_dynamic_flag_spec\"
7448 func_append compile_command " $arg"
7449 func_append finalize_command " $arg"
7450 fi
7451
7452 oldlibs=
7453 # calculate the name of the file, without its directory
7454 func_basename "$output"
7455 outputname=$func_basename_result
7456 libobjs_save=$libobjs
7457
7458 if test -n "$shlibpath_var"; then
7459 # get the directories listed in $shlibpath_var
7460 eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
7461 else
7462 shlib_search_path=
7463 fi
7464 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
7465 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
7466
7467 # Definition is injected by LT_CONFIG during libtool generation.
7468 func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
7469
7470 func_dirname "$output" "/" ""
7471 output_objdir=$func_dirname_result$objdir
7472 func_to_tool_file "$output_objdir/"
7473 tool_output_objdir=$func_to_tool_file_result
7474 # Create the object directory.
7475 func_mkdir_p "$output_objdir"
7476
7477 # Determine the type of output
7478 case $output in
7479 "")
7480 func_fatal_help "you must specify an output file"
7481 ;;
7482 *.$libext) linkmode=oldlib ;;
7483 *.lo | *.$objext) linkmode=obj ;;
7484 *.la) linkmode=lib ;;
7485 *) linkmode=prog ;; # Anything else should be a program.
7486 esac
7487
7488 specialdeplibs=
7489
7490 libs=
7491 # Find all interdependent deplibs by searching for libraries
7492 # that are linked more than once (e.g. -la -lb -la)
7493 for deplib in $deplibs; do
7494 if $opt_preserve_dup_deps; then
7495 case "$libs " in
7496 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7497 esac
7498 fi
7499 func_append libs " $deplib"
7500 done
7501
7502 if test lib = "$linkmode"; then
7503 libs="$predeps $libs $compiler_lib_search_path $postdeps"
7504
7505 # Compute libraries that are listed more than once in $predeps
7506 # $postdeps and mark them as special (i.e., whose duplicates are
7507 # not to be eliminated).
7508 pre_post_deps=
7509 if $opt_duplicate_compiler_generated_deps; then
7510 for pre_post_dep in $predeps $postdeps; do
7511 case "$pre_post_deps " in
7512 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
7513 esac
7514 func_append pre_post_deps " $pre_post_dep"
7515 done
7516 fi
7517 pre_post_deps=
7518 fi
7519
7520 deplibs=
7521 newdependency_libs=
7522 newlib_search_path=
7523 need_relink=no # whether we're linking any uninstalled libtool libraries
7524 notinst_deplibs= # not-installed libtool libraries
7525 notinst_path= # paths that contain not-installed libtool libraries
7526
7527 case $linkmode in
7528 lib)
7529 passes="conv dlpreopen link"
7530 for file in $dlfiles $dlprefiles; do
7531 case $file in
7532 *.la) ;;
7533 *)
7534 func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
7535 ;;
7536 esac
7537 done
7538 ;;
7539 prog)
7540 compile_deplibs=
7541 finalize_deplibs=
7542 alldeplibs=false
7543 newdlfiles=
7544 newdlprefiles=
7545 passes="conv scan dlopen dlpreopen link"
7546 ;;
7547 *) passes="conv"
7548 ;;
7549 esac
7550
7551 for pass in $passes; do
7552 # The preopen pass in lib mode reverses $deplibs; put it back here
7553 # so that -L comes before libs that need it for instance...
7554 if test lib,link = "$linkmode,$pass"; then
7555 ## FIXME: Find the place where the list is rebuilt in the wrong
7556 ## order, and fix it there properly
7557 tmp_deplibs=
7558 for deplib in $deplibs; do
7559 tmp_deplibs="$deplib $tmp_deplibs"
7560 done
7561 deplibs=$tmp_deplibs
7562 fi
7563
7564 if test lib,link = "$linkmode,$pass" ||
7565 test prog,scan = "$linkmode,$pass"; then
7566 libs=$deplibs
7567 deplibs=
7568 fi
7569 if test prog = "$linkmode"; then
7570 case $pass in
7571 dlopen) libs=$dlfiles ;;
7572 dlpreopen) libs=$dlprefiles ;;
7573 link)
7574 libs="$deplibs %DEPLIBS%"
7575 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
7576 ;;
7577 esac
7578 fi
7579 if test lib,dlpreopen = "$linkmode,$pass"; then
7580 # Collect and forward deplibs of preopened libtool libs
7581 for lib in $dlprefiles; do
7582 # Ignore non-libtool-libs
7583 dependency_libs=
7584 func_resolve_sysroot "$lib"
7585 case $lib in
7586 *.la) func_source "$func_resolve_sysroot_result" ;;
7587 esac
7588
7589 # Collect preopened libtool deplibs, except any this library
7590 # has declared as weak libs
7591 for deplib in $dependency_libs; do
7592 func_basename "$deplib"
7593 deplib_base=$func_basename_result
7594 case " $weak_libs " in
7595 *" $deplib_base "*) ;;
7596 *) func_append deplibs " $deplib" ;;
7597 esac
7598 done
7599 done
7600 libs=$dlprefiles
7601 fi
7602 if test dlopen = "$pass"; then
7603 # Collect dlpreopened libraries
7604 save_deplibs=$deplibs
7605 deplibs=
7606 fi
7607
7608 for deplib in $libs; do
7609 lib=
7610 found=false
7611 case $deplib in
7612 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7613 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7614 if test prog,link = "$linkmode,$pass"; then
7615 compile_deplibs="$deplib $compile_deplibs"
7616 finalize_deplibs="$deplib $finalize_deplibs"
7617 else
7618 func_append compiler_flags " $deplib"
7619 if test lib = "$linkmode"; then
7620 case "$new_inherited_linker_flags " in
7621 *" $deplib "*) ;;
7622 * ) func_append new_inherited_linker_flags " $deplib" ;;
7623 esac
7624 fi
7625 fi
7626 continue
7627 ;;
7628 -l*)
7629 if test lib != "$linkmode" && test prog != "$linkmode"; then
7630 func_warning "'-l' is ignored for archives/objects"
7631 continue
7632 fi
7633 func_stripname '-l' '' "$deplib"
7634 name=$func_stripname_result
7635 if test lib = "$linkmode"; then
7636 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
7637 else
7638 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
7639 fi
7640 for searchdir in $searchdirs; do
7641 for search_ext in .la $std_shrext .so .a; do
7642 # Search the libtool library
7643 lib=$searchdir/lib$name$search_ext
7644 if test -f "$lib"; then
7645 if test .la = "$search_ext"; then
7646 found=:
7647 else
7648 found=false
7649 fi
7650 break 2
7651 fi
7652 done
7653 done
7654 if $found; then
7655 # deplib is a libtool library
7656 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
7657 # We need to do some special things here, and not later.
7658 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
7659 case " $predeps $postdeps " in
7660 *" $deplib "*)
7661 if func_lalib_p "$lib"; then
7662 library_names=
7663 old_library=
7664 func_source "$lib"
7665 for l in $old_library $library_names; do
7666 ll=$l
7667 done
7668 if test "X$ll" = "X$old_library"; then # only static version available
7669 found=false
7670 func_dirname "$lib" "" "."
7671 ladir=$func_dirname_result
7672 lib=$ladir/$old_library
7673 if test prog,link = "$linkmode,$pass"; then
7674 compile_deplibs="$deplib $compile_deplibs"
7675 finalize_deplibs="$deplib $finalize_deplibs"
7676 else
7677 deplibs="$deplib $deplibs"
7678 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7679 fi
7680 continue
7681 fi
7682 fi
7683 ;;
7684 *) ;;
7685 esac
7686 fi
7687 else
7688 # deplib doesn't seem to be a libtool library
7689 if test prog,link = "$linkmode,$pass"; then
7690 compile_deplibs="$deplib $compile_deplibs"
7691 finalize_deplibs="$deplib $finalize_deplibs"
7692 else
7693 deplibs="$deplib $deplibs"
7694 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7695 fi
7696 continue
7697 fi
7698 ;; # -l
7699 *.ltframework)
7700 if test prog,link = "$linkmode,$pass"; then
7701 compile_deplibs="$deplib $compile_deplibs"
7702 finalize_deplibs="$deplib $finalize_deplibs"
7703 else
7704 deplibs="$deplib $deplibs"
7705 if test lib = "$linkmode"; then
7706 case "$new_inherited_linker_flags " in
7707 *" $deplib "*) ;;
7708 * ) func_append new_inherited_linker_flags " $deplib" ;;
7709 esac
7710 fi
7711 fi
7712 continue
7713 ;;
7714 -L*)
7715 case $linkmode in
7716 lib)
7717 deplibs="$deplib $deplibs"
7718 test conv = "$pass" && continue
7719 newdependency_libs="$deplib $newdependency_libs"
7720 func_stripname '-L' '' "$deplib"
7721 func_resolve_sysroot "$func_stripname_result"
7722 func_append newlib_search_path " $func_resolve_sysroot_result"
7723 ;;
7724 prog)
7725 if test conv = "$pass"; then
7726 deplibs="$deplib $deplibs"
7727 continue
7728 fi
7729 if test scan = "$pass"; then
7730 deplibs="$deplib $deplibs"
7731 else
7732 compile_deplibs="$deplib $compile_deplibs"
7733 finalize_deplibs="$deplib $finalize_deplibs"
7734 fi
7735 func_stripname '-L' '' "$deplib"
7736 func_resolve_sysroot "$func_stripname_result"
7737 func_append newlib_search_path " $func_resolve_sysroot_result"
7738 ;;
7739 *)
7740 func_warning "'-L' is ignored for archives/objects"
7741 ;;
7742 esac # linkmode
7743 continue
7744 ;; # -L
7745 -R*)
7746 if test link = "$pass"; then
7747 func_stripname '-R' '' "$deplib"
7748 func_resolve_sysroot "$func_stripname_result"
7749 dir=$func_resolve_sysroot_result
7750 # Make sure the xrpath contains only unique directories.
7751 case "$xrpath " in
7752 *" $dir "*) ;;
7753 *) func_append xrpath " $dir" ;;
7754 esac
7755 fi
7756 deplibs="$deplib $deplibs"
7757 continue
7758 ;;
7759 *.la)
7760 func_resolve_sysroot "$deplib"
7761 lib=$func_resolve_sysroot_result
7762 ;;
7763 *.$libext)
7764 if test conv = "$pass"; then
7765 deplibs="$deplib $deplibs"
7766 continue
7767 fi
7768 case $linkmode in
7769 lib)
7770 # Linking convenience modules into shared libraries is allowed,
7771 # but linking other static libraries is non-portable.
7772 case " $dlpreconveniencelibs " in
7773 *" $deplib "*) ;;
7774 *)
7775 valid_a_lib=false
7776 case $deplibs_check_method in
7777 match_pattern*)
7778 set dummy $deplibs_check_method; shift
7779 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7780 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
7781 | $EGREP "$match_pattern_regex" > /dev/null; then
7782 valid_a_lib=:
7783 fi
7784 ;;
7785 pass_all)
7786 valid_a_lib=:
7787 ;;
7788 esac
7789 if $valid_a_lib; then
7790 echo
7791 $ECHO "*** Warning: Linking the shared library $output against the"
7792 $ECHO "*** static library $deplib is not portable!"
7793 deplibs="$deplib $deplibs"
7794 else
7795 echo
7796 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
7797 echo "*** I have the capability to make that library automatically link in when"
7798 echo "*** you link to this library. But I can only do this if you have a"
7799 echo "*** shared version of the library, which you do not appear to have"
7800 echo "*** because the file extensions .$libext of this argument makes me believe"
7801 echo "*** that it is just a static archive that I should not use here."
7802 fi
7803 ;;
7804 esac
7805 continue
7806 ;;
7807 prog)
7808 if test link != "$pass"; then
7809 deplibs="$deplib $deplibs"
7810 else
7811 compile_deplibs="$deplib $compile_deplibs"
7812 finalize_deplibs="$deplib $finalize_deplibs"
7813 fi
7814 continue
7815 ;;
7816 esac # linkmode
7817 ;; # *.$libext
7818 *.lo | *.$objext)
7819 if test conv = "$pass"; then
7820 deplibs="$deplib $deplibs"
7821 elif test prog = "$linkmode"; then
7822 if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
7823 # If there is no dlopen support or we're linking statically,
7824 # we need to preload.
7825 func_append newdlprefiles " $deplib"
7826 compile_deplibs="$deplib $compile_deplibs"
7827 finalize_deplibs="$deplib $finalize_deplibs"
7828 else
7829 func_append newdlfiles " $deplib"
7830 fi
7831 fi
7832 continue
7833 ;;
7834 %DEPLIBS%)
7835 alldeplibs=:
7836 continue
7837 ;;
7838 esac # case $deplib
7839
7840 $found || test -f "$lib" \
7841 || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
7842
7843 # Check to see that this really is a libtool archive.
7844 func_lalib_unsafe_p "$lib" \
7845 || func_fatal_error "'$lib' is not a valid libtool archive"
7846
7847 func_dirname "$lib" "" "."
7848 ladir=$func_dirname_result
7849
7850 dlname=
7851 dlopen=
7852 dlpreopen=
7853 libdir=
7854 library_names=
7855 old_library=
7856 inherited_linker_flags=
7857 # If the library was installed with an old release of libtool,
7858 # it will not redefine variables installed, or shouldnotlink
7859 installed=yes
7860 shouldnotlink=no
7861 avoidtemprpath=
7862
7863
7864 # Read the .la file
7865 func_source "$lib"
7866
7867 # Convert "-framework foo" to "foo.ltframework"
7868 if test -n "$inherited_linker_flags"; then
7869 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
7870 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
7871 case " $new_inherited_linker_flags " in
7872 *" $tmp_inherited_linker_flag "*) ;;
7873 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
7874 esac
7875 done
7876 fi
7877 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7878 if test lib,link = "$linkmode,$pass" ||
7879 test prog,scan = "$linkmode,$pass" ||
7880 { test prog != "$linkmode" && test lib != "$linkmode"; }; then
7881 test -n "$dlopen" && func_append dlfiles " $dlopen"
7882 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
7883 fi
7884
7885 if test conv = "$pass"; then
7886 # Only check for convenience libraries
7887 deplibs="$lib $deplibs"
7888 if test -z "$libdir"; then
7889 if test -z "$old_library"; then
7890 func_fatal_error "cannot find name of link library for '$lib'"
7891 fi
7892 # It is a libtool convenience library, so add in its objects.
7893 func_append convenience " $ladir/$objdir/$old_library"
7894 func_append old_convenience " $ladir/$objdir/$old_library"
7895 tmp_libs=
7896 for deplib in $dependency_libs; do
7897 deplibs="$deplib $deplibs"
7898 if $opt_preserve_dup_deps; then
7899 case "$tmp_libs " in
7900 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7901 esac
7902 fi
7903 func_append tmp_libs " $deplib"
7904 done
7905 elif test prog != "$linkmode" && test lib != "$linkmode"; then
7906 func_fatal_error "'$lib' is not a convenience library"
7907 fi
7908 continue
7909 fi # $pass = conv
7910
7911
7912 # Get the name of the library we link against.
7913 linklib=
7914 if test -n "$old_library" &&
7915 { test yes = "$prefer_static_libs" ||
7916 test built,no = "$prefer_static_libs,$installed"; }; then
7917 linklib=$old_library
7918 else
7919 for l in $old_library $library_names; do
7920 linklib=$l
7921 done
7922 fi
7923 if test -z "$linklib"; then
7924 func_fatal_error "cannot find name of link library for '$lib'"
7925 fi
7926
7927 # This library was specified with -dlopen.
7928 if test dlopen = "$pass"; then
7929 test -z "$libdir" \
7930 && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
7931 if test -z "$dlname" ||
7932 test yes != "$dlopen_support" ||
7933 test no = "$build_libtool_libs"
7934 then
7935 # If there is no dlname, no dlopen support or we're linking
7936 # statically, we need to preload. We also need to preload any
7937 # dependent libraries so libltdl's deplib preloader doesn't
7938 # bomb out in the load deplibs phase.
7939 func_append dlprefiles " $lib $dependency_libs"
7940 else
7941 func_append newdlfiles " $lib"
7942 fi
7943 continue
7944 fi # $pass = dlopen
7945
7946 # We need an absolute path.
7947 case $ladir in
7948 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
7949 *)
7950 abs_ladir=`cd "$ladir" && pwd`
7951 if test -z "$abs_ladir"; then
7952 func_warning "cannot determine absolute directory name of '$ladir'"
7953 func_warning "passing it literally to the linker, although it might fail"
7954 abs_ladir=$ladir
7955 fi
7956 ;;
7957 esac
7958 func_basename "$lib"
7959 laname=$func_basename_result
7960
7961 # Find the relevant object directory and library name.
7962 if test yes = "$installed"; then
7963 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
7964 func_warning "library '$lib' was moved."
7965 dir=$ladir
7966 absdir=$abs_ladir
7967 libdir=$abs_ladir
7968 else
7969 dir=$lt_sysroot$libdir
7970 absdir=$lt_sysroot$libdir
7971 fi
7972 test yes = "$hardcode_automatic" && avoidtemprpath=yes
7973 else
7974 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
7975 dir=$ladir
7976 absdir=$abs_ladir
7977 # Remove this search path later
7978 func_append notinst_path " $abs_ladir"
7979 else
7980 dir=$ladir/$objdir
7981 absdir=$abs_ladir/$objdir
7982 # Remove this search path later
7983 func_append notinst_path " $abs_ladir"
7984 fi
7985 fi # $installed = yes
7986 func_stripname 'lib' '.la' "$laname"
7987 name=$func_stripname_result
7988
7989 # This library was specified with -dlpreopen.
7990 if test dlpreopen = "$pass"; then
7991 if test -z "$libdir" && test prog = "$linkmode"; then
7992 func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
7993 fi
7994 case $host in
7995 # special handling for platforms with PE-DLLs.
7996 *cygwin* | *mingw* | *cegcc* )
7997 # Linker will automatically link against shared library if both
7998 # static and shared are present. Therefore, ensure we extract
7999 # symbols from the import library if a shared library is present
8000 # (otherwise, the dlopen module name will be incorrect). We do
8001 # this by putting the import library name into $newdlprefiles.
8002 # We recover the dlopen module name by 'saving' the la file
8003 # name in a special purpose variable, and (later) extracting the
8004 # dlname from the la file.
8005 if test -n "$dlname"; then
8006 func_tr_sh "$dir/$linklib"
8007 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
8008 func_append newdlprefiles " $dir/$linklib"
8009 else
8010 func_append newdlprefiles " $dir/$old_library"
8011 # Keep a list of preopened convenience libraries to check
8012 # that they are being used correctly in the link pass.
8013 test -z "$libdir" && \
8014 func_append dlpreconveniencelibs " $dir/$old_library"
8015 fi
8016 ;;
8017 * )
8018 # Prefer using a static library (so that no silly _DYNAMIC symbols
8019 # are required to link).
8020 if test -n "$old_library"; then
8021 func_append newdlprefiles " $dir/$old_library"
8022 # Keep a list of preopened convenience libraries to check
8023 # that they are being used correctly in the link pass.
8024 test -z "$libdir" && \
8025 func_append dlpreconveniencelibs " $dir/$old_library"
8026 # Otherwise, use the dlname, so that lt_dlopen finds it.
8027 elif test -n "$dlname"; then
8028 func_append newdlprefiles " $dir/$dlname"
8029 else
8030 func_append newdlprefiles " $dir/$linklib"
8031 fi
8032 ;;
8033 esac
8034 fi # $pass = dlpreopen
8035
8036 if test -z "$libdir"; then
8037 # Link the convenience library
8038 if test lib = "$linkmode"; then
8039 deplibs="$dir/$old_library $deplibs"
8040 elif test prog,link = "$linkmode,$pass"; then
8041 compile_deplibs="$dir/$old_library $compile_deplibs"
8042 finalize_deplibs="$dir/$old_library $finalize_deplibs"
8043 else
8044 deplibs="$lib $deplibs" # used for prog,scan pass
8045 fi
8046 continue
8047 fi
8048
8049
8050 if test prog = "$linkmode" && test link != "$pass"; then
8051 func_append newlib_search_path " $ladir"
8052 deplibs="$lib $deplibs"
8053
8054 linkalldeplibs=false
8055 if test no != "$link_all_deplibs" || test -z "$library_names" ||
8056 test no = "$build_libtool_libs"; then
8057 linkalldeplibs=:
8058 fi
8059
8060 tmp_libs=
8061 for deplib in $dependency_libs; do
8062 case $deplib in
8063 -L*) func_stripname '-L' '' "$deplib"
8064 func_resolve_sysroot "$func_stripname_result"
8065 func_append newlib_search_path " $func_resolve_sysroot_result"
8066 ;;
8067 esac
8068 # Need to link against all dependency_libs?
8069 if $linkalldeplibs; then
8070 deplibs="$deplib $deplibs"
8071 else
8072 # Need to hardcode shared library paths
8073 # or/and link against static libraries
8074 newdependency_libs="$deplib $newdependency_libs"
8075 fi
8076 if $opt_preserve_dup_deps; then
8077 case "$tmp_libs " in
8078 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
8079 esac
8080 fi
8081 func_append tmp_libs " $deplib"
8082 done # for deplib
8083 continue
8084 fi # $linkmode = prog...
8085
8086 if test prog,link = "$linkmode,$pass"; then
8087 if test -n "$library_names" &&
8088 { { test no = "$prefer_static_libs" ||
8089 test built,yes = "$prefer_static_libs,$installed"; } ||
8090 test -z "$old_library"; }; then
8091 # We need to hardcode the library path
8092 if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
8093 # Make sure the rpath contains only unique directories.
8094 case $temp_rpath: in
8095 *"$absdir:"*) ;;
8096 *) func_append temp_rpath "$absdir:" ;;
8097 esac
8098 fi
8099
8100 # Hardcode the library path.
8101 # Skip directories that are in the system default run-time
8102 # search path.
8103 case " $sys_lib_dlsearch_path " in
8104 *" $absdir "*) ;;
8105 *)
8106 case "$compile_rpath " in
8107 *" $absdir "*) ;;
8108 *) func_append compile_rpath " $absdir" ;;
8109 esac
8110 ;;
8111 esac
8112 case " $sys_lib_dlsearch_path " in
8113 *" $libdir "*) ;;
8114 *)
8115 case "$finalize_rpath " in
8116 *" $libdir "*) ;;
8117 *) func_append finalize_rpath " $libdir" ;;
8118 esac
8119 ;;
8120 esac
8121 fi # $linkmode,$pass = prog,link...
8122
8123 if $alldeplibs &&
8124 { test pass_all = "$deplibs_check_method" ||
8125 { test yes = "$build_libtool_libs" &&
8126 test -n "$library_names"; }; }; then
8127 # We only need to search for static libraries
8128 continue
8129 fi
8130 fi
8131
8132 link_static=no # Whether the deplib will be linked statically
8133 use_static_libs=$prefer_static_libs
8134 if test built = "$use_static_libs" && test yes = "$installed"; then
8135 use_static_libs=no
8136 fi
8137 if test -n "$library_names" &&
8138 { test no = "$use_static_libs" || test -z "$old_library"; }; then
8139 case $host in
8140 *cygwin* | *mingw* | *cegcc* | *os2*)
8141 # No point in relinking DLLs because paths are not encoded
8142 func_append notinst_deplibs " $lib"
8143 need_relink=no
8144 ;;
8145 *)
8146 if test no = "$installed"; then
8147 func_append notinst_deplibs " $lib"
8148 need_relink=yes
8149 fi
8150 ;;
8151 esac
8152 # This is a shared library
8153
8154 # Warn about portability, can't link against -module's on some
8155 # systems (darwin). Don't bleat about dlopened modules though!
8156 dlopenmodule=
8157 for dlpremoduletest in $dlprefiles; do
8158 if test "X$dlpremoduletest" = "X$lib"; then
8159 dlopenmodule=$dlpremoduletest
8160 break
8161 fi
8162 done
8163 if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
8164 echo
8165 if test prog = "$linkmode"; then
8166 $ECHO "*** Warning: Linking the executable $output against the loadable module"
8167 else
8168 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
8169 fi
8170 $ECHO "*** $linklib is not portable!"
8171 fi
8172 if test lib = "$linkmode" &&
8173 test yes = "$hardcode_into_libs"; then
8174 # Hardcode the library path.
8175 # Skip directories that are in the system default run-time
8176 # search path.
8177 case " $sys_lib_dlsearch_path " in
8178 *" $absdir "*) ;;
8179 *)
8180 case "$compile_rpath " in
8181 *" $absdir "*) ;;
8182 *) func_append compile_rpath " $absdir" ;;
8183 esac
8184 ;;
8185 esac
8186 case " $sys_lib_dlsearch_path " in
8187 *" $libdir "*) ;;
8188 *)
8189 case "$finalize_rpath " in
8190 *" $libdir "*) ;;
8191 *) func_append finalize_rpath " $libdir" ;;
8192 esac
8193 ;;
8194 esac
8195 fi
8196
8197 if test -n "$old_archive_from_expsyms_cmds"; then
8198 # figure out the soname
8199 set dummy $library_names
8200 shift
8201 realname=$1
8202 shift
8203 libname=`eval "\\$ECHO \"$libname_spec\""`
8204 # use dlname if we got it. it's perfectly good, no?
8205 if test -n "$dlname"; then
8206 soname=$dlname
8207 elif test -n "$soname_spec"; then
8208 # bleh windows
8209 case $host in
8210 *cygwin* | mingw* | *cegcc* | *os2*)
8211 func_arith $current - $age
8212 major=$func_arith_result
8213 versuffix=-$major
8214 ;;
8215 esac
8216 eval soname=\"$soname_spec\"
8217 else
8218 soname=$realname
8219 fi
8220
8221 # Make a new name for the extract_expsyms_cmds to use
8222 soroot=$soname
8223 func_basename "$soroot"
8224 soname=$func_basename_result
8225 func_stripname 'lib' '.dll' "$soname"
8226 newlib=libimp-$func_stripname_result.a
8227
8228 # If the library has no export list, then create one now
8229 if test -f "$output_objdir/$soname-def"; then :
8230 else
8231 func_verbose "extracting exported symbol list from '$soname'"
8232 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
8233 fi
8234
8235 # Create $newlib
8236 if test -f "$output_objdir/$newlib"; then :; else
8237 func_verbose "generating import library for '$soname'"
8238 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
8239 fi
8240 # make sure the library variables are pointing to the new library
8241 dir=$output_objdir
8242 linklib=$newlib
8243 fi # test -n "$old_archive_from_expsyms_cmds"
8244
8245 if test prog = "$linkmode" || test relink != "$opt_mode"; then
8246 add_shlibpath=
8247 add_dir=
8248 add=
8249 lib_linked=yes
8250 case $hardcode_action in
8251 immediate | unsupported)
8252 if test no = "$hardcode_direct"; then
8253 add=$dir/$linklib
8254 case $host in
8255 *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
8256 *-*-sysv4*uw2*) add_dir=-L$dir ;;
8257 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
8258 *-*-unixware7*) add_dir=-L$dir ;;
8259 *-*-darwin* )
8260 # if the lib is a (non-dlopened) module then we cannot
8261 # link against it, someone is ignoring the earlier warnings
8262 if /usr/bin/file -L $add 2> /dev/null |
8263 $GREP ": [^:]* bundle" >/dev/null; then
8264 if test "X$dlopenmodule" != "X$lib"; then
8265 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
8266 if test -z "$old_library"; then
8267 echo
8268 echo "*** And there doesn't seem to be a static archive available"
8269 echo "*** The link will probably fail, sorry"
8270 else
8271 add=$dir/$old_library
8272 fi
8273 elif test -n "$old_library"; then
8274 add=$dir/$old_library
8275 fi
8276 fi
8277 esac
8278 elif test no = "$hardcode_minus_L"; then
8279 case $host in
8280 *-*-sunos*) add_shlibpath=$dir ;;
8281 esac
8282 add_dir=-L$dir
8283 add=-l$name
8284 elif test no = "$hardcode_shlibpath_var"; then
8285 add_shlibpath=$dir
8286 add=-l$name
8287 else
8288 lib_linked=no
8289 fi
8290 ;;
8291 relink)
8292 if test yes = "$hardcode_direct" &&
8293 test no = "$hardcode_direct_absolute"; then
8294 add=$dir/$linklib
8295 elif test yes = "$hardcode_minus_L"; then
8296 add_dir=-L$absdir
8297 # Try looking first in the location we're being installed to.
8298 if test -n "$inst_prefix_dir"; then
8299 case $libdir in
8300 [\\/]*)
8301 func_append add_dir " -L$inst_prefix_dir$libdir"
8302 ;;
8303 esac
8304 fi
8305 add=-l$name
8306 elif test yes = "$hardcode_shlibpath_var"; then
8307 add_shlibpath=$dir
8308 add=-l$name
8309 else
8310 lib_linked=no
8311 fi
8312 ;;
8313 *) lib_linked=no ;;
8314 esac
8315
8316 if test yes != "$lib_linked"; then
8317 func_fatal_configuration "unsupported hardcode properties"
8318 fi
8319
8320 if test -n "$add_shlibpath"; then
8321 case :$compile_shlibpath: in
8322 *":$add_shlibpath:"*) ;;
8323 *) func_append compile_shlibpath "$add_shlibpath:" ;;
8324 esac
8325 fi
8326 if test prog = "$linkmode"; then
8327 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
8328 test -n "$add" && compile_deplibs="$add $compile_deplibs"
8329 else
8330 test -n "$add_dir" && deplibs="$add_dir $deplibs"
8331 test -n "$add" && deplibs="$add $deplibs"
8332 if test yes != "$hardcode_direct" &&
8333 test yes != "$hardcode_minus_L" &&
8334 test yes = "$hardcode_shlibpath_var"; then
8335 case :$finalize_shlibpath: in
8336 *":$libdir:"*) ;;
8337 *) func_append finalize_shlibpath "$libdir:" ;;
8338 esac
8339 fi
8340 fi
8341 fi
8342
8343 if test prog = "$linkmode" || test relink = "$opt_mode"; then
8344 add_shlibpath=
8345 add_dir=
8346 add=
8347 # Finalize command for both is simple: just hardcode it.
8348 if test yes = "$hardcode_direct" &&
8349 test no = "$hardcode_direct_absolute"; then
8350 add=$libdir/$linklib
8351 elif test yes = "$hardcode_minus_L"; then
8352 add_dir=-L$libdir
8353 add=-l$name
8354 elif test yes = "$hardcode_shlibpath_var"; then
8355 case :$finalize_shlibpath: in
8356 *":$libdir:"*) ;;
8357 *) func_append finalize_shlibpath "$libdir:" ;;
8358 esac
8359 add=-l$name
8360 elif test yes = "$hardcode_automatic"; then
8361 if test -n "$inst_prefix_dir" &&
8362 test -f "$inst_prefix_dir$libdir/$linklib"; then
8363 add=$inst_prefix_dir$libdir/$linklib
8364 else
8365 add=$libdir/$linklib
8366 fi
8367 else
8368 # We cannot seem to hardcode it, guess we'll fake it.
8369 add_dir=-L$libdir
8370 # Try looking first in the location we're being installed to.
8371 if test -n "$inst_prefix_dir"; then
8372 case $libdir in
8373 [\\/]*)
8374 func_append add_dir " -L$inst_prefix_dir$libdir"
8375 ;;
8376 esac
8377 fi
8378 add=-l$name
8379 fi
8380
8381 if test prog = "$linkmode"; then
8382 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
8383 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
8384 else
8385 test -n "$add_dir" && deplibs="$add_dir $deplibs"
8386 test -n "$add" && deplibs="$add $deplibs"
8387 fi
8388 fi
8389 elif test prog = "$linkmode"; then
8390 # Here we assume that one of hardcode_direct or hardcode_minus_L
8391 # is not unsupported. This is valid on all known static and
8392 # shared platforms.
8393 if test unsupported != "$hardcode_direct"; then
8394 test -n "$old_library" && linklib=$old_library
8395 compile_deplibs="$dir/$linklib $compile_deplibs"
8396 finalize_deplibs="$dir/$linklib $finalize_deplibs"
8397 else
8398 compile_deplibs="-l$name -L$dir $compile_deplibs"
8399 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
8400 fi
8401 elif test yes = "$build_libtool_libs"; then
8402 # Not a shared library
8403 if test pass_all != "$deplibs_check_method"; then
8404 # We're trying link a shared library against a static one
8405 # but the system doesn't support it.
8406
8407 # Just print a warning and add the library to dependency_libs so
8408 # that the program can be linked against the static library.
8409 echo
8410 $ECHO "*** Warning: This system cannot link to static lib archive $lib."
8411 echo "*** I have the capability to make that library automatically link in when"
8412 echo "*** you link to this library. But I can only do this if you have a"
8413 echo "*** shared version of the library, which you do not appear to have."
8414 if test yes = "$module"; then
8415 echo "*** But as you try to build a module library, libtool will still create "
8416 echo "*** a static module, that should work as long as the dlopening application"
8417 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
8418 if test -z "$global_symbol_pipe"; then
8419 echo
8420 echo "*** However, this would only work if libtool was able to extract symbol"
8421 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
8422 echo "*** not find such a program. So, this module is probably useless."
8423 echo "*** 'nm' from GNU binutils and a full rebuild may help."
8424 fi
8425 if test no = "$build_old_libs"; then
8426 build_libtool_libs=module
8427 build_old_libs=yes
8428 else
8429 build_libtool_libs=no
8430 fi
8431 fi
8432 else
8433 deplibs="$dir/$old_library $deplibs"
8434 link_static=yes
8435 fi
8436 fi # link shared/static library?
8437
8438 if test lib = "$linkmode"; then
8439 if test -n "$dependency_libs" &&
8440 { test yes != "$hardcode_into_libs" ||
8441 test yes = "$build_old_libs" ||
8442 test yes = "$link_static"; }; then
8443 # Extract -R from dependency_libs
8444 temp_deplibs=
8445 for libdir in $dependency_libs; do
8446 case $libdir in
8447 -R*) func_stripname '-R' '' "$libdir"
8448 temp_xrpath=$func_stripname_result
8449 case " $xrpath " in
8450 *" $temp_xrpath "*) ;;
8451 *) func_append xrpath " $temp_xrpath";;
8452 esac;;
8453 *) func_append temp_deplibs " $libdir";;
8454 esac
8455 done
8456 dependency_libs=$temp_deplibs
8457 fi
8458
8459 func_append newlib_search_path " $absdir"
8460 # Link against this library
8461 test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
8462 # ... and its dependency_libs
8463 tmp_libs=
8464 for deplib in $dependency_libs; do
8465 newdependency_libs="$deplib $newdependency_libs"
8466 case $deplib in
8467 -L*) func_stripname '-L' '' "$deplib"
8468 func_resolve_sysroot "$func_stripname_result";;
8469 *) func_resolve_sysroot "$deplib" ;;
8470 esac
8471 if $opt_preserve_dup_deps; then
8472 case "$tmp_libs " in
8473 *" $func_resolve_sysroot_result "*)
8474 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
8475 esac
8476 fi
8477 func_append tmp_libs " $func_resolve_sysroot_result"
8478 done
8479
8480 if test no != "$link_all_deplibs"; then
8481 # Add the search paths of all dependency libraries
8482 for deplib in $dependency_libs; do
8483 path=
8484 case $deplib in
8485 -L*) path=$deplib ;;
8486 *.la)
8487 func_resolve_sysroot "$deplib"
8488 deplib=$func_resolve_sysroot_result
8489 func_dirname "$deplib" "" "."
8490 dir=$func_dirname_result
8491 # We need an absolute path.
8492 case $dir in
8493 [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
8494 *)
8495 absdir=`cd "$dir" && pwd`
8496 if test -z "$absdir"; then
8497 func_warning "cannot determine absolute directory name of '$dir'"
8498 absdir=$dir
8499 fi
8500 ;;
8501 esac
8502 if $GREP "^installed=no" $deplib > /dev/null; then
8503 case $host in
8504 *-*-darwin*)
8505 depdepl=
8506 eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
8507 if test -n "$deplibrary_names"; then
8508 for tmp in $deplibrary_names; do
8509 depdepl=$tmp
8510 done
8511 if test -f "$absdir/$objdir/$depdepl"; then
8512 depdepl=$absdir/$objdir/$depdepl
8513 darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8514 if test -z "$darwin_install_name"; then
8515 darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8516 fi
8517 func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
8518 func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
8519 path=
8520 fi
8521 fi
8522 ;;
8523 *)
8524 path=-L$absdir/$objdir
8525 ;;
8526 esac
8527 else
8528 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8529 test -z "$libdir" && \
8530 func_fatal_error "'$deplib' is not a valid libtool archive"
8531 test "$absdir" != "$libdir" && \
8532 func_warning "'$deplib' seems to be moved"
8533
8534 path=-L$absdir
8535 fi
8536 ;;
8537 esac
8538 case " $deplibs " in
8539 *" $path "*) ;;
8540 *) deplibs="$path $deplibs" ;;
8541 esac
8542 done
8543 fi # link_all_deplibs != no
8544 fi # linkmode = lib
8545 done # for deplib in $libs
8546 if test link = "$pass"; then
8547 if test prog = "$linkmode"; then
8548 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
8549 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
8550 else
8551 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8552 fi
8553 fi
8554 dependency_libs=$newdependency_libs
8555 if test dlpreopen = "$pass"; then
8556 # Link the dlpreopened libraries before other libraries
8557 for deplib in $save_deplibs; do
8558 deplibs="$deplib $deplibs"
8559 done
8560 fi
8561 if test dlopen != "$pass"; then
8562 test conv = "$pass" || {
8563 # Make sure lib_search_path contains only unique directories.
8564 lib_search_path=
8565 for dir in $newlib_search_path; do
8566 case "$lib_search_path " in
8567 *" $dir "*) ;;
8568 *) func_append lib_search_path " $dir" ;;
8569 esac
8570 done
8571 newlib_search_path=
8572 }
8573
8574 if test prog,link = "$linkmode,$pass"; then
8575 vars="compile_deplibs finalize_deplibs"
8576 else
8577 vars=deplibs
8578 fi
8579 for var in $vars dependency_libs; do
8580 # Add libraries to $var in reverse order
8581 eval tmp_libs=\"\$$var\"
8582 new_libs=
8583 for deplib in $tmp_libs; do
8584 # FIXME: Pedantically, this is the right thing to do, so
8585 # that some nasty dependency loop isn't accidentally
8586 # broken:
8587 #new_libs="$deplib $new_libs"
8588 # Pragmatically, this seems to cause very few problems in
8589 # practice:
8590 case $deplib in
8591 -L*) new_libs="$deplib $new_libs" ;;
8592 -R*) ;;
8593 *)
8594 # And here is the reason: when a library appears more
8595 # than once as an explicit dependence of a library, or
8596 # is implicitly linked in more than once by the
8597 # compiler, it is considered special, and multiple
8598 # occurrences thereof are not removed. Compare this
8599 # with having the same library being listed as a
8600 # dependency of multiple other libraries: in this case,
8601 # we know (pedantically, we assume) the library does not
8602 # need to be listed more than once, so we keep only the
8603 # last copy. This is not always right, but it is rare
8604 # enough that we require users that really mean to play
8605 # such unportable linking tricks to link the library
8606 # using -Wl,-lname, so that libtool does not consider it
8607 # for duplicate removal.
8608 case " $specialdeplibs " in
8609 *" $deplib "*) new_libs="$deplib $new_libs" ;;
8610 *)
8611 case " $new_libs " in
8612 *" $deplib "*) ;;
8613 *) new_libs="$deplib $new_libs" ;;
8614 esac
8615 ;;
8616 esac
8617 ;;
8618 esac
8619 done
8620 tmp_libs=
8621 for deplib in $new_libs; do
8622 case $deplib in
8623 -L*)
8624 case " $tmp_libs " in
8625 *" $deplib "*) ;;
8626 *) func_append tmp_libs " $deplib" ;;
8627 esac
8628 ;;
8629 *) func_append tmp_libs " $deplib" ;;
8630 esac
8631 done
8632 eval $var=\"$tmp_libs\"
8633 done # for var
8634 fi
8635
8636 # Add Sun CC postdeps if required:
8637 test CXX = "$tagname" && {
8638 case $host_os in
8639 linux*)
8640 case `$CC -V 2>&1 | sed 5q` in
8641 *Sun\ C*) # Sun C++ 5.9
8642 func_suncc_cstd_abi
8643
8644 if test no != "$suncc_use_cstd_abi"; then
8645 func_append postdeps ' -library=Cstd -library=Crun'
8646 fi
8647 ;;
8648 esac
8649 ;;
8650
8651 solaris*)
8652 func_cc_basename "$CC"
8653 case $func_cc_basename_result in
8654 CC* | sunCC*)
8655 func_suncc_cstd_abi
8656
8657 if test no != "$suncc_use_cstd_abi"; then
8658 func_append postdeps ' -library=Cstd -library=Crun'
8659 fi
8660 ;;
8661 esac
8662 ;;
8663 esac
8664 }
8665
8666 # Last step: remove runtime libs from dependency_libs
8667 # (they stay in deplibs)
8668 tmp_libs=
8669 for i in $dependency_libs; do
8670 case " $predeps $postdeps $compiler_lib_search_path " in
8671 *" $i "*)
8672 i=
8673 ;;
8674 esac
8675 if test -n "$i"; then
8676 func_append tmp_libs " $i"
8677 fi
8678 done
8679 dependency_libs=$tmp_libs
8680 done # for pass
8681 if test prog = "$linkmode"; then
8682 dlfiles=$newdlfiles
8683 fi
8684 if test prog = "$linkmode" || test lib = "$linkmode"; then
8685 dlprefiles=$newdlprefiles
8686 fi
8687
8688 case $linkmode in
8689 oldlib)
8690 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
8691 func_warning "'-dlopen' is ignored for archives"
8692 fi
8693
8694 case " $deplibs" in
8695 *\ -l* | *\ -L*)
8696 func_warning "'-l' and '-L' are ignored for archives" ;;
8697 esac
8698
8699 test -n "$rpath" && \
8700 func_warning "'-rpath' is ignored for archives"
8701
8702 test -n "$xrpath" && \
8703 func_warning "'-R' is ignored for archives"
8704
8705 test -n "$vinfo" && \
8706 func_warning "'-version-info/-version-number' is ignored for archives"
8707
8708 test -n "$release" && \
8709 func_warning "'-release' is ignored for archives"
8710
8711 test -n "$export_symbols$export_symbols_regex" && \
8712 func_warning "'-export-symbols' is ignored for archives"
8713
8714 # Now set the variables for building old libraries.
8715 build_libtool_libs=no
8716 oldlibs=$output
8717 func_append objs "$old_deplibs"
8718 ;;
8719
8720 lib)
8721 # Make sure we only generate libraries of the form 'libNAME.la'.
8722 case $outputname in
8723 lib*)
8724 func_stripname 'lib' '.la' "$outputname"
8725 name=$func_stripname_result
8726 eval shared_ext=\"$shrext_cmds\"
8727 eval libname=\"$libname_spec\"
8728 ;;
8729 *)
8730 test no = "$module" \
8731 && func_fatal_help "libtool library '$output' must begin with 'lib'"
8732
8733 if test no != "$need_lib_prefix"; then
8734 # Add the "lib" prefix for modules if required
8735 func_stripname '' '.la' "$outputname"
8736 name=$func_stripname_result
8737 eval shared_ext=\"$shrext_cmds\"
8738 eval libname=\"$libname_spec\"
8739 else
8740 func_stripname '' '.la' "$outputname"
8741 libname=$func_stripname_result
8742 fi
8743 ;;
8744 esac
8745
8746 if test -n "$objs"; then
8747 if test pass_all != "$deplibs_check_method"; then
8748 func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
8749 else
8750 echo
8751 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
8752 $ECHO "*** objects $objs is not portable!"
8753 func_append libobjs " $objs"
8754 fi
8755 fi
8756
8757 test no = "$dlself" \
8758 || func_warning "'-dlopen self' is ignored for libtool libraries"
8759
8760 set dummy $rpath
8761 shift
8762 test 1 -lt "$#" \
8763 && func_warning "ignoring multiple '-rpath's for a libtool library"
8764
8765 install_libdir=$1
8766
8767 oldlibs=
8768 if test -z "$rpath"; then
8769 if test yes = "$build_libtool_libs"; then
8770 # Building a libtool convenience library.
8771 # Some compilers have problems with a '.al' extension so
8772 # convenience libraries should have the same extension an
8773 # archive normally would.
8774 oldlibs="$output_objdir/$libname.$libext $oldlibs"
8775 build_libtool_libs=convenience
8776 build_old_libs=yes
8777 fi
8778
8779 test -n "$vinfo" && \
8780 func_warning "'-version-info/-version-number' is ignored for convenience libraries"
8781
8782 test -n "$release" && \
8783 func_warning "'-release' is ignored for convenience libraries"
8784 else
8785
8786 # Parse the version information argument.
8787 save_ifs=$IFS; IFS=:
8788 set dummy $vinfo 0 0 0
8789 shift
8790 IFS=$save_ifs
8791
8792 test -n "$7" && \
8793 func_fatal_help "too many parameters to '-version-info'"
8794
8795 # convert absolute version numbers to libtool ages
8796 # this retains compatibility with .la files and attempts
8797 # to make the code below a bit more comprehensible
8798
8799 case $vinfo_number in
8800 yes)
8801 number_major=$1
8802 number_minor=$2
8803 number_revision=$3
8804 #
8805 # There are really only two kinds -- those that
8806 # use the current revision as the major version
8807 # and those that subtract age and use age as
8808 # a minor version. But, then there is irix
8809 # that has an extra 1 added just for fun
8810 #
8811 case $version_type in
8812 # correct linux to gnu/linux during the next big refactor
8813 darwin|freebsd-elf|linux|osf|windows|none)
8814 func_arith $number_major + $number_minor
8815 current=$func_arith_result
8816 age=$number_minor
8817 revision=$number_revision
8818 ;;
8819 freebsd-aout|qnx|sunos)
8820 current=$number_major
8821 revision=$number_minor
8822 age=0
8823 ;;
8824 irix|nonstopux)
8825 func_arith $number_major + $number_minor
8826 current=$func_arith_result
8827 age=$number_minor
8828 revision=$number_minor
8829 lt_irix_increment=no
8830 ;;
8831 *)
8832 func_fatal_configuration "$modename: unknown library version type '$version_type'"
8833 ;;
8834 esac
8835 ;;
8836 no)
8837 current=$1
8838 revision=$2
8839 age=$3
8840 ;;
8841 esac
8842
8843 # Check that each of the things are valid numbers.
8844 case $current in
8845 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]) ;;
8846 *)
8847 func_error "CURRENT '$current' must be a nonnegative integer"
8848 func_fatal_error "'$vinfo' is not valid version information"
8849 ;;
8850 esac
8851
8852 case $revision in
8853 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]) ;;
8854 *)
8855 func_error "REVISION '$revision' must be a nonnegative integer"
8856 func_fatal_error "'$vinfo' is not valid version information"
8857 ;;
8858 esac
8859
8860 case $age in
8861 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]) ;;
8862 *)
8863 func_error "AGE '$age' must be a nonnegative integer"
8864 func_fatal_error "'$vinfo' is not valid version information"
8865 ;;
8866 esac
8867
8868 if test "$age" -gt "$current"; then
8869 func_error "AGE '$age' is greater than the current interface number '$current'"
8870 func_fatal_error "'$vinfo' is not valid version information"
8871 fi
8872
8873 # Calculate the version variables.
8874 major=
8875 versuffix=
8876 verstring=
8877 case $version_type in
8878 none) ;;
8879
8880 darwin)
8881 # Like Linux, but with the current version available in
8882 # verstring for coding it into the library header
8883 func_arith $current - $age
8884 major=.$func_arith_result
8885 versuffix=$major.$age.$revision
8886 # Darwin ld doesn't like 0 for these options...
8887 func_arith $current + 1
8888 minor_current=$func_arith_result
8889 xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8890 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8891 # On Darwin other compilers
8892 case $CC in
8893 nagfor*)
8894 verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8895 ;;
8896 *)
8897 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8898 ;;
8899 esac
8900 ;;
8901
8902 freebsd-aout)
8903 major=.$current
8904 versuffix=.$current.$revision
8905 ;;
8906
8907 freebsd-elf)
8908 func_arith $current - $age
8909 major=.$func_arith_result
8910 versuffix=$major.$age.$revision
8911 ;;
8912
8913 irix | nonstopux)
8914 if test no = "$lt_irix_increment"; then
8915 func_arith $current - $age
8916 else
8917 func_arith $current - $age + 1
8918 fi
8919 major=$func_arith_result
8920
8921 case $version_type in
8922 nonstopux) verstring_prefix=nonstopux ;;
8923 *) verstring_prefix=sgi ;;
8924 esac
8925 verstring=$verstring_prefix$major.$revision
8926
8927 # Add in all the interfaces that we are compatible with.
8928 loop=$revision
8929 while test 0 -ne "$loop"; do
8930 func_arith $revision - $loop
8931 iface=$func_arith_result
8932 func_arith $loop - 1
8933 loop=$func_arith_result
8934 verstring=$verstring_prefix$major.$iface:$verstring
8935 done
8936
8937 # Before this point, $major must not contain '.'.
8938 major=.$major
8939 versuffix=$major.$revision
8940 ;;
8941
8942 linux) # correct to gnu/linux during the next big refactor
8943 func_arith $current - $age
8944 major=.$func_arith_result
8945 versuffix=$major.$age.$revision
8946 ;;
8947
8948 osf)
8949 func_arith $current - $age
8950 major=.$func_arith_result
8951 versuffix=.$current.$age.$revision
8952 verstring=$current.$age.$revision
8953
8954 # Add in all the interfaces that we are compatible with.
8955 loop=$age
8956 while test 0 -ne "$loop"; do
8957 func_arith $current - $loop
8958 iface=$func_arith_result
8959 func_arith $loop - 1
8960 loop=$func_arith_result
8961 verstring=$verstring:$iface.0
8962 done
8963
8964 # Make executables depend on our current version.
8965 func_append verstring ":$current.0"
8966 ;;
8967
8968 qnx)
8969 major=.$current
8970 versuffix=.$current
8971 ;;
8972
8973 sco)
8974 major=.$current
8975 versuffix=.$current
8976 ;;
8977
8978 sunos)
8979 major=.$current
8980 versuffix=.$current.$revision
8981 ;;
8982
8983 windows)
8984 # Use '-' rather than '.', since we only want one
8985 # extension on DOS 8.3 file systems.
8986 func_arith $current - $age
8987 major=$func_arith_result
8988 versuffix=-$major
8989 ;;
8990
8991 *)
8992 func_fatal_configuration "unknown library version type '$version_type'"
8993 ;;
8994 esac
8995
8996 # Clear the version info if we defaulted, and they specified a release.
8997 if test -z "$vinfo" && test -n "$release"; then
8998 major=
8999 case $version_type in
9000 darwin)
9001 # we can't check for "0.0" in archive_cmds due to quoting
9002 # problems, so we reset it completely
9003 verstring=
9004 ;;
9005 *)
9006 verstring=0.0
9007 ;;
9008 esac
9009 if test no = "$need_version"; then
9010 versuffix=
9011 else
9012 versuffix=.0.0
9013 fi
9014 fi
9015
9016 # Remove version info from name if versioning should be avoided
9017 if test yes,no = "$avoid_version,$need_version"; then
9018 major=
9019 versuffix=
9020 verstring=
9021 fi
9022
9023 # Check to see if the archive will have undefined symbols.
9024 if test yes = "$allow_undefined"; then
9025 if test unsupported = "$allow_undefined_flag"; then
9026 if test yes = "$build_old_libs"; then
9027 func_warning "undefined symbols not allowed in $host shared libraries; building static only"
9028 build_libtool_libs=no
9029 else
9030 func_fatal_error "can't build $host shared library unless -no-undefined is specified"
9031 fi
9032 fi
9033 else
9034 # Don't allow undefined symbols.
9035 allow_undefined_flag=$no_undefined_flag
9036 fi
9037
9038 fi
9039
9040 func_generate_dlsyms "$libname" "$libname" :
9041 func_append libobjs " $symfileobj"
9042 test " " = "$libobjs" && libobjs=
9043
9044 if test relink != "$opt_mode"; then
9045 # Remove our outputs, but don't remove object files since they
9046 # may have been created when compiling PIC objects.
9047 removelist=
9048 tempremovelist=`$ECHO "$output_objdir/*"`
9049 for p in $tempremovelist; do
9050 case $p in
9051 *.$objext | *.gcno)
9052 ;;
9053 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
9054 if test -n "$precious_files_regex"; then
9055 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
9056 then
9057 continue
9058 fi
9059 fi
9060 func_append removelist " $p"
9061 ;;
9062 *) ;;
9063 esac
9064 done
9065 test -n "$removelist" && \
9066 func_show_eval "${RM}r \$removelist"
9067 fi
9068
9069 # Now set the variables for building old libraries.
9070 if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
9071 func_append oldlibs " $output_objdir/$libname.$libext"
9072
9073 # Transform .lo files to .o files.
9074 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
9075 fi
9076
9077 # Eliminate all temporary directories.
9078 #for path in $notinst_path; do
9079 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
9080 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
9081 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
9082 #done
9083
9084 if test -n "$xrpath"; then
9085 # If the user specified any rpath flags, then add them.
9086 temp_xrpath=
9087 for libdir in $xrpath; do
9088 func_replace_sysroot "$libdir"
9089 func_append temp_xrpath " -R$func_replace_sysroot_result"
9090 case "$finalize_rpath " in
9091 *" $libdir "*) ;;
9092 *) func_append finalize_rpath " $libdir" ;;
9093 esac
9094 done
9095 if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
9096 dependency_libs="$temp_xrpath $dependency_libs"
9097 fi
9098 fi
9099
9100 # Make sure dlfiles contains only unique files that won't be dlpreopened
9101 old_dlfiles=$dlfiles
9102 dlfiles=
9103 for lib in $old_dlfiles; do
9104 case " $dlprefiles $dlfiles " in
9105 *" $lib "*) ;;
9106 *) func_append dlfiles " $lib" ;;
9107 esac
9108 done
9109
9110 # Make sure dlprefiles contains only unique files
9111 old_dlprefiles=$dlprefiles
9112 dlprefiles=
9113 for lib in $old_dlprefiles; do
9114 case "$dlprefiles " in
9115 *" $lib "*) ;;
9116 *) func_append dlprefiles " $lib" ;;
9117 esac
9118 done
9119
9120 if test yes = "$build_libtool_libs"; then
9121 if test -n "$rpath"; then
9122 case $host in
9123 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
9124 # these systems don't actually have a c library (as such)!
9125 ;;
9126 *-*-rhapsody* | *-*-darwin1.[012])
9127 # Rhapsody C library is in the System framework
9128 func_append deplibs " System.ltframework"
9129 ;;
9130 *-*-netbsd*)
9131 # Don't link with libc until the a.out ld.so is fixed.
9132 ;;
9133 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
9134 # Do not include libc due to us having libc/libc_r.
9135 ;;
9136 *-*-sco3.2v5* | *-*-sco5v6*)
9137 # Causes problems with __ctype
9138 ;;
9139 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
9140 # Compiler inserts libc in the correct place for threads to work
9141 ;;
9142 *)
9143 # Add libc to deplibs on all other systems if necessary.
9144 if test yes = "$build_libtool_need_lc"; then
9145 func_append deplibs " -lc"
9146 fi
9147 ;;
9148 esac
9149 fi
9150
9151 # Transform deplibs into only deplibs that can be linked in shared.
9152 name_save=$name
9153 libname_save=$libname
9154 release_save=$release
9155 versuffix_save=$versuffix
9156 major_save=$major
9157 # I'm not sure if I'm treating the release correctly. I think
9158 # release should show up in the -l (ie -lgmp5) so we don't want to
9159 # add it in twice. Is that correct?
9160 release=
9161 versuffix=
9162 major=
9163 newdeplibs=
9164 droppeddeps=no
9165 case $deplibs_check_method in
9166 pass_all)
9167 # Don't check for shared/static. Everything works.
9168 # This might be a little naive. We might want to check
9169 # whether the library exists or not. But this is on
9170 # osf3 & osf4 and I'm not really sure... Just
9171 # implementing what was already the behavior.
9172 newdeplibs=$deplibs
9173 ;;
9174 test_compile)
9175 # This code stresses the "libraries are programs" paradigm to its
9176 # limits. Maybe even breaks it. We compile a program, linking it
9177 # against the deplibs as a proxy for the library. Then we can check
9178 # whether they linked in statically or dynamically with ldd.
9179 $opt_dry_run || $RM conftest.c
9180 cat > conftest.c <<EOF
9181 int main() { return 0; }
9182 EOF
9183 $opt_dry_run || $RM conftest
9184 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
9185 ldd_output=`ldd conftest`
9186 for i in $deplibs; do
9187 case $i in
9188 -l*)
9189 func_stripname -l '' "$i"
9190 name=$func_stripname_result
9191 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9192 case " $predeps $postdeps " in
9193 *" $i "*)
9194 func_append newdeplibs " $i"
9195 i=
9196 ;;
9197 esac
9198 fi
9199 if test -n "$i"; then
9200 libname=`eval "\\$ECHO \"$libname_spec\""`
9201 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9202 set dummy $deplib_matches; shift
9203 deplib_match=$1
9204 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9205 func_append newdeplibs " $i"
9206 else
9207 droppeddeps=yes
9208 echo
9209 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9210 echo "*** I have the capability to make that library automatically link in when"
9211 echo "*** you link to this library. But I can only do this if you have a"
9212 echo "*** shared version of the library, which I believe you do not have"
9213 echo "*** because a test_compile did reveal that the linker did not use it for"
9214 echo "*** its dynamic dependency list that programs get resolved with at runtime."
9215 fi
9216 fi
9217 ;;
9218 *)
9219 func_append newdeplibs " $i"
9220 ;;
9221 esac
9222 done
9223 else
9224 # Error occurred in the first compile. Let's try to salvage
9225 # the situation: Compile a separate program for each library.
9226 for i in $deplibs; do
9227 case $i in
9228 -l*)
9229 func_stripname -l '' "$i"
9230 name=$func_stripname_result
9231 $opt_dry_run || $RM conftest
9232 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
9233 ldd_output=`ldd conftest`
9234 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9235 case " $predeps $postdeps " in
9236 *" $i "*)
9237 func_append newdeplibs " $i"
9238 i=
9239 ;;
9240 esac
9241 fi
9242 if test -n "$i"; then
9243 libname=`eval "\\$ECHO \"$libname_spec\""`
9244 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9245 set dummy $deplib_matches; shift
9246 deplib_match=$1
9247 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9248 func_append newdeplibs " $i"
9249 else
9250 droppeddeps=yes
9251 echo
9252 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9253 echo "*** I have the capability to make that library automatically link in when"
9254 echo "*** you link to this library. But I can only do this if you have a"
9255 echo "*** shared version of the library, which you do not appear to have"
9256 echo "*** because a test_compile did reveal that the linker did not use this one"
9257 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
9258 fi
9259 fi
9260 else
9261 droppeddeps=yes
9262 echo
9263 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
9264 echo "*** make it link in! You will probably need to install it or some"
9265 echo "*** library that it depends on before this library will be fully"
9266 echo "*** functional. Installing it before continuing would be even better."
9267 fi
9268 ;;
9269 *)
9270 func_append newdeplibs " $i"
9271 ;;
9272 esac
9273 done
9274 fi
9275 ;;
9276 file_magic*)
9277 set dummy $deplibs_check_method; shift
9278 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
9279 for a_deplib in $deplibs; do
9280 case $a_deplib in
9281 -l*)
9282 func_stripname -l '' "$a_deplib"
9283 name=$func_stripname_result
9284 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9285 case " $predeps $postdeps " in
9286 *" $a_deplib "*)
9287 func_append newdeplibs " $a_deplib"
9288 a_deplib=
9289 ;;
9290 esac
9291 fi
9292 if test -n "$a_deplib"; then
9293 libname=`eval "\\$ECHO \"$libname_spec\""`
9294 if test -n "$file_magic_glob"; then
9295 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
9296 else
9297 libnameglob=$libname
9298 fi
9299 test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
9300 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9301 if test yes = "$want_nocaseglob"; then
9302 shopt -s nocaseglob
9303 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
9304 $nocaseglob
9305 else
9306 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
9307 fi
9308 for potent_lib in $potential_libs; do
9309 # Follow soft links.
9310 if ls -lLd "$potent_lib" 2>/dev/null |
9311 $GREP " -> " >/dev/null; then
9312 continue
9313 fi
9314 # The statement above tries to avoid entering an
9315 # endless loop below, in case of cyclic links.
9316 # We might still enter an endless loop, since a link
9317 # loop can be closed while we follow links,
9318 # but so what?
9319 potlib=$potent_lib
9320 while test -h "$potlib" 2>/dev/null; do
9321 potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
9322 case $potliblink in
9323 [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
9324 *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
9325 esac
9326 done
9327 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
9328 $SED -e 10q |
9329 $EGREP "$file_magic_regex" > /dev/null; then
9330 func_append newdeplibs " $a_deplib"
9331 a_deplib=
9332 break 2
9333 fi
9334 done
9335 done
9336 fi
9337 if test -n "$a_deplib"; then
9338 droppeddeps=yes
9339 echo
9340 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9341 echo "*** I have the capability to make that library automatically link in when"
9342 echo "*** you link to this library. But I can only do this if you have a"
9343 echo "*** shared version of the library, which you do not appear to have"
9344 echo "*** because I did check the linker path looking for a file starting"
9345 if test -z "$potlib"; then
9346 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
9347 else
9348 $ECHO "*** with $libname and none of the candidates passed a file format test"
9349 $ECHO "*** using a file magic. Last file checked: $potlib"
9350 fi
9351 fi
9352 ;;
9353 *)
9354 # Add a -L argument.
9355 func_append newdeplibs " $a_deplib"
9356 ;;
9357 esac
9358 done # Gone through all deplibs.
9359 ;;
9360 match_pattern*)
9361 set dummy $deplibs_check_method; shift
9362 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
9363 for a_deplib in $deplibs; do
9364 case $a_deplib in
9365 -l*)
9366 func_stripname -l '' "$a_deplib"
9367 name=$func_stripname_result
9368 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9369 case " $predeps $postdeps " in
9370 *" $a_deplib "*)
9371 func_append newdeplibs " $a_deplib"
9372 a_deplib=
9373 ;;
9374 esac
9375 fi
9376 if test -n "$a_deplib"; then
9377 libname=`eval "\\$ECHO \"$libname_spec\""`
9378 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9379 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
9380 for potent_lib in $potential_libs; do
9381 potlib=$potent_lib # see symlink-check above in file_magic test
9382 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
9383 $EGREP "$match_pattern_regex" > /dev/null; then
9384 func_append newdeplibs " $a_deplib"
9385 a_deplib=
9386 break 2
9387 fi
9388 done
9389 done
9390 fi
9391 if test -n "$a_deplib"; then
9392 droppeddeps=yes
9393 echo
9394 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9395 echo "*** I have the capability to make that library automatically link in when"
9396 echo "*** you link to this library. But I can only do this if you have a"
9397 echo "*** shared version of the library, which you do not appear to have"
9398 echo "*** because I did check the linker path looking for a file starting"
9399 if test -z "$potlib"; then
9400 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
9401 else
9402 $ECHO "*** with $libname and none of the candidates passed a file format test"
9403 $ECHO "*** using a regex pattern. Last file checked: $potlib"
9404 fi
9405 fi
9406 ;;
9407 *)
9408 # Add a -L argument.
9409 func_append newdeplibs " $a_deplib"
9410 ;;
9411 esac
9412 done # Gone through all deplibs.
9413 ;;
9414 none | unknown | *)
9415 newdeplibs=
9416 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
9417 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9418 for i in $predeps $postdeps; do
9419 # can't use Xsed below, because $i might contain '/'
9420 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
9421 done
9422 fi
9423 case $tmp_deplibs in
9424 *[!\ \ ]*)
9425 echo
9426 if test none = "$deplibs_check_method"; then
9427 echo "*** Warning: inter-library dependencies are not supported in this platform."
9428 else
9429 echo "*** Warning: inter-library dependencies are not known to be supported."
9430 fi
9431 echo "*** All declared inter-library dependencies are being dropped."
9432 droppeddeps=yes
9433 ;;
9434 esac
9435 ;;
9436 esac
9437 versuffix=$versuffix_save
9438 major=$major_save
9439 release=$release_save
9440 libname=$libname_save
9441 name=$name_save
9442
9443 case $host in
9444 *-*-rhapsody* | *-*-darwin1.[012])
9445 # On Rhapsody replace the C library with the System framework
9446 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
9447 ;;
9448 esac
9449
9450 if test yes = "$droppeddeps"; then
9451 if test yes = "$module"; then
9452 echo
9453 echo "*** Warning: libtool could not satisfy all declared inter-library"
9454 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
9455 echo "*** a static module, that should work as long as the dlopening"
9456 echo "*** application is linked with the -dlopen flag."
9457 if test -z "$global_symbol_pipe"; then
9458 echo
9459 echo "*** However, this would only work if libtool was able to extract symbol"
9460 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
9461 echo "*** not find such a program. So, this module is probably useless."
9462 echo "*** 'nm' from GNU binutils and a full rebuild may help."
9463 fi
9464 if test no = "$build_old_libs"; then
9465 oldlibs=$output_objdir/$libname.$libext
9466 build_libtool_libs=module
9467 build_old_libs=yes
9468 else
9469 build_libtool_libs=no
9470 fi
9471 else
9472 echo "*** The inter-library dependencies that have been dropped here will be"
9473 echo "*** automatically added whenever a program is linked with this library"
9474 echo "*** or is declared to -dlopen it."
9475
9476 if test no = "$allow_undefined"; then
9477 echo
9478 echo "*** Since this library must not contain undefined symbols,"
9479 echo "*** because either the platform does not support them or"
9480 echo "*** it was explicitly requested with -no-undefined,"
9481 echo "*** libtool will only create a static version of it."
9482 if test no = "$build_old_libs"; then
9483 oldlibs=$output_objdir/$libname.$libext
9484 build_libtool_libs=module
9485 build_old_libs=yes
9486 else
9487 build_libtool_libs=no
9488 fi
9489 fi
9490 fi
9491 fi
9492 # Done checking deplibs!
9493 deplibs=$newdeplibs
9494 fi
9495 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
9496 case $host in
9497 *-*-darwin*)
9498 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9499 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9500 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9501 ;;
9502 esac
9503
9504 # move library search paths that coincide with paths to not yet
9505 # installed libraries to the beginning of the library search list
9506 new_libs=
9507 for path in $notinst_path; do
9508 case " $new_libs " in
9509 *" -L$path/$objdir "*) ;;
9510 *)
9511 case " $deplibs " in
9512 *" -L$path/$objdir "*)
9513 func_append new_libs " -L$path/$objdir" ;;
9514 esac
9515 ;;
9516 esac
9517 done
9518 for deplib in $deplibs; do
9519 case $deplib in
9520 -L*)
9521 case " $new_libs " in
9522 *" $deplib "*) ;;
9523 *) func_append new_libs " $deplib" ;;
9524 esac
9525 ;;
9526 *) func_append new_libs " $deplib" ;;
9527 esac
9528 done
9529 deplibs=$new_libs
9530
9531 # All the library-specific variables (install_libdir is set above).
9532 library_names=
9533 old_library=
9534 dlname=
9535
9536 # Test again, we may have decided not to build it any more
9537 if test yes = "$build_libtool_libs"; then
9538 # Remove $wl instances when linking with ld.
9539 # FIXME: should test the right _cmds variable.
9540 case $archive_cmds in
9541 *\$LD\ *) wl= ;;
9542 esac
9543 if test yes = "$hardcode_into_libs"; then
9544 # Hardcode the library paths
9545 hardcode_libdirs=
9546 dep_rpath=
9547 rpath=$finalize_rpath
9548 test relink = "$opt_mode" || rpath=$compile_rpath$rpath
9549 for libdir in $rpath; do
9550 if test -n "$hardcode_libdir_flag_spec"; then
9551 if test -n "$hardcode_libdir_separator"; then
9552 func_replace_sysroot "$libdir"
9553 libdir=$func_replace_sysroot_result
9554 if test -z "$hardcode_libdirs"; then
9555 hardcode_libdirs=$libdir
9556 else
9557 # Just accumulate the unique libdirs.
9558 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
9559 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
9560 ;;
9561 *)
9562 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
9563 ;;
9564 esac
9565 fi
9566 else
9567 eval flag=\"$hardcode_libdir_flag_spec\"
9568 func_append dep_rpath " $flag"
9569 fi
9570 elif test -n "$runpath_var"; then
9571 case "$perm_rpath " in
9572 *" $libdir "*) ;;
9573 *) func_append perm_rpath " $libdir" ;;
9574 esac
9575 fi
9576 done
9577 # Substitute the hardcoded libdirs into the rpath.
9578 if test -n "$hardcode_libdir_separator" &&
9579 test -n "$hardcode_libdirs"; then
9580 libdir=$hardcode_libdirs
9581 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
9582 fi
9583 if test -n "$runpath_var" && test -n "$perm_rpath"; then
9584 # We should set the runpath_var.
9585 rpath=
9586 for dir in $perm_rpath; do
9587 func_append rpath "$dir:"
9588 done
9589 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
9590 fi
9591 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
9592 fi
9593
9594 shlibpath=$finalize_shlibpath
9595 test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
9596 if test -n "$shlibpath"; then
9597 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
9598 fi
9599
9600 # Get the real and link names of the library.
9601 eval shared_ext=\"$shrext_cmds\"
9602 eval library_names=\"$library_names_spec\"
9603 set dummy $library_names
9604 shift
9605 realname=$1
9606 shift
9607
9608 if test -n "$soname_spec"; then
9609 eval soname=\"$soname_spec\"
9610 else
9611 soname=$realname
9612 fi
9613 if test -z "$dlname"; then
9614 dlname=$soname
9615 fi
9616
9617 lib=$output_objdir/$realname
9618 linknames=
9619 for link
9620 do
9621 func_append linknames " $link"
9622 done
9623
9624 # Use standard objects if they are pic
9625 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
9626 test "X$libobjs" = "X " && libobjs=
9627
9628 delfiles=
9629 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9630 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
9631 export_symbols=$output_objdir/$libname.uexp
9632 func_append delfiles " $export_symbols"
9633 fi
9634
9635 orig_export_symbols=
9636 case $host_os in
9637 cygwin* | mingw* | cegcc*)
9638 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
9639 # exporting using user supplied symfile
9640 func_dll_def_p "$export_symbols" || {
9641 # and it's NOT already a .def file. Must figure out
9642 # which of the given symbols are data symbols and tag
9643 # them as such. So, trigger use of export_symbols_cmds.
9644 # export_symbols gets reassigned inside the "prepare
9645 # the list of exported symbols" if statement, so the
9646 # include_expsyms logic still works.
9647 orig_export_symbols=$export_symbols
9648 export_symbols=
9649 always_export_symbols=yes
9650 }
9651 fi
9652 ;;
9653 esac
9654
9655 # Prepare the list of exported symbols
9656 if test -z "$export_symbols"; then
9657 if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
9658 func_verbose "generating symbol list for '$libname.la'"
9659 export_symbols=$output_objdir/$libname.exp
9660 $opt_dry_run || $RM $export_symbols
9661 cmds=$export_symbols_cmds
9662 save_ifs=$IFS; IFS='~'
9663 for cmd1 in $cmds; do
9664 IFS=$save_ifs
9665 # Take the normal branch if the nm_file_list_spec branch
9666 # doesn't work or if tool conversion is not needed.
9667 case $nm_file_list_spec~$to_tool_file_cmd in
9668 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
9669 try_normal_branch=yes
9670 eval cmd=\"$cmd1\"
9671 func_len " $cmd"
9672 len=$func_len_result
9673 ;;
9674 *)
9675 try_normal_branch=no
9676 ;;
9677 esac
9678 if test yes = "$try_normal_branch" \
9679 && { test "$len" -lt "$max_cmd_len" \
9680 || test "$max_cmd_len" -le -1; }
9681 then
9682 func_show_eval "$cmd" 'exit $?'
9683 skipped_export=false
9684 elif test -n "$nm_file_list_spec"; then
9685 func_basename "$output"
9686 output_la=$func_basename_result
9687 save_libobjs=$libobjs
9688 save_output=$output
9689 output=$output_objdir/$output_la.nm
9690 func_to_tool_file "$output"
9691 libobjs=$nm_file_list_spec$func_to_tool_file_result
9692 func_append delfiles " $output"
9693 func_verbose "creating $NM input file list: $output"
9694 for obj in $save_libobjs; do
9695 func_to_tool_file "$obj"
9696 $ECHO "$func_to_tool_file_result"
9697 done > "$output"
9698 eval cmd=\"$cmd1\"
9699 func_show_eval "$cmd" 'exit $?'
9700 output=$save_output
9701 libobjs=$save_libobjs
9702 skipped_export=false
9703 else
9704 # The command line is too long to execute in one step.
9705 func_verbose "using reloadable object file for export list..."
9706 skipped_export=:
9707 # Break out early, otherwise skipped_export may be
9708 # set to false by a later but shorter cmd.
9709 break
9710 fi
9711 done
9712 IFS=$save_ifs
9713 if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
9714 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
9715 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
9716 fi
9717 fi
9718 fi
9719
9720 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9721 tmp_export_symbols=$export_symbols
9722 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
9723 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
9724 fi
9725
9726 if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
9727 # The given exports_symbols file has to be filtered, so filter it.
9728 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
9729 # FIXME: $output_objdir/$libname.filter potentially contains lots of
9730 # 's' commands, which not all seds can handle. GNU sed should be fine
9731 # though. Also, the filter scales superlinearly with the number of
9732 # global variables. join(1) would be nice here, but unfortunately
9733 # isn't a blessed tool.
9734 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
9735 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
9736 export_symbols=$output_objdir/$libname.def
9737 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
9738 fi
9739
9740 tmp_deplibs=
9741 for test_deplib in $deplibs; do
9742 case " $convenience " in
9743 *" $test_deplib "*) ;;
9744 *)
9745 func_append tmp_deplibs " $test_deplib"
9746 ;;
9747 esac
9748 done
9749 deplibs=$tmp_deplibs
9750
9751 if test -n "$convenience"; then
9752 if test -n "$whole_archive_flag_spec" &&
9753 test yes = "$compiler_needs_object" &&
9754 test -z "$libobjs"; then
9755 # extract the archives, so we have objects to list.
9756 # TODO: could optimize this to just extract one archive.
9757 whole_archive_flag_spec=
9758 fi
9759 if test -n "$whole_archive_flag_spec"; then
9760 save_libobjs=$libobjs
9761 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
9762 test "X$libobjs" = "X " && libobjs=
9763 else
9764 gentop=$output_objdir/${outputname}x
9765 func_append generated " $gentop"
9766
9767 func_extract_archives $gentop $convenience
9768 func_append libobjs " $func_extract_archives_result"
9769 test "X$libobjs" = "X " && libobjs=
9770 fi
9771 fi
9772
9773 if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
9774 eval flag=\"$thread_safe_flag_spec\"
9775 func_append linker_flags " $flag"
9776 fi
9777
9778 # Make a backup of the uninstalled library when relinking
9779 if test relink = "$opt_mode"; then
9780 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
9781 fi
9782
9783 # Do each of the archive commands.
9784 if test yes = "$module" && test -n "$module_cmds"; then
9785 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
9786 eval test_cmds=\"$module_expsym_cmds\"
9787 cmds=$module_expsym_cmds
9788 else
9789 eval test_cmds=\"$module_cmds\"
9790 cmds=$module_cmds
9791 fi
9792 else
9793 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
9794 eval test_cmds=\"$archive_expsym_cmds\"
9795 cmds=$archive_expsym_cmds
9796 else
9797 eval test_cmds=\"$archive_cmds\"
9798 cmds=$archive_cmds
9799 fi
9800 fi
9801
9802 if test : != "$skipped_export" &&
9803 func_len " $test_cmds" &&
9804 len=$func_len_result &&
9805 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9806 :
9807 else
9808 # The command line is too long to link in one step, link piecewise
9809 # or, if using GNU ld and skipped_export is not :, use a linker
9810 # script.
9811
9812 # Save the value of $output and $libobjs because we want to
9813 # use them later. If we have whole_archive_flag_spec, we
9814 # want to use save_libobjs as it was before
9815 # whole_archive_flag_spec was expanded, because we can't
9816 # assume the linker understands whole_archive_flag_spec.
9817 # This may have to be revisited, in case too many
9818 # convenience libraries get linked in and end up exceeding
9819 # the spec.
9820 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
9821 save_libobjs=$libobjs
9822 fi
9823 save_output=$output
9824 func_basename "$output"
9825 output_la=$func_basename_result
9826
9827 # Clear the reloadable object creation command queue and
9828 # initialize k to one.
9829 test_cmds=
9830 concat_cmds=
9831 objlist=
9832 last_robj=
9833 k=1
9834
9835 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
9836 output=$output_objdir/$output_la.lnkscript
9837 func_verbose "creating GNU ld script: $output"
9838 echo 'INPUT (' > $output
9839 for obj in $save_libobjs
9840 do
9841 func_to_tool_file "$obj"
9842 $ECHO "$func_to_tool_file_result" >> $output
9843 done
9844 echo ')' >> $output
9845 func_append delfiles " $output"
9846 func_to_tool_file "$output"
9847 output=$func_to_tool_file_result
9848 elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
9849 output=$output_objdir/$output_la.lnk
9850 func_verbose "creating linker input file list: $output"
9851 : > $output
9852 set x $save_libobjs
9853 shift
9854 firstobj=
9855 if test yes = "$compiler_needs_object"; then
9856 firstobj="$1 "
9857 shift
9858 fi
9859 for obj
9860 do
9861 func_to_tool_file "$obj"
9862 $ECHO "$func_to_tool_file_result" >> $output
9863 done
9864 func_append delfiles " $output"
9865 func_to_tool_file "$output"
9866 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
9867 else
9868 if test -n "$save_libobjs"; then
9869 func_verbose "creating reloadable object files..."
9870 output=$output_objdir/$output_la-$k.$objext
9871 eval test_cmds=\"$reload_cmds\"
9872 func_len " $test_cmds"
9873 len0=$func_len_result
9874 len=$len0
9875
9876 # Loop over the list of objects to be linked.
9877 for obj in $save_libobjs
9878 do
9879 func_len " $obj"
9880 func_arith $len + $func_len_result
9881 len=$func_arith_result
9882 if test -z "$objlist" ||
9883 test "$len" -lt "$max_cmd_len"; then
9884 func_append objlist " $obj"
9885 else
9886 # The command $test_cmds is almost too long, add a
9887 # command to the queue.
9888 if test 1 -eq "$k"; then
9889 # The first file doesn't have a previous command to add.
9890 reload_objs=$objlist
9891 eval concat_cmds=\"$reload_cmds\"
9892 else
9893 # All subsequent reloadable object files will link in
9894 # the last one created.
9895 reload_objs="$objlist $last_robj"
9896 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
9897 fi
9898 last_robj=$output_objdir/$output_la-$k.$objext
9899 func_arith $k + 1
9900 k=$func_arith_result
9901 output=$output_objdir/$output_la-$k.$objext
9902 objlist=" $obj"
9903 func_len " $last_robj"
9904 func_arith $len0 + $func_len_result
9905 len=$func_arith_result
9906 fi
9907 done
9908 # Handle the remaining objects by creating one last
9909 # reloadable object file. All subsequent reloadable object
9910 # files will link in the last one created.
9911 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9912 reload_objs="$objlist $last_robj"
9913 eval concat_cmds=\"\$concat_cmds$reload_cmds\"
9914 if test -n "$last_robj"; then
9915 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
9916 fi
9917 func_append delfiles " $output"
9918
9919 else
9920 output=
9921 fi
9922
9923 ${skipped_export-false} && {
9924 func_verbose "generating symbol list for '$libname.la'"
9925 export_symbols=$output_objdir/$libname.exp
9926 $opt_dry_run || $RM $export_symbols
9927 libobjs=$output
9928 # Append the command to create the export file.
9929 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9930 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
9931 if test -n "$last_robj"; then
9932 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
9933 fi
9934 }
9935
9936 test -n "$save_libobjs" &&
9937 func_verbose "creating a temporary reloadable object file: $output"
9938
9939 # Loop through the commands generated above and execute them.
9940 save_ifs=$IFS; IFS='~'
9941 for cmd in $concat_cmds; do
9942 IFS=$save_ifs
9943 $opt_quiet || {
9944 func_quote_for_expand "$cmd"
9945 eval "func_echo $func_quote_for_expand_result"
9946 }
9947 $opt_dry_run || eval "$cmd" || {
9948 lt_exit=$?
9949
9950 # Restore the uninstalled library and exit
9951 if test relink = "$opt_mode"; then
9952 ( cd "$output_objdir" && \
9953 $RM "${realname}T" && \
9954 $MV "${realname}U" "$realname" )
9955 fi
9956
9957 exit $lt_exit
9958 }
9959 done
9960 IFS=$save_ifs
9961
9962 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
9963 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
9964 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
9965 fi
9966 fi
9967
9968 ${skipped_export-false} && {
9969 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9970 tmp_export_symbols=$export_symbols
9971 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
9972 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
9973 fi
9974
9975 if test -n "$orig_export_symbols"; then
9976 # The given exports_symbols file has to be filtered, so filter it.
9977 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
9978 # FIXME: $output_objdir/$libname.filter potentially contains lots of
9979 # 's' commands, which not all seds can handle. GNU sed should be fine
9980 # though. Also, the filter scales superlinearly with the number of
9981 # global variables. join(1) would be nice here, but unfortunately
9982 # isn't a blessed tool.
9983 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
9984 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
9985 export_symbols=$output_objdir/$libname.def
9986 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
9987 fi
9988 }
9989
9990 libobjs=$output
9991 # Restore the value of output.
9992 output=$save_output
9993
9994 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
9995 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
9996 test "X$libobjs" = "X " && libobjs=
9997 fi
9998 # Expand the library linking commands again to reset the
9999 # value of $libobjs for piecewise linking.
10000
10001 # Do each of the archive commands.
10002 if test yes = "$module" && test -n "$module_cmds"; then
10003 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
10004 cmds=$module_expsym_cmds
10005 else
10006 cmds=$module_cmds
10007 fi
10008 else
10009 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
10010 cmds=$archive_expsym_cmds
10011 else
10012 cmds=$archive_cmds
10013 fi
10014 fi
10015 fi
10016
10017 if test -n "$delfiles"; then
10018 # Append the command to remove temporary files to $cmds.
10019 eval cmds=\"\$cmds~\$RM $delfiles\"
10020 fi
10021
10022 # Add any objects from preloaded convenience libraries
10023 if test -n "$dlprefiles"; then
10024 gentop=$output_objdir/${outputname}x
10025 func_append generated " $gentop"
10026
10027 func_extract_archives $gentop $dlprefiles
10028 func_append libobjs " $func_extract_archives_result"
10029 test "X$libobjs" = "X " && libobjs=
10030 fi
10031
10032 save_ifs=$IFS; IFS='~'
10033 for cmd in $cmds; do
10034 IFS=$sp$nl
10035 eval cmd=\"$cmd\"
10036 IFS=$save_ifs
10037 $opt_quiet || {
10038 func_quote_for_expand "$cmd"
10039 eval "func_echo $func_quote_for_expand_result"
10040 }
10041 $opt_dry_run || eval "$cmd" || {
10042 lt_exit=$?
10043
10044 # Restore the uninstalled library and exit
10045 if test relink = "$opt_mode"; then
10046 ( cd "$output_objdir" && \
10047 $RM "${realname}T" && \
10048 $MV "${realname}U" "$realname" )
10049 fi
10050
10051 exit $lt_exit
10052 }
10053 done
10054 IFS=$save_ifs
10055
10056 # Restore the uninstalled library and exit
10057 if test relink = "$opt_mode"; then
10058 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
10059
10060 if test -n "$convenience"; then
10061 if test -z "$whole_archive_flag_spec"; then
10062 func_show_eval '${RM}r "$gentop"'
10063 fi
10064 fi
10065
10066 exit $EXIT_SUCCESS
10067 fi
10068
10069 # Create links to the real library.
10070 for linkname in $linknames; do
10071 if test "$realname" != "$linkname"; then
10072 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
10073 fi
10074 done
10075
10076 # If -module or -export-dynamic was specified, set the dlname.
10077 if test yes = "$module" || test yes = "$export_dynamic"; then
10078 # On all known operating systems, these are identical.
10079 dlname=$soname
10080 fi
10081 fi
10082 ;;
10083
10084 obj)
10085 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
10086 func_warning "'-dlopen' is ignored for objects"
10087 fi
10088
10089 case " $deplibs" in
10090 *\ -l* | *\ -L*)
10091 func_warning "'-l' and '-L' are ignored for objects" ;;
10092 esac
10093
10094 test -n "$rpath" && \
10095 func_warning "'-rpath' is ignored for objects"
10096
10097 test -n "$xrpath" && \
10098 func_warning "'-R' is ignored for objects"
10099
10100 test -n "$vinfo" && \
10101 func_warning "'-version-info' is ignored for objects"
10102
10103 test -n "$release" && \
10104 func_warning "'-release' is ignored for objects"
10105
10106 case $output in
10107 *.lo)
10108 test -n "$objs$old_deplibs" && \
10109 func_fatal_error "cannot build library object '$output' from non-libtool objects"
10110
10111 libobj=$output
10112 func_lo2o "$libobj"
10113 obj=$func_lo2o_result
10114 ;;
10115 *)
10116 libobj=
10117 obj=$output
10118 ;;
10119 esac
10120
10121 # Delete the old objects.
10122 $opt_dry_run || $RM $obj $libobj
10123
10124 # Objects from convenience libraries. This assumes
10125 # single-version convenience libraries. Whenever we create
10126 # different ones for PIC/non-PIC, this we'll have to duplicate
10127 # the extraction.
10128 reload_conv_objs=
10129 gentop=
10130 # if reload_cmds runs $LD directly, get rid of -Wl from
10131 # whole_archive_flag_spec and hope we can get by with turning comma
10132 # into space.
10133 case $reload_cmds in
10134 *\$LD[\ \$]*) wl= ;;
10135 esac
10136 if test -n "$convenience"; then
10137 if test -n "$whole_archive_flag_spec"; then
10138 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
10139 test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
10140 reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
10141 else
10142 gentop=$output_objdir/${obj}x
10143 func_append generated " $gentop"
10144
10145 func_extract_archives $gentop $convenience
10146 reload_conv_objs="$reload_objs $func_extract_archives_result"
10147 fi
10148 fi
10149
10150 # If we're not building shared, we need to use non_pic_objs
10151 test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
10152
10153 # Create the old-style object.
10154 reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
10155
10156 output=$obj
10157 func_execute_cmds "$reload_cmds" 'exit $?'
10158
10159 # Exit if we aren't doing a library object file.
10160 if test -z "$libobj"; then
10161 if test -n "$gentop"; then
10162 func_show_eval '${RM}r "$gentop"'
10163 fi
10164
10165 exit $EXIT_SUCCESS
10166 fi
10167
10168 test yes = "$build_libtool_libs" || {
10169 if test -n "$gentop"; then
10170 func_show_eval '${RM}r "$gentop"'
10171 fi
10172
10173 # Create an invalid libtool object if no PIC, so that we don't
10174 # accidentally link it into a program.
10175 # $show "echo timestamp > $libobj"
10176 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
10177 exit $EXIT_SUCCESS
10178 }
10179
10180 if test -n "$pic_flag" || test default != "$pic_mode"; then
10181 # Only do commands if we really have different PIC objects.
10182 reload_objs="$libobjs $reload_conv_objs"
10183 output=$libobj
10184 func_execute_cmds "$reload_cmds" 'exit $?'
10185 fi
10186
10187 if test -n "$gentop"; then
10188 func_show_eval '${RM}r "$gentop"'
10189 fi
10190
10191 exit $EXIT_SUCCESS
10192 ;;
10193
10194 prog)
10195 case $host in
10196 *cygwin*) func_stripname '' '.exe' "$output"
10197 output=$func_stripname_result.exe;;
10198 esac
10199 test -n "$vinfo" && \
10200 func_warning "'-version-info' is ignored for programs"
10201
10202 test -n "$release" && \
10203 func_warning "'-release' is ignored for programs"
10204
10205 $preload \
10206 && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
10207 && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
10208
10209 case $host in
10210 *-*-rhapsody* | *-*-darwin1.[012])
10211 # On Rhapsody replace the C library is the System framework
10212 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
10213 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
10214 ;;
10215 esac
10216
10217 case $host in
10218 *-*-darwin*)
10219 # Don't allow lazy linking, it breaks C++ global constructors
10220 # But is supposedly fixed on 10.4 or later (yay!).
10221 if test CXX = "$tagname"; then
10222 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
10223 10.[0123])
10224 func_append compile_command " $wl-bind_at_load"
10225 func_append finalize_command " $wl-bind_at_load"
10226 ;;
10227 esac
10228 fi
10229 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
10230 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
10231 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
10232 ;;
10233 esac
10234
10235
10236 # move library search paths that coincide with paths to not yet
10237 # installed libraries to the beginning of the library search list
10238 new_libs=
10239 for path in $notinst_path; do
10240 case " $new_libs " in
10241 *" -L$path/$objdir "*) ;;
10242 *)
10243 case " $compile_deplibs " in
10244 *" -L$path/$objdir "*)
10245 func_append new_libs " -L$path/$objdir" ;;
10246 esac
10247 ;;
10248 esac
10249 done
10250 for deplib in $compile_deplibs; do
10251 case $deplib in
10252 -L*)
10253 case " $new_libs " in
10254 *" $deplib "*) ;;
10255 *) func_append new_libs " $deplib" ;;
10256 esac
10257 ;;
10258 *) func_append new_libs " $deplib" ;;
10259 esac
10260 done
10261 compile_deplibs=$new_libs
10262
10263
10264 func_append compile_command " $compile_deplibs"
10265 func_append finalize_command " $finalize_deplibs"
10266
10267 if test -n "$rpath$xrpath"; then
10268 # If the user specified any rpath flags, then add them.
10269 for libdir in $rpath $xrpath; do
10270 # This is the magic to use -rpath.
10271 case "$finalize_rpath " in
10272 *" $libdir "*) ;;
10273 *) func_append finalize_rpath " $libdir" ;;
10274 esac
10275 done
10276 fi
10277
10278 # Now hardcode the library paths
10279 rpath=
10280 hardcode_libdirs=
10281 for libdir in $compile_rpath $finalize_rpath; do
10282 if test -n "$hardcode_libdir_flag_spec"; then
10283 if test -n "$hardcode_libdir_separator"; then
10284 if test -z "$hardcode_libdirs"; then
10285 hardcode_libdirs=$libdir
10286 else
10287 # Just accumulate the unique libdirs.
10288 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
10289 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
10290 ;;
10291 *)
10292 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
10293 ;;
10294 esac
10295 fi
10296 else
10297 eval flag=\"$hardcode_libdir_flag_spec\"
10298 func_append rpath " $flag"
10299 fi
10300 elif test -n "$runpath_var"; then
10301 case "$perm_rpath " in
10302 *" $libdir "*) ;;
10303 *) func_append perm_rpath " $libdir" ;;
10304 esac
10305 fi
10306 case $host in
10307 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
10308 testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
10309 case :$dllsearchpath: in
10310 *":$libdir:"*) ;;
10311 ::) dllsearchpath=$libdir;;
10312 *) func_append dllsearchpath ":$libdir";;
10313 esac
10314 case :$dllsearchpath: in
10315 *":$testbindir:"*) ;;
10316 ::) dllsearchpath=$testbindir;;
10317 *) func_append dllsearchpath ":$testbindir";;
10318 esac
10319 ;;
10320 esac
10321 done
10322 # Substitute the hardcoded libdirs into the rpath.
10323 if test -n "$hardcode_libdir_separator" &&
10324 test -n "$hardcode_libdirs"; then
10325 libdir=$hardcode_libdirs
10326 eval rpath=\" $hardcode_libdir_flag_spec\"
10327 fi
10328 compile_rpath=$rpath
10329
10330 rpath=
10331 hardcode_libdirs=
10332 for libdir in $finalize_rpath; do
10333 if test -n "$hardcode_libdir_flag_spec"; then
10334 if test -n "$hardcode_libdir_separator"; then
10335 if test -z "$hardcode_libdirs"; then
10336 hardcode_libdirs=$libdir
10337 else
10338 # Just accumulate the unique libdirs.
10339 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
10340 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
10341 ;;
10342 *)
10343 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
10344 ;;
10345 esac
10346 fi
10347 else
10348 eval flag=\"$hardcode_libdir_flag_spec\"
10349 func_append rpath " $flag"
10350 fi
10351 elif test -n "$runpath_var"; then
10352 case "$finalize_perm_rpath " in
10353 *" $libdir "*) ;;
10354 *) func_append finalize_perm_rpath " $libdir" ;;
10355 esac
10356 fi
10357 done
10358 # Substitute the hardcoded libdirs into the rpath.
10359 if test -n "$hardcode_libdir_separator" &&
10360 test -n "$hardcode_libdirs"; then
10361 libdir=$hardcode_libdirs
10362 eval rpath=\" $hardcode_libdir_flag_spec\"
10363 fi
10364 finalize_rpath=$rpath
10365
10366 if test -n "$libobjs" && test yes = "$build_old_libs"; then
10367 # Transform all the library objects into standard objects.
10368 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
10369 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
10370 fi
10371
10372 func_generate_dlsyms "$outputname" "@PROGRAM@" false
10373
10374 # template prelinking step
10375 if test -n "$prelink_cmds"; then
10376 func_execute_cmds "$prelink_cmds" 'exit $?'
10377 fi
10378
10379 wrappers_required=:
10380 case $host in
10381 *cegcc* | *mingw32ce*)
10382 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
10383 wrappers_required=false
10384 ;;
10385 *cygwin* | *mingw* )
10386 test yes = "$build_libtool_libs" || wrappers_required=false
10387 ;;
10388 *)
10389 if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
10390 wrappers_required=false
10391 fi
10392 ;;
10393 esac
10394 $wrappers_required || {
10395 # Replace the output file specification.
10396 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
10397 link_command=$compile_command$compile_rpath
10398
10399 # We have no uninstalled library dependencies, so finalize right now.
10400 exit_status=0
10401 func_show_eval "$link_command" 'exit_status=$?'
10402
10403 if test -n "$postlink_cmds"; then
10404 func_to_tool_file "$output"
10405 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10406 func_execute_cmds "$postlink_cmds" 'exit $?'
10407 fi
10408
10409 # Delete the generated files.
10410 if test -f "$output_objdir/${outputname}S.$objext"; then
10411 func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
10412 fi
10413
10414 exit $exit_status
10415 }
10416
10417 if test -n "$compile_shlibpath$finalize_shlibpath"; then
10418 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
10419 fi
10420 if test -n "$finalize_shlibpath"; then
10421 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
10422 fi
10423
10424 compile_var=
10425 finalize_var=
10426 if test -n "$runpath_var"; then
10427 if test -n "$perm_rpath"; then
10428 # We should set the runpath_var.
10429 rpath=
10430 for dir in $perm_rpath; do
10431 func_append rpath "$dir:"
10432 done
10433 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
10434 fi
10435 if test -n "$finalize_perm_rpath"; then
10436 # We should set the runpath_var.
10437 rpath=
10438 for dir in $finalize_perm_rpath; do
10439 func_append rpath "$dir:"
10440 done
10441 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
10442 fi
10443 fi
10444
10445 if test yes = "$no_install"; then
10446 # We don't need to create a wrapper script.
10447 link_command=$compile_var$compile_command$compile_rpath
10448 # Replace the output file specification.
10449 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
10450 # Delete the old output file.
10451 $opt_dry_run || $RM $output
10452 # Link the executable and exit
10453 func_show_eval "$link_command" 'exit $?'
10454
10455 if test -n "$postlink_cmds"; then
10456 func_to_tool_file "$output"
10457 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10458 func_execute_cmds "$postlink_cmds" 'exit $?'
10459 fi
10460
10461 exit $EXIT_SUCCESS
10462 fi
10463
10464 case $hardcode_action,$fast_install in
10465 relink,*)
10466 # Fast installation is not supported
10467 link_command=$compile_var$compile_command$compile_rpath
10468 relink_command=$finalize_var$finalize_command$finalize_rpath
10469
10470 func_warning "this platform does not like uninstalled shared libraries"
10471 func_warning "'$output' will be relinked during installation"
10472 ;;
10473 *,yes)
10474 link_command=$finalize_var$compile_command$finalize_rpath
10475 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
10476 ;;
10477 *,no)
10478 link_command=$compile_var$compile_command$compile_rpath
10479 relink_command=$finalize_var$finalize_command$finalize_rpath
10480 ;;
10481 *,needless)
10482 link_command=$finalize_var$compile_command$finalize_rpath
10483 relink_command=
10484 ;;
10485 esac
10486
10487 # Replace the output file specification.
10488 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
10489
10490 # Delete the old output files.
10491 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
10492
10493 func_show_eval "$link_command" 'exit $?'
10494
10495 if test -n "$postlink_cmds"; then
10496 func_to_tool_file "$output_objdir/$outputname"
10497 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10498 func_execute_cmds "$postlink_cmds" 'exit $?'
10499 fi
10500
10501 # Now create the wrapper script.
10502 func_verbose "creating $output"
10503
10504 # Quote the relink command for shipping.
10505 if test -n "$relink_command"; then
10506 # Preserve any variables that may affect compiler behavior
10507 for var in $variables_saved_for_relink; do
10508 if eval test -z \"\${$var+set}\"; then
10509 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
10510 elif eval var_value=\$$var; test -z "$var_value"; then
10511 relink_command="$var=; export $var; $relink_command"
10512 else
10513 func_quote_for_eval "$var_value"
10514 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10515 fi
10516 done
10517 relink_command="(cd `pwd`; $relink_command)"
10518 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10519 fi
10520
10521 # Only actually do things if not in dry run mode.
10522 $opt_dry_run || {
10523 # win32 will think the script is a binary if it has
10524 # a .exe suffix, so we strip it off here.
10525 case $output in
10526 *.exe) func_stripname '' '.exe' "$output"
10527 output=$func_stripname_result ;;
10528 esac
10529 # test for cygwin because mv fails w/o .exe extensions
10530 case $host in
10531 *cygwin*)
10532 exeext=.exe
10533 func_stripname '' '.exe' "$outputname"
10534 outputname=$func_stripname_result ;;
10535 *) exeext= ;;
10536 esac
10537 case $host in
10538 *cygwin* | *mingw* )
10539 func_dirname_and_basename "$output" "" "."
10540 output_name=$func_basename_result
10541 output_path=$func_dirname_result
10542 cwrappersource=$output_path/$objdir/lt-$output_name.c
10543 cwrapper=$output_path/$output_name.exe
10544 $RM $cwrappersource $cwrapper
10545 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
10546
10547 func_emit_cwrapperexe_src > $cwrappersource
10548
10549 # The wrapper executable is built using the $host compiler,
10550 # because it contains $host paths and files. If cross-
10551 # compiling, it, like the target executable, must be
10552 # executed on the $host or under an emulation environment.
10553 $opt_dry_run || {
10554 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
10555 $STRIP $cwrapper
10556 }
10557
10558 # Now, create the wrapper script for func_source use:
10559 func_ltwrapper_scriptname $cwrapper
10560 $RM $func_ltwrapper_scriptname_result
10561 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
10562 $opt_dry_run || {
10563 # note: this script will not be executed, so do not chmod.
10564 if test "x$build" = "x$host"; then
10565 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
10566 else
10567 func_emit_wrapper no > $func_ltwrapper_scriptname_result
10568 fi
10569 }
10570 ;;
10571 * )
10572 $RM $output
10573 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
10574
10575 func_emit_wrapper no > $output
10576 chmod +x $output
10577 ;;
10578 esac
10579 }
10580 exit $EXIT_SUCCESS
10581 ;;
10582 esac
10583
10584 # See if we need to build an old-fashioned archive.
10585 for oldlib in $oldlibs; do
10586
10587 case $build_libtool_libs in
10588 convenience)
10589 oldobjs="$libobjs_save $symfileobj"
10590 addlibs=$convenience
10591 build_libtool_libs=no
10592 ;;
10593 module)
10594 oldobjs=$libobjs_save
10595 addlibs=$old_convenience
10596 build_libtool_libs=no
10597 ;;
10598 *)
10599 oldobjs="$old_deplibs $non_pic_objects"
10600 $preload && test -f "$symfileobj" \
10601 && func_append oldobjs " $symfileobj"
10602 addlibs=$old_convenience
10603 ;;
10604 esac
10605
10606 if test -n "$addlibs"; then
10607 gentop=$output_objdir/${outputname}x
10608 func_append generated " $gentop"
10609
10610 func_extract_archives $gentop $addlibs
10611 func_append oldobjs " $func_extract_archives_result"
10612 fi
10613
10614 # Do each command in the archive commands.
10615 if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
10616 cmds=$old_archive_from_new_cmds
10617 else
10618
10619 # Add any objects from preloaded convenience libraries
10620 if test -n "$dlprefiles"; then
10621 gentop=$output_objdir/${outputname}x
10622 func_append generated " $gentop"
10623
10624 func_extract_archives $gentop $dlprefiles
10625 func_append oldobjs " $func_extract_archives_result"
10626 fi
10627
10628 # POSIX demands no paths to be encoded in archives. We have
10629 # to avoid creating archives with duplicate basenames if we
10630 # might have to extract them afterwards, e.g., when creating a
10631 # static archive out of a convenience library, or when linking
10632 # the entirety of a libtool archive into another (currently
10633 # not supported by libtool).
10634 if (for obj in $oldobjs
10635 do
10636 func_basename "$obj"
10637 $ECHO "$func_basename_result"
10638 done | sort | sort -uc >/dev/null 2>&1); then
10639 :
10640 else
10641 echo "copying selected object files to avoid basename conflicts..."
10642 gentop=$output_objdir/${outputname}x
10643 func_append generated " $gentop"
10644 func_mkdir_p "$gentop"
10645 save_oldobjs=$oldobjs
10646 oldobjs=
10647 counter=1
10648 for obj in $save_oldobjs
10649 do
10650 func_basename "$obj"
10651 objbase=$func_basename_result
10652 case " $oldobjs " in
10653 " ") oldobjs=$obj ;;
10654 *[\ /]"$objbase "*)
10655 while :; do
10656 # Make sure we don't pick an alternate name that also
10657 # overlaps.
10658 newobj=lt$counter-$objbase
10659 func_arith $counter + 1
10660 counter=$func_arith_result
10661 case " $oldobjs " in
10662 *[\ /]"$newobj "*) ;;
10663 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
10664 esac
10665 done
10666 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
10667 func_append oldobjs " $gentop/$newobj"
10668 ;;
10669 *) func_append oldobjs " $obj" ;;
10670 esac
10671 done
10672 fi
10673 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
10674 tool_oldlib=$func_to_tool_file_result
10675 eval cmds=\"$old_archive_cmds\"
10676
10677 func_len " $cmds"
10678 len=$func_len_result
10679 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
10680 cmds=$old_archive_cmds
10681 elif test -n "$archiver_list_spec"; then
10682 func_verbose "using command file archive linking..."
10683 for obj in $oldobjs
10684 do
10685 func_to_tool_file "$obj"
10686 $ECHO "$func_to_tool_file_result"
10687 done > $output_objdir/$libname.libcmd
10688 func_to_tool_file "$output_objdir/$libname.libcmd"
10689 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
10690 cmds=$old_archive_cmds
10691 else
10692 # the command line is too long to link in one step, link in parts
10693 func_verbose "using piecewise archive linking..."
10694 save_RANLIB=$RANLIB
10695 RANLIB=:
10696 objlist=
10697 concat_cmds=
10698 save_oldobjs=$oldobjs
10699 oldobjs=
10700 # Is there a better way of finding the last object in the list?
10701 for obj in $save_oldobjs
10702 do
10703 last_oldobj=$obj
10704 done
10705 eval test_cmds=\"$old_archive_cmds\"
10706 func_len " $test_cmds"
10707 len0=$func_len_result
10708 len=$len0
10709 for obj in $save_oldobjs
10710 do
10711 func_len " $obj"
10712 func_arith $len + $func_len_result
10713 len=$func_arith_result
10714 func_append objlist " $obj"
10715 if test "$len" -lt "$max_cmd_len"; then
10716 :
10717 else
10718 # the above command should be used before it gets too long
10719 oldobjs=$objlist
10720 if test "$obj" = "$last_oldobj"; then
10721 RANLIB=$save_RANLIB
10722 fi
10723 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
10724 eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
10725 objlist=
10726 len=$len0
10727 fi
10728 done
10729 RANLIB=$save_RANLIB
10730 oldobjs=$objlist
10731 if test -z "$oldobjs"; then
10732 eval cmds=\"\$concat_cmds\"
10733 else
10734 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
10735 fi
10736 fi
10737 fi
10738 func_execute_cmds "$cmds" 'exit $?'
10739 done
10740
10741 test -n "$generated" && \
10742 func_show_eval "${RM}r$generated"
10743
10744 # Now create the libtool archive.
10745 case $output in
10746 *.la)
10747 old_library=
10748 test yes = "$build_old_libs" && old_library=$libname.$libext
10749 func_verbose "creating $output"
10750
10751 # Preserve any variables that may affect compiler behavior
10752 for var in $variables_saved_for_relink; do
10753 if eval test -z \"\${$var+set}\"; then
10754 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
10755 elif eval var_value=\$$var; test -z "$var_value"; then
10756 relink_command="$var=; export $var; $relink_command"
10757 else
10758 func_quote_for_eval "$var_value"
10759 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10760 fi
10761 done
10762 # Quote the link command for shipping.
10763 relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10764 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10765 if test yes = "$hardcode_automatic"; then
10766 relink_command=
10767 fi
10768
10769 # Only create the output if not a dry run.
10770 $opt_dry_run || {
10771 for installed in no yes; do
10772 if test yes = "$installed"; then
10773 if test -z "$install_libdir"; then
10774 break
10775 fi
10776 output=$output_objdir/${outputname}i
10777 # Replace all uninstalled libtool libraries with the installed ones
10778 newdependency_libs=
10779 for deplib in $dependency_libs; do
10780 case $deplib in
10781 *.la)
10782 func_basename "$deplib"
10783 name=$func_basename_result
10784 func_resolve_sysroot "$deplib"
10785 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
10786 test -z "$libdir" && \
10787 func_fatal_error "'$deplib' is not a valid libtool archive"
10788 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
10789 ;;
10790 -L*)
10791 func_stripname -L '' "$deplib"
10792 func_replace_sysroot "$func_stripname_result"
10793 func_append newdependency_libs " -L$func_replace_sysroot_result"
10794 ;;
10795 -R*)
10796 func_stripname -R '' "$deplib"
10797 func_replace_sysroot "$func_stripname_result"
10798 func_append newdependency_libs " -R$func_replace_sysroot_result"
10799 ;;
10800 *) func_append newdependency_libs " $deplib" ;;
10801 esac
10802 done
10803 dependency_libs=$newdependency_libs
10804 newdlfiles=
10805
10806 for lib in $dlfiles; do
10807 case $lib in
10808 *.la)
10809 func_basename "$lib"
10810 name=$func_basename_result
10811 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10812 test -z "$libdir" && \
10813 func_fatal_error "'$lib' is not a valid libtool archive"
10814 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
10815 ;;
10816 *) func_append newdlfiles " $lib" ;;
10817 esac
10818 done
10819 dlfiles=$newdlfiles
10820 newdlprefiles=
10821 for lib in $dlprefiles; do
10822 case $lib in
10823 *.la)
10824 # Only pass preopened files to the pseudo-archive (for
10825 # eventual linking with the app. that links it) if we
10826 # didn't already link the preopened objects directly into
10827 # the library:
10828 func_basename "$lib"
10829 name=$func_basename_result
10830 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10831 test -z "$libdir" && \
10832 func_fatal_error "'$lib' is not a valid libtool archive"
10833 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
10834 ;;
10835 esac
10836 done
10837 dlprefiles=$newdlprefiles
10838 else
10839 newdlfiles=
10840 for lib in $dlfiles; do
10841 case $lib in
10842 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
10843 *) abs=`pwd`"/$lib" ;;
10844 esac
10845 func_append newdlfiles " $abs"
10846 done
10847 dlfiles=$newdlfiles
10848 newdlprefiles=
10849 for lib in $dlprefiles; do
10850 case $lib in
10851 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
10852 *) abs=`pwd`"/$lib" ;;
10853 esac
10854 func_append newdlprefiles " $abs"
10855 done
10856 dlprefiles=$newdlprefiles
10857 fi
10858 $RM $output
10859 # place dlname in correct position for cygwin
10860 # In fact, it would be nice if we could use this code for all target
10861 # systems that can't hard-code library paths into their executables
10862 # and that have no shared library path variable independent of PATH,
10863 # but it turns out we can't easily determine that from inspecting
10864 # libtool variables, so we have to hard-code the OSs to which it
10865 # applies here; at the moment, that means platforms that use the PE
10866 # object format with DLL files. See the long comment at the top of
10867 # tests/bindir.at for full details.
10868 tdlname=$dlname
10869 case $host,$output,$installed,$module,$dlname in
10870 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
10871 # If a -bindir argument was supplied, place the dll there.
10872 if test -n "$bindir"; then
10873 func_relative_path "$install_libdir" "$bindir"
10874 tdlname=$func_relative_path_result/$dlname
10875 else
10876 # Otherwise fall back on heuristic.
10877 tdlname=../bin/$dlname
10878 fi
10879 ;;
10880 esac
10881 $ECHO > $output "\
10882 # $outputname - a libtool library file
10883 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
10884 #
10885 # Please DO NOT delete this file!
10886 # It is necessary for linking the library.
10887
10888 # The name that we can dlopen(3).
10889 dlname='$tdlname'
10890
10891 # Names of this library.
10892 library_names='$library_names'
10893
10894 # The name of the static archive.
10895 old_library='$old_library'
10896
10897 # Linker flags that cannot go in dependency_libs.
10898 inherited_linker_flags='$new_inherited_linker_flags'
10899
10900 # Libraries that this one depends upon.
10901 dependency_libs='$dependency_libs'
10902
10903 # Names of additional weak libraries provided by this library
10904 weak_library_names='$weak_libs'
10905
10906 # Version information for $libname.
10907 current=$current
10908 age=$age
10909 revision=$revision
10910
10911 # Is this an already installed library?
10912 installed=$installed
10913
10914 # Should we warn about portability when linking against -modules?
10915 shouldnotlink=$module
10916
10917 # Files to dlopen/dlpreopen
10918 dlopen='$dlfiles'
10919 dlpreopen='$dlprefiles'
10920
10921 # Directory that this library needs to be installed in:
10922 libdir='$install_libdir'"
10923 if test no,yes = "$installed,$need_relink"; then
10924 $ECHO >> $output "\
10925 relink_command=\"$relink_command\""
10926 fi
10927 done
10928 }
10929
10930 # Do a symbolic link so that the libtool archive can be found in
10931 # LD_LIBRARY_PATH before the program is installed.
10932 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
10933 ;;
10934 esac
10935 exit $EXIT_SUCCESS
10936 }
10937
10938 if test link = "$opt_mode" || test relink = "$opt_mode"; then
10939 func_mode_link ${1+"$@"}
10940 fi
10941
10942
10943 # func_mode_uninstall arg...
10944 func_mode_uninstall ()
10945 {
10946 $debug_cmd
10947
10948 RM=$nonopt
10949 files=
10950 rmforce=false
10951 exit_status=0
10952
10953 # This variable tells wrapper scripts just to set variables rather
10954 # than running their programs.
10955 libtool_install_magic=$magic
10956
10957 for arg
10958 do
10959 case $arg in
10960 -f) func_append RM " $arg"; rmforce=: ;;
10961 -*) func_append RM " $arg" ;;
10962 *) func_append files " $arg" ;;
10963 esac
10964 done
10965
10966 test -z "$RM" && \
10967 func_fatal_help "you must specify an RM program"
10968
10969 rmdirs=
10970
10971 for file in $files; do
10972 func_dirname "$file" "" "."
10973 dir=$func_dirname_result
10974 if test . = "$dir"; then
10975 odir=$objdir
10976 else
10977 odir=$dir/$objdir
10978 fi
10979 func_basename "$file"
10980 name=$func_basename_result
10981 test uninstall = "$opt_mode" && odir=$dir
10982
10983 # Remember odir for removal later, being careful to avoid duplicates
10984 if test clean = "$opt_mode"; then
10985 case " $rmdirs " in
10986 *" $odir "*) ;;
10987 *) func_append rmdirs " $odir" ;;
10988 esac
10989 fi
10990
10991 # Don't error if the file doesn't exist and rm -f was used.
10992 if { test -L "$file"; } >/dev/null 2>&1 ||
10993 { test -h "$file"; } >/dev/null 2>&1 ||
10994 test -f "$file"; then
10995 :
10996 elif test -d "$file"; then
10997 exit_status=1
10998 continue
10999 elif $rmforce; then
11000 continue
11001 fi
11002
11003 rmfiles=$file
11004
11005 case $name in
11006 *.la)
11007 # Possibly a libtool archive, so verify it.
11008 if func_lalib_p "$file"; then
11009 func_source $dir/$name
11010
11011 # Delete the libtool libraries and symlinks.
11012 for n in $library_names; do
11013 func_append rmfiles " $odir/$n"
11014 done
11015 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
11016
11017 case $opt_mode in
11018 clean)
11019 case " $library_names " in
11020 *" $dlname "*) ;;
11021 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
11022 esac
11023 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
11024 ;;
11025 uninstall)
11026 if test -n "$library_names"; then
11027 # Do each command in the postuninstall commands.
11028 func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
11029 fi
11030
11031 if test -n "$old_library"; then
11032 # Do each command in the old_postuninstall commands.
11033 func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
11034 fi
11035 # FIXME: should reinstall the best remaining shared library.
11036 ;;
11037 esac
11038 fi
11039 ;;
11040
11041 *.lo)
11042 # Possibly a libtool object, so verify it.
11043 if func_lalib_p "$file"; then
11044
11045 # Read the .lo file
11046 func_source $dir/$name
11047
11048 # Add PIC object to the list of files to remove.
11049 if test -n "$pic_object" && test none != "$pic_object"; then
11050 func_append rmfiles " $dir/$pic_object"
11051 fi
11052
11053 # Add non-PIC object to the list of files to remove.
11054 if test -n "$non_pic_object" && test none != "$non_pic_object"; then
11055 func_append rmfiles " $dir/$non_pic_object"
11056 fi
11057 fi
11058 ;;
11059
11060 *)
11061 if test clean = "$opt_mode"; then
11062 noexename=$name
11063 case $file in
11064 *.exe)
11065 func_stripname '' '.exe' "$file"
11066 file=$func_stripname_result
11067 func_stripname '' '.exe' "$name"
11068 noexename=$func_stripname_result
11069 # $file with .exe has already been added to rmfiles,
11070 # add $file without .exe
11071 func_append rmfiles " $file"
11072 ;;
11073 esac
11074 # Do a test to see if this is a libtool program.
11075 if func_ltwrapper_p "$file"; then
11076 if func_ltwrapper_executable_p "$file"; then
11077 func_ltwrapper_scriptname "$file"
11078 relink_command=
11079 func_source $func_ltwrapper_scriptname_result
11080 func_append rmfiles " $func_ltwrapper_scriptname_result"
11081 else
11082 relink_command=
11083 func_source $dir/$noexename
11084 fi
11085
11086 # note $name still contains .exe if it was in $file originally
11087 # as does the version of $file that was added into $rmfiles
11088 func_append rmfiles " $odir/$name $odir/${name}S.$objext"
11089 if test yes = "$fast_install" && test -n "$relink_command"; then
11090 func_append rmfiles " $odir/lt-$name"
11091 fi
11092 if test "X$noexename" != "X$name"; then
11093 func_append rmfiles " $odir/lt-$noexename.c"
11094 fi
11095 fi
11096 fi
11097 ;;
11098 esac
11099 func_show_eval "$RM $rmfiles" 'exit_status=1'
11100 done
11101
11102 # Try to remove the $objdir's in the directories where we deleted files
11103 for dir in $rmdirs; do
11104 if test -d "$dir"; then
11105 func_show_eval "rmdir $dir >/dev/null 2>&1"
11106 fi
11107 done
11108
11109 exit $exit_status
11110 }
11111
11112 if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
11113 func_mode_uninstall ${1+"$@"}
11114 fi
11115
11116 test -z "$opt_mode" && {
11117 help=$generic_help
11118 func_fatal_help "you must specify a MODE"
11119 }
11120
11121 test -z "$exec_cmd" && \
11122 func_fatal_help "invalid operation mode '$opt_mode'"
11123
11124 if test -n "$exec_cmd"; then
11125 eval exec "$exec_cmd"
11126 exit $EXIT_FAILURE
11127 fi
11128
11129 exit $exit_status
11130
11131
11132 # The TAGs below are defined such that we never get into a situation
11133 # where we disable both kinds of libraries. Given conflicting
11134 # choices, we go for a static library, that is the most portable,
11135 # since we can't tell whether shared libraries were disabled because
11136 # the user asked for that or because the platform doesn't support
11137 # them. This is particularly important on AIX, because we don't
11138 # support having both static and shared libraries enabled at the same
11139 # time on that platform, so we default to a shared-only configuration.
11140 # If a disable-shared tag is given, we'll fallback to a static-only
11141 # configuration. But we'll never go from static-only to shared-only.
11142
11143 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
11144 build_libtool_libs=no
11145 build_old_libs=yes
11146 # ### END LIBTOOL TAG CONFIG: disable-shared
11147
11148 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
11149 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
11150 # ### END LIBTOOL TAG CONFIG: disable-static
11151
11152 # Local Variables:
11153 # mode:shell-script
11154 # sh-indentation:2
11155 # End:
0 #!/bin/sh
1 # Get modification time of a file or directory and pretty-print it.
2
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1995-2018 Free Software Foundation, Inc.
6 # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # This file is maintained in Automake, please report
27 # bugs to <bug-automake@gnu.org> or send patches to
28 # <automake-patches@gnu.org>.
29
30 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
31 emulate sh
32 NULLCMD=:
33 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34 # is contrary to our usage. Disable this feature.
35 alias -g '${1+"$@"}'='"$@"'
36 setopt NO_GLOB_SUBST
37 fi
38
39 case $1 in
40 '')
41 echo "$0: No file. Try '$0 --help' for more information." 1>&2
42 exit 1;
43 ;;
44 -h | --h*)
45 cat <<\EOF
46 Usage: mdate-sh [--help] [--version] FILE
47
48 Pretty-print the modification day of FILE, in the format:
49 1 January 1970
50
51 Report bugs to <bug-automake@gnu.org>.
52 EOF
53 exit $?
54 ;;
55 -v | --v*)
56 echo "mdate-sh $scriptversion"
57 exit $?
58 ;;
59 esac
60
61 error ()
62 {
63 echo "$0: $1" >&2
64 exit 1
65 }
66
67
68 # Prevent date giving response in another language.
69 LANG=C
70 export LANG
71 LC_ALL=C
72 export LC_ALL
73 LC_TIME=C
74 export LC_TIME
75
76 # Use UTC to get reproducible result.
77 TZ=UTC0
78 export TZ
79
80 # GNU ls changes its time format in response to the TIME_STYLE
81 # variable. Since we cannot assume 'unset' works, revert this
82 # variable to its documented default.
83 if test "${TIME_STYLE+set}" = set; then
84 TIME_STYLE=posix-long-iso
85 export TIME_STYLE
86 fi
87
88 save_arg1=$1
89
90 # Find out how to get the extended ls output of a file or directory.
91 if ls -L /dev/null 1>/dev/null 2>&1; then
92 ls_command='ls -L -l -d'
93 else
94 ls_command='ls -l -d'
95 fi
96 # Avoid user/group names that might have spaces, when possible.
97 if ls -n /dev/null 1>/dev/null 2>&1; then
98 ls_command="$ls_command -n"
99 fi
100
101 # A 'ls -l' line looks as follows on OS/2.
102 # drwxrwx--- 0 Aug 11 2001 foo
103 # This differs from Unix, which adds ownership information.
104 # drwxrwx--- 2 root root 4096 Aug 11 2001 foo
105 #
106 # To find the date, we split the line on spaces and iterate on words
107 # until we find a month. This cannot work with files whose owner is a
108 # user named "Jan", or "Feb", etc. However, it's unlikely that '/'
109 # will be owned by a user whose name is a month. So we first look at
110 # the extended ls output of the root directory to decide how many
111 # words should be skipped to get the date.
112
113 # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
114 set x`$ls_command /`
115
116 # Find which argument is the month.
117 month=
118 command=
119 until test $month
120 do
121 test $# -gt 0 || error "failed parsing '$ls_command /' output"
122 shift
123 # Add another shift to the command.
124 command="$command shift;"
125 case $1 in
126 Jan) month=January; nummonth=1;;
127 Feb) month=February; nummonth=2;;
128 Mar) month=March; nummonth=3;;
129 Apr) month=April; nummonth=4;;
130 May) month=May; nummonth=5;;
131 Jun) month=June; nummonth=6;;
132 Jul) month=July; nummonth=7;;
133 Aug) month=August; nummonth=8;;
134 Sep) month=September; nummonth=9;;
135 Oct) month=October; nummonth=10;;
136 Nov) month=November; nummonth=11;;
137 Dec) month=December; nummonth=12;;
138 esac
139 done
140
141 test -n "$month" || error "failed parsing '$ls_command /' output"
142
143 # Get the extended ls output of the file or directory.
144 set dummy x`eval "$ls_command \"\\\$save_arg1\""`
145
146 # Remove all preceding arguments
147 eval $command
148
149 # Because of the dummy argument above, month is in $2.
150 #
151 # On a POSIX system, we should have
152 #
153 # $# = 5
154 # $1 = file size
155 # $2 = month
156 # $3 = day
157 # $4 = year or time
158 # $5 = filename
159 #
160 # On Darwin 7.7.0 and 7.6.0, we have
161 #
162 # $# = 4
163 # $1 = day
164 # $2 = month
165 # $3 = year or time
166 # $4 = filename
167
168 # Get the month.
169 case $2 in
170 Jan) month=January; nummonth=1;;
171 Feb) month=February; nummonth=2;;
172 Mar) month=March; nummonth=3;;
173 Apr) month=April; nummonth=4;;
174 May) month=May; nummonth=5;;
175 Jun) month=June; nummonth=6;;
176 Jul) month=July; nummonth=7;;
177 Aug) month=August; nummonth=8;;
178 Sep) month=September; nummonth=9;;
179 Oct) month=October; nummonth=10;;
180 Nov) month=November; nummonth=11;;
181 Dec) month=December; nummonth=12;;
182 esac
183
184 case $3 in
185 ???*) day=$1;;
186 *) day=$3; shift;;
187 esac
188
189 # Here we have to deal with the problem that the ls output gives either
190 # the time of day or the year.
191 case $3 in
192 *:*) set `date`; eval year=\$$#
193 case $2 in
194 Jan) nummonthtod=1;;
195 Feb) nummonthtod=2;;
196 Mar) nummonthtod=3;;
197 Apr) nummonthtod=4;;
198 May) nummonthtod=5;;
199 Jun) nummonthtod=6;;
200 Jul) nummonthtod=7;;
201 Aug) nummonthtod=8;;
202 Sep) nummonthtod=9;;
203 Oct) nummonthtod=10;;
204 Nov) nummonthtod=11;;
205 Dec) nummonthtod=12;;
206 esac
207 # For the first six month of the year the time notation can also
208 # be used for files modified in the last year.
209 if (expr $nummonth \> $nummonthtod) > /dev/null;
210 then
211 year=`expr $year - 1`
212 fi;;
213 *) year=$3;;
214 esac
215
216 # The result.
217 echo $day $month $year
218
219 # Local Variables:
220 # mode: shell-script
221 # sh-indentation: 2
222 # eval: (add-hook 'before-save-hook 'time-stamp)
223 # time-stamp-start: "scriptversion="
224 # time-stamp-format: "%:y-%02m-%02d.%02H"
225 # time-stamp-time-zone: "UTC0"
226 # time-stamp-end: "; # UTC"
227 # End:
0 #! /bin/sh
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2013-10-28.13; # UTC
4
5 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
6 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 if test $# -eq 0; then
27 echo 1>&2 "Try '$0 --help' for more information"
28 exit 1
29 fi
30
31 case $1 in
32
33 --is-lightweight)
34 # Used by our autoconf macros to check whether the available missing
35 # script is modern enough.
36 exit 0
37 ;;
38
39 --run)
40 # Back-compat with the calling convention used by older automake.
41 shift
42 ;;
43
44 -h|--h|--he|--hel|--help)
45 echo "\
46 $0 [OPTION]... PROGRAM [ARGUMENT]...
47
48 Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
49 to PROGRAM being missing or too old.
50
51 Options:
52 -h, --help display this help and exit
53 -v, --version output version information and exit
54
55 Supported PROGRAM values:
56 aclocal autoconf autoheader autom4te automake makeinfo
57 bison yacc flex lex help2man
58
59 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
60 'g' are ignored when checking the name.
61
62 Send bug reports to <bug-automake@gnu.org>."
63 exit $?
64 ;;
65
66 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
67 echo "missing $scriptversion (GNU Automake)"
68 exit $?
69 ;;
70
71 -*)
72 echo 1>&2 "$0: unknown '$1' option"
73 echo 1>&2 "Try '$0 --help' for more information"
74 exit 1
75 ;;
76
77 esac
78
79 # Run the given program, remember its exit status.
80 "$@"; st=$?
81
82 # If it succeeded, we are done.
83 test $st -eq 0 && exit 0
84
85 # Also exit now if we it failed (or wasn't found), and '--version' was
86 # passed; such an option is passed most likely to detect whether the
87 # program is present and works.
88 case $2 in --version|--help) exit $st;; esac
89
90 # Exit code 63 means version mismatch. This often happens when the user
91 # tries to use an ancient version of a tool on a file that requires a
92 # minimum version.
93 if test $st -eq 63; then
94 msg="probably too old"
95 elif test $st -eq 127; then
96 # Program was missing.
97 msg="missing on your system"
98 else
99 # Program was found and executed, but failed. Give up.
100 exit $st
101 fi
102
103 perl_URL=http://www.perl.org/
104 flex_URL=http://flex.sourceforge.net/
105 gnu_software_URL=http://www.gnu.org/software
106
107 program_details ()
108 {
109 case $1 in
110 aclocal|automake)
111 echo "The '$1' program is part of the GNU Automake package:"
112 echo "<$gnu_software_URL/automake>"
113 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
114 echo "<$gnu_software_URL/autoconf>"
115 echo "<$gnu_software_URL/m4/>"
116 echo "<$perl_URL>"
117 ;;
118 autoconf|autom4te|autoheader)
119 echo "The '$1' program is part of the GNU Autoconf package:"
120 echo "<$gnu_software_URL/autoconf/>"
121 echo "It also requires GNU m4 and Perl in order to run:"
122 echo "<$gnu_software_URL/m4/>"
123 echo "<$perl_URL>"
124 ;;
125 esac
126 }
127
128 give_advice ()
129 {
130 # Normalize program name to check for.
131 normalized_program=`echo "$1" | sed '
132 s/^gnu-//; t
133 s/^gnu//; t
134 s/^g//; t'`
135
136 printf '%s\n' "'$1' is $msg."
137
138 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
139 case $normalized_program in
140 autoconf*)
141 echo "You should only need it if you modified 'configure.ac',"
142 echo "or m4 files included by it."
143 program_details 'autoconf'
144 ;;
145 autoheader*)
146 echo "You should only need it if you modified 'acconfig.h' or"
147 echo "$configure_deps."
148 program_details 'autoheader'
149 ;;
150 automake*)
151 echo "You should only need it if you modified 'Makefile.am' or"
152 echo "$configure_deps."
153 program_details 'automake'
154 ;;
155 aclocal*)
156 echo "You should only need it if you modified 'acinclude.m4' or"
157 echo "$configure_deps."
158 program_details 'aclocal'
159 ;;
160 autom4te*)
161 echo "You might have modified some maintainer files that require"
162 echo "the 'autom4te' program to be rebuilt."
163 program_details 'autom4te'
164 ;;
165 bison*|yacc*)
166 echo "You should only need it if you modified a '.y' file."
167 echo "You may want to install the GNU Bison package:"
168 echo "<$gnu_software_URL/bison/>"
169 ;;
170 lex*|flex*)
171 echo "You should only need it if you modified a '.l' file."
172 echo "You may want to install the Fast Lexical Analyzer package:"
173 echo "<$flex_URL>"
174 ;;
175 help2man*)
176 echo "You should only need it if you modified a dependency" \
177 "of a man page."
178 echo "You may want to install the GNU Help2man package:"
179 echo "<$gnu_software_URL/help2man/>"
180 ;;
181 makeinfo*)
182 echo "You should only need it if you modified a '.texi' file, or"
183 echo "any other file indirectly affecting the aspect of the manual."
184 echo "You might want to install the Texinfo package:"
185 echo "<$gnu_software_URL/texinfo/>"
186 echo "The spurious makeinfo call might also be the consequence of"
187 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
188 echo "want to install GNU make:"
189 echo "<$gnu_software_URL/make/>"
190 ;;
191 *)
192 echo "You might have modified some files without having the proper"
193 echo "tools for further handling them. Check the 'README' file, it"
194 echo "often tells you about the needed prerequisites for installing"
195 echo "this package. You may also peek at any GNU archive site, in"
196 echo "case some other package contains this missing '$1' program."
197 ;;
198 esac
199 }
200
201 give_advice "$1" | sed -e '1s/^/WARNING: /' \
202 -e '2,$s/^/ /' >&2
203
204 # Propagate the correct exit status (expected to be 127 for a program
205 # not found, 63 for a program that failed due to version mismatch).
206 exit $st
207
208 # Local variables:
209 # eval: (add-hook 'write-file-hooks 'time-stamp)
210 # time-stamp-start: "scriptversion="
211 # time-stamp-format: "%:y-%02m-%02d.%02H"
212 # time-stamp-time-zone: "UTC"
213 # time-stamp-end: "; # UTC"
214 # End:
0 #! /bin/sh
1
2 # A portable, pluggable option parser for Bourne shell.
3 # Written by Gary V. Vaughan, 2010
4
5 # This is free software. There is NO warranty; not even for
6 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 #
8 # Copyright (C) 2010-2019 Bootstrap Authors
9 #
10 # This file is dual licensed under the terms of the MIT license
11 # <https://opensource.org/license/MIT>, and GPL version 3 or later
12 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
13 # these licenses when using or redistributing this software or any of
14 # the files within it. See the URLs above, or the file `LICENSE`
15 # included in the Bootstrap distribution for the full license texts.
16
17 # Please report bugs or propose patches to:
18 # <https://github.com/gnulib-modules/bootstrap/issues>
19
20 # Set a version string for this script.
21 scriptversion=2019-02-19.15; # UTC
22
23
24 ## ------ ##
25 ## Usage. ##
26 ## ------ ##
27
28 # This file is a library for parsing options in your shell scripts along
29 # with assorted other useful supporting features that you can make use
30 # of too.
31 #
32 # For the simplest scripts you might need only:
33 #
34 # #!/bin/sh
35 # . relative/path/to/funclib.sh
36 # . relative/path/to/options-parser
37 # scriptversion=1.0
38 # func_options ${1+"$@"}
39 # eval set dummy "$func_options_result"; shift
40 # ...rest of your script...
41 #
42 # In order for the '--version' option to work, you will need to have a
43 # suitably formatted comment like the one at the top of this file
44 # starting with '# Written by ' and ending with '# Copyright'.
45 #
46 # For '-h' and '--help' to work, you will also need a one line
47 # description of your script's purpose in a comment directly above the
48 # '# Written by ' line, like the one at the top of this file.
49 #
50 # The default options also support '--debug', which will turn on shell
51 # execution tracing (see the comment above debug_cmd below for another
52 # use), and '--verbose' and the func_verbose function to allow your script
53 # to display verbose messages only when your user has specified
54 # '--verbose'.
55 #
56 # After sourcing this file, you can plug in processing for additional
57 # options by amending the variables from the 'Configuration' section
58 # below, and following the instructions in the 'Option parsing'
59 # section further down.
60
61 ## -------------- ##
62 ## Configuration. ##
63 ## -------------- ##
64
65 # You should override these variables in your script after sourcing this
66 # file so that they reflect the customisations you have added to the
67 # option parser.
68
69 # The usage line for option parsing errors and the start of '-h' and
70 # '--help' output messages. You can embed shell variables for delayed
71 # expansion at the time the message is displayed, but you will need to
72 # quote other shell meta-characters carefully to prevent them being
73 # expanded when the contents are evaled.
74 usage='$progpath [OPTION]...'
75
76 # Short help message in response to '-h' and '--help'. Add to this or
77 # override it after sourcing this library to reflect the full set of
78 # options your script accepts.
79 usage_message="\
80 --debug enable verbose shell tracing
81 -W, --warnings=CATEGORY
82 report the warnings falling in CATEGORY [all]
83 -v, --verbose verbosely report processing
84 --version print version information and exit
85 -h, --help print short or long help message and exit
86 "
87
88 # Additional text appended to 'usage_message' in response to '--help'.
89 long_help_message="
90 Warning categories include:
91 'all' show all warnings
92 'none' turn off all the warnings
93 'error' warnings are treated as fatal errors"
94
95 # Help message printed before fatal option parsing errors.
96 fatal_help="Try '\$progname --help' for more information."
97
98
99
100 ## ------------------------- ##
101 ## Hook function management. ##
102 ## ------------------------- ##
103
104 # This section contains functions for adding, removing, and running hooks
105 # in the main code. A hook is just a list of function names that can be
106 # run in order later on.
107
108 # func_hookable FUNC_NAME
109 # -----------------------
110 # Declare that FUNC_NAME will run hooks added with
111 # 'func_add_hook FUNC_NAME ...'.
112 func_hookable ()
113 {
114 $debug_cmd
115
116 func_append hookable_fns " $1"
117 }
118
119
120 # func_add_hook FUNC_NAME HOOK_FUNC
121 # ---------------------------------
122 # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
123 # first have been declared "hookable" by a call to 'func_hookable'.
124 func_add_hook ()
125 {
126 $debug_cmd
127
128 case " $hookable_fns " in
129 *" $1 "*) ;;
130 *) func_fatal_error "'$1' does not accept hook functions." ;;
131 esac
132
133 eval func_append ${1}_hooks '" $2"'
134 }
135
136
137 # func_remove_hook FUNC_NAME HOOK_FUNC
138 # ------------------------------------
139 # Remove HOOK_FUNC from the list of hook functions to be called by
140 # FUNC_NAME.
141 func_remove_hook ()
142 {
143 $debug_cmd
144
145 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
146 }
147
148
149 # func_propagate_result FUNC_NAME_A FUNC_NAME_B
150 # ---------------------------------------------
151 # If the *_result variable of FUNC_NAME_A _is set_, assign its value to
152 # *_result variable of FUNC_NAME_B.
153 func_propagate_result ()
154 {
155 $debug_cmd
156
157 func_propagate_result_result=:
158 if eval "test \"\${${1}_result+set}\" = set"
159 then
160 eval "${2}_result=\$${1}_result"
161 else
162 func_propagate_result_result=false
163 fi
164 }
165
166
167 # func_run_hooks FUNC_NAME [ARG]...
168 # ---------------------------------
169 # Run all hook functions registered to FUNC_NAME.
170 # It's assumed that the list of hook functions contains nothing more
171 # than a whitespace-delimited list of legal shell function names, and
172 # no effort is wasted trying to catch shell meta-characters or preserve
173 # whitespace.
174 func_run_hooks ()
175 {
176 $debug_cmd
177
178 case " $hookable_fns " in
179 *" $1 "*) ;;
180 *) func_fatal_error "'$1' does not support hook functions." ;;
181 esac
182
183 eval _G_hook_fns=\$$1_hooks; shift
184
185 for _G_hook in $_G_hook_fns; do
186 func_unset "${_G_hook}_result"
187 eval $_G_hook '${1+"$@"}'
188 func_propagate_result $_G_hook func_run_hooks
189 if $func_propagate_result_result; then
190 eval set dummy "$func_run_hooks_result"; shift
191 fi
192 done
193 }
194
195
196
197 ## --------------- ##
198 ## Option parsing. ##
199 ## --------------- ##
200
201 # In order to add your own option parsing hooks, you must accept the
202 # full positional parameter list from your hook function. You may remove
203 # or edit any options that you action, and then pass back the remaining
204 # unprocessed options in '<hooked_function_name>_result', escaped
205 # suitably for 'eval'.
206 #
207 # The '<hooked_function_name>_result' variable is automatically unset
208 # before your hook gets called; for best performance, only set the
209 # *_result variable when necessary (i.e. don't call the 'func_quote'
210 # function unnecessarily because it can be an expensive operation on some
211 # machines).
212 #
213 # Like this:
214 #
215 # my_options_prep ()
216 # {
217 # $debug_cmd
218 #
219 # # Extend the existing usage message.
220 # usage_message=$usage_message'
221 # -s, --silent don'\''t print informational messages
222 # '
223 # # No change in '$@' (ignored completely by this hook). Leave
224 # # my_options_prep_result variable intact.
225 # }
226 # func_add_hook func_options_prep my_options_prep
227 #
228 #
229 # my_silent_option ()
230 # {
231 # $debug_cmd
232 #
233 # args_changed=false
234 #
235 # # Note that, for efficiency, we parse as many options as we can
236 # # recognise in a loop before passing the remainder back to the
237 # # caller on the first unrecognised argument we encounter.
238 # while test $# -gt 0; do
239 # opt=$1; shift
240 # case $opt in
241 # --silent|-s) opt_silent=:
242 # args_changed=:
243 # ;;
244 # # Separate non-argument short options:
245 # -s*) func_split_short_opt "$_G_opt"
246 # set dummy "$func_split_short_opt_name" \
247 # "-$func_split_short_opt_arg" ${1+"$@"}
248 # shift
249 # args_changed=:
250 # ;;
251 # *) # Make sure the first unrecognised option "$_G_opt"
252 # # is added back to "$@" in case we need it later,
253 # # if $args_changed was set to 'true'.
254 # set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
255 # esac
256 # done
257 #
258 # # Only call 'func_quote' here if we processed at least one argument.
259 # if $args_changed; then
260 # func_quote eval ${1+"$@"}
261 # my_silent_option_result=$func_quote_result
262 # fi
263 # }
264 # func_add_hook func_parse_options my_silent_option
265 #
266 #
267 # my_option_validation ()
268 # {
269 # $debug_cmd
270 #
271 # $opt_silent && $opt_verbose && func_fatal_help "\
272 # '--silent' and '--verbose' options are mutually exclusive."
273 # }
274 # func_add_hook func_validate_options my_option_validation
275 #
276 # You'll also need to manually amend $usage_message to reflect the extra
277 # options you parse. It's preferable to append if you can, so that
278 # multiple option parsing hooks can be added safely.
279
280
281 # func_options_finish [ARG]...
282 # ----------------------------
283 # Finishing the option parse loop (call 'func_options' hooks ATM).
284 func_options_finish ()
285 {
286 $debug_cmd
287
288 func_run_hooks func_options ${1+"$@"}
289 func_propagate_result func_run_hooks func_options_finish
290 }
291
292
293 # func_options [ARG]...
294 # ---------------------
295 # All the functions called inside func_options are hookable. See the
296 # individual implementations for details.
297 func_hookable func_options
298 func_options ()
299 {
300 $debug_cmd
301
302 _G_options_quoted=false
303
304 for my_func in options_prep parse_options validate_options options_finish
305 do
306 func_unset func_${my_func}_result
307 func_unset func_run_hooks_result
308 eval func_$my_func '${1+"$@"}'
309 func_propagate_result func_$my_func func_options
310 if $func_propagate_result_result; then
311 eval set dummy "$func_options_result"; shift
312 _G_options_quoted=:
313 fi
314 done
315
316 $_G_options_quoted || {
317 # As we (func_options) are top-level options-parser function and
318 # nobody quoted "$@" for us yet, we need to do it explicitly for
319 # caller.
320 func_quote eval ${1+"$@"}
321 func_options_result=$func_quote_result
322 }
323 }
324
325
326 # func_options_prep [ARG]...
327 # --------------------------
328 # All initialisations required before starting the option parse loop.
329 # Note that when calling hook functions, we pass through the list of
330 # positional parameters. If a hook function modifies that list, and
331 # needs to propagate that back to rest of this script, then the complete
332 # modified list must be put in 'func_run_hooks_result' before returning.
333 func_hookable func_options_prep
334 func_options_prep ()
335 {
336 $debug_cmd
337
338 # Option defaults:
339 opt_verbose=false
340 opt_warning_types=
341
342 func_run_hooks func_options_prep ${1+"$@"}
343 func_propagate_result func_run_hooks func_options_prep
344 }
345
346
347 # func_parse_options [ARG]...
348 # ---------------------------
349 # The main option parsing loop.
350 func_hookable func_parse_options
351 func_parse_options ()
352 {
353 $debug_cmd
354
355 _G_parse_options_requote=false
356 # this just eases exit handling
357 while test $# -gt 0; do
358 # Defer to hook functions for initial option parsing, so they
359 # get priority in the event of reusing an option name.
360 func_run_hooks func_parse_options ${1+"$@"}
361 func_propagate_result func_run_hooks func_parse_options
362 if $func_propagate_result_result; then
363 eval set dummy "$func_parse_options_result"; shift
364 # Even though we may have changed "$@", we passed the "$@" array
365 # down into the hook and it quoted it for us (because we are in
366 # this if-branch). No need to quote it again.
367 _G_parse_options_requote=false
368 fi
369
370 # Break out of the loop if we already parsed every option.
371 test $# -gt 0 || break
372
373 # We expect that one of the options parsed in this function matches
374 # and thus we remove _G_opt from "$@" and need to re-quote.
375 _G_match_parse_options=:
376 _G_opt=$1
377 shift
378 case $_G_opt in
379 --debug|-x) debug_cmd='set -x'
380 func_echo "enabling shell trace mode" >&2
381 $debug_cmd
382 ;;
383
384 --no-warnings|--no-warning|--no-warn)
385 set dummy --warnings none ${1+"$@"}
386 shift
387 ;;
388
389 --warnings|--warning|-W)
390 if test $# = 0 && func_missing_arg $_G_opt; then
391 _G_parse_options_requote=:
392 break
393 fi
394 case " $warning_categories $1" in
395 *" $1 "*)
396 # trailing space prevents matching last $1 above
397 func_append_uniq opt_warning_types " $1"
398 ;;
399 *all)
400 opt_warning_types=$warning_categories
401 ;;
402 *none)
403 opt_warning_types=none
404 warning_func=:
405 ;;
406 *error)
407 opt_warning_types=$warning_categories
408 warning_func=func_fatal_error
409 ;;
410 *)
411 func_fatal_error \
412 "unsupported warning category: '$1'"
413 ;;
414 esac
415 shift
416 ;;
417
418 --verbose|-v) opt_verbose=: ;;
419 --version) func_version ;;
420 -\?|-h) func_usage ;;
421 --help) func_help ;;
422
423 # Separate optargs to long options (plugins may need this):
424 --*=*) func_split_equals "$_G_opt"
425 set dummy "$func_split_equals_lhs" \
426 "$func_split_equals_rhs" ${1+"$@"}
427 shift
428 ;;
429
430 # Separate optargs to short options:
431 -W*)
432 func_split_short_opt "$_G_opt"
433 set dummy "$func_split_short_opt_name" \
434 "$func_split_short_opt_arg" ${1+"$@"}
435 shift
436 ;;
437
438 # Separate non-argument short options:
439 -\?*|-h*|-v*|-x*)
440 func_split_short_opt "$_G_opt"
441 set dummy "$func_split_short_opt_name" \
442 "-$func_split_short_opt_arg" ${1+"$@"}
443 shift
444 ;;
445
446 --) _G_parse_options_requote=: ; break ;;
447 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
448 *) set dummy "$_G_opt" ${1+"$@"}; shift
449 _G_match_parse_options=false
450 break
451 ;;
452 esac
453
454 if $_G_match_parse_options; then
455 _G_parse_options_requote=:
456 fi
457 done
458
459 if $_G_parse_options_requote; then
460 # save modified positional parameters for caller
461 func_quote eval ${1+"$@"}
462 func_parse_options_result=$func_quote_result
463 fi
464 }
465
466
467 # func_validate_options [ARG]...
468 # ------------------------------
469 # Perform any sanity checks on option settings and/or unconsumed
470 # arguments.
471 func_hookable func_validate_options
472 func_validate_options ()
473 {
474 $debug_cmd
475
476 # Display all warnings if -W was not given.
477 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
478
479 func_run_hooks func_validate_options ${1+"$@"}
480 func_propagate_result func_run_hooks func_validate_options
481
482 # Bail if the options were screwed!
483 $exit_cmd $EXIT_FAILURE
484 }
485
486
487
488 ## ----------------- ##
489 ## Helper functions. ##
490 ## ----------------- ##
491
492 # This section contains the helper functions used by the rest of the
493 # hookable option parser framework in ascii-betical order.
494
495
496 # func_fatal_help ARG...
497 # ----------------------
498 # Echo program name prefixed message to standard error, followed by
499 # a help hint, and exit.
500 func_fatal_help ()
501 {
502 $debug_cmd
503
504 eval \$ECHO \""Usage: $usage"\"
505 eval \$ECHO \""$fatal_help"\"
506 func_error ${1+"$@"}
507 exit $EXIT_FAILURE
508 }
509
510
511 # func_help
512 # ---------
513 # Echo long help message to standard output and exit.
514 func_help ()
515 {
516 $debug_cmd
517
518 func_usage_message
519 $ECHO "$long_help_message"
520 exit 0
521 }
522
523
524 # func_missing_arg ARGNAME
525 # ------------------------
526 # Echo program name prefixed message to standard error and set global
527 # exit_cmd.
528 func_missing_arg ()
529 {
530 $debug_cmd
531
532 func_error "Missing argument for '$1'."
533 exit_cmd=exit
534 }
535
536
537 # func_split_equals STRING
538 # ------------------------
539 # Set func_split_equals_lhs and func_split_equals_rhs shell variables
540 # after splitting STRING at the '=' sign.
541 test -z "$_G_HAVE_XSI_OPS" \
542 && (eval 'x=a/b/c;
543 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
544 && _G_HAVE_XSI_OPS=yes
545
546 if test yes = "$_G_HAVE_XSI_OPS"
547 then
548 # This is an XSI compatible shell, allowing a faster implementation...
549 eval 'func_split_equals ()
550 {
551 $debug_cmd
552
553 func_split_equals_lhs=${1%%=*}
554 func_split_equals_rhs=${1#*=}
555 if test "x$func_split_equals_lhs" = "x$1"; then
556 func_split_equals_rhs=
557 fi
558 }'
559 else
560 # ...otherwise fall back to using expr, which is often a shell builtin.
561 func_split_equals ()
562 {
563 $debug_cmd
564
565 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
566 func_split_equals_rhs=
567 test "x$func_split_equals_lhs" = "x$1" \
568 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
569 }
570 fi #func_split_equals
571
572
573 # func_split_short_opt SHORTOPT
574 # -----------------------------
575 # Set func_split_short_opt_name and func_split_short_opt_arg shell
576 # variables after splitting SHORTOPT after the 2nd character.
577 if test yes = "$_G_HAVE_XSI_OPS"
578 then
579 # This is an XSI compatible shell, allowing a faster implementation...
580 eval 'func_split_short_opt ()
581 {
582 $debug_cmd
583
584 func_split_short_opt_arg=${1#??}
585 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
586 }'
587 else
588 # ...otherwise fall back to using expr, which is often a shell builtin.
589 func_split_short_opt ()
590 {
591 $debug_cmd
592
593 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
594 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
595 }
596 fi #func_split_short_opt
597
598
599 # func_usage
600 # ----------
601 # Echo short help message to standard output and exit.
602 func_usage ()
603 {
604 $debug_cmd
605
606 func_usage_message
607 $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
608 exit 0
609 }
610
611
612 # func_usage_message
613 # ------------------
614 # Echo short help message to standard output.
615 func_usage_message ()
616 {
617 $debug_cmd
618
619 eval \$ECHO \""Usage: $usage"\"
620 echo
621 $SED -n 's|^# ||
622 /^Written by/{
623 x;p;x
624 }
625 h
626 /^Written by/q' < "$progpath"
627 echo
628 eval \$ECHO \""$usage_message"\"
629 }
630
631
632 # func_version
633 # ------------
634 # Echo version message to standard output and exit.
635 # The version message is extracted from the calling file's header
636 # comments, with leading '# ' stripped:
637 # 1. First display the progname and version
638 # 2. Followed by the header comment line matching /^# Written by /
639 # 3. Then a blank line followed by the first following line matching
640 # /^# Copyright /
641 # 4. Immediately followed by any lines between the previous matches,
642 # except lines preceding the intervening completely blank line.
643 # For example, see the header comments of this file.
644 func_version ()
645 {
646 $debug_cmd
647
648 printf '%s\n' "$progname $scriptversion"
649 $SED -n '
650 /^# Written by /!b
651 s|^# ||; p; n
652
653 :fwd2blnk
654 /./ {
655 n
656 b fwd2blnk
657 }
658 p; n
659
660 :holdwrnt
661 s|^# ||
662 s|^# *$||
663 /^Copyright /!{
664 /./H
665 n
666 b holdwrnt
667 }
668
669 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
670 G
671 s|\(\n\)\n*|\1|g
672 p; q' < "$progpath"
673
674 exit $?
675 }
676
677
678 # Local variables:
679 # mode: shell-script
680 # sh-indentation: 2
681 # eval: (add-hook 'before-save-hook 'time-stamp)
682 # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
683 # time-stamp-time-zone: "UTC"
684 # End:
0 #! /bin/sh
1 # test-driver - basic testsuite driver script.
2
3 scriptversion=2013-07-13.22; # UTC
4
5 # Copyright (C) 2011-2014 Free Software Foundation, Inc.
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # This file is maintained in Automake, please report
26 # bugs to <bug-automake@gnu.org> or send patches to
27 # <automake-patches@gnu.org>.
28
29 # Make unconditional expansion of undefined variables an error. This
30 # helps a lot in preventing typo-related bugs.
31 set -u
32
33 usage_error ()
34 {
35 echo "$0: $*" >&2
36 print_usage >&2
37 exit 2
38 }
39
40 print_usage ()
41 {
42 cat <<END
43 Usage:
44 test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
45 [--expect-failure={yes|no}] [--color-tests={yes|no}]
46 [--enable-hard-errors={yes|no}] [--]
47 TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
48 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
49 END
50 }
51
52 test_name= # Used for reporting.
53 log_file= # Where to save the output of the test script.
54 trs_file= # Where to save the metadata of the test run.
55 expect_failure=no
56 color_tests=no
57 enable_hard_errors=yes
58 while test $# -gt 0; do
59 case $1 in
60 --help) print_usage; exit $?;;
61 --version) echo "test-driver $scriptversion"; exit $?;;
62 --test-name) test_name=$2; shift;;
63 --log-file) log_file=$2; shift;;
64 --trs-file) trs_file=$2; shift;;
65 --color-tests) color_tests=$2; shift;;
66 --expect-failure) expect_failure=$2; shift;;
67 --enable-hard-errors) enable_hard_errors=$2; shift;;
68 --) shift; break;;
69 -*) usage_error "invalid option: '$1'";;
70 *) break;;
71 esac
72 shift
73 done
74
75 missing_opts=
76 test x"$test_name" = x && missing_opts="$missing_opts --test-name"
77 test x"$log_file" = x && missing_opts="$missing_opts --log-file"
78 test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
79 if test x"$missing_opts" != x; then
80 usage_error "the following mandatory options are missing:$missing_opts"
81 fi
82
83 if test $# -eq 0; then
84 usage_error "missing argument"
85 fi
86
87 if test $color_tests = yes; then
88 # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
89 red='' # Red.
90 grn='' # Green.
91 lgn='' # Light green.
92 blu='' # Blue.
93 mgn='' # Magenta.
94 std='' # No color.
95 else
96 red= grn= lgn= blu= mgn= std=
97 fi
98
99 do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
100 trap "st=129; $do_exit" 1
101 trap "st=130; $do_exit" 2
102 trap "st=141; $do_exit" 13
103 trap "st=143; $do_exit" 15
104
105 # Test script is run here.
106 "$@" >$log_file 2>&1
107 estatus=$?
108
109 if test $enable_hard_errors = no && test $estatus -eq 99; then
110 tweaked_estatus=1
111 else
112 tweaked_estatus=$estatus
113 fi
114
115 case $tweaked_estatus:$expect_failure in
116 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
117 0:*) col=$grn res=PASS recheck=no gcopy=no;;
118 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
119 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
120 *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
121 *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
122 esac
123
124 # Report the test outcome and exit status in the logs, so that one can
125 # know whether the test passed or failed simply by looking at the '.log'
126 # file, without the need of also peaking into the corresponding '.trs'
127 # file (automake bug#11814).
128 echo "$res $test_name (exit status: $estatus)" >>$log_file
129
130 # Report outcome to console.
131 echo "${col}${res}${std}: $test_name"
132
133 # Register the test result, and other relevant metadata.
134 echo ":test-result: $res" > $trs_file
135 echo ":global-test-result: $res" >> $trs_file
136 echo ":recheck: $recheck" >> $trs_file
137 echo ":copy-in-global-log: $gcopy" >> $trs_file
138
139 # Local Variables:
140 # mode: shell-script
141 # sh-indentation: 2
142 # eval: (add-hook 'write-file-hooks 'time-stamp)
143 # time-stamp-start: "scriptversion="
144 # time-stamp-format: "%:y-%02m-%02d.%02H"
145 # time-stamp-time-zone: "UTC"
146 # time-stamp-end: "; # UTC"
147 # End:
0 % texinfo.tex -- TeX macros to handle Texinfo files.
1 %
2 % Load plain if necessary, i.e., if running under initex.
3 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
4 %
5 \def\texinfoversion{2018-09-21.20}
6 %
7 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
8 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
9 % 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
10 % Free Software Foundation, Inc.
11 %
12 % This texinfo.tex file is free software: you can redistribute it and/or
13 % modify it under the terms of the GNU General Public License as
14 % published by the Free Software Foundation, either version 3 of the
15 % License, or (at your option) any later version.
16 %
17 % This texinfo.tex file is distributed in the hope that it will be
18 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
19 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 % General Public License for more details.
21 %
22 % You should have received a copy of the GNU General Public License
23 % along with this program. If not, see <https://www.gnu.org/licenses/>.
24 %
25 % As a special exception, when this file is read by TeX when processing
26 % a Texinfo source document, you may use the result without
27 % restriction. This Exception is an additional permission under section 7
28 % of the GNU General Public License, version 3 ("GPLv3").
29 %
30 % Please try the latest version of texinfo.tex before submitting bug
31 % reports; you can get the latest version from:
32 % https://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
33 % https://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
34 % https://www.gnu.org/software/texinfo/ (the Texinfo home page)
35 % The texinfo.tex in any given distribution could well be out
36 % of date, so if that's what you're using, please check.
37 %
38 % Send bug reports to bug-texinfo@gnu.org. Please include including a
39 % complete document in each bug report with which we can reproduce the
40 % problem. Patches are, of course, greatly appreciated.
41 %
42 % To process a Texinfo manual with TeX, it's most reliable to use the
43 % texi2dvi shell script that comes with the distribution. For a simple
44 % manual foo.texi, however, you can get away with this:
45 % tex foo.texi
46 % texindex foo.??
47 % tex foo.texi
48 % tex foo.texi
49 % dvips foo.dvi -o # or whatever; this makes foo.ps.
50 % The extra TeX runs get the cross-reference information correct.
51 % Sometimes one run after texindex suffices, and sometimes you need more
52 % than two; texi2dvi does it as many times as necessary.
53 %
54 % It is possible to adapt texinfo.tex for other languages, to some
55 % extent. You can get the existing language-specific files from the
56 % full Texinfo distribution.
57 %
58 % The GNU Texinfo home page is https://www.gnu.org/software/texinfo.
59
60
61 \message{Loading texinfo [version \texinfoversion]:}
62
63 % If in a .fmt file, print the version number
64 % and turn on active characters that we couldn't do earlier because
65 % they might have appeared in the input file name.
66 \everyjob{\message{[Texinfo version \texinfoversion]}%
67 \catcode`+=\active \catcode`\_=\active}
68
69 % LaTeX's \typeout. This ensures that the messages it is used for
70 % are identical in format to the corresponding ones from latex/pdflatex.
71 \def\typeout{\immediate\write17}%
72
73 \chardef\other=12
74
75 % We never want plain's \outer definition of \+ in Texinfo.
76 % For @tex, we can use \tabalign.
77 \let\+ = \relax
78
79 % Save some plain tex macros whose names we will redefine.
80 \let\ptexb=\b
81 \let\ptexbullet=\bullet
82 \let\ptexc=\c
83 \let\ptexcomma=\,
84 \let\ptexdot=\.
85 \let\ptexdots=\dots
86 \let\ptexend=\end
87 \let\ptexequiv=\equiv
88 \let\ptexexclam=\!
89 \let\ptexfootnote=\footnote
90 \let\ptexgtr=>
91 \let\ptexhat=^
92 \let\ptexi=\i
93 \let\ptexindent=\indent
94 \let\ptexinsert=\insert
95 \let\ptexlbrace=\{
96 \let\ptexless=<
97 \let\ptexnewwrite\newwrite
98 \let\ptexnoindent=\noindent
99 \let\ptexplus=+
100 \let\ptexraggedright=\raggedright
101 \let\ptexrbrace=\}
102 \let\ptexslash=\/
103 \let\ptexsp=\sp
104 \let\ptexstar=\*
105 \let\ptexsup=\sup
106 \let\ptext=\t
107 \let\ptextop=\top
108 {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
109
110 % If this character appears in an error message or help string, it
111 % starts a new line in the output.
112 \newlinechar = `^^J
113
114 % Use TeX 3.0's \inputlineno to get the line number, for better error
115 % messages, but if we're using an old version of TeX, don't do anything.
116 %
117 \ifx\inputlineno\thisisundefined
118 \let\linenumber = \empty % Pre-3.0.
119 \else
120 \def\linenumber{l.\the\inputlineno:\space}
121 \fi
122
123 % Set up fixed words for English if not already set.
124 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
125 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
126 \ifx\putworderror\undefined \gdef\putworderror{error}\fi
127 \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
128 \ifx\putwordin\undefined \gdef\putwordin{in}\fi
129 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
130 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
131 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
132 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
133 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
134 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
135 \ifx\putwordof\undefined \gdef\putwordof{of}\fi
136 \ifx\putwordon\undefined \gdef\putwordon{on}\fi
137 \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
138 \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
139 \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
140 \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
141 \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
142 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
143 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
144 %
145 \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
146 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
147 \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
148 \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
149 \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
150 \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
151 \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
152 \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
153 \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
154 \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
155 \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
156 \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
157 %
158 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
159 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
160 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
161 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
162 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
163
164 % Give the space character the catcode for a space.
165 \def\spaceisspace{\catcode`\ =10\relax}
166
167 % Likewise for ^^M, the end of line character.
168 \def\endlineisspace{\catcode13=10\relax}
169
170 \chardef\dashChar = `\-
171 \chardef\slashChar = `\/
172 \chardef\underChar = `\_
173
174 % Ignore a token.
175 %
176 \def\gobble#1{}
177
178 % The following is used inside several \edef's.
179 \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
180
181 % Hyphenation fixes.
182 \hyphenation{
183 Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
184 ap-pen-dix bit-map bit-maps
185 data-base data-bases eshell fall-ing half-way long-est man-u-script
186 man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
187 par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
188 spell-ing spell-ings
189 stand-alone strong-est time-stamp time-stamps which-ever white-space
190 wide-spread wrap-around
191 }
192
193 % Sometimes it is convenient to have everything in the transcript file
194 % and nothing on the terminal. We don't just call \tracingall here,
195 % since that produces some useless output on the terminal. We also make
196 % some effort to order the tracing commands to reduce output in the log
197 % file; cf. trace.sty in LaTeX.
198 %
199 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
200 \def\loggingall{%
201 \tracingstats2
202 \tracingpages1
203 \tracinglostchars2 % 2 gives us more in etex
204 \tracingparagraphs1
205 \tracingoutput1
206 \tracingmacros2
207 \tracingrestores1
208 \showboxbreadth\maxdimen \showboxdepth\maxdimen
209 \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
210 \tracingscantokens1
211 \tracingifs1
212 \tracinggroups1
213 \tracingnesting2
214 \tracingassigns1
215 \fi
216 \tracingcommands3 % 3 gives us more in etex
217 \errorcontextlines16
218 }%
219
220 % @errormsg{MSG}. Do the index-like expansions on MSG, but if things
221 % aren't perfect, it's not the end of the world, being an error message,
222 % after all.
223 %
224 \def\errormsg{\begingroup \indexnofonts \doerrormsg}
225 \def\doerrormsg#1{\errmessage{#1}}
226
227 % add check for \lastpenalty to plain's definitions. If the last thing
228 % we did was a \nobreak, we don't want to insert more space.
229 %
230 \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
231 \removelastskip\penalty-50\smallskip\fi\fi}
232 \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
233 \removelastskip\penalty-100\medskip\fi\fi}
234 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
235 \removelastskip\penalty-200\bigskip\fi\fi}
236
237 % Output routine
238 %
239
240 % For a final copy, take out the rectangles
241 % that mark overfull boxes (in case you have decided
242 % that the text looks ok even though it passes the margin).
243 %
244 \def\finalout{\overfullrule=0pt }
245
246 % Do @cropmarks to get crop marks.
247 %
248 \newif\ifcropmarks
249 \let\cropmarks = \cropmarkstrue
250 %
251 % Dimensions to add cropmarks at corners.
252 % Added by P. A. MacKay, 12 Nov. 1986
253 %
254 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
255 \newdimen\cornerlong \cornerlong=1pc
256 \newdimen\cornerthick \cornerthick=.3pt
257 \newdimen\topandbottommargin \topandbottommargin=.75in
258
259 % Output a mark which sets \thischapter, \thissection and \thiscolor.
260 % We dump everything together because we only have one kind of mark.
261 % This works because we only use \botmark / \topmark, not \firstmark.
262 %
263 % A mark contains a subexpression of the \ifcase ... \fi construct.
264 % \get*marks macros below extract the needed part using \ifcase.
265 %
266 % Another complication is to let the user choose whether \thischapter
267 % (\thissection) refers to the chapter (section) in effect at the top
268 % of a page, or that at the bottom of a page.
269
270 % \domark is called twice inside \chapmacro, to add one
271 % mark before the section break, and one after.
272 % In the second call \prevchapterdefs is the same as \lastchapterdefs,
273 % and \prevsectiondefs is the same as \lastsectiondefs.
274 % Then if the page is not broken at the mark, some of the previous
275 % section appears on the page, and we can get the name of this section
276 % from \firstmark for @everyheadingmarks top.
277 % @everyheadingmarks bottom uses \botmark.
278 %
279 % See page 260 of The TeXbook.
280 \def\domark{%
281 \toks0=\expandafter{\lastchapterdefs}%
282 \toks2=\expandafter{\lastsectiondefs}%
283 \toks4=\expandafter{\prevchapterdefs}%
284 \toks6=\expandafter{\prevsectiondefs}%
285 \toks8=\expandafter{\lastcolordefs}%
286 \mark{%
287 \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top
288 \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom
289 \noexpand\else \the\toks8 % 2: color marks
290 }%
291 }
292
293 % \gettopheadingmarks, \getbottomheadingmarks,
294 % \getcolormarks - extract needed part of mark.
295 %
296 % \topmark doesn't work for the very first chapter (after the title
297 % page or the contents), so we use \firstmark there -- this gets us
298 % the mark with the chapter defs, unless the user sneaks in, e.g.,
299 % @setcolor (or @url, or @link, etc.) between @contents and the very
300 % first @chapter.
301 \def\gettopheadingmarks{%
302 \ifcase0\topmark\fi
303 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
304 }
305 \def\getbottomheadingmarks{\ifcase1\botmark\fi}
306 \def\getcolormarks{\ifcase2\topmark\fi}
307
308 % Avoid "undefined control sequence" errors.
309 \def\lastchapterdefs{}
310 \def\lastsectiondefs{}
311 \def\lastsection{}
312 \def\prevchapterdefs{}
313 \def\prevsectiondefs{}
314 \def\lastcolordefs{}
315
316 % Margin to add to right of even pages, to left of odd pages.
317 \newdimen\bindingoffset
318 \newdimen\normaloffset
319 \newdimen\txipagewidth \newdimen\txipageheight
320
321 % Main output routine.
322 %
323 \chardef\PAGE = 255
324 \output = {\onepageout{\pagecontents\PAGE}}
325
326 \newbox\headlinebox
327 \newbox\footlinebox
328
329 % \onepageout takes a vbox as an argument.
330 % \shipout a vbox for a single page, adding an optional header, footer,
331 % cropmarks, and footnote. This also causes index entries for this page
332 % to be written to the auxiliary files.
333 %
334 \def\onepageout#1{%
335 \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
336 %
337 \ifodd\pageno \advance\hoffset by \bindingoffset
338 \else \advance\hoffset by -\bindingoffset\fi
339 %
340 % Common context changes for both heading and footing.
341 % Do this outside of the \shipout so @code etc. will be expanded in
342 % the headline as they should be, not taken literally (outputting ''code).
343 \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars}
344 %
345 % Retrieve the information for the headings from the marks in the page,
346 % and call Plain TeX's \makeheadline and \makefootline, which use the
347 % values in \headline and \footline.
348 %
349 % This is used to check if we are on the first page of a chapter.
350 \ifcase1\topmark\fi
351 \let\prevchaptername\thischaptername
352 \ifcase0\firstmark\fi
353 \let\curchaptername\thischaptername
354 %
355 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
356 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
357 %
358 \ifx\curchaptername\prevchaptername
359 \let\thischapterheading\thischapter
360 \else
361 % \thischapterheading is the same as \thischapter except it is blank
362 % for the first page of a chapter. This is to prevent the chapter name
363 % being shown twice.
364 \def\thischapterheading{}%
365 \fi
366 %
367 \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
368 \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
369 %
370 {%
371 % Set context for writing to auxiliary files like index files.
372 % Have to do this stuff outside the \shipout because we want it to
373 % take effect in \write's, yet the group defined by the \vbox ends
374 % before the \shipout runs.
375 %
376 \indexdummies % don't expand commands in the output.
377 \normalturnoffactive % \ in index entries must not stay \, e.g., if
378 % the page break happens to be in the middle of an example.
379 % We don't want .vr (or whatever) entries like this:
380 % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
381 % "\acronym" won't work when it's read back in;
382 % it needs to be
383 % {\code {{\backslashcurfont }acronym}
384 \shipout\vbox{%
385 % Do this early so pdf references go to the beginning of the page.
386 \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
387 %
388 \ifcropmarks \vbox to \outervsize\bgroup
389 \hsize = \outerhsize
390 \vskip-\topandbottommargin
391 \vtop to0pt{%
392 \line{\ewtop\hfil\ewtop}%
393 \nointerlineskip
394 \line{%
395 \vbox{\moveleft\cornerthick\nstop}%
396 \hfill
397 \vbox{\moveright\cornerthick\nstop}%
398 }%
399 \vss}%
400 \vskip\topandbottommargin
401 \line\bgroup
402 \hfil % center the page within the outer (page) hsize.
403 \ifodd\pageno\hskip\bindingoffset\fi
404 \vbox\bgroup
405 \fi
406 %
407 \unvbox\headlinebox
408 \pagebody{#1}%
409 \ifdim\ht\footlinebox > 0pt
410 % Only leave this space if the footline is nonempty.
411 % (We lessened \vsize for it in \oddfootingyyy.)
412 % The \baselineskip=24pt in plain's \makefootline has no effect.
413 \vskip 24pt
414 \unvbox\footlinebox
415 \fi
416 %
417 \ifcropmarks
418 \egroup % end of \vbox\bgroup
419 \hfil\egroup % end of (centering) \line\bgroup
420 \vskip\topandbottommargin plus1fill minus1fill
421 \boxmaxdepth = \cornerthick
422 \vbox to0pt{\vss
423 \line{%
424 \vbox{\moveleft\cornerthick\nsbot}%
425 \hfill
426 \vbox{\moveright\cornerthick\nsbot}%
427 }%
428 \nointerlineskip
429 \line{\ewbot\hfil\ewbot}%
430 }%
431 \egroup % \vbox from first cropmarks clause
432 \fi
433 }% end of \shipout\vbox
434 }% end of group with \indexdummies
435 \advancepageno
436 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
437 }
438
439 \newinsert\margin \dimen\margin=\maxdimen
440
441 % Main part of page, including any footnotes
442 \def\pagebody#1{\vbox to\txipageheight{\boxmaxdepth=\maxdepth #1}}
443 {\catcode`\@ =11
444 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
445 % marginal hacks, juha@viisa.uucp (Juha Takala)
446 \ifvoid\margin\else % marginal info is present
447 \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
448 \dimen@=\dp#1\relax \unvbox#1\relax
449 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
450 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
451 }
452
453 % Here are the rules for the cropmarks. Note that they are
454 % offset so that the space between them is truly \outerhsize or \outervsize
455 % (P. A. MacKay, 12 November, 1986)
456 %
457 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
458 \def\nstop{\vbox
459 {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
460 \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
461 \def\nsbot{\vbox
462 {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
463
464
465 % Argument parsing
466
467 % Parse an argument, then pass it to #1. The argument is the rest of
468 % the input line (except we remove a trailing comment). #1 should be a
469 % macro which expects an ordinary undelimited TeX argument.
470 % For example, \def\foo{\parsearg\fooxxx}.
471 %
472 \def\parsearg{\parseargusing{}}
473 \def\parseargusing#1#2{%
474 \def\argtorun{#2}%
475 \begingroup
476 \obeylines
477 \spaceisspace
478 #1%
479 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
480 }
481
482 {\obeylines %
483 \gdef\parseargline#1^^M{%
484 \endgroup % End of the group started in \parsearg.
485 \argremovecomment #1\comment\ArgTerm%
486 }%
487 }
488
489 % First remove any @comment, then any @c comment. Also remove a @texinfoc
490 % comment (see \scanmacro for details). Pass the result on to \argcheckspaces.
491 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
492 \def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm}
493 \def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
494
495 % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
496 %
497 % \argremovec might leave us with trailing space, e.g.,
498 % @end itemize @c foo
499 % This space token undergoes the same procedure and is eventually removed
500 % by \finishparsearg.
501 %
502 \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
503 \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
504 \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
505 \def\temp{#3}%
506 \ifx\temp\empty
507 % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
508 \let\temp\finishparsearg
509 \else
510 \let\temp\argcheckspaces
511 \fi
512 % Put the space token in:
513 \temp#1 #3\ArgTerm
514 }
515
516 % If a _delimited_ argument is enclosed in braces, they get stripped; so
517 % to get _exactly_ the rest of the line, we had to prevent such situation.
518 % We prepended an \empty token at the very beginning and we expand it now,
519 % just before passing the control to \argtorun.
520 % (Similarly, we have to think about #3 of \argcheckspacesY above: it is
521 % either the null string, or it ends with \^^M---thus there is no danger
522 % that a pair of braces would be stripped.
523 %
524 % But first, we have to remove the trailing space token.
525 %
526 \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
527
528
529 % \parseargdef - define a command taking an argument on the line
530 %
531 % \parseargdef\foo{...}
532 % is roughly equivalent to
533 % \def\foo{\parsearg\Xfoo}
534 % \def\Xfoo#1{...}
535 \def\parseargdef#1{%
536 \expandafter \doparseargdef \csname\string#1\endcsname #1%
537 }
538 \def\doparseargdef#1#2{%
539 \def#2{\parsearg#1}%
540 \def#1##1%
541 }
542
543 % Several utility definitions with active space:
544 {
545 \obeyspaces
546 \gdef\obeyedspace{ }
547
548 % Make each space character in the input produce a normal interword
549 % space in the output. Don't allow a line break at this space, as this
550 % is used only in environments like @example, where each line of input
551 % should produce a line of output anyway.
552 %
553 \gdef\sepspaces{\obeyspaces\let =\tie}
554
555 % If an index command is used in an @example environment, any spaces
556 % therein should become regular spaces in the raw index file, not the
557 % expansion of \tie (\leavevmode \penalty \@M \ ).
558 \gdef\unsepspaces{\let =\space}
559 }
560
561
562 \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
563
564 % Define the framework for environments in texinfo.tex. It's used like this:
565 %
566 % \envdef\foo{...}
567 % \def\Efoo{...}
568 %
569 % It's the responsibility of \envdef to insert \begingroup before the
570 % actual body; @end closes the group after calling \Efoo. \envdef also
571 % defines \thisenv, so the current environment is known; @end checks
572 % whether the environment name matches. The \checkenv macro can also be
573 % used to check whether the current environment is the one expected.
574 %
575 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they
576 % are not treated as environments; they don't open a group. (The
577 % implementation of @end takes care not to call \endgroup in this
578 % special case.)
579
580
581 % At run-time, environments start with this:
582 \def\startenvironment#1{\begingroup\def\thisenv{#1}}
583 % initialize
584 \let\thisenv\empty
585
586 % ... but they get defined via ``\envdef\foo{...}'':
587 \long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
588 \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
589
590 % Check whether we're in the right environment:
591 \def\checkenv#1{%
592 \def\temp{#1}%
593 \ifx\thisenv\temp
594 \else
595 \badenverr
596 \fi
597 }
598
599 % Environment mismatch, #1 expected:
600 \def\badenverr{%
601 \errhelp = \EMsimple
602 \errmessage{This command can appear only \inenvironment\temp,
603 not \inenvironment\thisenv}%
604 }
605 \def\inenvironment#1{%
606 \ifx#1\empty
607 outside of any environment%
608 \else
609 in environment \expandafter\string#1%
610 \fi
611 }
612
613 % @end foo executes the definition of \Efoo.
614 % But first, it executes a specialized version of \checkenv
615 %
616 \parseargdef\end{%
617 \if 1\csname iscond.#1\endcsname
618 \else
619 % The general wording of \badenverr may not be ideal.
620 \expandafter\checkenv\csname#1\endcsname
621 \csname E#1\endcsname
622 \endgroup
623 \fi
624 }
625
626 \newhelp\EMsimple{Press RETURN to continue.}
627
628
629 % Be sure we're in horizontal mode when doing a tie, since we make space
630 % equivalent to this in @example-like environments. Otherwise, a space
631 % at the beginning of a line will start with \penalty -- and
632 % since \penalty is valid in vertical mode, we'd end up putting the
633 % penalty on the vertical list instead of in the new paragraph.
634 {\catcode`@ = 11
635 % Avoid using \@M directly, because that causes trouble
636 % if the definition is written into an index file.
637 \global\let\tiepenalty = \@M
638 \gdef\tie{\leavevmode\penalty\tiepenalty\ }
639 }
640
641 % @: forces normal size whitespace following.
642 \def\:{\spacefactor=1000 }
643
644 % @* forces a line break.
645 \def\*{\unskip\hfil\break\hbox{}\ignorespaces}
646
647 % @/ allows a line break.
648 \let\/=\allowbreak
649
650 % @. is an end-of-sentence period.
651 \def\.{.\spacefactor=\endofsentencespacefactor\space}
652
653 % @! is an end-of-sentence bang.
654 \def\!{!\spacefactor=\endofsentencespacefactor\space}
655
656 % @? is an end-of-sentence query.
657 \def\?{?\spacefactor=\endofsentencespacefactor\space}
658
659 % @frenchspacing on|off says whether to put extra space after punctuation.
660 %
661 \def\onword{on}
662 \def\offword{off}
663 %
664 \parseargdef\frenchspacing{%
665 \def\temp{#1}%
666 \ifx\temp\onword \plainfrenchspacing
667 \else\ifx\temp\offword \plainnonfrenchspacing
668 \else
669 \errhelp = \EMsimple
670 \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
671 \fi\fi
672 }
673
674 % @w prevents a word break. Without the \leavevmode, @w at the
675 % beginning of a paragraph, when TeX is still in vertical mode, would
676 % produce a whole line of output instead of starting the paragraph.
677 \def\w#1{\leavevmode\hbox{#1}}
678
679 % @group ... @end group forces ... to be all on one page, by enclosing
680 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box
681 % to keep its height that of a normal line. According to the rules for
682 % \topskip (p.114 of the TeXbook), the glue inserted is
683 % max (\topskip - \ht (first item), 0). If that height is large,
684 % therefore, no glue is inserted, and the space between the headline and
685 % the text is small, which looks bad.
686 %
687 % Another complication is that the group might be very large. This can
688 % cause the glue on the previous page to be unduly stretched, because it
689 % does not have much material. In this case, it's better to add an
690 % explicit \vfill so that the extra space is at the bottom. The
691 % threshold for doing this is if the group is more than \vfilllimit
692 % percent of a page (\vfilllimit can be changed inside of @tex).
693 %
694 \newbox\groupbox
695 \def\vfilllimit{0.7}
696 %
697 \envdef\group{%
698 \ifnum\catcode`\^^M=\active \else
699 \errhelp = \groupinvalidhelp
700 \errmessage{@group invalid in context where filling is enabled}%
701 \fi
702 \startsavinginserts
703 %
704 \setbox\groupbox = \vtop\bgroup
705 % Do @comment since we are called inside an environment such as
706 % @example, where each end-of-line in the input causes an
707 % end-of-line in the output. We don't want the end-of-line after
708 % the `@group' to put extra space in the output. Since @group
709 % should appear on a line by itself (according to the Texinfo
710 % manual), we don't worry about eating any user text.
711 \comment
712 }
713 %
714 % The \vtop produces a box with normal height and large depth; thus, TeX puts
715 % \baselineskip glue before it, and (when the next line of text is done)
716 % \lineskip glue after it. Thus, space below is not quite equal to space
717 % above. But it's pretty close.
718 \def\Egroup{%
719 % To get correct interline space between the last line of the group
720 % and the first line afterwards, we have to propagate \prevdepth.
721 \endgraf % Not \par, as it may have been set to \lisppar.
722 \global\dimen1 = \prevdepth
723 \egroup % End the \vtop.
724 \addgroupbox
725 \prevdepth = \dimen1
726 \checkinserts
727 }
728
729 \def\addgroupbox{
730 % \dimen0 is the vertical size of the group's box.
731 \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
732 % \dimen2 is how much space is left on the page (more or less).
733 \dimen2 = \txipageheight \advance\dimen2 by -\pagetotal
734 % if the group doesn't fit on the current page, and it's a big big
735 % group, force a page break.
736 \ifdim \dimen0 > \dimen2
737 \ifdim \pagetotal < \vfilllimit\txipageheight
738 \page
739 \fi
740 \fi
741 \box\groupbox
742 }
743
744 %
745 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
746 % message, so this ends up printing `@group can only ...'.
747 %
748 \newhelp\groupinvalidhelp{%
749 group can only be used in environments such as @example,^^J%
750 where each line of input produces a line of output.}
751
752 % @need space-in-mils
753 % forces a page break if there is not space-in-mils remaining.
754
755 \newdimen\mil \mil=0.001in
756
757 \parseargdef\need{%
758 % Ensure vertical mode, so we don't make a big box in the middle of a
759 % paragraph.
760 \par
761 %
762 % If the @need value is less than one line space, it's useless.
763 \dimen0 = #1\mil
764 \dimen2 = \ht\strutbox
765 \advance\dimen2 by \dp\strutbox
766 \ifdim\dimen0 > \dimen2
767 %
768 % Do a \strut just to make the height of this box be normal, so the
769 % normal leading is inserted relative to the preceding line.
770 % And a page break here is fine.
771 \vtop to #1\mil{\strut\vfil}%
772 %
773 % TeX does not even consider page breaks if a penalty added to the
774 % main vertical list is 10000 or more. But in order to see if the
775 % empty box we just added fits on the page, we must make it consider
776 % page breaks. On the other hand, we don't want to actually break the
777 % page after the empty box. So we use a penalty of 9999.
778 %
779 % There is an extremely small chance that TeX will actually break the
780 % page at this \penalty, if there are no other feasible breakpoints in
781 % sight. (If the user is using lots of big @group commands, which
782 % almost-but-not-quite fill up a page, TeX will have a hard time doing
783 % good page breaking, for example.) However, I could not construct an
784 % example where a page broke at this \penalty; if it happens in a real
785 % document, then we can reconsider our strategy.
786 \penalty9999
787 %
788 % Back up by the size of the box, whether we did a page break or not.
789 \kern -#1\mil
790 %
791 % Do not allow a page break right after this kern.
792 \nobreak
793 \fi
794 }
795
796 % @br forces paragraph break (and is undocumented).
797
798 \let\br = \par
799
800 % @page forces the start of a new page.
801 %
802 \def\page{\par\vfill\supereject}
803
804 % @exdent text....
805 % outputs text on separate line in roman font, starting at standard page margin
806
807 % This records the amount of indent in the innermost environment.
808 % That's how much \exdent should take out.
809 \newskip\exdentamount
810
811 % This defn is used inside fill environments such as @defun.
812 \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
813
814 % This defn is used inside nofill environments such as @example.
815 \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
816 \leftline{\hskip\leftskip{\rm#1}}}}
817
818 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
819 % paragraph. For more general purposes, use the \margin insertion
820 % class. WHICH is `l' or `r'. Not documented, written for gawk manual.
821 %
822 \newskip\inmarginspacing \inmarginspacing=1cm
823 \def\strutdepth{\dp\strutbox}
824 %
825 \def\doinmargin#1#2{\strut\vadjust{%
826 \nobreak
827 \kern-\strutdepth
828 \vtop to \strutdepth{%
829 \baselineskip=\strutdepth
830 \vss
831 % if you have multiple lines of stuff to put here, you'll need to
832 % make the vbox yourself of the appropriate size.
833 \ifx#1l%
834 \llap{\ignorespaces #2\hskip\inmarginspacing}%
835 \else
836 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
837 \fi
838 \null
839 }%
840 }}
841 \def\inleftmargin{\doinmargin l}
842 \def\inrightmargin{\doinmargin r}
843 %
844 % @inmargin{TEXT [, RIGHT-TEXT]}
845 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
846 % else use TEXT for both).
847 %
848 \def\inmargin#1{\parseinmargin #1,,\finish}
849 \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
850 \setbox0 = \hbox{\ignorespaces #2}%
851 \ifdim\wd0 > 0pt
852 \def\lefttext{#1}% have both texts
853 \def\righttext{#2}%
854 \else
855 \def\lefttext{#1}% have only one text
856 \def\righttext{#1}%
857 \fi
858 %
859 \ifodd\pageno
860 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
861 \else
862 \def\temp{\inleftmargin\lefttext}%
863 \fi
864 \temp
865 }
866
867 % @include FILE -- \input text of FILE.
868 %
869 \def\include{\parseargusing\filenamecatcodes\includezzz}
870 \def\includezzz#1{%
871 \pushthisfilestack
872 \def\thisfile{#1}%
873 {%
874 \makevalueexpandable % we want to expand any @value in FILE.
875 \turnoffactive % and allow special characters in the expansion
876 \indexnofonts % Allow `@@' and other weird things in file names.
877 \wlog{texinfo.tex: doing @include of #1^^J}%
878 \edef\temp{\noexpand\input #1 }%
879 %
880 % This trickery is to read FILE outside of a group, in case it makes
881 % definitions, etc.
882 \expandafter
883 }\temp
884 \popthisfilestack
885 }
886 \def\filenamecatcodes{%
887 \catcode`\\=\other
888 \catcode`~=\other
889 \catcode`^=\other
890 \catcode`_=\other
891 \catcode`|=\other
892 \catcode`<=\other
893 \catcode`>=\other
894 \catcode`+=\other
895 \catcode`-=\other
896 \catcode`\`=\other
897 \catcode`\'=\other
898 }
899
900 \def\pushthisfilestack{%
901 \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
902 }
903 \def\pushthisfilestackX{%
904 \expandafter\pushthisfilestackY\thisfile\StackTerm
905 }
906 \def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
907 \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
908 }
909
910 \def\popthisfilestack{\errthisfilestackempty}
911 \def\errthisfilestackempty{\errmessage{Internal error:
912 the stack of filenames is empty.}}
913 %
914 \def\thisfile{}
915
916 % @center line
917 % outputs that line, centered.
918 %
919 \parseargdef\center{%
920 \ifhmode
921 \let\centersub\centerH
922 \else
923 \let\centersub\centerV
924 \fi
925 \centersub{\hfil \ignorespaces#1\unskip \hfil}%
926 \let\centersub\relax % don't let the definition persist, just in case
927 }
928 \def\centerH#1{{%
929 \hfil\break
930 \advance\hsize by -\leftskip
931 \advance\hsize by -\rightskip
932 \line{#1}%
933 \break
934 }}
935 %
936 \newcount\centerpenalty
937 \def\centerV#1{%
938 % The idea here is the same as in \startdefun, \cartouche, etc.: if
939 % @center is the first thing after a section heading, we need to wipe
940 % out the negative parskip inserted by \sectionheading, but still
941 % prevent a page break here.
942 \centerpenalty = \lastpenalty
943 \ifnum\centerpenalty>10000 \vskip\parskip \fi
944 \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
945 \line{\kern\leftskip #1\kern\rightskip}%
946 }
947
948 % @sp n outputs n lines of vertical space
949 %
950 \parseargdef\sp{\vskip #1\baselineskip}
951
952 % @comment ...line which is ignored...
953 % @c is the same as @comment
954 % @ignore ... @end ignore is another way to write a comment
955
956
957 \def\c{\begingroup \catcode`\^^M=\active%
958 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
959 \cxxx}
960 {\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}}
961 %
962 \let\comment\c
963
964 % @paragraphindent NCHARS
965 % We'll use ems for NCHARS, close enough.
966 % NCHARS can also be the word `asis' or `none'.
967 % We cannot feasibly implement @paragraphindent asis, though.
968 %
969 \def\asisword{asis} % no translation, these are keywords
970 \def\noneword{none}
971 %
972 \parseargdef\paragraphindent{%
973 \def\temp{#1}%
974 \ifx\temp\asisword
975 \else
976 \ifx\temp\noneword
977 \defaultparindent = 0pt
978 \else
979 \defaultparindent = #1em
980 \fi
981 \fi
982 \parindent = \defaultparindent
983 }
984
985 % @exampleindent NCHARS
986 % We'll use ems for NCHARS like @paragraphindent.
987 % It seems @exampleindent asis isn't necessary, but
988 % I preserve it to make it similar to @paragraphindent.
989 \parseargdef\exampleindent{%
990 \def\temp{#1}%
991 \ifx\temp\asisword
992 \else
993 \ifx\temp\noneword
994 \lispnarrowing = 0pt
995 \else
996 \lispnarrowing = #1em
997 \fi
998 \fi
999 }
1000
1001 % @firstparagraphindent WORD
1002 % If WORD is `none', then suppress indentation of the first paragraph
1003 % after a section heading. If WORD is `insert', then do indent at such
1004 % paragraphs.
1005 %
1006 % The paragraph indentation is suppressed or not by calling
1007 % \suppressfirstparagraphindent, which the sectioning commands do.
1008 % We switch the definition of this back and forth according to WORD.
1009 % By default, we suppress indentation.
1010 %
1011 \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
1012 \def\insertword{insert}
1013 %
1014 \parseargdef\firstparagraphindent{%
1015 \def\temp{#1}%
1016 \ifx\temp\noneword
1017 \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
1018 \else\ifx\temp\insertword
1019 \let\suppressfirstparagraphindent = \relax
1020 \else
1021 \errhelp = \EMsimple
1022 \errmessage{Unknown @firstparagraphindent option `\temp'}%
1023 \fi\fi
1024 }
1025
1026 % Here is how we actually suppress indentation. Redefine \everypar to
1027 % \kern backwards by \parindent, and then reset itself to empty.
1028 %
1029 % We also make \indent itself not actually do anything until the next
1030 % paragraph.
1031 %
1032 \gdef\dosuppressfirstparagraphindent{%
1033 \gdef\indent {\restorefirstparagraphindent \indent}%
1034 \gdef\noindent{\restorefirstparagraphindent \noindent}%
1035 \global\everypar = {\kern -\parindent \restorefirstparagraphindent}%
1036 }
1037 %
1038 \gdef\restorefirstparagraphindent{%
1039 \global\let\indent = \ptexindent
1040 \global\let\noindent = \ptexnoindent
1041 \global\everypar = {}%
1042 }
1043
1044
1045 % @refill is a no-op.
1046 \let\refill=\relax
1047
1048 % @setfilename INFO-FILENAME - ignored
1049 \let\setfilename=\comment
1050
1051 % @bye.
1052 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1053
1054
1055 \message{pdf,}
1056 % adobe `portable' document format
1057 \newcount\tempnum
1058 \newcount\lnkcount
1059 \newtoks\filename
1060 \newcount\filenamelength
1061 \newcount\pgn
1062 \newtoks\toksA
1063 \newtoks\toksB
1064 \newtoks\toksC
1065 \newtoks\toksD
1066 \newbox\boxA
1067 \newbox\boxB
1068 \newcount\countA
1069 \newif\ifpdf
1070 \newif\ifpdfmakepagedest
1071
1072 %
1073 % For LuaTeX
1074 %
1075
1076 \newif\iftxiuseunicodedestname
1077 \txiuseunicodedestnamefalse % For pdfTeX etc.
1078
1079 \ifx\luatexversion\thisisundefined
1080 \else
1081 % Use Unicode destination names
1082 \txiuseunicodedestnametrue
1083 % Escape PDF strings with converting UTF-16 from UTF-8
1084 \begingroup
1085 \catcode`\%=12
1086 \directlua{
1087 function UTF16oct(str)
1088 tex.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377')
1089 for c in string.utfvalues(str) do
1090 if c < 0x10000 then
1091 tex.sprint(
1092 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1093 string.char(0x5c) .. string.char(0x25) .. '03o',
1094 (c / 256), (c % 256)))
1095 else
1096 c = c - 0x10000
1097 local c_hi = c / 1024 + 0xd800
1098 local c_lo = c % 1024 + 0xdc00
1099 tex.sprint(
1100 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1101 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1102 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1103 string.char(0x5c) .. string.char(0x25) .. '03o',
1104 (c_hi / 256), (c_hi % 256),
1105 (c_lo / 256), (c_lo % 256)))
1106 end
1107 end
1108 end
1109 }
1110 \endgroup
1111 \def\pdfescapestrutfsixteen#1{\directlua{UTF16oct('\luaescapestring{#1}')}}
1112 % Escape PDF strings without converting
1113 \begingroup
1114 \directlua{
1115 function PDFescstr(str)
1116 for c in string.bytes(str) do
1117 if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then
1118 tex.sprint(
1119 string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
1120 c))
1121 else
1122 tex.sprint(string.char(c))
1123 end
1124 end
1125 end
1126 }
1127 \endgroup
1128 \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
1129 \ifnum\luatexversion>84
1130 % For LuaTeX >= 0.85
1131 \def\pdfdest{\pdfextension dest}
1132 \let\pdfoutput\outputmode
1133 \def\pdfliteral{\pdfextension literal}
1134 \def\pdfcatalog{\pdfextension catalog}
1135 \def\pdftexversion{\numexpr\pdffeedback version\relax}
1136 \let\pdfximage\saveimageresource
1137 \let\pdfrefximage\useimageresource
1138 \let\pdflastximage\lastsavedimageresourceindex
1139 \def\pdfendlink{\pdfextension endlink\relax}
1140 \def\pdfoutline{\pdfextension outline}
1141 \def\pdfstartlink{\pdfextension startlink}
1142 \def\pdffontattr{\pdfextension fontattr}
1143 \def\pdfobj{\pdfextension obj}
1144 \def\pdflastobj{\numexpr\pdffeedback lastobj\relax}
1145 \let\pdfpagewidth\pagewidth
1146 \let\pdfpageheight\pageheight
1147 \edef\pdfhorigin{\pdfvariable horigin}
1148 \edef\pdfvorigin{\pdfvariable vorigin}
1149 \fi
1150 \fi
1151
1152 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
1153 % can be set). So we test for \relax and 0 as well as being undefined.
1154 \ifx\pdfoutput\thisisundefined
1155 \else
1156 \ifx\pdfoutput\relax
1157 \else
1158 \ifcase\pdfoutput
1159 \else
1160 \pdftrue
1161 \fi
1162 \fi
1163 \fi
1164
1165 % PDF uses PostScript string constants for the names of xref targets,
1166 % for display in the outlines, and in other places. Thus, we have to
1167 % double any backslashes. Otherwise, a name like "\node" will be
1168 % interpreted as a newline (\n), followed by o, d, e. Not good.
1169 %
1170 % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
1171 % related messages. The final outcome is that it is up to the TeX user
1172 % to double the backslashes and otherwise make the string valid, so
1173 % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
1174 % do this reliably, so we use it.
1175
1176 % #1 is a control sequence in which to do the replacements,
1177 % which we \xdef.
1178 \def\txiescapepdf#1{%
1179 \ifx\pdfescapestring\thisisundefined
1180 % No primitive available; should we give a warning or log?
1181 % Many times it won't matter.
1182 \xdef#1{#1}%
1183 \else
1184 % The expandable \pdfescapestring primitive escapes parentheses,
1185 % backslashes, and other special chars.
1186 \xdef#1{\pdfescapestring{#1}}%
1187 \fi
1188 }
1189 \def\txiescapepdfutfsixteen#1{%
1190 \ifx\pdfescapestrutfsixteen\thisisundefined
1191 % No UTF-16 converting macro available.
1192 \txiescapepdf{#1}%
1193 \else
1194 \xdef#1{\pdfescapestrutfsixteen{#1}}%
1195 \fi
1196 }
1197
1198 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
1199 with PDF output, and none of those formats could be found. (.eps cannot
1200 be supported due to the design of the PDF format; use regular TeX (DVI
1201 output) for that.)}
1202
1203 \ifpdf
1204 %
1205 % Color manipulation macros using ideas from pdfcolor.tex,
1206 % except using rgb instead of cmyk; the latter is said to render as a
1207 % very dark gray on-screen and a very dark halftone in print, instead
1208 % of actual black. The dark red here is dark enough to print on paper as
1209 % nearly black, but still distinguishable for online viewing. We use
1210 % black by default, though.
1211 \def\rgbDarkRed{0.50 0.09 0.12}
1212 \def\rgbBlack{0 0 0}
1213 %
1214 % rg sets the color for filling (usual text, etc.);
1215 % RG sets the color for stroking (thin rules, e.g., normal _'s).
1216 \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
1217 %
1218 % Set color, and create a mark which defines \thiscolor accordingly,
1219 % so that \makeheadline knows which color to restore.
1220 \def\setcolor#1{%
1221 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
1222 \domark
1223 \pdfsetcolor{#1}%
1224 }
1225 %
1226 \def\maincolor{\rgbBlack}
1227 \pdfsetcolor{\maincolor}
1228 \edef\thiscolor{\maincolor}
1229 \def\lastcolordefs{}
1230 %
1231 \def\makefootline{%
1232 \baselineskip24pt
1233 \line{\pdfsetcolor{\maincolor}\the\footline}%
1234 }
1235 %
1236 \def\makeheadline{%
1237 \vbox to 0pt{%
1238 \vskip-22.5pt
1239 \line{%
1240 \vbox to8.5pt{}%
1241 % Extract \thiscolor definition from the marks.
1242 \getcolormarks
1243 % Typeset the headline with \maincolor, then restore the color.
1244 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1245 }%
1246 \vss
1247 }%
1248 \nointerlineskip
1249 }
1250 %
1251 %
1252 \pdfcatalog{/PageMode /UseOutlines}
1253 %
1254 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1255 \def\dopdfimage#1#2#3{%
1256 \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1257 \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1258 %
1259 % pdftex (and the PDF format) support .pdf, .png, .jpg (among
1260 % others). Let's try in that order, PDF first since if
1261 % someone has a scalable image, presumably better to use that than a
1262 % bitmap.
1263 \let\pdfimgext=\empty
1264 \begingroup
1265 \openin 1 #1.pdf \ifeof 1
1266 \openin 1 #1.PDF \ifeof 1
1267 \openin 1 #1.png \ifeof 1
1268 \openin 1 #1.jpg \ifeof 1
1269 \openin 1 #1.jpeg \ifeof 1
1270 \openin 1 #1.JPG \ifeof 1
1271 \errhelp = \nopdfimagehelp
1272 \errmessage{Could not find image file #1 for pdf}%
1273 \else \gdef\pdfimgext{JPG}%
1274 \fi
1275 \else \gdef\pdfimgext{jpeg}%
1276 \fi
1277 \else \gdef\pdfimgext{jpg}%
1278 \fi
1279 \else \gdef\pdfimgext{png}%
1280 \fi
1281 \else \gdef\pdfimgext{PDF}%
1282 \fi
1283 \else \gdef\pdfimgext{pdf}%
1284 \fi
1285 \closein 1
1286 \endgroup
1287 %
1288 % without \immediate, ancient pdftex seg faults when the same image is
1289 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
1290 \ifnum\pdftexversion < 14
1291 \immediate\pdfimage
1292 \else
1293 \immediate\pdfximage
1294 \fi
1295 \ifdim \wd0 >0pt width \pdfimagewidth \fi
1296 \ifdim \wd2 >0pt height \pdfimageheight \fi
1297 \ifnum\pdftexversion<13
1298 #1.\pdfimgext
1299 \else
1300 {#1.\pdfimgext}%
1301 \fi
1302 \ifnum\pdftexversion < 14 \else
1303 \pdfrefximage \pdflastximage
1304 \fi}
1305 %
1306 \def\setpdfdestname#1{{%
1307 % We have to set dummies so commands such as @code, and characters
1308 % such as \, aren't expanded when present in a section title.
1309 \indexnofonts
1310 \makevalueexpandable
1311 \turnoffactive
1312 \iftxiuseunicodedestname
1313 \ifx \declaredencoding \latone
1314 % Pass through Latin-1 characters.
1315 % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode.
1316 \else
1317 \ifx \declaredencoding \utfeight
1318 % Pass through Unicode characters.
1319 \else
1320 % Use ASCII approximations in destination names.
1321 \passthroughcharsfalse
1322 \fi
1323 \fi
1324 \else
1325 % Use ASCII approximations in destination names.
1326 \passthroughcharsfalse
1327 \fi
1328 \def\pdfdestname{#1}%
1329 \txiescapepdf\pdfdestname
1330 }}
1331 %
1332 \def\setpdfoutlinetext#1{{%
1333 \indexnofonts
1334 \makevalueexpandable
1335 \turnoffactive
1336 \ifx \declaredencoding \latone
1337 % The PDF format can use an extended form of Latin-1 in bookmark
1338 % strings. See Appendix D of the PDF Reference, Sixth Edition, for
1339 % the "PDFDocEncoding".
1340 \passthroughcharstrue
1341 % Pass through Latin-1 characters.
1342 % LuaTeX: Convert to Unicode
1343 % pdfTeX: Use Latin-1 as PDFDocEncoding
1344 \def\pdfoutlinetext{#1}%
1345 \else
1346 \ifx \declaredencoding \utfeight
1347 \ifx\luatexversion\thisisundefined
1348 % For pdfTeX with UTF-8.
1349 % TODO: the PDF format can use UTF-16 in bookmark strings,
1350 % but the code for this isn't done yet.
1351 % Use ASCII approximations.
1352 \passthroughcharsfalse
1353 \def\pdfoutlinetext{#1}%
1354 \else
1355 % For LuaTeX with UTF-8.
1356 % Pass through Unicode characters for title texts.
1357 \passthroughcharstrue
1358 \def\pdfoutlinetext{#1}%
1359 \fi
1360 \else
1361 % For non-Latin-1 or non-UTF-8 encodings.
1362 % Use ASCII approximations.
1363 \passthroughcharsfalse
1364 \def\pdfoutlinetext{#1}%
1365 \fi
1366 \fi
1367 % LuaTeX: Convert to UTF-16
1368 % pdfTeX: Use Latin-1 as PDFDocEncoding
1369 \txiescapepdfutfsixteen\pdfoutlinetext
1370 }}
1371 %
1372 \def\pdfmkdest#1{%
1373 \setpdfdestname{#1}%
1374 \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
1375 }
1376 %
1377 % used to mark target names; must be expandable.
1378 \def\pdfmkpgn#1{#1}
1379 %
1380 % by default, use black for everything.
1381 \def\urlcolor{\rgbBlack}
1382 \def\linkcolor{\rgbBlack}
1383 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1384 %
1385 % Adding outlines to PDF; macros for calculating structure of outlines
1386 % come from Petr Olsak
1387 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
1388 \else \csname#1\endcsname \fi}
1389 \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
1390 \advance\tempnum by 1
1391 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
1392 %
1393 % #1 is the section text, which is what will be displayed in the
1394 % outline by the pdf viewer. #2 is the pdf expression for the number
1395 % of subentries (or empty, for subsubsections). #3 is the node text,
1396 % which might be empty if this toc entry had no corresponding node.
1397 % #4 is the page number
1398 %
1399 \def\dopdfoutline#1#2#3#4{%
1400 % Generate a link to the node text if that exists; else, use the
1401 % page number. We could generate a destination for the section
1402 % text in the case where a section has no node, but it doesn't
1403 % seem worth the trouble, since most documents are normally structured.
1404 \setpdfoutlinetext{#1}
1405 \setpdfdestname{#3}
1406 \ifx\pdfdestname\empty
1407 \def\pdfdestname{#4}%
1408 \fi
1409 %
1410 \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}%
1411 }
1412 %
1413 \def\pdfmakeoutlines{%
1414 \begingroup
1415 % Read toc silently, to get counts of subentries for \pdfoutline.
1416 \def\partentry##1##2##3##4{}% ignore parts in the outlines
1417 \def\numchapentry##1##2##3##4{%
1418 \def\thischapnum{##2}%
1419 \def\thissecnum{0}%
1420 \def\thissubsecnum{0}%
1421 }%
1422 \def\numsecentry##1##2##3##4{%
1423 \advancenumber{chap\thischapnum}%
1424 \def\thissecnum{##2}%
1425 \def\thissubsecnum{0}%
1426 }%
1427 \def\numsubsecentry##1##2##3##4{%
1428 \advancenumber{sec\thissecnum}%
1429 \def\thissubsecnum{##2}%
1430 }%
1431 \def\numsubsubsecentry##1##2##3##4{%
1432 \advancenumber{subsec\thissubsecnum}%
1433 }%
1434 \def\thischapnum{0}%
1435 \def\thissecnum{0}%
1436 \def\thissubsecnum{0}%
1437 %
1438 % use \def rather than \let here because we redefine \chapentry et
1439 % al. a second time, below.
1440 \def\appentry{\numchapentry}%
1441 \def\appsecentry{\numsecentry}%
1442 \def\appsubsecentry{\numsubsecentry}%
1443 \def\appsubsubsecentry{\numsubsubsecentry}%
1444 \def\unnchapentry{\numchapentry}%
1445 \def\unnsecentry{\numsecentry}%
1446 \def\unnsubsecentry{\numsubsecentry}%
1447 \def\unnsubsubsecentry{\numsubsubsecentry}%
1448 \readdatafile{toc}%
1449 %
1450 % Read toc second time, this time actually producing the outlines.
1451 % The `-' means take the \expnumber as the absolute number of
1452 % subentries, which we calculated on our first read of the .toc above.
1453 %
1454 % We use the node names as the destinations.
1455 \def\numchapentry##1##2##3##4{%
1456 \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
1457 \def\numsecentry##1##2##3##4{%
1458 \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
1459 \def\numsubsecentry##1##2##3##4{%
1460 \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
1461 \def\numsubsubsecentry##1##2##3##4{% count is always zero
1462 \dopdfoutline{##1}{}{##3}{##4}}%
1463 %
1464 % PDF outlines are displayed using system fonts, instead of
1465 % document fonts. Therefore we cannot use special characters,
1466 % since the encoding is unknown. For example, the eogonek from
1467 % Latin 2 (0xea) gets translated to a | character. Info from
1468 % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
1469 %
1470 % TODO this right, we have to translate 8-bit characters to
1471 % their "best" equivalent, based on the @documentencoding. Too
1472 % much work for too little return. Just use the ASCII equivalents
1473 % we use for the index sort strings.
1474 %
1475 \indexnofonts
1476 \setupdatafile
1477 % We can have normal brace characters in the PDF outlines, unlike
1478 % Texinfo index files. So set that up.
1479 \def\{{\lbracecharliteral}%
1480 \def\}{\rbracecharliteral}%
1481 \catcode`\\=\active \otherbackslash
1482 \input \tocreadfilename
1483 \endgroup
1484 }
1485 {\catcode`[=1 \catcode`]=2
1486 \catcode`{=\other \catcode`}=\other
1487 \gdef\lbracecharliteral[{]%
1488 \gdef\rbracecharliteral[}]%
1489 ]
1490 %
1491 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
1492 \ifx\PP\D\let\nextsp\relax
1493 \else\let\nextsp\skipspaces
1494 \addtokens{\filename}{\PP}%
1495 \advance\filenamelength by 1
1496 \fi
1497 \nextsp}
1498 \def\getfilename#1{%
1499 \filenamelength=0
1500 % If we don't expand the argument now, \skipspaces will get
1501 % snagged on things like "@value{foo}".
1502 \edef\temp{#1}%
1503 \expandafter\skipspaces\temp|\relax
1504 }
1505 \ifnum\pdftexversion < 14
1506 \let \startlink \pdfannotlink
1507 \else
1508 \let \startlink \pdfstartlink
1509 \fi
1510 % make a live url in pdf output.
1511 \def\pdfurl#1{%
1512 \begingroup
1513 % it seems we really need yet another set of dummies; have not
1514 % tried to figure out what each command should do in the context
1515 % of @url. for now, just make @/ a no-op, that's the only one
1516 % people have actually reported a problem with.
1517 %
1518 \normalturnoffactive
1519 \def\@{@}%
1520 \let\/=\empty
1521 \makevalueexpandable
1522 % do we want to go so far as to use \indexnofonts instead of just
1523 % special-casing \var here?
1524 \def\var##1{##1}%
1525 %
1526 \leavevmode\setcolor{\urlcolor}%
1527 \startlink attr{/Border [0 0 0]}%
1528 user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
1529 \endgroup}
1530 % \pdfgettoks - Surround page numbers in #1 with @pdflink. #1 may
1531 % be a simple number, or a list of numbers in the case of an index
1532 % entry.
1533 \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
1534 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
1535 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
1536 \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
1537 \def\maketoks{%
1538 \expandafter\poptoks\the\toksA|ENDTOKS|\relax
1539 \ifx\first0\adn0
1540 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1541 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1542 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1543 \else
1544 \ifnum0=\countA\else\makelink\fi
1545 \ifx\first.\let\next=\done\else
1546 \let\next=\maketoks
1547 \addtokens{\toksB}{\the\toksD}
1548 \ifx\first,\addtokens{\toksB}{\space}\fi
1549 \fi
1550 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1551 \next}
1552 \def\makelink{\addtokens{\toksB}%
1553 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
1554 \def\pdflink#1{%
1555 \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
1556 \setcolor{\linkcolor}#1\endlink}
1557 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
1558 \else
1559 % non-pdf mode
1560 \let\pdfmkdest = \gobble
1561 \let\pdfurl = \gobble
1562 \let\endlink = \relax
1563 \let\setcolor = \gobble
1564 \let\pdfsetcolor = \gobble
1565 \let\pdfmakeoutlines = \relax
1566 \fi % \ifx\pdfoutput
1567
1568 %
1569 % For XeTeX
1570 %
1571 \ifx\XeTeXrevision\thisisundefined
1572 \else
1573 %
1574 % XeTeX version check
1575 %
1576 \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99996}>-1
1577 % TeX Live 2016 contains XeTeX 0.99996 and xdvipdfmx 20160307.
1578 % It can use the `dvipdfmx:config' special (from TeX Live SVN r40941).
1579 % For avoiding PDF destination name replacement, we use this special
1580 % instead of xdvipdfmx's command line option `-C 0x0010'.
1581 \special{dvipdfmx:config C 0x0010}
1582 % XeTeX 0.99995+ comes with xdvipdfmx 20160307+.
1583 % It can handle Unicode destination names for PDF.
1584 \txiuseunicodedestnametrue
1585 \else
1586 % XeTeX < 0.99996 (TeX Live < 2016) cannot use the
1587 % `dvipdfmx:config' special.
1588 % So for avoiding PDF destination name replacement,
1589 % xdvipdfmx's command line option `-C 0x0010' is necessary.
1590 %
1591 % XeTeX < 0.99995 can not handle Unicode destination names for PDF
1592 % because xdvipdfmx 20150315 has a UTF-16 conversion issue.
1593 % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1594 \txiuseunicodedestnamefalse
1595 \fi
1596 %
1597 % Color support
1598 %
1599 \def\rgbDarkRed{0.50 0.09 0.12}
1600 \def\rgbBlack{0 0 0}
1601 %
1602 \def\pdfsetcolor#1{\special{pdf:scolor [#1]}}
1603 %
1604 % Set color, and create a mark which defines \thiscolor accordingly,
1605 % so that \makeheadline knows which color to restore.
1606 \def\setcolor#1{%
1607 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
1608 \domark
1609 \pdfsetcolor{#1}%
1610 }
1611 %
1612 \def\maincolor{\rgbBlack}
1613 \pdfsetcolor{\maincolor}
1614 \edef\thiscolor{\maincolor}
1615 \def\lastcolordefs{}
1616 %
1617 \def\makefootline{%
1618 \baselineskip24pt
1619 \line{\pdfsetcolor{\maincolor}\the\footline}%
1620 }
1621 %
1622 \def\makeheadline{%
1623 \vbox to 0pt{%
1624 \vskip-22.5pt
1625 \line{%
1626 \vbox to8.5pt{}%
1627 % Extract \thiscolor definition from the marks.
1628 \getcolormarks
1629 % Typeset the headline with \maincolor, then restore the color.
1630 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1631 }%
1632 \vss
1633 }%
1634 \nointerlineskip
1635 }
1636 %
1637 % PDF outline support
1638 %
1639 % Emulate pdfTeX primitive
1640 \def\pdfdest name#1 xyz{%
1641 \special{pdf:dest (#1) [@thispage /XYZ @xpos @ypos null]}%
1642 }
1643 %
1644 \def\setpdfdestname#1{{%
1645 % We have to set dummies so commands such as @code, and characters
1646 % such as \, aren't expanded when present in a section title.
1647 \indexnofonts
1648 \makevalueexpandable
1649 \turnoffactive
1650 \iftxiuseunicodedestname
1651 % Pass through Unicode characters.
1652 \else
1653 % Use ASCII approximations in destination names.
1654 \passthroughcharsfalse
1655 \fi
1656 \def\pdfdestname{#1}%
1657 \txiescapepdf\pdfdestname
1658 }}
1659 %
1660 \def\setpdfoutlinetext#1{{%
1661 \turnoffactive
1662 % Always use Unicode characters in title texts.
1663 \def\pdfoutlinetext{#1}%
1664 % For XeTeX, xdvipdfmx converts to UTF-16.
1665 % So we do not convert.
1666 \txiescapepdf\pdfoutlinetext
1667 }}
1668 %
1669 \def\pdfmkdest#1{%
1670 \setpdfdestname{#1}%
1671 \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
1672 }
1673 %
1674 % by default, use black for everything.
1675 \def\urlcolor{\rgbBlack}
1676 \def\linkcolor{\rgbBlack}
1677 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1678 %
1679 \def\dopdfoutline#1#2#3#4{%
1680 \setpdfoutlinetext{#1}
1681 \setpdfdestname{#3}
1682 \ifx\pdfdestname\empty
1683 \def\pdfdestname{#4}%
1684 \fi
1685 %
1686 \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A
1687 << /S /GoTo /D (\pdfdestname) >> >> }%
1688 }
1689 %
1690 \def\pdfmakeoutlines{%
1691 \begingroup
1692 %
1693 % For XeTeX, counts of subentries are not necessary.
1694 % Therefore, we read toc only once.
1695 %
1696 % We use node names as destinations.
1697 \def\partentry##1##2##3##4{}% ignore parts in the outlines
1698 \def\numchapentry##1##2##3##4{%
1699 \dopdfoutline{##1}{1}{##3}{##4}}%
1700 \def\numsecentry##1##2##3##4{%
1701 \dopdfoutline{##1}{2}{##3}{##4}}%
1702 \def\numsubsecentry##1##2##3##4{%
1703 \dopdfoutline{##1}{3}{##3}{##4}}%
1704 \def\numsubsubsecentry##1##2##3##4{%
1705 \dopdfoutline{##1}{4}{##3}{##4}}%
1706 %
1707 \let\appentry\numchapentry%
1708 \let\appsecentry\numsecentry%
1709 \let\appsubsecentry\numsubsecentry%
1710 \let\appsubsubsecentry\numsubsubsecentry%
1711 \let\unnchapentry\numchapentry%
1712 \let\unnsecentry\numsecentry%
1713 \let\unnsubsecentry\numsubsecentry%
1714 \let\unnsubsubsecentry\numsubsubsecentry%
1715 %
1716 % For XeTeX, xdvipdfmx converts strings to UTF-16.
1717 % Therefore, the encoding and the language may not be considered.
1718 %
1719 \indexnofonts
1720 \setupdatafile
1721 % We can have normal brace characters in the PDF outlines, unlike
1722 % Texinfo index files. So set that up.
1723 \def\{{\lbracecharliteral}%
1724 \def\}{\rbracecharliteral}%
1725 \catcode`\\=\active \otherbackslash
1726 \input \tocreadfilename
1727 \endgroup
1728 }
1729 {\catcode`[=1 \catcode`]=2
1730 \catcode`{=\other \catcode`}=\other
1731 \gdef\lbracecharliteral[{]%
1732 \gdef\rbracecharliteral[}]%
1733 ]
1734
1735 \special{pdf:docview << /PageMode /UseOutlines >> }
1736 % ``\special{pdf:tounicode ...}'' is not necessary
1737 % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it.
1738 % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315,
1739 % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings.
1740 % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1741 %
1742 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
1743 \ifx\PP\D\let\nextsp\relax
1744 \else\let\nextsp\skipspaces
1745 \addtokens{\filename}{\PP}%
1746 \advance\filenamelength by 1
1747 \fi
1748 \nextsp}
1749 \def\getfilename#1{%
1750 \filenamelength=0
1751 % If we don't expand the argument now, \skipspaces will get
1752 % snagged on things like "@value{foo}".
1753 \edef\temp{#1}%
1754 \expandafter\skipspaces\temp|\relax
1755 }
1756 % make a live url in pdf output.
1757 \def\pdfurl#1{%
1758 \begingroup
1759 % it seems we really need yet another set of dummies; have not
1760 % tried to figure out what each command should do in the context
1761 % of @url. for now, just make @/ a no-op, that's the only one
1762 % people have actually reported a problem with.
1763 %
1764 \normalturnoffactive
1765 \def\@{@}%
1766 \let\/=\empty
1767 \makevalueexpandable
1768 % do we want to go so far as to use \indexnofonts instead of just
1769 % special-casing \var here?
1770 \def\var##1{##1}%
1771 %
1772 \leavevmode\setcolor{\urlcolor}%
1773 \special{pdf:bann << /Border [0 0 0]
1774 /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
1775 \endgroup}
1776 \def\endlink{\setcolor{\maincolor}\special{pdf:eann}}
1777 \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
1778 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
1779 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
1780 \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
1781 \def\maketoks{%
1782 \expandafter\poptoks\the\toksA|ENDTOKS|\relax
1783 \ifx\first0\adn0
1784 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1785 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1786 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1787 \else
1788 \ifnum0=\countA\else\makelink\fi
1789 \ifx\first.\let\next=\done\else
1790 \let\next=\maketoks
1791 \addtokens{\toksB}{\the\toksD}
1792 \ifx\first,\addtokens{\toksB}{\space}\fi
1793 \fi
1794 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1795 \next}
1796 \def\makelink{\addtokens{\toksB}%
1797 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
1798 \def\pdflink#1{%
1799 \special{pdf:bann << /Border [0 0 0]
1800 /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}%
1801 \setcolor{\linkcolor}#1\endlink}
1802 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
1803 %
1804 %
1805 % @image support
1806 %
1807 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1808 \def\doxeteximage#1#2#3{%
1809 \def\xeteximagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1810 \def\xeteximageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1811 %
1812 % XeTeX (and the PDF format) supports .pdf, .png, .jpg (among
1813 % others). Let's try in that order, PDF first since if
1814 % someone has a scalable image, presumably better to use that than a
1815 % bitmap.
1816 \let\xeteximgext=\empty
1817 \begingroup
1818 \openin 1 #1.pdf \ifeof 1
1819 \openin 1 #1.PDF \ifeof 1
1820 \openin 1 #1.png \ifeof 1
1821 \openin 1 #1.jpg \ifeof 1
1822 \openin 1 #1.jpeg \ifeof 1
1823 \openin 1 #1.JPG \ifeof 1
1824 \errmessage{Could not find image file #1 for XeTeX}%
1825 \else \gdef\xeteximgext{JPG}%
1826 \fi
1827 \else \gdef\xeteximgext{jpeg}%
1828 \fi
1829 \else \gdef\xeteximgext{jpg}%
1830 \fi
1831 \else \gdef\xeteximgext{png}%
1832 \fi
1833 \else \gdef\xeteximgext{PDF}%
1834 \fi
1835 \else \gdef\xeteximgext{pdf}%
1836 \fi
1837 \closein 1
1838 \endgroup
1839 %
1840 \def\xetexpdfext{pdf}%
1841 \ifx\xeteximgext\xetexpdfext
1842 \XeTeXpdffile "#1".\xeteximgext ""
1843 \else
1844 \def\xetexpdfext{PDF}%
1845 \ifx\xeteximgext\xetexpdfext
1846 \XeTeXpdffile "#1".\xeteximgext ""
1847 \else
1848 \XeTeXpicfile "#1".\xeteximgext ""
1849 \fi
1850 \fi
1851 \ifdim \wd0 >0pt width \xeteximagewidth \fi
1852 \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
1853 }
1854 \fi
1855
1856
1857 %
1858 \message{fonts,}
1859
1860 % Set the baselineskip to #1, and the lineskip and strut size
1861 % correspondingly. There is no deep meaning behind these magic numbers
1862 % used as factors; they just match (closely enough) what Knuth defined.
1863 %
1864 \def\lineskipfactor{.08333}
1865 \def\strutheightpercent{.70833}
1866 \def\strutdepthpercent {.29167}
1867 %
1868 % can get a sort of poor man's double spacing by redefining this.
1869 \def\baselinefactor{1}
1870 %
1871 \newdimen\textleading
1872 \def\setleading#1{%
1873 \dimen0 = #1\relax
1874 \normalbaselineskip = \baselinefactor\dimen0
1875 \normallineskip = \lineskipfactor\normalbaselineskip
1876 \normalbaselines
1877 \setbox\strutbox =\hbox{%
1878 \vrule width0pt height\strutheightpercent\baselineskip
1879 depth \strutdepthpercent \baselineskip
1880 }%
1881 }
1882
1883 % PDF CMaps. See also LaTeX's t1.cmap.
1884 %
1885 % do nothing with this by default.
1886 \expandafter\let\csname cmapOT1\endcsname\gobble
1887 \expandafter\let\csname cmapOT1IT\endcsname\gobble
1888 \expandafter\let\csname cmapOT1TT\endcsname\gobble
1889
1890 % if we are producing pdf, and we have \pdffontattr, then define cmaps.
1891 % (\pdffontattr was introduced many years ago, but people still run
1892 % older pdftex's; it's easy to conditionalize, so we do.)
1893 \ifpdf \ifx\pdffontattr\thisisundefined \else
1894 \begingroup
1895 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1896 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1897 %%DocumentNeededResources: ProcSet (CIDInit)
1898 %%IncludeResource: ProcSet (CIDInit)
1899 %%BeginResource: CMap (TeX-OT1-0)
1900 %%Title: (TeX-OT1-0 TeX OT1 0)
1901 %%Version: 1.000
1902 %%EndComments
1903 /CIDInit /ProcSet findresource begin
1904 12 dict begin
1905 begincmap
1906 /CIDSystemInfo
1907 << /Registry (TeX)
1908 /Ordering (OT1)
1909 /Supplement 0
1910 >> def
1911 /CMapName /TeX-OT1-0 def
1912 /CMapType 2 def
1913 1 begincodespacerange
1914 <00> <7F>
1915 endcodespacerange
1916 8 beginbfrange
1917 <00> <01> <0393>
1918 <09> <0A> <03A8>
1919 <23> <26> <0023>
1920 <28> <3B> <0028>
1921 <3F> <5B> <003F>
1922 <5D> <5E> <005D>
1923 <61> <7A> <0061>
1924 <7B> <7C> <2013>
1925 endbfrange
1926 40 beginbfchar
1927 <02> <0398>
1928 <03> <039B>
1929 <04> <039E>
1930 <05> <03A0>
1931 <06> <03A3>
1932 <07> <03D2>
1933 <08> <03A6>
1934 <0B> <00660066>
1935 <0C> <00660069>
1936 <0D> <0066006C>
1937 <0E> <006600660069>
1938 <0F> <00660066006C>
1939 <10> <0131>
1940 <11> <0237>
1941 <12> <0060>
1942 <13> <00B4>
1943 <14> <02C7>
1944 <15> <02D8>
1945 <16> <00AF>
1946 <17> <02DA>
1947 <18> <00B8>
1948 <19> <00DF>
1949 <1A> <00E6>
1950 <1B> <0153>
1951 <1C> <00F8>
1952 <1D> <00C6>
1953 <1E> <0152>
1954 <1F> <00D8>
1955 <21> <0021>
1956 <22> <201D>
1957 <27> <2019>
1958 <3C> <00A1>
1959 <3D> <003D>
1960 <3E> <00BF>
1961 <5C> <201C>
1962 <5F> <02D9>
1963 <60> <2018>
1964 <7D> <02DD>
1965 <7E> <007E>
1966 <7F> <00A8>
1967 endbfchar
1968 endcmap
1969 CMapName currentdict /CMap defineresource pop
1970 end
1971 end
1972 %%EndResource
1973 %%EOF
1974 }\endgroup
1975 \expandafter\edef\csname cmapOT1\endcsname#1{%
1976 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1977 }%
1978 %
1979 % \cmapOT1IT
1980 \begingroup
1981 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1982 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1983 %%DocumentNeededResources: ProcSet (CIDInit)
1984 %%IncludeResource: ProcSet (CIDInit)
1985 %%BeginResource: CMap (TeX-OT1IT-0)
1986 %%Title: (TeX-OT1IT-0 TeX OT1IT 0)
1987 %%Version: 1.000
1988 %%EndComments
1989 /CIDInit /ProcSet findresource begin
1990 12 dict begin
1991 begincmap
1992 /CIDSystemInfo
1993 << /Registry (TeX)
1994 /Ordering (OT1IT)
1995 /Supplement 0
1996 >> def
1997 /CMapName /TeX-OT1IT-0 def
1998 /CMapType 2 def
1999 1 begincodespacerange
2000 <00> <7F>
2001 endcodespacerange
2002 8 beginbfrange
2003 <00> <01> <0393>
2004 <09> <0A> <03A8>
2005 <25> <26> <0025>
2006 <28> <3B> <0028>
2007 <3F> <5B> <003F>
2008 <5D> <5E> <005D>
2009 <61> <7A> <0061>
2010 <7B> <7C> <2013>
2011 endbfrange
2012 42 beginbfchar
2013 <02> <0398>
2014 <03> <039B>
2015 <04> <039E>
2016 <05> <03A0>
2017 <06> <03A3>
2018 <07> <03D2>
2019 <08> <03A6>
2020 <0B> <00660066>
2021 <0C> <00660069>
2022 <0D> <0066006C>
2023 <0E> <006600660069>
2024 <0F> <00660066006C>
2025 <10> <0131>
2026 <11> <0237>
2027 <12> <0060>
2028 <13> <00B4>
2029 <14> <02C7>
2030 <15> <02D8>
2031 <16> <00AF>
2032 <17> <02DA>
2033 <18> <00B8>
2034 <19> <00DF>
2035 <1A> <00E6>
2036 <1B> <0153>
2037 <1C> <00F8>
2038 <1D> <00C6>
2039 <1E> <0152>
2040 <1F> <00D8>
2041 <21> <0021>
2042 <22> <201D>
2043 <23> <0023>
2044 <24> <00A3>
2045 <27> <2019>
2046 <3C> <00A1>
2047 <3D> <003D>
2048 <3E> <00BF>
2049 <5C> <201C>
2050 <5F> <02D9>
2051 <60> <2018>
2052 <7D> <02DD>
2053 <7E> <007E>
2054 <7F> <00A8>
2055 endbfchar
2056 endcmap
2057 CMapName currentdict /CMap defineresource pop
2058 end
2059 end
2060 %%EndResource
2061 %%EOF
2062 }\endgroup
2063 \expandafter\edef\csname cmapOT1IT\endcsname#1{%
2064 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
2065 }%
2066 %
2067 % \cmapOT1TT
2068 \begingroup
2069 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
2070 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
2071 %%DocumentNeededResources: ProcSet (CIDInit)
2072 %%IncludeResource: ProcSet (CIDInit)
2073 %%BeginResource: CMap (TeX-OT1TT-0)
2074 %%Title: (TeX-OT1TT-0 TeX OT1TT 0)
2075 %%Version: 1.000
2076 %%EndComments
2077 /CIDInit /ProcSet findresource begin
2078 12 dict begin
2079 begincmap
2080 /CIDSystemInfo
2081 << /Registry (TeX)
2082 /Ordering (OT1TT)
2083 /Supplement 0
2084 >> def
2085 /CMapName /TeX-OT1TT-0 def
2086 /CMapType 2 def
2087 1 begincodespacerange
2088 <00> <7F>
2089 endcodespacerange
2090 5 beginbfrange
2091 <00> <01> <0393>
2092 <09> <0A> <03A8>
2093 <21> <26> <0021>
2094 <28> <5F> <0028>
2095 <61> <7E> <0061>
2096 endbfrange
2097 32 beginbfchar
2098 <02> <0398>
2099 <03> <039B>
2100 <04> <039E>
2101 <05> <03A0>
2102 <06> <03A3>
2103 <07> <03D2>
2104 <08> <03A6>
2105 <0B> <2191>
2106 <0C> <2193>
2107 <0D> <0027>
2108 <0E> <00A1>
2109 <0F> <00BF>
2110 <10> <0131>
2111 <11> <0237>
2112 <12> <0060>
2113 <13> <00B4>
2114 <14> <02C7>
2115 <15> <02D8>
2116 <16> <00AF>
2117 <17> <02DA>
2118 <18> <00B8>
2119 <19> <00DF>
2120 <1A> <00E6>
2121 <1B> <0153>
2122 <1C> <00F8>
2123 <1D> <00C6>
2124 <1E> <0152>
2125 <1F> <00D8>
2126 <20> <2423>
2127 <27> <2019>
2128 <60> <2018>
2129 <7F> <00A8>
2130 endbfchar
2131 endcmap
2132 CMapName currentdict /CMap defineresource pop
2133 end
2134 end
2135 %%EndResource
2136 %%EOF
2137 }\endgroup
2138 \expandafter\edef\csname cmapOT1TT\endcsname#1{%
2139 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
2140 }%
2141 \fi\fi
2142
2143
2144 % Set the font macro #1 to the font named \fontprefix#2.
2145 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
2146 % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
2147 % Example:
2148 % #1 = \textrm
2149 % #2 = \rmshape
2150 % #3 = 10
2151 % #4 = \mainmagstep
2152 % #5 = OT1
2153 %
2154 \def\setfont#1#2#3#4#5{%
2155 \font#1=\fontprefix#2#3 scaled #4
2156 \csname cmap#5\endcsname#1%
2157 }
2158 % This is what gets called when #5 of \setfont is empty.
2159 \let\cmap\gobble
2160 %
2161 % (end of cmaps)
2162
2163 % Use cm as the default font prefix.
2164 % To specify the font prefix, you must define \fontprefix
2165 % before you read in texinfo.tex.
2166 \ifx\fontprefix\thisisundefined
2167 \def\fontprefix{cm}
2168 \fi
2169 % Support font families that don't use the same naming scheme as CM.
2170 \def\rmshape{r}
2171 \def\rmbshape{bx} % where the normal face is bold
2172 \def\bfshape{b}
2173 \def\bxshape{bx}
2174 \def\ttshape{tt}
2175 \def\ttbshape{tt}
2176 \def\ttslshape{sltt}
2177 \def\itshape{ti}
2178 \def\itbshape{bxti}
2179 \def\slshape{sl}
2180 \def\slbshape{bxsl}
2181 \def\sfshape{ss}
2182 \def\sfbshape{ss}
2183 \def\scshape{csc}
2184 \def\scbshape{csc}
2185
2186 % Definitions for a main text size of 11pt. (The default in Texinfo.)
2187 %
2188 \def\definetextfontsizexi{%
2189 % Text fonts (11.2pt, magstep1).
2190 \def\textnominalsize{11pt}
2191 \edef\mainmagstep{\magstephalf}
2192 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
2193 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
2194 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
2195 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
2196 \setfont\textsl\slshape{10}{\mainmagstep}{OT1}
2197 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
2198 \setfont\textsc\scshape{10}{\mainmagstep}{OT1}
2199 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
2200 \font\texti=cmmi10 scaled \mainmagstep
2201 \font\textsy=cmsy10 scaled \mainmagstep
2202 \def\textecsize{1095}
2203
2204 % A few fonts for @defun names and args.
2205 \setfont\defbf\bfshape{10}{\magstep1}{OT1}
2206 \setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
2207 \setfont\defsl\slshape{10}{\magstep1}{OT1TT}
2208 \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
2209 \def\df{\let\ttfont=\deftt \let\bffont = \defbf
2210 \let\ttslfont=\defttsl \let\slfont=\defsl \bf}
2211
2212 % Fonts for indices, footnotes, small examples (9pt).
2213 \def\smallnominalsize{9pt}
2214 \setfont\smallrm\rmshape{9}{1000}{OT1}
2215 \setfont\smalltt\ttshape{9}{1000}{OT1TT}
2216 \setfont\smallbf\bfshape{10}{900}{OT1}
2217 \setfont\smallit\itshape{9}{1000}{OT1IT}
2218 \setfont\smallsl\slshape{9}{1000}{OT1}
2219 \setfont\smallsf\sfshape{9}{1000}{OT1}
2220 \setfont\smallsc\scshape{10}{900}{OT1}
2221 \setfont\smallttsl\ttslshape{10}{900}{OT1TT}
2222 \font\smalli=cmmi9
2223 \font\smallsy=cmsy9
2224 \def\smallecsize{0900}
2225
2226 % Fonts for small examples (8pt).
2227 \def\smallernominalsize{8pt}
2228 \setfont\smallerrm\rmshape{8}{1000}{OT1}
2229 \setfont\smallertt\ttshape{8}{1000}{OT1TT}
2230 \setfont\smallerbf\bfshape{10}{800}{OT1}
2231 \setfont\smallerit\itshape{8}{1000}{OT1IT}
2232 \setfont\smallersl\slshape{8}{1000}{OT1}
2233 \setfont\smallersf\sfshape{8}{1000}{OT1}
2234 \setfont\smallersc\scshape{10}{800}{OT1}
2235 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
2236 \font\smalleri=cmmi8
2237 \font\smallersy=cmsy8
2238 \def\smallerecsize{0800}
2239
2240 % Fonts for math mode superscripts (7pt).
2241 \def\sevennominalsize{7pt}
2242 \setfont\sevenrm\rmshape{7}{1000}{OT1}
2243 \setfont\seventt\ttshape{10}{700}{OT1TT}
2244 \setfont\sevenbf\bfshape{10}{700}{OT1}
2245 \setfont\sevenit\itshape{7}{1000}{OT1IT}
2246 \setfont\sevensl\slshape{10}{700}{OT1}
2247 \setfont\sevensf\sfshape{10}{700}{OT1}
2248 \setfont\sevensc\scshape{10}{700}{OT1}
2249 \setfont\seventtsl\ttslshape{10}{700}{OT1TT}
2250 \font\seveni=cmmi7
2251 \font\sevensy=cmsy7
2252 \def\sevenecsize{0700}
2253
2254 % Fonts for title page (20.4pt):
2255 \def\titlenominalsize{20pt}
2256 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
2257 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
2258 \setfont\titlesl\slbshape{10}{\magstep4}{OT1}
2259 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
2260 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
2261 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
2262 \let\titlebf=\titlerm
2263 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
2264 \font\titlei=cmmi12 scaled \magstep3
2265 \font\titlesy=cmsy10 scaled \magstep4
2266 \def\titleecsize{2074}
2267
2268 % Chapter (and unnumbered) fonts (17.28pt).
2269 \def\chapnominalsize{17pt}
2270 \setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
2271 \setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
2272 \setfont\chapsl\slbshape{10}{\magstep3}{OT1}
2273 \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
2274 \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
2275 \setfont\chapsf\sfbshape{17}{1000}{OT1}
2276 \let\chapbf=\chaprm
2277 \setfont\chapsc\scbshape{10}{\magstep3}{OT1}
2278 \font\chapi=cmmi12 scaled \magstep2
2279 \font\chapsy=cmsy10 scaled \magstep3
2280 \def\chapecsize{1728}
2281
2282 % Section fonts (14.4pt).
2283 \def\secnominalsize{14pt}
2284 \setfont\secrm\rmbshape{12}{\magstep1}{OT1}
2285 \setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1}
2286 \setfont\secit\itbshape{10}{\magstep2}{OT1IT}
2287 \setfont\secsl\slbshape{10}{\magstep2}{OT1}
2288 \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
2289 \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
2290 \setfont\secsf\sfbshape{12}{\magstep1}{OT1}
2291 \let\secbf\secrm
2292 \setfont\secsc\scbshape{10}{\magstep2}{OT1}
2293 \font\seci=cmmi12 scaled \magstep1
2294 \font\secsy=cmsy10 scaled \magstep2
2295 \def\sececsize{1440}
2296
2297 % Subsection fonts (13.15pt).
2298 \def\ssecnominalsize{13pt}
2299 \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
2300 \setfont\ssecit\itbshape{10}{1315}{OT1IT}
2301 \setfont\ssecsl\slbshape{10}{1315}{OT1}
2302 \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
2303 \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
2304 \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
2305 \let\ssecbf\ssecrm
2306 \setfont\ssecsc\scbshape{10}{1315}{OT1}
2307 \font\sseci=cmmi12 scaled \magstephalf
2308 \font\ssecsy=cmsy10 scaled 1315
2309 \def\ssececsize{1200}
2310
2311 % Reduced fonts for @acronym in text (10pt).
2312 \def\reducednominalsize{10pt}
2313 \setfont\reducedrm\rmshape{10}{1000}{OT1}
2314 \setfont\reducedtt\ttshape{10}{1000}{OT1TT}
2315 \setfont\reducedbf\bfshape{10}{1000}{OT1}
2316 \setfont\reducedit\itshape{10}{1000}{OT1IT}
2317 \setfont\reducedsl\slshape{10}{1000}{OT1}
2318 \setfont\reducedsf\sfshape{10}{1000}{OT1}
2319 \setfont\reducedsc\scshape{10}{1000}{OT1}
2320 \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
2321 \font\reducedi=cmmi10
2322 \font\reducedsy=cmsy10
2323 \def\reducedecsize{1000}
2324
2325 \textleading = 13.2pt % line spacing for 11pt CM
2326 \textfonts % reset the current fonts
2327 \rm
2328 } % end of 11pt text font size definitions, \definetextfontsizexi
2329
2330
2331 % Definitions to make the main text be 10pt Computer Modern, with
2332 % section, chapter, etc., sizes following suit. This is for the GNU
2333 % Press printing of the Emacs 22 manual. Maybe other manuals in the
2334 % future. Used with @smallbook, which sets the leading to 12pt.
2335 %
2336 \def\definetextfontsizex{%
2337 % Text fonts (10pt).
2338 \def\textnominalsize{10pt}
2339 \edef\mainmagstep{1000}
2340 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
2341 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
2342 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
2343 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
2344 \setfont\textsl\slshape{10}{\mainmagstep}{OT1}
2345 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
2346 \setfont\textsc\scshape{10}{\mainmagstep}{OT1}
2347 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
2348 \font\texti=cmmi10 scaled \mainmagstep
2349 \font\textsy=cmsy10 scaled \mainmagstep
2350 \def\textecsize{1000}
2351
2352 % A few fonts for @defun names and args.
2353 \setfont\defbf\bfshape{10}{\magstephalf}{OT1}
2354 \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
2355 \setfont\defsl\slshape{10}{\magstephalf}{OT1TT}
2356 \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
2357 \def\df{\let\ttfont=\deftt \let\bffont = \defbf
2358 \let\slfont=\defsl \let\ttslfont=\defttsl \bf}
2359
2360 % Fonts for indices, footnotes, small examples (9pt).
2361 \def\smallnominalsize{9pt}
2362 \setfont\smallrm\rmshape{9}{1000}{OT1}
2363 \setfont\smalltt\ttshape{9}{1000}{OT1TT}
2364 \setfont\smallbf\bfshape{10}{900}{OT1}
2365 \setfont\smallit\itshape{9}{1000}{OT1IT}
2366 \setfont\smallsl\slshape{9}{1000}{OT1}
2367 \setfont\smallsf\sfshape{9}{1000}{OT1}
2368 \setfont\smallsc\scshape{10}{900}{OT1}
2369 \setfont\smallttsl\ttslshape{10}{900}{OT1TT}
2370 \font\smalli=cmmi9
2371 \font\smallsy=cmsy9
2372 \def\smallecsize{0900}
2373
2374 % Fonts for small examples (8pt).
2375 \def\smallernominalsize{8pt}
2376 \setfont\smallerrm\rmshape{8}{1000}{OT1}
2377 \setfont\smallertt\ttshape{8}{1000}{OT1TT}
2378 \setfont\smallerbf\bfshape{10}{800}{OT1}
2379 \setfont\smallerit\itshape{8}{1000}{OT1IT}
2380 \setfont\smallersl\slshape{8}{1000}{OT1}
2381 \setfont\smallersf\sfshape{8}{1000}{OT1}
2382 \setfont\smallersc\scshape{10}{800}{OT1}
2383 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
2384 \font\smalleri=cmmi8
2385 \font\smallersy=cmsy8
2386 \def\smallerecsize{0800}
2387
2388 % Fonts for math mode superscripts (7pt).
2389 \def\sevennominalsize{7pt}
2390 \setfont\sevenrm\rmshape{7}{1000}{OT1}
2391 \setfont\seventt\ttshape{10}{700}{OT1TT}
2392 \setfont\sevenbf\bfshape{10}{700}{OT1}
2393 \setfont\sevenit\itshape{7}{1000}{OT1IT}
2394 \setfont\sevensl\slshape{10}{700}{OT1}
2395 \setfont\sevensf\sfshape{10}{700}{OT1}
2396 \setfont\sevensc\scshape{10}{700}{OT1}
2397 \setfont\seventtsl\ttslshape{10}{700}{OT1TT}
2398 \font\seveni=cmmi7
2399 \font\sevensy=cmsy7
2400 \def\sevenecsize{0700}
2401
2402 % Fonts for title page (20.4pt):
2403 \def\titlenominalsize{20pt}
2404 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
2405 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
2406 \setfont\titlesl\slbshape{10}{\magstep4}{OT1}
2407 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
2408 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
2409 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
2410 \let\titlebf=\titlerm
2411 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
2412 \font\titlei=cmmi12 scaled \magstep3
2413 \font\titlesy=cmsy10 scaled \magstep4
2414 \def\titleecsize{2074}
2415
2416 % Chapter fonts (14.4pt).
2417 \def\chapnominalsize{14pt}
2418 \setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
2419 \setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
2420 \setfont\chapsl\slbshape{10}{\magstep2}{OT1}
2421 \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
2422 \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
2423 \setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
2424 \let\chapbf\chaprm
2425 \setfont\chapsc\scbshape{10}{\magstep2}{OT1}
2426 \font\chapi=cmmi12 scaled \magstep1
2427 \font\chapsy=cmsy10 scaled \magstep2
2428 \def\chapecsize{1440}
2429
2430 % Section fonts (12pt).
2431 \def\secnominalsize{12pt}
2432 \setfont\secrm\rmbshape{12}{1000}{OT1}
2433 \setfont\secit\itbshape{10}{\magstep1}{OT1IT}
2434 \setfont\secsl\slbshape{10}{\magstep1}{OT1}
2435 \setfont\sectt\ttbshape{12}{1000}{OT1TT}
2436 \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
2437 \setfont\secsf\sfbshape{12}{1000}{OT1}
2438 \let\secbf\secrm
2439 \setfont\secsc\scbshape{10}{\magstep1}{OT1}
2440 \font\seci=cmmi12
2441 \font\secsy=cmsy10 scaled \magstep1
2442 \def\sececsize{1200}
2443
2444 % Subsection fonts (10pt).
2445 \def\ssecnominalsize{10pt}
2446 \setfont\ssecrm\rmbshape{10}{1000}{OT1}
2447 \setfont\ssecit\itbshape{10}{1000}{OT1IT}
2448 \setfont\ssecsl\slbshape{10}{1000}{OT1}
2449 \setfont\ssectt\ttbshape{10}{1000}{OT1TT}
2450 \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
2451 \setfont\ssecsf\sfbshape{10}{1000}{OT1}
2452 \let\ssecbf\ssecrm
2453 \setfont\ssecsc\scbshape{10}{1000}{OT1}
2454 \font\sseci=cmmi10
2455 \font\ssecsy=cmsy10
2456 \def\ssececsize{1000}
2457
2458 % Reduced fonts for @acronym in text (9pt).
2459 \def\reducednominalsize{9pt}
2460 \setfont\reducedrm\rmshape{9}{1000}{OT1}
2461 \setfont\reducedtt\ttshape{9}{1000}{OT1TT}
2462 \setfont\reducedbf\bfshape{10}{900}{OT1}
2463 \setfont\reducedit\itshape{9}{1000}{OT1IT}
2464 \setfont\reducedsl\slshape{9}{1000}{OT1}
2465 \setfont\reducedsf\sfshape{9}{1000}{OT1}
2466 \setfont\reducedsc\scshape{10}{900}{OT1}
2467 \setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
2468 \font\reducedi=cmmi9
2469 \font\reducedsy=cmsy9
2470 \def\reducedecsize{0900}
2471
2472 \divide\parskip by 2 % reduce space between paragraphs
2473 \textleading = 12pt % line spacing for 10pt CM
2474 \textfonts % reset the current fonts
2475 \rm
2476 } % end of 10pt text font size definitions, \definetextfontsizex
2477
2478 % Fonts for short table of contents.
2479 \setfont\shortcontrm\rmshape{12}{1000}{OT1}
2480 \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
2481 \setfont\shortcontsl\slshape{12}{1000}{OT1}
2482 \setfont\shortconttt\ttshape{12}{1000}{OT1TT}
2483
2484
2485 % We provide the user-level command
2486 % @fonttextsize 10
2487 % (or 11) to redefine the text font size. pt is assumed.
2488 %
2489 \def\xiword{11}
2490 \def\xword{10}
2491 \def\xwordpt{10pt}
2492 %
2493 \parseargdef\fonttextsize{%
2494 \def\textsizearg{#1}%
2495 %\wlog{doing @fonttextsize \textsizearg}%
2496 %
2497 % Set \globaldefs so that documents can use this inside @tex, since
2498 % makeinfo 4.8 does not support it, but we need it nonetheless.
2499 %
2500 \begingroup \globaldefs=1
2501 \ifx\textsizearg\xword \definetextfontsizex
2502 \else \ifx\textsizearg\xiword \definetextfontsizexi
2503 \else
2504 \errhelp=\EMsimple
2505 \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
2506 \fi\fi
2507 \endgroup
2508 }
2509
2510 %
2511 % Change the current font style to #1, remembering it in \curfontstyle.
2512 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
2513 % italics, not bold italics.
2514 %
2515 \def\setfontstyle#1{%
2516 \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
2517 \csname #1font\endcsname % change the current font
2518 }
2519
2520 \def\rm{\fam=0 \setfontstyle{rm}}
2521 \def\it{\fam=\itfam \setfontstyle{it}}
2522 \def\sl{\fam=\slfam \setfontstyle{sl}}
2523 \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
2524 \def\tt{\fam=\ttfam \setfontstyle{tt}}
2525
2526 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
2527 % So we set up a \sf.
2528 \newfam\sffam
2529 \def\sf{\fam=\sffam \setfontstyle{sf}}
2530
2531 % We don't need math for this font style.
2532 \def\ttsl{\setfontstyle{ttsl}}
2533
2534
2535 % In order for the font changes to affect most math symbols and letters,
2536 % we have to define the \textfont of the standard families.
2537 % We don't bother to reset \scriptscriptfont; awaiting user need.
2538 %
2539 \def\resetmathfonts{%
2540 \textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont
2541 \textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont
2542 \textfont\ttfam=\ttfont \textfont\sffam=\sffont
2543 %
2544 % Fonts for superscript. Note that the 7pt fonts are used regardless
2545 % of the current font size.
2546 \scriptfont0=\sevenrm \scriptfont1=\seveni \scriptfont2=\sevensy
2547 \scriptfont\itfam=\sevenit \scriptfont\slfam=\sevensl
2548 \scriptfont\bffam=\sevenbf \scriptfont\ttfam=\seventt
2549 \scriptfont\sffam=\sevensf
2550 }
2551
2552 %
2553
2554 % The font-changing commands (all called \...fonts) redefine the meanings
2555 % of \STYLEfont, instead of just \STYLE. We do this because \STYLE needs
2556 % to also set the current \fam for math mode. Our \STYLE (e.g., \rm)
2557 % commands hardwire \STYLEfont to set the current font.
2558 %
2559 % The fonts used for \ifont are for "math italics" (\itfont is for italics
2560 % in regular text). \syfont is also used in math mode only.
2561 %
2562 % Each font-changing command also sets the names \lsize (one size lower)
2563 % and \lllsize (three sizes lower). These relative commands are used
2564 % in, e.g., the LaTeX logo and acronyms.
2565 %
2566 % This all needs generalizing, badly.
2567 %
2568
2569 \def\assignfonts#1{%
2570 \expandafter\let\expandafter\rmfont\csname #1rm\endcsname
2571 \expandafter\let\expandafter\itfont\csname #1it\endcsname
2572 \expandafter\let\expandafter\slfont\csname #1sl\endcsname
2573 \expandafter\let\expandafter\bffont\csname #1bf\endcsname
2574 \expandafter\let\expandafter\ttfont\csname #1tt\endcsname
2575 \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname
2576 \expandafter\let\expandafter\sffont \csname #1sf\endcsname
2577 \expandafter\let\expandafter\ifont \csname #1i\endcsname
2578 \expandafter\let\expandafter\syfont \csname #1sy\endcsname
2579 \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname
2580 }
2581
2582 \newif\ifrmisbold
2583
2584 % Select smaller font size with the current style. Used to change font size
2585 % in, e.g., the LaTeX logo and acronyms. If we are using bold fonts for
2586 % normal roman text, also use bold fonts for roman text in the smaller size.
2587 \def\switchtolllsize{%
2588 \expandafter\assignfonts\expandafter{\lllsize}%
2589 \ifrmisbold
2590 \let\rmfont\bffont
2591 \fi
2592 \csname\curfontstyle\endcsname
2593 }%
2594
2595 \def\switchtolsize{%
2596 \expandafter\assignfonts\expandafter{\lsize}%
2597 \ifrmisbold
2598 \let\rmfont\bffont
2599 \fi
2600 \csname\curfontstyle\endcsname
2601 }%
2602
2603 \def\definefontsetatsize#1#2#3#4#5{%
2604 \expandafter\def\csname #1fonts\endcsname{%
2605 \def\curfontsize{#1}%
2606 \def\lsize{#2}\def\lllsize{#3}%
2607 \csname rmisbold#5\endcsname
2608 \assignfonts{#1}%
2609 \resetmathfonts
2610 \setleading{#4}%
2611 }}
2612
2613 \definefontsetatsize{text} {reduced}{smaller}{\textleading}{false}
2614 \definefontsetatsize{title} {chap} {subsec} {27pt} {true}
2615 \definefontsetatsize{chap} {sec} {text} {19pt} {true}
2616 \definefontsetatsize{sec} {subsec} {reduced}{17pt} {true}
2617 \definefontsetatsize{ssec} {text} {small} {15pt} {true}
2618 \definefontsetatsize{reduced}{small} {smaller}{10.5pt}{false}
2619 \definefontsetatsize{small} {smaller}{smaller}{10.5pt}{false}
2620 \definefontsetatsize{smaller}{smaller}{smaller}{9.5pt} {false}
2621
2622 \def\titlefont#1{{\titlefonts\rm #1}}
2623 \let\subsecfonts = \ssecfonts
2624 \let\subsubsecfonts = \ssecfonts
2625
2626 % Define these just so they can be easily changed for other fonts.
2627 \def\angleleft{$\langle$}
2628 \def\angleright{$\rangle$}
2629
2630 % Set the fonts to use with the @small... environments.
2631 \let\smallexamplefonts = \smallfonts
2632
2633 % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
2634 % can fit this many characters:
2635 % 8.5x11=86 smallbook=72 a4=90 a5=69
2636 % If we use \scriptfonts (8pt), then we can fit this many characters:
2637 % 8.5x11=90+ smallbook=80 a4=90+ a5=77
2638 % For me, subjectively, the few extra characters that fit aren't worth
2639 % the additional smallness of 8pt. So I'm making the default 9pt.
2640 %
2641 % By the way, for comparison, here's what fits with @example (10pt):
2642 % 8.5x11=71 smallbook=60 a4=75 a5=58
2643 % --karl, 24jan03.
2644
2645 % Set up the default fonts, so we can use them for creating boxes.
2646 %
2647 \definetextfontsizexi
2648
2649
2650 \message{markup,}
2651
2652 % Check if we are currently using a typewriter font. Since all the
2653 % Computer Modern typewriter fonts have zero interword stretch (and
2654 % shrink), and it is reasonable to expect all typewriter fonts to have
2655 % this property, we can check that font parameter.
2656 %
2657 \def\ifmonospace{\ifdim\fontdimen3\font=0pt }
2658
2659 % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
2660 % define and register \INITMACRO to be called on markup style changes.
2661 % \INITMACRO can check \currentmarkupstyle for the innermost
2662 % style.
2663
2664 \let\currentmarkupstyle\empty
2665
2666 \def\setupmarkupstyle#1{%
2667 \def\currentmarkupstyle{#1}%
2668 \markupstylesetup
2669 }
2670
2671 \let\markupstylesetup\empty
2672
2673 \def\defmarkupstylesetup#1{%
2674 \expandafter\def\expandafter\markupstylesetup
2675 \expandafter{\markupstylesetup #1}%
2676 \def#1%
2677 }
2678
2679 % Markup style setup for left and right quotes.
2680 \defmarkupstylesetup\markupsetuplq{%
2681 \expandafter\let\expandafter \temp
2682 \csname markupsetuplq\currentmarkupstyle\endcsname
2683 \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
2684 }
2685
2686 \defmarkupstylesetup\markupsetuprq{%
2687 \expandafter\let\expandafter \temp
2688 \csname markupsetuprq\currentmarkupstyle\endcsname
2689 \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
2690 }
2691
2692 {
2693 \catcode`\'=\active
2694 \catcode`\`=\active
2695
2696 \gdef\markupsetuplqdefault{\let`\lq}
2697 \gdef\markupsetuprqdefault{\let'\rq}
2698
2699 \gdef\markupsetcodequoteleft{\let`\codequoteleft}
2700 \gdef\markupsetcodequoteright{\let'\codequoteright}
2701 }
2702
2703 \let\markupsetuplqcode \markupsetcodequoteleft
2704 \let\markupsetuprqcode \markupsetcodequoteright
2705 %
2706 \let\markupsetuplqexample \markupsetcodequoteleft
2707 \let\markupsetuprqexample \markupsetcodequoteright
2708 %
2709 \let\markupsetuplqkbd \markupsetcodequoteleft
2710 \let\markupsetuprqkbd \markupsetcodequoteright
2711 %
2712 \let\markupsetuplqsamp \markupsetcodequoteleft
2713 \let\markupsetuprqsamp \markupsetcodequoteright
2714 %
2715 \let\markupsetuplqverb \markupsetcodequoteleft
2716 \let\markupsetuprqverb \markupsetcodequoteright
2717 %
2718 \let\markupsetuplqverbatim \markupsetcodequoteleft
2719 \let\markupsetuprqverbatim \markupsetcodequoteright
2720
2721 % Allow an option to not use regular directed right quote/apostrophe
2722 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
2723 % The undirected quote is ugly, so don't make it the default, but it
2724 % works for pasting with more pdf viewers (at least evince), the
2725 % lilypond developers report. xpdf does work with the regular 0x27.
2726 %
2727 \def\codequoteright{%
2728 \ifmonospace
2729 \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
2730 \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
2731 '%
2732 \else \char'15 \fi
2733 \else \char'15 \fi
2734 \else
2735 '%
2736 \fi
2737 }
2738 %
2739 % and a similar option for the left quote char vs. a grave accent.
2740 % Modern fonts display ASCII 0x60 as a grave accent, so some people like
2741 % the code environments to do likewise.
2742 %
2743 \def\codequoteleft{%
2744 \ifmonospace
2745 \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
2746 \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
2747 % [Knuth] pp. 380,381,391
2748 % \relax disables Spanish ligatures ?` and !` of \tt font.
2749 \relax`%
2750 \else \char'22 \fi
2751 \else \char'22 \fi
2752 \else
2753 \relax`%
2754 \fi
2755 }
2756
2757 % Commands to set the quote options.
2758 %
2759 \parseargdef\codequoteundirected{%
2760 \def\temp{#1}%
2761 \ifx\temp\onword
2762 \expandafter\let\csname SETtxicodequoteundirected\endcsname
2763 = t%
2764 \else\ifx\temp\offword
2765 \expandafter\let\csname SETtxicodequoteundirected\endcsname
2766 = \relax
2767 \else
2768 \errhelp = \EMsimple
2769 \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
2770 \fi\fi
2771 }
2772 %
2773 \parseargdef\codequotebacktick{%
2774 \def\temp{#1}%
2775 \ifx\temp\onword
2776 \expandafter\let\csname SETtxicodequotebacktick\endcsname
2777 = t%
2778 \else\ifx\temp\offword
2779 \expandafter\let\csname SETtxicodequotebacktick\endcsname
2780 = \relax
2781 \else
2782 \errhelp = \EMsimple
2783 \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
2784 \fi\fi
2785 }
2786
2787 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
2788 \def\noligaturesquoteleft{\relax\lq}
2789
2790 % Count depth in font-changes, for error checks
2791 \newcount\fontdepth \fontdepth=0
2792
2793 % Font commands.
2794
2795 % #1 is the font command (\sl or \it), #2 is the text to slant.
2796 % If we are in a monospaced environment, however, 1) always use \ttsl,
2797 % and 2) do not add an italic correction.
2798 \def\dosmartslant#1#2{%
2799 \ifusingtt
2800 {{\ttsl #2}\let\next=\relax}%
2801 {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
2802 \next
2803 }
2804 \def\smartslanted{\dosmartslant\sl}
2805 \def\smartitalic{\dosmartslant\it}
2806
2807 % Output an italic correction unless \next (presumed to be the following
2808 % character) is such as not to need one.
2809 \def\smartitaliccorrection{%
2810 \ifx\next,%
2811 \else\ifx\next-%
2812 \else\ifx\next.%
2813 \else\ifx\next\.%
2814 \else\ifx\next\comma%
2815 \else\ptexslash
2816 \fi\fi\fi\fi\fi
2817 \aftersmartic
2818 }
2819
2820 % Unconditional use \ttsl, and no ic. @var is set to this for defuns.
2821 \def\ttslanted#1{{\ttsl #1}}
2822
2823 % @cite is like \smartslanted except unconditionally use \sl. We never want
2824 % ttsl for book titles, do we?
2825 \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
2826
2827 \def\aftersmartic{}
2828 \def\var#1{%
2829 \let\saveaftersmartic = \aftersmartic
2830 \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
2831 \smartslanted{#1}%
2832 }
2833
2834 \let\i=\smartitalic
2835 \let\slanted=\smartslanted
2836 \let\dfn=\smartslanted
2837 \let\emph=\smartitalic
2838
2839 % Explicit font changes: @r, @sc, undocumented @ii.
2840 \def\r#1{{\rm #1}} % roman font
2841 \def\sc#1{{\smallcaps#1}} % smallcaps font
2842 \def\ii#1{{\it #1}} % italic font
2843
2844 % @b, explicit bold. Also @strong.
2845 \def\b#1{{\bf #1}}
2846 \let\strong=\b
2847
2848 % @sansserif, explicit sans.
2849 \def\sansserif#1{{\sf #1}}
2850
2851 % We can't just use \exhyphenpenalty, because that only has effect at
2852 % the end of a paragraph. Restore normal hyphenation at the end of the
2853 % group within which \nohyphenation is presumably called.
2854 %
2855 \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
2856 \def\restorehyphenation{\hyphenchar\font = `- }
2857
2858 % Set sfcode to normal for the chars that usually have another value.
2859 % Can't use plain's \frenchspacing because it uses the `\x notation, and
2860 % sometimes \x has an active definition that messes things up.
2861 %
2862 \catcode`@=11
2863 \def\plainfrenchspacing{%
2864 \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
2865 \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
2866 \def\endofsentencespacefactor{1000}% for @. and friends
2867 }
2868 \def\plainnonfrenchspacing{%
2869 \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
2870 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
2871 \def\endofsentencespacefactor{3000}% for @. and friends
2872 }
2873 \catcode`@=\other
2874 \def\endofsentencespacefactor{3000}% default
2875
2876 % @t, explicit typewriter.
2877 \def\t#1{%
2878 {\tt \rawbackslash \plainfrenchspacing #1}%
2879 \null
2880 }
2881
2882 % @samp.
2883 \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
2884
2885 % @indicateurl is \samp, that is, with quotes.
2886 \let\indicateurl=\samp
2887
2888 % @code (and similar) prints in typewriter, but with spaces the same
2889 % size as normal in the surrounding text, without hyphenation, etc.
2890 % This is a subroutine for that.
2891 \def\tclose#1{%
2892 {%
2893 % Change normal interword space to be same as for the current font.
2894 \spaceskip = \fontdimen2\font
2895 %
2896 % Switch to typewriter.
2897 \tt
2898 %
2899 % But `\ ' produces the large typewriter interword space.
2900 \def\ {{\spaceskip = 0pt{} }}%
2901 %
2902 % Turn off hyphenation.
2903 \nohyphenation
2904 %
2905 \rawbackslash
2906 \plainfrenchspacing
2907 #1%
2908 }%
2909 \null % reset spacefactor to 1000
2910 }
2911
2912 % We *must* turn on hyphenation at `-' and `_' in @code.
2913 % (But see \codedashfinish below.)
2914 % Otherwise, it is too hard to avoid overfull hboxes
2915 % in the Emacs manual, the Library manual, etc.
2916 %
2917 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
2918 % both hyphenation at - and hyphenation within words.
2919 % We must therefore turn them both off (\tclose does that)
2920 % and arrange explicitly to hyphenate at a dash. -- rms.
2921 {
2922 \catcode`\-=\active \catcode`\_=\active
2923 \catcode`\'=\active \catcode`\`=\active
2924 \global\let'=\rq \global\let`=\lq % default definitions
2925 %
2926 \global\def\code{\begingroup
2927 \setupmarkupstyle{code}%
2928 % The following should really be moved into \setupmarkupstyle handlers.
2929 \catcode\dashChar=\active \catcode\underChar=\active
2930 \ifallowcodebreaks
2931 \let-\codedash
2932 \let_\codeunder
2933 \else
2934 \let-\normaldash
2935 \let_\realunder
2936 \fi
2937 % Given -foo (with a single dash), we do not want to allow a break
2938 % after the hyphen.
2939 \global\let\codedashprev=\codedash
2940 %
2941 \codex
2942 }
2943 %
2944 \gdef\codedash{\futurelet\next\codedashfinish}
2945 \gdef\codedashfinish{%
2946 \normaldash % always output the dash character itself.
2947 %
2948 % Now, output a discretionary to allow a line break, unless
2949 % (a) the next character is a -, or
2950 % (b) the preceding character is a -.
2951 % E.g., given --posix, we do not want to allow a break after either -.
2952 % Given --foo-bar, we do want to allow a break between the - and the b.
2953 \ifx\next\codedash \else
2954 \ifx\codedashprev\codedash
2955 \else \discretionary{}{}{}\fi
2956 \fi
2957 % we need the space after the = for the case when \next itself is a
2958 % space token; it would get swallowed otherwise. As in @code{- a}.
2959 \global\let\codedashprev= \next
2960 }
2961 }
2962 \def\normaldash{-}
2963 %
2964 \def\codex #1{\tclose{#1}\endgroup}
2965
2966 \def\codeunder{%
2967 % this is all so @math{@code{var_name}+1} can work. In math mode, _
2968 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
2969 % will therefore expand the active definition of _, which is us
2970 % (inside @code that is), therefore an endless loop.
2971 \ifusingtt{\ifmmode
2972 \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
2973 \else\normalunderscore \fi
2974 \discretionary{}{}{}}%
2975 {\_}%
2976 }
2977
2978 % An additional complication: the above will allow breaks after, e.g.,
2979 % each of the four underscores in __typeof__. This is bad.
2980 % @allowcodebreaks provides a document-level way to turn breaking at -
2981 % and _ on and off.
2982 %
2983 \newif\ifallowcodebreaks \allowcodebreakstrue
2984
2985 \def\keywordtrue{true}
2986 \def\keywordfalse{false}
2987
2988 \parseargdef\allowcodebreaks{%
2989 \def\txiarg{#1}%
2990 \ifx\txiarg\keywordtrue
2991 \allowcodebreakstrue
2992 \else\ifx\txiarg\keywordfalse
2993 \allowcodebreaksfalse
2994 \else
2995 \errhelp = \EMsimple
2996 \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
2997 \fi\fi
2998 }
2999
3000 % For @command, @env, @file, @option quotes seem unnecessary,
3001 % so use \code rather than \samp.
3002 \let\command=\code
3003 \let\env=\code
3004 \let\file=\code
3005 \let\option=\code
3006
3007 % @uref (abbreviation for `urlref') aka @url takes an optional
3008 % (comma-separated) second argument specifying the text to display and
3009 % an optional third arg as text to display instead of (rather than in
3010 % addition to) the url itself. First (mandatory) arg is the url.
3011
3012 % TeX-only option to allow changing PDF output to show only the second
3013 % arg (if given), and not the url (which is then just the link target).
3014 \newif\ifurefurlonlylink
3015
3016 % The main macro is \urefbreak, which allows breaking at expected
3017 % places within the url. (There used to be another version, which
3018 % didn't support automatic breaking.)
3019 \def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
3020 \let\uref=\urefbreak
3021 %
3022 \def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
3023 \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
3024 \unsepspaces
3025 \pdfurl{#1}%
3026 \setbox0 = \hbox{\ignorespaces #3}%
3027 \ifdim\wd0 > 0pt
3028 \unhbox0 % third arg given, show only that
3029 \else
3030 \setbox0 = \hbox{\ignorespaces #2}% look for second arg
3031 \ifdim\wd0 > 0pt
3032 \ifpdf
3033 % For pdfTeX and LuaTeX
3034 \ifurefurlonlylink
3035 % PDF plus option to not display url, show just arg
3036 \unhbox0
3037 \else
3038 % PDF, normally display both arg and url for consistency,
3039 % visibility, if the pdf is eventually used to print, etc.
3040 \unhbox0\ (\urefcode{#1})%
3041 \fi
3042 \else
3043 \ifx\XeTeXrevision\thisisundefined
3044 \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
3045 \else
3046 % For XeTeX
3047 \ifurefurlonlylink
3048 % PDF plus option to not display url, show just arg
3049 \unhbox0
3050 \else
3051 % PDF, normally display both arg and url for consistency,
3052 % visibility, if the pdf is eventually used to print, etc.
3053 \unhbox0\ (\urefcode{#1})%
3054 \fi
3055 \fi
3056 \fi
3057 \else
3058 \urefcode{#1}% only url given, so show it
3059 \fi
3060 \fi
3061 \endlink
3062 \endgroup}
3063
3064 % Allow line breaks around only a few characters (only).
3065 \def\urefcatcodes{%
3066 \catcode`\&=\active \catcode`\.=\active
3067 \catcode`\#=\active \catcode`\?=\active
3068 \catcode`\/=\active
3069 }
3070 {
3071 \urefcatcodes
3072 %
3073 \global\def\urefcode{\begingroup
3074 \setupmarkupstyle{code}%
3075 \urefcatcodes
3076 \let&\urefcodeamp
3077 \let.\urefcodedot
3078 \let#\urefcodehash
3079 \let?\urefcodequest
3080 \let/\urefcodeslash
3081 \codex
3082 }
3083 %
3084 % By default, they are just regular characters.
3085 \global\def&{\normalamp}
3086 \global\def.{\normaldot}
3087 \global\def#{\normalhash}
3088 \global\def?{\normalquest}
3089 \global\def/{\normalslash}
3090 }
3091
3092 % we put a little stretch before and after the breakable chars, to help
3093 % line breaking of long url's. The unequal skips make look better in
3094 % cmtt at least, especially for dots.
3095 \def\urefprestretchamount{.13em}
3096 \def\urefpoststretchamount{.1em}
3097 \def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax}
3098 \def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax}
3099 %
3100 \def\urefcodeamp{\urefprestretch \&\urefpoststretch}
3101 \def\urefcodedot{\urefprestretch .\urefpoststretch}
3102 \def\urefcodehash{\urefprestretch \#\urefpoststretch}
3103 \def\urefcodequest{\urefprestretch ?\urefpoststretch}
3104 \def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
3105 {
3106 \catcode`\/=\active
3107 \global\def\urefcodeslashfinish{%
3108 \urefprestretch \slashChar
3109 % Allow line break only after the final / in a sequence of
3110 % slashes, to avoid line break between the slashes in http://.
3111 \ifx\next/\else \urefpoststretch \fi
3112 }
3113 }
3114
3115 % One more complication: by default we'll break after the special
3116 % characters, but some people like to break before the special chars, so
3117 % allow that. Also allow no breaking at all, for manual control.
3118 %
3119 \parseargdef\urefbreakstyle{%
3120 \def\txiarg{#1}%
3121 \ifx\txiarg\wordnone
3122 \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
3123 \else\ifx\txiarg\wordbefore
3124 \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
3125 \else\ifx\txiarg\wordafter
3126 \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
3127 \else
3128 \errhelp = \EMsimple
3129 \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
3130 \fi\fi\fi
3131 }
3132 \def\wordafter{after}
3133 \def\wordbefore{before}
3134 \def\wordnone{none}
3135
3136 \urefbreakstyle after
3137
3138 % @url synonym for @uref, since that's how everyone uses it.
3139 %
3140 \let\url=\uref
3141
3142 % rms does not like angle brackets --karl, 17may97.
3143 % So now @email is just like @uref, unless we are pdf.
3144 %
3145 %\def\email#1{\angleleft{\tt #1}\angleright}
3146 \ifpdf
3147 \def\email#1{\doemail#1,,\finish}
3148 \def\doemail#1,#2,#3\finish{\begingroup
3149 \unsepspaces
3150 \pdfurl{mailto:#1}%
3151 \setbox0 = \hbox{\ignorespaces #2}%
3152 \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
3153 \endlink
3154 \endgroup}
3155 \else
3156 \ifx\XeTeXrevision\thisisundefined
3157 \let\email=\uref
3158 \else
3159 \def\email#1{\doemail#1,,\finish}
3160 \def\doemail#1,#2,#3\finish{\begingroup
3161 \unsepspaces
3162 \pdfurl{mailto:#1}%
3163 \setbox0 = \hbox{\ignorespaces #2}%
3164 \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
3165 \endlink
3166 \endgroup}
3167 \fi
3168 \fi
3169
3170 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
3171 % `example' (@kbd uses ttsl only inside of @example and friends),
3172 % or `code' (@kbd uses normal tty font always).
3173 \parseargdef\kbdinputstyle{%
3174 \def\txiarg{#1}%
3175 \ifx\txiarg\worddistinct
3176 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
3177 \else\ifx\txiarg\wordexample
3178 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
3179 \else\ifx\txiarg\wordcode
3180 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
3181 \else
3182 \errhelp = \EMsimple
3183 \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
3184 \fi\fi\fi
3185 }
3186 \def\worddistinct{distinct}
3187 \def\wordexample{example}
3188 \def\wordcode{code}
3189
3190 % Default is `distinct'.
3191 \kbdinputstyle distinct
3192
3193 % @kbd is like @code, except that if the argument is just one @key command,
3194 % then @kbd has no effect.
3195 \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
3196
3197 \def\xkey{\key}
3198 \def\kbdsub#1#2#3\par{%
3199 \def\one{#1}\def\three{#3}\def\threex{??}%
3200 \ifx\one\xkey\ifx\threex\three \key{#2}%
3201 \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
3202 \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
3203 }
3204
3205 % definition of @key that produces a lozenge. Doesn't adjust to text size.
3206 %\setfont\keyrm\rmshape{8}{1000}{OT1}
3207 %\font\keysy=cmsy9
3208 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
3209 % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
3210 % \vbox{\hrule\kern-0.4pt
3211 % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
3212 % \kern-0.4pt\hrule}%
3213 % \kern-.06em\raise0.4pt\hbox{\angleright}}}}
3214
3215 % definition of @key with no lozenge. If the current font is already
3216 % monospace, don't change it; that way, we respect @kbdinputstyle. But
3217 % if it isn't monospace, then use \tt.
3218 %
3219 \def\key#1{{\setupmarkupstyle{key}%
3220 \nohyphenation
3221 \ifmonospace\else\tt\fi
3222 #1}\null}
3223
3224 % @clicksequence{File @click{} Open ...}
3225 \def\clicksequence#1{\begingroup #1\endgroup}
3226
3227 % @clickstyle @arrow (by default)
3228 \parseargdef\clickstyle{\def\click{#1}}
3229 \def\click{\arrow}
3230
3231 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
3232 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
3233 %
3234 \def\dmn#1{\thinspace #1}
3235
3236 % @acronym for "FBI", "NATO", and the like.
3237 % We print this one point size smaller, since it's intended for
3238 % all-uppercase.
3239 %
3240 \def\acronym#1{\doacronym #1,,\finish}
3241 \def\doacronym#1,#2,#3\finish{%
3242 {\switchtolsize #1}%
3243 \def\temp{#2}%
3244 \ifx\temp\empty \else
3245 \space ({\unsepspaces \ignorespaces \temp \unskip})%
3246 \fi
3247 \null % reset \spacefactor=1000
3248 }
3249
3250 % @abbr for "Comput. J." and the like.
3251 % No font change, but don't do end-of-sentence spacing.
3252 %
3253 \def\abbr#1{\doabbr #1,,\finish}
3254 \def\doabbr#1,#2,#3\finish{%
3255 {\plainfrenchspacing #1}%
3256 \def\temp{#2}%
3257 \ifx\temp\empty \else
3258 \space ({\unsepspaces \ignorespaces \temp \unskip})%
3259 \fi
3260 \null % reset \spacefactor=1000
3261 }
3262
3263 % @asis just yields its argument. Used with @table, for example.
3264 %
3265 \def\asis#1{#1}
3266
3267 % @math outputs its argument in math mode.
3268 %
3269 % One complication: _ usually means subscripts, but it could also mean
3270 % an actual _ character, as in @math{@var{some_variable} + 1}. So make
3271 % _ active, and distinguish by seeing if the current family is \slfam,
3272 % which is what @var uses.
3273 {
3274 \catcode`\_ = \active
3275 \gdef\mathunderscore{%
3276 \catcode`\_=\active
3277 \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
3278 }
3279 }
3280 % Another complication: we want \\ (and @\) to output a math (or tt) \.
3281 % FYI, plain.tex uses \\ as a temporary control sequence (for no
3282 % particular reason), but this is not advertised and we don't care.
3283 %
3284 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
3285 \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
3286 %
3287 \def\math{%
3288 \ifmmode\else % only go into math if not in math mode already
3289 \tex
3290 \mathunderscore
3291 \let\\ = \mathbackslash
3292 \mathactive
3293 % make the texinfo accent commands work in math mode
3294 \let\"=\ddot
3295 \let\'=\acute
3296 \let\==\bar
3297 \let\^=\hat
3298 \let\`=\grave
3299 \let\u=\breve
3300 \let\v=\check
3301 \let\~=\tilde
3302 \let\dotaccent=\dot
3303 % have to provide another name for sup operator
3304 \let\mathopsup=\sup
3305 $\expandafter\finishmath\fi
3306 }
3307 \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
3308
3309 % Some active characters (such as <) are spaced differently in math.
3310 % We have to reset their definitions in case the @math was an argument
3311 % to a command which sets the catcodes (such as @item or @section).
3312 %
3313 {
3314 \catcode`^ = \active
3315 \catcode`< = \active
3316 \catcode`> = \active
3317 \catcode`+ = \active
3318 \catcode`' = \active
3319 \gdef\mathactive{%
3320 \let^ = \ptexhat
3321 \let< = \ptexless
3322 \let> = \ptexgtr
3323 \let+ = \ptexplus
3324 \let' = \ptexquoteright
3325 }
3326 }
3327
3328 % for @sub and @sup, if in math mode, just do a normal sub/superscript.
3329 % If in text, use math to place as sub/superscript, but switch
3330 % into text mode, with smaller fonts. This is a different font than the
3331 % one used for real math sub/superscripts (8pt vs. 7pt), but let's not
3332 % fix it (significant additions to font machinery) until someone notices.
3333 %
3334 \def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
3335 \def\finishsub#1{$\sb{\hbox{\switchtolllsize #1}}$}%
3336 %
3337 \def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
3338 \def\finishsup#1{$\ptexsp{\hbox{\switchtolllsize #1}}$}%
3339
3340 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
3341 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
3342 % except specified as a normal braced arg, so no newlines to worry about.
3343 %
3344 \def\outfmtnametex{tex}
3345 %
3346 \long\def\inlinefmt#1{\doinlinefmt #1,\finish}
3347 \long\def\doinlinefmt#1,#2,\finish{%
3348 \def\inlinefmtname{#1}%
3349 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
3350 }
3351 %
3352 % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
3353 % FMTNAME is tex, else ELSE-TEXT.
3354 \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
3355 \long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{%
3356 \def\inlinefmtname{#1}%
3357 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
3358 }
3359 %
3360 % For raw, must switch into @tex before parsing the argument, to avoid
3361 % setting catcodes prematurely. Doing it this way means that, for
3362 % example, @inlineraw{html, foo{bar} gets a parse error instead of being
3363 % ignored. But this isn't important because if people want a literal
3364 % *right* brace they would have to use a command anyway, so they may as
3365 % well use a command to get a left brace too. We could re-use the
3366 % delimiter character idea from \verb, but it seems like overkill.
3367 %
3368 \long\def\inlineraw{\tex \doinlineraw}
3369 \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
3370 \def\doinlinerawtwo#1,#2,\finish{%
3371 \def\inlinerawname{#1}%
3372 \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
3373 \endgroup % close group opened by \tex.
3374 }
3375
3376 % @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
3377 %
3378 \long\def\inlineifset#1{\doinlineifset #1,\finish}
3379 \long\def\doinlineifset#1,#2,\finish{%
3380 \def\inlinevarname{#1}%
3381 \expandafter\ifx\csname SET\inlinevarname\endcsname\relax
3382 \else\ignorespaces#2\fi
3383 }
3384
3385 % @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
3386 %
3387 \long\def\inlineifclear#1{\doinlineifclear #1,\finish}
3388 \long\def\doinlineifclear#1,#2,\finish{%
3389 \def\inlinevarname{#1}%
3390 \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi
3391 }
3392
3393
3394 \message{glyphs,}
3395 % and logos.
3396
3397 % @@ prints an @, as does @atchar{}.
3398 \def\@{\char64 }
3399 \let\atchar=\@
3400
3401 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
3402 \def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
3403 \def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
3404 \let\{=\lbracechar
3405 \let\}=\rbracechar
3406
3407 % @comma{} to avoid , parsing problems.
3408 \let\comma = ,
3409
3410 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
3411 % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
3412 \let\, = \ptexc
3413 \let\dotaccent = \ptexdot
3414 \def\ringaccent#1{{\accent23 #1}}
3415 \let\tieaccent = \ptext
3416 \let\ubaraccent = \ptexb
3417 \let\udotaccent = \d
3418
3419 % Other special characters: @questiondown @exclamdown @ordf @ordm
3420 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
3421 \def\questiondown{?`}
3422 \def\exclamdown{!`}
3423 \def\ordf{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{a}}}
3424 \def\ordm{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{o}}}
3425
3426 % Dotless i and dotless j, used for accents.
3427 \def\imacro{i}
3428 \def\jmacro{j}
3429 \def\dotless#1{%
3430 \def\temp{#1}%
3431 \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
3432 \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
3433 \else \errmessage{@dotless can be used only with i or j}%
3434 \fi\fi
3435 }
3436
3437 % The \TeX{} logo, as in plain, but resetting the spacing so that a
3438 % period following counts as ending a sentence. (Idea found in latex.)
3439 %
3440 \edef\TeX{\TeX \spacefactor=1000 }
3441
3442 % @LaTeX{} logo. Not quite the same results as the definition in
3443 % latex.ltx, since we use a different font for the raised A; it's most
3444 % convenient for us to use an explicitly smaller font, rather than using
3445 % the \scriptstyle font (since we don't reset \scriptstyle and
3446 % \scriptscriptstyle).
3447 %
3448 \def\LaTeX{%
3449 L\kern-.36em
3450 {\setbox0=\hbox{T}%
3451 \vbox to \ht0{\hbox{%
3452 \ifx\textnominalsize\xwordpt
3453 % for 10pt running text, lllsize (8pt) is too small for the A in LaTeX.
3454 % Revert to plain's \scriptsize, which is 7pt.
3455 \count255=\the\fam $\fam\count255 \scriptstyle A$%
3456 \else
3457 % For 11pt, we can use our lllsize.
3458 \switchtolllsize A%
3459 \fi
3460 }%
3461 \vss
3462 }}%
3463 \kern-.15em
3464 \TeX
3465 }
3466
3467 % Some math mode symbols. Define \ensuremath to switch into math mode
3468 % unless we are already there. Expansion tricks may not be needed here,
3469 % but safer, and can't hurt.
3470 \def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi}
3471 \def\ensuredmath#1{$\relax#1$}
3472 %
3473 \def\bullet{\ensuremath\ptexbullet}
3474 \def\geq{\ensuremath\ge}
3475 \def\leq{\ensuremath\le}
3476 \def\minus{\ensuremath-}
3477
3478 % @dots{} outputs an ellipsis using the current font.
3479 % We do .5em per period so that it has the same spacing in the cm
3480 % typewriter fonts as three actual period characters; on the other hand,
3481 % in other typewriter fonts three periods are wider than 1.5em. So do
3482 % whichever is larger.
3483 %
3484 \def\dots{%
3485 \leavevmode
3486 \setbox0=\hbox{...}% get width of three periods
3487 \ifdim\wd0 > 1.5em
3488 \dimen0 = \wd0
3489 \else
3490 \dimen0 = 1.5em
3491 \fi
3492 \hbox to \dimen0{%
3493 \hskip 0pt plus.25fil
3494 .\hskip 0pt plus1fil
3495 .\hskip 0pt plus1fil
3496 .\hskip 0pt plus.5fil
3497 }%
3498 }
3499
3500 % @enddots{} is an end-of-sentence ellipsis.
3501 %
3502 \def\enddots{%
3503 \dots
3504 \spacefactor=\endofsentencespacefactor
3505 }
3506
3507 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
3508 %
3509 % Since these characters are used in examples, they should be an even number of
3510 % \tt widths. Each \tt character is 1en, so two makes it 1em.
3511 %
3512 \def\point{$\star$}
3513 \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
3514 \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
3515 \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
3516 \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
3517 \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
3518
3519 % The @error{} command.
3520 % Adapted from the TeXbook's \boxit.
3521 %
3522 \newbox\errorbox
3523 %
3524 {\ttfont \global\dimen0 = 3em}% Width of the box.
3525 \dimen2 = .55pt % Thickness of rules
3526 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
3527 \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
3528 %
3529 \setbox\errorbox=\hbox to \dimen0{\hfil
3530 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
3531 \advance\hsize by -2\dimen2 % Rules.
3532 \vbox{%
3533 \hrule height\dimen2
3534 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
3535 \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
3536 \kern3pt\vrule width\dimen2}% Space to right.
3537 \hrule height\dimen2}
3538 \hfil}
3539 %
3540 \def\error{\leavevmode\lower.7ex\copy\errorbox}
3541
3542 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
3543 %
3544 \def\pounds{{\it\$}}
3545
3546 % @euro{} comes from a separate font, depending on the current style.
3547 % We use the free feym* fonts from the eurosym package by Henrik
3548 % Theiling, which support regular, slanted, bold and bold slanted (and
3549 % "outlined" (blackboard board, sort of) versions, which we don't need).
3550 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
3551 %
3552 % Although only regular is the truly official Euro symbol, we ignore
3553 % that. The Euro is designed to be slightly taller than the regular
3554 % font height.
3555 %
3556 % feymr - regular
3557 % feymo - slanted
3558 % feybr - bold
3559 % feybo - bold slanted
3560 %
3561 % There is no good (free) typewriter version, to my knowledge.
3562 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
3563 % Hmm.
3564 %
3565 % Also doesn't work in math. Do we need to do math with euro symbols?
3566 % Hope not.
3567 %
3568 %
3569 \def\euro{{\eurofont e}}
3570 \def\eurofont{%
3571 % We set the font at each command, rather than predefining it in
3572 % \textfonts and the other font-switching commands, so that
3573 % installations which never need the symbol don't have to have the
3574 % font installed.
3575 %
3576 % There is only one designed size (nominal 10pt), so we always scale
3577 % that to the current nominal size.
3578 %
3579 % By the way, simply using "at 1em" works for cmr10 and the like, but
3580 % does not work for cmbx10 and other extended/shrunken fonts.
3581 %
3582 \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
3583 %
3584 \ifx\curfontstyle\bfstylename
3585 % bold:
3586 \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
3587 \else
3588 % regular:
3589 \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
3590 \fi
3591 \thiseurofont
3592 }
3593
3594 % Glyphs from the EC fonts. We don't use \let for the aliases, because
3595 % sometimes we redefine the original macro, and the alias should reflect
3596 % the redefinition.
3597 %
3598 % Use LaTeX names for the Icelandic letters.
3599 \def\DH{{\ecfont \char"D0}} % Eth
3600 \def\dh{{\ecfont \char"F0}} % eth
3601 \def\TH{{\ecfont \char"DE}} % Thorn
3602 \def\th{{\ecfont \char"FE}} % thorn
3603 %
3604 \def\guillemetleft{{\ecfont \char"13}}
3605 \def\guillemotleft{\guillemetleft}
3606 \def\guillemetright{{\ecfont \char"14}}
3607 \def\guillemotright{\guillemetright}
3608 \def\guilsinglleft{{\ecfont \char"0E}}
3609 \def\guilsinglright{{\ecfont \char"0F}}
3610 \def\quotedblbase{{\ecfont \char"12}}
3611 \def\quotesinglbase{{\ecfont \char"0D}}
3612 %
3613 % This positioning is not perfect (see the ogonek LaTeX package), but
3614 % we have the precomposed glyphs for the most common cases. We put the
3615 % tests to use those glyphs in the single \ogonek macro so we have fewer
3616 % dummy definitions to worry about for index entries, etc.
3617 %
3618 % ogonek is also used with other letters in Lithuanian (IOU), but using
3619 % the precomposed glyphs for those is not so easy since they aren't in
3620 % the same EC font.
3621 \def\ogonek#1{{%
3622 \def\temp{#1}%
3623 \ifx\temp\macrocharA\Aogonek
3624 \else\ifx\temp\macrochara\aogonek
3625 \else\ifx\temp\macrocharE\Eogonek
3626 \else\ifx\temp\macrochare\eogonek
3627 \else
3628 \ecfont \setbox0=\hbox{#1}%
3629 \ifdim\ht0=1ex\accent"0C #1%
3630 \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
3631 \fi
3632 \fi\fi\fi\fi
3633 }%
3634 }
3635 \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
3636 \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
3637 \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
3638 \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
3639 %
3640 % Use the European Computer Modern fonts (cm-super in outline format)
3641 % for non-CM glyphs. That is ec* for regular text and tc* for the text
3642 % companion symbols (LaTeX TS1 encoding). Both are part of the ec
3643 % package and follow the same conventions.
3644 %
3645 \def\ecfont{\etcfont{e}}
3646 \def\tcfont{\etcfont{t}}
3647 %
3648 \def\etcfont#1{%
3649 % We can't distinguish serif/sans and italic/slanted, but this
3650 % is used for crude hacks anyway (like adding French and German
3651 % quotes to documents typeset with CM, where we lose kerning), so
3652 % hopefully nobody will notice/care.
3653 \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
3654 \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
3655 \ifmonospace
3656 % typewriter:
3657 \font\thisecfont = #1ctt\ecsize \space at \nominalsize
3658 \else
3659 \ifx\curfontstyle\bfstylename
3660 % bold:
3661 \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
3662 \else
3663 % regular:
3664 \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
3665 \fi
3666 \fi
3667 \thisecfont
3668 }
3669
3670 % @registeredsymbol - R in a circle. The font for the R should really
3671 % be smaller yet, but lllsize is the best we can do for now.
3672 % Adapted from the plain.tex definition of \copyright.
3673 %
3674 \def\registeredsymbol{%
3675 $^{{\ooalign{\hfil\raise.07ex\hbox{\switchtolllsize R}%
3676 \hfil\crcr\Orb}}%
3677 }$%
3678 }
3679
3680 % @textdegree - the normal degrees sign.
3681 %
3682 \def\textdegree{$^\circ$}
3683
3684 % Laurent Siebenmann reports \Orb undefined with:
3685 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
3686 % so we'll define it if necessary.
3687 %
3688 \ifx\Orb\thisisundefined
3689 \def\Orb{\mathhexbox20D}
3690 \fi
3691
3692 % Quotes.
3693 \chardef\quotedblleft="5C
3694 \chardef\quotedblright=`\"
3695 \chardef\quoteleft=`\`
3696 \chardef\quoteright=`\'
3697
3698
3699 \message{page headings,}
3700
3701 \newskip\titlepagetopglue \titlepagetopglue = 1.5in
3702 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc
3703
3704 % First the title page. Must do @settitle before @titlepage.
3705 \newif\ifseenauthor
3706 \newif\iffinishedtitlepage
3707
3708 % @setcontentsaftertitlepage used to do an implicit @contents or
3709 % @shortcontents after @end titlepage, but it is now obsolete.
3710 \def\setcontentsaftertitlepage{%
3711 \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo
3712 command; move your @contents command if you want the contents
3713 after the title page.}}%
3714 \def\setshortcontentsaftertitlepage{%
3715 \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
3716 command; move your @shortcontents and @contents commands if you
3717 want the contents after the title page.}}%
3718
3719 \parseargdef\shorttitlepage{%
3720 \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
3721 \endgroup\page\hbox{}\page}
3722
3723 \envdef\titlepage{%
3724 % Open one extra group, as we want to close it in the middle of \Etitlepage.
3725 \begingroup
3726 \parindent=0pt \textfonts
3727 % Leave some space at the very top of the page.
3728 \vglue\titlepagetopglue
3729 % No rule at page bottom unless we print one at the top with @title.
3730 \finishedtitlepagetrue
3731 %
3732 % Most title ``pages'' are actually two pages long, with space
3733 % at the top of the second. We don't want the ragged left on the second.
3734 \let\oldpage = \page
3735 \def\page{%
3736 \iffinishedtitlepage\else
3737 \finishtitlepage
3738 \fi
3739 \let\page = \oldpage
3740 \page
3741 \null
3742 }%
3743 }
3744
3745 \def\Etitlepage{%
3746 \iffinishedtitlepage\else
3747 \finishtitlepage
3748 \fi
3749 % It is important to do the page break before ending the group,
3750 % because the headline and footline are only empty inside the group.
3751 % If we use the new definition of \page, we always get a blank page
3752 % after the title page, which we certainly don't want.
3753 \oldpage
3754 \endgroup
3755 %
3756 % Need this before the \...aftertitlepage checks so that if they are
3757 % in effect the toc pages will come out with page numbers.
3758 \HEADINGSon
3759 }
3760
3761 \def\finishtitlepage{%
3762 \vskip4pt \hrule height 2pt width \hsize
3763 \vskip\titlepagebottomglue
3764 \finishedtitlepagetrue
3765 }
3766
3767 % Settings used for typesetting titles: no hyphenation, no indentation,
3768 % don't worry much about spacing, ragged right. This should be used
3769 % inside a \vbox, and fonts need to be set appropriately first. \par should
3770 % be specified before the end of the \vbox, since a vbox is a group.
3771 %
3772 \def\raggedtitlesettings{%
3773 \rm
3774 \hyphenpenalty=10000
3775 \parindent=0pt
3776 \tolerance=5000
3777 \ptexraggedright
3778 }
3779
3780 % Macros to be used within @titlepage:
3781
3782 \let\subtitlerm=\rmfont
3783 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
3784
3785 \parseargdef\title{%
3786 \checkenv\titlepage
3787 \vbox{\titlefonts \raggedtitlesettings #1\par}%
3788 % print a rule at the page bottom also.
3789 \finishedtitlepagefalse
3790 \vskip4pt \hrule height 4pt width \hsize \vskip4pt
3791 }
3792
3793 \parseargdef\subtitle{%
3794 \checkenv\titlepage
3795 {\subtitlefont \rightline{#1}}%
3796 }
3797
3798 % @author should come last, but may come many times.
3799 % It can also be used inside @quotation.
3800 %
3801 \parseargdef\author{%
3802 \def\temp{\quotation}%
3803 \ifx\thisenv\temp
3804 \def\quotationauthor{#1}% printed in \Equotation.
3805 \else
3806 \checkenv\titlepage
3807 \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
3808 {\secfonts\rm \leftline{#1}}%
3809 \fi
3810 }
3811
3812
3813 % Set up page headings and footings.
3814
3815 \let\thispage=\folio
3816
3817 \newtoks\evenheadline % headline on even pages
3818 \newtoks\oddheadline % headline on odd pages
3819 \newtoks\evenfootline % footline on even pages
3820 \newtoks\oddfootline % footline on odd pages
3821
3822 % Now make \makeheadline and \makefootline in Plain TeX use those variables
3823 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
3824 \else \the\evenheadline \fi}}
3825 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
3826 \else \the\evenfootline \fi}\HEADINGShook}
3827 \let\HEADINGShook=\relax
3828
3829 % Commands to set those variables.
3830 % For example, this is what @headings on does
3831 % @evenheading @thistitle|@thispage|@thischapter
3832 % @oddheading @thischapter|@thispage|@thistitle
3833 % @evenfooting @thisfile||
3834 % @oddfooting ||@thisfile
3835
3836
3837 \def\evenheading{\parsearg\evenheadingxxx}
3838 \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
3839 \def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
3840 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3841
3842 \def\oddheading{\parsearg\oddheadingxxx}
3843 \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
3844 \def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
3845 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3846
3847 \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
3848
3849 \def\evenfooting{\parsearg\evenfootingxxx}
3850 \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
3851 \def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
3852 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3853
3854 \def\oddfooting{\parsearg\oddfootingxxx}
3855 \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
3856 \def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
3857 \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
3858 %
3859 % Leave some space for the footline. Hopefully ok to assume
3860 % @evenfooting will not be used by itself.
3861 \global\advance\txipageheight by -12pt
3862 \global\advance\vsize by -12pt
3863 }
3864
3865 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
3866
3867 % @evenheadingmarks top \thischapter <- chapter at the top of a page
3868 % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
3869 %
3870 % The same set of arguments for:
3871 %
3872 % @oddheadingmarks
3873 % @evenfootingmarks
3874 % @oddfootingmarks
3875 % @everyheadingmarks
3876 % @everyfootingmarks
3877
3878 % These define \getoddheadingmarks, \getevenheadingmarks,
3879 % \getoddfootingmarks, and \getevenfootingmarks, each to one of
3880 % \gettopheadingmarks, \getbottomheadingmarks.
3881 %
3882 \def\evenheadingmarks{\headingmarks{even}{heading}}
3883 \def\oddheadingmarks{\headingmarks{odd}{heading}}
3884 \def\evenfootingmarks{\headingmarks{even}{footing}}
3885 \def\oddfootingmarks{\headingmarks{odd}{footing}}
3886 \parseargdef\everyheadingmarks{\headingmarks{even}{heading}{#1}
3887 \headingmarks{odd}{heading}{#1} }
3888 \parseargdef\everyfootingmarks{\headingmarks{even}{footing}{#1}
3889 \headingmarks{odd}{footing}{#1} }
3890 % #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
3891 \def\headingmarks#1#2#3 {%
3892 \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
3893 \global\expandafter\let\csname get#1#2marks\endcsname \temp
3894 }
3895
3896 \everyheadingmarks bottom
3897 \everyfootingmarks bottom
3898
3899 % @headings double turns headings on for double-sided printing.
3900 % @headings single turns headings on for single-sided printing.
3901 % @headings off turns them off.
3902 % @headings on same as @headings double, retained for compatibility.
3903 % @headings after turns on double-sided headings after this page.
3904 % @headings doubleafter turns on double-sided headings after this page.
3905 % @headings singleafter turns on single-sided headings after this page.
3906 % By default, they are off at the start of a document,
3907 % and turned `on' after @end titlepage.
3908
3909 \parseargdef\headings{\csname HEADINGS#1\endcsname}
3910
3911 \def\headingsoff{% non-global headings elimination
3912 \evenheadline={\hfil}\evenfootline={\hfil}%
3913 \oddheadline={\hfil}\oddfootline={\hfil}%
3914 }
3915
3916 \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
3917 \HEADINGSoff % it's the default
3918
3919 % When we turn headings on, set the page number to 1.
3920 % For double-sided printing, put current file name in lower left corner,
3921 % chapter name on inside top of right hand pages, document
3922 % title on inside top of left hand pages, and page numbers on outside top
3923 % edge of all pages.
3924 \def\HEADINGSdouble{%
3925 \global\pageno=1
3926 \global\evenfootline={\hfil}
3927 \global\oddfootline={\hfil}
3928 \global\evenheadline={\line{\folio\hfil\thistitle}}
3929 \global\oddheadline={\line{\thischapterheading\hfil\folio}}
3930 \global\let\contentsalignmacro = \chapoddpage
3931 }
3932 \let\contentsalignmacro = \chappager
3933
3934 % For single-sided printing, chapter title goes across top left of page,
3935 % page number on top right.
3936 \def\HEADINGSsingle{%
3937 \global\pageno=1
3938 \global\evenfootline={\hfil}
3939 \global\oddfootline={\hfil}
3940 \global\evenheadline={\line{\thischapterheading\hfil\folio}}
3941 \global\oddheadline={\line{\thischapterheading\hfil\folio}}
3942 \global\let\contentsalignmacro = \chappager
3943 }
3944 \def\HEADINGSon{\HEADINGSdouble}
3945
3946 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
3947 \let\HEADINGSdoubleafter=\HEADINGSafter
3948 \def\HEADINGSdoublex{%
3949 \global\evenfootline={\hfil}
3950 \global\oddfootline={\hfil}
3951 \global\evenheadline={\line{\folio\hfil\thistitle}}
3952 \global\oddheadline={\line{\thischapterheading\hfil\folio}}
3953 \global\let\contentsalignmacro = \chapoddpage
3954 }
3955
3956 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
3957 \def\HEADINGSsinglex{%
3958 \global\evenfootline={\hfil}
3959 \global\oddfootline={\hfil}
3960 \global\evenheadline={\line{\thischapterheading\hfil\folio}}
3961 \global\oddheadline={\line{\thischapterheading\hfil\folio}}
3962 \global\let\contentsalignmacro = \chappager
3963 }
3964
3965 % Subroutines used in generating headings
3966 % This produces Day Month Year style of output.
3967 % Only define if not already defined, in case a txi-??.tex file has set
3968 % up a different format (e.g., txi-cs.tex does this).
3969 \ifx\today\thisisundefined
3970 \def\today{%
3971 \number\day\space
3972 \ifcase\month
3973 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
3974 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
3975 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
3976 \fi
3977 \space\number\year}
3978 \fi
3979
3980 % @settitle line... specifies the title of the document, for headings.
3981 % It generates no output of its own.
3982 \def\thistitle{\putwordNoTitle}
3983 \def\settitle{\parsearg{\gdef\thistitle}}
3984
3985
3986 \message{tables,}
3987 % Tables -- @table, @ftable, @vtable, @item(x).
3988
3989 % default indentation of table text
3990 \newdimen\tableindent \tableindent=.8in
3991 % default indentation of @itemize and @enumerate text
3992 \newdimen\itemindent \itemindent=.3in
3993 % margin between end of table item and start of table text.
3994 \newdimen\itemmargin \itemmargin=.1in
3995
3996 % used internally for \itemindent minus \itemmargin
3997 \newdimen\itemmax
3998
3999 % Note @table, @ftable, and @vtable define @item, @itemx, etc., with
4000 % these defs.
4001 % They also define \itemindex
4002 % to index the item name in whatever manner is desired (perhaps none).
4003
4004 \newif\ifitemxneedsnegativevskip
4005
4006 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
4007
4008 \def\internalBitem{\smallbreak \parsearg\itemzzz}
4009 \def\internalBitemx{\itemxpar \parsearg\itemzzz}
4010
4011 \def\itemzzz #1{\begingroup %
4012 \advance\hsize by -\rightskip
4013 \advance\hsize by -\tableindent
4014 \setbox0=\hbox{\itemindicate{#1}}%
4015 \itemindex{#1}%
4016 \nobreak % This prevents a break before @itemx.
4017 %
4018 % If the item text does not fit in the space we have, put it on a line
4019 % by itself, and do not allow a page break either before or after that
4020 % line. We do not start a paragraph here because then if the next
4021 % command is, e.g., @kindex, the whatsit would get put into the
4022 % horizontal list on a line by itself, resulting in extra blank space.
4023 \ifdim \wd0>\itemmax
4024 %
4025 % Make this a paragraph so we get the \parskip glue and wrapping,
4026 % but leave it ragged-right.
4027 \begingroup
4028 \advance\leftskip by-\tableindent
4029 \advance\hsize by\tableindent
4030 \advance\rightskip by0pt plus1fil\relax
4031 \leavevmode\unhbox0\par
4032 \endgroup
4033 %
4034 % We're going to be starting a paragraph, but we don't want the
4035 % \parskip glue -- logically it's part of the @item we just started.
4036 \nobreak \vskip-\parskip
4037 %
4038 % Stop a page break at the \parskip glue coming up. However, if
4039 % what follows is an environment such as @example, there will be no
4040 % \parskip glue; then the negative vskip we just inserted would
4041 % cause the example and the item to crash together. So we use this
4042 % bizarre value of 10001 as a signal to \aboveenvbreak to insert
4043 % \parskip glue after all. Section titles are handled this way also.
4044 %
4045 \penalty 10001
4046 \endgroup
4047 \itemxneedsnegativevskipfalse
4048 \else
4049 % The item text fits into the space. Start a paragraph, so that the
4050 % following text (if any) will end up on the same line.
4051 \noindent
4052 % Do this with kerns and \unhbox so that if there is a footnote in
4053 % the item text, it can migrate to the main vertical list and
4054 % eventually be printed.
4055 \nobreak\kern-\tableindent
4056 \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
4057 \unhbox0
4058 \nobreak\kern\dimen0
4059 \endgroup
4060 \itemxneedsnegativevskiptrue
4061 \fi
4062 }
4063
4064 \def\item{\errmessage{@item while not in a list environment}}
4065 \def\itemx{\errmessage{@itemx while not in a list environment}}
4066
4067 % @table, @ftable, @vtable.
4068 \envdef\table{%
4069 \let\itemindex\gobble
4070 \tablecheck{table}%
4071 }
4072 \envdef\ftable{%
4073 \def\itemindex ##1{\doind {fn}{\code{##1}}}%
4074 \tablecheck{ftable}%
4075 }
4076 \envdef\vtable{%
4077 \def\itemindex ##1{\doind {vr}{\code{##1}}}%
4078 \tablecheck{vtable}%
4079 }
4080 \def\tablecheck#1{%
4081 \ifnum \the\catcode`\^^M=\active
4082 \endgroup
4083 \errmessage{This command won't work in this context; perhaps the problem is
4084 that we are \inenvironment\thisenv}%
4085 \def\next{\doignore{#1}}%
4086 \else
4087 \let\next\tablex
4088 \fi
4089 \next
4090 }
4091 \def\tablex#1{%
4092 \def\itemindicate{#1}%
4093 \parsearg\tabley
4094 }
4095 \def\tabley#1{%
4096 {%
4097 \makevalueexpandable
4098 \edef\temp{\noexpand\tablez #1\space\space\space}%
4099 \expandafter
4100 }\temp \endtablez
4101 }
4102 \def\tablez #1 #2 #3 #4\endtablez{%
4103 \aboveenvbreak
4104 \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
4105 \ifnum 0#2>0 \tableindent=#2\mil \fi
4106 \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
4107 \itemmax=\tableindent
4108 \advance \itemmax by -\itemmargin
4109 \advance \leftskip by \tableindent
4110 \exdentamount=\tableindent
4111 \parindent = 0pt
4112 \parskip = \smallskipamount
4113 \ifdim \parskip=0pt \parskip=2pt \fi
4114 \let\item = \internalBitem
4115 \let\itemx = \internalBitemx
4116 }
4117 \def\Etable{\endgraf\afterenvbreak}
4118 \let\Eftable\Etable
4119 \let\Evtable\Etable
4120 \let\Eitemize\Etable
4121 \let\Eenumerate\Etable
4122
4123 % This is the counter used by @enumerate, which is really @itemize
4124
4125 \newcount \itemno
4126
4127 \envdef\itemize{\parsearg\doitemize}
4128
4129 \def\doitemize#1{%
4130 \aboveenvbreak
4131 \itemmax=\itemindent
4132 \advance\itemmax by -\itemmargin
4133 \advance\leftskip by \itemindent
4134 \exdentamount=\itemindent
4135 \parindent=0pt
4136 \parskip=\smallskipamount
4137 \ifdim\parskip=0pt \parskip=2pt \fi
4138 %
4139 % Try typesetting the item mark so that if the document erroneously says
4140 % something like @itemize @samp (intending @table), there's an error
4141 % right away at the @itemize. It's not the best error message in the
4142 % world, but it's better than leaving it to the @item. This means if
4143 % the user wants an empty mark, they have to say @w{} not just @w.
4144 \def\itemcontents{#1}%
4145 \setbox0 = \hbox{\itemcontents}%
4146 %
4147 % @itemize with no arg is equivalent to @itemize @bullet.
4148 \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
4149 %
4150 \let\item=\itemizeitem
4151 }
4152
4153 % Definition of @item while inside @itemize and @enumerate.
4154 %
4155 \def\itemizeitem{%
4156 \advance\itemno by 1 % for enumerations
4157 {\let\par=\endgraf \smallbreak}% reasonable place to break
4158 {%
4159 % If the document has an @itemize directly after a section title, a
4160 % \nobreak will be last on the list, and \sectionheading will have
4161 % done a \vskip-\parskip. In that case, we don't want to zero
4162 % parskip, or the item text will crash with the heading. On the
4163 % other hand, when there is normal text preceding the item (as there
4164 % usually is), we do want to zero parskip, or there would be too much
4165 % space. In that case, we won't have a \nobreak before. At least
4166 % that's the theory.
4167 \ifnum\lastpenalty<10000 \parskip=0in \fi
4168 \noindent
4169 \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
4170 %
4171 \ifinner\else
4172 \vadjust{\penalty 1200}% not good to break after first line of item.
4173 \fi
4174 % We can be in inner vertical mode in a footnote, although an
4175 % @itemize looks awful there.
4176 }%
4177 \flushcr
4178 }
4179
4180 % \splitoff TOKENS\endmark defines \first to be the first token in
4181 % TOKENS, and \rest to be the remainder.
4182 %
4183 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
4184
4185 % Allow an optional argument of an uppercase letter, lowercase letter,
4186 % or number, to specify the first label in the enumerated list. No
4187 % argument is the same as `1'.
4188 %
4189 \envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
4190 \def\enumeratey #1 #2\endenumeratey{%
4191 % If we were given no argument, pretend we were given `1'.
4192 \def\thearg{#1}%
4193 \ifx\thearg\empty \def\thearg{1}\fi
4194 %
4195 % Detect if the argument is a single token. If so, it might be a
4196 % letter. Otherwise, the only valid thing it can be is a number.
4197 % (We will always have one token, because of the test we just made.
4198 % This is a good thing, since \splitoff doesn't work given nothing at
4199 % all -- the first parameter is undelimited.)
4200 \expandafter\splitoff\thearg\endmark
4201 \ifx\rest\empty
4202 % Only one token in the argument. It could still be anything.
4203 % A ``lowercase letter'' is one whose \lccode is nonzero.
4204 % An ``uppercase letter'' is one whose \lccode is both nonzero, and
4205 % not equal to itself.
4206 % Otherwise, we assume it's a number.
4207 %
4208 % We need the \relax at the end of the \ifnum lines to stop TeX from
4209 % continuing to look for a <number>.
4210 %
4211 \ifnum\lccode\expandafter`\thearg=0\relax
4212 \numericenumerate % a number (we hope)
4213 \else
4214 % It's a letter.
4215 \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
4216 \lowercaseenumerate % lowercase letter
4217 \else
4218 \uppercaseenumerate % uppercase letter
4219 \fi
4220 \fi
4221 \else
4222 % Multiple tokens in the argument. We hope it's a number.
4223 \numericenumerate
4224 \fi
4225 }
4226
4227 % An @enumerate whose labels are integers. The starting integer is
4228 % given in \thearg.
4229 %
4230 \def\numericenumerate{%
4231 \itemno = \thearg
4232 \startenumeration{\the\itemno}%
4233 }
4234
4235 % The starting (lowercase) letter is in \thearg.
4236 \def\lowercaseenumerate{%
4237 \itemno = \expandafter`\thearg
4238 \startenumeration{%
4239 % Be sure we're not beyond the end of the alphabet.
4240 \ifnum\itemno=0
4241 \errmessage{No more lowercase letters in @enumerate; get a bigger
4242 alphabet}%
4243 \fi
4244 \char\lccode\itemno
4245 }%
4246 }
4247
4248 % The starting (uppercase) letter is in \thearg.
4249 \def\uppercaseenumerate{%
4250 \itemno = \expandafter`\thearg
4251 \startenumeration{%
4252 % Be sure we're not beyond the end of the alphabet.
4253 \ifnum\itemno=0
4254 \errmessage{No more uppercase letters in @enumerate; get a bigger
4255 alphabet}
4256 \fi
4257 \char\uccode\itemno
4258 }%
4259 }
4260
4261 % Call \doitemize, adding a period to the first argument and supplying the
4262 % common last two arguments. Also subtract one from the initial value in
4263 % \itemno, since @item increments \itemno.
4264 %
4265 \def\startenumeration#1{%
4266 \advance\itemno by -1
4267 \doitemize{#1.}\flushcr
4268 }
4269
4270 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
4271 % to @enumerate.
4272 %
4273 \def\alphaenumerate{\enumerate{a}}
4274 \def\capsenumerate{\enumerate{A}}
4275 \def\Ealphaenumerate{\Eenumerate}
4276 \def\Ecapsenumerate{\Eenumerate}
4277
4278
4279 % @multitable macros
4280 % Amy Hendrickson, 8/18/94, 3/6/96
4281 %
4282 % @multitable ... @end multitable will make as many columns as desired.
4283 % Contents of each column will wrap at width given in preamble. Width
4284 % can be specified either with sample text given in a template line,
4285 % or in percent of \hsize, the current width of text on page.
4286
4287 % Table can continue over pages but will only break between lines.
4288
4289 % To make preamble:
4290 %
4291 % Either define widths of columns in terms of percent of \hsize:
4292 % @multitable @columnfractions .25 .3 .45
4293 % @item ...
4294 %
4295 % Numbers following @columnfractions are the percent of the total
4296 % current hsize to be used for each column. You may use as many
4297 % columns as desired.
4298
4299
4300 % Or use a template:
4301 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
4302 % @item ...
4303 % using the widest term desired in each column.
4304
4305 % Each new table line starts with @item, each subsequent new column
4306 % starts with @tab. Empty columns may be produced by supplying @tab's
4307 % with nothing between them for as many times as empty columns are needed,
4308 % ie, @tab@tab@tab will produce two empty columns.
4309
4310 % @item, @tab do not need to be on their own lines, but it will not hurt
4311 % if they are.
4312
4313 % Sample multitable:
4314
4315 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
4316 % @item first col stuff @tab second col stuff @tab third col
4317 % @item
4318 % first col stuff
4319 % @tab
4320 % second col stuff
4321 % @tab
4322 % third col
4323 % @item first col stuff @tab second col stuff
4324 % @tab Many paragraphs of text may be used in any column.
4325 %
4326 % They will wrap at the width determined by the template.
4327 % @item@tab@tab This will be in third column.
4328 % @end multitable
4329
4330 % Default dimensions may be reset by user.
4331 % @multitableparskip is vertical space between paragraphs in table.
4332 % @multitableparindent is paragraph indent in table.
4333 % @multitablecolmargin is horizontal space to be left between columns.
4334 % @multitablelinespace is space to leave between table items, baseline
4335 % to baseline.
4336 % 0pt means it depends on current normal line spacing.
4337 %
4338 \newskip\multitableparskip
4339 \newskip\multitableparindent
4340 \newdimen\multitablecolspace
4341 \newskip\multitablelinespace
4342 \multitableparskip=0pt
4343 \multitableparindent=6pt
4344 \multitablecolspace=12pt
4345 \multitablelinespace=0pt
4346
4347 % Macros used to set up halign preamble:
4348 %
4349 \let\endsetuptable\relax
4350 \def\xendsetuptable{\endsetuptable}
4351 \let\columnfractions\relax
4352 \def\xcolumnfractions{\columnfractions}
4353 \newif\ifsetpercent
4354
4355 % #1 is the @columnfraction, usually a decimal number like .5, but might
4356 % be just 1. We just use it, whatever it is.
4357 %
4358 \def\pickupwholefraction#1 {%
4359 \global\advance\colcount by 1
4360 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
4361 \setuptable
4362 }
4363
4364 \newcount\colcount
4365 \def\setuptable#1{%
4366 \def\firstarg{#1}%
4367 \ifx\firstarg\xendsetuptable
4368 \let\go = \relax
4369 \else
4370 \ifx\firstarg\xcolumnfractions
4371 \global\setpercenttrue
4372 \else
4373 \ifsetpercent
4374 \let\go\pickupwholefraction
4375 \else
4376 \global\advance\colcount by 1
4377 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
4378 % separator; typically that is always in the input, anyway.
4379 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
4380 \fi
4381 \fi
4382 \ifx\go\pickupwholefraction
4383 % Put the argument back for the \pickupwholefraction call, so
4384 % we'll always have a period there to be parsed.
4385 \def\go{\pickupwholefraction#1}%
4386 \else
4387 \let\go = \setuptable
4388 \fi%
4389 \fi
4390 \go
4391 }
4392
4393 % multitable-only commands.
4394 %
4395 % @headitem starts a heading row, which we typeset in bold. Assignments
4396 % have to be global since we are inside the implicit group of an
4397 % alignment entry. \everycr below resets \everytab so we don't have to
4398 % undo it ourselves.
4399 \def\headitemfont{\b}% for people to use in the template row; not changeable
4400 \def\headitem{%
4401 \checkenv\multitable
4402 \crcr
4403 \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
4404 \global\everytab={\bf}% can't use \headitemfont since the parsing differs
4405 \the\everytab % for the first item
4406 }%
4407 %
4408 % default for tables with no headings.
4409 \let\headitemcrhook=\relax
4410 %
4411 % A \tab used to include \hskip1sp. But then the space in a template
4412 % line is not enough. That is bad. So let's go back to just `&' until
4413 % we again encounter the problem the 1sp was intended to solve.
4414 % --karl, nathan@acm.org, 20apr99.
4415 \def\tab{\checkenv\multitable &\the\everytab}%
4416
4417 % @multitable ... @end multitable definitions:
4418 %
4419 \newtoks\everytab % insert after every tab.
4420 %
4421 \envdef\multitable{%
4422 \vskip\parskip
4423 \startsavinginserts
4424 %
4425 % @item within a multitable starts a normal row.
4426 % We use \def instead of \let so that if one of the multitable entries
4427 % contains an @itemize, we don't choke on the \item (seen as \crcr aka
4428 % \endtemplate) expanding \doitemize.
4429 \def\item{\crcr}%
4430 %
4431 \tolerance=9500
4432 \hbadness=9500
4433 \setmultitablespacing
4434 \parskip=\multitableparskip
4435 \parindent=\multitableparindent
4436 \overfullrule=0pt
4437 \global\colcount=0
4438 %
4439 \everycr = {%
4440 \noalign{%
4441 \global\everytab={}% Reset from possible headitem.
4442 \global\colcount=0 % Reset the column counter.
4443 %
4444 % Check for saved footnotes, etc.:
4445 \checkinserts
4446 %
4447 % Perhaps a \nobreak, then reset:
4448 \headitemcrhook
4449 \global\let\headitemcrhook=\relax
4450 }%
4451 }%
4452 %
4453 \parsearg\domultitable
4454 }
4455 \def\domultitable#1{%
4456 % To parse everything between @multitable and @item:
4457 \setuptable#1 \endsetuptable
4458 %
4459 % This preamble sets up a generic column definition, which will
4460 % be used as many times as user calls for columns.
4461 % \vtop will set a single line and will also let text wrap and
4462 % continue for many paragraphs if desired.
4463 \halign\bgroup &%
4464 \global\advance\colcount by 1
4465 \multistrut
4466 \vtop{%
4467 % Use the current \colcount to find the correct column width:
4468 \hsize=\expandafter\csname col\the\colcount\endcsname
4469 %
4470 % In order to keep entries from bumping into each other
4471 % we will add a \leftskip of \multitablecolspace to all columns after
4472 % the first one.
4473 %
4474 % If a template has been used, we will add \multitablecolspace
4475 % to the width of each template entry.
4476 %
4477 % If the user has set preamble in terms of percent of \hsize we will
4478 % use that dimension as the width of the column, and the \leftskip
4479 % will keep entries from bumping into each other. Table will start at
4480 % left margin and final column will justify at right margin.
4481 %
4482 % Make sure we don't inherit \rightskip from the outer environment.
4483 \rightskip=0pt
4484 \ifnum\colcount=1
4485 % The first column will be indented with the surrounding text.
4486 \advance\hsize by\leftskip
4487 \else
4488 \ifsetpercent \else
4489 % If user has not set preamble in terms of percent of \hsize
4490 % we will advance \hsize by \multitablecolspace.
4491 \advance\hsize by \multitablecolspace
4492 \fi
4493 % In either case we will make \leftskip=\multitablecolspace:
4494 \leftskip=\multitablecolspace
4495 \fi
4496 % Ignoring space at the beginning and end avoids an occasional spurious
4497 % blank line, when TeX decides to break the line at the space before the
4498 % box from the multistrut, so the strut ends up on a line by itself.
4499 % For example:
4500 % @multitable @columnfractions .11 .89
4501 % @item @code{#}
4502 % @tab Legal holiday which is valid in major parts of the whole country.
4503 % Is automatically provided with highlighting sequences respectively
4504 % marking characters.
4505 \noindent\ignorespaces##\unskip\multistrut
4506 }\cr
4507 }
4508 \def\Emultitable{%
4509 \crcr
4510 \egroup % end the \halign
4511 \global\setpercentfalse
4512 }
4513
4514 \def\setmultitablespacing{%
4515 \def\multistrut{\strut}% just use the standard line spacing
4516 %
4517 % Compute \multitablelinespace (if not defined by user) for use in
4518 % \multitableparskip calculation. We used define \multistrut based on
4519 % this, but (ironically) that caused the spacing to be off.
4520 % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
4521 \ifdim\multitablelinespace=0pt
4522 \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
4523 \global\advance\multitablelinespace by-\ht0
4524 \fi
4525 % Test to see if parskip is larger than space between lines of
4526 % table. If not, do nothing.
4527 % If so, set to same dimension as multitablelinespace.
4528 \ifdim\multitableparskip>\multitablelinespace
4529 \global\multitableparskip=\multitablelinespace
4530 \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
4531 % than skip between lines in the table.
4532 \fi%
4533 \ifdim\multitableparskip=0pt
4534 \global\multitableparskip=\multitablelinespace
4535 \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
4536 % than skip between lines in the table.
4537 \fi}
4538
4539
4540 \message{conditionals,}
4541
4542 % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
4543 % @ifnotxml always succeed. They currently do nothing; we don't
4544 % attempt to check whether the conditionals are properly nested. But we
4545 % have to remember that they are conditionals, so that @end doesn't
4546 % attempt to close an environment group.
4547 %
4548 \def\makecond#1{%
4549 \expandafter\let\csname #1\endcsname = \relax
4550 \expandafter\let\csname iscond.#1\endcsname = 1
4551 }
4552 \makecond{iftex}
4553 \makecond{ifnotdocbook}
4554 \makecond{ifnothtml}
4555 \makecond{ifnotinfo}
4556 \makecond{ifnotplaintext}
4557 \makecond{ifnotxml}
4558
4559 % Ignore @ignore, @ifhtml, @ifinfo, and the like.
4560 %
4561 \def\direntry{\doignore{direntry}}
4562 \def\documentdescription{\doignore{documentdescription}}
4563 \def\docbook{\doignore{docbook}}
4564 \def\html{\doignore{html}}
4565 \def\ifdocbook{\doignore{ifdocbook}}
4566 \def\ifhtml{\doignore{ifhtml}}
4567 \def\ifinfo{\doignore{ifinfo}}
4568 \def\ifnottex{\doignore{ifnottex}}
4569 \def\ifplaintext{\doignore{ifplaintext}}
4570 \def\ifxml{\doignore{ifxml}}
4571 \def\ignore{\doignore{ignore}}
4572 \def\menu{\doignore{menu}}
4573 \def\xml{\doignore{xml}}
4574
4575 % Ignore text until a line `@end #1', keeping track of nested conditionals.
4576 %
4577 % A count to remember the depth of nesting.
4578 \newcount\doignorecount
4579
4580 \def\doignore#1{\begingroup
4581 % Scan in ``verbatim'' mode:
4582 \obeylines
4583 \catcode`\@ = \other
4584 \catcode`\{ = \other
4585 \catcode`\} = \other
4586 %
4587 % Make sure that spaces turn into tokens that match what \doignoretext wants.
4588 \spaceisspace
4589 %
4590 % Count number of #1's that we've seen.
4591 \doignorecount = 0
4592 %
4593 % Swallow text until we reach the matching `@end #1'.
4594 \dodoignore{#1}%
4595 }
4596
4597 { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
4598 \obeylines %
4599 %
4600 \gdef\dodoignore#1{%
4601 % #1 contains the command name as a string, e.g., `ifinfo'.
4602 %
4603 % Define a command to find the next `@end #1'.
4604 \long\def\doignoretext##1^^M@end #1{%
4605 \doignoretextyyy##1^^M@#1\_STOP_}%
4606 %
4607 % And this command to find another #1 command, at the beginning of a
4608 % line. (Otherwise, we would consider a line `@c @ifset', for
4609 % example, to count as an @ifset for nesting.)
4610 \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
4611 %
4612 % And now expand that command.
4613 \doignoretext ^^M%
4614 }%
4615 }
4616
4617 \def\doignoreyyy#1{%
4618 \def\temp{#1}%
4619 \ifx\temp\empty % Nothing found.
4620 \let\next\doignoretextzzz
4621 \else % Found a nested condition, ...
4622 \advance\doignorecount by 1
4623 \let\next\doignoretextyyy % ..., look for another.
4624 % If we're here, #1 ends with ^^M\ifinfo (for example).
4625 \fi
4626 \next #1% the token \_STOP_ is present just after this macro.
4627 }
4628
4629 % We have to swallow the remaining "\_STOP_".
4630 %
4631 \def\doignoretextzzz#1{%
4632 \ifnum\doignorecount = 0 % We have just found the outermost @end.
4633 \let\next\enddoignore
4634 \else % Still inside a nested condition.
4635 \advance\doignorecount by -1
4636 \let\next\doignoretext % Look for the next @end.
4637 \fi
4638 \next
4639 }
4640
4641 % Finish off ignored text.
4642 { \obeylines%
4643 % Ignore anything after the last `@end #1'; this matters in verbatim
4644 % environments, where otherwise the newline after an ignored conditional
4645 % would result in a blank line in the output.
4646 \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
4647 }
4648
4649
4650 % @set VAR sets the variable VAR to an empty value.
4651 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
4652 %
4653 % Since we want to separate VAR from REST-OF-LINE (which might be
4654 % empty), we can't just use \parsearg; we have to insert a space of our
4655 % own to delimit the rest of the line, and then take it out again if we
4656 % didn't need it.
4657 % We rely on the fact that \parsearg sets \catcode`\ =10.
4658 %
4659 \parseargdef\set{\setyyy#1 \endsetyyy}
4660 \def\setyyy#1 #2\endsetyyy{%
4661 {%
4662 \makevalueexpandable
4663 \def\temp{#2}%
4664 \edef\next{\gdef\makecsname{SET#1}}%
4665 \ifx\temp\empty
4666 \next{}%
4667 \else
4668 \setzzz#2\endsetzzz
4669 \fi
4670 }%
4671 }
4672 % Remove the trailing space \setxxx inserted.
4673 \def\setzzz#1 \endsetzzz{\next{#1}}
4674
4675 % @clear VAR clears (i.e., unsets) the variable VAR.
4676 %
4677 \parseargdef\clear{%
4678 {%
4679 \makevalueexpandable
4680 \global\expandafter\let\csname SET#1\endcsname=\relax
4681 }%
4682 }
4683
4684 % @value{foo} gets the text saved in variable foo.
4685 \def\value{\begingroup\makevalueexpandable\valuexxx}
4686 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
4687 {
4688 \catcode`\-=\active \catcode`\_=\active
4689 %
4690 \gdef\makevalueexpandable{%
4691 \let\value = \expandablevalue
4692 % We don't want these characters active, ...
4693 \catcode`\-=\other \catcode`\_=\other
4694 % ..., but we might end up with active ones in the argument if
4695 % we're called from @code, as @code{@value{foo-bar_}}, though.
4696 % So \let them to their normal equivalents.
4697 \let-\normaldash \let_\normalunderscore
4698 }
4699 }
4700
4701 % We have this subroutine so that we can handle at least some @value's
4702 % properly in indexes (we call \makevalueexpandable in \indexdummies).
4703 % The command has to be fully expandable (if the variable is set), since
4704 % the result winds up in the index file. This means that if the
4705 % variable's value contains other Texinfo commands, it's almost certain
4706 % it will fail (although perhaps we could fix that with sufficient work
4707 % to do a one-level expansion on the result, instead of complete).
4708 %
4709 % Unfortunately, this has the consequence that when _ is in the *value*
4710 % of an @set, it does not print properly in the roman fonts (get the cmr
4711 % dot accent at position 126 instead). No fix comes to mind, and it's
4712 % been this way since 2003 or earlier, so just ignore it.
4713 %
4714 \def\expandablevalue#1{%
4715 \expandafter\ifx\csname SET#1\endcsname\relax
4716 {[No value for ``#1'']}%
4717 \message{Variable `#1', used in @value, is not set.}%
4718 \else
4719 \csname SET#1\endcsname
4720 \fi
4721 }
4722
4723 % Like \expandablevalue, but completely expandable (the \message in the
4724 % definition above operates at the execution level of TeX). Used when
4725 % writing to auxiliary files, due to the expansion that \write does.
4726 % If flag is undefined, pass through an unexpanded @value command: maybe it
4727 % will be set by the time it is read back in.
4728 %
4729 % NB flag names containing - or _ may not work here.
4730 \def\dummyvalue#1{%
4731 \expandafter\ifx\csname SET#1\endcsname\relax
4732 \noexpand\value{#1}%
4733 \else
4734 \csname SET#1\endcsname
4735 \fi
4736 }
4737
4738 % Used for @value's in index entries to form the sort key: expand the @value
4739 % if possible, otherwise sort late.
4740 \def\indexnofontsvalue#1{%
4741 \expandafter\ifx\csname SET#1\endcsname\relax
4742 ZZZZZZZ
4743 \else
4744 \csname SET#1\endcsname
4745 \fi
4746 }
4747
4748 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
4749 % with @set.
4750 %
4751 % To get the special treatment we need for `@end ifset,' we call
4752 % \makecond and then redefine.
4753 %
4754 \makecond{ifset}
4755 \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
4756 \def\doifset#1#2{%
4757 {%
4758 \makevalueexpandable
4759 \let\next=\empty
4760 \expandafter\ifx\csname SET#2\endcsname\relax
4761 #1% If not set, redefine \next.
4762 \fi
4763 \expandafter
4764 }\next
4765 }
4766 \def\ifsetfail{\doignore{ifset}}
4767
4768 % @ifclear VAR ... @end executes the `...' iff VAR has never been
4769 % defined with @set, or has been undefined with @clear.
4770 %
4771 % The `\else' inside the `\doifset' parameter is a trick to reuse the
4772 % above code: if the variable is not set, do nothing, if it is set,
4773 % then redefine \next to \ifclearfail.
4774 %
4775 \makecond{ifclear}
4776 \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
4777 \def\ifclearfail{\doignore{ifclear}}
4778
4779 % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
4780 % without the @) is in fact defined. We can only feasibly check at the
4781 % TeX level, so something like `mathcode' is going to considered
4782 % defined even though it is not a Texinfo command.
4783 %
4784 \makecond{ifcommanddefined}
4785 \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
4786 %
4787 \def\doifcmddefined#1#2{{%
4788 \makevalueexpandable
4789 \let\next=\empty
4790 \expandafter\ifx\csname #2\endcsname\relax
4791 #1% If not defined, \let\next as above.
4792 \fi
4793 \expandafter
4794 }\next
4795 }
4796 \def\ifcmddefinedfail{\doignore{ifcommanddefined}}
4797
4798 % @ifcommandnotdefined CMD ... handled similar to @ifclear above.
4799 \makecond{ifcommandnotdefined}
4800 \def\ifcommandnotdefined{%
4801 \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
4802 \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
4803
4804 % Set the `txicommandconditionals' variable, so documents have a way to
4805 % test if the @ifcommand...defined conditionals are available.
4806 \set txicommandconditionals
4807
4808 % @dircategory CATEGORY -- specify a category of the dir file
4809 % which this file should belong to. Ignore this in TeX.
4810 \let\dircategory=\comment
4811
4812 % @defininfoenclose.
4813 \let\definfoenclose=\comment
4814
4815
4816 \message{indexing,}
4817 % Index generation facilities
4818
4819 % Define \newwrite to be identical to plain tex's \newwrite
4820 % except not \outer, so it can be used within macros and \if's.
4821 \edef\newwrite{\makecsname{ptexnewwrite}}
4822
4823 % \newindex {foo} defines an index named IX.
4824 % It automatically defines \IXindex such that
4825 % \IXindex ...rest of line... puts an entry in the index IX.
4826 % It also defines \IXindfile to be the number of the output channel for
4827 % the file that accumulates this index. The file's extension is IX.
4828 % The name of an index should be no more than 2 characters long
4829 % for the sake of vms.
4830 %
4831 \def\newindex#1{%
4832 \expandafter\chardef\csname#1indfile\endcsname=0
4833 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
4834 \noexpand\doindex{#1}}
4835 }
4836
4837 % @defindex foo == \newindex{foo}
4838 %
4839 \def\defindex{\parsearg\newindex}
4840
4841 % Define @defcodeindex, like @defindex except put all entries in @code.
4842 %
4843 \def\defcodeindex{\parsearg\newcodeindex}
4844 %
4845 \def\newcodeindex#1{%
4846 \expandafter\chardef\csname#1indfile\endcsname=0
4847 \expandafter\xdef\csname#1index\endcsname{%
4848 \noexpand\docodeindex{#1}}%
4849 }
4850
4851 % The default indices:
4852 \newindex{cp}% concepts,
4853 \newcodeindex{fn}% functions,
4854 \newcodeindex{vr}% variables,
4855 \newcodeindex{tp}% types,
4856 \newcodeindex{ky}% keys
4857 \newcodeindex{pg}% and programs.
4858
4859
4860 % @synindex foo bar makes index foo feed into index bar.
4861 % Do this instead of @defindex foo if you don't want it as a separate index.
4862 %
4863 % @syncodeindex foo bar similar, but put all entries made for index foo
4864 % inside @code.
4865 %
4866 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
4867 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
4868
4869 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
4870 % #3 the target index (bar).
4871 \def\dosynindex#1#2#3{%
4872 \requireopenindexfile{#3}%
4873 % redefine \fooindfile:
4874 \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
4875 \expandafter\let\csname#2indfile\endcsname=\temp
4876 % redefine \fooindex:
4877 \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
4878 }
4879
4880 % Define \doindex, the driver for all index macros.
4881 % Argument #1 is generated by the calling \fooindex macro,
4882 % and it is the two-letter name of the index.
4883
4884 \def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
4885 \def\doindexxxx #1{\doind{\indexname}{#1}}
4886
4887 % like the previous two, but they put @code around the argument.
4888 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
4889 \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
4890
4891
4892 % Used when writing an index entry out to an index file to prevent
4893 % expansion of Texinfo commands that can appear in an index entry.
4894 %
4895 \def\indexdummies{%
4896 \escapechar = `\\ % use backslash in output files.
4897 \definedummyletter\@%
4898 \definedummyletter\ %
4899 %
4900 % For texindex which always views { and } as separators.
4901 \def\{{\lbracechar{}}%
4902 \def\}{\rbracechar{}}%
4903 %
4904 % Do the redefinitions.
4905 \definedummies
4906 }
4907
4908 % Used for the aux and toc files, where @ is the escape character.
4909 %
4910 \def\atdummies{%
4911 \definedummyletter\@%
4912 \definedummyletter\ %
4913 \definedummyletter\{%
4914 \definedummyletter\}%
4915 %
4916 % Do the redefinitions.
4917 \definedummies
4918 \otherbackslash
4919 }
4920
4921 % \definedummyword defines \#1 as \string\#1\space, thus effectively
4922 % preventing its expansion. This is used only for control words,
4923 % not control letters, because the \space would be incorrect for
4924 % control characters, but is needed to separate the control word
4925 % from whatever follows.
4926 %
4927 % These can be used both for control words that take an argument and
4928 % those that do not. If it is followed by {arg} in the input, then
4929 % that will dutifully get written to the index (or wherever).
4930 %
4931 % For control letters, we have \definedummyletter, which omits the
4932 % space.
4933 %
4934 \def\definedummyword #1{\def#1{\string#1\space}}%
4935 \def\definedummyletter#1{\def#1{\string#1}}%
4936 \let\definedummyaccent\definedummyletter
4937
4938 % Called from \indexdummies and \atdummies, to effectively prevent
4939 % the expansion of commands.
4940 %
4941 \def\definedummies{%
4942 %
4943 \let\commondummyword\definedummyword
4944 \let\commondummyletter\definedummyletter
4945 \let\commondummyaccent\definedummyaccent
4946 \commondummiesnofonts
4947 %
4948 \definedummyletter\_%
4949 \definedummyletter\-%
4950 %
4951 % Non-English letters.
4952 \definedummyword\AA
4953 \definedummyword\AE
4954 \definedummyword\DH
4955 \definedummyword\L
4956 \definedummyword\O
4957 \definedummyword\OE
4958 \definedummyword\TH
4959 \definedummyword\aa
4960 \definedummyword\ae
4961 \definedummyword\dh
4962 \definedummyword\exclamdown
4963 \definedummyword\l
4964 \definedummyword\o
4965 \definedummyword\oe
4966 \definedummyword\ordf
4967 \definedummyword\ordm
4968 \definedummyword\questiondown
4969 \definedummyword\ss
4970 \definedummyword\th
4971 %
4972 % Although these internal commands shouldn't show up, sometimes they do.
4973 \definedummyword\bf
4974 \definedummyword\gtr
4975 \definedummyword\hat
4976 \definedummyword\less
4977 \definedummyword\sf
4978 \definedummyword\sl
4979 \definedummyword\tclose
4980 \definedummyword\tt
4981 %
4982 \definedummyword\LaTeX
4983 \definedummyword\TeX
4984 %
4985 % Assorted special characters.
4986 \definedummyword\atchar
4987 \definedummyword\arrow
4988 \definedummyword\bullet
4989 \definedummyword\comma
4990 \definedummyword\copyright
4991 \definedummyword\registeredsymbol
4992 \definedummyword\dots
4993 \definedummyword\enddots
4994 \definedummyword\entrybreak
4995 \definedummyword\equiv
4996 \definedummyword\error
4997 \definedummyword\euro
4998 \definedummyword\expansion
4999 \definedummyword\geq
5000 \definedummyword\guillemetleft
5001 \definedummyword\guillemetright
5002 \definedummyword\guilsinglleft
5003 \definedummyword\guilsinglright
5004 \definedummyword\lbracechar
5005 \definedummyword\leq
5006 \definedummyword\mathopsup
5007 \definedummyword\minus
5008 \definedummyword\ogonek
5009 \definedummyword\pounds
5010 \definedummyword\point
5011 \definedummyword\print
5012 \definedummyword\quotedblbase
5013 \definedummyword\quotedblleft
5014 \definedummyword\quotedblright
5015 \definedummyword\quoteleft
5016 \definedummyword\quoteright
5017 \definedummyword\quotesinglbase
5018 \definedummyword\rbracechar
5019 \definedummyword\result
5020 \definedummyword\sub
5021 \definedummyword\sup
5022 \definedummyword\textdegree
5023 %
5024 % We want to disable all macros so that they are not expanded by \write.
5025 \macrolist
5026 \let\value\dummyvalue
5027 %
5028 \normalturnoffactive
5029 }
5030
5031 % \commondummiesnofonts: common to \definedummies and \indexnofonts.
5032 % Define \commondummyletter, \commondummyaccent and \commondummyword before
5033 % using. Used for accents, font commands, and various control letters.
5034 %
5035 \def\commondummiesnofonts{%
5036 % Control letters and accents.
5037 \commondummyletter\!%
5038 \commondummyaccent\"%
5039 \commondummyaccent\'%
5040 \commondummyletter\*%
5041 \commondummyaccent\,%
5042 \commondummyletter\.%
5043 \commondummyletter\/%
5044 \commondummyletter\:%
5045 \commondummyaccent\=%
5046 \commondummyletter\?%
5047 \commondummyaccent\^%
5048 \commondummyaccent\`%
5049 \commondummyaccent\~%
5050 \commondummyword\u
5051 \commondummyword\v
5052 \commondummyword\H
5053 \commondummyword\dotaccent
5054 \commondummyword\ogonek
5055 \commondummyword\ringaccent
5056 \commondummyword\tieaccent
5057 \commondummyword\ubaraccent
5058 \commondummyword\udotaccent
5059 \commondummyword\dotless
5060 %
5061 % Texinfo font commands.
5062 \commondummyword\b
5063 \commondummyword\i
5064 \commondummyword\r
5065 \commondummyword\sansserif
5066 \commondummyword\sc
5067 \commondummyword\slanted
5068 \commondummyword\t
5069 %
5070 % Commands that take arguments.
5071 \commondummyword\abbr
5072 \commondummyword\acronym
5073 \commondummyword\anchor
5074 \commondummyword\cite
5075 \commondummyword\code
5076 \commondummyword\command
5077 \commondummyword\dfn
5078 \commondummyword\dmn
5079 \commondummyword\email
5080 \commondummyword\emph
5081 \commondummyword\env
5082 \commondummyword\file
5083 \commondummyword\image
5084 \commondummyword\indicateurl
5085 \commondummyword\inforef
5086 \commondummyword\kbd
5087 \commondummyword\key
5088 \commondummyword\math
5089 \commondummyword\option
5090 \commondummyword\pxref
5091 \commondummyword\ref
5092 \commondummyword\samp
5093 \commondummyword\strong
5094 \commondummyword\tie
5095 \commondummyword\U
5096 \commondummyword\uref
5097 \commondummyword\url
5098 \commondummyword\var
5099 \commondummyword\verb
5100 \commondummyword\w
5101 \commondummyword\xref
5102 }
5103
5104 % For testing: output @{ and @} in index sort strings as \{ and \}.
5105 \newif\ifusebracesinindexes
5106
5107 \let\indexlbrace\relax
5108 \let\indexrbrace\relax
5109
5110 {\catcode`\@=0
5111 \catcode`\\=13
5112 @gdef@backslashdisappear{@def\{}}
5113 }
5114
5115 {
5116 \catcode`\<=13
5117 \catcode`\-=13
5118 \catcode`\`=13
5119 \gdef\indexnonalnumdisappear{%
5120 \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else
5121 % @set txiindexlquoteignore makes us ignore left quotes in the sort term.
5122 % (Introduced for FSFS 2nd ed.)
5123 \let`=\empty
5124 \fi
5125 %
5126 \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else
5127 \backslashdisappear
5128 \fi
5129 %
5130 \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else
5131 \def-{}%
5132 \fi
5133 \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else
5134 \def<{}%
5135 \fi
5136 \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else
5137 \def\@{}%
5138 \fi
5139 }
5140
5141 \gdef\indexnonalnumreappear{%
5142 \useindexbackslash
5143 \let-\normaldash
5144 \let<\normalless
5145 \def\@{@}%
5146 }
5147 }
5148
5149
5150 % \indexnofonts is used when outputting the strings to sort the index
5151 % by, and when constructing control sequence names. It eliminates all
5152 % control sequences and just writes whatever the best ASCII sort string
5153 % would be for a given command (usually its argument).
5154 %
5155 \def\indexnofonts{%
5156 % Accent commands should become @asis.
5157 \def\commondummyaccent##1{\let##1\asis}%
5158 % We can just ignore other control letters.
5159 \def\commondummyletter##1{\let##1\empty}%
5160 % All control words become @asis by default; overrides below.
5161 \let\commondummyword\commondummyaccent
5162 \commondummiesnofonts
5163 %
5164 % Don't no-op \tt, since it isn't a user-level command
5165 % and is used in the definitions of the active chars like <, >, |, etc.
5166 % Likewise with the other plain tex font commands.
5167 %\let\tt=\asis
5168 %
5169 \def\ { }%
5170 \def\@{@}%
5171 \def\_{\normalunderscore}%
5172 \def\-{}% @- shouldn't affect sorting
5173 %
5174 \uccode`\1=`\{ \uppercase{\def\{{1}}%
5175 \uccode`\1=`\} \uppercase{\def\}{1}}%
5176 \let\lbracechar\{%
5177 \let\rbracechar\}%
5178 %
5179 % Non-English letters.
5180 \def\AA{AA}%
5181 \def\AE{AE}%
5182 \def\DH{DZZ}%
5183 \def\L{L}%
5184 \def\OE{OE}%
5185 \def\O{O}%
5186 \def\TH{TH}%
5187 \def\aa{aa}%
5188 \def\ae{ae}%
5189 \def\dh{dzz}%
5190 \def\exclamdown{!}%
5191 \def\l{l}%
5192 \def\oe{oe}%
5193 \def\ordf{a}%
5194 \def\ordm{o}%
5195 \def\o{o}%
5196 \def\questiondown{?}%
5197 \def\ss{ss}%
5198 \def\th{th}%
5199 %
5200 \def\LaTeX{LaTeX}%
5201 \def\TeX{TeX}%
5202 %
5203 % Assorted special characters. \defglyph gives the control sequence a
5204 % definition that removes the {} that follows its use.
5205 \defglyph\atchar{@}%
5206 \defglyph\arrow{->}%
5207 \defglyph\bullet{bullet}%
5208 \defglyph\comma{,}%
5209 \defglyph\copyright{copyright}%
5210 \defglyph\dots{...}%
5211 \defglyph\enddots{...}%
5212 \defglyph\equiv{==}%
5213 \defglyph\error{error}%
5214 \defglyph\euro{euro}%
5215 \defglyph\expansion{==>}%
5216 \defglyph\geq{>=}%
5217 \defglyph\guillemetleft{<<}%
5218 \defglyph\guillemetright{>>}%
5219 \defglyph\guilsinglleft{<}%
5220 \defglyph\guilsinglright{>}%
5221 \defglyph\leq{<=}%
5222 \defglyph\lbracechar{\{}%
5223 \defglyph\minus{-}%
5224 \defglyph\point{.}%
5225 \defglyph\pounds{pounds}%
5226 \defglyph\print{-|}%
5227 \defglyph\quotedblbase{"}%
5228 \defglyph\quotedblleft{"}%
5229 \defglyph\quotedblright{"}%
5230 \defglyph\quoteleft{`}%
5231 \defglyph\quoteright{'}%
5232 \defglyph\quotesinglbase{,}%
5233 \defglyph\rbracechar{\}}%
5234 \defglyph\registeredsymbol{R}%
5235 \defglyph\result{=>}%
5236 \defglyph\textdegree{o}%
5237 %
5238 % We need to get rid of all macros, leaving only the arguments (if present).
5239 % Of course this is not nearly correct, but it is the best we can do for now.
5240 % makeinfo does not expand macros in the argument to @deffn, which ends up
5241 % writing an index entry, and texindex isn't prepared for an index sort entry
5242 % that starts with \.
5243 %
5244 % Since macro invocations are followed by braces, we can just redefine them
5245 % to take a single TeX argument. The case of a macro invocation that
5246 % goes to end-of-line is not handled.
5247 %
5248 \macrolist
5249 \let\value\indexnofontsvalue
5250 }
5251 \def\defglyph#1#2{\def#1##1{#2}} % see above
5252
5253
5254
5255
5256 \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
5257
5258 % Most index entries go through here, but \dosubind is the general case.
5259 % #1 is the index name, #2 is the entry text.
5260 \def\doind#1#2{\dosubind{#1}{#2}{}}
5261
5262 % There is also \dosubind {index}{topic}{subtopic}
5263 % which makes an entry in a two-level index such as the operation index.
5264 % TODO: Two-level index? Operation index?
5265
5266 % Workhorse for all indexes.
5267 % #1 is name of index, #2 is stuff to put there, #3 is subentry --
5268 % empty if called from \doind, as we usually are (the main exception
5269 % is with most defuns, which call us directly).
5270 %
5271 \def\dosubind#1#2#3{%
5272 \iflinks
5273 {%
5274 \requireopenindexfile{#1}%
5275 % Store the main index entry text (including the third arg).
5276 \toks0 = {#2}%
5277 % If third arg is present, precede it with a space.
5278 \def\thirdarg{#3}%
5279 \ifx\thirdarg\empty \else
5280 \toks0 = \expandafter{\the\toks0 \space #3}%
5281 \fi
5282 %
5283 \edef\writeto{\csname#1indfile\endcsname}%
5284 %
5285 \safewhatsit\dosubindwrite
5286 }%
5287 \fi
5288 }
5289
5290 % Check if an index file has been opened, and if not, open it.
5291 \def\requireopenindexfile#1{%
5292 \ifnum\csname #1indfile\endcsname=0
5293 \expandafter\newwrite \csname#1indfile\endcsname
5294 \edef\suffix{#1}%
5295 % A .fls suffix would conflict with the file extension for the output
5296 % of -recorder, so use .f1s instead.
5297 \ifx\suffix\indexisfl\def\suffix{f1}\fi
5298 % Open the file
5299 \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
5300 % Using \immediate above here prevents an object entering into the current
5301 % box, which could confound checks such as those in \safewhatsit for
5302 % preceding skips.
5303 \typeout{Writing index file \jobname.\suffix}%
5304 \fi}
5305 \def\indexisfl{fl}
5306
5307 % Output \ as {\indexbackslash}, because \ is an escape character in
5308 % the index files.
5309 \let\indexbackslash=\relax
5310 {\catcode`\@=0 \catcode`\\=\active
5311 @gdef@useindexbackslash{@def\{{@indexbackslash}}}
5312 }
5313
5314 % Definition for writing index entry text.
5315 \def\sortas#1{\ignorespaces}%
5316
5317 % Definition for writing index entry sort key. Should occur at the at
5318 % the beginning of the index entry, like
5319 % @cindex @sortas{september} \september
5320 % The \ignorespaces takes care of following space, but there's no way
5321 % to remove space before it.
5322 {
5323 \catcode`\-=13
5324 \gdef\indexwritesortas{%
5325 \begingroup
5326 \indexnonalnumreappear
5327 \indexwritesortasxxx}
5328 \gdef\indexwritesortasxxx#1{%
5329 \xdef\indexsortkey{#1}\endgroup}
5330 }
5331
5332
5333 % Write the entry in \toks0 to the index file.
5334 %
5335 \def\dosubindwrite{%
5336 % Put the index entry in the margin if desired.
5337 \ifx\SETmarginindex\relax\else
5338 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
5339 \fi
5340 %
5341 % Remember, we are within a group.
5342 \indexdummies % Must do this here, since \bf, etc expand at this stage
5343 \useindexbackslash % \indexbackslash isn't defined now so it will be output
5344 % as is; and it will print as backslash.
5345 % The braces around \indexbrace are recognized by texindex.
5346 %
5347 % Get the string to sort by, by processing the index entry with all
5348 % font commands turned off.
5349 {\indexnofonts
5350 \def\lbracechar{{\indexlbrace}}%
5351 \def\rbracechar{{\indexrbrace}}%
5352 \let\{=\lbracechar
5353 \let\}=\rbracechar
5354 \indexnonalnumdisappear
5355 \xdef\indexsortkey{}%
5356 \let\sortas=\indexwritesortas
5357 \edef\temp{\the\toks0}%
5358 \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas
5359 \ifx\indexsortkey\empty
5360 \xdef\indexsortkey{\temp}%
5361 \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
5362 \fi
5363 }%
5364 %
5365 % Set up the complete index entry, with both the sort key and
5366 % the original text, including any font commands. We write
5367 % three arguments to \entry to the .?? file (four in the
5368 % subentry case), texindex reduces to two when writing the .??s
5369 % sorted result.
5370 \edef\temp{%
5371 \write\writeto{%
5372 \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
5373 }%
5374 \temp
5375 }
5376 \newbox\dummybox % used above
5377
5378 % Take care of unwanted page breaks/skips around a whatsit:
5379 %
5380 % If a skip is the last thing on the list now, preserve it
5381 % by backing up by \lastskip, doing the \write, then inserting
5382 % the skip again. Otherwise, the whatsit generated by the
5383 % \write or \pdfdest will make \lastskip zero. The result is that
5384 % sequences like this:
5385 % @end defun
5386 % @tindex whatever
5387 % @defun ...
5388 % will have extra space inserted, because the \medbreak in the
5389 % start of the @defun won't see the skip inserted by the @end of
5390 % the previous defun.
5391 %
5392 % But don't do any of this if we're not in vertical mode. We
5393 % don't want to do a \vskip and prematurely end a paragraph.
5394 %
5395 % Avoid page breaks due to these extra skips, too.
5396 %
5397 % But wait, there is a catch there:
5398 % We'll have to check whether \lastskip is zero skip. \ifdim is not
5399 % sufficient for this purpose, as it ignores stretch and shrink parts
5400 % of the skip. The only way seems to be to check the textual
5401 % representation of the skip.
5402 %
5403 % The following is almost like \def\zeroskipmacro{0.0pt} except that
5404 % the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
5405 %
5406 \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
5407 %
5408 \newskip\whatsitskip
5409 \newcount\whatsitpenalty
5410 %
5411 % ..., ready, GO:
5412 %
5413 \def\safewhatsit#1{\ifhmode
5414 #1%
5415 \else
5416 % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
5417 \whatsitskip = \lastskip
5418 \edef\lastskipmacro{\the\lastskip}%
5419 \whatsitpenalty = \lastpenalty
5420 %
5421 % If \lastskip is nonzero, that means the last item was a
5422 % skip. And since a skip is discardable, that means this
5423 % -\whatsitskip glue we're inserting is preceded by a
5424 % non-discardable item, therefore it is not a potential
5425 % breakpoint, therefore no \nobreak needed.
5426 \ifx\lastskipmacro\zeroskipmacro
5427 \else
5428 \vskip-\whatsitskip
5429 \fi
5430 %
5431 #1%
5432 %
5433 \ifx\lastskipmacro\zeroskipmacro
5434 % If \lastskip was zero, perhaps the last item was a penalty, and
5435 % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
5436 % to re-insert the same penalty (values >10000 are used for various
5437 % signals); since we just inserted a non-discardable item, any
5438 % following glue (such as a \parskip) would be a breakpoint. For example:
5439 % @deffn deffn-whatever
5440 % @vindex index-whatever
5441 % Description.
5442 % would allow a break between the index-whatever whatsit
5443 % and the "Description." paragraph.
5444 \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
5445 \else
5446 % On the other hand, if we had a nonzero \lastskip,
5447 % this make-up glue would be preceded by a non-discardable item
5448 % (the whatsit from the \write), so we must insert a \nobreak.
5449 \nobreak\vskip\whatsitskip
5450 \fi
5451 \fi}
5452
5453 % The index entry written in the file actually looks like
5454 % \entry {sortstring}{page}{topic}
5455 % or
5456 % \entry {sortstring}{page}{topic}{subtopic}
5457 % The texindex program reads in these files and writes files
5458 % containing these kinds of lines:
5459 % \initial {c}
5460 % before the first topic whose initial is c
5461 % \entry {topic}{pagelist}
5462 % for a topic that is used without subtopics
5463 % \primary {topic}
5464 % for the beginning of a topic that is used with subtopics
5465 % \secondary {subtopic}{pagelist}
5466 % for each subtopic.
5467
5468 % Define the user-accessible indexing commands
5469 % @findex, @vindex, @kindex, @cindex.
5470
5471 \def\findex {\fnindex}
5472 \def\kindex {\kyindex}
5473 \def\cindex {\cpindex}
5474 \def\vindex {\vrindex}
5475 \def\tindex {\tpindex}
5476 \def\pindex {\pgindex}
5477
5478 \def\cindexsub {\begingroup\obeylines\cindexsub}
5479 {\obeylines %
5480 \gdef\cindexsub "#1" #2^^M{\endgroup %
5481 \dosubind{cp}{#2}{#1}}}
5482
5483 % Define the macros used in formatting output of the sorted index material.
5484
5485 % @printindex causes a particular index (the ??s file) to get printed.
5486 % It does not print any chapter heading (usually an @unnumbered).
5487 %
5488 \parseargdef\printindex{\begingroup
5489 \dobreak \chapheadingskip{10000}%
5490 %
5491 \smallfonts \rm
5492 \tolerance = 9500
5493 \plainfrenchspacing
5494 \everypar = {}% don't want the \kern\-parindent from indentation suppression.
5495 %
5496 % See if the index file exists and is nonempty.
5497 % Change catcode of @ here so that if the index file contains
5498 % \initial {@}
5499 % as its first line, TeX doesn't complain about mismatched braces
5500 % (because it thinks @} is a control sequence).
5501 \catcode`\@ = 12
5502 % See comment in \requireopenindexfile.
5503 \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
5504 \openin 1 \jobname.\indexname s
5505 \ifeof 1
5506 % \enddoublecolumns gets confused if there is no text in the index,
5507 % and it loses the chapter title and the aux file entries for the
5508 % index. The easiest way to prevent this problem is to make sure
5509 % there is some text.
5510 \putwordIndexNonexistent
5511 \typeout{No file \jobname.\indexname s.}%
5512 \else
5513 \catcode`\\ = 0
5514 %
5515 % If the index file exists but is empty, then \openin leaves \ifeof
5516 % false. We have to make TeX try to read something from the file, so
5517 % it can discover if there is anything in it.
5518 \read 1 to \thisline
5519 \ifeof 1
5520 \putwordIndexIsEmpty
5521 \else
5522 % Index files are almost Texinfo source, but we use \ as the escape
5523 % character. It would be better to use @, but that's too big a change
5524 % to make right now.
5525 \def\indexbackslash{\ttbackslash}%
5526 \let\indexlbrace\{ % Likewise, set these sequences for braces
5527 \let\indexrbrace\} % used in the sort key.
5528 \begindoublecolumns
5529 \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty
5530 %
5531 % Read input from the index file line by line.
5532 \loopdo
5533 \ifeof1 \else
5534 \read 1 to \nextline
5535 \fi
5536 %
5537 \indexinputprocessing
5538 \thisline
5539 %
5540 \ifeof1\else
5541 \let\thisline\nextline
5542 \repeat
5543 %%
5544 \enddoublecolumns
5545 \fi
5546 \fi
5547 \closein 1
5548 \endgroup}
5549 \def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
5550 \def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
5551
5552 \def\indexinputprocessing{%
5553 \ifeof1
5554 \let\firsttoken\relax
5555 \else
5556 \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
5557 \act
5558 \fi
5559 }
5560 \def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
5561 \long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
5562
5563
5564 % These macros are used by the sorted index file itself.
5565 % Change them to control the appearance of the index.
5566
5567 {\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13
5568 \catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13
5569 \catcode`\$=3
5570 \gdef\initialglyphs{%
5571 % Some changes for non-alphabetic characters. Using the glyphs from the
5572 % math fonts looks more consistent than the typewriter font used elsewhere
5573 % for these characters.
5574 \def\indexbackslash{\math{\backslash}}%
5575 \let\\=\indexbackslash
5576 %
5577 % Can't get bold backslash so don't use bold forward slash
5578 \catcode`\/=13
5579 \def/{{\secrmnotbold \normalslash}}%
5580 \def-{{\normaldash\normaldash}}% en dash `--'
5581 \def^{{\chapbf \normalcaret}}%
5582 \def~{{\chapbf \normaltilde}}%
5583 \def\_{%
5584 \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }%
5585 \def|{$\vert$}%
5586 \def<{$\less$}%
5587 \def>{$\gtr$}%
5588 \def+{$\normalplus$}%
5589 }}
5590
5591 \def\initial{%
5592 \bgroup
5593 \initialglyphs
5594 \initialx
5595 }
5596
5597 \def\initialx#1{%
5598 % Remove any glue we may have, we'll be inserting our own.
5599 \removelastskip
5600 %
5601 % We like breaks before the index initials, so insert a bonus.
5602 % The glue before the bonus allows a little bit of space at the
5603 % bottom of a column to reduce an increase in inter-line spacing.
5604 \nobreak
5605 \vskip 0pt plus 5\baselineskip
5606 \penalty -300
5607 \vskip 0pt plus -5\baselineskip
5608 %
5609 % Typeset the initial. Making this add up to a whole number of
5610 % baselineskips increases the chance of the dots lining up from column
5611 % to column. It still won't often be perfect, because of the stretch
5612 % we need before each entry, but it's better.
5613 %
5614 % No shrink because it confuses \balancecolumns.
5615 \vskip 1.67\baselineskip plus 1\baselineskip
5616 \leftline{\secfonts \kern-0.05em \secbf #1}%
5617 % \secfonts is inside the argument of \leftline so that the change of
5618 % \baselineskip will not affect any glue inserted before the vbox that
5619 % \leftline creates.
5620 % Do our best not to break after the initial.
5621 \nobreak
5622 \vskip .33\baselineskip plus .1\baselineskip
5623 \egroup % \initialglyphs
5624 }
5625
5626 \newdimen\entryrightmargin
5627 \entryrightmargin=0pt
5628
5629 % \entry typesets a paragraph consisting of the text (#1), dot leaders, and
5630 % then page number (#2) flushed to the right margin. It is used for index
5631 % and table of contents entries. The paragraph is indented by \leftskip.
5632 %
5633 \def\entry{%
5634 \begingroup
5635 %
5636 % For pdfTeX and XeTeX.
5637 % The redefinition of \domark stops marks being added in \pdflink to
5638 % preserve coloured links across page boundaries. Otherwise the marks
5639 % would get in the way of \lastbox in \insertentrybox.
5640 \let\domark\relax
5641 %
5642 % Start a new paragraph if necessary, so our assignments below can't
5643 % affect previous text.
5644 \par
5645 %
5646 % No extra space above this paragraph.
5647 \parskip = 0in
5648 %
5649 % When reading the text of entry, convert explicit line breaks
5650 % from @* into spaces. The user might give these in long section
5651 % titles, for instance.
5652 \def\*{\unskip\space\ignorespaces}%
5653 \def\entrybreak{\hfil\break}% An undocumented command
5654 %
5655 % Swallow the left brace of the text (first parameter):
5656 \afterassignment\doentry
5657 \let\temp =
5658 }
5659 \def\entrybreak{\unskip\space\ignorespaces}%
5660 \def\doentry{%
5661 % Save the text of the entry
5662 \global\setbox\boxA=\hbox\bgroup
5663 \bgroup % Instead of the swallowed brace.
5664 \noindent
5665 \aftergroup\finishentry
5666 % And now comes the text of the entry.
5667 % Not absorbing as a macro argument reduces the chance of problems
5668 % with catcodes occurring.
5669 }
5670 {\catcode`\@=11
5671 \gdef\finishentry#1{%
5672 \egroup % end box A
5673 \dimen@ = \wd\boxA % Length of text of entry
5674 \global\setbox\boxA=\hbox\bgroup\unhbox\boxA
5675 % #1 is the page number.
5676 %
5677 % Get the width of the page numbers, and only use
5678 % leaders if they are present.
5679 \global\setbox\boxB = \hbox{#1}%
5680 \ifdim\wd\boxB = 0pt
5681 \null\nobreak\hfill\ %
5682 \else
5683 %
5684 \null\nobreak\indexdotfill % Have leaders before the page number.
5685 %
5686 \ifpdf
5687 \pdfgettoks#1.%
5688 \hskip\skip\thinshrinkable\the\toksA
5689 \else
5690 \ifx\XeTeXrevision\thisisundefined
5691 \hskip\skip\thinshrinkable #1%
5692 \else
5693 \pdfgettoks#1.%
5694 \hskip\skip\thinshrinkable\the\toksA
5695 \fi
5696 \fi
5697 \fi
5698 \egroup % end \boxA
5699 \ifdim\wd\boxB = 0pt
5700 \global\setbox\entrybox=\vbox{\unhbox\boxA}%
5701 \else
5702 \global\setbox\entrybox=\vbox\bgroup
5703 % We want the text of the entries to be aligned to the left, and the
5704 % page numbers to be aligned to the right.
5705 %
5706 \parindent = 0pt
5707 \advance\leftskip by 0pt plus 1fil
5708 \advance\leftskip by 0pt plus -1fill
5709 \rightskip = 0pt plus -1fil
5710 \advance\rightskip by 0pt plus 1fill
5711 % Cause last line, which could consist of page numbers on their own
5712 % if the list of page numbers is long, to be aligned to the right.
5713 \parfillskip=0pt plus -1fill
5714 %
5715 \advance\rightskip by \entryrightmargin
5716 % Determine how far we can stretch into the margin.
5717 % This allows, e.g., "Appendix H GNU Free Documentation License" to
5718 % fit on one line in @letterpaper format.
5719 \ifdim\entryrightmargin>2.1em
5720 \dimen@i=2.1em
5721 \else
5722 \dimen@i=0em
5723 \fi
5724 \advance \parfillskip by 0pt minus 1\dimen@i
5725 %
5726 \dimen@ii = \hsize
5727 \advance\dimen@ii by -1\leftskip
5728 \advance\dimen@ii by -1\entryrightmargin
5729 \advance\dimen@ii by 1\dimen@i
5730 \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
5731 \ifdim\dimen@ > 0.8\dimen@ii % due to long index text
5732 % Try to split the text roughly evenly. \dimen@ will be the length of
5733 % the first line.
5734 \dimen@ = 0.7\dimen@
5735 \dimen@ii = \hsize
5736 \ifnum\dimen@>\dimen@ii
5737 % If the entry is too long (for example, if it needs more than
5738 % two lines), use all the space in the first line.
5739 \dimen@ = \dimen@ii
5740 \fi
5741 \advance\leftskip by 0pt plus 1fill % ragged right
5742 \advance \dimen@ by 1\rightskip
5743 \parshape = 2 0pt \dimen@ 0em \dimen@ii
5744 % Ideally we'd add a finite glue at the end of the first line only,
5745 % instead of using \parshape with explicit line lengths, but TeX
5746 % doesn't seem to provide a way to do such a thing.
5747 %
5748 % Indent all lines but the first one.
5749 \advance\leftskip by 1em
5750 \advance\parindent by -1em
5751 \fi\fi
5752 \indent % start paragraph
5753 \unhbox\boxA
5754 %
5755 % Do not prefer a separate line ending with a hyphen to fewer lines.
5756 \finalhyphendemerits = 0
5757 %
5758 % Word spacing - no stretch
5759 \spaceskip=\fontdimen2\font minus \fontdimen4\font
5760 %
5761 \linepenalty=1000 % Discourage line breaks.
5762 \hyphenpenalty=5000 % Discourage hyphenation.
5763 %
5764 \par % format the paragraph
5765 \egroup % The \vbox
5766 \fi
5767 \endgroup
5768 \dotheinsertentrybox
5769 }}
5770
5771 \newskip\thinshrinkable
5772 \skip\thinshrinkable=.15em minus .15em
5773
5774 \newbox\entrybox
5775 \def\insertentrybox{%
5776 \ourunvbox\entrybox
5777 }
5778
5779 % default definition
5780 \let\dotheinsertentrybox\insertentrybox
5781
5782 % Use \lastbox to take apart vbox box by box, and add each sub-box
5783 % to the current vertical list.
5784 \def\ourunvbox#1{%
5785 \bgroup % for local binding of \delayedbox
5786 % Remove the last box from box #1
5787 \global\setbox#1=\vbox{%
5788 \unvbox#1%
5789 \unskip % remove any glue
5790 \unpenalty
5791 \global\setbox\interbox=\lastbox
5792 }%
5793 \setbox\delayedbox=\box\interbox
5794 \ifdim\ht#1=0pt\else
5795 \ourunvbox#1 % Repeat on what's left of the box
5796 \nobreak
5797 \fi
5798 \box\delayedbox
5799 \egroup
5800 }
5801 \newbox\delayedbox
5802 \newbox\interbox
5803
5804 % Used from \printindex. \firsttoken should be the first token
5805 % after the \entry. If it's not another \entry, we are at the last
5806 % line of a group of index entries, so insert a penalty to discourage
5807 % widowed index entries.
5808 \def\dotheinsertentryboxwithpenalty{%
5809 \ifx\firsttoken\isentry
5810 \else
5811 \penalty 9000
5812 \fi
5813 \insertentrybox
5814 }
5815 \def\isentry{\entry}%
5816
5817 % Like plain.tex's \dotfill, except uses up at least 1 em.
5818 % The filll stretch here overpowers both the fil and fill stretch to push
5819 % the page number to the right.
5820 \def\indexdotfill{\cleaders
5821 \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll}
5822
5823
5824 \def\primary #1{\line{#1\hfil}}
5825
5826 \newskip\secondaryindent \secondaryindent=0.5cm
5827 \def\secondary#1#2{{%
5828 \parfillskip=0in
5829 \parskip=0in
5830 \hangindent=1in
5831 \hangafter=1
5832 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
5833 \ifpdf
5834 \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
5835 \else
5836 \ifx\XeTeXrevision\thisisundefined
5837 #2
5838 \else
5839 \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
5840 \fi
5841 \fi
5842 \par
5843 }}
5844
5845 % Define two-column mode, which we use to typeset indexes.
5846 % Adapted from the TeXbook, page 416, which is to say,
5847 % the manmac.tex format used to print the TeXbook itself.
5848 \catcode`\@=11 % private names
5849
5850 \newbox\partialpage
5851 \newdimen\doublecolumnhsize
5852
5853 % Use inside an output routine to save \topmark and \firstmark
5854 \def\savemarks{%
5855 \global\savedtopmark=\expandafter{\topmark }%
5856 \global\savedfirstmark=\expandafter{\firstmark }%
5857 }
5858 \newtoks\savedtopmark
5859 \newtoks\savedfirstmark
5860
5861 % Set \topmark and \firstmark for next time \output runs.
5862 % Can't be run from withinside \output (because any material
5863 % added while an output routine is active, including
5864 % penalties, is saved for after it finishes). The page so far
5865 % should be empty, otherwise what's on it will be thrown away.
5866 \def\restoremarks{%
5867 \mark{\the\savedtopmark}%
5868 \bgroup\output = {%
5869 \setbox\dummybox=\box\PAGE
5870 }abc\eject\egroup
5871 % "abc" because output routine doesn't fire for a completely empty page.
5872 \mark{\the\savedfirstmark}%
5873 }
5874
5875 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
5876 % If not much space left on page, start a new page.
5877 \ifdim\pagetotal>0.8\vsize\vfill\eject\fi
5878 %
5879 % Grab any single-column material above us.
5880 \output = {%
5881 %
5882 % Here is a possibility not foreseen in manmac: if we accumulate a
5883 % whole lot of material, we might end up calling this \output
5884 % routine twice in a row (see the doublecol-lose test, which is
5885 % essentially a couple of indexes with @setchapternewpage off). In
5886 % that case we just ship out what is in \partialpage with the normal
5887 % output routine. Generally, \partialpage will be empty when this
5888 % runs and this will be a no-op. See the indexspread.tex test case.
5889 \ifvoid\partialpage \else
5890 \onepageout{\pagecontents\partialpage}%
5891 \fi
5892 %
5893 \global\setbox\partialpage = \vbox{%
5894 % Unvbox the main output page.
5895 \unvbox\PAGE
5896 \kern-\topskip \kern\baselineskip
5897 }%
5898 \savemarks
5899 }%
5900 \eject % run that output routine to set \partialpage
5901 \restoremarks
5902 %
5903 % We recover the two marks that the last output routine saved in order
5904 % to propagate the information in marks added around a chapter heading,
5905 % which could be otherwise be lost by the time the final page is output.
5906 %
5907 %
5908 % Use the double-column output routine for subsequent pages.
5909 \output = {\doublecolumnout}%
5910 %
5911 % Change the page size parameters. We could do this once outside this
5912 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
5913 % format, but then we repeat the same computation. Repeating a couple
5914 % of assignments once per index is clearly meaningless for the
5915 % execution time, so we may as well do it in one place.
5916 %
5917 % First we halve the line length, less a little for the gutter between
5918 % the columns. We compute the gutter based on the line length, so it
5919 % changes automatically with the paper format. The magic constant
5920 % below is chosen so that the gutter has the same value (well, +-<1pt)
5921 % as it did when we hard-coded it.
5922 %
5923 % We put the result in a separate register, \doublecolumhsize, so we
5924 % can restore it in \pagesofar, after \hsize itself has (potentially)
5925 % been clobbered.
5926 %
5927 \doublecolumnhsize = \hsize
5928 \advance\doublecolumnhsize by -.04154\hsize
5929 \divide\doublecolumnhsize by 2
5930 \hsize = \doublecolumnhsize
5931 %
5932 % Double the \vsize as well.
5933 \advance\vsize by -\ht\partialpage
5934 \vsize = 2\vsize
5935 %
5936 % For the benefit of balancing columns
5937 \advance\baselineskip by 0pt plus 0.5pt
5938 }
5939
5940 % The double-column output routine for all double-column pages except
5941 % the last, which is done by \balancecolumns.
5942 %
5943 \def\doublecolumnout{%
5944 %
5945 \splittopskip=\topskip \splitmaxdepth=\maxdepth
5946 % Get the available space for the double columns -- the normal
5947 % (undoubled) page height minus any material left over from the
5948 % previous page.
5949 \dimen@ = \vsize
5950 \divide\dimen@ by 2
5951 %
5952 % box0 will be the left-hand column, box2 the right.
5953 \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@
5954 \global\advance\vsize by 2\ht\partialpage
5955 \onepageout\pagesofar
5956 \unvbox\PAGE
5957 \penalty\outputpenalty
5958 }
5959 %
5960 % Re-output the contents of the output page -- any previous material,
5961 % followed by the two boxes we just split, in box0 and box2.
5962 \def\pagesofar{%
5963 \unvbox\partialpage
5964 %
5965 \hsize = \doublecolumnhsize
5966 \wd0=\hsize \wd2=\hsize
5967 \hbox to\txipagewidth{\box0\hfil\box2}%
5968 }
5969
5970
5971 % Finished with with double columns.
5972 \def\enddoublecolumns{%
5973 % The following penalty ensures that the page builder is exercised
5974 % _before_ we change the output routine. This is necessary in the
5975 % following situation:
5976 %
5977 % The last section of the index consists only of a single entry.
5978 % Before this section, \pagetotal is less than \pagegoal, so no
5979 % break occurs before the last section starts. However, the last
5980 % section, consisting of \initial and the single \entry, does not
5981 % fit on the page and has to be broken off. Without the following
5982 % penalty the page builder will not be exercised until \eject
5983 % below, and by that time we'll already have changed the output
5984 % routine to the \balancecolumns version, so the next-to-last
5985 % double-column page will be processed with \balancecolumns, which
5986 % is wrong: The two columns will go to the main vertical list, with
5987 % the broken-off section in the recent contributions. As soon as
5988 % the output routine finishes, TeX starts reconsidering the page
5989 % break. The two columns and the broken-off section both fit on the
5990 % page, because the two columns now take up only half of the page
5991 % goal. When TeX sees \eject from below which follows the final
5992 % section, it invokes the new output routine that we've set after
5993 % \balancecolumns below; \onepageout will try to fit the two columns
5994 % and the final section into the vbox of \txipageheight (see
5995 % \pagebody), causing an overfull box.
5996 %
5997 % Note that glue won't work here, because glue does not exercise the
5998 % page builder, unlike penalties (see The TeXbook, pp. 280-281).
5999 \penalty0
6000 %
6001 \output = {%
6002 % Split the last of the double-column material.
6003 \savemarks
6004 \balancecolumns
6005 }%
6006 \eject % call the \output just set
6007 \ifdim\pagetotal=0pt
6008 % Having called \balancecolumns once, we do not
6009 % want to call it again. Therefore, reset \output to its normal
6010 % definition right away.
6011 \global\output = {\onepageout{\pagecontents\PAGE}}%
6012 %
6013 \endgroup % started in \begindoublecolumns
6014 \restoremarks
6015 % Leave the double-column material on the current page, no automatic
6016 % page break.
6017 \box\balancedcolumns
6018 %
6019 % \pagegoal was set to the doubled \vsize above, since we restarted
6020 % the current page. We're now back to normal single-column
6021 % typesetting, so reset \pagegoal to the normal \vsize.
6022 \global\vsize = \txipageheight %
6023 \pagegoal = \txipageheight %
6024 \else
6025 % We had some left-over material. This might happen when \doublecolumnout
6026 % is called in \balancecolumns. Try again.
6027 \expandafter\enddoublecolumns
6028 \fi
6029 }
6030 \newbox\balancedcolumns
6031 \setbox\balancedcolumns=\vbox{shouldnt see this}%
6032 %
6033 % Only called for the last of the double column material. \doublecolumnout
6034 % does the others.
6035 \def\balancecolumns{%
6036 \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
6037 \dimen@ = \ht0
6038 \advance\dimen@ by \topskip
6039 \advance\dimen@ by-\baselineskip
6040 \ifdim\dimen@<5\baselineskip
6041 % Don't split a short final column in two.
6042 \setbox2=\vbox{}%
6043 \global\setbox\balancedcolumns=\vbox{\pagesofar}%
6044 \else
6045 \divide\dimen@ by 2 % target to split to
6046 \dimen@ii = \dimen@
6047 \splittopskip = \topskip
6048 % Loop until left column is at least as high as the right column.
6049 {%
6050 \vbadness = 10000
6051 \loop
6052 \global\setbox3 = \copy0
6053 \global\setbox1 = \vsplit3 to \dimen@
6054 \ifdim\ht1<\ht3
6055 \global\advance\dimen@ by 1pt
6056 \repeat
6057 }%
6058 % Now the left column is in box 1, and the right column in box 3.
6059 %
6060 % Check whether the left column has come out higher than the page itself.
6061 % (Note that we have doubled \vsize for the double columns, so
6062 % the actual height of the page is 0.5\vsize).
6063 \ifdim2\ht1>\vsize
6064 % It appears that we have been called upon to balance too much material.
6065 % Output some of it with \doublecolumnout, leaving the rest on the page.
6066 \setbox\PAGE=\box0
6067 \doublecolumnout
6068 \else
6069 % Compare the heights of the two columns.
6070 \ifdim4\ht1>5\ht3
6071 % Column heights are too different, so don't make their bottoms
6072 % flush with each other.
6073 \setbox2=\vbox to \ht1 {\unvbox3\vfill}%
6074 \setbox0=\vbox to \ht1 {\unvbox1\vfill}%
6075 \else
6076 % Make column bottoms flush with each other.
6077 \setbox2=\vbox to\ht1{\unvbox3\unskip}%
6078 \setbox0=\vbox to\ht1{\unvbox1\unskip}%
6079 \fi
6080 \global\setbox\balancedcolumns=\vbox{\pagesofar}%
6081 \fi
6082 \fi
6083 %
6084 }
6085 \catcode`\@ = \other
6086
6087
6088 \message{sectioning,}
6089 % Chapters, sections, etc.
6090
6091 % Let's start with @part.
6092 \outer\parseargdef\part{\partzzz{#1}}
6093 \def\partzzz#1{%
6094 \chapoddpage
6095 \null
6096 \vskip.3\vsize % move it down on the page a bit
6097 \begingroup
6098 \noindent \titlefonts\rm #1\par % the text
6099 \let\lastnode=\empty % no node to associate with
6100 \writetocentry{part}{#1}{}% but put it in the toc
6101 \headingsoff % no headline or footline on the part page
6102 % This outputs a mark at the end of the page that clears \thischapter
6103 % and \thissection, as is done in \startcontents.
6104 \let\pchapsepmacro\relax
6105 \chapmacro{}{Yomitfromtoc}{}%
6106 \chapoddpage
6107 \endgroup
6108 }
6109
6110 % \unnumberedno is an oxymoron. But we count the unnumbered
6111 % sections so that we can refer to them unambiguously in the pdf
6112 % outlines by their "section number". We avoid collisions with chapter
6113 % numbers by starting them at 10000. (If a document ever has 10000
6114 % chapters, we're in trouble anyway, I'm sure.)
6115 \newcount\unnumberedno \unnumberedno = 10000
6116 \newcount\chapno
6117 \newcount\secno \secno=0
6118 \newcount\subsecno \subsecno=0
6119 \newcount\subsubsecno \subsubsecno=0
6120
6121 % This counter is funny since it counts through charcodes of letters A, B, ...
6122 \newcount\appendixno \appendixno = `\@
6123 %
6124 % \def\appendixletter{\char\the\appendixno}
6125 % We do the following ugly conditional instead of the above simple
6126 % construct for the sake of pdftex, which needs the actual
6127 % letter in the expansion, not just typeset.
6128 %
6129 \def\appendixletter{%
6130 \ifnum\appendixno=`A A%
6131 \else\ifnum\appendixno=`B B%
6132 \else\ifnum\appendixno=`C C%
6133 \else\ifnum\appendixno=`D D%
6134 \else\ifnum\appendixno=`E E%
6135 \else\ifnum\appendixno=`F F%
6136 \else\ifnum\appendixno=`G G%
6137 \else\ifnum\appendixno=`H H%
6138 \else\ifnum\appendixno=`I I%
6139 \else\ifnum\appendixno=`J J%
6140 \else\ifnum\appendixno=`K K%
6141 \else\ifnum\appendixno=`L L%
6142 \else\ifnum\appendixno=`M M%
6143 \else\ifnum\appendixno=`N N%
6144 \else\ifnum\appendixno=`O O%
6145 \else\ifnum\appendixno=`P P%
6146 \else\ifnum\appendixno=`Q Q%
6147 \else\ifnum\appendixno=`R R%
6148 \else\ifnum\appendixno=`S S%
6149 \else\ifnum\appendixno=`T T%
6150 \else\ifnum\appendixno=`U U%
6151 \else\ifnum\appendixno=`V V%
6152 \else\ifnum\appendixno=`W W%
6153 \else\ifnum\appendixno=`X X%
6154 \else\ifnum\appendixno=`Y Y%
6155 \else\ifnum\appendixno=`Z Z%
6156 % The \the is necessary, despite appearances, because \appendixletter is
6157 % expanded while writing the .toc file. \char\appendixno is not
6158 % expandable, thus it is written literally, thus all appendixes come out
6159 % with the same letter (or @) in the toc without it.
6160 \else\char\the\appendixno
6161 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
6162 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
6163
6164 % Each @chapter defines these (using marks) as the number+name, number
6165 % and name of the chapter. Page headings and footings can use
6166 % these. @section does likewise.
6167 \def\thischapter{}
6168 \def\thischapternum{}
6169 \def\thischaptername{}
6170 \def\thissection{}
6171 \def\thissectionnum{}
6172 \def\thissectionname{}
6173
6174 \newcount\absseclevel % used to calculate proper heading level
6175 \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
6176
6177 % @raisesections: treat @section as chapter, @subsection as section, etc.
6178 \def\raisesections{\global\advance\secbase by -1}
6179 \let\up=\raisesections % original BFox name
6180
6181 % @lowersections: treat @chapter as section, @section as subsection, etc.
6182 \def\lowersections{\global\advance\secbase by 1}
6183 \let\down=\lowersections % original BFox name
6184
6185 % we only have subsub.
6186 \chardef\maxseclevel = 3
6187 %
6188 % A numbered section within an unnumbered changes to unnumbered too.
6189 % To achieve this, remember the "biggest" unnum. sec. we are currently in:
6190 \chardef\unnlevel = \maxseclevel
6191 %
6192 % Trace whether the current chapter is an appendix or not:
6193 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
6194 \def\chapheadtype{N}
6195
6196 % Choose a heading macro
6197 % #1 is heading type
6198 % #2 is heading level
6199 % #3 is text for heading
6200 \def\genhead#1#2#3{%
6201 % Compute the abs. sec. level:
6202 \absseclevel=#2
6203 \advance\absseclevel by \secbase
6204 % Make sure \absseclevel doesn't fall outside the range:
6205 \ifnum \absseclevel < 0
6206 \absseclevel = 0
6207 \else
6208 \ifnum \absseclevel > 3
6209 \absseclevel = 3
6210 \fi
6211 \fi
6212 % The heading type:
6213 \def\headtype{#1}%
6214 \if \headtype U%
6215 \ifnum \absseclevel < \unnlevel
6216 \chardef\unnlevel = \absseclevel
6217 \fi
6218 \else
6219 % Check for appendix sections:
6220 \ifnum \absseclevel = 0
6221 \edef\chapheadtype{\headtype}%
6222 \else
6223 \if \headtype A\if \chapheadtype N%
6224 \errmessage{@appendix... within a non-appendix chapter}%
6225 \fi\fi
6226 \fi
6227 % Check for numbered within unnumbered:
6228 \ifnum \absseclevel > \unnlevel
6229 \def\headtype{U}%
6230 \else
6231 \chardef\unnlevel = 3
6232 \fi
6233 \fi
6234 % Now print the heading:
6235 \if \headtype U%
6236 \ifcase\absseclevel
6237 \unnumberedzzz{#3}%
6238 \or \unnumberedseczzz{#3}%
6239 \or \unnumberedsubseczzz{#3}%
6240 \or \unnumberedsubsubseczzz{#3}%
6241 \fi
6242 \else
6243 \if \headtype A%
6244 \ifcase\absseclevel
6245 \appendixzzz{#3}%
6246 \or \appendixsectionzzz{#3}%
6247 \or \appendixsubseczzz{#3}%
6248 \or \appendixsubsubseczzz{#3}%
6249 \fi
6250 \else
6251 \ifcase\absseclevel
6252 \chapterzzz{#3}%
6253 \or \seczzz{#3}%
6254 \or \numberedsubseczzz{#3}%
6255 \or \numberedsubsubseczzz{#3}%
6256 \fi
6257 \fi
6258 \fi
6259 \suppressfirstparagraphindent
6260 }
6261
6262 % an interface:
6263 \def\numhead{\genhead N}
6264 \def\apphead{\genhead A}
6265 \def\unnmhead{\genhead U}
6266
6267 % @chapter, @appendix, @unnumbered. Increment top-level counter, reset
6268 % all lower-level sectioning counters to zero.
6269 %
6270 % Also set \chaplevelprefix, which we prepend to @float sequence numbers
6271 % (e.g., figures), q.v. By default (before any chapter), that is empty.
6272 \let\chaplevelprefix = \empty
6273 %
6274 \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
6275 \def\chapterzzz#1{%
6276 % section resetting is \global in case the chapter is in a group, such
6277 % as an @include file.
6278 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
6279 \global\advance\chapno by 1
6280 %
6281 % Used for \float.
6282 \gdef\chaplevelprefix{\the\chapno.}%
6283 \resetallfloatnos
6284 %
6285 % \putwordChapter can contain complex things in translations.
6286 \toks0=\expandafter{\putwordChapter}%
6287 \message{\the\toks0 \space \the\chapno}%
6288 %
6289 % Write the actual heading.
6290 \chapmacro{#1}{Ynumbered}{\the\chapno}%
6291 %
6292 % So @section and the like are numbered underneath this chapter.
6293 \global\let\section = \numberedsec
6294 \global\let\subsection = \numberedsubsec
6295 \global\let\subsubsection = \numberedsubsubsec
6296 }
6297
6298 \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
6299 %
6300 \def\appendixzzz#1{%
6301 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
6302 \global\advance\appendixno by 1
6303 \gdef\chaplevelprefix{\appendixletter.}%
6304 \resetallfloatnos
6305 %
6306 % \putwordAppendix can contain complex things in translations.
6307 \toks0=\expandafter{\putwordAppendix}%
6308 \message{\the\toks0 \space \appendixletter}%
6309 %
6310 \chapmacro{#1}{Yappendix}{\appendixletter}%
6311 %
6312 \global\let\section = \appendixsec
6313 \global\let\subsection = \appendixsubsec
6314 \global\let\subsubsection = \appendixsubsubsec
6315 }
6316
6317 % normally unnmhead0 calls unnumberedzzz:
6318 \outer\parseargdef\unnumbered{\unnmhead0{#1}}
6319 \def\unnumberedzzz#1{%
6320 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
6321 \global\advance\unnumberedno by 1
6322 %
6323 % Since an unnumbered has no number, no prefix for figures.
6324 \global\let\chaplevelprefix = \empty
6325 \resetallfloatnos
6326 %
6327 % This used to be simply \message{#1}, but TeX fully expands the
6328 % argument to \message. Therefore, if #1 contained @-commands, TeX
6329 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
6330 % expanded @cite (which turns out to cause errors because \cite is meant
6331 % to be executed, not expanded).
6332 %
6333 % Anyway, we don't want the fully-expanded definition of @cite to appear
6334 % as a result of the \message, we just want `@cite' itself. We use
6335 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
6336 % simply yielding the contents of <toks register>. (We also do this for
6337 % the toc entries.)
6338 \toks0 = {#1}%
6339 \message{(\the\toks0)}%
6340 %
6341 \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
6342 %
6343 \global\let\section = \unnumberedsec
6344 \global\let\subsection = \unnumberedsubsec
6345 \global\let\subsubsection = \unnumberedsubsubsec
6346 }
6347
6348 % @centerchap is like @unnumbered, but the heading is centered.
6349 \outer\parseargdef\centerchap{%
6350 \let\centerparametersmaybe = \centerparameters
6351 \unnmhead0{#1}%
6352 \let\centerparametersmaybe = \relax
6353 }
6354
6355 % @top is like @unnumbered.
6356 \let\top\unnumbered
6357
6358 % Sections.
6359 %
6360 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
6361 \def\seczzz#1{%
6362 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
6363 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
6364 }
6365
6366 % normally calls appendixsectionzzz:
6367 \outer\parseargdef\appendixsection{\apphead1{#1}}
6368 \def\appendixsectionzzz#1{%
6369 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
6370 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
6371 }
6372 \let\appendixsec\appendixsection
6373
6374 % normally calls unnumberedseczzz:
6375 \outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
6376 \def\unnumberedseczzz#1{%
6377 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
6378 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
6379 }
6380
6381 % Subsections.
6382 %
6383 % normally calls numberedsubseczzz:
6384 \outer\parseargdef\numberedsubsec{\numhead2{#1}}
6385 \def\numberedsubseczzz#1{%
6386 \global\subsubsecno=0 \global\advance\subsecno by 1
6387 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
6388 }
6389
6390 % normally calls appendixsubseczzz:
6391 \outer\parseargdef\appendixsubsec{\apphead2{#1}}
6392 \def\appendixsubseczzz#1{%
6393 \global\subsubsecno=0 \global\advance\subsecno by 1
6394 \sectionheading{#1}{subsec}{Yappendix}%
6395 {\appendixletter.\the\secno.\the\subsecno}%
6396 }
6397
6398 % normally calls unnumberedsubseczzz:
6399 \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
6400 \def\unnumberedsubseczzz#1{%
6401 \global\subsubsecno=0 \global\advance\subsecno by 1
6402 \sectionheading{#1}{subsec}{Ynothing}%
6403 {\the\unnumberedno.\the\secno.\the\subsecno}%
6404 }
6405
6406 % Subsubsections.
6407 %
6408 % normally numberedsubsubseczzz:
6409 \outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
6410 \def\numberedsubsubseczzz#1{%
6411 \global\advance\subsubsecno by 1
6412 \sectionheading{#1}{subsubsec}{Ynumbered}%
6413 {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
6414 }
6415
6416 % normally appendixsubsubseczzz:
6417 \outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
6418 \def\appendixsubsubseczzz#1{%
6419 \global\advance\subsubsecno by 1
6420 \sectionheading{#1}{subsubsec}{Yappendix}%
6421 {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
6422 }
6423
6424 % normally unnumberedsubsubseczzz:
6425 \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
6426 \def\unnumberedsubsubseczzz#1{%
6427 \global\advance\subsubsecno by 1
6428 \sectionheading{#1}{subsubsec}{Ynothing}%
6429 {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
6430 }
6431
6432 % These macros control what the section commands do, according
6433 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
6434 % Define them by default for a numbered chapter.
6435 \let\section = \numberedsec
6436 \let\subsection = \numberedsubsec
6437 \let\subsubsection = \numberedsubsubsec
6438
6439 % Define @majorheading, @heading and @subheading
6440
6441 \def\majorheading{%
6442 {\advance\chapheadingskip by 10pt \chapbreak }%
6443 \parsearg\chapheadingzzz
6444 }
6445
6446 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
6447 \def\chapheadingzzz#1{%
6448 \vbox{\chapfonts \raggedtitlesettings #1\par}%
6449 \nobreak\bigskip \nobreak
6450 \suppressfirstparagraphindent
6451 }
6452
6453 % @heading, @subheading, @subsubheading.
6454 \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
6455 \suppressfirstparagraphindent}
6456 \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
6457 \suppressfirstparagraphindent}
6458 \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
6459 \suppressfirstparagraphindent}
6460
6461 % These macros generate a chapter, section, etc. heading only
6462 % (including whitespace, linebreaking, etc. around it),
6463 % given all the information in convenient, parsed form.
6464
6465 % Args are the skip and penalty (usually negative)
6466 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
6467
6468 % Parameter controlling skip before chapter headings (if needed)
6469 \newskip\chapheadingskip
6470
6471 % Define plain chapter starts, and page on/off switching for it.
6472 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
6473
6474 % Start a new page
6475 \def\chappager{\par\vfill\supereject}
6476
6477 % \chapoddpage - start on an odd page for a new chapter
6478 % Because \domark is called before \chapoddpage, the filler page will
6479 % get the headings for the next chapter, which is wrong. But we don't
6480 % care -- we just disable all headings on the filler page.
6481 \def\chapoddpage{%
6482 \chappager
6483 \ifodd\pageno \else
6484 \begingroup
6485 \headingsoff
6486 \null
6487 \chappager
6488 \endgroup
6489 \fi
6490 }
6491
6492 \parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname}
6493
6494 \def\CHAPPAGoff{%
6495 \global\let\contentsalignmacro = \chappager
6496 \global\let\pchapsepmacro=\chapbreak
6497 \global\let\pagealignmacro=\chappager}
6498
6499 \def\CHAPPAGon{%
6500 \global\let\contentsalignmacro = \chappager
6501 \global\let\pchapsepmacro=\chappager
6502 \global\let\pagealignmacro=\chappager
6503 \global\def\HEADINGSon{\HEADINGSsingle}}
6504
6505 \def\CHAPPAGodd{%
6506 \global\let\contentsalignmacro = \chapoddpage
6507 \global\let\pchapsepmacro=\chapoddpage
6508 \global\let\pagealignmacro=\chapoddpage
6509 \global\def\HEADINGSon{\HEADINGSdouble}}
6510
6511 \CHAPPAGon
6512
6513 % \chapmacro - Chapter opening.
6514 %
6515 % #1 is the text, #2 is the section type (Ynumbered, Ynothing,
6516 % Yappendix, Yomitfromtoc), #3 the chapter number.
6517 % Not used for @heading series.
6518 %
6519 % To test against our argument.
6520 \def\Ynothingkeyword{Ynothing}
6521 \def\Yappendixkeyword{Yappendix}
6522 \def\Yomitfromtockeyword{Yomitfromtoc}
6523 %
6524 \def\chapmacro#1#2#3{%
6525 \expandafter\ifx\thisenv\titlepage\else
6526 \checkenv{}% chapters, etc., should not start inside an environment.
6527 \fi
6528 % FIXME: \chapmacro is currently called from inside \titlepage when
6529 % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
6530 % this should probably be done by \sectionheading with an option to print
6531 % in chapter size.
6532 %
6533 % Insert the first mark before the heading break (see notes for \domark).
6534 \let\prevchapterdefs=\lastchapterdefs
6535 \let\prevsectiondefs=\lastsectiondefs
6536 \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
6537 \gdef\thissection{}}%
6538 %
6539 \def\temptype{#2}%
6540 \ifx\temptype\Ynothingkeyword
6541 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6542 \gdef\thischapter{\thischaptername}}%
6543 \else\ifx\temptype\Yomitfromtockeyword
6544 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6545 \gdef\thischapter{}}%
6546 \else\ifx\temptype\Yappendixkeyword
6547 \toks0={#1}%
6548 \xdef\lastchapterdefs{%
6549 \gdef\noexpand\thischaptername{\the\toks0}%
6550 \gdef\noexpand\thischapternum{\appendixletter}%
6551 % \noexpand\putwordAppendix avoids expanding indigestible
6552 % commands in some of the translations.
6553 \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
6554 \noexpand\thischapternum:
6555 \noexpand\thischaptername}%
6556 }%
6557 \else
6558 \toks0={#1}%
6559 \xdef\lastchapterdefs{%
6560 \gdef\noexpand\thischaptername{\the\toks0}%
6561 \gdef\noexpand\thischapternum{\the\chapno}%
6562 % \noexpand\putwordChapter avoids expanding indigestible
6563 % commands in some of the translations.
6564 \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
6565 \noexpand\thischapternum:
6566 \noexpand\thischaptername}%
6567 }%
6568 \fi\fi\fi
6569 %
6570 % Output the mark. Pass it through \safewhatsit, to take care of
6571 % the preceding space.
6572 \safewhatsit\domark
6573 %
6574 % Insert the chapter heading break.
6575 \pchapsepmacro
6576 %
6577 % Now the second mark, after the heading break. No break points
6578 % between here and the heading.
6579 \let\prevchapterdefs=\lastchapterdefs
6580 \let\prevsectiondefs=\lastsectiondefs
6581 \domark
6582 %
6583 {%
6584 \chapfonts \rm
6585 \let\footnote=\errfootnoteheading % give better error message
6586 %
6587 % Have to define \lastsection before calling \donoderef, because the
6588 % xref code eventually uses it. On the other hand, it has to be called
6589 % after \pchapsepmacro, or the headline will change too soon.
6590 \gdef\lastsection{#1}%
6591 %
6592 % Only insert the separating space if we have a chapter/appendix
6593 % number, and don't print the unnumbered ``number''.
6594 \ifx\temptype\Ynothingkeyword
6595 \setbox0 = \hbox{}%
6596 \def\toctype{unnchap}%
6597 \else\ifx\temptype\Yomitfromtockeyword
6598 \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
6599 \def\toctype{omit}%
6600 \else\ifx\temptype\Yappendixkeyword
6601 \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
6602 \def\toctype{app}%
6603 \else
6604 \setbox0 = \hbox{#3\enspace}%
6605 \def\toctype{numchap}%
6606 \fi\fi\fi
6607 %
6608 % Write the toc entry for this chapter. Must come before the
6609 % \donoderef, because we include the current node name in the toc
6610 % entry, and \donoderef resets it to empty.
6611 \writetocentry{\toctype}{#1}{#3}%
6612 %
6613 % For pdftex, we have to write out the node definition (aka, make
6614 % the pdfdest) after any page break, but before the actual text has
6615 % been typeset. If the destination for the pdf outline is after the
6616 % text, then jumping from the outline may wind up with the text not
6617 % being visible, for instance under high magnification.
6618 \donoderef{#2}%
6619 %
6620 % Typeset the actual heading.
6621 \nobreak % Avoid page breaks at the interline glue.
6622 \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
6623 \unhbox0 #1\par}%
6624 }%
6625 \nobreak\bigskip % no page break after a chapter title
6626 \nobreak
6627 }
6628
6629 % @centerchap -- centered and unnumbered.
6630 \let\centerparametersmaybe = \relax
6631 \def\centerparameters{%
6632 \advance\rightskip by 3\rightskip
6633 \leftskip = \rightskip
6634 \parfillskip = 0pt
6635 }
6636
6637
6638 % Section titles. These macros combine the section number parts and
6639 % call the generic \sectionheading to do the printing.
6640 %
6641 \newskip\secheadingskip
6642 \def\secheadingbreak{\dobreak \secheadingskip{-1000}}
6643
6644 % Subsection titles.
6645 \newskip\subsecheadingskip
6646 \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
6647
6648 % Subsubsection titles.
6649 \def\subsubsecheadingskip{\subsecheadingskip}
6650 \def\subsubsecheadingbreak{\subsecheadingbreak}
6651
6652
6653 % Print any size, any type, section title.
6654 %
6655 % #1 is the text of the title,
6656 % #2 is the section level (sec/subsec/subsubsec),
6657 % #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
6658 % #4 is the section number.
6659 %
6660 \def\seckeyword{sec}
6661 %
6662 \def\sectionheading#1#2#3#4{%
6663 {%
6664 \def\sectionlevel{#2}%
6665 \def\temptype{#3}%
6666 %
6667 % It is ok for the @heading series commands to appear inside an
6668 % environment (it's been historically allowed, though the logic is
6669 % dubious), but not the others.
6670 \ifx\temptype\Yomitfromtockeyword\else
6671 \checkenv{}% non-@*heading should not be in an environment.
6672 \fi
6673 \let\footnote=\errfootnoteheading
6674 %
6675 % Switch to the right set of fonts.
6676 \csname #2fonts\endcsname \rm
6677 %
6678 % Insert first mark before the heading break (see notes for \domark).
6679 \let\prevsectiondefs=\lastsectiondefs
6680 \ifx\temptype\Ynothingkeyword
6681 \ifx\sectionlevel\seckeyword
6682 \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
6683 \gdef\thissection{\thissectionname}}%
6684 \fi
6685 \else\ifx\temptype\Yomitfromtockeyword
6686 % Don't redefine \thissection.
6687 \else\ifx\temptype\Yappendixkeyword
6688 \ifx\sectionlevel\seckeyword
6689 \toks0={#1}%
6690 \xdef\lastsectiondefs{%
6691 \gdef\noexpand\thissectionname{\the\toks0}%
6692 \gdef\noexpand\thissectionnum{#4}%
6693 % \noexpand\putwordSection avoids expanding indigestible
6694 % commands in some of the translations.
6695 \gdef\noexpand\thissection{\noexpand\putwordSection{}
6696 \noexpand\thissectionnum:
6697 \noexpand\thissectionname}%
6698 }%
6699 \fi
6700 \else
6701 \ifx\sectionlevel\seckeyword
6702 \toks0={#1}%
6703 \xdef\lastsectiondefs{%
6704 \gdef\noexpand\thissectionname{\the\toks0}%
6705 \gdef\noexpand\thissectionnum{#4}%
6706 % \noexpand\putwordSection avoids expanding indigestible
6707 % commands in some of the translations.
6708 \gdef\noexpand\thissection{\noexpand\putwordSection{}
6709 \noexpand\thissectionnum:
6710 \noexpand\thissectionname}%
6711 }%
6712 \fi
6713 \fi\fi\fi
6714 %
6715 % Go into vertical mode. Usually we'll already be there, but we
6716 % don't want the following whatsit to end up in a preceding paragraph
6717 % if the document didn't happen to have a blank line.
6718 \par
6719 %
6720 % Output the mark. Pass it through \safewhatsit, to take care of
6721 % the preceding space.
6722 \safewhatsit\domark
6723 %
6724 % Insert space above the heading.
6725 \csname #2headingbreak\endcsname
6726 %
6727 % Now the second mark, after the heading break. No break points
6728 % between here and the heading.
6729 \global\let\prevsectiondefs=\lastsectiondefs
6730 \domark
6731 %
6732 % Only insert the space after the number if we have a section number.
6733 \ifx\temptype\Ynothingkeyword
6734 \setbox0 = \hbox{}%
6735 \def\toctype{unn}%
6736 \gdef\lastsection{#1}%
6737 \else\ifx\temptype\Yomitfromtockeyword
6738 % for @headings -- no section number, don't include in toc,
6739 % and don't redefine \lastsection.
6740 \setbox0 = \hbox{}%
6741 \def\toctype{omit}%
6742 \let\sectionlevel=\empty
6743 \else\ifx\temptype\Yappendixkeyword
6744 \setbox0 = \hbox{#4\enspace}%
6745 \def\toctype{app}%
6746 \gdef\lastsection{#1}%
6747 \else
6748 \setbox0 = \hbox{#4\enspace}%
6749 \def\toctype{num}%
6750 \gdef\lastsection{#1}%
6751 \fi\fi\fi
6752 %
6753 % Write the toc entry (before \donoderef). See comments in \chapmacro.
6754 \writetocentry{\toctype\sectionlevel}{#1}{#4}%
6755 %
6756 % Write the node reference (= pdf destination for pdftex).
6757 % Again, see comments in \chapmacro.
6758 \donoderef{#3}%
6759 %
6760 % Interline glue will be inserted when the vbox is completed.
6761 % That glue will be a valid breakpoint for the page, since it'll be
6762 % preceded by a whatsit (usually from the \donoderef, or from the
6763 % \writetocentry if there was no node). We don't want to allow that
6764 % break, since then the whatsits could end up on page n while the
6765 % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
6766 \nobreak
6767 %
6768 % Output the actual section heading.
6769 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
6770 \hangindent=\wd0 % zero if no section number
6771 \unhbox0 #1}%
6772 }%
6773 % Add extra space after the heading -- half of whatever came above it.
6774 % Don't allow stretch, though.
6775 \kern .5 \csname #2headingskip\endcsname
6776 %
6777 % Do not let the kern be a potential breakpoint, as it would be if it
6778 % was followed by glue.
6779 \nobreak
6780 %
6781 % We'll almost certainly start a paragraph next, so don't let that
6782 % glue accumulate. (Not a breakpoint because it's preceded by a
6783 % discardable item.) However, when a paragraph is not started next
6784 % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
6785 % or the negative glue will cause weirdly wrong output, typically
6786 % obscuring the section heading with something else.
6787 \vskip-\parskip
6788 %
6789 % This is so the last item on the main vertical list is a known
6790 % \penalty > 10000, so \startdefun, etc., can recognize the situation
6791 % and do the needful.
6792 \penalty 10001
6793 }
6794
6795
6796 \message{toc,}
6797 % Table of contents.
6798 \newwrite\tocfile
6799
6800 % Write an entry to the toc file, opening it if necessary.
6801 % Called from @chapter, etc.
6802 %
6803 % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
6804 % We append the current node name (if any) and page number as additional
6805 % arguments for the \{chap,sec,...}entry macros which will eventually
6806 % read this. The node name is used in the pdf outlines as the
6807 % destination to jump to.
6808 %
6809 % We open the .toc file for writing here instead of at @setfilename (or
6810 % any other fixed time) so that @contents can be anywhere in the document.
6811 % But if #1 is `omit', then we don't do anything. This is used for the
6812 % table of contents chapter openings themselves.
6813 %
6814 \newif\iftocfileopened
6815 \def\omitkeyword{omit}%
6816 %
6817 \def\writetocentry#1#2#3{%
6818 \edef\writetoctype{#1}%
6819 \ifx\writetoctype\omitkeyword \else
6820 \iftocfileopened\else
6821 \immediate\openout\tocfile = \jobname.toc
6822 \global\tocfileopenedtrue
6823 \fi
6824 %
6825 \iflinks
6826 {\atdummies
6827 \edef\temp{%
6828 \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
6829 \temp
6830 }%
6831 \fi
6832 \fi
6833 %
6834 % Tell \shipout to create a pdf destination on each page, if we're
6835 % writing pdf. These are used in the table of contents. We can't
6836 % just write one on every page because the title pages are numbered
6837 % 1 and 2 (the page numbers aren't printed), and so are the first
6838 % two pages of the document. Thus, we'd have two destinations named
6839 % `1', and two named `2'.
6840 \ifpdf
6841 \global\pdfmakepagedesttrue
6842 \else
6843 \ifx\XeTeXrevision\thisisundefined
6844 \else
6845 \global\pdfmakepagedesttrue
6846 \fi
6847 \fi
6848 }
6849
6850
6851 % These characters do not print properly in the Computer Modern roman
6852 % fonts, so we must take special care. This is more or less redundant
6853 % with the Texinfo input format setup at the end of this file.
6854 %
6855 \def\activecatcodes{%
6856 \catcode`\"=\active
6857 \catcode`\$=\active
6858 \catcode`\<=\active
6859 \catcode`\>=\active
6860 \catcode`\\=\active
6861 \catcode`\^=\active
6862 \catcode`\_=\active
6863 \catcode`\|=\active
6864 \catcode`\~=\active
6865 }
6866
6867
6868 % Read the toc file, which is essentially Texinfo input.
6869 \def\readtocfile{%
6870 \setupdatafile
6871 \activecatcodes
6872 \input \tocreadfilename
6873 }
6874
6875 \newskip\contentsrightmargin \contentsrightmargin=1in
6876 \newcount\savepageno
6877 \newcount\lastnegativepageno \lastnegativepageno = -1
6878
6879 % Prepare to read what we've written to \tocfile.
6880 %
6881 \def\startcontents#1{%
6882 % If @setchapternewpage on, and @headings double, the contents should
6883 % start on an odd page, unlike chapters. Thus, we maintain
6884 % \contentsalignmacro in parallel with \pagealignmacro.
6885 % From: Torbjorn Granlund <tege@matematik.su.se>
6886 \contentsalignmacro
6887 \immediate\closeout\tocfile
6888 %
6889 % Don't need to put `Contents' or `Short Contents' in the headline.
6890 % It is abundantly clear what they are.
6891 \chapmacro{#1}{Yomitfromtoc}{}%
6892 %
6893 \savepageno = \pageno
6894 \begingroup % Set up to handle contents files properly.
6895 \raggedbottom % Worry more about breakpoints than the bottom.
6896 \entryrightmargin=\contentsrightmargin % Don't use the full line length.
6897 %
6898 % Roman numerals for page numbers.
6899 \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
6900 }
6901
6902 % redefined for the two-volume lispref. We always output on
6903 % \jobname.toc even if this is redefined.
6904 %
6905 \def\tocreadfilename{\jobname.toc}
6906
6907 % Normal (long) toc.
6908 %
6909 \def\contents{%
6910 \startcontents{\putwordTOC}%
6911 \openin 1 \tocreadfilename\space
6912 \ifeof 1 \else
6913 \readtocfile
6914 \fi
6915 \vfill \eject
6916 \contentsalignmacro % in case @setchapternewpage odd is in effect
6917 \ifeof 1 \else
6918 \pdfmakeoutlines
6919 \fi
6920 \closein 1
6921 \endgroup
6922 \lastnegativepageno = \pageno
6923 \global\pageno = \savepageno
6924 }
6925
6926 % And just the chapters.
6927 \def\summarycontents{%
6928 \startcontents{\putwordShortTOC}%
6929 %
6930 \let\partentry = \shortpartentry
6931 \let\numchapentry = \shortchapentry
6932 \let\appentry = \shortchapentry
6933 \let\unnchapentry = \shortunnchapentry
6934 % We want a true roman here for the page numbers.
6935 \secfonts
6936 \let\rm=\shortcontrm \let\bf=\shortcontbf
6937 \let\sl=\shortcontsl \let\tt=\shortconttt
6938 \rm
6939 \hyphenpenalty = 10000
6940 \advance\baselineskip by 1pt % Open it up a little.
6941 \def\numsecentry##1##2##3##4{}
6942 \let\appsecentry = \numsecentry
6943 \let\unnsecentry = \numsecentry
6944 \let\numsubsecentry = \numsecentry
6945 \let\appsubsecentry = \numsecentry
6946 \let\unnsubsecentry = \numsecentry
6947 \let\numsubsubsecentry = \numsecentry
6948 \let\appsubsubsecentry = \numsecentry
6949 \let\unnsubsubsecentry = \numsecentry
6950 \openin 1 \tocreadfilename\space
6951 \ifeof 1 \else
6952 \readtocfile
6953 \fi
6954 \closein 1
6955 \vfill \eject
6956 \contentsalignmacro % in case @setchapternewpage odd is in effect
6957 \endgroup
6958 \lastnegativepageno = \pageno
6959 \global\pageno = \savepageno
6960 }
6961 \let\shortcontents = \summarycontents
6962
6963 % Typeset the label for a chapter or appendix for the short contents.
6964 % The arg is, e.g., `A' for an appendix, or `3' for a chapter.
6965 %
6966 \def\shortchaplabel#1{%
6967 % This space should be enough, since a single number is .5em, and the
6968 % widest letter (M) is 1em, at least in the Computer Modern fonts.
6969 % But use \hss just in case.
6970 % (This space doesn't include the extra space that gets added after
6971 % the label; that gets put in by \shortchapentry above.)
6972 %
6973 % We'd like to right-justify chapter numbers, but that looks strange
6974 % with appendix letters. And right-justifying numbers and
6975 % left-justifying letters looks strange when there is less than 10
6976 % chapters. Have to read the whole toc once to know how many chapters
6977 % there are before deciding ...
6978 \hbox to 1em{#1\hss}%
6979 }
6980
6981 % These macros generate individual entries in the table of contents.
6982 % The first argument is the chapter or section name.
6983 % The last argument is the page number.
6984 % The arguments in between are the chapter number, section number, ...
6985
6986 % Parts, in the main contents. Replace the part number, which doesn't
6987 % exist, with an empty box. Let's hope all the numbers have the same width.
6988 % Also ignore the page number, which is conventionally not printed.
6989 \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
6990 \def\partentry#1#2#3#4{%
6991 % Add stretch and a bonus for breaking the page before the part heading.
6992 % This reduces the chance of the page being broken immediately after the
6993 % part heading, before a following chapter heading.
6994 \vskip 0pt plus 5\baselineskip
6995 \penalty-300
6996 \vskip 0pt plus -5\baselineskip
6997 \dochapentry{\numeralbox\labelspace#1}{}%
6998 }
6999 %
7000 % Parts, in the short toc.
7001 \def\shortpartentry#1#2#3#4{%
7002 \penalty-300
7003 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
7004 \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
7005 }
7006
7007 % Chapters, in the main contents.
7008 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
7009
7010 % Chapters, in the short toc.
7011 % See comments in \dochapentry re vbox and related settings.
7012 \def\shortchapentry#1#2#3#4{%
7013 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
7014 }
7015
7016 % Appendices, in the main contents.
7017 % Need the word Appendix, and a fixed-size box.
7018 %
7019 \def\appendixbox#1{%
7020 % We use M since it's probably the widest letter.
7021 \setbox0 = \hbox{\putwordAppendix{} M}%
7022 \hbox to \wd0{\putwordAppendix{} #1\hss}}
7023 %
7024 \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}}
7025
7026 % Unnumbered chapters.
7027 \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
7028 \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
7029
7030 % Sections.
7031 \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
7032 \let\appsecentry=\numsecentry
7033 \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
7034
7035 % Subsections.
7036 \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
7037 \let\appsubsecentry=\numsubsecentry
7038 \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
7039
7040 % And subsubsections.
7041 \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
7042 \let\appsubsubsecentry=\numsubsubsecentry
7043 \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
7044
7045 % This parameter controls the indentation of the various levels.
7046 % Same as \defaultparindent.
7047 \newdimen\tocindent \tocindent = 15pt
7048
7049 % Now for the actual typesetting. In all these, #1 is the text and #2 is the
7050 % page number.
7051 %
7052 % If the toc has to be broken over pages, we want it to be at chapters
7053 % if at all possible; hence the \penalty.
7054 \def\dochapentry#1#2{%
7055 \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
7056 \begingroup
7057 % Move the page numbers slightly to the right
7058 \advance\entryrightmargin by -0.05em
7059 \chapentryfonts
7060 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
7061 \endgroup
7062 \nobreak\vskip .25\baselineskip plus.1\baselineskip
7063 }
7064
7065 \def\dosecentry#1#2{\begingroup
7066 \secentryfonts \leftskip=\tocindent
7067 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
7068 \endgroup}
7069
7070 \def\dosubsecentry#1#2{\begingroup
7071 \subsecentryfonts \leftskip=2\tocindent
7072 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
7073 \endgroup}
7074
7075 \def\dosubsubsecentry#1#2{\begingroup
7076 \subsubsecentryfonts \leftskip=3\tocindent
7077 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
7078 \endgroup}
7079
7080 % We use the same \entry macro as for the index entries.
7081 \let\tocentry = \entry
7082
7083 % Space between chapter (or whatever) number and the title.
7084 \def\labelspace{\hskip1em \relax}
7085
7086 \def\dopageno#1{{\rm #1}}
7087 \def\doshortpageno#1{{\rm #1}}
7088
7089 \def\chapentryfonts{\secfonts \rm}
7090 \def\secentryfonts{\textfonts}
7091 \def\subsecentryfonts{\textfonts}
7092 \def\subsubsecentryfonts{\textfonts}
7093
7094
7095 \message{environments,}
7096 % @foo ... @end foo.
7097
7098 % @tex ... @end tex escapes into raw TeX temporarily.
7099 % One exception: @ is still an escape character, so that @end tex works.
7100 % But \@ or @@ will get a plain @ character.
7101
7102 \envdef\tex{%
7103 \setupmarkupstyle{tex}%
7104 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
7105 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
7106 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
7107 \catcode `\%=14
7108 \catcode `\+=\other
7109 \catcode `\"=\other
7110 \catcode `\|=\other
7111 \catcode `\<=\other
7112 \catcode `\>=\other
7113 \catcode `\`=\other
7114 \catcode `\'=\other
7115 %
7116 % ' is active in math mode (mathcode"8000). So reset it, and all our
7117 % other math active characters (just in case), to plain's definitions.
7118 \mathactive
7119 %
7120 % Inverse of the list at the beginning of the file.
7121 \let\b=\ptexb
7122 \let\bullet=\ptexbullet
7123 \let\c=\ptexc
7124 \let\,=\ptexcomma
7125 \let\.=\ptexdot
7126 \let\dots=\ptexdots
7127 \let\equiv=\ptexequiv
7128 \let\!=\ptexexclam
7129 \let\i=\ptexi
7130 \let\indent=\ptexindent
7131 \let\noindent=\ptexnoindent
7132 \let\{=\ptexlbrace
7133 \let\+=\tabalign
7134 \let\}=\ptexrbrace
7135 \let\/=\ptexslash
7136 \let\sp=\ptexsp
7137 \let\*=\ptexstar
7138 %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
7139 \let\t=\ptext
7140 \expandafter \let\csname top\endcsname=\ptextop % we've made it outer
7141 \let\frenchspacing=\plainfrenchspacing
7142 %
7143 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
7144 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
7145 \def\@{@}%
7146 }
7147 % There is no need to define \Etex.
7148
7149 % Define @lisp ... @end lisp.
7150 % @lisp environment forms a group so it can rebind things,
7151 % including the definition of @end lisp (which normally is erroneous).
7152
7153 % Amount to narrow the margins by for @lisp.
7154 \newskip\lispnarrowing \lispnarrowing=0.4in
7155
7156 % This is the definition that ^^M gets inside @lisp, @example, and other
7157 % such environments. \null is better than a space, since it doesn't
7158 % have any width.
7159 \def\lisppar{\null\endgraf}
7160
7161 % This space is always present above and below environments.
7162 \newskip\envskipamount \envskipamount = 0pt
7163
7164 % Make spacing and below environment symmetrical. We use \parskip here
7165 % to help in doing that, since in @example-like environments \parskip
7166 % is reset to zero; thus the \afterenvbreak inserts no space -- but the
7167 % start of the next paragraph will insert \parskip.
7168 %
7169 \def\aboveenvbreak{{%
7170 % =10000 instead of <10000 because of a special case in \itemzzz and
7171 % \sectionheading, q.v.
7172 \ifnum \lastpenalty=10000 \else
7173 \advance\envskipamount by \parskip
7174 \endgraf
7175 \ifdim\lastskip<\envskipamount
7176 \removelastskip
7177 \ifnum\lastpenalty<10000
7178 % Penalize breaking before the environment, because preceding text
7179 % often leads into it.
7180 \penalty100
7181 \fi
7182 \vskip\envskipamount
7183 \fi
7184 \fi
7185 }}
7186
7187 \def\afterenvbreak{{%
7188 % =10000 instead of <10000 because of a special case in \itemzzz and
7189 % \sectionheading, q.v.
7190 \ifnum \lastpenalty=10000 \else
7191 \advance\envskipamount by \parskip
7192 \endgraf
7193 \ifdim\lastskip<\envskipamount
7194 \removelastskip
7195 % it's not a good place to break if the last penalty was \nobreak
7196 % or better ...
7197 \ifnum\lastpenalty<10000 \penalty-50 \fi
7198 \vskip\envskipamount
7199 \fi
7200 \fi
7201 }}
7202
7203 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
7204 % also clear it, so that its embedded environments do the narrowing again.
7205 \let\nonarrowing=\relax
7206
7207 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
7208 % environment contents.
7209 \font\circle=lcircle10
7210 \newdimen\circthick
7211 \newdimen\cartouter\newdimen\cartinner
7212 \newskip\normbskip\newskip\normpskip\newskip\normlskip
7213 \circthick=\fontdimen8\circle
7214 %
7215 \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
7216 \def\ctr{{\hskip 6pt\circle\char'010}}
7217 \def\cbl{{\circle\char'012\hskip -6pt}}
7218 \def\cbr{{\hskip 6pt\circle\char'011}}
7219 \def\carttop{\hbox to \cartouter{\hskip\lskip
7220 \ctl\leaders\hrule height\circthick\hfil\ctr
7221 \hskip\rskip}}
7222 \def\cartbot{\hbox to \cartouter{\hskip\lskip
7223 \cbl\leaders\hrule height\circthick\hfil\cbr
7224 \hskip\rskip}}
7225 %
7226 \newskip\lskip\newskip\rskip
7227
7228 \envdef\cartouche{%
7229 \ifhmode\par\fi % can't be in the midst of a paragraph.
7230 \startsavinginserts
7231 \lskip=\leftskip \rskip=\rightskip
7232 \leftskip=0pt\rightskip=0pt % we want these *outside*.
7233 \cartinner=\hsize \advance\cartinner by-\lskip
7234 \advance\cartinner by-\rskip
7235 \cartouter=\hsize
7236 \advance\cartouter by 18.4pt % allow for 3pt kerns on either
7237 % side, and for 6pt waste from
7238 % each corner char, and rule thickness
7239 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
7240 %
7241 % If this cartouche directly follows a sectioning command, we need the
7242 % \parskip glue (backspaced over by default) or the cartouche can
7243 % collide with the section heading.
7244 \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
7245 %
7246 \setbox\groupbox=\vbox\bgroup
7247 \baselineskip=0pt\parskip=0pt\lineskip=0pt
7248 \carttop
7249 \hbox\bgroup
7250 \hskip\lskip
7251 \vrule\kern3pt
7252 \vbox\bgroup
7253 \kern3pt
7254 \hsize=\cartinner
7255 \baselineskip=\normbskip
7256 \lineskip=\normlskip
7257 \parskip=\normpskip
7258 \vskip -\parskip
7259 \comment % For explanation, see the end of def\group.
7260 }
7261 \def\Ecartouche{%
7262 \ifhmode\par\fi
7263 \kern3pt
7264 \egroup
7265 \kern3pt\vrule
7266 \hskip\rskip
7267 \egroup
7268 \cartbot
7269 \egroup
7270 \addgroupbox
7271 \checkinserts
7272 }
7273
7274
7275 % This macro is called at the beginning of all the @example variants,
7276 % inside a group.
7277 \newdimen\nonfillparindent
7278 \def\nonfillstart{%
7279 \aboveenvbreak
7280 \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy
7281 \sepspaces % Make spaces be word-separators rather than space tokens.
7282 \let\par = \lisppar % don't ignore blank lines
7283 \obeylines % each line of input is a line of output
7284 \parskip = 0pt
7285 % Turn off paragraph indentation but redefine \indent to emulate
7286 % the normal \indent.
7287 \nonfillparindent=\parindent
7288 \parindent = 0pt
7289 \let\indent\nonfillindent
7290 %
7291 \emergencystretch = 0pt % don't try to avoid overfull boxes
7292 \ifx\nonarrowing\relax
7293 \advance \leftskip by \lispnarrowing
7294 \exdentamount=\lispnarrowing
7295 \else
7296 \let\nonarrowing = \relax
7297 \fi
7298 \let\exdent=\nofillexdent
7299 }
7300
7301 \begingroup
7302 \obeyspaces
7303 % We want to swallow spaces (but not other tokens) after the fake
7304 % @indent in our nonfill-environments, where spaces are normally
7305 % active and set to @tie, resulting in them not being ignored after
7306 % @indent.
7307 \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
7308 \gdef\nonfillindentcheck{%
7309 \ifx\temp %
7310 \expandafter\nonfillindentgobble%
7311 \else%
7312 \leavevmode\nonfillindentbox%
7313 \fi%
7314 }%
7315 \endgroup
7316 \def\nonfillindentgobble#1{\nonfillindent}
7317 \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
7318
7319 % If you want all examples etc. small: @set dispenvsize small.
7320 % If you want even small examples the full size: @set dispenvsize nosmall.
7321 % This affects the following displayed environments:
7322 % @example, @display, @format, @lisp
7323 %
7324 \def\smallword{small}
7325 \def\nosmallword{nosmall}
7326 \let\SETdispenvsize\relax
7327 \def\setnormaldispenv{%
7328 \ifx\SETdispenvsize\smallword
7329 % end paragraph for sake of leading, in case document has no blank
7330 % line. This is redundant with what happens in \aboveenvbreak, but
7331 % we need to do it before changing the fonts, and it's inconvenient
7332 % to change the fonts afterward.
7333 \ifnum \lastpenalty=10000 \else \endgraf \fi
7334 \smallexamplefonts \rm
7335 \fi
7336 }
7337 \def\setsmalldispenv{%
7338 \ifx\SETdispenvsize\nosmallword
7339 \else
7340 \ifnum \lastpenalty=10000 \else \endgraf \fi
7341 \smallexamplefonts \rm
7342 \fi
7343 }
7344
7345 % We often define two environments, @foo and @smallfoo.
7346 % Let's do it in one command. #1 is the env name, #2 the definition.
7347 \def\makedispenvdef#1#2{%
7348 \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
7349 \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
7350 \expandafter\let\csname E#1\endcsname \afterenvbreak
7351 \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
7352 }
7353
7354 % Define two environment synonyms (#1 and #2) for an environment.
7355 \def\maketwodispenvdef#1#2#3{%
7356 \makedispenvdef{#1}{#3}%
7357 \makedispenvdef{#2}{#3}%
7358 }
7359 %
7360 % @lisp: indented, narrowed, typewriter font;
7361 % @example: same as @lisp.
7362 %
7363 % @smallexample and @smalllisp: use smaller fonts.
7364 % Originally contributed by Pavel@xerox.
7365 %
7366 \maketwodispenvdef{lisp}{example}{%
7367 \nonfillstart
7368 \tt\setupmarkupstyle{example}%
7369 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
7370 \gobble % eat return
7371 }
7372 % @display/@smalldisplay: same as @lisp except keep current font.
7373 %
7374 \makedispenvdef{display}{%
7375 \nonfillstart
7376 \gobble
7377 }
7378
7379 % @format/@smallformat: same as @display except don't narrow margins.
7380 %
7381 \makedispenvdef{format}{%
7382 \let\nonarrowing = t%
7383 \nonfillstart
7384 \gobble
7385 }
7386
7387 % @flushleft: same as @format, but doesn't obey \SETdispenvsize.
7388 \envdef\flushleft{%
7389 \let\nonarrowing = t%
7390 \nonfillstart
7391 \gobble
7392 }
7393 \let\Eflushleft = \afterenvbreak
7394
7395 % @flushright.
7396 %
7397 \envdef\flushright{%
7398 \let\nonarrowing = t%
7399 \nonfillstart
7400 \advance\leftskip by 0pt plus 1fill\relax
7401 \gobble
7402 }
7403 \let\Eflushright = \afterenvbreak
7404
7405
7406 % @raggedright does more-or-less normal line breaking but no right
7407 % justification. From plain.tex. Don't stretch around special
7408 % characters in urls in this environment, since the stretch at the right
7409 % should be enough.
7410 \envdef\raggedright{%
7411 \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
7412 \def\urefprestretchamount{0pt}%
7413 \def\urefpoststretchamount{0pt}%
7414 }
7415 \let\Eraggedright\par
7416
7417 \envdef\raggedleft{%
7418 \parindent=0pt \leftskip0pt plus2em
7419 \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
7420 \hbadness=10000 % Last line will usually be underfull, so turn off
7421 % badness reporting.
7422 }
7423 \let\Eraggedleft\par
7424
7425 \envdef\raggedcenter{%
7426 \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
7427 \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
7428 \hbadness=10000 % Last line will usually be underfull, so turn off
7429 % badness reporting.
7430 }
7431 \let\Eraggedcenter\par
7432
7433
7434 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
7435 % and narrows the margins. We keep \parskip nonzero in general, since
7436 % we're doing normal filling. So, when using \aboveenvbreak and
7437 % \afterenvbreak, temporarily make \parskip 0.
7438 %
7439 \makedispenvdef{quotation}{\quotationstart}
7440 %
7441 \def\quotationstart{%
7442 \indentedblockstart % same as \indentedblock, but increase right margin too.
7443 \ifx\nonarrowing\relax
7444 \advance\rightskip by \lispnarrowing
7445 \fi
7446 \parsearg\quotationlabel
7447 }
7448
7449 % We have retained a nonzero parskip for the environment, since we're
7450 % doing normal filling.
7451 %
7452 \def\Equotation{%
7453 \par
7454 \ifx\quotationauthor\thisisundefined\else
7455 % indent a bit.
7456 \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
7457 \fi
7458 {\parskip=0pt \afterenvbreak}%
7459 }
7460 \def\Esmallquotation{\Equotation}
7461
7462 % If we're given an argument, typeset it in bold with a colon after.
7463 \def\quotationlabel#1{%
7464 \def\temp{#1}%
7465 \ifx\temp\empty \else
7466 {\bf #1: }%
7467 \fi
7468 }
7469
7470 % @indentedblock is like @quotation, but indents only on the left and
7471 % has no optional argument.
7472 %
7473 \makedispenvdef{indentedblock}{\indentedblockstart}
7474 %
7475 \def\indentedblockstart{%
7476 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
7477 \parindent=0pt
7478 %
7479 % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
7480 \ifx\nonarrowing\relax
7481 \advance\leftskip by \lispnarrowing
7482 \exdentamount = \lispnarrowing
7483 \else
7484 \let\nonarrowing = \relax
7485 \fi
7486 }
7487
7488 % Keep a nonzero parskip for the environment, since we're doing normal filling.
7489 %
7490 \def\Eindentedblock{%
7491 \par
7492 {\parskip=0pt \afterenvbreak}%
7493 }
7494 \def\Esmallindentedblock{\Eindentedblock}
7495
7496
7497 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
7498 % If we want to allow any <char> as delimiter,
7499 % we need the curly braces so that makeinfo sees the @verb command, eg:
7500 % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
7501 %
7502 % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
7503 %
7504 % [Knuth] p.344; only we need to do the other characters Texinfo sets
7505 % active too. Otherwise, they get lost as the first character on a
7506 % verbatim line.
7507 \def\dospecials{%
7508 \do\ \do\\\do\{\do\}\do\$\do\&%
7509 \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
7510 \do\<\do\>\do\|\do\@\do+\do\"%
7511 % Don't do the quotes -- if we do, @set txicodequoteundirected and
7512 % @set txicodequotebacktick will not have effect on @verb and
7513 % @verbatim, and ?` and !` ligatures won't get disabled.
7514 %\do\`\do\'%
7515 }
7516 %
7517 % [Knuth] p. 380
7518 \def\uncatcodespecials{%
7519 \def\do##1{\catcode`##1=\other}\dospecials}
7520 %
7521 % Setup for the @verb command.
7522 %
7523 % Eight spaces for a tab
7524 \begingroup
7525 \catcode`\^^I=\active
7526 \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
7527 \endgroup
7528 %
7529 \def\setupverb{%
7530 \tt % easiest (and conventionally used) font for verbatim
7531 \def\par{\leavevmode\endgraf}%
7532 \setupmarkupstyle{verb}%
7533 \tabeightspaces
7534 % Respect line breaks,
7535 % print special symbols as themselves, and
7536 % make each space count
7537 % must do in this order:
7538 \obeylines \uncatcodespecials \sepspaces
7539 }
7540
7541 % Setup for the @verbatim environment
7542 %
7543 % Real tab expansion.
7544 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
7545 %
7546 % We typeset each line of the verbatim in an \hbox, so we can handle
7547 % tabs. The \global is in case the verbatim line starts with an accent,
7548 % or some other command that starts with a begin-group. Otherwise, the
7549 % entire \verbbox would disappear at the corresponding end-group, before
7550 % it is typeset. Meanwhile, we can't have nested verbatim commands
7551 % (can we?), so the \global won't be overwriting itself.
7552 \newbox\verbbox
7553 \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
7554 %
7555 \begingroup
7556 \catcode`\^^I=\active
7557 \gdef\tabexpand{%
7558 \catcode`\^^I=\active
7559 \def^^I{\leavevmode\egroup
7560 \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
7561 \divide\dimen\verbbox by\tabw
7562 \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
7563 \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw
7564 \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
7565 }%
7566 }
7567 \endgroup
7568
7569 % start the verbatim environment.
7570 \def\setupverbatim{%
7571 \let\nonarrowing = t%
7572 \nonfillstart
7573 \tt % easiest (and conventionally used) font for verbatim
7574 % The \leavevmode here is for blank lines. Otherwise, we would
7575 % never \starttabox and the \egroup would end verbatim mode.
7576 \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
7577 \tabexpand
7578 \setupmarkupstyle{verbatim}%
7579 % Respect line breaks,
7580 % print special symbols as themselves, and
7581 % make each space count.
7582 % Must do in this order:
7583 \obeylines \uncatcodespecials \sepspaces
7584 \everypar{\starttabbox}%
7585 }
7586
7587 % Do the @verb magic: verbatim text is quoted by unique
7588 % delimiter characters. Before first delimiter expect a
7589 % right brace, after last delimiter expect closing brace:
7590 %
7591 % \def\doverb'{'<char>#1<char>'}'{#1}
7592 %
7593 % [Knuth] p. 382; only eat outer {}
7594 \begingroup
7595 \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
7596 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
7597 \endgroup
7598 %
7599 \def\verb{\begingroup\setupverb\doverb}
7600 %
7601 %
7602 % Do the @verbatim magic: define the macro \doverbatim so that
7603 % the (first) argument ends when '@end verbatim' is reached, ie:
7604 %
7605 % \def\doverbatim#1@end verbatim{#1}
7606 %
7607 % For Texinfo it's a lot easier than for LaTeX,
7608 % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
7609 % we need not redefine '\', '{' and '}'.
7610 %
7611 % Inspired by LaTeX's verbatim command set [latex.ltx]
7612 %
7613 \begingroup
7614 \catcode`\ =\active
7615 \obeylines %
7616 % ignore everything up to the first ^^M, that's the newline at the end
7617 % of the @verbatim input line itself. Otherwise we get an extra blank
7618 % line in the output.
7619 \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
7620 % We really want {...\end verbatim} in the body of the macro, but
7621 % without the active space; thus we have to use \xdef and \gobble.
7622 \endgroup
7623 %
7624 \envdef\verbatim{%
7625 \setupverbatim\doverbatim
7626 }
7627 \let\Everbatim = \afterenvbreak
7628
7629
7630 % @verbatiminclude FILE - insert text of file in verbatim environment.
7631 %
7632 \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
7633 %
7634 \def\doverbatiminclude#1{%
7635 {%
7636 \makevalueexpandable
7637 \setupverbatim
7638 \indexnofonts % Allow `@@' and other weird things in file names.
7639 \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
7640 \input #1
7641 \afterenvbreak
7642 }%
7643 }
7644
7645 % @copying ... @end copying.
7646 % Save the text away for @insertcopying later.
7647 %
7648 % We save the uninterpreted tokens, rather than creating a box.
7649 % Saving the text in a box would be much easier, but then all the
7650 % typesetting commands (@smallbook, font changes, etc.) have to be done
7651 % beforehand -- and a) we want @copying to be done first in the source
7652 % file; b) letting users define the frontmatter in as flexible order as
7653 % possible is desirable.
7654 %
7655 \def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
7656 \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
7657 %
7658 \def\insertcopying{%
7659 \begingroup
7660 \parindent = 0pt % paragraph indentation looks wrong on title page
7661 \scanexp\copyingtext
7662 \endgroup
7663 }
7664
7665
7666 \message{defuns,}
7667 % @defun etc.
7668
7669 \newskip\defbodyindent \defbodyindent=.4in
7670 \newskip\defargsindent \defargsindent=50pt
7671 \newskip\deflastargmargin \deflastargmargin=18pt
7672 \newcount\defunpenalty
7673
7674 % Start the processing of @deffn:
7675 \def\startdefun{%
7676 \ifnum\lastpenalty<10000
7677 \medbreak
7678 \defunpenalty=10003 % Will keep this @deffn together with the
7679 % following @def command, see below.
7680 \else
7681 % If there are two @def commands in a row, we'll have a \nobreak,
7682 % which is there to keep the function description together with its
7683 % header. But if there's nothing but headers, we need to allow a
7684 % break somewhere. Check specifically for penalty 10002, inserted
7685 % by \printdefunline, instead of 10000, since the sectioning
7686 % commands also insert a nobreak penalty, and we don't want to allow
7687 % a break between a section heading and a defun.
7688 %
7689 % As a further refinement, we avoid "club" headers by signalling
7690 % with penalty of 10003 after the very first @deffn in the
7691 % sequence (see above), and penalty of 10002 after any following
7692 % @def command.
7693 \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
7694 %
7695 % Similarly, after a section heading, do not allow a break.
7696 % But do insert the glue.
7697 \medskip % preceded by discardable penalty, so not a breakpoint
7698 \fi
7699 %
7700 \parindent=0in
7701 \advance\leftskip by \defbodyindent
7702 \exdentamount=\defbodyindent
7703 }
7704
7705 \def\dodefunx#1{%
7706 % First, check whether we are in the right environment:
7707 \checkenv#1%
7708 %
7709 % As above, allow line break if we have multiple x headers in a row.
7710 % It's not a great place, though.
7711 \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
7712 %
7713 % And now, it's time to reuse the body of the original defun:
7714 \expandafter\gobbledefun#1%
7715 }
7716 \def\gobbledefun#1\startdefun{}
7717
7718 % \printdefunline \deffnheader{text}
7719 %
7720 \def\printdefunline#1#2{%
7721 \begingroup
7722 % call \deffnheader:
7723 #1#2 \endheader
7724 % common ending:
7725 \interlinepenalty = 10000
7726 \advance\rightskip by 0pt plus 1fil\relax
7727 \endgraf
7728 \nobreak\vskip -\parskip
7729 \penalty\defunpenalty % signal to \startdefun and \dodefunx
7730 % Some of the @defun-type tags do not enable magic parentheses,
7731 % rendering the following check redundant. But we don't optimize.
7732 \checkparencounts
7733 \endgroup
7734 }
7735
7736 \def\Edefun{\endgraf\medbreak}
7737
7738 % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
7739 % the only thing remaining is to define \deffnheader.
7740 %
7741 \def\makedefun#1{%
7742 \expandafter\let\csname E#1\endcsname = \Edefun
7743 \edef\temp{\noexpand\domakedefun
7744 \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
7745 \temp
7746 }
7747
7748 % \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
7749 %
7750 % Define \deffn and \deffnx, without parameters.
7751 % \deffnheader has to be defined explicitly.
7752 %
7753 \def\domakedefun#1#2#3{%
7754 \envdef#1{%
7755 \startdefun
7756 \doingtypefnfalse % distinguish typed functions from all else
7757 \parseargusing\activeparens{\printdefunline#3}%
7758 }%
7759 \def#2{\dodefunx#1}%
7760 \def#3%
7761 }
7762
7763 \newif\ifdoingtypefn % doing typed function?
7764 \newif\ifrettypeownline % typeset return type on its own line?
7765
7766 % @deftypefnnewline on|off says whether the return type of typed functions
7767 % are printed on their own line. This affects @deftypefn, @deftypefun,
7768 % @deftypeop, and @deftypemethod.
7769 %
7770 \parseargdef\deftypefnnewline{%
7771 \def\temp{#1}%
7772 \ifx\temp\onword
7773 \expandafter\let\csname SETtxideftypefnnl\endcsname
7774 = \empty
7775 \else\ifx\temp\offword
7776 \expandafter\let\csname SETtxideftypefnnl\endcsname
7777 = \relax
7778 \else
7779 \errhelp = \EMsimple
7780 \errmessage{Unknown @txideftypefnnl value `\temp',
7781 must be on|off}%
7782 \fi\fi
7783 }
7784
7785 % Untyped functions:
7786
7787 % @deffn category name args
7788 \makedefun{deffn}{\deffngeneral{}}
7789
7790 % @deffn category class name args
7791 \makedefun{defop}#1 {\defopon{#1\ \putwordon}}
7792
7793 % \defopon {category on}class name args
7794 \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
7795
7796 % \deffngeneral {subind}category name args
7797 %
7798 \def\deffngeneral#1#2 #3 #4\endheader{%
7799 % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
7800 \dosubind{fn}{\code{#3}}{#1}%
7801 \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
7802 }
7803
7804 % Typed functions:
7805
7806 % @deftypefn category type name args
7807 \makedefun{deftypefn}{\deftypefngeneral{}}
7808
7809 % @deftypeop category class type name args
7810 \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
7811
7812 % \deftypeopon {category on}class type name args
7813 \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
7814
7815 % \deftypefngeneral {subind}category type name args
7816 %
7817 \def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
7818 \dosubind{fn}{\code{#4}}{#1}%
7819 \doingtypefntrue
7820 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
7821 }
7822
7823 % Typed variables:
7824
7825 % @deftypevr category type var args
7826 \makedefun{deftypevr}{\deftypecvgeneral{}}
7827
7828 % @deftypecv category class type var args
7829 \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
7830
7831 % \deftypecvof {category of}class type var args
7832 \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
7833
7834 % \deftypecvgeneral {subind}category type var args
7835 %
7836 \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
7837 \dosubind{vr}{\code{#4}}{#1}%
7838 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
7839 }
7840
7841 % Untyped variables:
7842
7843 % @defvr category var args
7844 \makedefun{defvr}#1 {\deftypevrheader{#1} {} }
7845
7846 % @defcv category class var args
7847 \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
7848
7849 % \defcvof {category of}class var args
7850 \def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
7851
7852 % Types:
7853
7854 % @deftp category name args
7855 \makedefun{deftp}#1 #2 #3\endheader{%
7856 \doind{tp}{\code{#2}}%
7857 \defname{#1}{}{#2}\defunargs{#3\unskip}%
7858 }
7859
7860 % Remaining @defun-like shortcuts:
7861 \makedefun{defun}{\deffnheader{\putwordDeffunc} }
7862 \makedefun{defmac}{\deffnheader{\putwordDefmac} }
7863 \makedefun{defspec}{\deffnheader{\putwordDefspec} }
7864 \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
7865 \makedefun{defvar}{\defvrheader{\putwordDefvar} }
7866 \makedefun{defopt}{\defvrheader{\putwordDefopt} }
7867 \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
7868 \makedefun{defmethod}{\defopon\putwordMethodon}
7869 \makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
7870 \makedefun{defivar}{\defcvof\putwordInstanceVariableof}
7871 \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
7872
7873 % \defname, which formats the name of the @def (not the args).
7874 % #1 is the category, such as "Function".
7875 % #2 is the return type, if any.
7876 % #3 is the function name.
7877 %
7878 % We are followed by (but not passed) the arguments, if any.
7879 %
7880 \def\defname#1#2#3{%
7881 \par
7882 % Get the values of \leftskip and \rightskip as they were outside the @def...
7883 \advance\leftskip by -\defbodyindent
7884 %
7885 % Determine if we are typesetting the return type of a typed function
7886 % on a line by itself.
7887 \rettypeownlinefalse
7888 \ifdoingtypefn % doing a typed function specifically?
7889 % then check user option for putting return type on its own line:
7890 \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
7891 \rettypeownlinetrue
7892 \fi
7893 \fi
7894 %
7895 % How we'll format the category name. Putting it in brackets helps
7896 % distinguish it from the body text that may end up on the next line
7897 % just below it.
7898 \def\temp{#1}%
7899 \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
7900 %
7901 % Figure out line sizes for the paragraph shape. We'll always have at
7902 % least two.
7903 \tempnum = 2
7904 %
7905 % The first line needs space for \box0; but if \rightskip is nonzero,
7906 % we need only space for the part of \box0 which exceeds it:
7907 \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
7908 %
7909 % If doing a return type on its own line, we'll have another line.
7910 \ifrettypeownline
7911 \advance\tempnum by 1
7912 \def\maybeshapeline{0in \hsize}%
7913 \else
7914 \def\maybeshapeline{}%
7915 \fi
7916 %
7917 % The continuations:
7918 \dimen2=\hsize \advance\dimen2 by -\defargsindent
7919 %
7920 % The final paragraph shape:
7921 \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
7922 %
7923 % Put the category name at the right margin.
7924 \noindent
7925 \hbox to 0pt{%
7926 \hfil\box0 \kern-\hsize
7927 % \hsize has to be shortened this way:
7928 \kern\leftskip
7929 % Intentionally do not respect \rightskip, since we need the space.
7930 }%
7931 %
7932 % Allow all lines to be underfull without complaint:
7933 \tolerance=10000 \hbadness=10000
7934 \exdentamount=\defbodyindent
7935 {%
7936 % defun fonts. We use typewriter by default (used to be bold) because:
7937 % . we're printing identifiers, they should be in tt in principle.
7938 % . in languages with many accents, such as Czech or French, it's
7939 % common to leave accents off identifiers. The result looks ok in
7940 % tt, but exceedingly strange in rm.
7941 % . we don't want -- and --- to be treated as ligatures.
7942 % . this still does not fix the ?` and !` ligatures, but so far no
7943 % one has made identifiers using them :).
7944 \df \tt
7945 \def\temp{#2}% text of the return type
7946 \ifx\temp\empty\else
7947 \tclose{\temp}% typeset the return type
7948 \ifrettypeownline
7949 % put return type on its own line; prohibit line break following:
7950 \hfil\vadjust{\nobreak}\break
7951 \else
7952 \space % type on same line, so just followed by a space
7953 \fi
7954 \fi % no return type
7955 #3% output function name
7956 }%
7957 {\rm\enskip}% hskip 0.5 em of \rmfont
7958 %
7959 \boldbrax
7960 % arguments will be output next, if any.
7961 }
7962
7963 % Print arguments in slanted roman (not ttsl), inconsistently with using
7964 % tt for the name. This is because literal text is sometimes needed in
7965 % the argument list (groff manual), and ttsl and tt are not very
7966 % distinguishable. Prevent hyphenation at `-' chars.
7967 %
7968 \def\defunargs#1{%
7969 % use sl by default (not ttsl),
7970 % tt for the names.
7971 \df \sl \hyphenchar\font=0
7972 %
7973 % On the other hand, if an argument has two dashes (for instance), we
7974 % want a way to get ttsl. We used to recommend @var for that, so
7975 % leave the code in, but it's strange for @var to lead to typewriter.
7976 % Nowadays we recommend @code, since the difference between a ttsl hyphen
7977 % and a tt hyphen is pretty tiny. @code also disables ?` !`.
7978 \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
7979 #1%
7980 \sl\hyphenchar\font=45
7981 }
7982
7983 % We want ()&[] to print specially on the defun line.
7984 %
7985 \def\activeparens{%
7986 \catcode`\(=\active \catcode`\)=\active
7987 \catcode`\[=\active \catcode`\]=\active
7988 \catcode`\&=\active
7989 }
7990
7991 % Make control sequences which act like normal parenthesis chars.
7992 \let\lparen = ( \let\rparen = )
7993
7994 % Be sure that we always have a definition for `(', etc. For example,
7995 % if the fn name has parens in it, \boldbrax will not be in effect yet,
7996 % so TeX would otherwise complain about undefined control sequence.
7997 {
7998 \activeparens
7999 \global\let(=\lparen \global\let)=\rparen
8000 \global\let[=\lbrack \global\let]=\rbrack
8001 \global\let& = \&
8002
8003 \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
8004 \gdef\magicamp{\let&=\amprm}
8005 }
8006 \let\ampchar\&
8007
8008 \newcount\parencount
8009
8010 % If we encounter &foo, then turn on ()-hacking afterwards
8011 \newif\ifampseen
8012 \def\amprm#1 {\ampseentrue{\bf\&#1 }}
8013
8014 \def\parenfont{%
8015 \ifampseen
8016 % At the first level, print parens in roman,
8017 % otherwise use the default font.
8018 \ifnum \parencount=1 \rm \fi
8019 \else
8020 % The \sf parens (in \boldbrax) actually are a little bolder than
8021 % the contained text. This is especially needed for [ and ] .
8022 \sf
8023 \fi
8024 }
8025 \def\infirstlevel#1{%
8026 \ifampseen
8027 \ifnum\parencount=1
8028 #1%
8029 \fi
8030 \fi
8031 }
8032 \def\bfafterword#1 {#1 \bf}
8033
8034 \def\opnr{%
8035 \global\advance\parencount by 1
8036 {\parenfont(}%
8037 \infirstlevel \bfafterword
8038 }
8039 \def\clnr{%
8040 {\parenfont)}%
8041 \infirstlevel \sl
8042 \global\advance\parencount by -1
8043 }
8044
8045 \newcount\brackcount
8046 \def\lbrb{%
8047 \global\advance\brackcount by 1
8048 {\bf[}%
8049 }
8050 \def\rbrb{%
8051 {\bf]}%
8052 \global\advance\brackcount by -1
8053 }
8054
8055 \def\checkparencounts{%
8056 \ifnum\parencount=0 \else \badparencount \fi
8057 \ifnum\brackcount=0 \else \badbrackcount \fi
8058 }
8059 % these should not use \errmessage; the glibc manual, at least, actually
8060 % has such constructs (when documenting function pointers).
8061 \def\badparencount{%
8062 \message{Warning: unbalanced parentheses in @def...}%
8063 \global\parencount=0
8064 }
8065 \def\badbrackcount{%
8066 \message{Warning: unbalanced square brackets in @def...}%
8067 \global\brackcount=0
8068 }
8069
8070
8071 \message{macros,}
8072 % @macro.
8073
8074 % To do this right we need a feature of e-TeX, \scantokens,
8075 % which we arrange to emulate with a temporary file in ordinary TeX.
8076 \ifx\eTeXversion\thisisundefined
8077 \newwrite\macscribble
8078 \def\scantokens#1{%
8079 \toks0={#1}%
8080 \immediate\openout\macscribble=\jobname.tmp
8081 \immediate\write\macscribble{\the\toks0}%
8082 \immediate\closeout\macscribble
8083 \input \jobname.tmp
8084 }
8085 \fi
8086
8087 % alias because \c means cedilla in @tex or @math
8088 \let\texinfoc=\c
8089
8090 \newcount\savedcatcodeone
8091 \newcount\savedcatcodetwo
8092
8093 % Used at the time of macro expansion.
8094 % Argument is macro body with arguments substituted
8095 \def\scanmacro#1{%
8096 \newlinechar`\^^M
8097 \def\xeatspaces{\eatspaces}%
8098 %
8099 % Temporarily undo catcode changes of \printindex. Set catcode of @ to
8100 % 0 so that @-commands in macro expansions aren't printed literally when
8101 % formatting an index file, where \ is used as the escape character.
8102 \savedcatcodeone=\catcode`\@
8103 \savedcatcodetwo=\catcode`\\
8104 \catcode`\@=0
8105 \catcode`\\=\active
8106 %
8107 % Process the macro body under the current catcode regime.
8108 \scantokens{#1@texinfoc}%
8109 %
8110 \catcode`\@=\savedcatcodeone
8111 \catcode`\\=\savedcatcodetwo
8112 %
8113 % The \texinfoc is to remove the \newlinechar added by \scantokens, and
8114 % can be noticed by \parsearg.
8115 % We avoid surrounding the call to \scantokens with \bgroup and \egroup
8116 % to allow macros to open or close groups themselves.
8117 }
8118
8119 % Used for copying and captions
8120 \def\scanexp#1{%
8121 \expandafter\scanmacro\expandafter{#1}%
8122 }
8123
8124 \newcount\paramno % Count of parameters
8125 \newtoks\macname % Macro name
8126 \newif\ifrecursive % Is it recursive?
8127
8128 % List of all defined macros in the form
8129 % \commondummyword\macro1\commondummyword\macro2...
8130 % Currently is also contains all @aliases; the list can be split
8131 % if there is a need.
8132 \def\macrolist{}
8133
8134 % Add the macro to \macrolist
8135 \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
8136 \def\addtomacrolistxxx#1{%
8137 \toks0 = \expandafter{\macrolist\commondummyword#1}%
8138 \xdef\macrolist{\the\toks0}%
8139 }
8140
8141 % Utility routines.
8142 % This does \let #1 = #2, with \csnames; that is,
8143 % \let \csname#1\endcsname = \csname#2\endcsname
8144 % (except of course we have to play expansion games).
8145 %
8146 \def\cslet#1#2{%
8147 \expandafter\let
8148 \csname#1\expandafter\endcsname
8149 \csname#2\endcsname
8150 }
8151
8152 % Trim leading and trailing spaces off a string.
8153 % Concepts from aro-bend problem 15 (see CTAN).
8154 {\catcode`\@=11
8155 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
8156 \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
8157 \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
8158 \def\unbrace#1{#1}
8159 \unbrace{\gdef\trim@@@ #1 } #2@{#1}
8160 }
8161
8162 % Trim a single trailing ^^M off a string.
8163 {\catcode`\^^M=\other \catcode`\Q=3%
8164 \gdef\eatcr #1{\eatcra #1Q^^MQ}%
8165 \gdef\eatcra#1^^MQ{\eatcrb#1Q}%
8166 \gdef\eatcrb#1Q#2Q{#1}%
8167 }
8168
8169 % Macro bodies are absorbed as an argument in a context where
8170 % all characters are catcode 10, 11 or 12, except \ which is active
8171 % (as in normal texinfo). It is necessary to change the definition of \
8172 % to recognize macro arguments; this is the job of \mbodybackslash.
8173 %
8174 % Non-ASCII encodings make 8-bit characters active, so un-activate
8175 % them to avoid their expansion. Must do this non-globally, to
8176 % confine the change to the current group.
8177 %
8178 % It's necessary to have hard CRs when the macro is executed. This is
8179 % done by making ^^M (\endlinechar) catcode 12 when reading the macro
8180 % body, and then making it the \newlinechar in \scanmacro.
8181 %
8182 \def\scanctxt{% used as subroutine
8183 \catcode`\"=\other
8184 \catcode`\+=\other
8185 \catcode`\<=\other
8186 \catcode`\>=\other
8187 \catcode`\^=\other
8188 \catcode`\_=\other
8189 \catcode`\|=\other
8190 \catcode`\~=\other
8191 \passthroughcharstrue
8192 }
8193
8194 \def\scanargctxt{% used for copying and captions, not macros.
8195 \scanctxt
8196 \catcode`\@=\other
8197 \catcode`\\=\other
8198 \catcode`\^^M=\other
8199 }
8200
8201 \def\macrobodyctxt{% used for @macro definitions
8202 \scanctxt
8203 \catcode`\ =\other
8204 \catcode`\@=\other
8205 \catcode`\{=\other
8206 \catcode`\}=\other
8207 \catcode`\^^M=\other
8208 \usembodybackslash
8209 }
8210
8211 % Used when scanning braced macro arguments. Note, however, that catcode
8212 % changes here are ineffectual if the macro invocation was nested inside
8213 % an argument to another Texinfo command.
8214 \def\macroargctxt{%
8215 \scanctxt
8216 \catcode`\ =\active
8217 \catcode`\^^M=\other
8218 \catcode`\\=\active
8219 }
8220
8221 \def\macrolineargctxt{% used for whole-line arguments without braces
8222 \scanctxt
8223 \catcode`\{=\other
8224 \catcode`\}=\other
8225 }
8226
8227 % \mbodybackslash is the definition of \ in @macro bodies.
8228 % It maps \foo\ => \csname macarg.foo\endcsname => #N
8229 % where N is the macro parameter number.
8230 % We define \csname macarg.\endcsname to be \realbackslash, so
8231 % \\ in macro replacement text gets you a backslash.
8232 %
8233 {\catcode`@=0 @catcode`@\=@active
8234 @gdef@usembodybackslash{@let\=@mbodybackslash}
8235 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
8236 }
8237 \expandafter\def\csname macarg.\endcsname{\realbackslash}
8238
8239 \def\margbackslash#1{\char`\#1 }
8240
8241 \def\macro{\recursivefalse\parsearg\macroxxx}
8242 \def\rmacro{\recursivetrue\parsearg\macroxxx}
8243
8244 \def\macroxxx#1{%
8245 \getargs{#1}% now \macname is the macname and \argl the arglist
8246 \ifx\argl\empty % no arguments
8247 \paramno=0\relax
8248 \else
8249 \expandafter\parsemargdef \argl;%
8250 \if\paramno>256\relax
8251 \ifx\eTeXversion\thisisundefined
8252 \errhelp = \EMsimple
8253 \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
8254 \fi
8255 \fi
8256 \fi
8257 \if1\csname ismacro.\the\macname\endcsname
8258 \message{Warning: redefining \the\macname}%
8259 \else
8260 \expandafter\ifx\csname \the\macname\endcsname \relax
8261 \else \errmessage{Macro name \the\macname\space already defined}\fi
8262 \global\cslet{macsave.\the\macname}{\the\macname}%
8263 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
8264 \addtomacrolist{\the\macname}%
8265 \fi
8266 \begingroup \macrobodyctxt
8267 \ifrecursive \expandafter\parsermacbody
8268 \else \expandafter\parsemacbody
8269 \fi}
8270
8271 \parseargdef\unmacro{%
8272 \if1\csname ismacro.#1\endcsname
8273 \global\cslet{#1}{macsave.#1}%
8274 \global\expandafter\let \csname ismacro.#1\endcsname=0%
8275 % Remove the macro name from \macrolist:
8276 \begingroup
8277 \expandafter\let\csname#1\endcsname \relax
8278 \let\commondummyword\unmacrodo
8279 \xdef\macrolist{\macrolist}%
8280 \endgroup
8281 \else
8282 \errmessage{Macro #1 not defined}%
8283 \fi
8284 }
8285
8286 % Called by \do from \dounmacro on each macro. The idea is to omit any
8287 % macro definitions that have been changed to \relax.
8288 %
8289 \def\unmacrodo#1{%
8290 \ifx #1\relax
8291 % remove this
8292 \else
8293 \noexpand\commondummyword \noexpand#1%
8294 \fi
8295 }
8296
8297 % \getargs -- Parse the arguments to a @macro line. Set \macname to
8298 % the name of the macro, and \argl to the braced argument list.
8299 \def\getargs#1{\getargsxxx#1{}}
8300 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
8301 \def\getmacname#1 #2\relax{\macname={#1}}
8302 \def\getmacargs#1{\def\argl{#1}}
8303 % This made use of the feature that if the last token of a
8304 % <parameter list> is #, then the preceding argument is delimited by
8305 % an opening brace, and that opening brace is not consumed.
8306
8307 % Parse the optional {params} list to @macro or @rmacro.
8308 % Set \paramno to the number of arguments,
8309 % and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
8310 % three-param macro.) Define \macarg.BLAH for each BLAH in the params
8311 % list to some hook where the argument is to be expanded. If there are
8312 % less than 10 arguments that hook is to be replaced by ##N where N
8313 % is the position in that list, that is to say the macro arguments are to be
8314 % defined `a la TeX in the macro body.
8315 %
8316 % That gets used by \mbodybackslash (above).
8317 %
8318 % If there are 10 or more arguments, a different technique is used: see
8319 % \parsemmanyargdef.
8320 %
8321 \def\parsemargdef#1;{%
8322 \paramno=0\def\paramlist{}%
8323 \let\hash\relax
8324 % \hash is redefined to `#' later to get it into definitions
8325 \let\xeatspaces\relax
8326 \parsemargdefxxx#1,;,%
8327 \ifnum\paramno<10\relax\else
8328 \paramno0\relax
8329 \parsemmanyargdef@@#1,;,% 10 or more arguments
8330 \fi
8331 }
8332 \def\parsemargdefxxx#1,{%
8333 \if#1;\let\next=\relax
8334 \else \let\next=\parsemargdefxxx
8335 \advance\paramno by 1
8336 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
8337 {\xeatspaces{\hash\the\paramno}}%
8338 \edef\paramlist{\paramlist\hash\the\paramno,}%
8339 \fi\next}
8340
8341 % \parsemacbody, \parsermacbody
8342 %
8343 % Read recursive and nonrecursive macro bodies. (They're different since
8344 % rec and nonrec macros end differently.)
8345 %
8346 % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
8347 % body to be transformed.
8348 % Set \macrobody to the body of the macro, and call \defmacro.
8349 %
8350 {\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
8351 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8352 {\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
8353 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8354
8355 % Make @ a letter, so that we can make private-to-Texinfo macro names.
8356 \edef\texiatcatcode{\the\catcode`\@}
8357 \catcode `@=11\relax
8358
8359 %%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
8360
8361 % If there are 10 or more arguments, a different technique is used, where the
8362 % hook remains in the body, and when macro is to be expanded the body is
8363 % processed again to replace the arguments.
8364 %
8365 % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
8366 % argument N value and then \edef the body (nothing else will expand because of
8367 % the catcode regime under which the body was input).
8368 %
8369 % If you compile with TeX (not eTeX), and you have macros with 10 or more
8370 % arguments, no macro can have more than 256 arguments (else error).
8371 %
8372 % In case that there are 10 or more arguments we parse again the arguments
8373 % list to set new definitions for the \macarg.BLAH macros corresponding to
8374 % each BLAH argument. It was anyhow needed to parse already once this list
8375 % in order to count the arguments, and as macros with at most 9 arguments
8376 % are by far more frequent than macro with 10 or more arguments, defining
8377 % twice the \macarg.BLAH macros does not cost too much processing power.
8378 \def\parsemmanyargdef@@#1,{%
8379 \if#1;\let\next=\relax
8380 \else
8381 \let\next=\parsemmanyargdef@@
8382 \edef\tempb{\eatspaces{#1}}%
8383 \expandafter\def\expandafter\tempa
8384 \expandafter{\csname macarg.\tempb\endcsname}%
8385 % Note that we need some extra \noexpand\noexpand, this is because we
8386 % don't want \the to be expanded in the \parsermacbody as it uses an
8387 % \xdef .
8388 \expandafter\edef\tempa
8389 {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
8390 \advance\paramno by 1\relax
8391 \fi\next}
8392
8393
8394 \let\endargs@\relax
8395 \let\nil@\relax
8396 \def\nilm@{\nil@}%
8397 \long\def\nillm@{\nil@}%
8398
8399 % This macro is expanded during the Texinfo macro expansion, not during its
8400 % definition. It gets all the arguments' values and assigns them to macros
8401 % macarg.ARGNAME
8402 %
8403 % #1 is the macro name
8404 % #2 is the list of argument names
8405 % #3 is the list of argument values
8406 \def\getargvals@#1#2#3{%
8407 \def\macargdeflist@{}%
8408 \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
8409 \def\paramlist{#2,\nil@}%
8410 \def\macroname{#1}%
8411 \begingroup
8412 \macroargctxt
8413 \def\argvaluelist{#3,\nil@}%
8414 \def\@tempa{#3}%
8415 \ifx\@tempa\empty
8416 \setemptyargvalues@
8417 \else
8418 \getargvals@@
8419 \fi
8420 }
8421 \def\getargvals@@{%
8422 \ifx\paramlist\nilm@
8423 % Some sanity check needed here that \argvaluelist is also empty.
8424 \ifx\argvaluelist\nillm@
8425 \else
8426 \errhelp = \EMsimple
8427 \errmessage{Too many arguments in macro `\macroname'!}%
8428 \fi
8429 \let\next\macargexpandinbody@
8430 \else
8431 \ifx\argvaluelist\nillm@
8432 % No more arguments values passed to macro. Set remaining named-arg
8433 % macros to empty.
8434 \let\next\setemptyargvalues@
8435 \else
8436 % pop current arg name into \@tempb
8437 \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
8438 \expandafter\@tempa\expandafter{\paramlist}%
8439 % pop current argument value into \@tempc
8440 \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
8441 \expandafter\@tempa\expandafter{\argvaluelist}%
8442 % Here \@tempb is the current arg name and \@tempc is the current arg value.
8443 % First place the new argument macro definition into \@tempd
8444 \expandafter\macname\expandafter{\@tempc}%
8445 \expandafter\let\csname macarg.\@tempb\endcsname\relax
8446 \expandafter\def\expandafter\@tempe\expandafter{%
8447 \csname macarg.\@tempb\endcsname}%
8448 \edef\@tempd{\long\def\@tempe{\the\macname}}%
8449 \push@\@tempd\macargdeflist@
8450 \let\next\getargvals@@
8451 \fi
8452 \fi
8453 \next
8454 }
8455
8456 \def\push@#1#2{%
8457 \expandafter\expandafter\expandafter\def
8458 \expandafter\expandafter\expandafter#2%
8459 \expandafter\expandafter\expandafter{%
8460 \expandafter#1#2}%
8461 }
8462
8463 % Replace arguments by their values in the macro body, and place the result
8464 % in macro \@tempa.
8465 %
8466 \def\macvalstoargs@{%
8467 % To do this we use the property that token registers that are \the'ed
8468 % within an \edef expand only once. So we are going to place all argument
8469 % values into respective token registers.
8470 %
8471 % First we save the token context, and initialize argument numbering.
8472 \begingroup
8473 \paramno0\relax
8474 % Then, for each argument number #N, we place the corresponding argument
8475 % value into a new token list register \toks#N
8476 \expandafter\putargsintokens@\saveparamlist@,;,%
8477 % Then, we expand the body so that argument are replaced by their
8478 % values. The trick for values not to be expanded themselves is that they
8479 % are within tokens and that tokens expand only once in an \edef .
8480 \edef\@tempc{\csname mac.\macroname .body\endcsname}%
8481 % Now we restore the token stack pointer to free the token list registers
8482 % which we have used, but we make sure that expanded body is saved after
8483 % group.
8484 \expandafter
8485 \endgroup
8486 \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
8487 }
8488
8489 % Define the named-macro outside of this group and then close this group.
8490 %
8491 \def\macargexpandinbody@{%
8492 \expandafter
8493 \endgroup
8494 \macargdeflist@
8495 % First the replace in body the macro arguments by their values, the result
8496 % is in \@tempa .
8497 \macvalstoargs@
8498 % Then we point at the \norecurse or \gobble (for recursive) macro value
8499 % with \@tempb .
8500 \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
8501 % Depending on whether it is recursive or not, we need some tailing
8502 % \egroup .
8503 \ifx\@tempb\gobble
8504 \let\@tempc\relax
8505 \else
8506 \let\@tempc\egroup
8507 \fi
8508 % And now we do the real job:
8509 \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
8510 \@tempd
8511 }
8512
8513 \def\putargsintokens@#1,{%
8514 \if#1;\let\next\relax
8515 \else
8516 \let\next\putargsintokens@
8517 % First we allocate the new token list register, and give it a temporary
8518 % alias \@tempb .
8519 \toksdef\@tempb\the\paramno
8520 % Then we place the argument value into that token list register.
8521 \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
8522 \expandafter\@tempb\expandafter{\@tempa}%
8523 \advance\paramno by 1\relax
8524 \fi
8525 \next
8526 }
8527
8528 % Trailing missing arguments are set to empty.
8529 %
8530 \def\setemptyargvalues@{%
8531 \ifx\paramlist\nilm@
8532 \let\next\macargexpandinbody@
8533 \else
8534 \expandafter\setemptyargvaluesparser@\paramlist\endargs@
8535 \let\next\setemptyargvalues@
8536 \fi
8537 \next
8538 }
8539
8540 \def\setemptyargvaluesparser@#1,#2\endargs@{%
8541 \expandafter\def\expandafter\@tempa\expandafter{%
8542 \expandafter\def\csname macarg.#1\endcsname{}}%
8543 \push@\@tempa\macargdeflist@
8544 \def\paramlist{#2}%
8545 }
8546
8547 % #1 is the element target macro
8548 % #2 is the list macro
8549 % #3,#4\endargs@ is the list value
8550 \def\pop@#1#2#3,#4\endargs@{%
8551 \def#1{#3}%
8552 \def#2{#4}%
8553 }
8554 \long\def\longpop@#1#2#3,#4\endargs@{%
8555 \long\def#1{#3}%
8556 \long\def#2{#4}%
8557 }
8558
8559
8560 %%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
8561
8562
8563 % This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
8564 % \macrobody has the body of the macro in it, with placeholders for
8565 % its parameters, looking like "\xeatspaces{\hash 1}".
8566 % \paramno is the number of parameters
8567 % \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
8568 % There are four cases: macros of zero, one, up to nine, and many arguments.
8569 % \xdef is used so that macro definitions will survive the file
8570 % they're defined in: @include reads the file inside a group.
8571 %
8572 \def\defmacro{%
8573 \let\hash=##% convert placeholders to macro parameter chars
8574 \ifnum\paramno=1
8575 \def\xeatspaces##1{##1}%
8576 % This removes the pair of braces around the argument. We don't
8577 % use \eatspaces, because this can cause ends of lines to be lost
8578 % when the argument to \eatspaces is read, leading to line-based
8579 % commands like "@itemize" not being read correctly.
8580 \else
8581 \let\xeatspaces\relax % suppress expansion
8582 \fi
8583 \ifcase\paramno
8584 % 0
8585 \expandafter\xdef\csname\the\macname\endcsname{%
8586 \bgroup
8587 \noexpand\spaceisspace
8588 \noexpand\endlineisspace
8589 \noexpand\expandafter % skip any whitespace after the macro name.
8590 \expandafter\noexpand\csname\the\macname @@@\endcsname}%
8591 \expandafter\xdef\csname\the\macname @@@\endcsname{%
8592 \egroup
8593 \noexpand\scanmacro{\macrobody}}%
8594 \or % 1
8595 \expandafter\xdef\csname\the\macname\endcsname{%
8596 \bgroup
8597 \noexpand\braceorline
8598 \expandafter\noexpand\csname\the\macname @@@\endcsname}%
8599 \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
8600 \egroup
8601 \noexpand\scanmacro{\macrobody}%
8602 }%
8603 \else % at most 9
8604 \ifnum\paramno<10\relax
8605 % @MACNAME sets the context for reading the macro argument
8606 % @MACNAME@@ gets the argument, processes backslashes and appends a
8607 % comma.
8608 % @MACNAME@@@ removes braces surrounding the argument list.
8609 % @MACNAME@@@@ scans the macro body with arguments substituted.
8610 \expandafter\xdef\csname\the\macname\endcsname{%
8611 \bgroup
8612 \noexpand\expandafter % This \expandafter skip any spaces after the
8613 \noexpand\macroargctxt % macro before we change the catcode of space.
8614 \noexpand\expandafter
8615 \expandafter\noexpand\csname\the\macname @@\endcsname}%
8616 \expandafter\xdef\csname\the\macname @@\endcsname##1{%
8617 \noexpand\passargtomacro
8618 \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
8619 \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
8620 \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
8621 \expandafter\expandafter
8622 \expandafter\xdef
8623 \expandafter\expandafter
8624 \csname\the\macname @@@@\endcsname\paramlist{%
8625 \egroup\noexpand\scanmacro{\macrobody}}%
8626 \else % 10 or more:
8627 \expandafter\xdef\csname\the\macname\endcsname{%
8628 \noexpand\getargvals@{\the\macname}{\argl}%
8629 }%
8630 \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody
8631 \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
8632 \fi
8633 \fi}
8634
8635 \catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
8636
8637 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
8638
8639
8640 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8641 %
8642 {\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape
8643 @catcode`@_=11 % private names
8644 @catcode`@!=11 % used as argument separator
8645
8646 % \passargtomacro#1#2 -
8647 % Call #1 with a list of tokens #2, with any doubled backslashes in #2
8648 % compressed to one.
8649 %
8650 % This implementation works by expansion, and not execution (so we cannot use
8651 % \def or similar). This reduces the risk of this failing in contexts where
8652 % complete expansion is done with no execution (for example, in writing out to
8653 % an auxiliary file for an index entry).
8654 %
8655 % State is kept in the input stream: the argument passed to
8656 % @look_ahead, @gobble_and_check_finish and @add_segment is
8657 %
8658 % THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input)
8659 %
8660 % where:
8661 % THE_MACRO - name of the macro we want to call
8662 % ARG_RESULT - argument list we build to pass to that macro
8663 % PENDING_BS - either a backslash or nothing
8664 % NEXT_TOKEN - used to look ahead in the input stream to see what's coming next
8665
8666 @gdef@passargtomacro#1#2{%
8667 @add_segment #1!{}@relax#2\@_finish\%
8668 }
8669 @gdef@_finish{@_finishx} @global@let@_finishx@relax
8670
8671 % #1 - THE_MACRO ARG_RESULT
8672 % #2 - PENDING_BS
8673 % #3 - NEXT_TOKEN
8674 % #4 used to look ahead
8675 %
8676 % If the next token is not a backslash, process the rest of the argument;
8677 % otherwise, remove the next token.
8678 @gdef@look_ahead#1!#2#3#4{%
8679 @ifx#4\%
8680 @expandafter@gobble_and_check_finish
8681 @else
8682 @expandafter@add_segment
8683 @fi#1!{#2}#4#4%
8684 }
8685
8686 % #1 - THE_MACRO ARG_RESULT
8687 % #2 - PENDING_BS
8688 % #3 - NEXT_TOKEN
8689 % #4 should be a backslash, which is gobbled.
8690 % #5 looks ahead
8691 %
8692 % Double backslash found. Add a single backslash, and look ahead.
8693 @gdef@gobble_and_check_finish#1!#2#3#4#5{%
8694 @add_segment#1\!{}#5#5%
8695 }
8696
8697 @gdef@is_fi{@fi}
8698
8699 % #1 - THE_MACRO ARG_RESULT
8700 % #2 - PENDING_BS
8701 % #3 - NEXT_TOKEN
8702 % #4 is input stream until next backslash
8703 %
8704 % Input stream is either at the start of the argument, or just after a
8705 % backslash sequence, either a lone backslash, or a doubled backslash.
8706 % NEXT_TOKEN contains the first token in the input stream: if it is \finish,
8707 % finish; otherwise, append to ARG_RESULT the segment of the argument up until
8708 % the next backslash. PENDING_BACKSLASH contains a backslash to represent
8709 % a backslash just before the start of the input stream that has not been
8710 % added to ARG_RESULT.
8711 @gdef@add_segment#1!#2#3#4\{%
8712 @ifx#3@_finish
8713 @call_the_macro#1!%
8714 @else
8715 % append the pending backslash to the result, followed by the next segment
8716 @expandafter@is_fi@look_ahead#1#2#4!{\}@fi
8717 % this @fi is discarded by @look_ahead.
8718 % we can't get rid of it with \expandafter because we don't know how
8719 % long #4 is.
8720 }
8721
8722 % #1 - THE_MACRO
8723 % #2 - ARG_RESULT
8724 % #3 discards the res of the conditional in @add_segment, and @is_fi ends the
8725 % conditional.
8726 @gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}}
8727
8728 }
8729 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8730
8731 % \braceorline MAC is used for a one-argument macro MAC. It checks
8732 % whether the next non-whitespace character is a {. It sets the context
8733 % for reading the argument (slightly different in the two cases). Then,
8734 % to read the argument, in the whole-line case, it then calls the regular
8735 % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
8736 %
8737 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
8738 \def\braceorlinexxx{%
8739 \ifx\nchar\bgroup
8740 \macroargctxt
8741 \expandafter\passargtomacro
8742 \else
8743 \macrolineargctxt\expandafter\parsearg
8744 \fi \macnamexxx}
8745
8746
8747 % @alias.
8748 % We need some trickery to remove the optional spaces around the equal
8749 % sign. Make them active and then expand them all to nothing.
8750 %
8751 \def\alias{\parseargusing\obeyspaces\aliasxxx}
8752 \def\aliasxxx #1{\aliasyyy#1\relax}
8753 \def\aliasyyy #1=#2\relax{%
8754 {%
8755 \expandafter\let\obeyedspace=\empty
8756 \addtomacrolist{#1}%
8757 \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
8758 }%
8759 \next
8760 }
8761
8762
8763 \message{cross references,}
8764
8765 \newwrite\auxfile
8766 \newif\ifhavexrefs % True if xref values are known.
8767 \newif\ifwarnedxrefs % True if we warned once that they aren't known.
8768
8769 % @inforef is relatively simple.
8770 \def\inforef #1{\inforefzzz #1,,,,**}
8771 \def\inforefzzz #1,#2,#3,#4**{%
8772 \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
8773 node \samp{\ignorespaces#1{}}}
8774
8775 % @node's only job in TeX is to define \lastnode, which is used in
8776 % cross-references. The @node line might or might not have commas, and
8777 % might or might not have spaces before the first comma, like:
8778 % @node foo , bar , ...
8779 % We don't want such trailing spaces in the node name.
8780 %
8781 \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
8782 %
8783 % also remove a trailing comma, in case of something like this:
8784 % @node Help-Cross, , , Cross-refs
8785 \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
8786 \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
8787
8788 \let\nwnode=\node
8789 \let\lastnode=\empty
8790
8791 % Write a cross-reference definition for the current node. #1 is the
8792 % type (Ynumbered, Yappendix, Ynothing).
8793 %
8794 \def\donoderef#1{%
8795 \ifx\lastnode\empty\else
8796 \setref{\lastnode}{#1}%
8797 \global\let\lastnode=\empty
8798 \fi
8799 }
8800
8801 % @anchor{NAME} -- define xref target at arbitrary point.
8802 %
8803 \newcount\savesfregister
8804 %
8805 \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
8806 \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
8807 \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
8808
8809 % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
8810 % anchor), which consists of three parts:
8811 % 1) NAME-title - the current sectioning name taken from \lastsection,
8812 % or the anchor name.
8813 % 2) NAME-snt - section number and type, passed as the SNT arg, or
8814 % empty for anchors.
8815 % 3) NAME-pg - the page number.
8816 %
8817 % This is called from \donoderef, \anchor, and \dofloat. In the case of
8818 % floats, there is an additional part, which is not written here:
8819 % 4) NAME-lof - the text as it should appear in a @listoffloats.
8820 %
8821 \def\setref#1#2{%
8822 \pdfmkdest{#1}%
8823 \iflinks
8824 {%
8825 \requireauxfile
8826 \atdummies % preserve commands, but don't expand them
8827 % match definition in \xrdef, \refx, \xrefX.
8828 \def\value##1{##1}%
8829 \edef\writexrdef##1##2{%
8830 \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
8831 ##1}{##2}}% these are parameters of \writexrdef
8832 }%
8833 \toks0 = \expandafter{\lastsection}%
8834 \immediate \writexrdef{title}{\the\toks0 }%
8835 \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
8836 \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
8837 }%
8838 \fi
8839 }
8840
8841 % @xrefautosectiontitle on|off says whether @section(ing) names are used
8842 % automatically in xrefs, if the third arg is not explicitly specified.
8843 % This was provided as a "secret" @set xref-automatic-section-title
8844 % variable, now it's official.
8845 %
8846 \parseargdef\xrefautomaticsectiontitle{%
8847 \def\temp{#1}%
8848 \ifx\temp\onword
8849 \expandafter\let\csname SETxref-automatic-section-title\endcsname
8850 = \empty
8851 \else\ifx\temp\offword
8852 \expandafter\let\csname SETxref-automatic-section-title\endcsname
8853 = \relax
8854 \else
8855 \errhelp = \EMsimple
8856 \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
8857 must be on|off}%
8858 \fi\fi
8859 }
8860
8861 %
8862 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
8863 % the node name, #2 the name of the Info cross-reference, #3 the printed
8864 % node name, #4 the name of the Info file, #5 the name of the printed
8865 % manual. All but the node name can be omitted.
8866 %
8867 \def\pxref{\putwordsee{} \xrefXX}
8868 \def\xref{\putwordSee{} \xrefXX}
8869 \def\ref{\xrefXX}
8870
8871 \def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX}
8872 \def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]}
8873 %
8874 \newbox\toprefbox
8875 \newbox\printedrefnamebox
8876 \newbox\infofilenamebox
8877 \newbox\printedmanualbox
8878 %
8879 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
8880 \unsepspaces
8881 %
8882 % Get args without leading/trailing spaces.
8883 \def\printedrefname{\ignorespaces #3}%
8884 \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
8885 %
8886 \def\infofilename{\ignorespaces #4}%
8887 \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
8888 %
8889 \def\printedmanual{\ignorespaces #5}%
8890 \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
8891 %
8892 % If the printed reference name (arg #3) was not explicitly given in
8893 % the @xref, figure out what we want to use.
8894 \ifdim \wd\printedrefnamebox = 0pt
8895 % No printed node name was explicitly given.
8896 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
8897 % Not auto section-title: use node name inside the square brackets.
8898 \def\printedrefname{\ignorespaces #1}%
8899 \else
8900 % Auto section-title: use chapter/section title inside
8901 % the square brackets if we have it.
8902 \ifdim \wd\printedmanualbox > 0pt
8903 % It is in another manual, so we don't have it; use node name.
8904 \def\printedrefname{\ignorespaces #1}%
8905 \else
8906 \ifhavexrefs
8907 % We (should) know the real title if we have the xref values.
8908 \def\printedrefname{\refx{#1-title}{}}%
8909 \else
8910 % Otherwise just copy the Info node name.
8911 \def\printedrefname{\ignorespaces #1}%
8912 \fi%
8913 \fi
8914 \fi
8915 \fi
8916 %
8917 % Make link in pdf output.
8918 \ifpdf
8919 % For pdfTeX and LuaTeX
8920 {\indexnofonts
8921 \makevalueexpandable
8922 \turnoffactive
8923 % This expands tokens, so do it after making catcode changes, so _
8924 % etc. don't get their TeX definitions. This ignores all spaces in
8925 % #4, including (wrongly) those in the middle of the filename.
8926 \getfilename{#4}%
8927 %
8928 % This (wrongly) does not take account of leading or trailing
8929 % spaces in #1, which should be ignored.
8930 \setpdfdestname{#1}%
8931 %
8932 \ifx\pdfdestname\empty
8933 \def\pdfdestname{Top}% no empty targets
8934 \fi
8935 %
8936 \leavevmode
8937 \startlink attr{/Border [0 0 0]}%
8938 \ifnum\filenamelength>0
8939 goto file{\the\filename.pdf} name{\pdfdestname}%
8940 \else
8941 goto name{\pdfmkpgn{\pdfdestname}}%
8942 \fi
8943 }%
8944 \setcolor{\linkcolor}%
8945 \else
8946 \ifx\XeTeXrevision\thisisundefined
8947 \else
8948 % For XeTeX
8949 {\indexnofonts
8950 \makevalueexpandable
8951 \turnoffactive
8952 % This expands tokens, so do it after making catcode changes, so _
8953 % etc. don't get their TeX definitions. This ignores all spaces in
8954 % #4, including (wrongly) those in the middle of the filename.
8955 \getfilename{#4}%
8956 %
8957 % This (wrongly) does not take account of leading or trailing
8958 % spaces in #1, which should be ignored.
8959 \setpdfdestname{#1}%
8960 %
8961 \ifx\pdfdestname\empty
8962 \def\pdfdestname{Top}% no empty targets
8963 \fi
8964 %
8965 \leavevmode
8966 \ifnum\filenamelength>0
8967 % With default settings,
8968 % XeTeX (xdvipdfmx) replaces link destination names with integers.
8969 % In this case, the replaced destination names of
8970 % remote PDFs are no longer known. In order to avoid a replacement,
8971 % you can use xdvipdfmx's command line option `-C 0x0010'.
8972 % If you use XeTeX 0.99996+ (TeX Live 2016+),
8973 % this command line option is no longer necessary
8974 % because we can use the `dvipdfmx:config' special.
8975 \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
8976 << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}%
8977 \else
8978 \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
8979 << /S /GoTo /D (\pdfdestname) >> >>}%
8980 \fi
8981 }%
8982 \setcolor{\linkcolor}%
8983 \fi
8984 \fi
8985 {%
8986 % Have to otherify everything special to allow the \csname to
8987 % include an _ in the xref name, etc.
8988 \indexnofonts
8989 \turnoffactive
8990 \def\value##1{##1}%
8991 \expandafter\global\expandafter\let\expandafter\Xthisreftitle
8992 \csname XR#1-title\endcsname
8993 }%
8994 %
8995 % Float references are printed completely differently: "Figure 1.2"
8996 % instead of "[somenode], p.3". \iffloat distinguishes them by
8997 % \Xthisreftitle being set to a magic string.
8998 \iffloat\Xthisreftitle
8999 % If the user specified the print name (third arg) to the ref,
9000 % print it instead of our usual "Figure 1.2".
9001 \ifdim\wd\printedrefnamebox = 0pt
9002 \refx{#1-snt}{}%
9003 \else
9004 \printedrefname
9005 \fi
9006 %
9007 % If the user also gave the printed manual name (fifth arg), append
9008 % "in MANUALNAME".
9009 \ifdim \wd\printedmanualbox > 0pt
9010 \space \putwordin{} \cite{\printedmanual}%
9011 \fi
9012 \else
9013 % node/anchor (non-float) references.
9014 %
9015 % If we use \unhbox to print the node names, TeX does not insert
9016 % empty discretionaries after hyphens, which means that it will not
9017 % find a line break at a hyphen in a node names. Since some manuals
9018 % are best written with fairly long node names, containing hyphens,
9019 % this is a loss. Therefore, we give the text of the node name
9020 % again, so it is as if TeX is seeing it for the first time.
9021 %
9022 \ifdim \wd\printedmanualbox > 0pt
9023 % Cross-manual reference with a printed manual name.
9024 %
9025 \crossmanualxref{\cite{\printedmanual\unskip}}%
9026 %
9027 \else\ifdim \wd\infofilenamebox > 0pt
9028 % Cross-manual reference with only an info filename (arg 4), no
9029 % printed manual name (arg 5). This is essentially the same as
9030 % the case above; we output the filename, since we have nothing else.
9031 %
9032 \crossmanualxref{\code{\infofilename\unskip}}%
9033 %
9034 \else
9035 % Reference within this manual.
9036 %
9037 % _ (for example) has to be the character _ for the purposes of the
9038 % control sequence corresponding to the node, but it has to expand
9039 % into the usual \leavevmode...\vrule stuff for purposes of
9040 % printing. So we \turnoffactive for the \refx-snt, back on for the
9041 % printing, back off for the \refx-pg.
9042 {\turnoffactive
9043 % Only output a following space if the -snt ref is nonempty; for
9044 % @unnumbered and @anchor, it won't be.
9045 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
9046 \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
9047 }%
9048 % output the `[mynode]' via the macro below so it can be overridden.
9049 \xrefprintnodename\printedrefname
9050 %
9051 % But we always want a comma and a space:
9052 ,\space
9053 %
9054 % output the `page 3'.
9055 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
9056 % Add a , if xref followed by a space
9057 \if\space\noexpand\tokenafterxref ,%
9058 \else\ifx\ \tokenafterxref ,% @TAB
9059 \else\ifx\*\tokenafterxref ,% @*
9060 \else\ifx\ \tokenafterxref ,% @SPACE
9061 \else\ifx\
9062 \tokenafterxref ,% @NL
9063 \else\ifx\tie\tokenafterxref ,% @tie
9064 \fi\fi\fi\fi\fi\fi
9065 \fi\fi
9066 \fi
9067 \endlink
9068 \endgroup}
9069
9070 % Output a cross-manual xref to #1. Used just above (twice).
9071 %
9072 % Only include the text "Section ``foo'' in" if the foo is neither
9073 % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
9074 % "see The Foo Manual", the idea being to refer to the whole manual.
9075 %
9076 % But, this being TeX, we can't easily compare our node name against the
9077 % string "Top" while ignoring the possible spaces before and after in
9078 % the input. By adding the arbitrary 7sp below, we make it much less
9079 % likely that a real node name would have the same width as "Top" (e.g.,
9080 % in a monospaced font). Hopefully it will never happen in practice.
9081 %
9082 % For the same basic reason, we retypeset the "Top" at every
9083 % reference, since the current font is indeterminate.
9084 %
9085 \def\crossmanualxref#1{%
9086 \setbox\toprefbox = \hbox{Top\kern7sp}%
9087 \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
9088 \ifdim \wd2 > 7sp % nonempty?
9089 \ifdim \wd2 = \wd\toprefbox \else % same as Top?
9090 \putwordSection{} ``\printedrefname'' \putwordin{}\space
9091 \fi
9092 \fi
9093 #1%
9094 }
9095
9096 % This macro is called from \xrefX for the `[nodename]' part of xref
9097 % output. It's a separate macro only so it can be changed more easily,
9098 % since square brackets don't work well in some documents. Particularly
9099 % one that Bob is working on :).
9100 %
9101 \def\xrefprintnodename#1{[#1]}
9102
9103 % Things referred to by \setref.
9104 %
9105 \def\Ynothing{}
9106 \def\Yomitfromtoc{}
9107 \def\Ynumbered{%
9108 \ifnum\secno=0
9109 \putwordChapter@tie \the\chapno
9110 \else \ifnum\subsecno=0
9111 \putwordSection@tie \the\chapno.\the\secno
9112 \else \ifnum\subsubsecno=0
9113 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno
9114 \else
9115 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
9116 \fi\fi\fi
9117 }
9118 \def\Yappendix{%
9119 \ifnum\secno=0
9120 \putwordAppendix@tie @char\the\appendixno{}%
9121 \else \ifnum\subsecno=0
9122 \putwordSection@tie @char\the\appendixno.\the\secno
9123 \else \ifnum\subsubsecno=0
9124 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
9125 \else
9126 \putwordSection@tie
9127 @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
9128 \fi\fi\fi
9129 }
9130
9131 % \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX
9132 % is output afterwards if non-empty.
9133 \def\refx#1#2{%
9134 \requireauxfile
9135 {%
9136 \indexnofonts
9137 \otherbackslash
9138 \def\value##1{##1}%
9139 \expandafter\global\expandafter\let\expandafter\thisrefX
9140 \csname XR#1\endcsname
9141 }%
9142 \ifx\thisrefX\relax
9143 % If not defined, say something at least.
9144 \angleleft un\-de\-fined\angleright
9145 \iflinks
9146 \ifhavexrefs
9147 {\toks0 = {#1}% avoid expansion of possibly-complex value
9148 \message{\linenumber Undefined cross reference `\the\toks0'.}}%
9149 \else
9150 \ifwarnedxrefs\else
9151 \global\warnedxrefstrue
9152 \message{Cross reference values unknown; you must run TeX again.}%
9153 \fi
9154 \fi
9155 \fi
9156 \else
9157 % It's defined, so just use it.
9158 \thisrefX
9159 \fi
9160 #2% Output the suffix in any case.
9161 }
9162
9163 % This is the macro invoked by entries in the aux file. Define a control
9164 % sequence for a cross-reference target (we prepend XR to the control sequence
9165 % name to avoid collisions). The value is the page number. If this is a float
9166 % type, we have more work to do.
9167 %
9168 \def\xrdef#1#2{%
9169 {% Expand the node or anchor name to remove control sequences.
9170 % \turnoffactive stops 8-bit characters being changed to commands
9171 % like @'e. \refx does the same to retrieve the value in the definition.
9172 \indexnofonts
9173 \turnoffactive
9174 \def\value##1{##1}%
9175 \xdef\safexrefname{#1}%
9176 }%
9177 %
9178 \bgroup
9179 \expandafter\gdef\csname XR\safexrefname\endcsname{#2}%
9180 \egroup
9181 % We put the \gdef inside a group to avoid the definitions building up on
9182 % TeX's save stack, which can cause it to run out of space for aux files with
9183 % thousands of lines. \gdef doesn't use the save stack, but \csname does
9184 % when it defines an unknown control sequence as \relax.
9185 %
9186 % Was that xref control sequence that we just defined for a float?
9187 \expandafter\iffloat\csname XR\safexrefname\endcsname
9188 % it was a float, and we have the (safe) float type in \iffloattype.
9189 \expandafter\let\expandafter\floatlist
9190 \csname floatlist\iffloattype\endcsname
9191 %
9192 % Is this the first time we've seen this float type?
9193 \expandafter\ifx\floatlist\relax
9194 \toks0 = {\do}% yes, so just \do
9195 \else
9196 % had it before, so preserve previous elements in list.
9197 \toks0 = \expandafter{\floatlist\do}%
9198 \fi
9199 %
9200 % Remember this xref in the control sequence \floatlistFLOATTYPE,
9201 % for later use in \listoffloats.
9202 \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
9203 {\safexrefname}}%
9204 \fi
9205 }
9206
9207 % If working on a large document in chapters, it is convenient to
9208 % be able to disable indexing, cross-referencing, and contents, for test runs.
9209 % This is done with @novalidate at the beginning of the file.
9210 %
9211 \newif\iflinks \linkstrue % by default we want the aux files.
9212 \let\novalidate = \linksfalse
9213
9214 % Used when writing to the aux file, or when using data from it.
9215 \def\requireauxfile{%
9216 \iflinks
9217 \tryauxfile
9218 % Open the new aux file. TeX will close it automatically at exit.
9219 \immediate\openout\auxfile=\jobname.aux
9220 \fi
9221 \global\let\requireauxfile=\relax % Only do this once.
9222 }
9223
9224 % Read the last existing aux file, if any. No error if none exists.
9225 %
9226 \def\tryauxfile{%
9227 \openin 1 \jobname.aux
9228 \ifeof 1 \else
9229 \readdatafile{aux}%
9230 \global\havexrefstrue
9231 \fi
9232 \closein 1
9233 }
9234
9235 \def\setupdatafile{%
9236 \catcode`\^^@=\other
9237 \catcode`\^^A=\other
9238 \catcode`\^^B=\other
9239 \catcode`\^^C=\other
9240 \catcode`\^^D=\other
9241 \catcode`\^^E=\other
9242 \catcode`\^^F=\other
9243 \catcode`\^^G=\other
9244 \catcode`\^^H=\other
9245 \catcode`\^^K=\other
9246 \catcode`\^^L=\other
9247 \catcode`\^^N=\other
9248 \catcode`\^^P=\other
9249 \catcode`\^^Q=\other
9250 \catcode`\^^R=\other
9251 \catcode`\^^S=\other
9252 \catcode`\^^T=\other
9253 \catcode`\^^U=\other
9254 \catcode`\^^V=\other
9255 \catcode`\^^W=\other
9256 \catcode`\^^X=\other
9257 \catcode`\^^Z=\other
9258 \catcode`\^^[=\other
9259 \catcode`\^^\=\other
9260 \catcode`\^^]=\other
9261 \catcode`\^^^=\other
9262 \catcode`\^^_=\other
9263 % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
9264 % in xref tags, i.e., node names. But since ^^e4 notation isn't
9265 % supported in the main text, it doesn't seem desirable. Furthermore,
9266 % that is not enough: for node names that actually contain a ^
9267 % character, we would end up writing a line like this: 'xrdef {'hat
9268 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
9269 % argument, and \hat is not an expandable control sequence. It could
9270 % all be worked out, but why? Either we support ^^ or we don't.
9271 %
9272 % The other change necessary for this was to define \auxhat:
9273 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
9274 % and then to call \auxhat in \setq.
9275 %
9276 \catcode`\^=\other
9277 %
9278 % Special characters. Should be turned off anyway, but...
9279 \catcode`\~=\other
9280 \catcode`\[=\other
9281 \catcode`\]=\other
9282 \catcode`\"=\other
9283 \catcode`\_=\other
9284 \catcode`\|=\other
9285 \catcode`\<=\other
9286 \catcode`\>=\other
9287 \catcode`\$=\other
9288 \catcode`\#=\other
9289 \catcode`\&=\other
9290 \catcode`\%=\other
9291 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
9292 %
9293 % This is to support \ in node names and titles, since the \
9294 % characters end up in a \csname. It's easier than
9295 % leaving it active and making its active definition an actual \
9296 % character. What I don't understand is why it works in the *value*
9297 % of the xrdef. Seems like it should be a catcode12 \, and that
9298 % should not typeset properly. But it works, so I'm moving on for
9299 % now. --karl, 15jan04.
9300 \catcode`\\=\other
9301 %
9302 % @ is our escape character in .aux files, and we need braces.
9303 \catcode`\{=1
9304 \catcode`\}=2
9305 \catcode`\@=0
9306 }
9307
9308 \def\readdatafile#1{%
9309 \begingroup
9310 \setupdatafile
9311 \input\jobname.#1
9312 \endgroup}
9313
9314
9315 \message{insertions,}
9316 % including footnotes.
9317
9318 \newcount \footnoteno
9319
9320 % The trailing space in the following definition for supereject is
9321 % vital for proper filling; pages come out unaligned when you do a
9322 % pagealignmacro call if that space before the closing brace is
9323 % removed. (Generally, numeric constants should always be followed by a
9324 % space to prevent strange expansion errors.)
9325 \def\supereject{\par\penalty -20000\footnoteno =0 }
9326
9327 % @footnotestyle is meaningful for Info output only.
9328 \let\footnotestyle=\comment
9329
9330 {\catcode `\@=11
9331 %
9332 % Auto-number footnotes. Otherwise like plain.
9333 \gdef\footnote{%
9334 \global\advance\footnoteno by \@ne
9335 \edef\thisfootno{$^{\the\footnoteno}$}%
9336 %
9337 % In case the footnote comes at the end of a sentence, preserve the
9338 % extra spacing after we do the footnote number.
9339 \let\@sf\empty
9340 \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
9341 %
9342 % Remove inadvertent blank space before typesetting the footnote number.
9343 \unskip
9344 \thisfootno\@sf
9345 \dofootnote
9346 }%
9347
9348 % Don't bother with the trickery in plain.tex to not require the
9349 % footnote text as a parameter. Our footnotes don't need to be so general.
9350 %
9351 % Oh yes, they do; otherwise, @ifset (and anything else that uses
9352 % \parseargline) fails inside footnotes because the tokens are fixed when
9353 % the footnote is read. --karl, 16nov96.
9354 %
9355 \gdef\dofootnote{%
9356 \insert\footins\bgroup
9357 %
9358 % Nested footnotes are not supported in TeX, that would take a lot
9359 % more work. (\startsavinginserts does not suffice.)
9360 \let\footnote=\errfootnotenest
9361 %
9362 % We want to typeset this text as a normal paragraph, even if the
9363 % footnote reference occurs in (for example) a display environment.
9364 % So reset some parameters.
9365 \hsize=\txipagewidth
9366 \interlinepenalty\interfootnotelinepenalty
9367 \splittopskip\ht\strutbox % top baseline for broken footnotes
9368 \splitmaxdepth\dp\strutbox
9369 \floatingpenalty\@MM
9370 \leftskip\z@skip
9371 \rightskip\z@skip
9372 \spaceskip\z@skip
9373 \xspaceskip\z@skip
9374 \parindent\defaultparindent
9375 %
9376 \smallfonts \rm
9377 %
9378 % Because we use hanging indentation in footnotes, a @noindent appears
9379 % to exdent this text, so make it be a no-op. makeinfo does not use
9380 % hanging indentation so @noindent can still be needed within footnote
9381 % text after an @example or the like (not that this is good style).
9382 \let\noindent = \relax
9383 %
9384 % Hang the footnote text off the number. Use \everypar in case the
9385 % footnote extends for more than one paragraph.
9386 \everypar = {\hang}%
9387 \textindent{\thisfootno}%
9388 %
9389 % Don't crash into the line above the footnote text. Since this
9390 % expands into a box, it must come within the paragraph, lest it
9391 % provide a place where TeX can split the footnote.
9392 \footstrut
9393 %
9394 % Invoke rest of plain TeX footnote routine.
9395 \futurelet\next\fo@t
9396 }
9397 }%end \catcode `\@=11
9398
9399 \def\errfootnotenest{%
9400 \errhelp=\EMsimple
9401 \errmessage{Nested footnotes not supported in texinfo.tex,
9402 even though they work in makeinfo; sorry}
9403 }
9404
9405 \def\errfootnoteheading{%
9406 \errhelp=\EMsimple
9407 \errmessage{Footnotes in chapters, sections, etc., are not supported}
9408 }
9409
9410 % In case a @footnote appears in a vbox, save the footnote text and create
9411 % the real \insert just after the vbox finished. Otherwise, the insertion
9412 % would be lost.
9413 % Similarly, if a @footnote appears inside an alignment, save the footnote
9414 % text to a box and make the \insert when a row of the table is finished.
9415 % And the same can be done for other insert classes. --kasal, 16nov03.
9416 %
9417 % Replace the \insert primitive by a cheating macro.
9418 % Deeper inside, just make sure that the saved insertions are not spilled
9419 % out prematurely.
9420 %
9421 \def\startsavinginserts{%
9422 \ifx \insert\ptexinsert
9423 \let\insert\saveinsert
9424 \else
9425 \let\checkinserts\relax
9426 \fi
9427 }
9428
9429 % This \insert replacement works for both \insert\footins{foo} and
9430 % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
9431 %
9432 \def\saveinsert#1{%
9433 \edef\next{\noexpand\savetobox \makeSAVEname#1}%
9434 \afterassignment\next
9435 % swallow the left brace
9436 \let\temp =
9437 }
9438 \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
9439 \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
9440
9441 \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
9442
9443 \def\placesaveins#1{%
9444 \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
9445 {\box#1}%
9446 }
9447
9448 % eat @SAVE -- beware, all of them have catcode \other:
9449 {
9450 \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
9451 \gdef\gobblesave @SAVE{}
9452 }
9453
9454 % initialization:
9455 \def\newsaveins #1{%
9456 \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
9457 \next
9458 }
9459 \def\newsaveinsX #1{%
9460 \csname newbox\endcsname #1%
9461 \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
9462 \checksaveins #1}%
9463 }
9464
9465 % initialize:
9466 \let\checkinserts\empty
9467 \newsaveins\footins
9468 \newsaveins\margin
9469
9470
9471 % @image. We use the macros from epsf.tex to support this.
9472 % If epsf.tex is not installed and @image is used, we complain.
9473 %
9474 % Check for and read epsf.tex up front. If we read it only at @image
9475 % time, we might be inside a group, and then its definitions would get
9476 % undone and the next image would fail.
9477 \openin 1 = epsf.tex
9478 \ifeof 1 \else
9479 % Do not bother showing banner with epsf.tex v2.7k (available in
9480 % doc/epsf.tex and on ctan).
9481 \def\epsfannounce{\toks0 = }%
9482 \input epsf.tex
9483 \fi
9484 \closein 1
9485 %
9486 % We will only complain once about lack of epsf.tex.
9487 \newif\ifwarnednoepsf
9488 \newhelp\noepsfhelp{epsf.tex must be installed for images to
9489 work. It is also included in the Texinfo distribution, or you can get
9490 it from https://ctan.org/texarchive/macros/texinfo/texinfo/doc/epsf.tex.}
9491 %
9492 \def\image#1{%
9493 \ifx\epsfbox\thisisundefined
9494 \ifwarnednoepsf \else
9495 \errhelp = \noepsfhelp
9496 \errmessage{epsf.tex not found, images will be ignored}%
9497 \global\warnednoepsftrue
9498 \fi
9499 \else
9500 \imagexxx #1,,,,,\finish
9501 \fi
9502 }
9503 %
9504 % Arguments to @image:
9505 % #1 is (mandatory) image filename; we tack on .eps extension.
9506 % #2 is (optional) width, #3 is (optional) height.
9507 % #4 is (ignored optional) html alt text.
9508 % #5 is (ignored optional) extension.
9509 % #6 is just the usual extra ignored arg for parsing stuff.
9510 \newif\ifimagevmode
9511 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
9512 \catcode`\^^M = 5 % in case we're inside an example
9513 \normalturnoffactive % allow _ et al. in names
9514 \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro
9515 % If the image is by itself, center it.
9516 \ifvmode
9517 \imagevmodetrue
9518 \else \ifx\centersub\centerV
9519 % for @center @image, we need a vbox so we can have our vertical space
9520 \imagevmodetrue
9521 \vbox\bgroup % vbox has better behavior than vtop herev
9522 \fi\fi
9523 %
9524 \ifimagevmode
9525 \nobreak\medskip
9526 % Usually we'll have text after the image which will insert
9527 % \parskip glue, so insert it here too to equalize the space
9528 % above and below.
9529 \nobreak\vskip\parskip
9530 \nobreak
9531 \fi
9532 %
9533 % Leave vertical mode so that indentation from an enclosing
9534 % environment such as @quotation is respected.
9535 % However, if we're at the top level, we don't want the
9536 % normal paragraph indentation.
9537 % On the other hand, if we are in the case of @center @image, we don't
9538 % want to start a paragraph, which will create a hsize-width box and
9539 % eradicate the centering.
9540 \ifx\centersub\centerV\else \noindent \fi
9541 %
9542 % Output the image.
9543 \ifpdf
9544 % For pdfTeX and LuaTeX <= 0.80
9545 \dopdfimage{#1}{#2}{#3}%
9546 \else
9547 \ifx\XeTeXrevision\thisisundefined
9548 % For epsf.tex
9549 % \epsfbox itself resets \epsf?size at each figure.
9550 \setbox0 = \hbox{\ignorespaces #2}%
9551 \ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
9552 \setbox0 = \hbox{\ignorespaces #3}%
9553 \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
9554 \epsfbox{#1.eps}%
9555 \else
9556 % For XeTeX
9557 \doxeteximage{#1}{#2}{#3}%
9558 \fi
9559 \fi
9560 %
9561 \ifimagevmode
9562 \medskip % space after a standalone image
9563 \fi
9564 \ifx\centersub\centerV \egroup \fi
9565 \endgroup}
9566
9567
9568 % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
9569 % etc. We don't actually implement floating yet, we always include the
9570 % float "here". But it seemed the best name for the future.
9571 %
9572 \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
9573
9574 % There may be a space before second and/or third parameter; delete it.
9575 \def\eatcommaspace#1, {#1,}
9576
9577 % #1 is the optional FLOATTYPE, the text label for this float, typically
9578 % "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
9579 % this float will not be numbered and cannot be referred to.
9580 %
9581 % #2 is the optional xref label. Also must be present for the float to
9582 % be referable.
9583 %
9584 % #3 is the optional positioning argument; for now, it is ignored. It
9585 % will somehow specify the positions allowed to float to (here, top, bottom).
9586 %
9587 % We keep a separate counter for each FLOATTYPE, which we reset at each
9588 % chapter-level command.
9589 \let\resetallfloatnos=\empty
9590 %
9591 \def\dofloat#1,#2,#3,#4\finish{%
9592 \let\thiscaption=\empty
9593 \let\thisshortcaption=\empty
9594 %
9595 % don't lose footnotes inside @float.
9596 %
9597 % BEWARE: when the floats start float, we have to issue warning whenever an
9598 % insert appears inside a float which could possibly float. --kasal, 26may04
9599 %
9600 \startsavinginserts
9601 %
9602 % We can't be used inside a paragraph.
9603 \par
9604 %
9605 \vtop\bgroup
9606 \def\floattype{#1}%
9607 \def\floatlabel{#2}%
9608 \def\floatloc{#3}% we do nothing with this yet.
9609 %
9610 \ifx\floattype\empty
9611 \let\safefloattype=\empty
9612 \else
9613 {%
9614 % the floattype might have accents or other special characters,
9615 % but we need to use it in a control sequence name.
9616 \indexnofonts
9617 \turnoffactive
9618 \xdef\safefloattype{\floattype}%
9619 }%
9620 \fi
9621 %
9622 % If label is given but no type, we handle that as the empty type.
9623 \ifx\floatlabel\empty \else
9624 % We want each FLOATTYPE to be numbered separately (Figure 1,
9625 % Table 1, Figure 2, ...). (And if no label, no number.)
9626 %
9627 \expandafter\getfloatno\csname\safefloattype floatno\endcsname
9628 \global\advance\floatno by 1
9629 %
9630 {%
9631 % This magic value for \lastsection is output by \setref as the
9632 % XREFLABEL-title value. \xrefX uses it to distinguish float
9633 % labels (which have a completely different output format) from
9634 % node and anchor labels. And \xrdef uses it to construct the
9635 % lists of floats.
9636 %
9637 \edef\lastsection{\floatmagic=\safefloattype}%
9638 \setref{\floatlabel}{Yfloat}%
9639 }%
9640 \fi
9641 %
9642 % start with \parskip glue, I guess.
9643 \vskip\parskip
9644 %
9645 % Don't suppress indentation if a float happens to start a section.
9646 \restorefirstparagraphindent
9647 }
9648
9649 % we have these possibilities:
9650 % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
9651 % @float Foo,lbl & no caption: Foo 1.1
9652 % @float Foo & @caption{Cap}: Foo: Cap
9653 % @float Foo & no caption: Foo
9654 % @float ,lbl & Caption{Cap}: 1.1: Cap
9655 % @float ,lbl & no caption: 1.1
9656 % @float & @caption{Cap}: Cap
9657 % @float & no caption:
9658 %
9659 \def\Efloat{%
9660 \let\floatident = \empty
9661 %
9662 % In all cases, if we have a float type, it comes first.
9663 \ifx\floattype\empty \else \def\floatident{\floattype}\fi
9664 %
9665 % If we have an xref label, the number comes next.
9666 \ifx\floatlabel\empty \else
9667 \ifx\floattype\empty \else % if also had float type, need tie first.
9668 \appendtomacro\floatident{\tie}%
9669 \fi
9670 % the number.
9671 \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
9672 \fi
9673 %
9674 % Start the printed caption with what we've constructed in
9675 % \floatident, but keep it separate; we need \floatident again.
9676 \let\captionline = \floatident
9677 %
9678 \ifx\thiscaption\empty \else
9679 \ifx\floatident\empty \else
9680 \appendtomacro\captionline{: }% had ident, so need a colon between
9681 \fi
9682 %
9683 % caption text.
9684 \appendtomacro\captionline{\scanexp\thiscaption}%
9685 \fi
9686 %
9687 % If we have anything to print, print it, with space before.
9688 % Eventually this needs to become an \insert.
9689 \ifx\captionline\empty \else
9690 \vskip.5\parskip
9691 \captionline
9692 %
9693 % Space below caption.
9694 \vskip\parskip
9695 \fi
9696 %
9697 % If have an xref label, write the list of floats info. Do this
9698 % after the caption, to avoid chance of it being a breakpoint.
9699 \ifx\floatlabel\empty \else
9700 % Write the text that goes in the lof to the aux file as
9701 % \floatlabel-lof. Besides \floatident, we include the short
9702 % caption if specified, else the full caption if specified, else nothing.
9703 {%
9704 \requireauxfile
9705 \atdummies
9706 %
9707 \ifx\thisshortcaption\empty
9708 \def\gtemp{\thiscaption}%
9709 \else
9710 \def\gtemp{\thisshortcaption}%
9711 \fi
9712 \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
9713 \ifx\gtemp\empty \else : \gtemp \fi}}%
9714 }%
9715 \fi
9716 \egroup % end of \vtop
9717 %
9718 \checkinserts
9719 }
9720
9721 % Append the tokens #2 to the definition of macro #1, not expanding either.
9722 %
9723 \def\appendtomacro#1#2{%
9724 \expandafter\def\expandafter#1\expandafter{#1#2}%
9725 }
9726
9727 % @caption, @shortcaption
9728 %
9729 \def\caption{\docaption\thiscaption}
9730 \def\shortcaption{\docaption\thisshortcaption}
9731 \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
9732 \def\defcaption#1#2{\egroup \def#1{#2}}
9733
9734 % The parameter is the control sequence identifying the counter we are
9735 % going to use. Create it if it doesn't exist and assign it to \floatno.
9736 \def\getfloatno#1{%
9737 \ifx#1\relax
9738 % Haven't seen this figure type before.
9739 \csname newcount\endcsname #1%
9740 %
9741 % Remember to reset this floatno at the next chap.
9742 \expandafter\gdef\expandafter\resetallfloatnos
9743 \expandafter{\resetallfloatnos #1=0 }%
9744 \fi
9745 \let\floatno#1%
9746 }
9747
9748 % \setref calls this to get the XREFLABEL-snt value. We want an @xref
9749 % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
9750 % first read the @float command.
9751 %
9752 \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
9753
9754 % Magic string used for the XREFLABEL-title value, so \xrefX can
9755 % distinguish floats from other xref types.
9756 \def\floatmagic{!!float!!}
9757
9758 % #1 is the control sequence we are passed; we expand into a conditional
9759 % which is true if #1 represents a float ref. That is, the magic
9760 % \lastsection value which we \setref above.
9761 %
9762 \def\iffloat#1{\expandafter\doiffloat#1==\finish}
9763 %
9764 % #1 is (maybe) the \floatmagic string. If so, #2 will be the
9765 % (safe) float type for this float. We set \iffloattype to #2.
9766 %
9767 \def\doiffloat#1=#2=#3\finish{%
9768 \def\temp{#1}%
9769 \def\iffloattype{#2}%
9770 \ifx\temp\floatmagic
9771 }
9772
9773 % @listoffloats FLOATTYPE - print a list of floats like a table of contents.
9774 %
9775 \parseargdef\listoffloats{%
9776 \def\floattype{#1}% floattype
9777 {%
9778 % the floattype might have accents or other special characters,
9779 % but we need to use it in a control sequence name.
9780 \indexnofonts
9781 \turnoffactive
9782 \xdef\safefloattype{\floattype}%
9783 }%
9784 %
9785 % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
9786 \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
9787 \ifhavexrefs
9788 % if the user said @listoffloats foo but never @float foo.
9789 \message{\linenumber No `\safefloattype' floats to list.}%
9790 \fi
9791 \else
9792 \begingroup
9793 \leftskip=\tocindent % indent these entries like a toc
9794 \let\do=\listoffloatsdo
9795 \csname floatlist\safefloattype\endcsname
9796 \endgroup
9797 \fi
9798 }
9799
9800 % This is called on each entry in a list of floats. We're passed the
9801 % xref label, in the form LABEL-title, which is how we save it in the
9802 % aux file. We strip off the -title and look up \XRLABEL-lof, which
9803 % has the text we're supposed to typeset here.
9804 %
9805 % Figures without xref labels will not be included in the list (since
9806 % they won't appear in the aux file).
9807 %
9808 \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
9809 \def\listoffloatsdoentry#1-title\finish{{%
9810 % Can't fully expand XR#1-lof because it can contain anything. Just
9811 % pass the control sequence. On the other hand, XR#1-pg is just the
9812 % page number, and we want to fully expand that so we can get a link
9813 % in pdf output.
9814 \toksA = \expandafter{\csname XR#1-lof\endcsname}%
9815 %
9816 % use the same \entry macro we use to generate the TOC and index.
9817 \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
9818 \writeentry
9819 }}
9820
9821
9822 \message{localization,}
9823
9824 % For single-language documents, @documentlanguage is usually given very
9825 % early, just after @documentencoding. Single argument is the language
9826 % (de) or locale (de_DE) abbreviation.
9827 %
9828 {
9829 \catcode`\_ = \active
9830 \globaldefs=1
9831 \parseargdef\documentlanguage{%
9832 \tex % read txi-??.tex file in plain TeX.
9833 % Read the file by the name they passed if it exists.
9834 \let_ = \normalunderscore % normal _ character for filename test
9835 \openin 1 txi-#1.tex
9836 \ifeof 1
9837 \documentlanguagetrywithoutunderscore #1_\finish
9838 \else
9839 \globaldefs = 1 % everything in the txi-LL files needs to persist
9840 \input txi-#1.tex
9841 \fi
9842 \closein 1
9843 \endgroup % end raw TeX
9844 }
9845 %
9846 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
9847 % try txi-de.tex.
9848 %
9849 \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
9850 \openin 1 txi-#1.tex
9851 \ifeof 1
9852 \errhelp = \nolanghelp
9853 \errmessage{Cannot read language file txi-#1.tex}%
9854 \else
9855 \globaldefs = 1 % everything in the txi-LL files needs to persist
9856 \input txi-#1.tex
9857 \fi
9858 \closein 1
9859 }
9860 }% end of special _ catcode
9861 %
9862 \newhelp\nolanghelp{The given language definition file cannot be found or
9863 is empty. Maybe you need to install it? Putting it in the current
9864 directory should work if nowhere else does.}
9865
9866 % This macro is called from txi-??.tex files; the first argument is the
9867 % \language name to set (without the "\lang@" prefix), the second and
9868 % third args are \{left,right}hyphenmin.
9869 %
9870 % The language names to pass are determined when the format is built.
9871 % See the etex.log file created at that time, e.g.,
9872 % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
9873 %
9874 % With TeX Live 2008, etex now includes hyphenation patterns for all
9875 % available languages. This means we can support hyphenation in
9876 % Texinfo, at least to some extent. (This still doesn't solve the
9877 % accented characters problem.)
9878 %
9879 \catcode`@=11
9880 \def\txisetlanguage#1#2#3{%
9881 % do not set the language if the name is undefined in the current TeX.
9882 \expandafter\ifx\csname lang@#1\endcsname \relax
9883 \message{no patterns for #1}%
9884 \else
9885 \global\language = \csname lang@#1\endcsname
9886 \fi
9887 % but there is no harm in adjusting the hyphenmin values regardless.
9888 \global\lefthyphenmin = #2\relax
9889 \global\righthyphenmin = #3\relax
9890 }
9891
9892 % XeTeX and LuaTeX can handle Unicode natively.
9893 % Their default I/O uses UTF-8 sequences instead of a byte-wise operation.
9894 % Other TeX engines' I/O (pdfTeX, etc.) is byte-wise.
9895 %
9896 \newif\iftxinativeunicodecapable
9897 \newif\iftxiusebytewiseio
9898
9899 \ifx\XeTeXrevision\thisisundefined
9900 \ifx\luatexversion\thisisundefined
9901 \txinativeunicodecapablefalse
9902 \txiusebytewiseiotrue
9903 \else
9904 \txinativeunicodecapabletrue
9905 \txiusebytewiseiofalse
9906 \fi
9907 \else
9908 \txinativeunicodecapabletrue
9909 \txiusebytewiseiofalse
9910 \fi
9911
9912 % Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
9913 % for non-UTF-8 (byte-wise) encodings.
9914 %
9915 \def\setbytewiseio{%
9916 \ifx\XeTeXrevision\thisisundefined
9917 \else
9918 \XeTeXdefaultencoding "bytes" % For subsequent files to be read
9919 \XeTeXinputencoding "bytes" % For document root file
9920 % Unfortunately, there seems to be no corresponding XeTeX command for
9921 % output encoding. This is a problem for auxiliary index and TOC files.
9922 % The only solution would be perhaps to write out @U{...} sequences in
9923 % place of non-ASCII characters.
9924 \fi
9925
9926 \ifx\luatexversion\thisisundefined
9927 \else
9928 \directlua{
9929 local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
9930 local function convert_char (char)
9931 return utf8_char(byte(char))
9932 end
9933
9934 local function convert_line (line)
9935 return gsub(line, ".", convert_char)
9936 end
9937
9938 callback.register("process_input_buffer", convert_line)
9939
9940 local function convert_line_out (line)
9941 local line_out = ""
9942 for c in string.utfvalues(line) do
9943 line_out = line_out .. string.char(c)
9944 end
9945 return line_out
9946 end
9947
9948 callback.register("process_output_buffer", convert_line_out)
9949 }
9950 \fi
9951
9952 \txiusebytewiseiotrue
9953 }
9954
9955
9956 % Helpers for encodings.
9957 % Set the catcode of characters 128 through 255 to the specified number.
9958 %
9959 \def\setnonasciicharscatcode#1{%
9960 \count255=128
9961 \loop\ifnum\count255<256
9962 \global\catcode\count255=#1\relax
9963 \advance\count255 by 1
9964 \repeat
9965 }
9966
9967 \def\setnonasciicharscatcodenonglobal#1{%
9968 \count255=128
9969 \loop\ifnum\count255<256
9970 \catcode\count255=#1\relax
9971 \advance\count255 by 1
9972 \repeat
9973 }
9974
9975 % @documentencoding sets the definition of non-ASCII characters
9976 % according to the specified encoding.
9977 %
9978 \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
9979 \def\documentencodingzzz#1{%
9980 %
9981 % Encoding being declared for the document.
9982 \def\declaredencoding{\csname #1.enc\endcsname}%
9983 %
9984 % Supported encodings: names converted to tokens in order to be able
9985 % to compare them with \ifx.
9986 \def\ascii{\csname US-ASCII.enc\endcsname}%
9987 \def\latnine{\csname ISO-8859-15.enc\endcsname}%
9988 \def\latone{\csname ISO-8859-1.enc\endcsname}%
9989 \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
9990 \def\utfeight{\csname UTF-8.enc\endcsname}%
9991 %
9992 \ifx \declaredencoding \ascii
9993 \asciichardefs
9994 %
9995 \else \ifx \declaredencoding \lattwo
9996 \iftxinativeunicodecapable
9997 \setbytewiseio
9998 \fi
9999 \setnonasciicharscatcode\active
10000 \lattwochardefs
10001 %
10002 \else \ifx \declaredencoding \latone
10003 \iftxinativeunicodecapable
10004 \setbytewiseio
10005 \fi
10006 \setnonasciicharscatcode\active
10007 \latonechardefs
10008 %
10009 \else \ifx \declaredencoding \latnine
10010 \iftxinativeunicodecapable
10011 \setbytewiseio
10012 \fi
10013 \setnonasciicharscatcode\active
10014 \latninechardefs
10015 %
10016 \else \ifx \declaredencoding \utfeight
10017 \iftxinativeunicodecapable
10018 % For native Unicode handling (XeTeX and LuaTeX)
10019 \nativeunicodechardefs
10020 \else
10021 % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX)
10022 \setnonasciicharscatcode\active
10023 % since we already invoked \utfeightchardefs at the top level
10024 % (below), do not re-invoke it, otherwise our check for duplicated
10025 % definitions gets triggered. Making non-ascii chars active is
10026 % sufficient.
10027 \fi
10028 %
10029 \else
10030 \message{Ignoring unknown document encoding: #1.}%
10031 %
10032 \fi % utfeight
10033 \fi % latnine
10034 \fi % latone
10035 \fi % lattwo
10036 \fi % ascii
10037 %
10038 \ifx\XeTeXrevision\thisisundefined
10039 \else
10040 \ifx \declaredencoding \utfeight
10041 \else
10042 \ifx \declaredencoding \ascii
10043 \else
10044 \message{Warning: XeTeX with non-UTF-8 encodings cannot handle %
10045 non-ASCII characters in auxiliary files.}%
10046 \fi
10047 \fi
10048 \fi
10049 }
10050
10051 % emacs-page
10052 % A message to be logged when using a character that isn't available
10053 % the default font encoding (OT1).
10054 %
10055 \def\missingcharmsg#1{\message{Character missing, sorry: #1.}}
10056
10057 % Take account of \c (plain) vs. \, (Texinfo) difference.
10058 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
10059
10060 % First, make active non-ASCII characters in order for them to be
10061 % correctly categorized when TeX reads the replacement text of
10062 % macros containing the character definitions.
10063 \setnonasciicharscatcode\active
10064 %
10065
10066 \def\gdefchar#1#2{%
10067 \gdef#1{%
10068 \ifpassthroughchars
10069 \string#1%
10070 \else
10071 #2%
10072 \fi
10073 }}
10074
10075 % Latin1 (ISO-8859-1) character definitions.
10076 \def\latonechardefs{%
10077 \gdefchar^^a0{\tie}
10078 \gdefchar^^a1{\exclamdown}
10079 \gdefchar^^a2{{\tcfont \char162}} % cent
10080 \gdefchar^^a3{\pounds{}}
10081 \gdefchar^^a4{{\tcfont \char164}} % currency
10082 \gdefchar^^a5{{\tcfont \char165}} % yen
10083 \gdefchar^^a6{{\tcfont \char166}} % broken bar
10084 \gdefchar^^a7{\S}
10085 \gdefchar^^a8{\"{}}
10086 \gdefchar^^a9{\copyright{}}
10087 \gdefchar^^aa{\ordf}
10088 \gdefchar^^ab{\guillemetleft{}}
10089 \gdefchar^^ac{\ensuremath\lnot}
10090 \gdefchar^^ad{\-}
10091 \gdefchar^^ae{\registeredsymbol{}}
10092 \gdefchar^^af{\={}}
10093 %
10094 \gdefchar^^b0{\textdegree}
10095 \gdefchar^^b1{$\pm$}
10096 \gdefchar^^b2{$^2$}
10097 \gdefchar^^b3{$^3$}
10098 \gdefchar^^b4{\'{}}
10099 \gdefchar^^b5{$\mu$}
10100 \gdefchar^^b6{\P}
10101 \gdefchar^^b7{\ensuremath\cdot}
10102 \gdefchar^^b8{\cedilla\ }
10103 \gdefchar^^b9{$^1$}
10104 \gdefchar^^ba{\ordm}
10105 \gdefchar^^bb{\guillemetright{}}
10106 \gdefchar^^bc{$1\over4$}
10107 \gdefchar^^bd{$1\over2$}
10108 \gdefchar^^be{$3\over4$}
10109 \gdefchar^^bf{\questiondown}
10110 %
10111 \gdefchar^^c0{\`A}
10112 \gdefchar^^c1{\'A}
10113 \gdefchar^^c2{\^A}
10114 \gdefchar^^c3{\~A}
10115 \gdefchar^^c4{\"A}
10116 \gdefchar^^c5{\ringaccent A}
10117 \gdefchar^^c6{\AE}
10118 \gdefchar^^c7{\cedilla C}
10119 \gdefchar^^c8{\`E}
10120 \gdefchar^^c9{\'E}
10121 \gdefchar^^ca{\^E}
10122 \gdefchar^^cb{\"E}
10123 \gdefchar^^cc{\`I}
10124 \gdefchar^^cd{\'I}
10125 \gdefchar^^ce{\^I}
10126 \gdefchar^^cf{\"I}
10127 %
10128 \gdefchar^^d0{\DH}
10129 \gdefchar^^d1{\~N}
10130 \gdefchar^^d2{\`O}
10131 \gdefchar^^d3{\'O}
10132 \gdefchar^^d4{\^O}
10133 \gdefchar^^d5{\~O}
10134 \gdefchar^^d6{\"O}
10135 \gdefchar^^d7{$\times$}
10136 \gdefchar^^d8{\O}
10137 \gdefchar^^d9{\`U}
10138 \gdefchar^^da{\'U}
10139 \gdefchar^^db{\^U}
10140 \gdefchar^^dc{\"U}
10141 \gdefchar^^dd{\'Y}
10142 \gdefchar^^de{\TH}
10143 \gdefchar^^df{\ss}
10144 %
10145 \gdefchar^^e0{\`a}
10146 \gdefchar^^e1{\'a}
10147 \gdefchar^^e2{\^a}
10148 \gdefchar^^e3{\~a}
10149 \gdefchar^^e4{\"a}
10150 \gdefchar^^e5{\ringaccent a}
10151 \gdefchar^^e6{\ae}
10152 \gdefchar^^e7{\cedilla c}
10153 \gdefchar^^e8{\`e}
10154 \gdefchar^^e9{\'e}
10155 \gdefchar^^ea{\^e}
10156 \gdefchar^^eb{\"e}
10157 \gdefchar^^ec{\`{\dotless i}}
10158 \gdefchar^^ed{\'{\dotless i}}
10159 \gdefchar^^ee{\^{\dotless i}}
10160 \gdefchar^^ef{\"{\dotless i}}
10161 %
10162 \gdefchar^^f0{\dh}
10163 \gdefchar^^f1{\~n}
10164 \gdefchar^^f2{\`o}
10165 \gdefchar^^f3{\'o}
10166 \gdefchar^^f4{\^o}
10167 \gdefchar^^f5{\~o}
10168 \gdefchar^^f6{\"o}
10169 \gdefchar^^f7{$\div$}
10170 \gdefchar^^f8{\o}
10171 \gdefchar^^f9{\`u}
10172 \gdefchar^^fa{\'u}
10173 \gdefchar^^fb{\^u}
10174 \gdefchar^^fc{\"u}
10175 \gdefchar^^fd{\'y}
10176 \gdefchar^^fe{\th}
10177 \gdefchar^^ff{\"y}
10178 }
10179
10180 % Latin9 (ISO-8859-15) encoding character definitions.
10181 \def\latninechardefs{%
10182 % Encoding is almost identical to Latin1.
10183 \latonechardefs
10184 %
10185 \gdefchar^^a4{\euro{}}
10186 \gdefchar^^a6{\v S}
10187 \gdefchar^^a8{\v s}
10188 \gdefchar^^b4{\v Z}
10189 \gdefchar^^b8{\v z}
10190 \gdefchar^^bc{\OE}
10191 \gdefchar^^bd{\oe}
10192 \gdefchar^^be{\"Y}
10193 }
10194
10195 % Latin2 (ISO-8859-2) character definitions.
10196 \def\lattwochardefs{%
10197 \gdefchar^^a0{\tie}
10198 \gdefchar^^a1{\ogonek{A}}
10199 \gdefchar^^a2{\u{}}
10200 \gdefchar^^a3{\L}
10201 \gdefchar^^a4{\missingcharmsg{CURRENCY SIGN}}
10202 \gdefchar^^a5{\v L}
10203 \gdefchar^^a6{\'S}
10204 \gdefchar^^a7{\S}
10205 \gdefchar^^a8{\"{}}
10206 \gdefchar^^a9{\v S}
10207 \gdefchar^^aa{\cedilla S}
10208 \gdefchar^^ab{\v T}
10209 \gdefchar^^ac{\'Z}
10210 \gdefchar^^ad{\-}
10211 \gdefchar^^ae{\v Z}
10212 \gdefchar^^af{\dotaccent Z}
10213 %
10214 \gdefchar^^b0{\textdegree{}}
10215 \gdefchar^^b1{\ogonek{a}}
10216 \gdefchar^^b2{\ogonek{ }}
10217 \gdefchar^^b3{\l}
10218 \gdefchar^^b4{\'{}}
10219 \gdefchar^^b5{\v l}
10220 \gdefchar^^b6{\'s}
10221 \gdefchar^^b7{\v{}}
10222 \gdefchar^^b8{\cedilla\ }
10223 \gdefchar^^b9{\v s}
10224 \gdefchar^^ba{\cedilla s}
10225 \gdefchar^^bb{\v t}
10226 \gdefchar^^bc{\'z}
10227 \gdefchar^^bd{\H{}}
10228 \gdefchar^^be{\v z}
10229 \gdefchar^^bf{\dotaccent z}
10230 %
10231 \gdefchar^^c0{\'R}
10232 \gdefchar^^c1{\'A}
10233 \gdefchar^^c2{\^A}
10234 \gdefchar^^c3{\u A}
10235 \gdefchar^^c4{\"A}
10236 \gdefchar^^c5{\'L}
10237 \gdefchar^^c6{\'C}
10238 \gdefchar^^c7{\cedilla C}
10239 \gdefchar^^c8{\v C}
10240 \gdefchar^^c9{\'E}
10241 \gdefchar^^ca{\ogonek{E}}
10242 \gdefchar^^cb{\"E}
10243 \gdefchar^^cc{\v E}
10244 \gdefchar^^cd{\'I}
10245 \gdefchar^^ce{\^I}
10246 \gdefchar^^cf{\v D}
10247 %
10248 \gdefchar^^d0{\DH}
10249 \gdefchar^^d1{\'N}
10250 \gdefchar^^d2{\v N}
10251 \gdefchar^^d3{\'O}
10252 \gdefchar^^d4{\^O}
10253 \gdefchar^^d5{\H O}
10254 \gdefchar^^d6{\"O}
10255 \gdefchar^^d7{$\times$}
10256 \gdefchar^^d8{\v R}
10257 \gdefchar^^d9{\ringaccent U}
10258 \gdefchar^^da{\'U}
10259 \gdefchar^^db{\H U}
10260 \gdefchar^^dc{\"U}
10261 \gdefchar^^dd{\'Y}
10262 \gdefchar^^de{\cedilla T}
10263 \gdefchar^^df{\ss}
10264 %
10265 \gdefchar^^e0{\'r}
10266 \gdefchar^^e1{\'a}
10267 \gdefchar^^e2{\^a}
10268 \gdefchar^^e3{\u a}
10269 \gdefchar^^e4{\"a}
10270 \gdefchar^^e5{\'l}
10271 \gdefchar^^e6{\'c}
10272 \gdefchar^^e7{\cedilla c}
10273 \gdefchar^^e8{\v c}
10274 \gdefchar^^e9{\'e}
10275 \gdefchar^^ea{\ogonek{e}}
10276 \gdefchar^^eb{\"e}
10277 \gdefchar^^ec{\v e}
10278 \gdefchar^^ed{\'{\dotless{i}}}
10279 \gdefchar^^ee{\^{\dotless{i}}}
10280 \gdefchar^^ef{\v d}
10281 %
10282 \gdefchar^^f0{\dh}
10283 \gdefchar^^f1{\'n}
10284 \gdefchar^^f2{\v n}
10285 \gdefchar^^f3{\'o}
10286 \gdefchar^^f4{\^o}
10287 \gdefchar^^f5{\H o}
10288 \gdefchar^^f6{\"o}
10289 \gdefchar^^f7{$\div$}
10290 \gdefchar^^f8{\v r}
10291 \gdefchar^^f9{\ringaccent u}
10292 \gdefchar^^fa{\'u}
10293 \gdefchar^^fb{\H u}
10294 \gdefchar^^fc{\"u}
10295 \gdefchar^^fd{\'y}
10296 \gdefchar^^fe{\cedilla t}
10297 \gdefchar^^ff{\dotaccent{}}
10298 }
10299
10300 % UTF-8 character definitions.
10301 %
10302 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
10303 % changes for Texinfo conventions. It is included here under the GPL by
10304 % permission from Frank Mittelbach and the LaTeX team.
10305 %
10306 \newcount\countUTFx
10307 \newcount\countUTFy
10308 \newcount\countUTFz
10309
10310 \gdef\UTFviiiTwoOctets#1#2{\expandafter
10311 \UTFviiiDefined\csname u8:#1\string #2\endcsname}
10312 %
10313 \gdef\UTFviiiThreeOctets#1#2#3{\expandafter
10314 \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
10315 %
10316 \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
10317 \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
10318
10319 \gdef\UTFviiiDefined#1{%
10320 \ifx #1\relax
10321 \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
10322 \else
10323 \expandafter #1%
10324 \fi
10325 }
10326
10327 % Give non-ASCII bytes the active definitions for processing UTF-8 sequences
10328 \begingroup
10329 \catcode`\~13
10330 \catcode`\$12
10331 \catcode`\"12
10332
10333 % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
10334 % substituting ~ and $ with a character token of that value.
10335 \def\UTFviiiLoop{%
10336 \global\catcode\countUTFx\active
10337 \uccode`\~\countUTFx
10338 \uccode`\$\countUTFx
10339 \uppercase\expandafter{\UTFviiiTmp}%
10340 \advance\countUTFx by 1
10341 \ifnum\countUTFx < \countUTFy
10342 \expandafter\UTFviiiLoop
10343 \fi}
10344
10345 % For bytes other than the first in a UTF-8 sequence. Not expected to
10346 % be expanded except when writing to auxiliary files.
10347 \countUTFx = "80
10348 \countUTFy = "C2
10349 \def\UTFviiiTmp{%
10350 \gdef~{%
10351 \ifpassthroughchars $\fi}}%
10352 \UTFviiiLoop
10353
10354 \countUTFx = "C2
10355 \countUTFy = "E0
10356 \def\UTFviiiTmp{%
10357 \gdef~{%
10358 \ifpassthroughchars $%
10359 \else\expandafter\UTFviiiTwoOctets\expandafter$\fi}}%
10360 \UTFviiiLoop
10361
10362 \countUTFx = "E0
10363 \countUTFy = "F0
10364 \def\UTFviiiTmp{%
10365 \gdef~{%
10366 \ifpassthroughchars $%
10367 \else\expandafter\UTFviiiThreeOctets\expandafter$\fi}}%
10368 \UTFviiiLoop
10369
10370 \countUTFx = "F0
10371 \countUTFy = "F4
10372 \def\UTFviiiTmp{%
10373 \gdef~{%
10374 \ifpassthroughchars $%
10375 \else\expandafter\UTFviiiFourOctets\expandafter$\fi
10376 }}%
10377 \UTFviiiLoop
10378 \endgroup
10379
10380 \def\globallet{\global\let} % save some \expandafter's below
10381
10382 % @U{xxxx} to produce U+xxxx, if we support it.
10383 \def\U#1{%
10384 \expandafter\ifx\csname uni:#1\endcsname \relax
10385 \iftxinativeunicodecapable
10386 % All Unicode characters can be used if native Unicode handling is
10387 % active. However, if the font does not have the glyph,
10388 % letters are missing.
10389 \begingroup
10390 \uccode`\.="#1\relax
10391 \uppercase{.}
10392 \endgroup
10393 \else
10394 \errhelp = \EMsimple
10395 \errmessage{Unicode character U+#1 not supported, sorry}%
10396 \fi
10397 \else
10398 \csname uni:#1\endcsname
10399 \fi
10400 }
10401
10402 % These macros are used here to construct the name of a control
10403 % sequence to be defined.
10404 \def\UTFviiiTwoOctetsName#1#2{%
10405 \csname u8:#1\string #2\endcsname}%
10406 \def\UTFviiiThreeOctetsName#1#2#3{%
10407 \csname u8:#1\string #2\string #3\endcsname}%
10408 \def\UTFviiiFourOctetsName#1#2#3#4{%
10409 \csname u8:#1\string #2\string #3\string #4\endcsname}%
10410
10411 % For UTF-8 byte sequences (TeX, e-TeX and pdfTeX),
10412 % provide a definition macro to replace a Unicode character;
10413 % this gets used by the @U command
10414 %
10415 \begingroup
10416 \catcode`\"=12
10417 \catcode`\<=12
10418 \catcode`\.=12
10419 \catcode`\,=12
10420 \catcode`\;=12
10421 \catcode`\!=12
10422 \catcode`\~=13
10423 \gdef\DeclareUnicodeCharacterUTFviii#1#2{%
10424 \countUTFz = "#1\relax
10425 \begingroup
10426 \parseXMLCharref
10427
10428 % Give \u8:... its definition. The sequence of seven \expandafter's
10429 % expands after the \gdef three times, e.g.
10430 %
10431 % 1. \UTFviiTwoOctetsName B1 B2
10432 % 2. \csname u8:B1 \string B2 \endcsname
10433 % 3. \u8: B1 B2 (a single control sequence token)
10434 %
10435 \expandafter\expandafter
10436 \expandafter\expandafter
10437 \expandafter\expandafter
10438 \expandafter\gdef \UTFviiiTmp{#2}%
10439 %
10440 \expandafter\ifx\csname uni:#1\endcsname \relax \else
10441 \message{Internal error, already defined: #1}%
10442 \fi
10443 %
10444 % define an additional control sequence for this code point.
10445 \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
10446 \endgroup}
10447 %
10448 % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
10449 % to the corresponding UTF-8 sequence.
10450 \gdef\parseXMLCharref{%
10451 \ifnum\countUTFz < "A0\relax
10452 \errhelp = \EMsimple
10453 \errmessage{Cannot define Unicode char value < 00A0}%
10454 \else\ifnum\countUTFz < "800\relax
10455 \parseUTFviiiA,%
10456 \parseUTFviiiB C\UTFviiiTwoOctetsName.,%
10457 \else\ifnum\countUTFz < "10000\relax
10458 \parseUTFviiiA;%
10459 \parseUTFviiiA,%
10460 \parseUTFviiiB E\UTFviiiThreeOctetsName.{,;}%
10461 \else
10462 \parseUTFviiiA;%
10463 \parseUTFviiiA,%
10464 \parseUTFviiiA!%
10465 \parseUTFviiiB F\UTFviiiFourOctetsName.{!,;}%
10466 \fi\fi\fi
10467 }
10468
10469 % Extract a byte from the end of the UTF-8 representation of \countUTFx.
10470 % It must be a non-initial byte in the sequence.
10471 % Change \uccode of #1 for it to be used in \parseUTFviiiB as one
10472 % of the bytes.
10473 \gdef\parseUTFviiiA#1{%
10474 \countUTFx = \countUTFz
10475 \divide\countUTFz by 64
10476 \countUTFy = \countUTFz % Save to be the future value of \countUTFz.
10477 \multiply\countUTFz by 64
10478
10479 % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract
10480 % in order to get the last five bits.
10481 \advance\countUTFx by -\countUTFz
10482
10483 % Convert this to the byte in the UTF-8 sequence.
10484 \advance\countUTFx by 128
10485 \uccode `#1\countUTFx
10486 \countUTFz = \countUTFy}
10487
10488 % Used to put a UTF-8 byte sequence into \UTFviiiTmp
10489 % #1 is the increment for \countUTFz to yield a the first byte of the UTF-8
10490 % sequence.
10491 % #2 is one of the \UTFviii*OctetsName macros.
10492 % #3 is always a full stop (.)
10493 % #4 is a template for the other bytes in the sequence. The values for these
10494 % bytes is substituted in here with \uppercase using the \uccode's.
10495 \gdef\parseUTFviiiB#1#2#3#4{%
10496 \advance\countUTFz by "#10\relax
10497 \uccode `#3\countUTFz
10498 \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
10499 \endgroup
10500
10501 % For native Unicode handling (XeTeX and LuaTeX),
10502 % provide a definition macro that sets a catcode to `other' non-globally
10503 %
10504 \def\DeclareUnicodeCharacterNativeOther#1#2{%
10505 \catcode"#1=\other
10506 }
10507
10508 % https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
10509 % U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
10510 % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
10511 % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
10512 % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
10513 %
10514 % Many of our renditions are less than wonderful, and all the missing
10515 % characters are available somewhere. Loading the necessary fonts
10516 % awaits user request. We can't truly support Unicode without
10517 % reimplementing everything that's been done in LaTeX for many years,
10518 % plus probably using luatex or xetex, and who knows what else.
10519 % We won't be doing that here in this simple file. But we can try to at
10520 % least make most of the characters not bomb out.
10521 %
10522 \def\unicodechardefs{%
10523 \DeclareUnicodeCharacter{00A0}{\tie}%
10524 \DeclareUnicodeCharacter{00A1}{\exclamdown}%
10525 \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent
10526 \DeclareUnicodeCharacter{00A3}{\pounds{}}%
10527 \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency
10528 \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen
10529 \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar
10530 \DeclareUnicodeCharacter{00A7}{\S}%
10531 \DeclareUnicodeCharacter{00A8}{\"{ }}%
10532 \DeclareUnicodeCharacter{00A9}{\copyright{}}%
10533 \DeclareUnicodeCharacter{00AA}{\ordf}%
10534 \DeclareUnicodeCharacter{00AB}{\guillemetleft{}}%
10535 \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot}%
10536 \DeclareUnicodeCharacter{00AD}{\-}%
10537 \DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}%
10538 \DeclareUnicodeCharacter{00AF}{\={ }}%
10539 %
10540 \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}%
10541 \DeclareUnicodeCharacter{00B1}{\ensuremath\pm}%
10542 \DeclareUnicodeCharacter{00B2}{$^2$}%
10543 \DeclareUnicodeCharacter{00B3}{$^3$}%
10544 \DeclareUnicodeCharacter{00B4}{\'{ }}%
10545 \DeclareUnicodeCharacter{00B5}{$\mu$}%
10546 \DeclareUnicodeCharacter{00B6}{\P}%
10547 \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot}%
10548 \DeclareUnicodeCharacter{00B8}{\cedilla{ }}%
10549 \DeclareUnicodeCharacter{00B9}{$^1$}%
10550 \DeclareUnicodeCharacter{00BA}{\ordm}%
10551 \DeclareUnicodeCharacter{00BB}{\guillemetright{}}%
10552 \DeclareUnicodeCharacter{00BC}{$1\over4$}%
10553 \DeclareUnicodeCharacter{00BD}{$1\over2$}%
10554 \DeclareUnicodeCharacter{00BE}{$3\over4$}%
10555 \DeclareUnicodeCharacter{00BF}{\questiondown}%
10556 %
10557 \DeclareUnicodeCharacter{00C0}{\`A}%
10558 \DeclareUnicodeCharacter{00C1}{\'A}%
10559 \DeclareUnicodeCharacter{00C2}{\^A}%
10560 \DeclareUnicodeCharacter{00C3}{\~A}%
10561 \DeclareUnicodeCharacter{00C4}{\"A}%
10562 \DeclareUnicodeCharacter{00C5}{\AA}%
10563 \DeclareUnicodeCharacter{00C6}{\AE}%
10564 \DeclareUnicodeCharacter{00C7}{\cedilla{C}}%
10565 \DeclareUnicodeCharacter{00C8}{\`E}%
10566 \DeclareUnicodeCharacter{00C9}{\'E}%
10567 \DeclareUnicodeCharacter{00CA}{\^E}%
10568 \DeclareUnicodeCharacter{00CB}{\"E}%
10569 \DeclareUnicodeCharacter{00CC}{\`I}%
10570 \DeclareUnicodeCharacter{00CD}{\'I}%
10571 \DeclareUnicodeCharacter{00CE}{\^I}%
10572 \DeclareUnicodeCharacter{00CF}{\"I}%
10573 %
10574 \DeclareUnicodeCharacter{00D0}{\DH}%
10575 \DeclareUnicodeCharacter{00D1}{\~N}%
10576 \DeclareUnicodeCharacter{00D2}{\`O}%
10577 \DeclareUnicodeCharacter{00D3}{\'O}%
10578 \DeclareUnicodeCharacter{00D4}{\^O}%
10579 \DeclareUnicodeCharacter{00D5}{\~O}%
10580 \DeclareUnicodeCharacter{00D6}{\"O}%
10581 \DeclareUnicodeCharacter{00D7}{\ensuremath\times}%
10582 \DeclareUnicodeCharacter{00D8}{\O}%
10583 \DeclareUnicodeCharacter{00D9}{\`U}%
10584 \DeclareUnicodeCharacter{00DA}{\'U}%
10585 \DeclareUnicodeCharacter{00DB}{\^U}%
10586 \DeclareUnicodeCharacter{00DC}{\"U}%
10587 \DeclareUnicodeCharacter{00DD}{\'Y}%
10588 \DeclareUnicodeCharacter{00DE}{\TH}%
10589 \DeclareUnicodeCharacter{00DF}{\ss}%
10590 %
10591 \DeclareUnicodeCharacter{00E0}{\`a}%
10592 \DeclareUnicodeCharacter{00E1}{\'a}%
10593 \DeclareUnicodeCharacter{00E2}{\^a}%
10594 \DeclareUnicodeCharacter{00E3}{\~a}%
10595 \DeclareUnicodeCharacter{00E4}{\"a}%
10596 \DeclareUnicodeCharacter{00E5}{\aa}%
10597 \DeclareUnicodeCharacter{00E6}{\ae}%
10598 \DeclareUnicodeCharacter{00E7}{\cedilla{c}}%
10599 \DeclareUnicodeCharacter{00E8}{\`e}%
10600 \DeclareUnicodeCharacter{00E9}{\'e}%
10601 \DeclareUnicodeCharacter{00EA}{\^e}%
10602 \DeclareUnicodeCharacter{00EB}{\"e}%
10603 \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}%
10604 \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}%
10605 \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}%
10606 \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}%
10607 %
10608 \DeclareUnicodeCharacter{00F0}{\dh}%
10609 \DeclareUnicodeCharacter{00F1}{\~n}%
10610 \DeclareUnicodeCharacter{00F2}{\`o}%
10611 \DeclareUnicodeCharacter{00F3}{\'o}%
10612 \DeclareUnicodeCharacter{00F4}{\^o}%
10613 \DeclareUnicodeCharacter{00F5}{\~o}%
10614 \DeclareUnicodeCharacter{00F6}{\"o}%
10615 \DeclareUnicodeCharacter{00F7}{\ensuremath\div}%
10616 \DeclareUnicodeCharacter{00F8}{\o}%
10617 \DeclareUnicodeCharacter{00F9}{\`u}%
10618 \DeclareUnicodeCharacter{00FA}{\'u}%
10619 \DeclareUnicodeCharacter{00FB}{\^u}%
10620 \DeclareUnicodeCharacter{00FC}{\"u}%
10621 \DeclareUnicodeCharacter{00FD}{\'y}%
10622 \DeclareUnicodeCharacter{00FE}{\th}%
10623 \DeclareUnicodeCharacter{00FF}{\"y}%
10624 %
10625 \DeclareUnicodeCharacter{0100}{\=A}%
10626 \DeclareUnicodeCharacter{0101}{\=a}%
10627 \DeclareUnicodeCharacter{0102}{\u{A}}%
10628 \DeclareUnicodeCharacter{0103}{\u{a}}%
10629 \DeclareUnicodeCharacter{0104}{\ogonek{A}}%
10630 \DeclareUnicodeCharacter{0105}{\ogonek{a}}%
10631 \DeclareUnicodeCharacter{0106}{\'C}%
10632 \DeclareUnicodeCharacter{0107}{\'c}%
10633 \DeclareUnicodeCharacter{0108}{\^C}%
10634 \DeclareUnicodeCharacter{0109}{\^c}%
10635 \DeclareUnicodeCharacter{010A}{\dotaccent{C}}%
10636 \DeclareUnicodeCharacter{010B}{\dotaccent{c}}%
10637 \DeclareUnicodeCharacter{010C}{\v{C}}%
10638 \DeclareUnicodeCharacter{010D}{\v{c}}%
10639 \DeclareUnicodeCharacter{010E}{\v{D}}%
10640 \DeclareUnicodeCharacter{010F}{d'}%
10641 %
10642 \DeclareUnicodeCharacter{0110}{\DH}%
10643 \DeclareUnicodeCharacter{0111}{\dh}%
10644 \DeclareUnicodeCharacter{0112}{\=E}%
10645 \DeclareUnicodeCharacter{0113}{\=e}%
10646 \DeclareUnicodeCharacter{0114}{\u{E}}%
10647 \DeclareUnicodeCharacter{0115}{\u{e}}%
10648 \DeclareUnicodeCharacter{0116}{\dotaccent{E}}%
10649 \DeclareUnicodeCharacter{0117}{\dotaccent{e}}%
10650 \DeclareUnicodeCharacter{0118}{\ogonek{E}}%
10651 \DeclareUnicodeCharacter{0119}{\ogonek{e}}%
10652 \DeclareUnicodeCharacter{011A}{\v{E}}%
10653 \DeclareUnicodeCharacter{011B}{\v{e}}%
10654 \DeclareUnicodeCharacter{011C}{\^G}%
10655 \DeclareUnicodeCharacter{011D}{\^g}%
10656 \DeclareUnicodeCharacter{011E}{\u{G}}%
10657 \DeclareUnicodeCharacter{011F}{\u{g}}%
10658 %
10659 \DeclareUnicodeCharacter{0120}{\dotaccent{G}}%
10660 \DeclareUnicodeCharacter{0121}{\dotaccent{g}}%
10661 \DeclareUnicodeCharacter{0122}{\cedilla{G}}%
10662 \DeclareUnicodeCharacter{0123}{\cedilla{g}}%
10663 \DeclareUnicodeCharacter{0124}{\^H}%
10664 \DeclareUnicodeCharacter{0125}{\^h}%
10665 \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}}%
10666 \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}}%
10667 \DeclareUnicodeCharacter{0128}{\~I}%
10668 \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}%
10669 \DeclareUnicodeCharacter{012A}{\=I}%
10670 \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}%
10671 \DeclareUnicodeCharacter{012C}{\u{I}}%
10672 \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}%
10673 \DeclareUnicodeCharacter{012E}{\ogonek{I}}%
10674 \DeclareUnicodeCharacter{012F}{\ogonek{i}}%
10675 %
10676 \DeclareUnicodeCharacter{0130}{\dotaccent{I}}%
10677 \DeclareUnicodeCharacter{0131}{\dotless{i}}%
10678 \DeclareUnicodeCharacter{0132}{IJ}%
10679 \DeclareUnicodeCharacter{0133}{ij}%
10680 \DeclareUnicodeCharacter{0134}{\^J}%
10681 \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}%
10682 \DeclareUnicodeCharacter{0136}{\cedilla{K}}%
10683 \DeclareUnicodeCharacter{0137}{\cedilla{k}}%
10684 \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}%
10685 \DeclareUnicodeCharacter{0139}{\'L}%
10686 \DeclareUnicodeCharacter{013A}{\'l}%
10687 \DeclareUnicodeCharacter{013B}{\cedilla{L}}%
10688 \DeclareUnicodeCharacter{013C}{\cedilla{l}}%
10689 \DeclareUnicodeCharacter{013D}{L'}% should kern
10690 \DeclareUnicodeCharacter{013E}{l'}% should kern
10691 \DeclareUnicodeCharacter{013F}{L\U{00B7}}%
10692 %
10693 \DeclareUnicodeCharacter{0140}{l\U{00B7}}%
10694 \DeclareUnicodeCharacter{0141}{\L}%
10695 \DeclareUnicodeCharacter{0142}{\l}%
10696 \DeclareUnicodeCharacter{0143}{\'N}%
10697 \DeclareUnicodeCharacter{0144}{\'n}%
10698 \DeclareUnicodeCharacter{0145}{\cedilla{N}}%
10699 \DeclareUnicodeCharacter{0146}{\cedilla{n}}%
10700 \DeclareUnicodeCharacter{0147}{\v{N}}%
10701 \DeclareUnicodeCharacter{0148}{\v{n}}%
10702 \DeclareUnicodeCharacter{0149}{'n}%
10703 \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}}%
10704 \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}}%
10705 \DeclareUnicodeCharacter{014C}{\=O}%
10706 \DeclareUnicodeCharacter{014D}{\=o}%
10707 \DeclareUnicodeCharacter{014E}{\u{O}}%
10708 \DeclareUnicodeCharacter{014F}{\u{o}}%
10709 %
10710 \DeclareUnicodeCharacter{0150}{\H{O}}%
10711 \DeclareUnicodeCharacter{0151}{\H{o}}%
10712 \DeclareUnicodeCharacter{0152}{\OE}%
10713 \DeclareUnicodeCharacter{0153}{\oe}%
10714 \DeclareUnicodeCharacter{0154}{\'R}%
10715 \DeclareUnicodeCharacter{0155}{\'r}%
10716 \DeclareUnicodeCharacter{0156}{\cedilla{R}}%
10717 \DeclareUnicodeCharacter{0157}{\cedilla{r}}%
10718 \DeclareUnicodeCharacter{0158}{\v{R}}%
10719 \DeclareUnicodeCharacter{0159}{\v{r}}%
10720 \DeclareUnicodeCharacter{015A}{\'S}%
10721 \DeclareUnicodeCharacter{015B}{\'s}%
10722 \DeclareUnicodeCharacter{015C}{\^S}%
10723 \DeclareUnicodeCharacter{015D}{\^s}%
10724 \DeclareUnicodeCharacter{015E}{\cedilla{S}}%
10725 \DeclareUnicodeCharacter{015F}{\cedilla{s}}%
10726 %
10727 \DeclareUnicodeCharacter{0160}{\v{S}}%
10728 \DeclareUnicodeCharacter{0161}{\v{s}}%
10729 \DeclareUnicodeCharacter{0162}{\cedilla{T}}%
10730 \DeclareUnicodeCharacter{0163}{\cedilla{t}}%
10731 \DeclareUnicodeCharacter{0164}{\v{T}}%
10732 \DeclareUnicodeCharacter{0165}{\v{t}}%
10733 \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}}%
10734 \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}}%
10735 \DeclareUnicodeCharacter{0168}{\~U}%
10736 \DeclareUnicodeCharacter{0169}{\~u}%
10737 \DeclareUnicodeCharacter{016A}{\=U}%
10738 \DeclareUnicodeCharacter{016B}{\=u}%
10739 \DeclareUnicodeCharacter{016C}{\u{U}}%
10740 \DeclareUnicodeCharacter{016D}{\u{u}}%
10741 \DeclareUnicodeCharacter{016E}{\ringaccent{U}}%
10742 \DeclareUnicodeCharacter{016F}{\ringaccent{u}}%
10743 %
10744 \DeclareUnicodeCharacter{0170}{\H{U}}%
10745 \DeclareUnicodeCharacter{0171}{\H{u}}%
10746 \DeclareUnicodeCharacter{0172}{\ogonek{U}}%
10747 \DeclareUnicodeCharacter{0173}{\ogonek{u}}%
10748 \DeclareUnicodeCharacter{0174}{\^W}%
10749 \DeclareUnicodeCharacter{0175}{\^w}%
10750 \DeclareUnicodeCharacter{0176}{\^Y}%
10751 \DeclareUnicodeCharacter{0177}{\^y}%
10752 \DeclareUnicodeCharacter{0178}{\"Y}%
10753 \DeclareUnicodeCharacter{0179}{\'Z}%
10754 \DeclareUnicodeCharacter{017A}{\'z}%
10755 \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}%
10756 \DeclareUnicodeCharacter{017C}{\dotaccent{z}}%
10757 \DeclareUnicodeCharacter{017D}{\v{Z}}%
10758 \DeclareUnicodeCharacter{017E}{\v{z}}%
10759 \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}}%
10760 %
10761 \DeclareUnicodeCharacter{01C4}{D\v{Z}}%
10762 \DeclareUnicodeCharacter{01C5}{D\v{z}}%
10763 \DeclareUnicodeCharacter{01C6}{d\v{z}}%
10764 \DeclareUnicodeCharacter{01C7}{LJ}%
10765 \DeclareUnicodeCharacter{01C8}{Lj}%
10766 \DeclareUnicodeCharacter{01C9}{lj}%
10767 \DeclareUnicodeCharacter{01CA}{NJ}%
10768 \DeclareUnicodeCharacter{01CB}{Nj}%
10769 \DeclareUnicodeCharacter{01CC}{nj}%
10770 \DeclareUnicodeCharacter{01CD}{\v{A}}%
10771 \DeclareUnicodeCharacter{01CE}{\v{a}}%
10772 \DeclareUnicodeCharacter{01CF}{\v{I}}%
10773 %
10774 \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}%
10775 \DeclareUnicodeCharacter{01D1}{\v{O}}%
10776 \DeclareUnicodeCharacter{01D2}{\v{o}}%
10777 \DeclareUnicodeCharacter{01D3}{\v{U}}%
10778 \DeclareUnicodeCharacter{01D4}{\v{u}}%
10779 %
10780 \DeclareUnicodeCharacter{01E2}{\={\AE}}%
10781 \DeclareUnicodeCharacter{01E3}{\={\ae}}%
10782 \DeclareUnicodeCharacter{01E6}{\v{G}}%
10783 \DeclareUnicodeCharacter{01E7}{\v{g}}%
10784 \DeclareUnicodeCharacter{01E8}{\v{K}}%
10785 \DeclareUnicodeCharacter{01E9}{\v{k}}%
10786 %
10787 \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}%
10788 \DeclareUnicodeCharacter{01F1}{DZ}%
10789 \DeclareUnicodeCharacter{01F2}{Dz}%
10790 \DeclareUnicodeCharacter{01F3}{dz}%
10791 \DeclareUnicodeCharacter{01F4}{\'G}%
10792 \DeclareUnicodeCharacter{01F5}{\'g}%
10793 \DeclareUnicodeCharacter{01F8}{\`N}%
10794 \DeclareUnicodeCharacter{01F9}{\`n}%
10795 \DeclareUnicodeCharacter{01FC}{\'{\AE}}%
10796 \DeclareUnicodeCharacter{01FD}{\'{\ae}}%
10797 \DeclareUnicodeCharacter{01FE}{\'{\O}}%
10798 \DeclareUnicodeCharacter{01FF}{\'{\o}}%
10799 %
10800 \DeclareUnicodeCharacter{021E}{\v{H}}%
10801 \DeclareUnicodeCharacter{021F}{\v{h}}%
10802 %
10803 \DeclareUnicodeCharacter{0226}{\dotaccent{A}}%
10804 \DeclareUnicodeCharacter{0227}{\dotaccent{a}}%
10805 \DeclareUnicodeCharacter{0228}{\cedilla{E}}%
10806 \DeclareUnicodeCharacter{0229}{\cedilla{e}}%
10807 \DeclareUnicodeCharacter{022E}{\dotaccent{O}}%
10808 \DeclareUnicodeCharacter{022F}{\dotaccent{o}}%
10809 %
10810 \DeclareUnicodeCharacter{0232}{\=Y}%
10811 \DeclareUnicodeCharacter{0233}{\=y}%
10812 \DeclareUnicodeCharacter{0237}{\dotless{j}}%
10813 %
10814 \DeclareUnicodeCharacter{02DB}{\ogonek{ }}%
10815 %
10816 % Greek letters upper case
10817 \DeclareUnicodeCharacter{0391}{{\it A}}%
10818 \DeclareUnicodeCharacter{0392}{{\it B}}%
10819 \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}%
10820 \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}%
10821 \DeclareUnicodeCharacter{0395}{{\it E}}%
10822 \DeclareUnicodeCharacter{0396}{{\it Z}}%
10823 \DeclareUnicodeCharacter{0397}{{\it H}}%
10824 \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}%
10825 \DeclareUnicodeCharacter{0399}{{\it I}}%
10826 \DeclareUnicodeCharacter{039A}{{\it K}}%
10827 \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}}%
10828 \DeclareUnicodeCharacter{039C}{{\it M}}%
10829 \DeclareUnicodeCharacter{039D}{{\it N}}%
10830 \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}}%
10831 \DeclareUnicodeCharacter{039F}{{\it O}}%
10832 \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}}%
10833 \DeclareUnicodeCharacter{03A1}{{\it P}}%
10834 %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma
10835 \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}}%
10836 \DeclareUnicodeCharacter{03A4}{{\it T}}%
10837 \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}}%
10838 \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}}%
10839 \DeclareUnicodeCharacter{03A7}{{\it X}}%
10840 \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}}%
10841 \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}}%
10842 %
10843 % Vowels with accents
10844 \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}%
10845 \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}}%
10846 \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}}%
10847 \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}}%
10848 \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}}%
10849 \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}}%
10850 %
10851 % Standalone accent
10852 \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}}%
10853 %
10854 % Greek letters lower case
10855 \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha}%
10856 \DeclareUnicodeCharacter{03B2}{\ensuremath\beta}%
10857 \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma}%
10858 \DeclareUnicodeCharacter{03B4}{\ensuremath\delta}%
10859 \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon}%
10860 \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta}%
10861 \DeclareUnicodeCharacter{03B7}{\ensuremath\eta}%
10862 \DeclareUnicodeCharacter{03B8}{\ensuremath\theta}%
10863 \DeclareUnicodeCharacter{03B9}{\ensuremath\iota}%
10864 \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa}%
10865 \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda}%
10866 \DeclareUnicodeCharacter{03BC}{\ensuremath\mu}%
10867 \DeclareUnicodeCharacter{03BD}{\ensuremath\nu}%
10868 \DeclareUnicodeCharacter{03BE}{\ensuremath\xi}%
10869 \DeclareUnicodeCharacter{03BF}{{\it o}}% omicron
10870 \DeclareUnicodeCharacter{03C0}{\ensuremath\pi}%
10871 \DeclareUnicodeCharacter{03C1}{\ensuremath\rho}%
10872 \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma}%
10873 \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma}%
10874 \DeclareUnicodeCharacter{03C4}{\ensuremath\tau}%
10875 \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon}%
10876 \DeclareUnicodeCharacter{03C6}{\ensuremath\phi}%
10877 \DeclareUnicodeCharacter{03C7}{\ensuremath\chi}%
10878 \DeclareUnicodeCharacter{03C8}{\ensuremath\psi}%
10879 \DeclareUnicodeCharacter{03C9}{\ensuremath\omega}%
10880 %
10881 % More Greek vowels with accents
10882 \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}}%
10883 \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}}%
10884 \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}}%
10885 \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}}%
10886 \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}}%
10887 %
10888 % Variant Greek letters
10889 \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta}%
10890 \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi}%
10891 \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho}%
10892 %
10893 \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}%
10894 \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}%
10895 \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}%
10896 \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}%
10897 \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}%
10898 \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}%
10899 \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}%
10900 \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}%
10901 \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}%
10902 \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}%
10903 \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}%
10904 \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}%
10905 %
10906 \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}%
10907 \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}%
10908 %
10909 \DeclareUnicodeCharacter{1E20}{\=G}%
10910 \DeclareUnicodeCharacter{1E21}{\=g}%
10911 \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}%
10912 \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}%
10913 \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}%
10914 \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}%
10915 \DeclareUnicodeCharacter{1E26}{\"H}%
10916 \DeclareUnicodeCharacter{1E27}{\"h}%
10917 %
10918 \DeclareUnicodeCharacter{1E30}{\'K}%
10919 \DeclareUnicodeCharacter{1E31}{\'k}%
10920 \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}%
10921 \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}%
10922 \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}%
10923 \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}%
10924 \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}%
10925 \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}%
10926 \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}%
10927 \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}%
10928 \DeclareUnicodeCharacter{1E3E}{\'M}%
10929 \DeclareUnicodeCharacter{1E3F}{\'m}%
10930 %
10931 \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}%
10932 \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}%
10933 \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}%
10934 \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}%
10935 \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}%
10936 \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}%
10937 \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}%
10938 \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}%
10939 \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}%
10940 \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}%
10941 %
10942 \DeclareUnicodeCharacter{1E54}{\'P}%
10943 \DeclareUnicodeCharacter{1E55}{\'p}%
10944 \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}%
10945 \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}%
10946 \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}%
10947 \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}%
10948 \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}%
10949 \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}%
10950 \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}%
10951 \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}%
10952 %
10953 \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}%
10954 \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}%
10955 \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}%
10956 \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}%
10957 \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}%
10958 \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}%
10959 \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}%
10960 \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}%
10961 \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}%
10962 \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}%
10963 %
10964 \DeclareUnicodeCharacter{1E7C}{\~V}%
10965 \DeclareUnicodeCharacter{1E7D}{\~v}%
10966 \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}%
10967 \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}%
10968 %
10969 \DeclareUnicodeCharacter{1E80}{\`W}%
10970 \DeclareUnicodeCharacter{1E81}{\`w}%
10971 \DeclareUnicodeCharacter{1E82}{\'W}%
10972 \DeclareUnicodeCharacter{1E83}{\'w}%
10973 \DeclareUnicodeCharacter{1E84}{\"W}%
10974 \DeclareUnicodeCharacter{1E85}{\"w}%
10975 \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}%
10976 \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}%
10977 \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}%
10978 \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}%
10979 \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}%
10980 \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}%
10981 \DeclareUnicodeCharacter{1E8C}{\"X}%
10982 \DeclareUnicodeCharacter{1E8D}{\"x}%
10983 \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}%
10984 \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}%
10985 %
10986 \DeclareUnicodeCharacter{1E90}{\^Z}%
10987 \DeclareUnicodeCharacter{1E91}{\^z}%
10988 \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}%
10989 \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}%
10990 \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}%
10991 \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}%
10992 \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}%
10993 \DeclareUnicodeCharacter{1E97}{\"t}%
10994 \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}%
10995 \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}%
10996 %
10997 \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}%
10998 \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}%
10999 %
11000 \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}%
11001 \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}%
11002 \DeclareUnicodeCharacter{1EBC}{\~E}%
11003 \DeclareUnicodeCharacter{1EBD}{\~e}%
11004 %
11005 \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}%
11006 \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}%
11007 \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}%
11008 \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}%
11009 %
11010 \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}%
11011 \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}%
11012 %
11013 \DeclareUnicodeCharacter{1EF2}{\`Y}%
11014 \DeclareUnicodeCharacter{1EF3}{\`y}%
11015 \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}%
11016 %
11017 \DeclareUnicodeCharacter{1EF8}{\~Y}%
11018 \DeclareUnicodeCharacter{1EF9}{\~y}%
11019 %
11020 % Punctuation
11021 \DeclareUnicodeCharacter{2013}{--}%
11022 \DeclareUnicodeCharacter{2014}{---}%
11023 \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
11024 \DeclareUnicodeCharacter{2019}{\quoteright{}}%
11025 \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
11026 \DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
11027 \DeclareUnicodeCharacter{201D}{\quotedblright{}}%
11028 \DeclareUnicodeCharacter{201E}{\quotedblbase{}}%
11029 \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}%
11030 \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}%
11031 \DeclareUnicodeCharacter{2022}{\bullet{}}%
11032 \DeclareUnicodeCharacter{202F}{\thinspace}%
11033 \DeclareUnicodeCharacter{2026}{\dots{}}%
11034 \DeclareUnicodeCharacter{2039}{\guilsinglleft{}}%
11035 \DeclareUnicodeCharacter{203A}{\guilsinglright{}}%
11036 %
11037 \DeclareUnicodeCharacter{20AC}{\euro{}}%
11038 %
11039 \DeclareUnicodeCharacter{2192}{\expansion{}}%
11040 \DeclareUnicodeCharacter{21D2}{\result{}}%
11041 %
11042 % Mathematical symbols
11043 \DeclareUnicodeCharacter{2200}{\ensuremath\forall}%
11044 \DeclareUnicodeCharacter{2203}{\ensuremath\exists}%
11045 \DeclareUnicodeCharacter{2208}{\ensuremath\in}%
11046 \DeclareUnicodeCharacter{2212}{\minus{}}%
11047 \DeclareUnicodeCharacter{2217}{\ast}%
11048 \DeclareUnicodeCharacter{221E}{\ensuremath\infty}%
11049 \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}%
11050 \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}%
11051 \DeclareUnicodeCharacter{2229}{\ensuremath\cap}%
11052 \DeclareUnicodeCharacter{2261}{\equiv{}}%
11053 \DeclareUnicodeCharacter{2264}{\ensuremath\leq}%
11054 \DeclareUnicodeCharacter{2265}{\ensuremath\geq}%
11055 \DeclareUnicodeCharacter{2282}{\ensuremath\subset}%
11056 \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
11057 %
11058 \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
11059 \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
11060 \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}%
11061 \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
11062 \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
11063 \DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
11064 \DeclareUnicodeCharacter{211C}{\ensuremath\Re}%
11065 \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
11066 \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
11067 \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
11068 \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}%
11069 \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}%
11070 \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}%
11071 \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}%
11072 \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}%
11073 \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}%
11074 \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}%
11075 \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto}%
11076 \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow}%
11077 \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}%
11078 \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}%
11079 \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}%
11080 \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}%
11081 \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}%
11082 \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}%
11083 \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow}%
11084 \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow}%
11085 \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}%
11086 \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}%
11087 \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}%
11088 \DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
11089 \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
11090 \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
11091 \DeclareUnicodeCharacter{2209}{\ensuremath\notin}%
11092 \DeclareUnicodeCharacter{220B}{\ensuremath\owns}%
11093 \DeclareUnicodeCharacter{220F}{\ensuremath\prod}%
11094 \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}%
11095 \DeclareUnicodeCharacter{2211}{\ensuremath\sum}%
11096 \DeclareUnicodeCharacter{2213}{\ensuremath\mp}%
11097 \DeclareUnicodeCharacter{2218}{\ensuremath\circ}%
11098 \DeclareUnicodeCharacter{221A}{\ensuremath\surd}%
11099 \DeclareUnicodeCharacter{221D}{\ensuremath\propto}%
11100 \DeclareUnicodeCharacter{2220}{\ensuremath\angle}%
11101 \DeclareUnicodeCharacter{2223}{\ensuremath\mid}%
11102 \DeclareUnicodeCharacter{2228}{\ensuremath\vee}%
11103 \DeclareUnicodeCharacter{222A}{\ensuremath\cup}%
11104 \DeclareUnicodeCharacter{222B}{\ensuremath\smallint}%
11105 \DeclareUnicodeCharacter{222E}{\ensuremath\oint}%
11106 \DeclareUnicodeCharacter{223C}{\ensuremath\sim}%
11107 \DeclareUnicodeCharacter{2240}{\ensuremath\wr}%
11108 \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}%
11109 \DeclareUnicodeCharacter{2245}{\ensuremath\cong}%
11110 \DeclareUnicodeCharacter{2248}{\ensuremath\approx}%
11111 \DeclareUnicodeCharacter{224D}{\ensuremath\asymp}%
11112 \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}%
11113 \DeclareUnicodeCharacter{2260}{\ensuremath\neq}%
11114 \DeclareUnicodeCharacter{226A}{\ensuremath\ll}%
11115 \DeclareUnicodeCharacter{226B}{\ensuremath\gg}%
11116 \DeclareUnicodeCharacter{227A}{\ensuremath\prec}%
11117 \DeclareUnicodeCharacter{227B}{\ensuremath\succ}%
11118 \DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
11119 \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
11120 \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}%
11121 \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
11122 \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
11123 \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
11124 \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}%
11125 \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}%
11126 \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}%
11127 \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}%
11128 \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}%
11129 \DeclareUnicodeCharacter{2299}{\ensuremath\odot}%
11130 \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash}%
11131 \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv}%
11132 \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}%
11133 \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}%
11134 \DeclareUnicodeCharacter{22A8}{\ensuremath\models}%
11135 \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}%
11136 \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}%
11137 \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}%
11138 \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup}%
11139 \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond}%
11140 \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot}%
11141 \DeclareUnicodeCharacter{22C6}{\ensuremath\star}%
11142 \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie}%
11143 \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}%
11144 \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}%
11145 \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor}%
11146 \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor}%
11147 \DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
11148 \DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
11149 %
11150 \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}%
11151 \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}%
11152 \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}%
11153 \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}%
11154 \DeclareUnicodeCharacter{25C7}{\ensuremath\diamond}%
11155 \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
11156 \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
11157 \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
11158 \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}%
11159 \DeclareUnicodeCharacter{266D}{\ensuremath\flat}%
11160 \DeclareUnicodeCharacter{266E}{\ensuremath\natural}%
11161 \DeclareUnicodeCharacter{266F}{\ensuremath\sharp}%
11162 \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc}%
11163 \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle}%
11164 \DeclareUnicodeCharacter{27C2}{\ensuremath\perp}%
11165 \DeclareUnicodeCharacter{27E8}{\ensuremath\langle}%
11166 \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow}%
11167 \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow}%
11168 \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow}%
11169 \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto}%
11170 \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus}%
11171 \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot}%
11172 \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus}%
11173 \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}%
11174 \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}%
11175 \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}%
11176 \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}%
11177 \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}%
11178 \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}%
11179 %
11180 \global\mathchardef\checkmark="1370% actually the square root sign
11181 \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
11182 }% end of \unicodechardefs
11183
11184 % UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
11185 % It makes the setting that replace UTF-8 byte sequence.
11186 \def\utfeightchardefs{%
11187 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii
11188 \unicodechardefs
11189 }
11190
11191 % Whether the active definitions of non-ASCII characters expand to
11192 % non-active tokens with the same character code. This is used to
11193 % write characters literally, instead of using active definitions for
11194 % printing the correct glyphs.
11195 \newif\ifpassthroughchars
11196 \passthroughcharsfalse
11197
11198 % For native Unicode handling (XeTeX and LuaTeX),
11199 % provide a definition macro to replace/pass-through a Unicode character
11200 %
11201 \def\DeclareUnicodeCharacterNative#1#2{%
11202 \catcode"#1=\active
11203 \def\dodeclareunicodecharacternative##1##2##3{%
11204 \begingroup
11205 \uccode`\~="##2\relax
11206 \uppercase{\gdef~}{%
11207 \ifpassthroughchars
11208 ##1%
11209 \else
11210 ##3%
11211 \fi
11212 }
11213 \endgroup
11214 }
11215 \begingroup
11216 \uccode`\.="#1\relax
11217 \uppercase{\def\UTFNativeTmp{.}}%
11218 \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
11219 \endgroup
11220 }
11221
11222 % Native Unicode handling (XeTeX and LuaTeX) character replacing definition.
11223 % It activates the setting that replaces Unicode characters.
11224 \def\nativeunicodechardefs{%
11225 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative
11226 \unicodechardefs
11227 }
11228
11229 % For native Unicode handling (XeTeX and LuaTeX),
11230 % make the character token expand
11231 % to the sequences given in \unicodechardefs for printing.
11232 \def\DeclareUnicodeCharacterNativeAtU#1#2{%
11233 \def\UTFAtUTmp{#2}
11234 \expandafter\globallet\csname uni:#1\endcsname \UTFAtUTmp
11235 }
11236
11237 % @U command definitions for native Unicode handling (XeTeX and LuaTeX).
11238 \def\nativeunicodechardefsatu{%
11239 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU
11240 \unicodechardefs
11241 }
11242
11243 % US-ASCII character definitions.
11244 \def\asciichardefs{% nothing need be done
11245 \relax
11246 }
11247
11248 % define all Unicode characters we know about, for the sake of @U.
11249 \iftxinativeunicodecapable
11250 \nativeunicodechardefsatu
11251 \else
11252 \utfeightchardefs
11253 \fi
11254
11255
11256 % Make non-ASCII characters printable again for compatibility with
11257 % existing Texinfo documents that may use them, even without declaring a
11258 % document encoding.
11259 %
11260 \setnonasciicharscatcode \other
11261
11262
11263 \message{formatting,}
11264
11265 \newdimen\defaultparindent \defaultparindent = 15pt
11266
11267 \chapheadingskip = 15pt plus 4pt minus 2pt
11268 \secheadingskip = 12pt plus 3pt minus 2pt
11269 \subsecheadingskip = 9pt plus 2pt minus 2pt
11270
11271 % Prevent underfull vbox error messages.
11272 \vbadness = 10000
11273
11274 % Don't be very finicky about underfull hboxes, either.
11275 \hbadness = 6666
11276
11277 % Following George Bush, get rid of widows and orphans.
11278 \widowpenalty=10000
11279 \clubpenalty=10000
11280
11281 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
11282 % using an old version of TeX, don't do anything. We want the amount of
11283 % stretch added to depend on the line length, hence the dependence on
11284 % \hsize. We call this whenever the paper size is set.
11285 %
11286 \def\setemergencystretch{%
11287 \ifx\emergencystretch\thisisundefined
11288 % Allow us to assign to \emergencystretch anyway.
11289 \def\emergencystretch{\dimen0}%
11290 \else
11291 \emergencystretch = .15\hsize
11292 \fi
11293 }
11294
11295 % Parameters in order: 1) textheight; 2) textwidth;
11296 % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
11297 % 7) physical page height; 8) physical page width.
11298 %
11299 % We also call \setleading{\textleading}, so the caller should define
11300 % \textleading. The caller should also set \parskip.
11301 %
11302 \def\internalpagesizes#1#2#3#4#5#6#7#8{%
11303 \voffset = #3\relax
11304 \topskip = #6\relax
11305 \splittopskip = \topskip
11306 %
11307 \vsize = #1\relax
11308 \advance\vsize by \topskip
11309 \outervsize = \vsize
11310 \advance\outervsize by 2\topandbottommargin
11311 \txipageheight = \vsize
11312 %
11313 \hsize = #2\relax
11314 \outerhsize = \hsize
11315 \advance\outerhsize by 0.5in
11316 \txipagewidth = \hsize
11317 %
11318 \normaloffset = #4\relax
11319 \bindingoffset = #5\relax
11320 %
11321 \ifpdf
11322 \pdfpageheight #7\relax
11323 \pdfpagewidth #8\relax
11324 % if we don't reset these, they will remain at "1 true in" of
11325 % whatever layout pdftex was dumped with.
11326 \pdfhorigin = 1 true in
11327 \pdfvorigin = 1 true in
11328 \else
11329 \ifx\XeTeXrevision\thisisundefined
11330 \special{papersize=#8,#7}%
11331 \else
11332 \pdfpageheight #7\relax
11333 \pdfpagewidth #8\relax
11334 % XeTeX does not have \pdfhorigin and \pdfvorigin.
11335 \fi
11336 \fi
11337 %
11338 \setleading{\textleading}
11339 %
11340 \parindent = \defaultparindent
11341 \setemergencystretch
11342 }
11343
11344 % @letterpaper (the default).
11345 \def\letterpaper{{\globaldefs = 1
11346 \parskip = 3pt plus 2pt minus 1pt
11347 \textleading = 13.2pt
11348 %
11349 % If page is nothing but text, make it come out even.
11350 \internalpagesizes{607.2pt}{6in}% that's 46 lines
11351 {\voffset}{.25in}%
11352 {\bindingoffset}{36pt}%
11353 {11in}{8.5in}%
11354 }}
11355
11356 % Use @smallbook to reset parameters for 7x9.25 trim size.
11357 \def\smallbook{{\globaldefs = 1
11358 \parskip = 2pt plus 1pt
11359 \textleading = 12pt
11360 %
11361 \internalpagesizes{7.5in}{5in}%
11362 {-.2in}{0in}%
11363 {\bindingoffset}{16pt}%
11364 {9.25in}{7in}%
11365 %
11366 \lispnarrowing = 0.3in
11367 \tolerance = 700
11368 \contentsrightmargin = 0pt
11369 \defbodyindent = .5cm
11370 }}
11371
11372 % Use @smallerbook to reset parameters for 6x9 trim size.
11373 % (Just testing, parameters still in flux.)
11374 \def\smallerbook{{\globaldefs = 1
11375 \parskip = 1.5pt plus 1pt
11376 \textleading = 12pt
11377 %
11378 \internalpagesizes{7.4in}{4.8in}%
11379 {-.2in}{-.4in}%
11380 {0pt}{14pt}%
11381 {9in}{6in}%
11382 %
11383 \lispnarrowing = 0.25in
11384 \tolerance = 700
11385 \contentsrightmargin = 0pt
11386 \defbodyindent = .4cm
11387 }}
11388
11389 % Use @afourpaper to print on European A4 paper.
11390 \def\afourpaper{{\globaldefs = 1
11391 \parskip = 3pt plus 2pt minus 1pt
11392 \textleading = 13.2pt
11393 %
11394 % Double-side printing via postscript on Laserjet 4050
11395 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
11396 % To change the settings for a different printer or situation, adjust
11397 % \normaloffset until the front-side and back-side texts align. Then
11398 % do the same for \bindingoffset. You can set these for testing in
11399 % your texinfo source file like this:
11400 % @tex
11401 % \global\normaloffset = -6mm
11402 % \global\bindingoffset = 10mm
11403 % @end tex
11404 \internalpagesizes{673.2pt}{160mm}% that's 51 lines
11405 {\voffset}{\hoffset}%
11406 {\bindingoffset}{44pt}%
11407 {297mm}{210mm}%
11408 %
11409 \tolerance = 700
11410 \contentsrightmargin = 0pt
11411 \defbodyindent = 5mm
11412 }}
11413
11414 % Use @afivepaper to print on European A5 paper.
11415 % From romildo@urano.iceb.ufop.br, 2 July 2000.
11416 % He also recommends making @example and @lisp be small.
11417 \def\afivepaper{{\globaldefs = 1
11418 \parskip = 2pt plus 1pt minus 0.1pt
11419 \textleading = 12.5pt
11420 %
11421 \internalpagesizes{160mm}{120mm}%
11422 {\voffset}{\hoffset}%
11423 {\bindingoffset}{8pt}%
11424 {210mm}{148mm}%
11425 %
11426 \lispnarrowing = 0.2in
11427 \tolerance = 800
11428 \contentsrightmargin = 0pt
11429 \defbodyindent = 2mm
11430 \tableindent = 12mm
11431 }}
11432
11433 % A specific text layout, 24x15cm overall, intended for A4 paper.
11434 \def\afourlatex{{\globaldefs = 1
11435 \afourpaper
11436 \internalpagesizes{237mm}{150mm}%
11437 {\voffset}{4.6mm}%
11438 {\bindingoffset}{7mm}%
11439 {297mm}{210mm}%
11440 %
11441 % Must explicitly reset to 0 because we call \afourpaper.
11442 \globaldefs = 0
11443 }}
11444
11445 % Use @afourwide to print on A4 paper in landscape format.
11446 \def\afourwide{{\globaldefs = 1
11447 \afourpaper
11448 \internalpagesizes{241mm}{165mm}%
11449 {\voffset}{-2.95mm}%
11450 {\bindingoffset}{7mm}%
11451 {297mm}{210mm}%
11452 \globaldefs = 0
11453 }}
11454
11455 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
11456 % Perhaps we should allow setting the margins, \topskip, \parskip,
11457 % and/or leading, also. Or perhaps we should compute them somehow.
11458 %
11459 \parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
11460 \def\pagesizesyyy#1,#2,#3\finish{{%
11461 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
11462 \globaldefs = 1
11463 %
11464 \parskip = 3pt plus 2pt minus 1pt
11465 \setleading{\textleading}%
11466 %
11467 \dimen0 = #1\relax
11468 \advance\dimen0 by \voffset
11469 \advance\dimen0 by 1in % reference point for DVI is 1 inch from top of page
11470 %
11471 \dimen2 = \hsize
11472 \advance\dimen2 by \normaloffset
11473 \advance\dimen2 by 1in % reference point is 1 inch from left edge of page
11474 %
11475 \internalpagesizes{#1}{\hsize}%
11476 {\voffset}{\normaloffset}%
11477 {\bindingoffset}{44pt}%
11478 {\dimen0}{\dimen2}%
11479 }}
11480
11481 % Set default to letter.
11482 %
11483 \letterpaper
11484
11485 % Default value of \hfuzz, for suppressing warnings about overfull hboxes.
11486 \hfuzz = 1pt
11487
11488
11489 \message{and turning on texinfo input format.}
11490
11491 \def^^L{\par} % remove \outer, so ^L can appear in an @comment
11492
11493 % DEL is a comment character, in case @c does not suffice.
11494 \catcode`\^^? = 14
11495
11496 % Define macros to output various characters with catcode for normal text.
11497 \catcode`\"=\other \def\normaldoublequote{"}
11498 \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
11499 \catcode`\+=\other \def\normalplus{+}
11500 \catcode`\<=\other \def\normalless{<}
11501 \catcode`\>=\other \def\normalgreater{>}
11502 \catcode`\^=\other \def\normalcaret{^}
11503 \catcode`\_=\other \def\normalunderscore{_}
11504 \catcode`\|=\other \def\normalverticalbar{|}
11505 \catcode`\~=\other \def\normaltilde{~}
11506
11507 % This macro is used to make a character print one way in \tt
11508 % (where it can probably be output as-is), and another way in other fonts,
11509 % where something hairier probably needs to be done.
11510 %
11511 % #1 is what to print if we are indeed using \tt; #2 is what to print
11512 % otherwise. Since all the Computer Modern typewriter fonts have zero
11513 % interword stretch (and shrink), and it is reasonable to expect all
11514 % typewriter fonts to have this, we can check that font parameter.
11515 %
11516 \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
11517
11518 % Same as above, but check for italic font. Actually this also catches
11519 % non-italic slanted fonts since it is impossible to distinguish them from
11520 % italic fonts. But since this is only used by $ and it uses \sl anyway
11521 % this is not a problem.
11522 \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
11523
11524 % Set catcodes for Texinfo file
11525
11526 % Active characters for printing the wanted glyph.
11527 % Most of these we simply print from the \tt font, but for some, we can
11528 % use math or other variants that look better in normal text.
11529 %
11530 \catcode`\"=\active
11531 \def\activedoublequote{{\tt\char34}}
11532 \let"=\activedoublequote
11533 \catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde
11534 \chardef\hatchar=`\^
11535 \catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat
11536
11537 \catcode`\_=\active
11538 \def_{\ifusingtt\normalunderscore\_}
11539 \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
11540 \let\realunder=_
11541
11542 \catcode`\|=\active \def|{{\tt\char124}}
11543
11544 \chardef \less=`\<
11545 \catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless
11546 \chardef \gtr=`\>
11547 \catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr
11548 \catcode`\+=\active \def+{{\tt \char 43}}
11549 \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
11550 \catcode`\-=\active \let-=\normaldash
11551
11552
11553 % used for headline/footline in the output routine, in case the page
11554 % breaks in the middle of an @tex block.
11555 \def\texinfochars{%
11556 \let< = \activeless
11557 \let> = \activegtr
11558 \let~ = \activetilde
11559 \let^ = \activehat
11560 \markupsetuplqdefault \markupsetuprqdefault
11561 \let\b = \strong
11562 \let\i = \smartitalic
11563 % in principle, all other definitions in \tex have to be undone too.
11564 }
11565
11566 % Used sometimes to turn off (effectively) the active characters even after
11567 % parsing them.
11568 \def\turnoffactive{%
11569 \normalturnoffactive
11570 \otherbackslash
11571 }
11572
11573 \catcode`\@=0
11574
11575 % \backslashcurfont outputs one backslash character in current font,
11576 % as in \char`\\.
11577 \global\chardef\backslashcurfont=`\\
11578 \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
11579
11580 % \realbackslash is an actual character `\' with catcode other, and
11581 % \doublebackslash is two of them (for the pdf outlines).
11582 {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
11583
11584 % In Texinfo, backslash is an active character; it prints the backslash
11585 % in fixed width font.
11586 \catcode`\\=\active % @ for escape char from now on.
11587
11588 % Print a typewriter backslash. For math mode, we can't simply use
11589 % \backslashcurfont: the story here is that in math mode, the \char
11590 % of \backslashcurfont ends up printing the roman \ from the math symbol
11591 % font (because \char in math mode uses the \mathcode, and plain.tex
11592 % sets \mathcode`\\="026E). Hence we use an explicit \mathchar,
11593 % which is the decimal equivalent of "715c (class 7, e.g., use \fam;
11594 % ignored family value; char position "5C). We can't use " for the
11595 % usual hex value because it has already been made active.
11596
11597 @def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
11598 @let@backslashchar = @ttbackslash % @backslashchar{} is for user documents.
11599
11600 % \rawbackslash defines an active \ to do \backslashcurfont.
11601 % \otherbackslash defines an active \ to be a literal `\' character with
11602 % catcode other. We switch back and forth between these.
11603 @gdef@rawbackslash{@let\=@backslashcurfont}
11604 @gdef@otherbackslash{@let\=@realbackslash}
11605
11606 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
11607 % the literal character `\'.
11608 %
11609 {@catcode`- = @active
11610 @gdef@normalturnoffactive{%
11611 @passthroughcharstrue
11612 @let-=@normaldash
11613 @let"=@normaldoublequote
11614 @let$=@normaldollar %$ font-lock fix
11615 @let+=@normalplus
11616 @let<=@normalless
11617 @let>=@normalgreater
11618 @let^=@normalcaret
11619 @let_=@normalunderscore
11620 @let|=@normalverticalbar
11621 @let~=@normaltilde
11622 @let\=@ttbackslash
11623 @markupsetuplqdefault
11624 @markupsetuprqdefault
11625 @unsepspaces
11626 }
11627 }
11628
11629 % If a .fmt file is being used, characters that might appear in a file
11630 % name cannot be active until we have parsed the command line.
11631 % So turn them off again, and have @fixbackslash turn them back on.
11632 @catcode`+=@other @catcode`@_=@other
11633
11634 % \enablebackslashhack - allow file to begin `\input texinfo'
11635 %
11636 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
11637 % That is what \eatinput is for; after that, the `\' should revert to printing
11638 % a backslash.
11639 % If the file did not have a `\input texinfo', then it is turned off after
11640 % the first line; otherwise the first `\' in the file would cause an error.
11641 % This is used on the very last line of this file, texinfo.tex.
11642 % We also use @c to call @fixbackslash, in case ends of lines are hidden.
11643 {
11644 @catcode`@^=7
11645 @catcode`@^^M=13@gdef@enablebackslashhack{%
11646 @global@let\ = @eatinput%
11647 @catcode`@^^M=13%
11648 @def@c{@fixbackslash@c}%
11649 % Definition for the newline at the end of this file.
11650 @def ^^M{@let^^M@secondlinenl}%
11651 % Definition for a newline in the main Texinfo file.
11652 @gdef @secondlinenl{@fixbackslash}%
11653 % In case the first line has a whole-line command on it
11654 @let@originalparsearg@parsearg
11655 @def@parsearg{@fixbackslash@originalparsearg}
11656 }}
11657
11658 {@catcode`@^=7 @catcode`@^^M=13%
11659 @gdef@eatinput input texinfo#1^^M{@fixbackslash}}
11660
11661 % Emergency active definition of newline, in case an active newline token
11662 % appears by mistake.
11663 {@catcode`@^=7 @catcode13=13%
11664 @gdef@enableemergencynewline{%
11665 @gdef^^M{%
11666 @par%
11667 %<warning: active newline>@par%
11668 }}}
11669
11670
11671 @gdef@fixbackslash{%
11672 @ifx\@eatinput @let\ = @ttbackslash @fi
11673 @catcode13=5 % regular end of line
11674 @enableemergencynewline
11675 @let@c=@texinfoc
11676 @let@parsearg@originalparsearg
11677 % Also turn back on active characters that might appear in the input
11678 % file name, in case not using a pre-dumped format.
11679 @catcode`+=@active
11680 @catcode`@_=@active
11681 %
11682 % If texinfo.cnf is present on the system, read it.
11683 % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets
11684 % called at the beginning of every Texinfo file. Not opening texinfo.cnf
11685 % directly in this file, texinfo.tex, makes it possible to make a format
11686 % file for Texinfo.
11687 %
11688 @openin 1 texinfo.cnf
11689 @ifeof 1 @else @input texinfo.cnf @fi
11690 @closein 1
11691 }
11692
11693
11694 % Say @foo, not \foo, in error messages.
11695 @escapechar = `@@
11696
11697 % These (along with & and #) are made active for url-breaking, so need
11698 % active definitions as the normal characters.
11699 @def@normaldot{.}
11700 @def@normalquest{?}
11701 @def@normalslash{/}
11702
11703 % These look ok in all fonts, so just make them not special.
11704 % @hashchar{} gets its own user-level command, because of #line.
11705 @catcode`@& = @other @def@normalamp{&}
11706 @catcode`@# = @other @def@normalhash{#}
11707 @catcode`@% = @other @def@normalpercent{%}
11708
11709 @let @hashchar = @normalhash
11710
11711 @c Finally, make ` and ' active, so that txicodequoteundirected and
11712 @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
11713 @c don't make ` and ' active, @code will not get them as active chars.
11714 @c Do this last of all since we use ` in the previous @catcode assignments.
11715 @catcode`@'=@active
11716 @catcode`@`=@active
11717 @markupsetuplqdefault
11718 @markupsetuprqdefault
11719
11720 @c Local variables:
11721 @c eval: (add-hook 'before-save-hook 'time-stamp)
11722 @c page-delimiter: "^\\\\message\\|emacs-page"
11723 @c time-stamp-start: "def\\\\texinfoversion{"
11724 @c time-stamp-format: "%:y-%02m-%02d.%02H"
11725 @c time-stamp-end: "}"
11726 @c End:
11727
11728 @c vim:sw=2:
11729
11730 @enablebackslashhack
0 #! /bin/sh
1 # Wrapper for compilers which do not understand '-c -o'.
2
3 scriptversion=2012-10-14.11; # UTC
4
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
6 # Written by Tom Tromey <tromey@cygnus.com>.
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # This file is maintained in Automake, please report
27 # bugs to <bug-automake@gnu.org> or send patches to
28 # <automake-patches@gnu.org>.
29
30 nl='
31 '
32
33 # We need space, tab and new line, in precisely that order. Quoting is
34 # there to prevent tools from complaining about whitespace usage.
35 IFS=" "" $nl"
36
37 file_conv=
38
39 # func_file_conv build_file lazy
40 # Convert a $build file to $host form and store it in $file
41 # Currently only supports Windows hosts. If the determined conversion
42 # type is listed in (the comma separated) LAZY, no conversion will
43 # take place.
44 func_file_conv ()
45 {
46 file=$1
47 case $file in
48 / | /[!/]*) # absolute file, and not a UNC file
49 if test -z "$file_conv"; then
50 # lazily determine how to convert abs files
51 case `uname -s` in
52 MINGW*)
53 file_conv=mingw
54 ;;
55 CYGWIN*)
56 file_conv=cygwin
57 ;;
58 *)
59 file_conv=wine
60 ;;
61 esac
62 fi
63 case $file_conv/,$2, in
64 *,$file_conv,*)
65 ;;
66 mingw/*)
67 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
68 ;;
69 cygwin/*)
70 file=`cygpath -m "$file" || echo "$file"`
71 ;;
72 wine/*)
73 file=`winepath -w "$file" || echo "$file"`
74 ;;
75 esac
76 ;;
77 esac
78 }
79
80 # func_cl_dashL linkdir
81 # Make cl look for libraries in LINKDIR
82 func_cl_dashL ()
83 {
84 func_file_conv "$1"
85 if test -z "$lib_path"; then
86 lib_path=$file
87 else
88 lib_path="$lib_path;$file"
89 fi
90 linker_opts="$linker_opts -LIBPATH:$file"
91 }
92
93 # func_cl_dashl library
94 # Do a library search-path lookup for cl
95 func_cl_dashl ()
96 {
97 lib=$1
98 found=no
99 save_IFS=$IFS
100 IFS=';'
101 for dir in $lib_path $LIB
102 do
103 IFS=$save_IFS
104 if $shared && test -f "$dir/$lib.dll.lib"; then
105 found=yes
106 lib=$dir/$lib.dll.lib
107 break
108 fi
109 if test -f "$dir/$lib.lib"; then
110 found=yes
111 lib=$dir/$lib.lib
112 break
113 fi
114 if test -f "$dir/lib$lib.a"; then
115 found=yes
116 lib=$dir/lib$lib.a
117 break
118 fi
119 done
120 IFS=$save_IFS
121
122 if test "$found" != yes; then
123 lib=$lib.lib
124 fi
125 }
126
127 # func_cl_wrapper cl arg...
128 # Adjust compile command to suit cl
129 func_cl_wrapper ()
130 {
131 # Assume a capable shell
132 lib_path=
133 shared=:
134 linker_opts=
135 for arg
136 do
137 if test -n "$eat"; then
138 eat=
139 else
140 case $1 in
141 -o)
142 # configure might choose to run compile as 'compile cc -o foo foo.c'.
143 eat=1
144 case $2 in
145 *.o | *.[oO][bB][jJ])
146 func_file_conv "$2"
147 set x "$@" -Fo"$file"
148 shift
149 ;;
150 *)
151 func_file_conv "$2"
152 set x "$@" -Fe"$file"
153 shift
154 ;;
155 esac
156 ;;
157 -I)
158 eat=1
159 func_file_conv "$2" mingw
160 set x "$@" -I"$file"
161 shift
162 ;;
163 -I*)
164 func_file_conv "${1#-I}" mingw
165 set x "$@" -I"$file"
166 shift
167 ;;
168 -l)
169 eat=1
170 func_cl_dashl "$2"
171 set x "$@" "$lib"
172 shift
173 ;;
174 -l*)
175 func_cl_dashl "${1#-l}"
176 set x "$@" "$lib"
177 shift
178 ;;
179 -L)
180 eat=1
181 func_cl_dashL "$2"
182 ;;
183 -L*)
184 func_cl_dashL "${1#-L}"
185 ;;
186 -static)
187 shared=false
188 ;;
189 -Wl,*)
190 arg=${1#-Wl,}
191 save_ifs="$IFS"; IFS=','
192 for flag in $arg; do
193 IFS="$save_ifs"
194 linker_opts="$linker_opts $flag"
195 done
196 IFS="$save_ifs"
197 ;;
198 -Xlinker)
199 eat=1
200 linker_opts="$linker_opts $2"
201 ;;
202 -*)
203 set x "$@" "$1"
204 shift
205 ;;
206 *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
207 func_file_conv "$1"
208 set x "$@" -Tp"$file"
209 shift
210 ;;
211 *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
212 func_file_conv "$1" mingw
213 set x "$@" "$file"
214 shift
215 ;;
216 *)
217 set x "$@" "$1"
218 shift
219 ;;
220 esac
221 fi
222 shift
223 done
224 if test -n "$linker_opts"; then
225 linker_opts="-link$linker_opts"
226 fi
227 exec "$@" $linker_opts
228 exit 1
229 }
230
231 eat=
232
233 case $1 in
234 '')
235 echo "$0: No command. Try '$0 --help' for more information." 1>&2
236 exit 1;
237 ;;
238 -h | --h*)
239 cat <<\EOF
240 Usage: compile [--help] [--version] PROGRAM [ARGS]
241
242 Wrapper for compilers which do not understand '-c -o'.
243 Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
244 arguments, and rename the output as expected.
245
246 If you are trying to build a whole package this is not the
247 right script to run: please start by reading the file 'INSTALL'.
248
249 Report bugs to <bug-automake@gnu.org>.
250 EOF
251 exit $?
252 ;;
253 -v | --v*)
254 echo "compile $scriptversion"
255 exit $?
256 ;;
257 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
258 func_cl_wrapper "$@" # Doesn't return...
259 ;;
260 esac
261
262 ofile=
263 cfile=
264
265 for arg
266 do
267 if test -n "$eat"; then
268 eat=
269 else
270 case $1 in
271 -o)
272 # configure might choose to run compile as 'compile cc -o foo foo.c'.
273 # So we strip '-o arg' only if arg is an object.
274 eat=1
275 case $2 in
276 *.o | *.obj)
277 ofile=$2
278 ;;
279 *)
280 set x "$@" -o "$2"
281 shift
282 ;;
283 esac
284 ;;
285 *.c)
286 cfile=$1
287 set x "$@" "$1"
288 shift
289 ;;
290 *)
291 set x "$@" "$1"
292 shift
293 ;;
294 esac
295 fi
296 shift
297 done
298
299 if test -z "$ofile" || test -z "$cfile"; then
300 # If no '-o' option was seen then we might have been invoked from a
301 # pattern rule where we don't need one. That is ok -- this is a
302 # normal compilation that the losing compiler can handle. If no
303 # '.c' file was seen then we are probably linking. That is also
304 # ok.
305 exec "$@"
306 fi
307
308 # Name of file we expect compiler to create.
309 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
310
311 # Create the lock directory.
312 # Note: use '[/\\:.-]' here to ensure that we don't use the same name
313 # that we are using for the .o file. Also, base the name on the expected
314 # object file name, since that is what matters with a parallel build.
315 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
316 while true; do
317 if mkdir "$lockdir" >/dev/null 2>&1; then
318 break
319 fi
320 sleep 1
321 done
322 # FIXME: race condition here if user kills between mkdir and trap.
323 trap "rmdir '$lockdir'; exit 1" 1 2 15
324
325 # Run the compile.
326 "$@"
327 ret=$?
328
329 if test -f "$cofile"; then
330 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
331 elif test -f "${cofile}bj"; then
332 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
333 fi
334
335 rmdir "$lockdir"
336 exit $ret
337
338 # Local Variables:
339 # mode: shell-script
340 # sh-indentation: 2
341 # eval: (add-hook 'write-file-hooks 'time-stamp)
342 # time-stamp-start: "scriptversion="
343 # time-stamp-format: "%:y-%02m-%02d.%02H"
344 # time-stamp-time-zone: "UTC"
345 # time-stamp-end: "; # UTC"
346 # End:
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-08-20'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25 #
26 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
27 #
28 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
30 #
31 # Please send patches to <config-patches@gnu.org>.
32
33
34 me=`echo "$0" | sed -e 's,.*/,,'`
35
36 usage="\
37 Usage: $0 [OPTION]
38
39 Output the configuration name of the system \`$me' is run on.
40
41 Operation modes:
42 -h, --help print this help, then exit
43 -t, --time-stamp print date of last modification, then exit
44 -v, --version print version number, then exit
45
46 Report bugs and patches to <config-patches@gnu.org>."
47
48 version="\
49 GNU config.guess ($timestamp)
50
51 Originally written by Per Bothner.
52 Copyright 1992-2015 Free Software Foundation, Inc.
53
54 This is free software; see the source for copying conditions. There is NO
55 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
56
57 help="
58 Try \`$me --help' for more information."
59
60 # Parse command line
61 while test $# -gt 0 ; do
62 case $1 in
63 --time-stamp | --time* | -t )
64 echo "$timestamp" ; exit ;;
65 --version | -v )
66 echo "$version" ; exit ;;
67 --help | --h* | -h )
68 echo "$usage"; exit ;;
69 -- ) # Stop option processing
70 shift; break ;;
71 - ) # Use stdin as input.
72 break ;;
73 -* )
74 echo "$me: invalid option $1$help" >&2
75 exit 1 ;;
76 * )
77 break ;;
78 esac
79 done
80
81 if test $# != 0; then
82 echo "$me: too many arguments$help" >&2
83 exit 1
84 fi
85
86 trap 'exit 1' 1 2 15
87
88 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
89 # compiler to aid in system detection is discouraged as it requires
90 # temporary files to be created and, as you can see below, it is a
91 # headache to deal with in a portable fashion.
92
93 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
94 # use `HOST_CC' if defined, but it is deprecated.
95
96 # Portable tmp directory creation inspired by the Autoconf team.
97
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
122
123 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
124 # (ghazi@noc.rutgers.edu 1994-08-24)
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
126 PATH=$PATH:/.attbin ; export PATH
127 fi
128
129 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
130 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133
134 case "${UNAME_SYSTEM}" in
135 Linux|GNU|GNU/*)
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
142 #include <features.h>
143 #if defined(__UCLIBC__)
144 LIBC=uclibc
145 #elif defined(__dietlibc__)
146 LIBC=dietlibc
147 #else
148 LIBC=gnu
149 #endif
150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
152 ;;
153 esac
154
155 # Note: order is significant - the case branches are not exclusive.
156
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
158 *:NetBSD:*:*)
159 # NetBSD (nbsd) targets should (where applicable) match one or
160 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
161 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
162 # switched to ELF, *-*-netbsd* would select the old
163 # object file format. This provides both forward
164 # compatibility and a consistent mechanism for selecting the
165 # object file format.
166 #
167 # Note: NetBSD doesn't particularly care about the vendor
168 # portion of the name. We always set it to "unknown".
169 sysctl="sysctl -n hw.machine_arch"
170 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
171 /sbin/$sysctl 2>/dev/null || \
172 /usr/sbin/$sysctl 2>/dev/null || \
173 echo unknown)`
174 case "${UNAME_MACHINE_ARCH}" in
175 armeb) machine=armeb-unknown ;;
176 arm*) machine=arm-unknown ;;
177 sh3el) machine=shl-unknown ;;
178 sh3eb) machine=sh-unknown ;;
179 sh5el) machine=sh5le-unknown ;;
180 earmv*)
181 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
182 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
183 machine=${arch}${endian}-unknown
184 ;;
185 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
186 esac
187 # The Operating System including object format, if it has switched
188 # to ELF recently, or will in the future.
189 case "${UNAME_MACHINE_ARCH}" in
190 arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
191 eval $set_cc_for_build
192 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
193 | grep -q __ELF__
194 then
195 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
196 # Return netbsd for either. FIX?
197 os=netbsd
198 else
199 os=netbsdelf
200 fi
201 ;;
202 *)
203 os=netbsd
204 ;;
205 esac
206 # Determine ABI tags.
207 case "${UNAME_MACHINE_ARCH}" in
208 earm*)
209 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
210 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
211 ;;
212 esac
213 # The OS release
214 # Debian GNU/NetBSD machines have a different userland, and
215 # thus, need a distinct triplet. However, they do not need
216 # kernel version information, so it can be replaced with a
217 # suitable tag, in the style of linux-gnu.
218 case "${UNAME_VERSION}" in
219 Debian*)
220 release='-gnu'
221 ;;
222 *)
223 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
224 ;;
225 esac
226 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
227 # contains redundant information, the shorter form:
228 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
229 echo "${machine}-${os}${release}${abi}"
230 exit ;;
231 *:Bitrig:*:*)
232 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
233 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
234 exit ;;
235 *:OpenBSD:*:*)
236 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
237 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
238 exit ;;
239 *:ekkoBSD:*:*)
240 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
241 exit ;;
242 *:SolidBSD:*:*)
243 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
244 exit ;;
245 macppc:MirBSD:*:*)
246 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
247 exit ;;
248 *:MirBSD:*:*)
249 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
250 exit ;;
251 *:Sortix:*:*)
252 echo ${UNAME_MACHINE}-unknown-sortix
253 exit ;;
254 alpha:OSF1:*:*)
255 case $UNAME_RELEASE in
256 *4.0)
257 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
258 ;;
259 *5.*)
260 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
261 ;;
262 esac
263 # According to Compaq, /usr/sbin/psrinfo has been available on
264 # OSF/1 and Tru64 systems produced since 1995. I hope that
265 # covers most systems running today. This code pipes the CPU
266 # types through head -n 1, so we only detect the type of CPU 0.
267 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
268 case "$ALPHA_CPU_TYPE" in
269 "EV4 (21064)")
270 UNAME_MACHINE="alpha" ;;
271 "EV4.5 (21064)")
272 UNAME_MACHINE="alpha" ;;
273 "LCA4 (21066/21068)")
274 UNAME_MACHINE="alpha" ;;
275 "EV5 (21164)")
276 UNAME_MACHINE="alphaev5" ;;
277 "EV5.6 (21164A)")
278 UNAME_MACHINE="alphaev56" ;;
279 "EV5.6 (21164PC)")
280 UNAME_MACHINE="alphapca56" ;;
281 "EV5.7 (21164PC)")
282 UNAME_MACHINE="alphapca57" ;;
283 "EV6 (21264)")
284 UNAME_MACHINE="alphaev6" ;;
285 "EV6.7 (21264A)")
286 UNAME_MACHINE="alphaev67" ;;
287 "EV6.8CB (21264C)")
288 UNAME_MACHINE="alphaev68" ;;
289 "EV6.8AL (21264B)")
290 UNAME_MACHINE="alphaev68" ;;
291 "EV6.8CX (21264D)")
292 UNAME_MACHINE="alphaev68" ;;
293 "EV6.9A (21264/EV69A)")
294 UNAME_MACHINE="alphaev69" ;;
295 "EV7 (21364)")
296 UNAME_MACHINE="alphaev7" ;;
297 "EV7.9 (21364A)")
298 UNAME_MACHINE="alphaev79" ;;
299 esac
300 # A Pn.n version is a patched version.
301 # A Vn.n version is a released version.
302 # A Tn.n version is a released field test version.
303 # A Xn.n version is an unreleased experimental baselevel.
304 # 1.2 uses "1.2" for uname -r.
305 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
306 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
307 exitcode=$?
308 trap '' 0
309 exit $exitcode ;;
310 Alpha\ *:Windows_NT*:*)
311 # How do we know it's Interix rather than the generic POSIX subsystem?
312 # Should we change UNAME_MACHINE based on the output of uname instead
313 # of the specific Alpha model?
314 echo alpha-pc-interix
315 exit ;;
316 21064:Windows_NT:50:3)
317 echo alpha-dec-winnt3.5
318 exit ;;
319 Amiga*:UNIX_System_V:4.0:*)
320 echo m68k-unknown-sysv4
321 exit ;;
322 *:[Aa]miga[Oo][Ss]:*:*)
323 echo ${UNAME_MACHINE}-unknown-amigaos
324 exit ;;
325 *:[Mm]orph[Oo][Ss]:*:*)
326 echo ${UNAME_MACHINE}-unknown-morphos
327 exit ;;
328 *:OS/390:*:*)
329 echo i370-ibm-openedition
330 exit ;;
331 *:z/VM:*:*)
332 echo s390-ibm-zvmoe
333 exit ;;
334 *:OS400:*:*)
335 echo powerpc-ibm-os400
336 exit ;;
337 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
338 echo arm-acorn-riscix${UNAME_RELEASE}
339 exit ;;
340 arm*:riscos:*:*|arm*:RISCOS:*:*)
341 echo arm-unknown-riscos
342 exit ;;
343 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
344 echo hppa1.1-hitachi-hiuxmpp
345 exit ;;
346 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
347 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
348 if test "`(/bin/universe) 2>/dev/null`" = att ; then
349 echo pyramid-pyramid-sysv3
350 else
351 echo pyramid-pyramid-bsd
352 fi
353 exit ;;
354 NILE*:*:*:dcosx)
355 echo pyramid-pyramid-svr4
356 exit ;;
357 DRS?6000:unix:4.0:6*)
358 echo sparc-icl-nx6
359 exit ;;
360 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
361 case `/usr/bin/uname -p` in
362 sparc) echo sparc-icl-nx7; exit ;;
363 esac ;;
364 s390x:SunOS:*:*)
365 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
366 exit ;;
367 sun4H:SunOS:5.*:*)
368 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
369 exit ;;
370 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
371 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
372 exit ;;
373 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
374 echo i386-pc-auroraux${UNAME_RELEASE}
375 exit ;;
376 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
377 eval $set_cc_for_build
378 SUN_ARCH="i386"
379 # If there is a compiler, see if it is configured for 64-bit objects.
380 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
381 # This test works for both compilers.
382 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
383 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
384 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
385 grep IS_64BIT_ARCH >/dev/null
386 then
387 SUN_ARCH="x86_64"
388 fi
389 fi
390 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
391 exit ;;
392 sun4*:SunOS:6*:*)
393 # According to config.sub, this is the proper way to canonicalize
394 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
395 # it's likely to be more like Solaris than SunOS4.
396 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
397 exit ;;
398 sun4*:SunOS:*:*)
399 case "`/usr/bin/arch -k`" in
400 Series*|S4*)
401 UNAME_RELEASE=`uname -v`
402 ;;
403 esac
404 # Japanese Language versions have a version number like `4.1.3-JL'.
405 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
406 exit ;;
407 sun3*:SunOS:*:*)
408 echo m68k-sun-sunos${UNAME_RELEASE}
409 exit ;;
410 sun*:*:4.2BSD:*)
411 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
412 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
413 case "`/bin/arch`" in
414 sun3)
415 echo m68k-sun-sunos${UNAME_RELEASE}
416 ;;
417 sun4)
418 echo sparc-sun-sunos${UNAME_RELEASE}
419 ;;
420 esac
421 exit ;;
422 aushp:SunOS:*:*)
423 echo sparc-auspex-sunos${UNAME_RELEASE}
424 exit ;;
425 # The situation for MiNT is a little confusing. The machine name
426 # can be virtually everything (everything which is not
427 # "atarist" or "atariste" at least should have a processor
428 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
429 # to the lowercase version "mint" (or "freemint"). Finally
430 # the system name "TOS" denotes a system which is actually not
431 # MiNT. But MiNT is downward compatible to TOS, so this should
432 # be no problem.
433 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
434 echo m68k-atari-mint${UNAME_RELEASE}
435 exit ;;
436 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
437 echo m68k-atari-mint${UNAME_RELEASE}
438 exit ;;
439 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
440 echo m68k-atari-mint${UNAME_RELEASE}
441 exit ;;
442 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
443 echo m68k-milan-mint${UNAME_RELEASE}
444 exit ;;
445 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
446 echo m68k-hades-mint${UNAME_RELEASE}
447 exit ;;
448 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
449 echo m68k-unknown-mint${UNAME_RELEASE}
450 exit ;;
451 m68k:machten:*:*)
452 echo m68k-apple-machten${UNAME_RELEASE}
453 exit ;;
454 powerpc:machten:*:*)
455 echo powerpc-apple-machten${UNAME_RELEASE}
456 exit ;;
457 RISC*:Mach:*:*)
458 echo mips-dec-mach_bsd4.3
459 exit ;;
460 RISC*:ULTRIX:*:*)
461 echo mips-dec-ultrix${UNAME_RELEASE}
462 exit ;;
463 VAX*:ULTRIX*:*:*)
464 echo vax-dec-ultrix${UNAME_RELEASE}
465 exit ;;
466 2020:CLIX:*:* | 2430:CLIX:*:*)
467 echo clipper-intergraph-clix${UNAME_RELEASE}
468 exit ;;
469 mips:*:*:UMIPS | mips:*:*:RISCos)
470 eval $set_cc_for_build
471 sed 's/^ //' << EOF >$dummy.c
472 #ifdef __cplusplus
473 #include <stdio.h> /* for printf() prototype */
474 int main (int argc, char *argv[]) {
475 #else
476 int main (argc, argv) int argc; char *argv[]; {
477 #endif
478 #if defined (host_mips) && defined (MIPSEB)
479 #if defined (SYSTYPE_SYSV)
480 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
481 #endif
482 #if defined (SYSTYPE_SVR4)
483 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
484 #endif
485 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
486 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
487 #endif
488 #endif
489 exit (-1);
490 }
491 EOF
492 $CC_FOR_BUILD -o $dummy $dummy.c &&
493 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
494 SYSTEM_NAME=`$dummy $dummyarg` &&
495 { echo "$SYSTEM_NAME"; exit; }
496 echo mips-mips-riscos${UNAME_RELEASE}
497 exit ;;
498 Motorola:PowerMAX_OS:*:*)
499 echo powerpc-motorola-powermax
500 exit ;;
501 Motorola:*:4.3:PL8-*)
502 echo powerpc-harris-powermax
503 exit ;;
504 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
505 echo powerpc-harris-powermax
506 exit ;;
507 Night_Hawk:Power_UNIX:*:*)
508 echo powerpc-harris-powerunix
509 exit ;;
510 m88k:CX/UX:7*:*)
511 echo m88k-harris-cxux7
512 exit ;;
513 m88k:*:4*:R4*)
514 echo m88k-motorola-sysv4
515 exit ;;
516 m88k:*:3*:R3*)
517 echo m88k-motorola-sysv3
518 exit ;;
519 AViiON:dgux:*:*)
520 # DG/UX returns AViiON for all architectures
521 UNAME_PROCESSOR=`/usr/bin/uname -p`
522 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
523 then
524 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
525 [ ${TARGET_BINARY_INTERFACE}x = x ]
526 then
527 echo m88k-dg-dgux${UNAME_RELEASE}
528 else
529 echo m88k-dg-dguxbcs${UNAME_RELEASE}
530 fi
531 else
532 echo i586-dg-dgux${UNAME_RELEASE}
533 fi
534 exit ;;
535 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
536 echo m88k-dolphin-sysv3
537 exit ;;
538 M88*:*:R3*:*)
539 # Delta 88k system running SVR3
540 echo m88k-motorola-sysv3
541 exit ;;
542 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
543 echo m88k-tektronix-sysv3
544 exit ;;
545 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
546 echo m68k-tektronix-bsd
547 exit ;;
548 *:IRIX*:*:*)
549 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
550 exit ;;
551 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
552 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
553 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
554 i*86:AIX:*:*)
555 echo i386-ibm-aix
556 exit ;;
557 ia64:AIX:*:*)
558 if [ -x /usr/bin/oslevel ] ; then
559 IBM_REV=`/usr/bin/oslevel`
560 else
561 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
562 fi
563 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
564 exit ;;
565 *:AIX:2:3)
566 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
567 eval $set_cc_for_build
568 sed 's/^ //' << EOF >$dummy.c
569 #include <sys/systemcfg.h>
570
571 main()
572 {
573 if (!__power_pc())
574 exit(1);
575 puts("powerpc-ibm-aix3.2.5");
576 exit(0);
577 }
578 EOF
579 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
580 then
581 echo "$SYSTEM_NAME"
582 else
583 echo rs6000-ibm-aix3.2.5
584 fi
585 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
586 echo rs6000-ibm-aix3.2.4
587 else
588 echo rs6000-ibm-aix3.2
589 fi
590 exit ;;
591 *:AIX:*:[4567])
592 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
593 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
594 IBM_ARCH=rs6000
595 else
596 IBM_ARCH=powerpc
597 fi
598 if [ -x /usr/bin/lslpp ] ; then
599 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
600 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
601 else
602 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
603 fi
604 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
605 exit ;;
606 *:AIX:*:*)
607 echo rs6000-ibm-aix
608 exit ;;
609 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
610 echo romp-ibm-bsd4.4
611 exit ;;
612 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
613 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
614 exit ;; # report: romp-ibm BSD 4.3
615 *:BOSX:*:*)
616 echo rs6000-bull-bosx
617 exit ;;
618 DPX/2?00:B.O.S.:*:*)
619 echo m68k-bull-sysv3
620 exit ;;
621 9000/[34]??:4.3bsd:1.*:*)
622 echo m68k-hp-bsd
623 exit ;;
624 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
625 echo m68k-hp-bsd4.4
626 exit ;;
627 9000/[34678]??:HP-UX:*:*)
628 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
629 case "${UNAME_MACHINE}" in
630 9000/31? ) HP_ARCH=m68000 ;;
631 9000/[34]?? ) HP_ARCH=m68k ;;
632 9000/[678][0-9][0-9])
633 if [ -x /usr/bin/getconf ]; then
634 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
635 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
636 case "${sc_cpu_version}" in
637 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
638 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
639 532) # CPU_PA_RISC2_0
640 case "${sc_kernel_bits}" in
641 32) HP_ARCH="hppa2.0n" ;;
642 64) HP_ARCH="hppa2.0w" ;;
643 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
644 esac ;;
645 esac
646 fi
647 if [ "${HP_ARCH}" = "" ]; then
648 eval $set_cc_for_build
649 sed 's/^ //' << EOF >$dummy.c
650
651 #define _HPUX_SOURCE
652 #include <stdlib.h>
653 #include <unistd.h>
654
655 int main ()
656 {
657 #if defined(_SC_KERNEL_BITS)
658 long bits = sysconf(_SC_KERNEL_BITS);
659 #endif
660 long cpu = sysconf (_SC_CPU_VERSION);
661
662 switch (cpu)
663 {
664 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
665 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
666 case CPU_PA_RISC2_0:
667 #if defined(_SC_KERNEL_BITS)
668 switch (bits)
669 {
670 case 64: puts ("hppa2.0w"); break;
671 case 32: puts ("hppa2.0n"); break;
672 default: puts ("hppa2.0"); break;
673 } break;
674 #else /* !defined(_SC_KERNEL_BITS) */
675 puts ("hppa2.0"); break;
676 #endif
677 default: puts ("hppa1.0"); break;
678 }
679 exit (0);
680 }
681 EOF
682 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
683 test -z "$HP_ARCH" && HP_ARCH=hppa
684 fi ;;
685 esac
686 if [ ${HP_ARCH} = "hppa2.0w" ]
687 then
688 eval $set_cc_for_build
689
690 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
691 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
692 # generating 64-bit code. GNU and HP use different nomenclature:
693 #
694 # $ CC_FOR_BUILD=cc ./config.guess
695 # => hppa2.0w-hp-hpux11.23
696 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
697 # => hppa64-hp-hpux11.23
698
699 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
700 grep -q __LP64__
701 then
702 HP_ARCH="hppa2.0w"
703 else
704 HP_ARCH="hppa64"
705 fi
706 fi
707 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
708 exit ;;
709 ia64:HP-UX:*:*)
710 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
711 echo ia64-hp-hpux${HPUX_REV}
712 exit ;;
713 3050*:HI-UX:*:*)
714 eval $set_cc_for_build
715 sed 's/^ //' << EOF >$dummy.c
716 #include <unistd.h>
717 int
718 main ()
719 {
720 long cpu = sysconf (_SC_CPU_VERSION);
721 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
722 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
723 results, however. */
724 if (CPU_IS_PA_RISC (cpu))
725 {
726 switch (cpu)
727 {
728 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
729 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
730 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
731 default: puts ("hppa-hitachi-hiuxwe2"); break;
732 }
733 }
734 else if (CPU_IS_HP_MC68K (cpu))
735 puts ("m68k-hitachi-hiuxwe2");
736 else puts ("unknown-hitachi-hiuxwe2");
737 exit (0);
738 }
739 EOF
740 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
741 { echo "$SYSTEM_NAME"; exit; }
742 echo unknown-hitachi-hiuxwe2
743 exit ;;
744 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
745 echo hppa1.1-hp-bsd
746 exit ;;
747 9000/8??:4.3bsd:*:*)
748 echo hppa1.0-hp-bsd
749 exit ;;
750 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
751 echo hppa1.0-hp-mpeix
752 exit ;;
753 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
754 echo hppa1.1-hp-osf
755 exit ;;
756 hp8??:OSF1:*:*)
757 echo hppa1.0-hp-osf
758 exit ;;
759 i*86:OSF1:*:*)
760 if [ -x /usr/sbin/sysversion ] ; then
761 echo ${UNAME_MACHINE}-unknown-osf1mk
762 else
763 echo ${UNAME_MACHINE}-unknown-osf1
764 fi
765 exit ;;
766 parisc*:Lites*:*:*)
767 echo hppa1.1-hp-lites
768 exit ;;
769 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
770 echo c1-convex-bsd
771 exit ;;
772 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
773 if getsysinfo -f scalar_acc
774 then echo c32-convex-bsd
775 else echo c2-convex-bsd
776 fi
777 exit ;;
778 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
779 echo c34-convex-bsd
780 exit ;;
781 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
782 echo c38-convex-bsd
783 exit ;;
784 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
785 echo c4-convex-bsd
786 exit ;;
787 CRAY*Y-MP:*:*:*)
788 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
789 exit ;;
790 CRAY*[A-Z]90:*:*:*)
791 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
792 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
793 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
794 -e 's/\.[^.]*$/.X/'
795 exit ;;
796 CRAY*TS:*:*:*)
797 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
798 exit ;;
799 CRAY*T3E:*:*:*)
800 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
801 exit ;;
802 CRAY*SV1:*:*:*)
803 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
804 exit ;;
805 *:UNICOS/mp:*:*)
806 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
807 exit ;;
808 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
809 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
810 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
811 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
812 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
813 exit ;;
814 5000:UNIX_System_V:4.*:*)
815 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
816 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
817 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
818 exit ;;
819 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
820 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
821 exit ;;
822 sparc*:BSD/OS:*:*)
823 echo sparc-unknown-bsdi${UNAME_RELEASE}
824 exit ;;
825 *:BSD/OS:*:*)
826 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
827 exit ;;
828 *:FreeBSD:*:*)
829 UNAME_PROCESSOR=`/usr/bin/uname -p`
830 case ${UNAME_PROCESSOR} in
831 amd64)
832 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
833 *)
834 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
835 esac
836 exit ;;
837 i*:CYGWIN*:*)
838 echo ${UNAME_MACHINE}-pc-cygwin
839 exit ;;
840 *:MINGW64*:*)
841 echo ${UNAME_MACHINE}-pc-mingw64
842 exit ;;
843 *:MINGW*:*)
844 echo ${UNAME_MACHINE}-pc-mingw32
845 exit ;;
846 *:MSYS*:*)
847 echo ${UNAME_MACHINE}-pc-msys
848 exit ;;
849 i*:windows32*:*)
850 # uname -m includes "-pc" on this system.
851 echo ${UNAME_MACHINE}-mingw32
852 exit ;;
853 i*:PW*:*)
854 echo ${UNAME_MACHINE}-pc-pw32
855 exit ;;
856 *:Interix*:*)
857 case ${UNAME_MACHINE} in
858 x86)
859 echo i586-pc-interix${UNAME_RELEASE}
860 exit ;;
861 authenticamd | genuineintel | EM64T)
862 echo x86_64-unknown-interix${UNAME_RELEASE}
863 exit ;;
864 IA64)
865 echo ia64-unknown-interix${UNAME_RELEASE}
866 exit ;;
867 esac ;;
868 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
869 echo i${UNAME_MACHINE}-pc-mks
870 exit ;;
871 8664:Windows_NT:*)
872 echo x86_64-pc-mks
873 exit ;;
874 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
875 # How do we know it's Interix rather than the generic POSIX subsystem?
876 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
877 # UNAME_MACHINE based on the output of uname instead of i386?
878 echo i586-pc-interix
879 exit ;;
880 i*:UWIN*:*)
881 echo ${UNAME_MACHINE}-pc-uwin
882 exit ;;
883 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
884 echo x86_64-unknown-cygwin
885 exit ;;
886 p*:CYGWIN*:*)
887 echo powerpcle-unknown-cygwin
888 exit ;;
889 prep*:SunOS:5.*:*)
890 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
891 exit ;;
892 *:GNU:*:*)
893 # the GNU system
894 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
895 exit ;;
896 *:GNU/*:*:*)
897 # other systems with GNU libc and userland
898 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
899 exit ;;
900 i*86:Minix:*:*)
901 echo ${UNAME_MACHINE}-pc-minix
902 exit ;;
903 aarch64:Linux:*:*)
904 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
905 exit ;;
906 aarch64_be:Linux:*:*)
907 UNAME_MACHINE=aarch64_be
908 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
909 exit ;;
910 alpha:Linux:*:*)
911 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
912 EV5) UNAME_MACHINE=alphaev5 ;;
913 EV56) UNAME_MACHINE=alphaev56 ;;
914 PCA56) UNAME_MACHINE=alphapca56 ;;
915 PCA57) UNAME_MACHINE=alphapca56 ;;
916 EV6) UNAME_MACHINE=alphaev6 ;;
917 EV67) UNAME_MACHINE=alphaev67 ;;
918 EV68*) UNAME_MACHINE=alphaev68 ;;
919 esac
920 objdump --private-headers /bin/sh | grep -q ld.so.1
921 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
922 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
923 exit ;;
924 arc:Linux:*:* | arceb:Linux:*:*)
925 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
926 exit ;;
927 arm*:Linux:*:*)
928 eval $set_cc_for_build
929 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
930 | grep -q __ARM_EABI__
931 then
932 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
933 else
934 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
935 | grep -q __ARM_PCS_VFP
936 then
937 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
938 else
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
940 fi
941 fi
942 exit ;;
943 avr32*:Linux:*:*)
944 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
945 exit ;;
946 cris:Linux:*:*)
947 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
948 exit ;;
949 crisv32:Linux:*:*)
950 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
951 exit ;;
952 e2k:Linux:*:*)
953 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
954 exit ;;
955 frv:Linux:*:*)
956 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
957 exit ;;
958 hexagon:Linux:*:*)
959 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
960 exit ;;
961 i*86:Linux:*:*)
962 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
963 exit ;;
964 ia64:Linux:*:*)
965 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
966 exit ;;
967 m32r*:Linux:*:*)
968 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
969 exit ;;
970 m68*:Linux:*:*)
971 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
972 exit ;;
973 mips:Linux:*:* | mips64:Linux:*:*)
974 eval $set_cc_for_build
975 sed 's/^ //' << EOF >$dummy.c
976 #undef CPU
977 #undef ${UNAME_MACHINE}
978 #undef ${UNAME_MACHINE}el
979 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
980 CPU=${UNAME_MACHINE}el
981 #else
982 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
983 CPU=${UNAME_MACHINE}
984 #else
985 CPU=
986 #endif
987 #endif
988 EOF
989 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
990 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
991 ;;
992 openrisc*:Linux:*:*)
993 echo or1k-unknown-linux-${LIBC}
994 exit ;;
995 or32:Linux:*:* | or1k*:Linux:*:*)
996 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
997 exit ;;
998 padre:Linux:*:*)
999 echo sparc-unknown-linux-${LIBC}
1000 exit ;;
1001 parisc64:Linux:*:* | hppa64:Linux:*:*)
1002 echo hppa64-unknown-linux-${LIBC}
1003 exit ;;
1004 parisc:Linux:*:* | hppa:Linux:*:*)
1005 # Look for CPU level
1006 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1007 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1008 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1009 *) echo hppa-unknown-linux-${LIBC} ;;
1010 esac
1011 exit ;;
1012 ppc64:Linux:*:*)
1013 echo powerpc64-unknown-linux-${LIBC}
1014 exit ;;
1015 ppc:Linux:*:*)
1016 echo powerpc-unknown-linux-${LIBC}
1017 exit ;;
1018 ppc64le:Linux:*:*)
1019 echo powerpc64le-unknown-linux-${LIBC}
1020 exit ;;
1021 ppcle:Linux:*:*)
1022 echo powerpcle-unknown-linux-${LIBC}
1023 exit ;;
1024 s390:Linux:*:* | s390x:Linux:*:*)
1025 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1026 exit ;;
1027 sh64*:Linux:*:*)
1028 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1029 exit ;;
1030 sh*:Linux:*:*)
1031 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1032 exit ;;
1033 sparc:Linux:*:* | sparc64:Linux:*:*)
1034 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1035 exit ;;
1036 tile*:Linux:*:*)
1037 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1038 exit ;;
1039 vax:Linux:*:*)
1040 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1041 exit ;;
1042 x86_64:Linux:*:*)
1043 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
1044 exit ;;
1045 xtensa*:Linux:*:*)
1046 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1047 exit ;;
1048 i*86:DYNIX/ptx:4*:*)
1049 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1050 # earlier versions are messed up and put the nodename in both
1051 # sysname and nodename.
1052 echo i386-sequent-sysv4
1053 exit ;;
1054 i*86:UNIX_SV:4.2MP:2.*)
1055 # Unixware is an offshoot of SVR4, but it has its own version
1056 # number series starting with 2...
1057 # I am not positive that other SVR4 systems won't match this,
1058 # I just have to hope. -- rms.
1059 # Use sysv4.2uw... so that sysv4* matches it.
1060 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1061 exit ;;
1062 i*86:OS/2:*:*)
1063 # If we were able to find `uname', then EMX Unix compatibility
1064 # is probably installed.
1065 echo ${UNAME_MACHINE}-pc-os2-emx
1066 exit ;;
1067 i*86:XTS-300:*:STOP)
1068 echo ${UNAME_MACHINE}-unknown-stop
1069 exit ;;
1070 i*86:atheos:*:*)
1071 echo ${UNAME_MACHINE}-unknown-atheos
1072 exit ;;
1073 i*86:syllable:*:*)
1074 echo ${UNAME_MACHINE}-pc-syllable
1075 exit ;;
1076 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1077 echo i386-unknown-lynxos${UNAME_RELEASE}
1078 exit ;;
1079 i*86:*DOS:*:*)
1080 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1081 exit ;;
1082 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1083 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1084 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1085 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1086 else
1087 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1088 fi
1089 exit ;;
1090 i*86:*:5:[678]*)
1091 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1092 case `/bin/uname -X | grep "^Machine"` in
1093 *486*) UNAME_MACHINE=i486 ;;
1094 *Pentium) UNAME_MACHINE=i586 ;;
1095 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1096 esac
1097 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1098 exit ;;
1099 i*86:*:3.2:*)
1100 if test -f /usr/options/cb.name; then
1101 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1102 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1103 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1104 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1105 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1106 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1107 && UNAME_MACHINE=i586
1108 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1109 && UNAME_MACHINE=i686
1110 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1111 && UNAME_MACHINE=i686
1112 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1113 else
1114 echo ${UNAME_MACHINE}-pc-sysv32
1115 fi
1116 exit ;;
1117 pc:*:*:*)
1118 # Left here for compatibility:
1119 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1120 # the processor, so we play safe by assuming i586.
1121 # Note: whatever this is, it MUST be the same as what config.sub
1122 # prints for the "djgpp" host, or else GDB configury will decide that
1123 # this is a cross-build.
1124 echo i586-pc-msdosdjgpp
1125 exit ;;
1126 Intel:Mach:3*:*)
1127 echo i386-pc-mach3
1128 exit ;;
1129 paragon:*:*:*)
1130 echo i860-intel-osf1
1131 exit ;;
1132 i860:*:4.*:*) # i860-SVR4
1133 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1134 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1135 else # Add other i860-SVR4 vendors below as they are discovered.
1136 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1137 fi
1138 exit ;;
1139 mini*:CTIX:SYS*5:*)
1140 # "miniframe"
1141 echo m68010-convergent-sysv
1142 exit ;;
1143 mc68k:UNIX:SYSTEM5:3.51m)
1144 echo m68k-convergent-sysv
1145 exit ;;
1146 M680?0:D-NIX:5.3:*)
1147 echo m68k-diab-dnix
1148 exit ;;
1149 M68*:*:R3V[5678]*:*)
1150 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1151 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)
1152 OS_REL=''
1153 test -r /etc/.relid \
1154 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1155 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1156 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1157 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1158 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1159 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1160 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1161 && { echo i486-ncr-sysv4; exit; } ;;
1162 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1163 OS_REL='.3'
1164 test -r /etc/.relid \
1165 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1166 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1167 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1168 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1169 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1170 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1171 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1172 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1173 echo m68k-unknown-lynxos${UNAME_RELEASE}
1174 exit ;;
1175 mc68030:UNIX_System_V:4.*:*)
1176 echo m68k-atari-sysv4
1177 exit ;;
1178 TSUNAMI:LynxOS:2.*:*)
1179 echo sparc-unknown-lynxos${UNAME_RELEASE}
1180 exit ;;
1181 rs6000:LynxOS:2.*:*)
1182 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1183 exit ;;
1184 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1185 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1186 exit ;;
1187 SM[BE]S:UNIX_SV:*:*)
1188 echo mips-dde-sysv${UNAME_RELEASE}
1189 exit ;;
1190 RM*:ReliantUNIX-*:*:*)
1191 echo mips-sni-sysv4
1192 exit ;;
1193 RM*:SINIX-*:*:*)
1194 echo mips-sni-sysv4
1195 exit ;;
1196 *:SINIX-*:*:*)
1197 if uname -p 2>/dev/null >/dev/null ; then
1198 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1199 echo ${UNAME_MACHINE}-sni-sysv4
1200 else
1201 echo ns32k-sni-sysv
1202 fi
1203 exit ;;
1204 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1205 # says <Richard.M.Bartel@ccMail.Census.GOV>
1206 echo i586-unisys-sysv4
1207 exit ;;
1208 *:UNIX_System_V:4*:FTX*)
1209 # From Gerald Hewes <hewes@openmarket.com>.
1210 # How about differentiating between stratus architectures? -djm
1211 echo hppa1.1-stratus-sysv4
1212 exit ;;
1213 *:*:*:FTX*)
1214 # From seanf@swdc.stratus.com.
1215 echo i860-stratus-sysv4
1216 exit ;;
1217 i*86:VOS:*:*)
1218 # From Paul.Green@stratus.com.
1219 echo ${UNAME_MACHINE}-stratus-vos
1220 exit ;;
1221 *:VOS:*:*)
1222 # From Paul.Green@stratus.com.
1223 echo hppa1.1-stratus-vos
1224 exit ;;
1225 mc68*:A/UX:*:*)
1226 echo m68k-apple-aux${UNAME_RELEASE}
1227 exit ;;
1228 news*:NEWS-OS:6*:*)
1229 echo mips-sony-newsos6
1230 exit ;;
1231 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1232 if [ -d /usr/nec ]; then
1233 echo mips-nec-sysv${UNAME_RELEASE}
1234 else
1235 echo mips-unknown-sysv${UNAME_RELEASE}
1236 fi
1237 exit ;;
1238 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1239 echo powerpc-be-beos
1240 exit ;;
1241 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1242 echo powerpc-apple-beos
1243 exit ;;
1244 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1245 echo i586-pc-beos
1246 exit ;;
1247 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1248 echo i586-pc-haiku
1249 exit ;;
1250 x86_64:Haiku:*:*)
1251 echo x86_64-unknown-haiku
1252 exit ;;
1253 SX-4:SUPER-UX:*:*)
1254 echo sx4-nec-superux${UNAME_RELEASE}
1255 exit ;;
1256 SX-5:SUPER-UX:*:*)
1257 echo sx5-nec-superux${UNAME_RELEASE}
1258 exit ;;
1259 SX-6:SUPER-UX:*:*)
1260 echo sx6-nec-superux${UNAME_RELEASE}
1261 exit ;;
1262 SX-7:SUPER-UX:*:*)
1263 echo sx7-nec-superux${UNAME_RELEASE}
1264 exit ;;
1265 SX-8:SUPER-UX:*:*)
1266 echo sx8-nec-superux${UNAME_RELEASE}
1267 exit ;;
1268 SX-8R:SUPER-UX:*:*)
1269 echo sx8r-nec-superux${UNAME_RELEASE}
1270 exit ;;
1271 Power*:Rhapsody:*:*)
1272 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1273 exit ;;
1274 *:Rhapsody:*:*)
1275 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1276 exit ;;
1277 *:Darwin:*:*)
1278 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1279 eval $set_cc_for_build
1280 if test "$UNAME_PROCESSOR" = unknown ; then
1281 UNAME_PROCESSOR=powerpc
1282 fi
1283 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1284 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1285 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1286 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1287 grep IS_64BIT_ARCH >/dev/null
1288 then
1289 case $UNAME_PROCESSOR in
1290 i386) UNAME_PROCESSOR=x86_64 ;;
1291 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1292 esac
1293 fi
1294 fi
1295 elif test "$UNAME_PROCESSOR" = i386 ; then
1296 # Avoid executing cc on OS X 10.9, as it ships with a stub
1297 # that puts up a graphical alert prompting to install
1298 # developer tools. Any system running Mac OS X 10.7 or
1299 # later (Darwin 11 and later) is required to have a 64-bit
1300 # processor. This is not true of the ARM version of Darwin
1301 # that Apple uses in portable devices.
1302 UNAME_PROCESSOR=x86_64
1303 fi
1304 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1305 exit ;;
1306 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1307 UNAME_PROCESSOR=`uname -p`
1308 if test "$UNAME_PROCESSOR" = "x86"; then
1309 UNAME_PROCESSOR=i386
1310 UNAME_MACHINE=pc
1311 fi
1312 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1313 exit ;;
1314 *:QNX:*:4*)
1315 echo i386-pc-qnx
1316 exit ;;
1317 NEO-?:NONSTOP_KERNEL:*:*)
1318 echo neo-tandem-nsk${UNAME_RELEASE}
1319 exit ;;
1320 NSE-*:NONSTOP_KERNEL:*:*)
1321 echo nse-tandem-nsk${UNAME_RELEASE}
1322 exit ;;
1323 NSR-?:NONSTOP_KERNEL:*:*)
1324 echo nsr-tandem-nsk${UNAME_RELEASE}
1325 exit ;;
1326 *:NonStop-UX:*:*)
1327 echo mips-compaq-nonstopux
1328 exit ;;
1329 BS2000:POSIX*:*:*)
1330 echo bs2000-siemens-sysv
1331 exit ;;
1332 DS/*:UNIX_System_V:*:*)
1333 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1334 exit ;;
1335 *:Plan9:*:*)
1336 # "uname -m" is not consistent, so use $cputype instead. 386
1337 # is converted to i386 for consistency with other x86
1338 # operating systems.
1339 if test "$cputype" = "386"; then
1340 UNAME_MACHINE=i386
1341 else
1342 UNAME_MACHINE="$cputype"
1343 fi
1344 echo ${UNAME_MACHINE}-unknown-plan9
1345 exit ;;
1346 *:TOPS-10:*:*)
1347 echo pdp10-unknown-tops10
1348 exit ;;
1349 *:TENEX:*:*)
1350 echo pdp10-unknown-tenex
1351 exit ;;
1352 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1353 echo pdp10-dec-tops20
1354 exit ;;
1355 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1356 echo pdp10-xkl-tops20
1357 exit ;;
1358 *:TOPS-20:*:*)
1359 echo pdp10-unknown-tops20
1360 exit ;;
1361 *:ITS:*:*)
1362 echo pdp10-unknown-its
1363 exit ;;
1364 SEI:*:*:SEIUX)
1365 echo mips-sei-seiux${UNAME_RELEASE}
1366 exit ;;
1367 *:DragonFly:*:*)
1368 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1369 exit ;;
1370 *:*VMS:*:*)
1371 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1372 case "${UNAME_MACHINE}" in
1373 A*) echo alpha-dec-vms ; exit ;;
1374 I*) echo ia64-dec-vms ; exit ;;
1375 V*) echo vax-dec-vms ; exit ;;
1376 esac ;;
1377 *:XENIX:*:SysV)
1378 echo i386-pc-xenix
1379 exit ;;
1380 i*86:skyos:*:*)
1381 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1382 exit ;;
1383 i*86:rdos:*:*)
1384 echo ${UNAME_MACHINE}-pc-rdos
1385 exit ;;
1386 i*86:AROS:*:*)
1387 echo ${UNAME_MACHINE}-pc-aros
1388 exit ;;
1389 x86_64:VMkernel:*:*)
1390 echo ${UNAME_MACHINE}-unknown-esx
1391 exit ;;
1392 esac
1393
1394 cat >&2 <<EOF
1395 $0: unable to guess system type
1396
1397 This script, last modified $timestamp, has failed to recognize
1398 the operating system you are using. It is advised that you
1399 download the most up to date version of the config scripts from
1400
1401 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1402 and
1403 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1404
1405 If the version you run ($0) is already up to date, please
1406 send the following data and any information you think might be
1407 pertinent to <config-patches@gnu.org> in order to provide the needed
1408 information to handle your system.
1409
1410 config.guess timestamp = $timestamp
1411
1412 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1413 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1414 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1415 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1416
1417 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1418 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1419
1420 hostinfo = `(hostinfo) 2>/dev/null`
1421 /bin/universe = `(/bin/universe) 2>/dev/null`
1422 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1423 /bin/arch = `(/bin/arch) 2>/dev/null`
1424 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1425 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1426
1427 UNAME_MACHINE = ${UNAME_MACHINE}
1428 UNAME_RELEASE = ${UNAME_RELEASE}
1429 UNAME_SYSTEM = ${UNAME_SYSTEM}
1430 UNAME_VERSION = ${UNAME_VERSION}
1431 EOF
1432
1433 exit 1
1434
1435 # Local variables:
1436 # eval: (add-hook 'write-file-hooks 'time-stamp)
1437 # time-stamp-start: "timestamp='"
1438 # time-stamp-format: "%:y-%02m-%02d"
1439 # time-stamp-end: "'"
1440 # End:
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define to 1 if the package shall run at any location in the file system. */
3 #undef ENABLE_RELOCATABLE
4
5 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
6 whether the gnulib module msvc-nothrow shall be considered present. */
7 #undef GNULIB_MSVC_NOTHROW
8
9 /* Define to 1 when the gnulib module malloc-posix should be tested. */
10 #undef GNULIB_TEST_MALLOC_POSIX
11
12 /* Define to 1 when the gnulib module rawmemchr should be tested. */
13 #undef GNULIB_TEST_RAWMEMCHR
14
15 /* Define to 1 when the gnulib module strchrnul should be tested. */
16 #undef GNULIB_TEST_STRCHRNUL
17
18 /* Define to 1 when the gnulib module strdup should be tested. */
19 #undef GNULIB_TEST_STRDUP
20
21 /* define if the compiler supports basic C++11 syntax */
22 #undef HAVE_CXX11
23
24 /* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
25 */
26 #undef HAVE_DECL_STRDUP
27
28 /* Define to 1 if you have the <dlfcn.h> header file. */
29 #undef HAVE_DLFCN_H
30
31 /* Define to 1 if you have the `fcntl' function. */
32 #undef HAVE_FCNTL
33
34 /* Define to 1 if you have the `flock' function. */
35 #undef HAVE_FLOCK
36
37 /* Define to 1 if you have the <getopt.h> header file. */
38 #undef HAVE_GETOPT_H
39
40 /* Define to 1 if you have the `getopt_long_only' function. */
41 #undef HAVE_GETOPT_LONG_ONLY
42
43 /* Define to 1 if you have the <inttypes.h> header file. */
44 #undef HAVE_INTTYPES_H
45
46 /* Define if your <locale.h> file defines LC_MESSAGES. */
47 #undef HAVE_LC_MESSAGES
48
49 /* Define to 1 if you have the `applespell' library (-lapplespell). */
50 #undef HAVE_LIBAPPLESPELL
51
52 /* Define to 1 if you have the `aspell' library (-laspell). */
53 #undef HAVE_LIBASPELL
54
55 /* Define to 1 if you have the `hspell' library (-lhspell). */
56 #undef HAVE_LIBHSPELL
57
58 /* Define to 1 if you have the <locale.h> header file. */
59 #undef HAVE_LOCALE_H
60
61 /* Define if the 'malloc' function is POSIX compliant. */
62 #undef HAVE_MALLOC_POSIX
63
64 /* Define to 1 if you have the <memory.h> header file. */
65 #undef HAVE_MEMORY_H
66
67 /* Define to 1 on MSVC platforms that have the "invalid parameter handler"
68 concept. */
69 #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER
70
71 /* Define to 1 if you have the `rawmemchr' function. */
72 #undef HAVE_RAWMEMCHR
73
74 /* Define to 1 if you have the <stdint.h> header file. */
75 #undef HAVE_STDINT_H
76
77 /* Define to 1 if you have the <stdlib.h> header file. */
78 #undef HAVE_STDLIB_H
79
80 /* Define to 1 if you have the `strchrnul' function. */
81 #undef HAVE_STRCHRNUL
82
83 /* Define to 1 if you have the `strdup' function. */
84 #undef HAVE_STRDUP
85
86 /* Define to 1 if you have the <strings.h> header file. */
87 #undef HAVE_STRINGS_H
88
89 /* Define to 1 if you have the <string.h> header file. */
90 #undef HAVE_STRING_H
91
92 /* Define to 1 if `l_type' is a member of `struct flock'. */
93 #undef HAVE_STRUCT_FLOCK_L_TYPE
94
95 /* Define to 1 if you have the <sys/cdefs.h> header file. */
96 #undef HAVE_SYS_CDEFS_H
97
98 /* Define to 1 if you have the <sys/file.h> header file. */
99 #undef HAVE_SYS_FILE_H
100
101 /* Define to 1 if you have the <sys/stat.h> header file. */
102 #undef HAVE_SYS_STAT_H
103
104 /* Define to 1 if you have the <sys/types.h> header file. */
105 #undef HAVE_SYS_TYPES_H
106
107 /* Define to 1 if you have the <unistd.h> header file. */
108 #undef HAVE_UNISTD_H
109
110 /* Define if you have the 'wchar_t' type. */
111 #undef HAVE_WCHAR_T
112
113 /* Define to 1 if you have the `_set_invalid_parameter_handler' function. */
114 #undef HAVE__SET_INVALID_PARAMETER_HANDLER
115
116 /* Define to the value of ${prefix}, as a string. */
117 #undef INSTALLPREFIX
118
119 /* Define to the extension used for runtime loadable modules, say, ".so". */
120 #undef LT_MODULE_EXT
121
122 /* Define to the sub-directory where libtool stores uninstalled libraries. */
123 #undef LT_OBJDIR
124
125 /* Define to the shared library suffix, say, ".dylib". */
126 #undef LT_SHARED_EXT
127
128 /* Define to the shared archive member specification, say "(shr.o)". */
129 #undef LT_SHARED_LIB_MEMBER
130
131 /* Name of package */
132 #undef PACKAGE
133
134 /* Define to the address where bug reports for this package should be sent. */
135 #undef PACKAGE_BUGREPORT
136
137 /* Define to the full name of this package. */
138 #undef PACKAGE_NAME
139
140 /* Define to the full name and version of this package. */
141 #undef PACKAGE_STRING
142
143 /* Define to the one symbol short name of this package. */
144 #undef PACKAGE_TARNAME
145
146 /* Define to the home page for this package. */
147 #undef PACKAGE_URL
148
149 /* Define to the version of this package. */
150 #undef PACKAGE_VERSION
151
152 /* Define to 1 if you have the ANSI C header files. */
153 #undef STDC_HEADERS
154
155 /* Enable extensions on AIX 3, Interix. */
156 #ifndef _ALL_SOURCE
157 # undef _ALL_SOURCE
158 #endif
159 /* Enable general extensions on macOS. */
160 #ifndef _DARWIN_C_SOURCE
161 # undef _DARWIN_C_SOURCE
162 #endif
163 /* Enable GNU extensions on systems that have them. */
164 #ifndef _GNU_SOURCE
165 # undef _GNU_SOURCE
166 #endif
167 /* Enable NetBSD extensions on NetBSD. */
168 #ifndef _NETBSD_SOURCE
169 # undef _NETBSD_SOURCE
170 #endif
171 /* Enable OpenBSD extensions on NetBSD. */
172 #ifndef _OPENBSD_SOURCE
173 # undef _OPENBSD_SOURCE
174 #endif
175 /* Enable threading extensions on Solaris. */
176 #ifndef _POSIX_PTHREAD_SEMANTICS
177 # undef _POSIX_PTHREAD_SEMANTICS
178 #endif
179 /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
180 #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
181 # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
182 #endif
183 /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
184 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
185 # undef __STDC_WANT_IEC_60559_BFP_EXT__
186 #endif
187 /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
188 #ifndef __STDC_WANT_IEC_60559_DFP_EXT__
189 # undef __STDC_WANT_IEC_60559_DFP_EXT__
190 #endif
191 /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
192 #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
193 # undef __STDC_WANT_IEC_60559_FUNCS_EXT__
194 #endif
195 /* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
196 #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
197 # undef __STDC_WANT_IEC_60559_TYPES_EXT__
198 #endif
199 /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
200 #ifndef __STDC_WANT_LIB_EXT2__
201 # undef __STDC_WANT_LIB_EXT2__
202 #endif
203 /* Enable extensions specified by ISO/IEC 24747:2009. */
204 #ifndef __STDC_WANT_MATH_SPEC_FUNCS__
205 # undef __STDC_WANT_MATH_SPEC_FUNCS__
206 #endif
207 /* Enable extensions on HP NonStop. */
208 #ifndef _TANDEM_SOURCE
209 # undef _TANDEM_SOURCE
210 #endif
211 /* Enable X/Open extensions if necessary. HP-UX 11.11 defines
212 mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
213 whether compiling with -Ae or -D_HPUX_SOURCE=1. */
214 #ifndef _XOPEN_SOURCE
215 # undef _XOPEN_SOURCE
216 #endif
217 /* Enable X/Open compliant socket functions that do not require linking
218 with -lxnet on HP-UX 11.11. */
219 #ifndef _HPUX_ALT_XOPEN_SOCKET_API
220 # undef _HPUX_ALT_XOPEN_SOCKET_API
221 #endif
222 /* Enable general extensions on Solaris. */
223 #ifndef __EXTENSIONS__
224 # undef __EXTENSIONS__
225 #endif
226
227
228 /* Version number of package */
229 #undef VERSION
230
231 /* Define to 1 if on MINIX. */
232 #undef _MINIX
233
234 /* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
235 #undef _NETBSD_SOURCE
236
237 /* The _Noreturn keyword of C11. */
238 #if ! (defined _Noreturn \
239 || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
240 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
241 || 0x5110 <= __SUNPRO_C)
242 # define _Noreturn __attribute__ ((__noreturn__))
243 # elif defined _MSC_VER && 1200 <= _MSC_VER
244 # define _Noreturn __declspec (noreturn)
245 # else
246 # define _Noreturn
247 # endif
248 #endif
249
250
251 /* Define to 2 if the system does not provide POSIX.1 features except with
252 this defined. */
253 #undef _POSIX_1_SOURCE
254
255 /* Define to 1 if you need to in order for 'stat' and other things to work. */
256 #undef _POSIX_SOURCE
257
258 /* For standard stat data types on VMS. */
259 #undef _USE_STD_STAT
260
261 /* Define to rpl_ if the getopt replacement functions and variables should be
262 used. */
263 #undef __GETOPT_PREFIX
264
265 /* Please see the Gnulib manual for how to use these macros.
266
267 Suppress extern inline with HP-UX cc, as it appears to be broken; see
268 <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
269
270 Suppress extern inline with Sun C in standards-conformance mode, as it
271 mishandles inline functions that call each other. E.g., for 'inline void f
272 (void) { } inline void g (void) { f (); }', c99 incorrectly complains
273 'reference to static identifier "f" in extern inline function'.
274 This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
275
276 Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
277 on configurations that mistakenly use 'static inline' to implement
278 functions or macros in standard C headers like <ctype.h>. For example,
279 if isdigit is mistakenly implemented via a static inline function,
280 a program containing an extern inline function that calls isdigit
281 may not work since the C standard prohibits extern inline functions
282 from calling static functions (ISO C 99 section 6.7.4.(3).
283 This bug is known to occur on:
284
285 OS X 10.8 and earlier; see:
286 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
287
288 DragonFly; see
289 http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
290
291 FreeBSD; see:
292 https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
293
294 OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
295 for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
296 Assume DragonFly and FreeBSD will be similar.
297
298 GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
299 inline semantics, unless -fgnu89-inline is used. It defines a macro
300 __GNUC_STDC_INLINE__ to indicate this situation or a macro
301 __GNUC_GNU_INLINE__ to indicate the opposite situation.
302 GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
303 semantics but warns, unless -fgnu89-inline is used:
304 warning: C99 inline functions are not supported; using GNU89
305 warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
306 It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.
307 */
308 #if (((defined __APPLE__ && defined __MACH__) \
309 || defined __DragonFly__ || defined __FreeBSD__) \
310 && (defined __header_inline \
311 ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
312 && ! defined __clang__) \
313 : ((! defined _DONT_USE_CTYPE_INLINE_ \
314 && (defined __GNUC__ || defined __cplusplus)) \
315 || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
316 && defined __GNUC__ && ! defined __cplusplus))))
317 # define _GL_EXTERN_INLINE_STDHEADER_BUG
318 #endif
319 #if ((__GNUC__ \
320 ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
321 : (199901L <= __STDC_VERSION__ \
322 && !defined __HP_cc \
323 && !defined __PGI \
324 && !(defined __SUNPRO_C && __STDC__))) \
325 && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
326 # define _GL_INLINE inline
327 # define _GL_EXTERN_INLINE extern inline
328 # define _GL_EXTERN_INLINE_IN_USE
329 #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
330 && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
331 # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
332 /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
333 # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
334 # else
335 # define _GL_INLINE extern inline
336 # endif
337 # define _GL_EXTERN_INLINE extern
338 # define _GL_EXTERN_INLINE_IN_USE
339 #else
340 # define _GL_INLINE static _GL_UNUSED
341 # define _GL_EXTERN_INLINE static _GL_UNUSED
342 #endif
343
344 /* In GCC 4.6 (inclusive) to 5.1 (exclusive),
345 suppress bogus "no previous prototype for 'FOO'"
346 and "no previous declaration for 'FOO'" diagnostics,
347 when FOO is an inline function in the header; see
348 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
349 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
350 #if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
351 # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
352 # define _GL_INLINE_HEADER_CONST_PRAGMA
353 # else
354 # define _GL_INLINE_HEADER_CONST_PRAGMA \
355 _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
356 # endif
357 # define _GL_INLINE_HEADER_BEGIN \
358 _Pragma ("GCC diagnostic push") \
359 _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
360 _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
361 _GL_INLINE_HEADER_CONST_PRAGMA
362 # define _GL_INLINE_HEADER_END \
363 _Pragma ("GCC diagnostic pop")
364 #else
365 # define _GL_INLINE_HEADER_BEGIN
366 # define _GL_INLINE_HEADER_END
367 #endif
368
369 /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
370 the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
371 earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
372 __APPLE__ && __MACH__ test for Mac OS X.
373 __APPLE_CC__ tests for the Apple compiler and its version.
374 __STDC_VERSION__ tests for the C99 mode. */
375 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
376 # define __GNUC_STDC_INLINE__ 1
377 #endif
378
379 /* Define to `int' if <sys/types.h> does not define. */
380 #undef mode_t
381
382 /* Define to `int' if <sys/types.h> does not define. */
383 #undef pid_t
384
385 /* Define to the equivalent of the C99 'restrict' keyword, or to
386 nothing if this is not supported. Do not define if restrict is
387 supported directly. */
388 #undef restrict
389 /* Work around a bug in Sun C++: it does not support _Restrict or
390 __restrict__, even though the corresponding Sun C compiler ends up with
391 "#define restrict _Restrict" or "#define restrict __restrict__" in the
392 previous line. Perhaps some future version of Sun C++ will work with
393 restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
394 #if defined __SUNPRO_CC && !defined __RESTRICT
395 # define _Restrict
396 # define __restrict__
397 #endif
398
399 /* Define as a signed type of the same size as size_t. */
400 #undef ssize_t
401
402 /* Define as a marker that can be attached to declarations that might not
403 be used. This helps to reduce warnings, such as from
404 GCC -Wunused-parameter. */
405 #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
406 # define _GL_UNUSED __attribute__ ((__unused__))
407 #else
408 # define _GL_UNUSED
409 #endif
410 /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
411 is a misnomer outside of parameter lists. */
412 #define _UNUSED_PARAMETER_ _GL_UNUSED
413
414 /* gcc supports the "unused" attribute on possibly unused labels, and
415 g++ has since version 4.5. Note to support C++ as well as C,
416 _GL_UNUSED_LABEL should be used with a trailing ; */
417 #if !defined __cplusplus || __GNUC__ > 4 \
418 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
419 # define _GL_UNUSED_LABEL _GL_UNUSED
420 #else
421 # define _GL_UNUSED_LABEL
422 #endif
423
424 /* The __pure__ attribute was added in gcc 2.96. */
425 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
426 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
427 #else
428 # define _GL_ATTRIBUTE_PURE /* empty */
429 #endif
430
431 /* The __const__ attribute was added in gcc 2.95. */
432 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
433 # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
434 #else
435 # define _GL_ATTRIBUTE_CONST /* empty */
436 #endif
437
438 /* The __malloc__ attribute was added in gcc 3. */
439 #if 3 <= __GNUC__
440 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
441 #else
442 # define _GL_ATTRIBUTE_MALLOC /* empty */
443 #endif
444
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-08-20'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25
26
27 # Please send patches to <config-patches@gnu.org>.
28 #
29 # Configuration subroutine to validate and canonicalize a configuration type.
30 # Supply the specified configuration type as an argument.
31 # If it is invalid, we print an error message on stderr and exit with code 1.
32 # Otherwise, we print the canonical config type on stdout and succeed.
33
34 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
36
37 # This file is supposed to be the same for all GNU packages
38 # and recognize all the CPU types, system types and aliases
39 # that are meaningful with *any* GNU software.
40 # Each package is responsible for reporting which valid configurations
41 # it does not support. The user should be able to distinguish
42 # a failure to support a valid configuration from a meaningless
43 # configuration.
44
45 # The goal of this file is to map all the various variations of a given
46 # machine specification into a single specification in the form:
47 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
48 # or in some cases, the newer four-part form:
49 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
50 # It is wrong to echo any other type of specification.
51
52 me=`echo "$0" | sed -e 's,.*/,,'`
53
54 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS
56 $0 [OPTION] ALIAS
57
58 Canonicalize a configuration name.
59
60 Operation modes:
61 -h, --help print this help, then exit
62 -t, --time-stamp print date of last modification, then exit
63 -v, --version print version number, then exit
64
65 Report bugs and patches to <config-patches@gnu.org>."
66
67 version="\
68 GNU config.sub ($timestamp)
69
70 Copyright 1992-2015 Free Software Foundation, Inc.
71
72 This is free software; see the source for copying conditions. There is NO
73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
74
75 help="
76 Try \`$me --help' for more information."
77
78 # Parse command line
79 while test $# -gt 0 ; do
80 case $1 in
81 --time-stamp | --time* | -t )
82 echo "$timestamp" ; exit ;;
83 --version | -v )
84 echo "$version" ; exit ;;
85 --help | --h* | -h )
86 echo "$usage"; exit ;;
87 -- ) # Stop option processing
88 shift; break ;;
89 - ) # Use stdin as input.
90 break ;;
91 -* )
92 echo "$me: invalid option $1$help"
93 exit 1 ;;
94
95 *local*)
96 # First pass through any local machine types.
97 echo $1
98 exit ;;
99
100 * )
101 break ;;
102 esac
103 done
104
105 case $# in
106 0) echo "$me: missing argument$help" >&2
107 exit 1;;
108 1) ;;
109 *) echo "$me: too many arguments$help" >&2
110 exit 1;;
111 esac
112
113 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
114 # Here we must recognize all the valid KERNEL-OS combinations.
115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
116 case $maybe_os in
117 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
120 kopensolaris*-gnu* | \
121 storm-chaos* | os2-emx* | rtmk-nova*)
122 os=-$maybe_os
123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124 ;;
125 android-linux)
126 os=-linux-android
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
128 ;;
129 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
133 else os=; fi
134 ;;
135 esac
136
137 ### Let's recognize common machines as not being operating systems so
138 ### that things like config.sub decstation-3100 work. We also
139 ### recognize some manufacturers as not being operating systems, so we
140 ### can provide default operating systems below.
141 case $os in
142 -sun*os*)
143 # Prevent following clause from handling this invalid input.
144 ;;
145 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray | -microblaze*)
152 os=
153 basic_machine=$1
154 ;;
155 -bluegene*)
156 os=-cnk
157 ;;
158 -sim | -cisco | -oki | -wec | -winbond)
159 os=
160 basic_machine=$1
161 ;;
162 -scout)
163 ;;
164 -wrs)
165 os=-vxworks
166 basic_machine=$1
167 ;;
168 -chorusos*)
169 os=-chorusos
170 basic_machine=$1
171 ;;
172 -chorusrdb)
173 os=-chorusrdb
174 basic_machine=$1
175 ;;
176 -hiux*)
177 os=-hiuxwe2
178 ;;
179 -sco6)
180 os=-sco5v6
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco5)
184 os=-sco3.2v5
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco4)
188 os=-sco3.2v4
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -sco3.2.[4-9]*)
192 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 ;;
195 -sco3.2v[4-9]*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
199 -sco5v6*)
200 # Don't forget version if it is 3.2v4 or newer.
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202 ;;
203 -sco*)
204 os=-sco3.2v2
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -udk*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 ;;
210 -isc)
211 os=-isc2.2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
213 ;;
214 -clix*)
215 basic_machine=clipper-intergraph
216 ;;
217 -isc*)
218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
219 ;;
220 -lynx*178)
221 os=-lynxos178
222 ;;
223 -lynx*5)
224 os=-lynxos5
225 ;;
226 -lynx*)
227 os=-lynxos
228 ;;
229 -ptx*)
230 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
231 ;;
232 -windowsnt*)
233 os=`echo $os | sed -e 's/windowsnt/winnt/'`
234 ;;
235 -psos*)
236 os=-psos
237 ;;
238 -mint | -mint[0-9]*)
239 basic_machine=m68k-atari
240 os=-mint
241 ;;
242 esac
243
244 # Decode aliases for certain CPU-COMPANY combinations.
245 case $basic_machine in
246 # Recognize the basic CPU types without company name.
247 # Some are omitted here because they have special meanings below.
248 1750a | 580 \
249 | a29k \
250 | aarch64 | aarch64_be \
251 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
252 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
253 | am33_2.0 \
254 | arc | arceb \
255 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
256 | avr | avr32 \
257 | ba \
258 | be32 | be64 \
259 | bfin \
260 | c4x | c8051 | clipper \
261 | d10v | d30v | dlx | dsp16xx \
262 | e2k | epiphany \
263 | fido | fr30 | frv | ft32 \
264 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
265 | hexagon \
266 | i370 | i860 | i960 | ia64 \
267 | ip2k | iq2000 \
268 | k1om \
269 | le32 | le64 \
270 | lm32 \
271 | m32c | m32r | m32rle | m68000 | m68k | m88k \
272 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
273 | mips | mipsbe | mipseb | mipsel | mipsle \
274 | mips16 \
275 | mips64 | mips64el \
276 | mips64octeon | mips64octeonel \
277 | mips64orion | mips64orionel \
278 | mips64r5900 | mips64r5900el \
279 | mips64vr | mips64vrel \
280 | mips64vr4100 | mips64vr4100el \
281 | mips64vr4300 | mips64vr4300el \
282 | mips64vr5000 | mips64vr5000el \
283 | mips64vr5900 | mips64vr5900el \
284 | mipsisa32 | mipsisa32el \
285 | mipsisa32r2 | mipsisa32r2el \
286 | mipsisa32r6 | mipsisa32r6el \
287 | mipsisa64 | mipsisa64el \
288 | mipsisa64r2 | mipsisa64r2el \
289 | mipsisa64r6 | mipsisa64r6el \
290 | mipsisa64sb1 | mipsisa64sb1el \
291 | mipsisa64sr71k | mipsisa64sr71kel \
292 | mipsr5900 | mipsr5900el \
293 | mipstx39 | mipstx39el \
294 | mn10200 | mn10300 \
295 | moxie \
296 | mt \
297 | msp430 \
298 | nds32 | nds32le | nds32be \
299 | nios | nios2 | nios2eb | nios2el \
300 | ns16k | ns32k \
301 | open8 | or1k | or1knd | or32 \
302 | pdp10 | pdp11 | pj | pjl \
303 | powerpc | powerpc64 | powerpc64le | powerpcle \
304 | pyramid \
305 | riscv32 | riscv64 \
306 | rl78 | rx \
307 | score \
308 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
309 | sh64 | sh64le \
310 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
311 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
312 | spu \
313 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
314 | ubicom32 \
315 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
316 | visium \
317 | we32k \
318 | x86 | xc16x | xstormy16 | xtensa \
319 | z8k | z80)
320 basic_machine=$basic_machine-unknown
321 ;;
322 c54x)
323 basic_machine=tic54x-unknown
324 ;;
325 c55x)
326 basic_machine=tic55x-unknown
327 ;;
328 c6x)
329 basic_machine=tic6x-unknown
330 ;;
331 leon|leon[3-9])
332 basic_machine=sparc-$basic_machine
333 ;;
334 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
335 basic_machine=$basic_machine-unknown
336 os=-none
337 ;;
338 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
339 ;;
340 ms1)
341 basic_machine=mt-unknown
342 ;;
343
344 strongarm | thumb | xscale)
345 basic_machine=arm-unknown
346 ;;
347 xgate)
348 basic_machine=$basic_machine-unknown
349 os=-none
350 ;;
351 xscaleeb)
352 basic_machine=armeb-unknown
353 ;;
354
355 xscaleel)
356 basic_machine=armel-unknown
357 ;;
358
359 # We use `pc' rather than `unknown'
360 # because (1) that's what they normally are, and
361 # (2) the word "unknown" tends to confuse beginning users.
362 i*86 | x86_64)
363 basic_machine=$basic_machine-pc
364 ;;
365 # Object if more than one company name word.
366 *-*-*)
367 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
368 exit 1
369 ;;
370 # Recognize the basic CPU types with company name.
371 580-* \
372 | a29k-* \
373 | aarch64-* | aarch64_be-* \
374 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
375 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
376 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
377 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
378 | avr-* | avr32-* \
379 | ba-* \
380 | be32-* | be64-* \
381 | bfin-* | bs2000-* \
382 | c[123]* | c30-* | [cjt]90-* | c4x-* \
383 | c8051-* | clipper-* | craynv-* | cydra-* \
384 | d10v-* | d30v-* | dlx-* \
385 | e2k-* | elxsi-* \
386 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
387 | h8300-* | h8500-* \
388 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
389 | hexagon-* \
390 | i*86-* | i860-* | i960-* | ia64-* \
391 | ip2k-* | iq2000-* \
392 | k1om-* \
393 | le32-* | le64-* \
394 | lm32-* \
395 | m32c-* | m32r-* | m32rle-* \
396 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
397 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
398 | microblaze-* | microblazeel-* \
399 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
400 | mips16-* \
401 | mips64-* | mips64el-* \
402 | mips64octeon-* | mips64octeonel-* \
403 | mips64orion-* | mips64orionel-* \
404 | mips64r5900-* | mips64r5900el-* \
405 | mips64vr-* | mips64vrel-* \
406 | mips64vr4100-* | mips64vr4100el-* \
407 | mips64vr4300-* | mips64vr4300el-* \
408 | mips64vr5000-* | mips64vr5000el-* \
409 | mips64vr5900-* | mips64vr5900el-* \
410 | mipsisa32-* | mipsisa32el-* \
411 | mipsisa32r2-* | mipsisa32r2el-* \
412 | mipsisa32r6-* | mipsisa32r6el-* \
413 | mipsisa64-* | mipsisa64el-* \
414 | mipsisa64r2-* | mipsisa64r2el-* \
415 | mipsisa64r6-* | mipsisa64r6el-* \
416 | mipsisa64sb1-* | mipsisa64sb1el-* \
417 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
418 | mipsr5900-* | mipsr5900el-* \
419 | mipstx39-* | mipstx39el-* \
420 | mmix-* \
421 | mt-* \
422 | msp430-* \
423 | nds32-* | nds32le-* | nds32be-* \
424 | nios-* | nios2-* | nios2eb-* | nios2el-* \
425 | none-* | np1-* | ns16k-* | ns32k-* \
426 | open8-* \
427 | or1k*-* \
428 | orion-* \
429 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
430 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
431 | pyramid-* \
432 | riscv32-* | riscv64-* \
433 | rl78-* | romp-* | rs6000-* | rx-* \
434 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
435 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
436 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
437 | sparclite-* \
438 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
439 | tahoe-* \
440 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
441 | tile*-* \
442 | tron-* \
443 | ubicom32-* \
444 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
445 | vax-* \
446 | visium-* \
447 | we32k-* \
448 | x86-* | x86_64-* | xc16x-* | xps100-* \
449 | xstormy16-* | xtensa*-* \
450 | ymp-* \
451 | z8k-* | z80-*)
452 ;;
453 # Recognize the basic CPU types without company name, with glob match.
454 xtensa*)
455 basic_machine=$basic_machine-unknown
456 ;;
457 # Recognize the various machine names and aliases which stand
458 # for a CPU type and a company and sometimes even an OS.
459 386bsd)
460 basic_machine=i386-unknown
461 os=-bsd
462 ;;
463 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
464 basic_machine=m68000-att
465 ;;
466 3b*)
467 basic_machine=we32k-att
468 ;;
469 a29khif)
470 basic_machine=a29k-amd
471 os=-udi
472 ;;
473 abacus)
474 basic_machine=abacus-unknown
475 ;;
476 adobe68k)
477 basic_machine=m68010-adobe
478 os=-scout
479 ;;
480 alliant | fx80)
481 basic_machine=fx80-alliant
482 ;;
483 altos | altos3068)
484 basic_machine=m68k-altos
485 ;;
486 am29k)
487 basic_machine=a29k-none
488 os=-bsd
489 ;;
490 amd64)
491 basic_machine=x86_64-pc
492 ;;
493 amd64-*)
494 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
495 ;;
496 amdahl)
497 basic_machine=580-amdahl
498 os=-sysv
499 ;;
500 amiga | amiga-*)
501 basic_machine=m68k-unknown
502 ;;
503 amigaos | amigados)
504 basic_machine=m68k-unknown
505 os=-amigaos
506 ;;
507 amigaunix | amix)
508 basic_machine=m68k-unknown
509 os=-sysv4
510 ;;
511 apollo68)
512 basic_machine=m68k-apollo
513 os=-sysv
514 ;;
515 apollo68bsd)
516 basic_machine=m68k-apollo
517 os=-bsd
518 ;;
519 aros)
520 basic_machine=i386-pc
521 os=-aros
522 ;;
523 asmjs)
524 basic_machine=asmjs-unknown
525 ;;
526 aux)
527 basic_machine=m68k-apple
528 os=-aux
529 ;;
530 balance)
531 basic_machine=ns32k-sequent
532 os=-dynix
533 ;;
534 blackfin)
535 basic_machine=bfin-unknown
536 os=-linux
537 ;;
538 blackfin-*)
539 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
540 os=-linux
541 ;;
542 bluegene*)
543 basic_machine=powerpc-ibm
544 os=-cnk
545 ;;
546 c54x-*)
547 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
548 ;;
549 c55x-*)
550 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
551 ;;
552 c6x-*)
553 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
554 ;;
555 c90)
556 basic_machine=c90-cray
557 os=-unicos
558 ;;
559 cegcc)
560 basic_machine=arm-unknown
561 os=-cegcc
562 ;;
563 convex-c1)
564 basic_machine=c1-convex
565 os=-bsd
566 ;;
567 convex-c2)
568 basic_machine=c2-convex
569 os=-bsd
570 ;;
571 convex-c32)
572 basic_machine=c32-convex
573 os=-bsd
574 ;;
575 convex-c34)
576 basic_machine=c34-convex
577 os=-bsd
578 ;;
579 convex-c38)
580 basic_machine=c38-convex
581 os=-bsd
582 ;;
583 cray | j90)
584 basic_machine=j90-cray
585 os=-unicos
586 ;;
587 craynv)
588 basic_machine=craynv-cray
589 os=-unicosmp
590 ;;
591 cr16 | cr16-*)
592 basic_machine=cr16-unknown
593 os=-elf
594 ;;
595 crds | unos)
596 basic_machine=m68k-crds
597 ;;
598 crisv32 | crisv32-* | etraxfs*)
599 basic_machine=crisv32-axis
600 ;;
601 cris | cris-* | etrax*)
602 basic_machine=cris-axis
603 ;;
604 crx)
605 basic_machine=crx-unknown
606 os=-elf
607 ;;
608 da30 | da30-*)
609 basic_machine=m68k-da30
610 ;;
611 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
612 basic_machine=mips-dec
613 ;;
614 decsystem10* | dec10*)
615 basic_machine=pdp10-dec
616 os=-tops10
617 ;;
618 decsystem20* | dec20*)
619 basic_machine=pdp10-dec
620 os=-tops20
621 ;;
622 delta | 3300 | motorola-3300 | motorola-delta \
623 | 3300-motorola | delta-motorola)
624 basic_machine=m68k-motorola
625 ;;
626 delta88)
627 basic_machine=m88k-motorola
628 os=-sysv3
629 ;;
630 dicos)
631 basic_machine=i686-pc
632 os=-dicos
633 ;;
634 djgpp)
635 basic_machine=i586-pc
636 os=-msdosdjgpp
637 ;;
638 dpx20 | dpx20-*)
639 basic_machine=rs6000-bull
640 os=-bosx
641 ;;
642 dpx2* | dpx2*-bull)
643 basic_machine=m68k-bull
644 os=-sysv3
645 ;;
646 ebmon29k)
647 basic_machine=a29k-amd
648 os=-ebmon
649 ;;
650 elxsi)
651 basic_machine=elxsi-elxsi
652 os=-bsd
653 ;;
654 encore | umax | mmax)
655 basic_machine=ns32k-encore
656 ;;
657 es1800 | OSE68k | ose68k | ose | OSE)
658 basic_machine=m68k-ericsson
659 os=-ose
660 ;;
661 fx2800)
662 basic_machine=i860-alliant
663 ;;
664 genix)
665 basic_machine=ns32k-ns
666 ;;
667 gmicro)
668 basic_machine=tron-gmicro
669 os=-sysv
670 ;;
671 go32)
672 basic_machine=i386-pc
673 os=-go32
674 ;;
675 h3050r* | hiux*)
676 basic_machine=hppa1.1-hitachi
677 os=-hiuxwe2
678 ;;
679 h8300hms)
680 basic_machine=h8300-hitachi
681 os=-hms
682 ;;
683 h8300xray)
684 basic_machine=h8300-hitachi
685 os=-xray
686 ;;
687 h8500hms)
688 basic_machine=h8500-hitachi
689 os=-hms
690 ;;
691 harris)
692 basic_machine=m88k-harris
693 os=-sysv3
694 ;;
695 hp300-*)
696 basic_machine=m68k-hp
697 ;;
698 hp300bsd)
699 basic_machine=m68k-hp
700 os=-bsd
701 ;;
702 hp300hpux)
703 basic_machine=m68k-hp
704 os=-hpux
705 ;;
706 hp3k9[0-9][0-9] | hp9[0-9][0-9])
707 basic_machine=hppa1.0-hp
708 ;;
709 hp9k2[0-9][0-9] | hp9k31[0-9])
710 basic_machine=m68000-hp
711 ;;
712 hp9k3[2-9][0-9])
713 basic_machine=m68k-hp
714 ;;
715 hp9k6[0-9][0-9] | hp6[0-9][0-9])
716 basic_machine=hppa1.0-hp
717 ;;
718 hp9k7[0-79][0-9] | hp7[0-79][0-9])
719 basic_machine=hppa1.1-hp
720 ;;
721 hp9k78[0-9] | hp78[0-9])
722 # FIXME: really hppa2.0-hp
723 basic_machine=hppa1.1-hp
724 ;;
725 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
726 # FIXME: really hppa2.0-hp
727 basic_machine=hppa1.1-hp
728 ;;
729 hp9k8[0-9][13679] | hp8[0-9][13679])
730 basic_machine=hppa1.1-hp
731 ;;
732 hp9k8[0-9][0-9] | hp8[0-9][0-9])
733 basic_machine=hppa1.0-hp
734 ;;
735 hppa-next)
736 os=-nextstep3
737 ;;
738 hppaosf)
739 basic_machine=hppa1.1-hp
740 os=-osf
741 ;;
742 hppro)
743 basic_machine=hppa1.1-hp
744 os=-proelf
745 ;;
746 i370-ibm* | ibm*)
747 basic_machine=i370-ibm
748 ;;
749 i*86v32)
750 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
751 os=-sysv32
752 ;;
753 i*86v4*)
754 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
755 os=-sysv4
756 ;;
757 i*86v)
758 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
759 os=-sysv
760 ;;
761 i*86sol2)
762 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
763 os=-solaris2
764 ;;
765 i386mach)
766 basic_machine=i386-mach
767 os=-mach
768 ;;
769 i386-vsta | vsta)
770 basic_machine=i386-unknown
771 os=-vsta
772 ;;
773 iris | iris4d)
774 basic_machine=mips-sgi
775 case $os in
776 -irix*)
777 ;;
778 *)
779 os=-irix4
780 ;;
781 esac
782 ;;
783 isi68 | isi)
784 basic_machine=m68k-isi
785 os=-sysv
786 ;;
787 leon-*|leon[3-9]-*)
788 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
789 ;;
790 m68knommu)
791 basic_machine=m68k-unknown
792 os=-linux
793 ;;
794 m68knommu-*)
795 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
796 os=-linux
797 ;;
798 m88k-omron*)
799 basic_machine=m88k-omron
800 ;;
801 magnum | m3230)
802 basic_machine=mips-mips
803 os=-sysv
804 ;;
805 merlin)
806 basic_machine=ns32k-utek
807 os=-sysv
808 ;;
809 microblaze*)
810 basic_machine=microblaze-xilinx
811 ;;
812 mingw64)
813 basic_machine=x86_64-pc
814 os=-mingw64
815 ;;
816 mingw32)
817 basic_machine=i686-pc
818 os=-mingw32
819 ;;
820 mingw32ce)
821 basic_machine=arm-unknown
822 os=-mingw32ce
823 ;;
824 miniframe)
825 basic_machine=m68000-convergent
826 ;;
827 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
828 basic_machine=m68k-atari
829 os=-mint
830 ;;
831 mips3*-*)
832 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
833 ;;
834 mips3*)
835 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
836 ;;
837 monitor)
838 basic_machine=m68k-rom68k
839 os=-coff
840 ;;
841 morphos)
842 basic_machine=powerpc-unknown
843 os=-morphos
844 ;;
845 moxiebox)
846 basic_machine=moxie-unknown
847 os=-moxiebox
848 ;;
849 msdos)
850 basic_machine=i386-pc
851 os=-msdos
852 ;;
853 ms1-*)
854 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
855 ;;
856 msys)
857 basic_machine=i686-pc
858 os=-msys
859 ;;
860 mvs)
861 basic_machine=i370-ibm
862 os=-mvs
863 ;;
864 nacl)
865 basic_machine=le32-unknown
866 os=-nacl
867 ;;
868 ncr3000)
869 basic_machine=i486-ncr
870 os=-sysv4
871 ;;
872 netbsd386)
873 basic_machine=i386-unknown
874 os=-netbsd
875 ;;
876 netwinder)
877 basic_machine=armv4l-rebel
878 os=-linux
879 ;;
880 news | news700 | news800 | news900)
881 basic_machine=m68k-sony
882 os=-newsos
883 ;;
884 news1000)
885 basic_machine=m68030-sony
886 os=-newsos
887 ;;
888 news-3600 | risc-news)
889 basic_machine=mips-sony
890 os=-newsos
891 ;;
892 necv70)
893 basic_machine=v70-nec
894 os=-sysv
895 ;;
896 next | m*-next )
897 basic_machine=m68k-next
898 case $os in
899 -nextstep* )
900 ;;
901 -ns2*)
902 os=-nextstep2
903 ;;
904 *)
905 os=-nextstep3
906 ;;
907 esac
908 ;;
909 nh3000)
910 basic_machine=m68k-harris
911 os=-cxux
912 ;;
913 nh[45]000)
914 basic_machine=m88k-harris
915 os=-cxux
916 ;;
917 nindy960)
918 basic_machine=i960-intel
919 os=-nindy
920 ;;
921 mon960)
922 basic_machine=i960-intel
923 os=-mon960
924 ;;
925 nonstopux)
926 basic_machine=mips-compaq
927 os=-nonstopux
928 ;;
929 np1)
930 basic_machine=np1-gould
931 ;;
932 neo-tandem)
933 basic_machine=neo-tandem
934 ;;
935 nse-tandem)
936 basic_machine=nse-tandem
937 ;;
938 nsr-tandem)
939 basic_machine=nsr-tandem
940 ;;
941 op50n-* | op60c-*)
942 basic_machine=hppa1.1-oki
943 os=-proelf
944 ;;
945 openrisc | openrisc-*)
946 basic_machine=or32-unknown
947 ;;
948 os400)
949 basic_machine=powerpc-ibm
950 os=-os400
951 ;;
952 OSE68000 | ose68000)
953 basic_machine=m68000-ericsson
954 os=-ose
955 ;;
956 os68k)
957 basic_machine=m68k-none
958 os=-os68k
959 ;;
960 pa-hitachi)
961 basic_machine=hppa1.1-hitachi
962 os=-hiuxwe2
963 ;;
964 paragon)
965 basic_machine=i860-intel
966 os=-osf
967 ;;
968 parisc)
969 basic_machine=hppa-unknown
970 os=-linux
971 ;;
972 parisc-*)
973 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
974 os=-linux
975 ;;
976 pbd)
977 basic_machine=sparc-tti
978 ;;
979 pbb)
980 basic_machine=m68k-tti
981 ;;
982 pc532 | pc532-*)
983 basic_machine=ns32k-pc532
984 ;;
985 pc98)
986 basic_machine=i386-pc
987 ;;
988 pc98-*)
989 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
990 ;;
991 pentium | p5 | k5 | k6 | nexgen | viac3)
992 basic_machine=i586-pc
993 ;;
994 pentiumpro | p6 | 6x86 | athlon | athlon_*)
995 basic_machine=i686-pc
996 ;;
997 pentiumii | pentium2 | pentiumiii | pentium3)
998 basic_machine=i686-pc
999 ;;
1000 pentium4)
1001 basic_machine=i786-pc
1002 ;;
1003 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1004 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1005 ;;
1006 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1007 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1008 ;;
1009 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1010 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1011 ;;
1012 pentium4-*)
1013 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1014 ;;
1015 pn)
1016 basic_machine=pn-gould
1017 ;;
1018 power) basic_machine=power-ibm
1019 ;;
1020 ppc | ppcbe) basic_machine=powerpc-unknown
1021 ;;
1022 ppc-* | ppcbe-*)
1023 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1024 ;;
1025 ppcle | powerpclittle | ppc-le | powerpc-little)
1026 basic_machine=powerpcle-unknown
1027 ;;
1028 ppcle-* | powerpclittle-*)
1029 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1030 ;;
1031 ppc64) basic_machine=powerpc64-unknown
1032 ;;
1033 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1034 ;;
1035 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1036 basic_machine=powerpc64le-unknown
1037 ;;
1038 ppc64le-* | powerpc64little-*)
1039 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1040 ;;
1041 ps2)
1042 basic_machine=i386-ibm
1043 ;;
1044 pw32)
1045 basic_machine=i586-unknown
1046 os=-pw32
1047 ;;
1048 rdos | rdos64)
1049 basic_machine=x86_64-pc
1050 os=-rdos
1051 ;;
1052 rdos32)
1053 basic_machine=i386-pc
1054 os=-rdos
1055 ;;
1056 rom68k)
1057 basic_machine=m68k-rom68k
1058 os=-coff
1059 ;;
1060 rm[46]00)
1061 basic_machine=mips-siemens
1062 ;;
1063 rtpc | rtpc-*)
1064 basic_machine=romp-ibm
1065 ;;
1066 s390 | s390-*)
1067 basic_machine=s390-ibm
1068 ;;
1069 s390x | s390x-*)
1070 basic_machine=s390x-ibm
1071 ;;
1072 sa29200)
1073 basic_machine=a29k-amd
1074 os=-udi
1075 ;;
1076 sb1)
1077 basic_machine=mipsisa64sb1-unknown
1078 ;;
1079 sb1el)
1080 basic_machine=mipsisa64sb1el-unknown
1081 ;;
1082 sde)
1083 basic_machine=mipsisa32-sde
1084 os=-elf
1085 ;;
1086 sei)
1087 basic_machine=mips-sei
1088 os=-seiux
1089 ;;
1090 sequent)
1091 basic_machine=i386-sequent
1092 ;;
1093 sh)
1094 basic_machine=sh-hitachi
1095 os=-hms
1096 ;;
1097 sh5el)
1098 basic_machine=sh5le-unknown
1099 ;;
1100 sh64)
1101 basic_machine=sh64-unknown
1102 ;;
1103 sparclite-wrs | simso-wrs)
1104 basic_machine=sparclite-wrs
1105 os=-vxworks
1106 ;;
1107 sps7)
1108 basic_machine=m68k-bull
1109 os=-sysv2
1110 ;;
1111 spur)
1112 basic_machine=spur-unknown
1113 ;;
1114 st2000)
1115 basic_machine=m68k-tandem
1116 ;;
1117 stratus)
1118 basic_machine=i860-stratus
1119 os=-sysv4
1120 ;;
1121 strongarm-* | thumb-*)
1122 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1123 ;;
1124 sun2)
1125 basic_machine=m68000-sun
1126 ;;
1127 sun2os3)
1128 basic_machine=m68000-sun
1129 os=-sunos3
1130 ;;
1131 sun2os4)
1132 basic_machine=m68000-sun
1133 os=-sunos4
1134 ;;
1135 sun3os3)
1136 basic_machine=m68k-sun
1137 os=-sunos3
1138 ;;
1139 sun3os4)
1140 basic_machine=m68k-sun
1141 os=-sunos4
1142 ;;
1143 sun4os3)
1144 basic_machine=sparc-sun
1145 os=-sunos3
1146 ;;
1147 sun4os4)
1148 basic_machine=sparc-sun
1149 os=-sunos4
1150 ;;
1151 sun4sol2)
1152 basic_machine=sparc-sun
1153 os=-solaris2
1154 ;;
1155 sun3 | sun3-*)
1156 basic_machine=m68k-sun
1157 ;;
1158 sun4)
1159 basic_machine=sparc-sun
1160 ;;
1161 sun386 | sun386i | roadrunner)
1162 basic_machine=i386-sun
1163 ;;
1164 sv1)
1165 basic_machine=sv1-cray
1166 os=-unicos
1167 ;;
1168 symmetry)
1169 basic_machine=i386-sequent
1170 os=-dynix
1171 ;;
1172 t3e)
1173 basic_machine=alphaev5-cray
1174 os=-unicos
1175 ;;
1176 t90)
1177 basic_machine=t90-cray
1178 os=-unicos
1179 ;;
1180 tile*)
1181 basic_machine=$basic_machine-unknown
1182 os=-linux-gnu
1183 ;;
1184 tx39)
1185 basic_machine=mipstx39-unknown
1186 ;;
1187 tx39el)
1188 basic_machine=mipstx39el-unknown
1189 ;;
1190 toad1)
1191 basic_machine=pdp10-xkl
1192 os=-tops20
1193 ;;
1194 tower | tower-32)
1195 basic_machine=m68k-ncr
1196 ;;
1197 tpf)
1198 basic_machine=s390x-ibm
1199 os=-tpf
1200 ;;
1201 udi29k)
1202 basic_machine=a29k-amd
1203 os=-udi
1204 ;;
1205 ultra3)
1206 basic_machine=a29k-nyu
1207 os=-sym1
1208 ;;
1209 v810 | necv810)
1210 basic_machine=v810-nec
1211 os=-none
1212 ;;
1213 vaxv)
1214 basic_machine=vax-dec
1215 os=-sysv
1216 ;;
1217 vms)
1218 basic_machine=vax-dec
1219 os=-vms
1220 ;;
1221 vpp*|vx|vx-*)
1222 basic_machine=f301-fujitsu
1223 ;;
1224 vxworks960)
1225 basic_machine=i960-wrs
1226 os=-vxworks
1227 ;;
1228 vxworks68)
1229 basic_machine=m68k-wrs
1230 os=-vxworks
1231 ;;
1232 vxworks29k)
1233 basic_machine=a29k-wrs
1234 os=-vxworks
1235 ;;
1236 w65*)
1237 basic_machine=w65-wdc
1238 os=-none
1239 ;;
1240 w89k-*)
1241 basic_machine=hppa1.1-winbond
1242 os=-proelf
1243 ;;
1244 xbox)
1245 basic_machine=i686-pc
1246 os=-mingw32
1247 ;;
1248 xps | xps100)
1249 basic_machine=xps100-honeywell
1250 ;;
1251 xscale-* | xscalee[bl]-*)
1252 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1253 ;;
1254 ymp)
1255 basic_machine=ymp-cray
1256 os=-unicos
1257 ;;
1258 z8k-*-coff)
1259 basic_machine=z8k-unknown
1260 os=-sim
1261 ;;
1262 z80-*-coff)
1263 basic_machine=z80-unknown
1264 os=-sim
1265 ;;
1266 none)
1267 basic_machine=none-none
1268 os=-none
1269 ;;
1270
1271 # Here we handle the default manufacturer of certain CPU types. It is in
1272 # some cases the only manufacturer, in others, it is the most popular.
1273 w89k)
1274 basic_machine=hppa1.1-winbond
1275 ;;
1276 op50n)
1277 basic_machine=hppa1.1-oki
1278 ;;
1279 op60c)
1280 basic_machine=hppa1.1-oki
1281 ;;
1282 romp)
1283 basic_machine=romp-ibm
1284 ;;
1285 mmix)
1286 basic_machine=mmix-knuth
1287 ;;
1288 rs6000)
1289 basic_machine=rs6000-ibm
1290 ;;
1291 vax)
1292 basic_machine=vax-dec
1293 ;;
1294 pdp10)
1295 # there are many clones, so DEC is not a safe bet
1296 basic_machine=pdp10-unknown
1297 ;;
1298 pdp11)
1299 basic_machine=pdp11-dec
1300 ;;
1301 we32k)
1302 basic_machine=we32k-att
1303 ;;
1304 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1305 basic_machine=sh-unknown
1306 ;;
1307 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1308 basic_machine=sparc-sun
1309 ;;
1310 cydra)
1311 basic_machine=cydra-cydrome
1312 ;;
1313 orion)
1314 basic_machine=orion-highlevel
1315 ;;
1316 orion105)
1317 basic_machine=clipper-highlevel
1318 ;;
1319 mac | mpw | mac-mpw)
1320 basic_machine=m68k-apple
1321 ;;
1322 pmac | pmac-mpw)
1323 basic_machine=powerpc-apple
1324 ;;
1325 *-unknown)
1326 # Make sure to match an already-canonicalized machine name.
1327 ;;
1328 *)
1329 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1330 exit 1
1331 ;;
1332 esac
1333
1334 # Here we canonicalize certain aliases for manufacturers.
1335 case $basic_machine in
1336 *-digital*)
1337 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1338 ;;
1339 *-commodore*)
1340 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1341 ;;
1342 *)
1343 ;;
1344 esac
1345
1346 # Decode manufacturer-specific aliases for certain operating systems.
1347
1348 if [ x"$os" != x"" ]
1349 then
1350 case $os in
1351 # First match some system type aliases
1352 # that might get confused with valid system types.
1353 # -solaris* is a basic system type, with this one exception.
1354 -auroraux)
1355 os=-auroraux
1356 ;;
1357 -solaris1 | -solaris1.*)
1358 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1359 ;;
1360 -solaris)
1361 os=-solaris2
1362 ;;
1363 -svr4*)
1364 os=-sysv4
1365 ;;
1366 -unixware*)
1367 os=-sysv4.2uw
1368 ;;
1369 -gnu/linux*)
1370 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1371 ;;
1372 # First accept the basic system types.
1373 # The portable systems comes first.
1374 # Each alternative MUST END IN A *, to match a version number.
1375 # -sysv* is not here because it comes later, after sysvr4.
1376 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1377 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1378 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1379 | -sym* | -kopensolaris* | -plan9* \
1380 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1381 | -aos* | -aros* | -cloudabi* | -sortix* \
1382 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1383 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1384 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1385 | -bitrig* | -openbsd* | -solidbsd* \
1386 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1387 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1388 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1389 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1390 | -chorusos* | -chorusrdb* | -cegcc* \
1391 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1392 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1393 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1394 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1395 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1396 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1397 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1398 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1399 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1400 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1401 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1402 # Remember, each alternative MUST END IN *, to match a version number.
1403 ;;
1404 -qnx*)
1405 case $basic_machine in
1406 x86-* | i*86-*)
1407 ;;
1408 *)
1409 os=-nto$os
1410 ;;
1411 esac
1412 ;;
1413 -nto-qnx*)
1414 ;;
1415 -nto*)
1416 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1417 ;;
1418 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1419 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1420 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1421 ;;
1422 -mac*)
1423 os=`echo $os | sed -e 's|mac|macos|'`
1424 ;;
1425 -linux-dietlibc)
1426 os=-linux-dietlibc
1427 ;;
1428 -linux*)
1429 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1430 ;;
1431 -sunos5*)
1432 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1433 ;;
1434 -sunos6*)
1435 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1436 ;;
1437 -opened*)
1438 os=-openedition
1439 ;;
1440 -os400*)
1441 os=-os400
1442 ;;
1443 -wince*)
1444 os=-wince
1445 ;;
1446 -osfrose*)
1447 os=-osfrose
1448 ;;
1449 -osf*)
1450 os=-osf
1451 ;;
1452 -utek*)
1453 os=-bsd
1454 ;;
1455 -dynix*)
1456 os=-bsd
1457 ;;
1458 -acis*)
1459 os=-aos
1460 ;;
1461 -atheos*)
1462 os=-atheos
1463 ;;
1464 -syllable*)
1465 os=-syllable
1466 ;;
1467 -386bsd)
1468 os=-bsd
1469 ;;
1470 -ctix* | -uts*)
1471 os=-sysv
1472 ;;
1473 -nova*)
1474 os=-rtmk-nova
1475 ;;
1476 -ns2 )
1477 os=-nextstep2
1478 ;;
1479 -nsk*)
1480 os=-nsk
1481 ;;
1482 # Preserve the version number of sinix5.
1483 -sinix5.*)
1484 os=`echo $os | sed -e 's|sinix|sysv|'`
1485 ;;
1486 -sinix*)
1487 os=-sysv4
1488 ;;
1489 -tpf*)
1490 os=-tpf
1491 ;;
1492 -triton*)
1493 os=-sysv3
1494 ;;
1495 -oss*)
1496 os=-sysv3
1497 ;;
1498 -svr4)
1499 os=-sysv4
1500 ;;
1501 -svr3)
1502 os=-sysv3
1503 ;;
1504 -sysvr4)
1505 os=-sysv4
1506 ;;
1507 # This must come after -sysvr4.
1508 -sysv*)
1509 ;;
1510 -ose*)
1511 os=-ose
1512 ;;
1513 -es1800*)
1514 os=-ose
1515 ;;
1516 -xenix)
1517 os=-xenix
1518 ;;
1519 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1520 os=-mint
1521 ;;
1522 -aros*)
1523 os=-aros
1524 ;;
1525 -zvmoe)
1526 os=-zvmoe
1527 ;;
1528 -dicos*)
1529 os=-dicos
1530 ;;
1531 -nacl*)
1532 ;;
1533 -none)
1534 ;;
1535 *)
1536 # Get rid of the `-' at the beginning of $os.
1537 os=`echo $os | sed 's/[^-]*-//'`
1538 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1539 exit 1
1540 ;;
1541 esac
1542 else
1543
1544 # Here we handle the default operating systems that come with various machines.
1545 # The value should be what the vendor currently ships out the door with their
1546 # machine or put another way, the most popular os provided with the machine.
1547
1548 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1549 # "-sun"), then you have to tell the case statement up towards the top
1550 # that MANUFACTURER isn't an operating system. Otherwise, code above
1551 # will signal an error saying that MANUFACTURER isn't an operating
1552 # system, and we'll never get to this point.
1553
1554 case $basic_machine in
1555 score-*)
1556 os=-elf
1557 ;;
1558 spu-*)
1559 os=-elf
1560 ;;
1561 *-acorn)
1562 os=-riscix1.2
1563 ;;
1564 arm*-rebel)
1565 os=-linux
1566 ;;
1567 arm*-semi)
1568 os=-aout
1569 ;;
1570 c4x-* | tic4x-*)
1571 os=-coff
1572 ;;
1573 c8051-*)
1574 os=-elf
1575 ;;
1576 hexagon-*)
1577 os=-elf
1578 ;;
1579 tic54x-*)
1580 os=-coff
1581 ;;
1582 tic55x-*)
1583 os=-coff
1584 ;;
1585 tic6x-*)
1586 os=-coff
1587 ;;
1588 # This must come before the *-dec entry.
1589 pdp10-*)
1590 os=-tops20
1591 ;;
1592 pdp11-*)
1593 os=-none
1594 ;;
1595 *-dec | vax-*)
1596 os=-ultrix4.2
1597 ;;
1598 m68*-apollo)
1599 os=-domain
1600 ;;
1601 i386-sun)
1602 os=-sunos4.0.2
1603 ;;
1604 m68000-sun)
1605 os=-sunos3
1606 ;;
1607 m68*-cisco)
1608 os=-aout
1609 ;;
1610 mep-*)
1611 os=-elf
1612 ;;
1613 mips*-cisco)
1614 os=-elf
1615 ;;
1616 mips*-*)
1617 os=-elf
1618 ;;
1619 or32-*)
1620 os=-coff
1621 ;;
1622 *-tti) # must be before sparc entry or we get the wrong os.
1623 os=-sysv3
1624 ;;
1625 sparc-* | *-sun)
1626 os=-sunos4.1.1
1627 ;;
1628 *-be)
1629 os=-beos
1630 ;;
1631 *-haiku)
1632 os=-haiku
1633 ;;
1634 *-ibm)
1635 os=-aix
1636 ;;
1637 *-knuth)
1638 os=-mmixware
1639 ;;
1640 *-wec)
1641 os=-proelf
1642 ;;
1643 *-winbond)
1644 os=-proelf
1645 ;;
1646 *-oki)
1647 os=-proelf
1648 ;;
1649 *-hp)
1650 os=-hpux
1651 ;;
1652 *-hitachi)
1653 os=-hiux
1654 ;;
1655 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1656 os=-sysv
1657 ;;
1658 *-cbm)
1659 os=-amigaos
1660 ;;
1661 *-dg)
1662 os=-dgux
1663 ;;
1664 *-dolphin)
1665 os=-sysv3
1666 ;;
1667 m68k-ccur)
1668 os=-rtu
1669 ;;
1670 m88k-omron*)
1671 os=-luna
1672 ;;
1673 *-next )
1674 os=-nextstep
1675 ;;
1676 *-sequent)
1677 os=-ptx
1678 ;;
1679 *-crds)
1680 os=-unos
1681 ;;
1682 *-ns)
1683 os=-genix
1684 ;;
1685 i370-*)
1686 os=-mvs
1687 ;;
1688 *-next)
1689 os=-nextstep3
1690 ;;
1691 *-gould)
1692 os=-sysv
1693 ;;
1694 *-highlevel)
1695 os=-bsd
1696 ;;
1697 *-encore)
1698 os=-bsd
1699 ;;
1700 *-sgi)
1701 os=-irix
1702 ;;
1703 *-siemens)
1704 os=-sysv4
1705 ;;
1706 *-masscomp)
1707 os=-rtu
1708 ;;
1709 f30[01]-fujitsu | f700-fujitsu)
1710 os=-uxpv
1711 ;;
1712 *-rom68k)
1713 os=-coff
1714 ;;
1715 *-*bug)
1716 os=-coff
1717 ;;
1718 *-apple)
1719 os=-macos
1720 ;;
1721 *-atari*)
1722 os=-mint
1723 ;;
1724 *)
1725 os=-none
1726 ;;
1727 esac
1728 fi
1729
1730 # Here we handle the case where we know the os, and the CPU type, but not the
1731 # manufacturer. We pick the logical manufacturer.
1732 vendor=unknown
1733 case $basic_machine in
1734 *-unknown)
1735 case $os in
1736 -riscix*)
1737 vendor=acorn
1738 ;;
1739 -sunos*)
1740 vendor=sun
1741 ;;
1742 -cnk*|-aix*)
1743 vendor=ibm
1744 ;;
1745 -beos*)
1746 vendor=be
1747 ;;
1748 -hpux*)
1749 vendor=hp
1750 ;;
1751 -mpeix*)
1752 vendor=hp
1753 ;;
1754 -hiux*)
1755 vendor=hitachi
1756 ;;
1757 -unos*)
1758 vendor=crds
1759 ;;
1760 -dgux*)
1761 vendor=dg
1762 ;;
1763 -luna*)
1764 vendor=omron
1765 ;;
1766 -genix*)
1767 vendor=ns
1768 ;;
1769 -mvs* | -opened*)
1770 vendor=ibm
1771 ;;
1772 -os400*)
1773 vendor=ibm
1774 ;;
1775 -ptx*)
1776 vendor=sequent
1777 ;;
1778 -tpf*)
1779 vendor=ibm
1780 ;;
1781 -vxsim* | -vxworks* | -windiss*)
1782 vendor=wrs
1783 ;;
1784 -aux*)
1785 vendor=apple
1786 ;;
1787 -hms*)
1788 vendor=hitachi
1789 ;;
1790 -mpw* | -macos*)
1791 vendor=apple
1792 ;;
1793 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1794 vendor=atari
1795 ;;
1796 -vos*)
1797 vendor=stratus
1798 ;;
1799 esac
1800 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1801 ;;
1802 esac
1803
1804 echo $basic_machine$os
1805 exit
1806
1807 # Local variables:
1808 # eval: (add-hook 'write-file-hooks 'time-stamp)
1809 # time-stamp-start: "timestamp='"
1810 # time-stamp-format: "%:y-%02m-%02d"
1811 # time-stamp-end: "'"
1812 # End:
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for enchant 2.2.8.
3 #
4 #
5 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
6 #
7 #
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 ## -------------------- ##
11 ## M4sh Initialization. ##
12 ## -------------------- ##
13
14 # Be more Bourne compatible
15 DUALCASE=1; export DUALCASE # for MKS sh
16 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17 emulate sh
18 NULLCMD=:
19 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
22 setopt NO_GLOB_SUBST
23 else
24 case `(set -o) 2>/dev/null` in #(
25 *posix*) :
26 set -o posix ;; #(
27 *) :
28 ;;
29 esac
30 fi
31
32
33 as_nl='
34 '
35 export as_nl
36 # Printing a long string crashes Solaris 7 /usr/bin/printf.
37 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
38 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
40 # Prefer a ksh shell builtin over an external printf program on Solaris,
41 # but without wasting forks for bash or zsh.
42 if test -z "$BASH_VERSION$ZSH_VERSION" \
43 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
44 as_echo='print -r --'
45 as_echo_n='print -rn --'
46 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='printf %s\n'
48 as_echo_n='printf %s'
49 else
50 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52 as_echo_n='/usr/ucb/echo -n'
53 else
54 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55 as_echo_n_body='eval
56 arg=$1;
57 case $arg in #(
58 *"$as_nl"*)
59 expr "X$arg" : "X\\(.*\\)$as_nl";
60 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
61 esac;
62 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
63 '
64 export as_echo_n_body
65 as_echo_n='sh -c $as_echo_n_body as_echo'
66 fi
67 export as_echo_body
68 as_echo='sh -c $as_echo_body as_echo'
69 fi
70
71 # The user is always right.
72 if test "${PATH_SEPARATOR+set}" != set; then
73 PATH_SEPARATOR=:
74 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
75 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
76 PATH_SEPARATOR=';'
77 }
78 fi
79
80
81 # IFS
82 # We need space, tab and new line, in precisely that order. Quoting is
83 # there to prevent editors from complaining about space-tab.
84 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
85 # splitting by setting IFS to empty value.)
86 IFS=" "" $as_nl"
87
88 # Find who we are. Look in the path if we contain no directory separator.
89 as_myself=
90 case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93 for as_dir in $PATH
94 do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99 IFS=$as_save_IFS
100
101 ;;
102 esac
103 # We did not find ourselves, most probably we were run as `sh COMMAND'
104 # in which case we are not to be found in the path.
105 if test "x$as_myself" = x; then
106 as_myself=$0
107 fi
108 if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111 fi
112
113 # Unset variables that we do not need and which cause bugs (e.g. in
114 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115 # suppresses any "Segmentation fault" message there. '((' could
116 # trigger a bug in pdksh 5.2.14.
117 for as_var in BASH_ENV ENV MAIL MAILPATH
118 do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120 done
121 PS1='$ '
122 PS2='> '
123 PS4='+ '
124
125 # NLS nuisances.
126 LC_ALL=C
127 export LC_ALL
128 LANGUAGE=C
129 export LANGUAGE
130
131 # CDPATH.
132 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134 # Use a proper internal environment variable to ensure we don't fall
135 # into an infinite loop, continuously re-executing ourselves.
136 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
137 _as_can_reexec=no; export _as_can_reexec;
138 # We cannot yet assume a decent shell, so we have to provide a
139 # neutralization value for shells without unset; and this also
140 # works around shells that cannot unset nonexistent variables.
141 # Preserve -v and -x to the replacement shell.
142 BASH_ENV=/dev/null
143 ENV=/dev/null
144 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
145 case $- in # ((((
146 *v*x* | *x*v* ) as_opts=-vx ;;
147 *v* ) as_opts=-v ;;
148 *x* ) as_opts=-x ;;
149 * ) as_opts= ;;
150 esac
151 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
152 # Admittedly, this is quite paranoid, since all the known shells bail
153 # out after a failed `exec'.
154 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
155 as_fn_exit 255
156 fi
157 # We don't want this to propagate to other subprocesses.
158 { _as_can_reexec=; unset _as_can_reexec;}
159 if test "x$CONFIG_SHELL" = x; then
160 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
161 emulate sh
162 NULLCMD=:
163 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
164 # is contrary to our usage. Disable this feature.
165 alias -g '\${1+\"\$@\"}'='\"\$@\"'
166 setopt NO_GLOB_SUBST
167 else
168 case \`(set -o) 2>/dev/null\` in #(
169 *posix*) :
170 set -o posix ;; #(
171 *) :
172 ;;
173 esac
174 fi
175 "
176 as_required="as_fn_return () { (exit \$1); }
177 as_fn_success () { as_fn_return 0; }
178 as_fn_failure () { as_fn_return 1; }
179 as_fn_ret_success () { return 0; }
180 as_fn_ret_failure () { return 1; }
181
182 exitcode=0
183 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
184 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
185 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
186 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
187 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
188
189 else
190 exitcode=1; echo positional parameters were not saved.
191 fi
192 test x\$exitcode = x0 || exit 1
193 test -x / || exit 1"
194 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
195 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
196 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
197 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
198 test \$(( 1 + 1 )) = 2 || exit 1
199
200 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
201 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
202 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
203 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
204 PATH=/empty FPATH=/empty; export PATH FPATH
205 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
206 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
207 if (eval "$as_required") 2>/dev/null; then :
208 as_have_required=yes
209 else
210 as_have_required=no
211 fi
212 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
213
214 else
215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
216 as_found=false
217 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
218 do
219 IFS=$as_save_IFS
220 test -z "$as_dir" && as_dir=.
221 as_found=:
222 case $as_dir in #(
223 /*)
224 for as_base in sh bash ksh sh5; do
225 # Try only shells that exist, to save several forks.
226 as_shell=$as_dir/$as_base
227 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
228 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
229 CONFIG_SHELL=$as_shell as_have_required=yes
230 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
231 break 2
232 fi
233 fi
234 done;;
235 esac
236 as_found=false
237 done
238 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
239 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
240 CONFIG_SHELL=$SHELL as_have_required=yes
241 fi; }
242 IFS=$as_save_IFS
243
244
245 if test "x$CONFIG_SHELL" != x; then :
246 export CONFIG_SHELL
247 # We cannot yet assume a decent shell, so we have to provide a
248 # neutralization value for shells without unset; and this also
249 # works around shells that cannot unset nonexistent variables.
250 # Preserve -v and -x to the replacement shell.
251 BASH_ENV=/dev/null
252 ENV=/dev/null
253 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
254 case $- in # ((((
255 *v*x* | *x*v* ) as_opts=-vx ;;
256 *v* ) as_opts=-v ;;
257 *x* ) as_opts=-x ;;
258 * ) as_opts= ;;
259 esac
260 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
261 # Admittedly, this is quite paranoid, since all the known shells bail
262 # out after a failed `exec'.
263 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
264 exit 255
265 fi
266
267 if test x$as_have_required = xno; then :
268 $as_echo "$0: This script requires a shell more modern than all"
269 $as_echo "$0: the shells that I found on your system."
270 if test x${ZSH_VERSION+set} = xset ; then
271 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
272 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
273 else
274 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
275 $0: including any error possibly output before this
276 $0: message. Then install a modern shell, or manually run
277 $0: the script under such a shell if you do have one."
278 fi
279 exit 1
280 fi
281 fi
282 fi
283 SHELL=${CONFIG_SHELL-/bin/sh}
284 export SHELL
285 # Unset more variables known to interfere with behavior of common tools.
286 CLICOLOR_FORCE= GREP_OPTIONS=
287 unset CLICOLOR_FORCE GREP_OPTIONS
288
289 ## --------------------- ##
290 ## M4sh Shell Functions. ##
291 ## --------------------- ##
292 # as_fn_unset VAR
293 # ---------------
294 # Portably unset VAR.
295 as_fn_unset ()
296 {
297 { eval $1=; unset $1;}
298 }
299 as_unset=as_fn_unset
300
301 # as_fn_set_status STATUS
302 # -----------------------
303 # Set $? to STATUS, without forking.
304 as_fn_set_status ()
305 {
306 return $1
307 } # as_fn_set_status
308
309 # as_fn_exit STATUS
310 # -----------------
311 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
312 as_fn_exit ()
313 {
314 set +e
315 as_fn_set_status $1
316 exit $1
317 } # as_fn_exit
318
319 # as_fn_mkdir_p
320 # -------------
321 # Create "$as_dir" as a directory, including parents if necessary.
322 as_fn_mkdir_p ()
323 {
324
325 case $as_dir in #(
326 -*) as_dir=./$as_dir;;
327 esac
328 test -d "$as_dir" || eval $as_mkdir_p || {
329 as_dirs=
330 while :; do
331 case $as_dir in #(
332 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
333 *) as_qdir=$as_dir;;
334 esac
335 as_dirs="'$as_qdir' $as_dirs"
336 as_dir=`$as_dirname -- "$as_dir" ||
337 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
338 X"$as_dir" : 'X\(//\)[^/]' \| \
339 X"$as_dir" : 'X\(//\)$' \| \
340 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
341 $as_echo X"$as_dir" |
342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)[^/].*/{
347 s//\1/
348 q
349 }
350 /^X\(\/\/\)$/{
351 s//\1/
352 q
353 }
354 /^X\(\/\).*/{
355 s//\1/
356 q
357 }
358 s/.*/./; q'`
359 test -d "$as_dir" && break
360 done
361 test -z "$as_dirs" || eval "mkdir $as_dirs"
362 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363
364
365 } # as_fn_mkdir_p
366
367 # as_fn_executable_p FILE
368 # -----------------------
369 # Test if FILE is an executable regular file.
370 as_fn_executable_p ()
371 {
372 test -f "$1" && test -x "$1"
373 } # as_fn_executable_p
374 # as_fn_append VAR VALUE
375 # ----------------------
376 # Append the text in VALUE to the end of the definition contained in VAR. Take
377 # advantage of any shell optimizations that allow amortized linear growth over
378 # repeated appends, instead of the typical quadratic growth present in naive
379 # implementations.
380 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
381 eval 'as_fn_append ()
382 {
383 eval $1+=\$2
384 }'
385 else
386 as_fn_append ()
387 {
388 eval $1=\$$1\$2
389 }
390 fi # as_fn_append
391
392 # as_fn_arith ARG...
393 # ------------------
394 # Perform arithmetic evaluation on the ARGs, and store the result in the
395 # global $as_val. Take advantage of shells that can avoid forks. The arguments
396 # must be portable across $(()) and expr.
397 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
398 eval 'as_fn_arith ()
399 {
400 as_val=$(( $* ))
401 }'
402 else
403 as_fn_arith ()
404 {
405 as_val=`expr "$@" || test $? -eq 1`
406 }
407 fi # as_fn_arith
408
409
410 # as_fn_error STATUS ERROR [LINENO LOG_FD]
411 # ----------------------------------------
412 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
413 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
414 # script with STATUS, using 1 if that was 0.
415 as_fn_error ()
416 {
417 as_status=$1; test $as_status -eq 0 && as_status=1
418 if test "$4"; then
419 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
420 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
421 fi
422 $as_echo "$as_me: error: $2" >&2
423 as_fn_exit $as_status
424 } # as_fn_error
425
426 if expr a : '\(a\)' >/dev/null 2>&1 &&
427 test "X`expr 00001 : '.*\(...\)'`" = X001; then
428 as_expr=expr
429 else
430 as_expr=false
431 fi
432
433 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
434 as_basename=basename
435 else
436 as_basename=false
437 fi
438
439 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
440 as_dirname=dirname
441 else
442 as_dirname=false
443 fi
444
445 as_me=`$as_basename -- "$0" ||
446 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
447 X"$0" : 'X\(//\)$' \| \
448 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
449 $as_echo X/"$0" |
450 sed '/^.*\/\([^/][^/]*\)\/*$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\/\)$/{
455 s//\1/
456 q
457 }
458 /^X\/\(\/\).*/{
459 s//\1/
460 q
461 }
462 s/.*/./; q'`
463
464 # Avoid depending upon Character Ranges.
465 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
466 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
467 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
468 as_cr_digits='0123456789'
469 as_cr_alnum=$as_cr_Letters$as_cr_digits
470
471
472 as_lineno_1=$LINENO as_lineno_1a=$LINENO
473 as_lineno_2=$LINENO as_lineno_2a=$LINENO
474 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
475 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
476 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
477 sed -n '
478 p
479 /[$]LINENO/=
480 ' <$as_myself |
481 sed '
482 s/[$]LINENO.*/&-/
483 t lineno
484 b
485 :lineno
486 N
487 :loop
488 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
489 t loop
490 s/-\n.*//
491 ' >$as_me.lineno &&
492 chmod +x "$as_me.lineno" ||
493 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
494
495 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
496 # already done that, so ensure we don't try to do so again and fall
497 # in an infinite loop. This has already happened in practice.
498 _as_can_reexec=no; export _as_can_reexec
499 # Don't try to exec as it changes $[0], causing all sort of problems
500 # (the dirname of $[0] is not the place where we might find the
501 # original and so on. Autoconf is especially sensitive to this).
502 . "./$as_me.lineno"
503 # Exit status is that of the last command.
504 exit
505 }
506
507 ECHO_C= ECHO_N= ECHO_T=
508 case `echo -n x` in #(((((
509 -n*)
510 case `echo 'xy\c'` in
511 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
512 xy) ECHO_C='\c';;
513 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
514 ECHO_T=' ';;
515 esac;;
516 *)
517 ECHO_N='-n';;
518 esac
519
520 rm -f conf$$ conf$$.exe conf$$.file
521 if test -d conf$$.dir; then
522 rm -f conf$$.dir/conf$$.file
523 else
524 rm -f conf$$.dir
525 mkdir conf$$.dir 2>/dev/null
526 fi
527 if (echo >conf$$.file) 2>/dev/null; then
528 if ln -s conf$$.file conf$$ 2>/dev/null; then
529 as_ln_s='ln -s'
530 # ... but there are two gotchas:
531 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
532 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
533 # In both cases, we have to default to `cp -pR'.
534 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
535 as_ln_s='cp -pR'
536 elif ln conf$$.file conf$$ 2>/dev/null; then
537 as_ln_s=ln
538 else
539 as_ln_s='cp -pR'
540 fi
541 else
542 as_ln_s='cp -pR'
543 fi
544 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
545 rmdir conf$$.dir 2>/dev/null
546
547 if mkdir -p . 2>/dev/null; then
548 as_mkdir_p='mkdir -p "$as_dir"'
549 else
550 test -d ./-p && rmdir ./-p
551 as_mkdir_p=false
552 fi
553
554 as_test_x='test -x'
555 as_executable_p=as_fn_executable_p
556
557 # Sed expression to map a string onto a valid CPP name.
558 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
559
560 # Sed expression to map a string onto a valid variable name.
561 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562
563 SHELL=${CONFIG_SHELL-/bin/sh}
564
565
566 test -n "$DJDIR" || exec 7<&0 </dev/null
567 exec 6>&1
568
569 # Name of the host.
570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571 # so uname gets run too.
572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574 #
575 # Initializations.
576 #
577 ac_default_prefix=/usr/local
578 ac_clean_files=
579 ac_config_libobj_dir=.
580 LIBOBJS=
581 cross_compiling=no
582 subdirs=
583 MFLAGS=
584 MAKEFLAGS=
585
586 # Identity of this package.
587 PACKAGE_NAME='enchant'
588 PACKAGE_TARNAME='enchant'
589 PACKAGE_VERSION='2.2.8'
590 PACKAGE_STRING='enchant 2.2.8'
591 PACKAGE_BUGREPORT=''
592 PACKAGE_URL=''
593
594 ac_unique_file="src/enchant.h"
595 # Factoring default headers for most tests.
596 ac_includes_default="\
597 #include <stdio.h>
598 #ifdef HAVE_SYS_TYPES_H
599 # include <sys/types.h>
600 #endif
601 #ifdef HAVE_SYS_STAT_H
602 # include <sys/stat.h>
603 #endif
604 #ifdef STDC_HEADERS
605 # include <stdlib.h>
606 # include <stddef.h>
607 #else
608 # ifdef HAVE_STDLIB_H
609 # include <stdlib.h>
610 # endif
611 #endif
612 #ifdef HAVE_STRING_H
613 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
614 # include <memory.h>
615 # endif
616 # include <string.h>
617 #endif
618 #ifdef HAVE_STRINGS_H
619 # include <strings.h>
620 #endif
621 #ifdef HAVE_INTTYPES_H
622 # include <inttypes.h>
623 #endif
624 #ifdef HAVE_STDINT_H
625 # include <stdint.h>
626 #endif
627 #ifdef HAVE_UNISTD_H
628 # include <unistd.h>
629 #endif"
630
631 ac_func_list=
632 ac_header_list=
633 gl_getopt_required=POSIX
634 ac_config_libobj_dir=lib
635 ac_subst_vars='gltests_LTLIBOBJS
636 gltests_LIBOBJS
637 gl_LTLIBOBJS
638 gl_LIBOBJS
639 am__EXEEXT_FALSE
640 am__EXEEXT_TRUE
641 LTLIBOBJS
642 LIBOBJS
643 WITH_ZEMBEREK_FALSE
644 WITH_ZEMBEREK_TRUE
645 ZEMBEREK_LIBS
646 ZEMBEREK_CFLAGS
647 WITH_APPLESPELL_FALSE
648 WITH_APPLESPELL_TRUE
649 OBJCXXCPP
650 WITH_VOIKKO_FALSE
651 WITH_VOIKKO_TRUE
652 VOIKKO_LIBS
653 VOIKKO_CFLAGS
654 WITH_HSPELL_FALSE
655 WITH_HSPELL_TRUE
656 WITH_ASPELL_FALSE
657 WITH_ASPELL_TRUE
658 WITH_NUSPELL_FALSE
659 WITH_NUSPELL_TRUE
660 NUSPELL_LIBS
661 NUSPELL_CFLAGS
662 WITH_HUNSPELL_FALSE
663 WITH_HUNSPELL_TRUE
664 HUNSPELL_LIBS
665 HUNSPELL_CFLAGS
666 UNITTESTPP_LIBS
667 UNITTESTPP_CFLAGS
668 SHLIBS_IN_BINDIR_FALSE
669 SHLIBS_IN_BINDIR_TRUE
670 OS_WIN32_FALSE
671 OS_WIN32_TRUE
672 ENCHANT_LIBS
673 ENCHANT_CFLAGS
674 ISYSTEM
675 WARN_CXXFLAGS
676 WARN_CFLAGS
677 GLIB_LIBS
678 GLIB_CFLAGS
679 PKG_CONFIG_LIBDIR
680 PKG_CONFIG_PATH
681 PKG_CONFIG
682 shlibext
683 objdir
684 gltests_WITNESS
685 HAVE_UNISTD_H
686 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
687 NEXT_UNISTD_H
688 WINDOWS_STAT_INODES
689 WINDOWS_64_BIT_OFF_T
690 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
691 NEXT_SYS_TYPES_H
692 HAVE_SYS_FILE_H
693 NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H
694 NEXT_SYS_FILE_H
695 NEXT_AS_FIRST_DIRECTIVE_STRING_H
696 NEXT_STRING_H
697 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
698 NEXT_STDLIB_H
699 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
700 NEXT_STDDEF_H
701 GL_GENERATE_STDDEF_H_FALSE
702 GL_GENERATE_STDDEF_H_TRUE
703 STDDEF_H
704 HAVE_WCHAR_T
705 HAVE_MAX_ALIGN_T
706 REPLACE_NULL
707 RELOCATABLE
708 UNDEFINE_STRTOK_R
709 REPLACE_STRSIGNAL
710 REPLACE_STRERROR_R
711 REPLACE_STRERROR
712 REPLACE_STRTOK_R
713 REPLACE_STRCASESTR
714 REPLACE_STRSTR
715 REPLACE_STRNLEN
716 REPLACE_STRNDUP
717 REPLACE_STRNCAT
718 REPLACE_STRDUP
719 REPLACE_STRCHRNUL
720 REPLACE_STPNCPY
721 REPLACE_MEMMEM
722 REPLACE_MEMCHR
723 HAVE_STRVERSCMP
724 HAVE_DECL_STRSIGNAL
725 HAVE_DECL_STRERROR_R
726 HAVE_DECL_STRTOK_R
727 HAVE_STRCASESTR
728 HAVE_STRSEP
729 HAVE_STRPBRK
730 HAVE_DECL_STRNLEN
731 HAVE_DECL_STRNDUP
732 HAVE_DECL_STRDUP
733 HAVE_STRCHRNUL
734 HAVE_STPNCPY
735 HAVE_STPCPY
736 HAVE_RAWMEMCHR
737 HAVE_DECL_MEMRCHR
738 HAVE_MEMPCPY
739 HAVE_DECL_MEMMEM
740 HAVE_MEMCHR
741 HAVE_FFSLL
742 HAVE_FFSL
743 HAVE_EXPLICIT_BZERO
744 HAVE_MBSLEN
745 GNULIB_STRVERSCMP
746 GNULIB_STRSIGNAL
747 GNULIB_STRERROR_R
748 GNULIB_STRERROR
749 GNULIB_MBSTOK_R
750 GNULIB_MBSSEP
751 GNULIB_MBSSPN
752 GNULIB_MBSPBRK
753 GNULIB_MBSCSPN
754 GNULIB_MBSCASESTR
755 GNULIB_MBSPCASECMP
756 GNULIB_MBSNCASECMP
757 GNULIB_MBSCASECMP
758 GNULIB_MBSSTR
759 GNULIB_MBSRCHR
760 GNULIB_MBSCHR
761 GNULIB_MBSNLEN
762 GNULIB_MBSLEN
763 GNULIB_STRTOK_R
764 GNULIB_STRCASESTR
765 GNULIB_STRSTR
766 GNULIB_STRSEP
767 GNULIB_STRPBRK
768 GNULIB_STRNLEN
769 GNULIB_STRNDUP
770 GNULIB_STRNCAT
771 GNULIB_STRDUP
772 GNULIB_STRCHRNUL
773 GNULIB_STPNCPY
774 GNULIB_STPCPY
775 GNULIB_RAWMEMCHR
776 GNULIB_MEMRCHR
777 GNULIB_MEMPCPY
778 GNULIB_MEMMEM
779 GNULIB_MEMCHR
780 GNULIB_FFSLL
781 GNULIB_FFSL
782 GNULIB_EXPLICIT_BZERO
783 HAVE_MSVC_INVALID_PARAMETER_HANDLER
784 REPLACE_WCTOMB
785 REPLACE_UNSETENV
786 REPLACE_STRTOD
787 REPLACE_SETENV
788 REPLACE_REALPATH
789 REPLACE_REALLOC
790 REPLACE_RANDOM_R
791 REPLACE_QSORT_R
792 REPLACE_PUTENV
793 REPLACE_PTSNAME_R
794 REPLACE_PTSNAME
795 REPLACE_MKSTEMP
796 REPLACE_MBTOWC
797 REPLACE_MALLOC
798 REPLACE_CANONICALIZE_FILE_NAME
799 REPLACE_CALLOC
800 HAVE_DECL_UNSETENV
801 HAVE_UNLOCKPT
802 HAVE_SYS_LOADAVG_H
803 HAVE_STRUCT_RANDOM_DATA
804 HAVE_STRTOULL
805 HAVE_STRTOLL
806 HAVE_STRTOD
807 HAVE_DECL_SETSTATE
808 HAVE_DECL_SETENV
809 HAVE_SETENV
810 HAVE_SECURE_GETENV
811 HAVE_RPMATCH
812 HAVE_REALPATH
813 HAVE_REALLOCARRAY
814 HAVE_RANDOM_R
815 HAVE_RANDOM_H
816 HAVE_RANDOM
817 HAVE_QSORT_R
818 HAVE_PTSNAME_R
819 HAVE_PTSNAME
820 HAVE_POSIX_OPENPT
821 HAVE_MKSTEMPS
822 HAVE_MKSTEMP
823 HAVE_MKOSTEMPS
824 HAVE_MKOSTEMP
825 HAVE_MKDTEMP
826 HAVE_DECL_INITSTATE
827 HAVE_GRANTPT
828 HAVE_GETSUBOPT
829 HAVE_DECL_GETLOADAVG
830 HAVE_CANONICALIZE_FILE_NAME
831 HAVE_ATOLL
832 HAVE__EXIT
833 GNULIB_WCTOMB
834 GNULIB_UNSETENV
835 GNULIB_UNLOCKPT
836 GNULIB_SYSTEM_POSIX
837 GNULIB_STRTOULL
838 GNULIB_STRTOLL
839 GNULIB_STRTOD
840 GNULIB_SETENV
841 GNULIB_SECURE_GETENV
842 GNULIB_RPMATCH
843 GNULIB_REALPATH
844 GNULIB_REALLOC_POSIX
845 GNULIB_REALLOCARRAY
846 GNULIB_RANDOM_R
847 GNULIB_RANDOM
848 GNULIB_QSORT_R
849 GNULIB_PUTENV
850 GNULIB_PTSNAME_R
851 GNULIB_PTSNAME
852 GNULIB_POSIX_OPENPT
853 GNULIB_MKSTEMPS
854 GNULIB_MKSTEMP
855 GNULIB_MKOSTEMPS
856 GNULIB_MKOSTEMP
857 GNULIB_MKDTEMP
858 GNULIB_MBTOWC
859 GNULIB_MALLOC_POSIX
860 GNULIB_GRANTPT
861 GNULIB_GETSUBOPT
862 GNULIB_GETLOADAVG
863 GNULIB_CANONICALIZE_FILE_NAME
864 GNULIB_CALLOC_POSIX
865 GNULIB_ATOLL
866 GNULIB__EXIT
867 GNU_MAKE_FALSE
868 GNU_MAKE_TRUE
869 LTLIBINTL
870 LIBINTL
871 GNULIB_GL_UNISTD_H_GETOPT
872 GETOPT_CDEFS_H
873 GETOPT_H
874 HAVE_SYS_CDEFS_H
875 HAVE_GETOPT_H
876 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
877 NEXT_GETOPT_H
878 PRAGMA_COLUMNS
879 PRAGMA_SYSTEM_HEADER
880 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
881 INCLUDE_NEXT
882 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
883 UNISTD_H_HAVE_WINSOCK2_H
884 REPLACE_WRITE
885 REPLACE_USLEEP
886 REPLACE_UNLINKAT
887 REPLACE_UNLINK
888 REPLACE_TTYNAME_R
889 REPLACE_TRUNCATE
890 REPLACE_SYMLINKAT
891 REPLACE_SYMLINK
892 REPLACE_SLEEP
893 REPLACE_RMDIR
894 REPLACE_READLINKAT
895 REPLACE_READLINK
896 REPLACE_READ
897 REPLACE_PWRITE
898 REPLACE_PREAD
899 REPLACE_LSEEK
900 REPLACE_LINKAT
901 REPLACE_LINK
902 REPLACE_LCHOWN
903 REPLACE_ISATTY
904 REPLACE_GETPASS
905 REPLACE_GETPAGESIZE
906 REPLACE_GETGROUPS
907 REPLACE_GETLOGIN_R
908 REPLACE_GETDTABLESIZE
909 REPLACE_GETDOMAINNAME
910 REPLACE_GETCWD
911 REPLACE_FTRUNCATE
912 REPLACE_FCHOWNAT
913 REPLACE_FACCESSAT
914 REPLACE_DUP2
915 REPLACE_DUP
916 REPLACE_CLOSE
917 REPLACE_CHOWN
918 HAVE_SYS_PARAM_H
919 HAVE_OS_H
920 HAVE_DECL_TTYNAME_R
921 HAVE_DECL_TRUNCATE
922 HAVE_DECL_SETHOSTNAME
923 HAVE_DECL_GETUSERSHELL
924 HAVE_DECL_GETPAGESIZE
925 HAVE_DECL_GETLOGIN_R
926 HAVE_DECL_GETLOGIN
927 HAVE_DECL_GETDOMAINNAME
928 HAVE_DECL_FDATASYNC
929 HAVE_DECL_FCHDIR
930 HAVE_DECL_ENVIRON
931 HAVE_USLEEP
932 HAVE_UNLINKAT
933 HAVE_SYMLINKAT
934 HAVE_SYMLINK
935 HAVE_SLEEP
936 HAVE_SETHOSTNAME
937 HAVE_READLINKAT
938 HAVE_READLINK
939 HAVE_PWRITE
940 HAVE_PREAD
941 HAVE_PIPE2
942 HAVE_PIPE
943 HAVE_LINKAT
944 HAVE_LINK
945 HAVE_LCHOWN
946 HAVE_GROUP_MEMBER
947 HAVE_GETPASS
948 HAVE_GETPAGESIZE
949 HAVE_GETLOGIN
950 HAVE_GETHOSTNAME
951 HAVE_GETGROUPS
952 HAVE_GETDTABLESIZE
953 HAVE_FTRUNCATE
954 HAVE_FSYNC
955 HAVE_FDATASYNC
956 HAVE_FCHOWNAT
957 HAVE_FCHDIR
958 HAVE_FACCESSAT
959 HAVE_EUIDACCESS
960 HAVE_DUP3
961 HAVE_DUP2
962 HAVE_CHOWN
963 GNULIB_WRITE
964 GNULIB_USLEEP
965 GNULIB_UNLINKAT
966 GNULIB_UNLINK
967 GNULIB_UNISTD_H_SIGPIPE
968 GNULIB_UNISTD_H_NONBLOCKING
969 GNULIB_TTYNAME_R
970 GNULIB_TRUNCATE
971 GNULIB_SYMLINKAT
972 GNULIB_SYMLINK
973 GNULIB_SLEEP
974 GNULIB_SETHOSTNAME
975 GNULIB_RMDIR
976 GNULIB_READLINKAT
977 GNULIB_READLINK
978 GNULIB_READ
979 GNULIB_PWRITE
980 GNULIB_PREAD
981 GNULIB_PIPE2
982 GNULIB_PIPE
983 GNULIB_LSEEK
984 GNULIB_LINKAT
985 GNULIB_LINK
986 GNULIB_LCHOWN
987 GNULIB_ISATTY
988 GNULIB_GROUP_MEMBER
989 GNULIB_GETUSERSHELL
990 GNULIB_GETPASS
991 GNULIB_GETPAGESIZE
992 GNULIB_GETLOGIN_R
993 GNULIB_GETLOGIN
994 GNULIB_GETHOSTNAME
995 GNULIB_GETGROUPS
996 GNULIB_GETDTABLESIZE
997 GNULIB_GETDOMAINNAME
998 GNULIB_GETCWD
999 GNULIB_FTRUNCATE
1000 GNULIB_FSYNC
1001 GNULIB_FDATASYNC
1002 GNULIB_FCHOWNAT
1003 GNULIB_FCHDIR
1004 GNULIB_FACCESSAT
1005 GNULIB_EUIDACCESS
1006 GNULIB_ENVIRON
1007 GNULIB_DUP3
1008 GNULIB_DUP2
1009 GNULIB_DUP
1010 GNULIB_CLOSE
1011 GNULIB_CHOWN
1012 GNULIB_CHDIR
1013 HAVE_FLOCK
1014 GNULIB_FLOCK
1015 pkglibexecdir
1016 lispdir
1017 GL_COND_LIBTOOL_FALSE
1018 GL_COND_LIBTOOL_TRUE
1019 RC
1020 CXXCPP
1021 LT_SYS_LIBRARY_PATH
1022 OTOOL64
1023 OTOOL
1024 LIPO
1025 NMEDIT
1026 DSYMUTIL
1027 MANIFEST_TOOL
1028 ac_ct_AR
1029 NM
1030 ac_ct_DUMPBIN
1031 DUMPBIN
1032 LD
1033 FGREP
1034 SED
1035 LIBTOOL
1036 OBJDUMP
1037 DLLTOOL
1038 AS
1039 LN_S
1040 am__fastdepOBJCXX_FALSE
1041 am__fastdepOBJCXX_TRUE
1042 OBJCXXDEPMODE
1043 ac_ct_OBJCXX
1044 OBJCXXFLAGS
1045 OBJCXX
1046 HAVE_CXX11
1047 am__fastdepCXX_FALSE
1048 am__fastdepCXX_TRUE
1049 CXXDEPMODE
1050 ac_ct_CXX
1051 CXXFLAGS
1052 CXX
1053 RANLIB
1054 ARFLAGS
1055 AR
1056 EGREP
1057 GREP
1058 CPP
1059 am__fastdepCC_FALSE
1060 am__fastdepCC_TRUE
1061 CCDEPMODE
1062 am__nodep
1063 AMDEPBACKSLASH
1064 AMDEP_FALSE
1065 AMDEP_TRUE
1066 am__quote
1067 am__include
1068 DEPDIR
1069 OBJEXT
1070 EXEEXT
1071 ac_ct_CC
1072 CPPFLAGS
1073 LDFLAGS
1074 CFLAGS
1075 CC
1076 ENCHANT_MICRO_VERSION
1077 ENCHANT_MINOR_VERSION
1078 ENCHANT_MAJOR_VERSION
1079 VERSION_INFO
1080 host_os
1081 host_vendor
1082 host_cpu
1083 host
1084 build_os
1085 build_vendor
1086 build_cpu
1087 build
1088 AM_BACKSLASH
1089 AM_DEFAULT_VERBOSITY
1090 AM_DEFAULT_V
1091 AM_V
1092 am__untar
1093 am__tar
1094 AMTAR
1095 am__leading_dot
1096 SET_MAKE
1097 AWK
1098 mkdir_p
1099 MKDIR_P
1100 INSTALL_STRIP_PROGRAM
1101 STRIP
1102 install_sh
1103 MAKEINFO
1104 AUTOHEADER
1105 AUTOMAKE
1106 AUTOCONF
1107 ACLOCAL
1108 VERSION
1109 PACKAGE
1110 CYGPATH_W
1111 am__isrc
1112 INSTALL_DATA
1113 INSTALL_SCRIPT
1114 INSTALL_PROGRAM
1115 target_alias
1116 host_alias
1117 build_alias
1118 LIBS
1119 ECHO_T
1120 ECHO_N
1121 ECHO_C
1122 DEFS
1123 mandir
1124 localedir
1125 libdir
1126 psdir
1127 pdfdir
1128 dvidir
1129 htmldir
1130 infodir
1131 docdir
1132 oldincludedir
1133 includedir
1134 runstatedir
1135 localstatedir
1136 sharedstatedir
1137 sysconfdir
1138 datadir
1139 datarootdir
1140 libexecdir
1141 sbindir
1142 bindir
1143 program_transform_name
1144 prefix
1145 exec_prefix
1146 PACKAGE_URL
1147 PACKAGE_BUGREPORT
1148 PACKAGE_STRING
1149 PACKAGE_VERSION
1150 PACKAGE_TARNAME
1151 PACKAGE_NAME
1152 PATH_SEPARATOR
1153 SHELL'
1154 ac_subst_files=''
1155 ac_user_opts='
1156 enable_option_checking
1157 enable_silent_rules
1158 enable_dependency_tracking
1159 enable_shared
1160 enable_static
1161 with_pic
1162 enable_fast_install
1163 with_aix_soname
1164 with_gnu_ld
1165 with_sysroot
1166 enable_libtool_lock
1167 enable_relocatable
1168 enable_gcc_warnings
1169 with_hunspell
1170 with_hunspell_dir
1171 with_nuspell
1172 with_nuspell_dir
1173 with_aspell
1174 with_aspell_dir
1175 with_hspell
1176 with_hspell_dir
1177 with_voikko
1178 with_voikko_dir
1179 with_applespell
1180 with_applespell_dir
1181 with_zemberek
1182 with_zemberek_dir
1183 '
1184 ac_precious_vars='build_alias
1185 host_alias
1186 target_alias
1187 CC
1188 CFLAGS
1189 LDFLAGS
1190 LIBS
1191 CPPFLAGS
1192 CPP
1193 CXX
1194 CXXFLAGS
1195 CCC
1196 OBJCXX
1197 OBJCXXFLAGS
1198 LT_SYS_LIBRARY_PATH
1199 CXXCPP
1200 PKG_CONFIG
1201 PKG_CONFIG_PATH
1202 PKG_CONFIG_LIBDIR
1203 GLIB_CFLAGS
1204 GLIB_LIBS
1205 UNITTESTPP_CFLAGS
1206 UNITTESTPP_LIBS
1207 HUNSPELL_CFLAGS
1208 HUNSPELL_LIBS
1209 NUSPELL_CFLAGS
1210 NUSPELL_LIBS
1211 VOIKKO_CFLAGS
1212 VOIKKO_LIBS
1213 OBJCXXCPP
1214 ZEMBEREK_CFLAGS
1215 ZEMBEREK_LIBS'
1216
1217
1218 # Initialize some variables set by options.
1219 ac_init_help=
1220 ac_init_version=false
1221 ac_unrecognized_opts=
1222 ac_unrecognized_sep=
1223 # The variables have the same names as the options, with
1224 # dashes changed to underlines.
1225 cache_file=/dev/null
1226 exec_prefix=NONE
1227 no_create=
1228 no_recursion=
1229 prefix=NONE
1230 program_prefix=NONE
1231 program_suffix=NONE
1232 program_transform_name=s,x,x,
1233 silent=
1234 site=
1235 srcdir=
1236 verbose=
1237 x_includes=NONE
1238 x_libraries=NONE
1239
1240 # Installation directory options.
1241 # These are left unexpanded so users can "make install exec_prefix=/foo"
1242 # and all the variables that are supposed to be based on exec_prefix
1243 # by default will actually change.
1244 # Use braces instead of parens because sh, perl, etc. also accept them.
1245 # (The list follows the same order as the GNU Coding Standards.)
1246 bindir='${exec_prefix}/bin'
1247 sbindir='${exec_prefix}/sbin'
1248 libexecdir='${exec_prefix}/libexec'
1249 datarootdir='${prefix}/share'
1250 datadir='${datarootdir}'
1251 sysconfdir='${prefix}/etc'
1252 sharedstatedir='${prefix}/com'
1253 localstatedir='${prefix}/var'
1254 runstatedir='${localstatedir}/run'
1255 includedir='${prefix}/include'
1256 oldincludedir='/usr/include'
1257 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1258 infodir='${datarootdir}/info'
1259 htmldir='${docdir}'
1260 dvidir='${docdir}'
1261 pdfdir='${docdir}'
1262 psdir='${docdir}'
1263 libdir='${exec_prefix}/lib'
1264 localedir='${datarootdir}/locale'
1265 mandir='${datarootdir}/man'
1266
1267 ac_prev=
1268 ac_dashdash=
1269 for ac_option
1270 do
1271 # If the previous option needs an argument, assign it.
1272 if test -n "$ac_prev"; then
1273 eval $ac_prev=\$ac_option
1274 ac_prev=
1275 continue
1276 fi
1277
1278 case $ac_option in
1279 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1280 *=) ac_optarg= ;;
1281 *) ac_optarg=yes ;;
1282 esac
1283
1284 # Accept the important Cygnus configure options, so we can diagnose typos.
1285
1286 case $ac_dashdash$ac_option in
1287 --)
1288 ac_dashdash=yes ;;
1289
1290 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1291 ac_prev=bindir ;;
1292 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1293 bindir=$ac_optarg ;;
1294
1295 -build | --build | --buil | --bui | --bu)
1296 ac_prev=build_alias ;;
1297 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1298 build_alias=$ac_optarg ;;
1299
1300 -cache-file | --cache-file | --cache-fil | --cache-fi \
1301 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1302 ac_prev=cache_file ;;
1303 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1304 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1305 cache_file=$ac_optarg ;;
1306
1307 --config-cache | -C)
1308 cache_file=config.cache ;;
1309
1310 -datadir | --datadir | --datadi | --datad)
1311 ac_prev=datadir ;;
1312 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1313 datadir=$ac_optarg ;;
1314
1315 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1316 | --dataroo | --dataro | --datar)
1317 ac_prev=datarootdir ;;
1318 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1319 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1320 datarootdir=$ac_optarg ;;
1321
1322 -disable-* | --disable-*)
1323 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1324 # Reject names that are not valid shell variable names.
1325 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1326 as_fn_error $? "invalid feature name: $ac_useropt"
1327 ac_useropt_orig=$ac_useropt
1328 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1329 case $ac_user_opts in
1330 *"
1331 "enable_$ac_useropt"
1332 "*) ;;
1333 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1334 ac_unrecognized_sep=', ';;
1335 esac
1336 eval enable_$ac_useropt=no ;;
1337
1338 -docdir | --docdir | --docdi | --doc | --do)
1339 ac_prev=docdir ;;
1340 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1341 docdir=$ac_optarg ;;
1342
1343 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1344 ac_prev=dvidir ;;
1345 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1346 dvidir=$ac_optarg ;;
1347
1348 -enable-* | --enable-*)
1349 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1350 # Reject names that are not valid shell variable names.
1351 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1352 as_fn_error $? "invalid feature name: $ac_useropt"
1353 ac_useropt_orig=$ac_useropt
1354 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1355 case $ac_user_opts in
1356 *"
1357 "enable_$ac_useropt"
1358 "*) ;;
1359 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1360 ac_unrecognized_sep=', ';;
1361 esac
1362 eval enable_$ac_useropt=\$ac_optarg ;;
1363
1364 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1365 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1366 | --exec | --exe | --ex)
1367 ac_prev=exec_prefix ;;
1368 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1369 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1370 | --exec=* | --exe=* | --ex=*)
1371 exec_prefix=$ac_optarg ;;
1372
1373 -gas | --gas | --ga | --g)
1374 # Obsolete; use --with-gas.
1375 with_gas=yes ;;
1376
1377 -help | --help | --hel | --he | -h)
1378 ac_init_help=long ;;
1379 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1380 ac_init_help=recursive ;;
1381 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1382 ac_init_help=short ;;
1383
1384 -host | --host | --hos | --ho)
1385 ac_prev=host_alias ;;
1386 -host=* | --host=* | --hos=* | --ho=*)
1387 host_alias=$ac_optarg ;;
1388
1389 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1390 ac_prev=htmldir ;;
1391 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1392 | --ht=*)
1393 htmldir=$ac_optarg ;;
1394
1395 -includedir | --includedir | --includedi | --included | --include \
1396 | --includ | --inclu | --incl | --inc)
1397 ac_prev=includedir ;;
1398 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1399 | --includ=* | --inclu=* | --incl=* | --inc=*)
1400 includedir=$ac_optarg ;;
1401
1402 -infodir | --infodir | --infodi | --infod | --info | --inf)
1403 ac_prev=infodir ;;
1404 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1405 infodir=$ac_optarg ;;
1406
1407 -libdir | --libdir | --libdi | --libd)
1408 ac_prev=libdir ;;
1409 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1410 libdir=$ac_optarg ;;
1411
1412 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1413 | --libexe | --libex | --libe)
1414 ac_prev=libexecdir ;;
1415 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1416 | --libexe=* | --libex=* | --libe=*)
1417 libexecdir=$ac_optarg ;;
1418
1419 -localedir | --localedir | --localedi | --localed | --locale)
1420 ac_prev=localedir ;;
1421 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1422 localedir=$ac_optarg ;;
1423
1424 -localstatedir | --localstatedir | --localstatedi | --localstated \
1425 | --localstate | --localstat | --localsta | --localst | --locals)
1426 ac_prev=localstatedir ;;
1427 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1428 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1429 localstatedir=$ac_optarg ;;
1430
1431 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1432 ac_prev=mandir ;;
1433 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1434 mandir=$ac_optarg ;;
1435
1436 -nfp | --nfp | --nf)
1437 # Obsolete; use --without-fp.
1438 with_fp=no ;;
1439
1440 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1441 | --no-cr | --no-c | -n)
1442 no_create=yes ;;
1443
1444 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1445 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1446 no_recursion=yes ;;
1447
1448 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1449 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1450 | --oldin | --oldi | --old | --ol | --o)
1451 ac_prev=oldincludedir ;;
1452 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1453 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1454 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1455 oldincludedir=$ac_optarg ;;
1456
1457 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1458 ac_prev=prefix ;;
1459 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1460 prefix=$ac_optarg ;;
1461
1462 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1463 | --program-pre | --program-pr | --program-p)
1464 ac_prev=program_prefix ;;
1465 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1466 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1467 program_prefix=$ac_optarg ;;
1468
1469 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1470 | --program-suf | --program-su | --program-s)
1471 ac_prev=program_suffix ;;
1472 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1473 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1474 program_suffix=$ac_optarg ;;
1475
1476 -program-transform-name | --program-transform-name \
1477 | --program-transform-nam | --program-transform-na \
1478 | --program-transform-n | --program-transform- \
1479 | --program-transform | --program-transfor \
1480 | --program-transfo | --program-transf \
1481 | --program-trans | --program-tran \
1482 | --progr-tra | --program-tr | --program-t)
1483 ac_prev=program_transform_name ;;
1484 -program-transform-name=* | --program-transform-name=* \
1485 | --program-transform-nam=* | --program-transform-na=* \
1486 | --program-transform-n=* | --program-transform-=* \
1487 | --program-transform=* | --program-transfor=* \
1488 | --program-transfo=* | --program-transf=* \
1489 | --program-trans=* | --program-tran=* \
1490 | --progr-tra=* | --program-tr=* | --program-t=*)
1491 program_transform_name=$ac_optarg ;;
1492
1493 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1494 ac_prev=pdfdir ;;
1495 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1496 pdfdir=$ac_optarg ;;
1497
1498 -psdir | --psdir | --psdi | --psd | --ps)
1499 ac_prev=psdir ;;
1500 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1501 psdir=$ac_optarg ;;
1502
1503 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1504 | -silent | --silent | --silen | --sile | --sil)
1505 silent=yes ;;
1506
1507 -runstatedir | --runstatedir | --runstatedi | --runstated \
1508 | --runstate | --runstat | --runsta | --runst | --runs \
1509 | --run | --ru | --r)
1510 ac_prev=runstatedir ;;
1511 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1512 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1513 | --run=* | --ru=* | --r=*)
1514 runstatedir=$ac_optarg ;;
1515
1516 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1517 ac_prev=sbindir ;;
1518 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1519 | --sbi=* | --sb=*)
1520 sbindir=$ac_optarg ;;
1521
1522 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1523 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1524 | --sharedst | --shareds | --shared | --share | --shar \
1525 | --sha | --sh)
1526 ac_prev=sharedstatedir ;;
1527 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1528 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1529 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1530 | --sha=* | --sh=*)
1531 sharedstatedir=$ac_optarg ;;
1532
1533 -site | --site | --sit)
1534 ac_prev=site ;;
1535 -site=* | --site=* | --sit=*)
1536 site=$ac_optarg ;;
1537
1538 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1539 ac_prev=srcdir ;;
1540 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1541 srcdir=$ac_optarg ;;
1542
1543 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1544 | --syscon | --sysco | --sysc | --sys | --sy)
1545 ac_prev=sysconfdir ;;
1546 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1547 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1548 sysconfdir=$ac_optarg ;;
1549
1550 -target | --target | --targe | --targ | --tar | --ta | --t)
1551 ac_prev=target_alias ;;
1552 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1553 target_alias=$ac_optarg ;;
1554
1555 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1556 verbose=yes ;;
1557
1558 -version | --version | --versio | --versi | --vers | -V)
1559 ac_init_version=: ;;
1560
1561 -with-* | --with-*)
1562 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1563 # Reject names that are not valid shell variable names.
1564 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1565 as_fn_error $? "invalid package name: $ac_useropt"
1566 ac_useropt_orig=$ac_useropt
1567 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1568 case $ac_user_opts in
1569 *"
1570 "with_$ac_useropt"
1571 "*) ;;
1572 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1573 ac_unrecognized_sep=', ';;
1574 esac
1575 eval with_$ac_useropt=\$ac_optarg ;;
1576
1577 -without-* | --without-*)
1578 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1579 # Reject names that are not valid shell variable names.
1580 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1581 as_fn_error $? "invalid package name: $ac_useropt"
1582 ac_useropt_orig=$ac_useropt
1583 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1584 case $ac_user_opts in
1585 *"
1586 "with_$ac_useropt"
1587 "*) ;;
1588 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1589 ac_unrecognized_sep=', ';;
1590 esac
1591 eval with_$ac_useropt=no ;;
1592
1593 --x)
1594 # Obsolete; use --with-x.
1595 with_x=yes ;;
1596
1597 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1598 | --x-incl | --x-inc | --x-in | --x-i)
1599 ac_prev=x_includes ;;
1600 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1601 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1602 x_includes=$ac_optarg ;;
1603
1604 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1605 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1606 ac_prev=x_libraries ;;
1607 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1608 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1609 x_libraries=$ac_optarg ;;
1610
1611 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1612 Try \`$0 --help' for more information"
1613 ;;
1614
1615 *=*)
1616 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1617 # Reject names that are not valid shell variable names.
1618 case $ac_envvar in #(
1619 '' | [0-9]* | *[!_$as_cr_alnum]* )
1620 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1621 esac
1622 eval $ac_envvar=\$ac_optarg
1623 export $ac_envvar ;;
1624
1625 *)
1626 # FIXME: should be removed in autoconf 3.0.
1627 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1628 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1629 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1630 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1631 ;;
1632
1633 esac
1634 done
1635
1636 if test -n "$ac_prev"; then
1637 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1638 as_fn_error $? "missing argument to $ac_option"
1639 fi
1640
1641 if test -n "$ac_unrecognized_opts"; then
1642 case $enable_option_checking in
1643 no) ;;
1644 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1645 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1646 esac
1647 fi
1648
1649 # Check all directory arguments for consistency.
1650 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1651 datadir sysconfdir sharedstatedir localstatedir includedir \
1652 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1653 libdir localedir mandir runstatedir
1654 do
1655 eval ac_val=\$$ac_var
1656 # Remove trailing slashes.
1657 case $ac_val in
1658 */ )
1659 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1660 eval $ac_var=\$ac_val;;
1661 esac
1662 # Be sure to have absolute directory names.
1663 case $ac_val in
1664 [\\/$]* | ?:[\\/]* ) continue;;
1665 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1666 esac
1667 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1668 done
1669
1670 # There might be people who depend on the old broken behavior: `$host'
1671 # used to hold the argument of --host etc.
1672 # FIXME: To remove some day.
1673 build=$build_alias
1674 host=$host_alias
1675 target=$target_alias
1676
1677 # FIXME: To remove some day.
1678 if test "x$host_alias" != x; then
1679 if test "x$build_alias" = x; then
1680 cross_compiling=maybe
1681 elif test "x$build_alias" != "x$host_alias"; then
1682 cross_compiling=yes
1683 fi
1684 fi
1685
1686 ac_tool_prefix=
1687 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1688
1689 test "$silent" = yes && exec 6>/dev/null
1690
1691
1692 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1693 ac_ls_di=`ls -di .` &&
1694 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1695 as_fn_error $? "working directory cannot be determined"
1696 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1697 as_fn_error $? "pwd does not report name of working directory"
1698
1699
1700 # Find the source files, if location was not specified.
1701 if test -z "$srcdir"; then
1702 ac_srcdir_defaulted=yes
1703 # Try the directory containing this script, then the parent directory.
1704 ac_confdir=`$as_dirname -- "$as_myself" ||
1705 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1706 X"$as_myself" : 'X\(//\)[^/]' \| \
1707 X"$as_myself" : 'X\(//\)$' \| \
1708 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1709 $as_echo X"$as_myself" |
1710 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1711 s//\1/
1712 q
1713 }
1714 /^X\(\/\/\)[^/].*/{
1715 s//\1/
1716 q
1717 }
1718 /^X\(\/\/\)$/{
1719 s//\1/
1720 q
1721 }
1722 /^X\(\/\).*/{
1723 s//\1/
1724 q
1725 }
1726 s/.*/./; q'`
1727 srcdir=$ac_confdir
1728 if test ! -r "$srcdir/$ac_unique_file"; then
1729 srcdir=..
1730 fi
1731 else
1732 ac_srcdir_defaulted=no
1733 fi
1734 if test ! -r "$srcdir/$ac_unique_file"; then
1735 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1736 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1737 fi
1738 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1739 ac_abs_confdir=`(
1740 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1741 pwd)`
1742 # When building in place, set srcdir=.
1743 if test "$ac_abs_confdir" = "$ac_pwd"; then
1744 srcdir=.
1745 fi
1746 # Remove unnecessary trailing slashes from srcdir.
1747 # Double slashes in file names in object file debugging info
1748 # mess up M-x gdb in Emacs.
1749 case $srcdir in
1750 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1751 esac
1752 for ac_var in $ac_precious_vars; do
1753 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1754 eval ac_env_${ac_var}_value=\$${ac_var}
1755 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1756 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1757 done
1758
1759 #
1760 # Report the --help message.
1761 #
1762 if test "$ac_init_help" = "long"; then
1763 # Omit some internal or obsolete options to make the list less imposing.
1764 # This message is too long to be a string in the A/UX 3.1 sh.
1765 cat <<_ACEOF
1766 \`configure' configures enchant 2.2.8 to adapt to many kinds of systems.
1767
1768 Usage: $0 [OPTION]... [VAR=VALUE]...
1769
1770 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1771 VAR=VALUE. See below for descriptions of some of the useful variables.
1772
1773 Defaults for the options are specified in brackets.
1774
1775 Configuration:
1776 -h, --help display this help and exit
1777 --help=short display options specific to this package
1778 --help=recursive display the short help of all the included packages
1779 -V, --version display version information and exit
1780 -q, --quiet, --silent do not print \`checking ...' messages
1781 --cache-file=FILE cache test results in FILE [disabled]
1782 -C, --config-cache alias for \`--cache-file=config.cache'
1783 -n, --no-create do not create output files
1784 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1785
1786 Installation directories:
1787 --prefix=PREFIX install architecture-independent files in PREFIX
1788 [$ac_default_prefix]
1789 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1790 [PREFIX]
1791
1792 By default, \`make install' will install all the files in
1793 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1794 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1795 for instance \`--prefix=\$HOME'.
1796
1797 For better control, use the options below.
1798
1799 Fine tuning of the installation directories:
1800 --bindir=DIR user executables [EPREFIX/bin]
1801 --sbindir=DIR system admin executables [EPREFIX/sbin]
1802 --libexecdir=DIR program executables [EPREFIX/libexec]
1803 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1804 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1805 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1806 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1807 --libdir=DIR object code libraries [EPREFIX/lib]
1808 --includedir=DIR C header files [PREFIX/include]
1809 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1810 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1811 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1812 --infodir=DIR info documentation [DATAROOTDIR/info]
1813 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1814 --mandir=DIR man documentation [DATAROOTDIR/man]
1815 --docdir=DIR documentation root [DATAROOTDIR/doc/enchant]
1816 --htmldir=DIR html documentation [DOCDIR]
1817 --dvidir=DIR dvi documentation [DOCDIR]
1818 --pdfdir=DIR pdf documentation [DOCDIR]
1819 --psdir=DIR ps documentation [DOCDIR]
1820 _ACEOF
1821
1822 cat <<\_ACEOF
1823
1824 Program names:
1825 --program-prefix=PREFIX prepend PREFIX to installed program names
1826 --program-suffix=SUFFIX append SUFFIX to installed program names
1827 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1828
1829 System types:
1830 --build=BUILD configure for building on BUILD [guessed]
1831 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1832 _ACEOF
1833 fi
1834
1835 if test -n "$ac_init_help"; then
1836 case $ac_init_help in
1837 short | recursive ) echo "Configuration of enchant 2.2.8:";;
1838 esac
1839 cat <<\_ACEOF
1840
1841 Optional Features:
1842 --disable-option-checking ignore unrecognized --enable/--with options
1843 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1844 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1845 --enable-silent-rules less verbose build output (undo: "make V=1")
1846 --disable-silent-rules verbose build output (undo: "make V=0")
1847 --enable-dependency-tracking
1848 do not reject slow dependency extractors
1849 --disable-dependency-tracking
1850 speeds up one-time build
1851 --enable-shared[=PKGS] build shared libraries [default=yes]
1852 --enable-static[=PKGS] build static libraries [default=yes]
1853 --enable-fast-install[=PKGS]
1854 optimize for fast installation [default=yes]
1855 --disable-libtool-lock avoid locking (might break parallel builds)
1856 --enable-relocatable install a package that can be moved in the file
1857 system
1858 --disable-gcc-warnings turn off lots of GCC warnings
1859
1860 Optional Packages:
1861 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1862 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1863 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1864 both]
1865 --with-aix-soname=aix|svr4|both
1866 shared library versioning (aka "SONAME") variant to
1867 provide on AIX, [default=aix].
1868 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1869 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
1870 compiler's sysroot if not specified).
1871 --with-hunspell enable the hunspell provider
1872 [default=check]
1873 --with-hunspell-dir=PATH
1874 path to installed hunspell dicts
1875 --with-nuspell enable the nuspell provider [default=check]
1876 --with-nuspell-dir=PATH path to installed nuspell dicts
1877 --with-aspell enable the aspell provider [default=check]
1878 --with-aspell-dir=PATH path to installed aspell dicts
1879 --with-hspell enable the hspell provider [default=check]
1880 --with-hspell-dir=PATH path to installed hspell dicts
1881 --with-voikko enable the voikko provider [default=check]
1882 --with-voikko-dir=PATH path to installed voikko dicts
1883 --with-applespell enable the applespell provider
1884 [default=check]
1885 --with-applespell-dir=PATH
1886 path to installed applespell dicts
1887 --with-zemberek enable the zemberek provider
1888 [default=no]
1889 --with-zemberek-dir=PATH
1890 path to installed zemberek dicts
1891
1892 Some influential environment variables:
1893 CC C compiler command
1894 CFLAGS C compiler flags
1895 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1896 nonstandard directory <lib dir>
1897 LIBS libraries to pass to the linker, e.g. -l<library>
1898 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1899 you have headers in a nonstandard directory <include dir>
1900 CPP C preprocessor
1901 CXX C++ compiler command
1902 CXXFLAGS C++ compiler flags
1903 OBJCXX Objective C++ compiler command
1904 OBJCXXFLAGS Objective C++ compiler flags
1905 LT_SYS_LIBRARY_PATH
1906 User-defined run-time library search path.
1907 CXXCPP C++ preprocessor
1908 PKG_CONFIG path to pkg-config utility
1909 PKG_CONFIG_PATH
1910 directories to add to pkg-config's search path
1911 PKG_CONFIG_LIBDIR
1912 path overriding pkg-config's built-in search path
1913 GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
1914 GLIB_LIBS linker flags for GLIB, overriding pkg-config
1915 UNITTESTPP_CFLAGS
1916 C compiler flags for UNITTESTPP, overriding pkg-config
1917 UNITTESTPP_LIBS
1918 linker flags for UNITTESTPP, overriding pkg-config
1919 HUNSPELL_CFLAGS
1920 C compiler flags for HUNSPELL, overriding pkg-config
1921 HUNSPELL_LIBS
1922 linker flags for HUNSPELL, overriding pkg-config
1923 NUSPELL_CFLAGS
1924 C compiler flags for NUSPELL, overriding pkg-config
1925 NUSPELL_LIBS
1926 linker flags for NUSPELL, overriding pkg-config
1927 VOIKKO_CFLAGS
1928 C compiler flags for VOIKKO, overriding pkg-config
1929 VOIKKO_LIBS linker flags for VOIKKO, overriding pkg-config
1930 OBJCXXCPP Objective C++ preprocessor
1931 ZEMBEREK_CFLAGS
1932 C compiler flags for ZEMBEREK, overriding pkg-config
1933 ZEMBEREK_LIBS
1934 linker flags for ZEMBEREK, overriding pkg-config
1935
1936 Use these variables to override the choices made by `configure' or to help
1937 it to find libraries and programs with nonstandard names/locations.
1938
1939 Report bugs to the package provider.
1940 _ACEOF
1941 ac_status=$?
1942 fi
1943
1944 if test "$ac_init_help" = "recursive"; then
1945 # If there are subdirs, report their specific --help.
1946 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1947 test -d "$ac_dir" ||
1948 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1949 continue
1950 ac_builddir=.
1951
1952 case "$ac_dir" in
1953 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1954 *)
1955 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1956 # A ".." for each directory in $ac_dir_suffix.
1957 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1958 case $ac_top_builddir_sub in
1959 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1960 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1961 esac ;;
1962 esac
1963 ac_abs_top_builddir=$ac_pwd
1964 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1965 # for backward compatibility:
1966 ac_top_builddir=$ac_top_build_prefix
1967
1968 case $srcdir in
1969 .) # We are building in place.
1970 ac_srcdir=.
1971 ac_top_srcdir=$ac_top_builddir_sub
1972 ac_abs_top_srcdir=$ac_pwd ;;
1973 [\\/]* | ?:[\\/]* ) # Absolute name.
1974 ac_srcdir=$srcdir$ac_dir_suffix;
1975 ac_top_srcdir=$srcdir
1976 ac_abs_top_srcdir=$srcdir ;;
1977 *) # Relative name.
1978 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1979 ac_top_srcdir=$ac_top_build_prefix$srcdir
1980 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1981 esac
1982 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1983
1984 cd "$ac_dir" || { ac_status=$?; continue; }
1985 # Check for guested configure.
1986 if test -f "$ac_srcdir/configure.gnu"; then
1987 echo &&
1988 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1989 elif test -f "$ac_srcdir/configure"; then
1990 echo &&
1991 $SHELL "$ac_srcdir/configure" --help=recursive
1992 else
1993 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1994 fi || ac_status=$?
1995 cd "$ac_pwd" || { ac_status=$?; break; }
1996 done
1997 fi
1998
1999 test -n "$ac_init_help" && exit $ac_status
2000 if $ac_init_version; then
2001 cat <<\_ACEOF
2002 enchant configure 2.2.8
2003 generated by GNU Autoconf 2.69
2004
2005 Copyright (C) 2012 Free Software Foundation, Inc.
2006 This configure script is free software; the Free Software Foundation
2007 gives unlimited permission to copy, distribute and modify it.
2008 _ACEOF
2009 exit
2010 fi
2011
2012 ## ------------------------ ##
2013 ## Autoconf initialization. ##
2014 ## ------------------------ ##
2015
2016 # ac_fn_c_try_compile LINENO
2017 # --------------------------
2018 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2019 ac_fn_c_try_compile ()
2020 {
2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022 rm -f conftest.$ac_objext
2023 if { { ac_try="$ac_compile"
2024 case "(($ac_try" in
2025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026 *) ac_try_echo=$ac_try;;
2027 esac
2028 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029 $as_echo "$ac_try_echo"; } >&5
2030 (eval "$ac_compile") 2>conftest.err
2031 ac_status=$?
2032 if test -s conftest.err; then
2033 grep -v '^ *+' conftest.err >conftest.er1
2034 cat conftest.er1 >&5
2035 mv -f conftest.er1 conftest.err
2036 fi
2037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038 test $ac_status = 0; } && {
2039 test -z "$ac_c_werror_flag" ||
2040 test ! -s conftest.err
2041 } && test -s conftest.$ac_objext; then :
2042 ac_retval=0
2043 else
2044 $as_echo "$as_me: failed program was:" >&5
2045 sed 's/^/| /' conftest.$ac_ext >&5
2046
2047 ac_retval=1
2048 fi
2049 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050 as_fn_set_status $ac_retval
2051
2052 } # ac_fn_c_try_compile
2053
2054 # ac_fn_c_try_cpp LINENO
2055 # ----------------------
2056 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2057 ac_fn_c_try_cpp ()
2058 {
2059 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060 if { { ac_try="$ac_cpp conftest.$ac_ext"
2061 case "(($ac_try" in
2062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2063 *) ac_try_echo=$ac_try;;
2064 esac
2065 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2066 $as_echo "$ac_try_echo"; } >&5
2067 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2068 ac_status=$?
2069 if test -s conftest.err; then
2070 grep -v '^ *+' conftest.err >conftest.er1
2071 cat conftest.er1 >&5
2072 mv -f conftest.er1 conftest.err
2073 fi
2074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2075 test $ac_status = 0; } > conftest.i && {
2076 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2077 test ! -s conftest.err
2078 }; then :
2079 ac_retval=0
2080 else
2081 $as_echo "$as_me: failed program was:" >&5
2082 sed 's/^/| /' conftest.$ac_ext >&5
2083
2084 ac_retval=1
2085 fi
2086 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2087 as_fn_set_status $ac_retval
2088
2089 } # ac_fn_c_try_cpp
2090
2091 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2092 # -------------------------------------------------------
2093 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2094 # the include files in INCLUDES and setting the cache variable VAR
2095 # accordingly.
2096 ac_fn_c_check_header_mongrel ()
2097 {
2098 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2099 if eval \${$3+:} false; then :
2100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2101 $as_echo_n "checking for $2... " >&6; }
2102 if eval \${$3+:} false; then :
2103 $as_echo_n "(cached) " >&6
2104 fi
2105 eval ac_res=\$$3
2106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2107 $as_echo "$ac_res" >&6; }
2108 else
2109 # Is the header compilable?
2110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2111 $as_echo_n "checking $2 usability... " >&6; }
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113 /* end confdefs.h. */
2114 $4
2115 #include <$2>
2116 _ACEOF
2117 if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_header_compiler=yes
2119 else
2120 ac_header_compiler=no
2121 fi
2122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2124 $as_echo "$ac_header_compiler" >&6; }
2125
2126 # Is the header present?
2127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2128 $as_echo_n "checking $2 presence... " >&6; }
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130 /* end confdefs.h. */
2131 #include <$2>
2132 _ACEOF
2133 if ac_fn_c_try_cpp "$LINENO"; then :
2134 ac_header_preproc=yes
2135 else
2136 ac_header_preproc=no
2137 fi
2138 rm -f conftest.err conftest.i conftest.$ac_ext
2139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2140 $as_echo "$ac_header_preproc" >&6; }
2141
2142 # So? What about this header?
2143 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2144 yes:no: )
2145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2146 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2147 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2148 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2149 ;;
2150 no:yes:* )
2151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2152 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2154 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2156 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2158 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2160 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2161 ;;
2162 esac
2163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2164 $as_echo_n "checking for $2... " >&6; }
2165 if eval \${$3+:} false; then :
2166 $as_echo_n "(cached) " >&6
2167 else
2168 eval "$3=\$ac_header_compiler"
2169 fi
2170 eval ac_res=\$$3
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2172 $as_echo "$ac_res" >&6; }
2173 fi
2174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2175
2176 } # ac_fn_c_check_header_mongrel
2177
2178 # ac_fn_c_try_run LINENO
2179 # ----------------------
2180 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2181 # that executables *can* be run.
2182 ac_fn_c_try_run ()
2183 {
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 if { { ac_try="$ac_link"
2186 case "(($ac_try" in
2187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2188 *) ac_try_echo=$ac_try;;
2189 esac
2190 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2191 $as_echo "$ac_try_echo"; } >&5
2192 (eval "$ac_link") 2>&5
2193 ac_status=$?
2194 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2195 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2196 { { case "(($ac_try" in
2197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2198 *) ac_try_echo=$ac_try;;
2199 esac
2200 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2201 $as_echo "$ac_try_echo"; } >&5
2202 (eval "$ac_try") 2>&5
2203 ac_status=$?
2204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2205 test $ac_status = 0; }; }; then :
2206 ac_retval=0
2207 else
2208 $as_echo "$as_me: program exited with status $ac_status" >&5
2209 $as_echo "$as_me: failed program was:" >&5
2210 sed 's/^/| /' conftest.$ac_ext >&5
2211
2212 ac_retval=$ac_status
2213 fi
2214 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2215 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216 as_fn_set_status $ac_retval
2217
2218 } # ac_fn_c_try_run
2219
2220 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2221 # -------------------------------------------------------
2222 # Tests whether HEADER exists and can be compiled using the include files in
2223 # INCLUDES, setting the cache variable VAR accordingly.
2224 ac_fn_c_check_header_compile ()
2225 {
2226 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2228 $as_echo_n "checking for $2... " >&6; }
2229 if eval \${$3+:} false; then :
2230 $as_echo_n "(cached) " >&6
2231 else
2232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233 /* end confdefs.h. */
2234 $4
2235 #include <$2>
2236 _ACEOF
2237 if ac_fn_c_try_compile "$LINENO"; then :
2238 eval "$3=yes"
2239 else
2240 eval "$3=no"
2241 fi
2242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2243 fi
2244 eval ac_res=\$$3
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2246 $as_echo "$ac_res" >&6; }
2247 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2248
2249 } # ac_fn_c_check_header_compile
2250
2251 # ac_fn_cxx_try_compile LINENO
2252 # ----------------------------
2253 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2254 ac_fn_cxx_try_compile ()
2255 {
2256 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2257 rm -f conftest.$ac_objext
2258 if { { ac_try="$ac_compile"
2259 case "(($ac_try" in
2260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2261 *) ac_try_echo=$ac_try;;
2262 esac
2263 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2264 $as_echo "$ac_try_echo"; } >&5
2265 (eval "$ac_compile") 2>conftest.err
2266 ac_status=$?
2267 if test -s conftest.err; then
2268 grep -v '^ *+' conftest.err >conftest.er1
2269 cat conftest.er1 >&5
2270 mv -f conftest.er1 conftest.err
2271 fi
2272 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2273 test $ac_status = 0; } && {
2274 test -z "$ac_cxx_werror_flag" ||
2275 test ! -s conftest.err
2276 } && test -s conftest.$ac_objext; then :
2277 ac_retval=0
2278 else
2279 $as_echo "$as_me: failed program was:" >&5
2280 sed 's/^/| /' conftest.$ac_ext >&5
2281
2282 ac_retval=1
2283 fi
2284 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2285 as_fn_set_status $ac_retval
2286
2287 } # ac_fn_cxx_try_compile
2288
2289 # ac_fn_objcxx_try_compile LINENO
2290 # -------------------------------
2291 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2292 ac_fn_objcxx_try_compile ()
2293 {
2294 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295 rm -f conftest.$ac_objext
2296 if { { ac_try="$ac_compile"
2297 case "(($ac_try" in
2298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2299 *) ac_try_echo=$ac_try;;
2300 esac
2301 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2302 $as_echo "$ac_try_echo"; } >&5
2303 (eval "$ac_compile") 2>conftest.err
2304 ac_status=$?
2305 if test -s conftest.err; then
2306 grep -v '^ *+' conftest.err >conftest.er1
2307 cat conftest.er1 >&5
2308 mv -f conftest.er1 conftest.err
2309 fi
2310 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2311 test $ac_status = 0; } && {
2312 test -z "$ac_objcxx_werror_flag" ||
2313 test ! -s conftest.err
2314 } && test -s conftest.$ac_objext; then :
2315 ac_retval=0
2316 else
2317 $as_echo "$as_me: failed program was:" >&5
2318 sed 's/^/| /' conftest.$ac_ext >&5
2319
2320 ac_retval=1
2321 fi
2322 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2323 as_fn_set_status $ac_retval
2324
2325 } # ac_fn_objcxx_try_compile
2326
2327 # ac_fn_c_try_link LINENO
2328 # -----------------------
2329 # Try to link conftest.$ac_ext, and return whether this succeeded.
2330 ac_fn_c_try_link ()
2331 {
2332 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2333 rm -f conftest.$ac_objext conftest$ac_exeext
2334 if { { ac_try="$ac_link"
2335 case "(($ac_try" in
2336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2337 *) ac_try_echo=$ac_try;;
2338 esac
2339 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2340 $as_echo "$ac_try_echo"; } >&5
2341 (eval "$ac_link") 2>conftest.err
2342 ac_status=$?
2343 if test -s conftest.err; then
2344 grep -v '^ *+' conftest.err >conftest.er1
2345 cat conftest.er1 >&5
2346 mv -f conftest.er1 conftest.err
2347 fi
2348 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2349 test $ac_status = 0; } && {
2350 test -z "$ac_c_werror_flag" ||
2351 test ! -s conftest.err
2352 } && test -s conftest$ac_exeext && {
2353 test "$cross_compiling" = yes ||
2354 test -x conftest$ac_exeext
2355 }; then :
2356 ac_retval=0
2357 else
2358 $as_echo "$as_me: failed program was:" >&5
2359 sed 's/^/| /' conftest.$ac_ext >&5
2360
2361 ac_retval=1
2362 fi
2363 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2364 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2365 # interfere with the next link command; also delete a directory that is
2366 # left behind by Apple's compiler. We do this before executing the actions.
2367 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2368 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2369 as_fn_set_status $ac_retval
2370
2371 } # ac_fn_c_try_link
2372
2373 # ac_fn_c_check_func LINENO FUNC VAR
2374 # ----------------------------------
2375 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2376 ac_fn_c_check_func ()
2377 {
2378 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2380 $as_echo_n "checking for $2... " >&6; }
2381 if eval \${$3+:} false; then :
2382 $as_echo_n "(cached) " >&6
2383 else
2384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2385 /* end confdefs.h. */
2386 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2387 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2388 #define $2 innocuous_$2
2389
2390 /* System header to define __stub macros and hopefully few prototypes,
2391 which can conflict with char $2 (); below.
2392 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2393 <limits.h> exists even on freestanding compilers. */
2394
2395 #ifdef __STDC__
2396 # include <limits.h>
2397 #else
2398 # include <assert.h>
2399 #endif
2400
2401 #undef $2
2402
2403 /* Override any GCC internal prototype to avoid an error.
2404 Use char because int might match the return type of a GCC
2405 builtin and then its argument prototype would still apply. */
2406 #ifdef __cplusplus
2407 extern "C"
2408 #endif
2409 char $2 ();
2410 /* The GNU C library defines this for functions which it implements
2411 to always fail with ENOSYS. Some functions are actually named
2412 something starting with __ and the normal name is an alias. */
2413 #if defined __stub_$2 || defined __stub___$2
2414 choke me
2415 #endif
2416
2417 int
2418 main ()
2419 {
2420 return $2 ();
2421 ;
2422 return 0;
2423 }
2424 _ACEOF
2425 if ac_fn_c_try_link "$LINENO"; then :
2426 eval "$3=yes"
2427 else
2428 eval "$3=no"
2429 fi
2430 rm -f core conftest.err conftest.$ac_objext \
2431 conftest$ac_exeext conftest.$ac_ext
2432 fi
2433 eval ac_res=\$$3
2434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2435 $as_echo "$ac_res" >&6; }
2436 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2437
2438 } # ac_fn_c_check_func
2439
2440 # ac_fn_cxx_try_cpp LINENO
2441 # ------------------------
2442 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2443 ac_fn_cxx_try_cpp ()
2444 {
2445 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446 if { { ac_try="$ac_cpp conftest.$ac_ext"
2447 case "(($ac_try" in
2448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2449 *) ac_try_echo=$ac_try;;
2450 esac
2451 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2452 $as_echo "$ac_try_echo"; } >&5
2453 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2454 ac_status=$?
2455 if test -s conftest.err; then
2456 grep -v '^ *+' conftest.err >conftest.er1
2457 cat conftest.er1 >&5
2458 mv -f conftest.er1 conftest.err
2459 fi
2460 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2461 test $ac_status = 0; } > conftest.i && {
2462 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2463 test ! -s conftest.err
2464 }; then :
2465 ac_retval=0
2466 else
2467 $as_echo "$as_me: failed program was:" >&5
2468 sed 's/^/| /' conftest.$ac_ext >&5
2469
2470 ac_retval=1
2471 fi
2472 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473 as_fn_set_status $ac_retval
2474
2475 } # ac_fn_cxx_try_cpp
2476
2477 # ac_fn_cxx_try_link LINENO
2478 # -------------------------
2479 # Try to link conftest.$ac_ext, and return whether this succeeded.
2480 ac_fn_cxx_try_link ()
2481 {
2482 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2483 rm -f conftest.$ac_objext conftest$ac_exeext
2484 if { { ac_try="$ac_link"
2485 case "(($ac_try" in
2486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2487 *) ac_try_echo=$ac_try;;
2488 esac
2489 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2490 $as_echo "$ac_try_echo"; } >&5
2491 (eval "$ac_link") 2>conftest.err
2492 ac_status=$?
2493 if test -s conftest.err; then
2494 grep -v '^ *+' conftest.err >conftest.er1
2495 cat conftest.er1 >&5
2496 mv -f conftest.er1 conftest.err
2497 fi
2498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2499 test $ac_status = 0; } && {
2500 test -z "$ac_cxx_werror_flag" ||
2501 test ! -s conftest.err
2502 } && test -s conftest$ac_exeext && {
2503 test "$cross_compiling" = yes ||
2504 test -x conftest$ac_exeext
2505 }; then :
2506 ac_retval=0
2507 else
2508 $as_echo "$as_me: failed program was:" >&5
2509 sed 's/^/| /' conftest.$ac_ext >&5
2510
2511 ac_retval=1
2512 fi
2513 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2514 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2515 # interfere with the next link command; also delete a directory that is
2516 # left behind by Apple's compiler. We do this before executing the actions.
2517 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2518 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2519 as_fn_set_status $ac_retval
2520
2521 } # ac_fn_cxx_try_link
2522
2523 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2524 # ----------------------------------------------------
2525 # Tries to find if the field MEMBER exists in type AGGR, after including
2526 # INCLUDES, setting cache variable VAR accordingly.
2527 ac_fn_c_check_member ()
2528 {
2529 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2531 $as_echo_n "checking for $2.$3... " >&6; }
2532 if eval \${$4+:} false; then :
2533 $as_echo_n "(cached) " >&6
2534 else
2535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2536 /* end confdefs.h. */
2537 $5
2538 int
2539 main ()
2540 {
2541 static $2 ac_aggr;
2542 if (ac_aggr.$3)
2543 return 0;
2544 ;
2545 return 0;
2546 }
2547 _ACEOF
2548 if ac_fn_c_try_compile "$LINENO"; then :
2549 eval "$4=yes"
2550 else
2551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2552 /* end confdefs.h. */
2553 $5
2554 int
2555 main ()
2556 {
2557 static $2 ac_aggr;
2558 if (sizeof ac_aggr.$3)
2559 return 0;
2560 ;
2561 return 0;
2562 }
2563 _ACEOF
2564 if ac_fn_c_try_compile "$LINENO"; then :
2565 eval "$4=yes"
2566 else
2567 eval "$4=no"
2568 fi
2569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2570 fi
2571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2572 fi
2573 eval ac_res=\$$4
2574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2575 $as_echo "$ac_res" >&6; }
2576 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2577
2578 } # ac_fn_c_check_member
2579
2580 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2581 # ---------------------------------------------
2582 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2583 # accordingly.
2584 ac_fn_c_check_decl ()
2585 {
2586 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2587 as_decl_name=`echo $2|sed 's/ *(.*//'`
2588 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2590 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2591 if eval \${$3+:} false; then :
2592 $as_echo_n "(cached) " >&6
2593 else
2594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2595 /* end confdefs.h. */
2596 $4
2597 int
2598 main ()
2599 {
2600 #ifndef $as_decl_name
2601 #ifdef __cplusplus
2602 (void) $as_decl_use;
2603 #else
2604 (void) $as_decl_name;
2605 #endif
2606 #endif
2607
2608 ;
2609 return 0;
2610 }
2611 _ACEOF
2612 if ac_fn_c_try_compile "$LINENO"; then :
2613 eval "$3=yes"
2614 else
2615 eval "$3=no"
2616 fi
2617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2618 fi
2619 eval ac_res=\$$3
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621 $as_echo "$ac_res" >&6; }
2622 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2623
2624 } # ac_fn_c_check_decl
2625
2626 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2627 # -------------------------------------------
2628 # Tests whether TYPE exists after having included INCLUDES, setting cache
2629 # variable VAR accordingly.
2630 ac_fn_c_check_type ()
2631 {
2632 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2634 $as_echo_n "checking for $2... " >&6; }
2635 if eval \${$3+:} false; then :
2636 $as_echo_n "(cached) " >&6
2637 else
2638 eval "$3=no"
2639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640 /* end confdefs.h. */
2641 $4
2642 int
2643 main ()
2644 {
2645 if (sizeof ($2))
2646 return 0;
2647 ;
2648 return 0;
2649 }
2650 _ACEOF
2651 if ac_fn_c_try_compile "$LINENO"; then :
2652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2653 /* end confdefs.h. */
2654 $4
2655 int
2656 main ()
2657 {
2658 if (sizeof (($2)))
2659 return 0;
2660 ;
2661 return 0;
2662 }
2663 _ACEOF
2664 if ac_fn_c_try_compile "$LINENO"; then :
2665
2666 else
2667 eval "$3=yes"
2668 fi
2669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2670 fi
2671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2672 fi
2673 eval ac_res=\$$3
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2675 $as_echo "$ac_res" >&6; }
2676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2677
2678 } # ac_fn_c_check_type
2679
2680 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2681 # --------------------------------------------
2682 # Tries to find the compile-time value of EXPR in a program that includes
2683 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2684 # computed
2685 ac_fn_c_compute_int ()
2686 {
2687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2688 if test "$cross_compiling" = yes; then
2689 # Depending upon the size, compute the lo and hi bounds.
2690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2691 /* end confdefs.h. */
2692 $4
2693 int
2694 main ()
2695 {
2696 static int test_array [1 - 2 * !(($2) >= 0)];
2697 test_array [0] = 0;
2698 return test_array [0];
2699
2700 ;
2701 return 0;
2702 }
2703 _ACEOF
2704 if ac_fn_c_try_compile "$LINENO"; then :
2705 ac_lo=0 ac_mid=0
2706 while :; do
2707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2708 /* end confdefs.h. */
2709 $4
2710 int
2711 main ()
2712 {
2713 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2714 test_array [0] = 0;
2715 return test_array [0];
2716
2717 ;
2718 return 0;
2719 }
2720 _ACEOF
2721 if ac_fn_c_try_compile "$LINENO"; then :
2722 ac_hi=$ac_mid; break
2723 else
2724 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2725 if test $ac_lo -le $ac_mid; then
2726 ac_lo= ac_hi=
2727 break
2728 fi
2729 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2730 fi
2731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2732 done
2733 else
2734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2735 /* end confdefs.h. */
2736 $4
2737 int
2738 main ()
2739 {
2740 static int test_array [1 - 2 * !(($2) < 0)];
2741 test_array [0] = 0;
2742 return test_array [0];
2743
2744 ;
2745 return 0;
2746 }
2747 _ACEOF
2748 if ac_fn_c_try_compile "$LINENO"; then :
2749 ac_hi=-1 ac_mid=-1
2750 while :; do
2751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752 /* end confdefs.h. */
2753 $4
2754 int
2755 main ()
2756 {
2757 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2758 test_array [0] = 0;
2759 return test_array [0];
2760
2761 ;
2762 return 0;
2763 }
2764 _ACEOF
2765 if ac_fn_c_try_compile "$LINENO"; then :
2766 ac_lo=$ac_mid; break
2767 else
2768 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2769 if test $ac_mid -le $ac_hi; then
2770 ac_lo= ac_hi=
2771 break
2772 fi
2773 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2774 fi
2775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2776 done
2777 else
2778 ac_lo= ac_hi=
2779 fi
2780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2781 fi
2782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2783 # Binary search between lo and hi bounds.
2784 while test "x$ac_lo" != "x$ac_hi"; do
2785 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2787 /* end confdefs.h. */
2788 $4
2789 int
2790 main ()
2791 {
2792 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2793 test_array [0] = 0;
2794 return test_array [0];
2795
2796 ;
2797 return 0;
2798 }
2799 _ACEOF
2800 if ac_fn_c_try_compile "$LINENO"; then :
2801 ac_hi=$ac_mid
2802 else
2803 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2804 fi
2805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2806 done
2807 case $ac_lo in #((
2808 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2809 '') ac_retval=1 ;;
2810 esac
2811 else
2812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2813 /* end confdefs.h. */
2814 $4
2815 static long int longval () { return $2; }
2816 static unsigned long int ulongval () { return $2; }
2817 #include <stdio.h>
2818 #include <stdlib.h>
2819 int
2820 main ()
2821 {
2822
2823 FILE *f = fopen ("conftest.val", "w");
2824 if (! f)
2825 return 1;
2826 if (($2) < 0)
2827 {
2828 long int i = longval ();
2829 if (i != ($2))
2830 return 1;
2831 fprintf (f, "%ld", i);
2832 }
2833 else
2834 {
2835 unsigned long int i = ulongval ();
2836 if (i != ($2))
2837 return 1;
2838 fprintf (f, "%lu", i);
2839 }
2840 /* Do not output a trailing newline, as this causes \r\n confusion
2841 on some platforms. */
2842 return ferror (f) || fclose (f) != 0;
2843
2844 ;
2845 return 0;
2846 }
2847 _ACEOF
2848 if ac_fn_c_try_run "$LINENO"; then :
2849 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2850 else
2851 ac_retval=1
2852 fi
2853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2854 conftest.$ac_objext conftest.beam conftest.$ac_ext
2855 rm -f conftest.val
2856
2857 fi
2858 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2859 as_fn_set_status $ac_retval
2860
2861 } # ac_fn_c_compute_int
2862
2863 # ac_fn_objcxx_try_cpp LINENO
2864 # ---------------------------
2865 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2866 ac_fn_objcxx_try_cpp ()
2867 {
2868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2869 if { { ac_try="$ac_cpp conftest.$ac_ext"
2870 case "(($ac_try" in
2871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2872 *) ac_try_echo=$ac_try;;
2873 esac
2874 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2875 $as_echo "$ac_try_echo"; } >&5
2876 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2877 ac_status=$?
2878 if test -s conftest.err; then
2879 grep -v '^ *+' conftest.err >conftest.er1
2880 cat conftest.er1 >&5
2881 mv -f conftest.er1 conftest.err
2882 fi
2883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2884 test $ac_status = 0; } > conftest.i && {
2885 test -z "$ac_objcxx_preproc_warn_flag$ac_objcxx_werror_flag" ||
2886 test ! -s conftest.err
2887 }; then :
2888 ac_retval=0
2889 else
2890 $as_echo "$as_me: failed program was:" >&5
2891 sed 's/^/| /' conftest.$ac_ext >&5
2892
2893 ac_retval=1
2894 fi
2895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2896 as_fn_set_status $ac_retval
2897
2898 } # ac_fn_objcxx_try_cpp
2899
2900 # ac_fn_objcxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2901 # ------------------------------------------------------------
2902 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2903 # the include files in INCLUDES and setting the cache variable VAR
2904 # accordingly.
2905 ac_fn_objcxx_check_header_mongrel ()
2906 {
2907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2908 if eval \${$3+:} false; then :
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2910 $as_echo_n "checking for $2... " >&6; }
2911 if eval \${$3+:} false; then :
2912 $as_echo_n "(cached) " >&6
2913 fi
2914 eval ac_res=\$$3
2915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2916 $as_echo "$ac_res" >&6; }
2917 else
2918 # Is the header compilable?
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2920 $as_echo_n "checking $2 usability... " >&6; }
2921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2922 /* end confdefs.h. */
2923 $4
2924 #include <$2>
2925 _ACEOF
2926 if ac_fn_objcxx_try_compile "$LINENO"; then :
2927 ac_header_compiler=yes
2928 else
2929 ac_header_compiler=no
2930 fi
2931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2933 $as_echo "$ac_header_compiler" >&6; }
2934
2935 # Is the header present?
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2937 $as_echo_n "checking $2 presence... " >&6; }
2938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2939 /* end confdefs.h. */
2940 #include <$2>
2941 _ACEOF
2942 if ac_fn_objcxx_try_cpp "$LINENO"; then :
2943 ac_header_preproc=yes
2944 else
2945 ac_header_preproc=no
2946 fi
2947 rm -f conftest.err conftest.i conftest.$ac_ext
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2949 $as_echo "$ac_header_preproc" >&6; }
2950
2951 # So? What about this header?
2952 case $ac_header_compiler:$ac_header_preproc:$ac_objcxx_preproc_warn_flag in #((
2953 yes:no: )
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2955 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2957 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2958 ;;
2959 no:yes:* )
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2961 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2963 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2965 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2967 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2969 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2970 ;;
2971 esac
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2973 $as_echo_n "checking for $2... " >&6; }
2974 if eval \${$3+:} false; then :
2975 $as_echo_n "(cached) " >&6
2976 else
2977 eval "$3=\$ac_header_compiler"
2978 fi
2979 eval ac_res=\$$3
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2981 $as_echo "$ac_res" >&6; }
2982 fi
2983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2984
2985 } # ac_fn_objcxx_check_header_mongrel
2986
2987 # ac_fn_objcxx_try_link LINENO
2988 # ----------------------------
2989 # Try to link conftest.$ac_ext, and return whether this succeeded.
2990 ac_fn_objcxx_try_link ()
2991 {
2992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2993 rm -f conftest.$ac_objext conftest$ac_exeext
2994 if { { ac_try="$ac_link"
2995 case "(($ac_try" in
2996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2997 *) ac_try_echo=$ac_try;;
2998 esac
2999 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3000 $as_echo "$ac_try_echo"; } >&5
3001 (eval "$ac_link") 2>conftest.err
3002 ac_status=$?
3003 if test -s conftest.err; then
3004 grep -v '^ *+' conftest.err >conftest.er1
3005 cat conftest.er1 >&5
3006 mv -f conftest.er1 conftest.err
3007 fi
3008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3009 test $ac_status = 0; } && {
3010 test -z "$ac_objcxx_werror_flag" ||
3011 test ! -s conftest.err
3012 } && test -s conftest$ac_exeext && {
3013 test "$cross_compiling" = yes ||
3014 test -x conftest$ac_exeext
3015 }; then :
3016 ac_retval=0
3017 else
3018 $as_echo "$as_me: failed program was:" >&5
3019 sed 's/^/| /' conftest.$ac_ext >&5
3020
3021 ac_retval=1
3022 fi
3023 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3024 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3025 # interfere with the next link command; also delete a directory that is
3026 # left behind by Apple's compiler. We do this before executing the actions.
3027 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3029 as_fn_set_status $ac_retval
3030
3031 } # ac_fn_objcxx_try_link
3032 cat >config.log <<_ACEOF
3033 This file contains any messages produced by compilers while
3034 running configure, to aid debugging if configure makes a mistake.
3035
3036 It was created by enchant $as_me 2.2.8, which was
3037 generated by GNU Autoconf 2.69. Invocation command line was
3038
3039 $ $0 $@
3040
3041 _ACEOF
3042 exec 5>>config.log
3043 {
3044 cat <<_ASUNAME
3045 ## --------- ##
3046 ## Platform. ##
3047 ## --------- ##
3048
3049 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3050 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3051 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3052 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3053 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3054
3055 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3056 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3057
3058 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3059 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3060 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3061 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3062 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3063 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3064 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3065
3066 _ASUNAME
3067
3068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3069 for as_dir in $PATH
3070 do
3071 IFS=$as_save_IFS
3072 test -z "$as_dir" && as_dir=.
3073 $as_echo "PATH: $as_dir"
3074 done
3075 IFS=$as_save_IFS
3076
3077 } >&5
3078
3079 cat >&5 <<_ACEOF
3080
3081
3082 ## ----------- ##
3083 ## Core tests. ##
3084 ## ----------- ##
3085
3086 _ACEOF
3087
3088
3089 # Keep a trace of the command line.
3090 # Strip out --no-create and --no-recursion so they do not pile up.
3091 # Strip out --silent because we don't want to record it for future runs.
3092 # Also quote any args containing shell meta-characters.
3093 # Make two passes to allow for proper duplicate-argument suppression.
3094 ac_configure_args=
3095 ac_configure_args0=
3096 ac_configure_args1=
3097 ac_must_keep_next=false
3098 for ac_pass in 1 2
3099 do
3100 for ac_arg
3101 do
3102 case $ac_arg in
3103 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3104 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3105 | -silent | --silent | --silen | --sile | --sil)
3106 continue ;;
3107 *\'*)
3108 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3109 esac
3110 case $ac_pass in
3111 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3112 2)
3113 as_fn_append ac_configure_args1 " '$ac_arg'"
3114 if test $ac_must_keep_next = true; then
3115 ac_must_keep_next=false # Got value, back to normal.
3116 else
3117 case $ac_arg in
3118 *=* | --config-cache | -C | -disable-* | --disable-* \
3119 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3120 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3121 | -with-* | --with-* | -without-* | --without-* | --x)
3122 case "$ac_configure_args0 " in
3123 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3124 esac
3125 ;;
3126 -* ) ac_must_keep_next=true ;;
3127 esac
3128 fi
3129 as_fn_append ac_configure_args " '$ac_arg'"
3130 ;;
3131 esac
3132 done
3133 done
3134 { ac_configure_args0=; unset ac_configure_args0;}
3135 { ac_configure_args1=; unset ac_configure_args1;}
3136
3137 # When interrupted or exit'd, cleanup temporary files, and complete
3138 # config.log. We remove comments because anyway the quotes in there
3139 # would cause problems or look ugly.
3140 # WARNING: Use '\'' to represent an apostrophe within the trap.
3141 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3142 trap 'exit_status=$?
3143 # Save into config.log some information that might help in debugging.
3144 {
3145 echo
3146
3147 $as_echo "## ---------------- ##
3148 ## Cache variables. ##
3149 ## ---------------- ##"
3150 echo
3151 # The following way of writing the cache mishandles newlines in values,
3152 (
3153 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3154 eval ac_val=\$$ac_var
3155 case $ac_val in #(
3156 *${as_nl}*)
3157 case $ac_var in #(
3158 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3159 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3160 esac
3161 case $ac_var in #(
3162 _ | IFS | as_nl) ;; #(
3163 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3164 *) { eval $ac_var=; unset $ac_var;} ;;
3165 esac ;;
3166 esac
3167 done
3168 (set) 2>&1 |
3169 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3170 *${as_nl}ac_space=\ *)
3171 sed -n \
3172 "s/'\''/'\''\\\\'\'''\''/g;
3173 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3174 ;; #(
3175 *)
3176 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3177 ;;
3178 esac |
3179 sort
3180 )
3181 echo
3182
3183 $as_echo "## ----------------- ##
3184 ## Output variables. ##
3185 ## ----------------- ##"
3186 echo
3187 for ac_var in $ac_subst_vars
3188 do
3189 eval ac_val=\$$ac_var
3190 case $ac_val in
3191 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3192 esac
3193 $as_echo "$ac_var='\''$ac_val'\''"
3194 done | sort
3195 echo
3196
3197 if test -n "$ac_subst_files"; then
3198 $as_echo "## ------------------- ##
3199 ## File substitutions. ##
3200 ## ------------------- ##"
3201 echo
3202 for ac_var in $ac_subst_files
3203 do
3204 eval ac_val=\$$ac_var
3205 case $ac_val in
3206 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3207 esac
3208 $as_echo "$ac_var='\''$ac_val'\''"
3209 done | sort
3210 echo
3211 fi
3212
3213 if test -s confdefs.h; then
3214 $as_echo "## ----------- ##
3215 ## confdefs.h. ##
3216 ## ----------- ##"
3217 echo
3218 cat confdefs.h
3219 echo
3220 fi
3221 test "$ac_signal" != 0 &&
3222 $as_echo "$as_me: caught signal $ac_signal"
3223 $as_echo "$as_me: exit $exit_status"
3224 } >&5
3225 rm -f core *.core core.conftest.* &&
3226 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3227 exit $exit_status
3228 ' 0
3229 for ac_signal in 1 2 13 15; do
3230 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3231 done
3232 ac_signal=0
3233
3234 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3235 rm -f -r conftest* confdefs.h
3236
3237 $as_echo "/* confdefs.h */" > confdefs.h
3238
3239 # Predefined preprocessor variables.
3240
3241 cat >>confdefs.h <<_ACEOF
3242 #define PACKAGE_NAME "$PACKAGE_NAME"
3243 _ACEOF
3244
3245 cat >>confdefs.h <<_ACEOF
3246 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3247 _ACEOF
3248
3249 cat >>confdefs.h <<_ACEOF
3250 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3251 _ACEOF
3252
3253 cat >>confdefs.h <<_ACEOF
3254 #define PACKAGE_STRING "$PACKAGE_STRING"
3255 _ACEOF
3256
3257 cat >>confdefs.h <<_ACEOF
3258 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3259 _ACEOF
3260
3261 cat >>confdefs.h <<_ACEOF
3262 #define PACKAGE_URL "$PACKAGE_URL"
3263 _ACEOF
3264
3265
3266 # Let the site file select an alternate cache file if it wants to.
3267 # Prefer an explicitly selected file to automatically selected ones.
3268 ac_site_file1=NONE
3269 ac_site_file2=NONE
3270 if test -n "$CONFIG_SITE"; then
3271 # We do not want a PATH search for config.site.
3272 case $CONFIG_SITE in #((
3273 -*) ac_site_file1=./$CONFIG_SITE;;
3274 */*) ac_site_file1=$CONFIG_SITE;;
3275 *) ac_site_file1=./$CONFIG_SITE;;
3276 esac
3277 elif test "x$prefix" != xNONE; then
3278 ac_site_file1=$prefix/share/config.site
3279 ac_site_file2=$prefix/etc/config.site
3280 else
3281 ac_site_file1=$ac_default_prefix/share/config.site
3282 ac_site_file2=$ac_default_prefix/etc/config.site
3283 fi
3284 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3285 do
3286 test "x$ac_site_file" = xNONE && continue
3287 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3288 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3289 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3290 sed 's/^/| /' "$ac_site_file" >&5
3291 . "$ac_site_file" \
3292 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3293 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3294 as_fn_error $? "failed to load site script $ac_site_file
3295 See \`config.log' for more details" "$LINENO" 5; }
3296 fi
3297 done
3298
3299 if test -r "$cache_file"; then
3300 # Some versions of bash will fail to source /dev/null (special files
3301 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3302 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3303 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3304 $as_echo "$as_me: loading cache $cache_file" >&6;}
3305 case $cache_file in
3306 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3307 *) . "./$cache_file";;
3308 esac
3309 fi
3310 else
3311 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3312 $as_echo "$as_me: creating cache $cache_file" >&6;}
3313 >$cache_file
3314 fi
3315
3316 as_fn_append ac_func_list " flock"
3317 as_fn_append ac_func_list " fcntl"
3318 as_fn_append ac_header_list " unistd.h"
3319 as_fn_append ac_header_list " getopt.h"
3320 as_fn_append ac_header_list " sys/cdefs.h"
3321 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3322 as_fn_append ac_func_list " strdup"
3323 as_fn_append ac_header_list " sys/file.h"
3324 # Check that the precious variables saved in the cache have kept the same
3325 # value.
3326 ac_cache_corrupted=false
3327 for ac_var in $ac_precious_vars; do
3328 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3329 eval ac_new_set=\$ac_env_${ac_var}_set
3330 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3331 eval ac_new_val=\$ac_env_${ac_var}_value
3332 case $ac_old_set,$ac_new_set in
3333 set,)
3334 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3335 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3336 ac_cache_corrupted=: ;;
3337 ,set)
3338 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3339 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3340 ac_cache_corrupted=: ;;
3341 ,);;
3342 *)
3343 if test "x$ac_old_val" != "x$ac_new_val"; then
3344 # differences in whitespace do not lead to failure.
3345 ac_old_val_w=`echo x $ac_old_val`
3346 ac_new_val_w=`echo x $ac_new_val`
3347 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3348 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3349 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3350 ac_cache_corrupted=:
3351 else
3352 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3353 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3354 eval $ac_var=\$ac_old_val
3355 fi
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3357 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3358 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3359 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3360 fi;;
3361 esac
3362 # Pass precious variables to config.status.
3363 if test "$ac_new_set" = set; then
3364 case $ac_new_val in
3365 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3366 *) ac_arg=$ac_var=$ac_new_val ;;
3367 esac
3368 case " $ac_configure_args " in
3369 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3370 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3371 esac
3372 fi
3373 done
3374 if $ac_cache_corrupted; then
3375 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3376 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3377 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3378 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3379 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3380 fi
3381 ## -------------------- ##
3382 ## Main body of script. ##
3383 ## -------------------- ##
3384
3385 ac_ext=c
3386 ac_cpp='$CPP $CPPFLAGS'
3387 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3388 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3389 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3390
3391
3392
3393 ac_aux_dir=
3394 for ac_dir in build-aux "$srcdir"/build-aux; do
3395 if test -f "$ac_dir/install-sh"; then
3396 ac_aux_dir=$ac_dir
3397 ac_install_sh="$ac_aux_dir/install-sh -c"
3398 break
3399 elif test -f "$ac_dir/install.sh"; then
3400 ac_aux_dir=$ac_dir
3401 ac_install_sh="$ac_aux_dir/install.sh -c"
3402 break
3403 elif test -f "$ac_dir/shtool"; then
3404 ac_aux_dir=$ac_dir
3405 ac_install_sh="$ac_aux_dir/shtool install -c"
3406 break
3407 fi
3408 done
3409 if test -z "$ac_aux_dir"; then
3410 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3411 fi
3412
3413 # These three variables are undocumented and unsupported,
3414 # and are intended to be withdrawn in a future Autoconf release.
3415 # They can cause serious problems if a builder's source tree is in a directory
3416 # whose full name contains unusual characters.
3417 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3418 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3419 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3420
3421
3422 am__api_version='1.15'
3423
3424 # Find a good install program. We prefer a C program (faster),
3425 # so one script is as good as another. But avoid the broken or
3426 # incompatible versions:
3427 # SysV /etc/install, /usr/sbin/install
3428 # SunOS /usr/etc/install
3429 # IRIX /sbin/install
3430 # AIX /bin/install
3431 # AmigaOS /C/install, which installs bootblocks on floppy discs
3432 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3433 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3434 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3435 # OS/2's system install, which has a completely different semantic
3436 # ./install, which can be erroneously created by make from ./install.sh.
3437 # Reject install programs that cannot install multiple files.
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3439 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3440 if test -z "$INSTALL"; then
3441 if ${ac_cv_path_install+:} false; then :
3442 $as_echo_n "(cached) " >&6
3443 else
3444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3445 for as_dir in $PATH
3446 do
3447 IFS=$as_save_IFS
3448 test -z "$as_dir" && as_dir=.
3449 # Account for people who put trailing slashes in PATH elements.
3450 case $as_dir/ in #((
3451 ./ | .// | /[cC]/* | \
3452 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3453 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3454 /usr/ucb/* ) ;;
3455 *)
3456 # OSF1 and SCO ODT 3.0 have their own names for install.
3457 # Don't use installbsd from OSF since it installs stuff as root
3458 # by default.
3459 for ac_prog in ginstall scoinst install; do
3460 for ac_exec_ext in '' $ac_executable_extensions; do
3461 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3462 if test $ac_prog = install &&
3463 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3464 # AIX install. It has an incompatible calling convention.
3465 :
3466 elif test $ac_prog = install &&
3467 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3468 # program-specific install script used by HP pwplus--don't use.
3469 :
3470 else
3471 rm -rf conftest.one conftest.two conftest.dir
3472 echo one > conftest.one
3473 echo two > conftest.two
3474 mkdir conftest.dir
3475 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3476 test -s conftest.one && test -s conftest.two &&
3477 test -s conftest.dir/conftest.one &&
3478 test -s conftest.dir/conftest.two
3479 then
3480 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3481 break 3
3482 fi
3483 fi
3484 fi
3485 done
3486 done
3487 ;;
3488 esac
3489
3490 done
3491 IFS=$as_save_IFS
3492
3493 rm -rf conftest.one conftest.two conftest.dir
3494
3495 fi
3496 if test "${ac_cv_path_install+set}" = set; then
3497 INSTALL=$ac_cv_path_install
3498 else
3499 # As a last resort, use the slow shell script. Don't cache a
3500 # value for INSTALL within a source directory, because that will
3501 # break other packages using the cache if that directory is
3502 # removed, or if the value is a relative name.
3503 INSTALL=$ac_install_sh
3504 fi
3505 fi
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3507 $as_echo "$INSTALL" >&6; }
3508
3509 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3510 # It thinks the first close brace ends the variable substitution.
3511 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3512
3513 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3514
3515 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3516
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3518 $as_echo_n "checking whether build environment is sane... " >&6; }
3519 # Reject unsafe characters in $srcdir or the absolute working directory
3520 # name. Accept space and tab only in the latter.
3521 am_lf='
3522 '
3523 case `pwd` in
3524 *[\\\"\#\$\&\'\`$am_lf]*)
3525 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3526 esac
3527 case $srcdir in
3528 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3529 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3530 esac
3531
3532 # Do 'set' in a subshell so we don't clobber the current shell's
3533 # arguments. Must try -L first in case configure is actually a
3534 # symlink; some systems play weird games with the mod time of symlinks
3535 # (eg FreeBSD returns the mod time of the symlink's containing
3536 # directory).
3537 if (
3538 am_has_slept=no
3539 for am_try in 1 2; do
3540 echo "timestamp, slept: $am_has_slept" > conftest.file
3541 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3542 if test "$*" = "X"; then
3543 # -L didn't work.
3544 set X `ls -t "$srcdir/configure" conftest.file`
3545 fi
3546 if test "$*" != "X $srcdir/configure conftest.file" \
3547 && test "$*" != "X conftest.file $srcdir/configure"; then
3548
3549 # If neither matched, then we have a broken ls. This can happen
3550 # if, for instance, CONFIG_SHELL is bash and it inherits a
3551 # broken ls alias from the environment. This has actually
3552 # happened. Such a system could not be considered "sane".
3553 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3554 alias in your environment" "$LINENO" 5
3555 fi
3556 if test "$2" = conftest.file || test $am_try -eq 2; then
3557 break
3558 fi
3559 # Just in case.
3560 sleep 1
3561 am_has_slept=yes
3562 done
3563 test "$2" = conftest.file
3564 )
3565 then
3566 # Ok.
3567 :
3568 else
3569 as_fn_error $? "newly created file is older than distributed files!
3570 Check your system clock" "$LINENO" 5
3571 fi
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3573 $as_echo "yes" >&6; }
3574 # If we didn't sleep, we still need to ensure time stamps of config.status and
3575 # generated files are strictly newer.
3576 am_sleep_pid=
3577 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3578 ( sleep 1 ) &
3579 am_sleep_pid=$!
3580 fi
3581
3582 rm -f conftest.file
3583
3584 test "$program_prefix" != NONE &&
3585 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3586 # Use a double $ so make ignores it.
3587 test "$program_suffix" != NONE &&
3588 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3589 # Double any \ or $.
3590 # By default was `s,x,x', remove it if useless.
3591 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3592 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3593
3594 # Expand $ac_aux_dir to an absolute path.
3595 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3596
3597 if test x"${MISSING+set}" != xset; then
3598 case $am_aux_dir in
3599 *\ * | *\ *)
3600 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3601 *)
3602 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3603 esac
3604 fi
3605 # Use eval to expand $SHELL
3606 if eval "$MISSING --is-lightweight"; then
3607 am_missing_run="$MISSING "
3608 else
3609 am_missing_run=
3610 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3611 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3612 fi
3613
3614 if test x"${install_sh+set}" != xset; then
3615 case $am_aux_dir in
3616 *\ * | *\ *)
3617 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3618 *)
3619 install_sh="\${SHELL} $am_aux_dir/install-sh"
3620 esac
3621 fi
3622
3623 # Installed binaries are usually stripped using 'strip' when the user
3624 # run "make install-strip". However 'strip' might not be the right
3625 # tool to use in cross-compilation environments, therefore Automake
3626 # will honor the 'STRIP' environment variable to overrule this program.
3627 if test "$cross_compiling" != no; then
3628 if test -n "$ac_tool_prefix"; then
3629 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3630 set dummy ${ac_tool_prefix}strip; ac_word=$2
3631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3632 $as_echo_n "checking for $ac_word... " >&6; }
3633 if ${ac_cv_prog_STRIP+:} false; then :
3634 $as_echo_n "(cached) " >&6
3635 else
3636 if test -n "$STRIP"; then
3637 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3638 else
3639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3640 for as_dir in $PATH
3641 do
3642 IFS=$as_save_IFS
3643 test -z "$as_dir" && as_dir=.
3644 for ac_exec_ext in '' $ac_executable_extensions; do
3645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3646 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3648 break 2
3649 fi
3650 done
3651 done
3652 IFS=$as_save_IFS
3653
3654 fi
3655 fi
3656 STRIP=$ac_cv_prog_STRIP
3657 if test -n "$STRIP"; then
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3659 $as_echo "$STRIP" >&6; }
3660 else
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3662 $as_echo "no" >&6; }
3663 fi
3664
3665
3666 fi
3667 if test -z "$ac_cv_prog_STRIP"; then
3668 ac_ct_STRIP=$STRIP
3669 # Extract the first word of "strip", so it can be a program name with args.
3670 set dummy strip; ac_word=$2
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3672 $as_echo_n "checking for $ac_word... " >&6; }
3673 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3674 $as_echo_n "(cached) " >&6
3675 else
3676 if test -n "$ac_ct_STRIP"; then
3677 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3678 else
3679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680 for as_dir in $PATH
3681 do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
3684 for ac_exec_ext in '' $ac_executable_extensions; do
3685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3686 ac_cv_prog_ac_ct_STRIP="strip"
3687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3688 break 2
3689 fi
3690 done
3691 done
3692 IFS=$as_save_IFS
3693
3694 fi
3695 fi
3696 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3697 if test -n "$ac_ct_STRIP"; then
3698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3699 $as_echo "$ac_ct_STRIP" >&6; }
3700 else
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3702 $as_echo "no" >&6; }
3703 fi
3704
3705 if test "x$ac_ct_STRIP" = x; then
3706 STRIP=":"
3707 else
3708 case $cross_compiling:$ac_tool_warned in
3709 yes:)
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3711 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3712 ac_tool_warned=yes ;;
3713 esac
3714 STRIP=$ac_ct_STRIP
3715 fi
3716 else
3717 STRIP="$ac_cv_prog_STRIP"
3718 fi
3719
3720 fi
3721 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3722
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3724 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3725 if test -z "$MKDIR_P"; then
3726 if ${ac_cv_path_mkdir+:} false; then :
3727 $as_echo_n "(cached) " >&6
3728 else
3729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3730 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3731 do
3732 IFS=$as_save_IFS
3733 test -z "$as_dir" && as_dir=.
3734 for ac_prog in mkdir gmkdir; do
3735 for ac_exec_ext in '' $ac_executable_extensions; do
3736 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3737 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3738 'mkdir (GNU coreutils) '* | \
3739 'mkdir (coreutils) '* | \
3740 'mkdir (fileutils) '4.1*)
3741 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3742 break 3;;
3743 esac
3744 done
3745 done
3746 done
3747 IFS=$as_save_IFS
3748
3749 fi
3750
3751 test -d ./--version && rmdir ./--version
3752 if test "${ac_cv_path_mkdir+set}" = set; then
3753 MKDIR_P="$ac_cv_path_mkdir -p"
3754 else
3755 # As a last resort, use the slow shell script. Don't cache a
3756 # value for MKDIR_P within a source directory, because that will
3757 # break other packages using the cache if that directory is
3758 # removed, or if the value is a relative name.
3759 MKDIR_P="$ac_install_sh -d"
3760 fi
3761 fi
3762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3763 $as_echo "$MKDIR_P" >&6; }
3764
3765 for ac_prog in gawk mawk nawk awk
3766 do
3767 # Extract the first word of "$ac_prog", so it can be a program name with args.
3768 set dummy $ac_prog; ac_word=$2
3769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3770 $as_echo_n "checking for $ac_word... " >&6; }
3771 if ${ac_cv_prog_AWK+:} false; then :
3772 $as_echo_n "(cached) " >&6
3773 else
3774 if test -n "$AWK"; then
3775 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3776 else
3777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3778 for as_dir in $PATH
3779 do
3780 IFS=$as_save_IFS
3781 test -z "$as_dir" && as_dir=.
3782 for ac_exec_ext in '' $ac_executable_extensions; do
3783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3784 ac_cv_prog_AWK="$ac_prog"
3785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3786 break 2
3787 fi
3788 done
3789 done
3790 IFS=$as_save_IFS
3791
3792 fi
3793 fi
3794 AWK=$ac_cv_prog_AWK
3795 if test -n "$AWK"; then
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3797 $as_echo "$AWK" >&6; }
3798 else
3799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3800 $as_echo "no" >&6; }
3801 fi
3802
3803
3804 test -n "$AWK" && break
3805 done
3806
3807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3808 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3809 set x ${MAKE-make}
3810 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3811 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3812 $as_echo_n "(cached) " >&6
3813 else
3814 cat >conftest.make <<\_ACEOF
3815 SHELL = /bin/sh
3816 all:
3817 @echo '@@@%%%=$(MAKE)=@@@%%%'
3818 _ACEOF
3819 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3820 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3821 *@@@%%%=?*=@@@%%%*)
3822 eval ac_cv_prog_make_${ac_make}_set=yes;;
3823 *)
3824 eval ac_cv_prog_make_${ac_make}_set=no;;
3825 esac
3826 rm -f conftest.make
3827 fi
3828 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3830 $as_echo "yes" >&6; }
3831 SET_MAKE=
3832 else
3833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834 $as_echo "no" >&6; }
3835 SET_MAKE="MAKE=${MAKE-make}"
3836 fi
3837
3838 rm -rf .tst 2>/dev/null
3839 mkdir .tst 2>/dev/null
3840 if test -d .tst; then
3841 am__leading_dot=.
3842 else
3843 am__leading_dot=_
3844 fi
3845 rmdir .tst 2>/dev/null
3846
3847 # Check whether --enable-silent-rules was given.
3848 if test "${enable_silent_rules+set}" = set; then :
3849 enableval=$enable_silent_rules;
3850 fi
3851
3852 case $enable_silent_rules in # (((
3853 yes) AM_DEFAULT_VERBOSITY=0;;
3854 no) AM_DEFAULT_VERBOSITY=1;;
3855 *) AM_DEFAULT_VERBOSITY=1;;
3856 esac
3857 am_make=${MAKE-make}
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3859 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3860 if ${am_cv_make_support_nested_variables+:} false; then :
3861 $as_echo_n "(cached) " >&6
3862 else
3863 if $as_echo 'TRUE=$(BAR$(V))
3864 BAR0=false
3865 BAR1=true
3866 V=1
3867 am__doit:
3868 @$(TRUE)
3869 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3870 am_cv_make_support_nested_variables=yes
3871 else
3872 am_cv_make_support_nested_variables=no
3873 fi
3874 fi
3875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3876 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3877 if test $am_cv_make_support_nested_variables = yes; then
3878 AM_V='$(V)'
3879 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3880 else
3881 AM_V=$AM_DEFAULT_VERBOSITY
3882 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3883 fi
3884 AM_BACKSLASH='\'
3885
3886 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3887 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3888 # is not polluted with repeated "-I."
3889 am__isrc=' -I$(srcdir)'
3890 # test to see if srcdir already configured
3891 if test -f $srcdir/config.status; then
3892 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3893 fi
3894 fi
3895
3896 # test whether we have cygpath
3897 if test -z "$CYGPATH_W"; then
3898 if (cygpath --version) >/dev/null 2>/dev/null; then
3899 CYGPATH_W='cygpath -w'
3900 else
3901 CYGPATH_W=echo
3902 fi
3903 fi
3904
3905
3906 # Define the identity of the package.
3907 PACKAGE='enchant'
3908 VERSION='2.2.8'
3909
3910
3911 cat >>confdefs.h <<_ACEOF
3912 #define PACKAGE "$PACKAGE"
3913 _ACEOF
3914
3915
3916 cat >>confdefs.h <<_ACEOF
3917 #define VERSION "$VERSION"
3918 _ACEOF
3919
3920 # Some tools Automake needs.
3921
3922 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3923
3924
3925 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3926
3927
3928 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3929
3930
3931 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3932
3933
3934 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3935
3936 # For better backward compatibility. To be removed once Automake 1.9.x
3937 # dies out for good. For more background, see:
3938 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3939 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3940 mkdir_p='$(MKDIR_P)'
3941
3942 # We need awk for the "check" target (and possibly the TAP driver). The
3943 # system "awk" is bad on some platforms.
3944 # Always define AMTAR for backward compatibility. Yes, it's still used
3945 # in the wild :-( We should find a proper way to deprecate it ...
3946 AMTAR='$${TAR-tar}'
3947
3948
3949 # We'll loop over all known methods to create a tar archive until one works.
3950 _am_tools='gnutar pax cpio none'
3951
3952 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3953
3954
3955
3956
3957
3958
3959 # POSIX will say in a future version that running "rm -f" with no argument
3960 # is OK; and we want to be able to make that assumption in our Makefile
3961 # recipes. So use an aggressive probe to check that the usage we want is
3962 # actually supported "in the wild" to an acceptable degree.
3963 # See automake bug#10828.
3964 # To make any issue more visible, cause the running configure to be aborted
3965 # by default if the 'rm' program in use doesn't match our expectations; the
3966 # user can still override this though.
3967 if rm -f && rm -fr && rm -rf; then : OK; else
3968 cat >&2 <<'END'
3969 Oops!
3970
3971 Your 'rm' program seems unable to run without file operands specified
3972 on the command line, even when the '-f' option is present. This is contrary
3973 to the behaviour of most rm programs out there, and not conforming with
3974 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3975
3976 Please tell bug-automake@gnu.org about your system, including the value
3977 of your $PATH and any error possibly output before this message. This
3978 can help us improve future automake versions.
3979
3980 END
3981 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3982 echo 'Configuration will proceed anyway, since you have set the' >&2
3983 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3984 echo >&2
3985 else
3986 cat >&2 <<'END'
3987 Aborting the configuration process, to ensure you take notice of the issue.
3988
3989 You can download and install GNU coreutils to get an 'rm' implementation
3990 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3991
3992 If you want to complete the configuration process using your problematic
3993 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3994 to "yes", and re-run configure.
3995
3996 END
3997 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3998 fi
3999 fi
4000
4001 # Make sure we can run config.sub.
4002 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4003 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4004
4005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4006 $as_echo_n "checking build system type... " >&6; }
4007 if ${ac_cv_build+:} false; then :
4008 $as_echo_n "(cached) " >&6
4009 else
4010 ac_build_alias=$build_alias
4011 test "x$ac_build_alias" = x &&
4012 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4013 test "x$ac_build_alias" = x &&
4014 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4015 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4016 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4017
4018 fi
4019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4020 $as_echo "$ac_cv_build" >&6; }
4021 case $ac_cv_build in
4022 *-*-*) ;;
4023 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4024 esac
4025 build=$ac_cv_build
4026 ac_save_IFS=$IFS; IFS='-'
4027 set x $ac_cv_build
4028 shift
4029 build_cpu=$1
4030 build_vendor=$2
4031 shift; shift
4032 # Remember, the first character of IFS is used to create $*,
4033 # except with old shells:
4034 build_os=$*
4035 IFS=$ac_save_IFS
4036 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4037
4038
4039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4040 $as_echo_n "checking host system type... " >&6; }
4041 if ${ac_cv_host+:} false; then :
4042 $as_echo_n "(cached) " >&6
4043 else
4044 if test "x$host_alias" = x; then
4045 ac_cv_host=$ac_cv_build
4046 else
4047 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4048 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4049 fi
4050
4051 fi
4052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4053 $as_echo "$ac_cv_host" >&6; }
4054 case $ac_cv_host in
4055 *-*-*) ;;
4056 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4057 esac
4058 host=$ac_cv_host
4059 ac_save_IFS=$IFS; IFS='-'
4060 set x $ac_cv_host
4061 shift
4062 host_cpu=$1
4063 host_vendor=$2
4064 shift; shift
4065 # Remember, the first character of IFS is used to create $*,
4066 # except with old shells:
4067 host_os=$*
4068 IFS=$ac_save_IFS
4069 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4070
4071
4072
4073
4074
4075 ENCHANT_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'`
4076 ENCHANT_MINOR_VERSION=`echo $VERSION | awk -F. '{print $2}'`
4077 ENCHANT_MICRO_VERSION=`echo $VERSION | awk -F. '{print $3}'`
4078 ENCHANT_VERSION=$ENCHANT_MAJOR_VERSION.$ENCHANT_MINOR_VERSION.$ENCHANT_MICRO_VERSION$ENCHANT_MICRO_VERSION_SUFFIX
4079 ENCHANT_VERSION_NUMBER=`expr $ENCHANT_MAJOR_VERSION \* 1000000 + $ENCHANT_MINOR_VERSION \* 1000 + $ENCHANT_MICRO_VERSION`
4080
4081 ENCHANT_SONUM=$ENCHANT_MAJOR_VERSION
4082 AGE=$ENCHANT_MINOR_VERSION
4083 REVISION=$ENCHANT_MICRO_VERSION
4084 CURRENT=`expr $ENCHANT_SONUM + $AGE`
4085
4086 VERSION_INFO=$CURRENT:$REVISION:$AGE
4087
4088
4089
4090
4091
4092
4093 ac_ext=c
4094 ac_cpp='$CPP $CPPFLAGS'
4095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4098 if test -n "$ac_tool_prefix"; then
4099 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4100 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4102 $as_echo_n "checking for $ac_word... " >&6; }
4103 if ${ac_cv_prog_CC+:} false; then :
4104 $as_echo_n "(cached) " >&6
4105 else
4106 if test -n "$CC"; then
4107 ac_cv_prog_CC="$CC" # Let the user override the test.
4108 else
4109 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4110 for as_dir in $PATH
4111 do
4112 IFS=$as_save_IFS
4113 test -z "$as_dir" && as_dir=.
4114 for ac_exec_ext in '' $ac_executable_extensions; do
4115 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4116 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4117 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4118 break 2
4119 fi
4120 done
4121 done
4122 IFS=$as_save_IFS
4123
4124 fi
4125 fi
4126 CC=$ac_cv_prog_CC
4127 if test -n "$CC"; then
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4129 $as_echo "$CC" >&6; }
4130 else
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4132 $as_echo "no" >&6; }
4133 fi
4134
4135
4136 fi
4137 if test -z "$ac_cv_prog_CC"; then
4138 ac_ct_CC=$CC
4139 # Extract the first word of "gcc", so it can be a program name with args.
4140 set dummy gcc; ac_word=$2
4141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4142 $as_echo_n "checking for $ac_word... " >&6; }
4143 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4144 $as_echo_n "(cached) " >&6
4145 else
4146 if test -n "$ac_ct_CC"; then
4147 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4148 else
4149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4150 for as_dir in $PATH
4151 do
4152 IFS=$as_save_IFS
4153 test -z "$as_dir" && as_dir=.
4154 for ac_exec_ext in '' $ac_executable_extensions; do
4155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4156 ac_cv_prog_ac_ct_CC="gcc"
4157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4158 break 2
4159 fi
4160 done
4161 done
4162 IFS=$as_save_IFS
4163
4164 fi
4165 fi
4166 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4167 if test -n "$ac_ct_CC"; then
4168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4169 $as_echo "$ac_ct_CC" >&6; }
4170 else
4171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4172 $as_echo "no" >&6; }
4173 fi
4174
4175 if test "x$ac_ct_CC" = x; then
4176 CC=""
4177 else
4178 case $cross_compiling:$ac_tool_warned in
4179 yes:)
4180 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4181 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4182 ac_tool_warned=yes ;;
4183 esac
4184 CC=$ac_ct_CC
4185 fi
4186 else
4187 CC="$ac_cv_prog_CC"
4188 fi
4189
4190 if test -z "$CC"; then
4191 if test -n "$ac_tool_prefix"; then
4192 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4193 set dummy ${ac_tool_prefix}cc; ac_word=$2
4194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4195 $as_echo_n "checking for $ac_word... " >&6; }
4196 if ${ac_cv_prog_CC+:} false; then :
4197 $as_echo_n "(cached) " >&6
4198 else
4199 if test -n "$CC"; then
4200 ac_cv_prog_CC="$CC" # Let the user override the test.
4201 else
4202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4203 for as_dir in $PATH
4204 do
4205 IFS=$as_save_IFS
4206 test -z "$as_dir" && as_dir=.
4207 for ac_exec_ext in '' $ac_executable_extensions; do
4208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4209 ac_cv_prog_CC="${ac_tool_prefix}cc"
4210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4211 break 2
4212 fi
4213 done
4214 done
4215 IFS=$as_save_IFS
4216
4217 fi
4218 fi
4219 CC=$ac_cv_prog_CC
4220 if test -n "$CC"; then
4221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4222 $as_echo "$CC" >&6; }
4223 else
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4225 $as_echo "no" >&6; }
4226 fi
4227
4228
4229 fi
4230 fi
4231 if test -z "$CC"; then
4232 # Extract the first word of "cc", so it can be a program name with args.
4233 set dummy cc; ac_word=$2
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4235 $as_echo_n "checking for $ac_word... " >&6; }
4236 if ${ac_cv_prog_CC+:} false; then :
4237 $as_echo_n "(cached) " >&6
4238 else
4239 if test -n "$CC"; then
4240 ac_cv_prog_CC="$CC" # Let the user override the test.
4241 else
4242 ac_prog_rejected=no
4243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4244 for as_dir in $PATH
4245 do
4246 IFS=$as_save_IFS
4247 test -z "$as_dir" && as_dir=.
4248 for ac_exec_ext in '' $ac_executable_extensions; do
4249 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4250 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4251 ac_prog_rejected=yes
4252 continue
4253 fi
4254 ac_cv_prog_CC="cc"
4255 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4256 break 2
4257 fi
4258 done
4259 done
4260 IFS=$as_save_IFS
4261
4262 if test $ac_prog_rejected = yes; then
4263 # We found a bogon in the path, so make sure we never use it.
4264 set dummy $ac_cv_prog_CC
4265 shift
4266 if test $# != 0; then
4267 # We chose a different compiler from the bogus one.
4268 # However, it has the same basename, so the bogon will be chosen
4269 # first if we set CC to just the basename; use the full file name.
4270 shift
4271 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4272 fi
4273 fi
4274 fi
4275 fi
4276 CC=$ac_cv_prog_CC
4277 if test -n "$CC"; then
4278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4279 $as_echo "$CC" >&6; }
4280 else
4281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4282 $as_echo "no" >&6; }
4283 fi
4284
4285
4286 fi
4287 if test -z "$CC"; then
4288 if test -n "$ac_tool_prefix"; then
4289 for ac_prog in cl.exe
4290 do
4291 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4292 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294 $as_echo_n "checking for $ac_word... " >&6; }
4295 if ${ac_cv_prog_CC+:} false; then :
4296 $as_echo_n "(cached) " >&6
4297 else
4298 if test -n "$CC"; then
4299 ac_cv_prog_CC="$CC" # Let the user override the test.
4300 else
4301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4302 for as_dir in $PATH
4303 do
4304 IFS=$as_save_IFS
4305 test -z "$as_dir" && as_dir=.
4306 for ac_exec_ext in '' $ac_executable_extensions; do
4307 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4308 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4310 break 2
4311 fi
4312 done
4313 done
4314 IFS=$as_save_IFS
4315
4316 fi
4317 fi
4318 CC=$ac_cv_prog_CC
4319 if test -n "$CC"; then
4320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4321 $as_echo "$CC" >&6; }
4322 else
4323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4324 $as_echo "no" >&6; }
4325 fi
4326
4327
4328 test -n "$CC" && break
4329 done
4330 fi
4331 if test -z "$CC"; then
4332 ac_ct_CC=$CC
4333 for ac_prog in cl.exe
4334 do
4335 # Extract the first word of "$ac_prog", so it can be a program name with args.
4336 set dummy $ac_prog; ac_word=$2
4337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4338 $as_echo_n "checking for $ac_word... " >&6; }
4339 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4340 $as_echo_n "(cached) " >&6
4341 else
4342 if test -n "$ac_ct_CC"; then
4343 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4344 else
4345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4346 for as_dir in $PATH
4347 do
4348 IFS=$as_save_IFS
4349 test -z "$as_dir" && as_dir=.
4350 for ac_exec_ext in '' $ac_executable_extensions; do
4351 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4352 ac_cv_prog_ac_ct_CC="$ac_prog"
4353 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4354 break 2
4355 fi
4356 done
4357 done
4358 IFS=$as_save_IFS
4359
4360 fi
4361 fi
4362 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4363 if test -n "$ac_ct_CC"; then
4364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4365 $as_echo "$ac_ct_CC" >&6; }
4366 else
4367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4368 $as_echo "no" >&6; }
4369 fi
4370
4371
4372 test -n "$ac_ct_CC" && break
4373 done
4374
4375 if test "x$ac_ct_CC" = x; then
4376 CC=""
4377 else
4378 case $cross_compiling:$ac_tool_warned in
4379 yes:)
4380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4381 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4382 ac_tool_warned=yes ;;
4383 esac
4384 CC=$ac_ct_CC
4385 fi
4386 fi
4387
4388 fi
4389 if test -z "$CC"; then
4390 if test -n "$ac_tool_prefix"; then
4391 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4392 set dummy ${ac_tool_prefix}clang; ac_word=$2
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4394 $as_echo_n "checking for $ac_word... " >&6; }
4395 if ${ac_cv_prog_CC+:} false; then :
4396 $as_echo_n "(cached) " >&6
4397 else
4398 if test -n "$CC"; then
4399 ac_cv_prog_CC="$CC" # Let the user override the test.
4400 else
4401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4402 for as_dir in $PATH
4403 do
4404 IFS=$as_save_IFS
4405 test -z "$as_dir" && as_dir=.
4406 for ac_exec_ext in '' $ac_executable_extensions; do
4407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4408 ac_cv_prog_CC="${ac_tool_prefix}clang"
4409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4410 break 2
4411 fi
4412 done
4413 done
4414 IFS=$as_save_IFS
4415
4416 fi
4417 fi
4418 CC=$ac_cv_prog_CC
4419 if test -n "$CC"; then
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4421 $as_echo "$CC" >&6; }
4422 else
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424 $as_echo "no" >&6; }
4425 fi
4426
4427
4428 fi
4429 if test -z "$ac_cv_prog_CC"; then
4430 ac_ct_CC=$CC
4431 # Extract the first word of "clang", so it can be a program name with args.
4432 set dummy clang; ac_word=$2
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4434 $as_echo_n "checking for $ac_word... " >&6; }
4435 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4436 $as_echo_n "(cached) " >&6
4437 else
4438 if test -n "$ac_ct_CC"; then
4439 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4440 else
4441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442 for as_dir in $PATH
4443 do
4444 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=.
4446 for ac_exec_ext in '' $ac_executable_extensions; do
4447 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4448 ac_cv_prog_ac_ct_CC="clang"
4449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4450 break 2
4451 fi
4452 done
4453 done
4454 IFS=$as_save_IFS
4455
4456 fi
4457 fi
4458 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4459 if test -n "$ac_ct_CC"; then
4460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4461 $as_echo "$ac_ct_CC" >&6; }
4462 else
4463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4464 $as_echo "no" >&6; }
4465 fi
4466
4467 if test "x$ac_ct_CC" = x; then
4468 CC=""
4469 else
4470 case $cross_compiling:$ac_tool_warned in
4471 yes:)
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4473 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4474 ac_tool_warned=yes ;;
4475 esac
4476 CC=$ac_ct_CC
4477 fi
4478 else
4479 CC="$ac_cv_prog_CC"
4480 fi
4481
4482 fi
4483
4484
4485 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4486 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4487 as_fn_error $? "no acceptable C compiler found in \$PATH
4488 See \`config.log' for more details" "$LINENO" 5; }
4489
4490 # Provide some information about the compiler.
4491 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4492 set X $ac_compile
4493 ac_compiler=$2
4494 for ac_option in --version -v -V -qversion -version; do
4495 { { ac_try="$ac_compiler $ac_option >&5"
4496 case "(($ac_try" in
4497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4498 *) ac_try_echo=$ac_try;;
4499 esac
4500 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4501 $as_echo "$ac_try_echo"; } >&5
4502 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4503 ac_status=$?
4504 if test -s conftest.err; then
4505 sed '10a\
4506 ... rest of stderr output deleted ...
4507 10q' conftest.err >conftest.er1
4508 cat conftest.er1 >&5
4509 fi
4510 rm -f conftest.er1 conftest.err
4511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4512 test $ac_status = 0; }
4513 done
4514
4515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4516 /* end confdefs.h. */
4517
4518 int
4519 main ()
4520 {
4521
4522 ;
4523 return 0;
4524 }
4525 _ACEOF
4526 ac_clean_files_save=$ac_clean_files
4527 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4528 # Try to create an executable without -o first, disregard a.out.
4529 # It will help us diagnose broken compilers, and finding out an intuition
4530 # of exeext.
4531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4532 $as_echo_n "checking whether the C compiler works... " >&6; }
4533 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4534
4535 # The possible output files:
4536 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4537
4538 ac_rmfiles=
4539 for ac_file in $ac_files
4540 do
4541 case $ac_file in
4542 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4543 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4544 esac
4545 done
4546 rm -f $ac_rmfiles
4547
4548 if { { ac_try="$ac_link_default"
4549 case "(($ac_try" in
4550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4551 *) ac_try_echo=$ac_try;;
4552 esac
4553 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4554 $as_echo "$ac_try_echo"; } >&5
4555 (eval "$ac_link_default") 2>&5
4556 ac_status=$?
4557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4558 test $ac_status = 0; }; then :
4559 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4560 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4561 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4562 # so that the user can short-circuit this test for compilers unknown to
4563 # Autoconf.
4564 for ac_file in $ac_files ''
4565 do
4566 test -f "$ac_file" || continue
4567 case $ac_file in
4568 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4569 ;;
4570 [ab].out )
4571 # We found the default executable, but exeext='' is most
4572 # certainly right.
4573 break;;
4574 *.* )
4575 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4576 then :; else
4577 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4578 fi
4579 # We set ac_cv_exeext here because the later test for it is not
4580 # safe: cross compilers may not add the suffix if given an `-o'
4581 # argument, so we may need to know it at that point already.
4582 # Even if this section looks crufty: it has the advantage of
4583 # actually working.
4584 break;;
4585 * )
4586 break;;
4587 esac
4588 done
4589 test "$ac_cv_exeext" = no && ac_cv_exeext=
4590
4591 else
4592 ac_file=''
4593 fi
4594 if test -z "$ac_file"; then :
4595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4596 $as_echo "no" >&6; }
4597 $as_echo "$as_me: failed program was:" >&5
4598 sed 's/^/| /' conftest.$ac_ext >&5
4599
4600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4602 as_fn_error 77 "C compiler cannot create executables
4603 See \`config.log' for more details" "$LINENO" 5; }
4604 else
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4606 $as_echo "yes" >&6; }
4607 fi
4608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4609 $as_echo_n "checking for C compiler default output file name... " >&6; }
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4611 $as_echo "$ac_file" >&6; }
4612 ac_exeext=$ac_cv_exeext
4613
4614 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4615 ac_clean_files=$ac_clean_files_save
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4617 $as_echo_n "checking for suffix of executables... " >&6; }
4618 if { { ac_try="$ac_link"
4619 case "(($ac_try" in
4620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4621 *) ac_try_echo=$ac_try;;
4622 esac
4623 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4624 $as_echo "$ac_try_echo"; } >&5
4625 (eval "$ac_link") 2>&5
4626 ac_status=$?
4627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4628 test $ac_status = 0; }; then :
4629 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4630 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4631 # work properly (i.e., refer to `conftest.exe'), while it won't with
4632 # `rm'.
4633 for ac_file in conftest.exe conftest conftest.*; do
4634 test -f "$ac_file" || continue
4635 case $ac_file in
4636 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4637 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4638 break;;
4639 * ) break;;
4640 esac
4641 done
4642 else
4643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4644 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4645 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4646 See \`config.log' for more details" "$LINENO" 5; }
4647 fi
4648 rm -f conftest conftest$ac_cv_exeext
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4650 $as_echo "$ac_cv_exeext" >&6; }
4651
4652 rm -f conftest.$ac_ext
4653 EXEEXT=$ac_cv_exeext
4654 ac_exeext=$EXEEXT
4655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4656 /* end confdefs.h. */
4657 #include <stdio.h>
4658 int
4659 main ()
4660 {
4661 FILE *f = fopen ("conftest.out", "w");
4662 return ferror (f) || fclose (f) != 0;
4663
4664 ;
4665 return 0;
4666 }
4667 _ACEOF
4668 ac_clean_files="$ac_clean_files conftest.out"
4669 # Check that the compiler produces executables we can run. If not, either
4670 # the compiler is broken, or we cross compile.
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4672 $as_echo_n "checking whether we are cross compiling... " >&6; }
4673 if test "$cross_compiling" != yes; then
4674 { { ac_try="$ac_link"
4675 case "(($ac_try" in
4676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4677 *) ac_try_echo=$ac_try;;
4678 esac
4679 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4680 $as_echo "$ac_try_echo"; } >&5
4681 (eval "$ac_link") 2>&5
4682 ac_status=$?
4683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4684 test $ac_status = 0; }
4685 if { ac_try='./conftest$ac_cv_exeext'
4686 { { case "(($ac_try" in
4687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4688 *) ac_try_echo=$ac_try;;
4689 esac
4690 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4691 $as_echo "$ac_try_echo"; } >&5
4692 (eval "$ac_try") 2>&5
4693 ac_status=$?
4694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4695 test $ac_status = 0; }; }; then
4696 cross_compiling=no
4697 else
4698 if test "$cross_compiling" = maybe; then
4699 cross_compiling=yes
4700 else
4701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4702 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4703 as_fn_error $? "cannot run C compiled programs.
4704 If you meant to cross compile, use \`--host'.
4705 See \`config.log' for more details" "$LINENO" 5; }
4706 fi
4707 fi
4708 fi
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4710 $as_echo "$cross_compiling" >&6; }
4711
4712 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4713 ac_clean_files=$ac_clean_files_save
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4715 $as_echo_n "checking for suffix of object files... " >&6; }
4716 if ${ac_cv_objext+:} false; then :
4717 $as_echo_n "(cached) " >&6
4718 else
4719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4720 /* end confdefs.h. */
4721
4722 int
4723 main ()
4724 {
4725
4726 ;
4727 return 0;
4728 }
4729 _ACEOF
4730 rm -f conftest.o conftest.obj
4731 if { { ac_try="$ac_compile"
4732 case "(($ac_try" in
4733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4734 *) ac_try_echo=$ac_try;;
4735 esac
4736 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4737 $as_echo "$ac_try_echo"; } >&5
4738 (eval "$ac_compile") 2>&5
4739 ac_status=$?
4740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4741 test $ac_status = 0; }; then :
4742 for ac_file in conftest.o conftest.obj conftest.*; do
4743 test -f "$ac_file" || continue;
4744 case $ac_file in
4745 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4746 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4747 break;;
4748 esac
4749 done
4750 else
4751 $as_echo "$as_me: failed program was:" >&5
4752 sed 's/^/| /' conftest.$ac_ext >&5
4753
4754 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4755 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4756 as_fn_error $? "cannot compute suffix of object files: cannot compile
4757 See \`config.log' for more details" "$LINENO" 5; }
4758 fi
4759 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4760 fi
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4762 $as_echo "$ac_cv_objext" >&6; }
4763 OBJEXT=$ac_cv_objext
4764 ac_objext=$OBJEXT
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4766 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4767 if ${ac_cv_c_compiler_gnu+:} false; then :
4768 $as_echo_n "(cached) " >&6
4769 else
4770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4771 /* end confdefs.h. */
4772
4773 int
4774 main ()
4775 {
4776 #ifndef __GNUC__
4777 choke me
4778 #endif
4779
4780 ;
4781 return 0;
4782 }
4783 _ACEOF
4784 if ac_fn_c_try_compile "$LINENO"; then :
4785 ac_compiler_gnu=yes
4786 else
4787 ac_compiler_gnu=no
4788 fi
4789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4790 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4791
4792 fi
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4794 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4795 if test $ac_compiler_gnu = yes; then
4796 GCC=yes
4797 else
4798 GCC=
4799 fi
4800 ac_test_CFLAGS=${CFLAGS+set}
4801 ac_save_CFLAGS=$CFLAGS
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4803 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4804 if ${ac_cv_prog_cc_g+:} false; then :
4805 $as_echo_n "(cached) " >&6
4806 else
4807 ac_save_c_werror_flag=$ac_c_werror_flag
4808 ac_c_werror_flag=yes
4809 ac_cv_prog_cc_g=no
4810 CFLAGS="-g"
4811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812 /* end confdefs.h. */
4813
4814 int
4815 main ()
4816 {
4817
4818 ;
4819 return 0;
4820 }
4821 _ACEOF
4822 if ac_fn_c_try_compile "$LINENO"; then :
4823 ac_cv_prog_cc_g=yes
4824 else
4825 CFLAGS=""
4826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4827 /* end confdefs.h. */
4828
4829 int
4830 main ()
4831 {
4832
4833 ;
4834 return 0;
4835 }
4836 _ACEOF
4837 if ac_fn_c_try_compile "$LINENO"; then :
4838
4839 else
4840 ac_c_werror_flag=$ac_save_c_werror_flag
4841 CFLAGS="-g"
4842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4843 /* end confdefs.h. */
4844
4845 int
4846 main ()
4847 {
4848
4849 ;
4850 return 0;
4851 }
4852 _ACEOF
4853 if ac_fn_c_try_compile "$LINENO"; then :
4854 ac_cv_prog_cc_g=yes
4855 fi
4856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4857 fi
4858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4859 fi
4860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4861 ac_c_werror_flag=$ac_save_c_werror_flag
4862 fi
4863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4864 $as_echo "$ac_cv_prog_cc_g" >&6; }
4865 if test "$ac_test_CFLAGS" = set; then
4866 CFLAGS=$ac_save_CFLAGS
4867 elif test $ac_cv_prog_cc_g = yes; then
4868 if test "$GCC" = yes; then
4869 CFLAGS="-g -O2"
4870 else
4871 CFLAGS="-g"
4872 fi
4873 else
4874 if test "$GCC" = yes; then
4875 CFLAGS="-O2"
4876 else
4877 CFLAGS=
4878 fi
4879 fi
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4881 $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4882 if ${ac_cv_prog_cc_c11+:} false; then :
4883 $as_echo_n "(cached) " >&6
4884 else
4885 ac_cv_prog_cc_c11=no
4886 ac_save_CC=$CC
4887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4888 /* end confdefs.h. */
4889 #include <stdarg.h>
4890 #include <stdbool.h>
4891 #include <stddef.h>
4892 #include <stdlib.h>
4893 #include <wchar.h>
4894 #include <stdio.h>
4895
4896 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4897 #define debug(...) fprintf (stderr, __VA_ARGS__)
4898 #define showlist(...) puts (#__VA_ARGS__)
4899 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4900 static void
4901 test_varargs_macros (void)
4902 {
4903 int x = 1234;
4904 int y = 5678;
4905 debug ("Flag");
4906 debug ("X = %d\n", x);
4907 showlist (The first, second, and third items.);
4908 report (x>y, "x is %d but y is %d", x, y);
4909 }
4910
4911 // Check long long types.
4912 #define BIG64 18446744073709551615ull
4913 #define BIG32 4294967295ul
4914 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4915 #if !BIG_OK
4916 your preprocessor is broken;
4917 #endif
4918 #if BIG_OK
4919 #else
4920 your preprocessor is broken;
4921 #endif
4922 static long long int bignum = -9223372036854775807LL;
4923 static unsigned long long int ubignum = BIG64;
4924
4925 struct incomplete_array
4926 {
4927 int datasize;
4928 double data[];
4929 };
4930
4931 struct named_init {
4932 int number;
4933 const wchar_t *name;
4934 double average;
4935 };
4936
4937 typedef const char *ccp;
4938
4939 static inline int
4940 test_restrict (ccp restrict text)
4941 {
4942 // See if C++-style comments work.
4943 // Iterate through items via the restricted pointer.
4944 // Also check for declarations in for loops.
4945 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4946 continue;
4947 return 0;
4948 }
4949
4950 // Check varargs and va_copy.
4951 static bool
4952 test_varargs (const char *format, ...)
4953 {
4954 va_list args;
4955 va_start (args, format);
4956 va_list args_copy;
4957 va_copy (args_copy, args);
4958
4959 const char *str = "";
4960 int number = 0;
4961 float fnumber = 0;
4962
4963 while (*format)
4964 {
4965 switch (*format++)
4966 {
4967 case 's': // string
4968 str = va_arg (args_copy, const char *);
4969 break;
4970 case 'd': // int
4971 number = va_arg (args_copy, int);
4972 break;
4973 case 'f': // float
4974 fnumber = va_arg (args_copy, double);
4975 break;
4976 default:
4977 break;
4978 }
4979 }
4980 va_end (args_copy);
4981 va_end (args);
4982
4983 return *str && number && fnumber;
4984 }
4985 // Check _Alignas.
4986 char _Alignas (double) aligned_as_double;
4987 char _Alignas (0) no_special_alignment;
4988 extern char aligned_as_int;
4989 char _Alignas (0) _Alignas (int) aligned_as_int;
4990
4991 // Check _Alignof.
4992 enum
4993 {
4994 int_alignment = _Alignof (int),
4995 int_array_alignment = _Alignof (int[100]),
4996 char_alignment = _Alignof (char)
4997 };
4998 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4999
5000 // Check _Noreturn.
5001 int _Noreturn does_not_return (void) { for (;;) continue; }
5002
5003 // Check _Static_assert.
5004 struct test_static_assert
5005 {
5006 int x;
5007 _Static_assert (sizeof (int) <= sizeof (long int),
5008 "_Static_assert does not work in struct");
5009 long int y;
5010 };
5011
5012 // Check UTF-8 literals.
5013 #define u8 syntax error!
5014 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5015
5016 // Check duplicate typedefs.
5017 typedef long *long_ptr;
5018 typedef long int *long_ptr;
5019 typedef long_ptr long_ptr;
5020
5021 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5022 struct anonymous
5023 {
5024 union {
5025 struct { int i; int j; };
5026 struct { int k; long int l; } w;
5027 };
5028 int m;
5029 } v1;
5030
5031 int
5032 main ()
5033 {
5034
5035 // Check bool.
5036 _Bool success = false;
5037
5038 // Check restrict.
5039 if (test_restrict ("String literal") == 0)
5040 success = true;
5041 char *restrict newvar = "Another string";
5042
5043 // Check varargs.
5044 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5045 test_varargs_macros ();
5046
5047 // Check flexible array members.
5048 struct incomplete_array *ia =
5049 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5050 ia->datasize = 10;
5051 for (int i = 0; i < ia->datasize; ++i)
5052 ia->data[i] = i * 1.234;
5053
5054 // Check named initializers.
5055 struct named_init ni = {
5056 .number = 34,
5057 .name = L"Test wide string",
5058 .average = 543.34343,
5059 };
5060
5061 ni.number = 58;
5062
5063 int dynamic_array[ni.number];
5064 dynamic_array[ni.number - 1] = 543;
5065
5066 // work around unused variable warnings
5067 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5068 || dynamic_array[ni.number - 1] != 543);
5069
5070 v1.i = 2;
5071 v1.w.k = 5;
5072 _Static_assert ((offsetof (struct anonymous, i)
5073 == offsetof (struct anonymous, w.k)),
5074 "Anonymous union alignment botch");
5075
5076 ;
5077 return 0;
5078 }
5079 _ACEOF
5080 for ac_arg in '' -std=gnu11
5081 do
5082 CC="$ac_save_CC $ac_arg"
5083 if ac_fn_c_try_compile "$LINENO"; then :
5084 ac_cv_prog_cc_c11=$ac_arg
5085 fi
5086 rm -f core conftest.err conftest.$ac_objext
5087 test "x$ac_cv_prog_cc_c11" != "xno" && break
5088 done
5089 rm -f conftest.$ac_ext
5090 CC=$ac_save_CC
5091
5092 fi
5093 # AC_CACHE_VAL
5094 ac_prog_cc_stdc_options=
5095 case "x$ac_cv_prog_cc_c11" in
5096 x)
5097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5098 $as_echo "none needed" >&6; } ;;
5099 xno)
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5101 $as_echo "unsupported" >&6; } ;;
5102 *)
5103 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5104 CC=$CC$ac_prog_cc_stdc_options
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5106 $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
5107 esac
5108 if test "x$ac_cv_prog_cc_c11" != xno; then :
5109 ac_prog_cc_stdc=c11
5110 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5111 else
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5113 $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
5114 if ${ac_cv_prog_cc_c99+:} false; then :
5115 $as_echo_n "(cached) " >&6
5116 else
5117 ac_cv_prog_cc_c99=no
5118 ac_save_CC=$CC
5119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5120 /* end confdefs.h. */
5121 #include <stdarg.h>
5122 #include <stdbool.h>
5123 #include <stddef.h>
5124 #include <stdlib.h>
5125 #include <wchar.h>
5126 #include <stdio.h>
5127
5128 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5129 #define debug(...) fprintf (stderr, __VA_ARGS__)
5130 #define showlist(...) puts (#__VA_ARGS__)
5131 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5132 static void
5133 test_varargs_macros (void)
5134 {
5135 int x = 1234;
5136 int y = 5678;
5137 debug ("Flag");
5138 debug ("X = %d\n", x);
5139 showlist (The first, second, and third items.);
5140 report (x>y, "x is %d but y is %d", x, y);
5141 }
5142
5143 // Check long long types.
5144 #define BIG64 18446744073709551615ull
5145 #define BIG32 4294967295ul
5146 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5147 #if !BIG_OK
5148 your preprocessor is broken;
5149 #endif
5150 #if BIG_OK
5151 #else
5152 your preprocessor is broken;
5153 #endif
5154 static long long int bignum = -9223372036854775807LL;
5155 static unsigned long long int ubignum = BIG64;
5156
5157 struct incomplete_array
5158 {
5159 int datasize;
5160 double data[];
5161 };
5162
5163 struct named_init {
5164 int number;
5165 const wchar_t *name;
5166 double average;
5167 };
5168
5169 typedef const char *ccp;
5170
5171 static inline int
5172 test_restrict (ccp restrict text)
5173 {
5174 // See if C++-style comments work.
5175 // Iterate through items via the restricted pointer.
5176 // Also check for declarations in for loops.
5177 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5178 continue;
5179 return 0;
5180 }
5181
5182 // Check varargs and va_copy.
5183 static bool
5184 test_varargs (const char *format, ...)
5185 {
5186 va_list args;
5187 va_start (args, format);
5188 va_list args_copy;
5189 va_copy (args_copy, args);
5190
5191 const char *str = "";
5192 int number = 0;
5193 float fnumber = 0;
5194
5195 while (*format)
5196 {
5197 switch (*format++)
5198 {
5199 case 's': // string
5200 str = va_arg (args_copy, const char *);
5201 break;
5202 case 'd': // int
5203 number = va_arg (args_copy, int);
5204 break;
5205 case 'f': // float
5206 fnumber = va_arg (args_copy, double);
5207 break;
5208 default:
5209 break;
5210 }
5211 }
5212 va_end (args_copy);
5213 va_end (args);
5214
5215 return *str && number && fnumber;
5216 }
5217 int
5218 main ()
5219 {
5220
5221 // Check bool.
5222 _Bool success = false;
5223
5224 // Check restrict.
5225 if (test_restrict ("String literal") == 0)
5226 success = true;
5227 char *restrict newvar = "Another string";
5228
5229 // Check varargs.
5230 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5231 test_varargs_macros ();
5232
5233 // Check flexible array members.
5234 struct incomplete_array *ia =
5235 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5236 ia->datasize = 10;
5237 for (int i = 0; i < ia->datasize; ++i)
5238 ia->data[i] = i * 1.234;
5239
5240 // Check named initializers.
5241 struct named_init ni = {
5242 .number = 34,
5243 .name = L"Test wide string",
5244 .average = 543.34343,
5245 };
5246
5247 ni.number = 58;
5248
5249 int dynamic_array[ni.number];
5250 dynamic_array[ni.number - 1] = 543;
5251
5252 // work around unused variable warnings
5253 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5254 || dynamic_array[ni.number - 1] != 543);
5255
5256 ;
5257 return 0;
5258 }
5259 _ACEOF
5260 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5261 do
5262 CC="$ac_save_CC $ac_arg"
5263 if ac_fn_c_try_compile "$LINENO"; then :
5264 ac_cv_prog_cc_c99=$ac_arg
5265 fi
5266 rm -f core conftest.err conftest.$ac_objext
5267 test "x$ac_cv_prog_cc_c99" != "xno" && break
5268 done
5269 rm -f conftest.$ac_ext
5270 CC=$ac_save_CC
5271
5272 fi
5273 # AC_CACHE_VAL
5274 ac_prog_cc_stdc_options=
5275 case "x$ac_cv_prog_cc_c99" in
5276 x)
5277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5278 $as_echo "none needed" >&6; } ;;
5279 xno)
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5281 $as_echo "unsupported" >&6; } ;;
5282 *)
5283 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5284 CC=$CC$ac_prog_cc_stdc_options
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5286 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5287 esac
5288 if test "x$ac_cv_prog_cc_c99" != xno; then :
5289 ac_prog_cc_stdc=c99
5290 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5291 else
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5293 $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5294 if ${ac_cv_prog_cc_c89+:} false; then :
5295 $as_echo_n "(cached) " >&6
5296 else
5297 ac_cv_prog_cc_c89=no
5298 ac_save_CC=$CC
5299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5300 /* end confdefs.h. */
5301 #include <stdarg.h>
5302 #include <stdio.h>
5303 struct stat;
5304 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5305 struct buf { int x; };
5306 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5307 static char *e (p, i)
5308 char **p;
5309 int i;
5310 {
5311 return p[i];
5312 }
5313 static char *f (char * (*g) (char **, int), char **p, ...)
5314 {
5315 char *s;
5316 va_list v;
5317 va_start (v,p);
5318 s = g (p, va_arg (v,int));
5319 va_end (v);
5320 return s;
5321 }
5322
5323 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5324 function prototypes and stuff, but not '\xHH' hex character constants.
5325 These don't provoke an error unfortunately, instead are silently treated
5326 as 'x'. The following induces an error, until -std is added to get
5327 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5328 array size at least. It's necessary to write '\x00'==0 to get something
5329 that's true only with -std. */
5330 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5331
5332 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5333 inside strings and character constants. */
5334 #define FOO(x) 'x'
5335 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5336
5337 int test (int i, double x);
5338 struct s1 {int (*f) (int a);};
5339 struct s2 {int (*f) (double a);};
5340 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5341 int argc;
5342 char **argv;
5343 int
5344 main ()
5345 {
5346 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5347 ;
5348 return 0;
5349 }
5350 _ACEOF
5351 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5352 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5353 do
5354 CC="$ac_save_CC $ac_arg"
5355 if ac_fn_c_try_compile "$LINENO"; then :
5356 ac_cv_prog_cc_c89=$ac_arg
5357 fi
5358 rm -f core conftest.err conftest.$ac_objext
5359 test "x$ac_cv_prog_cc_c89" != "xno" && break
5360 done
5361 rm -f conftest.$ac_ext
5362 CC=$ac_save_CC
5363
5364 fi
5365 # AC_CACHE_VAL
5366 ac_prog_cc_stdc_options=
5367 case "x$ac_cv_prog_cc_c89" in
5368 x)
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5370 $as_echo "none needed" >&6; } ;;
5371 xno)
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5373 $as_echo "unsupported" >&6; } ;;
5374 *)
5375 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5376 CC=$CC$ac_prog_cc_stdc_options
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5378 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5379 esac
5380 if test "x$ac_cv_prog_cc_c89" != xno; then :
5381 ac_prog_cc_stdc=c89
5382 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5383 else
5384 ac_prog_cc_stdc=no
5385 ac_cv_prog_cc_stdc=no
5386 fi
5387
5388 fi
5389
5390 fi
5391
5392 ac_ext=c
5393 ac_cpp='$CPP $CPPFLAGS'
5394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5397 DEPDIR="${am__leading_dot}deps"
5398
5399 ac_config_commands="$ac_config_commands depfiles"
5400
5401
5402 am_make=${MAKE-make}
5403 cat > confinc << 'END'
5404 am__doit:
5405 @echo this is the am__doit target
5406 .PHONY: am__doit
5407 END
5408 # If we don't find an include directive, just comment out the code.
5409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5410 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5411 am__include="#"
5412 am__quote=
5413 _am_result=none
5414 # First try GNU make style include.
5415 echo "include confinc" > confmf
5416 # Ignore all kinds of additional output from 'make'.
5417 case `$am_make -s -f confmf 2> /dev/null` in #(
5418 *the\ am__doit\ target*)
5419 am__include=include
5420 am__quote=
5421 _am_result=GNU
5422 ;;
5423 esac
5424 # Now try BSD make style include.
5425 if test "$am__include" = "#"; then
5426 echo '.include "confinc"' > confmf
5427 case `$am_make -s -f confmf 2> /dev/null` in #(
5428 *the\ am__doit\ target*)
5429 am__include=.include
5430 am__quote="\""
5431 _am_result=BSD
5432 ;;
5433 esac
5434 fi
5435
5436
5437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5438 $as_echo "$_am_result" >&6; }
5439 rm -f confinc confmf
5440
5441 # Check whether --enable-dependency-tracking was given.
5442 if test "${enable_dependency_tracking+set}" = set; then :
5443 enableval=$enable_dependency_tracking;
5444 fi
5445
5446 if test "x$enable_dependency_tracking" != xno; then
5447 am_depcomp="$ac_aux_dir/depcomp"
5448 AMDEPBACKSLASH='\'
5449 am__nodep='_no'
5450 fi
5451 if test "x$enable_dependency_tracking" != xno; then
5452 AMDEP_TRUE=
5453 AMDEP_FALSE='#'
5454 else
5455 AMDEP_TRUE='#'
5456 AMDEP_FALSE=
5457 fi
5458
5459
5460
5461 depcc="$CC" am_compiler_list=
5462
5463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5464 $as_echo_n "checking dependency style of $depcc... " >&6; }
5465 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5466 $as_echo_n "(cached) " >&6
5467 else
5468 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5469 # We make a subdir and do the tests there. Otherwise we can end up
5470 # making bogus files that we don't know about and never remove. For
5471 # instance it was reported that on HP-UX the gcc test will end up
5472 # making a dummy file named 'D' -- because '-MD' means "put the output
5473 # in D".
5474 rm -rf conftest.dir
5475 mkdir conftest.dir
5476 # Copy depcomp to subdir because otherwise we won't find it if we're
5477 # using a relative directory.
5478 cp "$am_depcomp" conftest.dir
5479 cd conftest.dir
5480 # We will build objects and dependencies in a subdirectory because
5481 # it helps to detect inapplicable dependency modes. For instance
5482 # both Tru64's cc and ICC support -MD to output dependencies as a
5483 # side effect of compilation, but ICC will put the dependencies in
5484 # the current directory while Tru64 will put them in the object
5485 # directory.
5486 mkdir sub
5487
5488 am_cv_CC_dependencies_compiler_type=none
5489 if test "$am_compiler_list" = ""; then
5490 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5491 fi
5492 am__universal=false
5493 case " $depcc " in #(
5494 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5495 esac
5496
5497 for depmode in $am_compiler_list; do
5498 # Setup a source with many dependencies, because some compilers
5499 # like to wrap large dependency lists on column 80 (with \), and
5500 # we should not choose a depcomp mode which is confused by this.
5501 #
5502 # We need to recreate these files for each test, as the compiler may
5503 # overwrite some of them when testing with obscure command lines.
5504 # This happens at least with the AIX C compiler.
5505 : > sub/conftest.c
5506 for i in 1 2 3 4 5 6; do
5507 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5508 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5509 # Solaris 10 /bin/sh.
5510 echo '/* dummy */' > sub/conftst$i.h
5511 done
5512 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5513
5514 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5515 # mode. It turns out that the SunPro C++ compiler does not properly
5516 # handle '-M -o', and we need to detect this. Also, some Intel
5517 # versions had trouble with output in subdirs.
5518 am__obj=sub/conftest.${OBJEXT-o}
5519 am__minus_obj="-o $am__obj"
5520 case $depmode in
5521 gcc)
5522 # This depmode causes a compiler race in universal mode.
5523 test "$am__universal" = false || continue
5524 ;;
5525 nosideeffect)
5526 # After this tag, mechanisms are not by side-effect, so they'll
5527 # only be used when explicitly requested.
5528 if test "x$enable_dependency_tracking" = xyes; then
5529 continue
5530 else
5531 break
5532 fi
5533 ;;
5534 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5535 # This compiler won't grok '-c -o', but also, the minuso test has
5536 # not run yet. These depmodes are late enough in the game, and
5537 # so weak that their functioning should not be impacted.
5538 am__obj=conftest.${OBJEXT-o}
5539 am__minus_obj=
5540 ;;
5541 none) break ;;
5542 esac
5543 if depmode=$depmode \
5544 source=sub/conftest.c object=$am__obj \
5545 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5546 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5547 >/dev/null 2>conftest.err &&
5548 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5549 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5550 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5551 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5552 # icc doesn't choke on unknown options, it will just issue warnings
5553 # or remarks (even with -Werror). So we grep stderr for any message
5554 # that says an option was ignored or not supported.
5555 # When given -MP, icc 7.0 and 7.1 complain thusly:
5556 # icc: Command line warning: ignoring option '-M'; no argument required
5557 # The diagnosis changed in icc 8.0:
5558 # icc: Command line remark: option '-MP' not supported
5559 if (grep 'ignoring option' conftest.err ||
5560 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5561 am_cv_CC_dependencies_compiler_type=$depmode
5562 break
5563 fi
5564 fi
5565 done
5566
5567 cd ..
5568 rm -rf conftest.dir
5569 else
5570 am_cv_CC_dependencies_compiler_type=none
5571 fi
5572
5573 fi
5574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5575 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5576 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5577
5578 if
5579 test "x$enable_dependency_tracking" != xno \
5580 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5581 am__fastdepCC_TRUE=
5582 am__fastdepCC_FALSE='#'
5583 else
5584 am__fastdepCC_TRUE='#'
5585 am__fastdepCC_FALSE=
5586 fi
5587
5588
5589
5590 ac_ext=c
5591 ac_cpp='$CPP $CPPFLAGS'
5592 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5593 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5594 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5596 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5597 # On Suns, sometimes $CPP names a directory.
5598 if test -n "$CPP" && test -d "$CPP"; then
5599 CPP=
5600 fi
5601 if test -z "$CPP"; then
5602 if ${ac_cv_prog_CPP+:} false; then :
5603 $as_echo_n "(cached) " >&6
5604 else
5605 # Double quotes because CPP needs to be expanded
5606 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5607 do
5608 ac_preproc_ok=false
5609 for ac_c_preproc_warn_flag in '' yes
5610 do
5611 # Use a header file that comes with gcc, so configuring glibc
5612 # with a fresh cross-compiler works.
5613 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5614 # <limits.h> exists even on freestanding compilers.
5615 # On the NeXT, cc -E runs the code through the compiler's parser,
5616 # not just through cpp. "Syntax error" is here to catch this case.
5617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5618 /* end confdefs.h. */
5619 #ifdef __STDC__
5620 # include <limits.h>
5621 #else
5622 # include <assert.h>
5623 #endif
5624 Syntax error
5625 _ACEOF
5626 if ac_fn_c_try_cpp "$LINENO"; then :
5627
5628 else
5629 # Broken: fails on valid input.
5630 continue
5631 fi
5632 rm -f conftest.err conftest.i conftest.$ac_ext
5633
5634 # OK, works on sane cases. Now check whether nonexistent headers
5635 # can be detected and how.
5636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5637 /* end confdefs.h. */
5638 #include <ac_nonexistent.h>
5639 _ACEOF
5640 if ac_fn_c_try_cpp "$LINENO"; then :
5641 # Broken: success on invalid input.
5642 continue
5643 else
5644 # Passes both tests.
5645 ac_preproc_ok=:
5646 break
5647 fi
5648 rm -f conftest.err conftest.i conftest.$ac_ext
5649
5650 done
5651 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5652 rm -f conftest.i conftest.err conftest.$ac_ext
5653 if $ac_preproc_ok; then :
5654 break
5655 fi
5656
5657 done
5658 ac_cv_prog_CPP=$CPP
5659
5660 fi
5661 CPP=$ac_cv_prog_CPP
5662 else
5663 ac_cv_prog_CPP=$CPP
5664 fi
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5666 $as_echo "$CPP" >&6; }
5667 ac_preproc_ok=false
5668 for ac_c_preproc_warn_flag in '' yes
5669 do
5670 # Use a header file that comes with gcc, so configuring glibc
5671 # with a fresh cross-compiler works.
5672 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5673 # <limits.h> exists even on freestanding compilers.
5674 # On the NeXT, cc -E runs the code through the compiler's parser,
5675 # not just through cpp. "Syntax error" is here to catch this case.
5676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5677 /* end confdefs.h. */
5678 #ifdef __STDC__
5679 # include <limits.h>
5680 #else
5681 # include <assert.h>
5682 #endif
5683 Syntax error
5684 _ACEOF
5685 if ac_fn_c_try_cpp "$LINENO"; then :
5686
5687 else
5688 # Broken: fails on valid input.
5689 continue
5690 fi
5691 rm -f conftest.err conftest.i conftest.$ac_ext
5692
5693 # OK, works on sane cases. Now check whether nonexistent headers
5694 # can be detected and how.
5695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5696 /* end confdefs.h. */
5697 #include <ac_nonexistent.h>
5698 _ACEOF
5699 if ac_fn_c_try_cpp "$LINENO"; then :
5700 # Broken: success on invalid input.
5701 continue
5702 else
5703 # Passes both tests.
5704 ac_preproc_ok=:
5705 break
5706 fi
5707 rm -f conftest.err conftest.i conftest.$ac_ext
5708
5709 done
5710 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5711 rm -f conftest.i conftest.err conftest.$ac_ext
5712 if $ac_preproc_ok; then :
5713
5714 else
5715 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5716 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5717 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5718 See \`config.log' for more details" "$LINENO" 5; }
5719 fi
5720
5721 ac_ext=c
5722 ac_cpp='$CPP $CPPFLAGS'
5723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5726
5727
5728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5729 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5730 if ${ac_cv_path_GREP+:} false; then :
5731 $as_echo_n "(cached) " >&6
5732 else
5733 if test -z "$GREP"; then
5734 ac_path_GREP_found=false
5735 # Loop through the user's path and test for each of PROGNAME-LIST
5736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5737 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5738 do
5739 IFS=$as_save_IFS
5740 test -z "$as_dir" && as_dir=.
5741 for ac_prog in grep ggrep; do
5742 for ac_exec_ext in '' $ac_executable_extensions; do
5743 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5744 as_fn_executable_p "$ac_path_GREP" || continue
5745 # Check for GNU ac_path_GREP and select it if it is found.
5746 # Check for GNU $ac_path_GREP
5747 case `"$ac_path_GREP" --version 2>&1` in
5748 *GNU*)
5749 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5750 *)
5751 ac_count=0
5752 $as_echo_n 0123456789 >"conftest.in"
5753 while :
5754 do
5755 cat "conftest.in" "conftest.in" >"conftest.tmp"
5756 mv "conftest.tmp" "conftest.in"
5757 cp "conftest.in" "conftest.nl"
5758 $as_echo 'GREP' >> "conftest.nl"
5759 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5760 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5761 as_fn_arith $ac_count + 1 && ac_count=$as_val
5762 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5763 # Best one so far, save it but keep looking for a better one
5764 ac_cv_path_GREP="$ac_path_GREP"
5765 ac_path_GREP_max=$ac_count
5766 fi
5767 # 10*(2^10) chars as input seems more than enough
5768 test $ac_count -gt 10 && break
5769 done
5770 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5771 esac
5772
5773 $ac_path_GREP_found && break 3
5774 done
5775 done
5776 done
5777 IFS=$as_save_IFS
5778 if test -z "$ac_cv_path_GREP"; then
5779 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5780 fi
5781 else
5782 ac_cv_path_GREP=$GREP
5783 fi
5784
5785 fi
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5787 $as_echo "$ac_cv_path_GREP" >&6; }
5788 GREP="$ac_cv_path_GREP"
5789
5790
5791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5792 $as_echo_n "checking for egrep... " >&6; }
5793 if ${ac_cv_path_EGREP+:} false; then :
5794 $as_echo_n "(cached) " >&6
5795 else
5796 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5797 then ac_cv_path_EGREP="$GREP -E"
5798 else
5799 if test -z "$EGREP"; then
5800 ac_path_EGREP_found=false
5801 # Loop through the user's path and test for each of PROGNAME-LIST
5802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5804 do
5805 IFS=$as_save_IFS
5806 test -z "$as_dir" && as_dir=.
5807 for ac_prog in egrep; do
5808 for ac_exec_ext in '' $ac_executable_extensions; do
5809 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5810 as_fn_executable_p "$ac_path_EGREP" || continue
5811 # Check for GNU ac_path_EGREP and select it if it is found.
5812 # Check for GNU $ac_path_EGREP
5813 case `"$ac_path_EGREP" --version 2>&1` in
5814 *GNU*)
5815 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5816 *)
5817 ac_count=0
5818 $as_echo_n 0123456789 >"conftest.in"
5819 while :
5820 do
5821 cat "conftest.in" "conftest.in" >"conftest.tmp"
5822 mv "conftest.tmp" "conftest.in"
5823 cp "conftest.in" "conftest.nl"
5824 $as_echo 'EGREP' >> "conftest.nl"
5825 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5826 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5827 as_fn_arith $ac_count + 1 && ac_count=$as_val
5828 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5829 # Best one so far, save it but keep looking for a better one
5830 ac_cv_path_EGREP="$ac_path_EGREP"
5831 ac_path_EGREP_max=$ac_count
5832 fi
5833 # 10*(2^10) chars as input seems more than enough
5834 test $ac_count -gt 10 && break
5835 done
5836 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5837 esac
5838
5839 $ac_path_EGREP_found && break 3
5840 done
5841 done
5842 done
5843 IFS=$as_save_IFS
5844 if test -z "$ac_cv_path_EGREP"; then
5845 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5846 fi
5847 else
5848 ac_cv_path_EGREP=$EGREP
5849 fi
5850
5851 fi
5852 fi
5853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5854 $as_echo "$ac_cv_path_EGREP" >&6; }
5855 EGREP="$ac_cv_path_EGREP"
5856
5857
5858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5859 $as_echo_n "checking for ANSI C header files... " >&6; }
5860 if ${ac_cv_header_stdc+:} false; then :
5861 $as_echo_n "(cached) " >&6
5862 else
5863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5864 /* end confdefs.h. */
5865 #include <stdlib.h>
5866 #include <stdarg.h>
5867 #include <string.h>
5868 #include <float.h>
5869
5870 int
5871 main ()
5872 {
5873
5874 ;
5875 return 0;
5876 }
5877 _ACEOF
5878 if ac_fn_c_try_compile "$LINENO"; then :
5879 ac_cv_header_stdc=yes
5880 else
5881 ac_cv_header_stdc=no
5882 fi
5883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5884
5885 if test $ac_cv_header_stdc = yes; then
5886 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5888 /* end confdefs.h. */
5889 #include <string.h>
5890
5891 _ACEOF
5892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5893 $EGREP "memchr" >/dev/null 2>&1; then :
5894
5895 else
5896 ac_cv_header_stdc=no
5897 fi
5898 rm -f conftest*
5899
5900 fi
5901
5902 if test $ac_cv_header_stdc = yes; then
5903 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5905 /* end confdefs.h. */
5906 #include <stdlib.h>
5907
5908 _ACEOF
5909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5910 $EGREP "free" >/dev/null 2>&1; then :
5911
5912 else
5913 ac_cv_header_stdc=no
5914 fi
5915 rm -f conftest*
5916
5917 fi
5918
5919 if test $ac_cv_header_stdc = yes; then
5920 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5921 if test "$cross_compiling" = yes; then :
5922 :
5923 else
5924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5925 /* end confdefs.h. */
5926 #include <ctype.h>
5927 #include <stdlib.h>
5928 #if ((' ' & 0x0FF) == 0x020)
5929 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5930 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5931 #else
5932 # define ISLOWER(c) \
5933 (('a' <= (c) && (c) <= 'i') \
5934 || ('j' <= (c) && (c) <= 'r') \
5935 || ('s' <= (c) && (c) <= 'z'))
5936 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5937 #endif
5938
5939 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5940 int
5941 main ()
5942 {
5943 int i;
5944 for (i = 0; i < 256; i++)
5945 if (XOR (islower (i), ISLOWER (i))
5946 || toupper (i) != TOUPPER (i))
5947 return 2;
5948 return 0;
5949 }
5950 _ACEOF
5951 if ac_fn_c_try_run "$LINENO"; then :
5952
5953 else
5954 ac_cv_header_stdc=no
5955 fi
5956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5957 conftest.$ac_objext conftest.beam conftest.$ac_ext
5958 fi
5959
5960 fi
5961 fi
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5963 $as_echo "$ac_cv_header_stdc" >&6; }
5964 if test $ac_cv_header_stdc = yes; then
5965
5966 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5967
5968 fi
5969
5970 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5971 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5972 inttypes.h stdint.h unistd.h
5973 do :
5974 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5975 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5976 "
5977 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5978 cat >>confdefs.h <<_ACEOF
5979 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5980 _ACEOF
5981
5982 fi
5983
5984 done
5985
5986
5987
5988 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5989 if test "x$ac_cv_header_minix_config_h" = xyes; then :
5990 MINIX=yes
5991 else
5992 MINIX=
5993 fi
5994
5995
5996 if test "$MINIX" = yes; then
5997
5998 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5999
6000
6001 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6002
6003
6004 $as_echo "#define _MINIX 1" >>confdefs.h
6005
6006
6007 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6008
6009 fi
6010
6011
6012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6013 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6014 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6015 $as_echo_n "(cached) " >&6
6016 else
6017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6018 /* end confdefs.h. */
6019
6020 # define __EXTENSIONS__ 1
6021 $ac_includes_default
6022 int
6023 main ()
6024 {
6025
6026 ;
6027 return 0;
6028 }
6029 _ACEOF
6030 if ac_fn_c_try_compile "$LINENO"; then :
6031 ac_cv_safe_to_define___extensions__=yes
6032 else
6033 ac_cv_safe_to_define___extensions__=no
6034 fi
6035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6036 fi
6037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6038 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6039 test $ac_cv_safe_to_define___extensions__ = yes &&
6040 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6041
6042 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6043
6044 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6045
6046 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6047
6048 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6049
6050 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
6051
6052 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6053
6054 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6055
6056 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6057
6058 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6059
6060 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6061
6062 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6063
6064 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6065
6066 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6067
6068 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6069
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6071 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6072 if ${ac_cv_should_define__xopen_source+:} false; then :
6073 $as_echo_n "(cached) " >&6
6074 else
6075 ac_cv_should_define__xopen_source=no
6076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6077 /* end confdefs.h. */
6078
6079 #include <wchar.h>
6080 mbstate_t x;
6081 int
6082 main ()
6083 {
6084
6085 ;
6086 return 0;
6087 }
6088 _ACEOF
6089 if ac_fn_c_try_compile "$LINENO"; then :
6090
6091 else
6092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6093 /* end confdefs.h. */
6094
6095 #define _XOPEN_SOURCE 500
6096 #include <wchar.h>
6097 mbstate_t x;
6098 int
6099 main ()
6100 {
6101
6102 ;
6103 return 0;
6104 }
6105 _ACEOF
6106 if ac_fn_c_try_compile "$LINENO"; then :
6107 ac_cv_should_define__xopen_source=yes
6108 fi
6109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6110 fi
6111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6112 fi
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6114 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6115 test $ac_cv_should_define__xopen_source = yes &&
6116 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6117
6118 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6131 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6132 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6133 $as_echo_n "(cached) " >&6
6134 else
6135
6136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6137 /* end confdefs.h. */
6138
6139 #ifdef __ACK__
6140 Amsterdam
6141 #endif
6142
6143 _ACEOF
6144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6145 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6146 gl_cv_c_amsterdam_compiler=yes
6147 else
6148 gl_cv_c_amsterdam_compiler=no
6149 fi
6150 rm -f conftest*
6151
6152
6153 fi
6154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6155 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6156
6157 if test $gl_cv_c_amsterdam_compiler = yes; then
6158 if test -z "$AR"; then
6159 AR='cc -c.a'
6160 fi
6161 if test -z "$ARFLAGS"; then
6162 ARFLAGS='-o'
6163 fi
6164 else
6165 :
6166 fi
6167
6168 if test -n "$ac_tool_prefix"; then
6169 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6170 set dummy ${ac_tool_prefix}ar; ac_word=$2
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172 $as_echo_n "checking for $ac_word... " >&6; }
6173 if ${ac_cv_prog_AR+:} false; then :
6174 $as_echo_n "(cached) " >&6
6175 else
6176 if test -n "$AR"; then
6177 ac_cv_prog_AR="$AR" # Let the user override the test.
6178 else
6179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180 for as_dir in $PATH
6181 do
6182 IFS=$as_save_IFS
6183 test -z "$as_dir" && as_dir=.
6184 for ac_exec_ext in '' $ac_executable_extensions; do
6185 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6186 ac_cv_prog_AR="${ac_tool_prefix}ar"
6187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6188 break 2
6189 fi
6190 done
6191 done
6192 IFS=$as_save_IFS
6193
6194 fi
6195 fi
6196 AR=$ac_cv_prog_AR
6197 if test -n "$AR"; then
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6199 $as_echo "$AR" >&6; }
6200 else
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202 $as_echo "no" >&6; }
6203 fi
6204
6205
6206 fi
6207 if test -z "$ac_cv_prog_AR"; then
6208 ac_ct_AR=$AR
6209 # Extract the first word of "ar", so it can be a program name with args.
6210 set dummy ar; ac_word=$2
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6212 $as_echo_n "checking for $ac_word... " >&6; }
6213 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6214 $as_echo_n "(cached) " >&6
6215 else
6216 if test -n "$ac_ct_AR"; then
6217 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6218 else
6219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6220 for as_dir in $PATH
6221 do
6222 IFS=$as_save_IFS
6223 test -z "$as_dir" && as_dir=.
6224 for ac_exec_ext in '' $ac_executable_extensions; do
6225 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6226 ac_cv_prog_ac_ct_AR="ar"
6227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6228 break 2
6229 fi
6230 done
6231 done
6232 IFS=$as_save_IFS
6233
6234 fi
6235 fi
6236 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6237 if test -n "$ac_ct_AR"; then
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6239 $as_echo "$ac_ct_AR" >&6; }
6240 else
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242 $as_echo "no" >&6; }
6243 fi
6244
6245 if test "x$ac_ct_AR" = x; then
6246 AR="ar"
6247 else
6248 case $cross_compiling:$ac_tool_warned in
6249 yes:)
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6251 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6252 ac_tool_warned=yes ;;
6253 esac
6254 AR=$ac_ct_AR
6255 fi
6256 else
6257 AR="$ac_cv_prog_AR"
6258 fi
6259
6260 if test -z "$ARFLAGS"; then
6261 ARFLAGS='cr'
6262 fi
6263
6264
6265
6266 if test -z "$RANLIB"; then
6267 if test $gl_cv_c_amsterdam_compiler = yes; then
6268 RANLIB=':'
6269 else
6270 if test -n "$ac_tool_prefix"; then
6271 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6272 set dummy ${ac_tool_prefix}ranlib; 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; }
6275 if ${ac_cv_prog_RANLIB+:} false; then :
6276 $as_echo_n "(cached) " >&6
6277 else
6278 if test -n "$RANLIB"; then
6279 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6280 else
6281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6282 for as_dir in $PATH
6283 do
6284 IFS=$as_save_IFS
6285 test -z "$as_dir" && as_dir=.
6286 for ac_exec_ext in '' $ac_executable_extensions; do
6287 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6288 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6289 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6290 break 2
6291 fi
6292 done
6293 done
6294 IFS=$as_save_IFS
6295
6296 fi
6297 fi
6298 RANLIB=$ac_cv_prog_RANLIB
6299 if test -n "$RANLIB"; then
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6301 $as_echo "$RANLIB" >&6; }
6302 else
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304 $as_echo "no" >&6; }
6305 fi
6306
6307
6308 fi
6309 if test -z "$ac_cv_prog_RANLIB"; then
6310 ac_ct_RANLIB=$RANLIB
6311 # Extract the first word of "ranlib", so it can be a program name with args.
6312 set dummy ranlib; ac_word=$2
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6314 $as_echo_n "checking for $ac_word... " >&6; }
6315 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6316 $as_echo_n "(cached) " >&6
6317 else
6318 if test -n "$ac_ct_RANLIB"; then
6319 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6320 else
6321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6322 for as_dir in $PATH
6323 do
6324 IFS=$as_save_IFS
6325 test -z "$as_dir" && as_dir=.
6326 for ac_exec_ext in '' $ac_executable_extensions; do
6327 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6328 ac_cv_prog_ac_ct_RANLIB="ranlib"
6329 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6330 break 2
6331 fi
6332 done
6333 done
6334 IFS=$as_save_IFS
6335
6336 fi
6337 fi
6338 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6339 if test -n "$ac_ct_RANLIB"; then
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6341 $as_echo "$ac_ct_RANLIB" >&6; }
6342 else
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6344 $as_echo "no" >&6; }
6345 fi
6346
6347 if test "x$ac_ct_RANLIB" = x; then
6348 RANLIB=":"
6349 else
6350 case $cross_compiling:$ac_tool_warned in
6351 yes:)
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6353 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6354 ac_tool_warned=yes ;;
6355 esac
6356 RANLIB=$ac_ct_RANLIB
6357 fi
6358 else
6359 RANLIB="$ac_cv_prog_RANLIB"
6360 fi
6361
6362 fi
6363 fi
6364
6365
6366
6367
6368 # Pre-early section.
6369
6370
6371
6372 # Code from module absolute-header:
6373 # Code from module bootstrap:
6374 # Code from module c99:
6375 # Code from module configmake:
6376 # Code from module extensions:
6377 # Code from module extern-inline:
6378 # Code from module extract-trace:
6379 # Code from module flock:
6380 # Code from module funclib.sh:
6381 # Code from module getopt-posix:
6382 # Code from module gettext-h:
6383 # Code from module gnu-make:
6384 # Code from module include_next:
6385 # Code from module inline-source:
6386 # Code from module malloc-posix:
6387 # Code from module manywarnings:
6388 # Code from module msvc-inval:
6389 # Code from module msvc-nothrow:
6390 # Code from module options-parser:
6391 # Code from module rawmemchr:
6392 # Code from module relocatable-lib-lgpl:
6393 # Code from module snippet/_Noreturn:
6394 # Code from module snippet/arg-nonnull:
6395 # Code from module snippet/c++defs:
6396 # Code from module snippet/unused-parameter:
6397 # Code from module snippet/warn-on-use:
6398 # Code from module ssize_t:
6399 # Code from module std-gnu11:
6400 # Code from module stddef:
6401 # Code from module stdlib:
6402 # Code from module strchrnul:
6403 # Code from module strdup-posix:
6404 # Code from module string:
6405 # Code from module sys_file:
6406 # Code from module sys_types:
6407 # Code from module unistd:
6408 # Code from module warnings:
6409
6410 ac_ext=cpp
6411 ac_cpp='$CXXCPP $CPPFLAGS'
6412 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6413 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6414 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6415 if test -z "$CXX"; then
6416 if test -n "$CCC"; then
6417 CXX=$CCC
6418 else
6419 if test -n "$ac_tool_prefix"; then
6420 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
6421 do
6422 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6423 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6425 $as_echo_n "checking for $ac_word... " >&6; }
6426 if ${ac_cv_prog_CXX+:} false; then :
6427 $as_echo_n "(cached) " >&6
6428 else
6429 if test -n "$CXX"; then
6430 ac_cv_prog_CXX="$CXX" # Let the user override the test.
6431 else
6432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6433 for as_dir in $PATH
6434 do
6435 IFS=$as_save_IFS
6436 test -z "$as_dir" && as_dir=.
6437 for ac_exec_ext in '' $ac_executable_extensions; do
6438 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6439 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
6440 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6441 break 2
6442 fi
6443 done
6444 done
6445 IFS=$as_save_IFS
6446
6447 fi
6448 fi
6449 CXX=$ac_cv_prog_CXX
6450 if test -n "$CXX"; then
6451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
6452 $as_echo "$CXX" >&6; }
6453 else
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6455 $as_echo "no" >&6; }
6456 fi
6457
6458
6459 test -n "$CXX" && break
6460 done
6461 fi
6462 if test -z "$CXX"; then
6463 ac_ct_CXX=$CXX
6464 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
6465 do
6466 # Extract the first word of "$ac_prog", so it can be a program name with args.
6467 set dummy $ac_prog; ac_word=$2
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6469 $as_echo_n "checking for $ac_word... " >&6; }
6470 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
6471 $as_echo_n "(cached) " >&6
6472 else
6473 if test -n "$ac_ct_CXX"; then
6474 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
6475 else
6476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6477 for as_dir in $PATH
6478 do
6479 IFS=$as_save_IFS
6480 test -z "$as_dir" && as_dir=.
6481 for ac_exec_ext in '' $ac_executable_extensions; do
6482 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6483 ac_cv_prog_ac_ct_CXX="$ac_prog"
6484 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6485 break 2
6486 fi
6487 done
6488 done
6489 IFS=$as_save_IFS
6490
6491 fi
6492 fi
6493 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
6494 if test -n "$ac_ct_CXX"; then
6495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
6496 $as_echo "$ac_ct_CXX" >&6; }
6497 else
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499 $as_echo "no" >&6; }
6500 fi
6501
6502
6503 test -n "$ac_ct_CXX" && break
6504 done
6505
6506 if test "x$ac_ct_CXX" = x; then
6507 CXX="g++"
6508 else
6509 case $cross_compiling:$ac_tool_warned in
6510 yes:)
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6512 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6513 ac_tool_warned=yes ;;
6514 esac
6515 CXX=$ac_ct_CXX
6516 fi
6517 fi
6518
6519 fi
6520 fi
6521 # Provide some information about the compiler.
6522 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
6523 set X $ac_compile
6524 ac_compiler=$2
6525 for ac_option in --version -v -V -qversion; do
6526 { { ac_try="$ac_compiler $ac_option >&5"
6527 case "(($ac_try" in
6528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6529 *) ac_try_echo=$ac_try;;
6530 esac
6531 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6532 $as_echo "$ac_try_echo"; } >&5
6533 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6534 ac_status=$?
6535 if test -s conftest.err; then
6536 sed '10a\
6537 ... rest of stderr output deleted ...
6538 10q' conftest.err >conftest.er1
6539 cat conftest.er1 >&5
6540 fi
6541 rm -f conftest.er1 conftest.err
6542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6543 test $ac_status = 0; }
6544 done
6545
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
6547 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
6548 if ${ac_cv_cxx_compiler_gnu+:} false; then :
6549 $as_echo_n "(cached) " >&6
6550 else
6551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6552 /* end confdefs.h. */
6553
6554 int
6555 main ()
6556 {
6557 #ifndef __GNUC__
6558 choke me
6559 #endif
6560
6561 ;
6562 return 0;
6563 }
6564 _ACEOF
6565 if ac_fn_cxx_try_compile "$LINENO"; then :
6566 ac_compiler_gnu=yes
6567 else
6568 ac_compiler_gnu=no
6569 fi
6570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6571 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
6572
6573 fi
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
6575 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
6576 if test $ac_compiler_gnu = yes; then
6577 GXX=yes
6578 else
6579 GXX=
6580 fi
6581 ac_test_CXXFLAGS=${CXXFLAGS+set}
6582 ac_save_CXXFLAGS=$CXXFLAGS
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
6584 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
6585 if ${ac_cv_prog_cxx_g+:} false; then :
6586 $as_echo_n "(cached) " >&6
6587 else
6588 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6589 ac_cxx_werror_flag=yes
6590 ac_cv_prog_cxx_g=no
6591 CXXFLAGS="-g"
6592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6593 /* end confdefs.h. */
6594
6595 int
6596 main ()
6597 {
6598
6599 ;
6600 return 0;
6601 }
6602 _ACEOF
6603 if ac_fn_cxx_try_compile "$LINENO"; then :
6604 ac_cv_prog_cxx_g=yes
6605 else
6606 CXXFLAGS=""
6607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6608 /* end confdefs.h. */
6609
6610 int
6611 main ()
6612 {
6613
6614 ;
6615 return 0;
6616 }
6617 _ACEOF
6618 if ac_fn_cxx_try_compile "$LINENO"; then :
6619
6620 else
6621 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6622 CXXFLAGS="-g"
6623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6624 /* end confdefs.h. */
6625
6626 int
6627 main ()
6628 {
6629
6630 ;
6631 return 0;
6632 }
6633 _ACEOF
6634 if ac_fn_cxx_try_compile "$LINENO"; then :
6635 ac_cv_prog_cxx_g=yes
6636 fi
6637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6638 fi
6639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6640 fi
6641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6642 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6643 fi
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
6645 $as_echo "$ac_cv_prog_cxx_g" >&6; }
6646 if test "$ac_test_CXXFLAGS" = set; then
6647 CXXFLAGS=$ac_save_CXXFLAGS
6648 elif test $ac_cv_prog_cxx_g = yes; then
6649 if test "$GXX" = yes; then
6650 CXXFLAGS="-g -O2"
6651 else
6652 CXXFLAGS="-g"
6653 fi
6654 else
6655 if test "$GXX" = yes; then
6656 CXXFLAGS="-O2"
6657 else
6658 CXXFLAGS=
6659 fi
6660 fi
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
6662 $as_echo_n "checking for $CXX option to enable C++11 features... " >&6; }
6663 ac_ext=cpp
6664 ac_cpp='$CXXCPP $CPPFLAGS'
6665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6666 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6668 if ${ac_cv_prog_cxx_cxx11+:} false; then :
6669 $as_echo_n "(cached) " >&6
6670 else
6671 ac_cv_prog_cxx_cxx11=no
6672 ac_save_CXX=$CXX
6673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6674 /* end confdefs.h. */
6675
6676 #include <deque>
6677 #include <functional>
6678 #include <memory>
6679 #include <tuple>
6680 #include <array>
6681 #include <regex>
6682 #include <iostream>
6683
6684 namespace cxx11test
6685 {
6686 typedef std::shared_ptr<std::string> sptr;
6687 typedef std::weak_ptr<std::string> wptr;
6688
6689 typedef std::tuple<std::string,int,double> tp;
6690 typedef std::array<int, 20> int_array;
6691
6692 constexpr int get_val() { return 20; }
6693
6694 struct testinit
6695 {
6696 int i;
6697 double d;
6698 };
6699
6700 class delegate {
6701 public:
6702 delegate(int n) : n(n) {}
6703 delegate(): delegate(2354) {}
6704
6705 virtual int getval() { return this->n; };
6706 protected:
6707 int n;
6708 };
6709
6710 class overridden : public delegate {
6711 public:
6712 overridden(int n): delegate(n) {}
6713 virtual int getval() override final { return this->n * 2; }
6714 };
6715
6716 class nocopy {
6717 public:
6718 nocopy(int i): i(i) {}
6719 nocopy() = default;
6720 nocopy(const nocopy&) = delete;
6721 nocopy & operator=(const nocopy&) = delete;
6722 private:
6723 int i;
6724 };
6725 }
6726
6727
6728 #include <algorithm>
6729 #include <cstdlib>
6730 #include <fstream>
6731 #include <iomanip>
6732 #include <iostream>
6733 #include <list>
6734 #include <map>
6735 #include <set>
6736 #include <sstream>
6737 #include <stdexcept>
6738 #include <string>
6739 #include <utility>
6740 #include <vector>
6741
6742 namespace test {
6743 typedef std::vector<std::string> string_vec;
6744 typedef std::pair<int,bool> map_value;
6745 typedef std::map<std::string,map_value> map_type;
6746 typedef std::set<int> set_type;
6747
6748 template<typename T>
6749 class printer {
6750 public:
6751 printer(std::ostringstream& os): os(os) {}
6752 void operator() (T elem) { os << elem << std::endl; }
6753 private:
6754 std::ostringstream& os;
6755 };
6756 }
6757
6758 int
6759 main ()
6760 {
6761
6762 {
6763 // Test auto and decltype
6764 std::deque<int> d;
6765 d.push_front(43);
6766 d.push_front(484);
6767 d.push_front(3);
6768 d.push_front(844);
6769 int total = 0;
6770 for (auto i = d.begin(); i != d.end(); ++i) { total += *i; }
6771
6772 auto a1 = 6538;
6773 auto a2 = 48573953.4;
6774 auto a3 = "String literal";
6775
6776 decltype(a2) a4 = 34895.034;
6777 }
6778 {
6779 // Test constexpr
6780 short sa[cxx11test::get_val()] = { 0 };
6781 }
6782 {
6783 // Test initializer lists
6784 cxx11test::testinit il = { 4323, 435234.23544 };
6785 }
6786 {
6787 // Test range-based for and lambda
6788 cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
6789 for (int &x : array) { x += 23; }
6790 std::for_each(array.begin(), array.end(), [](int v1){ std::cout << v1; });
6791 }
6792 {
6793 using cxx11test::sptr;
6794 using cxx11test::wptr;
6795
6796 sptr sp(new std::string("ASCII string"));
6797 wptr wp(sp);
6798 sptr sp2(wp);
6799 }
6800 {
6801 cxx11test::tp tuple("test", 54, 45.53434);
6802 double d = std::get<2>(tuple);
6803 std::string s;
6804 int i;
6805 std::tie(s,i,d) = tuple;
6806 }
6807 {
6808 static std::regex filename_regex("^_?([a-z0-9_.]+-)+[a-z0-9]+$");
6809 std::string testmatch("Test if this string matches");
6810 bool match = std::regex_search(testmatch, filename_regex);
6811 }
6812 {
6813 cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
6814 cxx11test::int_array::size_type size = array.size();
6815 }
6816 {
6817 // Test constructor delegation
6818 cxx11test::delegate d1;
6819 cxx11test::delegate d2();
6820 cxx11test::delegate d3(45);
6821 }
6822 {
6823 // Test override and final
6824 cxx11test::overridden o1(55464);
6825 }
6826 {
6827 // Test nullptr
6828 char *c = nullptr;
6829 }
6830 {
6831 // Test template brackets
6832 std::vector<std::pair<int,char*>> v1;
6833 }
6834 {
6835 // Unicode literals
6836 char const *utf8 = u8"UTF-8 string \u2500";
6837 char16_t const *utf16 = u"UTF-8 string \u2500";
6838 char32_t const *utf32 = U"UTF-32 string \u2500";
6839 }
6840
6841
6842
6843 try {
6844 // Basic string.
6845 std::string teststr("ASCII text");
6846 teststr += " string";
6847
6848 // Simple vector.
6849 test::string_vec testvec;
6850 testvec.push_back(teststr);
6851 testvec.push_back("foo");
6852 testvec.push_back("bar");
6853 if (testvec.size() != 3) {
6854 throw std::runtime_error("vector size is not 1");
6855 }
6856
6857 // Dump vector into stringstream and obtain string.
6858 std::ostringstream os;
6859 for (test::string_vec::const_iterator i = testvec.begin();
6860 i != testvec.end(); ++i) {
6861 if (i + 1 != testvec.end()) {
6862 os << teststr << '\n';
6863 }
6864 }
6865 // Check algorithms work.
6866 std::for_each(testvec.begin(), testvec.end(), test::printer<std::string>(os));
6867 std::string os_out = os.str();
6868
6869 // Test pair and map.
6870 test::map_type testmap;
6871 testmap.insert(std::make_pair(std::string("key"),
6872 std::make_pair(53,false)));
6873
6874 // Test set.
6875 int values[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
6876 test::set_type testset(values, values + sizeof(values)/sizeof(values[0]));
6877 std::list<int> testlist(testset.begin(), testset.end());
6878 std::copy(testset.begin(), testset.end(), std::back_inserter(testlist));
6879 } catch (const std::exception& e) {
6880 std::cerr << "Caught exception: " << e.what() << std::endl;
6881
6882 // Test fstream
6883 std::ofstream of("test.txt");
6884 of << "Test ASCII text\n" << std::flush;
6885 of << "N= " << std::hex << std::setw(8) << std::left << 534 << std::endl;
6886 of.close();
6887 }
6888 std::exit(0);
6889
6890 ;
6891 return 0;
6892 }
6893 _ACEOF
6894 for ac_arg in '' -std=gnu++11 -std=c++11 -std=gnu++0x -std=c++0x -qlanglvl=extended0x -AA
6895 do
6896 CXX="$ac_save_CXX $ac_arg"
6897 if ac_fn_cxx_try_compile "$LINENO"; then :
6898 ac_cv_prog_cxx_cxx11=$ac_arg
6899 fi
6900 rm -f core conftest.err conftest.$ac_objext
6901 test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
6902 done
6903 rm -f conftest.$ac_ext
6904 CXX=$ac_save_CXX
6905
6906 fi
6907 # AC_CACHE_VAL
6908 ac_prog_cxx_stdcxx_options=
6909 case "x$ac_cv_prog_cxx_cxx11" in
6910 x)
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6912 $as_echo "none needed" >&6; } ;;
6913 xno)
6914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6915 $as_echo "unsupported" >&6; } ;;
6916 *)
6917 ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_cxx11"
6918 CXX=$CXX$ac_prog_cxx_stdcxx_options
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
6920 $as_echo "$ac_cv_prog_cxx_cxx11" >&6; } ;;
6921 esac
6922 ac_ext=cpp
6923 ac_cpp='$CXXCPP $CPPFLAGS'
6924 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6925 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6926 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6927 if test "x$ac_cv_prog_cxx_cxx11" != xno; then :
6928 ac_prog_cxx_stdcxx=cxx11
6929 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
6930 ac_cv_prog_cxx_cxx98=$ac_cv_prog_cxx_cxx11
6931 else
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
6933 $as_echo_n "checking for $CXX option to enable C++98 features... " >&6; }
6934 ac_ext=cpp
6935 ac_cpp='$CXXCPP $CPPFLAGS'
6936 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6937 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6938 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6939 if ${ac_cv_prog_cxx_cxx98+:} false; then :
6940 $as_echo_n "(cached) " >&6
6941 else
6942 ac_cv_prog_cxx_cxx98=no
6943 ac_save_CXX=$CXX
6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945 /* end confdefs.h. */
6946
6947 #include <algorithm>
6948 #include <cstdlib>
6949 #include <fstream>
6950 #include <iomanip>
6951 #include <iostream>
6952 #include <list>
6953 #include <map>
6954 #include <set>
6955 #include <sstream>
6956 #include <stdexcept>
6957 #include <string>
6958 #include <utility>
6959 #include <vector>
6960
6961 namespace test {
6962 typedef std::vector<std::string> string_vec;
6963 typedef std::pair<int,bool> map_value;
6964 typedef std::map<std::string,map_value> map_type;
6965 typedef std::set<int> set_type;
6966
6967 template<typename T>
6968 class printer {
6969 public:
6970 printer(std::ostringstream& os): os(os) {}
6971 void operator() (T elem) { os << elem << std::endl; }
6972 private:
6973 std::ostringstream& os;
6974 };
6975 }
6976
6977 int
6978 main ()
6979 {
6980
6981
6982 try {
6983 // Basic string.
6984 std::string teststr("ASCII text");
6985 teststr += " string";
6986
6987 // Simple vector.
6988 test::string_vec testvec;
6989 testvec.push_back(teststr);
6990 testvec.push_back("foo");
6991 testvec.push_back("bar");
6992 if (testvec.size() != 3) {
6993 throw std::runtime_error("vector size is not 1");
6994 }
6995
6996 // Dump vector into stringstream and obtain string.
6997 std::ostringstream os;
6998 for (test::string_vec::const_iterator i = testvec.begin();
6999 i != testvec.end(); ++i) {
7000 if (i + 1 != testvec.end()) {
7001 os << teststr << '\n';
7002 }
7003 }
7004 // Check algorithms work.
7005 std::for_each(testvec.begin(), testvec.end(), test::printer<std::string>(os));
7006 std::string os_out = os.str();
7007
7008 // Test pair and map.
7009 test::map_type testmap;
7010 testmap.insert(std::make_pair(std::string("key"),
7011 std::make_pair(53,false)));
7012
7013 // Test set.
7014 int values[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
7015 test::set_type testset(values, values + sizeof(values)/sizeof(values[0]));
7016 std::list<int> testlist(testset.begin(), testset.end());
7017 std::copy(testset.begin(), testset.end(), std::back_inserter(testlist));
7018 } catch (const std::exception& e) {
7019 std::cerr << "Caught exception: " << e.what() << std::endl;
7020
7021 // Test fstream
7022 std::ofstream of("test.txt");
7023 of << "Test ASCII text\n" << std::flush;
7024 of << "N= " << std::hex << std::setw(8) << std::left << 534 << std::endl;
7025 of.close();
7026 }
7027 std::exit(0);
7028
7029 ;
7030 return 0;
7031 }
7032 _ACEOF
7033 for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
7034 do
7035 CXX="$ac_save_CXX $ac_arg"
7036 if ac_fn_cxx_try_compile "$LINENO"; then :
7037 ac_cv_prog_cxx_cxx98=$ac_arg
7038 fi
7039 rm -f core conftest.err conftest.$ac_objext
7040 test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
7041 done
7042 rm -f conftest.$ac_ext
7043 CXX=$ac_save_CXX
7044
7045 fi
7046 # AC_CACHE_VAL
7047 ac_prog_cxx_stdcxx_options=
7048 case "x$ac_cv_prog_cxx_cxx98" in
7049 x)
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7051 $as_echo "none needed" >&6; } ;;
7052 xno)
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7054 $as_echo "unsupported" >&6; } ;;
7055 *)
7056 ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_cxx98"
7057 CXX=$CXX$ac_prog_cxx_stdcxx_options
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
7059 $as_echo "$ac_cv_prog_cxx_cxx98" >&6; } ;;
7060 esac
7061 ac_ext=cpp
7062 ac_cpp='$CXXCPP $CPPFLAGS'
7063 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7064 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7065 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7066 if test "x$ac_cv_prog_cxx_cxx98" != xno; then :
7067 ac_prog_cxx_stdcxx=cxx98
7068 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
7069 else
7070 ac_prog_cxx_stdcxx=no
7071 ac_cv_prog_cxx_stdcxx=no
7072 fi
7073
7074 fi
7075
7076 ac_ext=c
7077 ac_cpp='$CPP $CPPFLAGS'
7078 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7079 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7080 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7081
7082 depcc="$CXX" am_compiler_list=
7083
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7085 $as_echo_n "checking dependency style of $depcc... " >&6; }
7086 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
7087 $as_echo_n "(cached) " >&6
7088 else
7089 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7090 # We make a subdir and do the tests there. Otherwise we can end up
7091 # making bogus files that we don't know about and never remove. For
7092 # instance it was reported that on HP-UX the gcc test will end up
7093 # making a dummy file named 'D' -- because '-MD' means "put the output
7094 # in D".
7095 rm -rf conftest.dir
7096 mkdir conftest.dir
7097 # Copy depcomp to subdir because otherwise we won't find it if we're
7098 # using a relative directory.
7099 cp "$am_depcomp" conftest.dir
7100 cd conftest.dir
7101 # We will build objects and dependencies in a subdirectory because
7102 # it helps to detect inapplicable dependency modes. For instance
7103 # both Tru64's cc and ICC support -MD to output dependencies as a
7104 # side effect of compilation, but ICC will put the dependencies in
7105 # the current directory while Tru64 will put them in the object
7106 # directory.
7107 mkdir sub
7108
7109 am_cv_CXX_dependencies_compiler_type=none
7110 if test "$am_compiler_list" = ""; then
7111 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7112 fi
7113 am__universal=false
7114 case " $depcc " in #(
7115 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7116 esac
7117
7118 for depmode in $am_compiler_list; do
7119 # Setup a source with many dependencies, because some compilers
7120 # like to wrap large dependency lists on column 80 (with \), and
7121 # we should not choose a depcomp mode which is confused by this.
7122 #
7123 # We need to recreate these files for each test, as the compiler may
7124 # overwrite some of them when testing with obscure command lines.
7125 # This happens at least with the AIX C compiler.
7126 : > sub/conftest.c
7127 for i in 1 2 3 4 5 6; do
7128 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7129 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
7130 # Solaris 10 /bin/sh.
7131 echo '/* dummy */' > sub/conftst$i.h
7132 done
7133 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7134
7135 # We check with '-c' and '-o' for the sake of the "dashmstdout"
7136 # mode. It turns out that the SunPro C++ compiler does not properly
7137 # handle '-M -o', and we need to detect this. Also, some Intel
7138 # versions had trouble with output in subdirs.
7139 am__obj=sub/conftest.${OBJEXT-o}
7140 am__minus_obj="-o $am__obj"
7141 case $depmode in
7142 gcc)
7143 # This depmode causes a compiler race in universal mode.
7144 test "$am__universal" = false || continue
7145 ;;
7146 nosideeffect)
7147 # After this tag, mechanisms are not by side-effect, so they'll
7148 # only be used when explicitly requested.
7149 if test "x$enable_dependency_tracking" = xyes; then
7150 continue
7151 else
7152 break
7153 fi
7154 ;;
7155 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
7156 # This compiler won't grok '-c -o', but also, the minuso test has
7157 # not run yet. These depmodes are late enough in the game, and
7158 # so weak that their functioning should not be impacted.
7159 am__obj=conftest.${OBJEXT-o}
7160 am__minus_obj=
7161 ;;
7162 none) break ;;
7163 esac
7164 if depmode=$depmode \
7165 source=sub/conftest.c object=$am__obj \
7166 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7167 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
7168 >/dev/null 2>conftest.err &&
7169 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7170 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7171 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
7172 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7173 # icc doesn't choke on unknown options, it will just issue warnings
7174 # or remarks (even with -Werror). So we grep stderr for any message
7175 # that says an option was ignored or not supported.
7176 # When given -MP, icc 7.0 and 7.1 complain thusly:
7177 # icc: Command line warning: ignoring option '-M'; no argument required
7178 # The diagnosis changed in icc 8.0:
7179 # icc: Command line remark: option '-MP' not supported
7180 if (grep 'ignoring option' conftest.err ||
7181 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7182 am_cv_CXX_dependencies_compiler_type=$depmode
7183 break
7184 fi
7185 fi
7186 done
7187
7188 cd ..
7189 rm -rf conftest.dir
7190 else
7191 am_cv_CXX_dependencies_compiler_type=none
7192 fi
7193
7194 fi
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
7196 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
7197 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
7198
7199 if
7200 test "x$enable_dependency_tracking" != xno \
7201 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
7202 am__fastdepCXX_TRUE=
7203 am__fastdepCXX_FALSE='#'
7204 else
7205 am__fastdepCXX_TRUE='#'
7206 am__fastdepCXX_FALSE=
7207 fi
7208
7209
7210
7211 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
7212 ac_ext=cpp
7213 ac_cpp='$CXXCPP $CPPFLAGS'
7214 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7215 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7216 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7217 ac_success=no
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
7219 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
7220 if ${ax_cv_cxx_compile_cxx11+:} false; then :
7221 $as_echo_n "(cached) " >&6
7222 else
7223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7224 /* end confdefs.h. */
7225
7226
7227 // If the compiler admits that it is not ready for C++11, why torture it?
7228 // Hopefully, this will speed up the test.
7229
7230 #ifndef __cplusplus
7231
7232 #error "This is not a C++ compiler"
7233
7234 #elif __cplusplus < 201103L
7235
7236 #error "This is not a C++11 compiler"
7237
7238 #else
7239
7240 namespace cxx11
7241 {
7242
7243 namespace test_static_assert
7244 {
7245
7246 template <typename T>
7247 struct check
7248 {
7249 static_assert(sizeof(int) <= sizeof(T), "not big enough");
7250 };
7251
7252 }
7253
7254 namespace test_final_override
7255 {
7256
7257 struct Base
7258 {
7259 virtual void f() {}
7260 };
7261
7262 struct Derived : public Base
7263 {
7264 virtual void f() override {}
7265 };
7266
7267 }
7268
7269 namespace test_double_right_angle_brackets
7270 {
7271
7272 template < typename T >
7273 struct check {};
7274
7275 typedef check<void> single_type;
7276 typedef check<check<void>> double_type;
7277 typedef check<check<check<void>>> triple_type;
7278 typedef check<check<check<check<void>>>> quadruple_type;
7279
7280 }
7281
7282 namespace test_decltype
7283 {
7284
7285 int
7286 f()
7287 {
7288 int a = 1;
7289 decltype(a) b = 2;
7290 return a + b;
7291 }
7292
7293 }
7294
7295 namespace test_type_deduction
7296 {
7297
7298 template < typename T1, typename T2 >
7299 struct is_same
7300 {
7301 static const bool value = false;
7302 };
7303
7304 template < typename T >
7305 struct is_same<T, T>
7306 {
7307 static const bool value = true;
7308 };
7309
7310 template < typename T1, typename T2 >
7311 auto
7312 add(T1 a1, T2 a2) -> decltype(a1 + a2)
7313 {
7314 return a1 + a2;
7315 }
7316
7317 int
7318 test(const int c, volatile int v)
7319 {
7320 static_assert(is_same<int, decltype(0)>::value == true, "");
7321 static_assert(is_same<int, decltype(c)>::value == false, "");
7322 static_assert(is_same<int, decltype(v)>::value == false, "");
7323 auto ac = c;
7324 auto av = v;
7325 auto sumi = ac + av + 'x';
7326 auto sumf = ac + av + 1.0;
7327 static_assert(is_same<int, decltype(ac)>::value == true, "");
7328 static_assert(is_same<int, decltype(av)>::value == true, "");
7329 static_assert(is_same<int, decltype(sumi)>::value == true, "");
7330 static_assert(is_same<int, decltype(sumf)>::value == false, "");
7331 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
7332 return (sumf > 0.0) ? sumi : add(c, v);
7333 }
7334
7335 }
7336
7337 namespace test_noexcept
7338 {
7339
7340 int f() { return 0; }
7341 int g() noexcept { return 0; }
7342
7343 static_assert(noexcept(f()) == false, "");
7344 static_assert(noexcept(g()) == true, "");
7345
7346 }
7347
7348 namespace test_constexpr
7349 {
7350
7351 template < typename CharT >
7352 unsigned long constexpr
7353 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
7354 {
7355 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
7356 }
7357
7358 template < typename CharT >
7359 unsigned long constexpr
7360 strlen_c(const CharT *const s) noexcept
7361 {
7362 return strlen_c_r(s, 0UL);
7363 }
7364
7365 static_assert(strlen_c("") == 0UL, "");
7366 static_assert(strlen_c("1") == 1UL, "");
7367 static_assert(strlen_c("example") == 7UL, "");
7368 static_assert(strlen_c("another\0example") == 7UL, "");
7369
7370 }
7371
7372 namespace test_rvalue_references
7373 {
7374
7375 template < int N >
7376 struct answer
7377 {
7378 static constexpr int value = N;
7379 };
7380
7381 answer<1> f(int&) { return answer<1>(); }
7382 answer<2> f(const int&) { return answer<2>(); }
7383 answer<3> f(int&&) { return answer<3>(); }
7384
7385 void
7386 test()
7387 {
7388 int i = 0;
7389 const int c = 0;
7390 static_assert(decltype(f(i))::value == 1, "");
7391 static_assert(decltype(f(c))::value == 2, "");
7392 static_assert(decltype(f(0))::value == 3, "");
7393 }
7394
7395 }
7396
7397 namespace test_uniform_initialization
7398 {
7399
7400 struct test
7401 {
7402 static const int zero {};
7403 static const int one {1};
7404 };
7405
7406 static_assert(test::zero == 0, "");
7407 static_assert(test::one == 1, "");
7408
7409 }
7410
7411 namespace test_lambdas
7412 {
7413
7414 void
7415 test1()
7416 {
7417 auto lambda1 = [](){};
7418 auto lambda2 = lambda1;
7419 lambda1();
7420 lambda2();
7421 }
7422
7423 int
7424 test2()
7425 {
7426 auto a = [](int i, int j){ return i + j; }(1, 2);
7427 auto b = []() -> int { return '0'; }();
7428 auto c = [=](){ return a + b; }();
7429 auto d = [&](){ return c; }();
7430 auto e = [a, &b](int x) mutable {
7431 const auto identity = [](int y){ return y; };
7432 for (auto i = 0; i < a; ++i)
7433 a += b--;
7434 return x + identity(a + b);
7435 }(0);
7436 return a + b + c + d + e;
7437 }
7438
7439 int
7440 test3()
7441 {
7442 const auto nullary = [](){ return 0; };
7443 const auto unary = [](int x){ return x; };
7444 using nullary_t = decltype(nullary);
7445 using unary_t = decltype(unary);
7446 const auto higher1st = [](nullary_t f){ return f(); };
7447 const auto higher2nd = [unary](nullary_t f1){
7448 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
7449 };
7450 return higher1st(nullary) + higher2nd(nullary)(unary);
7451 }
7452
7453 }
7454
7455 namespace test_variadic_templates
7456 {
7457
7458 template <int...>
7459 struct sum;
7460
7461 template <int N0, int... N1toN>
7462 struct sum<N0, N1toN...>
7463 {
7464 static constexpr auto value = N0 + sum<N1toN...>::value;
7465 };
7466
7467 template <>
7468 struct sum<>
7469 {
7470 static constexpr auto value = 0;
7471 };
7472
7473 static_assert(sum<>::value == 0, "");
7474 static_assert(sum<1>::value == 1, "");
7475 static_assert(sum<23>::value == 23, "");
7476 static_assert(sum<1, 2>::value == 3, "");
7477 static_assert(sum<5, 5, 11>::value == 21, "");
7478 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
7479
7480 }
7481
7482 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
7483 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
7484 // because of this.
7485 namespace test_template_alias_sfinae
7486 {
7487
7488 struct foo {};
7489
7490 template<typename T>
7491 using member = typename T::member_type;
7492
7493 template<typename T>
7494 void func(...) {}
7495
7496 template<typename T>
7497 void func(member<T>*) {}
7498
7499 void test();
7500
7501 void test() { func<foo>(0); }
7502
7503 }
7504
7505 } // namespace cxx11
7506
7507 #endif // __cplusplus >= 201103L
7508
7509
7510
7511 _ACEOF
7512 if ac_fn_cxx_try_compile "$LINENO"; then :
7513 ax_cv_cxx_compile_cxx11=yes
7514 else
7515 ax_cv_cxx_compile_cxx11=no
7516 fi
7517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7518 fi
7519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
7520 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
7521 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
7522 ac_success=yes
7523 fi
7524
7525 if test x$ac_success = xno; then
7526 for alternative in ${ax_cxx_compile_alternatives}; do
7527 switch="-std=gnu++${alternative}"
7528 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
7530 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
7531 if eval \${$cachevar+:} false; then :
7532 $as_echo_n "(cached) " >&6
7533 else
7534 ac_save_CXX="$CXX"
7535 CXX="$CXX $switch"
7536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7537 /* end confdefs.h. */
7538
7539
7540 // If the compiler admits that it is not ready for C++11, why torture it?
7541 // Hopefully, this will speed up the test.
7542
7543 #ifndef __cplusplus
7544
7545 #error "This is not a C++ compiler"
7546
7547 #elif __cplusplus < 201103L
7548
7549 #error "This is not a C++11 compiler"
7550
7551 #else
7552
7553 namespace cxx11
7554 {
7555
7556 namespace test_static_assert
7557 {
7558
7559 template <typename T>
7560 struct check
7561 {
7562 static_assert(sizeof(int) <= sizeof(T), "not big enough");
7563 };
7564
7565 }
7566
7567 namespace test_final_override
7568 {
7569
7570 struct Base
7571 {
7572 virtual void f() {}
7573 };
7574
7575 struct Derived : public Base
7576 {
7577 virtual void f() override {}
7578 };
7579
7580 }
7581
7582 namespace test_double_right_angle_brackets
7583 {
7584
7585 template < typename T >
7586 struct check {};
7587
7588 typedef check<void> single_type;
7589 typedef check<check<void>> double_type;
7590 typedef check<check<check<void>>> triple_type;
7591 typedef check<check<check<check<void>>>> quadruple_type;
7592
7593 }
7594
7595 namespace test_decltype
7596 {
7597
7598 int
7599 f()
7600 {
7601 int a = 1;
7602 decltype(a) b = 2;
7603 return a + b;
7604 }
7605
7606 }
7607
7608 namespace test_type_deduction
7609 {
7610
7611 template < typename T1, typename T2 >
7612 struct is_same
7613 {
7614 static const bool value = false;
7615 };
7616
7617 template < typename T >
7618 struct is_same<T, T>
7619 {
7620 static const bool value = true;
7621 };
7622
7623 template < typename T1, typename T2 >
7624 auto
7625 add(T1 a1, T2 a2) -> decltype(a1 + a2)
7626 {
7627 return a1 + a2;
7628 }
7629
7630 int
7631 test(const int c, volatile int v)
7632 {
7633 static_assert(is_same<int, decltype(0)>::value == true, "");
7634 static_assert(is_same<int, decltype(c)>::value == false, "");
7635 static_assert(is_same<int, decltype(v)>::value == false, "");
7636 auto ac = c;
7637 auto av = v;
7638 auto sumi = ac + av + 'x';
7639 auto sumf = ac + av + 1.0;
7640 static_assert(is_same<int, decltype(ac)>::value == true, "");
7641 static_assert(is_same<int, decltype(av)>::value == true, "");
7642 static_assert(is_same<int, decltype(sumi)>::value == true, "");
7643 static_assert(is_same<int, decltype(sumf)>::value == false, "");
7644 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
7645 return (sumf > 0.0) ? sumi : add(c, v);
7646 }
7647
7648 }
7649
7650 namespace test_noexcept
7651 {
7652
7653 int f() { return 0; }
7654 int g() noexcept { return 0; }
7655
7656 static_assert(noexcept(f()) == false, "");
7657 static_assert(noexcept(g()) == true, "");
7658
7659 }
7660
7661 namespace test_constexpr
7662 {
7663
7664 template < typename CharT >
7665 unsigned long constexpr
7666 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
7667 {
7668 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
7669 }
7670
7671 template < typename CharT >
7672 unsigned long constexpr
7673 strlen_c(const CharT *const s) noexcept
7674 {
7675 return strlen_c_r(s, 0UL);
7676 }
7677
7678 static_assert(strlen_c("") == 0UL, "");
7679 static_assert(strlen_c("1") == 1UL, "");
7680 static_assert(strlen_c("example") == 7UL, "");
7681 static_assert(strlen_c("another\0example") == 7UL, "");
7682
7683 }
7684
7685 namespace test_rvalue_references
7686 {
7687
7688 template < int N >
7689 struct answer
7690 {
7691 static constexpr int value = N;
7692 };
7693
7694 answer<1> f(int&) { return answer<1>(); }
7695 answer<2> f(const int&) { return answer<2>(); }
7696 answer<3> f(int&&) { return answer<3>(); }
7697
7698 void
7699 test()
7700 {
7701 int i = 0;
7702 const int c = 0;
7703 static_assert(decltype(f(i))::value == 1, "");
7704 static_assert(decltype(f(c))::value == 2, "");
7705 static_assert(decltype(f(0))::value == 3, "");
7706 }
7707
7708 }
7709
7710 namespace test_uniform_initialization
7711 {
7712
7713 struct test
7714 {
7715 static const int zero {};
7716 static const int one {1};
7717 };
7718
7719 static_assert(test::zero == 0, "");
7720 static_assert(test::one == 1, "");
7721
7722 }
7723
7724 namespace test_lambdas
7725 {
7726
7727 void
7728 test1()
7729 {
7730 auto lambda1 = [](){};
7731 auto lambda2 = lambda1;
7732 lambda1();
7733 lambda2();
7734 }
7735
7736 int
7737 test2()
7738 {
7739 auto a = [](int i, int j){ return i + j; }(1, 2);
7740 auto b = []() -> int { return '0'; }();
7741 auto c = [=](){ return a + b; }();
7742 auto d = [&](){ return c; }();
7743 auto e = [a, &b](int x) mutable {
7744 const auto identity = [](int y){ return y; };
7745 for (auto i = 0; i < a; ++i)
7746 a += b--;
7747 return x + identity(a + b);
7748 }(0);
7749 return a + b + c + d + e;
7750 }
7751
7752 int
7753 test3()
7754 {
7755 const auto nullary = [](){ return 0; };
7756 const auto unary = [](int x){ return x; };
7757 using nullary_t = decltype(nullary);
7758 using unary_t = decltype(unary);
7759 const auto higher1st = [](nullary_t f){ return f(); };
7760 const auto higher2nd = [unary](nullary_t f1){
7761 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
7762 };
7763 return higher1st(nullary) + higher2nd(nullary)(unary);
7764 }
7765
7766 }
7767
7768 namespace test_variadic_templates
7769 {
7770
7771 template <int...>
7772 struct sum;
7773
7774 template <int N0, int... N1toN>
7775 struct sum<N0, N1toN...>
7776 {
7777 static constexpr auto value = N0 + sum<N1toN...>::value;
7778 };
7779
7780 template <>
7781 struct sum<>
7782 {
7783 static constexpr auto value = 0;
7784 };
7785
7786 static_assert(sum<>::value == 0, "");
7787 static_assert(sum<1>::value == 1, "");
7788 static_assert(sum<23>::value == 23, "");
7789 static_assert(sum<1, 2>::value == 3, "");
7790 static_assert(sum<5, 5, 11>::value == 21, "");
7791 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
7792
7793 }
7794
7795 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
7796 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
7797 // because of this.
7798 namespace test_template_alias_sfinae
7799 {
7800
7801 struct foo {};
7802
7803 template<typename T>
7804 using member = typename T::member_type;
7805
7806 template<typename T>
7807 void func(...) {}
7808
7809 template<typename T>
7810 void func(member<T>*) {}
7811
7812 void test();
7813
7814 void test() { func<foo>(0); }
7815
7816 }
7817
7818 } // namespace cxx11
7819
7820 #endif // __cplusplus >= 201103L
7821
7822
7823
7824 _ACEOF
7825 if ac_fn_cxx_try_compile "$LINENO"; then :
7826 eval $cachevar=yes
7827 else
7828 eval $cachevar=no
7829 fi
7830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7831 CXX="$ac_save_CXX"
7832 fi
7833 eval ac_res=\$$cachevar
7834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7835 $as_echo "$ac_res" >&6; }
7836 if eval test x\$$cachevar = xyes; then
7837 CXX="$CXX $switch"
7838 if test -n "$CXXCPP" ; then
7839 CXXCPP="$CXXCPP $switch"
7840 fi
7841 ac_success=yes
7842 break
7843 fi
7844 done
7845 fi
7846
7847 if test x$ac_success = xno; then
7848 for alternative in ${ax_cxx_compile_alternatives}; do
7849 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
7850 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
7851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
7852 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
7853 if eval \${$cachevar+:} false; then :
7854 $as_echo_n "(cached) " >&6
7855 else
7856 ac_save_CXX="$CXX"
7857 CXX="$CXX $switch"
7858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7859 /* end confdefs.h. */
7860
7861
7862 // If the compiler admits that it is not ready for C++11, why torture it?
7863 // Hopefully, this will speed up the test.
7864
7865 #ifndef __cplusplus
7866
7867 #error "This is not a C++ compiler"
7868
7869 #elif __cplusplus < 201103L
7870
7871 #error "This is not a C++11 compiler"
7872
7873 #else
7874
7875 namespace cxx11
7876 {
7877
7878 namespace test_static_assert
7879 {
7880
7881 template <typename T>
7882 struct check
7883 {
7884 static_assert(sizeof(int) <= sizeof(T), "not big enough");
7885 };
7886
7887 }
7888
7889 namespace test_final_override
7890 {
7891
7892 struct Base
7893 {
7894 virtual void f() {}
7895 };
7896
7897 struct Derived : public Base
7898 {
7899 virtual void f() override {}
7900 };
7901
7902 }
7903
7904 namespace test_double_right_angle_brackets
7905 {
7906
7907 template < typename T >
7908 struct check {};
7909
7910 typedef check<void> single_type;
7911 typedef check<check<void>> double_type;
7912 typedef check<check<check<void>>> triple_type;
7913 typedef check<check<check<check<void>>>> quadruple_type;
7914
7915 }
7916
7917 namespace test_decltype
7918 {
7919
7920 int
7921 f()
7922 {
7923 int a = 1;
7924 decltype(a) b = 2;
7925 return a + b;
7926 }
7927
7928 }
7929
7930 namespace test_type_deduction
7931 {
7932
7933 template < typename T1, typename T2 >
7934 struct is_same
7935 {
7936 static const bool value = false;
7937 };
7938
7939 template < typename T >
7940 struct is_same<T, T>
7941 {
7942 static const bool value = true;
7943 };
7944
7945 template < typename T1, typename T2 >
7946 auto
7947 add(T1 a1, T2 a2) -> decltype(a1 + a2)
7948 {
7949 return a1 + a2;
7950 }
7951
7952 int
7953 test(const int c, volatile int v)
7954 {
7955 static_assert(is_same<int, decltype(0)>::value == true, "");
7956 static_assert(is_same<int, decltype(c)>::value == false, "");
7957 static_assert(is_same<int, decltype(v)>::value == false, "");
7958 auto ac = c;
7959 auto av = v;
7960 auto sumi = ac + av + 'x';
7961 auto sumf = ac + av + 1.0;
7962 static_assert(is_same<int, decltype(ac)>::value == true, "");
7963 static_assert(is_same<int, decltype(av)>::value == true, "");
7964 static_assert(is_same<int, decltype(sumi)>::value == true, "");
7965 static_assert(is_same<int, decltype(sumf)>::value == false, "");
7966 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
7967 return (sumf > 0.0) ? sumi : add(c, v);
7968 }
7969
7970 }
7971
7972 namespace test_noexcept
7973 {
7974
7975 int f() { return 0; }
7976 int g() noexcept { return 0; }
7977
7978 static_assert(noexcept(f()) == false, "");
7979 static_assert(noexcept(g()) == true, "");
7980
7981 }
7982
7983 namespace test_constexpr
7984 {
7985
7986 template < typename CharT >
7987 unsigned long constexpr
7988 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
7989 {
7990 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
7991 }
7992
7993 template < typename CharT >
7994 unsigned long constexpr
7995 strlen_c(const CharT *const s) noexcept
7996 {
7997 return strlen_c_r(s, 0UL);
7998 }
7999
8000 static_assert(strlen_c("") == 0UL, "");
8001 static_assert(strlen_c("1") == 1UL, "");
8002 static_assert(strlen_c("example") == 7UL, "");
8003 static_assert(strlen_c("another\0example") == 7UL, "");
8004
8005 }
8006
8007 namespace test_rvalue_references
8008 {
8009
8010 template < int N >
8011 struct answer
8012 {
8013 static constexpr int value = N;
8014 };
8015
8016 answer<1> f(int&) { return answer<1>(); }
8017 answer<2> f(const int&) { return answer<2>(); }
8018 answer<3> f(int&&) { return answer<3>(); }
8019
8020 void
8021 test()
8022 {
8023 int i = 0;
8024 const int c = 0;
8025 static_assert(decltype(f(i))::value == 1, "");
8026 static_assert(decltype(f(c))::value == 2, "");
8027 static_assert(decltype(f(0))::value == 3, "");
8028 }
8029
8030 }
8031
8032 namespace test_uniform_initialization
8033 {
8034
8035 struct test
8036 {
8037 static const int zero {};
8038 static const int one {1};
8039 };
8040
8041 static_assert(test::zero == 0, "");
8042 static_assert(test::one == 1, "");
8043
8044 }
8045
8046 namespace test_lambdas
8047 {
8048
8049 void
8050 test1()
8051 {
8052 auto lambda1 = [](){};
8053 auto lambda2 = lambda1;
8054 lambda1();
8055 lambda2();
8056 }
8057
8058 int
8059 test2()
8060 {
8061 auto a = [](int i, int j){ return i + j; }(1, 2);
8062 auto b = []() -> int { return '0'; }();
8063 auto c = [=](){ return a + b; }();
8064 auto d = [&](){ return c; }();
8065 auto e = [a, &b](int x) mutable {
8066 const auto identity = [](int y){ return y; };
8067 for (auto i = 0; i < a; ++i)
8068 a += b--;
8069 return x + identity(a + b);
8070 }(0);
8071 return a + b + c + d + e;
8072 }
8073
8074 int
8075 test3()
8076 {
8077 const auto nullary = [](){ return 0; };
8078 const auto unary = [](int x){ return x; };
8079 using nullary_t = decltype(nullary);
8080 using unary_t = decltype(unary);
8081 const auto higher1st = [](nullary_t f){ return f(); };
8082 const auto higher2nd = [unary](nullary_t f1){
8083 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
8084 };
8085 return higher1st(nullary) + higher2nd(nullary)(unary);
8086 }
8087
8088 }
8089
8090 namespace test_variadic_templates
8091 {
8092
8093 template <int...>
8094 struct sum;
8095
8096 template <int N0, int... N1toN>
8097 struct sum<N0, N1toN...>
8098 {
8099 static constexpr auto value = N0 + sum<N1toN...>::value;
8100 };
8101
8102 template <>
8103 struct sum<>
8104 {
8105 static constexpr auto value = 0;
8106 };
8107
8108 static_assert(sum<>::value == 0, "");
8109 static_assert(sum<1>::value == 1, "");
8110 static_assert(sum<23>::value == 23, "");
8111 static_assert(sum<1, 2>::value == 3, "");
8112 static_assert(sum<5, 5, 11>::value == 21, "");
8113 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
8114
8115 }
8116
8117 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
8118 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
8119 // because of this.
8120 namespace test_template_alias_sfinae
8121 {
8122
8123 struct foo {};
8124
8125 template<typename T>
8126 using member = typename T::member_type;
8127
8128 template<typename T>
8129 void func(...) {}
8130
8131 template<typename T>
8132 void func(member<T>*) {}
8133
8134 void test();
8135
8136 void test() { func<foo>(0); }
8137
8138 }
8139
8140 } // namespace cxx11
8141
8142 #endif // __cplusplus >= 201103L
8143
8144
8145
8146 _ACEOF
8147 if ac_fn_cxx_try_compile "$LINENO"; then :
8148 eval $cachevar=yes
8149 else
8150 eval $cachevar=no
8151 fi
8152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8153 CXX="$ac_save_CXX"
8154 fi
8155 eval ac_res=\$$cachevar
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8157 $as_echo "$ac_res" >&6; }
8158 if eval test x\$$cachevar = xyes; then
8159 CXX="$CXX $switch"
8160 if test -n "$CXXCPP" ; then
8161 CXXCPP="$CXXCPP $switch"
8162 fi
8163 ac_success=yes
8164 break
8165 fi
8166 done
8167 if test x$ac_success = xyes; then
8168 break
8169 fi
8170 done
8171 fi
8172 ac_ext=c
8173 ac_cpp='$CPP $CPPFLAGS'
8174 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8175 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8176 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8177
8178 if test x$ax_cxx_compile_cxx11_required = xtrue; then
8179 if test x$ac_success = xno; then
8180 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
8181 fi
8182 fi
8183 if test x$ac_success = xno; then
8184 HAVE_CXX11=0
8185 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
8186 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
8187 else
8188 HAVE_CXX11=1
8189
8190 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
8191
8192 fi
8193
8194
8195
8196 ac_ext=mm
8197 ac_cpp='$OBJCXXCPP $CPPFLAGS'
8198 ac_compile='$OBJCXX -c $OBJCXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8199 ac_link='$OBJCXX -o conftest$ac_exeext $OBJCXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8200 ac_compiler_gnu=$ac_cv_objcxx_compiler_gnu
8201 if test -n "$ac_tool_prefix"; then
8202 for ac_prog in g++ objc++ objcxx c++ CXX
8203 do
8204 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8205 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8207 $as_echo_n "checking for $ac_word... " >&6; }
8208 if ${ac_cv_prog_OBJCXX+:} false; then :
8209 $as_echo_n "(cached) " >&6
8210 else
8211 if test -n "$OBJCXX"; then
8212 ac_cv_prog_OBJCXX="$OBJCXX" # Let the user override the test.
8213 else
8214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8215 for as_dir in $PATH
8216 do
8217 IFS=$as_save_IFS
8218 test -z "$as_dir" && as_dir=.
8219 for ac_exec_ext in '' $ac_executable_extensions; do
8220 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8221 ac_cv_prog_OBJCXX="$ac_tool_prefix$ac_prog"
8222 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8223 break 2
8224 fi
8225 done
8226 done
8227 IFS=$as_save_IFS
8228
8229 fi
8230 fi
8231 OBJCXX=$ac_cv_prog_OBJCXX
8232 if test -n "$OBJCXX"; then
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCXX" >&5
8234 $as_echo "$OBJCXX" >&6; }
8235 else
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8237 $as_echo "no" >&6; }
8238 fi
8239
8240
8241 test -n "$OBJCXX" && break
8242 done
8243 fi
8244 if test -z "$OBJCXX"; then
8245 ac_ct_OBJCXX=$OBJCXX
8246 for ac_prog in g++ objc++ objcxx c++ CXX
8247 do
8248 # Extract the first word of "$ac_prog", so it can be a program name with args.
8249 set dummy $ac_prog; ac_word=$2
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251 $as_echo_n "checking for $ac_word... " >&6; }
8252 if ${ac_cv_prog_ac_ct_OBJCXX+:} false; then :
8253 $as_echo_n "(cached) " >&6
8254 else
8255 if test -n "$ac_ct_OBJCXX"; then
8256 ac_cv_prog_ac_ct_OBJCXX="$ac_ct_OBJCXX" # Let the user override the test.
8257 else
8258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8259 for as_dir in $PATH
8260 do
8261 IFS=$as_save_IFS
8262 test -z "$as_dir" && as_dir=.
8263 for ac_exec_ext in '' $ac_executable_extensions; do
8264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8265 ac_cv_prog_ac_ct_OBJCXX="$ac_prog"
8266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8267 break 2
8268 fi
8269 done
8270 done
8271 IFS=$as_save_IFS
8272
8273 fi
8274 fi
8275 ac_ct_OBJCXX=$ac_cv_prog_ac_ct_OBJCXX
8276 if test -n "$ac_ct_OBJCXX"; then
8277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCXX" >&5
8278 $as_echo "$ac_ct_OBJCXX" >&6; }
8279 else
8280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8281 $as_echo "no" >&6; }
8282 fi
8283
8284
8285 test -n "$ac_ct_OBJCXX" && break
8286 done
8287
8288 if test "x$ac_ct_OBJCXX" = x; then
8289 OBJCXX="g++"
8290 else
8291 case $cross_compiling:$ac_tool_warned in
8292 yes:)
8293 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8294 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8295 ac_tool_warned=yes ;;
8296 esac
8297 OBJCXX=$ac_ct_OBJCXX
8298 fi
8299 fi
8300
8301 # Provide some information about the compiler.
8302 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C++ compiler version" >&5
8303 set X $ac_compile
8304 ac_compiler=$2
8305 for ac_option in --version -v -V -qversion; do
8306 { { ac_try="$ac_compiler $ac_option >&5"
8307 case "(($ac_try" in
8308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8309 *) ac_try_echo=$ac_try;;
8310 esac
8311 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8312 $as_echo "$ac_try_echo"; } >&5
8313 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
8314 ac_status=$?
8315 if test -s conftest.err; then
8316 sed '10a\
8317 ... rest of stderr output deleted ...
8318 10q' conftest.err >conftest.er1
8319 cat conftest.er1 >&5
8320 fi
8321 rm -f conftest.er1 conftest.err
8322 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8323 test $ac_status = 0; }
8324 done
8325
8326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C++ compiler" >&5
8327 $as_echo_n "checking whether we are using the GNU Objective C++ compiler... " >&6; }
8328 if ${ac_cv_objcxx_compiler_gnu+:} false; then :
8329 $as_echo_n "(cached) " >&6
8330 else
8331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8332 /* end confdefs.h. */
8333
8334 int
8335 main ()
8336 {
8337 #ifndef __GNUC__
8338 choke me
8339 #endif
8340
8341 ;
8342 return 0;
8343 }
8344 _ACEOF
8345 if ac_fn_objcxx_try_compile "$LINENO"; then :
8346 ac_compiler_gnu=yes
8347 else
8348 ac_compiler_gnu=no
8349 fi
8350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8351 ac_cv_objcxx_compiler_gnu=$ac_compiler_gnu
8352
8353 fi
8354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objcxx_compiler_gnu" >&5
8355 $as_echo "$ac_cv_objcxx_compiler_gnu" >&6; }
8356 if test $ac_compiler_gnu = yes; then
8357 GOBJCXX=yes
8358 else
8359 GOBJCXX=
8360 fi
8361 ac_test_OBJCXXFLAGS=${OBJCXXFLAGS+set}
8362 ac_save_OBJCXXFLAGS=$OBJCXXFLAGS
8363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJCXX accepts -g" >&5
8364 $as_echo_n "checking whether $OBJCXX accepts -g... " >&6; }
8365 if ${ac_cv_prog_objcxx_g+:} false; then :
8366 $as_echo_n "(cached) " >&6
8367 else
8368 ac_save_objcxx_werror_flag=$ac_objcxx_werror_flag
8369 ac_objcxx_werror_flag=yes
8370 ac_cv_prog_objcxx_g=no
8371 OBJCXXFLAGS="-g"
8372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8373 /* end confdefs.h. */
8374
8375 int
8376 main ()
8377 {
8378
8379 ;
8380 return 0;
8381 }
8382 _ACEOF
8383 if ac_fn_objcxx_try_compile "$LINENO"; then :
8384 ac_cv_prog_objcxx_g=yes
8385 else
8386 OBJCXXFLAGS=""
8387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8388 /* end confdefs.h. */
8389
8390 int
8391 main ()
8392 {
8393
8394 ;
8395 return 0;
8396 }
8397 _ACEOF
8398 if ac_fn_objcxx_try_compile "$LINENO"; then :
8399
8400 else
8401 ac_objcxx_werror_flag=$ac_save_objcxx_werror_flag
8402 OBJCXXFLAGS="-g"
8403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8404 /* end confdefs.h. */
8405
8406 int
8407 main ()
8408 {
8409
8410 ;
8411 return 0;
8412 }
8413 _ACEOF
8414 if ac_fn_objcxx_try_compile "$LINENO"; then :
8415 ac_cv_prog_objcxx_g=yes
8416 fi
8417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8418 fi
8419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8420 fi
8421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8422 ac_objcxx_werror_flag=$ac_save_objcx_werror_flag
8423 fi
8424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objcxx_g" >&5
8425 $as_echo "$ac_cv_prog_objcxx_g" >&6; }
8426 if test "$ac_test_OBJCXXFLAGS" = set; then
8427 OBJCXXFLAGS=$ac_save_OBJCXXFLAGS
8428 elif test $ac_cv_prog_objcxx_g = yes; then
8429 if test "$GOBJCXX" = yes; then
8430 OBJCXXFLAGS="-g -O2"
8431 else
8432 OBJCXXFLAGS="-g"
8433 fi
8434 else
8435 if test "$GOBJCXX" = yes; then
8436 OBJCXXFLAGS="-O2"
8437 else
8438 OBJCXXFLAGS=
8439 fi
8440 fi
8441 ac_ext=c
8442 ac_cpp='$CPP $CPPFLAGS'
8443 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8444 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8445 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8446
8447 depcc="$OBJCXX" am_compiler_list='gcc3 gcc'
8448
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
8450 $as_echo_n "checking dependency style of $depcc... " >&6; }
8451 if ${am_cv_OBJCXX_dependencies_compiler_type+:} false; then :
8452 $as_echo_n "(cached) " >&6
8453 else
8454 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8455 # We make a subdir and do the tests there. Otherwise we can end up
8456 # making bogus files that we don't know about and never remove. For
8457 # instance it was reported that on HP-UX the gcc test will end up
8458 # making a dummy file named 'D' -- because '-MD' means "put the output
8459 # in D".
8460 rm -rf conftest.dir
8461 mkdir conftest.dir
8462 # Copy depcomp to subdir because otherwise we won't find it if we're
8463 # using a relative directory.
8464 cp "$am_depcomp" conftest.dir
8465 cd conftest.dir
8466 # We will build objects and dependencies in a subdirectory because
8467 # it helps to detect inapplicable dependency modes. For instance
8468 # both Tru64's cc and ICC support -MD to output dependencies as a
8469 # side effect of compilation, but ICC will put the dependencies in
8470 # the current directory while Tru64 will put them in the object
8471 # directory.
8472 mkdir sub
8473
8474 am_cv_OBJCXX_dependencies_compiler_type=none
8475 if test "$am_compiler_list" = ""; then
8476 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
8477 fi
8478 am__universal=false
8479
8480
8481 for depmode in $am_compiler_list; do
8482 # Setup a source with many dependencies, because some compilers
8483 # like to wrap large dependency lists on column 80 (with \), and
8484 # we should not choose a depcomp mode which is confused by this.
8485 #
8486 # We need to recreate these files for each test, as the compiler may
8487 # overwrite some of them when testing with obscure command lines.
8488 # This happens at least with the AIX C compiler.
8489 : > sub/conftest.c
8490 for i in 1 2 3 4 5 6; do
8491 echo '#include "conftst'$i'.h"' >> sub/conftest.c
8492 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
8493 # Solaris 10 /bin/sh.
8494 echo '/* dummy */' > sub/conftst$i.h
8495 done
8496 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8497
8498 # We check with '-c' and '-o' for the sake of the "dashmstdout"
8499 # mode. It turns out that the SunPro C++ compiler does not properly
8500 # handle '-M -o', and we need to detect this. Also, some Intel
8501 # versions had trouble with output in subdirs.
8502 am__obj=sub/conftest.${OBJEXT-o}
8503 am__minus_obj="-o $am__obj"
8504 case $depmode in
8505 gcc)
8506 # This depmode causes a compiler race in universal mode.
8507 test "$am__universal" = false || continue
8508 ;;
8509 nosideeffect)
8510 # After this tag, mechanisms are not by side-effect, so they'll
8511 # only be used when explicitly requested.
8512 if test "x$enable_dependency_tracking" = xyes; then
8513 continue
8514 else
8515 break
8516 fi
8517 ;;
8518 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
8519 # This compiler won't grok '-c -o', but also, the minuso test has
8520 # not run yet. These depmodes are late enough in the game, and
8521 # so weak that their functioning should not be impacted.
8522 am__obj=conftest.${OBJEXT-o}
8523 am__minus_obj=
8524 ;;
8525 none) break ;;
8526 esac
8527 if depmode=$depmode \
8528 source=sub/conftest.c object=$am__obj \
8529 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8530 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
8531 >/dev/null 2>conftest.err &&
8532 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8533 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8534 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
8535 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8536 # icc doesn't choke on unknown options, it will just issue warnings
8537 # or remarks (even with -Werror). So we grep stderr for any message
8538 # that says an option was ignored or not supported.
8539 # When given -MP, icc 7.0 and 7.1 complain thusly:
8540 # icc: Command line warning: ignoring option '-M'; no argument required
8541 # The diagnosis changed in icc 8.0:
8542 # icc: Command line remark: option '-MP' not supported
8543 if (grep 'ignoring option' conftest.err ||
8544 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8545 am_cv_OBJCXX_dependencies_compiler_type=$depmode
8546 break
8547 fi
8548 fi
8549 done
8550
8551 cd ..
8552 rm -rf conftest.dir
8553 else
8554 am_cv_OBJCXX_dependencies_compiler_type=none
8555 fi
8556
8557 fi
8558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJCXX_dependencies_compiler_type" >&5
8559 $as_echo "$am_cv_OBJCXX_dependencies_compiler_type" >&6; }
8560 OBJCXXDEPMODE=depmode=$am_cv_OBJCXX_dependencies_compiler_type
8561
8562 if
8563 test "x$enable_dependency_tracking" != xno \
8564 && test "$am_cv_OBJCXX_dependencies_compiler_type" = gcc3; then
8565 am__fastdepOBJCXX_TRUE=
8566 am__fastdepOBJCXX_FALSE='#'
8567 else
8568 am__fastdepOBJCXX_TRUE='#'
8569 am__fastdepOBJCXX_FALSE=
8570 fi
8571
8572
8573
8574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8575 $as_echo_n "checking whether ln -s works... " >&6; }
8576 LN_S=$as_ln_s
8577 if test "$LN_S" = "ln -s"; then
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8579 $as_echo "yes" >&6; }
8580 else
8581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8582 $as_echo "no, using $LN_S" >&6; }
8583 fi
8584
8585
8586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8587 $as_echo_n "checking for ANSI C header files... " >&6; }
8588 if ${ac_cv_header_stdc+:} false; then :
8589 $as_echo_n "(cached) " >&6
8590 else
8591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8592 /* end confdefs.h. */
8593 #include <stdlib.h>
8594 #include <stdarg.h>
8595 #include <string.h>
8596 #include <float.h>
8597
8598 int
8599 main ()
8600 {
8601
8602 ;
8603 return 0;
8604 }
8605 _ACEOF
8606 if ac_fn_c_try_compile "$LINENO"; then :
8607 ac_cv_header_stdc=yes
8608 else
8609 ac_cv_header_stdc=no
8610 fi
8611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8612
8613 if test $ac_cv_header_stdc = yes; then
8614 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8616 /* end confdefs.h. */
8617 #include <string.h>
8618
8619 _ACEOF
8620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8621 $EGREP "memchr" >/dev/null 2>&1; then :
8622
8623 else
8624 ac_cv_header_stdc=no
8625 fi
8626 rm -f conftest*
8627
8628 fi
8629
8630 if test $ac_cv_header_stdc = yes; then
8631 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8633 /* end confdefs.h. */
8634 #include <stdlib.h>
8635
8636 _ACEOF
8637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8638 $EGREP "free" >/dev/null 2>&1; then :
8639
8640 else
8641 ac_cv_header_stdc=no
8642 fi
8643 rm -f conftest*
8644
8645 fi
8646
8647 if test $ac_cv_header_stdc = yes; then
8648 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8649 if test "$cross_compiling" = yes; then :
8650 :
8651 else
8652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8653 /* end confdefs.h. */
8654 #include <ctype.h>
8655 #include <stdlib.h>
8656 #if ((' ' & 0x0FF) == 0x020)
8657 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8658 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8659 #else
8660 # define ISLOWER(c) \
8661 (('a' <= (c) && (c) <= 'i') \
8662 || ('j' <= (c) && (c) <= 'r') \
8663 || ('s' <= (c) && (c) <= 'z'))
8664 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8665 #endif
8666
8667 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8668 int
8669 main ()
8670 {
8671 int i;
8672 for (i = 0; i < 256; i++)
8673 if (XOR (islower (i), ISLOWER (i))
8674 || toupper (i) != TOUPPER (i))
8675 return 2;
8676 return 0;
8677 }
8678 _ACEOF
8679 if ac_fn_c_try_run "$LINENO"; then :
8680
8681 else
8682 ac_cv_header_stdc=no
8683 fi
8684 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8685 conftest.$ac_objext conftest.beam conftest.$ac_ext
8686 fi
8687
8688 fi
8689 fi
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8691 $as_echo "$ac_cv_header_stdc" >&6; }
8692 if test $ac_cv_header_stdc = yes; then
8693
8694 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8695
8696 fi
8697
8698 case `pwd` in
8699 *\ * | *\ *)
8700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
8701 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
8702 esac
8703
8704
8705
8706 macro_version='2.4.6'
8707 macro_revision='2.4.6'
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721 ltmain=$ac_aux_dir/ltmain.sh
8722
8723 # Backslashify metacharacters that are still active within
8724 # double-quoted strings.
8725 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
8726
8727 # Same as above, but do not quote variable references.
8728 double_quote_subst='s/\(["`\\]\)/\\\1/g'
8729
8730 # Sed substitution to delay expansion of an escaped shell variable in a
8731 # double_quote_subst'ed string.
8732 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
8733
8734 # Sed substitution to delay expansion of an escaped single quote.
8735 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
8736
8737 # Sed substitution to avoid accidental globbing in evaled expressions
8738 no_glob_subst='s/\*/\\\*/g'
8739
8740 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
8741 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
8742 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
8743
8744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
8745 $as_echo_n "checking how to print strings... " >&6; }
8746 # Test print first, because it will be a builtin if present.
8747 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
8748 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
8749 ECHO='print -r --'
8750 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
8751 ECHO='printf %s\n'
8752 else
8753 # Use this function as a fallback that always works.
8754 func_fallback_echo ()
8755 {
8756 eval 'cat <<_LTECHO_EOF
8757 $1
8758 _LTECHO_EOF'
8759 }
8760 ECHO='func_fallback_echo'
8761 fi
8762
8763 # func_echo_all arg...
8764 # Invoke $ECHO with all args, space-separated.
8765 func_echo_all ()
8766 {
8767 $ECHO ""
8768 }
8769
8770 case $ECHO in
8771 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
8772 $as_echo "printf" >&6; } ;;
8773 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
8774 $as_echo "print -r" >&6; } ;;
8775 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
8776 $as_echo "cat" >&6; } ;;
8777 esac
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
8793 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
8794 if ${ac_cv_path_SED+:} false; then :
8795 $as_echo_n "(cached) " >&6
8796 else
8797 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
8798 for ac_i in 1 2 3 4 5 6 7; do
8799 ac_script="$ac_script$as_nl$ac_script"
8800 done
8801 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
8802 { ac_script=; unset ac_script;}
8803 if test -z "$SED"; then
8804 ac_path_SED_found=false
8805 # Loop through the user's path and test for each of PROGNAME-LIST
8806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8807 for as_dir in $PATH
8808 do
8809 IFS=$as_save_IFS
8810 test -z "$as_dir" && as_dir=.
8811 for ac_prog in sed gsed; do
8812 for ac_exec_ext in '' $ac_executable_extensions; do
8813 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
8814 as_fn_executable_p "$ac_path_SED" || continue
8815 # Check for GNU ac_path_SED and select it if it is found.
8816 # Check for GNU $ac_path_SED
8817 case `"$ac_path_SED" --version 2>&1` in
8818 *GNU*)
8819 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
8820 *)
8821 ac_count=0
8822 $as_echo_n 0123456789 >"conftest.in"
8823 while :
8824 do
8825 cat "conftest.in" "conftest.in" >"conftest.tmp"
8826 mv "conftest.tmp" "conftest.in"
8827 cp "conftest.in" "conftest.nl"
8828 $as_echo '' >> "conftest.nl"
8829 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
8830 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8831 as_fn_arith $ac_count + 1 && ac_count=$as_val
8832 if test $ac_count -gt ${ac_path_SED_max-0}; then
8833 # Best one so far, save it but keep looking for a better one
8834 ac_cv_path_SED="$ac_path_SED"
8835 ac_path_SED_max=$ac_count
8836 fi
8837 # 10*(2^10) chars as input seems more than enough
8838 test $ac_count -gt 10 && break
8839 done
8840 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8841 esac
8842
8843 $ac_path_SED_found && break 3
8844 done
8845 done
8846 done
8847 IFS=$as_save_IFS
8848 if test -z "$ac_cv_path_SED"; then
8849 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
8850 fi
8851 else
8852 ac_cv_path_SED=$SED
8853 fi
8854
8855 fi
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
8857 $as_echo "$ac_cv_path_SED" >&6; }
8858 SED="$ac_cv_path_SED"
8859 rm -f conftest.sed
8860
8861 test -z "$SED" && SED=sed
8862 Xsed="$SED -e 1s/^X//"
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
8875 $as_echo_n "checking for fgrep... " >&6; }
8876 if ${ac_cv_path_FGREP+:} false; then :
8877 $as_echo_n "(cached) " >&6
8878 else
8879 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
8880 then ac_cv_path_FGREP="$GREP -F"
8881 else
8882 if test -z "$FGREP"; then
8883 ac_path_FGREP_found=false
8884 # Loop through the user's path and test for each of PROGNAME-LIST
8885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8886 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8887 do
8888 IFS=$as_save_IFS
8889 test -z "$as_dir" && as_dir=.
8890 for ac_prog in fgrep; do
8891 for ac_exec_ext in '' $ac_executable_extensions; do
8892 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
8893 as_fn_executable_p "$ac_path_FGREP" || continue
8894 # Check for GNU ac_path_FGREP and select it if it is found.
8895 # Check for GNU $ac_path_FGREP
8896 case `"$ac_path_FGREP" --version 2>&1` in
8897 *GNU*)
8898 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
8899 *)
8900 ac_count=0
8901 $as_echo_n 0123456789 >"conftest.in"
8902 while :
8903 do
8904 cat "conftest.in" "conftest.in" >"conftest.tmp"
8905 mv "conftest.tmp" "conftest.in"
8906 cp "conftest.in" "conftest.nl"
8907 $as_echo 'FGREP' >> "conftest.nl"
8908 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
8909 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8910 as_fn_arith $ac_count + 1 && ac_count=$as_val
8911 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
8912 # Best one so far, save it but keep looking for a better one
8913 ac_cv_path_FGREP="$ac_path_FGREP"
8914 ac_path_FGREP_max=$ac_count
8915 fi
8916 # 10*(2^10) chars as input seems more than enough
8917 test $ac_count -gt 10 && break
8918 done
8919 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8920 esac
8921
8922 $ac_path_FGREP_found && break 3
8923 done
8924 done
8925 done
8926 IFS=$as_save_IFS
8927 if test -z "$ac_cv_path_FGREP"; then
8928 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8929 fi
8930 else
8931 ac_cv_path_FGREP=$FGREP
8932 fi
8933
8934 fi
8935 fi
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
8937 $as_echo "$ac_cv_path_FGREP" >&6; }
8938 FGREP="$ac_cv_path_FGREP"
8939
8940
8941 test -z "$GREP" && GREP=grep
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961 # Check whether --with-gnu-ld was given.
8962 if test "${with_gnu_ld+set}" = set; then :
8963 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
8964 else
8965 with_gnu_ld=no
8966 fi
8967
8968 ac_prog=ld
8969 if test yes = "$GCC"; then
8970 # Check if gcc -print-prog-name=ld gives a path.
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8972 $as_echo_n "checking for ld used by $CC... " >&6; }
8973 case $host in
8974 *-*-mingw*)
8975 # gcc leaves a trailing carriage return, which upsets mingw
8976 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8977 *)
8978 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8979 esac
8980 case $ac_prog in
8981 # Accept absolute paths.
8982 [\\/]* | ?:[\\/]*)
8983 re_direlt='/[^/][^/]*/\.\./'
8984 # Canonicalize the pathname of ld
8985 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8986 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8987 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8988 done
8989 test -z "$LD" && LD=$ac_prog
8990 ;;
8991 "")
8992 # If it fails, then pretend we aren't using GCC.
8993 ac_prog=ld
8994 ;;
8995 *)
8996 # If it is relative, then search for the first ld in PATH.
8997 with_gnu_ld=unknown
8998 ;;
8999 esac
9000 elif test yes = "$with_gnu_ld"; then
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9002 $as_echo_n "checking for GNU ld... " >&6; }
9003 else
9004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9005 $as_echo_n "checking for non-GNU ld... " >&6; }
9006 fi
9007 if ${lt_cv_path_LD+:} false; then :
9008 $as_echo_n "(cached) " >&6
9009 else
9010 if test -z "$LD"; then
9011 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
9012 for ac_dir in $PATH; do
9013 IFS=$lt_save_ifs
9014 test -z "$ac_dir" && ac_dir=.
9015 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9016 lt_cv_path_LD=$ac_dir/$ac_prog
9017 # Check to see if the program is GNU ld. I'd rather use --version,
9018 # but apparently some variants of GNU ld only accept -v.
9019 # Break only if it was the GNU/non-GNU ld that we prefer.
9020 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
9021 *GNU* | *'with BFD'*)
9022 test no != "$with_gnu_ld" && break
9023 ;;
9024 *)
9025 test yes != "$with_gnu_ld" && break
9026 ;;
9027 esac
9028 fi
9029 done
9030 IFS=$lt_save_ifs
9031 else
9032 lt_cv_path_LD=$LD # Let the user override the test with a path.
9033 fi
9034 fi
9035
9036 LD=$lt_cv_path_LD
9037 if test -n "$LD"; then
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9039 $as_echo "$LD" >&6; }
9040 else
9041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9042 $as_echo "no" >&6; }
9043 fi
9044 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9046 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9047 if ${lt_cv_prog_gnu_ld+:} false; then :
9048 $as_echo_n "(cached) " >&6
9049 else
9050 # I'd rather use --version here, but apparently some GNU lds only accept -v.
9051 case `$LD -v 2>&1 </dev/null` in
9052 *GNU* | *'with BFD'*)
9053 lt_cv_prog_gnu_ld=yes
9054 ;;
9055 *)
9056 lt_cv_prog_gnu_ld=no
9057 ;;
9058 esac
9059 fi
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
9061 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
9062 with_gnu_ld=$lt_cv_prog_gnu_ld
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
9073 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
9074 if ${lt_cv_path_NM+:} false; then :
9075 $as_echo_n "(cached) " >&6
9076 else
9077 if test -n "$NM"; then
9078 # Let the user override the test.
9079 lt_cv_path_NM=$NM
9080 else
9081 lt_nm_to_check=${ac_tool_prefix}nm
9082 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
9083 lt_nm_to_check="$lt_nm_to_check nm"
9084 fi
9085 for lt_tmp_nm in $lt_nm_to_check; do
9086 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
9087 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
9088 IFS=$lt_save_ifs
9089 test -z "$ac_dir" && ac_dir=.
9090 tmp_nm=$ac_dir/$lt_tmp_nm
9091 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
9092 # Check to see if the nm accepts a BSD-compat flag.
9093 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
9094 # nm: unknown option "B" ignored
9095 # Tru64's nm complains that /dev/null is an invalid object file
9096 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
9097 case $build_os in
9098 mingw*) lt_bad_file=conftest.nm/nofile ;;
9099 *) lt_bad_file=/dev/null ;;
9100 esac
9101 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
9102 *$lt_bad_file* | *'Invalid file or object type'*)
9103 lt_cv_path_NM="$tmp_nm -B"
9104 break 2
9105 ;;
9106 *)
9107 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
9108 */dev/null*)
9109 lt_cv_path_NM="$tmp_nm -p"
9110 break 2
9111 ;;
9112 *)
9113 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
9114 continue # so that we can try to find one that supports BSD flags
9115 ;;
9116 esac
9117 ;;
9118 esac
9119 fi
9120 done
9121 IFS=$lt_save_ifs
9122 done
9123 : ${lt_cv_path_NM=no}
9124 fi
9125 fi
9126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
9127 $as_echo "$lt_cv_path_NM" >&6; }
9128 if test no != "$lt_cv_path_NM"; then
9129 NM=$lt_cv_path_NM
9130 else
9131 # Didn't find any BSD compatible name lister, look for dumpbin.
9132 if test -n "$DUMPBIN"; then :
9133 # Let the user override the test.
9134 else
9135 if test -n "$ac_tool_prefix"; then
9136 for ac_prog in dumpbin "link -dump"
9137 do
9138 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9139 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9141 $as_echo_n "checking for $ac_word... " >&6; }
9142 if ${ac_cv_prog_DUMPBIN+:} false; then :
9143 $as_echo_n "(cached) " >&6
9144 else
9145 if test -n "$DUMPBIN"; then
9146 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
9147 else
9148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9149 for as_dir in $PATH
9150 do
9151 IFS=$as_save_IFS
9152 test -z "$as_dir" && as_dir=.
9153 for ac_exec_ext in '' $ac_executable_extensions; do
9154 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9155 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
9156 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9157 break 2
9158 fi
9159 done
9160 done
9161 IFS=$as_save_IFS
9162
9163 fi
9164 fi
9165 DUMPBIN=$ac_cv_prog_DUMPBIN
9166 if test -n "$DUMPBIN"; then
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
9168 $as_echo "$DUMPBIN" >&6; }
9169 else
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9171 $as_echo "no" >&6; }
9172 fi
9173
9174
9175 test -n "$DUMPBIN" && break
9176 done
9177 fi
9178 if test -z "$DUMPBIN"; then
9179 ac_ct_DUMPBIN=$DUMPBIN
9180 for ac_prog in dumpbin "link -dump"
9181 do
9182 # Extract the first word of "$ac_prog", so it can be a program name with args.
9183 set dummy $ac_prog; ac_word=$2
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9185 $as_echo_n "checking for $ac_word... " >&6; }
9186 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
9187 $as_echo_n "(cached) " >&6
9188 else
9189 if test -n "$ac_ct_DUMPBIN"; then
9190 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
9191 else
9192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9193 for as_dir in $PATH
9194 do
9195 IFS=$as_save_IFS
9196 test -z "$as_dir" && as_dir=.
9197 for ac_exec_ext in '' $ac_executable_extensions; do
9198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9199 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
9200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9201 break 2
9202 fi
9203 done
9204 done
9205 IFS=$as_save_IFS
9206
9207 fi
9208 fi
9209 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
9210 if test -n "$ac_ct_DUMPBIN"; then
9211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
9212 $as_echo "$ac_ct_DUMPBIN" >&6; }
9213 else
9214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9215 $as_echo "no" >&6; }
9216 fi
9217
9218
9219 test -n "$ac_ct_DUMPBIN" && break
9220 done
9221
9222 if test "x$ac_ct_DUMPBIN" = x; then
9223 DUMPBIN=":"
9224 else
9225 case $cross_compiling:$ac_tool_warned in
9226 yes:)
9227 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9228 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9229 ac_tool_warned=yes ;;
9230 esac
9231 DUMPBIN=$ac_ct_DUMPBIN
9232 fi
9233 fi
9234
9235 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
9236 *COFF*)
9237 DUMPBIN="$DUMPBIN -symbols -headers"
9238 ;;
9239 *)
9240 DUMPBIN=:
9241 ;;
9242 esac
9243 fi
9244
9245 if test : != "$DUMPBIN"; then
9246 NM=$DUMPBIN
9247 fi
9248 fi
9249 test -z "$NM" && NM=nm
9250
9251
9252
9253
9254
9255
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
9257 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
9258 if ${lt_cv_nm_interface+:} false; then :
9259 $as_echo_n "(cached) " >&6
9260 else
9261 lt_cv_nm_interface="BSD nm"
9262 echo "int some_variable = 0;" > conftest.$ac_ext
9263 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
9264 (eval "$ac_compile" 2>conftest.err)
9265 cat conftest.err >&5
9266 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
9267 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
9268 cat conftest.err >&5
9269 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
9270 cat conftest.out >&5
9271 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
9272 lt_cv_nm_interface="MS dumpbin"
9273 fi
9274 rm -f conftest*
9275 fi
9276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
9277 $as_echo "$lt_cv_nm_interface" >&6; }
9278
9279 # find the maximum length of command line arguments
9280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
9281 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
9282 if ${lt_cv_sys_max_cmd_len+:} false; then :
9283 $as_echo_n "(cached) " >&6
9284 else
9285 i=0
9286 teststring=ABCD
9287
9288 case $build_os in
9289 msdosdjgpp*)
9290 # On DJGPP, this test can blow up pretty badly due to problems in libc
9291 # (any single argument exceeding 2000 bytes causes a buffer overrun
9292 # during glob expansion). Even if it were fixed, the result of this
9293 # check would be larger than it should be.
9294 lt_cv_sys_max_cmd_len=12288; # 12K is about right
9295 ;;
9296
9297 gnu*)
9298 # Under GNU Hurd, this test is not required because there is
9299 # no limit to the length of command line arguments.
9300 # Libtool will interpret -1 as no limit whatsoever
9301 lt_cv_sys_max_cmd_len=-1;
9302 ;;
9303
9304 cygwin* | mingw* | cegcc*)
9305 # On Win9x/ME, this test blows up -- it succeeds, but takes
9306 # about 5 minutes as the teststring grows exponentially.
9307 # Worse, since 9x/ME are not pre-emptively multitasking,
9308 # you end up with a "frozen" computer, even though with patience
9309 # the test eventually succeeds (with a max line length of 256k).
9310 # Instead, let's just punt: use the minimum linelength reported by
9311 # all of the supported platforms: 8192 (on NT/2K/XP).
9312 lt_cv_sys_max_cmd_len=8192;
9313 ;;
9314
9315 mint*)
9316 # On MiNT this can take a long time and run out of memory.
9317 lt_cv_sys_max_cmd_len=8192;
9318 ;;
9319
9320 amigaos*)
9321 # On AmigaOS with pdksh, this test takes hours, literally.
9322 # So we just punt and use a minimum line length of 8192.
9323 lt_cv_sys_max_cmd_len=8192;
9324 ;;
9325
9326 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
9327 # This has been around since 386BSD, at least. Likely further.
9328 if test -x /sbin/sysctl; then
9329 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
9330 elif test -x /usr/sbin/sysctl; then
9331 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
9332 else
9333 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
9334 fi
9335 # And add a safety zone
9336 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
9337 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
9338 ;;
9339
9340 interix*)
9341 # We know the value 262144 and hardcode it with a safety zone (like BSD)
9342 lt_cv_sys_max_cmd_len=196608
9343 ;;
9344
9345 os2*)
9346 # The test takes a long time on OS/2.
9347 lt_cv_sys_max_cmd_len=8192
9348 ;;
9349
9350 osf*)
9351 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
9352 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
9353 # nice to cause kernel panics so lets avoid the loop below.
9354 # First set a reasonable default.
9355 lt_cv_sys_max_cmd_len=16384
9356 #
9357 if test -x /sbin/sysconfig; then
9358 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
9359 *1*) lt_cv_sys_max_cmd_len=-1 ;;
9360 esac
9361 fi
9362 ;;
9363 sco3.2v5*)
9364 lt_cv_sys_max_cmd_len=102400
9365 ;;
9366 sysv5* | sco5v6* | sysv4.2uw2*)
9367 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
9368 if test -n "$kargmax"; then
9369 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
9370 else
9371 lt_cv_sys_max_cmd_len=32768
9372 fi
9373 ;;
9374 *)
9375 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
9376 if test -n "$lt_cv_sys_max_cmd_len" && \
9377 test undefined != "$lt_cv_sys_max_cmd_len"; then
9378 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
9379 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
9380 else
9381 # Make teststring a little bigger before we do anything with it.
9382 # a 1K string should be a reasonable start.
9383 for i in 1 2 3 4 5 6 7 8; do
9384 teststring=$teststring$teststring
9385 done
9386 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
9387 # If test is not a shell built-in, we'll probably end up computing a
9388 # maximum length that is only half of the actual maximum length, but
9389 # we can't tell.
9390 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
9391 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
9392 test 17 != "$i" # 1/2 MB should be enough
9393 do
9394 i=`expr $i + 1`
9395 teststring=$teststring$teststring
9396 done
9397 # Only check the string length outside the loop.
9398 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
9399 teststring=
9400 # Add a significant safety factor because C++ compilers can tack on
9401 # massive amounts of additional arguments before passing them to the
9402 # linker. It appears as though 1/2 is a usable value.
9403 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
9404 fi
9405 ;;
9406 esac
9407
9408 fi
9409
9410 if test -n "$lt_cv_sys_max_cmd_len"; then
9411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
9412 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
9413 else
9414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
9415 $as_echo "none" >&6; }
9416 fi
9417 max_cmd_len=$lt_cv_sys_max_cmd_len
9418
9419
9420
9421
9422
9423
9424 : ${CP="cp -f"}
9425 : ${MV="mv -f"}
9426 : ${RM="rm -f"}
9427
9428 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9429 lt_unset=unset
9430 else
9431 lt_unset=false
9432 fi
9433
9434
9435
9436
9437
9438 # test EBCDIC or ASCII
9439 case `echo X|tr X '\101'` in
9440 A) # ASCII based system
9441 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9442 lt_SP2NL='tr \040 \012'
9443 lt_NL2SP='tr \015\012 \040\040'
9444 ;;
9445 *) # EBCDIC based system
9446 lt_SP2NL='tr \100 \n'
9447 lt_NL2SP='tr \r\n \100\100'
9448 ;;
9449 esac
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
9460 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
9461 if ${lt_cv_to_host_file_cmd+:} false; then :
9462 $as_echo_n "(cached) " >&6
9463 else
9464 case $host in
9465 *-*-mingw* )
9466 case $build in
9467 *-*-mingw* ) # actually msys
9468 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9469 ;;
9470 *-*-cygwin* )
9471 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9472 ;;
9473 * ) # otherwise, assume *nix
9474 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9475 ;;
9476 esac
9477 ;;
9478 *-*-cygwin* )
9479 case $build in
9480 *-*-mingw* ) # actually msys
9481 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9482 ;;
9483 *-*-cygwin* )
9484 lt_cv_to_host_file_cmd=func_convert_file_noop
9485 ;;
9486 * ) # otherwise, assume *nix
9487 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9488 ;;
9489 esac
9490 ;;
9491 * ) # unhandled hosts (and "normal" native builds)
9492 lt_cv_to_host_file_cmd=func_convert_file_noop
9493 ;;
9494 esac
9495
9496 fi
9497
9498 to_host_file_cmd=$lt_cv_to_host_file_cmd
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
9500 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
9501
9502
9503
9504
9505
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
9507 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
9508 if ${lt_cv_to_tool_file_cmd+:} false; then :
9509 $as_echo_n "(cached) " >&6
9510 else
9511 #assume ordinary cross tools, or native build.
9512 lt_cv_to_tool_file_cmd=func_convert_file_noop
9513 case $host in
9514 *-*-mingw* )
9515 case $build in
9516 *-*-mingw* ) # actually msys
9517 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9518 ;;
9519 esac
9520 ;;
9521 esac
9522
9523 fi
9524
9525 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
9527 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
9528
9529
9530
9531
9532
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
9534 $as_echo_n "checking for $LD option to reload object files... " >&6; }
9535 if ${lt_cv_ld_reload_flag+:} false; then :
9536 $as_echo_n "(cached) " >&6
9537 else
9538 lt_cv_ld_reload_flag='-r'
9539 fi
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
9541 $as_echo "$lt_cv_ld_reload_flag" >&6; }
9542 reload_flag=$lt_cv_ld_reload_flag
9543 case $reload_flag in
9544 "" | " "*) ;;
9545 *) reload_flag=" $reload_flag" ;;
9546 esac
9547 reload_cmds='$LD$reload_flag -o $output$reload_objs'
9548 case $host_os in
9549 cygwin* | mingw* | pw32* | cegcc*)
9550 if test yes != "$GCC"; then
9551 reload_cmds=false
9552 fi
9553 ;;
9554 darwin*)
9555 if test yes = "$GCC"; then
9556 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
9557 else
9558 reload_cmds='$LD$reload_flag -o $output$reload_objs'
9559 fi
9560 ;;
9561 esac
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571 if test -n "$ac_tool_prefix"; then
9572 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
9573 set dummy ${ac_tool_prefix}objdump; ac_word=$2
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9575 $as_echo_n "checking for $ac_word... " >&6; }
9576 if ${ac_cv_prog_OBJDUMP+:} false; then :
9577 $as_echo_n "(cached) " >&6
9578 else
9579 if test -n "$OBJDUMP"; then
9580 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
9581 else
9582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9583 for as_dir in $PATH
9584 do
9585 IFS=$as_save_IFS
9586 test -z "$as_dir" && as_dir=.
9587 for ac_exec_ext in '' $ac_executable_extensions; do
9588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9589 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
9590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9591 break 2
9592 fi
9593 done
9594 done
9595 IFS=$as_save_IFS
9596
9597 fi
9598 fi
9599 OBJDUMP=$ac_cv_prog_OBJDUMP
9600 if test -n "$OBJDUMP"; then
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
9602 $as_echo "$OBJDUMP" >&6; }
9603 else
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9605 $as_echo "no" >&6; }
9606 fi
9607
9608
9609 fi
9610 if test -z "$ac_cv_prog_OBJDUMP"; then
9611 ac_ct_OBJDUMP=$OBJDUMP
9612 # Extract the first word of "objdump", so it can be a program name with args.
9613 set dummy objdump; ac_word=$2
9614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9615 $as_echo_n "checking for $ac_word... " >&6; }
9616 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
9617 $as_echo_n "(cached) " >&6
9618 else
9619 if test -n "$ac_ct_OBJDUMP"; then
9620 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
9621 else
9622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9623 for as_dir in $PATH
9624 do
9625 IFS=$as_save_IFS
9626 test -z "$as_dir" && as_dir=.
9627 for ac_exec_ext in '' $ac_executable_extensions; do
9628 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9629 ac_cv_prog_ac_ct_OBJDUMP="objdump"
9630 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9631 break 2
9632 fi
9633 done
9634 done
9635 IFS=$as_save_IFS
9636
9637 fi
9638 fi
9639 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
9640 if test -n "$ac_ct_OBJDUMP"; then
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
9642 $as_echo "$ac_ct_OBJDUMP" >&6; }
9643 else
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645 $as_echo "no" >&6; }
9646 fi
9647
9648 if test "x$ac_ct_OBJDUMP" = x; then
9649 OBJDUMP="false"
9650 else
9651 case $cross_compiling:$ac_tool_warned in
9652 yes:)
9653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9654 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9655 ac_tool_warned=yes ;;
9656 esac
9657 OBJDUMP=$ac_ct_OBJDUMP
9658 fi
9659 else
9660 OBJDUMP="$ac_cv_prog_OBJDUMP"
9661 fi
9662
9663 test -z "$OBJDUMP" && OBJDUMP=objdump
9664
9665
9666
9667
9668
9669
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
9671 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
9672 if ${lt_cv_deplibs_check_method+:} false; then :
9673 $as_echo_n "(cached) " >&6
9674 else
9675 lt_cv_file_magic_cmd='$MAGIC_CMD'
9676 lt_cv_file_magic_test_file=
9677 lt_cv_deplibs_check_method='unknown'
9678 # Need to set the preceding variable on all platforms that support
9679 # interlibrary dependencies.
9680 # 'none' -- dependencies not supported.
9681 # 'unknown' -- same as none, but documents that we really don't know.
9682 # 'pass_all' -- all dependencies passed with no checks.
9683 # 'test_compile' -- check by making test program.
9684 # 'file_magic [[regex]]' -- check by looking for files in library path
9685 # that responds to the $file_magic_cmd with a given extended regex.
9686 # If you have 'file' or equivalent on your system and you're not sure
9687 # whether 'pass_all' will *always* work, you probably want this one.
9688
9689 case $host_os in
9690 aix[4-9]*)
9691 lt_cv_deplibs_check_method=pass_all
9692 ;;
9693
9694 beos*)
9695 lt_cv_deplibs_check_method=pass_all
9696 ;;
9697
9698 bsdi[45]*)
9699 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
9700 lt_cv_file_magic_cmd='/usr/bin/file -L'
9701 lt_cv_file_magic_test_file=/shlib/libc.so
9702 ;;
9703
9704 cygwin*)
9705 # func_win32_libid is a shell function defined in ltmain.sh
9706 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
9707 lt_cv_file_magic_cmd='func_win32_libid'
9708 ;;
9709
9710 mingw* | pw32*)
9711 # Base MSYS/MinGW do not provide the 'file' command needed by
9712 # func_win32_libid shell function, so use a weaker test based on 'objdump',
9713 # unless we find 'file', for example because we are cross-compiling.
9714 if ( file / ) >/dev/null 2>&1; then
9715 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
9716 lt_cv_file_magic_cmd='func_win32_libid'
9717 else
9718 # Keep this pattern in sync with the one in func_win32_libid.
9719 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
9720 lt_cv_file_magic_cmd='$OBJDUMP -f'
9721 fi
9722 ;;
9723
9724 cegcc*)
9725 # use the weaker test based on 'objdump'. See mingw*.
9726 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
9727 lt_cv_file_magic_cmd='$OBJDUMP -f'
9728 ;;
9729
9730 darwin* | rhapsody*)
9731 lt_cv_deplibs_check_method=pass_all
9732 ;;
9733
9734 freebsd* | dragonfly*)
9735 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9736 case $host_cpu in
9737 i*86 )
9738 # Not sure whether the presence of OpenBSD here was a mistake.
9739 # Let's accept both of them until this is cleared up.
9740 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
9741 lt_cv_file_magic_cmd=/usr/bin/file
9742 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
9743 ;;
9744 esac
9745 else
9746 lt_cv_deplibs_check_method=pass_all
9747 fi
9748 ;;
9749
9750 haiku*)
9751 lt_cv_deplibs_check_method=pass_all
9752 ;;
9753
9754 hpux10.20* | hpux11*)
9755 lt_cv_file_magic_cmd=/usr/bin/file
9756 case $host_cpu in
9757 ia64*)
9758 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
9759 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
9760 ;;
9761 hppa*64*)
9762 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
9763 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
9764 ;;
9765 *)
9766 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
9767 lt_cv_file_magic_test_file=/usr/lib/libc.sl
9768 ;;
9769 esac
9770 ;;
9771
9772 interix[3-9]*)
9773 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
9774 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
9775 ;;
9776
9777 irix5* | irix6* | nonstopux*)
9778 case $LD in
9779 *-32|*"-32 ") libmagic=32-bit;;
9780 *-n32|*"-n32 ") libmagic=N32;;
9781 *-64|*"-64 ") libmagic=64-bit;;
9782 *) libmagic=never-match;;
9783 esac
9784 lt_cv_deplibs_check_method=pass_all
9785 ;;
9786
9787 # This must be glibc/ELF.
9788 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9789 lt_cv_deplibs_check_method=pass_all
9790 ;;
9791
9792 netbsd* | netbsdelf*-gnu)
9793 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9794 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9795 else
9796 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
9797 fi
9798 ;;
9799
9800 newos6*)
9801 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
9802 lt_cv_file_magic_cmd=/usr/bin/file
9803 lt_cv_file_magic_test_file=/usr/lib/libnls.so
9804 ;;
9805
9806 *nto* | *qnx*)
9807 lt_cv_deplibs_check_method=pass_all
9808 ;;
9809
9810 openbsd* | bitrig*)
9811 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9812 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
9813 else
9814 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9815 fi
9816 ;;
9817
9818 osf3* | osf4* | osf5*)
9819 lt_cv_deplibs_check_method=pass_all
9820 ;;
9821
9822 rdos*)
9823 lt_cv_deplibs_check_method=pass_all
9824 ;;
9825
9826 solaris*)
9827 lt_cv_deplibs_check_method=pass_all
9828 ;;
9829
9830 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9831 lt_cv_deplibs_check_method=pass_all
9832 ;;
9833
9834 sysv4 | sysv4.3*)
9835 case $host_vendor in
9836 motorola)
9837 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]'
9838 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
9839 ;;
9840 ncr)
9841 lt_cv_deplibs_check_method=pass_all
9842 ;;
9843 sequent)
9844 lt_cv_file_magic_cmd='/bin/file'
9845 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
9846 ;;
9847 sni)
9848 lt_cv_file_magic_cmd='/bin/file'
9849 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
9850 lt_cv_file_magic_test_file=/lib/libc.so
9851 ;;
9852 siemens)
9853 lt_cv_deplibs_check_method=pass_all
9854 ;;
9855 pc)
9856 lt_cv_deplibs_check_method=pass_all
9857 ;;
9858 esac
9859 ;;
9860
9861 tpf*)
9862 lt_cv_deplibs_check_method=pass_all
9863 ;;
9864 os2*)
9865 lt_cv_deplibs_check_method=pass_all
9866 ;;
9867 esac
9868
9869 fi
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
9871 $as_echo "$lt_cv_deplibs_check_method" >&6; }
9872
9873 file_magic_glob=
9874 want_nocaseglob=no
9875 if test "$build" = "$host"; then
9876 case $host_os in
9877 mingw* | pw32*)
9878 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9879 want_nocaseglob=yes
9880 else
9881 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9882 fi
9883 ;;
9884 esac
9885 fi
9886
9887 file_magic_cmd=$lt_cv_file_magic_cmd
9888 deplibs_check_method=$lt_cv_deplibs_check_method
9889 test -z "$deplibs_check_method" && deplibs_check_method=unknown
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912 if test -n "$ac_tool_prefix"; then
9913 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9914 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9916 $as_echo_n "checking for $ac_word... " >&6; }
9917 if ${ac_cv_prog_DLLTOOL+:} false; then :
9918 $as_echo_n "(cached) " >&6
9919 else
9920 if test -n "$DLLTOOL"; then
9921 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9922 else
9923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9924 for as_dir in $PATH
9925 do
9926 IFS=$as_save_IFS
9927 test -z "$as_dir" && as_dir=.
9928 for ac_exec_ext in '' $ac_executable_extensions; do
9929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9932 break 2
9933 fi
9934 done
9935 done
9936 IFS=$as_save_IFS
9937
9938 fi
9939 fi
9940 DLLTOOL=$ac_cv_prog_DLLTOOL
9941 if test -n "$DLLTOOL"; then
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9943 $as_echo "$DLLTOOL" >&6; }
9944 else
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946 $as_echo "no" >&6; }
9947 fi
9948
9949
9950 fi
9951 if test -z "$ac_cv_prog_DLLTOOL"; then
9952 ac_ct_DLLTOOL=$DLLTOOL
9953 # Extract the first word of "dlltool", so it can be a program name with args.
9954 set dummy dlltool; ac_word=$2
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956 $as_echo_n "checking for $ac_word... " >&6; }
9957 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9958 $as_echo_n "(cached) " >&6
9959 else
9960 if test -n "$ac_ct_DLLTOOL"; then
9961 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9962 else
9963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9964 for as_dir in $PATH
9965 do
9966 IFS=$as_save_IFS
9967 test -z "$as_dir" && as_dir=.
9968 for ac_exec_ext in '' $ac_executable_extensions; do
9969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9970 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9972 break 2
9973 fi
9974 done
9975 done
9976 IFS=$as_save_IFS
9977
9978 fi
9979 fi
9980 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9981 if test -n "$ac_ct_DLLTOOL"; then
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9983 $as_echo "$ac_ct_DLLTOOL" >&6; }
9984 else
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9986 $as_echo "no" >&6; }
9987 fi
9988
9989 if test "x$ac_ct_DLLTOOL" = x; then
9990 DLLTOOL="false"
9991 else
9992 case $cross_compiling:$ac_tool_warned in
9993 yes:)
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9995 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9996 ac_tool_warned=yes ;;
9997 esac
9998 DLLTOOL=$ac_ct_DLLTOOL
9999 fi
10000 else
10001 DLLTOOL="$ac_cv_prog_DLLTOOL"
10002 fi
10003
10004 test -z "$DLLTOOL" && DLLTOOL=dlltool
10005
10006
10007
10008
10009
10010
10011
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
10013 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
10014 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
10015 $as_echo_n "(cached) " >&6
10016 else
10017 lt_cv_sharedlib_from_linklib_cmd='unknown'
10018
10019 case $host_os in
10020 cygwin* | mingw* | pw32* | cegcc*)
10021 # two different shell functions defined in ltmain.sh;
10022 # decide which one to use based on capabilities of $DLLTOOL
10023 case `$DLLTOOL --help 2>&1` in
10024 *--identify-strict*)
10025 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
10026 ;;
10027 *)
10028 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
10029 ;;
10030 esac
10031 ;;
10032 *)
10033 # fallback: assume linklib IS sharedlib
10034 lt_cv_sharedlib_from_linklib_cmd=$ECHO
10035 ;;
10036 esac
10037
10038 fi
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
10040 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
10041 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
10042 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
10043
10044
10045
10046
10047
10048
10049
10050 if test -n "$ac_tool_prefix"; then
10051 for ac_prog in ar
10052 do
10053 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10054 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10056 $as_echo_n "checking for $ac_word... " >&6; }
10057 if ${ac_cv_prog_AR+:} false; then :
10058 $as_echo_n "(cached) " >&6
10059 else
10060 if test -n "$AR"; then
10061 ac_cv_prog_AR="$AR" # Let the user override the test.
10062 else
10063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10064 for as_dir in $PATH
10065 do
10066 IFS=$as_save_IFS
10067 test -z "$as_dir" && as_dir=.
10068 for ac_exec_ext in '' $ac_executable_extensions; do
10069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10070 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
10071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10072 break 2
10073 fi
10074 done
10075 done
10076 IFS=$as_save_IFS
10077
10078 fi
10079 fi
10080 AR=$ac_cv_prog_AR
10081 if test -n "$AR"; then
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
10083 $as_echo "$AR" >&6; }
10084 else
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10086 $as_echo "no" >&6; }
10087 fi
10088
10089
10090 test -n "$AR" && break
10091 done
10092 fi
10093 if test -z "$AR"; then
10094 ac_ct_AR=$AR
10095 for ac_prog in ar
10096 do
10097 # Extract the first word of "$ac_prog", so it can be a program name with args.
10098 set dummy $ac_prog; ac_word=$2
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10100 $as_echo_n "checking for $ac_word... " >&6; }
10101 if ${ac_cv_prog_ac_ct_AR+:} false; then :
10102 $as_echo_n "(cached) " >&6
10103 else
10104 if test -n "$ac_ct_AR"; then
10105 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
10106 else
10107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10108 for as_dir in $PATH
10109 do
10110 IFS=$as_save_IFS
10111 test -z "$as_dir" && as_dir=.
10112 for ac_exec_ext in '' $ac_executable_extensions; do
10113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10114 ac_cv_prog_ac_ct_AR="$ac_prog"
10115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10116 break 2
10117 fi
10118 done
10119 done
10120 IFS=$as_save_IFS
10121
10122 fi
10123 fi
10124 ac_ct_AR=$ac_cv_prog_ac_ct_AR
10125 if test -n "$ac_ct_AR"; then
10126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
10127 $as_echo "$ac_ct_AR" >&6; }
10128 else
10129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130 $as_echo "no" >&6; }
10131 fi
10132
10133
10134 test -n "$ac_ct_AR" && break
10135 done
10136
10137 if test "x$ac_ct_AR" = x; then
10138 AR="false"
10139 else
10140 case $cross_compiling:$ac_tool_warned in
10141 yes:)
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10143 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10144 ac_tool_warned=yes ;;
10145 esac
10146 AR=$ac_ct_AR
10147 fi
10148 fi
10149
10150 : ${AR=ar}
10151 : ${AR_FLAGS=cru}
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
10164 $as_echo_n "checking for archiver @FILE support... " >&6; }
10165 if ${lt_cv_ar_at_file+:} false; then :
10166 $as_echo_n "(cached) " >&6
10167 else
10168 lt_cv_ar_at_file=no
10169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10170 /* end confdefs.h. */
10171
10172 int
10173 main ()
10174 {
10175
10176 ;
10177 return 0;
10178 }
10179 _ACEOF
10180 if ac_fn_c_try_compile "$LINENO"; then :
10181 echo conftest.$ac_objext > conftest.lst
10182 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
10183 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
10184 (eval $lt_ar_try) 2>&5
10185 ac_status=$?
10186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10187 test $ac_status = 0; }
10188 if test 0 -eq "$ac_status"; then
10189 # Ensure the archiver fails upon bogus file names.
10190 rm -f conftest.$ac_objext libconftest.a
10191 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
10192 (eval $lt_ar_try) 2>&5
10193 ac_status=$?
10194 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10195 test $ac_status = 0; }
10196 if test 0 -ne "$ac_status"; then
10197 lt_cv_ar_at_file=@
10198 fi
10199 fi
10200 rm -f conftest.* libconftest.a
10201
10202 fi
10203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10204
10205 fi
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
10207 $as_echo "$lt_cv_ar_at_file" >&6; }
10208
10209 if test no = "$lt_cv_ar_at_file"; then
10210 archiver_list_spec=
10211 else
10212 archiver_list_spec=$lt_cv_ar_at_file
10213 fi
10214
10215
10216
10217
10218
10219
10220
10221 if test -n "$ac_tool_prefix"; then
10222 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
10223 set dummy ${ac_tool_prefix}strip; ac_word=$2
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10225 $as_echo_n "checking for $ac_word... " >&6; }
10226 if ${ac_cv_prog_STRIP+:} false; then :
10227 $as_echo_n "(cached) " >&6
10228 else
10229 if test -n "$STRIP"; then
10230 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
10231 else
10232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10233 for as_dir in $PATH
10234 do
10235 IFS=$as_save_IFS
10236 test -z "$as_dir" && as_dir=.
10237 for ac_exec_ext in '' $ac_executable_extensions; do
10238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10239 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
10240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10241 break 2
10242 fi
10243 done
10244 done
10245 IFS=$as_save_IFS
10246
10247 fi
10248 fi
10249 STRIP=$ac_cv_prog_STRIP
10250 if test -n "$STRIP"; then
10251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
10252 $as_echo "$STRIP" >&6; }
10253 else
10254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10255 $as_echo "no" >&6; }
10256 fi
10257
10258
10259 fi
10260 if test -z "$ac_cv_prog_STRIP"; then
10261 ac_ct_STRIP=$STRIP
10262 # Extract the first word of "strip", so it can be a program name with args.
10263 set dummy strip; ac_word=$2
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265 $as_echo_n "checking for $ac_word... " >&6; }
10266 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
10267 $as_echo_n "(cached) " >&6
10268 else
10269 if test -n "$ac_ct_STRIP"; then
10270 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
10271 else
10272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10273 for as_dir in $PATH
10274 do
10275 IFS=$as_save_IFS
10276 test -z "$as_dir" && as_dir=.
10277 for ac_exec_ext in '' $ac_executable_extensions; do
10278 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10279 ac_cv_prog_ac_ct_STRIP="strip"
10280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10281 break 2
10282 fi
10283 done
10284 done
10285 IFS=$as_save_IFS
10286
10287 fi
10288 fi
10289 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
10290 if test -n "$ac_ct_STRIP"; then
10291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
10292 $as_echo "$ac_ct_STRIP" >&6; }
10293 else
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10295 $as_echo "no" >&6; }
10296 fi
10297
10298 if test "x$ac_ct_STRIP" = x; then
10299 STRIP=":"
10300 else
10301 case $cross_compiling:$ac_tool_warned in
10302 yes:)
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10304 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10305 ac_tool_warned=yes ;;
10306 esac
10307 STRIP=$ac_ct_STRIP
10308 fi
10309 else
10310 STRIP="$ac_cv_prog_STRIP"
10311 fi
10312
10313 test -z "$STRIP" && STRIP=:
10314
10315
10316
10317
10318
10319
10320 if test -n "$ac_tool_prefix"; then
10321 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
10322 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10324 $as_echo_n "checking for $ac_word... " >&6; }
10325 if ${ac_cv_prog_RANLIB+:} false; then :
10326 $as_echo_n "(cached) " >&6
10327 else
10328 if test -n "$RANLIB"; then
10329 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
10330 else
10331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332 for as_dir in $PATH
10333 do
10334 IFS=$as_save_IFS
10335 test -z "$as_dir" && as_dir=.
10336 for ac_exec_ext in '' $ac_executable_extensions; do
10337 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10338 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
10339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340 break 2
10341 fi
10342 done
10343 done
10344 IFS=$as_save_IFS
10345
10346 fi
10347 fi
10348 RANLIB=$ac_cv_prog_RANLIB
10349 if test -n "$RANLIB"; then
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
10351 $as_echo "$RANLIB" >&6; }
10352 else
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354 $as_echo "no" >&6; }
10355 fi
10356
10357
10358 fi
10359 if test -z "$ac_cv_prog_RANLIB"; then
10360 ac_ct_RANLIB=$RANLIB
10361 # Extract the first word of "ranlib", so it can be a program name with args.
10362 set dummy ranlib; ac_word=$2
10363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10364 $as_echo_n "checking for $ac_word... " >&6; }
10365 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
10366 $as_echo_n "(cached) " >&6
10367 else
10368 if test -n "$ac_ct_RANLIB"; then
10369 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
10370 else
10371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10372 for as_dir in $PATH
10373 do
10374 IFS=$as_save_IFS
10375 test -z "$as_dir" && as_dir=.
10376 for ac_exec_ext in '' $ac_executable_extensions; do
10377 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10378 ac_cv_prog_ac_ct_RANLIB="ranlib"
10379 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10380 break 2
10381 fi
10382 done
10383 done
10384 IFS=$as_save_IFS
10385
10386 fi
10387 fi
10388 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
10389 if test -n "$ac_ct_RANLIB"; then
10390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
10391 $as_echo "$ac_ct_RANLIB" >&6; }
10392 else
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394 $as_echo "no" >&6; }
10395 fi
10396
10397 if test "x$ac_ct_RANLIB" = x; then
10398 RANLIB=":"
10399 else
10400 case $cross_compiling:$ac_tool_warned in
10401 yes:)
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10403 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10404 ac_tool_warned=yes ;;
10405 esac
10406 RANLIB=$ac_ct_RANLIB
10407 fi
10408 else
10409 RANLIB="$ac_cv_prog_RANLIB"
10410 fi
10411
10412 test -z "$RANLIB" && RANLIB=:
10413
10414
10415
10416
10417
10418
10419 # Determine commands to create old-style static archives.
10420 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
10421 old_postinstall_cmds='chmod 644 $oldlib'
10422 old_postuninstall_cmds=
10423
10424 if test -n "$RANLIB"; then
10425 case $host_os in
10426 bitrig* | openbsd*)
10427 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
10428 ;;
10429 *)
10430 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
10431 ;;
10432 esac
10433 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
10434 fi
10435
10436 case $host_os in
10437 darwin*)
10438 lock_old_archive_extraction=yes ;;
10439 *)
10440 lock_old_archive_extraction=no ;;
10441 esac
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481 # If no C compiler was specified, use CC.
10482 LTCC=${LTCC-"$CC"}
10483
10484 # If no C compiler flags were specified, use CFLAGS.
10485 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10486
10487 # Allow CC to be a program name with arguments.
10488 compiler=$CC
10489
10490
10491 # Check for command to grab the raw symbol name followed by C symbol from nm.
10492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
10493 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
10494 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
10495 $as_echo_n "(cached) " >&6
10496 else
10497
10498 # These are sane defaults that work on at least a few old systems.
10499 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
10500
10501 # Character class describing NM global symbol codes.
10502 symcode='[BCDEGRST]'
10503
10504 # Regexp to match symbols that can be accessed directly from C.
10505 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
10506
10507 # Define system-specific variables.
10508 case $host_os in
10509 aix*)
10510 symcode='[BCDT]'
10511 ;;
10512 cygwin* | mingw* | pw32* | cegcc*)
10513 symcode='[ABCDGISTW]'
10514 ;;
10515 hpux*)
10516 if test ia64 = "$host_cpu"; then
10517 symcode='[ABCDEGRST]'
10518 fi
10519 ;;
10520 irix* | nonstopux*)
10521 symcode='[BCDEGRST]'
10522 ;;
10523 osf*)
10524 symcode='[BCDEGQRST]'
10525 ;;
10526 solaris*)
10527 symcode='[BDRT]'
10528 ;;
10529 sco3.2v5*)
10530 symcode='[DT]'
10531 ;;
10532 sysv4.2uw2*)
10533 symcode='[DT]'
10534 ;;
10535 sysv5* | sco5v6* | unixware* | OpenUNIX*)
10536 symcode='[ABDT]'
10537 ;;
10538 sysv4)
10539 symcode='[DFNSTU]'
10540 ;;
10541 esac
10542
10543 # If we're using GNU nm, then use its standard symbol codes.
10544 case `$NM -V 2>&1` in
10545 *GNU* | *'with BFD'*)
10546 symcode='[ABCDGIRSTW]' ;;
10547 esac
10548
10549 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10550 # Gets list of data symbols to import.
10551 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
10552 # Adjust the below global symbol transforms to fixup imported variables.
10553 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
10554 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
10555 lt_c_name_lib_hook="\
10556 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
10557 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
10558 else
10559 # Disable hooks by default.
10560 lt_cv_sys_global_symbol_to_import=
10561 lt_cdecl_hook=
10562 lt_c_name_hook=
10563 lt_c_name_lib_hook=
10564 fi
10565
10566 # Transform an extracted symbol line into a proper C declaration.
10567 # Some systems (esp. on ia64) link data and code symbols differently,
10568 # so use this general approach.
10569 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
10570 $lt_cdecl_hook\
10571 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
10572 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
10573
10574 # Transform an extracted symbol line into symbol name and symbol address
10575 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
10576 $lt_c_name_hook\
10577 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
10578 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
10579
10580 # Transform an extracted symbol line into symbol name with lib prefix and
10581 # symbol address.
10582 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
10583 $lt_c_name_lib_hook\
10584 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
10585 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
10586 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
10587
10588 # Handle CRLF in mingw tool chain
10589 opt_cr=
10590 case $build_os in
10591 mingw*)
10592 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10593 ;;
10594 esac
10595
10596 # Try without a prefix underscore, then with it.
10597 for ac_symprfx in "" "_"; do
10598
10599 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
10600 symxfrm="\\1 $ac_symprfx\\2 \\2"
10601
10602 # Write the raw and C identifiers.
10603 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10604 # Fake it for dumpbin and say T for any non-static function,
10605 # D for any global variable and I for any imported variable.
10606 # Also find C++ and __fastcall symbols from MSVC++,
10607 # which start with @ or ?.
10608 lt_cv_sys_global_symbol_pipe="$AWK '"\
10609 " {last_section=section; section=\$ 3};"\
10610 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
10611 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
10612 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
10613 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
10614 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
10615 " \$ 0!~/External *\|/{next};"\
10616 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
10617 " {if(hide[section]) next};"\
10618 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
10619 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
10620 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
10621 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
10622 " ' prfx=^$ac_symprfx"
10623 else
10624 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
10625 fi
10626 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
10627
10628 # Check to see that the pipe works correctly.
10629 pipe_works=no
10630
10631 rm -f conftest*
10632 cat > conftest.$ac_ext <<_LT_EOF
10633 #ifdef __cplusplus
10634 extern "C" {
10635 #endif
10636 char nm_test_var;
10637 void nm_test_func(void);
10638 void nm_test_func(void){}
10639 #ifdef __cplusplus
10640 }
10641 #endif
10642 int main(){nm_test_var='a';nm_test_func();return(0);}
10643 _LT_EOF
10644
10645 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10646 (eval $ac_compile) 2>&5
10647 ac_status=$?
10648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10649 test $ac_status = 0; }; then
10650 # Now try to grab the symbols.
10651 nlist=conftest.nm
10652 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
10653 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
10654 ac_status=$?
10655 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10656 test $ac_status = 0; } && test -s "$nlist"; then
10657 # Try sorting and uniquifying the output.
10658 if sort "$nlist" | uniq > "$nlist"T; then
10659 mv -f "$nlist"T "$nlist"
10660 else
10661 rm -f "$nlist"T
10662 fi
10663
10664 # Make sure that we snagged all the symbols we need.
10665 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
10666 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
10667 cat <<_LT_EOF > conftest.$ac_ext
10668 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
10669 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
10670 /* DATA imports from DLLs on WIN32 can't be const, because runtime
10671 relocations are performed -- see ld's documentation on pseudo-relocs. */
10672 # define LT_DLSYM_CONST
10673 #elif defined __osf__
10674 /* This system does not cope well with relocations in const data. */
10675 # define LT_DLSYM_CONST
10676 #else
10677 # define LT_DLSYM_CONST const
10678 #endif
10679
10680 #ifdef __cplusplus
10681 extern "C" {
10682 #endif
10683
10684 _LT_EOF
10685 # Now generate the symbol file.
10686 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
10687
10688 cat <<_LT_EOF >> conftest.$ac_ext
10689
10690 /* The mapping between symbol names and symbols. */
10691 LT_DLSYM_CONST struct {
10692 const char *name;
10693 void *address;
10694 }
10695 lt__PROGRAM__LTX_preloaded_symbols[] =
10696 {
10697 { "@PROGRAM@", (void *) 0 },
10698 _LT_EOF
10699 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
10700 cat <<\_LT_EOF >> conftest.$ac_ext
10701 {0, (void *) 0}
10702 };
10703
10704 /* This works around a problem in FreeBSD linker */
10705 #ifdef FREEBSD_WORKAROUND
10706 static const void *lt_preloaded_setup() {
10707 return lt__PROGRAM__LTX_preloaded_symbols;
10708 }
10709 #endif
10710
10711 #ifdef __cplusplus
10712 }
10713 #endif
10714 _LT_EOF
10715 # Now try linking the two files.
10716 mv conftest.$ac_objext conftstm.$ac_objext
10717 lt_globsym_save_LIBS=$LIBS
10718 lt_globsym_save_CFLAGS=$CFLAGS
10719 LIBS=conftstm.$ac_objext
10720 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
10721 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10722 (eval $ac_link) 2>&5
10723 ac_status=$?
10724 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10725 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10726 pipe_works=yes
10727 fi
10728 LIBS=$lt_globsym_save_LIBS
10729 CFLAGS=$lt_globsym_save_CFLAGS
10730 else
10731 echo "cannot find nm_test_func in $nlist" >&5
10732 fi
10733 else
10734 echo "cannot find nm_test_var in $nlist" >&5
10735 fi
10736 else
10737 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
10738 fi
10739 else
10740 echo "$progname: failed program was:" >&5
10741 cat conftest.$ac_ext >&5
10742 fi
10743 rm -rf conftest* conftst*
10744
10745 # Do not use the global_symbol_pipe unless it works.
10746 if test yes = "$pipe_works"; then
10747 break
10748 else
10749 lt_cv_sys_global_symbol_pipe=
10750 fi
10751 done
10752
10753 fi
10754
10755 if test -z "$lt_cv_sys_global_symbol_pipe"; then
10756 lt_cv_sys_global_symbol_to_cdecl=
10757 fi
10758 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
10760 $as_echo "failed" >&6; }
10761 else
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10763 $as_echo "ok" >&6; }
10764 fi
10765
10766 # Response file support.
10767 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10768 nm_file_list_spec='@'
10769 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
10770 nm_file_list_spec='@'
10771 fi
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
10810 $as_echo_n "checking for sysroot... " >&6; }
10811
10812 # Check whether --with-sysroot was given.
10813 if test "${with_sysroot+set}" = set; then :
10814 withval=$with_sysroot;
10815 else
10816 with_sysroot=no
10817 fi
10818
10819
10820 lt_sysroot=
10821 case $with_sysroot in #(
10822 yes)
10823 if test yes = "$GCC"; then
10824 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
10825 fi
10826 ;; #(
10827 /*)
10828 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
10829 ;; #(
10830 no|'')
10831 ;; #(
10832 *)
10833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
10834 $as_echo "$with_sysroot" >&6; }
10835 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
10836 ;;
10837 esac
10838
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
10840 $as_echo "${lt_sysroot:-no}" >&6; }
10841
10842
10843
10844
10845
10846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
10847 $as_echo_n "checking for a working dd... " >&6; }
10848 if ${ac_cv_path_lt_DD+:} false; then :
10849 $as_echo_n "(cached) " >&6
10850 else
10851 printf 0123456789abcdef0123456789abcdef >conftest.i
10852 cat conftest.i conftest.i >conftest2.i
10853 : ${lt_DD:=$DD}
10854 if test -z "$lt_DD"; then
10855 ac_path_lt_DD_found=false
10856 # Loop through the user's path and test for each of PROGNAME-LIST
10857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10858 for as_dir in $PATH
10859 do
10860 IFS=$as_save_IFS
10861 test -z "$as_dir" && as_dir=.
10862 for ac_prog in dd; do
10863 for ac_exec_ext in '' $ac_executable_extensions; do
10864 ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
10865 as_fn_executable_p "$ac_path_lt_DD" || continue
10866 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10867 cmp -s conftest.i conftest.out \
10868 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
10869 fi
10870 $ac_path_lt_DD_found && break 3
10871 done
10872 done
10873 done
10874 IFS=$as_save_IFS
10875 if test -z "$ac_cv_path_lt_DD"; then
10876 :
10877 fi
10878 else
10879 ac_cv_path_lt_DD=$lt_DD
10880 fi
10881
10882 rm -f conftest.i conftest2.i conftest.out
10883 fi
10884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
10885 $as_echo "$ac_cv_path_lt_DD" >&6; }
10886
10887
10888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
10889 $as_echo_n "checking how to truncate binary pipes... " >&6; }
10890 if ${lt_cv_truncate_bin+:} false; then :
10891 $as_echo_n "(cached) " >&6
10892 else
10893 printf 0123456789abcdef0123456789abcdef >conftest.i
10894 cat conftest.i conftest.i >conftest2.i
10895 lt_cv_truncate_bin=
10896 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10897 cmp -s conftest.i conftest.out \
10898 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
10899 fi
10900 rm -f conftest.i conftest2.i conftest.out
10901 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
10902 fi
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
10904 $as_echo "$lt_cv_truncate_bin" >&6; }
10905
10906
10907
10908
10909
10910
10911
10912 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
10913 func_cc_basename ()
10914 {
10915 for cc_temp in $*""; do
10916 case $cc_temp in
10917 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10918 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10919 \-*) ;;
10920 *) break;;
10921 esac
10922 done
10923 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10924 }
10925
10926 # Check whether --enable-libtool-lock was given.
10927 if test "${enable_libtool_lock+set}" = set; then :
10928 enableval=$enable_libtool_lock;
10929 fi
10930
10931 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
10932
10933 # Some flags need to be propagated to the compiler or linker for good
10934 # libtool support.
10935 case $host in
10936 ia64-*-hpux*)
10937 # Find out what ABI is being produced by ac_compile, and set mode
10938 # options accordingly.
10939 echo 'int i;' > conftest.$ac_ext
10940 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10941 (eval $ac_compile) 2>&5
10942 ac_status=$?
10943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10944 test $ac_status = 0; }; then
10945 case `/usr/bin/file conftest.$ac_objext` in
10946 *ELF-32*)
10947 HPUX_IA64_MODE=32
10948 ;;
10949 *ELF-64*)
10950 HPUX_IA64_MODE=64
10951 ;;
10952 esac
10953 fi
10954 rm -rf conftest*
10955 ;;
10956 *-*-irix6*)
10957 # Find out what ABI is being produced by ac_compile, and set linker
10958 # options accordingly.
10959 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10960 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10961 (eval $ac_compile) 2>&5
10962 ac_status=$?
10963 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10964 test $ac_status = 0; }; then
10965 if test yes = "$lt_cv_prog_gnu_ld"; then
10966 case `/usr/bin/file conftest.$ac_objext` in
10967 *32-bit*)
10968 LD="${LD-ld} -melf32bsmip"
10969 ;;
10970 *N32*)
10971 LD="${LD-ld} -melf32bmipn32"
10972 ;;
10973 *64-bit*)
10974 LD="${LD-ld} -melf64bmip"
10975 ;;
10976 esac
10977 else
10978 case `/usr/bin/file conftest.$ac_objext` in
10979 *32-bit*)
10980 LD="${LD-ld} -32"
10981 ;;
10982 *N32*)
10983 LD="${LD-ld} -n32"
10984 ;;
10985 *64-bit*)
10986 LD="${LD-ld} -64"
10987 ;;
10988 esac
10989 fi
10990 fi
10991 rm -rf conftest*
10992 ;;
10993
10994 mips64*-*linux*)
10995 # Find out what ABI is being produced by ac_compile, and set linker
10996 # options accordingly.
10997 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10998 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10999 (eval $ac_compile) 2>&5
11000 ac_status=$?
11001 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11002 test $ac_status = 0; }; then
11003 emul=elf
11004 case `/usr/bin/file conftest.$ac_objext` in
11005 *32-bit*)
11006 emul="${emul}32"
11007 ;;
11008 *64-bit*)
11009 emul="${emul}64"
11010 ;;
11011 esac
11012 case `/usr/bin/file conftest.$ac_objext` in
11013 *MSB*)
11014 emul="${emul}btsmip"
11015 ;;
11016 *LSB*)
11017 emul="${emul}ltsmip"
11018 ;;
11019 esac
11020 case `/usr/bin/file conftest.$ac_objext` in
11021 *N32*)
11022 emul="${emul}n32"
11023 ;;
11024 esac
11025 LD="${LD-ld} -m $emul"
11026 fi
11027 rm -rf conftest*
11028 ;;
11029
11030 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
11031 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
11032 # Find out what ABI is being produced by ac_compile, and set linker
11033 # options accordingly. Note that the listed cases only cover the
11034 # situations where additional linker options are needed (such as when
11035 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
11036 # vice versa); the common cases where no linker options are needed do
11037 # not appear in the list.
11038 echo 'int i;' > conftest.$ac_ext
11039 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11040 (eval $ac_compile) 2>&5
11041 ac_status=$?
11042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11043 test $ac_status = 0; }; then
11044 case `/usr/bin/file conftest.o` in
11045 *32-bit*)
11046 case $host in
11047 x86_64-*kfreebsd*-gnu)
11048 LD="${LD-ld} -m elf_i386_fbsd"
11049 ;;
11050 x86_64-*linux*)
11051 case `/usr/bin/file conftest.o` in
11052 *x86-64*)
11053 LD="${LD-ld} -m elf32_x86_64"
11054 ;;
11055 *)
11056 LD="${LD-ld} -m elf_i386"
11057 ;;
11058 esac
11059 ;;
11060 powerpc64le-*linux*)
11061 LD="${LD-ld} -m elf32lppclinux"
11062 ;;
11063 powerpc64-*linux*)
11064 LD="${LD-ld} -m elf32ppclinux"
11065 ;;
11066 s390x-*linux*)
11067 LD="${LD-ld} -m elf_s390"
11068 ;;
11069 sparc64-*linux*)
11070 LD="${LD-ld} -m elf32_sparc"
11071 ;;
11072 esac
11073 ;;
11074 *64-bit*)
11075 case $host in
11076 x86_64-*kfreebsd*-gnu)
11077 LD="${LD-ld} -m elf_x86_64_fbsd"
11078 ;;
11079 x86_64-*linux*)
11080 LD="${LD-ld} -m elf_x86_64"
11081 ;;
11082 powerpcle-*linux*)
11083 LD="${LD-ld} -m elf64lppc"
11084 ;;
11085 powerpc-*linux*)
11086 LD="${LD-ld} -m elf64ppc"
11087 ;;
11088 s390*-*linux*|s390*-*tpf*)
11089 LD="${LD-ld} -m elf64_s390"
11090 ;;
11091 sparc*-*linux*)
11092 LD="${LD-ld} -m elf64_sparc"
11093 ;;
11094 esac
11095 ;;
11096 esac
11097 fi
11098 rm -rf conftest*
11099 ;;
11100
11101 *-*-sco3.2v5*)
11102 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
11103 SAVE_CFLAGS=$CFLAGS
11104 CFLAGS="$CFLAGS -belf"
11105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
11106 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
11107 if ${lt_cv_cc_needs_belf+:} false; then :
11108 $as_echo_n "(cached) " >&6
11109 else
11110 ac_ext=c
11111 ac_cpp='$CPP $CPPFLAGS'
11112 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11113 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11114 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11115
11116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11117 /* end confdefs.h. */
11118
11119 int
11120 main ()
11121 {
11122
11123 ;
11124 return 0;
11125 }
11126 _ACEOF
11127 if ac_fn_c_try_link "$LINENO"; then :
11128 lt_cv_cc_needs_belf=yes
11129 else
11130 lt_cv_cc_needs_belf=no
11131 fi
11132 rm -f core conftest.err conftest.$ac_objext \
11133 conftest$ac_exeext conftest.$ac_ext
11134 ac_ext=c
11135 ac_cpp='$CPP $CPPFLAGS'
11136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11139
11140 fi
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
11142 $as_echo "$lt_cv_cc_needs_belf" >&6; }
11143 if test yes != "$lt_cv_cc_needs_belf"; then
11144 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
11145 CFLAGS=$SAVE_CFLAGS
11146 fi
11147 ;;
11148 *-*solaris*)
11149 # Find out what ABI is being produced by ac_compile, and set linker
11150 # options accordingly.
11151 echo 'int i;' > conftest.$ac_ext
11152 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11153 (eval $ac_compile) 2>&5
11154 ac_status=$?
11155 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11156 test $ac_status = 0; }; then
11157 case `/usr/bin/file conftest.o` in
11158 *64-bit*)
11159 case $lt_cv_prog_gnu_ld in
11160 yes*)
11161 case $host in
11162 i?86-*-solaris*|x86_64-*-solaris*)
11163 LD="${LD-ld} -m elf_x86_64"
11164 ;;
11165 sparc*-*-solaris*)
11166 LD="${LD-ld} -m elf64_sparc"
11167 ;;
11168 esac
11169 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
11170 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
11171 LD=${LD-ld}_sol2
11172 fi
11173 ;;
11174 *)
11175 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
11176 LD="${LD-ld} -64"
11177 fi
11178 ;;
11179 esac
11180 ;;
11181 esac
11182 fi
11183 rm -rf conftest*
11184 ;;
11185 esac
11186
11187 need_locks=$enable_libtool_lock
11188
11189 if test -n "$ac_tool_prefix"; then
11190 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
11191 set dummy ${ac_tool_prefix}mt; ac_word=$2
11192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11193 $as_echo_n "checking for $ac_word... " >&6; }
11194 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
11195 $as_echo_n "(cached) " >&6
11196 else
11197 if test -n "$MANIFEST_TOOL"; then
11198 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
11199 else
11200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11201 for as_dir in $PATH
11202 do
11203 IFS=$as_save_IFS
11204 test -z "$as_dir" && as_dir=.
11205 for ac_exec_ext in '' $ac_executable_extensions; do
11206 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11207 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
11208 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11209 break 2
11210 fi
11211 done
11212 done
11213 IFS=$as_save_IFS
11214
11215 fi
11216 fi
11217 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
11218 if test -n "$MANIFEST_TOOL"; then
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
11220 $as_echo "$MANIFEST_TOOL" >&6; }
11221 else
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223 $as_echo "no" >&6; }
11224 fi
11225
11226
11227 fi
11228 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
11229 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
11230 # Extract the first word of "mt", so it can be a program name with args.
11231 set dummy mt; ac_word=$2
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11233 $as_echo_n "checking for $ac_word... " >&6; }
11234 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
11235 $as_echo_n "(cached) " >&6
11236 else
11237 if test -n "$ac_ct_MANIFEST_TOOL"; then
11238 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
11239 else
11240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11241 for as_dir in $PATH
11242 do
11243 IFS=$as_save_IFS
11244 test -z "$as_dir" && as_dir=.
11245 for ac_exec_ext in '' $ac_executable_extensions; do
11246 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11247 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
11248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11249 break 2
11250 fi
11251 done
11252 done
11253 IFS=$as_save_IFS
11254
11255 fi
11256 fi
11257 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
11258 if test -n "$ac_ct_MANIFEST_TOOL"; then
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
11260 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
11261 else
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263 $as_echo "no" >&6; }
11264 fi
11265
11266 if test "x$ac_ct_MANIFEST_TOOL" = x; then
11267 MANIFEST_TOOL=":"
11268 else
11269 case $cross_compiling:$ac_tool_warned in
11270 yes:)
11271 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11272 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11273 ac_tool_warned=yes ;;
11274 esac
11275 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
11276 fi
11277 else
11278 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
11279 fi
11280
11281 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
11282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
11283 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
11284 if ${lt_cv_path_mainfest_tool+:} false; then :
11285 $as_echo_n "(cached) " >&6
11286 else
11287 lt_cv_path_mainfest_tool=no
11288 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
11289 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
11290 cat conftest.err >&5
11291 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
11292 lt_cv_path_mainfest_tool=yes
11293 fi
11294 rm -f conftest*
11295 fi
11296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
11297 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
11298 if test yes != "$lt_cv_path_mainfest_tool"; then
11299 MANIFEST_TOOL=:
11300 fi
11301
11302
11303
11304
11305
11306
11307 case $host_os in
11308 rhapsody* | darwin*)
11309 if test -n "$ac_tool_prefix"; then
11310 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
11311 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11313 $as_echo_n "checking for $ac_word... " >&6; }
11314 if ${ac_cv_prog_DSYMUTIL+:} false; then :
11315 $as_echo_n "(cached) " >&6
11316 else
11317 if test -n "$DSYMUTIL"; then
11318 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
11319 else
11320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11321 for as_dir in $PATH
11322 do
11323 IFS=$as_save_IFS
11324 test -z "$as_dir" && as_dir=.
11325 for ac_exec_ext in '' $ac_executable_extensions; do
11326 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11327 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
11328 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11329 break 2
11330 fi
11331 done
11332 done
11333 IFS=$as_save_IFS
11334
11335 fi
11336 fi
11337 DSYMUTIL=$ac_cv_prog_DSYMUTIL
11338 if test -n "$DSYMUTIL"; then
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
11340 $as_echo "$DSYMUTIL" >&6; }
11341 else
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11343 $as_echo "no" >&6; }
11344 fi
11345
11346
11347 fi
11348 if test -z "$ac_cv_prog_DSYMUTIL"; then
11349 ac_ct_DSYMUTIL=$DSYMUTIL
11350 # Extract the first word of "dsymutil", so it can be a program name with args.
11351 set dummy dsymutil; ac_word=$2
11352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11353 $as_echo_n "checking for $ac_word... " >&6; }
11354 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
11355 $as_echo_n "(cached) " >&6
11356 else
11357 if test -n "$ac_ct_DSYMUTIL"; then
11358 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
11359 else
11360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11361 for as_dir in $PATH
11362 do
11363 IFS=$as_save_IFS
11364 test -z "$as_dir" && as_dir=.
11365 for ac_exec_ext in '' $ac_executable_extensions; do
11366 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11367 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
11368 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11369 break 2
11370 fi
11371 done
11372 done
11373 IFS=$as_save_IFS
11374
11375 fi
11376 fi
11377 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
11378 if test -n "$ac_ct_DSYMUTIL"; then
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
11380 $as_echo "$ac_ct_DSYMUTIL" >&6; }
11381 else
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11383 $as_echo "no" >&6; }
11384 fi
11385
11386 if test "x$ac_ct_DSYMUTIL" = x; then
11387 DSYMUTIL=":"
11388 else
11389 case $cross_compiling:$ac_tool_warned in
11390 yes:)
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11392 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11393 ac_tool_warned=yes ;;
11394 esac
11395 DSYMUTIL=$ac_ct_DSYMUTIL
11396 fi
11397 else
11398 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
11399 fi
11400
11401 if test -n "$ac_tool_prefix"; then
11402 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
11403 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11405 $as_echo_n "checking for $ac_word... " >&6; }
11406 if ${ac_cv_prog_NMEDIT+:} false; then :
11407 $as_echo_n "(cached) " >&6
11408 else
11409 if test -n "$NMEDIT"; then
11410 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
11411 else
11412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11413 for as_dir in $PATH
11414 do
11415 IFS=$as_save_IFS
11416 test -z "$as_dir" && as_dir=.
11417 for ac_exec_ext in '' $ac_executable_extensions; do
11418 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11419 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
11420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11421 break 2
11422 fi
11423 done
11424 done
11425 IFS=$as_save_IFS
11426
11427 fi
11428 fi
11429 NMEDIT=$ac_cv_prog_NMEDIT
11430 if test -n "$NMEDIT"; then
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
11432 $as_echo "$NMEDIT" >&6; }
11433 else
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435 $as_echo "no" >&6; }
11436 fi
11437
11438
11439 fi
11440 if test -z "$ac_cv_prog_NMEDIT"; then
11441 ac_ct_NMEDIT=$NMEDIT
11442 # Extract the first word of "nmedit", so it can be a program name with args.
11443 set dummy nmedit; ac_word=$2
11444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11445 $as_echo_n "checking for $ac_word... " >&6; }
11446 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
11447 $as_echo_n "(cached) " >&6
11448 else
11449 if test -n "$ac_ct_NMEDIT"; then
11450 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
11451 else
11452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11453 for as_dir in $PATH
11454 do
11455 IFS=$as_save_IFS
11456 test -z "$as_dir" && as_dir=.
11457 for ac_exec_ext in '' $ac_executable_extensions; do
11458 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11459 ac_cv_prog_ac_ct_NMEDIT="nmedit"
11460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11461 break 2
11462 fi
11463 done
11464 done
11465 IFS=$as_save_IFS
11466
11467 fi
11468 fi
11469 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
11470 if test -n "$ac_ct_NMEDIT"; then
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
11472 $as_echo "$ac_ct_NMEDIT" >&6; }
11473 else
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11475 $as_echo "no" >&6; }
11476 fi
11477
11478 if test "x$ac_ct_NMEDIT" = x; then
11479 NMEDIT=":"
11480 else
11481 case $cross_compiling:$ac_tool_warned in
11482 yes:)
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11484 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11485 ac_tool_warned=yes ;;
11486 esac
11487 NMEDIT=$ac_ct_NMEDIT
11488 fi
11489 else
11490 NMEDIT="$ac_cv_prog_NMEDIT"
11491 fi
11492
11493 if test -n "$ac_tool_prefix"; then
11494 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
11495 set dummy ${ac_tool_prefix}lipo; ac_word=$2
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11497 $as_echo_n "checking for $ac_word... " >&6; }
11498 if ${ac_cv_prog_LIPO+:} false; then :
11499 $as_echo_n "(cached) " >&6
11500 else
11501 if test -n "$LIPO"; then
11502 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
11503 else
11504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11505 for as_dir in $PATH
11506 do
11507 IFS=$as_save_IFS
11508 test -z "$as_dir" && as_dir=.
11509 for ac_exec_ext in '' $ac_executable_extensions; do
11510 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11511 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
11512 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11513 break 2
11514 fi
11515 done
11516 done
11517 IFS=$as_save_IFS
11518
11519 fi
11520 fi
11521 LIPO=$ac_cv_prog_LIPO
11522 if test -n "$LIPO"; then
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
11524 $as_echo "$LIPO" >&6; }
11525 else
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11527 $as_echo "no" >&6; }
11528 fi
11529
11530
11531 fi
11532 if test -z "$ac_cv_prog_LIPO"; then
11533 ac_ct_LIPO=$LIPO
11534 # Extract the first word of "lipo", so it can be a program name with args.
11535 set dummy lipo; ac_word=$2
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11537 $as_echo_n "checking for $ac_word... " >&6; }
11538 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
11539 $as_echo_n "(cached) " >&6
11540 else
11541 if test -n "$ac_ct_LIPO"; then
11542 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
11543 else
11544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11545 for as_dir in $PATH
11546 do
11547 IFS=$as_save_IFS
11548 test -z "$as_dir" && as_dir=.
11549 for ac_exec_ext in '' $ac_executable_extensions; do
11550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11551 ac_cv_prog_ac_ct_LIPO="lipo"
11552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11553 break 2
11554 fi
11555 done
11556 done
11557 IFS=$as_save_IFS
11558
11559 fi
11560 fi
11561 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
11562 if test -n "$ac_ct_LIPO"; then
11563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
11564 $as_echo "$ac_ct_LIPO" >&6; }
11565 else
11566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11567 $as_echo "no" >&6; }
11568 fi
11569
11570 if test "x$ac_ct_LIPO" = x; then
11571 LIPO=":"
11572 else
11573 case $cross_compiling:$ac_tool_warned in
11574 yes:)
11575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11576 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11577 ac_tool_warned=yes ;;
11578 esac
11579 LIPO=$ac_ct_LIPO
11580 fi
11581 else
11582 LIPO="$ac_cv_prog_LIPO"
11583 fi
11584
11585 if test -n "$ac_tool_prefix"; then
11586 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
11587 set dummy ${ac_tool_prefix}otool; ac_word=$2
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11589 $as_echo_n "checking for $ac_word... " >&6; }
11590 if ${ac_cv_prog_OTOOL+:} false; then :
11591 $as_echo_n "(cached) " >&6
11592 else
11593 if test -n "$OTOOL"; then
11594 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
11595 else
11596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11597 for as_dir in $PATH
11598 do
11599 IFS=$as_save_IFS
11600 test -z "$as_dir" && as_dir=.
11601 for ac_exec_ext in '' $ac_executable_extensions; do
11602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11603 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
11604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11605 break 2
11606 fi
11607 done
11608 done
11609 IFS=$as_save_IFS
11610
11611 fi
11612 fi
11613 OTOOL=$ac_cv_prog_OTOOL
11614 if test -n "$OTOOL"; then
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
11616 $as_echo "$OTOOL" >&6; }
11617 else
11618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11619 $as_echo "no" >&6; }
11620 fi
11621
11622
11623 fi
11624 if test -z "$ac_cv_prog_OTOOL"; then
11625 ac_ct_OTOOL=$OTOOL
11626 # Extract the first word of "otool", so it can be a program name with args.
11627 set dummy otool; ac_word=$2
11628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11629 $as_echo_n "checking for $ac_word... " >&6; }
11630 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
11631 $as_echo_n "(cached) " >&6
11632 else
11633 if test -n "$ac_ct_OTOOL"; then
11634 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
11635 else
11636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11637 for as_dir in $PATH
11638 do
11639 IFS=$as_save_IFS
11640 test -z "$as_dir" && as_dir=.
11641 for ac_exec_ext in '' $ac_executable_extensions; do
11642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11643 ac_cv_prog_ac_ct_OTOOL="otool"
11644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11645 break 2
11646 fi
11647 done
11648 done
11649 IFS=$as_save_IFS
11650
11651 fi
11652 fi
11653 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
11654 if test -n "$ac_ct_OTOOL"; then
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
11656 $as_echo "$ac_ct_OTOOL" >&6; }
11657 else
11658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659 $as_echo "no" >&6; }
11660 fi
11661
11662 if test "x$ac_ct_OTOOL" = x; then
11663 OTOOL=":"
11664 else
11665 case $cross_compiling:$ac_tool_warned in
11666 yes:)
11667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11668 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11669 ac_tool_warned=yes ;;
11670 esac
11671 OTOOL=$ac_ct_OTOOL
11672 fi
11673 else
11674 OTOOL="$ac_cv_prog_OTOOL"
11675 fi
11676
11677 if test -n "$ac_tool_prefix"; then
11678 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
11679 set dummy ${ac_tool_prefix}otool64; ac_word=$2
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11681 $as_echo_n "checking for $ac_word... " >&6; }
11682 if ${ac_cv_prog_OTOOL64+:} false; then :
11683 $as_echo_n "(cached) " >&6
11684 else
11685 if test -n "$OTOOL64"; then
11686 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
11687 else
11688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11689 for as_dir in $PATH
11690 do
11691 IFS=$as_save_IFS
11692 test -z "$as_dir" && as_dir=.
11693 for ac_exec_ext in '' $ac_executable_extensions; do
11694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11695 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
11696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11697 break 2
11698 fi
11699 done
11700 done
11701 IFS=$as_save_IFS
11702
11703 fi
11704 fi
11705 OTOOL64=$ac_cv_prog_OTOOL64
11706 if test -n "$OTOOL64"; then
11707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
11708 $as_echo "$OTOOL64" >&6; }
11709 else
11710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711 $as_echo "no" >&6; }
11712 fi
11713
11714
11715 fi
11716 if test -z "$ac_cv_prog_OTOOL64"; then
11717 ac_ct_OTOOL64=$OTOOL64
11718 # Extract the first word of "otool64", so it can be a program name with args.
11719 set dummy otool64; ac_word=$2
11720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11721 $as_echo_n "checking for $ac_word... " >&6; }
11722 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
11723 $as_echo_n "(cached) " >&6
11724 else
11725 if test -n "$ac_ct_OTOOL64"; then
11726 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
11727 else
11728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11729 for as_dir in $PATH
11730 do
11731 IFS=$as_save_IFS
11732 test -z "$as_dir" && as_dir=.
11733 for ac_exec_ext in '' $ac_executable_extensions; do
11734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11735 ac_cv_prog_ac_ct_OTOOL64="otool64"
11736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11737 break 2
11738 fi
11739 done
11740 done
11741 IFS=$as_save_IFS
11742
11743 fi
11744 fi
11745 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
11746 if test -n "$ac_ct_OTOOL64"; then
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
11748 $as_echo "$ac_ct_OTOOL64" >&6; }
11749 else
11750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751 $as_echo "no" >&6; }
11752 fi
11753
11754 if test "x$ac_ct_OTOOL64" = x; then
11755 OTOOL64=":"
11756 else
11757 case $cross_compiling:$ac_tool_warned in
11758 yes:)
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11760 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11761 ac_tool_warned=yes ;;
11762 esac
11763 OTOOL64=$ac_ct_OTOOL64
11764 fi
11765 else
11766 OTOOL64="$ac_cv_prog_OTOOL64"
11767 fi
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
11796 $as_echo_n "checking for -single_module linker flag... " >&6; }
11797 if ${lt_cv_apple_cc_single_mod+:} false; then :
11798 $as_echo_n "(cached) " >&6
11799 else
11800 lt_cv_apple_cc_single_mod=no
11801 if test -z "$LT_MULTI_MODULE"; then
11802 # By default we will add the -single_module flag. You can override
11803 # by either setting the environment variable LT_MULTI_MODULE
11804 # non-empty at configure time, or by adding -multi_module to the
11805 # link flags.
11806 rm -rf libconftest.dylib*
11807 echo "int foo(void){return 1;}" > conftest.c
11808 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11809 -dynamiclib -Wl,-single_module conftest.c" >&5
11810 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11811 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
11812 _lt_result=$?
11813 # If there is a non-empty error log, and "single_module"
11814 # appears in it, assume the flag caused a linker warning
11815 if test -s conftest.err && $GREP single_module conftest.err; then
11816 cat conftest.err >&5
11817 # Otherwise, if the output was created with a 0 exit code from
11818 # the compiler, it worked.
11819 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
11820 lt_cv_apple_cc_single_mod=yes
11821 else
11822 cat conftest.err >&5
11823 fi
11824 rm -rf libconftest.dylib*
11825 rm -f conftest.*
11826 fi
11827 fi
11828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
11829 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
11830
11831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
11832 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
11833 if ${lt_cv_ld_exported_symbols_list+:} false; then :
11834 $as_echo_n "(cached) " >&6
11835 else
11836 lt_cv_ld_exported_symbols_list=no
11837 save_LDFLAGS=$LDFLAGS
11838 echo "_main" > conftest.sym
11839 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
11840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11841 /* end confdefs.h. */
11842
11843 int
11844 main ()
11845 {
11846
11847 ;
11848 return 0;
11849 }
11850 _ACEOF
11851 if ac_fn_c_try_link "$LINENO"; then :
11852 lt_cv_ld_exported_symbols_list=yes
11853 else
11854 lt_cv_ld_exported_symbols_list=no
11855 fi
11856 rm -f core conftest.err conftest.$ac_objext \
11857 conftest$ac_exeext conftest.$ac_ext
11858 LDFLAGS=$save_LDFLAGS
11859
11860 fi
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
11862 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
11863
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
11865 $as_echo_n "checking for -force_load linker flag... " >&6; }
11866 if ${lt_cv_ld_force_load+:} false; then :
11867 $as_echo_n "(cached) " >&6
11868 else
11869 lt_cv_ld_force_load=no
11870 cat > conftest.c << _LT_EOF
11871 int forced_loaded() { return 2;}
11872 _LT_EOF
11873 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
11874 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
11875 echo "$AR cru libconftest.a conftest.o" >&5
11876 $AR cru libconftest.a conftest.o 2>&5
11877 echo "$RANLIB libconftest.a" >&5
11878 $RANLIB libconftest.a 2>&5
11879 cat > conftest.c << _LT_EOF
11880 int main() { return 0;}
11881 _LT_EOF
11882 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
11883 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
11884 _lt_result=$?
11885 if test -s conftest.err && $GREP force_load conftest.err; then
11886 cat conftest.err >&5
11887 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
11888 lt_cv_ld_force_load=yes
11889 else
11890 cat conftest.err >&5
11891 fi
11892 rm -f conftest.err libconftest.a conftest conftest.c
11893 rm -rf conftest.dSYM
11894
11895 fi
11896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
11897 $as_echo "$lt_cv_ld_force_load" >&6; }
11898 case $host_os in
11899 rhapsody* | darwin1.[012])
11900 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
11901 darwin1.*)
11902 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11903 darwin*) # darwin 5.x on
11904 # if running on 10.5 or later, the deployment target defaults
11905 # to the OS version, if on x86, and 10.4, the deployment
11906 # target defaults to 10.4. Don't you love it?
11907 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
11908 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
11909 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11910 10.[012][,.]*)
11911 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11912 10.*)
11913 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11914 esac
11915 ;;
11916 esac
11917 if test yes = "$lt_cv_apple_cc_single_mod"; then
11918 _lt_dar_single_mod='$single_module'
11919 fi
11920 if test yes = "$lt_cv_ld_exported_symbols_list"; then
11921 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
11922 else
11923 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
11924 fi
11925 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
11926 _lt_dsymutil='~$DSYMUTIL $lib || :'
11927 else
11928 _lt_dsymutil=
11929 fi
11930 ;;
11931 esac
11932
11933 # func_munge_path_list VARIABLE PATH
11934 # -----------------------------------
11935 # VARIABLE is name of variable containing _space_ separated list of
11936 # directories to be munged by the contents of PATH, which is string
11937 # having a format:
11938 # "DIR[:DIR]:"
11939 # string "DIR[ DIR]" will be prepended to VARIABLE
11940 # ":DIR[:DIR]"
11941 # string "DIR[ DIR]" will be appended to VARIABLE
11942 # "DIRP[:DIRP]::[DIRA:]DIRA"
11943 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
11944 # "DIRA[ DIRA]" will be appended to VARIABLE
11945 # "DIR[:DIR]"
11946 # VARIABLE will be replaced by "DIR[ DIR]"
11947 func_munge_path_list ()
11948 {
11949 case x$2 in
11950 x)
11951 ;;
11952 *:)
11953 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
11954 ;;
11955 x:*)
11956 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
11957 ;;
11958 *::*)
11959 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
11960 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
11961 ;;
11962 *)
11963 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
11964 ;;
11965 esac
11966 }
11967
11968 for ac_header in dlfcn.h
11969 do :
11970 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
11971 "
11972 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
11973 cat >>confdefs.h <<_ACEOF
11974 #define HAVE_DLFCN_H 1
11975 _ACEOF
11976
11977 fi
11978
11979 done
11980
11981
11982
11983 func_stripname_cnf ()
11984 {
11985 case $2 in
11986 .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
11987 *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
11988 esac
11989 } # func_stripname_cnf
11990
11991
11992
11993
11994
11995 # Set options
11996 enable_win32_dll=yes
11997
11998 case $host in
11999 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
12000 if test -n "$ac_tool_prefix"; then
12001 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
12002 set dummy ${ac_tool_prefix}as; ac_word=$2
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12004 $as_echo_n "checking for $ac_word... " >&6; }
12005 if ${ac_cv_prog_AS+:} false; then :
12006 $as_echo_n "(cached) " >&6
12007 else
12008 if test -n "$AS"; then
12009 ac_cv_prog_AS="$AS" # Let the user override the test.
12010 else
12011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12012 for as_dir in $PATH
12013 do
12014 IFS=$as_save_IFS
12015 test -z "$as_dir" && as_dir=.
12016 for ac_exec_ext in '' $ac_executable_extensions; do
12017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12018 ac_cv_prog_AS="${ac_tool_prefix}as"
12019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12020 break 2
12021 fi
12022 done
12023 done
12024 IFS=$as_save_IFS
12025
12026 fi
12027 fi
12028 AS=$ac_cv_prog_AS
12029 if test -n "$AS"; then
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
12031 $as_echo "$AS" >&6; }
12032 else
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12034 $as_echo "no" >&6; }
12035 fi
12036
12037
12038 fi
12039 if test -z "$ac_cv_prog_AS"; then
12040 ac_ct_AS=$AS
12041 # Extract the first word of "as", so it can be a program name with args.
12042 set dummy as; ac_word=$2
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12044 $as_echo_n "checking for $ac_word... " >&6; }
12045 if ${ac_cv_prog_ac_ct_AS+:} false; then :
12046 $as_echo_n "(cached) " >&6
12047 else
12048 if test -n "$ac_ct_AS"; then
12049 ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
12050 else
12051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12052 for as_dir in $PATH
12053 do
12054 IFS=$as_save_IFS
12055 test -z "$as_dir" && as_dir=.
12056 for ac_exec_ext in '' $ac_executable_extensions; do
12057 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12058 ac_cv_prog_ac_ct_AS="as"
12059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12060 break 2
12061 fi
12062 done
12063 done
12064 IFS=$as_save_IFS
12065
12066 fi
12067 fi
12068 ac_ct_AS=$ac_cv_prog_ac_ct_AS
12069 if test -n "$ac_ct_AS"; then
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
12071 $as_echo "$ac_ct_AS" >&6; }
12072 else
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12074 $as_echo "no" >&6; }
12075 fi
12076
12077 if test "x$ac_ct_AS" = x; then
12078 AS="false"
12079 else
12080 case $cross_compiling:$ac_tool_warned in
12081 yes:)
12082 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12083 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12084 ac_tool_warned=yes ;;
12085 esac
12086 AS=$ac_ct_AS
12087 fi
12088 else
12089 AS="$ac_cv_prog_AS"
12090 fi
12091
12092 if test -n "$ac_tool_prefix"; then
12093 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
12094 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
12095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12096 $as_echo_n "checking for $ac_word... " >&6; }
12097 if ${ac_cv_prog_DLLTOOL+:} false; then :
12098 $as_echo_n "(cached) " >&6
12099 else
12100 if test -n "$DLLTOOL"; then
12101 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
12102 else
12103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12104 for as_dir in $PATH
12105 do
12106 IFS=$as_save_IFS
12107 test -z "$as_dir" && as_dir=.
12108 for ac_exec_ext in '' $ac_executable_extensions; do
12109 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12110 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
12111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12112 break 2
12113 fi
12114 done
12115 done
12116 IFS=$as_save_IFS
12117
12118 fi
12119 fi
12120 DLLTOOL=$ac_cv_prog_DLLTOOL
12121 if test -n "$DLLTOOL"; then
12122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
12123 $as_echo "$DLLTOOL" >&6; }
12124 else
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12126 $as_echo "no" >&6; }
12127 fi
12128
12129
12130 fi
12131 if test -z "$ac_cv_prog_DLLTOOL"; then
12132 ac_ct_DLLTOOL=$DLLTOOL
12133 # Extract the first word of "dlltool", so it can be a program name with args.
12134 set dummy dlltool; ac_word=$2
12135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12136 $as_echo_n "checking for $ac_word... " >&6; }
12137 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
12138 $as_echo_n "(cached) " >&6
12139 else
12140 if test -n "$ac_ct_DLLTOOL"; then
12141 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
12142 else
12143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12144 for as_dir in $PATH
12145 do
12146 IFS=$as_save_IFS
12147 test -z "$as_dir" && as_dir=.
12148 for ac_exec_ext in '' $ac_executable_extensions; do
12149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12150 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
12151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12152 break 2
12153 fi
12154 done
12155 done
12156 IFS=$as_save_IFS
12157
12158 fi
12159 fi
12160 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
12161 if test -n "$ac_ct_DLLTOOL"; then
12162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
12163 $as_echo "$ac_ct_DLLTOOL" >&6; }
12164 else
12165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12166 $as_echo "no" >&6; }
12167 fi
12168
12169 if test "x$ac_ct_DLLTOOL" = x; then
12170 DLLTOOL="false"
12171 else
12172 case $cross_compiling:$ac_tool_warned in
12173 yes:)
12174 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12175 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12176 ac_tool_warned=yes ;;
12177 esac
12178 DLLTOOL=$ac_ct_DLLTOOL
12179 fi
12180 else
12181 DLLTOOL="$ac_cv_prog_DLLTOOL"
12182 fi
12183
12184 if test -n "$ac_tool_prefix"; then
12185 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
12186 set dummy ${ac_tool_prefix}objdump; ac_word=$2
12187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12188 $as_echo_n "checking for $ac_word... " >&6; }
12189 if ${ac_cv_prog_OBJDUMP+:} false; then :
12190 $as_echo_n "(cached) " >&6
12191 else
12192 if test -n "$OBJDUMP"; then
12193 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
12194 else
12195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12196 for as_dir in $PATH
12197 do
12198 IFS=$as_save_IFS
12199 test -z "$as_dir" && as_dir=.
12200 for ac_exec_ext in '' $ac_executable_extensions; do
12201 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12202 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
12203 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12204 break 2
12205 fi
12206 done
12207 done
12208 IFS=$as_save_IFS
12209
12210 fi
12211 fi
12212 OBJDUMP=$ac_cv_prog_OBJDUMP
12213 if test -n "$OBJDUMP"; then
12214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
12215 $as_echo "$OBJDUMP" >&6; }
12216 else
12217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12218 $as_echo "no" >&6; }
12219 fi
12220
12221
12222 fi
12223 if test -z "$ac_cv_prog_OBJDUMP"; then
12224 ac_ct_OBJDUMP=$OBJDUMP
12225 # Extract the first word of "objdump", so it can be a program name with args.
12226 set dummy objdump; ac_word=$2
12227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12228 $as_echo_n "checking for $ac_word... " >&6; }
12229 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
12230 $as_echo_n "(cached) " >&6
12231 else
12232 if test -n "$ac_ct_OBJDUMP"; then
12233 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
12234 else
12235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12236 for as_dir in $PATH
12237 do
12238 IFS=$as_save_IFS
12239 test -z "$as_dir" && as_dir=.
12240 for ac_exec_ext in '' $ac_executable_extensions; do
12241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12242 ac_cv_prog_ac_ct_OBJDUMP="objdump"
12243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12244 break 2
12245 fi
12246 done
12247 done
12248 IFS=$as_save_IFS
12249
12250 fi
12251 fi
12252 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
12253 if test -n "$ac_ct_OBJDUMP"; then
12254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
12255 $as_echo "$ac_ct_OBJDUMP" >&6; }
12256 else
12257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12258 $as_echo "no" >&6; }
12259 fi
12260
12261 if test "x$ac_ct_OBJDUMP" = x; then
12262 OBJDUMP="false"
12263 else
12264 case $cross_compiling:$ac_tool_warned in
12265 yes:)
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12267 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12268 ac_tool_warned=yes ;;
12269 esac
12270 OBJDUMP=$ac_ct_OBJDUMP
12271 fi
12272 else
12273 OBJDUMP="$ac_cv_prog_OBJDUMP"
12274 fi
12275
12276 ;;
12277 esac
12278
12279 test -z "$AS" && AS=as
12280
12281
12282
12283
12284
12285 test -z "$DLLTOOL" && DLLTOOL=dlltool
12286
12287
12288
12289
12290
12291 test -z "$OBJDUMP" && OBJDUMP=objdump
12292
12293
12294
12295
12296
12297
12298
12299 enable_dlopen=no
12300
12301
12302
12303 # Check whether --enable-shared was given.
12304 if test "${enable_shared+set}" = set; then :
12305 enableval=$enable_shared; p=${PACKAGE-default}
12306 case $enableval in
12307 yes) enable_shared=yes ;;
12308 no) enable_shared=no ;;
12309 *)
12310 enable_shared=no
12311 # Look at the argument we got. We use all the common list separators.
12312 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12313 for pkg in $enableval; do
12314 IFS=$lt_save_ifs
12315 if test "X$pkg" = "X$p"; then
12316 enable_shared=yes
12317 fi
12318 done
12319 IFS=$lt_save_ifs
12320 ;;
12321 esac
12322 else
12323 enable_shared=yes
12324 fi
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334 # Check whether --enable-static was given.
12335 if test "${enable_static+set}" = set; then :
12336 enableval=$enable_static; p=${PACKAGE-default}
12337 case $enableval in
12338 yes) enable_static=yes ;;
12339 no) enable_static=no ;;
12340 *)
12341 enable_static=no
12342 # Look at the argument we got. We use all the common list separators.
12343 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12344 for pkg in $enableval; do
12345 IFS=$lt_save_ifs
12346 if test "X$pkg" = "X$p"; then
12347 enable_static=yes
12348 fi
12349 done
12350 IFS=$lt_save_ifs
12351 ;;
12352 esac
12353 else
12354 enable_static=yes
12355 fi
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366 # Check whether --with-pic was given.
12367 if test "${with_pic+set}" = set; then :
12368 withval=$with_pic; lt_p=${PACKAGE-default}
12369 case $withval in
12370 yes|no) pic_mode=$withval ;;
12371 *)
12372 pic_mode=default
12373 # Look at the argument we got. We use all the common list separators.
12374 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12375 for lt_pkg in $withval; do
12376 IFS=$lt_save_ifs
12377 if test "X$lt_pkg" = "X$lt_p"; then
12378 pic_mode=yes
12379 fi
12380 done
12381 IFS=$lt_save_ifs
12382 ;;
12383 esac
12384 else
12385 pic_mode=default
12386 fi
12387
12388
12389
12390
12391
12392
12393
12394
12395 # Check whether --enable-fast-install was given.
12396 if test "${enable_fast_install+set}" = set; then :
12397 enableval=$enable_fast_install; p=${PACKAGE-default}
12398 case $enableval in
12399 yes) enable_fast_install=yes ;;
12400 no) enable_fast_install=no ;;
12401 *)
12402 enable_fast_install=no
12403 # Look at the argument we got. We use all the common list separators.
12404 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12405 for pkg in $enableval; do
12406 IFS=$lt_save_ifs
12407 if test "X$pkg" = "X$p"; then
12408 enable_fast_install=yes
12409 fi
12410 done
12411 IFS=$lt_save_ifs
12412 ;;
12413 esac
12414 else
12415 enable_fast_install=yes
12416 fi
12417
12418
12419
12420
12421
12422
12423
12424
12425 shared_archive_member_spec=
12426 case $host,$enable_shared in
12427 power*-*-aix[5-9]*,yes)
12428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
12429 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
12430
12431 # Check whether --with-aix-soname was given.
12432 if test "${with_aix_soname+set}" = set; then :
12433 withval=$with_aix_soname; case $withval in
12434 aix|svr4|both)
12435 ;;
12436 *)
12437 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
12438 ;;
12439 esac
12440 lt_cv_with_aix_soname=$with_aix_soname
12441 else
12442 if ${lt_cv_with_aix_soname+:} false; then :
12443 $as_echo_n "(cached) " >&6
12444 else
12445 lt_cv_with_aix_soname=aix
12446 fi
12447
12448 with_aix_soname=$lt_cv_with_aix_soname
12449 fi
12450
12451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
12452 $as_echo "$with_aix_soname" >&6; }
12453 if test aix != "$with_aix_soname"; then
12454 # For the AIX way of multilib, we name the shared archive member
12455 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
12456 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
12457 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
12458 # the AIX toolchain works better with OBJECT_MODE set (default 32).
12459 if test 64 = "${OBJECT_MODE-32}"; then
12460 shared_archive_member_spec=shr_64
12461 else
12462 shared_archive_member_spec=shr
12463 fi
12464 fi
12465 ;;
12466 *)
12467 with_aix_soname=aix
12468 ;;
12469 esac
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480 # This can be used to rebuild libtool when needed
12481 LIBTOOL_DEPS=$ltmain
12482
12483 # Always use our own libtool.
12484 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515 test -z "$LN_S" && LN_S="ln -s"
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530 if test -n "${ZSH_VERSION+set}"; then
12531 setopt NO_GLOB_SUBST
12532 fi
12533
12534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
12535 $as_echo_n "checking for objdir... " >&6; }
12536 if ${lt_cv_objdir+:} false; then :
12537 $as_echo_n "(cached) " >&6
12538 else
12539 rm -f .libs 2>/dev/null
12540 mkdir .libs 2>/dev/null
12541 if test -d .libs; then
12542 lt_cv_objdir=.libs
12543 else
12544 # MS-DOS does not allow filenames that begin with a dot.
12545 lt_cv_objdir=_libs
12546 fi
12547 rmdir .libs 2>/dev/null
12548 fi
12549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
12550 $as_echo "$lt_cv_objdir" >&6; }
12551 objdir=$lt_cv_objdir
12552
12553
12554
12555
12556
12557 cat >>confdefs.h <<_ACEOF
12558 #define LT_OBJDIR "$lt_cv_objdir/"
12559 _ACEOF
12560
12561
12562
12563
12564 case $host_os in
12565 aix3*)
12566 # AIX sometimes has problems with the GCC collect2 program. For some
12567 # reason, if we set the COLLECT_NAMES environment variable, the problems
12568 # vanish in a puff of smoke.
12569 if test set != "${COLLECT_NAMES+set}"; then
12570 COLLECT_NAMES=
12571 export COLLECT_NAMES
12572 fi
12573 ;;
12574 esac
12575
12576 # Global variables:
12577 ofile=libtool
12578 can_build_shared=yes
12579
12580 # All known linkers require a '.a' archive for static linking (except MSVC,
12581 # which needs '.lib').
12582 libext=a
12583
12584 with_gnu_ld=$lt_cv_prog_gnu_ld
12585
12586 old_CC=$CC
12587 old_CFLAGS=$CFLAGS
12588
12589 # Set sane defaults for various variables
12590 test -z "$CC" && CC=cc
12591 test -z "$LTCC" && LTCC=$CC
12592 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
12593 test -z "$LD" && LD=ld
12594 test -z "$ac_objext" && ac_objext=o
12595
12596 func_cc_basename $compiler
12597 cc_basename=$func_cc_basename_result
12598
12599
12600 # Only perform the check for file, if the check method requires it
12601 test -z "$MAGIC_CMD" && MAGIC_CMD=file
12602 case $deplibs_check_method in
12603 file_magic*)
12604 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
12605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
12606 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
12607 if ${lt_cv_path_MAGIC_CMD+:} false; then :
12608 $as_echo_n "(cached) " >&6
12609 else
12610 case $MAGIC_CMD in
12611 [\\/*] | ?:[\\/]*)
12612 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
12613 ;;
12614 *)
12615 lt_save_MAGIC_CMD=$MAGIC_CMD
12616 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
12617 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
12618 for ac_dir in $ac_dummy; do
12619 IFS=$lt_save_ifs
12620 test -z "$ac_dir" && ac_dir=.
12621 if test -f "$ac_dir/${ac_tool_prefix}file"; then
12622 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
12623 if test -n "$file_magic_test_file"; then
12624 case $deplibs_check_method in
12625 "file_magic "*)
12626 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
12627 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12628 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
12629 $EGREP "$file_magic_regex" > /dev/null; then
12630 :
12631 else
12632 cat <<_LT_EOF 1>&2
12633
12634 *** Warning: the command libtool uses to detect shared libraries,
12635 *** $file_magic_cmd, produces output that libtool cannot recognize.
12636 *** The result is that libtool may fail to recognize shared libraries
12637 *** as such. This will affect the creation of libtool libraries that
12638 *** depend on shared libraries, but programs linked with such libtool
12639 *** libraries will work regardless of this problem. Nevertheless, you
12640 *** may want to report the problem to your system manager and/or to
12641 *** bug-libtool@gnu.org
12642
12643 _LT_EOF
12644 fi ;;
12645 esac
12646 fi
12647 break
12648 fi
12649 done
12650 IFS=$lt_save_ifs
12651 MAGIC_CMD=$lt_save_MAGIC_CMD
12652 ;;
12653 esac
12654 fi
12655
12656 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12657 if test -n "$MAGIC_CMD"; then
12658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
12659 $as_echo "$MAGIC_CMD" >&6; }
12660 else
12661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12662 $as_echo "no" >&6; }
12663 fi
12664
12665
12666
12667
12668
12669 if test -z "$lt_cv_path_MAGIC_CMD"; then
12670 if test -n "$ac_tool_prefix"; then
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
12672 $as_echo_n "checking for file... " >&6; }
12673 if ${lt_cv_path_MAGIC_CMD+:} false; then :
12674 $as_echo_n "(cached) " >&6
12675 else
12676 case $MAGIC_CMD in
12677 [\\/*] | ?:[\\/]*)
12678 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
12679 ;;
12680 *)
12681 lt_save_MAGIC_CMD=$MAGIC_CMD
12682 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
12683 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
12684 for ac_dir in $ac_dummy; do
12685 IFS=$lt_save_ifs
12686 test -z "$ac_dir" && ac_dir=.
12687 if test -f "$ac_dir/file"; then
12688 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
12689 if test -n "$file_magic_test_file"; then
12690 case $deplibs_check_method in
12691 "file_magic "*)
12692 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
12693 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12694 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
12695 $EGREP "$file_magic_regex" > /dev/null; then
12696 :
12697 else
12698 cat <<_LT_EOF 1>&2
12699
12700 *** Warning: the command libtool uses to detect shared libraries,
12701 *** $file_magic_cmd, produces output that libtool cannot recognize.
12702 *** The result is that libtool may fail to recognize shared libraries
12703 *** as such. This will affect the creation of libtool libraries that
12704 *** depend on shared libraries, but programs linked with such libtool
12705 *** libraries will work regardless of this problem. Nevertheless, you
12706 *** may want to report the problem to your system manager and/or to
12707 *** bug-libtool@gnu.org
12708
12709 _LT_EOF
12710 fi ;;
12711 esac
12712 fi
12713 break
12714 fi
12715 done
12716 IFS=$lt_save_ifs
12717 MAGIC_CMD=$lt_save_MAGIC_CMD
12718 ;;
12719 esac
12720 fi
12721
12722 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12723 if test -n "$MAGIC_CMD"; then
12724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
12725 $as_echo "$MAGIC_CMD" >&6; }
12726 else
12727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12728 $as_echo "no" >&6; }
12729 fi
12730
12731
12732 else
12733 MAGIC_CMD=:
12734 fi
12735 fi
12736
12737 fi
12738 ;;
12739 esac
12740
12741 # Use C for the default configuration in the libtool script
12742
12743 lt_save_CC=$CC
12744 ac_ext=c
12745 ac_cpp='$CPP $CPPFLAGS'
12746 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12747 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12748 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12749
12750
12751 # Source file extension for C test sources.
12752 ac_ext=c
12753
12754 # Object file extension for compiled C test sources.
12755 objext=o
12756 objext=$objext
12757
12758 # Code to be used in simple compile tests
12759 lt_simple_compile_test_code="int some_variable = 0;"
12760
12761 # Code to be used in simple link tests
12762 lt_simple_link_test_code='int main(){return(0);}'
12763
12764
12765
12766
12767
12768
12769
12770 # If no C compiler was specified, use CC.
12771 LTCC=${LTCC-"$CC"}
12772
12773 # If no C compiler flags were specified, use CFLAGS.
12774 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12775
12776 # Allow CC to be a program name with arguments.
12777 compiler=$CC
12778
12779 # Save the default compiler, since it gets overwritten when the other
12780 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
12781 compiler_DEFAULT=$CC
12782
12783 # save warnings/boilerplate of simple test code
12784 ac_outfile=conftest.$ac_objext
12785 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
12786 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12787 _lt_compiler_boilerplate=`cat conftest.err`
12788 $RM conftest*
12789
12790 ac_outfile=conftest.$ac_objext
12791 echo "$lt_simple_link_test_code" >conftest.$ac_ext
12792 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12793 _lt_linker_boilerplate=`cat conftest.err`
12794 $RM -r conftest*
12795
12796
12797 ## CAVEAT EMPTOR:
12798 ## There is no encapsulation within the following macros, do not change
12799 ## the running order or otherwise move them around unless you know exactly
12800 ## what you are doing...
12801 if test -n "$compiler"; then
12802
12803 lt_prog_compiler_no_builtin_flag=
12804
12805 if test yes = "$GCC"; then
12806 case $cc_basename in
12807 nvcc*)
12808 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
12809 *)
12810 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
12811 esac
12812
12813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
12814 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
12815 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
12816 $as_echo_n "(cached) " >&6
12817 else
12818 lt_cv_prog_compiler_rtti_exceptions=no
12819 ac_outfile=conftest.$ac_objext
12820 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12821 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
12822 # Insert the option either (1) after the last *FLAGS variable, or
12823 # (2) before a word containing "conftest.", or (3) at the end.
12824 # Note that $ac_compile itself does not contain backslashes and begins
12825 # with a dollar sign (not a hyphen), so the echo should work correctly.
12826 # The option is referenced via a variable to avoid confusing sed.
12827 lt_compile=`echo "$ac_compile" | $SED \
12828 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12829 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12830 -e 's:$: $lt_compiler_flag:'`
12831 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12832 (eval "$lt_compile" 2>conftest.err)
12833 ac_status=$?
12834 cat conftest.err >&5
12835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12836 if (exit $ac_status) && test -s "$ac_outfile"; then
12837 # The compiler can only warn and ignore the option if not recognized
12838 # So say no if there are warnings other than the usual output.
12839 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12840 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12841 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12842 lt_cv_prog_compiler_rtti_exceptions=yes
12843 fi
12844 fi
12845 $RM conftest*
12846
12847 fi
12848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
12849 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
12850
12851 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
12852 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
12853 else
12854 :
12855 fi
12856
12857 fi
12858
12859
12860
12861
12862
12863
12864 lt_prog_compiler_wl=
12865 lt_prog_compiler_pic=
12866 lt_prog_compiler_static=
12867
12868
12869 if test yes = "$GCC"; then
12870 lt_prog_compiler_wl='-Wl,'
12871 lt_prog_compiler_static='-static'
12872
12873 case $host_os in
12874 aix*)
12875 # All AIX code is PIC.
12876 if test ia64 = "$host_cpu"; then
12877 # AIX 5 now supports IA64 processor
12878 lt_prog_compiler_static='-Bstatic'
12879 fi
12880 lt_prog_compiler_pic='-fPIC'
12881 ;;
12882
12883 amigaos*)
12884 case $host_cpu in
12885 powerpc)
12886 # see comment about AmigaOS4 .so support
12887 lt_prog_compiler_pic='-fPIC'
12888 ;;
12889 m68k)
12890 # FIXME: we need at least 68020 code to build shared libraries, but
12891 # adding the '-m68020' flag to GCC prevents building anything better,
12892 # like '-m68040'.
12893 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
12894 ;;
12895 esac
12896 ;;
12897
12898 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
12899 # PIC is the default for these OSes.
12900 ;;
12901
12902 mingw* | cygwin* | pw32* | os2* | cegcc*)
12903 # This hack is so that the source file can tell whether it is being
12904 # built for inclusion in a dll (and should export symbols for example).
12905 # Although the cygwin gcc ignores -fPIC, still need this for old-style
12906 # (--disable-auto-import) libraries
12907 lt_prog_compiler_pic='-DDLL_EXPORT'
12908 case $host_os in
12909 os2*)
12910 lt_prog_compiler_static='$wl-static'
12911 ;;
12912 esac
12913 ;;
12914
12915 darwin* | rhapsody*)
12916 # PIC is the default on this platform
12917 # Common symbols not allowed in MH_DYLIB files
12918 lt_prog_compiler_pic='-fno-common'
12919 ;;
12920
12921 haiku*)
12922 # PIC is the default for Haiku.
12923 # The "-static" flag exists, but is broken.
12924 lt_prog_compiler_static=
12925 ;;
12926
12927 hpux*)
12928 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
12929 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
12930 # sets the default TLS model and affects inlining.
12931 case $host_cpu in
12932 hppa*64*)
12933 # +Z the default
12934 ;;
12935 *)
12936 lt_prog_compiler_pic='-fPIC'
12937 ;;
12938 esac
12939 ;;
12940
12941 interix[3-9]*)
12942 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12943 # Instead, we relocate shared libraries at runtime.
12944 ;;
12945
12946 msdosdjgpp*)
12947 # Just because we use GCC doesn't mean we suddenly get shared libraries
12948 # on systems that don't support them.
12949 lt_prog_compiler_can_build_shared=no
12950 enable_shared=no
12951 ;;
12952
12953 *nto* | *qnx*)
12954 # QNX uses GNU C++, but need to define -shared option too, otherwise
12955 # it will coredump.
12956 lt_prog_compiler_pic='-fPIC -shared'
12957 ;;
12958
12959 sysv4*MP*)
12960 if test -d /usr/nec; then
12961 lt_prog_compiler_pic=-Kconform_pic
12962 fi
12963 ;;
12964
12965 *)
12966 lt_prog_compiler_pic='-fPIC'
12967 ;;
12968 esac
12969
12970 case $cc_basename in
12971 nvcc*) # Cuda Compiler Driver 2.2
12972 lt_prog_compiler_wl='-Xlinker '
12973 if test -n "$lt_prog_compiler_pic"; then
12974 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
12975 fi
12976 ;;
12977 esac
12978 else
12979 # PORTME Check for flag to pass linker flags through the system compiler.
12980 case $host_os in
12981 aix*)
12982 lt_prog_compiler_wl='-Wl,'
12983 if test ia64 = "$host_cpu"; then
12984 # AIX 5 now supports IA64 processor
12985 lt_prog_compiler_static='-Bstatic'
12986 else
12987 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
12988 fi
12989 ;;
12990
12991 darwin* | rhapsody*)
12992 # PIC is the default on this platform
12993 # Common symbols not allowed in MH_DYLIB files
12994 lt_prog_compiler_pic='-fno-common'
12995 case $cc_basename in
12996 nagfor*)
12997 # NAG Fortran compiler
12998 lt_prog_compiler_wl='-Wl,-Wl,,'
12999 lt_prog_compiler_pic='-PIC'
13000 lt_prog_compiler_static='-Bstatic'
13001 ;;
13002 esac
13003 ;;
13004
13005 mingw* | cygwin* | pw32* | os2* | cegcc*)
13006 # This hack is so that the source file can tell whether it is being
13007 # built for inclusion in a dll (and should export symbols for example).
13008 lt_prog_compiler_pic='-DDLL_EXPORT'
13009 case $host_os in
13010 os2*)
13011 lt_prog_compiler_static='$wl-static'
13012 ;;
13013 esac
13014 ;;
13015
13016 hpux9* | hpux10* | hpux11*)
13017 lt_prog_compiler_wl='-Wl,'
13018 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
13019 # not for PA HP-UX.
13020 case $host_cpu in
13021 hppa*64*|ia64*)
13022 # +Z the default
13023 ;;
13024 *)
13025 lt_prog_compiler_pic='+Z'
13026 ;;
13027 esac
13028 # Is there a better lt_prog_compiler_static that works with the bundled CC?
13029 lt_prog_compiler_static='$wl-a ${wl}archive'
13030 ;;
13031
13032 irix5* | irix6* | nonstopux*)
13033 lt_prog_compiler_wl='-Wl,'
13034 # PIC (with -KPIC) is the default.
13035 lt_prog_compiler_static='-non_shared'
13036 ;;
13037
13038 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13039 case $cc_basename in
13040 # old Intel for x86_64, which still supported -KPIC.
13041 ecc*)
13042 lt_prog_compiler_wl='-Wl,'
13043 lt_prog_compiler_pic='-KPIC'
13044 lt_prog_compiler_static='-static'
13045 ;;
13046 # icc used to be incompatible with GCC.
13047 # ICC 10 doesn't accept -KPIC any more.
13048 icc* | ifort*)
13049 lt_prog_compiler_wl='-Wl,'
13050 lt_prog_compiler_pic='-fPIC'
13051 lt_prog_compiler_static='-static'
13052 ;;
13053 # Lahey Fortran 8.1.
13054 lf95*)
13055 lt_prog_compiler_wl='-Wl,'
13056 lt_prog_compiler_pic='--shared'
13057 lt_prog_compiler_static='--static'
13058 ;;
13059 nagfor*)
13060 # NAG Fortran compiler
13061 lt_prog_compiler_wl='-Wl,-Wl,,'
13062 lt_prog_compiler_pic='-PIC'
13063 lt_prog_compiler_static='-Bstatic'
13064 ;;
13065 tcc*)
13066 # Fabrice Bellard et al's Tiny C Compiler
13067 lt_prog_compiler_wl='-Wl,'
13068 lt_prog_compiler_pic='-fPIC'
13069 lt_prog_compiler_static='-static'
13070 ;;
13071 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
13072 # Portland Group compilers (*not* the Pentium gcc compiler,
13073 # which looks to be a dead project)
13074 lt_prog_compiler_wl='-Wl,'
13075 lt_prog_compiler_pic='-fpic'
13076 lt_prog_compiler_static='-Bstatic'
13077 ;;
13078 ccc*)
13079 lt_prog_compiler_wl='-Wl,'
13080 # All Alpha code is PIC.
13081 lt_prog_compiler_static='-non_shared'
13082 ;;
13083 xl* | bgxl* | bgf* | mpixl*)
13084 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
13085 lt_prog_compiler_wl='-Wl,'
13086 lt_prog_compiler_pic='-qpic'
13087 lt_prog_compiler_static='-qstaticlink'
13088 ;;
13089 *)
13090 case `$CC -V 2>&1 | sed 5q` in
13091 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
13092 # Sun Fortran 8.3 passes all unrecognized flags to the linker
13093 lt_prog_compiler_pic='-KPIC'
13094 lt_prog_compiler_static='-Bstatic'
13095 lt_prog_compiler_wl=''
13096 ;;
13097 *Sun\ F* | *Sun*Fortran*)
13098 lt_prog_compiler_pic='-KPIC'
13099 lt_prog_compiler_static='-Bstatic'
13100 lt_prog_compiler_wl='-Qoption ld '
13101 ;;
13102 *Sun\ C*)
13103 # Sun C 5.9
13104 lt_prog_compiler_pic='-KPIC'
13105 lt_prog_compiler_static='-Bstatic'
13106 lt_prog_compiler_wl='-Wl,'
13107 ;;
13108 *Intel*\ [CF]*Compiler*)
13109 lt_prog_compiler_wl='-Wl,'
13110 lt_prog_compiler_pic='-fPIC'
13111 lt_prog_compiler_static='-static'
13112 ;;
13113 *Portland\ Group*)
13114 lt_prog_compiler_wl='-Wl,'
13115 lt_prog_compiler_pic='-fpic'
13116 lt_prog_compiler_static='-Bstatic'
13117 ;;
13118 esac
13119 ;;
13120 esac
13121 ;;
13122
13123 newsos6)
13124 lt_prog_compiler_pic='-KPIC'
13125 lt_prog_compiler_static='-Bstatic'
13126 ;;
13127
13128 *nto* | *qnx*)
13129 # QNX uses GNU C++, but need to define -shared option too, otherwise
13130 # it will coredump.
13131 lt_prog_compiler_pic='-fPIC -shared'
13132 ;;
13133
13134 osf3* | osf4* | osf5*)
13135 lt_prog_compiler_wl='-Wl,'
13136 # All OSF/1 code is PIC.
13137 lt_prog_compiler_static='-non_shared'
13138 ;;
13139
13140 rdos*)
13141 lt_prog_compiler_static='-non_shared'
13142 ;;
13143
13144 solaris*)
13145 lt_prog_compiler_pic='-KPIC'
13146 lt_prog_compiler_static='-Bstatic'
13147 case $cc_basename in
13148 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
13149 lt_prog_compiler_wl='-Qoption ld ';;
13150 *)
13151 lt_prog_compiler_wl='-Wl,';;
13152 esac
13153 ;;
13154
13155 sunos4*)
13156 lt_prog_compiler_wl='-Qoption ld '
13157 lt_prog_compiler_pic='-PIC'
13158 lt_prog_compiler_static='-Bstatic'
13159 ;;
13160
13161 sysv4 | sysv4.2uw2* | sysv4.3*)
13162 lt_prog_compiler_wl='-Wl,'
13163 lt_prog_compiler_pic='-KPIC'
13164 lt_prog_compiler_static='-Bstatic'
13165 ;;
13166
13167 sysv4*MP*)
13168 if test -d /usr/nec; then
13169 lt_prog_compiler_pic='-Kconform_pic'
13170 lt_prog_compiler_static='-Bstatic'
13171 fi
13172 ;;
13173
13174 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
13175 lt_prog_compiler_wl='-Wl,'
13176 lt_prog_compiler_pic='-KPIC'
13177 lt_prog_compiler_static='-Bstatic'
13178 ;;
13179
13180 unicos*)
13181 lt_prog_compiler_wl='-Wl,'
13182 lt_prog_compiler_can_build_shared=no
13183 ;;
13184
13185 uts4*)
13186 lt_prog_compiler_pic='-pic'
13187 lt_prog_compiler_static='-Bstatic'
13188 ;;
13189
13190 *)
13191 lt_prog_compiler_can_build_shared=no
13192 ;;
13193 esac
13194 fi
13195
13196 case $host_os in
13197 # For platforms that do not support PIC, -DPIC is meaningless:
13198 *djgpp*)
13199 lt_prog_compiler_pic=
13200 ;;
13201 *)
13202 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
13203 ;;
13204 esac
13205
13206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
13207 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
13208 if ${lt_cv_prog_compiler_pic+:} false; then :
13209 $as_echo_n "(cached) " >&6
13210 else
13211 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
13212 fi
13213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
13214 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
13215 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
13216
13217 #
13218 # Check to make sure the PIC flag actually works.
13219 #
13220 if test -n "$lt_prog_compiler_pic"; then
13221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
13222 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
13223 if ${lt_cv_prog_compiler_pic_works+:} false; then :
13224 $as_echo_n "(cached) " >&6
13225 else
13226 lt_cv_prog_compiler_pic_works=no
13227 ac_outfile=conftest.$ac_objext
13228 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13229 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
13230 # Insert the option either (1) after the last *FLAGS variable, or
13231 # (2) before a word containing "conftest.", or (3) at the end.
13232 # Note that $ac_compile itself does not contain backslashes and begins
13233 # with a dollar sign (not a hyphen), so the echo should work correctly.
13234 # The option is referenced via a variable to avoid confusing sed.
13235 lt_compile=`echo "$ac_compile" | $SED \
13236 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13237 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13238 -e 's:$: $lt_compiler_flag:'`
13239 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13240 (eval "$lt_compile" 2>conftest.err)
13241 ac_status=$?
13242 cat conftest.err >&5
13243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13244 if (exit $ac_status) && test -s "$ac_outfile"; then
13245 # The compiler can only warn and ignore the option if not recognized
13246 # So say no if there are warnings other than the usual output.
13247 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
13248 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13249 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
13250 lt_cv_prog_compiler_pic_works=yes
13251 fi
13252 fi
13253 $RM conftest*
13254
13255 fi
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
13257 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
13258
13259 if test yes = "$lt_cv_prog_compiler_pic_works"; then
13260 case $lt_prog_compiler_pic in
13261 "" | " "*) ;;
13262 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
13263 esac
13264 else
13265 lt_prog_compiler_pic=
13266 lt_prog_compiler_can_build_shared=no
13267 fi
13268
13269 fi
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281 #
13282 # Check to make sure the static flag actually works.
13283 #
13284 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
13285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
13286 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
13287 if ${lt_cv_prog_compiler_static_works+:} false; then :
13288 $as_echo_n "(cached) " >&6
13289 else
13290 lt_cv_prog_compiler_static_works=no
13291 save_LDFLAGS=$LDFLAGS
13292 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
13293 echo "$lt_simple_link_test_code" > conftest.$ac_ext
13294 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13295 # The linker can only warn and ignore the option if not recognized
13296 # So say no if there are warnings
13297 if test -s conftest.err; then
13298 # Append any errors to the config.log.
13299 cat conftest.err 1>&5
13300 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13301 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13302 if diff conftest.exp conftest.er2 >/dev/null; then
13303 lt_cv_prog_compiler_static_works=yes
13304 fi
13305 else
13306 lt_cv_prog_compiler_static_works=yes
13307 fi
13308 fi
13309 $RM -r conftest*
13310 LDFLAGS=$save_LDFLAGS
13311
13312 fi
13313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
13314 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
13315
13316 if test yes = "$lt_cv_prog_compiler_static_works"; then
13317 :
13318 else
13319 lt_prog_compiler_static=
13320 fi
13321
13322
13323
13324
13325
13326
13327
13328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
13329 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
13330 if ${lt_cv_prog_compiler_c_o+:} false; then :
13331 $as_echo_n "(cached) " >&6
13332 else
13333 lt_cv_prog_compiler_c_o=no
13334 $RM -r conftest 2>/dev/null
13335 mkdir conftest
13336 cd conftest
13337 mkdir out
13338 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13339
13340 lt_compiler_flag="-o out/conftest2.$ac_objext"
13341 # Insert the option either (1) after the last *FLAGS variable, or
13342 # (2) before a word containing "conftest.", or (3) at the end.
13343 # Note that $ac_compile itself does not contain backslashes and begins
13344 # with a dollar sign (not a hyphen), so the echo should work correctly.
13345 lt_compile=`echo "$ac_compile" | $SED \
13346 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13347 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13348 -e 's:$: $lt_compiler_flag:'`
13349 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13350 (eval "$lt_compile" 2>out/conftest.err)
13351 ac_status=$?
13352 cat out/conftest.err >&5
13353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13354 if (exit $ac_status) && test -s out/conftest2.$ac_objext
13355 then
13356 # The compiler can only warn and ignore the option if not recognized
13357 # So say no if there are warnings
13358 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
13359 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13360 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13361 lt_cv_prog_compiler_c_o=yes
13362 fi
13363 fi
13364 chmod u+w . 2>&5
13365 $RM conftest*
13366 # SGI C++ compiler will create directory out/ii_files/ for
13367 # template instantiation
13368 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
13369 $RM out/* && rmdir out
13370 cd ..
13371 $RM -r conftest
13372 $RM conftest*
13373
13374 fi
13375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
13376 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
13377
13378
13379
13380
13381
13382
13383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
13384 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
13385 if ${lt_cv_prog_compiler_c_o+:} false; then :
13386 $as_echo_n "(cached) " >&6
13387 else
13388 lt_cv_prog_compiler_c_o=no
13389 $RM -r conftest 2>/dev/null
13390 mkdir conftest
13391 cd conftest
13392 mkdir out
13393 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13394
13395 lt_compiler_flag="-o out/conftest2.$ac_objext"
13396 # Insert the option either (1) after the last *FLAGS variable, or
13397 # (2) before a word containing "conftest.", or (3) at the end.
13398 # Note that $ac_compile itself does not contain backslashes and begins
13399 # with a dollar sign (not a hyphen), so the echo should work correctly.
13400 lt_compile=`echo "$ac_compile" | $SED \
13401 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13402 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13403 -e 's:$: $lt_compiler_flag:'`
13404 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13405 (eval "$lt_compile" 2>out/conftest.err)
13406 ac_status=$?
13407 cat out/conftest.err >&5
13408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13409 if (exit $ac_status) && test -s out/conftest2.$ac_objext
13410 then
13411 # The compiler can only warn and ignore the option if not recognized
13412 # So say no if there are warnings
13413 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
13414 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13415 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13416 lt_cv_prog_compiler_c_o=yes
13417 fi
13418 fi
13419 chmod u+w . 2>&5
13420 $RM conftest*
13421 # SGI C++ compiler will create directory out/ii_files/ for
13422 # template instantiation
13423 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
13424 $RM out/* && rmdir out
13425 cd ..
13426 $RM -r conftest
13427 $RM conftest*
13428
13429 fi
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
13431 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
13432
13433
13434
13435
13436 hard_links=nottested
13437 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
13438 # do not overwrite the value of need_locks provided by the user
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
13440 $as_echo_n "checking if we can lock with hard links... " >&6; }
13441 hard_links=yes
13442 $RM conftest*
13443 ln conftest.a conftest.b 2>/dev/null && hard_links=no
13444 touch conftest.a
13445 ln conftest.a conftest.b 2>&5 || hard_links=no
13446 ln conftest.a conftest.b 2>/dev/null && hard_links=no
13447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
13448 $as_echo "$hard_links" >&6; }
13449 if test no = "$hard_links"; then
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
13451 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
13452 need_locks=warn
13453 fi
13454 else
13455 need_locks=no
13456 fi
13457
13458
13459
13460
13461
13462
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
13464 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
13465
13466 runpath_var=
13467 allow_undefined_flag=
13468 always_export_symbols=no
13469 archive_cmds=
13470 archive_expsym_cmds=
13471 compiler_needs_object=no
13472 enable_shared_with_static_runtimes=no
13473 export_dynamic_flag_spec=
13474 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
13475 hardcode_automatic=no
13476 hardcode_direct=no
13477 hardcode_direct_absolute=no
13478 hardcode_libdir_flag_spec=
13479 hardcode_libdir_separator=
13480 hardcode_minus_L=no
13481 hardcode_shlibpath_var=unsupported
13482 inherit_rpath=no
13483 link_all_deplibs=unknown
13484 module_cmds=
13485 module_expsym_cmds=
13486 old_archive_from_new_cmds=
13487 old_archive_from_expsyms_cmds=
13488 thread_safe_flag_spec=
13489 whole_archive_flag_spec=
13490 # include_expsyms should be a list of space-separated symbols to be *always*
13491 # included in the symbol list
13492 include_expsyms=
13493 # exclude_expsyms can be an extended regexp of symbols to exclude
13494 # it will be wrapped by ' (' and ')$', so one must not match beginning or
13495 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
13496 # as well as any symbol that contains 'd'.
13497 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
13498 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
13499 # platforms (ab)use it in PIC code, but their linkers get confused if
13500 # the symbol is explicitly referenced. Since portable code cannot
13501 # rely on this symbol name, it's probably fine to never include it in
13502 # preloaded symbol tables.
13503 # Exclude shared library initialization/finalization symbols.
13504 extract_expsyms_cmds=
13505
13506 case $host_os in
13507 cygwin* | mingw* | pw32* | cegcc*)
13508 # FIXME: the MSVC++ port hasn't been tested in a loooong time
13509 # When not using gcc, we currently assume that we are using
13510 # Microsoft Visual C++.
13511 if test yes != "$GCC"; then
13512 with_gnu_ld=no
13513 fi
13514 ;;
13515 interix*)
13516 # we just hope/assume this is gcc and not c89 (= MSVC++)
13517 with_gnu_ld=yes
13518 ;;
13519 openbsd* | bitrig*)
13520 with_gnu_ld=no
13521 ;;
13522 linux* | k*bsd*-gnu | gnu*)
13523 link_all_deplibs=no
13524 ;;
13525 esac
13526
13527 ld_shlibs=yes
13528
13529 # On some targets, GNU ld is compatible enough with the native linker
13530 # that we're better off using the native interface for both.
13531 lt_use_gnu_ld_interface=no
13532 if test yes = "$with_gnu_ld"; then
13533 case $host_os in
13534 aix*)
13535 # The AIX port of GNU ld has always aspired to compatibility
13536 # with the native linker. However, as the warning in the GNU ld
13537 # block says, versions before 2.19.5* couldn't really create working
13538 # shared libraries, regardless of the interface used.
13539 case `$LD -v 2>&1` in
13540 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
13541 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
13542 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
13543 *)
13544 lt_use_gnu_ld_interface=yes
13545 ;;
13546 esac
13547 ;;
13548 *)
13549 lt_use_gnu_ld_interface=yes
13550 ;;
13551 esac
13552 fi
13553
13554 if test yes = "$lt_use_gnu_ld_interface"; then
13555 # If archive_cmds runs LD, not CC, wlarc should be empty
13556 wlarc='$wl'
13557
13558 # Set some defaults for GNU ld with shared library support. These
13559 # are reset later if shared libraries are not supported. Putting them
13560 # here allows them to be overridden if necessary.
13561 runpath_var=LD_RUN_PATH
13562 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13563 export_dynamic_flag_spec='$wl--export-dynamic'
13564 # ancient GNU ld didn't support --whole-archive et. al.
13565 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
13566 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
13567 else
13568 whole_archive_flag_spec=
13569 fi
13570 supports_anon_versioning=no
13571 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
13572 *GNU\ gold*) supports_anon_versioning=yes ;;
13573 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
13574 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
13575 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
13576 *\ 2.11.*) ;; # other 2.11 versions
13577 *) supports_anon_versioning=yes ;;
13578 esac
13579
13580 # See if GNU ld supports shared libraries.
13581 case $host_os in
13582 aix[3-9]*)
13583 # On AIX/PPC, the GNU linker is very broken
13584 if test ia64 != "$host_cpu"; then
13585 ld_shlibs=no
13586 cat <<_LT_EOF 1>&2
13587
13588 *** Warning: the GNU linker, at least up to release 2.19, is reported
13589 *** to be unable to reliably create shared libraries on AIX.
13590 *** Therefore, libtool is disabling shared libraries support. If you
13591 *** really care for shared libraries, you may want to install binutils
13592 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
13593 *** You will then need to restart the configuration process.
13594
13595 _LT_EOF
13596 fi
13597 ;;
13598
13599 amigaos*)
13600 case $host_cpu in
13601 powerpc)
13602 # see comment about AmigaOS4 .so support
13603 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13604 archive_expsym_cmds=''
13605 ;;
13606 m68k)
13607 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)'
13608 hardcode_libdir_flag_spec='-L$libdir'
13609 hardcode_minus_L=yes
13610 ;;
13611 esac
13612 ;;
13613
13614 beos*)
13615 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13616 allow_undefined_flag=unsupported
13617 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
13618 # support --undefined. This deserves some investigation. FIXME
13619 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13620 else
13621 ld_shlibs=no
13622 fi
13623 ;;
13624
13625 cygwin* | mingw* | pw32* | cegcc*)
13626 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
13627 # as there is no search path for DLLs.
13628 hardcode_libdir_flag_spec='-L$libdir'
13629 export_dynamic_flag_spec='$wl--export-all-symbols'
13630 allow_undefined_flag=unsupported
13631 always_export_symbols=no
13632 enable_shared_with_static_runtimes=yes
13633 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
13634 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
13635
13636 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
13637 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13638 # If the export-symbols file already is a .def file, use it as
13639 # is; otherwise, prepend EXPORTS...
13640 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
13641 cp $export_symbols $output_objdir/$soname.def;
13642 else
13643 echo EXPORTS > $output_objdir/$soname.def;
13644 cat $export_symbols >> $output_objdir/$soname.def;
13645 fi~
13646 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13647 else
13648 ld_shlibs=no
13649 fi
13650 ;;
13651
13652 haiku*)
13653 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13654 link_all_deplibs=yes
13655 ;;
13656
13657 os2*)
13658 hardcode_libdir_flag_spec='-L$libdir'
13659 hardcode_minus_L=yes
13660 allow_undefined_flag=unsupported
13661 shrext_cmds=.dll
13662 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13663 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13664 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13665 $ECHO EXPORTS >> $output_objdir/$libname.def~
13666 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13667 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13668 emximp -o $lib $output_objdir/$libname.def'
13669 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13670 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13671 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13672 $ECHO EXPORTS >> $output_objdir/$libname.def~
13673 prefix_cmds="$SED"~
13674 if test EXPORTS = "`$SED 1q $export_symbols`"; then
13675 prefix_cmds="$prefix_cmds -e 1d";
13676 fi~
13677 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13678 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13679 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13680 emximp -o $lib $output_objdir/$libname.def'
13681 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13682 enable_shared_with_static_runtimes=yes
13683 ;;
13684
13685 interix[3-9]*)
13686 hardcode_direct=no
13687 hardcode_shlibpath_var=no
13688 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13689 export_dynamic_flag_spec='$wl-E'
13690 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
13691 # Instead, shared libraries are loaded at an image base (0x10000000 by
13692 # default) and relocated if they conflict, which is a slow very memory
13693 # consuming and fragmenting process. To avoid this, we pick a random,
13694 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
13695 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
13696 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13697 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'
13698 ;;
13699
13700 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
13701 tmp_diet=no
13702 if test linux-dietlibc = "$host_os"; then
13703 case $cc_basename in
13704 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
13705 esac
13706 fi
13707 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
13708 && test no = "$tmp_diet"
13709 then
13710 tmp_addflag=' $pic_flag'
13711 tmp_sharedflag='-shared'
13712 case $cc_basename,$host_cpu in
13713 pgcc*) # Portland Group C compiler
13714 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13715 tmp_addflag=' $pic_flag'
13716 ;;
13717 pgf77* | pgf90* | pgf95* | pgfortran*)
13718 # Portland Group f77 and f90 compilers
13719 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13720 tmp_addflag=' $pic_flag -Mnomain' ;;
13721 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
13722 tmp_addflag=' -i_dynamic' ;;
13723 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
13724 tmp_addflag=' -i_dynamic -nofor_main' ;;
13725 ifc* | ifort*) # Intel Fortran compiler
13726 tmp_addflag=' -nofor_main' ;;
13727 lf95*) # Lahey Fortran 8.1
13728 whole_archive_flag_spec=
13729 tmp_sharedflag='--shared' ;;
13730 nagfor*) # NAGFOR 5.3
13731 tmp_sharedflag='-Wl,-shared' ;;
13732 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
13733 tmp_sharedflag='-qmkshrobj'
13734 tmp_addflag= ;;
13735 nvcc*) # Cuda Compiler Driver 2.2
13736 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13737 compiler_needs_object=yes
13738 ;;
13739 esac
13740 case `$CC -V 2>&1 | sed 5q` in
13741 *Sun\ C*) # Sun C 5.9
13742 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13743 compiler_needs_object=yes
13744 tmp_sharedflag='-G' ;;
13745 *Sun\ F*) # Sun Fortran 8.3
13746 tmp_sharedflag='-G' ;;
13747 esac
13748 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13749
13750 if test yes = "$supports_anon_versioning"; then
13751 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13752 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13753 echo "local: *; };" >> $output_objdir/$libname.ver~
13754 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
13755 fi
13756
13757 case $cc_basename in
13758 tcc*)
13759 export_dynamic_flag_spec='-rdynamic'
13760 ;;
13761 xlf* | bgf* | bgxlf* | mpixlf*)
13762 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
13763 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
13764 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13765 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
13766 if test yes = "$supports_anon_versioning"; then
13767 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13768 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13769 echo "local: *; };" >> $output_objdir/$libname.ver~
13770 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
13771 fi
13772 ;;
13773 esac
13774 else
13775 ld_shlibs=no
13776 fi
13777 ;;
13778
13779 netbsd* | netbsdelf*-gnu)
13780 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13781 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
13782 wlarc=
13783 else
13784 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13785 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13786 fi
13787 ;;
13788
13789 solaris*)
13790 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
13791 ld_shlibs=no
13792 cat <<_LT_EOF 1>&2
13793
13794 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
13795 *** create shared libraries on Solaris systems. Therefore, libtool
13796 *** is disabling shared libraries support. We urge you to upgrade GNU
13797 *** binutils to release 2.9.1 or newer. Another option is to modify
13798 *** your PATH or compiler configuration so that the native linker is
13799 *** used, and then restart.
13800
13801 _LT_EOF
13802 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13803 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13804 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13805 else
13806 ld_shlibs=no
13807 fi
13808 ;;
13809
13810 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
13811 case `$LD -v 2>&1` in
13812 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
13813 ld_shlibs=no
13814 cat <<_LT_EOF 1>&2
13815
13816 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
13817 *** reliably create shared libraries on SCO systems. Therefore, libtool
13818 *** is disabling shared libraries support. We urge you to upgrade GNU
13819 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
13820 *** your PATH or compiler configuration so that the native linker is
13821 *** used, and then restart.
13822
13823 _LT_EOF
13824 ;;
13825 *)
13826 # For security reasons, it is highly recommended that you always
13827 # use absolute paths for naming shared libraries, and exclude the
13828 # DT_RUNPATH tag from executables and libraries. But doing so
13829 # requires that you compile everything twice, which is a pain.
13830 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13831 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13832 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13833 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13834 else
13835 ld_shlibs=no
13836 fi
13837 ;;
13838 esac
13839 ;;
13840
13841 sunos4*)
13842 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13843 wlarc=
13844 hardcode_direct=yes
13845 hardcode_shlibpath_var=no
13846 ;;
13847
13848 *)
13849 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13850 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13851 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13852 else
13853 ld_shlibs=no
13854 fi
13855 ;;
13856 esac
13857
13858 if test no = "$ld_shlibs"; then
13859 runpath_var=
13860 hardcode_libdir_flag_spec=
13861 export_dynamic_flag_spec=
13862 whole_archive_flag_spec=
13863 fi
13864 else
13865 # PORTME fill in a description of your system's linker (not GNU ld)
13866 case $host_os in
13867 aix3*)
13868 allow_undefined_flag=unsupported
13869 always_export_symbols=yes
13870 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'
13871 # Note: this linker hardcodes the directories in LIBPATH if there
13872 # are no directories specified by -L.
13873 hardcode_minus_L=yes
13874 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
13875 # Neither direct hardcoding nor static linking is supported with a
13876 # broken collect2.
13877 hardcode_direct=unsupported
13878 fi
13879 ;;
13880
13881 aix[4-9]*)
13882 if test ia64 = "$host_cpu"; then
13883 # On IA64, the linker does run time linking by default, so we don't
13884 # have to do anything special.
13885 aix_use_runtimelinking=no
13886 exp_sym_flag='-Bexport'
13887 no_entry_flag=
13888 else
13889 # If we're using GNU nm, then we don't want the "-C" option.
13890 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
13891 # Without the "-l" option, or with the "-B" option, AIX nm treats
13892 # weak defined symbols like other global defined symbols, whereas
13893 # GNU nm marks them as "W".
13894 # While the 'weak' keyword is ignored in the Export File, we need
13895 # it in the Import File for the 'aix-soname' feature, so we have
13896 # to replace the "-B" option with "-P" for AIX nm.
13897 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
13898 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
13899 else
13900 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
13901 fi
13902 aix_use_runtimelinking=no
13903
13904 # Test if we are trying to use run time linking or normal
13905 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
13906 # have runtime linking enabled, and use it for executables.
13907 # For shared libraries, we enable/disable runtime linking
13908 # depending on the kind of the shared library created -
13909 # when "with_aix_soname,aix_use_runtimelinking" is:
13910 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
13911 # "aix,yes" lib.so shared, rtl:yes, for executables
13912 # lib.a static archive
13913 # "both,no" lib.so.V(shr.o) shared, rtl:yes
13914 # lib.a(lib.so.V) shared, rtl:no, for executables
13915 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
13916 # lib.a(lib.so.V) shared, rtl:no
13917 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
13918 # lib.a static archive
13919 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
13920 for ld_flag in $LDFLAGS; do
13921 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
13922 aix_use_runtimelinking=yes
13923 break
13924 fi
13925 done
13926 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13927 # With aix-soname=svr4, we create the lib.so.V shared archives only,
13928 # so we don't have lib.a shared libs to link our executables.
13929 # We have to force runtime linking in this case.
13930 aix_use_runtimelinking=yes
13931 LDFLAGS="$LDFLAGS -Wl,-brtl"
13932 fi
13933 ;;
13934 esac
13935
13936 exp_sym_flag='-bexport'
13937 no_entry_flag='-bnoentry'
13938 fi
13939
13940 # When large executables or shared objects are built, AIX ld can
13941 # have problems creating the table of contents. If linking a library
13942 # or program results in "error TOC overflow" add -mminimal-toc to
13943 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
13944 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13945
13946 archive_cmds=''
13947 hardcode_direct=yes
13948 hardcode_direct_absolute=yes
13949 hardcode_libdir_separator=':'
13950 link_all_deplibs=yes
13951 file_list_spec='$wl-f,'
13952 case $with_aix_soname,$aix_use_runtimelinking in
13953 aix,*) ;; # traditional, no import file
13954 svr4,* | *,yes) # use import file
13955 # The Import File defines what to hardcode.
13956 hardcode_direct=no
13957 hardcode_direct_absolute=no
13958 ;;
13959 esac
13960
13961 if test yes = "$GCC"; then
13962 case $host_os in aix4.[012]|aix4.[012].*)
13963 # We only want to do this on AIX 4.2 and lower, the check
13964 # below for broken collect2 doesn't work under 4.3+
13965 collect2name=`$CC -print-prog-name=collect2`
13966 if test -f "$collect2name" &&
13967 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13968 then
13969 # We have reworked collect2
13970 :
13971 else
13972 # We have old collect2
13973 hardcode_direct=unsupported
13974 # It fails to find uninstalled libraries when the uninstalled
13975 # path is not listed in the libpath. Setting hardcode_minus_L
13976 # to unsupported forces relinking
13977 hardcode_minus_L=yes
13978 hardcode_libdir_flag_spec='-L$libdir'
13979 hardcode_libdir_separator=
13980 fi
13981 ;;
13982 esac
13983 shared_flag='-shared'
13984 if test yes = "$aix_use_runtimelinking"; then
13985 shared_flag="$shared_flag "'$wl-G'
13986 fi
13987 # Need to ensure runtime linking is disabled for the traditional
13988 # shared library, or the linker may eventually find shared libraries
13989 # /with/ Import File - we do not want to mix them.
13990 shared_flag_aix='-shared'
13991 shared_flag_svr4='-shared $wl-G'
13992 else
13993 # not using gcc
13994 if test ia64 = "$host_cpu"; then
13995 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13996 # chokes on -Wl,-G. The following line is correct:
13997 shared_flag='-G'
13998 else
13999 if test yes = "$aix_use_runtimelinking"; then
14000 shared_flag='$wl-G'
14001 else
14002 shared_flag='$wl-bM:SRE'
14003 fi
14004 shared_flag_aix='$wl-bM:SRE'
14005 shared_flag_svr4='$wl-G'
14006 fi
14007 fi
14008
14009 export_dynamic_flag_spec='$wl-bexpall'
14010 # It seems that -bexpall does not export symbols beginning with
14011 # underscore (_), so it is better to generate a list of symbols to export.
14012 always_export_symbols=yes
14013 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
14014 # Warning - without using the other runtime loading flags (-brtl),
14015 # -berok will link without error, but may produce a broken library.
14016 allow_undefined_flag='-berok'
14017 # Determine the default libpath from the value encoded in an
14018 # empty executable.
14019 if test set = "${lt_cv_aix_libpath+set}"; then
14020 aix_libpath=$lt_cv_aix_libpath
14021 else
14022 if ${lt_cv_aix_libpath_+:} false; then :
14023 $as_echo_n "(cached) " >&6
14024 else
14025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14026 /* end confdefs.h. */
14027
14028 int
14029 main ()
14030 {
14031
14032 ;
14033 return 0;
14034 }
14035 _ACEOF
14036 if ac_fn_c_try_link "$LINENO"; then :
14037
14038 lt_aix_libpath_sed='
14039 /Import File Strings/,/^$/ {
14040 /^0/ {
14041 s/^0 *\([^ ]*\) *$/\1/
14042 p
14043 }
14044 }'
14045 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14046 # Check for a 64-bit object if we didn't find anything.
14047 if test -z "$lt_cv_aix_libpath_"; then
14048 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14049 fi
14050 fi
14051 rm -f core conftest.err conftest.$ac_objext \
14052 conftest$ac_exeext conftest.$ac_ext
14053 if test -z "$lt_cv_aix_libpath_"; then
14054 lt_cv_aix_libpath_=/usr/lib:/lib
14055 fi
14056
14057 fi
14058
14059 aix_libpath=$lt_cv_aix_libpath_
14060 fi
14061
14062 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
14063 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
14064 else
14065 if test ia64 = "$host_cpu"; then
14066 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
14067 allow_undefined_flag="-z nodefs"
14068 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"
14069 else
14070 # Determine the default libpath from the value encoded in an
14071 # empty executable.
14072 if test set = "${lt_cv_aix_libpath+set}"; then
14073 aix_libpath=$lt_cv_aix_libpath
14074 else
14075 if ${lt_cv_aix_libpath_+:} false; then :
14076 $as_echo_n "(cached) " >&6
14077 else
14078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14079 /* end confdefs.h. */
14080
14081 int
14082 main ()
14083 {
14084
14085 ;
14086 return 0;
14087 }
14088 _ACEOF
14089 if ac_fn_c_try_link "$LINENO"; then :
14090
14091 lt_aix_libpath_sed='
14092 /Import File Strings/,/^$/ {
14093 /^0/ {
14094 s/^0 *\([^ ]*\) *$/\1/
14095 p
14096 }
14097 }'
14098 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14099 # Check for a 64-bit object if we didn't find anything.
14100 if test -z "$lt_cv_aix_libpath_"; then
14101 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14102 fi
14103 fi
14104 rm -f core conftest.err conftest.$ac_objext \
14105 conftest$ac_exeext conftest.$ac_ext
14106 if test -z "$lt_cv_aix_libpath_"; then
14107 lt_cv_aix_libpath_=/usr/lib:/lib
14108 fi
14109
14110 fi
14111
14112 aix_libpath=$lt_cv_aix_libpath_
14113 fi
14114
14115 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
14116 # Warning - without using the other run time loading flags,
14117 # -berok will link without error, but may produce a broken library.
14118 no_undefined_flag=' $wl-bernotok'
14119 allow_undefined_flag=' $wl-berok'
14120 if test yes = "$with_gnu_ld"; then
14121 # We only use this code for GNU lds that support --whole-archive.
14122 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
14123 else
14124 # Exported symbols can be pulled into shared objects from archives
14125 whole_archive_flag_spec='$convenience'
14126 fi
14127 archive_cmds_need_lc=yes
14128 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
14129 # -brtl affects multiple linker settings, -berok does not and is overridden later
14130 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
14131 if test svr4 != "$with_aix_soname"; then
14132 # This is similar to how AIX traditionally builds its shared libraries.
14133 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
14134 fi
14135 if test aix != "$with_aix_soname"; then
14136 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
14137 else
14138 # used by -dlpreopen to get the symbols
14139 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
14140 fi
14141 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
14142 fi
14143 fi
14144 ;;
14145
14146 amigaos*)
14147 case $host_cpu in
14148 powerpc)
14149 # see comment about AmigaOS4 .so support
14150 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14151 archive_expsym_cmds=''
14152 ;;
14153 m68k)
14154 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)'
14155 hardcode_libdir_flag_spec='-L$libdir'
14156 hardcode_minus_L=yes
14157 ;;
14158 esac
14159 ;;
14160
14161 bsdi[45]*)
14162 export_dynamic_flag_spec=-rdynamic
14163 ;;
14164
14165 cygwin* | mingw* | pw32* | cegcc*)
14166 # When not using gcc, we currently assume that we are using
14167 # Microsoft Visual C++.
14168 # hardcode_libdir_flag_spec is actually meaningless, as there is
14169 # no search path for DLLs.
14170 case $cc_basename in
14171 cl*)
14172 # Native MSVC
14173 hardcode_libdir_flag_spec=' '
14174 allow_undefined_flag=unsupported
14175 always_export_symbols=yes
14176 file_list_spec='@'
14177 # Tell ltmain to make .lib files, not .a files.
14178 libext=lib
14179 # Tell ltmain to make .dll files, not .so files.
14180 shrext_cmds=.dll
14181 # FIXME: Setting linknames here is a bad hack.
14182 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
14183 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
14184 cp "$export_symbols" "$output_objdir/$soname.def";
14185 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
14186 else
14187 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
14188 fi~
14189 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
14190 linknames='
14191 # The linker will not automatically build a static lib if we build a DLL.
14192 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
14193 enable_shared_with_static_runtimes=yes
14194 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
14195 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
14196 # Don't use ranlib
14197 old_postinstall_cmds='chmod 644 $oldlib'
14198 postlink_cmds='lt_outputfile="@OUTPUT@"~
14199 lt_tool_outputfile="@TOOL_OUTPUT@"~
14200 case $lt_outputfile in
14201 *.exe|*.EXE) ;;
14202 *)
14203 lt_outputfile=$lt_outputfile.exe
14204 lt_tool_outputfile=$lt_tool_outputfile.exe
14205 ;;
14206 esac~
14207 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
14208 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
14209 $RM "$lt_outputfile.manifest";
14210 fi'
14211 ;;
14212 *)
14213 # Assume MSVC wrapper
14214 hardcode_libdir_flag_spec=' '
14215 allow_undefined_flag=unsupported
14216 # Tell ltmain to make .lib files, not .a files.
14217 libext=lib
14218 # Tell ltmain to make .dll files, not .so files.
14219 shrext_cmds=.dll
14220 # FIXME: Setting linknames here is a bad hack.
14221 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
14222 # The linker will automatically build a .lib file if we build a DLL.
14223 old_archive_from_new_cmds='true'
14224 # FIXME: Should let the user specify the lib program.
14225 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
14226 enable_shared_with_static_runtimes=yes
14227 ;;
14228 esac
14229 ;;
14230
14231 darwin* | rhapsody*)
14232
14233
14234 archive_cmds_need_lc=no
14235 hardcode_direct=no
14236 hardcode_automatic=yes
14237 hardcode_shlibpath_var=unsupported
14238 if test yes = "$lt_cv_ld_force_load"; then
14239 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
14240
14241 else
14242 whole_archive_flag_spec=''
14243 fi
14244 link_all_deplibs=yes
14245 allow_undefined_flag=$_lt_dar_allow_undefined
14246 case $cc_basename in
14247 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
14248 *) _lt_dar_can_shared=$GCC ;;
14249 esac
14250 if test yes = "$_lt_dar_can_shared"; then
14251 output_verbose_link_cmd=func_echo_all
14252 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
14253 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
14254 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"
14255 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"
14256
14257 else
14258 ld_shlibs=no
14259 fi
14260
14261 ;;
14262
14263 dgux*)
14264 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14265 hardcode_libdir_flag_spec='-L$libdir'
14266 hardcode_shlibpath_var=no
14267 ;;
14268
14269 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14270 # support. Future versions do this automatically, but an explicit c++rt0.o
14271 # does not break anything, and helps significantly (at the cost of a little
14272 # extra space).
14273 freebsd2.2*)
14274 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
14275 hardcode_libdir_flag_spec='-R$libdir'
14276 hardcode_direct=yes
14277 hardcode_shlibpath_var=no
14278 ;;
14279
14280 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
14281 freebsd2.*)
14282 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14283 hardcode_direct=yes
14284 hardcode_minus_L=yes
14285 hardcode_shlibpath_var=no
14286 ;;
14287
14288 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
14289 freebsd* | dragonfly*)
14290 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14291 hardcode_libdir_flag_spec='-R$libdir'
14292 hardcode_direct=yes
14293 hardcode_shlibpath_var=no
14294 ;;
14295
14296 hpux9*)
14297 if test yes = "$GCC"; then
14298 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
14299 else
14300 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
14301 fi
14302 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
14303 hardcode_libdir_separator=:
14304 hardcode_direct=yes
14305
14306 # hardcode_minus_L: Not really in the search PATH,
14307 # but as the default location of the library.
14308 hardcode_minus_L=yes
14309 export_dynamic_flag_spec='$wl-E'
14310 ;;
14311
14312 hpux10*)
14313 if test yes,no = "$GCC,$with_gnu_ld"; then
14314 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14315 else
14316 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
14317 fi
14318 if test no = "$with_gnu_ld"; then
14319 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
14320 hardcode_libdir_separator=:
14321 hardcode_direct=yes
14322 hardcode_direct_absolute=yes
14323 export_dynamic_flag_spec='$wl-E'
14324 # hardcode_minus_L: Not really in the search PATH,
14325 # but as the default location of the library.
14326 hardcode_minus_L=yes
14327 fi
14328 ;;
14329
14330 hpux11*)
14331 if test yes,no = "$GCC,$with_gnu_ld"; then
14332 case $host_cpu in
14333 hppa*64*)
14334 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
14335 ;;
14336 ia64*)
14337 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
14338 ;;
14339 *)
14340 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14341 ;;
14342 esac
14343 else
14344 case $host_cpu in
14345 hppa*64*)
14346 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
14347 ;;
14348 ia64*)
14349 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
14350 ;;
14351 *)
14352
14353 # Older versions of the 11.00 compiler do not understand -b yet
14354 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
14356 $as_echo_n "checking if $CC understands -b... " >&6; }
14357 if ${lt_cv_prog_compiler__b+:} false; then :
14358 $as_echo_n "(cached) " >&6
14359 else
14360 lt_cv_prog_compiler__b=no
14361 save_LDFLAGS=$LDFLAGS
14362 LDFLAGS="$LDFLAGS -b"
14363 echo "$lt_simple_link_test_code" > conftest.$ac_ext
14364 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14365 # The linker can only warn and ignore the option if not recognized
14366 # So say no if there are warnings
14367 if test -s conftest.err; then
14368 # Append any errors to the config.log.
14369 cat conftest.err 1>&5
14370 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
14371 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14372 if diff conftest.exp conftest.er2 >/dev/null; then
14373 lt_cv_prog_compiler__b=yes
14374 fi
14375 else
14376 lt_cv_prog_compiler__b=yes
14377 fi
14378 fi
14379 $RM -r conftest*
14380 LDFLAGS=$save_LDFLAGS
14381
14382 fi
14383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
14384 $as_echo "$lt_cv_prog_compiler__b" >&6; }
14385
14386 if test yes = "$lt_cv_prog_compiler__b"; then
14387 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14388 else
14389 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
14390 fi
14391
14392 ;;
14393 esac
14394 fi
14395 if test no = "$with_gnu_ld"; then
14396 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
14397 hardcode_libdir_separator=:
14398
14399 case $host_cpu in
14400 hppa*64*|ia64*)
14401 hardcode_direct=no
14402 hardcode_shlibpath_var=no
14403 ;;
14404 *)
14405 hardcode_direct=yes
14406 hardcode_direct_absolute=yes
14407 export_dynamic_flag_spec='$wl-E'
14408
14409 # hardcode_minus_L: Not really in the search PATH,
14410 # but as the default location of the library.
14411 hardcode_minus_L=yes
14412 ;;
14413 esac
14414 fi
14415 ;;
14416
14417 irix5* | irix6* | nonstopux*)
14418 if test yes = "$GCC"; then
14419 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14420 # Try to use the -exported_symbol ld option, if it does not
14421 # work, assume that -exports_file does not work either and
14422 # implicitly export all symbols.
14423 # This should be the same for all languages, so no per-tag cache variable.
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
14425 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
14426 if ${lt_cv_irix_exported_symbol+:} false; then :
14427 $as_echo_n "(cached) " >&6
14428 else
14429 save_LDFLAGS=$LDFLAGS
14430 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
14431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14432 /* end confdefs.h. */
14433 int foo (void) { return 0; }
14434 _ACEOF
14435 if ac_fn_c_try_link "$LINENO"; then :
14436 lt_cv_irix_exported_symbol=yes
14437 else
14438 lt_cv_irix_exported_symbol=no
14439 fi
14440 rm -f core conftest.err conftest.$ac_objext \
14441 conftest$ac_exeext conftest.$ac_ext
14442 LDFLAGS=$save_LDFLAGS
14443 fi
14444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
14445 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
14446 if test yes = "$lt_cv_irix_exported_symbol"; then
14447 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
14448 fi
14449 link_all_deplibs=no
14450 else
14451 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14452 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
14453 fi
14454 archive_cmds_need_lc='no'
14455 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14456 hardcode_libdir_separator=:
14457 inherit_rpath=yes
14458 link_all_deplibs=yes
14459 ;;
14460
14461 linux*)
14462 case $cc_basename in
14463 tcc*)
14464 # Fabrice Bellard et al's Tiny C Compiler
14465 ld_shlibs=yes
14466 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14467 ;;
14468 esac
14469 ;;
14470
14471 netbsd* | netbsdelf*-gnu)
14472 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14473 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
14474 else
14475 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
14476 fi
14477 hardcode_libdir_flag_spec='-R$libdir'
14478 hardcode_direct=yes
14479 hardcode_shlibpath_var=no
14480 ;;
14481
14482 newsos6)
14483 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14484 hardcode_direct=yes
14485 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14486 hardcode_libdir_separator=:
14487 hardcode_shlibpath_var=no
14488 ;;
14489
14490 *nto* | *qnx*)
14491 ;;
14492
14493 openbsd* | bitrig*)
14494 if test -f /usr/libexec/ld.so; then
14495 hardcode_direct=yes
14496 hardcode_shlibpath_var=no
14497 hardcode_direct_absolute=yes
14498 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14499 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14500 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
14501 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
14502 export_dynamic_flag_spec='$wl-E'
14503 else
14504 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14505 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
14506 fi
14507 else
14508 ld_shlibs=no
14509 fi
14510 ;;
14511
14512 os2*)
14513 hardcode_libdir_flag_spec='-L$libdir'
14514 hardcode_minus_L=yes
14515 allow_undefined_flag=unsupported
14516 shrext_cmds=.dll
14517 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14518 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14519 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14520 $ECHO EXPORTS >> $output_objdir/$libname.def~
14521 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
14522 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14523 emximp -o $lib $output_objdir/$libname.def'
14524 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14525 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14526 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14527 $ECHO EXPORTS >> $output_objdir/$libname.def~
14528 prefix_cmds="$SED"~
14529 if test EXPORTS = "`$SED 1q $export_symbols`"; then
14530 prefix_cmds="$prefix_cmds -e 1d";
14531 fi~
14532 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
14533 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
14534 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14535 emximp -o $lib $output_objdir/$libname.def'
14536 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
14537 enable_shared_with_static_runtimes=yes
14538 ;;
14539
14540 osf3*)
14541 if test yes = "$GCC"; then
14542 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
14543 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14544 else
14545 allow_undefined_flag=' -expect_unresolved \*'
14546 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14547 fi
14548 archive_cmds_need_lc='no'
14549 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14550 hardcode_libdir_separator=:
14551 ;;
14552
14553 osf4* | osf5*) # as osf3* with the addition of -msym flag
14554 if test yes = "$GCC"; then
14555 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
14556 archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14557 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14558 else
14559 allow_undefined_flag=' -expect_unresolved \*'
14560 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14561 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~
14562 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
14563
14564 # Both c and cxx compiler support -rpath directly
14565 hardcode_libdir_flag_spec='-rpath $libdir'
14566 fi
14567 archive_cmds_need_lc='no'
14568 hardcode_libdir_separator=:
14569 ;;
14570
14571 solaris*)
14572 no_undefined_flag=' -z defs'
14573 if test yes = "$GCC"; then
14574 wlarc='$wl'
14575 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
14576 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14577 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
14578 else
14579 case `$CC -V 2>&1` in
14580 *"Compilers 5.0"*)
14581 wlarc=''
14582 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
14583 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14584 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
14585 ;;
14586 *)
14587 wlarc='$wl'
14588 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
14589 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14590 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
14591 ;;
14592 esac
14593 fi
14594 hardcode_libdir_flag_spec='-R$libdir'
14595 hardcode_shlibpath_var=no
14596 case $host_os in
14597 solaris2.[0-5] | solaris2.[0-5].*) ;;
14598 *)
14599 # The compiler driver will combine and reorder linker options,
14600 # but understands '-z linker_flag'. GCC discards it without '$wl',
14601 # but is careful enough not to reorder.
14602 # Supported since Solaris 2.6 (maybe 2.5.1?)
14603 if test yes = "$GCC"; then
14604 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
14605 else
14606 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
14607 fi
14608 ;;
14609 esac
14610 link_all_deplibs=yes
14611 ;;
14612
14613 sunos4*)
14614 if test sequent = "$host_vendor"; then
14615 # Use $CC to link under sequent, because it throws in some extra .o
14616 # files that make .init and .fini sections work.
14617 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
14618 else
14619 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
14620 fi
14621 hardcode_libdir_flag_spec='-L$libdir'
14622 hardcode_direct=yes
14623 hardcode_minus_L=yes
14624 hardcode_shlibpath_var=no
14625 ;;
14626
14627 sysv4)
14628 case $host_vendor in
14629 sni)
14630 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14631 hardcode_direct=yes # is this really true???
14632 ;;
14633 siemens)
14634 ## LD is ld it makes a PLAMLIB
14635 ## CC just makes a GrossModule.
14636 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
14637 reload_cmds='$CC -r -o $output$reload_objs'
14638 hardcode_direct=no
14639 ;;
14640 motorola)
14641 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14642 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
14643 ;;
14644 esac
14645 runpath_var='LD_RUN_PATH'
14646 hardcode_shlibpath_var=no
14647 ;;
14648
14649 sysv4.3*)
14650 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14651 hardcode_shlibpath_var=no
14652 export_dynamic_flag_spec='-Bexport'
14653 ;;
14654
14655 sysv4*MP*)
14656 if test -d /usr/nec; then
14657 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14658 hardcode_shlibpath_var=no
14659 runpath_var=LD_RUN_PATH
14660 hardcode_runpath_var=yes
14661 ld_shlibs=yes
14662 fi
14663 ;;
14664
14665 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
14666 no_undefined_flag='$wl-z,text'
14667 archive_cmds_need_lc=no
14668 hardcode_shlibpath_var=no
14669 runpath_var='LD_RUN_PATH'
14670
14671 if test yes = "$GCC"; then
14672 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14673 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14674 else
14675 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14676 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14677 fi
14678 ;;
14679
14680 sysv5* | sco3.2v5* | sco5v6*)
14681 # Note: We CANNOT use -z defs as we might desire, because we do not
14682 # link with -lc, and that would cause any symbols used from libc to
14683 # always be unresolved, which means just about no library would
14684 # ever link correctly. If we're not using GNU ld we use -z text
14685 # though, which does catch some bad symbols but isn't as heavy-handed
14686 # as -z defs.
14687 no_undefined_flag='$wl-z,text'
14688 allow_undefined_flag='$wl-z,nodefs'
14689 archive_cmds_need_lc=no
14690 hardcode_shlibpath_var=no
14691 hardcode_libdir_flag_spec='$wl-R,$libdir'
14692 hardcode_libdir_separator=':'
14693 link_all_deplibs=yes
14694 export_dynamic_flag_spec='$wl-Bexport'
14695 runpath_var='LD_RUN_PATH'
14696
14697 if test yes = "$GCC"; then
14698 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14699 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14700 else
14701 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14702 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14703 fi
14704 ;;
14705
14706 uts4*)
14707 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14708 hardcode_libdir_flag_spec='-L$libdir'
14709 hardcode_shlibpath_var=no
14710 ;;
14711
14712 *)
14713 ld_shlibs=no
14714 ;;
14715 esac
14716
14717 if test sni = "$host_vendor"; then
14718 case $host in
14719 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
14720 export_dynamic_flag_spec='$wl-Blargedynsym'
14721 ;;
14722 esac
14723 fi
14724 fi
14725
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
14727 $as_echo "$ld_shlibs" >&6; }
14728 test no = "$ld_shlibs" && can_build_shared=no
14729
14730 with_gnu_ld=$with_gnu_ld
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746 #
14747 # Do we need to explicitly link libc?
14748 #
14749 case "x$archive_cmds_need_lc" in
14750 x|xyes)
14751 # Assume -lc should be added
14752 archive_cmds_need_lc=yes
14753
14754 if test yes,yes = "$GCC,$enable_shared"; then
14755 case $archive_cmds in
14756 *'~'*)
14757 # FIXME: we may have to deal with multi-command sequences.
14758 ;;
14759 '$CC '*)
14760 # Test whether the compiler implicitly links with -lc since on some
14761 # systems, -lgcc has to come before -lc. If gcc already passes -lc
14762 # to ld, don't add -lc before -lgcc.
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
14764 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
14765 if ${lt_cv_archive_cmds_need_lc+:} false; then :
14766 $as_echo_n "(cached) " >&6
14767 else
14768 $RM conftest*
14769 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14770
14771 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14772 (eval $ac_compile) 2>&5
14773 ac_status=$?
14774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14775 test $ac_status = 0; } 2>conftest.err; then
14776 soname=conftest
14777 lib=conftest
14778 libobjs=conftest.$ac_objext
14779 deplibs=
14780 wl=$lt_prog_compiler_wl
14781 pic_flag=$lt_prog_compiler_pic
14782 compiler_flags=-v
14783 linker_flags=-v
14784 verstring=
14785 output_objdir=.
14786 libname=conftest
14787 lt_save_allow_undefined_flag=$allow_undefined_flag
14788 allow_undefined_flag=
14789 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
14790 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
14791 ac_status=$?
14792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14793 test $ac_status = 0; }
14794 then
14795 lt_cv_archive_cmds_need_lc=no
14796 else
14797 lt_cv_archive_cmds_need_lc=yes
14798 fi
14799 allow_undefined_flag=$lt_save_allow_undefined_flag
14800 else
14801 cat conftest.err 1>&5
14802 fi
14803 $RM conftest*
14804
14805 fi
14806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
14807 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
14808 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
14809 ;;
14810 esac
14811 fi
14812 ;;
14813 esac
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14967 $as_echo_n "checking dynamic linker characteristics... " >&6; }
14968
14969 if test yes = "$GCC"; then
14970 case $host_os in
14971 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
14972 *) lt_awk_arg='/^libraries:/' ;;
14973 esac
14974 case $host_os in
14975 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
14976 *) lt_sed_strip_eq='s|=/|/|g' ;;
14977 esac
14978 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
14979 case $lt_search_path_spec in
14980 *\;*)
14981 # if the path contains ";" then we assume it to be the separator
14982 # otherwise default to the standard path separator (i.e. ":") - it is
14983 # assumed that no part of a normal pathname contains ";" but that should
14984 # okay in the real world where ";" in dirpaths is itself problematic.
14985 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
14986 ;;
14987 *)
14988 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
14989 ;;
14990 esac
14991 # Ok, now we have the path, separated by spaces, we can step through it
14992 # and add multilib dir if necessary...
14993 lt_tmp_lt_search_path_spec=
14994 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
14995 # ...but if some path component already ends with the multilib dir we assume
14996 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
14997 case "$lt_multi_os_dir; $lt_search_path_spec " in
14998 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
14999 lt_multi_os_dir=
15000 ;;
15001 esac
15002 for lt_sys_path in $lt_search_path_spec; do
15003 if test -d "$lt_sys_path$lt_multi_os_dir"; then
15004 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
15005 elif test -n "$lt_multi_os_dir"; then
15006 test -d "$lt_sys_path" && \
15007 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
15008 fi
15009 done
15010 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
15011 BEGIN {RS = " "; FS = "/|\n";} {
15012 lt_foo = "";
15013 lt_count = 0;
15014 for (lt_i = NF; lt_i > 0; lt_i--) {
15015 if ($lt_i != "" && $lt_i != ".") {
15016 if ($lt_i == "..") {
15017 lt_count++;
15018 } else {
15019 if (lt_count == 0) {
15020 lt_foo = "/" $lt_i lt_foo;
15021 } else {
15022 lt_count--;
15023 }
15024 }
15025 }
15026 }
15027 if (lt_foo != "") { lt_freq[lt_foo]++; }
15028 if (lt_freq[lt_foo] == 1) { print lt_foo; }
15029 }'`
15030 # AWK program above erroneously prepends '/' to C:/dos/paths
15031 # for these hosts.
15032 case $host_os in
15033 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
15034 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
15035 esac
15036 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
15037 else
15038 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
15039 fi
15040 library_names_spec=
15041 libname_spec='lib$name'
15042 soname_spec=
15043 shrext_cmds=.so
15044 postinstall_cmds=
15045 postuninstall_cmds=
15046 finish_cmds=
15047 finish_eval=
15048 shlibpath_var=
15049 shlibpath_overrides_runpath=unknown
15050 version_type=none
15051 dynamic_linker="$host_os ld.so"
15052 sys_lib_dlsearch_path_spec="/lib /usr/lib"
15053 need_lib_prefix=unknown
15054 hardcode_into_libs=no
15055
15056 # when you set need_version to no, make sure it does not cause -set_version
15057 # flags to be left without arguments
15058 need_version=unknown
15059
15060
15061
15062 case $host_os in
15063 aix3*)
15064 version_type=linux # correct to gnu/linux during the next big refactor
15065 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
15066 shlibpath_var=LIBPATH
15067
15068 # AIX 3 has no versioning support, so we append a major version to the name.
15069 soname_spec='$libname$release$shared_ext$major'
15070 ;;
15071
15072 aix[4-9]*)
15073 version_type=linux # correct to gnu/linux during the next big refactor
15074 need_lib_prefix=no
15075 need_version=no
15076 hardcode_into_libs=yes
15077 if test ia64 = "$host_cpu"; then
15078 # AIX 5 supports IA64
15079 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
15080 shlibpath_var=LD_LIBRARY_PATH
15081 else
15082 # With GCC up to 2.95.x, collect2 would create an import file
15083 # for dependence libraries. The import file would start with
15084 # the line '#! .'. This would cause the generated library to
15085 # depend on '.', always an invalid library. This was fixed in
15086 # development snapshots of GCC prior to 3.0.
15087 case $host_os in
15088 aix4 | aix4.[01] | aix4.[01].*)
15089 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
15090 echo ' yes '
15091 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
15092 :
15093 else
15094 can_build_shared=no
15095 fi
15096 ;;
15097 esac
15098 # Using Import Files as archive members, it is possible to support
15099 # filename-based versioning of shared library archives on AIX. While
15100 # this would work for both with and without runtime linking, it will
15101 # prevent static linking of such archives. So we do filename-based
15102 # shared library versioning with .so extension only, which is used
15103 # when both runtime linking and shared linking is enabled.
15104 # Unfortunately, runtime linking may impact performance, so we do
15105 # not want this to be the default eventually. Also, we use the
15106 # versioned .so libs for executables only if there is the -brtl
15107 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
15108 # To allow for filename-based versioning support, we need to create
15109 # libNAME.so.V as an archive file, containing:
15110 # *) an Import File, referring to the versioned filename of the
15111 # archive as well as the shared archive member, telling the
15112 # bitwidth (32 or 64) of that shared object, and providing the
15113 # list of exported symbols of that shared object, eventually
15114 # decorated with the 'weak' keyword
15115 # *) the shared object with the F_LOADONLY flag set, to really avoid
15116 # it being seen by the linker.
15117 # At run time we better use the real file rather than another symlink,
15118 # but for link time we create the symlink libNAME.so -> libNAME.so.V
15119
15120 case $with_aix_soname,$aix_use_runtimelinking in
15121 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
15122 # soname into executable. Probably we can add versioning support to
15123 # collect2, so additional links can be useful in future.
15124 aix,yes) # traditional libtool
15125 dynamic_linker='AIX unversionable lib.so'
15126 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
15127 # instead of lib<name>.a to let people know that these are not
15128 # typical AIX shared libraries.
15129 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15130 ;;
15131 aix,no) # traditional AIX only
15132 dynamic_linker='AIX lib.a(lib.so.V)'
15133 # We preserve .a as extension for shared libraries through AIX4.2
15134 # and later when we are not doing run time linking.
15135 library_names_spec='$libname$release.a $libname.a'
15136 soname_spec='$libname$release$shared_ext$major'
15137 ;;
15138 svr4,*) # full svr4 only
15139 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
15140 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
15141 # We do not specify a path in Import Files, so LIBPATH fires.
15142 shlibpath_overrides_runpath=yes
15143 ;;
15144 *,yes) # both, prefer svr4
15145 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
15146 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
15147 # unpreferred sharedlib libNAME.a needs extra handling
15148 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
15149 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
15150 # We do not specify a path in Import Files, so LIBPATH fires.
15151 shlibpath_overrides_runpath=yes
15152 ;;
15153 *,no) # both, prefer aix
15154 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
15155 library_names_spec='$libname$release.a $libname.a'
15156 soname_spec='$libname$release$shared_ext$major'
15157 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
15158 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
15159 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
15160 ;;
15161 esac
15162 shlibpath_var=LIBPATH
15163 fi
15164 ;;
15165
15166 amigaos*)
15167 case $host_cpu in
15168 powerpc)
15169 # Since July 2007 AmigaOS4 officially supports .so libraries.
15170 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
15171 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15172 ;;
15173 m68k)
15174 library_names_spec='$libname.ixlibrary $libname.a'
15175 # Create ${libname}_ixlibrary.a entries in /sys/libs.
15176 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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'
15177 ;;
15178 esac
15179 ;;
15180
15181 beos*)
15182 library_names_spec='$libname$shared_ext'
15183 dynamic_linker="$host_os ld.so"
15184 shlibpath_var=LIBRARY_PATH
15185 ;;
15186
15187 bsdi[45]*)
15188 version_type=linux # correct to gnu/linux during the next big refactor
15189 need_version=no
15190 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15191 soname_spec='$libname$release$shared_ext$major'
15192 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
15193 shlibpath_var=LD_LIBRARY_PATH
15194 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
15195 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
15196 # the default ld.so.conf also contains /usr/contrib/lib and
15197 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
15198 # libtool to hard-code these into programs
15199 ;;
15200
15201 cygwin* | mingw* | pw32* | cegcc*)
15202 version_type=windows
15203 shrext_cmds=.dll
15204 need_version=no
15205 need_lib_prefix=no
15206
15207 case $GCC,$cc_basename in
15208 yes,*)
15209 # gcc
15210 library_names_spec='$libname.dll.a'
15211 # DLL is installed to $(libdir)/../bin by postinstall_cmds
15212 postinstall_cmds='base_file=`basename \$file`~
15213 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
15214 dldir=$destdir/`dirname \$dlpath`~
15215 test -d \$dldir || mkdir -p \$dldir~
15216 $install_prog $dir/$dlname \$dldir/$dlname~
15217 chmod a+x \$dldir/$dlname~
15218 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
15219 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
15220 fi'
15221 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15222 dlpath=$dir/\$dldll~
15223 $RM \$dlpath'
15224 shlibpath_overrides_runpath=yes
15225
15226 case $host_os in
15227 cygwin*)
15228 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
15229 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15230
15231 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
15232 ;;
15233 mingw* | cegcc*)
15234 # MinGW DLLs use traditional 'lib' prefix
15235 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15236 ;;
15237 pw32*)
15238 # pw32 DLLs use 'pw' prefix rather than 'lib'
15239 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15240 ;;
15241 esac
15242 dynamic_linker='Win32 ld.exe'
15243 ;;
15244
15245 *,cl*)
15246 # Native MSVC
15247 libname_spec='$name'
15248 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15249 library_names_spec='$libname.dll.lib'
15250
15251 case $build_os in
15252 mingw*)
15253 sys_lib_search_path_spec=
15254 lt_save_ifs=$IFS
15255 IFS=';'
15256 for lt_path in $LIB
15257 do
15258 IFS=$lt_save_ifs
15259 # Let DOS variable expansion print the short 8.3 style file name.
15260 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
15261 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
15262 done
15263 IFS=$lt_save_ifs
15264 # Convert to MSYS style.
15265 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
15266 ;;
15267 cygwin*)
15268 # Convert to unix form, then to dos form, then back to unix form
15269 # but this time dos style (no spaces!) so that the unix form looks
15270 # like /cygdrive/c/PROGRA~1:/cygdr...
15271 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
15272 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
15273 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15274 ;;
15275 *)
15276 sys_lib_search_path_spec=$LIB
15277 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
15278 # It is most probably a Windows format PATH.
15279 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
15280 else
15281 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15282 fi
15283 # FIXME: find the short name or the path components, as spaces are
15284 # common. (e.g. "Program Files" -> "PROGRA~1")
15285 ;;
15286 esac
15287
15288 # DLL is installed to $(libdir)/../bin by postinstall_cmds
15289 postinstall_cmds='base_file=`basename \$file`~
15290 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
15291 dldir=$destdir/`dirname \$dlpath`~
15292 test -d \$dldir || mkdir -p \$dldir~
15293 $install_prog $dir/$dlname \$dldir/$dlname'
15294 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15295 dlpath=$dir/\$dldll~
15296 $RM \$dlpath'
15297 shlibpath_overrides_runpath=yes
15298 dynamic_linker='Win32 link.exe'
15299 ;;
15300
15301 *)
15302 # Assume MSVC wrapper
15303 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
15304 dynamic_linker='Win32 ld.exe'
15305 ;;
15306 esac
15307 # FIXME: first we should search . and the directory the executable is in
15308 shlibpath_var=PATH
15309 ;;
15310
15311 darwin* | rhapsody*)
15312 dynamic_linker="$host_os dyld"
15313 version_type=darwin
15314 need_lib_prefix=no
15315 need_version=no
15316 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
15317 soname_spec='$libname$release$major$shared_ext'
15318 shlibpath_overrides_runpath=yes
15319 shlibpath_var=DYLD_LIBRARY_PATH
15320 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15321
15322 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
15323 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
15324 ;;
15325
15326 dgux*)
15327 version_type=linux # correct to gnu/linux during the next big refactor
15328 need_lib_prefix=no
15329 need_version=no
15330 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15331 soname_spec='$libname$release$shared_ext$major'
15332 shlibpath_var=LD_LIBRARY_PATH
15333 ;;
15334
15335 freebsd* | dragonfly*)
15336 # DragonFly does not have aout. When/if they implement a new
15337 # versioning mechanism, adjust this.
15338 if test -x /usr/bin/objformat; then
15339 objformat=`/usr/bin/objformat`
15340 else
15341 case $host_os in
15342 freebsd[23].*) objformat=aout ;;
15343 *) objformat=elf ;;
15344 esac
15345 fi
15346 version_type=freebsd-$objformat
15347 case $version_type in
15348 freebsd-elf*)
15349 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15350 soname_spec='$libname$release$shared_ext$major'
15351 need_version=no
15352 need_lib_prefix=no
15353 ;;
15354 freebsd-*)
15355 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15356 need_version=yes
15357 ;;
15358 esac
15359 shlibpath_var=LD_LIBRARY_PATH
15360 case $host_os in
15361 freebsd2.*)
15362 shlibpath_overrides_runpath=yes
15363 ;;
15364 freebsd3.[01]* | freebsdelf3.[01]*)
15365 shlibpath_overrides_runpath=yes
15366 hardcode_into_libs=yes
15367 ;;
15368 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
15369 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
15370 shlibpath_overrides_runpath=no
15371 hardcode_into_libs=yes
15372 ;;
15373 *) # from 4.6 on, and DragonFly
15374 shlibpath_overrides_runpath=yes
15375 hardcode_into_libs=yes
15376 ;;
15377 esac
15378 ;;
15379
15380 haiku*)
15381 version_type=linux # correct to gnu/linux during the next big refactor
15382 need_lib_prefix=no
15383 need_version=no
15384 dynamic_linker="$host_os runtime_loader"
15385 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15386 soname_spec='$libname$release$shared_ext$major'
15387 shlibpath_var=LIBRARY_PATH
15388 shlibpath_overrides_runpath=no
15389 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
15390 hardcode_into_libs=yes
15391 ;;
15392
15393 hpux9* | hpux10* | hpux11*)
15394 # Give a soname corresponding to the major version so that dld.sl refuses to
15395 # link against other versions.
15396 version_type=sunos
15397 need_lib_prefix=no
15398 need_version=no
15399 case $host_cpu in
15400 ia64*)
15401 shrext_cmds='.so'
15402 hardcode_into_libs=yes
15403 dynamic_linker="$host_os dld.so"
15404 shlibpath_var=LD_LIBRARY_PATH
15405 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15406 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15407 soname_spec='$libname$release$shared_ext$major'
15408 if test 32 = "$HPUX_IA64_MODE"; then
15409 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15410 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
15411 else
15412 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15413 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
15414 fi
15415 ;;
15416 hppa*64*)
15417 shrext_cmds='.sl'
15418 hardcode_into_libs=yes
15419 dynamic_linker="$host_os dld.sl"
15420 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
15421 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15422 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15423 soname_spec='$libname$release$shared_ext$major'
15424 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
15425 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15426 ;;
15427 *)
15428 shrext_cmds='.sl'
15429 dynamic_linker="$host_os dld.sl"
15430 shlibpath_var=SHLIB_PATH
15431 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15432 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15433 soname_spec='$libname$release$shared_ext$major'
15434 ;;
15435 esac
15436 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
15437 postinstall_cmds='chmod 555 $lib'
15438 # or fails outright, so override atomically:
15439 install_override_mode=555
15440 ;;
15441
15442 interix[3-9]*)
15443 version_type=linux # correct to gnu/linux during the next big refactor
15444 need_lib_prefix=no
15445 need_version=no
15446 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15447 soname_spec='$libname$release$shared_ext$major'
15448 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15449 shlibpath_var=LD_LIBRARY_PATH
15450 shlibpath_overrides_runpath=no
15451 hardcode_into_libs=yes
15452 ;;
15453
15454 irix5* | irix6* | nonstopux*)
15455 case $host_os in
15456 nonstopux*) version_type=nonstopux ;;
15457 *)
15458 if test yes = "$lt_cv_prog_gnu_ld"; then
15459 version_type=linux # correct to gnu/linux during the next big refactor
15460 else
15461 version_type=irix
15462 fi ;;
15463 esac
15464 need_lib_prefix=no
15465 need_version=no
15466 soname_spec='$libname$release$shared_ext$major'
15467 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
15468 case $host_os in
15469 irix5* | nonstopux*)
15470 libsuff= shlibsuff=
15471 ;;
15472 *)
15473 case $LD in # libtool.m4 will add one of these switches to LD
15474 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15475 libsuff= shlibsuff= libmagic=32-bit;;
15476 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15477 libsuff=32 shlibsuff=N32 libmagic=N32;;
15478 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15479 libsuff=64 shlibsuff=64 libmagic=64-bit;;
15480 *) libsuff= shlibsuff= libmagic=never-match;;
15481 esac
15482 ;;
15483 esac
15484 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15485 shlibpath_overrides_runpath=no
15486 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
15487 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
15488 hardcode_into_libs=yes
15489 ;;
15490
15491 # No shared lib support for Linux oldld, aout, or coff.
15492 linux*oldld* | linux*aout* | linux*coff*)
15493 dynamic_linker=no
15494 ;;
15495
15496 linux*android*)
15497 version_type=none # Android doesn't support versioned libraries.
15498 need_lib_prefix=no
15499 need_version=no
15500 library_names_spec='$libname$release$shared_ext'
15501 soname_spec='$libname$release$shared_ext'
15502 finish_cmds=
15503 shlibpath_var=LD_LIBRARY_PATH
15504 shlibpath_overrides_runpath=yes
15505
15506 # This implies no fast_install, which is unacceptable.
15507 # Some rework will be needed to allow for fast_install
15508 # before this can be enabled.
15509 hardcode_into_libs=yes
15510
15511 dynamic_linker='Android linker'
15512 # Don't embed -rpath directories since the linker doesn't support them.
15513 hardcode_libdir_flag_spec='-L$libdir'
15514 ;;
15515
15516 # This must be glibc/ELF.
15517 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15518 version_type=linux # correct to gnu/linux during the next big refactor
15519 need_lib_prefix=no
15520 need_version=no
15521 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15522 soname_spec='$libname$release$shared_ext$major'
15523 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15524 shlibpath_var=LD_LIBRARY_PATH
15525 shlibpath_overrides_runpath=no
15526
15527 # Some binutils ld are patched to set DT_RUNPATH
15528 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
15529 $as_echo_n "(cached) " >&6
15530 else
15531 lt_cv_shlibpath_overrides_runpath=no
15532 save_LDFLAGS=$LDFLAGS
15533 save_libdir=$libdir
15534 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
15535 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
15536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15537 /* end confdefs.h. */
15538
15539 int
15540 main ()
15541 {
15542
15543 ;
15544 return 0;
15545 }
15546 _ACEOF
15547 if ac_fn_c_try_link "$LINENO"; then :
15548 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
15549 lt_cv_shlibpath_overrides_runpath=yes
15550 fi
15551 fi
15552 rm -f core conftest.err conftest.$ac_objext \
15553 conftest$ac_exeext conftest.$ac_ext
15554 LDFLAGS=$save_LDFLAGS
15555 libdir=$save_libdir
15556
15557 fi
15558
15559 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
15560
15561 # This implies no fast_install, which is unacceptable.
15562 # Some rework will be needed to allow for fast_install
15563 # before this can be enabled.
15564 hardcode_into_libs=yes
15565
15566 # Ideally, we could use ldconfig to report *all* directores which are
15567 # searched for libraries, however this is still not possible. Aside from not
15568 # being certain /sbin/ldconfig is available, command
15569 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
15570 # even though it is searched at run-time. Try to do the best guess by
15571 # appending ld.so.conf contents (and includes) to the search path.
15572 if test -f /etc/ld.so.conf; then
15573 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;s/"//g;/^$/d' | tr '\n' ' '`
15574 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
15575 fi
15576
15577 # We used to test for /lib/ld.so.1 and disable shared libraries on
15578 # powerpc, because MkLinux only supported shared libraries with the
15579 # GNU dynamic linker. Since this was broken with cross compilers,
15580 # most powerpc-linux boxes support dynamic linking these days and
15581 # people can always --disable-shared, the test was removed, and we
15582 # assume the GNU/Linux dynamic linker is in use.
15583 dynamic_linker='GNU/Linux ld.so'
15584 ;;
15585
15586 netbsdelf*-gnu)
15587 version_type=linux
15588 need_lib_prefix=no
15589 need_version=no
15590 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15591 soname_spec='${libname}${release}${shared_ext}$major'
15592 shlibpath_var=LD_LIBRARY_PATH
15593 shlibpath_overrides_runpath=no
15594 hardcode_into_libs=yes
15595 dynamic_linker='NetBSD ld.elf_so'
15596 ;;
15597
15598 netbsd*)
15599 version_type=sunos
15600 need_lib_prefix=no
15601 need_version=no
15602 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15603 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15604 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15605 dynamic_linker='NetBSD (a.out) ld.so'
15606 else
15607 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15608 soname_spec='$libname$release$shared_ext$major'
15609 dynamic_linker='NetBSD ld.elf_so'
15610 fi
15611 shlibpath_var=LD_LIBRARY_PATH
15612 shlibpath_overrides_runpath=yes
15613 hardcode_into_libs=yes
15614 ;;
15615
15616 newsos6)
15617 version_type=linux # correct to gnu/linux during the next big refactor
15618 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15619 shlibpath_var=LD_LIBRARY_PATH
15620 shlibpath_overrides_runpath=yes
15621 ;;
15622
15623 *nto* | *qnx*)
15624 version_type=qnx
15625 need_lib_prefix=no
15626 need_version=no
15627 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15628 soname_spec='$libname$release$shared_ext$major'
15629 shlibpath_var=LD_LIBRARY_PATH
15630 shlibpath_overrides_runpath=no
15631 hardcode_into_libs=yes
15632 dynamic_linker='ldqnx.so'
15633 ;;
15634
15635 openbsd* | bitrig*)
15636 version_type=sunos
15637 sys_lib_dlsearch_path_spec=/usr/lib
15638 need_lib_prefix=no
15639 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
15640 need_version=no
15641 else
15642 need_version=yes
15643 fi
15644 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15645 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15646 shlibpath_var=LD_LIBRARY_PATH
15647 shlibpath_overrides_runpath=yes
15648 ;;
15649
15650 os2*)
15651 libname_spec='$name'
15652 version_type=windows
15653 shrext_cmds=.dll
15654 need_version=no
15655 need_lib_prefix=no
15656 # OS/2 can only load a DLL with a base name of 8 characters or less.
15657 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
15658 v=$($ECHO $release$versuffix | tr -d .-);
15659 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
15660 $ECHO $n$v`$shared_ext'
15661 library_names_spec='${libname}_dll.$libext'
15662 dynamic_linker='OS/2 ld.exe'
15663 shlibpath_var=BEGINLIBPATH
15664 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
15665 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15666 postinstall_cmds='base_file=`basename \$file`~
15667 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
15668 dldir=$destdir/`dirname \$dlpath`~
15669 test -d \$dldir || mkdir -p \$dldir~
15670 $install_prog $dir/$dlname \$dldir/$dlname~
15671 chmod a+x \$dldir/$dlname~
15672 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
15673 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
15674 fi'
15675 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
15676 dlpath=$dir/\$dldll~
15677 $RM \$dlpath'
15678 ;;
15679
15680 osf3* | osf4* | osf5*)
15681 version_type=osf
15682 need_lib_prefix=no
15683 need_version=no
15684 soname_spec='$libname$release$shared_ext$major'
15685 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15686 shlibpath_var=LD_LIBRARY_PATH
15687 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15688 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15689 ;;
15690
15691 rdos*)
15692 dynamic_linker=no
15693 ;;
15694
15695 solaris*)
15696 version_type=linux # correct to gnu/linux during the next big refactor
15697 need_lib_prefix=no
15698 need_version=no
15699 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15700 soname_spec='$libname$release$shared_ext$major'
15701 shlibpath_var=LD_LIBRARY_PATH
15702 shlibpath_overrides_runpath=yes
15703 hardcode_into_libs=yes
15704 # ldd complains unless libraries are executable
15705 postinstall_cmds='chmod +x $lib'
15706 ;;
15707
15708 sunos4*)
15709 version_type=sunos
15710 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15711 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15712 shlibpath_var=LD_LIBRARY_PATH
15713 shlibpath_overrides_runpath=yes
15714 if test yes = "$with_gnu_ld"; then
15715 need_lib_prefix=no
15716 fi
15717 need_version=yes
15718 ;;
15719
15720 sysv4 | sysv4.3*)
15721 version_type=linux # correct to gnu/linux during the next big refactor
15722 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15723 soname_spec='$libname$release$shared_ext$major'
15724 shlibpath_var=LD_LIBRARY_PATH
15725 case $host_vendor in
15726 sni)
15727 shlibpath_overrides_runpath=no
15728 need_lib_prefix=no
15729 runpath_var=LD_RUN_PATH
15730 ;;
15731 siemens)
15732 need_lib_prefix=no
15733 ;;
15734 motorola)
15735 need_lib_prefix=no
15736 need_version=no
15737 shlibpath_overrides_runpath=no
15738 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15739 ;;
15740 esac
15741 ;;
15742
15743 sysv4*MP*)
15744 if test -d /usr/nec; then
15745 version_type=linux # correct to gnu/linux during the next big refactor
15746 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
15747 soname_spec='$libname$shared_ext.$major'
15748 shlibpath_var=LD_LIBRARY_PATH
15749 fi
15750 ;;
15751
15752 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15753 version_type=sco
15754 need_lib_prefix=no
15755 need_version=no
15756 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
15757 soname_spec='$libname$release$shared_ext$major'
15758 shlibpath_var=LD_LIBRARY_PATH
15759 shlibpath_overrides_runpath=yes
15760 hardcode_into_libs=yes
15761 if test yes = "$with_gnu_ld"; then
15762 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
15763 else
15764 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
15765 case $host_os in
15766 sco3.2v5*)
15767 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
15768 ;;
15769 esac
15770 fi
15771 sys_lib_dlsearch_path_spec='/usr/lib'
15772 ;;
15773
15774 tpf*)
15775 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
15776 version_type=linux # correct to gnu/linux during the next big refactor
15777 need_lib_prefix=no
15778 need_version=no
15779 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15780 shlibpath_var=LD_LIBRARY_PATH
15781 shlibpath_overrides_runpath=no
15782 hardcode_into_libs=yes
15783 ;;
15784
15785 uts4*)
15786 version_type=linux # correct to gnu/linux during the next big refactor
15787 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15788 soname_spec='$libname$release$shared_ext$major'
15789 shlibpath_var=LD_LIBRARY_PATH
15790 ;;
15791
15792 *)
15793 dynamic_linker=no
15794 ;;
15795 esac
15796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
15797 $as_echo "$dynamic_linker" >&6; }
15798 test no = "$dynamic_linker" && can_build_shared=no
15799
15800 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15801 if test yes = "$GCC"; then
15802 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15803 fi
15804
15805 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
15806 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
15807 fi
15808
15809 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
15810 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
15811 fi
15812
15813 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
15814 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
15815
15816 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
15817 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
15818
15819 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
15820 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
15919 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
15920 hardcode_action=
15921 if test -n "$hardcode_libdir_flag_spec" ||
15922 test -n "$runpath_var" ||
15923 test yes = "$hardcode_automatic"; then
15924
15925 # We can hardcode non-existent directories.
15926 if test no != "$hardcode_direct" &&
15927 # If the only mechanism to avoid hardcoding is shlibpath_var, we
15928 # have to relink, otherwise we might link with an installed library
15929 # when we should be linking with a yet-to-be-installed one
15930 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
15931 test no != "$hardcode_minus_L"; then
15932 # Linking always hardcodes the temporary library directory.
15933 hardcode_action=relink
15934 else
15935 # We can link without hardcoding, and we can hardcode nonexisting dirs.
15936 hardcode_action=immediate
15937 fi
15938 else
15939 # We cannot hardcode anything, or else we can only hardcode existing
15940 # directories.
15941 hardcode_action=unsupported
15942 fi
15943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
15944 $as_echo "$hardcode_action" >&6; }
15945
15946 if test relink = "$hardcode_action" ||
15947 test yes = "$inherit_rpath"; then
15948 # Fast installation is not supported
15949 enable_fast_install=no
15950 elif test yes = "$shlibpath_overrides_runpath" ||
15951 test no = "$enable_shared"; then
15952 # Fast installation is not necessary
15953 enable_fast_install=needless
15954 fi
15955
15956
15957
15958
15959
15960
15961 if test yes != "$enable_dlopen"; then
15962 enable_dlopen=unknown
15963 enable_dlopen_self=unknown
15964 enable_dlopen_self_static=unknown
15965 else
15966 lt_cv_dlopen=no
15967 lt_cv_dlopen_libs=
15968
15969 case $host_os in
15970 beos*)
15971 lt_cv_dlopen=load_add_on
15972 lt_cv_dlopen_libs=
15973 lt_cv_dlopen_self=yes
15974 ;;
15975
15976 mingw* | pw32* | cegcc*)
15977 lt_cv_dlopen=LoadLibrary
15978 lt_cv_dlopen_libs=
15979 ;;
15980
15981 cygwin*)
15982 lt_cv_dlopen=dlopen
15983 lt_cv_dlopen_libs=
15984 ;;
15985
15986 darwin*)
15987 # if libdl is installed we need to link against it
15988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15989 $as_echo_n "checking for dlopen in -ldl... " >&6; }
15990 if ${ac_cv_lib_dl_dlopen+:} false; then :
15991 $as_echo_n "(cached) " >&6
15992 else
15993 ac_check_lib_save_LIBS=$LIBS
15994 LIBS="-ldl $LIBS"
15995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15996 /* end confdefs.h. */
15997
15998 /* Override any GCC internal prototype to avoid an error.
15999 Use char because int might match the return type of a GCC
16000 builtin and then its argument prototype would still apply. */
16001 #ifdef __cplusplus
16002 extern "C"
16003 #endif
16004 char dlopen ();
16005 int
16006 main ()
16007 {
16008 return dlopen ();
16009 ;
16010 return 0;
16011 }
16012 _ACEOF
16013 if ac_fn_c_try_link "$LINENO"; then :
16014 ac_cv_lib_dl_dlopen=yes
16015 else
16016 ac_cv_lib_dl_dlopen=no
16017 fi
16018 rm -f core conftest.err conftest.$ac_objext \
16019 conftest$ac_exeext conftest.$ac_ext
16020 LIBS=$ac_check_lib_save_LIBS
16021 fi
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16023 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16024 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
16025 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
16026 else
16027
16028 lt_cv_dlopen=dyld
16029 lt_cv_dlopen_libs=
16030 lt_cv_dlopen_self=yes
16031
16032 fi
16033
16034 ;;
16035
16036 tpf*)
16037 # Don't try to run any link tests for TPF. We know it's impossible
16038 # because TPF is a cross-compiler, and we know how we open DSOs.
16039 lt_cv_dlopen=dlopen
16040 lt_cv_dlopen_libs=
16041 lt_cv_dlopen_self=no
16042 ;;
16043
16044 *)
16045 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
16046 if test "x$ac_cv_func_shl_load" = xyes; then :
16047 lt_cv_dlopen=shl_load
16048 else
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
16050 $as_echo_n "checking for shl_load in -ldld... " >&6; }
16051 if ${ac_cv_lib_dld_shl_load+:} false; then :
16052 $as_echo_n "(cached) " >&6
16053 else
16054 ac_check_lib_save_LIBS=$LIBS
16055 LIBS="-ldld $LIBS"
16056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16057 /* end confdefs.h. */
16058
16059 /* Override any GCC internal prototype to avoid an error.
16060 Use char because int might match the return type of a GCC
16061 builtin and then its argument prototype would still apply. */
16062 #ifdef __cplusplus
16063 extern "C"
16064 #endif
16065 char shl_load ();
16066 int
16067 main ()
16068 {
16069 return shl_load ();
16070 ;
16071 return 0;
16072 }
16073 _ACEOF
16074 if ac_fn_c_try_link "$LINENO"; then :
16075 ac_cv_lib_dld_shl_load=yes
16076 else
16077 ac_cv_lib_dld_shl_load=no
16078 fi
16079 rm -f core conftest.err conftest.$ac_objext \
16080 conftest$ac_exeext conftest.$ac_ext
16081 LIBS=$ac_check_lib_save_LIBS
16082 fi
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
16084 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
16085 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
16086 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
16087 else
16088 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16089 if test "x$ac_cv_func_dlopen" = xyes; then :
16090 lt_cv_dlopen=dlopen
16091 else
16092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16093 $as_echo_n "checking for dlopen in -ldl... " >&6; }
16094 if ${ac_cv_lib_dl_dlopen+:} false; then :
16095 $as_echo_n "(cached) " >&6
16096 else
16097 ac_check_lib_save_LIBS=$LIBS
16098 LIBS="-ldl $LIBS"
16099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16100 /* end confdefs.h. */
16101
16102 /* Override any GCC internal prototype to avoid an error.
16103 Use char because int might match the return type of a GCC
16104 builtin and then its argument prototype would still apply. */
16105 #ifdef __cplusplus
16106 extern "C"
16107 #endif
16108 char dlopen ();
16109 int
16110 main ()
16111 {
16112 return dlopen ();
16113 ;
16114 return 0;
16115 }
16116 _ACEOF
16117 if ac_fn_c_try_link "$LINENO"; then :
16118 ac_cv_lib_dl_dlopen=yes
16119 else
16120 ac_cv_lib_dl_dlopen=no
16121 fi
16122 rm -f core conftest.err conftest.$ac_objext \
16123 conftest$ac_exeext conftest.$ac_ext
16124 LIBS=$ac_check_lib_save_LIBS
16125 fi
16126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16127 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16128 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
16129 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
16130 else
16131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
16132 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
16133 if ${ac_cv_lib_svld_dlopen+:} false; then :
16134 $as_echo_n "(cached) " >&6
16135 else
16136 ac_check_lib_save_LIBS=$LIBS
16137 LIBS="-lsvld $LIBS"
16138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16139 /* end confdefs.h. */
16140
16141 /* Override any GCC internal prototype to avoid an error.
16142 Use char because int might match the return type of a GCC
16143 builtin and then its argument prototype would still apply. */
16144 #ifdef __cplusplus
16145 extern "C"
16146 #endif
16147 char dlopen ();
16148 int
16149 main ()
16150 {
16151 return dlopen ();
16152 ;
16153 return 0;
16154 }
16155 _ACEOF
16156 if ac_fn_c_try_link "$LINENO"; then :
16157 ac_cv_lib_svld_dlopen=yes
16158 else
16159 ac_cv_lib_svld_dlopen=no
16160 fi
16161 rm -f core conftest.err conftest.$ac_objext \
16162 conftest$ac_exeext conftest.$ac_ext
16163 LIBS=$ac_check_lib_save_LIBS
16164 fi
16165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
16166 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
16167 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
16168 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
16169 else
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
16171 $as_echo_n "checking for dld_link in -ldld... " >&6; }
16172 if ${ac_cv_lib_dld_dld_link+:} false; then :
16173 $as_echo_n "(cached) " >&6
16174 else
16175 ac_check_lib_save_LIBS=$LIBS
16176 LIBS="-ldld $LIBS"
16177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178 /* end confdefs.h. */
16179
16180 /* Override any GCC internal prototype to avoid an error.
16181 Use char because int might match the return type of a GCC
16182 builtin and then its argument prototype would still apply. */
16183 #ifdef __cplusplus
16184 extern "C"
16185 #endif
16186 char dld_link ();
16187 int
16188 main ()
16189 {
16190 return dld_link ();
16191 ;
16192 return 0;
16193 }
16194 _ACEOF
16195 if ac_fn_c_try_link "$LINENO"; then :
16196 ac_cv_lib_dld_dld_link=yes
16197 else
16198 ac_cv_lib_dld_dld_link=no
16199 fi
16200 rm -f core conftest.err conftest.$ac_objext \
16201 conftest$ac_exeext conftest.$ac_ext
16202 LIBS=$ac_check_lib_save_LIBS
16203 fi
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
16205 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
16206 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
16207 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
16208 fi
16209
16210
16211 fi
16212
16213
16214 fi
16215
16216
16217 fi
16218
16219
16220 fi
16221
16222
16223 fi
16224
16225 ;;
16226 esac
16227
16228 if test no = "$lt_cv_dlopen"; then
16229 enable_dlopen=no
16230 else
16231 enable_dlopen=yes
16232 fi
16233
16234 case $lt_cv_dlopen in
16235 dlopen)
16236 save_CPPFLAGS=$CPPFLAGS
16237 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
16238
16239 save_LDFLAGS=$LDFLAGS
16240 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
16241
16242 save_LIBS=$LIBS
16243 LIBS="$lt_cv_dlopen_libs $LIBS"
16244
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
16246 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
16247 if ${lt_cv_dlopen_self+:} false; then :
16248 $as_echo_n "(cached) " >&6
16249 else
16250 if test yes = "$cross_compiling"; then :
16251 lt_cv_dlopen_self=cross
16252 else
16253 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16254 lt_status=$lt_dlunknown
16255 cat > conftest.$ac_ext <<_LT_EOF
16256 #line $LINENO "configure"
16257 #include "confdefs.h"
16258
16259 #if HAVE_DLFCN_H
16260 #include <dlfcn.h>
16261 #endif
16262
16263 #include <stdio.h>
16264
16265 #ifdef RTLD_GLOBAL
16266 # define LT_DLGLOBAL RTLD_GLOBAL
16267 #else
16268 # ifdef DL_GLOBAL
16269 # define LT_DLGLOBAL DL_GLOBAL
16270 # else
16271 # define LT_DLGLOBAL 0
16272 # endif
16273 #endif
16274
16275 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
16276 find out it does not work in some platform. */
16277 #ifndef LT_DLLAZY_OR_NOW
16278 # ifdef RTLD_LAZY
16279 # define LT_DLLAZY_OR_NOW RTLD_LAZY
16280 # else
16281 # ifdef DL_LAZY
16282 # define LT_DLLAZY_OR_NOW DL_LAZY
16283 # else
16284 # ifdef RTLD_NOW
16285 # define LT_DLLAZY_OR_NOW RTLD_NOW
16286 # else
16287 # ifdef DL_NOW
16288 # define LT_DLLAZY_OR_NOW DL_NOW
16289 # else
16290 # define LT_DLLAZY_OR_NOW 0
16291 # endif
16292 # endif
16293 # endif
16294 # endif
16295 #endif
16296
16297 /* When -fvisibility=hidden is used, assume the code has been annotated
16298 correspondingly for the symbols needed. */
16299 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
16300 int fnord () __attribute__((visibility("default")));
16301 #endif
16302
16303 int fnord () { return 42; }
16304 int main ()
16305 {
16306 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16307 int status = $lt_dlunknown;
16308
16309 if (self)
16310 {
16311 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
16312 else
16313 {
16314 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
16315 else puts (dlerror ());
16316 }
16317 /* dlclose (self); */
16318 }
16319 else
16320 puts (dlerror ());
16321
16322 return status;
16323 }
16324 _LT_EOF
16325 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16326 (eval $ac_link) 2>&5
16327 ac_status=$?
16328 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16329 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
16330 (./conftest; exit; ) >&5 2>/dev/null
16331 lt_status=$?
16332 case x$lt_status in
16333 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
16334 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
16335 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
16336 esac
16337 else :
16338 # compilation failed
16339 lt_cv_dlopen_self=no
16340 fi
16341 fi
16342 rm -fr conftest*
16343
16344
16345 fi
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
16347 $as_echo "$lt_cv_dlopen_self" >&6; }
16348
16349 if test yes = "$lt_cv_dlopen_self"; then
16350 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
16351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
16352 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
16353 if ${lt_cv_dlopen_self_static+:} false; then :
16354 $as_echo_n "(cached) " >&6
16355 else
16356 if test yes = "$cross_compiling"; then :
16357 lt_cv_dlopen_self_static=cross
16358 else
16359 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16360 lt_status=$lt_dlunknown
16361 cat > conftest.$ac_ext <<_LT_EOF
16362 #line $LINENO "configure"
16363 #include "confdefs.h"
16364
16365 #if HAVE_DLFCN_H
16366 #include <dlfcn.h>
16367 #endif
16368
16369 #include <stdio.h>
16370
16371 #ifdef RTLD_GLOBAL
16372 # define LT_DLGLOBAL RTLD_GLOBAL
16373 #else
16374 # ifdef DL_GLOBAL
16375 # define LT_DLGLOBAL DL_GLOBAL
16376 # else
16377 # define LT_DLGLOBAL 0
16378 # endif
16379 #endif
16380
16381 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
16382 find out it does not work in some platform. */
16383 #ifndef LT_DLLAZY_OR_NOW
16384 # ifdef RTLD_LAZY
16385 # define LT_DLLAZY_OR_NOW RTLD_LAZY
16386 # else
16387 # ifdef DL_LAZY
16388 # define LT_DLLAZY_OR_NOW DL_LAZY
16389 # else
16390 # ifdef RTLD_NOW
16391 # define LT_DLLAZY_OR_NOW RTLD_NOW
16392 # else
16393 # ifdef DL_NOW
16394 # define LT_DLLAZY_OR_NOW DL_NOW
16395 # else
16396 # define LT_DLLAZY_OR_NOW 0
16397 # endif
16398 # endif
16399 # endif
16400 # endif
16401 #endif
16402
16403 /* When -fvisibility=hidden is used, assume the code has been annotated
16404 correspondingly for the symbols needed. */
16405 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
16406 int fnord () __attribute__((visibility("default")));
16407 #endif
16408
16409 int fnord () { return 42; }
16410 int main ()
16411 {
16412 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16413 int status = $lt_dlunknown;
16414
16415 if (self)
16416 {
16417 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
16418 else
16419 {
16420 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
16421 else puts (dlerror ());
16422 }
16423 /* dlclose (self); */
16424 }
16425 else
16426 puts (dlerror ());
16427
16428 return status;
16429 }
16430 _LT_EOF
16431 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16432 (eval $ac_link) 2>&5
16433 ac_status=$?
16434 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16435 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
16436 (./conftest; exit; ) >&5 2>/dev/null
16437 lt_status=$?
16438 case x$lt_status in
16439 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
16440 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
16441 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
16442 esac
16443 else :
16444 # compilation failed
16445 lt_cv_dlopen_self_static=no
16446 fi
16447 fi
16448 rm -fr conftest*
16449
16450
16451 fi
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
16453 $as_echo "$lt_cv_dlopen_self_static" >&6; }
16454 fi
16455
16456 CPPFLAGS=$save_CPPFLAGS
16457 LDFLAGS=$save_LDFLAGS
16458 LIBS=$save_LIBS
16459 ;;
16460 esac
16461
16462 case $lt_cv_dlopen_self in
16463 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
16464 *) enable_dlopen_self=unknown ;;
16465 esac
16466
16467 case $lt_cv_dlopen_self_static in
16468 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
16469 *) enable_dlopen_self_static=unknown ;;
16470 esac
16471 fi
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489 striplib=
16490 old_striplib=
16491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
16492 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
16493 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
16494 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
16495 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
16496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16497 $as_echo "yes" >&6; }
16498 else
16499 # FIXME - insert some real tests, host_os isn't really good enough
16500 case $host_os in
16501 darwin*)
16502 if test -n "$STRIP"; then
16503 striplib="$STRIP -x"
16504 old_striplib="$STRIP -S"
16505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16506 $as_echo "yes" >&6; }
16507 else
16508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16509 $as_echo "no" >&6; }
16510 fi
16511 ;;
16512 *)
16513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16514 $as_echo "no" >&6; }
16515 ;;
16516 esac
16517 fi
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530 # Report what library types will actually be built
16531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
16532 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
16533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
16534 $as_echo "$can_build_shared" >&6; }
16535
16536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
16537 $as_echo_n "checking whether to build shared libraries... " >&6; }
16538 test no = "$can_build_shared" && enable_shared=no
16539
16540 # On AIX, shared libraries and static libraries use the same namespace, and
16541 # are all built from PIC.
16542 case $host_os in
16543 aix3*)
16544 test yes = "$enable_shared" && enable_static=no
16545 if test -n "$RANLIB"; then
16546 archive_cmds="$archive_cmds~\$RANLIB \$lib"
16547 postinstall_cmds='$RANLIB $lib'
16548 fi
16549 ;;
16550
16551 aix[4-9]*)
16552 if test ia64 != "$host_cpu"; then
16553 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
16554 yes,aix,yes) ;; # shared object as lib.so file only
16555 yes,svr4,*) ;; # shared object as lib.so archive member only
16556 yes,*) enable_static=no ;; # shared object in lib.a archive as well
16557 esac
16558 fi
16559 ;;
16560 esac
16561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
16562 $as_echo "$enable_shared" >&6; }
16563
16564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
16565 $as_echo_n "checking whether to build static libraries... " >&6; }
16566 # Make sure either enable_shared or enable_static is yes.
16567 test yes = "$enable_shared" || enable_static=yes
16568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
16569 $as_echo "$enable_static" >&6; }
16570
16571
16572
16573
16574 fi
16575 ac_ext=c
16576 ac_cpp='$CPP $CPPFLAGS'
16577 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16578 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16579 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16580
16581 CC=$lt_save_CC
16582
16583 if test -n "$CXX" && ( test no != "$CXX" &&
16584 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
16585 (test g++ != "$CXX"))); then
16586 ac_ext=cpp
16587 ac_cpp='$CXXCPP $CPPFLAGS'
16588 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16589 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16590 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
16592 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
16593 if test -z "$CXXCPP"; then
16594 if ${ac_cv_prog_CXXCPP+:} false; then :
16595 $as_echo_n "(cached) " >&6
16596 else
16597 # Double quotes because CXXCPP needs to be expanded
16598 for CXXCPP in "$CXX -E" "/lib/cpp"
16599 do
16600 ac_preproc_ok=false
16601 for ac_cxx_preproc_warn_flag in '' yes
16602 do
16603 # Use a header file that comes with gcc, so configuring glibc
16604 # with a fresh cross-compiler works.
16605 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16606 # <limits.h> exists even on freestanding compilers.
16607 # On the NeXT, cc -E runs the code through the compiler's parser,
16608 # not just through cpp. "Syntax error" is here to catch this case.
16609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16610 /* end confdefs.h. */
16611 #ifdef __STDC__
16612 # include <limits.h>
16613 #else
16614 # include <assert.h>
16615 #endif
16616 Syntax error
16617 _ACEOF
16618 if ac_fn_cxx_try_cpp "$LINENO"; then :
16619
16620 else
16621 # Broken: fails on valid input.
16622 continue
16623 fi
16624 rm -f conftest.err conftest.i conftest.$ac_ext
16625
16626 # OK, works on sane cases. Now check whether nonexistent headers
16627 # can be detected and how.
16628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16629 /* end confdefs.h. */
16630 #include <ac_nonexistent.h>
16631 _ACEOF
16632 if ac_fn_cxx_try_cpp "$LINENO"; then :
16633 # Broken: success on invalid input.
16634 continue
16635 else
16636 # Passes both tests.
16637 ac_preproc_ok=:
16638 break
16639 fi
16640 rm -f conftest.err conftest.i conftest.$ac_ext
16641
16642 done
16643 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16644 rm -f conftest.i conftest.err conftest.$ac_ext
16645 if $ac_preproc_ok; then :
16646 break
16647 fi
16648
16649 done
16650 ac_cv_prog_CXXCPP=$CXXCPP
16651
16652 fi
16653 CXXCPP=$ac_cv_prog_CXXCPP
16654 else
16655 ac_cv_prog_CXXCPP=$CXXCPP
16656 fi
16657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
16658 $as_echo "$CXXCPP" >&6; }
16659 ac_preproc_ok=false
16660 for ac_cxx_preproc_warn_flag in '' yes
16661 do
16662 # Use a header file that comes with gcc, so configuring glibc
16663 # with a fresh cross-compiler works.
16664 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16665 # <limits.h> exists even on freestanding compilers.
16666 # On the NeXT, cc -E runs the code through the compiler's parser,
16667 # not just through cpp. "Syntax error" is here to catch this case.
16668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16669 /* end confdefs.h. */
16670 #ifdef __STDC__
16671 # include <limits.h>
16672 #else
16673 # include <assert.h>
16674 #endif
16675 Syntax error
16676 _ACEOF
16677 if ac_fn_cxx_try_cpp "$LINENO"; then :
16678
16679 else
16680 # Broken: fails on valid input.
16681 continue
16682 fi
16683 rm -f conftest.err conftest.i conftest.$ac_ext
16684
16685 # OK, works on sane cases. Now check whether nonexistent headers
16686 # can be detected and how.
16687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16688 /* end confdefs.h. */
16689 #include <ac_nonexistent.h>
16690 _ACEOF
16691 if ac_fn_cxx_try_cpp "$LINENO"; then :
16692 # Broken: success on invalid input.
16693 continue
16694 else
16695 # Passes both tests.
16696 ac_preproc_ok=:
16697 break
16698 fi
16699 rm -f conftest.err conftest.i conftest.$ac_ext
16700
16701 done
16702 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16703 rm -f conftest.i conftest.err conftest.$ac_ext
16704 if $ac_preproc_ok; then :
16705
16706 else
16707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16708 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16709 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
16710 See \`config.log' for more details" "$LINENO" 5; }
16711 fi
16712
16713 ac_ext=c
16714 ac_cpp='$CPP $CPPFLAGS'
16715 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16716 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16717 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16718
16719 else
16720 _lt_caught_CXX_error=yes
16721 fi
16722
16723 ac_ext=cpp
16724 ac_cpp='$CXXCPP $CPPFLAGS'
16725 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16726 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16727 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16728
16729 archive_cmds_need_lc_CXX=no
16730 allow_undefined_flag_CXX=
16731 always_export_symbols_CXX=no
16732 archive_expsym_cmds_CXX=
16733 compiler_needs_object_CXX=no
16734 export_dynamic_flag_spec_CXX=
16735 hardcode_direct_CXX=no
16736 hardcode_direct_absolute_CXX=no
16737 hardcode_libdir_flag_spec_CXX=
16738 hardcode_libdir_separator_CXX=
16739 hardcode_minus_L_CXX=no
16740 hardcode_shlibpath_var_CXX=unsupported
16741 hardcode_automatic_CXX=no
16742 inherit_rpath_CXX=no
16743 module_cmds_CXX=
16744 module_expsym_cmds_CXX=
16745 link_all_deplibs_CXX=unknown
16746 old_archive_cmds_CXX=$old_archive_cmds
16747 reload_flag_CXX=$reload_flag
16748 reload_cmds_CXX=$reload_cmds
16749 no_undefined_flag_CXX=
16750 whole_archive_flag_spec_CXX=
16751 enable_shared_with_static_runtimes_CXX=no
16752
16753 # Source file extension for C++ test sources.
16754 ac_ext=cpp
16755
16756 # Object file extension for compiled C++ test sources.
16757 objext=o
16758 objext_CXX=$objext
16759
16760 # No sense in running all these tests if we already determined that
16761 # the CXX compiler isn't working. Some variables (like enable_shared)
16762 # are currently assumed to apply to all compilers on this platform,
16763 # and will be corrupted by setting them based on a non-working compiler.
16764 if test yes != "$_lt_caught_CXX_error"; then
16765 # Code to be used in simple compile tests
16766 lt_simple_compile_test_code="int some_variable = 0;"
16767
16768 # Code to be used in simple link tests
16769 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
16770
16771 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
16772
16773
16774
16775
16776
16777
16778 # If no C compiler was specified, use CC.
16779 LTCC=${LTCC-"$CC"}
16780
16781 # If no C compiler flags were specified, use CFLAGS.
16782 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
16783
16784 # Allow CC to be a program name with arguments.
16785 compiler=$CC
16786
16787
16788 # save warnings/boilerplate of simple test code
16789 ac_outfile=conftest.$ac_objext
16790 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
16791 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16792 _lt_compiler_boilerplate=`cat conftest.err`
16793 $RM conftest*
16794
16795 ac_outfile=conftest.$ac_objext
16796 echo "$lt_simple_link_test_code" >conftest.$ac_ext
16797 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16798 _lt_linker_boilerplate=`cat conftest.err`
16799 $RM -r conftest*
16800
16801
16802 # Allow CC to be a program name with arguments.
16803 lt_save_CC=$CC
16804 lt_save_CFLAGS=$CFLAGS
16805 lt_save_LD=$LD
16806 lt_save_GCC=$GCC
16807 GCC=$GXX
16808 lt_save_with_gnu_ld=$with_gnu_ld
16809 lt_save_path_LD=$lt_cv_path_LD
16810 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
16811 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
16812 else
16813 $as_unset lt_cv_prog_gnu_ld
16814 fi
16815 if test -n "${lt_cv_path_LDCXX+set}"; then
16816 lt_cv_path_LD=$lt_cv_path_LDCXX
16817 else
16818 $as_unset lt_cv_path_LD
16819 fi
16820 test -z "${LDCXX+set}" || LD=$LDCXX
16821 CC=${CXX-"c++"}
16822 CFLAGS=$CXXFLAGS
16823 compiler=$CC
16824 compiler_CXX=$CC
16825 func_cc_basename $compiler
16826 cc_basename=$func_cc_basename_result
16827
16828
16829 if test -n "$compiler"; then
16830 # We don't want -fno-exception when compiling C++ code, so set the
16831 # no_builtin_flag separately
16832 if test yes = "$GXX"; then
16833 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
16834 else
16835 lt_prog_compiler_no_builtin_flag_CXX=
16836 fi
16837
16838 if test yes = "$GXX"; then
16839 # Set up default GNU C++ configuration
16840
16841
16842
16843 # Check whether --with-gnu-ld was given.
16844 if test "${with_gnu_ld+set}" = set; then :
16845 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
16846 else
16847 with_gnu_ld=no
16848 fi
16849
16850 ac_prog=ld
16851 if test yes = "$GCC"; then
16852 # Check if gcc -print-prog-name=ld gives a path.
16853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
16854 $as_echo_n "checking for ld used by $CC... " >&6; }
16855 case $host in
16856 *-*-mingw*)
16857 # gcc leaves a trailing carriage return, which upsets mingw
16858 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
16859 *)
16860 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
16861 esac
16862 case $ac_prog in
16863 # Accept absolute paths.
16864 [\\/]* | ?:[\\/]*)
16865 re_direlt='/[^/][^/]*/\.\./'
16866 # Canonicalize the pathname of ld
16867 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
16868 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
16869 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
16870 done
16871 test -z "$LD" && LD=$ac_prog
16872 ;;
16873 "")
16874 # If it fails, then pretend we aren't using GCC.
16875 ac_prog=ld
16876 ;;
16877 *)
16878 # If it is relative, then search for the first ld in PATH.
16879 with_gnu_ld=unknown
16880 ;;
16881 esac
16882 elif test yes = "$with_gnu_ld"; then
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
16884 $as_echo_n "checking for GNU ld... " >&6; }
16885 else
16886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
16887 $as_echo_n "checking for non-GNU ld... " >&6; }
16888 fi
16889 if ${lt_cv_path_LD+:} false; then :
16890 $as_echo_n "(cached) " >&6
16891 else
16892 if test -z "$LD"; then
16893 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
16894 for ac_dir in $PATH; do
16895 IFS=$lt_save_ifs
16896 test -z "$ac_dir" && ac_dir=.
16897 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
16898 lt_cv_path_LD=$ac_dir/$ac_prog
16899 # Check to see if the program is GNU ld. I'd rather use --version,
16900 # but apparently some variants of GNU ld only accept -v.
16901 # Break only if it was the GNU/non-GNU ld that we prefer.
16902 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
16903 *GNU* | *'with BFD'*)
16904 test no != "$with_gnu_ld" && break
16905 ;;
16906 *)
16907 test yes != "$with_gnu_ld" && break
16908 ;;
16909 esac
16910 fi
16911 done
16912 IFS=$lt_save_ifs
16913 else
16914 lt_cv_path_LD=$LD # Let the user override the test with a path.
16915 fi
16916 fi
16917
16918 LD=$lt_cv_path_LD
16919 if test -n "$LD"; then
16920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
16921 $as_echo "$LD" >&6; }
16922 else
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16924 $as_echo "no" >&6; }
16925 fi
16926 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
16927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
16928 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
16929 if ${lt_cv_prog_gnu_ld+:} false; then :
16930 $as_echo_n "(cached) " >&6
16931 else
16932 # I'd rather use --version here, but apparently some GNU lds only accept -v.
16933 case `$LD -v 2>&1 </dev/null` in
16934 *GNU* | *'with BFD'*)
16935 lt_cv_prog_gnu_ld=yes
16936 ;;
16937 *)
16938 lt_cv_prog_gnu_ld=no
16939 ;;
16940 esac
16941 fi
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
16943 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
16944 with_gnu_ld=$lt_cv_prog_gnu_ld
16945
16946
16947
16948
16949
16950
16951
16952 # Check if GNU C++ uses GNU ld as the underlying linker, since the
16953 # archiving commands below assume that GNU ld is being used.
16954 if test yes = "$with_gnu_ld"; then
16955 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
16956 archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
16957
16958 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
16959 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
16960
16961 # If archive_cmds runs LD, not CC, wlarc should be empty
16962 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
16963 # investigate it a little bit more. (MM)
16964 wlarc='$wl'
16965
16966 # ancient GNU ld didn't support --whole-archive et. al.
16967 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
16968 $GREP 'no-whole-archive' > /dev/null; then
16969 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
16970 else
16971 whole_archive_flag_spec_CXX=
16972 fi
16973 else
16974 with_gnu_ld=no
16975 wlarc=
16976
16977 # A generic and very simple default shared library creation
16978 # command for GNU C++ for the case where it uses the native
16979 # linker, instead of GNU ld. If possible, this setting should
16980 # overridden to take advantage of the native linker features on
16981 # the platform it is being used on.
16982 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
16983 fi
16984
16985 # Commands to make compiler produce verbose output that lists
16986 # what "hidden" libraries, object files and flags are used when
16987 # linking a shared library.
16988 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
16989
16990 else
16991 GXX=no
16992 with_gnu_ld=no
16993 wlarc=
16994 fi
16995
16996 # PORTME: fill in a description of your system's C++ link characteristics
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
16998 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
16999 ld_shlibs_CXX=yes
17000 case $host_os in
17001 aix3*)
17002 # FIXME: insert proper C++ library support
17003 ld_shlibs_CXX=no
17004 ;;
17005 aix[4-9]*)
17006 if test ia64 = "$host_cpu"; then
17007 # On IA64, the linker does run time linking by default, so we don't
17008 # have to do anything special.
17009 aix_use_runtimelinking=no
17010 exp_sym_flag='-Bexport'
17011 no_entry_flag=
17012 else
17013 aix_use_runtimelinking=no
17014
17015 # Test if we are trying to use run time linking or normal
17016 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17017 # have runtime linking enabled, and use it for executables.
17018 # For shared libraries, we enable/disable runtime linking
17019 # depending on the kind of the shared library created -
17020 # when "with_aix_soname,aix_use_runtimelinking" is:
17021 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
17022 # "aix,yes" lib.so shared, rtl:yes, for executables
17023 # lib.a static archive
17024 # "both,no" lib.so.V(shr.o) shared, rtl:yes
17025 # lib.a(lib.so.V) shared, rtl:no, for executables
17026 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
17027 # lib.a(lib.so.V) shared, rtl:no
17028 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
17029 # lib.a static archive
17030 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17031 for ld_flag in $LDFLAGS; do
17032 case $ld_flag in
17033 *-brtl*)
17034 aix_use_runtimelinking=yes
17035 break
17036 ;;
17037 esac
17038 done
17039 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
17040 # With aix-soname=svr4, we create the lib.so.V shared archives only,
17041 # so we don't have lib.a shared libs to link our executables.
17042 # We have to force runtime linking in this case.
17043 aix_use_runtimelinking=yes
17044 LDFLAGS="$LDFLAGS -Wl,-brtl"
17045 fi
17046 ;;
17047 esac
17048
17049 exp_sym_flag='-bexport'
17050 no_entry_flag='-bnoentry'
17051 fi
17052
17053 # When large executables or shared objects are built, AIX ld can
17054 # have problems creating the table of contents. If linking a library
17055 # or program results in "error TOC overflow" add -mminimal-toc to
17056 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17057 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17058
17059 archive_cmds_CXX=''
17060 hardcode_direct_CXX=yes
17061 hardcode_direct_absolute_CXX=yes
17062 hardcode_libdir_separator_CXX=':'
17063 link_all_deplibs_CXX=yes
17064 file_list_spec_CXX='$wl-f,'
17065 case $with_aix_soname,$aix_use_runtimelinking in
17066 aix,*) ;; # no import file
17067 svr4,* | *,yes) # use import file
17068 # The Import File defines what to hardcode.
17069 hardcode_direct_CXX=no
17070 hardcode_direct_absolute_CXX=no
17071 ;;
17072 esac
17073
17074 if test yes = "$GXX"; then
17075 case $host_os in aix4.[012]|aix4.[012].*)
17076 # We only want to do this on AIX 4.2 and lower, the check
17077 # below for broken collect2 doesn't work under 4.3+
17078 collect2name=`$CC -print-prog-name=collect2`
17079 if test -f "$collect2name" &&
17080 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17081 then
17082 # We have reworked collect2
17083 :
17084 else
17085 # We have old collect2
17086 hardcode_direct_CXX=unsupported
17087 # It fails to find uninstalled libraries when the uninstalled
17088 # path is not listed in the libpath. Setting hardcode_minus_L
17089 # to unsupported forces relinking
17090 hardcode_minus_L_CXX=yes
17091 hardcode_libdir_flag_spec_CXX='-L$libdir'
17092 hardcode_libdir_separator_CXX=
17093 fi
17094 esac
17095 shared_flag='-shared'
17096 if test yes = "$aix_use_runtimelinking"; then
17097 shared_flag=$shared_flag' $wl-G'
17098 fi
17099 # Need to ensure runtime linking is disabled for the traditional
17100 # shared library, or the linker may eventually find shared libraries
17101 # /with/ Import File - we do not want to mix them.
17102 shared_flag_aix='-shared'
17103 shared_flag_svr4='-shared $wl-G'
17104 else
17105 # not using gcc
17106 if test ia64 = "$host_cpu"; then
17107 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17108 # chokes on -Wl,-G. The following line is correct:
17109 shared_flag='-G'
17110 else
17111 if test yes = "$aix_use_runtimelinking"; then
17112 shared_flag='$wl-G'
17113 else
17114 shared_flag='$wl-bM:SRE'
17115 fi
17116 shared_flag_aix='$wl-bM:SRE'
17117 shared_flag_svr4='$wl-G'
17118 fi
17119 fi
17120
17121 export_dynamic_flag_spec_CXX='$wl-bexpall'
17122 # It seems that -bexpall does not export symbols beginning with
17123 # underscore (_), so it is better to generate a list of symbols to
17124 # export.
17125 always_export_symbols_CXX=yes
17126 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
17127 # Warning - without using the other runtime loading flags (-brtl),
17128 # -berok will link without error, but may produce a broken library.
17129 # The "-G" linker flag allows undefined symbols.
17130 no_undefined_flag_CXX='-bernotok'
17131 # Determine the default libpath from the value encoded in an empty
17132 # executable.
17133 if test set = "${lt_cv_aix_libpath+set}"; then
17134 aix_libpath=$lt_cv_aix_libpath
17135 else
17136 if ${lt_cv_aix_libpath__CXX+:} false; then :
17137 $as_echo_n "(cached) " >&6
17138 else
17139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17140 /* end confdefs.h. */
17141
17142 int
17143 main ()
17144 {
17145
17146 ;
17147 return 0;
17148 }
17149 _ACEOF
17150 if ac_fn_cxx_try_link "$LINENO"; then :
17151
17152 lt_aix_libpath_sed='
17153 /Import File Strings/,/^$/ {
17154 /^0/ {
17155 s/^0 *\([^ ]*\) *$/\1/
17156 p
17157 }
17158 }'
17159 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17160 # Check for a 64-bit object if we didn't find anything.
17161 if test -z "$lt_cv_aix_libpath__CXX"; then
17162 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17163 fi
17164 fi
17165 rm -f core conftest.err conftest.$ac_objext \
17166 conftest$ac_exeext conftest.$ac_ext
17167 if test -z "$lt_cv_aix_libpath__CXX"; then
17168 lt_cv_aix_libpath__CXX=/usr/lib:/lib
17169 fi
17170
17171 fi
17172
17173 aix_libpath=$lt_cv_aix_libpath__CXX
17174 fi
17175
17176 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
17177
17178 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
17179 else
17180 if test ia64 = "$host_cpu"; then
17181 hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
17182 allow_undefined_flag_CXX="-z nodefs"
17183 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
17184 else
17185 # Determine the default libpath from the value encoded in an
17186 # empty executable.
17187 if test set = "${lt_cv_aix_libpath+set}"; then
17188 aix_libpath=$lt_cv_aix_libpath
17189 else
17190 if ${lt_cv_aix_libpath__CXX+:} false; then :
17191 $as_echo_n "(cached) " >&6
17192 else
17193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17194 /* end confdefs.h. */
17195
17196 int
17197 main ()
17198 {
17199
17200 ;
17201 return 0;
17202 }
17203 _ACEOF
17204 if ac_fn_cxx_try_link "$LINENO"; then :
17205
17206 lt_aix_libpath_sed='
17207 /Import File Strings/,/^$/ {
17208 /^0/ {
17209 s/^0 *\([^ ]*\) *$/\1/
17210 p
17211 }
17212 }'
17213 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17214 # Check for a 64-bit object if we didn't find anything.
17215 if test -z "$lt_cv_aix_libpath__CXX"; then
17216 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17217 fi
17218 fi
17219 rm -f core conftest.err conftest.$ac_objext \
17220 conftest$ac_exeext conftest.$ac_ext
17221 if test -z "$lt_cv_aix_libpath__CXX"; then
17222 lt_cv_aix_libpath__CXX=/usr/lib:/lib
17223 fi
17224
17225 fi
17226
17227 aix_libpath=$lt_cv_aix_libpath__CXX
17228 fi
17229
17230 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
17231 # Warning - without using the other run time loading flags,
17232 # -berok will link without error, but may produce a broken library.
17233 no_undefined_flag_CXX=' $wl-bernotok'
17234 allow_undefined_flag_CXX=' $wl-berok'
17235 if test yes = "$with_gnu_ld"; then
17236 # We only use this code for GNU lds that support --whole-archive.
17237 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
17238 else
17239 # Exported symbols can be pulled into shared objects from archives
17240 whole_archive_flag_spec_CXX='$convenience'
17241 fi
17242 archive_cmds_need_lc_CXX=yes
17243 archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
17244 # -brtl affects multiple linker settings, -berok does not and is overridden later
17245 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
17246 if test svr4 != "$with_aix_soname"; then
17247 # This is similar to how AIX traditionally builds its shared
17248 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
17249 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
17250 fi
17251 if test aix != "$with_aix_soname"; then
17252 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
17253 else
17254 # used by -dlpreopen to get the symbols
17255 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
17256 fi
17257 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
17258 fi
17259 fi
17260 ;;
17261
17262 beos*)
17263 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17264 allow_undefined_flag_CXX=unsupported
17265 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
17266 # support --undefined. This deserves some investigation. FIXME
17267 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
17268 else
17269 ld_shlibs_CXX=no
17270 fi
17271 ;;
17272
17273 chorus*)
17274 case $cc_basename in
17275 *)
17276 # FIXME: insert proper C++ library support
17277 ld_shlibs_CXX=no
17278 ;;
17279 esac
17280 ;;
17281
17282 cygwin* | mingw* | pw32* | cegcc*)
17283 case $GXX,$cc_basename in
17284 ,cl* | no,cl*)
17285 # Native MSVC
17286 # hardcode_libdir_flag_spec is actually meaningless, as there is
17287 # no search path for DLLs.
17288 hardcode_libdir_flag_spec_CXX=' '
17289 allow_undefined_flag_CXX=unsupported
17290 always_export_symbols_CXX=yes
17291 file_list_spec_CXX='@'
17292 # Tell ltmain to make .lib files, not .a files.
17293 libext=lib
17294 # Tell ltmain to make .dll files, not .so files.
17295 shrext_cmds=.dll
17296 # FIXME: Setting linknames here is a bad hack.
17297 archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
17298 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
17299 cp "$export_symbols" "$output_objdir/$soname.def";
17300 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
17301 else
17302 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
17303 fi~
17304 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
17305 linknames='
17306 # The linker will not automatically build a static lib if we build a DLL.
17307 # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
17308 enable_shared_with_static_runtimes_CXX=yes
17309 # Don't use ranlib
17310 old_postinstall_cmds_CXX='chmod 644 $oldlib'
17311 postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
17312 lt_tool_outputfile="@TOOL_OUTPUT@"~
17313 case $lt_outputfile in
17314 *.exe|*.EXE) ;;
17315 *)
17316 lt_outputfile=$lt_outputfile.exe
17317 lt_tool_outputfile=$lt_tool_outputfile.exe
17318 ;;
17319 esac~
17320 func_to_tool_file "$lt_outputfile"~
17321 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
17322 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
17323 $RM "$lt_outputfile.manifest";
17324 fi'
17325 ;;
17326 *)
17327 # g++
17328 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
17329 # as there is no search path for DLLs.
17330 hardcode_libdir_flag_spec_CXX='-L$libdir'
17331 export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
17332 allow_undefined_flag_CXX=unsupported
17333 always_export_symbols_CXX=no
17334 enable_shared_with_static_runtimes_CXX=yes
17335
17336 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
17337 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17338 # If the export-symbols file already is a .def file, use it as
17339 # is; otherwise, prepend EXPORTS...
17340 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
17341 cp $export_symbols $output_objdir/$soname.def;
17342 else
17343 echo EXPORTS > $output_objdir/$soname.def;
17344 cat $export_symbols >> $output_objdir/$soname.def;
17345 fi~
17346 $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'
17347 else
17348 ld_shlibs_CXX=no
17349 fi
17350 ;;
17351 esac
17352 ;;
17353 darwin* | rhapsody*)
17354
17355
17356 archive_cmds_need_lc_CXX=no
17357 hardcode_direct_CXX=no
17358 hardcode_automatic_CXX=yes
17359 hardcode_shlibpath_var_CXX=unsupported
17360 if test yes = "$lt_cv_ld_force_load"; then
17361 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
17362
17363 else
17364 whole_archive_flag_spec_CXX=''
17365 fi
17366 link_all_deplibs_CXX=yes
17367 allow_undefined_flag_CXX=$_lt_dar_allow_undefined
17368 case $cc_basename in
17369 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
17370 *) _lt_dar_can_shared=$GCC ;;
17371 esac
17372 if test yes = "$_lt_dar_can_shared"; then
17373 output_verbose_link_cmd=func_echo_all
17374 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
17375 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
17376 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
17377 module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
17378 if test yes != "$lt_cv_apple_cc_single_mod"; then
17379 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
17380 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
17381 fi
17382
17383 else
17384 ld_shlibs_CXX=no
17385 fi
17386
17387 ;;
17388
17389 os2*)
17390 hardcode_libdir_flag_spec_CXX='-L$libdir'
17391 hardcode_minus_L_CXX=yes
17392 allow_undefined_flag_CXX=unsupported
17393 shrext_cmds=.dll
17394 archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
17395 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
17396 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
17397 $ECHO EXPORTS >> $output_objdir/$libname.def~
17398 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
17399 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
17400 emximp -o $lib $output_objdir/$libname.def'
17401 archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
17402 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
17403 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
17404 $ECHO EXPORTS >> $output_objdir/$libname.def~
17405 prefix_cmds="$SED"~
17406 if test EXPORTS = "`$SED 1q $export_symbols`"; then
17407 prefix_cmds="$prefix_cmds -e 1d";
17408 fi~
17409 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
17410 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
17411 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
17412 emximp -o $lib $output_objdir/$libname.def'
17413 old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
17414 enable_shared_with_static_runtimes_CXX=yes
17415 ;;
17416
17417 dgux*)
17418 case $cc_basename in
17419 ec++*)
17420 # FIXME: insert proper C++ library support
17421 ld_shlibs_CXX=no
17422 ;;
17423 ghcx*)
17424 # Green Hills C++ Compiler
17425 # FIXME: insert proper C++ library support
17426 ld_shlibs_CXX=no
17427 ;;
17428 *)
17429 # FIXME: insert proper C++ library support
17430 ld_shlibs_CXX=no
17431 ;;
17432 esac
17433 ;;
17434
17435 freebsd2.*)
17436 # C++ shared libraries reported to be fairly broken before
17437 # switch to ELF
17438 ld_shlibs_CXX=no
17439 ;;
17440
17441 freebsd-elf*)
17442 archive_cmds_need_lc_CXX=no
17443 ;;
17444
17445 freebsd* | dragonfly*)
17446 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
17447 # conventions
17448 ld_shlibs_CXX=yes
17449 ;;
17450
17451 haiku*)
17452 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
17453 link_all_deplibs_CXX=yes
17454 ;;
17455
17456 hpux9*)
17457 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
17458 hardcode_libdir_separator_CXX=:
17459 export_dynamic_flag_spec_CXX='$wl-E'
17460 hardcode_direct_CXX=yes
17461 hardcode_minus_L_CXX=yes # Not in the search PATH,
17462 # but as the default
17463 # location of the library.
17464
17465 case $cc_basename in
17466 CC*)
17467 # FIXME: insert proper C++ library support
17468 ld_shlibs_CXX=no
17469 ;;
17470 aCC*)
17471 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
17472 # Commands to make compiler produce verbose output that lists
17473 # what "hidden" libraries, object files and flags are used when
17474 # linking a shared library.
17475 #
17476 # There doesn't appear to be a way to prevent this compiler from
17477 # explicitly linking system object files so we need to strip them
17478 # from the output so that they don't get included in the library
17479 # dependencies.
17480 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; func_echo_all "$list"'
17481 ;;
17482 *)
17483 if test yes = "$GXX"; then
17484 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
17485 else
17486 # FIXME: insert proper C++ library support
17487 ld_shlibs_CXX=no
17488 fi
17489 ;;
17490 esac
17491 ;;
17492
17493 hpux10*|hpux11*)
17494 if test no = "$with_gnu_ld"; then
17495 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
17496 hardcode_libdir_separator_CXX=:
17497
17498 case $host_cpu in
17499 hppa*64*|ia64*)
17500 ;;
17501 *)
17502 export_dynamic_flag_spec_CXX='$wl-E'
17503 ;;
17504 esac
17505 fi
17506 case $host_cpu in
17507 hppa*64*|ia64*)
17508 hardcode_direct_CXX=no
17509 hardcode_shlibpath_var_CXX=no
17510 ;;
17511 *)
17512 hardcode_direct_CXX=yes
17513 hardcode_direct_absolute_CXX=yes
17514 hardcode_minus_L_CXX=yes # Not in the search PATH,
17515 # but as the default
17516 # location of the library.
17517 ;;
17518 esac
17519
17520 case $cc_basename in
17521 CC*)
17522 # FIXME: insert proper C++ library support
17523 ld_shlibs_CXX=no
17524 ;;
17525 aCC*)
17526 case $host_cpu in
17527 hppa*64*)
17528 archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17529 ;;
17530 ia64*)
17531 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17532 ;;
17533 *)
17534 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17535 ;;
17536 esac
17537 # Commands to make compiler produce verbose output that lists
17538 # what "hidden" libraries, object files and flags are used when
17539 # linking a shared library.
17540 #
17541 # There doesn't appear to be a way to prevent this compiler from
17542 # explicitly linking system object files so we need to strip them
17543 # from the output so that they don't get included in the library
17544 # dependencies.
17545 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; func_echo_all "$list"'
17546 ;;
17547 *)
17548 if test yes = "$GXX"; then
17549 if test no = "$with_gnu_ld"; then
17550 case $host_cpu in
17551 hppa*64*)
17552 archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17553 ;;
17554 ia64*)
17555 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17556 ;;
17557 *)
17558 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17559 ;;
17560 esac
17561 fi
17562 else
17563 # FIXME: insert proper C++ library support
17564 ld_shlibs_CXX=no
17565 fi
17566 ;;
17567 esac
17568 ;;
17569
17570 interix[3-9]*)
17571 hardcode_direct_CXX=no
17572 hardcode_shlibpath_var_CXX=no
17573 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
17574 export_dynamic_flag_spec_CXX='$wl-E'
17575 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
17576 # Instead, shared libraries are loaded at an image base (0x10000000 by
17577 # default) and relocated if they conflict, which is a slow very memory
17578 # consuming and fragmenting process. To avoid this, we pick a random,
17579 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
17580 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
17581 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17582 archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17583 ;;
17584 irix5* | irix6*)
17585 case $cc_basename in
17586 CC*)
17587 # SGI C++
17588 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
17589
17590 # Archives containing C++ object files must be created using
17591 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
17592 # necessary to make sure instantiated templates are included
17593 # in the archive.
17594 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
17595 ;;
17596 *)
17597 if test yes = "$GXX"; then
17598 if test no = "$with_gnu_ld"; then
17599 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
17600 else
17601 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
17602 fi
17603 fi
17604 link_all_deplibs_CXX=yes
17605 ;;
17606 esac
17607 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
17608 hardcode_libdir_separator_CXX=:
17609 inherit_rpath_CXX=yes
17610 ;;
17611
17612 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
17613 case $cc_basename in
17614 KCC*)
17615 # Kuck and Associates, Inc. (KAI) C++ Compiler
17616
17617 # KCC will only create a shared library if the output file
17618 # ends with ".so" (or ".sl" for HP-UX), so rename the library
17619 # to its proper name (with version) after linking.
17620 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
17621 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
17622 # Commands to make compiler produce verbose output that lists
17623 # what "hidden" libraries, object files and flags are used when
17624 # linking a shared library.
17625 #
17626 # There doesn't appear to be a way to prevent this compiler from
17627 # explicitly linking system object files so we need to strip them
17628 # from the output so that they don't get included in the library
17629 # dependencies.
17630 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; func_echo_all "$list"'
17631
17632 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
17633 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
17634
17635 # Archives containing C++ object files must be created using
17636 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
17637 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
17638 ;;
17639 icpc* | ecpc* )
17640 # Intel C++
17641 with_gnu_ld=yes
17642 # version 8.0 and above of icpc choke on multiply defined symbols
17643 # if we add $predep_objects and $postdep_objects, however 7.1 and
17644 # earlier do not add the objects themselves.
17645 case `$CC -V 2>&1` in
17646 *"Version 7."*)
17647 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
17648 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
17649 ;;
17650 *) # Version 8.0 or newer
17651 tmp_idyn=
17652 case $host_cpu in
17653 ia64*) tmp_idyn=' -i_dynamic';;
17654 esac
17655 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
17656 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
17657 ;;
17658 esac
17659 archive_cmds_need_lc_CXX=no
17660 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
17661 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
17662 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
17663 ;;
17664 pgCC* | pgcpp*)
17665 # Portland Group C++ compiler
17666 case `$CC -V` in
17667 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
17668 prelink_cmds_CXX='tpldir=Template.dir~
17669 rm -rf $tpldir~
17670 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
17671 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
17672 old_archive_cmds_CXX='tpldir=Template.dir~
17673 rm -rf $tpldir~
17674 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
17675 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
17676 $RANLIB $oldlib'
17677 archive_cmds_CXX='tpldir=Template.dir~
17678 rm -rf $tpldir~
17679 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
17680 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
17681 archive_expsym_cmds_CXX='tpldir=Template.dir~
17682 rm -rf $tpldir~
17683 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
17684 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
17685 ;;
17686 *) # Version 6 and above use weak symbols
17687 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
17688 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
17689 ;;
17690 esac
17691
17692 hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
17693 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
17694 whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
17695 ;;
17696 cxx*)
17697 # Compaq C++
17698 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
17699 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
17700
17701 runpath_var=LD_RUN_PATH
17702 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
17703 hardcode_libdir_separator_CXX=:
17704
17705 # Commands to make compiler produce verbose output that lists
17706 # what "hidden" libraries, object files and flags are used when
17707 # linking a shared library.
17708 #
17709 # There doesn't appear to be a way to prevent this compiler from
17710 # explicitly linking system object files so we need to strip them
17711 # from the output so that they don't get included in the library
17712 # dependencies.
17713 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
17714 ;;
17715 xl* | mpixl* | bgxl*)
17716 # IBM XL 8.0 on PPC, with GNU ld
17717 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
17718 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
17719 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
17720 if test yes = "$supports_anon_versioning"; then
17721 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
17722 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
17723 echo "local: *; };" >> $output_objdir/$libname.ver~
17724 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
17725 fi
17726 ;;
17727 *)
17728 case `$CC -V 2>&1 | sed 5q` in
17729 *Sun\ C*)
17730 # Sun C++ 5.9
17731 no_undefined_flag_CXX=' -zdefs'
17732 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17733 archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
17734 hardcode_libdir_flag_spec_CXX='-R$libdir'
17735 whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
17736 compiler_needs_object_CXX=yes
17737
17738 # Not sure whether something based on
17739 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
17740 # would be better.
17741 output_verbose_link_cmd='func_echo_all'
17742
17743 # Archives containing C++ object files must be created using
17744 # "CC -xar", where "CC" is the Sun C++ compiler. This is
17745 # necessary to make sure instantiated templates are included
17746 # in the archive.
17747 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
17748 ;;
17749 esac
17750 ;;
17751 esac
17752 ;;
17753
17754 lynxos*)
17755 # FIXME: insert proper C++ library support
17756 ld_shlibs_CXX=no
17757 ;;
17758
17759 m88k*)
17760 # FIXME: insert proper C++ library support
17761 ld_shlibs_CXX=no
17762 ;;
17763
17764 mvs*)
17765 case $cc_basename in
17766 cxx*)
17767 # FIXME: insert proper C++ library support
17768 ld_shlibs_CXX=no
17769 ;;
17770 *)
17771 # FIXME: insert proper C++ library support
17772 ld_shlibs_CXX=no
17773 ;;
17774 esac
17775 ;;
17776
17777 netbsd*)
17778 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
17779 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
17780 wlarc=
17781 hardcode_libdir_flag_spec_CXX='-R$libdir'
17782 hardcode_direct_CXX=yes
17783 hardcode_shlibpath_var_CXX=no
17784 fi
17785 # Workaround some broken pre-1.5 toolchains
17786 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
17787 ;;
17788
17789 *nto* | *qnx*)
17790 ld_shlibs_CXX=yes
17791 ;;
17792
17793 openbsd* | bitrig*)
17794 if test -f /usr/libexec/ld.so; then
17795 hardcode_direct_CXX=yes
17796 hardcode_shlibpath_var_CXX=no
17797 hardcode_direct_absolute_CXX=yes
17798 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
17799 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
17800 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
17801 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
17802 export_dynamic_flag_spec_CXX='$wl-E'
17803 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
17804 fi
17805 output_verbose_link_cmd=func_echo_all
17806 else
17807 ld_shlibs_CXX=no
17808 fi
17809 ;;
17810
17811 osf3* | osf4* | osf5*)
17812 case $cc_basename in
17813 KCC*)
17814 # Kuck and Associates, Inc. (KAI) C++ Compiler
17815
17816 # KCC will only create a shared library if the output file
17817 # ends with ".so" (or ".sl" for HP-UX), so rename the library
17818 # to its proper name (with version) after linking.
17819 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
17820
17821 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
17822 hardcode_libdir_separator_CXX=:
17823
17824 # Archives containing C++ object files must be created using
17825 # the KAI C++ compiler.
17826 case $host in
17827 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
17828 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
17829 esac
17830 ;;
17831 RCC*)
17832 # Rational C++ 2.4.1
17833 # FIXME: insert proper C++ library support
17834 ld_shlibs_CXX=no
17835 ;;
17836 cxx*)
17837 case $host in
17838 osf3*)
17839 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
17840 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
17841 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
17842 ;;
17843 *)
17844 allow_undefined_flag_CXX=' -expect_unresolved \*'
17845 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
17846 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
17847 echo "-hidden">> $lib.exp~
17848 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
17849 $RM $lib.exp'
17850 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
17851 ;;
17852 esac
17853
17854 hardcode_libdir_separator_CXX=:
17855
17856 # Commands to make compiler produce verbose output that lists
17857 # what "hidden" libraries, object files and flags are used when
17858 # linking a shared library.
17859 #
17860 # There doesn't appear to be a way to prevent this compiler from
17861 # explicitly linking system object files so we need to strip them
17862 # from the output so that they don't get included in the library
17863 # dependencies.
17864 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
17865 ;;
17866 *)
17867 if test yes,no = "$GXX,$with_gnu_ld"; then
17868 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
17869 case $host in
17870 osf3*)
17871 archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
17872 ;;
17873 *)
17874 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
17875 ;;
17876 esac
17877
17878 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
17879 hardcode_libdir_separator_CXX=:
17880
17881 # Commands to make compiler produce verbose output that lists
17882 # what "hidden" libraries, object files and flags are used when
17883 # linking a shared library.
17884 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
17885
17886 else
17887 # FIXME: insert proper C++ library support
17888 ld_shlibs_CXX=no
17889 fi
17890 ;;
17891 esac
17892 ;;
17893
17894 psos*)
17895 # FIXME: insert proper C++ library support
17896 ld_shlibs_CXX=no
17897 ;;
17898
17899 sunos4*)
17900 case $cc_basename in
17901 CC*)
17902 # Sun C++ 4.x
17903 # FIXME: insert proper C++ library support
17904 ld_shlibs_CXX=no
17905 ;;
17906 lcc*)
17907 # Lucid
17908 # FIXME: insert proper C++ library support
17909 ld_shlibs_CXX=no
17910 ;;
17911 *)
17912 # FIXME: insert proper C++ library support
17913 ld_shlibs_CXX=no
17914 ;;
17915 esac
17916 ;;
17917
17918 solaris*)
17919 case $cc_basename in
17920 CC* | sunCC*)
17921 # Sun C++ 4.2, 5.x and Centerline C++
17922 archive_cmds_need_lc_CXX=yes
17923 no_undefined_flag_CXX=' -zdefs'
17924 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17925 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17926 $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'
17927
17928 hardcode_libdir_flag_spec_CXX='-R$libdir'
17929 hardcode_shlibpath_var_CXX=no
17930 case $host_os in
17931 solaris2.[0-5] | solaris2.[0-5].*) ;;
17932 *)
17933 # The compiler driver will combine and reorder linker options,
17934 # but understands '-z linker_flag'.
17935 # Supported since Solaris 2.6 (maybe 2.5.1?)
17936 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
17937 ;;
17938 esac
17939 link_all_deplibs_CXX=yes
17940
17941 output_verbose_link_cmd='func_echo_all'
17942
17943 # Archives containing C++ object files must be created using
17944 # "CC -xar", where "CC" is the Sun C++ compiler. This is
17945 # necessary to make sure instantiated templates are included
17946 # in the archive.
17947 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
17948 ;;
17949 gcx*)
17950 # Green Hills C++ Compiler
17951 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
17952
17953 # The C++ compiler must be used to create the archive.
17954 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
17955 ;;
17956 *)
17957 # GNU C++ compiler with Solaris linker
17958 if test yes,no = "$GXX,$with_gnu_ld"; then
17959 no_undefined_flag_CXX=' $wl-z ${wl}defs'
17960 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
17961 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
17962 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17963 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
17964
17965 # Commands to make compiler produce verbose output that lists
17966 # what "hidden" libraries, object files and flags are used when
17967 # linking a shared library.
17968 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
17969 else
17970 # g++ 2.7 appears to require '-G' NOT '-shared' on this
17971 # platform.
17972 archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
17973 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17974 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
17975
17976 # Commands to make compiler produce verbose output that lists
17977 # what "hidden" libraries, object files and flags are used when
17978 # linking a shared library.
17979 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
17980 fi
17981
17982 hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
17983 case $host_os in
17984 solaris2.[0-5] | solaris2.[0-5].*) ;;
17985 *)
17986 whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
17987 ;;
17988 esac
17989 fi
17990 ;;
17991 esac
17992 ;;
17993
17994 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
17995 no_undefined_flag_CXX='$wl-z,text'
17996 archive_cmds_need_lc_CXX=no
17997 hardcode_shlibpath_var_CXX=no
17998 runpath_var='LD_RUN_PATH'
17999
18000 case $cc_basename in
18001 CC*)
18002 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18003 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18004 ;;
18005 *)
18006 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18007 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18008 ;;
18009 esac
18010 ;;
18011
18012 sysv5* | sco3.2v5* | sco5v6*)
18013 # Note: We CANNOT use -z defs as we might desire, because we do not
18014 # link with -lc, and that would cause any symbols used from libc to
18015 # always be unresolved, which means just about no library would
18016 # ever link correctly. If we're not using GNU ld we use -z text
18017 # though, which does catch some bad symbols but isn't as heavy-handed
18018 # as -z defs.
18019 no_undefined_flag_CXX='$wl-z,text'
18020 allow_undefined_flag_CXX='$wl-z,nodefs'
18021 archive_cmds_need_lc_CXX=no
18022 hardcode_shlibpath_var_CXX=no
18023 hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
18024 hardcode_libdir_separator_CXX=':'
18025 link_all_deplibs_CXX=yes
18026 export_dynamic_flag_spec_CXX='$wl-Bexport'
18027 runpath_var='LD_RUN_PATH'
18028
18029 case $cc_basename in
18030 CC*)
18031 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18032 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18033 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
18034 '"$old_archive_cmds_CXX"
18035 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
18036 '"$reload_cmds_CXX"
18037 ;;
18038 *)
18039 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18040 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18041 ;;
18042 esac
18043 ;;
18044
18045 tandem*)
18046 case $cc_basename in
18047 NCC*)
18048 # NonStop-UX NCC 3.20
18049 # FIXME: insert proper C++ library support
18050 ld_shlibs_CXX=no
18051 ;;
18052 *)
18053 # FIXME: insert proper C++ library support
18054 ld_shlibs_CXX=no
18055 ;;
18056 esac
18057 ;;
18058
18059 vxworks*)
18060 # FIXME: insert proper C++ library support
18061 ld_shlibs_CXX=no
18062 ;;
18063
18064 *)
18065 # FIXME: insert proper C++ library support
18066 ld_shlibs_CXX=no
18067 ;;
18068 esac
18069
18070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
18071 $as_echo "$ld_shlibs_CXX" >&6; }
18072 test no = "$ld_shlibs_CXX" && can_build_shared=no
18073
18074 GCC_CXX=$GXX
18075 LD_CXX=$LD
18076
18077 ## CAVEAT EMPTOR:
18078 ## There is no encapsulation within the following macros, do not change
18079 ## the running order or otherwise move them around unless you know exactly
18080 ## what you are doing...
18081 # Dependencies to place before and after the object being linked:
18082 predep_objects_CXX=
18083 postdep_objects_CXX=
18084 predeps_CXX=
18085 postdeps_CXX=
18086 compiler_lib_search_path_CXX=
18087
18088 cat > conftest.$ac_ext <<_LT_EOF
18089 class Foo
18090 {
18091 public:
18092 Foo (void) { a = 0; }
18093 private:
18094 int a;
18095 };
18096 _LT_EOF
18097
18098
18099 _lt_libdeps_save_CFLAGS=$CFLAGS
18100 case "$CC $CFLAGS " in #(
18101 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
18102 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
18103 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
18104 esac
18105
18106 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18107 (eval $ac_compile) 2>&5
18108 ac_status=$?
18109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18110 test $ac_status = 0; }; then
18111 # Parse the compiler output and extract the necessary
18112 # objects, libraries and library flags.
18113
18114 # Sentinel used to keep track of whether or not we are before
18115 # the conftest object file.
18116 pre_test_object_deps_done=no
18117
18118 for p in `eval "$output_verbose_link_cmd"`; do
18119 case $prev$p in
18120
18121 -L* | -R* | -l*)
18122 # Some compilers place space between "-{L,R}" and the path.
18123 # Remove the space.
18124 if test x-L = "$p" ||
18125 test x-R = "$p"; then
18126 prev=$p
18127 continue
18128 fi
18129
18130 # Expand the sysroot to ease extracting the directories later.
18131 if test -z "$prev"; then
18132 case $p in
18133 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
18134 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
18135 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
18136 esac
18137 fi
18138 case $p in
18139 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
18140 esac
18141 if test no = "$pre_test_object_deps_done"; then
18142 case $prev in
18143 -L | -R)
18144 # Internal compiler library paths should come after those
18145 # provided the user. The postdeps already come after the
18146 # user supplied libs so there is no need to process them.
18147 if test -z "$compiler_lib_search_path_CXX"; then
18148 compiler_lib_search_path_CXX=$prev$p
18149 else
18150 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
18151 fi
18152 ;;
18153 # The "-l" case would never come before the object being
18154 # linked, so don't bother handling this case.
18155 esac
18156 else
18157 if test -z "$postdeps_CXX"; then
18158 postdeps_CXX=$prev$p
18159 else
18160 postdeps_CXX="${postdeps_CXX} $prev$p"
18161 fi
18162 fi
18163 prev=
18164 ;;
18165
18166 *.lto.$objext) ;; # Ignore GCC LTO objects
18167 *.$objext)
18168 # This assumes that the test object file only shows up
18169 # once in the compiler output.
18170 if test "$p" = "conftest.$objext"; then
18171 pre_test_object_deps_done=yes
18172 continue
18173 fi
18174
18175 if test no = "$pre_test_object_deps_done"; then
18176 if test -z "$predep_objects_CXX"; then
18177 predep_objects_CXX=$p
18178 else
18179 predep_objects_CXX="$predep_objects_CXX $p"
18180 fi
18181 else
18182 if test -z "$postdep_objects_CXX"; then
18183 postdep_objects_CXX=$p
18184 else
18185 postdep_objects_CXX="$postdep_objects_CXX $p"
18186 fi
18187 fi
18188 ;;
18189
18190 *) ;; # Ignore the rest.
18191
18192 esac
18193 done
18194
18195 # Clean up.
18196 rm -f a.out a.exe
18197 else
18198 echo "libtool.m4: error: problem compiling CXX test program"
18199 fi
18200
18201 $RM -f confest.$objext
18202 CFLAGS=$_lt_libdeps_save_CFLAGS
18203
18204 # PORTME: override above test on systems where it is broken
18205 case $host_os in
18206 interix[3-9]*)
18207 # Interix 3.5 installs completely hosed .la files for C++, so rather than
18208 # hack all around it, let's just trust "g++" to DTRT.
18209 predep_objects_CXX=
18210 postdep_objects_CXX=
18211 postdeps_CXX=
18212 ;;
18213 esac
18214
18215
18216 case " $postdeps_CXX " in
18217 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
18218 esac
18219 compiler_lib_search_dirs_CXX=
18220 if test -n "${compiler_lib_search_path_CXX}"; then
18221 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
18222 fi
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254 lt_prog_compiler_wl_CXX=
18255 lt_prog_compiler_pic_CXX=
18256 lt_prog_compiler_static_CXX=
18257
18258
18259 # C++ specific cases for pic, static, wl, etc.
18260 if test yes = "$GXX"; then
18261 lt_prog_compiler_wl_CXX='-Wl,'
18262 lt_prog_compiler_static_CXX='-static'
18263
18264 case $host_os in
18265 aix*)
18266 # All AIX code is PIC.
18267 if test ia64 = "$host_cpu"; then
18268 # AIX 5 now supports IA64 processor
18269 lt_prog_compiler_static_CXX='-Bstatic'
18270 fi
18271 lt_prog_compiler_pic_CXX='-fPIC'
18272 ;;
18273
18274 amigaos*)
18275 case $host_cpu in
18276 powerpc)
18277 # see comment about AmigaOS4 .so support
18278 lt_prog_compiler_pic_CXX='-fPIC'
18279 ;;
18280 m68k)
18281 # FIXME: we need at least 68020 code to build shared libraries, but
18282 # adding the '-m68020' flag to GCC prevents building anything better,
18283 # like '-m68040'.
18284 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
18285 ;;
18286 esac
18287 ;;
18288
18289 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
18290 # PIC is the default for these OSes.
18291 ;;
18292 mingw* | cygwin* | os2* | pw32* | cegcc*)
18293 # This hack is so that the source file can tell whether it is being
18294 # built for inclusion in a dll (and should export symbols for example).
18295 # Although the cygwin gcc ignores -fPIC, still need this for old-style
18296 # (--disable-auto-import) libraries
18297 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
18298 case $host_os in
18299 os2*)
18300 lt_prog_compiler_static_CXX='$wl-static'
18301 ;;
18302 esac
18303 ;;
18304 darwin* | rhapsody*)
18305 # PIC is the default on this platform
18306 # Common symbols not allowed in MH_DYLIB files
18307 lt_prog_compiler_pic_CXX='-fno-common'
18308 ;;
18309 *djgpp*)
18310 # DJGPP does not support shared libraries at all
18311 lt_prog_compiler_pic_CXX=
18312 ;;
18313 haiku*)
18314 # PIC is the default for Haiku.
18315 # The "-static" flag exists, but is broken.
18316 lt_prog_compiler_static_CXX=
18317 ;;
18318 interix[3-9]*)
18319 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
18320 # Instead, we relocate shared libraries at runtime.
18321 ;;
18322 sysv4*MP*)
18323 if test -d /usr/nec; then
18324 lt_prog_compiler_pic_CXX=-Kconform_pic
18325 fi
18326 ;;
18327 hpux*)
18328 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
18329 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
18330 # sets the default TLS model and affects inlining.
18331 case $host_cpu in
18332 hppa*64*)
18333 ;;
18334 *)
18335 lt_prog_compiler_pic_CXX='-fPIC'
18336 ;;
18337 esac
18338 ;;
18339 *qnx* | *nto*)
18340 # QNX uses GNU C++, but need to define -shared option too, otherwise
18341 # it will coredump.
18342 lt_prog_compiler_pic_CXX='-fPIC -shared'
18343 ;;
18344 *)
18345 lt_prog_compiler_pic_CXX='-fPIC'
18346 ;;
18347 esac
18348 else
18349 case $host_os in
18350 aix[4-9]*)
18351 # All AIX code is PIC.
18352 if test ia64 = "$host_cpu"; then
18353 # AIX 5 now supports IA64 processor
18354 lt_prog_compiler_static_CXX='-Bstatic'
18355 else
18356 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
18357 fi
18358 ;;
18359 chorus*)
18360 case $cc_basename in
18361 cxch68*)
18362 # Green Hills C++ Compiler
18363 # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
18364 ;;
18365 esac
18366 ;;
18367 mingw* | cygwin* | os2* | pw32* | cegcc*)
18368 # This hack is so that the source file can tell whether it is being
18369 # built for inclusion in a dll (and should export symbols for example).
18370 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
18371 ;;
18372 dgux*)
18373 case $cc_basename in
18374 ec++*)
18375 lt_prog_compiler_pic_CXX='-KPIC'
18376 ;;
18377 ghcx*)
18378 # Green Hills C++ Compiler
18379 lt_prog_compiler_pic_CXX='-pic'
18380 ;;
18381 *)
18382 ;;
18383 esac
18384 ;;
18385 freebsd* | dragonfly*)
18386 # FreeBSD uses GNU C++
18387 ;;
18388 hpux9* | hpux10* | hpux11*)
18389 case $cc_basename in
18390 CC*)
18391 lt_prog_compiler_wl_CXX='-Wl,'
18392 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
18393 if test ia64 != "$host_cpu"; then
18394 lt_prog_compiler_pic_CXX='+Z'
18395 fi
18396 ;;
18397 aCC*)
18398 lt_prog_compiler_wl_CXX='-Wl,'
18399 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
18400 case $host_cpu in
18401 hppa*64*|ia64*)
18402 # +Z the default
18403 ;;
18404 *)
18405 lt_prog_compiler_pic_CXX='+Z'
18406 ;;
18407 esac
18408 ;;
18409 *)
18410 ;;
18411 esac
18412 ;;
18413 interix*)
18414 # This is c89, which is MS Visual C++ (no shared libs)
18415 # Anyone wants to do a port?
18416 ;;
18417 irix5* | irix6* | nonstopux*)
18418 case $cc_basename in
18419 CC*)
18420 lt_prog_compiler_wl_CXX='-Wl,'
18421 lt_prog_compiler_static_CXX='-non_shared'
18422 # CC pic flag -KPIC is the default.
18423 ;;
18424 *)
18425 ;;
18426 esac
18427 ;;
18428 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
18429 case $cc_basename in
18430 KCC*)
18431 # KAI C++ Compiler
18432 lt_prog_compiler_wl_CXX='--backend -Wl,'
18433 lt_prog_compiler_pic_CXX='-fPIC'
18434 ;;
18435 ecpc* )
18436 # old Intel C++ for x86_64, which still supported -KPIC.
18437 lt_prog_compiler_wl_CXX='-Wl,'
18438 lt_prog_compiler_pic_CXX='-KPIC'
18439 lt_prog_compiler_static_CXX='-static'
18440 ;;
18441 icpc* )
18442 # Intel C++, used to be incompatible with GCC.
18443 # ICC 10 doesn't accept -KPIC any more.
18444 lt_prog_compiler_wl_CXX='-Wl,'
18445 lt_prog_compiler_pic_CXX='-fPIC'
18446 lt_prog_compiler_static_CXX='-static'
18447 ;;
18448 pgCC* | pgcpp*)
18449 # Portland Group C++ compiler
18450 lt_prog_compiler_wl_CXX='-Wl,'
18451 lt_prog_compiler_pic_CXX='-fpic'
18452 lt_prog_compiler_static_CXX='-Bstatic'
18453 ;;
18454 cxx*)
18455 # Compaq C++
18456 # Make sure the PIC flag is empty. It appears that all Alpha
18457 # Linux and Compaq Tru64 Unix objects are PIC.
18458 lt_prog_compiler_pic_CXX=
18459 lt_prog_compiler_static_CXX='-non_shared'
18460 ;;
18461 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
18462 # IBM XL 8.0, 9.0 on PPC and BlueGene
18463 lt_prog_compiler_wl_CXX='-Wl,'
18464 lt_prog_compiler_pic_CXX='-qpic'
18465 lt_prog_compiler_static_CXX='-qstaticlink'
18466 ;;
18467 *)
18468 case `$CC -V 2>&1 | sed 5q` in
18469 *Sun\ C*)
18470 # Sun C++ 5.9
18471 lt_prog_compiler_pic_CXX='-KPIC'
18472 lt_prog_compiler_static_CXX='-Bstatic'
18473 lt_prog_compiler_wl_CXX='-Qoption ld '
18474 ;;
18475 esac
18476 ;;
18477 esac
18478 ;;
18479 lynxos*)
18480 ;;
18481 m88k*)
18482 ;;
18483 mvs*)
18484 case $cc_basename in
18485 cxx*)
18486 lt_prog_compiler_pic_CXX='-W c,exportall'
18487 ;;
18488 *)
18489 ;;
18490 esac
18491 ;;
18492 netbsd* | netbsdelf*-gnu)
18493 ;;
18494 *qnx* | *nto*)
18495 # QNX uses GNU C++, but need to define -shared option too, otherwise
18496 # it will coredump.
18497 lt_prog_compiler_pic_CXX='-fPIC -shared'
18498 ;;
18499 osf3* | osf4* | osf5*)
18500 case $cc_basename in
18501 KCC*)
18502 lt_prog_compiler_wl_CXX='--backend -Wl,'
18503 ;;
18504 RCC*)
18505 # Rational C++ 2.4.1
18506 lt_prog_compiler_pic_CXX='-pic'
18507 ;;
18508 cxx*)
18509 # Digital/Compaq C++
18510 lt_prog_compiler_wl_CXX='-Wl,'
18511 # Make sure the PIC flag is empty. It appears that all Alpha
18512 # Linux and Compaq Tru64 Unix objects are PIC.
18513 lt_prog_compiler_pic_CXX=
18514 lt_prog_compiler_static_CXX='-non_shared'
18515 ;;
18516 *)
18517 ;;
18518 esac
18519 ;;
18520 psos*)
18521 ;;
18522 solaris*)
18523 case $cc_basename in
18524 CC* | sunCC*)
18525 # Sun C++ 4.2, 5.x and Centerline C++
18526 lt_prog_compiler_pic_CXX='-KPIC'
18527 lt_prog_compiler_static_CXX='-Bstatic'
18528 lt_prog_compiler_wl_CXX='-Qoption ld '
18529 ;;
18530 gcx*)
18531 # Green Hills C++ Compiler
18532 lt_prog_compiler_pic_CXX='-PIC'
18533 ;;
18534 *)
18535 ;;
18536 esac
18537 ;;
18538 sunos4*)
18539 case $cc_basename in
18540 CC*)
18541 # Sun C++ 4.x
18542 lt_prog_compiler_pic_CXX='-pic'
18543 lt_prog_compiler_static_CXX='-Bstatic'
18544 ;;
18545 lcc*)
18546 # Lucid
18547 lt_prog_compiler_pic_CXX='-pic'
18548 ;;
18549 *)
18550 ;;
18551 esac
18552 ;;
18553 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
18554 case $cc_basename in
18555 CC*)
18556 lt_prog_compiler_wl_CXX='-Wl,'
18557 lt_prog_compiler_pic_CXX='-KPIC'
18558 lt_prog_compiler_static_CXX='-Bstatic'
18559 ;;
18560 esac
18561 ;;
18562 tandem*)
18563 case $cc_basename in
18564 NCC*)
18565 # NonStop-UX NCC 3.20
18566 lt_prog_compiler_pic_CXX='-KPIC'
18567 ;;
18568 *)
18569 ;;
18570 esac
18571 ;;
18572 vxworks*)
18573 ;;
18574 *)
18575 lt_prog_compiler_can_build_shared_CXX=no
18576 ;;
18577 esac
18578 fi
18579
18580 case $host_os in
18581 # For platforms that do not support PIC, -DPIC is meaningless:
18582 *djgpp*)
18583 lt_prog_compiler_pic_CXX=
18584 ;;
18585 *)
18586 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
18587 ;;
18588 esac
18589
18590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
18591 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
18592 if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
18593 $as_echo_n "(cached) " >&6
18594 else
18595 lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
18596 fi
18597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
18598 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
18599 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
18600
18601 #
18602 # Check to make sure the PIC flag actually works.
18603 #
18604 if test -n "$lt_prog_compiler_pic_CXX"; then
18605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
18606 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
18607 if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
18608 $as_echo_n "(cached) " >&6
18609 else
18610 lt_cv_prog_compiler_pic_works_CXX=no
18611 ac_outfile=conftest.$ac_objext
18612 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18613 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
18614 # Insert the option either (1) after the last *FLAGS variable, or
18615 # (2) before a word containing "conftest.", or (3) at the end.
18616 # Note that $ac_compile itself does not contain backslashes and begins
18617 # with a dollar sign (not a hyphen), so the echo should work correctly.
18618 # The option is referenced via a variable to avoid confusing sed.
18619 lt_compile=`echo "$ac_compile" | $SED \
18620 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18621 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
18622 -e 's:$: $lt_compiler_flag:'`
18623 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
18624 (eval "$lt_compile" 2>conftest.err)
18625 ac_status=$?
18626 cat conftest.err >&5
18627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18628 if (exit $ac_status) && test -s "$ac_outfile"; then
18629 # The compiler can only warn and ignore the option if not recognized
18630 # So say no if there are warnings other than the usual output.
18631 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
18632 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
18633 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
18634 lt_cv_prog_compiler_pic_works_CXX=yes
18635 fi
18636 fi
18637 $RM conftest*
18638
18639 fi
18640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
18641 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
18642
18643 if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
18644 case $lt_prog_compiler_pic_CXX in
18645 "" | " "*) ;;
18646 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
18647 esac
18648 else
18649 lt_prog_compiler_pic_CXX=
18650 lt_prog_compiler_can_build_shared_CXX=no
18651 fi
18652
18653 fi
18654
18655
18656
18657
18658
18659 #
18660 # Check to make sure the static flag actually works.
18661 #
18662 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
18663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
18664 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
18665 if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
18666 $as_echo_n "(cached) " >&6
18667 else
18668 lt_cv_prog_compiler_static_works_CXX=no
18669 save_LDFLAGS=$LDFLAGS
18670 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
18671 echo "$lt_simple_link_test_code" > conftest.$ac_ext
18672 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
18673 # The linker can only warn and ignore the option if not recognized
18674 # So say no if there are warnings
18675 if test -s conftest.err; then
18676 # Append any errors to the config.log.
18677 cat conftest.err 1>&5
18678 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
18679 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
18680 if diff conftest.exp conftest.er2 >/dev/null; then
18681 lt_cv_prog_compiler_static_works_CXX=yes
18682 fi
18683 else
18684 lt_cv_prog_compiler_static_works_CXX=yes
18685 fi
18686 fi
18687 $RM -r conftest*
18688 LDFLAGS=$save_LDFLAGS
18689
18690 fi
18691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
18692 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
18693
18694 if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
18695 :
18696 else
18697 lt_prog_compiler_static_CXX=
18698 fi
18699
18700
18701
18702
18703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
18704 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
18705 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
18706 $as_echo_n "(cached) " >&6
18707 else
18708 lt_cv_prog_compiler_c_o_CXX=no
18709 $RM -r conftest 2>/dev/null
18710 mkdir conftest
18711 cd conftest
18712 mkdir out
18713 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18714
18715 lt_compiler_flag="-o out/conftest2.$ac_objext"
18716 # Insert the option either (1) after the last *FLAGS variable, or
18717 # (2) before a word containing "conftest.", or (3) at the end.
18718 # Note that $ac_compile itself does not contain backslashes and begins
18719 # with a dollar sign (not a hyphen), so the echo should work correctly.
18720 lt_compile=`echo "$ac_compile" | $SED \
18721 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18722 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
18723 -e 's:$: $lt_compiler_flag:'`
18724 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
18725 (eval "$lt_compile" 2>out/conftest.err)
18726 ac_status=$?
18727 cat out/conftest.err >&5
18728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18729 if (exit $ac_status) && test -s out/conftest2.$ac_objext
18730 then
18731 # The compiler can only warn and ignore the option if not recognized
18732 # So say no if there are warnings
18733 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
18734 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
18735 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
18736 lt_cv_prog_compiler_c_o_CXX=yes
18737 fi
18738 fi
18739 chmod u+w . 2>&5
18740 $RM conftest*
18741 # SGI C++ compiler will create directory out/ii_files/ for
18742 # template instantiation
18743 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
18744 $RM out/* && rmdir out
18745 cd ..
18746 $RM -r conftest
18747 $RM conftest*
18748
18749 fi
18750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
18751 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
18752
18753
18754
18755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
18756 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
18757 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
18758 $as_echo_n "(cached) " >&6
18759 else
18760 lt_cv_prog_compiler_c_o_CXX=no
18761 $RM -r conftest 2>/dev/null
18762 mkdir conftest
18763 cd conftest
18764 mkdir out
18765 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18766
18767 lt_compiler_flag="-o out/conftest2.$ac_objext"
18768 # Insert the option either (1) after the last *FLAGS variable, or
18769 # (2) before a word containing "conftest.", or (3) at the end.
18770 # Note that $ac_compile itself does not contain backslashes and begins
18771 # with a dollar sign (not a hyphen), so the echo should work correctly.
18772 lt_compile=`echo "$ac_compile" | $SED \
18773 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18774 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
18775 -e 's:$: $lt_compiler_flag:'`
18776 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
18777 (eval "$lt_compile" 2>out/conftest.err)
18778 ac_status=$?
18779 cat out/conftest.err >&5
18780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18781 if (exit $ac_status) && test -s out/conftest2.$ac_objext
18782 then
18783 # The compiler can only warn and ignore the option if not recognized
18784 # So say no if there are warnings
18785 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
18786 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
18787 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
18788 lt_cv_prog_compiler_c_o_CXX=yes
18789 fi
18790 fi
18791 chmod u+w . 2>&5
18792 $RM conftest*
18793 # SGI C++ compiler will create directory out/ii_files/ for
18794 # template instantiation
18795 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
18796 $RM out/* && rmdir out
18797 cd ..
18798 $RM -r conftest
18799 $RM conftest*
18800
18801 fi
18802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
18803 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
18804
18805
18806
18807
18808 hard_links=nottested
18809 if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
18810 # do not overwrite the value of need_locks provided by the user
18811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
18812 $as_echo_n "checking if we can lock with hard links... " >&6; }
18813 hard_links=yes
18814 $RM conftest*
18815 ln conftest.a conftest.b 2>/dev/null && hard_links=no
18816 touch conftest.a
18817 ln conftest.a conftest.b 2>&5 || hard_links=no
18818 ln conftest.a conftest.b 2>/dev/null && hard_links=no
18819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
18820 $as_echo "$hard_links" >&6; }
18821 if test no = "$hard_links"; then
18822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
18823 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
18824 need_locks=warn
18825 fi
18826 else
18827 need_locks=no
18828 fi
18829
18830
18831
18832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
18833 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
18834
18835 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
18836 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
18837 case $host_os in
18838 aix[4-9]*)
18839 # If we're using GNU nm, then we don't want the "-C" option.
18840 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
18841 # Without the "-l" option, or with the "-B" option, AIX nm treats
18842 # weak defined symbols like other global defined symbols, whereas
18843 # GNU nm marks them as "W".
18844 # While the 'weak' keyword is ignored in the Export File, we need
18845 # it in the Import File for the 'aix-soname' feature, so we have
18846 # to replace the "-B" option with "-P" for AIX nm.
18847 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
18848 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
18849 else
18850 export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
18851 fi
18852 ;;
18853 pw32*)
18854 export_symbols_cmds_CXX=$ltdll_cmds
18855 ;;
18856 cygwin* | mingw* | cegcc*)
18857 case $cc_basename in
18858 cl*)
18859 exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
18860 ;;
18861 *)
18862 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
18863 exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
18864 ;;
18865 esac
18866 ;;
18867 linux* | k*bsd*-gnu | gnu*)
18868 link_all_deplibs_CXX=no
18869 ;;
18870 *)
18871 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
18872 ;;
18873 esac
18874
18875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
18876 $as_echo "$ld_shlibs_CXX" >&6; }
18877 test no = "$ld_shlibs_CXX" && can_build_shared=no
18878
18879 with_gnu_ld_CXX=$with_gnu_ld
18880
18881
18882
18883
18884
18885
18886 #
18887 # Do we need to explicitly link libc?
18888 #
18889 case "x$archive_cmds_need_lc_CXX" in
18890 x|xyes)
18891 # Assume -lc should be added
18892 archive_cmds_need_lc_CXX=yes
18893
18894 if test yes,yes = "$GCC,$enable_shared"; then
18895 case $archive_cmds_CXX in
18896 *'~'*)
18897 # FIXME: we may have to deal with multi-command sequences.
18898 ;;
18899 '$CC '*)
18900 # Test whether the compiler implicitly links with -lc since on some
18901 # systems, -lgcc has to come before -lc. If gcc already passes -lc
18902 # to ld, don't add -lc before -lgcc.
18903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
18904 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
18905 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
18906 $as_echo_n "(cached) " >&6
18907 else
18908 $RM conftest*
18909 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18910
18911 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18912 (eval $ac_compile) 2>&5
18913 ac_status=$?
18914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18915 test $ac_status = 0; } 2>conftest.err; then
18916 soname=conftest
18917 lib=conftest
18918 libobjs=conftest.$ac_objext
18919 deplibs=
18920 wl=$lt_prog_compiler_wl_CXX
18921 pic_flag=$lt_prog_compiler_pic_CXX
18922 compiler_flags=-v
18923 linker_flags=-v
18924 verstring=
18925 output_objdir=.
18926 libname=conftest
18927 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
18928 allow_undefined_flag_CXX=
18929 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
18930 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
18931 ac_status=$?
18932 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18933 test $ac_status = 0; }
18934 then
18935 lt_cv_archive_cmds_need_lc_CXX=no
18936 else
18937 lt_cv_archive_cmds_need_lc_CXX=yes
18938 fi
18939 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
18940 else
18941 cat conftest.err 1>&5
18942 fi
18943 $RM conftest*
18944
18945 fi
18946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
18947 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
18948 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
18949 ;;
18950 esac
18951 fi
18952 ;;
18953 esac
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
19017 $as_echo_n "checking dynamic linker characteristics... " >&6; }
19018
19019 library_names_spec=
19020 libname_spec='lib$name'
19021 soname_spec=
19022 shrext_cmds=.so
19023 postinstall_cmds=
19024 postuninstall_cmds=
19025 finish_cmds=
19026 finish_eval=
19027 shlibpath_var=
19028 shlibpath_overrides_runpath=unknown
19029 version_type=none
19030 dynamic_linker="$host_os ld.so"
19031 sys_lib_dlsearch_path_spec="/lib /usr/lib"
19032 need_lib_prefix=unknown
19033 hardcode_into_libs=no
19034
19035 # when you set need_version to no, make sure it does not cause -set_version
19036 # flags to be left without arguments
19037 need_version=unknown
19038
19039
19040
19041 case $host_os in
19042 aix3*)
19043 version_type=linux # correct to gnu/linux during the next big refactor
19044 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
19045 shlibpath_var=LIBPATH
19046
19047 # AIX 3 has no versioning support, so we append a major version to the name.
19048 soname_spec='$libname$release$shared_ext$major'
19049 ;;
19050
19051 aix[4-9]*)
19052 version_type=linux # correct to gnu/linux during the next big refactor
19053 need_lib_prefix=no
19054 need_version=no
19055 hardcode_into_libs=yes
19056 if test ia64 = "$host_cpu"; then
19057 # AIX 5 supports IA64
19058 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
19059 shlibpath_var=LD_LIBRARY_PATH
19060 else
19061 # With GCC up to 2.95.x, collect2 would create an import file
19062 # for dependence libraries. The import file would start with
19063 # the line '#! .'. This would cause the generated library to
19064 # depend on '.', always an invalid library. This was fixed in
19065 # development snapshots of GCC prior to 3.0.
19066 case $host_os in
19067 aix4 | aix4.[01] | aix4.[01].*)
19068 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
19069 echo ' yes '
19070 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
19071 :
19072 else
19073 can_build_shared=no
19074 fi
19075 ;;
19076 esac
19077 # Using Import Files as archive members, it is possible to support
19078 # filename-based versioning of shared library archives on AIX. While
19079 # this would work for both with and without runtime linking, it will
19080 # prevent static linking of such archives. So we do filename-based
19081 # shared library versioning with .so extension only, which is used
19082 # when both runtime linking and shared linking is enabled.
19083 # Unfortunately, runtime linking may impact performance, so we do
19084 # not want this to be the default eventually. Also, we use the
19085 # versioned .so libs for executables only if there is the -brtl
19086 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
19087 # To allow for filename-based versioning support, we need to create
19088 # libNAME.so.V as an archive file, containing:
19089 # *) an Import File, referring to the versioned filename of the
19090 # archive as well as the shared archive member, telling the
19091 # bitwidth (32 or 64) of that shared object, and providing the
19092 # list of exported symbols of that shared object, eventually
19093 # decorated with the 'weak' keyword
19094 # *) the shared object with the F_LOADONLY flag set, to really avoid
19095 # it being seen by the linker.
19096 # At run time we better use the real file rather than another symlink,
19097 # but for link time we create the symlink libNAME.so -> libNAME.so.V
19098
19099 case $with_aix_soname,$aix_use_runtimelinking in
19100 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
19101 # soname into executable. Probably we can add versioning support to
19102 # collect2, so additional links can be useful in future.
19103 aix,yes) # traditional libtool
19104 dynamic_linker='AIX unversionable lib.so'
19105 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
19106 # instead of lib<name>.a to let people know that these are not
19107 # typical AIX shared libraries.
19108 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19109 ;;
19110 aix,no) # traditional AIX only
19111 dynamic_linker='AIX lib.a(lib.so.V)'
19112 # We preserve .a as extension for shared libraries through AIX4.2
19113 # and later when we are not doing run time linking.
19114 library_names_spec='$libname$release.a $libname.a'
19115 soname_spec='$libname$release$shared_ext$major'
19116 ;;
19117 svr4,*) # full svr4 only
19118 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
19119 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
19120 # We do not specify a path in Import Files, so LIBPATH fires.
19121 shlibpath_overrides_runpath=yes
19122 ;;
19123 *,yes) # both, prefer svr4
19124 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
19125 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
19126 # unpreferred sharedlib libNAME.a needs extra handling
19127 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
19128 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
19129 # We do not specify a path in Import Files, so LIBPATH fires.
19130 shlibpath_overrides_runpath=yes
19131 ;;
19132 *,no) # both, prefer aix
19133 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
19134 library_names_spec='$libname$release.a $libname.a'
19135 soname_spec='$libname$release$shared_ext$major'
19136 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
19137 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
19138 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
19139 ;;
19140 esac
19141 shlibpath_var=LIBPATH
19142 fi
19143 ;;
19144
19145 amigaos*)
19146 case $host_cpu in
19147 powerpc)
19148 # Since July 2007 AmigaOS4 officially supports .so libraries.
19149 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
19150 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19151 ;;
19152 m68k)
19153 library_names_spec='$libname.ixlibrary $libname.a'
19154 # Create ${libname}_ixlibrary.a entries in /sys/libs.
19155 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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'
19156 ;;
19157 esac
19158 ;;
19159
19160 beos*)
19161 library_names_spec='$libname$shared_ext'
19162 dynamic_linker="$host_os ld.so"
19163 shlibpath_var=LIBRARY_PATH
19164 ;;
19165
19166 bsdi[45]*)
19167 version_type=linux # correct to gnu/linux during the next big refactor
19168 need_version=no
19169 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19170 soname_spec='$libname$release$shared_ext$major'
19171 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
19172 shlibpath_var=LD_LIBRARY_PATH
19173 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
19174 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
19175 # the default ld.so.conf also contains /usr/contrib/lib and
19176 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
19177 # libtool to hard-code these into programs
19178 ;;
19179
19180 cygwin* | mingw* | pw32* | cegcc*)
19181 version_type=windows
19182 shrext_cmds=.dll
19183 need_version=no
19184 need_lib_prefix=no
19185
19186 case $GCC,$cc_basename in
19187 yes,*)
19188 # gcc
19189 library_names_spec='$libname.dll.a'
19190 # DLL is installed to $(libdir)/../bin by postinstall_cmds
19191 postinstall_cmds='base_file=`basename \$file`~
19192 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
19193 dldir=$destdir/`dirname \$dlpath`~
19194 test -d \$dldir || mkdir -p \$dldir~
19195 $install_prog $dir/$dlname \$dldir/$dlname~
19196 chmod a+x \$dldir/$dlname~
19197 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
19198 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
19199 fi'
19200 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
19201 dlpath=$dir/\$dldll~
19202 $RM \$dlpath'
19203 shlibpath_overrides_runpath=yes
19204
19205 case $host_os in
19206 cygwin*)
19207 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
19208 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
19209
19210 ;;
19211 mingw* | cegcc*)
19212 # MinGW DLLs use traditional 'lib' prefix
19213 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
19214 ;;
19215 pw32*)
19216 # pw32 DLLs use 'pw' prefix rather than 'lib'
19217 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
19218 ;;
19219 esac
19220 dynamic_linker='Win32 ld.exe'
19221 ;;
19222
19223 *,cl*)
19224 # Native MSVC
19225 libname_spec='$name'
19226 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
19227 library_names_spec='$libname.dll.lib'
19228
19229 case $build_os in
19230 mingw*)
19231 sys_lib_search_path_spec=
19232 lt_save_ifs=$IFS
19233 IFS=';'
19234 for lt_path in $LIB
19235 do
19236 IFS=$lt_save_ifs
19237 # Let DOS variable expansion print the short 8.3 style file name.
19238 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
19239 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
19240 done
19241 IFS=$lt_save_ifs
19242 # Convert to MSYS style.
19243 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
19244 ;;
19245 cygwin*)
19246 # Convert to unix form, then to dos form, then back to unix form
19247 # but this time dos style (no spaces!) so that the unix form looks
19248 # like /cygdrive/c/PROGRA~1:/cygdr...
19249 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
19250 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
19251 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
19252 ;;
19253 *)
19254 sys_lib_search_path_spec=$LIB
19255 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
19256 # It is most probably a Windows format PATH.
19257 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
19258 else
19259 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
19260 fi
19261 # FIXME: find the short name or the path components, as spaces are
19262 # common. (e.g. "Program Files" -> "PROGRA~1")
19263 ;;
19264 esac
19265
19266 # DLL is installed to $(libdir)/../bin by postinstall_cmds
19267 postinstall_cmds='base_file=`basename \$file`~
19268 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
19269 dldir=$destdir/`dirname \$dlpath`~
19270 test -d \$dldir || mkdir -p \$dldir~
19271 $install_prog $dir/$dlname \$dldir/$dlname'
19272 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
19273 dlpath=$dir/\$dldll~
19274 $RM \$dlpath'
19275 shlibpath_overrides_runpath=yes
19276 dynamic_linker='Win32 link.exe'
19277 ;;
19278
19279 *)
19280 # Assume MSVC wrapper
19281 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
19282 dynamic_linker='Win32 ld.exe'
19283 ;;
19284 esac
19285 # FIXME: first we should search . and the directory the executable is in
19286 shlibpath_var=PATH
19287 ;;
19288
19289 darwin* | rhapsody*)
19290 dynamic_linker="$host_os dyld"
19291 version_type=darwin
19292 need_lib_prefix=no
19293 need_version=no
19294 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
19295 soname_spec='$libname$release$major$shared_ext'
19296 shlibpath_overrides_runpath=yes
19297 shlibpath_var=DYLD_LIBRARY_PATH
19298 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
19299
19300 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
19301 ;;
19302
19303 dgux*)
19304 version_type=linux # correct to gnu/linux during the next big refactor
19305 need_lib_prefix=no
19306 need_version=no
19307 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19308 soname_spec='$libname$release$shared_ext$major'
19309 shlibpath_var=LD_LIBRARY_PATH
19310 ;;
19311
19312 freebsd* | dragonfly*)
19313 # DragonFly does not have aout. When/if they implement a new
19314 # versioning mechanism, adjust this.
19315 if test -x /usr/bin/objformat; then
19316 objformat=`/usr/bin/objformat`
19317 else
19318 case $host_os in
19319 freebsd[23].*) objformat=aout ;;
19320 *) objformat=elf ;;
19321 esac
19322 fi
19323 version_type=freebsd-$objformat
19324 case $version_type in
19325 freebsd-elf*)
19326 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19327 soname_spec='$libname$release$shared_ext$major'
19328 need_version=no
19329 need_lib_prefix=no
19330 ;;
19331 freebsd-*)
19332 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
19333 need_version=yes
19334 ;;
19335 esac
19336 shlibpath_var=LD_LIBRARY_PATH
19337 case $host_os in
19338 freebsd2.*)
19339 shlibpath_overrides_runpath=yes
19340 ;;
19341 freebsd3.[01]* | freebsdelf3.[01]*)
19342 shlibpath_overrides_runpath=yes
19343 hardcode_into_libs=yes
19344 ;;
19345 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
19346 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
19347 shlibpath_overrides_runpath=no
19348 hardcode_into_libs=yes
19349 ;;
19350 *) # from 4.6 on, and DragonFly
19351 shlibpath_overrides_runpath=yes
19352 hardcode_into_libs=yes
19353 ;;
19354 esac
19355 ;;
19356
19357 haiku*)
19358 version_type=linux # correct to gnu/linux during the next big refactor
19359 need_lib_prefix=no
19360 need_version=no
19361 dynamic_linker="$host_os runtime_loader"
19362 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19363 soname_spec='$libname$release$shared_ext$major'
19364 shlibpath_var=LIBRARY_PATH
19365 shlibpath_overrides_runpath=no
19366 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
19367 hardcode_into_libs=yes
19368 ;;
19369
19370 hpux9* | hpux10* | hpux11*)
19371 # Give a soname corresponding to the major version so that dld.sl refuses to
19372 # link against other versions.
19373 version_type=sunos
19374 need_lib_prefix=no
19375 need_version=no
19376 case $host_cpu in
19377 ia64*)
19378 shrext_cmds='.so'
19379 hardcode_into_libs=yes
19380 dynamic_linker="$host_os dld.so"
19381 shlibpath_var=LD_LIBRARY_PATH
19382 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
19383 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19384 soname_spec='$libname$release$shared_ext$major'
19385 if test 32 = "$HPUX_IA64_MODE"; then
19386 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
19387 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
19388 else
19389 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
19390 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
19391 fi
19392 ;;
19393 hppa*64*)
19394 shrext_cmds='.sl'
19395 hardcode_into_libs=yes
19396 dynamic_linker="$host_os dld.sl"
19397 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
19398 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
19399 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19400 soname_spec='$libname$release$shared_ext$major'
19401 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
19402 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
19403 ;;
19404 *)
19405 shrext_cmds='.sl'
19406 dynamic_linker="$host_os dld.sl"
19407 shlibpath_var=SHLIB_PATH
19408 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
19409 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19410 soname_spec='$libname$release$shared_ext$major'
19411 ;;
19412 esac
19413 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
19414 postinstall_cmds='chmod 555 $lib'
19415 # or fails outright, so override atomically:
19416 install_override_mode=555
19417 ;;
19418
19419 interix[3-9]*)
19420 version_type=linux # correct to gnu/linux during the next big refactor
19421 need_lib_prefix=no
19422 need_version=no
19423 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19424 soname_spec='$libname$release$shared_ext$major'
19425 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
19426 shlibpath_var=LD_LIBRARY_PATH
19427 shlibpath_overrides_runpath=no
19428 hardcode_into_libs=yes
19429 ;;
19430
19431 irix5* | irix6* | nonstopux*)
19432 case $host_os in
19433 nonstopux*) version_type=nonstopux ;;
19434 *)
19435 if test yes = "$lt_cv_prog_gnu_ld"; then
19436 version_type=linux # correct to gnu/linux during the next big refactor
19437 else
19438 version_type=irix
19439 fi ;;
19440 esac
19441 need_lib_prefix=no
19442 need_version=no
19443 soname_spec='$libname$release$shared_ext$major'
19444 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
19445 case $host_os in
19446 irix5* | nonstopux*)
19447 libsuff= shlibsuff=
19448 ;;
19449 *)
19450 case $LD in # libtool.m4 will add one of these switches to LD
19451 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
19452 libsuff= shlibsuff= libmagic=32-bit;;
19453 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
19454 libsuff=32 shlibsuff=N32 libmagic=N32;;
19455 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
19456 libsuff=64 shlibsuff=64 libmagic=64-bit;;
19457 *) libsuff= shlibsuff= libmagic=never-match;;
19458 esac
19459 ;;
19460 esac
19461 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
19462 shlibpath_overrides_runpath=no
19463 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
19464 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
19465 hardcode_into_libs=yes
19466 ;;
19467
19468 # No shared lib support for Linux oldld, aout, or coff.
19469 linux*oldld* | linux*aout* | linux*coff*)
19470 dynamic_linker=no
19471 ;;
19472
19473 linux*android*)
19474 version_type=none # Android doesn't support versioned libraries.
19475 need_lib_prefix=no
19476 need_version=no
19477 library_names_spec='$libname$release$shared_ext'
19478 soname_spec='$libname$release$shared_ext'
19479 finish_cmds=
19480 shlibpath_var=LD_LIBRARY_PATH
19481 shlibpath_overrides_runpath=yes
19482
19483 # This implies no fast_install, which is unacceptable.
19484 # Some rework will be needed to allow for fast_install
19485 # before this can be enabled.
19486 hardcode_into_libs=yes
19487
19488 dynamic_linker='Android linker'
19489 # Don't embed -rpath directories since the linker doesn't support them.
19490 hardcode_libdir_flag_spec_CXX='-L$libdir'
19491 ;;
19492
19493 # This must be glibc/ELF.
19494 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
19495 version_type=linux # correct to gnu/linux during the next big refactor
19496 need_lib_prefix=no
19497 need_version=no
19498 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19499 soname_spec='$libname$release$shared_ext$major'
19500 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
19501 shlibpath_var=LD_LIBRARY_PATH
19502 shlibpath_overrides_runpath=no
19503
19504 # Some binutils ld are patched to set DT_RUNPATH
19505 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
19506 $as_echo_n "(cached) " >&6
19507 else
19508 lt_cv_shlibpath_overrides_runpath=no
19509 save_LDFLAGS=$LDFLAGS
19510 save_libdir=$libdir
19511 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
19512 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
19513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19514 /* end confdefs.h. */
19515
19516 int
19517 main ()
19518 {
19519
19520 ;
19521 return 0;
19522 }
19523 _ACEOF
19524 if ac_fn_cxx_try_link "$LINENO"; then :
19525 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
19526 lt_cv_shlibpath_overrides_runpath=yes
19527 fi
19528 fi
19529 rm -f core conftest.err conftest.$ac_objext \
19530 conftest$ac_exeext conftest.$ac_ext
19531 LDFLAGS=$save_LDFLAGS
19532 libdir=$save_libdir
19533
19534 fi
19535
19536 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
19537
19538 # This implies no fast_install, which is unacceptable.
19539 # Some rework will be needed to allow for fast_install
19540 # before this can be enabled.
19541 hardcode_into_libs=yes
19542
19543 # Ideally, we could use ldconfig to report *all* directores which are
19544 # searched for libraries, however this is still not possible. Aside from not
19545 # being certain /sbin/ldconfig is available, command
19546 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
19547 # even though it is searched at run-time. Try to do the best guess by
19548 # appending ld.so.conf contents (and includes) to the search path.
19549 if test -f /etc/ld.so.conf; then
19550 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;s/"//g;/^$/d' | tr '\n' ' '`
19551 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
19552 fi
19553
19554 # We used to test for /lib/ld.so.1 and disable shared libraries on
19555 # powerpc, because MkLinux only supported shared libraries with the
19556 # GNU dynamic linker. Since this was broken with cross compilers,
19557 # most powerpc-linux boxes support dynamic linking these days and
19558 # people can always --disable-shared, the test was removed, and we
19559 # assume the GNU/Linux dynamic linker is in use.
19560 dynamic_linker='GNU/Linux ld.so'
19561 ;;
19562
19563 netbsdelf*-gnu)
19564 version_type=linux
19565 need_lib_prefix=no
19566 need_version=no
19567 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
19568 soname_spec='${libname}${release}${shared_ext}$major'
19569 shlibpath_var=LD_LIBRARY_PATH
19570 shlibpath_overrides_runpath=no
19571 hardcode_into_libs=yes
19572 dynamic_linker='NetBSD ld.elf_so'
19573 ;;
19574
19575 netbsd*)
19576 version_type=sunos
19577 need_lib_prefix=no
19578 need_version=no
19579 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
19580 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
19581 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
19582 dynamic_linker='NetBSD (a.out) ld.so'
19583 else
19584 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19585 soname_spec='$libname$release$shared_ext$major'
19586 dynamic_linker='NetBSD ld.elf_so'
19587 fi
19588 shlibpath_var=LD_LIBRARY_PATH
19589 shlibpath_overrides_runpath=yes
19590 hardcode_into_libs=yes
19591 ;;
19592
19593 newsos6)
19594 version_type=linux # correct to gnu/linux during the next big refactor
19595 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19596 shlibpath_var=LD_LIBRARY_PATH
19597 shlibpath_overrides_runpath=yes
19598 ;;
19599
19600 *nto* | *qnx*)
19601 version_type=qnx
19602 need_lib_prefix=no
19603 need_version=no
19604 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19605 soname_spec='$libname$release$shared_ext$major'
19606 shlibpath_var=LD_LIBRARY_PATH
19607 shlibpath_overrides_runpath=no
19608 hardcode_into_libs=yes
19609 dynamic_linker='ldqnx.so'
19610 ;;
19611
19612 openbsd* | bitrig*)
19613 version_type=sunos
19614 sys_lib_dlsearch_path_spec=/usr/lib
19615 need_lib_prefix=no
19616 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
19617 need_version=no
19618 else
19619 need_version=yes
19620 fi
19621 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
19622 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
19623 shlibpath_var=LD_LIBRARY_PATH
19624 shlibpath_overrides_runpath=yes
19625 ;;
19626
19627 os2*)
19628 libname_spec='$name'
19629 version_type=windows
19630 shrext_cmds=.dll
19631 need_version=no
19632 need_lib_prefix=no
19633 # OS/2 can only load a DLL with a base name of 8 characters or less.
19634 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
19635 v=$($ECHO $release$versuffix | tr -d .-);
19636 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
19637 $ECHO $n$v`$shared_ext'
19638 library_names_spec='${libname}_dll.$libext'
19639 dynamic_linker='OS/2 ld.exe'
19640 shlibpath_var=BEGINLIBPATH
19641 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
19642 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
19643 postinstall_cmds='base_file=`basename \$file`~
19644 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
19645 dldir=$destdir/`dirname \$dlpath`~
19646 test -d \$dldir || mkdir -p \$dldir~
19647 $install_prog $dir/$dlname \$dldir/$dlname~
19648 chmod a+x \$dldir/$dlname~
19649 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
19650 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
19651 fi'
19652 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
19653 dlpath=$dir/\$dldll~
19654 $RM \$dlpath'
19655 ;;
19656
19657 osf3* | osf4* | osf5*)
19658 version_type=osf
19659 need_lib_prefix=no
19660 need_version=no
19661 soname_spec='$libname$release$shared_ext$major'
19662 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19663 shlibpath_var=LD_LIBRARY_PATH
19664 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
19665 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
19666 ;;
19667
19668 rdos*)
19669 dynamic_linker=no
19670 ;;
19671
19672 solaris*)
19673 version_type=linux # correct to gnu/linux during the next big refactor
19674 need_lib_prefix=no
19675 need_version=no
19676 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19677 soname_spec='$libname$release$shared_ext$major'
19678 shlibpath_var=LD_LIBRARY_PATH
19679 shlibpath_overrides_runpath=yes
19680 hardcode_into_libs=yes
19681 # ldd complains unless libraries are executable
19682 postinstall_cmds='chmod +x $lib'
19683 ;;
19684
19685 sunos4*)
19686 version_type=sunos
19687 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
19688 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
19689 shlibpath_var=LD_LIBRARY_PATH
19690 shlibpath_overrides_runpath=yes
19691 if test yes = "$with_gnu_ld"; then
19692 need_lib_prefix=no
19693 fi
19694 need_version=yes
19695 ;;
19696
19697 sysv4 | sysv4.3*)
19698 version_type=linux # correct to gnu/linux during the next big refactor
19699 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19700 soname_spec='$libname$release$shared_ext$major'
19701 shlibpath_var=LD_LIBRARY_PATH
19702 case $host_vendor in
19703 sni)
19704 shlibpath_overrides_runpath=no
19705 need_lib_prefix=no
19706 runpath_var=LD_RUN_PATH
19707 ;;
19708 siemens)
19709 need_lib_prefix=no
19710 ;;
19711 motorola)
19712 need_lib_prefix=no
19713 need_version=no
19714 shlibpath_overrides_runpath=no
19715 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
19716 ;;
19717 esac
19718 ;;
19719
19720 sysv4*MP*)
19721 if test -d /usr/nec; then
19722 version_type=linux # correct to gnu/linux during the next big refactor
19723 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
19724 soname_spec='$libname$shared_ext.$major'
19725 shlibpath_var=LD_LIBRARY_PATH
19726 fi
19727 ;;
19728
19729 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
19730 version_type=sco
19731 need_lib_prefix=no
19732 need_version=no
19733 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
19734 soname_spec='$libname$release$shared_ext$major'
19735 shlibpath_var=LD_LIBRARY_PATH
19736 shlibpath_overrides_runpath=yes
19737 hardcode_into_libs=yes
19738 if test yes = "$with_gnu_ld"; then
19739 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
19740 else
19741 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
19742 case $host_os in
19743 sco3.2v5*)
19744 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
19745 ;;
19746 esac
19747 fi
19748 sys_lib_dlsearch_path_spec='/usr/lib'
19749 ;;
19750
19751 tpf*)
19752 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
19753 version_type=linux # correct to gnu/linux during the next big refactor
19754 need_lib_prefix=no
19755 need_version=no
19756 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19757 shlibpath_var=LD_LIBRARY_PATH
19758 shlibpath_overrides_runpath=no
19759 hardcode_into_libs=yes
19760 ;;
19761
19762 uts4*)
19763 version_type=linux # correct to gnu/linux during the next big refactor
19764 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19765 soname_spec='$libname$release$shared_ext$major'
19766 shlibpath_var=LD_LIBRARY_PATH
19767 ;;
19768
19769 *)
19770 dynamic_linker=no
19771 ;;
19772 esac
19773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
19774 $as_echo "$dynamic_linker" >&6; }
19775 test no = "$dynamic_linker" && can_build_shared=no
19776
19777 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
19778 if test yes = "$GCC"; then
19779 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
19780 fi
19781
19782 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
19783 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
19784 fi
19785
19786 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
19787 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
19788 fi
19789
19790 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
19791 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
19792
19793 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
19794 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
19795
19796 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
19797 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
19839 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
19840 hardcode_action_CXX=
19841 if test -n "$hardcode_libdir_flag_spec_CXX" ||
19842 test -n "$runpath_var_CXX" ||
19843 test yes = "$hardcode_automatic_CXX"; then
19844
19845 # We can hardcode non-existent directories.
19846 if test no != "$hardcode_direct_CXX" &&
19847 # If the only mechanism to avoid hardcoding is shlibpath_var, we
19848 # have to relink, otherwise we might link with an installed library
19849 # when we should be linking with a yet-to-be-installed one
19850 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
19851 test no != "$hardcode_minus_L_CXX"; then
19852 # Linking always hardcodes the temporary library directory.
19853 hardcode_action_CXX=relink
19854 else
19855 # We can link without hardcoding, and we can hardcode nonexisting dirs.
19856 hardcode_action_CXX=immediate
19857 fi
19858 else
19859 # We cannot hardcode anything, or else we can only hardcode existing
19860 # directories.
19861 hardcode_action_CXX=unsupported
19862 fi
19863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
19864 $as_echo "$hardcode_action_CXX" >&6; }
19865
19866 if test relink = "$hardcode_action_CXX" ||
19867 test yes = "$inherit_rpath_CXX"; then
19868 # Fast installation is not supported
19869 enable_fast_install=no
19870 elif test yes = "$shlibpath_overrides_runpath" ||
19871 test no = "$enable_shared"; then
19872 # Fast installation is not necessary
19873 enable_fast_install=needless
19874 fi
19875
19876
19877
19878
19879
19880
19881
19882 fi # test -n "$compiler"
19883
19884 CC=$lt_save_CC
19885 CFLAGS=$lt_save_CFLAGS
19886 LDCXX=$LD
19887 LD=$lt_save_LD
19888 GCC=$lt_save_GCC
19889 with_gnu_ld=$lt_save_with_gnu_ld
19890 lt_cv_path_LDCXX=$lt_cv_path_LD
19891 lt_cv_path_LD=$lt_save_path_LD
19892 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
19893 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
19894 fi # test yes != "$_lt_caught_CXX_error"
19895
19896 ac_ext=c
19897 ac_cpp='$CPP $CPPFLAGS'
19898 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19899 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19900 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916 ac_config_commands="$ac_config_commands libtool"
19917
19918
19919
19920
19921 # Only expand once:
19922
19923
19924 if test -n "$ac_tool_prefix"; then
19925 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19926 set dummy ${ac_tool_prefix}windres; ac_word=$2
19927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19928 $as_echo_n "checking for $ac_word... " >&6; }
19929 if ${ac_cv_prog_RC+:} false; then :
19930 $as_echo_n "(cached) " >&6
19931 else
19932 if test -n "$RC"; then
19933 ac_cv_prog_RC="$RC" # Let the user override the test.
19934 else
19935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19936 for as_dir in $PATH
19937 do
19938 IFS=$as_save_IFS
19939 test -z "$as_dir" && as_dir=.
19940 for ac_exec_ext in '' $ac_executable_extensions; do
19941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19942 ac_cv_prog_RC="${ac_tool_prefix}windres"
19943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19944 break 2
19945 fi
19946 done
19947 done
19948 IFS=$as_save_IFS
19949
19950 fi
19951 fi
19952 RC=$ac_cv_prog_RC
19953 if test -n "$RC"; then
19954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
19955 $as_echo "$RC" >&6; }
19956 else
19957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19958 $as_echo "no" >&6; }
19959 fi
19960
19961
19962 fi
19963 if test -z "$ac_cv_prog_RC"; then
19964 ac_ct_RC=$RC
19965 # Extract the first word of "windres", so it can be a program name with args.
19966 set dummy windres; ac_word=$2
19967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19968 $as_echo_n "checking for $ac_word... " >&6; }
19969 if ${ac_cv_prog_ac_ct_RC+:} false; then :
19970 $as_echo_n "(cached) " >&6
19971 else
19972 if test -n "$ac_ct_RC"; then
19973 ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
19974 else
19975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19976 for as_dir in $PATH
19977 do
19978 IFS=$as_save_IFS
19979 test -z "$as_dir" && as_dir=.
19980 for ac_exec_ext in '' $ac_executable_extensions; do
19981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19982 ac_cv_prog_ac_ct_RC="windres"
19983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19984 break 2
19985 fi
19986 done
19987 done
19988 IFS=$as_save_IFS
19989
19990 fi
19991 fi
19992 ac_ct_RC=$ac_cv_prog_ac_ct_RC
19993 if test -n "$ac_ct_RC"; then
19994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
19995 $as_echo "$ac_ct_RC" >&6; }
19996 else
19997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19998 $as_echo "no" >&6; }
19999 fi
20000
20001 if test "x$ac_ct_RC" = x; then
20002 RC=""
20003 else
20004 case $cross_compiling:$ac_tool_warned in
20005 yes:)
20006 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20007 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20008 ac_tool_warned=yes ;;
20009 esac
20010 RC=$ac_ct_RC
20011 fi
20012 else
20013 RC="$ac_cv_prog_RC"
20014 fi
20015
20016
20017
20018
20019 # Source file extension for RC test sources.
20020 ac_ext=rc
20021
20022 # Object file extension for compiled RC test sources.
20023 objext=o
20024 objext_RC=$objext
20025
20026 # Code to be used in simple compile tests
20027 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
20028
20029 # Code to be used in simple link tests
20030 lt_simple_link_test_code=$lt_simple_compile_test_code
20031
20032 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
20033
20034
20035
20036
20037
20038
20039 # If no C compiler was specified, use CC.
20040 LTCC=${LTCC-"$CC"}
20041
20042 # If no C compiler flags were specified, use CFLAGS.
20043 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
20044
20045 # Allow CC to be a program name with arguments.
20046 compiler=$CC
20047
20048
20049 # save warnings/boilerplate of simple test code
20050 ac_outfile=conftest.$ac_objext
20051 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
20052 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20053 _lt_compiler_boilerplate=`cat conftest.err`
20054 $RM conftest*
20055
20056 ac_outfile=conftest.$ac_objext
20057 echo "$lt_simple_link_test_code" >conftest.$ac_ext
20058 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20059 _lt_linker_boilerplate=`cat conftest.err`
20060 $RM -r conftest*
20061
20062
20063 # Allow CC to be a program name with arguments.
20064 lt_save_CC=$CC
20065 lt_save_CFLAGS=$CFLAGS
20066 lt_save_GCC=$GCC
20067 GCC=
20068 CC=${RC-"windres"}
20069 CFLAGS=
20070 compiler=$CC
20071 compiler_RC=$CC
20072 func_cc_basename $compiler
20073 cc_basename=$func_cc_basename_result
20074
20075 lt_cv_prog_compiler_c_o_RC=yes
20076
20077 if test -n "$compiler"; then
20078 :
20079
20080
20081
20082 fi
20083
20084 GCC=$lt_save_GCC
20085 ac_ext=c
20086 ac_cpp='$CPP $CPPFLAGS'
20087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20090
20091 CC=$lt_save_CC
20092 CFLAGS=$lt_save_CFLAGS
20093
20094
20095
20096
20097
20098
20099 LIBC_FATAL_STDERR_=1
20100 export LIBC_FATAL_STDERR_
20101
20102
20103
20104
20105
20106 GNULIB_FLOCK=0;
20107 HAVE_FLOCK=1;
20108
20109
20110
20111
20112 for ac_func in $ac_func_list
20113 do :
20114 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20115 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20116 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20117 cat >>confdefs.h <<_ACEOF
20118 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20119 _ACEOF
20120
20121 fi
20122 done
20123
20124
20125
20126
20127
20128
20129
20130
20131 for ac_header in $ac_header_list
20132 do :
20133 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20134 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
20135 "
20136 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20137 cat >>confdefs.h <<_ACEOF
20138 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20139 _ACEOF
20140
20141 fi
20142
20143 done
20144
20145
20146
20147
20148 GNULIB_CHDIR=0;
20149 GNULIB_CHOWN=0;
20150 GNULIB_CLOSE=0;
20151 GNULIB_DUP=0;
20152 GNULIB_DUP2=0;
20153 GNULIB_DUP3=0;
20154 GNULIB_ENVIRON=0;
20155 GNULIB_EUIDACCESS=0;
20156 GNULIB_FACCESSAT=0;
20157 GNULIB_FCHDIR=0;
20158 GNULIB_FCHOWNAT=0;
20159 GNULIB_FDATASYNC=0;
20160 GNULIB_FSYNC=0;
20161 GNULIB_FTRUNCATE=0;
20162 GNULIB_GETCWD=0;
20163 GNULIB_GETDOMAINNAME=0;
20164 GNULIB_GETDTABLESIZE=0;
20165 GNULIB_GETGROUPS=0;
20166 GNULIB_GETHOSTNAME=0;
20167 GNULIB_GETLOGIN=0;
20168 GNULIB_GETLOGIN_R=0;
20169 GNULIB_GETPAGESIZE=0;
20170 GNULIB_GETPASS=0;
20171 GNULIB_GETUSERSHELL=0;
20172 GNULIB_GROUP_MEMBER=0;
20173 GNULIB_ISATTY=0;
20174 GNULIB_LCHOWN=0;
20175 GNULIB_LINK=0;
20176 GNULIB_LINKAT=0;
20177 GNULIB_LSEEK=0;
20178 GNULIB_PIPE=0;
20179 GNULIB_PIPE2=0;
20180 GNULIB_PREAD=0;
20181 GNULIB_PWRITE=0;
20182 GNULIB_READ=0;
20183 GNULIB_READLINK=0;
20184 GNULIB_READLINKAT=0;
20185 GNULIB_RMDIR=0;
20186 GNULIB_SETHOSTNAME=0;
20187 GNULIB_SLEEP=0;
20188 GNULIB_SYMLINK=0;
20189 GNULIB_SYMLINKAT=0;
20190 GNULIB_TRUNCATE=0;
20191 GNULIB_TTYNAME_R=0;
20192 GNULIB_UNISTD_H_NONBLOCKING=0;
20193 GNULIB_UNISTD_H_SIGPIPE=0;
20194 GNULIB_UNLINK=0;
20195 GNULIB_UNLINKAT=0;
20196 GNULIB_USLEEP=0;
20197 GNULIB_WRITE=0;
20198 HAVE_CHOWN=1;
20199 HAVE_DUP2=1;
20200 HAVE_DUP3=1;
20201 HAVE_EUIDACCESS=1;
20202 HAVE_FACCESSAT=1;
20203 HAVE_FCHDIR=1;
20204 HAVE_FCHOWNAT=1;
20205 HAVE_FDATASYNC=1;
20206 HAVE_FSYNC=1;
20207 HAVE_FTRUNCATE=1;
20208 HAVE_GETDTABLESIZE=1;
20209 HAVE_GETGROUPS=1;
20210 HAVE_GETHOSTNAME=1;
20211 HAVE_GETLOGIN=1;
20212 HAVE_GETPAGESIZE=1;
20213 HAVE_GETPASS=1;
20214 HAVE_GROUP_MEMBER=1;
20215 HAVE_LCHOWN=1;
20216 HAVE_LINK=1;
20217 HAVE_LINKAT=1;
20218 HAVE_PIPE=1;
20219 HAVE_PIPE2=1;
20220 HAVE_PREAD=1;
20221 HAVE_PWRITE=1;
20222 HAVE_READLINK=1;
20223 HAVE_READLINKAT=1;
20224 HAVE_SETHOSTNAME=1;
20225 HAVE_SLEEP=1;
20226 HAVE_SYMLINK=1;
20227 HAVE_SYMLINKAT=1;
20228 HAVE_UNLINKAT=1;
20229 HAVE_USLEEP=1;
20230 HAVE_DECL_ENVIRON=1;
20231 HAVE_DECL_FCHDIR=1;
20232 HAVE_DECL_FDATASYNC=1;
20233 HAVE_DECL_GETDOMAINNAME=1;
20234 HAVE_DECL_GETLOGIN=1;
20235 HAVE_DECL_GETLOGIN_R=1;
20236 HAVE_DECL_GETPAGESIZE=1;
20237 HAVE_DECL_GETUSERSHELL=1;
20238 HAVE_DECL_SETHOSTNAME=1;
20239 HAVE_DECL_TRUNCATE=1;
20240 HAVE_DECL_TTYNAME_R=1;
20241 HAVE_OS_H=0;
20242 HAVE_SYS_PARAM_H=0;
20243 REPLACE_CHOWN=0;
20244 REPLACE_CLOSE=0;
20245 REPLACE_DUP=0;
20246 REPLACE_DUP2=0;
20247 REPLACE_FACCESSAT=0;
20248 REPLACE_FCHOWNAT=0;
20249 REPLACE_FTRUNCATE=0;
20250 REPLACE_GETCWD=0;
20251 REPLACE_GETDOMAINNAME=0;
20252 REPLACE_GETDTABLESIZE=0;
20253 REPLACE_GETLOGIN_R=0;
20254 REPLACE_GETGROUPS=0;
20255 REPLACE_GETPAGESIZE=0;
20256 REPLACE_GETPASS=0;
20257 REPLACE_ISATTY=0;
20258 REPLACE_LCHOWN=0;
20259 REPLACE_LINK=0;
20260 REPLACE_LINKAT=0;
20261 REPLACE_LSEEK=0;
20262 REPLACE_PREAD=0;
20263 REPLACE_PWRITE=0;
20264 REPLACE_READ=0;
20265 REPLACE_READLINK=0;
20266 REPLACE_READLINKAT=0;
20267 REPLACE_RMDIR=0;
20268 REPLACE_SLEEP=0;
20269 REPLACE_SYMLINK=0;
20270 REPLACE_SYMLINKAT=0;
20271 REPLACE_TRUNCATE=0;
20272 REPLACE_TTYNAME_R=0;
20273 REPLACE_UNLINK=0;
20274 REPLACE_UNLINKAT=0;
20275 REPLACE_USLEEP=0;
20276 REPLACE_WRITE=0;
20277 UNISTD_H_HAVE_WINSOCK2_H=0;
20278 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
20279
20280
20281
20282
20283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
20284 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
20285 if ${gl_cv_have_include_next+:} false; then :
20286 $as_echo_n "(cached) " >&6
20287 else
20288 rm -rf conftestd1a conftestd1b conftestd2
20289 mkdir conftestd1a conftestd1b conftestd2
20290 cat <<EOF > conftestd1a/conftest.h
20291 #define DEFINED_IN_CONFTESTD1
20292 #include_next <conftest.h>
20293 #ifdef DEFINED_IN_CONFTESTD2
20294 int foo;
20295 #else
20296 #error "include_next doesn't work"
20297 #endif
20298 EOF
20299 cat <<EOF > conftestd1b/conftest.h
20300 #define DEFINED_IN_CONFTESTD1
20301 #include <stdio.h>
20302 #include_next <conftest.h>
20303 #ifdef DEFINED_IN_CONFTESTD2
20304 int foo;
20305 #else
20306 #error "include_next doesn't work"
20307 #endif
20308 EOF
20309 cat <<EOF > conftestd2/conftest.h
20310 #ifndef DEFINED_IN_CONFTESTD1
20311 #error "include_next test doesn't work"
20312 #endif
20313 #define DEFINED_IN_CONFTESTD2
20314 EOF
20315 gl_save_CPPFLAGS="$CPPFLAGS"
20316 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
20317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20318 /* end confdefs.h. */
20319 #include <conftest.h>
20320 _ACEOF
20321 if ac_fn_c_try_compile "$LINENO"; then :
20322 gl_cv_have_include_next=yes
20323 else
20324 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
20325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20326 /* end confdefs.h. */
20327 #include <conftest.h>
20328 _ACEOF
20329 if ac_fn_c_try_compile "$LINENO"; then :
20330 gl_cv_have_include_next=buggy
20331 else
20332 gl_cv_have_include_next=no
20333 fi
20334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20335
20336 fi
20337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20338 CPPFLAGS="$gl_save_CPPFLAGS"
20339 rm -rf conftestd1a conftestd1b conftestd2
20340
20341 fi
20342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
20343 $as_echo "$gl_cv_have_include_next" >&6; }
20344 PRAGMA_SYSTEM_HEADER=
20345 if test $gl_cv_have_include_next = yes; then
20346 INCLUDE_NEXT=include_next
20347 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
20348 if test -n "$GCC"; then
20349 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
20350 fi
20351 else
20352 if test $gl_cv_have_include_next = buggy; then
20353 INCLUDE_NEXT=include
20354 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
20355 else
20356 INCLUDE_NEXT=include
20357 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
20358 fi
20359 fi
20360
20361
20362
20363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
20364 $as_echo_n "checking whether system header files limit the line length... " >&6; }
20365 if ${gl_cv_pragma_columns+:} false; then :
20366 $as_echo_n "(cached) " >&6
20367 else
20368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20369 /* end confdefs.h. */
20370
20371 #ifdef __TANDEM
20372 choke me
20373 #endif
20374
20375 _ACEOF
20376 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20377 $EGREP "choke me" >/dev/null 2>&1; then :
20378 gl_cv_pragma_columns=yes
20379 else
20380 gl_cv_pragma_columns=no
20381 fi
20382 rm -f conftest*
20383
20384
20385 fi
20386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
20387 $as_echo "$gl_cv_pragma_columns" >&6; }
20388 if test $gl_cv_pragma_columns = yes; then
20389 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
20390 else
20391 PRAGMA_COLUMNS=
20392 fi
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410 if test $gl_cv_have_include_next = yes; then
20411 gl_cv_next_getopt_h='<'getopt.h'>'
20412 else
20413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
20414 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
20415 if ${gl_cv_next_getopt_h+:} false; then :
20416 $as_echo_n "(cached) " >&6
20417 else
20418
20419 if test $ac_cv_header_getopt_h = yes; then
20420
20421
20422
20423
20424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20425 /* end confdefs.h. */
20426 #include <getopt.h>
20427 _ACEOF
20428 case "$host_os" in
20429 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20430 *) gl_absname_cpp="$ac_cpp" ;;
20431 esac
20432
20433 case "$host_os" in
20434 mingw*)
20435 gl_dirsep_regex='[/\\]'
20436 ;;
20437 *)
20438 gl_dirsep_regex='\/'
20439 ;;
20440 esac
20441 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20442 gl_header_literal_regex=`echo 'getopt.h' \
20443 | sed -e "$gl_make_literal_regex_sed"`
20444 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20445 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20446 s|^/[^/]|//&|
20447 p
20448 q
20449 }'
20450
20451 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20452 sed -n "$gl_absolute_header_sed"`
20453
20454 gl_header=$gl_cv_absolute_getopt_h
20455 gl_cv_next_getopt_h='"'$gl_header'"'
20456 else
20457 gl_cv_next_getopt_h='<'getopt.h'>'
20458 fi
20459
20460
20461 fi
20462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
20463 $as_echo "$gl_cv_next_getopt_h" >&6; }
20464 fi
20465 NEXT_GETOPT_H=$gl_cv_next_getopt_h
20466
20467 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20468 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20469 gl_next_as_first_directive='<'getopt.h'>'
20470 else
20471 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20472 gl_next_as_first_directive=$gl_cv_next_getopt_h
20473 fi
20474 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
20475
20476
20477
20478
20479 if test $ac_cv_header_getopt_h = yes; then
20480 HAVE_GETOPT_H=1
20481 else
20482 HAVE_GETOPT_H=0
20483 fi
20484
20485
20486 gl_replace_getopt=
20487
20488 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
20489 for ac_header in getopt.h
20490 do :
20491 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
20492 if test "x$ac_cv_header_getopt_h" = xyes; then :
20493 cat >>confdefs.h <<_ACEOF
20494 #define HAVE_GETOPT_H 1
20495 _ACEOF
20496
20497 else
20498 gl_replace_getopt=yes
20499 fi
20500
20501 done
20502
20503 fi
20504
20505 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
20506 for ac_func in getopt_long_only
20507 do :
20508 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
20509 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
20510 cat >>confdefs.h <<_ACEOF
20511 #define HAVE_GETOPT_LONG_ONLY 1
20512 _ACEOF
20513
20514 else
20515 gl_replace_getopt=yes
20516 fi
20517 done
20518
20519 fi
20520
20521 if test -z "$gl_replace_getopt"; then
20522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
20523 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
20524 if ${gl_cv_func_getopt_posix+:} false; then :
20525 $as_echo_n "(cached) " >&6
20526 else
20527
20528 if test $cross_compiling = no; then
20529 if test "$cross_compiling" = yes; then :
20530 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20531 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20532 as_fn_error $? "cannot run test program while cross compiling
20533 See \`config.log' for more details" "$LINENO" 5; }
20534 else
20535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20536 /* end confdefs.h. */
20537
20538 #include <unistd.h>
20539 #include <stdlib.h>
20540 #include <string.h>
20541
20542 int
20543 main ()
20544 {
20545 static char program[] = "program";
20546 static char a[] = "-a";
20547 static char foo[] = "foo";
20548 static char bar[] = "bar";
20549 char *argv[] = { program, a, foo, bar, NULL };
20550 int c;
20551
20552 c = getopt (4, argv, "ab");
20553 if (!(c == 'a'))
20554 return 1;
20555 c = getopt (4, argv, "ab");
20556 if (!(c == -1))
20557 return 2;
20558 if (!(optind == 2))
20559 return 3;
20560 return 0;
20561 }
20562
20563 _ACEOF
20564 if ac_fn_c_try_run "$LINENO"; then :
20565 gl_cv_func_getopt_posix=maybe
20566 else
20567 gl_cv_func_getopt_posix=no
20568 fi
20569 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20570 conftest.$ac_objext conftest.beam conftest.$ac_ext
20571 fi
20572
20573 if test $gl_cv_func_getopt_posix = maybe; then
20574 if test "$cross_compiling" = yes; then :
20575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20576 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20577 as_fn_error $? "cannot run test program while cross compiling
20578 See \`config.log' for more details" "$LINENO" 5; }
20579 else
20580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20581 /* end confdefs.h. */
20582
20583 #include <unistd.h>
20584 #include <stdlib.h>
20585 #include <string.h>
20586
20587 int
20588 main ()
20589 {
20590 static char program[] = "program";
20591 static char donald[] = "donald";
20592 static char p[] = "-p";
20593 static char billy[] = "billy";
20594 static char duck[] = "duck";
20595 static char a[] = "-a";
20596 static char bar[] = "bar";
20597 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
20598 int c;
20599
20600 c = getopt (7, argv, "+abp:q:");
20601 if (!(c == -1))
20602 return 4;
20603 if (!(strcmp (argv[0], "program") == 0))
20604 return 5;
20605 if (!(strcmp (argv[1], "donald") == 0))
20606 return 6;
20607 if (!(strcmp (argv[2], "-p") == 0))
20608 return 7;
20609 if (!(strcmp (argv[3], "billy") == 0))
20610 return 8;
20611 if (!(strcmp (argv[4], "duck") == 0))
20612 return 9;
20613 if (!(strcmp (argv[5], "-a") == 0))
20614 return 10;
20615 if (!(strcmp (argv[6], "bar") == 0))
20616 return 11;
20617 if (!(optind == 1))
20618 return 12;
20619 return 0;
20620 }
20621
20622 _ACEOF
20623 if ac_fn_c_try_run "$LINENO"; then :
20624 gl_cv_func_getopt_posix=maybe
20625 else
20626 gl_cv_func_getopt_posix=no
20627 fi
20628 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20629 conftest.$ac_objext conftest.beam conftest.$ac_ext
20630 fi
20631
20632 fi
20633 if test $gl_cv_func_getopt_posix = maybe; then
20634 if test "$cross_compiling" = yes; then :
20635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20636 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20637 as_fn_error $? "cannot run test program while cross compiling
20638 See \`config.log' for more details" "$LINENO" 5; }
20639 else
20640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20641 /* end confdefs.h. */
20642
20643 #include <unistd.h>
20644 #include <stdlib.h>
20645 #include <string.h>
20646
20647 int
20648 main ()
20649 {
20650 static char program[] = "program";
20651 static char ab[] = "-ab";
20652 char *argv[3] = { program, ab, NULL };
20653 if (getopt (2, argv, "ab:") != 'a')
20654 return 13;
20655 if (getopt (2, argv, "ab:") != '?')
20656 return 14;
20657 if (optopt != 'b')
20658 return 15;
20659 if (optind != 2)
20660 return 16;
20661 return 0;
20662 }
20663
20664 _ACEOF
20665 if ac_fn_c_try_run "$LINENO"; then :
20666 gl_cv_func_getopt_posix=yes
20667 else
20668 gl_cv_func_getopt_posix=no
20669 fi
20670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20671 conftest.$ac_objext conftest.beam conftest.$ac_ext
20672 fi
20673
20674 fi
20675 else
20676 case "$host_os" in
20677 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
20678 *) gl_cv_func_getopt_posix="guessing yes";;
20679 esac
20680 fi
20681
20682 fi
20683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
20684 $as_echo "$gl_cv_func_getopt_posix" >&6; }
20685 case "$gl_cv_func_getopt_posix" in
20686 *no) gl_replace_getopt=yes ;;
20687 esac
20688 fi
20689
20690 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
20691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
20692 $as_echo_n "checking for working GNU getopt function... " >&6; }
20693 if ${gl_cv_func_getopt_gnu+:} false; then :
20694 $as_echo_n "(cached) " >&6
20695 else
20696 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
20697 # optstring is necessary for programs like m4 that have POSIX-mandated
20698 # semantics for supporting options interspersed with files.
20699 # Also, since getopt_long is a GNU extension, we require optind=0.
20700 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
20701 # so take care to revert to the correct (non-)export state.
20702 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
20703 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
20704 xx) gl_had_POSIXLY_CORRECT=exported ;;
20705 x) gl_had_POSIXLY_CORRECT=yes ;;
20706 *) gl_had_POSIXLY_CORRECT= ;;
20707 esac
20708 POSIXLY_CORRECT=1
20709 export POSIXLY_CORRECT
20710 if test "$cross_compiling" = yes; then :
20711 gl_cv_func_getopt_gnu="guessing no"
20712
20713 else
20714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20715 /* end confdefs.h. */
20716 #include <getopt.h>
20717 #include <stddef.h>
20718 #include <string.h>
20719 GL_NOCRASH
20720
20721 int
20722 main ()
20723 {
20724
20725 int result = 0;
20726
20727 nocrash_init();
20728
20729 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
20730 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
20731 OSF/1 5.1, Solaris 10. */
20732 {
20733 static char conftest[] = "conftest";
20734 static char plus[] = "-+";
20735 char *argv[3] = { conftest, plus, NULL };
20736 opterr = 0;
20737 if (getopt (2, argv, "+a") != '?')
20738 result |= 1;
20739 }
20740 /* This code succeeds on glibc 2.8, mingw,
20741 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
20742 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
20743 {
20744 static char program[] = "program";
20745 static char p[] = "-p";
20746 static char foo[] = "foo";
20747 static char bar[] = "bar";
20748 char *argv[] = { program, p, foo, bar, NULL };
20749
20750 optind = 1;
20751 if (getopt (4, argv, "p::") != 'p')
20752 result |= 2;
20753 else if (optarg != NULL)
20754 result |= 4;
20755 else if (getopt (4, argv, "p::") != -1)
20756 result |= 6;
20757 else if (optind != 2)
20758 result |= 8;
20759 }
20760 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
20761 {
20762 static char program[] = "program";
20763 static char foo[] = "foo";
20764 static char p[] = "-p";
20765 char *argv[] = { program, foo, p, NULL };
20766 optind = 0;
20767 if (getopt (3, argv, "-p") != 1)
20768 result |= 16;
20769 else if (getopt (3, argv, "-p") != 'p')
20770 result |= 16;
20771 }
20772 /* This code fails on glibc 2.11. */
20773 {
20774 static char program[] = "program";
20775 static char b[] = "-b";
20776 static char a[] = "-a";
20777 char *argv[] = { program, b, a, NULL };
20778 optind = opterr = 0;
20779 if (getopt (3, argv, "+:a:b") != 'b')
20780 result |= 32;
20781 else if (getopt (3, argv, "+:a:b") != ':')
20782 result |= 32;
20783 }
20784 /* This code dumps core on glibc 2.14. */
20785 {
20786 static char program[] = "program";
20787 static char w[] = "-W";
20788 static char dummy[] = "dummy";
20789 char *argv[] = { program, w, dummy, NULL };
20790 optind = opterr = 1;
20791 if (getopt (3, argv, "W;") != 'W')
20792 result |= 64;
20793 }
20794 return result;
20795
20796 ;
20797 return 0;
20798 }
20799 _ACEOF
20800 if ac_fn_c_try_run "$LINENO"; then :
20801 gl_cv_func_getopt_gnu=yes
20802 else
20803 gl_cv_func_getopt_gnu=no
20804 fi
20805 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20806 conftest.$ac_objext conftest.beam conftest.$ac_ext
20807 fi
20808
20809 case $gl_had_POSIXLY_CORRECT in
20810 exported) ;;
20811 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
20812 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
20813 esac
20814
20815 fi
20816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
20817 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
20818 if test "$gl_cv_func_getopt_gnu" != yes; then
20819 gl_replace_getopt=yes
20820 else
20821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
20822 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
20823 if ${gl_cv_func_getopt_long_gnu+:} false; then :
20824 $as_echo_n "(cached) " >&6
20825 else
20826 if test "$cross_compiling" = yes; then :
20827 case "$host_os" in
20828 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
20829 *) gl_cv_func_getopt_long_gnu="guessing yes";;
20830 esac
20831
20832 else
20833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20834 /* end confdefs.h. */
20835 #include <getopt.h>
20836 #include <stddef.h>
20837 #include <string.h>
20838
20839 int
20840 main ()
20841 {
20842 static const struct option long_options[] =
20843 {
20844 { "xtremely-",no_argument, NULL, 1003 },
20845 { "xtra", no_argument, NULL, 1001 },
20846 { "xtreme", no_argument, NULL, 1002 },
20847 { "xtremely", no_argument, NULL, 1003 },
20848 { NULL, 0, NULL, 0 }
20849 };
20850 /* This code fails on OpenBSD 5.0. */
20851 {
20852 static char program[] = "program";
20853 static char xtremel[] = "--xtremel";
20854 char *argv[] = { program, xtremel, NULL };
20855 int option_index;
20856 optind = 1; opterr = 0;
20857 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
20858 return 1;
20859 }
20860 return 0;
20861
20862 ;
20863 return 0;
20864 }
20865 _ACEOF
20866 if ac_fn_c_try_run "$LINENO"; then :
20867 gl_cv_func_getopt_long_gnu=yes
20868 else
20869 gl_cv_func_getopt_long_gnu=no
20870 fi
20871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20872 conftest.$ac_objext conftest.beam conftest.$ac_ext
20873 fi
20874
20875
20876 fi
20877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
20878 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
20879 case "$gl_cv_func_getopt_long_gnu" in
20880 *yes) ;;
20881 *) gl_replace_getopt=yes ;;
20882 esac
20883 fi
20884 fi
20885
20886
20887
20888
20889 GNULIB__EXIT=0;
20890 GNULIB_ATOLL=0;
20891 GNULIB_CALLOC_POSIX=0;
20892 GNULIB_CANONICALIZE_FILE_NAME=0;
20893 GNULIB_GETLOADAVG=0;
20894 GNULIB_GETSUBOPT=0;
20895 GNULIB_GRANTPT=0;
20896 GNULIB_MALLOC_POSIX=0;
20897 GNULIB_MBTOWC=0;
20898 GNULIB_MKDTEMP=0;
20899 GNULIB_MKOSTEMP=0;
20900 GNULIB_MKOSTEMPS=0;
20901 GNULIB_MKSTEMP=0;
20902 GNULIB_MKSTEMPS=0;
20903 GNULIB_POSIX_OPENPT=0;
20904 GNULIB_PTSNAME=0;
20905 GNULIB_PTSNAME_R=0;
20906 GNULIB_PUTENV=0;
20907 GNULIB_QSORT_R=0;
20908 GNULIB_RANDOM=0;
20909 GNULIB_RANDOM_R=0;
20910 GNULIB_REALLOCARRAY=0;
20911 GNULIB_REALLOC_POSIX=0;
20912 GNULIB_REALPATH=0;
20913 GNULIB_RPMATCH=0;
20914 GNULIB_SECURE_GETENV=0;
20915 GNULIB_SETENV=0;
20916 GNULIB_STRTOD=0;
20917 GNULIB_STRTOLL=0;
20918 GNULIB_STRTOULL=0;
20919 GNULIB_SYSTEM_POSIX=0;
20920 GNULIB_UNLOCKPT=0;
20921 GNULIB_UNSETENV=0;
20922 GNULIB_WCTOMB=0;
20923 HAVE__EXIT=1;
20924 HAVE_ATOLL=1;
20925 HAVE_CANONICALIZE_FILE_NAME=1;
20926 HAVE_DECL_GETLOADAVG=1;
20927 HAVE_GETSUBOPT=1;
20928 HAVE_GRANTPT=1;
20929 HAVE_DECL_INITSTATE=1;
20930 HAVE_MKDTEMP=1;
20931 HAVE_MKOSTEMP=1;
20932 HAVE_MKOSTEMPS=1;
20933 HAVE_MKSTEMP=1;
20934 HAVE_MKSTEMPS=1;
20935 HAVE_POSIX_OPENPT=1;
20936 HAVE_PTSNAME=1;
20937 HAVE_PTSNAME_R=1;
20938 HAVE_QSORT_R=1;
20939 HAVE_RANDOM=1;
20940 HAVE_RANDOM_H=1;
20941 HAVE_RANDOM_R=1;
20942 HAVE_REALLOCARRAY=1;
20943 HAVE_REALPATH=1;
20944 HAVE_RPMATCH=1;
20945 HAVE_SECURE_GETENV=1;
20946 HAVE_SETENV=1;
20947 HAVE_DECL_SETENV=1;
20948 HAVE_DECL_SETSTATE=1;
20949 HAVE_STRTOD=1;
20950 HAVE_STRTOLL=1;
20951 HAVE_STRTOULL=1;
20952 HAVE_STRUCT_RANDOM_DATA=1;
20953 HAVE_SYS_LOADAVG_H=0;
20954 HAVE_UNLOCKPT=1;
20955 HAVE_DECL_UNSETENV=1;
20956 REPLACE_CALLOC=0;
20957 REPLACE_CANONICALIZE_FILE_NAME=0;
20958 REPLACE_MALLOC=0;
20959 REPLACE_MBTOWC=0;
20960 REPLACE_MKSTEMP=0;
20961 REPLACE_PTSNAME=0;
20962 REPLACE_PTSNAME_R=0;
20963 REPLACE_PUTENV=0;
20964 REPLACE_QSORT_R=0;
20965 REPLACE_RANDOM_R=0;
20966 REPLACE_REALLOC=0;
20967 REPLACE_REALPATH=0;
20968 REPLACE_SETENV=0;
20969 REPLACE_STRTOD=0;
20970 REPLACE_UNSETENV=0;
20971 REPLACE_WCTOMB=0;
20972
20973
20974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
20975 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
20976 if ${gl_cv_func_malloc_posix+:} false; then :
20977 $as_echo_n "(cached) " >&6
20978 else
20979
20980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20981 /* end confdefs.h. */
20982
20983 int
20984 main ()
20985 {
20986 #if defined _WIN32 && ! defined __CYGWIN__
20987 choke me
20988 #endif
20989
20990 ;
20991 return 0;
20992 }
20993 _ACEOF
20994 if ac_fn_c_try_compile "$LINENO"; then :
20995 gl_cv_func_malloc_posix=yes
20996 else
20997 gl_cv_func_malloc_posix=no
20998 fi
20999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21000
21001 fi
21002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
21003 $as_echo "$gl_cv_func_malloc_posix" >&6; }
21004
21005
21006
21007
21008
21009 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
21010 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
21011
21012 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
21013
21014 else
21015 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
21016 fi
21017
21018
21019
21020
21021
21022
21023 GNULIB_EXPLICIT_BZERO=0;
21024 GNULIB_FFSL=0;
21025 GNULIB_FFSLL=0;
21026 GNULIB_MEMCHR=0;
21027 GNULIB_MEMMEM=0;
21028 GNULIB_MEMPCPY=0;
21029 GNULIB_MEMRCHR=0;
21030 GNULIB_RAWMEMCHR=0;
21031 GNULIB_STPCPY=0;
21032 GNULIB_STPNCPY=0;
21033 GNULIB_STRCHRNUL=0;
21034 GNULIB_STRDUP=0;
21035 GNULIB_STRNCAT=0;
21036 GNULIB_STRNDUP=0;
21037 GNULIB_STRNLEN=0;
21038 GNULIB_STRPBRK=0;
21039 GNULIB_STRSEP=0;
21040 GNULIB_STRSTR=0;
21041 GNULIB_STRCASESTR=0;
21042 GNULIB_STRTOK_R=0;
21043 GNULIB_MBSLEN=0;
21044 GNULIB_MBSNLEN=0;
21045 GNULIB_MBSCHR=0;
21046 GNULIB_MBSRCHR=0;
21047 GNULIB_MBSSTR=0;
21048 GNULIB_MBSCASECMP=0;
21049 GNULIB_MBSNCASECMP=0;
21050 GNULIB_MBSPCASECMP=0;
21051 GNULIB_MBSCASESTR=0;
21052 GNULIB_MBSCSPN=0;
21053 GNULIB_MBSPBRK=0;
21054 GNULIB_MBSSPN=0;
21055 GNULIB_MBSSEP=0;
21056 GNULIB_MBSTOK_R=0;
21057 GNULIB_STRERROR=0;
21058 GNULIB_STRERROR_R=0;
21059 GNULIB_STRSIGNAL=0;
21060 GNULIB_STRVERSCMP=0;
21061 HAVE_MBSLEN=0;
21062 HAVE_EXPLICIT_BZERO=1;
21063 HAVE_FFSL=1;
21064 HAVE_FFSLL=1;
21065 HAVE_MEMCHR=1;
21066 HAVE_DECL_MEMMEM=1;
21067 HAVE_MEMPCPY=1;
21068 HAVE_DECL_MEMRCHR=1;
21069 HAVE_RAWMEMCHR=1;
21070 HAVE_STPCPY=1;
21071 HAVE_STPNCPY=1;
21072 HAVE_STRCHRNUL=1;
21073 HAVE_DECL_STRDUP=1;
21074 HAVE_DECL_STRNDUP=1;
21075 HAVE_DECL_STRNLEN=1;
21076 HAVE_STRPBRK=1;
21077 HAVE_STRSEP=1;
21078 HAVE_STRCASESTR=1;
21079 HAVE_DECL_STRTOK_R=1;
21080 HAVE_DECL_STRERROR_R=1;
21081 HAVE_DECL_STRSIGNAL=1;
21082 HAVE_STRVERSCMP=1;
21083 REPLACE_MEMCHR=0;
21084 REPLACE_MEMMEM=0;
21085 REPLACE_STPNCPY=0;
21086 REPLACE_STRCHRNUL=0;
21087 REPLACE_STRDUP=0;
21088 REPLACE_STRNCAT=0;
21089 REPLACE_STRNDUP=0;
21090 REPLACE_STRNLEN=0;
21091 REPLACE_STRSTR=0;
21092 REPLACE_STRCASESTR=0;
21093 REPLACE_STRTOK_R=0;
21094 REPLACE_STRERROR=0;
21095 REPLACE_STRERROR_R=0;
21096 REPLACE_STRSIGNAL=0;
21097 UNDEFINE_STRTOK_R=0;
21098
21099
21100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to activate relocatable installation" >&5
21101 $as_echo_n "checking whether to activate relocatable installation... " >&6; }
21102 # Check whether --enable-relocatable was given.
21103 if test "${enable_relocatable+set}" = set; then :
21104 enableval=$enable_relocatable; if test "$enableval" != no; then
21105 RELOCATABLE=yes
21106 else
21107 RELOCATABLE=no
21108 fi
21109
21110 else
21111 RELOCATABLE=no
21112 fi
21113
21114
21115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RELOCATABLE" >&5
21116 $as_echo "$RELOCATABLE" >&6; }
21117
21118
21119
21120 if test "X$prefix" = "XNONE"; then
21121 reloc_final_prefix="$ac_default_prefix"
21122 else
21123 reloc_final_prefix="$prefix"
21124 fi
21125
21126 cat >>confdefs.h <<_ACEOF
21127 #define INSTALLPREFIX "${reloc_final_prefix}"
21128 _ACEOF
21129
21130 if test $RELOCATABLE = yes; then
21131
21132 $as_echo "#define ENABLE_RELOCATABLE 1" >>confdefs.h
21133
21134 fi
21135
21136
21137 REPLACE_NULL=0;
21138 HAVE_MAX_ALIGN_T=1;
21139 HAVE_WCHAR_T=1;
21140
21141
21142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21143 $as_echo_n "checking for wchar_t... " >&6; }
21144 if ${gt_cv_c_wchar_t+:} false; then :
21145 $as_echo_n "(cached) " >&6
21146 else
21147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21148 /* end confdefs.h. */
21149 #include <stddef.h>
21150 wchar_t foo = (wchar_t)'\0';
21151 int
21152 main ()
21153 {
21154
21155 ;
21156 return 0;
21157 }
21158 _ACEOF
21159 if ac_fn_c_try_compile "$LINENO"; then :
21160 gt_cv_c_wchar_t=yes
21161 else
21162 gt_cv_c_wchar_t=no
21163 fi
21164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21165 fi
21166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21167 $as_echo "$gt_cv_c_wchar_t" >&6; }
21168 if test $gt_cv_c_wchar_t = yes; then
21169
21170 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21171
21172 fi
21173
21174
21175
21176 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
21177 if test "x$ac_cv_have_decl_strdup" = xyes; then :
21178 ac_have_decl=1
21179 else
21180 ac_have_decl=0
21181 fi
21182
21183 cat >>confdefs.h <<_ACEOF
21184 #define HAVE_DECL_STRDUP $ac_have_decl
21185 _ACEOF
21186
21187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
21188 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
21189 if ${ac_cv_c_restrict+:} false; then :
21190 $as_echo_n "(cached) " >&6
21191 else
21192 ac_cv_c_restrict=no
21193 # The order here caters to the fact that C++ does not require restrict.
21194 for ac_kw in __restrict __restrict__ _Restrict restrict; do
21195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21196 /* end confdefs.h. */
21197 typedef int *int_ptr;
21198 int foo (int_ptr $ac_kw ip) { return ip[0]; }
21199 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
21200 int bar (int ip[$ac_kw]) { return ip[0]; }
21201
21202 int
21203 main ()
21204 {
21205 int s[1];
21206 int *$ac_kw t = s;
21207 t[0] = 0;
21208 return foo (t) + bar (t);
21209
21210 ;
21211 return 0;
21212 }
21213 _ACEOF
21214 if ac_fn_c_try_compile "$LINENO"; then :
21215 ac_cv_c_restrict=$ac_kw
21216 fi
21217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21218 test "$ac_cv_c_restrict" != no && break
21219 done
21220
21221 fi
21222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
21223 $as_echo "$ac_cv_c_restrict" >&6; }
21224
21225 case $ac_cv_c_restrict in
21226 restrict) ;;
21227 no) $as_echo "#define restrict /**/" >>confdefs.h
21228 ;;
21229 *) cat >>confdefs.h <<_ACEOF
21230 #define restrict $ac_cv_c_restrict
21231 _ACEOF
21232 ;;
21233 esac
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246 if test $gl_cv_have_include_next = yes; then
21247 gl_cv_next_string_h='<'string.h'>'
21248 else
21249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21250 $as_echo_n "checking absolute name of <string.h>... " >&6; }
21251 if ${gl_cv_next_string_h+:} false; then :
21252 $as_echo_n "(cached) " >&6
21253 else
21254
21255
21256
21257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21258 /* end confdefs.h. */
21259 #include <string.h>
21260 _ACEOF
21261 case "$host_os" in
21262 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21263 *) gl_absname_cpp="$ac_cpp" ;;
21264 esac
21265
21266 case "$host_os" in
21267 mingw*)
21268 gl_dirsep_regex='[/\\]'
21269 ;;
21270 *)
21271 gl_dirsep_regex='\/'
21272 ;;
21273 esac
21274 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21275 gl_header_literal_regex=`echo 'string.h' \
21276 | sed -e "$gl_make_literal_regex_sed"`
21277 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21278 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21279 s|^/[^/]|//&|
21280 p
21281 q
21282 }'
21283
21284 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21285 sed -n "$gl_absolute_header_sed"`
21286
21287 gl_header=$gl_cv_absolute_string_h
21288 gl_cv_next_string_h='"'$gl_header'"'
21289
21290
21291 fi
21292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21293 $as_echo "$gl_cv_next_string_h" >&6; }
21294 fi
21295 NEXT_STRING_H=$gl_cv_next_string_h
21296
21297 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21298 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21299 gl_next_as_first_directive='<'string.h'>'
21300 else
21301 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21302 gl_next_as_first_directive=$gl_cv_next_string_h
21303 fi
21304 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
21319 if test "x$ac_cv_type_pid_t" = xyes; then :
21320
21321 else
21322
21323 cat >>confdefs.h <<_ACEOF
21324 #define pid_t int
21325 _ACEOF
21326
21327 fi
21328
21329 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
21330 if test "x$ac_cv_type_mode_t" = xyes; then :
21331
21332 else
21333
21334 cat >>confdefs.h <<_ACEOF
21335 #define mode_t int
21336 _ACEOF
21337
21338 fi
21339
21340
21341
21342 WINDOWS_64_BIT_OFF_T=0
21343
21344
21345
21346
21347
21348 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360 if test $gl_cv_have_include_next = yes; then
21361 gl_cv_next_sys_types_h='<'sys/types.h'>'
21362 else
21363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
21364 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
21365 if ${gl_cv_next_sys_types_h+:} false; then :
21366 $as_echo_n "(cached) " >&6
21367 else
21368
21369
21370
21371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21372 /* end confdefs.h. */
21373 #include <sys/types.h>
21374 _ACEOF
21375 case "$host_os" in
21376 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21377 *) gl_absname_cpp="$ac_cpp" ;;
21378 esac
21379
21380 case "$host_os" in
21381 mingw*)
21382 gl_dirsep_regex='[/\\]'
21383 ;;
21384 *)
21385 gl_dirsep_regex='\/'
21386 ;;
21387 esac
21388 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21389 gl_header_literal_regex=`echo 'sys/types.h' \
21390 | sed -e "$gl_make_literal_regex_sed"`
21391 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21392 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21393 s|^/[^/]|//&|
21394 p
21395 q
21396 }'
21397
21398 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21399 sed -n "$gl_absolute_header_sed"`
21400
21401 gl_header=$gl_cv_absolute_sys_types_h
21402 gl_cv_next_sys_types_h='"'$gl_header'"'
21403
21404
21405 fi
21406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
21407 $as_echo "$gl_cv_next_sys_types_h" >&6; }
21408 fi
21409 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
21410
21411 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21412 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21413 gl_next_as_first_directive='<'sys/types.h'>'
21414 else
21415 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21416 gl_next_as_first_directive=$gl_cv_next_sys_types_h
21417 fi
21418 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431 WINDOWS_STAT_INODES=0
21432
21433
21434
21435
21436 if true; then
21437 GL_COND_LIBTOOL_TRUE=
21438 GL_COND_LIBTOOL_FALSE='#'
21439 else
21440 GL_COND_LIBTOOL_TRUE='#'
21441 GL_COND_LIBTOOL_FALSE=
21442 fi
21443
21444 gl_cond_libtool=true
21445 gl_m4_base='m4'
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455 gl_source_base='lib'
21456
21457 if test "x$lispdir" = x; then
21458 lispdir='${datarootdir}/emacs/site-lisp'
21459
21460 fi
21461 if test "x$runstatedir" = x; then
21462 runstatedir='${localstatedir}/run'
21463
21464 fi
21465
21466 pkglibexecdir='${libexecdir}/${PACKAGE}'
21467
21468
21469
21470
21471
21472
21473 if test $ac_cv_func_flock = no; then
21474 HAVE_FLOCK=0
21475 fi
21476
21477 if test $HAVE_FLOCK = 0; then
21478
21479
21480
21481
21482
21483
21484
21485
21486 gl_LIBOBJS="$gl_LIBOBJS flock.$ac_objext"
21487
21488
21489
21490
21491
21492 ac_fn_c_check_member "$LINENO" "struct flock" "l_type" "ac_cv_member_struct_flock_l_type" "#include <fcntl.h>
21493 "
21494 if test "x$ac_cv_member_struct_flock_l_type" = xyes; then :
21495
21496 cat >>confdefs.h <<_ACEOF
21497 #define HAVE_STRUCT_FLOCK_L_TYPE 1
21498 _ACEOF
21499
21500
21501 fi
21502
21503
21504 fi
21505
21506
21507
21508
21509
21510 GNULIB_FLOCK=1
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520 REPLACE_GETOPT=0
21521 if test -n "$gl_replace_getopt"; then
21522 REPLACE_GETOPT=1
21523 fi
21524
21525 if test $REPLACE_GETOPT = 1; then
21526
21527
21528 if test $ac_cv_header_sys_cdefs_h = yes; then
21529 HAVE_SYS_CDEFS_H=1
21530 else
21531 HAVE_SYS_CDEFS_H=0
21532 fi
21533
21534
21535
21536 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21537
21538 GETOPT_H=getopt.h
21539 GETOPT_CDEFS_H=getopt-cdefs.h
21540
21541
21542
21543 fi
21544
21545 if test $REPLACE_GETOPT = 1; then
21546
21547
21548
21549
21550
21551
21552
21553
21554 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21565
21566 GNULIB_GL_UNISTD_H_GETOPT=1
21567 fi
21568
21569
21570
21571
21572 if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
21573 GNU_MAKE_TRUE=
21574 GNU_MAKE_FALSE='#'
21575 else
21576 GNU_MAKE_TRUE='#'
21577 GNU_MAKE_FALSE=
21578 fi
21579
21580
21581
21582
21583
21584 if test $gl_cv_func_malloc_posix = yes; then
21585
21586 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
21587
21588 else
21589 REPLACE_MALLOC=1
21590 fi
21591
21592 if test $REPLACE_MALLOC = 1; then
21593
21594
21595
21596
21597
21598
21599
21600
21601 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
21602
21603 fi
21604
21605
21606
21607
21608
21609 GNULIB_MALLOC_POSIX=1
21610
21611
21612
21613
21614
21615 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
21616
21617
21618
21619
21620 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21621
21622
21623
21624
21625
21626
21627
21628
21629 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
21630
21631 fi
21632
21633 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21634
21635
21636
21637
21638
21639
21640
21641
21642 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
21643
21644 fi
21645
21646
21647 cat >>confdefs.h <<_ACEOF
21648 #define GNULIB_MSVC_NOTHROW 1
21649 _ACEOF
21650
21651
21652
21653
21654
21655
21656 for ac_func in rawmemchr
21657 do :
21658 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
21659 if test "x$ac_cv_func_rawmemchr" = xyes; then :
21660 cat >>confdefs.h <<_ACEOF
21661 #define HAVE_RAWMEMCHR 1
21662 _ACEOF
21663
21664 fi
21665 done
21666
21667 if test $ac_cv_func_rawmemchr = no; then
21668 HAVE_RAWMEMCHR=0
21669 fi
21670
21671 if test $HAVE_RAWMEMCHR = 0; then
21672
21673
21674
21675
21676
21677
21678
21679
21680 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
21681
21682 :
21683 fi
21684
21685
21686
21687
21688
21689 GNULIB_RAWMEMCHR=1
21690
21691
21692
21693
21694
21695 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
21696
21697
21698
21699
21700
21701
21702 if test $RELOCATABLE = yes; then
21703
21704
21705
21706
21707
21708
21709
21710
21711 gl_LIBOBJS="$gl_LIBOBJS relocatable.$ac_objext"
21712
21713 fi
21714
21715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
21716 $as_echo_n "checking for ssize_t... " >&6; }
21717 if ${gt_cv_ssize_t+:} false; then :
21718 $as_echo_n "(cached) " >&6
21719 else
21720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21721 /* end confdefs.h. */
21722 #include <sys/types.h>
21723 int
21724 main ()
21725 {
21726 int x = sizeof (ssize_t *) + sizeof (ssize_t);
21727 return !x;
21728 ;
21729 return 0;
21730 }
21731 _ACEOF
21732 if ac_fn_c_try_compile "$LINENO"; then :
21733 gt_cv_ssize_t=yes
21734 else
21735 gt_cv_ssize_t=no
21736 fi
21737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21738 fi
21739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
21740 $as_echo "$gt_cv_ssize_t" >&6; }
21741 if test $gt_cv_ssize_t = no; then
21742
21743 $as_echo "#define ssize_t int" >>confdefs.h
21744
21745 fi
21746
21747
21748
21749
21750 STDDEF_H=
21751
21752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
21753 $as_echo_n "checking for good max_align_t... " >&6; }
21754 if ${gl_cv_type_max_align_t+:} false; then :
21755 $as_echo_n "(cached) " >&6
21756 else
21757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21758 /* end confdefs.h. */
21759 #include <stddef.h>
21760 unsigned int s = sizeof (max_align_t);
21761 #if defined __GNUC__ || defined __IBM__ALIGNOF__
21762 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
21763 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
21764 #endif
21765
21766 int
21767 main ()
21768 {
21769
21770 ;
21771 return 0;
21772 }
21773 _ACEOF
21774 if ac_fn_c_try_compile "$LINENO"; then :
21775 gl_cv_type_max_align_t=yes
21776 else
21777 gl_cv_type_max_align_t=no
21778 fi
21779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21780
21781 fi
21782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
21783 $as_echo "$gl_cv_type_max_align_t" >&6; }
21784 if test $gl_cv_type_max_align_t = no; then
21785 HAVE_MAX_ALIGN_T=0
21786 STDDEF_H=stddef.h
21787 fi
21788
21789 if test $gt_cv_c_wchar_t = no; then
21790 HAVE_WCHAR_T=0
21791 STDDEF_H=stddef.h
21792 fi
21793
21794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21795 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
21796 if ${gl_cv_decl_null_works+:} false; then :
21797 $as_echo_n "(cached) " >&6
21798 else
21799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21800 /* end confdefs.h. */
21801 #include <stddef.h>
21802 int test[2 * (sizeof NULL == sizeof (void *)) -1];
21803
21804 int
21805 main ()
21806 {
21807
21808 ;
21809 return 0;
21810 }
21811 _ACEOF
21812 if ac_fn_c_try_compile "$LINENO"; then :
21813 gl_cv_decl_null_works=yes
21814 else
21815 gl_cv_decl_null_works=no
21816 fi
21817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21818 fi
21819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21820 $as_echo "$gl_cv_decl_null_works" >&6; }
21821 if test $gl_cv_decl_null_works = no; then
21822 REPLACE_NULL=1
21823 STDDEF_H=stddef.h
21824 fi
21825
21826
21827 if test -n "$STDDEF_H"; then
21828 GL_GENERATE_STDDEF_H_TRUE=
21829 GL_GENERATE_STDDEF_H_FALSE='#'
21830 else
21831 GL_GENERATE_STDDEF_H_TRUE='#'
21832 GL_GENERATE_STDDEF_H_FALSE=
21833 fi
21834
21835 if test -n "$STDDEF_H"; then
21836
21837
21838
21839
21840
21841
21842
21843
21844 if test $gl_cv_have_include_next = yes; then
21845 gl_cv_next_stddef_h='<'stddef.h'>'
21846 else
21847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21848 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
21849 if ${gl_cv_next_stddef_h+:} false; then :
21850 $as_echo_n "(cached) " >&6
21851 else
21852
21853
21854
21855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21856 /* end confdefs.h. */
21857 #include <stddef.h>
21858 _ACEOF
21859 case "$host_os" in
21860 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21861 *) gl_absname_cpp="$ac_cpp" ;;
21862 esac
21863
21864 case "$host_os" in
21865 mingw*)
21866 gl_dirsep_regex='[/\\]'
21867 ;;
21868 *)
21869 gl_dirsep_regex='\/'
21870 ;;
21871 esac
21872 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21873 gl_header_literal_regex=`echo 'stddef.h' \
21874 | sed -e "$gl_make_literal_regex_sed"`
21875 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21876 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21877 s|^/[^/]|//&|
21878 p
21879 q
21880 }'
21881
21882 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21883 sed -n "$gl_absolute_header_sed"`
21884
21885 gl_header=$gl_cv_absolute_stddef_h
21886 gl_cv_next_stddef_h='"'$gl_header'"'
21887
21888
21889 fi
21890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21891 $as_echo "$gl_cv_next_stddef_h" >&6; }
21892 fi
21893 NEXT_STDDEF_H=$gl_cv_next_stddef_h
21894
21895 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21896 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21897 gl_next_as_first_directive='<'stddef.h'>'
21898 else
21899 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21900 gl_next_as_first_directive=$gl_cv_next_stddef_h
21901 fi
21902 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21903
21904
21905
21906
21907 fi
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919 if test $gl_cv_have_include_next = yes; then
21920 gl_cv_next_stdlib_h='<'stdlib.h'>'
21921 else
21922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
21923 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
21924 if ${gl_cv_next_stdlib_h+:} false; then :
21925 $as_echo_n "(cached) " >&6
21926 else
21927
21928
21929
21930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21931 /* end confdefs.h. */
21932 #include <stdlib.h>
21933 _ACEOF
21934 case "$host_os" in
21935 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21936 *) gl_absname_cpp="$ac_cpp" ;;
21937 esac
21938
21939 case "$host_os" in
21940 mingw*)
21941 gl_dirsep_regex='[/\\]'
21942 ;;
21943 *)
21944 gl_dirsep_regex='\/'
21945 ;;
21946 esac
21947 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21948 gl_header_literal_regex=`echo 'stdlib.h' \
21949 | sed -e "$gl_make_literal_regex_sed"`
21950 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21951 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21952 s|^/[^/]|//&|
21953 p
21954 q
21955 }'
21956
21957 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21958 sed -n "$gl_absolute_header_sed"`
21959
21960 gl_header=$gl_cv_absolute_stdlib_h
21961 gl_cv_next_stdlib_h='"'$gl_header'"'
21962
21963
21964 fi
21965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
21966 $as_echo "$gl_cv_next_stdlib_h" >&6; }
21967 fi
21968 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
21969
21970 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21971 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21972 gl_next_as_first_directive='<'stdlib.h'>'
21973 else
21974 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21975 gl_next_as_first_directive=$gl_cv_next_stdlib_h
21976 fi
21977 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991 for ac_func in strchrnul
21992 do :
21993 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
21994 if test "x$ac_cv_func_strchrnul" = xyes; then :
21995 cat >>confdefs.h <<_ACEOF
21996 #define HAVE_STRCHRNUL 1
21997 _ACEOF
21998
21999 fi
22000 done
22001
22002 if test $ac_cv_func_strchrnul = no; then
22003 HAVE_STRCHRNUL=0
22004 else
22005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
22006 $as_echo_n "checking whether strchrnul works... " >&6; }
22007 if ${gl_cv_func_strchrnul_works+:} false; then :
22008 $as_echo_n "(cached) " >&6
22009 else
22010 if test "$cross_compiling" = yes; then :
22011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22012 /* end confdefs.h. */
22013
22014 #if defined __CYGWIN__
22015 #include <cygwin/version.h>
22016 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
22017 Lucky user
22018 #endif
22019 #else
22020 Lucky user
22021 #endif
22022
22023 _ACEOF
22024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22025 $EGREP "Lucky user" >/dev/null 2>&1; then :
22026 gl_cv_func_strchrnul_works="guessing yes"
22027 else
22028 gl_cv_func_strchrnul_works="guessing no"
22029 fi
22030 rm -f conftest*
22031
22032
22033 else
22034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22035 /* end confdefs.h. */
22036
22037 #include <string.h> /* for strchrnul */
22038
22039 int
22040 main ()
22041 {
22042 const char *buf = "a";
22043 return strchrnul (buf, 'b') != buf + 1;
22044
22045 ;
22046 return 0;
22047 }
22048 _ACEOF
22049 if ac_fn_c_try_run "$LINENO"; then :
22050 gl_cv_func_strchrnul_works=yes
22051 else
22052 gl_cv_func_strchrnul_works=no
22053 fi
22054 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22055 conftest.$ac_objext conftest.beam conftest.$ac_ext
22056 fi
22057
22058
22059 fi
22060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
22061 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
22062 case "$gl_cv_func_strchrnul_works" in
22063 *yes) ;;
22064 *) REPLACE_STRCHRNUL=1 ;;
22065 esac
22066 fi
22067
22068 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
22069
22070
22071
22072
22073
22074
22075
22076
22077 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
22078
22079 :
22080 fi
22081
22082
22083
22084
22085
22086 GNULIB_STRCHRNUL=1
22087
22088
22089
22090
22091
22092 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
22093
22094
22095
22096
22097
22098
22099
22100 if test $ac_cv_func_strdup = yes; then
22101 if test $gl_cv_func_malloc_posix != yes; then
22102 REPLACE_STRDUP=1
22103 fi
22104 fi
22105
22106 if test $ac_cv_have_decl_strdup = no; then
22107 HAVE_DECL_STRDUP=0
22108 fi
22109
22110 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
22111
22112
22113
22114
22115
22116
22117
22118
22119 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
22120
22121 :
22122 fi
22123
22124
22125
22126
22127
22128 GNULIB_STRDUP=1
22129
22130
22131
22132
22133
22134 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153 if test $gl_cv_have_include_next = yes; then
22154 gl_cv_next_sys_file_h='<'sys/file.h'>'
22155 else
22156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/file.h>" >&5
22157 $as_echo_n "checking absolute name of <sys/file.h>... " >&6; }
22158 if ${gl_cv_next_sys_file_h+:} false; then :
22159 $as_echo_n "(cached) " >&6
22160 else
22161
22162 if test $ac_cv_header_sys_file_h = yes; then
22163
22164
22165
22166
22167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22168 /* end confdefs.h. */
22169 #include <sys/file.h>
22170 _ACEOF
22171 case "$host_os" in
22172 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22173 *) gl_absname_cpp="$ac_cpp" ;;
22174 esac
22175
22176 case "$host_os" in
22177 mingw*)
22178 gl_dirsep_regex='[/\\]'
22179 ;;
22180 *)
22181 gl_dirsep_regex='\/'
22182 ;;
22183 esac
22184 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22185 gl_header_literal_regex=`echo 'sys/file.h' \
22186 | sed -e "$gl_make_literal_regex_sed"`
22187 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22188 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22189 s|^/[^/]|//&|
22190 p
22191 q
22192 }'
22193
22194 gl_cv_absolute_sys_file_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22195 sed -n "$gl_absolute_header_sed"`
22196
22197 gl_header=$gl_cv_absolute_sys_file_h
22198 gl_cv_next_sys_file_h='"'$gl_header'"'
22199 else
22200 gl_cv_next_sys_file_h='<'sys/file.h'>'
22201 fi
22202
22203
22204 fi
22205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_file_h" >&5
22206 $as_echo "$gl_cv_next_sys_file_h" >&6; }
22207 fi
22208 NEXT_SYS_FILE_H=$gl_cv_next_sys_file_h
22209
22210 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22211 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22212 gl_next_as_first_directive='<'sys/file.h'>'
22213 else
22214 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22215 gl_next_as_first_directive=$gl_cv_next_sys_file_h
22216 fi
22217 NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H=$gl_next_as_first_directive
22218
22219
22220
22221
22222
22223 if test $ac_cv_header_sys_file_h = yes; then
22224 HAVE_SYS_FILE_H=1
22225 else
22226 HAVE_SYS_FILE_H=0
22227 fi
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249 if test $gl_cv_have_include_next = yes; then
22250 gl_cv_next_unistd_h='<'unistd.h'>'
22251 else
22252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
22253 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
22254 if ${gl_cv_next_unistd_h+:} false; then :
22255 $as_echo_n "(cached) " >&6
22256 else
22257
22258 if test $ac_cv_header_unistd_h = yes; then
22259
22260
22261
22262
22263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22264 /* end confdefs.h. */
22265 #include <unistd.h>
22266 _ACEOF
22267 case "$host_os" in
22268 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22269 *) gl_absname_cpp="$ac_cpp" ;;
22270 esac
22271
22272 case "$host_os" in
22273 mingw*)
22274 gl_dirsep_regex='[/\\]'
22275 ;;
22276 *)
22277 gl_dirsep_regex='\/'
22278 ;;
22279 esac
22280 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22281 gl_header_literal_regex=`echo 'unistd.h' \
22282 | sed -e "$gl_make_literal_regex_sed"`
22283 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22284 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22285 s|^/[^/]|//&|
22286 p
22287 q
22288 }'
22289
22290 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22291 sed -n "$gl_absolute_header_sed"`
22292
22293 gl_header=$gl_cv_absolute_unistd_h
22294 gl_cv_next_unistd_h='"'$gl_header'"'
22295 else
22296 gl_cv_next_unistd_h='<'unistd.h'>'
22297 fi
22298
22299
22300 fi
22301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
22302 $as_echo "$gl_cv_next_unistd_h" >&6; }
22303 fi
22304 NEXT_UNISTD_H=$gl_cv_next_unistd_h
22305
22306 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22307 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22308 gl_next_as_first_directive='<'unistd.h'>'
22309 else
22310 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22311 gl_next_as_first_directive=$gl_cv_next_unistd_h
22312 fi
22313 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
22314
22315
22316
22317
22318 if test $ac_cv_header_unistd_h = yes; then
22319 HAVE_UNISTD_H=1
22320 else
22321 HAVE_UNISTD_H=0
22322 fi
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333 # End of code from modules
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343 gltests_libdeps=
22344 gltests_ltlibdeps=
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354 gl_source_base='tests'
22355 gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
22356
22357 gl_module_indicator_condition=$gltests_WITNESS
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what extension is used for runtime loadable modules" >&5
22370 $as_echo_n "checking what extension is used for runtime loadable modules... " >&6; }
22371 if ${libltdl_cv_shlibext+:} false; then :
22372 $as_echo_n "(cached) " >&6
22373 else
22374
22375 module=yes
22376 eval libltdl_cv_shlibext=$shrext_cmds
22377 module=no
22378 eval libltdl_cv_shrext=$shrext_cmds
22379
22380 fi
22381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_shlibext" >&5
22382 $as_echo "$libltdl_cv_shlibext" >&6; }
22383 if test -n "$libltdl_cv_shlibext"; then
22384
22385 cat >>confdefs.h <<_ACEOF
22386 #define LT_MODULE_EXT "$libltdl_cv_shlibext"
22387 _ACEOF
22388
22389 fi
22390 if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
22391
22392 cat >>confdefs.h <<_ACEOF
22393 #define LT_SHARED_EXT "$libltdl_cv_shrext"
22394 _ACEOF
22395
22396 fi
22397 if test -n "$shared_archive_member_spec"; then
22398
22399 cat >>confdefs.h <<_ACEOF
22400 #define LT_SHARED_LIB_MEMBER "($shared_archive_member_spec.o)"
22401 _ACEOF
22402
22403 fi
22404
22405 shlibext=$libltdl_cv_shlibext
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22418 if test -n "$ac_tool_prefix"; then
22419 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22420 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22422 $as_echo_n "checking for $ac_word... " >&6; }
22423 if ${ac_cv_path_PKG_CONFIG+:} false; then :
22424 $as_echo_n "(cached) " >&6
22425 else
22426 case $PKG_CONFIG in
22427 [\\/]* | ?:[\\/]*)
22428 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22429 ;;
22430 *)
22431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22432 for as_dir in $PATH
22433 do
22434 IFS=$as_save_IFS
22435 test -z "$as_dir" && as_dir=.
22436 for ac_exec_ext in '' $ac_executable_extensions; do
22437 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22438 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22439 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22440 break 2
22441 fi
22442 done
22443 done
22444 IFS=$as_save_IFS
22445
22446 ;;
22447 esac
22448 fi
22449 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22450 if test -n "$PKG_CONFIG"; then
22451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22452 $as_echo "$PKG_CONFIG" >&6; }
22453 else
22454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22455 $as_echo "no" >&6; }
22456 fi
22457
22458
22459 fi
22460 if test -z "$ac_cv_path_PKG_CONFIG"; then
22461 ac_pt_PKG_CONFIG=$PKG_CONFIG
22462 # Extract the first word of "pkg-config", so it can be a program name with args.
22463 set dummy pkg-config; ac_word=$2
22464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22465 $as_echo_n "checking for $ac_word... " >&6; }
22466 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22467 $as_echo_n "(cached) " >&6
22468 else
22469 case $ac_pt_PKG_CONFIG in
22470 [\\/]* | ?:[\\/]*)
22471 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22472 ;;
22473 *)
22474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22475 for as_dir in $PATH
22476 do
22477 IFS=$as_save_IFS
22478 test -z "$as_dir" && as_dir=.
22479 for ac_exec_ext in '' $ac_executable_extensions; do
22480 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22481 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22482 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22483 break 2
22484 fi
22485 done
22486 done
22487 IFS=$as_save_IFS
22488
22489 ;;
22490 esac
22491 fi
22492 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22493 if test -n "$ac_pt_PKG_CONFIG"; then
22494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22495 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
22496 else
22497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22498 $as_echo "no" >&6; }
22499 fi
22500
22501 if test "x$ac_pt_PKG_CONFIG" = x; then
22502 PKG_CONFIG=""
22503 else
22504 case $cross_compiling:$ac_tool_warned in
22505 yes:)
22506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22507 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22508 ac_tool_warned=yes ;;
22509 esac
22510 PKG_CONFIG=$ac_pt_PKG_CONFIG
22511 fi
22512 else
22513 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22514 fi
22515
22516 fi
22517 if test -n "$PKG_CONFIG"; then
22518 _pkg_min_version=0.9.0
22519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22520 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22521 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22523 $as_echo "yes" >&6; }
22524 else
22525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22526 $as_echo "no" >&6; }
22527 PKG_CONFIG=""
22528 fi
22529 fi
22530
22531 pkg_failed=no
22532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
22533 $as_echo_n "checking for GLIB... " >&6; }
22534
22535 if test -n "$GLIB_CFLAGS"; then
22536 pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
22537 elif test -n "$PKG_CONFIG"; then
22538 if test -n "$PKG_CONFIG" && \
22539 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.6 gmodule-2.0\""; } >&5
22540 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.6 gmodule-2.0") 2>&5
22541 ac_status=$?
22542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22543 test $ac_status = 0; }; then
22544 pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.6 gmodule-2.0" 2>/dev/null`
22545 test "x$?" != "x0" && pkg_failed=yes
22546 else
22547 pkg_failed=yes
22548 fi
22549 else
22550 pkg_failed=untried
22551 fi
22552 if test -n "$GLIB_LIBS"; then
22553 pkg_cv_GLIB_LIBS="$GLIB_LIBS"
22554 elif test -n "$PKG_CONFIG"; then
22555 if test -n "$PKG_CONFIG" && \
22556 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.6 gmodule-2.0\""; } >&5
22557 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.6 gmodule-2.0") 2>&5
22558 ac_status=$?
22559 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22560 test $ac_status = 0; }; then
22561 pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.6 gmodule-2.0" 2>/dev/null`
22562 test "x$?" != "x0" && pkg_failed=yes
22563 else
22564 pkg_failed=yes
22565 fi
22566 else
22567 pkg_failed=untried
22568 fi
22569
22570
22571
22572 if test $pkg_failed = yes; then
22573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22574 $as_echo "no" >&6; }
22575
22576 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
22577 _pkg_short_errors_supported=yes
22578 else
22579 _pkg_short_errors_supported=no
22580 fi
22581 if test $_pkg_short_errors_supported = yes; then
22582 GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.6 gmodule-2.0" 2>&1`
22583 else
22584 GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.6 gmodule-2.0" 2>&1`
22585 fi
22586 # Put the nasty error message in config.log where it belongs
22587 echo "$GLIB_PKG_ERRORS" >&5
22588
22589 as_fn_error $? "Package requirements (glib-2.0 >= 2.6 gmodule-2.0) were not met:
22590
22591 $GLIB_PKG_ERRORS
22592
22593 Consider adjusting the PKG_CONFIG_PATH environment variable if you
22594 installed software in a non-standard prefix.
22595
22596 Alternatively, you may set the environment variables GLIB_CFLAGS
22597 and GLIB_LIBS to avoid the need to call pkg-config.
22598 See the pkg-config man page for more details." "$LINENO" 5
22599 elif test $pkg_failed = untried; then
22600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22601 $as_echo "no" >&6; }
22602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22603 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22604 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
22605 is in your PATH or set the PKG_CONFIG environment variable to the full
22606 path to pkg-config.
22607
22608 Alternatively, you may set the environment variables GLIB_CFLAGS
22609 and GLIB_LIBS to avoid the need to call pkg-config.
22610 See the pkg-config man page for more details.
22611
22612 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
22613 See \`config.log' for more details" "$LINENO" 5; }
22614 else
22615 GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
22616 GLIB_LIBS=$pkg_cv_GLIB_LIBS
22617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22618 $as_echo "yes" >&6; }
22619
22620 fi
22621
22622 # Check whether --enable-gcc-warnings was given.
22623 if test "${enable_gcc_warnings+set}" = set; then :
22624 enableval=$enable_gcc_warnings; case $enableval in
22625 yes|no) ;;
22626 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
22627 esac
22628 gl_gcc_warnings=$enableval
22629 else
22630 gl_gcc_warnings=yes
22631
22632 fi
22633
22634 if test "$gl_gcc_warnings" = yes; then
22635 nw=
22636 nw="$nw -Wsystem-headers" # Don’t let system headers trigger warnings
22637 nw="$nw -Wundef" # All compiler preprocessors support #if UNDEF
22638 nw="$nw -Wtraditional" # All compilers nowadays support ANSI C
22639 nw="$nw -Wdeclaration-after-statement" # We require C99.
22640 nw="$nw -Wstrict-overflow" # Use a lower level (see below).
22641 nw="$nw -Wconversion" # These warnings usually don’t point to mistakes.
22642 nw="$nw -Wsign-conversion" # Likewise.
22643 nw="$nw -Wimplicit-fallthrough=5" # We want to allow "fallthrough" comments.
22644
22645
22646 ac_ext=c
22647 ac_cpp='$CPP $CPPFLAGS'
22648 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22649 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22650 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22651
22652
22653
22654 if test -n "$GCC"; then
22655
22656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
22657 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
22658 if ${gl_cv_cc_nomfi_supported+:} false; then :
22659 $as_echo_n "(cached) " >&6
22660 else
22661 gl_save_CFLAGS="$CFLAGS"
22662 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
22663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22664 /* end confdefs.h. */
22665
22666 int
22667 main ()
22668 {
22669
22670 ;
22671 return 0;
22672 }
22673 _ACEOF
22674 if ac_fn_c_try_compile "$LINENO"; then :
22675 gl_cv_cc_nomfi_supported=yes
22676 else
22677 gl_cv_cc_nomfi_supported=no
22678 fi
22679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22680 CFLAGS="$gl_save_CFLAGS"
22681
22682 fi
22683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
22684 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
22685
22686 if test "$gl_cv_cc_nomfi_supported" = yes; then
22687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
22688 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
22689 if ${gl_cv_cc_nomfi_needed+:} false; then :
22690 $as_echo_n "(cached) " >&6
22691 else
22692 gl_save_CFLAGS="$CFLAGS"
22693 CFLAGS="$CFLAGS -W -Werror"
22694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22695 /* end confdefs.h. */
22696 int f (void)
22697 {
22698 typedef struct { int a; int b; } s_t;
22699 s_t s1 = { 0, };
22700 return s1.b;
22701 }
22702
22703 int
22704 main ()
22705 {
22706
22707 ;
22708 return 0;
22709 }
22710 _ACEOF
22711 if ac_fn_c_try_compile "$LINENO"; then :
22712 gl_cv_cc_nomfi_needed=no
22713 else
22714 gl_cv_cc_nomfi_needed=yes
22715 fi
22716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22717 CFLAGS="$gl_save_CFLAGS"
22718
22719 fi
22720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
22721 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
22722 fi
22723
22724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
22725 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
22726 if ${gl_cv_cc_uninitialized_supported+:} false; then :
22727 $as_echo_n "(cached) " >&6
22728 else
22729 gl_save_CFLAGS="$CFLAGS"
22730 CFLAGS="$CFLAGS -Werror -Wuninitialized"
22731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22732 /* end confdefs.h. */
22733
22734 int
22735 main ()
22736 {
22737
22738 ;
22739 return 0;
22740 }
22741 _ACEOF
22742 if ac_fn_c_try_compile "$LINENO"; then :
22743 gl_cv_cc_uninitialized_supported=yes
22744 else
22745 gl_cv_cc_uninitialized_supported=no
22746 fi
22747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22748 CFLAGS="$gl_save_CFLAGS"
22749
22750 fi
22751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
22752 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
22753
22754 fi
22755
22756 # List all gcc warning categories.
22757 # To compare this list to your installed GCC's, run this Bash command:
22758 #
22759 # comm -3 \
22760 # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
22761 # awk '/^[^#]/ {print warnings}' ../build-aux/gcc-warning.spec) | sort) \
22762 # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
22763
22764 gl_manywarn_set=
22765 for gl_manywarn_item in -fno-common \
22766 -W \
22767 -Waddress \
22768 -Waggressive-loop-optimizations \
22769 -Wall \
22770 -Wattribute-alias \
22771 -Wattributes \
22772 -Wbad-function-cast \
22773 -Wbool-compare \
22774 -Wbool-operation \
22775 -Wbuiltin-declaration-mismatch \
22776 -Wbuiltin-macro-redefined \
22777 -Wcast-align \
22778 -Wcast-align=strict \
22779 -Wcast-function-type \
22780 -Wchar-subscripts \
22781 -Wclobbered \
22782 -Wcomment \
22783 -Wcomments \
22784 -Wcoverage-mismatch \
22785 -Wcpp \
22786 -Wdangling-else \
22787 -Wdate-time \
22788 -Wdeprecated \
22789 -Wdeprecated-declarations \
22790 -Wdesignated-init \
22791 -Wdisabled-optimization \
22792 -Wdiscarded-array-qualifiers \
22793 -Wdiscarded-qualifiers \
22794 -Wdiv-by-zero \
22795 -Wdouble-promotion \
22796 -Wduplicated-branches \
22797 -Wduplicated-cond \
22798 -Wduplicate-decl-specifier \
22799 -Wempty-body \
22800 -Wendif-labels \
22801 -Wenum-compare \
22802 -Wexpansion-to-defined \
22803 -Wextra \
22804 -Wformat-contains-nul \
22805 -Wformat-extra-args \
22806 -Wformat-nonliteral \
22807 -Wformat-security \
22808 -Wformat-signedness \
22809 -Wformat-y2k \
22810 -Wformat-zero-length \
22811 -Wframe-address \
22812 -Wfree-nonheap-object \
22813 -Whsa \
22814 -Wif-not-aligned \
22815 -Wignored-attributes \
22816 -Wignored-qualifiers \
22817 -Wimplicit \
22818 -Wimplicit-function-declaration \
22819 -Wimplicit-int \
22820 -Wincompatible-pointer-types \
22821 -Winit-self \
22822 -Winline \
22823 -Wint-conversion \
22824 -Wint-in-bool-context \
22825 -Wint-to-pointer-cast \
22826 -Winvalid-memory-model \
22827 -Winvalid-pch \
22828 -Wlogical-not-parentheses \
22829 -Wlogical-op \
22830 -Wmain \
22831 -Wmaybe-uninitialized \
22832 -Wmemset-elt-size \
22833 -Wmemset-transposed-args \
22834 -Wmisleading-indentation \
22835 -Wmissing-attributes \
22836 -Wmissing-braces \
22837 -Wmissing-declarations \
22838 -Wmissing-field-initializers \
22839 -Wmissing-include-dirs \
22840 -Wmissing-parameter-type \
22841 -Wmissing-prototypes \
22842 -Wmultichar \
22843 -Wmultistatement-macros \
22844 -Wnarrowing \
22845 -Wnested-externs \
22846 -Wnonnull \
22847 -Wnonnull-compare \
22848 -Wnull-dereference \
22849 -Wodr \
22850 -Wold-style-declaration \
22851 -Wold-style-definition \
22852 -Wopenmp-simd \
22853 -Woverflow \
22854 -Woverlength-strings \
22855 -Woverride-init \
22856 -Wpacked \
22857 -Wpacked-bitfield-compat \
22858 -Wpacked-not-aligned \
22859 -Wparentheses \
22860 -Wpointer-arith \
22861 -Wpointer-compare \
22862 -Wpointer-sign \
22863 -Wpointer-to-int-cast \
22864 -Wpragmas \
22865 -Wpsabi \
22866 -Wrestrict \
22867 -Wreturn-local-addr \
22868 -Wreturn-type \
22869 -Wscalar-storage-order \
22870 -Wsequence-point \
22871 -Wshadow \
22872 -Wshift-count-negative \
22873 -Wshift-count-overflow \
22874 -Wshift-negative-value \
22875 -Wsizeof-array-argument \
22876 -Wsizeof-pointer-div \
22877 -Wsizeof-pointer-memaccess \
22878 -Wstack-protector \
22879 -Wstrict-aliasing \
22880 -Wstrict-overflow \
22881 -Wstrict-prototypes \
22882 -Wstringop-truncation \
22883 -Wsuggest-attribute=cold \
22884 -Wsuggest-attribute=const \
22885 -Wsuggest-attribute=format \
22886 -Wsuggest-attribute=malloc \
22887 -Wsuggest-attribute=noreturn \
22888 -Wsuggest-attribute=pure \
22889 -Wsuggest-final-methods \
22890 -Wsuggest-final-types \
22891 -Wswitch \
22892 -Wswitch-bool \
22893 -Wswitch-unreachable \
22894 -Wsync-nand \
22895 -Wsystem-headers \
22896 -Wtautological-compare \
22897 -Wtrampolines \
22898 -Wtrigraphs \
22899 -Wtype-limits \
22900 -Wuninitialized \
22901 -Wunknown-pragmas \
22902 -Wunsafe-loop-optimizations \
22903 -Wunused \
22904 -Wunused-but-set-parameter \
22905 -Wunused-but-set-variable \
22906 -Wunused-function \
22907 -Wunused-label \
22908 -Wunused-local-typedefs \
22909 -Wunused-macros \
22910 -Wunused-parameter \
22911 -Wunused-result \
22912 -Wunused-value \
22913 -Wunused-variable \
22914 -Wvarargs \
22915 -Wvariadic-macros \
22916 -Wvector-operation-performance \
22917 -Wvla \
22918 -Wvolatile-register-var \
22919 -Wwrite-strings \
22920 \
22921 ; do
22922 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
22923 done
22924
22925 # gcc --help=warnings outputs an unusual form for these options; list
22926 # them here so that the above 'comm' command doesn't report a false match.
22927 # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
22928 # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
22929 # the only platforms where it does not fit in a long, so make that
22930 # a special case.
22931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking max safe object size" >&5
22932 $as_echo_n "checking max safe object size... " >&6; }
22933 if ac_fn_c_compute_int "$LINENO" "LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
22934 ? -1
22935 : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1" "gl_alloc_max" "#include <limits.h>
22936 #include <stddef.h>
22937 #include <stdint.h>
22938 "; then :
22939
22940 else
22941 gl_alloc_max=2147483647
22942 fi
22943
22944 case $gl_alloc_max in
22945 -1) gl_alloc_max=9223372036854775807;;
22946 esac
22947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_alloc_max" >&5
22948 $as_echo "$gl_alloc_max" >&6; }
22949 gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
22950 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
22951 gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
22952 gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
22953 gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
22954 gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
22955 gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
22956 gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
22957 gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
22958 gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
22959
22960 # These are needed for older GCC versions.
22961 if test -n "$GCC"; then
22962 case `($CC --version) 2>/dev/null` in
22963 'gcc (GCC) '[0-3].* | \
22964 'gcc (GCC) '4.[0-7].*)
22965 gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
22966 gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
22967 ;;
22968 esac
22969 fi
22970
22971 # Disable specific options as needed.
22972 if test "$gl_cv_cc_nomfi_needed" = yes; then
22973 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
22974 fi
22975
22976 if test "$gl_cv_cc_uninitialized_supported" = no; then
22977 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
22978 fi
22979
22980 warnings=$gl_manywarn_set
22981
22982 ac_ext=c
22983 ac_cpp='$CPP $CPPFLAGS'
22984 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22985 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22986 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22987
22988
22989
22990
22991 gl_warn_set=
22992 set x $warnings; shift
22993 for gl_warn_item
22994 do
22995 case " $nw " in
22996 *" $gl_warn_item "*)
22997 ;;
22998 *)
22999 gl_warn_set="$gl_warn_set $gl_warn_item"
23000 ;;
23001 esac
23002 done
23003 warnings=$gl_warn_set
23004
23005 for w in $warnings; do
23006
23007 ac_ext=c
23008 ac_cpp='$CPP $CPPFLAGS'
23009 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23010 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23011 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23012
23013
23014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
23015 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
23016 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
23017 $as_echo_n "(cached) " >&6
23018 else
23019
23020 gl_save_compiler_FLAGS="$CFLAGS"
23021 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
23022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23023 /* end confdefs.h. */
23024
23025 int
23026 main ()
23027 {
23028
23029 ;
23030 return 0;
23031 }
23032 _ACEOF
23033 if ac_fn_c_try_link "$LINENO"; then :
23034 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
23035 else
23036 gl_cv_warn_c__Werror__Wunknown_warning_option=no
23037 fi
23038 rm -f core conftest.err conftest.$ac_objext \
23039 conftest$ac_exeext conftest.$ac_ext
23040 CFLAGS="$gl_save_compiler_FLAGS"
23041
23042 fi
23043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
23044 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
23045 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
23046 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
23047 else
23048 gl_unknown_warnings_are_errors=
23049 fi
23050
23051 ac_ext=c
23052 ac_cpp='$CPP $CPPFLAGS'
23053 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23054 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23055 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23056
23057
23058
23059
23060 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
23061 gl_positive="$w"
23062 case $gl_positive in
23063 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
23064 esac
23065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
23066 $as_echo_n "checking whether C compiler handles $w... " >&6; }
23067 if eval \${$as_gl_Warn+:} false; then :
23068 $as_echo_n "(cached) " >&6
23069 else
23070
23071 gl_save_compiler_FLAGS="$CFLAGS"
23072 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
23073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23074 /* end confdefs.h. */
23075
23076 int
23077 main ()
23078 {
23079
23080 ;
23081 return 0;
23082 }
23083 _ACEOF
23084 if ac_fn_c_try_link "$LINENO"; then :
23085 eval "$as_gl_Warn=yes"
23086 else
23087 eval "$as_gl_Warn=no"
23088 fi
23089 rm -f core conftest.err conftest.$ac_objext \
23090 conftest$ac_exeext conftest.$ac_ext
23091 CFLAGS="$gl_save_compiler_FLAGS"
23092
23093 fi
23094 eval ac_res=\$$as_gl_Warn
23095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23096 $as_echo "$ac_res" >&6; }
23097 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
23098 as_fn_append WARN_CFLAGS " $w"
23099 fi
23100
23101
23102 done
23103
23104 ac_ext=cpp
23105 ac_cpp='$CXXCPP $CPPFLAGS'
23106 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23107 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23108 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23109
23110
23111
23112 ac_ext=cpp
23113 ac_cpp='$CXXCPP $CPPFLAGS'
23114 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23115 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23116 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23117
23118
23119
23120 if test -n "$GXX"; then
23121
23122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
23123 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
23124 if ${gl_cv_cxx_nomfi_supported+:} false; then :
23125 $as_echo_n "(cached) " >&6
23126 else
23127 gl_save_CXXFLAGS="$CXXFLAGS"
23128 CXXFLAGS="$CXXFLAGS -W -Werror -Wno-missing-field-initializers"
23129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23130 /* end confdefs.h. */
23131
23132 int
23133 main ()
23134 {
23135
23136 ;
23137 return 0;
23138 }
23139 _ACEOF
23140 if ac_fn_cxx_try_compile "$LINENO"; then :
23141 gl_cv_cxx_nomfi_supported=yes
23142 else
23143 gl_cv_cxx_nomfi_supported=no
23144 fi
23145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23146 CXXFLAGS="$gl_save_CXXFLAGS"
23147
23148 fi
23149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cxx_nomfi_supported" >&5
23150 $as_echo "$gl_cv_cxx_nomfi_supported" >&6; }
23151
23152 if test "$gl_cv_cxx_nomfi_supported" = yes; then
23153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
23154 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
23155 if ${gl_cv_cxx_nomfi_needed+:} false; then :
23156 $as_echo_n "(cached) " >&6
23157 else
23158 gl_save_CXXFLAGS="$CXXFLAGS"
23159 CXXFLAGS="$CXXFLAGS -W -Werror"
23160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23161 /* end confdefs.h. */
23162 int f (void)
23163 {
23164 typedef struct { int a; int b; } s_t;
23165 s_t s1 = { 0, };
23166 return s1.b;
23167 }
23168
23169 int
23170 main ()
23171 {
23172
23173 ;
23174 return 0;
23175 }
23176 _ACEOF
23177 if ac_fn_cxx_try_compile "$LINENO"; then :
23178 gl_cv_cxx_nomfi_needed=no
23179 else
23180 gl_cv_cxx_nomfi_needed=yes
23181 fi
23182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23183 CXXFLAGS="$gl_save_CXXFLAGS"
23184
23185 fi
23186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cxx_nomfi_needed" >&5
23187 $as_echo "$gl_cv_cxx_nomfi_needed" >&6; }
23188 fi
23189
23190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
23191 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
23192 if ${gl_cv_cxx_uninitialized_supported+:} false; then :
23193 $as_echo_n "(cached) " >&6
23194 else
23195 gl_save_CXXFLAGS="$CXXFLAGS"
23196 CXXFLAGS="$CXXFLAGS -Werror -Wuninitialized"
23197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23198 /* end confdefs.h. */
23199
23200 int
23201 main ()
23202 {
23203
23204 ;
23205 return 0;
23206 }
23207 _ACEOF
23208 if ac_fn_cxx_try_compile "$LINENO"; then :
23209 gl_cv_cxx_uninitialized_supported=yes
23210 else
23211 gl_cv_cxx_uninitialized_supported=no
23212 fi
23213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23214 CXXFLAGS="$gl_save_CXXFLAGS"
23215
23216 fi
23217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cxx_uninitialized_supported" >&5
23218 $as_echo "$gl_cv_cxx_uninitialized_supported" >&6; }
23219
23220 fi
23221
23222 # List all gcc warning categories.
23223 # To compare this list to your installed GCC's, run this Bash command:
23224 #
23225 # comm -3 \
23226 # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings-c++.m4 | sort) \
23227 # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
23228 # grep -v -x -f <(
23229 # awk '/^[^#]/ {print cxx_warnings}' ../build-aux/g++-warning.spec))
23230
23231 gl_manywarn_set=
23232 for gl_manywarn_item in \
23233 -W \
23234 -Wabi \
23235 -Wabi-tag \
23236 -Waddress \
23237 -Waggressive-loop-optimizations \
23238 -Wall \
23239 -Wattributes \
23240 -Wbool-compare \
23241 -Wbuiltin-macro-redefined \
23242 -Wcast-align \
23243 -Wchar-subscripts \
23244 -Wchkp \
23245 -Wclobbered \
23246 -Wcomment \
23247 -Wcomments \
23248 -Wconditionally-supported \
23249 -Wconversion-null \
23250 -Wcoverage-mismatch \
23251 -Wcpp \
23252 -Wctor-dtor-privacy \
23253 -Wdate-time \
23254 -Wdelete-incomplete \
23255 -Wdelete-non-virtual-dtor \
23256 -Wdeprecated \
23257 -Wdeprecated-declarations \
23258 -Wdisabled-optimization \
23259 -Wdiv-by-zero \
23260 -Wdouble-promotion \
23261 -Weffc++ \
23262 -Wempty-body \
23263 -Wendif-labels \
23264 -Wenum-compare \
23265 -Wextra \
23266 -Wformat-contains-nul \
23267 -Wformat-extra-args \
23268 -Wformat-nonliteral \
23269 -Wformat-security \
23270 -Wformat-signedness \
23271 -Wformat-y2k \
23272 -Wformat-zero-length \
23273 -Wfree-nonheap-object \
23274 -Wignored-qualifiers \
23275 -Winherited-variadic-ctor \
23276 -Winit-self \
23277 -Winline \
23278 -Wint-to-pointer-cast \
23279 -Winvalid-memory-model \
23280 -Winvalid-offsetof \
23281 -Winvalid-pch \
23282 -Wliteral-suffix \
23283 -Wlogical-not-parentheses \
23284 -Wlogical-op \
23285 -Wmain \
23286 -Wmaybe-uninitialized \
23287 -Wmemset-transposed-args \
23288 -Wmissing-braces \
23289 -Wmissing-declarations \
23290 -Wmissing-field-initializers \
23291 -Wmissing-include-dirs \
23292 -Wmultichar \
23293 -Wnarrowing \
23294 -Wnoexcept \
23295 -Wnon-template-friend \
23296 -Wnon-virtual-dtor \
23297 -Wnonnull \
23298 -Wodr \
23299 -Wold-style-cast \
23300 -Wopenmp-simd \
23301 -Woverflow \
23302 -Woverlength-strings \
23303 -Woverloaded-virtual \
23304 -Wpacked \
23305 -Wpacked-bitfield-compat \
23306 -Wparentheses \
23307 -Wpmf-conversions \
23308 -Wpointer-arith \
23309 -Wpragmas \
23310 -Wreorder \
23311 -Wreturn-local-addr \
23312 -Wreturn-type \
23313 -Wsequence-point \
23314 -Wshadow \
23315 -Wshift-count-negative \
23316 -Wshift-count-overflow \
23317 -Wsign-promo \
23318 -Wsized-deallocation \
23319 -Wsizeof-array-argument \
23320 -Wsizeof-pointer-memaccess \
23321 -Wstack-protector \
23322 -Wstrict-aliasing \
23323 -Wstrict-null-sentinel \
23324 -Wstrict-overflow \
23325 -Wsuggest-attribute=const \
23326 -Wsuggest-attribute=format \
23327 -Wsuggest-attribute=noreturn \
23328 -Wsuggest-attribute=pure \
23329 -Wsuggest-final-methods \
23330 -Wsuggest-final-types \
23331 -Wsuggest-override \
23332 -Wswitch \
23333 -Wswitch-bool \
23334 -Wsync-nand \
23335 -Wsystem-headers \
23336 -Wtrampolines \
23337 -Wtrigraphs \
23338 -Wtype-limits \
23339 -Wuninitialized \
23340 -Wunknown-pragmas \
23341 -Wunsafe-loop-optimizations \
23342 -Wunused \
23343 -Wunused-but-set-parameter \
23344 -Wunused-but-set-variable \
23345 -Wunused-function \
23346 -Wunused-label \
23347 -Wunused-local-typedefs \
23348 -Wunused-macros \
23349 -Wunused-parameter \
23350 -Wunused-result \
23351 -Wunused-value \
23352 -Wunused-variable \
23353 -Wuseless-cast \
23354 -Wvarargs \
23355 -Wvariadic-macros \
23356 -Wvector-operation-performance \
23357 -Wvirtual-move-assign \
23358 -Wvla \
23359 -Wvolatile-register-var \
23360 -Wwrite-strings \
23361 -Wzero-as-null-pointer-constant \
23362 \
23363 ; do
23364 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
23365 done
23366
23367 # gcc --help=warnings outputs an unusual form for these options; list
23368 # them here so that the above 'comm' command doesn't report a false match.
23369 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
23370 gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
23371 gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
23372 gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
23373
23374 # These are needed for older GCC versions.
23375 if test -n "$GXX"; then
23376 case `($CXX --version) 2>/dev/null` in
23377 'g++ (GCC) '[0-3].* | \
23378 'g++ (GCC) '4.[0-7].*)
23379 gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
23380 gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
23381 ;;
23382 esac
23383 fi
23384
23385 # Disable specific options as needed.
23386 if test "$gl_cv_cxx_nomfi_needed" = yes; then
23387 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
23388 fi
23389
23390 if test "$gl_cv_cxx_uninitialized_supported" = no; then
23391 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
23392 fi
23393
23394 cxx_warnings=$gl_manywarn_set
23395
23396 ac_ext=cpp
23397 ac_cpp='$CXXCPP $CPPFLAGS'
23398 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23399 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23400 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23401
23402
23403
23404
23405
23406 gl_warn_set=
23407 set x $cxx_warnings; shift
23408 for gl_warn_item
23409 do
23410 case " $nw " in
23411 *" $gl_warn_item "*)
23412 ;;
23413 *)
23414 gl_warn_set="$gl_warn_set $gl_warn_item"
23415 ;;
23416 esac
23417 done
23418 cxx_warnings=$gl_warn_set
23419
23420 for w in $cxx_warnings; do
23421
23422 ac_ext=cpp
23423 ac_cpp='$CXXCPP $CPPFLAGS'
23424 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23425 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23426 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23427
23428
23429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Werror -Wunknown-warning-option" >&5
23430 $as_echo_n "checking whether C++ compiler handles -Werror -Wunknown-warning-option... " >&6; }
23431 if ${gl_cv_warn_cxx__Werror__Wunknown_warning_option+:} false; then :
23432 $as_echo_n "(cached) " >&6
23433 else
23434
23435 gl_save_compiler_FLAGS="$CXXFLAGS"
23436 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
23437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23438 /* end confdefs.h. */
23439
23440 int
23441 main ()
23442 {
23443
23444 ;
23445 return 0;
23446 }
23447 _ACEOF
23448 if ac_fn_cxx_try_link "$LINENO"; then :
23449 gl_cv_warn_cxx__Werror__Wunknown_warning_option=yes
23450 else
23451 gl_cv_warn_cxx__Werror__Wunknown_warning_option=no
23452 fi
23453 rm -f core conftest.err conftest.$ac_objext \
23454 conftest$ac_exeext conftest.$ac_ext
23455 CXXFLAGS="$gl_save_compiler_FLAGS"
23456
23457 fi
23458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Werror__Wunknown_warning_option" >&5
23459 $as_echo "$gl_cv_warn_cxx__Werror__Wunknown_warning_option" >&6; }
23460 if test "x$gl_cv_warn_cxx__Werror__Wunknown_warning_option" = xyes; then :
23461 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
23462 else
23463 gl_unknown_warnings_are_errors=
23464 fi
23465
23466 ac_ext=cpp
23467 ac_cpp='$CXXCPP $CPPFLAGS'
23468 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23469 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23470 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23471
23472
23473
23474
23475 as_gl_Warn=`$as_echo "gl_cv_warn_cxx_$w" | $as_tr_sh`
23476 gl_positive="$w"
23477 case $gl_positive in
23478 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
23479 esac
23480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles $w" >&5
23481 $as_echo_n "checking whether C++ compiler handles $w... " >&6; }
23482 if eval \${$as_gl_Warn+:} false; then :
23483 $as_echo_n "(cached) " >&6
23484 else
23485
23486 gl_save_compiler_FLAGS="$CXXFLAGS"
23487 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
23488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23489 /* end confdefs.h. */
23490
23491 int
23492 main ()
23493 {
23494
23495 ;
23496 return 0;
23497 }
23498 _ACEOF
23499 if ac_fn_cxx_try_link "$LINENO"; then :
23500 eval "$as_gl_Warn=yes"
23501 else
23502 eval "$as_gl_Warn=no"
23503 fi
23504 rm -f core conftest.err conftest.$ac_objext \
23505 conftest$ac_exeext conftest.$ac_ext
23506 CXXFLAGS="$gl_save_compiler_FLAGS"
23507
23508 fi
23509 eval ac_res=\$$as_gl_Warn
23510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23511 $as_echo "$ac_res" >&6; }
23512 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
23513 as_fn_append WARN_CXXFLAGS " $w"
23514 fi
23515
23516
23517 done
23518 ac_ext=c
23519 ac_cpp='$CPP $CPPFLAGS'
23520 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23521 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23522 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23523
23524
23525
23526
23527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wstrict-overflow=1" >&5
23528 $as_echo_n "checking whether C compiler handles -Wstrict-overflow=1... " >&6; }
23529 if ${gl_cv_warn_c__Wstrict_overflow_1+:} false; then :
23530 $as_echo_n "(cached) " >&6
23531 else
23532
23533 gl_save_compiler_FLAGS="$CFLAGS"
23534 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wstrict-overflow=1"
23535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23536 /* end confdefs.h. */
23537
23538 int
23539 main ()
23540 {
23541
23542 ;
23543 return 0;
23544 }
23545 _ACEOF
23546 if ac_fn_c_try_link "$LINENO"; then :
23547 gl_cv_warn_c__Wstrict_overflow_1=yes
23548 else
23549 gl_cv_warn_c__Wstrict_overflow_1=no
23550 fi
23551 rm -f core conftest.err conftest.$ac_objext \
23552 conftest$ac_exeext conftest.$ac_ext
23553 CFLAGS="$gl_save_compiler_FLAGS"
23554
23555 fi
23556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wstrict_overflow_1" >&5
23557 $as_echo "$gl_cv_warn_c__Wstrict_overflow_1" >&6; }
23558 if test "x$gl_cv_warn_c__Wstrict_overflow_1" = xyes; then :
23559 as_fn_append WARN_CFLAGS " -Wstrict-overflow=1"
23560 fi
23561
23562
23563
23564
23565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -D_FORTIFY_SOURCE=2" >&5
23566 $as_echo_n "checking whether C compiler handles -D_FORTIFY_SOURCE=2... " >&6; }
23567 if ${gl_cv_warn_c__D_FORTIFY_SOURCE_2+:} false; then :
23568 $as_echo_n "(cached) " >&6
23569 else
23570
23571 gl_save_compiler_FLAGS="$CFLAGS"
23572 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -D_FORTIFY_SOURCE=2"
23573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23574 /* end confdefs.h. */
23575
23576 int
23577 main ()
23578 {
23579
23580 ;
23581 return 0;
23582 }
23583 _ACEOF
23584 if ac_fn_c_try_link "$LINENO"; then :
23585 gl_cv_warn_c__D_FORTIFY_SOURCE_2=yes
23586 else
23587 gl_cv_warn_c__D_FORTIFY_SOURCE_2=no
23588 fi
23589 rm -f core conftest.err conftest.$ac_objext \
23590 conftest$ac_exeext conftest.$ac_ext
23591 CFLAGS="$gl_save_compiler_FLAGS"
23592
23593 fi
23594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__D_FORTIFY_SOURCE_2" >&5
23595 $as_echo "$gl_cv_warn_c__D_FORTIFY_SOURCE_2" >&6; }
23596 if test "x$gl_cv_warn_c__D_FORTIFY_SOURCE_2" = xyes; then :
23597 as_fn_append WARN_CFLAGS " -D_FORTIFY_SOURCE=2"
23598 fi
23599
23600
23601
23602
23603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-error=format-security" >&5
23604 $as_echo_n "checking whether C compiler handles -Wno-error=format-security... " >&6; }
23605 if ${gl_cv_warn_c__Wno_error_format_security+:} false; then :
23606 $as_echo_n "(cached) " >&6
23607 else
23608
23609 gl_save_compiler_FLAGS="$CFLAGS"
23610 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror=format-security"
23611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23612 /* end confdefs.h. */
23613
23614 int
23615 main ()
23616 {
23617
23618 ;
23619 return 0;
23620 }
23621 _ACEOF
23622 if ac_fn_c_try_link "$LINENO"; then :
23623 gl_cv_warn_c__Wno_error_format_security=yes
23624 else
23625 gl_cv_warn_c__Wno_error_format_security=no
23626 fi
23627 rm -f core conftest.err conftest.$ac_objext \
23628 conftest$ac_exeext conftest.$ac_ext
23629 CFLAGS="$gl_save_compiler_FLAGS"
23630
23631 fi
23632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_error_format_security" >&5
23633 $as_echo "$gl_cv_warn_c__Wno_error_format_security" >&6; }
23634 if test "x$gl_cv_warn_c__Wno_error_format_security" = xyes; then :
23635 as_fn_append WARN_CFLAGS " -Wno-error=format-security"
23636 fi
23637
23638
23639
23640 # When compiling with GCC, prefer -isystem to -I when including system
23641 # include files, to avoid generating useless diagnostics for the files.
23642 ISYSTEM='-isystem '
23643 else
23644 ISYSTEM='-I'
23645 fi
23646
23647
23648 # FIXME: Use just GLIB_CFLAGS, GLIB_LIBS
23649 ENCHANT_CFLAGS=$GLIB_CFLAGS
23650 ENCHANT_LIBS=$GLIB_LIBS
23651
23652
23653
23654
23655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native Win32" >&5
23656 $as_echo_n "checking for native Win32... " >&6; }
23657 native_win32=no
23658 case "$host" in
23659 *-*-mingw*)
23660 native_win32=yes
23661 ;;
23662 esac
23663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $native_win32" >&5
23664 $as_echo "$native_win32" >&6; }
23665 if test "x$native_win32" = "xyes"; then
23666 OS_WIN32_TRUE=
23667 OS_WIN32_FALSE='#'
23668 else
23669 OS_WIN32_TRUE='#'
23670 OS_WIN32_FALSE=
23671 fi
23672
23673
23674 if case "$host_os" in mingw* | cygwin*) true;; *) false;; esac; then
23675 SHLIBS_IN_BINDIR_TRUE=
23676 SHLIBS_IN_BINDIR_FALSE='#'
23677 else
23678 SHLIBS_IN_BINDIR_TRUE='#'
23679 SHLIBS_IN_BINDIR_FALSE=
23680 fi
23681
23682
23683
23684
23685
23686
23687 for ac_header in locale.h
23688 do :
23689 ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
23690 if test "x$ac_cv_header_locale_h" = xyes; then :
23691 cat >>confdefs.h <<_ACEOF
23692 #define HAVE_LOCALE_H 1
23693 _ACEOF
23694
23695 fi
23696
23697 done
23698
23699 if test $ac_cv_header_locale_h = yes; then
23700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
23701 $as_echo_n "checking for LC_MESSAGES... " >&6; }
23702 if ${am_cv_val_LC_MESSAGES+:} false; then :
23703 $as_echo_n "(cached) " >&6
23704 else
23705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23706 /* end confdefs.h. */
23707 #include <locale.h>
23708 int
23709 main ()
23710 {
23711 return LC_MESSAGES
23712 ;
23713 return 0;
23714 }
23715 _ACEOF
23716 if ac_fn_c_try_link "$LINENO"; then :
23717 am_cv_val_LC_MESSAGES=yes
23718 else
23719 am_cv_val_LC_MESSAGES=no
23720 fi
23721 rm -f core conftest.err conftest.$ac_objext \
23722 conftest$ac_exeext conftest.$ac_ext
23723 fi
23724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
23725 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
23726 if test $am_cv_val_LC_MESSAGES = yes; then
23727
23728 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
23729
23730 fi
23731 fi
23732
23733 ac_ext=cpp
23734 ac_cpp='$CXXCPP $CPPFLAGS'
23735 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23736 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23737 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23738
23739 if test -n "$PKG_CONFIG" && \
23740 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"UnitTest++\""; } >&5
23741 ($PKG_CONFIG --exists --print-errors "UnitTest++") 2>&5
23742 ac_status=$?
23743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23744 test $ac_status = 0; }; then
23745
23746 pkg_failed=no
23747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNITTESTPP" >&5
23748 $as_echo_n "checking for UNITTESTPP... " >&6; }
23749
23750 if test -n "$UNITTESTPP_CFLAGS"; then
23751 pkg_cv_UNITTESTPP_CFLAGS="$UNITTESTPP_CFLAGS"
23752 elif test -n "$PKG_CONFIG"; then
23753 if test -n "$PKG_CONFIG" && \
23754 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"UnitTest++\""; } >&5
23755 ($PKG_CONFIG --exists --print-errors "UnitTest++") 2>&5
23756 ac_status=$?
23757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23758 test $ac_status = 0; }; then
23759 pkg_cv_UNITTESTPP_CFLAGS=`$PKG_CONFIG --cflags "UnitTest++" 2>/dev/null`
23760 test "x$?" != "x0" && pkg_failed=yes
23761 else
23762 pkg_failed=yes
23763 fi
23764 else
23765 pkg_failed=untried
23766 fi
23767 if test -n "$UNITTESTPP_LIBS"; then
23768 pkg_cv_UNITTESTPP_LIBS="$UNITTESTPP_LIBS"
23769 elif test -n "$PKG_CONFIG"; then
23770 if test -n "$PKG_CONFIG" && \
23771 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"UnitTest++\""; } >&5
23772 ($PKG_CONFIG --exists --print-errors "UnitTest++") 2>&5
23773 ac_status=$?
23774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23775 test $ac_status = 0; }; then
23776 pkg_cv_UNITTESTPP_LIBS=`$PKG_CONFIG --libs "UnitTest++" 2>/dev/null`
23777 test "x$?" != "x0" && pkg_failed=yes
23778 else
23779 pkg_failed=yes
23780 fi
23781 else
23782 pkg_failed=untried
23783 fi
23784
23785
23786
23787 if test $pkg_failed = yes; then
23788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23789 $as_echo "no" >&6; }
23790
23791 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
23792 _pkg_short_errors_supported=yes
23793 else
23794 _pkg_short_errors_supported=no
23795 fi
23796 if test $_pkg_short_errors_supported = yes; then
23797 UNITTESTPP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "UnitTest++" 2>&1`
23798 else
23799 UNITTESTPP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "UnitTest++" 2>&1`
23800 fi
23801 # Put the nasty error message in config.log where it belongs
23802 echo "$UNITTESTPP_PKG_ERRORS" >&5
23803
23804 as_fn_error $? "Package requirements (UnitTest++) were not met:
23805
23806 $UNITTESTPP_PKG_ERRORS
23807
23808 Consider adjusting the PKG_CONFIG_PATH environment variable if you
23809 installed software in a non-standard prefix.
23810
23811 Alternatively, you may set the environment variables UNITTESTPP_CFLAGS
23812 and UNITTESTPP_LIBS to avoid the need to call pkg-config.
23813 See the pkg-config man page for more details." "$LINENO" 5
23814 elif test $pkg_failed = untried; then
23815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23816 $as_echo "no" >&6; }
23817 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23818 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23819 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
23820 is in your PATH or set the PKG_CONFIG environment variable to the full
23821 path to pkg-config.
23822
23823 Alternatively, you may set the environment variables UNITTESTPP_CFLAGS
23824 and UNITTESTPP_LIBS to avoid the need to call pkg-config.
23825 See the pkg-config man page for more details.
23826
23827 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
23828 See \`config.log' for more details" "$LINENO" 5; }
23829 else
23830 UNITTESTPP_CFLAGS=$pkg_cv_UNITTESTPP_CFLAGS
23831 UNITTESTPP_LIBS=$pkg_cv_UNITTESTPP_LIBS
23832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23833 $as_echo "yes" >&6; }
23834
23835 fi
23836 fi
23837
23838
23839 ac_ext=c
23840 ac_cpp='$CPP $CPPFLAGS'
23841 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23842 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23843 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854 build_providers=
23855
23856
23857
23858 # Check whether --with-hunspell was given.
23859 if test "${with_hunspell+set}" = set; then :
23860 withval=$with_hunspell; with_hunspell=$withval
23861 else
23862 with_hunspell=check
23863 fi
23864
23865 hunspell_dir=${datadir}/hunspell
23866
23867 # Check whether --with-hunspell-dir was given.
23868 if test "${with_hunspell_dir+set}" = set; then :
23869 withval=$with_hunspell_dir;
23870 fi
23871
23872 if test "x$with_hunspell_dir" != "x"; then :
23873 hunspell_dir=$with_hunspell_dir
23874 fi
23875 if test "x$with_hunspell" != xno; then :
23876
23877 pkg_failed=no
23878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HUNSPELL" >&5
23879 $as_echo_n "checking for HUNSPELL... " >&6; }
23880
23881 if test -n "$HUNSPELL_CFLAGS"; then
23882 pkg_cv_HUNSPELL_CFLAGS="$HUNSPELL_CFLAGS"
23883 elif test -n "$PKG_CONFIG"; then
23884 if test -n "$PKG_CONFIG" && \
23885 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hunspell\""; } >&5
23886 ($PKG_CONFIG --exists --print-errors "hunspell") 2>&5
23887 ac_status=$?
23888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23889 test $ac_status = 0; }; then
23890 pkg_cv_HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell" 2>/dev/null`
23891 test "x$?" != "x0" && pkg_failed=yes
23892 else
23893 pkg_failed=yes
23894 fi
23895 else
23896 pkg_failed=untried
23897 fi
23898 if test -n "$HUNSPELL_LIBS"; then
23899 pkg_cv_HUNSPELL_LIBS="$HUNSPELL_LIBS"
23900 elif test -n "$PKG_CONFIG"; then
23901 if test -n "$PKG_CONFIG" && \
23902 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hunspell\""; } >&5
23903 ($PKG_CONFIG --exists --print-errors "hunspell") 2>&5
23904 ac_status=$?
23905 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23906 test $ac_status = 0; }; then
23907 pkg_cv_HUNSPELL_LIBS=`$PKG_CONFIG --libs "hunspell" 2>/dev/null`
23908 test "x$?" != "x0" && pkg_failed=yes
23909 else
23910 pkg_failed=yes
23911 fi
23912 else
23913 pkg_failed=untried
23914 fi
23915
23916
23917
23918 if test $pkg_failed = yes; then
23919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23920 $as_echo "no" >&6; }
23921
23922 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
23923 _pkg_short_errors_supported=yes
23924 else
23925 _pkg_short_errors_supported=no
23926 fi
23927 if test $_pkg_short_errors_supported = yes; then
23928 HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "hunspell" 2>&1`
23929 else
23930 HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "hunspell" 2>&1`
23931 fi
23932 # Put the nasty error message in config.log where it belongs
23933 echo "$HUNSPELL_PKG_ERRORS" >&5
23934
23935 if test "x$with_hunspell" != xcheck; then
23936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23937 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23938 as_fn_error $? "--with-hunspell was given, but test(s) for hunspell failed
23939 See \`config.log' for more details" "$LINENO" 5; }
23940 fi
23941 with_hunspell=no
23942 elif test $pkg_failed = untried; then
23943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23944 $as_echo "no" >&6; }
23945 if test "x$with_hunspell" != xcheck; then
23946 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23947 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23948 as_fn_error $? "--with-hunspell was given, but test(s) for hunspell failed
23949 See \`config.log' for more details" "$LINENO" 5; }
23950 fi
23951 with_hunspell=no
23952 else
23953 HUNSPELL_CFLAGS=$pkg_cv_HUNSPELL_CFLAGS
23954 HUNSPELL_LIBS=$pkg_cv_HUNSPELL_LIBS
23955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23956 $as_echo "yes" >&6; }
23957 HUNSPELL_CFLAGS="$HUNSPELL_CFLAGS -DENCHANT_HUNSPELL_DICT_DIR='\"$hunspell_dir\"'"
23958 with_hunspell=yes
23959 build_providers="$build_providers hunspell"
23960 fi
23961 fi
23962 if test "x$with_hunspell" = xyes; then
23963 WITH_HUNSPELL_TRUE=
23964 WITH_HUNSPELL_FALSE='#'
23965 else
23966 WITH_HUNSPELL_TRUE='#'
23967 WITH_HUNSPELL_FALSE=
23968 fi
23969
23970
23971
23972 # Check whether --with-nuspell was given.
23973 if test "${with_nuspell+set}" = set; then :
23974 withval=$with_nuspell; with_nuspell=$withval
23975 else
23976 with_nuspell=check
23977 fi
23978
23979 nuspell_dir=${datadir}/nuspell
23980
23981 # Check whether --with-nuspell-dir was given.
23982 if test "${with_nuspell_dir+set}" = set; then :
23983 withval=$with_nuspell_dir;
23984 fi
23985
23986 if test "x$with_nuspell_dir" != "x"; then :
23987 nuspell_dir=$with_nuspell_dir
23988 fi
23989 if test "x$with_nuspell" != xno; then :
23990
23991 pkg_failed=no
23992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NUSPELL" >&5
23993 $as_echo_n "checking for NUSPELL... " >&6; }
23994
23995 if test -n "$NUSPELL_CFLAGS"; then
23996 pkg_cv_NUSPELL_CFLAGS="$NUSPELL_CFLAGS"
23997 elif test -n "$PKG_CONFIG"; then
23998 if test -n "$PKG_CONFIG" && \
23999 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nuspell\""; } >&5
24000 ($PKG_CONFIG --exists --print-errors "nuspell") 2>&5
24001 ac_status=$?
24002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24003 test $ac_status = 0; }; then
24004 pkg_cv_NUSPELL_CFLAGS=`$PKG_CONFIG --cflags "nuspell" 2>/dev/null`
24005 test "x$?" != "x0" && pkg_failed=yes
24006 else
24007 pkg_failed=yes
24008 fi
24009 else
24010 pkg_failed=untried
24011 fi
24012 if test -n "$NUSPELL_LIBS"; then
24013 pkg_cv_NUSPELL_LIBS="$NUSPELL_LIBS"
24014 elif test -n "$PKG_CONFIG"; then
24015 if test -n "$PKG_CONFIG" && \
24016 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nuspell\""; } >&5
24017 ($PKG_CONFIG --exists --print-errors "nuspell") 2>&5
24018 ac_status=$?
24019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24020 test $ac_status = 0; }; then
24021 pkg_cv_NUSPELL_LIBS=`$PKG_CONFIG --libs "nuspell" 2>/dev/null`
24022 test "x$?" != "x0" && pkg_failed=yes
24023 else
24024 pkg_failed=yes
24025 fi
24026 else
24027 pkg_failed=untried
24028 fi
24029
24030
24031
24032 if test $pkg_failed = yes; then
24033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24034 $as_echo "no" >&6; }
24035
24036 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
24037 _pkg_short_errors_supported=yes
24038 else
24039 _pkg_short_errors_supported=no
24040 fi
24041 if test $_pkg_short_errors_supported = yes; then
24042 NUSPELL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "nuspell" 2>&1`
24043 else
24044 NUSPELL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "nuspell" 2>&1`
24045 fi
24046 # Put the nasty error message in config.log where it belongs
24047 echo "$NUSPELL_PKG_ERRORS" >&5
24048
24049 if test "x$with_nuspell" != xcheck; then
24050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24051 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24052 as_fn_error $? "--with-nuspell was given, but test(s) for nuspell failed
24053 See \`config.log' for more details" "$LINENO" 5; }
24054 fi
24055 with_nuspell=no
24056 elif test $pkg_failed = untried; then
24057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24058 $as_echo "no" >&6; }
24059 if test "x$with_nuspell" != xcheck; then
24060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24061 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24062 as_fn_error $? "--with-nuspell was given, but test(s) for nuspell failed
24063 See \`config.log' for more details" "$LINENO" 5; }
24064 fi
24065 with_nuspell=no
24066 else
24067 NUSPELL_CFLAGS=$pkg_cv_NUSPELL_CFLAGS
24068 NUSPELL_LIBS=$pkg_cv_NUSPELL_LIBS
24069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24070 $as_echo "yes" >&6; }
24071 NUSPELL_CFLAGS="$NUSPELL_CFLAGS -DENCHANT_NUSPELL_DICT_DIR='\"$nuspell_dir\"'"
24072 with_nuspell=yes
24073 build_providers="$build_providers nuspell"
24074 fi
24075 fi
24076 if test "x$with_nuspell" = xyes; then
24077 WITH_NUSPELL_TRUE=
24078 WITH_NUSPELL_FALSE='#'
24079 else
24080 WITH_NUSPELL_TRUE='#'
24081 WITH_NUSPELL_FALSE=
24082 fi
24083
24084
24085
24086 # Check whether --with-aspell was given.
24087 if test "${with_aspell+set}" = set; then :
24088 withval=$with_aspell; with_aspell=$withval
24089 else
24090 with_aspell=check
24091 fi
24092
24093 aspell_dir=${datadir}/aspell
24094
24095 # Check whether --with-aspell-dir was given.
24096 if test "${with_aspell_dir+set}" = set; then :
24097 withval=$with_aspell_dir;
24098 fi
24099
24100 if test "x$with_aspell_dir" != "x"; then :
24101 aspell_dir=$with_aspell_dir
24102 fi
24103 if test "x$with_aspell" != xno; then :
24104 _enchant_header=aspell.h
24105 for ac_header in $_enchant_header
24106 do :
24107 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
24108 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
24109 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
24110 cat >>confdefs.h <<_ACEOF
24111 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
24112 _ACEOF
24113 _header_found=yes
24114 else
24115 _header_found=no
24116 fi
24117
24118 done
24119
24120 if test "get_aspell_dict_info_list" != NOLIB; then
24121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for get_aspell_dict_info_list in -laspell" >&5
24122 $as_echo_n "checking for get_aspell_dict_info_list in -laspell... " >&6; }
24123 if ${ac_cv_lib_aspell_get_aspell_dict_info_list+:} false; then :
24124 $as_echo_n "(cached) " >&6
24125 else
24126 ac_check_lib_save_LIBS=$LIBS
24127 LIBS="-laspell $LIBS"
24128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24129 /* end confdefs.h. */
24130
24131 /* Override any GCC internal prototype to avoid an error.
24132 Use char because int might match the return type of a GCC
24133 builtin and then its argument prototype would still apply. */
24134 #ifdef __cplusplus
24135 extern "C"
24136 #endif
24137 char get_aspell_dict_info_list ();
24138 int
24139 main ()
24140 {
24141 return get_aspell_dict_info_list ();
24142 ;
24143 return 0;
24144 }
24145 _ACEOF
24146 if ac_fn_c_try_link "$LINENO"; then :
24147 ac_cv_lib_aspell_get_aspell_dict_info_list=yes
24148 else
24149 ac_cv_lib_aspell_get_aspell_dict_info_list=no
24150 fi
24151 rm -f core conftest.err conftest.$ac_objext \
24152 conftest$ac_exeext conftest.$ac_ext
24153 LIBS=$ac_check_lib_save_LIBS
24154 fi
24155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aspell_get_aspell_dict_info_list" >&5
24156 $as_echo "$ac_cv_lib_aspell_get_aspell_dict_info_list" >&6; }
24157 if test "x$ac_cv_lib_aspell_get_aspell_dict_info_list" = xyes; then :
24158 cat >>confdefs.h <<_ACEOF
24159 #define HAVE_LIBASPELL 1
24160 _ACEOF
24161
24162 LIBS="-laspell $LIBS"
24163
24164 fi
24165
24166 else
24167 ac_cv_lib_aspell_get_aspell_dict_info_list=yes
24168 fi
24169 if test "x$_header_found" != xyes -o "x$ac_cv_lib_aspell_get_aspell_dict_info_list" != xyes; then
24170 if test "x$with_aspell" != xcheck; then
24171 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24172 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24173 as_fn_error $? "--with-aspell was given, but tests for aspell failed
24174 See \`config.log' for more details" "$LINENO" 5; }
24175 fi
24176 with_aspell=no
24177 else
24178 with_aspell=yes
24179 build_providers="$build_providers aspell"
24180 LIBS="$LIBS "
24181 fi
24182 fi
24183 if test "x$with_aspell" = xyes; then
24184 WITH_ASPELL_TRUE=
24185 WITH_ASPELL_FALSE='#'
24186 else
24187 WITH_ASPELL_TRUE='#'
24188 WITH_ASPELL_FALSE=
24189 fi
24190
24191
24192
24193 # Check whether --with-hspell was given.
24194 if test "${with_hspell+set}" = set; then :
24195 withval=$with_hspell; with_hspell=$withval
24196 else
24197 with_hspell=check
24198 fi
24199
24200 hspell_dir=${datadir}/hspell
24201
24202 # Check whether --with-hspell-dir was given.
24203 if test "${with_hspell_dir+set}" = set; then :
24204 withval=$with_hspell_dir;
24205 fi
24206
24207 if test "x$with_hspell_dir" != "x"; then :
24208 hspell_dir=$with_hspell_dir
24209 fi
24210 if test "x$with_hspell" != xno; then :
24211 _enchant_header=hspell.h
24212 for ac_header in $_enchant_header
24213 do :
24214 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
24215 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
24216 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
24217 cat >>confdefs.h <<_ACEOF
24218 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
24219 _ACEOF
24220 _header_found=yes
24221 else
24222 _header_found=no
24223 fi
24224
24225 done
24226
24227 if test "hspell_get_dictionary_path" != NOLIB; then
24228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hspell_get_dictionary_path in -lhspell" >&5
24229 $as_echo_n "checking for hspell_get_dictionary_path in -lhspell... " >&6; }
24230 if ${ac_cv_lib_hspell_hspell_get_dictionary_path+:} false; then :
24231 $as_echo_n "(cached) " >&6
24232 else
24233 ac_check_lib_save_LIBS=$LIBS
24234 LIBS="-lhspell -lz $LIBS"
24235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24236 /* end confdefs.h. */
24237
24238 /* Override any GCC internal prototype to avoid an error.
24239 Use char because int might match the return type of a GCC
24240 builtin and then its argument prototype would still apply. */
24241 #ifdef __cplusplus
24242 extern "C"
24243 #endif
24244 char hspell_get_dictionary_path ();
24245 int
24246 main ()
24247 {
24248 return hspell_get_dictionary_path ();
24249 ;
24250 return 0;
24251 }
24252 _ACEOF
24253 if ac_fn_c_try_link "$LINENO"; then :
24254 ac_cv_lib_hspell_hspell_get_dictionary_path=yes
24255 else
24256 ac_cv_lib_hspell_hspell_get_dictionary_path=no
24257 fi
24258 rm -f core conftest.err conftest.$ac_objext \
24259 conftest$ac_exeext conftest.$ac_ext
24260 LIBS=$ac_check_lib_save_LIBS
24261 fi
24262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hspell_hspell_get_dictionary_path" >&5
24263 $as_echo "$ac_cv_lib_hspell_hspell_get_dictionary_path" >&6; }
24264 if test "x$ac_cv_lib_hspell_hspell_get_dictionary_path" = xyes; then :
24265 cat >>confdefs.h <<_ACEOF
24266 #define HAVE_LIBHSPELL 1
24267 _ACEOF
24268
24269 LIBS="-lhspell $LIBS"
24270
24271 fi
24272
24273 else
24274 ac_cv_lib_hspell_hspell_get_dictionary_path=yes
24275 fi
24276 if test "x$_header_found" != xyes -o "x$ac_cv_lib_hspell_hspell_get_dictionary_path" != xyes; then
24277 if test "x$with_hspell" != xcheck; then
24278 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24279 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24280 as_fn_error $? "--with-hspell was given, but tests for hspell failed
24281 See \`config.log' for more details" "$LINENO" 5; }
24282 fi
24283 with_hspell=no
24284 else
24285 with_hspell=yes
24286 build_providers="$build_providers hspell"
24287 LIBS="$LIBS -lz"
24288 fi
24289 fi
24290 if test "x$with_hspell" = xyes; then
24291 WITH_HSPELL_TRUE=
24292 WITH_HSPELL_FALSE='#'
24293 else
24294 WITH_HSPELL_TRUE='#'
24295 WITH_HSPELL_FALSE=
24296 fi
24297
24298
24299
24300 # Check whether --with-voikko was given.
24301 if test "${with_voikko+set}" = set; then :
24302 withval=$with_voikko; with_voikko=$withval
24303 else
24304 with_voikko=check
24305 fi
24306
24307 voikko_dir=${datadir}/voikko
24308
24309 # Check whether --with-voikko-dir was given.
24310 if test "${with_voikko_dir+set}" = set; then :
24311 withval=$with_voikko_dir;
24312 fi
24313
24314 if test "x$with_voikko_dir" != "x"; then :
24315 voikko_dir=$with_voikko_dir
24316 fi
24317 if test "x$with_voikko" != xno; then :
24318
24319 pkg_failed=no
24320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VOIKKO" >&5
24321 $as_echo_n "checking for VOIKKO... " >&6; }
24322
24323 if test -n "$VOIKKO_CFLAGS"; then
24324 pkg_cv_VOIKKO_CFLAGS="$VOIKKO_CFLAGS"
24325 elif test -n "$PKG_CONFIG"; then
24326 if test -n "$PKG_CONFIG" && \
24327 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libvoikko\""; } >&5
24328 ($PKG_CONFIG --exists --print-errors "libvoikko") 2>&5
24329 ac_status=$?
24330 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24331 test $ac_status = 0; }; then
24332 pkg_cv_VOIKKO_CFLAGS=`$PKG_CONFIG --cflags "libvoikko" 2>/dev/null`
24333 test "x$?" != "x0" && pkg_failed=yes
24334 else
24335 pkg_failed=yes
24336 fi
24337 else
24338 pkg_failed=untried
24339 fi
24340 if test -n "$VOIKKO_LIBS"; then
24341 pkg_cv_VOIKKO_LIBS="$VOIKKO_LIBS"
24342 elif test -n "$PKG_CONFIG"; then
24343 if test -n "$PKG_CONFIG" && \
24344 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libvoikko\""; } >&5
24345 ($PKG_CONFIG --exists --print-errors "libvoikko") 2>&5
24346 ac_status=$?
24347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24348 test $ac_status = 0; }; then
24349 pkg_cv_VOIKKO_LIBS=`$PKG_CONFIG --libs "libvoikko" 2>/dev/null`
24350 test "x$?" != "x0" && pkg_failed=yes
24351 else
24352 pkg_failed=yes
24353 fi
24354 else
24355 pkg_failed=untried
24356 fi
24357
24358
24359
24360 if test $pkg_failed = yes; then
24361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24362 $as_echo "no" >&6; }
24363
24364 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
24365 _pkg_short_errors_supported=yes
24366 else
24367 _pkg_short_errors_supported=no
24368 fi
24369 if test $_pkg_short_errors_supported = yes; then
24370 VOIKKO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libvoikko" 2>&1`
24371 else
24372 VOIKKO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libvoikko" 2>&1`
24373 fi
24374 # Put the nasty error message in config.log where it belongs
24375 echo "$VOIKKO_PKG_ERRORS" >&5
24376
24377 if test "x$with_voikko" != xcheck; then
24378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24379 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24380 as_fn_error $? "--with-voikko was given, but test(s) for voikko failed
24381 See \`config.log' for more details" "$LINENO" 5; }
24382 fi
24383 with_voikko=no
24384 elif test $pkg_failed = untried; then
24385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24386 $as_echo "no" >&6; }
24387 if test "x$with_voikko" != xcheck; then
24388 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24389 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24390 as_fn_error $? "--with-voikko was given, but test(s) for voikko failed
24391 See \`config.log' for more details" "$LINENO" 5; }
24392 fi
24393 with_voikko=no
24394 else
24395 VOIKKO_CFLAGS=$pkg_cv_VOIKKO_CFLAGS
24396 VOIKKO_LIBS=$pkg_cv_VOIKKO_LIBS
24397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24398 $as_echo "yes" >&6; }
24399 VOIKKO_CFLAGS="$VOIKKO_CFLAGS -DENCHANT_VOIKKO_DICT_DIR='\"$voikko_dir\"'"
24400 with_voikko=yes
24401 build_providers="$build_providers voikko"
24402 fi
24403 fi
24404 if test "x$with_voikko" = xyes; then
24405 WITH_VOIKKO_TRUE=
24406 WITH_VOIKKO_FALSE='#'
24407 else
24408 WITH_VOIKKO_TRUE='#'
24409 WITH_VOIKKO_FALSE=
24410 fi
24411
24412 if test "$ac_cv_objcxx_compiler_gnu" = "yes"; then
24413 ac_ext=mm
24414 ac_cpp='$OBJCXXCPP $CPPFLAGS'
24415 ac_compile='$OBJCXX -c $OBJCXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24416 ac_link='$OBJCXX -o conftest$ac_exeext $OBJCXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24417 ac_compiler_gnu=$ac_cv_objcxx_compiler_gnu
24418
24419
24420 ac_ext=mm
24421 ac_cpp='$OBJCXXCPP $CPPFLAGS'
24422 ac_compile='$OBJCXX -c $OBJCXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24423 ac_link='$OBJCXX -o conftest$ac_exeext $OBJCXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24424 ac_compiler_gnu=$ac_cv_objcxx_compiler_gnu
24425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the Objective C++ preprocessor" >&5
24426 $as_echo_n "checking how to run the Objective C++ preprocessor... " >&6; }
24427 if test -z "$OBJCXXCPP"; then
24428 if ${ac_cv_prog_OBJCXXCPP+:} false; then :
24429 $as_echo_n "(cached) " >&6
24430 else
24431 # Double quotes because OBJCXXCPP needs to be expanded
24432 for OBJCXXCPP in "$OBJCXX -E" "/lib/cpp"
24433 do
24434 ac_preproc_ok=false
24435 for ac_objcxx_preproc_warn_flag in '' yes
24436 do
24437 # Use a header file that comes with gcc, so configuring glibc
24438 # with a fresh cross-compiler works.
24439 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24440 # <limits.h> exists even on freestanding compilers.
24441 # On the NeXT, cc -E runs the code through the compiler's parser,
24442 # not just through cpp. "Syntax error" is here to catch this case.
24443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24444 /* end confdefs.h. */
24445 #ifdef __STDC__
24446 # include <limits.h>
24447 #else
24448 # include <assert.h>
24449 #endif
24450 Syntax error
24451 _ACEOF
24452 if ac_fn_objcxx_try_cpp "$LINENO"; then :
24453
24454 else
24455 # Broken: fails on valid input.
24456 continue
24457 fi
24458 rm -f conftest.err conftest.i conftest.$ac_ext
24459
24460 # OK, works on sane cases. Now check whether nonexistent headers
24461 # can be detected and how.
24462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24463 /* end confdefs.h. */
24464 #include <ac_nonexistent.h>
24465 _ACEOF
24466 if ac_fn_objcxx_try_cpp "$LINENO"; then :
24467 # Broken: success on invalid input.
24468 continue
24469 else
24470 # Passes both tests.
24471 ac_preproc_ok=:
24472 break
24473 fi
24474 rm -f conftest.err conftest.i conftest.$ac_ext
24475
24476 done
24477 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24478 rm -f conftest.i conftest.err conftest.$ac_ext
24479 if $ac_preproc_ok; then :
24480 break
24481 fi
24482
24483 done
24484 ac_cv_prog_OBJCXXCPP=$OBJCXXCPP
24485
24486 fi
24487 OBJCXXCPP=$ac_cv_prog_OBJCXXCPP
24488 else
24489 ac_cv_prog_OBJCXXCPP=$OBJCXXCPP
24490 fi
24491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCXXCPP" >&5
24492 $as_echo "$OBJCXXCPP" >&6; }
24493 ac_preproc_ok=false
24494 for ac_objcxx_preproc_warn_flag in '' yes
24495 do
24496 # Use a header file that comes with gcc, so configuring glibc
24497 # with a fresh cross-compiler works.
24498 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24499 # <limits.h> exists even on freestanding compilers.
24500 # On the NeXT, cc -E runs the code through the compiler's parser,
24501 # not just through cpp. "Syntax error" is here to catch this case.
24502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24503 /* end confdefs.h. */
24504 #ifdef __STDC__
24505 # include <limits.h>
24506 #else
24507 # include <assert.h>
24508 #endif
24509 Syntax error
24510 _ACEOF
24511 if ac_fn_objcxx_try_cpp "$LINENO"; then :
24512
24513 else
24514 # Broken: fails on valid input.
24515 continue
24516 fi
24517 rm -f conftest.err conftest.i conftest.$ac_ext
24518
24519 # OK, works on sane cases. Now check whether nonexistent headers
24520 # can be detected and how.
24521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24522 /* end confdefs.h. */
24523 #include <ac_nonexistent.h>
24524 _ACEOF
24525 if ac_fn_objcxx_try_cpp "$LINENO"; then :
24526 # Broken: success on invalid input.
24527 continue
24528 else
24529 # Passes both tests.
24530 ac_preproc_ok=:
24531 break
24532 fi
24533 rm -f conftest.err conftest.i conftest.$ac_ext
24534
24535 done
24536 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24537 rm -f conftest.i conftest.err conftest.$ac_ext
24538 if $ac_preproc_ok; then :
24539
24540 else
24541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24542 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24543 as_fn_error $? "Objective C++ preprocessor \"$OBJCXXCPP\" fails sanity check
24544 See \`config.log' for more details" "$LINENO" 5; }
24545 fi
24546
24547 ac_ext=mm
24548 ac_cpp='$OBJCXXCPP $CPPFLAGS'
24549 ac_compile='$OBJCXX -c $OBJCXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24550 ac_link='$OBJCXX -o conftest$ac_exeext $OBJCXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24551 ac_compiler_gnu=$ac_cv_objcxx_compiler_gnu
24552
24553
24554
24555
24556 # Check whether --with-applespell was given.
24557 if test "${with_applespell+set}" = set; then :
24558 withval=$with_applespell; with_applespell=$withval
24559 else
24560 with_applespell=check
24561 fi
24562
24563 applespell_dir=${datadir}/applespell
24564
24565 # Check whether --with-applespell-dir was given.
24566 if test "${with_applespell_dir+set}" = set; then :
24567 withval=$with_applespell_dir;
24568 fi
24569
24570 if test "x$with_applespell_dir" != "x"; then :
24571 applespell_dir=$with_applespell_dir
24572 fi
24573 if test "x$with_applespell" != xno; then :
24574 _enchant_header=Cocoa/Cocoa.h
24575 for ac_header in $_enchant_header
24576 do :
24577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
24578 ac_fn_objcxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
24579 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
24580 cat >>confdefs.h <<_ACEOF
24581 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
24582 _ACEOF
24583 _header_found=yes
24584 else
24585 _header_found=no
24586 fi
24587
24588 done
24589
24590 if test "NOLIB" != NOLIB; then
24591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NOLIB in -lapplespell" >&5
24592 $as_echo_n "checking for NOLIB in -lapplespell... " >&6; }
24593 if ${ac_cv_lib_applespell_NOLIB+:} false; then :
24594 $as_echo_n "(cached) " >&6
24595 else
24596 ac_check_lib_save_LIBS=$LIBS
24597 LIBS="-lapplespell -framework Cocoa $LIBS"
24598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24599 /* end confdefs.h. */
24600
24601 /* Override any GCC internal prototype to avoid an error.
24602 Use char because int might match the return type of a GCC
24603 builtin and then its argument prototype would still apply. */
24604 #ifdef __cplusplus
24605 extern "C"
24606 #endif
24607 char NOLIB ();
24608 int
24609 main ()
24610 {
24611 return NOLIB ();
24612 ;
24613 return 0;
24614 }
24615 _ACEOF
24616 if ac_fn_objcxx_try_link "$LINENO"; then :
24617 ac_cv_lib_applespell_NOLIB=yes
24618 else
24619 ac_cv_lib_applespell_NOLIB=no
24620 fi
24621 rm -f core conftest.err conftest.$ac_objext \
24622 conftest$ac_exeext conftest.$ac_ext
24623 LIBS=$ac_check_lib_save_LIBS
24624 fi
24625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_applespell_NOLIB" >&5
24626 $as_echo "$ac_cv_lib_applespell_NOLIB" >&6; }
24627 if test "x$ac_cv_lib_applespell_NOLIB" = xyes; then :
24628 cat >>confdefs.h <<_ACEOF
24629 #define HAVE_LIBAPPLESPELL 1
24630 _ACEOF
24631
24632 LIBS="-lapplespell $LIBS"
24633
24634 fi
24635
24636 else
24637 ac_cv_lib_applespell_NOLIB=yes
24638 fi
24639 if test "x$_header_found" != xyes -o "x$ac_cv_lib_applespell_NOLIB" != xyes; then
24640 if test "x$with_applespell" != xcheck; then
24641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24642 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24643 as_fn_error $? "--with-applespell was given, but tests for applespell failed
24644 See \`config.log' for more details" "$LINENO" 5; }
24645 fi
24646 with_applespell=no
24647 else
24648 with_applespell=yes
24649 build_providers="$build_providers applespell"
24650 LIBS="$LIBS -framework Cocoa"
24651 fi
24652 fi
24653 if test "x$with_applespell" = xyes; then
24654 WITH_APPLESPELL_TRUE=
24655 WITH_APPLESPELL_FALSE='#'
24656 else
24657 WITH_APPLESPELL_TRUE='#'
24658 WITH_APPLESPELL_FALSE=
24659 fi
24660
24661 ac_ext=c
24662 ac_cpp='$CPP $CPPFLAGS'
24663 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24664 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24665 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24666
24667 fi
24668 if test "x$with_applespell" = xyes; then
24669 WITH_APPLESPELL_TRUE=
24670 WITH_APPLESPELL_FALSE='#'
24671 else
24672 WITH_APPLESPELL_TRUE='#'
24673 WITH_APPLESPELL_FALSE=
24674 fi
24675
24676
24677
24678
24679 # Check whether --with-zemberek was given.
24680 if test "${with_zemberek+set}" = set; then :
24681 withval=$with_zemberek; with_zemberek=$withval
24682 else
24683 with_zemberek=no
24684 fi
24685
24686 zemberek_dir=${datadir}/zemberek
24687
24688 # Check whether --with-zemberek-dir was given.
24689 if test "${with_zemberek_dir+set}" = set; then :
24690 withval=$with_zemberek_dir;
24691 fi
24692
24693 if test "x$with_zemberek_dir" != "x"; then :
24694 zemberek_dir=$with_zemberek_dir
24695 fi
24696 if test "x$with_zemberek" != xno; then :
24697
24698 pkg_failed=no
24699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZEMBEREK" >&5
24700 $as_echo_n "checking for ZEMBEREK... " >&6; }
24701
24702 if test -n "$ZEMBEREK_CFLAGS"; then
24703 pkg_cv_ZEMBEREK_CFLAGS="$ZEMBEREK_CFLAGS"
24704 elif test -n "$PKG_CONFIG"; then
24705 if test -n "$PKG_CONFIG" && \
24706 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.62\""; } >&5
24707 ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.62") 2>&5
24708 ac_status=$?
24709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24710 test $ac_status = 0; }; then
24711 pkg_cv_ZEMBEREK_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.62" 2>/dev/null`
24712 test "x$?" != "x0" && pkg_failed=yes
24713 else
24714 pkg_failed=yes
24715 fi
24716 else
24717 pkg_failed=untried
24718 fi
24719 if test -n "$ZEMBEREK_LIBS"; then
24720 pkg_cv_ZEMBEREK_LIBS="$ZEMBEREK_LIBS"
24721 elif test -n "$PKG_CONFIG"; then
24722 if test -n "$PKG_CONFIG" && \
24723 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.62\""; } >&5
24724 ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.62") 2>&5
24725 ac_status=$?
24726 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24727 test $ac_status = 0; }; then
24728 pkg_cv_ZEMBEREK_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.62" 2>/dev/null`
24729 test "x$?" != "x0" && pkg_failed=yes
24730 else
24731 pkg_failed=yes
24732 fi
24733 else
24734 pkg_failed=untried
24735 fi
24736
24737
24738
24739 if test $pkg_failed = yes; then
24740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24741 $as_echo "no" >&6; }
24742
24743 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
24744 _pkg_short_errors_supported=yes
24745 else
24746 _pkg_short_errors_supported=no
24747 fi
24748 if test $_pkg_short_errors_supported = yes; then
24749 ZEMBEREK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbus-glib-1 >= 0.62" 2>&1`
24750 else
24751 ZEMBEREK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbus-glib-1 >= 0.62" 2>&1`
24752 fi
24753 # Put the nasty error message in config.log where it belongs
24754 echo "$ZEMBEREK_PKG_ERRORS" >&5
24755
24756 if test "x$with_zemberek" != xcheck; then
24757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24758 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24759 as_fn_error $? "--with-zemberek was given, but test(s) for zemberek failed
24760 See \`config.log' for more details" "$LINENO" 5; }
24761 fi
24762 with_zemberek=no
24763 elif test $pkg_failed = untried; then
24764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24765 $as_echo "no" >&6; }
24766 if test "x$with_zemberek" != xcheck; then
24767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24768 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24769 as_fn_error $? "--with-zemberek was given, but test(s) for zemberek failed
24770 See \`config.log' for more details" "$LINENO" 5; }
24771 fi
24772 with_zemberek=no
24773 else
24774 ZEMBEREK_CFLAGS=$pkg_cv_ZEMBEREK_CFLAGS
24775 ZEMBEREK_LIBS=$pkg_cv_ZEMBEREK_LIBS
24776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24777 $as_echo "yes" >&6; }
24778 ZEMBEREK_CFLAGS="$ZEMBEREK_CFLAGS -DENCHANT_ZEMBEREK_DICT_DIR='\"$zemberek_dir\"'"
24779 with_zemberek=yes
24780 build_providers="$build_providers zemberek"
24781 fi
24782 fi
24783 if test "x$with_zemberek" = xyes; then
24784 WITH_ZEMBEREK_TRUE=
24785 WITH_ZEMBEREK_FALSE='#'
24786 else
24787 WITH_ZEMBEREK_TRUE='#'
24788 WITH_ZEMBEREK_FALSE=
24789 fi
24790
24791
24792
24793 ac_config_headers="$ac_config_headers config.h"
24794
24795 ac_config_files="$ac_config_files Makefile enchant-$ENCHANT_MAJOR_VERSION.pc:enchant.pc.in lib/Makefile src/libenchant.rc src/Makefile src/enchant.1 src/enchant-lsmod.1 providers/Makefile tests/Makefile tests/enchant_providers/Makefile"
24796
24797 cat >confcache <<\_ACEOF
24798 # This file is a shell script that caches the results of configure
24799 # tests run on this system so they can be shared between configure
24800 # scripts and configure runs, see configure's option --config-cache.
24801 # It is not useful on other systems. If it contains results you don't
24802 # want to keep, you may remove or edit it.
24803 #
24804 # config.status only pays attention to the cache file if you give it
24805 # the --recheck option to rerun configure.
24806 #
24807 # `ac_cv_env_foo' variables (set or unset) will be overridden when
24808 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24809 # following values.
24810
24811 _ACEOF
24812
24813 # The following way of writing the cache mishandles newlines in values,
24814 # but we know of no workaround that is simple, portable, and efficient.
24815 # So, we kill variables containing newlines.
24816 # Ultrix sh set writes to stderr and can't be redirected directly,
24817 # and sets the high bit in the cache file unless we assign to the vars.
24818 (
24819 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24820 eval ac_val=\$$ac_var
24821 case $ac_val in #(
24822 *${as_nl}*)
24823 case $ac_var in #(
24824 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24825 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24826 esac
24827 case $ac_var in #(
24828 _ | IFS | as_nl) ;; #(
24829 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24830 *) { eval $ac_var=; unset $ac_var;} ;;
24831 esac ;;
24832 esac
24833 done
24834
24835 (set) 2>&1 |
24836 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24837 *${as_nl}ac_space=\ *)
24838 # `set' does not quote correctly, so add quotes: double-quote
24839 # substitution turns \\\\ into \\, and sed turns \\ into \.
24840 sed -n \
24841 "s/'/'\\\\''/g;
24842 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24843 ;; #(
24844 *)
24845 # `set' quotes correctly as required by POSIX, so do not add quotes.
24846 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24847 ;;
24848 esac |
24849 sort
24850 ) |
24851 sed '
24852 /^ac_cv_env_/b end
24853 t clear
24854 :clear
24855 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24856 t end
24857 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24858 :end' >>confcache
24859 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24860 if test -w "$cache_file"; then
24861 if test "x$cache_file" != "x/dev/null"; then
24862 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24863 $as_echo "$as_me: updating cache $cache_file" >&6;}
24864 if test ! -f "$cache_file" || test -h "$cache_file"; then
24865 cat confcache >"$cache_file"
24866 else
24867 case $cache_file in #(
24868 */* | ?:*)
24869 mv -f confcache "$cache_file"$$ &&
24870 mv -f "$cache_file"$$ "$cache_file" ;; #(
24871 *)
24872 mv -f confcache "$cache_file" ;;
24873 esac
24874 fi
24875 fi
24876 else
24877 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24878 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24879 fi
24880 fi
24881 rm -f confcache
24882
24883 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24884 # Let make expand exec_prefix.
24885 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24886
24887 DEFS=-DHAVE_CONFIG_H
24888
24889 ac_libobjs=
24890 ac_ltlibobjs=
24891 U=
24892 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24893 # 1. Remove the extension, and $U if already installed.
24894 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24895 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24896 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24897 # will be set to the directory where LIBOBJS objects are built.
24898 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24899 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24900 done
24901 LIBOBJS=$ac_libobjs
24902
24903 LTLIBOBJS=$ac_ltlibobjs
24904
24905
24906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
24907 $as_echo_n "checking that generated files are newer than configure... " >&6; }
24908 if test -n "$am_sleep_pid"; then
24909 # Hide warnings about reused PIDs.
24910 wait $am_sleep_pid 2>/dev/null
24911 fi
24912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
24913 $as_echo "done" >&6; }
24914 if test -n "$EXEEXT"; then
24915 am__EXEEXT_TRUE=
24916 am__EXEEXT_FALSE='#'
24917 else
24918 am__EXEEXT_TRUE='#'
24919 am__EXEEXT_FALSE=
24920 fi
24921
24922 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24923 as_fn_error $? "conditional \"AMDEP\" was never defined.
24924 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24925 fi
24926 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24927 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
24928 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24929 fi
24930 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
24931 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
24932 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24933 fi
24934 if test -z "${am__fastdepOBJCXX_TRUE}" && test -z "${am__fastdepOBJCXX_FALSE}"; then
24935 as_fn_error $? "conditional \"am__fastdepOBJCXX\" was never defined.
24936 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24937 fi
24938 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
24939 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
24940 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24941 fi
24942 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
24943 as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
24944 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24945 fi
24946 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
24947 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
24948 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24949 fi
24950
24951 gl_libobjs=
24952 gl_ltlibobjs=
24953 if test -n "$gl_LIBOBJS"; then
24954 # Remove the extension.
24955 sed_drop_objext='s/\.o$//;s/\.obj$//'
24956 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24957 gl_libobjs="$gl_libobjs $i.$ac_objext"
24958 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
24959 done
24960 fi
24961 gl_LIBOBJS=$gl_libobjs
24962
24963 gl_LTLIBOBJS=$gl_ltlibobjs
24964
24965
24966
24967 gltests_libobjs=
24968 gltests_ltlibobjs=
24969 if test -n "$gltests_LIBOBJS"; then
24970 # Remove the extension.
24971 sed_drop_objext='s/\.o$//;s/\.obj$//'
24972 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24973 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
24974 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
24975 done
24976 fi
24977 gltests_LIBOBJS=$gltests_libobjs
24978
24979 gltests_LTLIBOBJS=$gltests_ltlibobjs
24980
24981
24982 if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then
24983 as_fn_error $? "conditional \"OS_WIN32\" was never defined.
24984 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24985 fi
24986 if test -z "${SHLIBS_IN_BINDIR_TRUE}" && test -z "${SHLIBS_IN_BINDIR_FALSE}"; then
24987 as_fn_error $? "conditional \"SHLIBS_IN_BINDIR\" was never defined.
24988 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24989 fi
24990 if test -z "${WITH_HUNSPELL_TRUE}" && test -z "${WITH_HUNSPELL_FALSE}"; then
24991 as_fn_error $? "conditional \"WITH_HUNSPELL\" was never defined.
24992 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24993 fi
24994 if test -z "${WITH_NUSPELL_TRUE}" && test -z "${WITH_NUSPELL_FALSE}"; then
24995 as_fn_error $? "conditional \"WITH_NUSPELL\" was never defined.
24996 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24997 fi
24998 if test -z "${WITH_ASPELL_TRUE}" && test -z "${WITH_ASPELL_FALSE}"; then
24999 as_fn_error $? "conditional \"WITH_ASPELL\" was never defined.
25000 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25001 fi
25002 if test -z "${WITH_HSPELL_TRUE}" && test -z "${WITH_HSPELL_FALSE}"; then
25003 as_fn_error $? "conditional \"WITH_HSPELL\" was never defined.
25004 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25005 fi
25006 if test -z "${WITH_VOIKKO_TRUE}" && test -z "${WITH_VOIKKO_FALSE}"; then
25007 as_fn_error $? "conditional \"WITH_VOIKKO\" was never defined.
25008 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25009 fi
25010 if test -z "${WITH_APPLESPELL_TRUE}" && test -z "${WITH_APPLESPELL_FALSE}"; then
25011 as_fn_error $? "conditional \"WITH_APPLESPELL\" was never defined.
25012 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25013 fi
25014 if test -z "${WITH_APPLESPELL_TRUE}" && test -z "${WITH_APPLESPELL_FALSE}"; then
25015 as_fn_error $? "conditional \"WITH_APPLESPELL\" was never defined.
25016 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25017 fi
25018 if test -z "${WITH_ZEMBEREK_TRUE}" && test -z "${WITH_ZEMBEREK_FALSE}"; then
25019 as_fn_error $? "conditional \"WITH_ZEMBEREK\" was never defined.
25020 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25021 fi
25022
25023 : "${CONFIG_STATUS=./config.status}"
25024 ac_write_fail=0
25025 ac_clean_files_save=$ac_clean_files
25026 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25027 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25028 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25029 as_write_fail=0
25030 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25031 #! $SHELL
25032 # Generated by $as_me.
25033 # Run this file to recreate the current configuration.
25034 # Compiler output produced by configure, useful for debugging
25035 # configure, is in config.log if it exists.
25036
25037 debug=false
25038 ac_cs_recheck=false
25039 ac_cs_silent=false
25040
25041 SHELL=\${CONFIG_SHELL-$SHELL}
25042 export SHELL
25043 _ASEOF
25044 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25045 ## -------------------- ##
25046 ## M4sh Initialization. ##
25047 ## -------------------- ##
25048
25049 # Be more Bourne compatible
25050 DUALCASE=1; export DUALCASE # for MKS sh
25051 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
25052 emulate sh
25053 NULLCMD=:
25054 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25055 # is contrary to our usage. Disable this feature.
25056 alias -g '${1+"$@"}'='"$@"'
25057 setopt NO_GLOB_SUBST
25058 else
25059 case `(set -o) 2>/dev/null` in #(
25060 *posix*) :
25061 set -o posix ;; #(
25062 *) :
25063 ;;
25064 esac
25065 fi
25066
25067
25068 as_nl='
25069 '
25070 export as_nl
25071 # Printing a long string crashes Solaris 7 /usr/bin/printf.
25072 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25073 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25074 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25075 # Prefer a ksh shell builtin over an external printf program on Solaris,
25076 # but without wasting forks for bash or zsh.
25077 if test -z "$BASH_VERSION$ZSH_VERSION" \
25078 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25079 as_echo='print -r --'
25080 as_echo_n='print -rn --'
25081 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25082 as_echo='printf %s\n'
25083 as_echo_n='printf %s'
25084 else
25085 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25086 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25087 as_echo_n='/usr/ucb/echo -n'
25088 else
25089 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25090 as_echo_n_body='eval
25091 arg=$1;
25092 case $arg in #(
25093 *"$as_nl"*)
25094 expr "X$arg" : "X\\(.*\\)$as_nl";
25095 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25096 esac;
25097 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25098 '
25099 export as_echo_n_body
25100 as_echo_n='sh -c $as_echo_n_body as_echo'
25101 fi
25102 export as_echo_body
25103 as_echo='sh -c $as_echo_body as_echo'
25104 fi
25105
25106 # The user is always right.
25107 if test "${PATH_SEPARATOR+set}" != set; then
25108 PATH_SEPARATOR=:
25109 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25110 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25111 PATH_SEPARATOR=';'
25112 }
25113 fi
25114
25115
25116 # IFS
25117 # We need space, tab and new line, in precisely that order. Quoting is
25118 # there to prevent editors from complaining about space-tab.
25119 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
25120 # splitting by setting IFS to empty value.)
25121 IFS=" "" $as_nl"
25122
25123 # Find who we are. Look in the path if we contain no directory separator.
25124 as_myself=
25125 case $0 in #((
25126 *[\\/]* ) as_myself=$0 ;;
25127 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25128 for as_dir in $PATH
25129 do
25130 IFS=$as_save_IFS
25131 test -z "$as_dir" && as_dir=.
25132 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25133 done
25134 IFS=$as_save_IFS
25135
25136 ;;
25137 esac
25138 # We did not find ourselves, most probably we were run as `sh COMMAND'
25139 # in which case we are not to be found in the path.
25140 if test "x$as_myself" = x; then
25141 as_myself=$0
25142 fi
25143 if test ! -f "$as_myself"; then
25144 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25145 exit 1
25146 fi
25147
25148 # Unset variables that we do not need and which cause bugs (e.g. in
25149 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
25150 # suppresses any "Segmentation fault" message there. '((' could
25151 # trigger a bug in pdksh 5.2.14.
25152 for as_var in BASH_ENV ENV MAIL MAILPATH
25153 do eval test x\${$as_var+set} = xset \
25154 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25155 done
25156 PS1='$ '
25157 PS2='> '
25158 PS4='+ '
25159
25160 # NLS nuisances.
25161 LC_ALL=C
25162 export LC_ALL
25163 LANGUAGE=C
25164 export LANGUAGE
25165
25166 # CDPATH.
25167 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25168
25169
25170 # as_fn_error STATUS ERROR [LINENO LOG_FD]
25171 # ----------------------------------------
25172 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25173 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25174 # script with STATUS, using 1 if that was 0.
25175 as_fn_error ()
25176 {
25177 as_status=$1; test $as_status -eq 0 && as_status=1
25178 if test "$4"; then
25179 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25180 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
25181 fi
25182 $as_echo "$as_me: error: $2" >&2
25183 as_fn_exit $as_status
25184 } # as_fn_error
25185
25186
25187 # as_fn_set_status STATUS
25188 # -----------------------
25189 # Set $? to STATUS, without forking.
25190 as_fn_set_status ()
25191 {
25192 return $1
25193 } # as_fn_set_status
25194
25195 # as_fn_exit STATUS
25196 # -----------------
25197 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25198 as_fn_exit ()
25199 {
25200 set +e
25201 as_fn_set_status $1
25202 exit $1
25203 } # as_fn_exit
25204
25205 # as_fn_unset VAR
25206 # ---------------
25207 # Portably unset VAR.
25208 as_fn_unset ()
25209 {
25210 { eval $1=; unset $1;}
25211 }
25212 as_unset=as_fn_unset
25213 # as_fn_append VAR VALUE
25214 # ----------------------
25215 # Append the text in VALUE to the end of the definition contained in VAR. Take
25216 # advantage of any shell optimizations that allow amortized linear growth over
25217 # repeated appends, instead of the typical quadratic growth present in naive
25218 # implementations.
25219 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25220 eval 'as_fn_append ()
25221 {
25222 eval $1+=\$2
25223 }'
25224 else
25225 as_fn_append ()
25226 {
25227 eval $1=\$$1\$2
25228 }
25229 fi # as_fn_append
25230
25231 # as_fn_arith ARG...
25232 # ------------------
25233 # Perform arithmetic evaluation on the ARGs, and store the result in the
25234 # global $as_val. Take advantage of shells that can avoid forks. The arguments
25235 # must be portable across $(()) and expr.
25236 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25237 eval 'as_fn_arith ()
25238 {
25239 as_val=$(( $* ))
25240 }'
25241 else
25242 as_fn_arith ()
25243 {
25244 as_val=`expr "$@" || test $? -eq 1`
25245 }
25246 fi # as_fn_arith
25247
25248
25249 if expr a : '\(a\)' >/dev/null 2>&1 &&
25250 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25251 as_expr=expr
25252 else
25253 as_expr=false
25254 fi
25255
25256 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25257 as_basename=basename
25258 else
25259 as_basename=false
25260 fi
25261
25262 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25263 as_dirname=dirname
25264 else
25265 as_dirname=false
25266 fi
25267
25268 as_me=`$as_basename -- "$0" ||
25269 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25270 X"$0" : 'X\(//\)$' \| \
25271 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25272 $as_echo X/"$0" |
25273 sed '/^.*\/\([^/][^/]*\)\/*$/{
25274 s//\1/
25275 q
25276 }
25277 /^X\/\(\/\/\)$/{
25278 s//\1/
25279 q
25280 }
25281 /^X\/\(\/\).*/{
25282 s//\1/
25283 q
25284 }
25285 s/.*/./; q'`
25286
25287 # Avoid depending upon Character Ranges.
25288 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25289 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25290 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25291 as_cr_digits='0123456789'
25292 as_cr_alnum=$as_cr_Letters$as_cr_digits
25293
25294 ECHO_C= ECHO_N= ECHO_T=
25295 case `echo -n x` in #(((((
25296 -n*)
25297 case `echo 'xy\c'` in
25298 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25299 xy) ECHO_C='\c';;
25300 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
25301 ECHO_T=' ';;
25302 esac;;
25303 *)
25304 ECHO_N='-n';;
25305 esac
25306
25307 rm -f conf$$ conf$$.exe conf$$.file
25308 if test -d conf$$.dir; then
25309 rm -f conf$$.dir/conf$$.file
25310 else
25311 rm -f conf$$.dir
25312 mkdir conf$$.dir 2>/dev/null
25313 fi
25314 if (echo >conf$$.file) 2>/dev/null; then
25315 if ln -s conf$$.file conf$$ 2>/dev/null; then
25316 as_ln_s='ln -s'
25317 # ... but there are two gotchas:
25318 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25319 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25320 # In both cases, we have to default to `cp -pR'.
25321 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25322 as_ln_s='cp -pR'
25323 elif ln conf$$.file conf$$ 2>/dev/null; then
25324 as_ln_s=ln
25325 else
25326 as_ln_s='cp -pR'
25327 fi
25328 else
25329 as_ln_s='cp -pR'
25330 fi
25331 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25332 rmdir conf$$.dir 2>/dev/null
25333
25334
25335 # as_fn_mkdir_p
25336 # -------------
25337 # Create "$as_dir" as a directory, including parents if necessary.
25338 as_fn_mkdir_p ()
25339 {
25340
25341 case $as_dir in #(
25342 -*) as_dir=./$as_dir;;
25343 esac
25344 test -d "$as_dir" || eval $as_mkdir_p || {
25345 as_dirs=
25346 while :; do
25347 case $as_dir in #(
25348 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25349 *) as_qdir=$as_dir;;
25350 esac
25351 as_dirs="'$as_qdir' $as_dirs"
25352 as_dir=`$as_dirname -- "$as_dir" ||
25353 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25354 X"$as_dir" : 'X\(//\)[^/]' \| \
25355 X"$as_dir" : 'X\(//\)$' \| \
25356 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25357 $as_echo X"$as_dir" |
25358 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25359 s//\1/
25360 q
25361 }
25362 /^X\(\/\/\)[^/].*/{
25363 s//\1/
25364 q
25365 }
25366 /^X\(\/\/\)$/{
25367 s//\1/
25368 q
25369 }
25370 /^X\(\/\).*/{
25371 s//\1/
25372 q
25373 }
25374 s/.*/./; q'`
25375 test -d "$as_dir" && break
25376 done
25377 test -z "$as_dirs" || eval "mkdir $as_dirs"
25378 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
25379
25380
25381 } # as_fn_mkdir_p
25382 if mkdir -p . 2>/dev/null; then
25383 as_mkdir_p='mkdir -p "$as_dir"'
25384 else
25385 test -d ./-p && rmdir ./-p
25386 as_mkdir_p=false
25387 fi
25388
25389
25390 # as_fn_executable_p FILE
25391 # -----------------------
25392 # Test if FILE is an executable regular file.
25393 as_fn_executable_p ()
25394 {
25395 test -f "$1" && test -x "$1"
25396 } # as_fn_executable_p
25397 as_test_x='test -x'
25398 as_executable_p=as_fn_executable_p
25399
25400 # Sed expression to map a string onto a valid CPP name.
25401 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25402
25403 # Sed expression to map a string onto a valid variable name.
25404 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25405
25406
25407 exec 6>&1
25408 ## ----------------------------------- ##
25409 ## Main body of $CONFIG_STATUS script. ##
25410 ## ----------------------------------- ##
25411 _ASEOF
25412 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25413
25414 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25415 # Save the log message, to keep $0 and so on meaningful, and to
25416 # report actual input values of CONFIG_FILES etc. instead of their
25417 # values after options handling.
25418 ac_log="
25419 This file was extended by enchant $as_me 2.2.8, which was
25420 generated by GNU Autoconf 2.69. Invocation command line was
25421
25422 CONFIG_FILES = $CONFIG_FILES
25423 CONFIG_HEADERS = $CONFIG_HEADERS
25424 CONFIG_LINKS = $CONFIG_LINKS
25425 CONFIG_COMMANDS = $CONFIG_COMMANDS
25426 $ $0 $@
25427
25428 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25429 "
25430
25431 _ACEOF
25432
25433 case $ac_config_files in *"
25434 "*) set x $ac_config_files; shift; ac_config_files=$*;;
25435 esac
25436
25437 case $ac_config_headers in *"
25438 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25439 esac
25440
25441
25442 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25443 # Files that config.status was made for.
25444 config_files="$ac_config_files"
25445 config_headers="$ac_config_headers"
25446 config_commands="$ac_config_commands"
25447
25448 _ACEOF
25449
25450 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25451 ac_cs_usage="\
25452 \`$as_me' instantiates files and other configuration actions
25453 from templates according to the current configuration. Unless the files
25454 and actions are specified as TAGs, all are instantiated by default.
25455
25456 Usage: $0 [OPTION]... [TAG]...
25457
25458 -h, --help print this help, then exit
25459 -V, --version print version number and configuration settings, then exit
25460 --config print configuration, then exit
25461 -q, --quiet, --silent
25462 do not print progress messages
25463 -d, --debug don't remove temporary files
25464 --recheck update $as_me by reconfiguring in the same conditions
25465 --file=FILE[:TEMPLATE]
25466 instantiate the configuration file FILE
25467 --header=FILE[:TEMPLATE]
25468 instantiate the configuration header FILE
25469
25470 Configuration files:
25471 $config_files
25472
25473 Configuration headers:
25474 $config_headers
25475
25476 Configuration commands:
25477 $config_commands
25478
25479 Report bugs to the package provider."
25480
25481 _ACEOF
25482 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25483 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25484 ac_cs_version="\\
25485 enchant config.status 2.2.8
25486 configured by $0, generated by GNU Autoconf 2.69,
25487 with options \\"\$ac_cs_config\\"
25488
25489 Copyright (C) 2012 Free Software Foundation, Inc.
25490 This config.status script is free software; the Free Software Foundation
25491 gives unlimited permission to copy, distribute and modify it."
25492
25493 ac_pwd='$ac_pwd'
25494 srcdir='$srcdir'
25495 INSTALL='$INSTALL'
25496 MKDIR_P='$MKDIR_P'
25497 AWK='$AWK'
25498 test -n "\$AWK" || AWK=awk
25499 _ACEOF
25500
25501 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25502 # The default lists apply if the user does not specify any file.
25503 ac_need_defaults=:
25504 while test $# != 0
25505 do
25506 case $1 in
25507 --*=?*)
25508 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25509 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25510 ac_shift=:
25511 ;;
25512 --*=)
25513 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25514 ac_optarg=
25515 ac_shift=:
25516 ;;
25517 *)
25518 ac_option=$1
25519 ac_optarg=$2
25520 ac_shift=shift
25521 ;;
25522 esac
25523
25524 case $ac_option in
25525 # Handling of the options.
25526 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25527 ac_cs_recheck=: ;;
25528 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25529 $as_echo "$ac_cs_version"; exit ;;
25530 --config | --confi | --conf | --con | --co | --c )
25531 $as_echo "$ac_cs_config"; exit ;;
25532 --debug | --debu | --deb | --de | --d | -d )
25533 debug=: ;;
25534 --file | --fil | --fi | --f )
25535 $ac_shift
25536 case $ac_optarg in
25537 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25538 '') as_fn_error $? "missing file argument" ;;
25539 esac
25540 as_fn_append CONFIG_FILES " '$ac_optarg'"
25541 ac_need_defaults=false;;
25542 --header | --heade | --head | --hea )
25543 $ac_shift
25544 case $ac_optarg in
25545 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25546 esac
25547 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25548 ac_need_defaults=false;;
25549 --he | --h)
25550 # Conflict between --help and --header
25551 as_fn_error $? "ambiguous option: \`$1'
25552 Try \`$0 --help' for more information.";;
25553 --help | --hel | -h )
25554 $as_echo "$ac_cs_usage"; exit ;;
25555 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25556 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25557 ac_cs_silent=: ;;
25558
25559 # This is an error.
25560 -*) as_fn_error $? "unrecognized option: \`$1'
25561 Try \`$0 --help' for more information." ;;
25562
25563 *) as_fn_append ac_config_targets " $1"
25564 ac_need_defaults=false ;;
25565
25566 esac
25567 shift
25568 done
25569
25570 ac_configure_extra_args=
25571
25572 if $ac_cs_silent; then
25573 exec 6>/dev/null
25574 ac_configure_extra_args="$ac_configure_extra_args --silent"
25575 fi
25576
25577 _ACEOF
25578 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25579 if \$ac_cs_recheck; then
25580 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25581 shift
25582 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25583 CONFIG_SHELL='$SHELL'
25584 export CONFIG_SHELL
25585 exec "\$@"
25586 fi
25587
25588 _ACEOF
25589 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25590 exec 5>>config.log
25591 {
25592 echo
25593 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25594 ## Running $as_me. ##
25595 _ASBOX
25596 $as_echo "$ac_log"
25597 } >&5
25598
25599 _ACEOF
25600 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25601 #
25602 # INIT-COMMANDS
25603 #
25604 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25605
25606
25607 # The HP-UX ksh and POSIX shell print the target directory to stdout
25608 # if CDPATH is set.
25609 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25610
25611 sed_quote_subst='$sed_quote_subst'
25612 double_quote_subst='$double_quote_subst'
25613 delay_variable_subst='$delay_variable_subst'
25614 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
25615 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
25616 AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
25617 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
25618 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
25619 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
25620 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
25621 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
25622 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
25623 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
25624 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
25625 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
25626 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
25627 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
25628 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
25629 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
25630 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
25631 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
25632 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
25633 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
25634 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
25635 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
25636 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
25637 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
25638 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
25639 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
25640 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
25641 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
25642 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
25643 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
25644 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
25645 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
25646 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
25647 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
25648 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
25649 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
25650 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
25651 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
25652 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
25653 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
25654 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
25655 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
25656 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
25657 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
25658 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
25659 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
25660 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
25661 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25662 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25663 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
25664 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
25665 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
25666 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
25667 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
25668 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
25669 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
25670 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
25671 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
25672 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
25673 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
25674 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
25675 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
25676 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
25677 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
25678 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
25679 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
25680 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
25681 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
25682 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
25683 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
25684 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
25685 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
25686 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
25687 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
25688 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
25689 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
25690 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
25691 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
25692 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
25693 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
25694 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25695 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
25696 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
25697 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
25698 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
25699 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
25700 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
25701 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25702 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
25703 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25704 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
25705 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25706 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
25707 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
25708 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
25709 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
25710 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
25711 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
25712 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
25713 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
25714 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
25715 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
25716 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
25717 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
25718 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
25719 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
25720 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
25721 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
25722 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
25723 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
25724 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
25725 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
25726 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
25727 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
25728 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
25729 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
25730 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
25731 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
25732 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
25733 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
25734 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
25735 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
25736 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25737 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25738 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
25739 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
25740 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
25741 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
25742 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
25743 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
25744 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
25745 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
25746 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
25747 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
25748 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
25749 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
25750 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
25751 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
25752 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
25753 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
25754 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
25755 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
25756 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
25757 LD_RC='`$ECHO "$LD_RC" | $SED "$delay_single_quote_subst"`'
25758 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
25759 reload_flag_RC='`$ECHO "$reload_flag_RC" | $SED "$delay_single_quote_subst"`'
25760 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25761 reload_cmds_RC='`$ECHO "$reload_cmds_RC" | $SED "$delay_single_quote_subst"`'
25762 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25763 old_archive_cmds_RC='`$ECHO "$old_archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
25764 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
25765 compiler_RC='`$ECHO "$compiler_RC" | $SED "$delay_single_quote_subst"`'
25766 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
25767 GCC_RC='`$ECHO "$GCC_RC" | $SED "$delay_single_quote_subst"`'
25768 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
25769 lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`'
25770 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
25771 lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`'
25772 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
25773 lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`'
25774 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
25775 lt_prog_compiler_static_RC='`$ECHO "$lt_prog_compiler_static_RC" | $SED "$delay_single_quote_subst"`'
25776 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
25777 lt_cv_prog_compiler_c_o_RC='`$ECHO "$lt_cv_prog_compiler_c_o_RC" | $SED "$delay_single_quote_subst"`'
25778 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
25779 archive_cmds_need_lc_RC='`$ECHO "$archive_cmds_need_lc_RC" | $SED "$delay_single_quote_subst"`'
25780 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
25781 enable_shared_with_static_runtimes_RC='`$ECHO "$enable_shared_with_static_runtimes_RC" | $SED "$delay_single_quote_subst"`'
25782 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
25783 export_dynamic_flag_spec_RC='`$ECHO "$export_dynamic_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
25784 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
25785 whole_archive_flag_spec_RC='`$ECHO "$whole_archive_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
25786 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
25787 compiler_needs_object_RC='`$ECHO "$compiler_needs_object_RC" | $SED "$delay_single_quote_subst"`'
25788 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25789 old_archive_from_new_cmds_RC='`$ECHO "$old_archive_from_new_cmds_RC" | $SED "$delay_single_quote_subst"`'
25790 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25791 old_archive_from_expsyms_cmds_RC='`$ECHO "$old_archive_from_expsyms_cmds_RC" | $SED "$delay_single_quote_subst"`'
25792 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25793 archive_cmds_RC='`$ECHO "$archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
25794 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25795 archive_expsym_cmds_RC='`$ECHO "$archive_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
25796 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25797 module_cmds_RC='`$ECHO "$module_cmds_RC" | $SED "$delay_single_quote_subst"`'
25798 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25799 module_expsym_cmds_RC='`$ECHO "$module_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
25800 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
25801 with_gnu_ld_RC='`$ECHO "$with_gnu_ld_RC" | $SED "$delay_single_quote_subst"`'
25802 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
25803 allow_undefined_flag_RC='`$ECHO "$allow_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
25804 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
25805 no_undefined_flag_RC='`$ECHO "$no_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
25806 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
25807 hardcode_libdir_flag_spec_RC='`$ECHO "$hardcode_libdir_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
25808 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
25809 hardcode_libdir_separator_RC='`$ECHO "$hardcode_libdir_separator_RC" | $SED "$delay_single_quote_subst"`'
25810 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
25811 hardcode_direct_RC='`$ECHO "$hardcode_direct_RC" | $SED "$delay_single_quote_subst"`'
25812 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
25813 hardcode_direct_absolute_RC='`$ECHO "$hardcode_direct_absolute_RC" | $SED "$delay_single_quote_subst"`'
25814 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
25815 hardcode_minus_L_RC='`$ECHO "$hardcode_minus_L_RC" | $SED "$delay_single_quote_subst"`'
25816 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
25817 hardcode_shlibpath_var_RC='`$ECHO "$hardcode_shlibpath_var_RC" | $SED "$delay_single_quote_subst"`'
25818 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
25819 hardcode_automatic_RC='`$ECHO "$hardcode_automatic_RC" | $SED "$delay_single_quote_subst"`'
25820 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
25821 inherit_rpath_RC='`$ECHO "$inherit_rpath_RC" | $SED "$delay_single_quote_subst"`'
25822 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
25823 link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`'
25824 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
25825 always_export_symbols_RC='`$ECHO "$always_export_symbols_RC" | $SED "$delay_single_quote_subst"`'
25826 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25827 export_symbols_cmds_RC='`$ECHO "$export_symbols_cmds_RC" | $SED "$delay_single_quote_subst"`'
25828 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
25829 exclude_expsyms_RC='`$ECHO "$exclude_expsyms_RC" | $SED "$delay_single_quote_subst"`'
25830 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
25831 include_expsyms_RC='`$ECHO "$include_expsyms_RC" | $SED "$delay_single_quote_subst"`'
25832 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25833 prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`'
25834 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
25835 postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`'
25836 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
25837 file_list_spec_RC='`$ECHO "$file_list_spec_RC" | $SED "$delay_single_quote_subst"`'
25838 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
25839 hardcode_action_RC='`$ECHO "$hardcode_action_RC" | $SED "$delay_single_quote_subst"`'
25840 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
25841 compiler_lib_search_dirs_RC='`$ECHO "$compiler_lib_search_dirs_RC" | $SED "$delay_single_quote_subst"`'
25842 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
25843 predep_objects_RC='`$ECHO "$predep_objects_RC" | $SED "$delay_single_quote_subst"`'
25844 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
25845 postdep_objects_RC='`$ECHO "$postdep_objects_RC" | $SED "$delay_single_quote_subst"`'
25846 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
25847 predeps_RC='`$ECHO "$predeps_RC" | $SED "$delay_single_quote_subst"`'
25848 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
25849 postdeps_RC='`$ECHO "$postdeps_RC" | $SED "$delay_single_quote_subst"`'
25850 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
25851 compiler_lib_search_path_RC='`$ECHO "$compiler_lib_search_path_RC" | $SED "$delay_single_quote_subst"`'
25852
25853 LTCC='$LTCC'
25854 LTCFLAGS='$LTCFLAGS'
25855 compiler='$compiler_DEFAULT'
25856
25857 # A function that is used when there is no print builtin or printf.
25858 func_fallback_echo ()
25859 {
25860 eval 'cat <<_LTECHO_EOF
25861 \$1
25862 _LTECHO_EOF'
25863 }
25864
25865 # Quote evaled strings.
25866 for var in AS \
25867 DLLTOOL \
25868 OBJDUMP \
25869 SHELL \
25870 ECHO \
25871 PATH_SEPARATOR \
25872 SED \
25873 GREP \
25874 EGREP \
25875 FGREP \
25876 LD \
25877 NM \
25878 LN_S \
25879 lt_SP2NL \
25880 lt_NL2SP \
25881 reload_flag \
25882 deplibs_check_method \
25883 file_magic_cmd \
25884 file_magic_glob \
25885 want_nocaseglob \
25886 sharedlib_from_linklib_cmd \
25887 AR \
25888 AR_FLAGS \
25889 archiver_list_spec \
25890 STRIP \
25891 RANLIB \
25892 CC \
25893 CFLAGS \
25894 compiler \
25895 lt_cv_sys_global_symbol_pipe \
25896 lt_cv_sys_global_symbol_to_cdecl \
25897 lt_cv_sys_global_symbol_to_import \
25898 lt_cv_sys_global_symbol_to_c_name_address \
25899 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
25900 lt_cv_nm_interface \
25901 nm_file_list_spec \
25902 lt_cv_truncate_bin \
25903 lt_prog_compiler_no_builtin_flag \
25904 lt_prog_compiler_pic \
25905 lt_prog_compiler_wl \
25906 lt_prog_compiler_static \
25907 lt_cv_prog_compiler_c_o \
25908 need_locks \
25909 MANIFEST_TOOL \
25910 DSYMUTIL \
25911 NMEDIT \
25912 LIPO \
25913 OTOOL \
25914 OTOOL64 \
25915 shrext_cmds \
25916 export_dynamic_flag_spec \
25917 whole_archive_flag_spec \
25918 compiler_needs_object \
25919 with_gnu_ld \
25920 allow_undefined_flag \
25921 no_undefined_flag \
25922 hardcode_libdir_flag_spec \
25923 hardcode_libdir_separator \
25924 exclude_expsyms \
25925 include_expsyms \
25926 file_list_spec \
25927 variables_saved_for_relink \
25928 libname_spec \
25929 library_names_spec \
25930 soname_spec \
25931 install_override_mode \
25932 finish_eval \
25933 old_striplib \
25934 striplib \
25935 compiler_lib_search_dirs \
25936 predep_objects \
25937 postdep_objects \
25938 predeps \
25939 postdeps \
25940 compiler_lib_search_path \
25941 LD_CXX \
25942 LD_RC \
25943 reload_flag_CXX \
25944 reload_flag_RC \
25945 compiler_CXX \
25946 compiler_RC \
25947 lt_prog_compiler_no_builtin_flag_CXX \
25948 lt_prog_compiler_no_builtin_flag_RC \
25949 lt_prog_compiler_pic_CXX \
25950 lt_prog_compiler_pic_RC \
25951 lt_prog_compiler_wl_CXX \
25952 lt_prog_compiler_wl_RC \
25953 lt_prog_compiler_static_CXX \
25954 lt_prog_compiler_static_RC \
25955 lt_cv_prog_compiler_c_o_CXX \
25956 lt_cv_prog_compiler_c_o_RC \
25957 export_dynamic_flag_spec_CXX \
25958 export_dynamic_flag_spec_RC \
25959 whole_archive_flag_spec_CXX \
25960 whole_archive_flag_spec_RC \
25961 compiler_needs_object_CXX \
25962 compiler_needs_object_RC \
25963 with_gnu_ld_CXX \
25964 with_gnu_ld_RC \
25965 allow_undefined_flag_CXX \
25966 allow_undefined_flag_RC \
25967 no_undefined_flag_CXX \
25968 no_undefined_flag_RC \
25969 hardcode_libdir_flag_spec_CXX \
25970 hardcode_libdir_flag_spec_RC \
25971 hardcode_libdir_separator_CXX \
25972 hardcode_libdir_separator_RC \
25973 exclude_expsyms_CXX \
25974 exclude_expsyms_RC \
25975 include_expsyms_CXX \
25976 include_expsyms_RC \
25977 file_list_spec_CXX \
25978 file_list_spec_RC \
25979 compiler_lib_search_dirs_CXX \
25980 compiler_lib_search_dirs_RC \
25981 predep_objects_CXX \
25982 predep_objects_RC \
25983 postdep_objects_CXX \
25984 postdep_objects_RC \
25985 predeps_CXX \
25986 predeps_RC \
25987 postdeps_CXX \
25988 postdeps_RC \
25989 compiler_lib_search_path_CXX \
25990 compiler_lib_search_path_RC; do
25991 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
25992 *[\\\\\\\`\\"\\\$]*)
25993 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
25994 ;;
25995 *)
25996 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
25997 ;;
25998 esac
25999 done
26000
26001 # Double-quote double-evaled strings.
26002 for var in reload_cmds \
26003 old_postinstall_cmds \
26004 old_postuninstall_cmds \
26005 old_archive_cmds \
26006 extract_expsyms_cmds \
26007 old_archive_from_new_cmds \
26008 old_archive_from_expsyms_cmds \
26009 archive_cmds \
26010 archive_expsym_cmds \
26011 module_cmds \
26012 module_expsym_cmds \
26013 export_symbols_cmds \
26014 prelink_cmds \
26015 postlink_cmds \
26016 postinstall_cmds \
26017 postuninstall_cmds \
26018 finish_cmds \
26019 sys_lib_search_path_spec \
26020 configure_time_dlsearch_path \
26021 configure_time_lt_sys_library_path \
26022 reload_cmds_CXX \
26023 reload_cmds_RC \
26024 old_archive_cmds_CXX \
26025 old_archive_cmds_RC \
26026 old_archive_from_new_cmds_CXX \
26027 old_archive_from_new_cmds_RC \
26028 old_archive_from_expsyms_cmds_CXX \
26029 old_archive_from_expsyms_cmds_RC \
26030 archive_cmds_CXX \
26031 archive_cmds_RC \
26032 archive_expsym_cmds_CXX \
26033 archive_expsym_cmds_RC \
26034 module_cmds_CXX \
26035 module_cmds_RC \
26036 module_expsym_cmds_CXX \
26037 module_expsym_cmds_RC \
26038 export_symbols_cmds_CXX \
26039 export_symbols_cmds_RC \
26040 prelink_cmds_CXX \
26041 prelink_cmds_RC \
26042 postlink_cmds_CXX \
26043 postlink_cmds_RC; do
26044 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
26045 *[\\\\\\\`\\"\\\$]*)
26046 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
26047 ;;
26048 *)
26049 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
26050 ;;
26051 esac
26052 done
26053
26054 ac_aux_dir='$ac_aux_dir'
26055
26056 # See if we are running on zsh, and set the options that allow our
26057 # commands through without removal of \ escapes INIT.
26058 if test -n "\${ZSH_VERSION+set}"; then
26059 setopt NO_GLOB_SUBST
26060 fi
26061
26062
26063 PACKAGE='$PACKAGE'
26064 VERSION='$VERSION'
26065 RM='$RM'
26066 ofile='$ofile'
26067
26068
26069
26070
26071
26072
26073
26074 ENCHANT_MAJOR_VERSION="$ENCHANT_MAJOR_VERSION"
26075
26076 _ACEOF
26077
26078 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26079
26080 # Handling of arguments.
26081 for ac_config_target in $ac_config_targets
26082 do
26083 case $ac_config_target in
26084 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
26085 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
26086 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
26087 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26088 "enchant-$ENCHANT_MAJOR_VERSION.pc") CONFIG_FILES="$CONFIG_FILES enchant-$ENCHANT_MAJOR_VERSION.pc:enchant.pc.in" ;;
26089 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
26090 "src/libenchant.rc") CONFIG_FILES="$CONFIG_FILES src/libenchant.rc" ;;
26091 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
26092 "src/enchant.1") CONFIG_FILES="$CONFIG_FILES src/enchant.1" ;;
26093 "src/enchant-lsmod.1") CONFIG_FILES="$CONFIG_FILES src/enchant-lsmod.1" ;;
26094 "providers/Makefile") CONFIG_FILES="$CONFIG_FILES providers/Makefile" ;;
26095 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
26096 "tests/enchant_providers/Makefile") CONFIG_FILES="$CONFIG_FILES tests/enchant_providers/Makefile" ;;
26097
26098 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
26099 esac
26100 done
26101
26102
26103 # If the user did not use the arguments to specify the items to instantiate,
26104 # then the envvar interface is used. Set only those that are not.
26105 # We use the long form for the default assignment because of an extremely
26106 # bizarre bug on SunOS 4.1.3.
26107 if $ac_need_defaults; then
26108 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26109 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26110 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26111 fi
26112
26113 # Have a temporary directory for convenience. Make it in the build tree
26114 # simply because there is no reason against having it here, and in addition,
26115 # creating and moving files from /tmp can sometimes cause problems.
26116 # Hook for its removal unless debugging.
26117 # Note that there is a small window in which the directory will not be cleaned:
26118 # after its creation but before its name has been assigned to `$tmp'.
26119 $debug ||
26120 {
26121 tmp= ac_tmp=
26122 trap 'exit_status=$?
26123 : "${ac_tmp:=$tmp}"
26124 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
26125 ' 0
26126 trap 'as_fn_exit 1' 1 2 13 15
26127 }
26128 # Create a (secure) tmp directory for tmp files.
26129
26130 {
26131 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
26132 test -d "$tmp"
26133 } ||
26134 {
26135 tmp=./conf$$-$RANDOM
26136 (umask 077 && mkdir "$tmp")
26137 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
26138 ac_tmp=$tmp
26139
26140 # Set up the scripts for CONFIG_FILES section.
26141 # No need to generate them if there are no CONFIG_FILES.
26142 # This happens for instance with `./config.status config.h'.
26143 if test -n "$CONFIG_FILES"; then
26144
26145
26146 ac_cr=`echo X | tr X '\015'`
26147 # On cygwin, bash can eat \r inside `` if the user requested igncr.
26148 # But we know of no other shell where ac_cr would be empty at this
26149 # point, so we can use a bashism as a fallback.
26150 if test "x$ac_cr" = x; then
26151 eval ac_cr=\$\'\\r\'
26152 fi
26153 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26154 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26155 ac_cs_awk_cr='\\r'
26156 else
26157 ac_cs_awk_cr=$ac_cr
26158 fi
26159
26160 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
26161 _ACEOF
26162
26163
26164 {
26165 echo "cat >conf$$subs.awk <<_ACEOF" &&
26166 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26167 echo "_ACEOF"
26168 } >conf$$subs.sh ||
26169 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26170 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
26171 ac_delim='%!_!# '
26172 for ac_last_try in false false false false false :; do
26173 . ./conf$$subs.sh ||
26174 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26175
26176 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26177 if test $ac_delim_n = $ac_delim_num; then
26178 break
26179 elif $ac_last_try; then
26180 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26181 else
26182 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26183 fi
26184 done
26185 rm -f conf$$subs.sh
26186
26187 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26188 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
26189 _ACEOF
26190 sed -n '
26191 h
26192 s/^/S["/; s/!.*/"]=/
26193 p
26194 g
26195 s/^[^!]*!//
26196 :repl
26197 t repl
26198 s/'"$ac_delim"'$//
26199 t delim
26200 :nl
26201 h
26202 s/\(.\{148\}\)..*/\1/
26203 t more1
26204 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26205 p
26206 n
26207 b repl
26208 :more1
26209 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26210 p
26211 g
26212 s/.\{148\}//
26213 t nl
26214 :delim
26215 h
26216 s/\(.\{148\}\)..*/\1/
26217 t more2
26218 s/["\\]/\\&/g; s/^/"/; s/$/"/
26219 p
26220 b
26221 :more2
26222 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26223 p
26224 g
26225 s/.\{148\}//
26226 t delim
26227 ' <conf$$subs.awk | sed '
26228 /^[^""]/{
26229 N
26230 s/\n//
26231 }
26232 ' >>$CONFIG_STATUS || ac_write_fail=1
26233 rm -f conf$$subs.awk
26234 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26235 _ACAWK
26236 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
26237 for (key in S) S_is_set[key] = 1
26238 FS = ""
26239
26240 }
26241 {
26242 line = $ 0
26243 nfields = split(line, field, "@")
26244 substed = 0
26245 len = length(field[1])
26246 for (i = 2; i < nfields; i++) {
26247 key = field[i]
26248 keylen = length(key)
26249 if (S_is_set[key]) {
26250 value = S[key]
26251 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26252 len += length(value) + length(field[++i])
26253 substed = 1
26254 } else
26255 len += 1 + keylen
26256 }
26257
26258 print line
26259 }
26260
26261 _ACAWK
26262 _ACEOF
26263 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26264 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26265 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26266 else
26267 cat
26268 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
26269 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
26270 _ACEOF
26271
26272 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
26273 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
26274 # trailing colons and then remove the whole line if VPATH becomes empty
26275 # (actually we leave an empty line to preserve line numbers).
26276 if test "x$srcdir" = x.; then
26277 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
26278 h
26279 s///
26280 s/^/:/
26281 s/[ ]*$/:/
26282 s/:\$(srcdir):/:/g
26283 s/:\${srcdir}:/:/g
26284 s/:@srcdir@:/:/g
26285 s/^:*//
26286 s/:*$//
26287 x
26288 s/\(=[ ]*\).*/\1/
26289 G
26290 s/\n//
26291 s/^[^=]*=[ ]*$//
26292 }'
26293 fi
26294
26295 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26296 fi # test -n "$CONFIG_FILES"
26297
26298 # Set up the scripts for CONFIG_HEADERS section.
26299 # No need to generate them if there are no CONFIG_HEADERS.
26300 # This happens for instance with `./config.status Makefile'.
26301 if test -n "$CONFIG_HEADERS"; then
26302 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
26303 BEGIN {
26304 _ACEOF
26305
26306 # Transform confdefs.h into an awk script `defines.awk', embedded as
26307 # here-document in config.status, that substitutes the proper values into
26308 # config.h.in to produce config.h.
26309
26310 # Create a delimiter string that does not exist in confdefs.h, to ease
26311 # handling of long lines.
26312 ac_delim='%!_!# '
26313 for ac_last_try in false false :; do
26314 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
26315 if test -z "$ac_tt"; then
26316 break
26317 elif $ac_last_try; then
26318 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
26319 else
26320 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26321 fi
26322 done
26323
26324 # For the awk script, D is an array of macro values keyed by name,
26325 # likewise P contains macro parameters if any. Preserve backslash
26326 # newline sequences.
26327
26328 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26329 sed -n '
26330 s/.\{148\}/&'"$ac_delim"'/g
26331 t rset
26332 :rset
26333 s/^[ ]*#[ ]*define[ ][ ]*/ /
26334 t def
26335 d
26336 :def
26337 s/\\$//
26338 t bsnl
26339 s/["\\]/\\&/g
26340 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26341 D["\1"]=" \3"/p
26342 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26343 d
26344 :bsnl
26345 s/["\\]/\\&/g
26346 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26347 D["\1"]=" \3\\\\\\n"\\/p
26348 t cont
26349 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26350 t cont
26351 d
26352 :cont
26353 n
26354 s/.\{148\}/&'"$ac_delim"'/g
26355 t clear
26356 :clear
26357 s/\\$//
26358 t bsnlc
26359 s/["\\]/\\&/g; s/^/"/; s/$/"/p
26360 d
26361 :bsnlc
26362 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26363 b cont
26364 ' <confdefs.h | sed '
26365 s/'"$ac_delim"'/"\\\
26366 "/g' >>$CONFIG_STATUS || ac_write_fail=1
26367
26368 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26369 for (key in D) D_is_set[key] = 1
26370 FS = ""
26371 }
26372 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26373 line = \$ 0
26374 split(line, arg, " ")
26375 if (arg[1] == "#") {
26376 defundef = arg[2]
26377 mac1 = arg[3]
26378 } else {
26379 defundef = substr(arg[1], 2)
26380 mac1 = arg[2]
26381 }
26382 split(mac1, mac2, "(") #)
26383 macro = mac2[1]
26384 prefix = substr(line, 1, index(line, defundef) - 1)
26385 if (D_is_set[macro]) {
26386 # Preserve the white space surrounding the "#".
26387 print prefix "define", macro P[macro] D[macro]
26388 next
26389 } else {
26390 # Replace #undef with comments. This is necessary, for example,
26391 # in the case of _POSIX_SOURCE, which is predefined and required
26392 # on some systems where configure will not decide to define it.
26393 if (defundef == "undef") {
26394 print "/*", prefix defundef, macro, "*/"
26395 next
26396 }
26397 }
26398 }
26399 { print }
26400 _ACAWK
26401 _ACEOF
26402 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26403 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
26404 fi # test -n "$CONFIG_HEADERS"
26405
26406
26407 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
26408 shift
26409 for ac_tag
26410 do
26411 case $ac_tag in
26412 :[FHLC]) ac_mode=$ac_tag; continue;;
26413 esac
26414 case $ac_mode$ac_tag in
26415 :[FHL]*:*);;
26416 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
26417 :[FH]-) ac_tag=-:-;;
26418 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26419 esac
26420 ac_save_IFS=$IFS
26421 IFS=:
26422 set x $ac_tag
26423 IFS=$ac_save_IFS
26424 shift
26425 ac_file=$1
26426 shift
26427
26428 case $ac_mode in
26429 :L) ac_source=$1;;
26430 :[FH])
26431 ac_file_inputs=
26432 for ac_f
26433 do
26434 case $ac_f in
26435 -) ac_f="$ac_tmp/stdin";;
26436 *) # Look for the file first in the build tree, then in the source tree
26437 # (if the path is not absolute). The absolute path cannot be DOS-style,
26438 # because $ac_f cannot contain `:'.
26439 test -f "$ac_f" ||
26440 case $ac_f in
26441 [\\/$]*) false;;
26442 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26443 esac ||
26444 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26445 esac
26446 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26447 as_fn_append ac_file_inputs " '$ac_f'"
26448 done
26449
26450 # Let's still pretend it is `configure' which instantiates (i.e., don't
26451 # use $as_me), people would be surprised to read:
26452 # /* config.h. Generated by config.status. */
26453 configure_input='Generated from '`
26454 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26455 `' by configure.'
26456 if test x"$ac_file" != x-; then
26457 configure_input="$ac_file. $configure_input"
26458 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26459 $as_echo "$as_me: creating $ac_file" >&6;}
26460 fi
26461 # Neutralize special characters interpreted by sed in replacement strings.
26462 case $configure_input in #(
26463 *\&* | *\|* | *\\* )
26464 ac_sed_conf_input=`$as_echo "$configure_input" |
26465 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26466 *) ac_sed_conf_input=$configure_input;;
26467 esac
26468
26469 case $ac_tag in
26470 *:-:* | *:-) cat >"$ac_tmp/stdin" \
26471 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
26472 esac
26473 ;;
26474 esac
26475
26476 ac_dir=`$as_dirname -- "$ac_file" ||
26477 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26478 X"$ac_file" : 'X\(//\)[^/]' \| \
26479 X"$ac_file" : 'X\(//\)$' \| \
26480 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26481 $as_echo X"$ac_file" |
26482 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26483 s//\1/
26484 q
26485 }
26486 /^X\(\/\/\)[^/].*/{
26487 s//\1/
26488 q
26489 }
26490 /^X\(\/\/\)$/{
26491 s//\1/
26492 q
26493 }
26494 /^X\(\/\).*/{
26495 s//\1/
26496 q
26497 }
26498 s/.*/./; q'`
26499 as_dir="$ac_dir"; as_fn_mkdir_p
26500 ac_builddir=.
26501
26502 case "$ac_dir" in
26503 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26504 *)
26505 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26506 # A ".." for each directory in $ac_dir_suffix.
26507 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26508 case $ac_top_builddir_sub in
26509 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26510 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26511 esac ;;
26512 esac
26513 ac_abs_top_builddir=$ac_pwd
26514 ac_abs_builddir=$ac_pwd$ac_dir_suffix
26515 # for backward compatibility:
26516 ac_top_builddir=$ac_top_build_prefix
26517
26518 case $srcdir in
26519 .) # We are building in place.
26520 ac_srcdir=.
26521 ac_top_srcdir=$ac_top_builddir_sub
26522 ac_abs_top_srcdir=$ac_pwd ;;
26523 [\\/]* | ?:[\\/]* ) # Absolute name.
26524 ac_srcdir=$srcdir$ac_dir_suffix;
26525 ac_top_srcdir=$srcdir
26526 ac_abs_top_srcdir=$srcdir ;;
26527 *) # Relative name.
26528 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26529 ac_top_srcdir=$ac_top_build_prefix$srcdir
26530 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26531 esac
26532 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26533
26534
26535 case $ac_mode in
26536 :F)
26537 #
26538 # CONFIG_FILE
26539 #
26540
26541 case $INSTALL in
26542 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26543 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
26544 esac
26545 ac_MKDIR_P=$MKDIR_P
26546 case $MKDIR_P in
26547 [\\/$]* | ?:[\\/]* ) ;;
26548 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
26549 esac
26550 _ACEOF
26551
26552 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26553 # If the template does not know about datarootdir, expand it.
26554 # FIXME: This hack should be removed a few years after 2.60.
26555 ac_datarootdir_hack=; ac_datarootdir_seen=
26556 ac_sed_dataroot='
26557 /datarootdir/ {
26558 p
26559 q
26560 }
26561 /@datadir@/p
26562 /@docdir@/p
26563 /@infodir@/p
26564 /@localedir@/p
26565 /@mandir@/p'
26566 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26567 *datarootdir*) ac_datarootdir_seen=yes;;
26568 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26569 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26570 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26571 _ACEOF
26572 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26573 ac_datarootdir_hack='
26574 s&@datadir@&$datadir&g
26575 s&@docdir@&$docdir&g
26576 s&@infodir@&$infodir&g
26577 s&@localedir@&$localedir&g
26578 s&@mandir@&$mandir&g
26579 s&\\\${datarootdir}&$datarootdir&g' ;;
26580 esac
26581 _ACEOF
26582
26583 # Neutralize VPATH when `$srcdir' = `.'.
26584 # Shell code in configure.ac might set extrasub.
26585 # FIXME: do we really want to maintain this feature?
26586 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26587 ac_sed_extra="$ac_vpsub
26588 $extrasub
26589 _ACEOF
26590 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26591 :t
26592 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26593 s|@configure_input@|$ac_sed_conf_input|;t t
26594 s&@top_builddir@&$ac_top_builddir_sub&;t t
26595 s&@top_build_prefix@&$ac_top_build_prefix&;t t
26596 s&@srcdir@&$ac_srcdir&;t t
26597 s&@abs_srcdir@&$ac_abs_srcdir&;t t
26598 s&@top_srcdir@&$ac_top_srcdir&;t t
26599 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26600 s&@builddir@&$ac_builddir&;t t
26601 s&@abs_builddir@&$ac_abs_builddir&;t t
26602 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26603 s&@INSTALL@&$ac_INSTALL&;t t
26604 s&@MKDIR_P@&$ac_MKDIR_P&;t t
26605 $ac_datarootdir_hack
26606 "
26607 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
26608 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26609
26610 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26611 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
26612 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
26613 "$ac_tmp/out"`; test -z "$ac_out"; } &&
26614 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26615 which seems to be undefined. Please make sure it is defined" >&5
26616 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26617 which seems to be undefined. Please make sure it is defined" >&2;}
26618
26619 rm -f "$ac_tmp/stdin"
26620 case $ac_file in
26621 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
26622 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
26623 esac \
26624 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26625 ;;
26626 :H)
26627 #
26628 # CONFIG_HEADER
26629 #
26630 if test x"$ac_file" != x-; then
26631 {
26632 $as_echo "/* $configure_input */" \
26633 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
26634 } >"$ac_tmp/config.h" \
26635 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26636 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
26637 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26638 $as_echo "$as_me: $ac_file is unchanged" >&6;}
26639 else
26640 rm -f "$ac_file"
26641 mv "$ac_tmp/config.h" "$ac_file" \
26642 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26643 fi
26644 else
26645 $as_echo "/* $configure_input */" \
26646 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
26647 || as_fn_error $? "could not create -" "$LINENO" 5
26648 fi
26649 # Compute "$ac_file"'s index in $config_headers.
26650 _am_arg="$ac_file"
26651 _am_stamp_count=1
26652 for _am_header in $config_headers :; do
26653 case $_am_header in
26654 $_am_arg | $_am_arg:* )
26655 break ;;
26656 * )
26657 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26658 esac
26659 done
26660 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
26661 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26662 X"$_am_arg" : 'X\(//\)[^/]' \| \
26663 X"$_am_arg" : 'X\(//\)$' \| \
26664 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
26665 $as_echo X"$_am_arg" |
26666 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26667 s//\1/
26668 q
26669 }
26670 /^X\(\/\/\)[^/].*/{
26671 s//\1/
26672 q
26673 }
26674 /^X\(\/\/\)$/{
26675 s//\1/
26676 q
26677 }
26678 /^X\(\/\).*/{
26679 s//\1/
26680 q
26681 }
26682 s/.*/./; q'`/stamp-h$_am_stamp_count
26683 ;;
26684
26685 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26686 $as_echo "$as_me: executing $ac_file commands" >&6;}
26687 ;;
26688 esac
26689
26690
26691 case $ac_file$ac_mode in
26692 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
26693 # Older Autoconf quotes --file arguments for eval, but not when files
26694 # are listed without --file. Let's play safe and only enable the eval
26695 # if we detect the quoting.
26696 case $CONFIG_FILES in
26697 *\'*) eval set x "$CONFIG_FILES" ;;
26698 *) set x $CONFIG_FILES ;;
26699 esac
26700 shift
26701 for mf
26702 do
26703 # Strip MF so we end up with the name of the file.
26704 mf=`echo "$mf" | sed -e 's/:.*$//'`
26705 # Check whether this is an Automake generated Makefile or not.
26706 # We used to match only the files named 'Makefile.in', but
26707 # some people rename them; so instead we look at the file content.
26708 # Grep'ing the first line is not enough: some people post-process
26709 # each Makefile.in and add a new line on top of each file to say so.
26710 # Grep'ing the whole file is not good either: AIX grep has a line
26711 # limit of 2048, but all sed's we know have understand at least 4000.
26712 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
26713 dirpart=`$as_dirname -- "$mf" ||
26714 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26715 X"$mf" : 'X\(//\)[^/]' \| \
26716 X"$mf" : 'X\(//\)$' \| \
26717 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26718 $as_echo X"$mf" |
26719 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26720 s//\1/
26721 q
26722 }
26723 /^X\(\/\/\)[^/].*/{
26724 s//\1/
26725 q
26726 }
26727 /^X\(\/\/\)$/{
26728 s//\1/
26729 q
26730 }
26731 /^X\(\/\).*/{
26732 s//\1/
26733 q
26734 }
26735 s/.*/./; q'`
26736 else
26737 continue
26738 fi
26739 # Extract the definition of DEPDIR, am__include, and am__quote
26740 # from the Makefile without running 'make'.
26741 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26742 test -z "$DEPDIR" && continue
26743 am__include=`sed -n 's/^am__include = //p' < "$mf"`
26744 test -z "$am__include" && continue
26745 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26746 # Find all dependency output files, they are included files with
26747 # $(DEPDIR) in their names. We invoke sed twice because it is the
26748 # simplest approach to changing $(DEPDIR) to its actual value in the
26749 # expansion.
26750 for file in `sed -n "
26751 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26752 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
26753 # Make sure the directory exists.
26754 test -f "$dirpart/$file" && continue
26755 fdir=`$as_dirname -- "$file" ||
26756 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26757 X"$file" : 'X\(//\)[^/]' \| \
26758 X"$file" : 'X\(//\)$' \| \
26759 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26760 $as_echo X"$file" |
26761 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26762 s//\1/
26763 q
26764 }
26765 /^X\(\/\/\)[^/].*/{
26766 s//\1/
26767 q
26768 }
26769 /^X\(\/\/\)$/{
26770 s//\1/
26771 q
26772 }
26773 /^X\(\/\).*/{
26774 s//\1/
26775 q
26776 }
26777 s/.*/./; q'`
26778 as_dir=$dirpart/$fdir; as_fn_mkdir_p
26779 # echo "creating $dirpart/$file"
26780 echo '# dummy' > "$dirpart/$file"
26781 done
26782 done
26783 }
26784 ;;
26785 "libtool":C)
26786
26787 # See if we are running on zsh, and set the options that allow our
26788 # commands through without removal of \ escapes.
26789 if test -n "${ZSH_VERSION+set}"; then
26790 setopt NO_GLOB_SUBST
26791 fi
26792
26793 cfgfile=${ofile}T
26794 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
26795 $RM "$cfgfile"
26796
26797 cat <<_LT_EOF >> "$cfgfile"
26798 #! $SHELL
26799 # Generated automatically by $as_me ($PACKAGE) $VERSION
26800 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
26801 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
26802
26803 # Provide generalized library-building support services.
26804 # Written by Gordon Matzigkeit, 1996
26805
26806 # Copyright (C) 2014 Free Software Foundation, Inc.
26807 # This is free software; see the source for copying conditions. There is NO
26808 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26809
26810 # GNU Libtool is free software; you can redistribute it and/or modify
26811 # it under the terms of the GNU General Public License as published by
26812 # the Free Software Foundation; either version 2 of of the License, or
26813 # (at your option) any later version.
26814 #
26815 # As a special exception to the GNU General Public License, if you
26816 # distribute this file as part of a program or library that is built
26817 # using GNU Libtool, you may include this file under the same
26818 # distribution terms that you use for the rest of that program.
26819 #
26820 # GNU Libtool is distributed in the hope that it will be useful, but
26821 # WITHOUT ANY WARRANTY; without even the implied warranty of
26822 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26823 # GNU General Public License for more details.
26824 #
26825 # You should have received a copy of the GNU General Public License
26826 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26827
26828
26829 # The names of the tagged configurations supported by this script.
26830 available_tags='CXX RC '
26831
26832 # Configured defaults for sys_lib_dlsearch_path munging.
26833 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
26834
26835 # ### BEGIN LIBTOOL CONFIG
26836
26837 # Which release of libtool.m4 was used?
26838 macro_version=$macro_version
26839 macro_revision=$macro_revision
26840
26841 # Assembler program.
26842 AS=$lt_AS
26843
26844 # DLL creation program.
26845 DLLTOOL=$lt_DLLTOOL
26846
26847 # Object dumper program.
26848 OBJDUMP=$lt_OBJDUMP
26849
26850 # Whether or not to build shared libraries.
26851 build_libtool_libs=$enable_shared
26852
26853 # Whether or not to build static libraries.
26854 build_old_libs=$enable_static
26855
26856 # What type of objects to build.
26857 pic_mode=$pic_mode
26858
26859 # Whether or not to optimize for fast installation.
26860 fast_install=$enable_fast_install
26861
26862 # Shared archive member basename,for filename based shared library versioning on AIX.
26863 shared_archive_member_spec=$shared_archive_member_spec
26864
26865 # Shell to use when invoking shell scripts.
26866 SHELL=$lt_SHELL
26867
26868 # An echo program that protects backslashes.
26869 ECHO=$lt_ECHO
26870
26871 # The PATH separator for the build system.
26872 PATH_SEPARATOR=$lt_PATH_SEPARATOR
26873
26874 # The host system.
26875 host_alias=$host_alias
26876 host=$host
26877 host_os=$host_os
26878
26879 # The build system.
26880 build_alias=$build_alias
26881 build=$build
26882 build_os=$build_os
26883
26884 # A sed program that does not truncate output.
26885 SED=$lt_SED
26886
26887 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
26888 Xsed="\$SED -e 1s/^X//"
26889
26890 # A grep program that handles long lines.
26891 GREP=$lt_GREP
26892
26893 # An ERE matcher.
26894 EGREP=$lt_EGREP
26895
26896 # A literal string matcher.
26897 FGREP=$lt_FGREP
26898
26899 # A BSD- or MS-compatible name lister.
26900 NM=$lt_NM
26901
26902 # Whether we need soft or hard links.
26903 LN_S=$lt_LN_S
26904
26905 # What is the maximum length of a command?
26906 max_cmd_len=$max_cmd_len
26907
26908 # Object file suffix (normally "o").
26909 objext=$ac_objext
26910
26911 # Executable file suffix (normally "").
26912 exeext=$exeext
26913
26914 # whether the shell understands "unset".
26915 lt_unset=$lt_unset
26916
26917 # turn spaces into newlines.
26918 SP2NL=$lt_lt_SP2NL
26919
26920 # turn newlines into spaces.
26921 NL2SP=$lt_lt_NL2SP
26922
26923 # convert \$build file names to \$host format.
26924 to_host_file_cmd=$lt_cv_to_host_file_cmd
26925
26926 # convert \$build files to toolchain format.
26927 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
26928
26929 # Method to check whether dependent libraries are shared objects.
26930 deplibs_check_method=$lt_deplibs_check_method
26931
26932 # Command to use when deplibs_check_method = "file_magic".
26933 file_magic_cmd=$lt_file_magic_cmd
26934
26935 # How to find potential files when deplibs_check_method = "file_magic".
26936 file_magic_glob=$lt_file_magic_glob
26937
26938 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
26939 want_nocaseglob=$lt_want_nocaseglob
26940
26941 # Command to associate shared and link libraries.
26942 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
26943
26944 # The archiver.
26945 AR=$lt_AR
26946
26947 # Flags to create an archive.
26948 AR_FLAGS=$lt_AR_FLAGS
26949
26950 # How to feed a file listing to the archiver.
26951 archiver_list_spec=$lt_archiver_list_spec
26952
26953 # A symbol stripping program.
26954 STRIP=$lt_STRIP
26955
26956 # Commands used to install an old-style archive.
26957 RANLIB=$lt_RANLIB
26958 old_postinstall_cmds=$lt_old_postinstall_cmds
26959 old_postuninstall_cmds=$lt_old_postuninstall_cmds
26960
26961 # Whether to use a lock for old archive extraction.
26962 lock_old_archive_extraction=$lock_old_archive_extraction
26963
26964 # A C compiler.
26965 LTCC=$lt_CC
26966
26967 # LTCC compiler flags.
26968 LTCFLAGS=$lt_CFLAGS
26969
26970 # Take the output of nm and produce a listing of raw symbols and C names.
26971 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
26972
26973 # Transform the output of nm in a proper C declaration.
26974 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
26975
26976 # Transform the output of nm into a list of symbols to manually relocate.
26977 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
26978
26979 # Transform the output of nm in a C name address pair.
26980 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
26981
26982 # Transform the output of nm in a C name address pair when lib prefix is needed.
26983 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
26984
26985 # The name lister interface.
26986 nm_interface=$lt_lt_cv_nm_interface
26987
26988 # Specify filename containing input files for \$NM.
26989 nm_file_list_spec=$lt_nm_file_list_spec
26990
26991 # The root where to search for dependent libraries,and where our libraries should be installed.
26992 lt_sysroot=$lt_sysroot
26993
26994 # Command to truncate a binary pipe.
26995 lt_truncate_bin=$lt_lt_cv_truncate_bin
26996
26997 # The name of the directory that contains temporary libtool files.
26998 objdir=$objdir
26999
27000 # Used to examine libraries when file_magic_cmd begins with "file".
27001 MAGIC_CMD=$MAGIC_CMD
27002
27003 # Must we lock files when doing compilation?
27004 need_locks=$lt_need_locks
27005
27006 # Manifest tool.
27007 MANIFEST_TOOL=$lt_MANIFEST_TOOL
27008
27009 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
27010 DSYMUTIL=$lt_DSYMUTIL
27011
27012 # Tool to change global to local symbols on Mac OS X.
27013 NMEDIT=$lt_NMEDIT
27014
27015 # Tool to manipulate fat objects and archives on Mac OS X.
27016 LIPO=$lt_LIPO
27017
27018 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
27019 OTOOL=$lt_OTOOL
27020
27021 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
27022 OTOOL64=$lt_OTOOL64
27023
27024 # Old archive suffix (normally "a").
27025 libext=$libext
27026
27027 # Shared library suffix (normally ".so").
27028 shrext_cmds=$lt_shrext_cmds
27029
27030 # The commands to extract the exported symbol list from a shared archive.
27031 extract_expsyms_cmds=$lt_extract_expsyms_cmds
27032
27033 # Variables whose values should be saved in libtool wrapper scripts and
27034 # restored at link time.
27035 variables_saved_for_relink=$lt_variables_saved_for_relink
27036
27037 # Do we need the "lib" prefix for modules?
27038 need_lib_prefix=$need_lib_prefix
27039
27040 # Do we need a version for libraries?
27041 need_version=$need_version
27042
27043 # Library versioning type.
27044 version_type=$version_type
27045
27046 # Shared library runtime path variable.
27047 runpath_var=$runpath_var
27048
27049 # Shared library path variable.
27050 shlibpath_var=$shlibpath_var
27051
27052 # Is shlibpath searched before the hard-coded library search path?
27053 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
27054
27055 # Format of library name prefix.
27056 libname_spec=$lt_libname_spec
27057
27058 # List of archive names. First name is the real one, the rest are links.
27059 # The last name is the one that the linker finds with -lNAME
27060 library_names_spec=$lt_library_names_spec
27061
27062 # The coded name of the library, if different from the real name.
27063 soname_spec=$lt_soname_spec
27064
27065 # Permission mode override for installation of shared libraries.
27066 install_override_mode=$lt_install_override_mode
27067
27068 # Command to use after installation of a shared archive.
27069 postinstall_cmds=$lt_postinstall_cmds
27070
27071 # Command to use after uninstallation of a shared archive.
27072 postuninstall_cmds=$lt_postuninstall_cmds
27073
27074 # Commands used to finish a libtool library installation in a directory.
27075 finish_cmds=$lt_finish_cmds
27076
27077 # As "finish_cmds", except a single script fragment to be evaled but
27078 # not shown.
27079 finish_eval=$lt_finish_eval
27080
27081 # Whether we should hardcode library paths into libraries.
27082 hardcode_into_libs=$hardcode_into_libs
27083
27084 # Compile-time system search path for libraries.
27085 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
27086
27087 # Detected run-time system search path for libraries.
27088 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
27089
27090 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
27091 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
27092
27093 # Whether dlopen is supported.
27094 dlopen_support=$enable_dlopen
27095
27096 # Whether dlopen of programs is supported.
27097 dlopen_self=$enable_dlopen_self
27098
27099 # Whether dlopen of statically linked programs is supported.
27100 dlopen_self_static=$enable_dlopen_self_static
27101
27102 # Commands to strip libraries.
27103 old_striplib=$lt_old_striplib
27104 striplib=$lt_striplib
27105
27106
27107 # The linker used to build libraries.
27108 LD=$lt_LD
27109
27110 # How to create reloadable object files.
27111 reload_flag=$lt_reload_flag
27112 reload_cmds=$lt_reload_cmds
27113
27114 # Commands used to build an old-style archive.
27115 old_archive_cmds=$lt_old_archive_cmds
27116
27117 # A language specific compiler.
27118 CC=$lt_compiler
27119
27120 # Is the compiler the GNU compiler?
27121 with_gcc=$GCC
27122
27123 # Compiler flag to turn off builtin functions.
27124 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
27125
27126 # Additional compiler flags for building library objects.
27127 pic_flag=$lt_lt_prog_compiler_pic
27128
27129 # How to pass a linker flag through the compiler.
27130 wl=$lt_lt_prog_compiler_wl
27131
27132 # Compiler flag to prevent dynamic linking.
27133 link_static_flag=$lt_lt_prog_compiler_static
27134
27135 # Does compiler simultaneously support -c and -o options?
27136 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
27137
27138 # Whether or not to add -lc for building shared libraries.
27139 build_libtool_need_lc=$archive_cmds_need_lc
27140
27141 # Whether or not to disallow shared libs when runtime libs are static.
27142 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
27143
27144 # Compiler flag to allow reflexive dlopens.
27145 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
27146
27147 # Compiler flag to generate shared objects directly from archives.
27148 whole_archive_flag_spec=$lt_whole_archive_flag_spec
27149
27150 # Whether the compiler copes with passing no objects directly.
27151 compiler_needs_object=$lt_compiler_needs_object
27152
27153 # Create an old-style archive from a shared archive.
27154 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
27155
27156 # Create a temporary old-style archive to link instead of a shared archive.
27157 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
27158
27159 # Commands used to build a shared archive.
27160 archive_cmds=$lt_archive_cmds
27161 archive_expsym_cmds=$lt_archive_expsym_cmds
27162
27163 # Commands used to build a loadable module if different from building
27164 # a shared archive.
27165 module_cmds=$lt_module_cmds
27166 module_expsym_cmds=$lt_module_expsym_cmds
27167
27168 # Whether we are building with GNU ld or not.
27169 with_gnu_ld=$lt_with_gnu_ld
27170
27171 # Flag that allows shared libraries with undefined symbols to be built.
27172 allow_undefined_flag=$lt_allow_undefined_flag
27173
27174 # Flag that enforces no undefined symbols.
27175 no_undefined_flag=$lt_no_undefined_flag
27176
27177 # Flag to hardcode \$libdir into a binary during linking.
27178 # This must work even if \$libdir does not exist
27179 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
27180
27181 # Whether we need a single "-rpath" flag with a separated argument.
27182 hardcode_libdir_separator=$lt_hardcode_libdir_separator
27183
27184 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27185 # DIR into the resulting binary.
27186 hardcode_direct=$hardcode_direct
27187
27188 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27189 # DIR into the resulting binary and the resulting library dependency is
27190 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
27191 # library is relocated.
27192 hardcode_direct_absolute=$hardcode_direct_absolute
27193
27194 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
27195 # into the resulting binary.
27196 hardcode_minus_L=$hardcode_minus_L
27197
27198 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
27199 # into the resulting binary.
27200 hardcode_shlibpath_var=$hardcode_shlibpath_var
27201
27202 # Set to "yes" if building a shared library automatically hardcodes DIR
27203 # into the library and all subsequent libraries and executables linked
27204 # against it.
27205 hardcode_automatic=$hardcode_automatic
27206
27207 # Set to yes if linker adds runtime paths of dependent libraries
27208 # to runtime path list.
27209 inherit_rpath=$inherit_rpath
27210
27211 # Whether libtool must link a program against all its dependency libraries.
27212 link_all_deplibs=$link_all_deplibs
27213
27214 # Set to "yes" if exported symbols are required.
27215 always_export_symbols=$always_export_symbols
27216
27217 # The commands to list exported symbols.
27218 export_symbols_cmds=$lt_export_symbols_cmds
27219
27220 # Symbols that should not be listed in the preloaded symbols.
27221 exclude_expsyms=$lt_exclude_expsyms
27222
27223 # Symbols that must always be exported.
27224 include_expsyms=$lt_include_expsyms
27225
27226 # Commands necessary for linking programs (against libraries) with templates.
27227 prelink_cmds=$lt_prelink_cmds
27228
27229 # Commands necessary for finishing linking programs.
27230 postlink_cmds=$lt_postlink_cmds
27231
27232 # Specify filename containing input files.
27233 file_list_spec=$lt_file_list_spec
27234
27235 # How to hardcode a shared library path into an executable.
27236 hardcode_action=$hardcode_action
27237
27238 # The directories searched by this compiler when creating a shared library.
27239 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
27240
27241 # Dependencies to place before and after the objects being linked to
27242 # create a shared library.
27243 predep_objects=$lt_predep_objects
27244 postdep_objects=$lt_postdep_objects
27245 predeps=$lt_predeps
27246 postdeps=$lt_postdeps
27247
27248 # The library search path used internally by the compiler when linking
27249 # a shared library.
27250 compiler_lib_search_path=$lt_compiler_lib_search_path
27251
27252 # ### END LIBTOOL CONFIG
27253
27254 _LT_EOF
27255
27256 cat <<'_LT_EOF' >> "$cfgfile"
27257
27258 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
27259
27260 # func_munge_path_list VARIABLE PATH
27261 # -----------------------------------
27262 # VARIABLE is name of variable containing _space_ separated list of
27263 # directories to be munged by the contents of PATH, which is string
27264 # having a format:
27265 # "DIR[:DIR]:"
27266 # string "DIR[ DIR]" will be prepended to VARIABLE
27267 # ":DIR[:DIR]"
27268 # string "DIR[ DIR]" will be appended to VARIABLE
27269 # "DIRP[:DIRP]::[DIRA:]DIRA"
27270 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
27271 # "DIRA[ DIRA]" will be appended to VARIABLE
27272 # "DIR[:DIR]"
27273 # VARIABLE will be replaced by "DIR[ DIR]"
27274 func_munge_path_list ()
27275 {
27276 case x$2 in
27277 x)
27278 ;;
27279 *:)
27280 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
27281 ;;
27282 x:*)
27283 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
27284 ;;
27285 *::*)
27286 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
27287 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
27288 ;;
27289 *)
27290 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
27291 ;;
27292 esac
27293 }
27294
27295
27296 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
27297 func_cc_basename ()
27298 {
27299 for cc_temp in $*""; do
27300 case $cc_temp in
27301 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
27302 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
27303 \-*) ;;
27304 *) break;;
27305 esac
27306 done
27307 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
27308 }
27309
27310
27311 # ### END FUNCTIONS SHARED WITH CONFIGURE
27312
27313 _LT_EOF
27314
27315 case $host_os in
27316 aix3*)
27317 cat <<\_LT_EOF >> "$cfgfile"
27318 # AIX sometimes has problems with the GCC collect2 program. For some
27319 # reason, if we set the COLLECT_NAMES environment variable, the problems
27320 # vanish in a puff of smoke.
27321 if test set != "${COLLECT_NAMES+set}"; then
27322 COLLECT_NAMES=
27323 export COLLECT_NAMES
27324 fi
27325 _LT_EOF
27326 ;;
27327 esac
27328
27329
27330 ltmain=$ac_aux_dir/ltmain.sh
27331
27332
27333 # We use sed instead of cat because bash on DJGPP gets confused if
27334 # if finds mixed CR/LF and LF-only lines. Since sed operates in
27335 # text mode, it properly converts lines to CR/LF. This bash problem
27336 # is reportedly fixed, but why not run on old versions too?
27337 sed '$q' "$ltmain" >> "$cfgfile" \
27338 || (rm -f "$cfgfile"; exit 1)
27339
27340 mv -f "$cfgfile" "$ofile" ||
27341 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
27342 chmod +x "$ofile"
27343
27344
27345 cat <<_LT_EOF >> "$ofile"
27346
27347 # ### BEGIN LIBTOOL TAG CONFIG: CXX
27348
27349 # The linker used to build libraries.
27350 LD=$lt_LD_CXX
27351
27352 # How to create reloadable object files.
27353 reload_flag=$lt_reload_flag_CXX
27354 reload_cmds=$lt_reload_cmds_CXX
27355
27356 # Commands used to build an old-style archive.
27357 old_archive_cmds=$lt_old_archive_cmds_CXX
27358
27359 # A language specific compiler.
27360 CC=$lt_compiler_CXX
27361
27362 # Is the compiler the GNU compiler?
27363 with_gcc=$GCC_CXX
27364
27365 # Compiler flag to turn off builtin functions.
27366 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
27367
27368 # Additional compiler flags for building library objects.
27369 pic_flag=$lt_lt_prog_compiler_pic_CXX
27370
27371 # How to pass a linker flag through the compiler.
27372 wl=$lt_lt_prog_compiler_wl_CXX
27373
27374 # Compiler flag to prevent dynamic linking.
27375 link_static_flag=$lt_lt_prog_compiler_static_CXX
27376
27377 # Does compiler simultaneously support -c and -o options?
27378 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
27379
27380 # Whether or not to add -lc for building shared libraries.
27381 build_libtool_need_lc=$archive_cmds_need_lc_CXX
27382
27383 # Whether or not to disallow shared libs when runtime libs are static.
27384 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
27385
27386 # Compiler flag to allow reflexive dlopens.
27387 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
27388
27389 # Compiler flag to generate shared objects directly from archives.
27390 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
27391
27392 # Whether the compiler copes with passing no objects directly.
27393 compiler_needs_object=$lt_compiler_needs_object_CXX
27394
27395 # Create an old-style archive from a shared archive.
27396 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
27397
27398 # Create a temporary old-style archive to link instead of a shared archive.
27399 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
27400
27401 # Commands used to build a shared archive.
27402 archive_cmds=$lt_archive_cmds_CXX
27403 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
27404
27405 # Commands used to build a loadable module if different from building
27406 # a shared archive.
27407 module_cmds=$lt_module_cmds_CXX
27408 module_expsym_cmds=$lt_module_expsym_cmds_CXX
27409
27410 # Whether we are building with GNU ld or not.
27411 with_gnu_ld=$lt_with_gnu_ld_CXX
27412
27413 # Flag that allows shared libraries with undefined symbols to be built.
27414 allow_undefined_flag=$lt_allow_undefined_flag_CXX
27415
27416 # Flag that enforces no undefined symbols.
27417 no_undefined_flag=$lt_no_undefined_flag_CXX
27418
27419 # Flag to hardcode \$libdir into a binary during linking.
27420 # This must work even if \$libdir does not exist
27421 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
27422
27423 # Whether we need a single "-rpath" flag with a separated argument.
27424 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
27425
27426 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27427 # DIR into the resulting binary.
27428 hardcode_direct=$hardcode_direct_CXX
27429
27430 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27431 # DIR into the resulting binary and the resulting library dependency is
27432 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
27433 # library is relocated.
27434 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
27435
27436 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
27437 # into the resulting binary.
27438 hardcode_minus_L=$hardcode_minus_L_CXX
27439
27440 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
27441 # into the resulting binary.
27442 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
27443
27444 # Set to "yes" if building a shared library automatically hardcodes DIR
27445 # into the library and all subsequent libraries and executables linked
27446 # against it.
27447 hardcode_automatic=$hardcode_automatic_CXX
27448
27449 # Set to yes if linker adds runtime paths of dependent libraries
27450 # to runtime path list.
27451 inherit_rpath=$inherit_rpath_CXX
27452
27453 # Whether libtool must link a program against all its dependency libraries.
27454 link_all_deplibs=$link_all_deplibs_CXX
27455
27456 # Set to "yes" if exported symbols are required.
27457 always_export_symbols=$always_export_symbols_CXX
27458
27459 # The commands to list exported symbols.
27460 export_symbols_cmds=$lt_export_symbols_cmds_CXX
27461
27462 # Symbols that should not be listed in the preloaded symbols.
27463 exclude_expsyms=$lt_exclude_expsyms_CXX
27464
27465 # Symbols that must always be exported.
27466 include_expsyms=$lt_include_expsyms_CXX
27467
27468 # Commands necessary for linking programs (against libraries) with templates.
27469 prelink_cmds=$lt_prelink_cmds_CXX
27470
27471 # Commands necessary for finishing linking programs.
27472 postlink_cmds=$lt_postlink_cmds_CXX
27473
27474 # Specify filename containing input files.
27475 file_list_spec=$lt_file_list_spec_CXX
27476
27477 # How to hardcode a shared library path into an executable.
27478 hardcode_action=$hardcode_action_CXX
27479
27480 # The directories searched by this compiler when creating a shared library.
27481 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
27482
27483 # Dependencies to place before and after the objects being linked to
27484 # create a shared library.
27485 predep_objects=$lt_predep_objects_CXX
27486 postdep_objects=$lt_postdep_objects_CXX
27487 predeps=$lt_predeps_CXX
27488 postdeps=$lt_postdeps_CXX
27489
27490 # The library search path used internally by the compiler when linking
27491 # a shared library.
27492 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
27493
27494 # ### END LIBTOOL TAG CONFIG: CXX
27495 _LT_EOF
27496
27497
27498 cat <<_LT_EOF >> "$ofile"
27499
27500 # ### BEGIN LIBTOOL TAG CONFIG: RC
27501
27502 # The linker used to build libraries.
27503 LD=$lt_LD_RC
27504
27505 # How to create reloadable object files.
27506 reload_flag=$lt_reload_flag_RC
27507 reload_cmds=$lt_reload_cmds_RC
27508
27509 # Commands used to build an old-style archive.
27510 old_archive_cmds=$lt_old_archive_cmds_RC
27511
27512 # A language specific compiler.
27513 CC=$lt_compiler_RC
27514
27515 # Is the compiler the GNU compiler?
27516 with_gcc=$GCC_RC
27517
27518 # Compiler flag to turn off builtin functions.
27519 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
27520
27521 # Additional compiler flags for building library objects.
27522 pic_flag=$lt_lt_prog_compiler_pic_RC
27523
27524 # How to pass a linker flag through the compiler.
27525 wl=$lt_lt_prog_compiler_wl_RC
27526
27527 # Compiler flag to prevent dynamic linking.
27528 link_static_flag=$lt_lt_prog_compiler_static_RC
27529
27530 # Does compiler simultaneously support -c and -o options?
27531 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
27532
27533 # Whether or not to add -lc for building shared libraries.
27534 build_libtool_need_lc=$archive_cmds_need_lc_RC
27535
27536 # Whether or not to disallow shared libs when runtime libs are static.
27537 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
27538
27539 # Compiler flag to allow reflexive dlopens.
27540 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
27541
27542 # Compiler flag to generate shared objects directly from archives.
27543 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
27544
27545 # Whether the compiler copes with passing no objects directly.
27546 compiler_needs_object=$lt_compiler_needs_object_RC
27547
27548 # Create an old-style archive from a shared archive.
27549 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
27550
27551 # Create a temporary old-style archive to link instead of a shared archive.
27552 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
27553
27554 # Commands used to build a shared archive.
27555 archive_cmds=$lt_archive_cmds_RC
27556 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
27557
27558 # Commands used to build a loadable module if different from building
27559 # a shared archive.
27560 module_cmds=$lt_module_cmds_RC
27561 module_expsym_cmds=$lt_module_expsym_cmds_RC
27562
27563 # Whether we are building with GNU ld or not.
27564 with_gnu_ld=$lt_with_gnu_ld_RC
27565
27566 # Flag that allows shared libraries with undefined symbols to be built.
27567 allow_undefined_flag=$lt_allow_undefined_flag_RC
27568
27569 # Flag that enforces no undefined symbols.
27570 no_undefined_flag=$lt_no_undefined_flag_RC
27571
27572 # Flag to hardcode \$libdir into a binary during linking.
27573 # This must work even if \$libdir does not exist
27574 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
27575
27576 # Whether we need a single "-rpath" flag with a separated argument.
27577 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
27578
27579 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27580 # DIR into the resulting binary.
27581 hardcode_direct=$hardcode_direct_RC
27582
27583 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
27584 # DIR into the resulting binary and the resulting library dependency is
27585 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
27586 # library is relocated.
27587 hardcode_direct_absolute=$hardcode_direct_absolute_RC
27588
27589 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
27590 # into the resulting binary.
27591 hardcode_minus_L=$hardcode_minus_L_RC
27592
27593 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
27594 # into the resulting binary.
27595 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
27596
27597 # Set to "yes" if building a shared library automatically hardcodes DIR
27598 # into the library and all subsequent libraries and executables linked
27599 # against it.
27600 hardcode_automatic=$hardcode_automatic_RC
27601
27602 # Set to yes if linker adds runtime paths of dependent libraries
27603 # to runtime path list.
27604 inherit_rpath=$inherit_rpath_RC
27605
27606 # Whether libtool must link a program against all its dependency libraries.
27607 link_all_deplibs=$link_all_deplibs_RC
27608
27609 # Set to "yes" if exported symbols are required.
27610 always_export_symbols=$always_export_symbols_RC
27611
27612 # The commands to list exported symbols.
27613 export_symbols_cmds=$lt_export_symbols_cmds_RC
27614
27615 # Symbols that should not be listed in the preloaded symbols.
27616 exclude_expsyms=$lt_exclude_expsyms_RC
27617
27618 # Symbols that must always be exported.
27619 include_expsyms=$lt_include_expsyms_RC
27620
27621 # Commands necessary for linking programs (against libraries) with templates.
27622 prelink_cmds=$lt_prelink_cmds_RC
27623
27624 # Commands necessary for finishing linking programs.
27625 postlink_cmds=$lt_postlink_cmds_RC
27626
27627 # Specify filename containing input files.
27628 file_list_spec=$lt_file_list_spec_RC
27629
27630 # How to hardcode a shared library path into an executable.
27631 hardcode_action=$hardcode_action_RC
27632
27633 # The directories searched by this compiler when creating a shared library.
27634 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC
27635
27636 # Dependencies to place before and after the objects being linked to
27637 # create a shared library.
27638 predep_objects=$lt_predep_objects_RC
27639 postdep_objects=$lt_postdep_objects_RC
27640 predeps=$lt_predeps_RC
27641 postdeps=$lt_postdeps_RC
27642
27643 # The library search path used internally by the compiler when linking
27644 # a shared library.
27645 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
27646
27647 # ### END LIBTOOL TAG CONFIG: RC
27648 _LT_EOF
27649
27650 ;;
27651
27652 esac
27653 done # for ac_tag
27654
27655
27656 as_fn_exit 0
27657 _ACEOF
27658 ac_clean_files=$ac_clean_files_save
27659
27660 test $ac_write_fail = 0 ||
27661 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
27662
27663
27664 # configure is writing to config.log, and then calls config.status.
27665 # config.status does its own redirection, appending to config.log.
27666 # Unfortunately, on DOS this fails, as config.log is still kept open
27667 # by configure, so config.status won't be able to write to it; its
27668 # output is simply discarded. So we exec the FD to /dev/null,
27669 # effectively closing config.log, so it can be properly (re)opened and
27670 # appended to by config.status. When coming back to configure, we
27671 # need to make the FD available again.
27672 if test "$no_create" != yes; then
27673 ac_cs_success=:
27674 ac_config_status_args=
27675 test "$silent" = yes &&
27676 ac_config_status_args="$ac_config_status_args --quiet"
27677 exec 5>/dev/null
27678 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27679 exec 5>>config.log
27680 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27681 # would make configure fail if this is the last instruction.
27682 $ac_cs_success || as_fn_exit 1
27683 fi
27684 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27685 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27686 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27687 fi
27688
27689
27690
27691 echo "Providers to build:${build_providers}"
27692 if test "x$build_providers" = "x"; then
27693 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No spell-checking provider selected!" >&5
27694 $as_echo "$as_me: WARNING: No spell-checking provider selected!" >&2;}
27695 fi
27696
27697 if test "x$with_zemberek" = "xyes"; then
27698 echo "
27699 The Zemberek Turkish spell-checking plugin is enabled. It is known
27700 to cause crashes with WebKit. Use at your own discretion."
27701 fi
27702 if test $RELOCATABLE != yes; then
27703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building without --enable-relocatable: the tests will not work!" >&5
27704 $as_echo "$as_me: WARNING: Building without --enable-relocatable: the tests will not work!" >&2;}
27705 fi
0 AC_INIT([enchant],[2.2.7])
0 AC_INIT([enchant],[2.2.8])
11 AC_CONFIG_SRCDIR(src/enchant.h)
22 AC_CONFIG_AUX_DIR([build-aux])
33 AM_INIT_AUTOMAKE([subdir-objects])
210210
211211 dnl Standard providers
212212 ENCHANT_CHECK_PKG_CONFIG_PROVIDER([hunspell], [HUNSPELL])
213 ENCHANT_CHECK_PKG_CONFIG_PROVIDER([nuspell], [NUSPELL])
213214 ENCHANT_CHECK_LIB_PROVIDER([aspell], [ASPELL], [get_aspell_dict_info_list])
214215 ENCHANT_CHECK_LIB_PROVIDER([hspell], [HSPELL], [hspell_get_dictionary_path],, [-lz])
215216 ENCHANT_CHECK_PKG_CONFIG_PROVIDER([voikko], [VOIKKO], [libvoikko])
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2013-05-30.07; # UTC
4
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
26
27 case $1 in
28 '')
29 echo "$0: No command. Try '$0 --help' for more information." 1>&2
30 exit 1;
31 ;;
32 -h | --h*)
33 cat <<\EOF
34 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
35
36 Run PROGRAMS ARGS to compile a file, generating dependencies
37 as side-effects.
38
39 Environment variables:
40 depmode Dependency tracking mode.
41 source Source file read by 'PROGRAMS ARGS'.
42 object Object file output by 'PROGRAMS ARGS'.
43 DEPDIR directory where to store dependencies.
44 depfile Dependency file to output.
45 tmpdepfile Temporary file to use when outputting dependencies.
46 libtool Whether libtool is used (yes/no).
47
48 Report bugs to <bug-automake@gnu.org>.
49 EOF
50 exit $?
51 ;;
52 -v | --v*)
53 echo "depcomp $scriptversion"
54 exit $?
55 ;;
56 esac
57
58 # Get the directory component of the given path, and save it in the
59 # global variables '$dir'. Note that this directory component will
60 # be either empty or ending with a '/' character. This is deliberate.
61 set_dir_from ()
62 {
63 case $1 in
64 */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
65 *) dir=;;
66 esac
67 }
68
69 # Get the suffix-stripped basename of the given path, and save it the
70 # global variable '$base'.
71 set_base_from ()
72 {
73 base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
74 }
75
76 # If no dependency file was actually created by the compiler invocation,
77 # we still have to create a dummy depfile, to avoid errors with the
78 # Makefile "include basename.Plo" scheme.
79 make_dummy_depfile ()
80 {
81 echo "#dummy" > "$depfile"
82 }
83
84 # Factor out some common post-processing of the generated depfile.
85 # Requires the auxiliary global variable '$tmpdepfile' to be set.
86 aix_post_process_depfile ()
87 {
88 # If the compiler actually managed to produce a dependency file,
89 # post-process it.
90 if test -f "$tmpdepfile"; then
91 # Each line is of the form 'foo.o: dependency.h'.
92 # Do two passes, one to just change these to
93 # $object: dependency.h
94 # and one to simply output
95 # dependency.h:
96 # which is needed to avoid the deleted-header problem.
97 { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
98 sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
99 } > "$depfile"
100 rm -f "$tmpdepfile"
101 else
102 make_dummy_depfile
103 fi
104 }
105
106 # A tabulation character.
107 tab=' '
108 # A newline character.
109 nl='
110 '
111 # Character ranges might be problematic outside the C locale.
112 # These definitions help.
113 upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
114 lower=abcdefghijklmnopqrstuvwxyz
115 digits=0123456789
116 alpha=${upper}${lower}
117
118 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
119 echo "depcomp: Variables source, object and depmode must be set" 1>&2
120 exit 1
121 fi
122
123 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
124 depfile=${depfile-`echo "$object" |
125 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
126 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
127
128 rm -f "$tmpdepfile"
129
130 # Avoid interferences from the environment.
131 gccflag= dashmflag=
132
133 # Some modes work just like other modes, but use different flags. We
134 # parameterize here, but still list the modes in the big case below,
135 # to make depend.m4 easier to write. Note that we *cannot* use a case
136 # here, because this file can only contain one case statement.
137 if test "$depmode" = hp; then
138 # HP compiler uses -M and no extra arg.
139 gccflag=-M
140 depmode=gcc
141 fi
142
143 if test "$depmode" = dashXmstdout; then
144 # This is just like dashmstdout with a different argument.
145 dashmflag=-xM
146 depmode=dashmstdout
147 fi
148
149 cygpath_u="cygpath -u -f -"
150 if test "$depmode" = msvcmsys; then
151 # This is just like msvisualcpp but w/o cygpath translation.
152 # Just convert the backslash-escaped backslashes to single forward
153 # slashes to satisfy depend.m4
154 cygpath_u='sed s,\\\\,/,g'
155 depmode=msvisualcpp
156 fi
157
158 if test "$depmode" = msvc7msys; then
159 # This is just like msvc7 but w/o cygpath translation.
160 # Just convert the backslash-escaped backslashes to single forward
161 # slashes to satisfy depend.m4
162 cygpath_u='sed s,\\\\,/,g'
163 depmode=msvc7
164 fi
165
166 if test "$depmode" = xlc; then
167 # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
168 gccflag=-qmakedep=gcc,-MF
169 depmode=gcc
170 fi
171
172 case "$depmode" in
173 gcc3)
174 ## gcc 3 implements dependency tracking that does exactly what
175 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
176 ## it if -MD -MP comes after the -MF stuff. Hmm.
177 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
178 ## the command line argument order; so add the flags where they
179 ## appear in depend2.am. Note that the slowdown incurred here
180 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
181 for arg
182 do
183 case $arg in
184 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
185 *) set fnord "$@" "$arg" ;;
186 esac
187 shift # fnord
188 shift # $arg
189 done
190 "$@"
191 stat=$?
192 if test $stat -ne 0; then
193 rm -f "$tmpdepfile"
194 exit $stat
195 fi
196 mv "$tmpdepfile" "$depfile"
197 ;;
198
199 gcc)
200 ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
201 ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
202 ## (see the conditional assignment to $gccflag above).
203 ## There are various ways to get dependency output from gcc. Here's
204 ## why we pick this rather obscure method:
205 ## - Don't want to use -MD because we'd like the dependencies to end
206 ## up in a subdir. Having to rename by hand is ugly.
207 ## (We might end up doing this anyway to support other compilers.)
208 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
209 ## -MM, not -M (despite what the docs say). Also, it might not be
210 ## supported by the other compilers which use the 'gcc' depmode.
211 ## - Using -M directly means running the compiler twice (even worse
212 ## than renaming).
213 if test -z "$gccflag"; then
214 gccflag=-MD,
215 fi
216 "$@" -Wp,"$gccflag$tmpdepfile"
217 stat=$?
218 if test $stat -ne 0; then
219 rm -f "$tmpdepfile"
220 exit $stat
221 fi
222 rm -f "$depfile"
223 echo "$object : \\" > "$depfile"
224 # The second -e expression handles DOS-style file names with drive
225 # letters.
226 sed -e 's/^[^:]*: / /' \
227 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
228 ## This next piece of magic avoids the "deleted header file" problem.
229 ## The problem is that when a header file which appears in a .P file
230 ## is deleted, the dependency causes make to die (because there is
231 ## typically no way to rebuild the header). We avoid this by adding
232 ## dummy dependencies for each header file. Too bad gcc doesn't do
233 ## this for us directly.
234 ## Some versions of gcc put a space before the ':'. On the theory
235 ## that the space means something, we add a space to the output as
236 ## well. hp depmode also adds that space, but also prefixes the VPATH
237 ## to the object. Take care to not repeat it in the output.
238 ## Some versions of the HPUX 10.20 sed can't process this invocation
239 ## correctly. Breaking it into two sed invocations is a workaround.
240 tr ' ' "$nl" < "$tmpdepfile" \
241 | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
242 | sed -e 's/$/ :/' >> "$depfile"
243 rm -f "$tmpdepfile"
244 ;;
245
246 hp)
247 # This case exists only to let depend.m4 do its work. It works by
248 # looking at the text of this script. This case will never be run,
249 # since it is checked for above.
250 exit 1
251 ;;
252
253 sgi)
254 if test "$libtool" = yes; then
255 "$@" "-Wp,-MDupdate,$tmpdepfile"
256 else
257 "$@" -MDupdate "$tmpdepfile"
258 fi
259 stat=$?
260 if test $stat -ne 0; then
261 rm -f "$tmpdepfile"
262 exit $stat
263 fi
264 rm -f "$depfile"
265
266 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
267 echo "$object : \\" > "$depfile"
268 # Clip off the initial element (the dependent). Don't try to be
269 # clever and replace this with sed code, as IRIX sed won't handle
270 # lines with more than a fixed number of characters (4096 in
271 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
272 # the IRIX cc adds comments like '#:fec' to the end of the
273 # dependency line.
274 tr ' ' "$nl" < "$tmpdepfile" \
275 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
276 | tr "$nl" ' ' >> "$depfile"
277 echo >> "$depfile"
278 # The second pass generates a dummy entry for each header file.
279 tr ' ' "$nl" < "$tmpdepfile" \
280 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
281 >> "$depfile"
282 else
283 make_dummy_depfile
284 fi
285 rm -f "$tmpdepfile"
286 ;;
287
288 xlc)
289 # This case exists only to let depend.m4 do its work. It works by
290 # looking at the text of this script. This case will never be run,
291 # since it is checked for above.
292 exit 1
293 ;;
294
295 aix)
296 # The C for AIX Compiler uses -M and outputs the dependencies
297 # in a .u file. In older versions, this file always lives in the
298 # current directory. Also, the AIX compiler puts '$object:' at the
299 # start of each line; $object doesn't have directory information.
300 # Version 6 uses the directory in both cases.
301 set_dir_from "$object"
302 set_base_from "$object"
303 if test "$libtool" = yes; then
304 tmpdepfile1=$dir$base.u
305 tmpdepfile2=$base.u
306 tmpdepfile3=$dir.libs/$base.u
307 "$@" -Wc,-M
308 else
309 tmpdepfile1=$dir$base.u
310 tmpdepfile2=$dir$base.u
311 tmpdepfile3=$dir$base.u
312 "$@" -M
313 fi
314 stat=$?
315 if test $stat -ne 0; then
316 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
317 exit $stat
318 fi
319
320 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
321 do
322 test -f "$tmpdepfile" && break
323 done
324 aix_post_process_depfile
325 ;;
326
327 tcc)
328 # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
329 # FIXME: That version still under development at the moment of writing.
330 # Make that this statement remains true also for stable, released
331 # versions.
332 # It will wrap lines (doesn't matter whether long or short) with a
333 # trailing '\', as in:
334 #
335 # foo.o : \
336 # foo.c \
337 # foo.h \
338 #
339 # It will put a trailing '\' even on the last line, and will use leading
340 # spaces rather than leading tabs (at least since its commit 0394caf7
341 # "Emit spaces for -MD").
342 "$@" -MD -MF "$tmpdepfile"
343 stat=$?
344 if test $stat -ne 0; then
345 rm -f "$tmpdepfile"
346 exit $stat
347 fi
348 rm -f "$depfile"
349 # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
350 # We have to change lines of the first kind to '$object: \'.
351 sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
352 # And for each line of the second kind, we have to emit a 'dep.h:'
353 # dummy dependency, to avoid the deleted-header problem.
354 sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
355 rm -f "$tmpdepfile"
356 ;;
357
358 ## The order of this option in the case statement is important, since the
359 ## shell code in configure will try each of these formats in the order
360 ## listed in this file. A plain '-MD' option would be understood by many
361 ## compilers, so we must ensure this comes after the gcc and icc options.
362 pgcc)
363 # Portland's C compiler understands '-MD'.
364 # Will always output deps to 'file.d' where file is the root name of the
365 # source file under compilation, even if file resides in a subdirectory.
366 # The object file name does not affect the name of the '.d' file.
367 # pgcc 10.2 will output
368 # foo.o: sub/foo.c sub/foo.h
369 # and will wrap long lines using '\' :
370 # foo.o: sub/foo.c ... \
371 # sub/foo.h ... \
372 # ...
373 set_dir_from "$object"
374 # Use the source, not the object, to determine the base name, since
375 # that's sadly what pgcc will do too.
376 set_base_from "$source"
377 tmpdepfile=$base.d
378
379 # For projects that build the same source file twice into different object
380 # files, the pgcc approach of using the *source* file root name can cause
381 # problems in parallel builds. Use a locking strategy to avoid stomping on
382 # the same $tmpdepfile.
383 lockdir=$base.d-lock
384 trap "
385 echo '$0: caught signal, cleaning up...' >&2
386 rmdir '$lockdir'
387 exit 1
388 " 1 2 13 15
389 numtries=100
390 i=$numtries
391 while test $i -gt 0; do
392 # mkdir is a portable test-and-set.
393 if mkdir "$lockdir" 2>/dev/null; then
394 # This process acquired the lock.
395 "$@" -MD
396 stat=$?
397 # Release the lock.
398 rmdir "$lockdir"
399 break
400 else
401 # If the lock is being held by a different process, wait
402 # until the winning process is done or we timeout.
403 while test -d "$lockdir" && test $i -gt 0; do
404 sleep 1
405 i=`expr $i - 1`
406 done
407 fi
408 i=`expr $i - 1`
409 done
410 trap - 1 2 13 15
411 if test $i -le 0; then
412 echo "$0: failed to acquire lock after $numtries attempts" >&2
413 echo "$0: check lockdir '$lockdir'" >&2
414 exit 1
415 fi
416
417 if test $stat -ne 0; then
418 rm -f "$tmpdepfile"
419 exit $stat
420 fi
421 rm -f "$depfile"
422 # Each line is of the form `foo.o: dependent.h',
423 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
424 # Do two passes, one to just change these to
425 # `$object: dependent.h' and one to simply `dependent.h:'.
426 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
427 # Some versions of the HPUX 10.20 sed can't process this invocation
428 # correctly. Breaking it into two sed invocations is a workaround.
429 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
430 | sed -e 's/$/ :/' >> "$depfile"
431 rm -f "$tmpdepfile"
432 ;;
433
434 hp2)
435 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
436 # compilers, which have integrated preprocessors. The correct option
437 # to use with these is +Maked; it writes dependencies to a file named
438 # 'foo.d', which lands next to the object file, wherever that
439 # happens to be.
440 # Much of this is similar to the tru64 case; see comments there.
441 set_dir_from "$object"
442 set_base_from "$object"
443 if test "$libtool" = yes; then
444 tmpdepfile1=$dir$base.d
445 tmpdepfile2=$dir.libs/$base.d
446 "$@" -Wc,+Maked
447 else
448 tmpdepfile1=$dir$base.d
449 tmpdepfile2=$dir$base.d
450 "$@" +Maked
451 fi
452 stat=$?
453 if test $stat -ne 0; then
454 rm -f "$tmpdepfile1" "$tmpdepfile2"
455 exit $stat
456 fi
457
458 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
459 do
460 test -f "$tmpdepfile" && break
461 done
462 if test -f "$tmpdepfile"; then
463 sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
464 # Add 'dependent.h:' lines.
465 sed -ne '2,${
466 s/^ *//
467 s/ \\*$//
468 s/$/:/
469 p
470 }' "$tmpdepfile" >> "$depfile"
471 else
472 make_dummy_depfile
473 fi
474 rm -f "$tmpdepfile" "$tmpdepfile2"
475 ;;
476
477 tru64)
478 # The Tru64 compiler uses -MD to generate dependencies as a side
479 # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
480 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
481 # dependencies in 'foo.d' instead, so we check for that too.
482 # Subdirectories are respected.
483 set_dir_from "$object"
484 set_base_from "$object"
485
486 if test "$libtool" = yes; then
487 # Libtool generates 2 separate objects for the 2 libraries. These
488 # two compilations output dependencies in $dir.libs/$base.o.d and
489 # in $dir$base.o.d. We have to check for both files, because
490 # one of the two compilations can be disabled. We should prefer
491 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
492 # automatically cleaned when .libs/ is deleted, while ignoring
493 # the former would cause a distcleancheck panic.
494 tmpdepfile1=$dir$base.o.d # libtool 1.5
495 tmpdepfile2=$dir.libs/$base.o.d # Likewise.
496 tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
497 "$@" -Wc,-MD
498 else
499 tmpdepfile1=$dir$base.d
500 tmpdepfile2=$dir$base.d
501 tmpdepfile3=$dir$base.d
502 "$@" -MD
503 fi
504
505 stat=$?
506 if test $stat -ne 0; then
507 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
508 exit $stat
509 fi
510
511 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
512 do
513 test -f "$tmpdepfile" && break
514 done
515 # Same post-processing that is required for AIX mode.
516 aix_post_process_depfile
517 ;;
518
519 msvc7)
520 if test "$libtool" = yes; then
521 showIncludes=-Wc,-showIncludes
522 else
523 showIncludes=-showIncludes
524 fi
525 "$@" $showIncludes > "$tmpdepfile"
526 stat=$?
527 grep -v '^Note: including file: ' "$tmpdepfile"
528 if test $stat -ne 0; then
529 rm -f "$tmpdepfile"
530 exit $stat
531 fi
532 rm -f "$depfile"
533 echo "$object : \\" > "$depfile"
534 # The first sed program below extracts the file names and escapes
535 # backslashes for cygpath. The second sed program outputs the file
536 # name when reading, but also accumulates all include files in the
537 # hold buffer in order to output them again at the end. This only
538 # works with sed implementations that can handle large buffers.
539 sed < "$tmpdepfile" -n '
540 /^Note: including file: *\(.*\)/ {
541 s//\1/
542 s/\\/\\\\/g
543 p
544 }' | $cygpath_u | sort -u | sed -n '
545 s/ /\\ /g
546 s/\(.*\)/'"$tab"'\1 \\/p
547 s/.\(.*\) \\/\1:/
548 H
549 $ {
550 s/.*/'"$tab"'/
551 G
552 p
553 }' >> "$depfile"
554 echo >> "$depfile" # make sure the fragment doesn't end with a backslash
555 rm -f "$tmpdepfile"
556 ;;
557
558 msvc7msys)
559 # This case exists only to let depend.m4 do its work. It works by
560 # looking at the text of this script. This case will never be run,
561 # since it is checked for above.
562 exit 1
563 ;;
564
565 #nosideeffect)
566 # This comment above is used by automake to tell side-effect
567 # dependency tracking mechanisms from slower ones.
568
569 dashmstdout)
570 # Important note: in order to support this mode, a compiler *must*
571 # always write the preprocessed file to stdout, regardless of -o.
572 "$@" || exit $?
573
574 # Remove the call to Libtool.
575 if test "$libtool" = yes; then
576 while test "X$1" != 'X--mode=compile'; do
577 shift
578 done
579 shift
580 fi
581
582 # Remove '-o $object'.
583 IFS=" "
584 for arg
585 do
586 case $arg in
587 -o)
588 shift
589 ;;
590 $object)
591 shift
592 ;;
593 *)
594 set fnord "$@" "$arg"
595 shift # fnord
596 shift # $arg
597 ;;
598 esac
599 done
600
601 test -z "$dashmflag" && dashmflag=-M
602 # Require at least two characters before searching for ':'
603 # in the target name. This is to cope with DOS-style filenames:
604 # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
605 "$@" $dashmflag |
606 sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
607 rm -f "$depfile"
608 cat < "$tmpdepfile" > "$depfile"
609 # Some versions of the HPUX 10.20 sed can't process this sed invocation
610 # correctly. Breaking it into two sed invocations is a workaround.
611 tr ' ' "$nl" < "$tmpdepfile" \
612 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
613 | sed -e 's/$/ :/' >> "$depfile"
614 rm -f "$tmpdepfile"
615 ;;
616
617 dashXmstdout)
618 # This case only exists to satisfy depend.m4. It is never actually
619 # run, as this mode is specially recognized in the preamble.
620 exit 1
621 ;;
622
623 makedepend)
624 "$@" || exit $?
625 # Remove any Libtool call
626 if test "$libtool" = yes; then
627 while test "X$1" != 'X--mode=compile'; do
628 shift
629 done
630 shift
631 fi
632 # X makedepend
633 shift
634 cleared=no eat=no
635 for arg
636 do
637 case $cleared in
638 no)
639 set ""; shift
640 cleared=yes ;;
641 esac
642 if test $eat = yes; then
643 eat=no
644 continue
645 fi
646 case "$arg" in
647 -D*|-I*)
648 set fnord "$@" "$arg"; shift ;;
649 # Strip any option that makedepend may not understand. Remove
650 # the object too, otherwise makedepend will parse it as a source file.
651 -arch)
652 eat=yes ;;
653 -*|$object)
654 ;;
655 *)
656 set fnord "$@" "$arg"; shift ;;
657 esac
658 done
659 obj_suffix=`echo "$object" | sed 's/^.*\././'`
660 touch "$tmpdepfile"
661 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
662 rm -f "$depfile"
663 # makedepend may prepend the VPATH from the source file name to the object.
664 # No need to regex-escape $object, excess matching of '.' is harmless.
665 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
666 # Some versions of the HPUX 10.20 sed can't process the last invocation
667 # correctly. Breaking it into two sed invocations is a workaround.
668 sed '1,2d' "$tmpdepfile" \
669 | tr ' ' "$nl" \
670 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
671 | sed -e 's/$/ :/' >> "$depfile"
672 rm -f "$tmpdepfile" "$tmpdepfile".bak
673 ;;
674
675 cpp)
676 # Important note: in order to support this mode, a compiler *must*
677 # always write the preprocessed file to stdout.
678 "$@" || exit $?
679
680 # Remove the call to Libtool.
681 if test "$libtool" = yes; then
682 while test "X$1" != 'X--mode=compile'; do
683 shift
684 done
685 shift
686 fi
687
688 # Remove '-o $object'.
689 IFS=" "
690 for arg
691 do
692 case $arg in
693 -o)
694 shift
695 ;;
696 $object)
697 shift
698 ;;
699 *)
700 set fnord "$@" "$arg"
701 shift # fnord
702 shift # $arg
703 ;;
704 esac
705 done
706
707 "$@" -E \
708 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
709 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
710 | sed '$ s: \\$::' > "$tmpdepfile"
711 rm -f "$depfile"
712 echo "$object : \\" > "$depfile"
713 cat < "$tmpdepfile" >> "$depfile"
714 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
715 rm -f "$tmpdepfile"
716 ;;
717
718 msvisualcpp)
719 # Important note: in order to support this mode, a compiler *must*
720 # always write the preprocessed file to stdout.
721 "$@" || exit $?
722
723 # Remove the call to Libtool.
724 if test "$libtool" = yes; then
725 while test "X$1" != 'X--mode=compile'; do
726 shift
727 done
728 shift
729 fi
730
731 IFS=" "
732 for arg
733 do
734 case "$arg" in
735 -o)
736 shift
737 ;;
738 $object)
739 shift
740 ;;
741 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
742 set fnord "$@"
743 shift
744 shift
745 ;;
746 *)
747 set fnord "$@" "$arg"
748 shift
749 shift
750 ;;
751 esac
752 done
753 "$@" -E 2>/dev/null |
754 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
755 rm -f "$depfile"
756 echo "$object : \\" > "$depfile"
757 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
758 echo "$tab" >> "$depfile"
759 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
760 rm -f "$tmpdepfile"
761 ;;
762
763 msvcmsys)
764 # This case exists only to let depend.m4 do its work. It works by
765 # looking at the text of this script. This case will never be run,
766 # since it is checked for above.
767 exit 1
768 ;;
769
770 none)
771 exec "$@"
772 ;;
773
774 *)
775 echo "Unknown depmode $depmode" 1>&2
776 exit 1
777 ;;
778 esac
779
780 exit 0
781
782 # Local Variables:
783 # mode: shell-script
784 # sh-indentation: 2
785 # eval: (add-hook 'write-file-hooks 'time-stamp)
786 # time-stamp-start: "scriptversion="
787 # time-stamp-format: "%:y-%02m-%02d.%02H"
788 # time-stamp-time-zone: "UTC"
789 # time-stamp-end: "; # UTC"
790 # End:
+0
-55
gl/doc/INSTALL.diff less more
0 --- gnulib/doc/INSTALL 2017-02-23 15:26:15.296354123 +0000
1 +++ INSTALL 2017-12-08 15:38:22.819949859 +0000
2 @@ -1,3 +1,52 @@
3 +Building and installing libenchant
4 +**********************************
5 +
6 +For standard GNU autotools installation instructions, see below. There
7 +follow some enchant-specific notes.
8 +
9 +The usual GNU autotools package instructions apply, except that Enchant must
10 +be built with --enable-relocatable for the tests to run successfully.
11 +
12 +Note that for Enchant to find system-installed dictionaries, you may need
13 +the relevant --with-foo-dir option (see ./configure --help).
14 +
15 +
16 +Building from git
17 +=================
18 +
19 +See HACKING.
20 +
21 +
22 +Parallel installation
23 +=====================
24 +
25 +Enchant mostly installs in versioned directories, so that different major
26 +versions can be installed in parallel. The one exception is the data files
27 +(under pkgdatadir), as these are compatible between different major
28 +versions. To change e.g. /usr/share/enchant to /usr/share/enchant-2, set
29 +pkgdatadir when running make, e.g.:
30 +
31 +make pkgdatadir=/usr/share/enchant-2
32 +
33 +
34 +Relocation
35 +==========
36 +
37 +If Enchant is installed in a fixed location, and on Windows and Linux
38 +systems, no further configuration should be needed to make it relocatable;
39 +that is, work when copied from its original installation directory to
40 +another location.
41 +
42 +Otherwise, and in code intended to be portable to other systems, your code
43 +should call enchant_set_prefix_dir (see enchant.h) before any other Enchant
44 +function.
45 +
46 +For more details of how the relocation support works, including how you can
47 +use it in your own program, see doc/relocatable.texi and
48 +gnulib/doc/relocatable-maint.texi.
49 +
50 +
51 +
52 Installation Instructions
53 *************************
54
+0
-141
index.html less more
0 <?xml version="1.0" encoding="utf-8"?>
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3 <head>
4 <title>Enchant</title>
5 </head>
6 <body>
7 <div class="content">
8 <h1>Enchant</h1>
9 <p>by Dom Lachowicz</p>
10 <p>Current maintainer: Reuben Thomas</p>
11
12 <hr />
13
14 <h2>News</h2>
15
16 <p>September 5, 2019: Enchant 2.2.6 released.
17 <p>June 30, 2019: Enchant 2.2.5 released.
18 <p>June 17, 2019: Enchant 2.2.4 released.
19 <p>February 4, 2018: Enchant 2.2.3 released.
20 <p>January 3, 2018: Enchant 2.2.1 released.
21 <p>December 12, 2017: Enchant 2.2.0 released.
22 <p>August 8, 2017: Enchant 2.1.0 released.
23 <p>August 4, 2017: Enchant 2.0.0 released.
24 <p>February 6, 2017: Enchant 1.6.1 released.
25 <p>April 1, 2010: Enchant 1.6.0 released.
26 <p>May 23, 2009: Enchant 1.5.0 released.
27 <p>May 5, 2008: Enchant 1.4.2 released.
28
29 <h2>What is Enchant?</h2>
30
31 <p>Enchant is a library (and command-line program) that wraps a number of
32 different spelling libraries and programs with a consistent interface. By
33 using Enchant, you can use a wide range of spelling libraries, including
34 some specialised for particular languages, without needing to program to
35 each library's interface. If it's not convenient to call a C library, you
36 can access most of Enchant's functionality via the enchant program, which
37 communicates over a pipe, like ispell, and is indeed ispell-compatible.</p>
38
39 <h2>Backends</h2>
40
41 <p>Enchant is capable of having multiple backends loaded at once. Currently, Enchant has 6 backends:</p>
42
43 <!-- FIXME: add links for all backends -->
44 <ul>
45 <li>Hunspell (used by many other programs, including Firefox and Thunderbird)</li>
46 <li>Aspell (old Ispell replacement)</li>
47 <li>Hspell (Hebrew)</li>
48 <li>Zemberek (Turkish)</li>
49 <li>Voikko (Finnish)</li>
50 <li>AppleSpell (macOS)</li>
51 </ul>
52
53 <h2>Getting Enchant</h2>
54
55 <p>You can get Enchant from Github. <a
56 href="https://github.com/AbiWord/enchant">https://github.com/AbiWord/enchant</a></p>
57
58 <p>Older versions are still available from the <a
59 href="http://www.abisource.com/downloads/enchant/">AbiSource website</a>.</p>
60
61 <p>You can browse the Enchant source: <a href="https://github.com/AbiWord/enchant">https://github.com/AbiWord/enchant</a>.
62 Enchant's public API can be found <a
63 href="https://github.com/AbiWord/enchant/blob/master/src/enchant.h">here.</a>
64 Enchant's provider plugin API can be found <a
65 href="https://github.com/AbiWord/enchant/blob/master/src/enchant-provider.h">here.</a>
66 Enchant's C++ API can be found <a
67 href="https://github.com/AbiWord/enchant/blob/master/src/enchant%2B%2B.h">here.</a></p>
68
69 <h2>User configuration</h2>
70
71 <p>Users can install their own dictionaries for several back-ends, and even
72 their own spell-checker back-end plugins, and can configure which back-ends
73 are used for which languages.</p>
74
75 <h2>Building Enchant</h2>
76
77 <p>Enchant's build system uses GNU Autotools, which means that it works on
78 most operating systems and with most compilers, including MSVC and
79 XCode.</p>
80
81 <p>Enchant is vanilla C and C++ code, and as such should be buildable
82 with just about any C/C++ compiler.</p>
83
84 <p>LibEnchant imposes no dependencies other than libc on programs
85 that use it. Internally, Enchant requires Glib2 version 2.6 or later.</p>
86
87 <p>All inputs and outputs are in UTF-8 encoding. Language tags use
88 the familiar ISO standards, and take the form of "xx_YY"
89 (language_LOCALE), where the locale ("_YY") portion is optional, but
90 encouraged. We may consider extending the language tag mechanism to
91 accommodate future needs, such as medical dictionaries.</p>
92
93 <h2>Programs using Enchant</h2>
94
95 <p>Enchant is used by <a href="http://www.abisource.com/">AbiWord</a>,
96 <a href="http://www.lyx.org">LyX</a>, and,
97 via <a href="https://wiki.gnome.org/Projects/gspell">gspell</a>
98 and <a href="http://gtkspell.sourceforge.net">GtkSpell</a>, a number of Gtk
99 and GNOME applications. Emacs support is in development.</p>
100
101 <p>Backends for additional spell-checking systems are welcomed.</p>
102
103 <h2>Bugs and development</h2>
104
105 <p>Please use <a
106 href="https://github.com/AbiWord/enchant/issues/">Github issue
107 tracker</a> if possible to file bugs, offer patches or request new features.
108 Even better, submit a <a href="https://github.com/AbiWord/enchant/pulls/">Pull Request</a>!
109 Alternatively, feel free to send a message to the abiword-devel mailing list.
110 </p>
111
112 <p>The list for Enchant discussion is the AbiWord-devel
113 list. Please see <a
114 href="http://www.abisource.com/developers/">http://www.abisource.com/developers/</a>
115 for more information on how to join, and for archives.</p>
116
117 <p>Enchant is quite mature, but it still lacks features. Some work has
118 already been done as part of past Google Summer of Code projects that has
119 not yet been integrated into releases (see the issue tracker). Some
120 functionality available in the underlying spelling libraries but not yet
121 supported by Enchant could also usefully be added to Enchant's APIs.</p>
122
123 <p>If you'd like to contribute to Enchant, please read the file <code>HACKING</code>.
124
125 <h2>License</h2>
126
127 <p>Enchant is licensed under the LGPL license, with an
128 Exception so that non-free plugin backends
129 could be loaded and used by Enchant. Thus, it is possible to use
130 the native spell checkers on proprietary platforms (macOS, MS Office,…).</p>
131
132 <h2>What's in a Name?</h2>
133
134 <p>The definition of "Enchant" is roughly "to cast a spell". So, it's a pun!</p>
135
136 </div>
137 <table style="text-align: left; background-color: rgb(244, 244, 244); width: 100%;" width="100%" border="0" cellspacing="2" cellpadding="2"><tbody><tr><td style="font-size: 8pt; align: center;"><div class="copyright">Copyright (C) 1998-2017, the AbiSource community. All rights reserved.<br />
138 AbiSource, AbiSuite, and AbiWord are <a href="/information/license/tm_guide.phtml">trademarks</a> of Dom Lachowicz. All other product names, company names, or logos cited herein are property of their respective owners.</div></td></tr></tbody></table>
139 </body>
140 </html>
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2014-09-12.12; # UTC
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # 'make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 tab=' '
44 nl='
45 '
46 IFS=" $tab$nl"
47
48 # Set DOITPROG to "echo" to test this script.
49
50 doit=${DOITPROG-}
51 doit_exec=${doit:-exec}
52
53 # Put in absolute file names if you don't have them in your path;
54 # or use environment vars.
55
56 chgrpprog=${CHGRPPROG-chgrp}
57 chmodprog=${CHMODPROG-chmod}
58 chownprog=${CHOWNPROG-chown}
59 cmpprog=${CMPPROG-cmp}
60 cpprog=${CPPROG-cp}
61 mkdirprog=${MKDIRPROG-mkdir}
62 mvprog=${MVPROG-mv}
63 rmprog=${RMPROG-rm}
64 stripprog=${STRIPPROG-strip}
65
66 posix_mkdir=
67
68 # Desired mode of installed file.
69 mode=0755
70
71 chgrpcmd=
72 chmodcmd=$chmodprog
73 chowncmd=
74 mvcmd=$mvprog
75 rmcmd="$rmprog -f"
76 stripcmd=
77
78 src=
79 dst=
80 dir_arg=
81 dst_arg=
82
83 copy_on_change=false
84 is_target_a_directory=possibly
85
86 usage="\
87 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
88 or: $0 [OPTION]... SRCFILES... DIRECTORY
89 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
90 or: $0 [OPTION]... -d DIRECTORIES...
91
92 In the 1st form, copy SRCFILE to DSTFILE.
93 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
94 In the 4th, create DIRECTORIES.
95
96 Options:
97 --help display this help and exit.
98 --version display version info and exit.
99
100 -c (ignored)
101 -C install only if different (preserve the last data modification time)
102 -d create directories instead of installing files.
103 -g GROUP $chgrpprog installed files to GROUP.
104 -m MODE $chmodprog installed files to MODE.
105 -o USER $chownprog installed files to USER.
106 -s $stripprog installed files.
107 -t DIRECTORY install into DIRECTORY.
108 -T report an error if DSTFILE is a directory.
109
110 Environment variables override the default commands:
111 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
112 RMPROG STRIPPROG
113 "
114
115 while test $# -ne 0; do
116 case $1 in
117 -c) ;;
118
119 -C) copy_on_change=true;;
120
121 -d) dir_arg=true;;
122
123 -g) chgrpcmd="$chgrpprog $2"
124 shift;;
125
126 --help) echo "$usage"; exit $?;;
127
128 -m) mode=$2
129 case $mode in
130 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
131 echo "$0: invalid mode: $mode" >&2
132 exit 1;;
133 esac
134 shift;;
135
136 -o) chowncmd="$chownprog $2"
137 shift;;
138
139 -s) stripcmd=$stripprog;;
140
141 -t)
142 is_target_a_directory=always
143 dst_arg=$2
144 # Protect names problematic for 'test' and other utilities.
145 case $dst_arg in
146 -* | [=\(\)!]) dst_arg=./$dst_arg;;
147 esac
148 shift;;
149
150 -T) is_target_a_directory=never;;
151
152 --version) echo "$0 $scriptversion"; exit $?;;
153
154 --) shift
155 break;;
156
157 -*) echo "$0: invalid option: $1" >&2
158 exit 1;;
159
160 *) break;;
161 esac
162 shift
163 done
164
165 # We allow the use of options -d and -T together, by making -d
166 # take the precedence; this is for compatibility with GNU install.
167
168 if test -n "$dir_arg"; then
169 if test -n "$dst_arg"; then
170 echo "$0: target directory not allowed when installing a directory." >&2
171 exit 1
172 fi
173 fi
174
175 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
176 # When -d is used, all remaining arguments are directories to create.
177 # When -t is used, the destination is already specified.
178 # Otherwise, the last argument is the destination. Remove it from $@.
179 for arg
180 do
181 if test -n "$dst_arg"; then
182 # $@ is not empty: it contains at least $arg.
183 set fnord "$@" "$dst_arg"
184 shift # fnord
185 fi
186 shift # arg
187 dst_arg=$arg
188 # Protect names problematic for 'test' and other utilities.
189 case $dst_arg in
190 -* | [=\(\)!]) dst_arg=./$dst_arg;;
191 esac
192 done
193 fi
194
195 if test $# -eq 0; then
196 if test -z "$dir_arg"; then
197 echo "$0: no input file specified." >&2
198 exit 1
199 fi
200 # It's OK to call 'install-sh -d' without argument.
201 # This can happen when creating conditional directories.
202 exit 0
203 fi
204
205 if test -z "$dir_arg"; then
206 if test $# -gt 1 || test "$is_target_a_directory" = always; then
207 if test ! -d "$dst_arg"; then
208 echo "$0: $dst_arg: Is not a directory." >&2
209 exit 1
210 fi
211 fi
212 fi
213
214 if test -z "$dir_arg"; then
215 do_exit='(exit $ret); exit $ret'
216 trap "ret=129; $do_exit" 1
217 trap "ret=130; $do_exit" 2
218 trap "ret=141; $do_exit" 13
219 trap "ret=143; $do_exit" 15
220
221 # Set umask so as not to create temps with too-generous modes.
222 # However, 'strip' requires both read and write access to temps.
223 case $mode in
224 # Optimize common cases.
225 *644) cp_umask=133;;
226 *755) cp_umask=22;;
227
228 *[0-7])
229 if test -z "$stripcmd"; then
230 u_plus_rw=
231 else
232 u_plus_rw='% 200'
233 fi
234 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
235 *)
236 if test -z "$stripcmd"; then
237 u_plus_rw=
238 else
239 u_plus_rw=,u+rw
240 fi
241 cp_umask=$mode$u_plus_rw;;
242 esac
243 fi
244
245 for src
246 do
247 # Protect names problematic for 'test' and other utilities.
248 case $src in
249 -* | [=\(\)!]) src=./$src;;
250 esac
251
252 if test -n "$dir_arg"; then
253 dst=$src
254 dstdir=$dst
255 test -d "$dstdir"
256 dstdir_status=$?
257 else
258
259 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
260 # might cause directories to be created, which would be especially bad
261 # if $src (and thus $dsttmp) contains '*'.
262 if test ! -f "$src" && test ! -d "$src"; then
263 echo "$0: $src does not exist." >&2
264 exit 1
265 fi
266
267 if test -z "$dst_arg"; then
268 echo "$0: no destination specified." >&2
269 exit 1
270 fi
271 dst=$dst_arg
272
273 # If destination is a directory, append the input filename; won't work
274 # if double slashes aren't ignored.
275 if test -d "$dst"; then
276 if test "$is_target_a_directory" = never; then
277 echo "$0: $dst_arg: Is a directory" >&2
278 exit 1
279 fi
280 dstdir=$dst
281 dst=$dstdir/`basename "$src"`
282 dstdir_status=0
283 else
284 dstdir=`dirname "$dst"`
285 test -d "$dstdir"
286 dstdir_status=$?
287 fi
288 fi
289
290 obsolete_mkdir_used=false
291
292 if test $dstdir_status != 0; then
293 case $posix_mkdir in
294 '')
295 # Create intermediate dirs using mode 755 as modified by the umask.
296 # This is like FreeBSD 'install' as of 1997-10-28.
297 umask=`umask`
298 case $stripcmd.$umask in
299 # Optimize common cases.
300 *[2367][2367]) mkdir_umask=$umask;;
301 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
302
303 *[0-7])
304 mkdir_umask=`expr $umask + 22 \
305 - $umask % 100 % 40 + $umask % 20 \
306 - $umask % 10 % 4 + $umask % 2
307 `;;
308 *) mkdir_umask=$umask,go-w;;
309 esac
310
311 # With -d, create the new directory with the user-specified mode.
312 # Otherwise, rely on $mkdir_umask.
313 if test -n "$dir_arg"; then
314 mkdir_mode=-m$mode
315 else
316 mkdir_mode=
317 fi
318
319 posix_mkdir=false
320 case $umask in
321 *[123567][0-7][0-7])
322 # POSIX mkdir -p sets u+wx bits regardless of umask, which
323 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
324 ;;
325 *)
326 # $RANDOM is not portable (e.g. dash); use it when possible to
327 # lower collision chance
328 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
329 trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
330
331 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
332 # create the $tmpdir first (and fail if unsuccessful) to make sure
333 # that nobody tries to guess the $tmpdir name.
334 if (umask $mkdir_umask &&
335 $mkdirprog $mkdir_mode "$tmpdir" &&
336 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
337 then
338 if test -z "$dir_arg" || {
339 # Check for POSIX incompatibilities with -m.
340 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
341 # other-writable bit of parent directory when it shouldn't.
342 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
343 test_tmpdir="$tmpdir/a"
344 ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
345 case $ls_ld_tmpdir in
346 d????-?r-*) different_mode=700;;
347 d????-?--*) different_mode=755;;
348 *) false;;
349 esac &&
350 $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
351 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
352 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
353 }
354 }
355 then posix_mkdir=:
356 fi
357 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
358 else
359 # Remove any dirs left behind by ancient mkdir implementations.
360 rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
361 fi
362 trap '' 0;;
363 esac;;
364 esac
365
366 if
367 $posix_mkdir && (
368 umask $mkdir_umask &&
369 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
370 )
371 then :
372 else
373
374 # The umask is ridiculous, or mkdir does not conform to POSIX,
375 # or it failed possibly due to a race condition. Create the
376 # directory the slow way, step by step, checking for races as we go.
377
378 case $dstdir in
379 /*) prefix='/';;
380 [-=\(\)!]*) prefix='./';;
381 *) prefix='';;
382 esac
383
384 oIFS=$IFS
385 IFS=/
386 set -f
387 set fnord $dstdir
388 shift
389 set +f
390 IFS=$oIFS
391
392 prefixes=
393
394 for d
395 do
396 test X"$d" = X && continue
397
398 prefix=$prefix$d
399 if test -d "$prefix"; then
400 prefixes=
401 else
402 if $posix_mkdir; then
403 (umask=$mkdir_umask &&
404 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
405 # Don't fail if two instances are running concurrently.
406 test -d "$prefix" || exit 1
407 else
408 case $prefix in
409 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
410 *) qprefix=$prefix;;
411 esac
412 prefixes="$prefixes '$qprefix'"
413 fi
414 fi
415 prefix=$prefix/
416 done
417
418 if test -n "$prefixes"; then
419 # Don't fail if two instances are running concurrently.
420 (umask $mkdir_umask &&
421 eval "\$doit_exec \$mkdirprog $prefixes") ||
422 test -d "$dstdir" || exit 1
423 obsolete_mkdir_used=true
424 fi
425 fi
426 fi
427
428 if test -n "$dir_arg"; then
429 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
430 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
431 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
432 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
433 else
434
435 # Make a couple of temp file names in the proper directory.
436 dsttmp=$dstdir/_inst.$$_
437 rmtmp=$dstdir/_rm.$$_
438
439 # Trap to clean up those temp files at exit.
440 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
441
442 # Copy the file name to the temp name.
443 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
444
445 # and set any options; do chmod last to preserve setuid bits.
446 #
447 # If any of these fail, we abort the whole thing. If we want to
448 # ignore errors from any of these, just make sure not to ignore
449 # errors from the above "$doit $cpprog $src $dsttmp" command.
450 #
451 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
452 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
453 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
454 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
455
456 # If -C, don't bother to copy if it wouldn't change the file.
457 if $copy_on_change &&
458 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
459 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
460 set -f &&
461 set X $old && old=:$2:$4:$5:$6 &&
462 set X $new && new=:$2:$4:$5:$6 &&
463 set +f &&
464 test "$old" = "$new" &&
465 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
466 then
467 rm -f "$dsttmp"
468 else
469 # Rename the file to the real destination.
470 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
471
472 # The rename failed, perhaps because mv can't rename something else
473 # to itself, or perhaps because mv is so ancient that it does not
474 # support -f.
475 {
476 # Now remove or move aside any old file at destination location.
477 # We try this two ways since rm can't unlink itself on some
478 # systems and the destination file might be busy for other
479 # reasons. In this case, the final cleanup might fail but the new
480 # file should still install successfully.
481 {
482 test ! -f "$dst" ||
483 $doit $rmcmd -f "$dst" 2>/dev/null ||
484 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
485 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
486 } ||
487 { echo "$0: cannot unlink or rename $dst" >&2
488 (exit 1); exit 1
489 }
490 } &&
491
492 # Now rename the file to the real destination.
493 $doit $mvcmd "$dsttmp" "$dst"
494 }
495 fi || exit 1
496
497 trap '' 0
498 fi
499 done
500
501 # Local variables:
502 # eval: (add-hook 'write-file-hooks 'time-stamp)
503 # time-stamp-start: "scriptversion="
504 # time-stamp-format: "%:y-%02m-%02d.%02H"
505 # time-stamp-time-zone: "UTC"
506 # time-stamp-end: "; # UTC"
507 # End:
+0
-35
lib/.gitignore less more
0 /Makefile.gnulib
1 /_Noreturn.h
2 /alloca.c
3 /alloca.in.h
4 /arg-nonnull.h
5 /c++defs.h
6 /flock.c
7 /malloc.c
8 /msvc-inval.c
9 /msvc-inval.h
10 /msvc-nothrow.c
11 /msvc-nothrow.h
12 /rawmemchr.c
13 /rawmemchr.valgrind
14 /relocatable.c
15 /relocatable.h
16 /relocatable.valgrind
17 /stddef.in.h
18 /stdlib.in.h
19 /strchrnul.c
20 /strchrnul.valgrind
21 /strdup.c
22 /string.in.h
23 /sys_file.in.h
24 /sys_types.in.h
25 /unistd.c
26 /unistd.in.h
27 /unused-parameter.h
28 /warn-on-use.h
29 /alloca.h
30 /configmake.h
31 /stdlib.h
32 /string.h
33 /sys/
34 /unistd.h
0 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
1 ## Process this file with automake to produce Makefile.in.
2 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
3 #
4 # This file is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This file is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this file. If not, see <https://www.gnu.org/licenses/>.
16 #
17 # As a special exception to the GNU General Public License,
18 # this file may be distributed as part of a program that
19 # contains a configuration script generated by Autoconf, under
20 # the same distribution terms as the rest of that program.
21 #
22 # Generated by gnulib-tool.
23 # Reproduce by:
24 # gnulib-tool --import --local-dir=gl --local-dir=gl-mod/bootstrap \
25 # --lib=libgnu \
26 # --source-base=lib \
27 # --m4-base=m4 \
28 # --doc-base=doc \
29 # --tests-base=tests \
30 # --aux-dir=build-aux \
31 # --lgpl \
32 # --makefile-name=Makefile.gnulib \
33 # --no-conditional-dependencies \
34 # --libtool \
35 # --macro-prefix=gl \
36 # bootstrap \
37 # c99 \
38 # configmake \
39 # flock \
40 # getopt-posix \
41 # gnu-make \
42 # manywarnings \
43 # relocatable-lib-lgpl \
44 # snippet/unused-parameter \
45 # ssize_t \
46 # strchrnul \
47 # strdup-posix
48
49
50 MOSTLYCLEANFILES += core *.stackdump
51 # No GNU Make output.
52
53 noinst_LTLIBRARIES += libgnu.la
54
55 libgnu_la_SOURCES =
56 libgnu_la_LIBADD = $(gl_LTLIBOBJS)
57 libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
58 EXTRA_libgnu_la_SOURCES =
59 libgnu_la_LDFLAGS = $(AM_LDFLAGS)
60 libgnu_la_LDFLAGS += -no-undefined
61 libgnu_la_LDFLAGS += $(LTLIBINTL)
62
63 ## begin gnulib module absolute-header
64
65 # Use this preprocessor expression to decide whether #include_next works.
66 # Do not rely on a 'configure'-time test for this, since the expression
67 # might appear in an installed header, which is used by some other compiler.
68 HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
69
70 ## end gnulib module absolute-header
71
72 ## begin gnulib module bootstrap
73
74
75 EXTRA_DIST += $(top_srcdir)/build-aux/bootstrap.in
76
77 ## end gnulib module bootstrap
78
79 ## begin gnulib module configmake
80
81 # Listed in the same order as the GNU makefile conventions, and
82 # provided by autoconf 2.59c+ or 2.70.
83 # The Automake-defined pkg* macros are appended, in the order
84 # listed in the Automake 1.10a+ documentation.
85 configmake.h: Makefile
86 $(AM_V_GEN)rm -f $@-t && \
87 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
88 echo '#define PREFIX "$(prefix)"'; \
89 echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
90 echo '#define BINDIR "$(bindir)"'; \
91 echo '#define SBINDIR "$(sbindir)"'; \
92 echo '#define LIBEXECDIR "$(libexecdir)"'; \
93 echo '#define DATAROOTDIR "$(datarootdir)"'; \
94 echo '#define DATADIR "$(datadir)"'; \
95 echo '#define SYSCONFDIR "$(sysconfdir)"'; \
96 echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
97 echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
98 echo '#define RUNSTATEDIR "$(runstatedir)"'; \
99 echo '#define INCLUDEDIR "$(includedir)"'; \
100 echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
101 echo '#define DOCDIR "$(docdir)"'; \
102 echo '#define INFODIR "$(infodir)"'; \
103 echo '#define HTMLDIR "$(htmldir)"'; \
104 echo '#define DVIDIR "$(dvidir)"'; \
105 echo '#define PDFDIR "$(pdfdir)"'; \
106 echo '#define PSDIR "$(psdir)"'; \
107 echo '#define LIBDIR "$(libdir)"'; \
108 echo '#define LISPDIR "$(lispdir)"'; \
109 echo '#define LOCALEDIR "$(localedir)"'; \
110 echo '#define MANDIR "$(mandir)"'; \
111 echo '#define MANEXT "$(manext)"'; \
112 echo '#define PKGDATADIR "$(pkgdatadir)"'; \
113 echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
114 echo '#define PKGLIBDIR "$(pkglibdir)"'; \
115 echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
116 } | sed '/""/d' > $@-t && \
117 mv -f $@-t $@
118
119 BUILT_SOURCES += configmake.h
120 CLEANFILES += configmake.h configmake.h-t
121
122 ## end gnulib module configmake
123
124 ## begin gnulib module extract-trace
125
126
127 EXTRA_DIST += $(top_srcdir)/build-aux/extract-trace
128
129 ## end gnulib module extract-trace
130
131 ## begin gnulib module flock
132
133
134 EXTRA_DIST += flock.c
135
136 EXTRA_libgnu_la_SOURCES += flock.c
137
138 ## end gnulib module flock
139
140 ## begin gnulib module funclib.sh
141
142
143 EXTRA_DIST += $(top_srcdir)/build-aux/funclib.sh
144
145 ## end gnulib module funclib.sh
146
147 ## begin gnulib module getopt-posix
148
149 BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
150
151 # We need the following in order to create <getopt.h> when the system
152 # doesn't have one that works with the given compiler.
153 getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
154 $(AM_V_GEN)rm -f $@-t $@ && \
155 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
156 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
157 -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
158 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
159 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
160 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
161 -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
162 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
163 < $(srcdir)/getopt.in.h; \
164 } > $@-t && \
165 mv -f $@-t $@
166
167 getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
168 $(AM_V_GEN)rm -f $@-t $@ && \
169 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
170 sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
171 < $(srcdir)/getopt-cdefs.in.h; \
172 } > $@-t && \
173 mv -f $@-t $@
174
175 MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t
176
177 EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.c getopt.in.h getopt1.c getopt_int.h
178
179 EXTRA_libgnu_la_SOURCES += getopt.c getopt1.c
180
181 ## end gnulib module getopt-posix
182
183 ## begin gnulib module gettext-h
184
185 libgnu_la_SOURCES += gettext.h
186
187 ## end gnulib module gettext-h
188
189 ## begin gnulib module gnu-make
190
191 ##Sample usage of gnu-make module:
192 #if GNU_MAKE
193 # [nicer features that work only with GNU Make]
194 #else
195 # [fallback features that work in any 'make' implementation; see
196 # http://www.opengroup.org/susv3/utilities/make.html
197 # for the 2004 POSIX specification]
198 #endif
199
200 ## end gnulib module gnu-make
201
202 ## begin gnulib module inline-source
203
204
205 EXTRA_DIST += $(top_srcdir)/build-aux/inline-source
206
207 ## end gnulib module inline-source
208
209 ## begin gnulib module malloc-posix
210
211
212 EXTRA_DIST += malloc.c
213
214 EXTRA_libgnu_la_SOURCES += malloc.c
215
216 ## end gnulib module malloc-posix
217
218 ## begin gnulib module msvc-inval
219
220
221 EXTRA_DIST += msvc-inval.c msvc-inval.h
222
223 EXTRA_libgnu_la_SOURCES += msvc-inval.c
224
225 ## end gnulib module msvc-inval
226
227 ## begin gnulib module msvc-nothrow
228
229
230 EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h
231
232 EXTRA_libgnu_la_SOURCES += msvc-nothrow.c
233
234 ## end gnulib module msvc-nothrow
235
236 ## begin gnulib module options-parser
237
238
239 EXTRA_DIST += $(top_srcdir)/build-aux/options-parser
240
241 ## end gnulib module options-parser
242
243 ## begin gnulib module rawmemchr
244
245
246 EXTRA_DIST += rawmemchr.c rawmemchr.valgrind
247
248 EXTRA_libgnu_la_SOURCES += rawmemchr.c
249
250 ## end gnulib module rawmemchr
251
252 ## begin gnulib module relocatable-lib-lgpl
253
254 DEFS += -DNO_XMALLOC
255
256 EXTRA_DIST += relocatable.c relocatable.h relocatable.valgrind
257
258 EXTRA_libgnu_la_SOURCES += relocatable.c
259
260 ## end gnulib module relocatable-lib-lgpl
261
262 ## begin gnulib module snippet/_Noreturn
263
264 # Because this Makefile snippet defines a variable used by other
265 # gnulib Makefile snippets, it must be present in all makefiles that
266 # need it. This is ensured by the applicability 'all' defined above.
267
268 _NORETURN_H=$(srcdir)/_Noreturn.h
269
270 EXTRA_DIST += _Noreturn.h
271
272 ## end gnulib module snippet/_Noreturn
273
274 ## begin gnulib module snippet/arg-nonnull
275
276 # Because this Makefile snippet defines a variable used by other
277 # gnulib Makefile snippets, it must be present in all makefiles that
278 # need it. This is ensured by the applicability 'all' defined above.
279
280 ARG_NONNULL_H=$(srcdir)/arg-nonnull.h
281
282 EXTRA_DIST += arg-nonnull.h
283
284 ## end gnulib module snippet/arg-nonnull
285
286 ## begin gnulib module snippet/c++defs
287
288 # Because this Makefile snippet defines a variable used by other
289 # gnulib Makefile snippets, it must be present in all makefiles that
290 # need it. This is ensured by the applicability 'all' defined above.
291
292 CXXDEFS_H=$(srcdir)/c++defs.h
293
294 EXTRA_DIST += c++defs.h
295
296 ## end gnulib module snippet/c++defs
297
298 ## begin gnulib module snippet/unused-parameter
299
300 # Because this Makefile snippet defines a variable used by other
301 # gnulib Makefile snippets, it must be present in all makefiles that
302 # need it. This is ensured by the applicability 'all' defined above.
303
304 UNUSED_PARAMETER_H=$(srcdir)/unused-parameter.h
305
306 EXTRA_DIST += unused-parameter.h
307
308 ## end gnulib module snippet/unused-parameter
309
310 ## begin gnulib module snippet/warn-on-use
311
312 # Because this Makefile snippet defines a variable used by other
313 # gnulib Makefile snippets, it must be present in all makefiles that
314 # need it. This is ensured by the applicability 'all' defined above.
315
316 WARN_ON_USE_H=$(srcdir)/warn-on-use.h
317
318 EXTRA_DIST += warn-on-use.h
319
320 ## end gnulib module snippet/warn-on-use
321
322 ## begin gnulib module stddef
323
324 BUILT_SOURCES += $(STDDEF_H)
325
326 # We need the following in order to create <stddef.h> when the system
327 # doesn't have one that works with the given compiler.
328 if GL_GENERATE_STDDEF_H
329 stddef.h: stddef.in.h $(top_builddir)/config.status
330 $(AM_V_GEN)rm -f $@-t $@ && \
331 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
332 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
333 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
334 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
335 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
336 -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
337 -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
338 -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
339 -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
340 < $(srcdir)/stddef.in.h; \
341 } > $@-t && \
342 mv $@-t $@
343 else
344 stddef.h: $(top_builddir)/config.status
345 rm -f $@
346 endif
347 MOSTLYCLEANFILES += stddef.h stddef.h-t
348
349 EXTRA_DIST += stddef.in.h
350
351 ## end gnulib module stddef
352
353 ## begin gnulib module stdlib
354
355 BUILT_SOURCES += stdlib.h
356
357 # We need the following in order to create <stdlib.h> when the system
358 # doesn't have one that works with the given compiler.
359 stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
360 $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
361 $(AM_V_GEN)rm -f $@-t $@ && \
362 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
363 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
364 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
365 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
366 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
367 -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
368 -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
369 -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
370 -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
371 -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
372 -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
373 -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
374 -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
375 -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
376 -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
377 -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
378 -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
379 -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
380 -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
381 -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
382 -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
383 -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
384 -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
385 -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
386 -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
387 -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
388 -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
389 -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
390 -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \
391 -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
392 -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
393 -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
394 -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
395 -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
396 -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
397 -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
398 -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
399 -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
400 -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
401 -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
402 < $(srcdir)/stdlib.in.h | \
403 sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
404 -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
405 -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
406 -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
407 -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
408 -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
409 -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \
410 -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
411 -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
412 -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
413 -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
414 -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
415 -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
416 -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
417 -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
418 -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
419 -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
420 -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
421 -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
422 -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \
423 -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
424 -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
425 -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
426 -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
427 -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
428 -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
429 -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
430 -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
431 -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
432 -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
433 -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
434 -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
435 -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
436 -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
437 -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
438 -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
439 -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
440 -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
441 -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
442 -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
443 -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
444 -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
445 -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
446 -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
447 -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
448 -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
449 -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
450 -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
451 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
452 -e '/definition of _Noreturn/r $(_NORETURN_H)' \
453 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
454 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
455 } > $@-t && \
456 mv $@-t $@
457 MOSTLYCLEANFILES += stdlib.h stdlib.h-t
458
459 EXTRA_DIST += stdlib.in.h
460
461 ## end gnulib module stdlib
462
463 ## begin gnulib module strchrnul
464
465
466 EXTRA_DIST += strchrnul.c strchrnul.valgrind
467
468 EXTRA_libgnu_la_SOURCES += strchrnul.c
469
470 ## end gnulib module strchrnul
471
472 ## begin gnulib module strdup-posix
473
474
475 EXTRA_DIST += strdup.c
476
477 EXTRA_libgnu_la_SOURCES += strdup.c
478
479 ## end gnulib module strdup-posix
480
481 ## begin gnulib module string
482
483 BUILT_SOURCES += string.h
484
485 # We need the following in order to create <string.h> when the system
486 # doesn't have one that works with the given compiler.
487 string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
488 $(AM_V_GEN)rm -f $@-t $@ && \
489 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
490 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
491 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
492 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
493 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
494 -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
495 -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
496 -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
497 -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
498 -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
499 -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
500 -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
501 -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
502 -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
503 -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
504 -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
505 -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
506 -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
507 -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
508 -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
509 -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
510 -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
511 -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
512 -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
513 -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
514 -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
515 -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
516 -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
517 -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
518 -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
519 -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
520 -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
521 -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
522 -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
523 -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
524 -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
525 -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
526 -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
527 -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
528 -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
529 -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
530 -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
531 -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
532 -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
533 < $(srcdir)/string.in.h | \
534 sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
535 -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
536 -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
537 -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
538 -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
539 -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
540 -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
541 -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
542 -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
543 -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
544 -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
545 -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
546 -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
547 -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
548 -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
549 -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
550 -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
551 -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
552 -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
553 -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
554 -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
555 -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
556 -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
557 -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
558 -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
559 -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
560 -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
561 -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
562 -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
563 -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
564 -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
565 -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
566 -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
567 -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
568 -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
569 -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
570 -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
571 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
572 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
573 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
574 < $(srcdir)/string.in.h; \
575 } > $@-t && \
576 mv $@-t $@
577 MOSTLYCLEANFILES += string.h string.h-t
578
579 EXTRA_DIST += string.in.h
580
581 ## end gnulib module string
582
583 ## begin gnulib module sys_file
584
585 BUILT_SOURCES += sys/file.h
586
587 # We need the following in order to create <sys/file.h> when the system
588 # has one that is incomplete.
589 sys/file.h: sys_file.in.h $(top_builddir)/config.status $(WARN_ON_USE_H)
590 $(AM_V_at)$(MKDIR_P) sys
591 $(AM_V_GEN)rm -f $@-t $@ && \
592 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
593 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
594 -e 's/@''HAVE_SYS_FILE_H''@/$(HAVE_SYS_FILE_H)/g' \
595 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
596 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
597 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
598 -e 's|@''NEXT_SYS_FILE_H''@|$(NEXT_SYS_FILE_H)|g' \
599 -e 's/@''HAVE_FLOCK''@/$(HAVE_FLOCK)/g' \
600 -e 's/@''GNULIB_FLOCK''@/$(GNULIB_FLOCK)/g' \
601 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
602 < $(srcdir)/sys_file.in.h; \
603 } > $@-t && \
604 mv $@-t $@
605 MOSTLYCLEANFILES += sys/file.h sys/file.h-t
606 MOSTLYCLEANDIRS += sys
607
608 EXTRA_DIST += sys_file.in.h
609
610 ## end gnulib module sys_file
611
612 ## begin gnulib module sys_types
613
614 BUILT_SOURCES += sys/types.h
615
616 # We need the following in order to create <sys/types.h> when the system
617 # doesn't have one that works with the given compiler.
618 sys/types.h: sys_types.in.h $(top_builddir)/config.status
619 $(AM_V_at)$(MKDIR_P) sys
620 $(AM_V_GEN)rm -f $@-t $@ && \
621 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
622 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
623 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
624 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
625 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
626 -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
627 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
628 -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \
629 < $(srcdir)/sys_types.in.h; \
630 } > $@-t && \
631 mv $@-t $@
632 MOSTLYCLEANFILES += sys/types.h sys/types.h-t
633
634 EXTRA_DIST += sys_types.in.h
635
636 ## end gnulib module sys_types
637
638 ## begin gnulib module unistd
639
640 BUILT_SOURCES += unistd.h
641 libgnu_la_SOURCES += unistd.c
642
643 # We need the following in order to create an empty placeholder for
644 # <unistd.h> when the system doesn't have one.
645 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
646 $(AM_V_GEN)rm -f $@-t $@ && \
647 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
648 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
649 -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
650 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
651 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
652 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
653 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
654 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
655 -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
656 -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
657 -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
658 -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
659 -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
660 -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
661 -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
662 -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
663 -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
664 -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
665 -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
666 -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
667 -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
668 -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
669 -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
670 -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
671 -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
672 -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
673 -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
674 -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
675 -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
676 -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
677 -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
678 -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
679 -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
680 -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
681 -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
682 -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
683 -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
684 -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
685 -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
686 -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
687 -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
688 -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
689 -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
690 -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
691 -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
692 -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
693 -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
694 -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
695 -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
696 -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
697 -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
698 -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
699 -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
700 -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
701 -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
702 -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
703 -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
704 -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
705 -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
706 < $(srcdir)/unistd.in.h | \
707 sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
708 -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
709 -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
710 -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
711 -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
712 -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
713 -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
714 -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
715 -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
716 -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
717 -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
718 -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
719 -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
720 -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
721 -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \
722 -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
723 -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
724 -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
725 -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
726 -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
727 -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
728 -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
729 -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
730 -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
731 -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
732 -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
733 -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
734 -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
735 -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
736 -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
737 -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
738 -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
739 -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
740 -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
741 -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
742 -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \
743 -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
744 -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
745 -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
746 -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
747 -e 's|@''HAVE_DECL_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|g' \
748 -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
749 -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
750 -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
751 | \
752 sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
753 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
754 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
755 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
756 -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
757 -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
758 -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
759 -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
760 -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
761 -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
762 -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
763 -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
764 -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
765 -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \
766 -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
767 -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
768 -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
769 -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
770 -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
771 -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
772 -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
773 -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
774 -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
775 -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
776 -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
777 -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
778 -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
779 -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
780 -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \
781 -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
782 -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
783 -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
784 -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
785 -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
786 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
787 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
788 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
789 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
790 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
791 } > $@-t && \
792 mv $@-t $@
793 MOSTLYCLEANFILES += unistd.h unistd.h-t
794
795 EXTRA_DIST += unistd.in.h
796
797 ## end gnulib module unistd
798
799
800 mostlyclean-local: mostlyclean-generic
801 @for dir in '' $(MOSTLYCLEANDIRS); do \
802 if test -n "$$dir" && test -d $$dir; then \
803 echo "rmdir $$dir"; rmdir $$dir; \
804 fi; \
805 done; \
806 :
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
4
5 # This Makefile.in 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
14 @SET_MAKE@
15
16 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
17 #
18 # This file is free software; you can redistribute it and/or modify
19 # it under the terms of the GNU General Public License as published by
20 # the Free Software Foundation; either version 3 of the License, or
21 # (at your option) any later version.
22 #
23 # This file is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 # GNU General Public License for more details.
27 #
28 # You should have received a copy of the GNU General Public License
29 # along with this file. If not, see <https://www.gnu.org/licenses/>.
30 #
31 # As a special exception to the GNU General Public License,
32 # this file may be distributed as part of a program that
33 # contains a configuration script generated by Autoconf, under
34 # the same distribution terms as the rest of that program.
35 #
36 # Generated by gnulib-tool.
37 # Reproduce by:
38 # gnulib-tool --import --local-dir=gl --local-dir=gl-mod/bootstrap \
39 # --lib=libgnu \
40 # --source-base=lib \
41 # --m4-base=m4 \
42 # --doc-base=doc \
43 # --tests-base=tests \
44 # --aux-dir=build-aux \
45 # --lgpl \
46 # --makefile-name=Makefile.gnulib \
47 # --no-conditional-dependencies \
48 # --libtool \
49 # --macro-prefix=gl \
50 # bootstrap \
51 # c99 \
52 # configmake \
53 # flock \
54 # getopt-posix \
55 # gnu-make \
56 # manywarnings \
57 # relocatable-lib-lgpl \
58 # snippet/unused-parameter \
59 # ssize_t \
60 # strchrnul \
61 # strdup-posix
62
63 VPATH = @srcdir@
64 am__is_gnu_make = { \
65 if test -z '$(MAKELEVEL)'; then \
66 false; \
67 elif test -n '$(MAKE_HOST)'; then \
68 true; \
69 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
70 true; \
71 else \
72 false; \
73 fi; \
74 }
75 am__make_running_with_option = \
76 case $${target_option-} in \
77 ?) ;; \
78 *) echo "am__make_running_with_option: internal error: invalid" \
79 "target option '$${target_option-}' specified" >&2; \
80 exit 1;; \
81 esac; \
82 has_opt=no; \
83 sane_makeflags=$$MAKEFLAGS; \
84 if $(am__is_gnu_make); then \
85 sane_makeflags=$$MFLAGS; \
86 else \
87 case $$MAKEFLAGS in \
88 *\\[\ \ ]*) \
89 bs=\\; \
90 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
91 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
92 esac; \
93 fi; \
94 skip_next=no; \
95 strip_trailopt () \
96 { \
97 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
98 }; \
99 for flg in $$sane_makeflags; do \
100 test $$skip_next = yes && { skip_next=no; continue; }; \
101 case $$flg in \
102 *=*|--*) continue;; \
103 -*I) strip_trailopt 'I'; skip_next=yes;; \
104 -*I?*) strip_trailopt 'I';; \
105 -*O) strip_trailopt 'O'; skip_next=yes;; \
106 -*O?*) strip_trailopt 'O';; \
107 -*l) strip_trailopt 'l'; skip_next=yes;; \
108 -*l?*) strip_trailopt 'l';; \
109 -[dEDm]) skip_next=yes;; \
110 -[JT]) skip_next=yes;; \
111 esac; \
112 case $$flg in \
113 *$$target_option*) has_opt=yes; break;; \
114 esac; \
115 done; \
116 test $$has_opt = yes
117 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
118 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
119 pkgdatadir = $(datadir)/@PACKAGE@
120 pkgincludedir = $(includedir)/@PACKAGE@
121 pkglibdir = $(libdir)/@PACKAGE@
122 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
123 install_sh_DATA = $(install_sh) -c -m 644
124 install_sh_PROGRAM = $(install_sh) -c
125 install_sh_SCRIPT = $(install_sh) -c
126 INSTALL_HEADER = $(INSTALL_DATA)
127 transform = $(program_transform_name)
128 NORMAL_INSTALL = :
129 PRE_INSTALL = :
130 POST_INSTALL = :
131 NORMAL_UNINSTALL = :
132 PRE_UNINSTALL = :
133 POST_UNINSTALL = :
134 build_triplet = @build@
135 host_triplet = @host@
136 @SHLIBS_IN_BINDIR_TRUE@am__append_1 = -DINSTALLDIR=\"$(bindir)\"
137 @SHLIBS_IN_BINDIR_FALSE@am__append_2 = -DINSTALLDIR=\"$(libdir)\"
138 subdir = lib
139 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
140 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
141 $(top_srcdir)/m4/absolute-header.m4 \
142 $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
143 $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \
144 $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \
145 $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \
146 $(top_srcdir)/m4/gnulib-common.m4 \
147 $(top_srcdir)/m4/gnulib-comp.m4 \
148 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \
149 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
150 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
151 $(top_srcdir)/m4/malloc.m4 \
152 $(top_srcdir)/m4/manywarnings-c++.m4 \
153 $(top_srcdir)/m4/manywarnings.m4 \
154 $(top_srcdir)/m4/msvc-inval.m4 \
155 $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \
156 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/rawmemchr.m4 \
157 $(top_srcdir)/m4/relocatable-lib.m4 \
158 $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \
159 $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
160 $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \
161 $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \
162 $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \
163 $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
164 $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
165 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
166 $(ACLOCAL_M4)
167 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
168 mkinstalldirs = $(install_sh) -d
169 CONFIG_HEADER = $(top_builddir)/config.h
170 CONFIG_CLEAN_FILES =
171 CONFIG_CLEAN_VPATH_FILES =
172 LTLIBRARIES = $(noinst_LTLIBRARIES)
173 am__DEPENDENCIES_1 =
174 am_libgnu_la_OBJECTS = unistd.lo
175 libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS)
176 AM_V_lt = $(am__v_lt_@AM_V@)
177 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
178 am__v_lt_0 = --silent
179 am__v_lt_1 =
180 libgnu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
181 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
182 $(libgnu_la_LDFLAGS) $(LDFLAGS) -o $@
183 AM_V_P = $(am__v_P_@AM_V@)
184 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
185 am__v_P_0 = false
186 am__v_P_1 = :
187 AM_V_GEN = $(am__v_GEN_@AM_V@)
188 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
189 am__v_GEN_0 = @echo " GEN " $@;
190 am__v_GEN_1 =
191 AM_V_at = $(am__v_at_@AM_V@)
192 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
193 am__v_at_0 = @
194 am__v_at_1 =
195 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
196 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
197 am__depfiles_maybe = depfiles
198 am__mv = mv -f
199 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
200 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
201 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
202 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
203 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
204 $(AM_CFLAGS) $(CFLAGS)
205 AM_V_CC = $(am__v_CC_@AM_V@)
206 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
207 am__v_CC_0 = @echo " CC " $@;
208 am__v_CC_1 =
209 CCLD = $(CC)
210 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
211 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
212 $(AM_LDFLAGS) $(LDFLAGS) -o $@
213 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
214 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
215 am__v_CCLD_0 = @echo " CCLD " $@;
216 am__v_CCLD_1 =
217 SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES)
218 DIST_SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES)
219 am__can_run_installinfo = \
220 case $$AM_UPDATE_INFO_DIR in \
221 n|no|NO) false;; \
222 *) (install-info --version) >/dev/null 2>&1;; \
223 esac
224 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
225 # Read a list of newline-separated strings from the standard input,
226 # and print each of them once, without duplicates. Input order is
227 # *not* preserved.
228 am__uniquify_input = $(AWK) '\
229 BEGIN { nonempty = 0; } \
230 { items[$$0] = 1; nonempty = 1; } \
231 END { if (nonempty) { for (i in items) print i; }; } \
232 '
233 # Make sure the list of sources is unique. This is necessary because,
234 # e.g., the same source file might be shared among _SOURCES variables
235 # for different programs/libraries.
236 am__define_uniq_tagged_files = \
237 list='$(am__tagged_files)'; \
238 unique=`for i in $$list; do \
239 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
240 done | $(am__uniquify_input)`
241 ETAGS = etags
242 CTAGS = ctags
243 am__DIST_COMMON = $(srcdir)/Makefile.gnulib $(srcdir)/Makefile.in \
244 $(top_srcdir)/build-aux/depcomp
245 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
246 pkglibexecdir = @pkglibexecdir@
247 ACLOCAL = @ACLOCAL@
248 AMTAR = @AMTAR@
249 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
250 AR = @AR@
251 ARFLAGS = @ARFLAGS@
252 AS = @AS@
253 AUTOCONF = @AUTOCONF@
254 AUTOHEADER = @AUTOHEADER@
255 AUTOMAKE = @AUTOMAKE@
256 AWK = @AWK@
257 CC = @CC@
258 CCDEPMODE = @CCDEPMODE@
259 CFLAGS = @CFLAGS@
260 CPP = @CPP@
261 CPPFLAGS = @CPPFLAGS@
262 CXX = @CXX@
263 CXXCPP = @CXXCPP@
264 CXXDEPMODE = @CXXDEPMODE@
265 CXXFLAGS = @CXXFLAGS@
266 CYGPATH_W = @CYGPATH_W@
267 DEFS = @DEFS@ -DNO_XMALLOC
268 DEPDIR = @DEPDIR@
269 DLLTOOL = @DLLTOOL@
270 DSYMUTIL = @DSYMUTIL@
271 DUMPBIN = @DUMPBIN@
272 ECHO_C = @ECHO_C@
273 ECHO_N = @ECHO_N@
274 ECHO_T = @ECHO_T@
275 EGREP = @EGREP@
276 ENCHANT_CFLAGS = @ENCHANT_CFLAGS@
277 ENCHANT_LIBS = @ENCHANT_LIBS@
278 ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@
279 ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@
280 ENCHANT_MINOR_VERSION = @ENCHANT_MINOR_VERSION@
281 EXEEXT = @EXEEXT@
282 FGREP = @FGREP@
283 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
284 GETOPT_H = @GETOPT_H@
285 GLIB_CFLAGS = @GLIB_CFLAGS@
286 GLIB_LIBS = @GLIB_LIBS@
287 GNULIB_ATOLL = @GNULIB_ATOLL@
288 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
289 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
290 GNULIB_CHDIR = @GNULIB_CHDIR@
291 GNULIB_CHOWN = @GNULIB_CHOWN@
292 GNULIB_CLOSE = @GNULIB_CLOSE@
293 GNULIB_DUP = @GNULIB_DUP@
294 GNULIB_DUP2 = @GNULIB_DUP2@
295 GNULIB_DUP3 = @GNULIB_DUP3@
296 GNULIB_ENVIRON = @GNULIB_ENVIRON@
297 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
298 GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
299 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
300 GNULIB_FCHDIR = @GNULIB_FCHDIR@
301 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
302 GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
303 GNULIB_FFSL = @GNULIB_FFSL@
304 GNULIB_FFSLL = @GNULIB_FFSLL@
305 GNULIB_FLOCK = @GNULIB_FLOCK@
306 GNULIB_FSYNC = @GNULIB_FSYNC@
307 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
308 GNULIB_GETCWD = @GNULIB_GETCWD@
309 GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
310 GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
311 GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
312 GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
313 GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
314 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
315 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
316 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
317 GNULIB_GETPASS = @GNULIB_GETPASS@
318 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
319 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
320 GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
321 GNULIB_GRANTPT = @GNULIB_GRANTPT@
322 GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
323 GNULIB_ISATTY = @GNULIB_ISATTY@
324 GNULIB_LCHOWN = @GNULIB_LCHOWN@
325 GNULIB_LINK = @GNULIB_LINK@
326 GNULIB_LINKAT = @GNULIB_LINKAT@
327 GNULIB_LSEEK = @GNULIB_LSEEK@
328 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
329 GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
330 GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
331 GNULIB_MBSCHR = @GNULIB_MBSCHR@
332 GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
333 GNULIB_MBSLEN = @GNULIB_MBSLEN@
334 GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
335 GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
336 GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
337 GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
338 GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
339 GNULIB_MBSSEP = @GNULIB_MBSSEP@
340 GNULIB_MBSSPN = @GNULIB_MBSSPN@
341 GNULIB_MBSSTR = @GNULIB_MBSSTR@
342 GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
343 GNULIB_MBTOWC = @GNULIB_MBTOWC@
344 GNULIB_MEMCHR = @GNULIB_MEMCHR@
345 GNULIB_MEMMEM = @GNULIB_MEMMEM@
346 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
347 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
348 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
349 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
350 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
351 GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
352 GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
353 GNULIB_PIPE = @GNULIB_PIPE@
354 GNULIB_PIPE2 = @GNULIB_PIPE2@
355 GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
356 GNULIB_PREAD = @GNULIB_PREAD@
357 GNULIB_PTSNAME = @GNULIB_PTSNAME@
358 GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
359 GNULIB_PUTENV = @GNULIB_PUTENV@
360 GNULIB_PWRITE = @GNULIB_PWRITE@
361 GNULIB_QSORT_R = @GNULIB_QSORT_R@
362 GNULIB_RANDOM = @GNULIB_RANDOM@
363 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
364 GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
365 GNULIB_READ = @GNULIB_READ@
366 GNULIB_READLINK = @GNULIB_READLINK@
367 GNULIB_READLINKAT = @GNULIB_READLINKAT@
368 GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
369 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
370 GNULIB_REALPATH = @GNULIB_REALPATH@
371 GNULIB_RMDIR = @GNULIB_RMDIR@
372 GNULIB_RPMATCH = @GNULIB_RPMATCH@
373 GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
374 GNULIB_SETENV = @GNULIB_SETENV@
375 GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
376 GNULIB_SLEEP = @GNULIB_SLEEP@
377 GNULIB_STPCPY = @GNULIB_STPCPY@
378 GNULIB_STPNCPY = @GNULIB_STPNCPY@
379 GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
380 GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
381 GNULIB_STRDUP = @GNULIB_STRDUP@
382 GNULIB_STRERROR = @GNULIB_STRERROR@
383 GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
384 GNULIB_STRNCAT = @GNULIB_STRNCAT@
385 GNULIB_STRNDUP = @GNULIB_STRNDUP@
386 GNULIB_STRNLEN = @GNULIB_STRNLEN@
387 GNULIB_STRPBRK = @GNULIB_STRPBRK@
388 GNULIB_STRSEP = @GNULIB_STRSEP@
389 GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
390 GNULIB_STRSTR = @GNULIB_STRSTR@
391 GNULIB_STRTOD = @GNULIB_STRTOD@
392 GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
393 GNULIB_STRTOLL = @GNULIB_STRTOLL@
394 GNULIB_STRTOULL = @GNULIB_STRTOULL@
395 GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
396 GNULIB_SYMLINK = @GNULIB_SYMLINK@
397 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
398 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
399 GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
400 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
401 GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
402 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
403 GNULIB_UNLINK = @GNULIB_UNLINK@
404 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
405 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
406 GNULIB_UNSETENV = @GNULIB_UNSETENV@
407 GNULIB_USLEEP = @GNULIB_USLEEP@
408 GNULIB_WCTOMB = @GNULIB_WCTOMB@
409 GNULIB_WRITE = @GNULIB_WRITE@
410 GNULIB__EXIT = @GNULIB__EXIT@
411 GREP = @GREP@
412 HAVE_ATOLL = @HAVE_ATOLL@
413 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
414 HAVE_CHOWN = @HAVE_CHOWN@
415 HAVE_CXX11 = @HAVE_CXX11@
416 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
417 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
418 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
419 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
420 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
421 HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
422 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
423 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
424 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
425 HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
426 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
427 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
428 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
429 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
430 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
431 HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
432 HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
433 HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
434 HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
435 HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
436 HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
437 HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
438 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
439 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
440 HAVE_DUP2 = @HAVE_DUP2@
441 HAVE_DUP3 = @HAVE_DUP3@
442 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
443 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
444 HAVE_FACCESSAT = @HAVE_FACCESSAT@
445 HAVE_FCHDIR = @HAVE_FCHDIR@
446 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
447 HAVE_FDATASYNC = @HAVE_FDATASYNC@
448 HAVE_FFSL = @HAVE_FFSL@
449 HAVE_FFSLL = @HAVE_FFSLL@
450 HAVE_FLOCK = @HAVE_FLOCK@
451 HAVE_FSYNC = @HAVE_FSYNC@
452 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
453 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
454 HAVE_GETGROUPS = @HAVE_GETGROUPS@
455 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
456 HAVE_GETLOGIN = @HAVE_GETLOGIN@
457 HAVE_GETOPT_H = @HAVE_GETOPT_H@
458 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
459 HAVE_GETPASS = @HAVE_GETPASS@
460 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
461 HAVE_GRANTPT = @HAVE_GRANTPT@
462 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
463 HAVE_LCHOWN = @HAVE_LCHOWN@
464 HAVE_LINK = @HAVE_LINK@
465 HAVE_LINKAT = @HAVE_LINKAT@
466 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
467 HAVE_MBSLEN = @HAVE_MBSLEN@
468 HAVE_MEMCHR = @HAVE_MEMCHR@
469 HAVE_MEMPCPY = @HAVE_MEMPCPY@
470 HAVE_MKDTEMP = @HAVE_MKDTEMP@
471 HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
472 HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
473 HAVE_MKSTEMP = @HAVE_MKSTEMP@
474 HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
475 HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
476 HAVE_OS_H = @HAVE_OS_H@
477 HAVE_PIPE = @HAVE_PIPE@
478 HAVE_PIPE2 = @HAVE_PIPE2@
479 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
480 HAVE_PREAD = @HAVE_PREAD@
481 HAVE_PTSNAME = @HAVE_PTSNAME@
482 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
483 HAVE_PWRITE = @HAVE_PWRITE@
484 HAVE_QSORT_R = @HAVE_QSORT_R@
485 HAVE_RANDOM = @HAVE_RANDOM@
486 HAVE_RANDOM_H = @HAVE_RANDOM_H@
487 HAVE_RANDOM_R = @HAVE_RANDOM_R@
488 HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
489 HAVE_READLINK = @HAVE_READLINK@
490 HAVE_READLINKAT = @HAVE_READLINKAT@
491 HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@
492 HAVE_REALPATH = @HAVE_REALPATH@
493 HAVE_RPMATCH = @HAVE_RPMATCH@
494 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
495 HAVE_SETENV = @HAVE_SETENV@
496 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
497 HAVE_SLEEP = @HAVE_SLEEP@
498 HAVE_STPCPY = @HAVE_STPCPY@
499 HAVE_STPNCPY = @HAVE_STPNCPY@
500 HAVE_STRCASESTR = @HAVE_STRCASESTR@
501 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
502 HAVE_STRPBRK = @HAVE_STRPBRK@
503 HAVE_STRSEP = @HAVE_STRSEP@
504 HAVE_STRTOD = @HAVE_STRTOD@
505 HAVE_STRTOLL = @HAVE_STRTOLL@
506 HAVE_STRTOULL = @HAVE_STRTOULL@
507 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
508 HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
509 HAVE_SYMLINK = @HAVE_SYMLINK@
510 HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
511 HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
512 HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@
513 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
514 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
515 HAVE_UNISTD_H = @HAVE_UNISTD_H@
516 HAVE_UNLINKAT = @HAVE_UNLINKAT@
517 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
518 HAVE_USLEEP = @HAVE_USLEEP@
519 HAVE_WCHAR_T = @HAVE_WCHAR_T@
520 HAVE__EXIT = @HAVE__EXIT@
521 HUNSPELL_CFLAGS = @HUNSPELL_CFLAGS@
522 HUNSPELL_LIBS = @HUNSPELL_LIBS@
523 INCLUDE_NEXT = @INCLUDE_NEXT@
524 INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
525 INSTALL = @INSTALL@
526 INSTALL_DATA = @INSTALL_DATA@
527 INSTALL_PROGRAM = @INSTALL_PROGRAM@
528 INSTALL_SCRIPT = @INSTALL_SCRIPT@
529 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
530 ISYSTEM = @ISYSTEM@
531 LD = @LD@
532 LDFLAGS = @LDFLAGS@
533 LIBINTL = @LIBINTL@
534 LIBOBJS = @LIBOBJS@
535 LIBS = @LIBS@
536 LIBTOOL = @LIBTOOL@
537 LIPO = @LIPO@
538 LN_S = @LN_S@
539 LTLIBINTL = @LTLIBINTL@
540 LTLIBOBJS = @LTLIBOBJS@
541 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
542 MAKEINFO = @MAKEINFO@
543 MANIFEST_TOOL = @MANIFEST_TOOL@
544 MKDIR_P = @MKDIR_P@
545 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
546 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
547 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
548 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
549 NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@
550 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
551 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
552 NEXT_GETOPT_H = @NEXT_GETOPT_H@
553 NEXT_STDDEF_H = @NEXT_STDDEF_H@
554 NEXT_STDLIB_H = @NEXT_STDLIB_H@
555 NEXT_STRING_H = @NEXT_STRING_H@
556 NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@
557 NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
558 NEXT_UNISTD_H = @NEXT_UNISTD_H@
559 NM = @NM@
560 NMEDIT = @NMEDIT@
561 NUSPELL_CFLAGS = @NUSPELL_CFLAGS@
562 NUSPELL_LIBS = @NUSPELL_LIBS@
563 OBJCXX = @OBJCXX@
564 OBJCXXCPP = @OBJCXXCPP@
565 OBJCXXDEPMODE = @OBJCXXDEPMODE@
566 OBJCXXFLAGS = @OBJCXXFLAGS@
567 OBJDUMP = @OBJDUMP@
568 OBJEXT = @OBJEXT@
569 OTOOL = @OTOOL@
570 OTOOL64 = @OTOOL64@
571 PACKAGE = @PACKAGE@
572 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
573 PACKAGE_NAME = @PACKAGE_NAME@
574 PACKAGE_STRING = @PACKAGE_STRING@
575 PACKAGE_TARNAME = @PACKAGE_TARNAME@
576 PACKAGE_URL = @PACKAGE_URL@
577 PACKAGE_VERSION = @PACKAGE_VERSION@
578 PATH_SEPARATOR = @PATH_SEPARATOR@
579 PKG_CONFIG = @PKG_CONFIG@
580 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
581 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
582 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
583 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
584 RANLIB = @RANLIB@
585 RC = @RC@
586 RELOCATABLE = @RELOCATABLE@
587 REPLACE_CALLOC = @REPLACE_CALLOC@
588 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
589 REPLACE_CHOWN = @REPLACE_CHOWN@
590 REPLACE_CLOSE = @REPLACE_CLOSE@
591 REPLACE_DUP = @REPLACE_DUP@
592 REPLACE_DUP2 = @REPLACE_DUP2@
593 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
594 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
595 REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
596 REPLACE_GETCWD = @REPLACE_GETCWD@
597 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
598 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
599 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
600 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
601 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
602 REPLACE_GETPASS = @REPLACE_GETPASS@
603 REPLACE_ISATTY = @REPLACE_ISATTY@
604 REPLACE_LCHOWN = @REPLACE_LCHOWN@
605 REPLACE_LINK = @REPLACE_LINK@
606 REPLACE_LINKAT = @REPLACE_LINKAT@
607 REPLACE_LSEEK = @REPLACE_LSEEK@
608 REPLACE_MALLOC = @REPLACE_MALLOC@
609 REPLACE_MBTOWC = @REPLACE_MBTOWC@
610 REPLACE_MEMCHR = @REPLACE_MEMCHR@
611 REPLACE_MEMMEM = @REPLACE_MEMMEM@
612 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
613 REPLACE_NULL = @REPLACE_NULL@
614 REPLACE_PREAD = @REPLACE_PREAD@
615 REPLACE_PTSNAME = @REPLACE_PTSNAME@
616 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
617 REPLACE_PUTENV = @REPLACE_PUTENV@
618 REPLACE_PWRITE = @REPLACE_PWRITE@
619 REPLACE_QSORT_R = @REPLACE_QSORT_R@
620 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
621 REPLACE_READ = @REPLACE_READ@
622 REPLACE_READLINK = @REPLACE_READLINK@
623 REPLACE_READLINKAT = @REPLACE_READLINKAT@
624 REPLACE_REALLOC = @REPLACE_REALLOC@
625 REPLACE_REALPATH = @REPLACE_REALPATH@
626 REPLACE_RMDIR = @REPLACE_RMDIR@
627 REPLACE_SETENV = @REPLACE_SETENV@
628 REPLACE_SLEEP = @REPLACE_SLEEP@
629 REPLACE_STPNCPY = @REPLACE_STPNCPY@
630 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
631 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
632 REPLACE_STRDUP = @REPLACE_STRDUP@
633 REPLACE_STRERROR = @REPLACE_STRERROR@
634 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
635 REPLACE_STRNCAT = @REPLACE_STRNCAT@
636 REPLACE_STRNDUP = @REPLACE_STRNDUP@
637 REPLACE_STRNLEN = @REPLACE_STRNLEN@
638 REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
639 REPLACE_STRSTR = @REPLACE_STRSTR@
640 REPLACE_STRTOD = @REPLACE_STRTOD@
641 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
642 REPLACE_SYMLINK = @REPLACE_SYMLINK@
643 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
644 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
645 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
646 REPLACE_UNLINK = @REPLACE_UNLINK@
647 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
648 REPLACE_UNSETENV = @REPLACE_UNSETENV@
649 REPLACE_USLEEP = @REPLACE_USLEEP@
650 REPLACE_WCTOMB = @REPLACE_WCTOMB@
651 REPLACE_WRITE = @REPLACE_WRITE@
652 SED = @SED@
653 SET_MAKE = @SET_MAKE@
654 SHELL = @SHELL@
655 STDDEF_H = @STDDEF_H@
656 STRIP = @STRIP@
657 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
658 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
659 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
660 UNITTESTPP_CFLAGS = @UNITTESTPP_CFLAGS@
661 UNITTESTPP_LIBS = @UNITTESTPP_LIBS@
662 VERSION = @VERSION@
663 VERSION_INFO = @VERSION_INFO@
664 VOIKKO_CFLAGS = @VOIKKO_CFLAGS@
665 VOIKKO_LIBS = @VOIKKO_LIBS@
666 WARN_CFLAGS = @WARN_CFLAGS@
667 WARN_CXXFLAGS = @WARN_CXXFLAGS@
668 WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
669 WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
670 ZEMBEREK_CFLAGS = @ZEMBEREK_CFLAGS@
671 ZEMBEREK_LIBS = @ZEMBEREK_LIBS@
672 abs_builddir = @abs_builddir@
673 abs_srcdir = @abs_srcdir@
674 abs_top_builddir = @abs_top_builddir@
675 abs_top_srcdir = @abs_top_srcdir@
676 ac_ct_AR = @ac_ct_AR@
677 ac_ct_CC = @ac_ct_CC@
678 ac_ct_CXX = @ac_ct_CXX@
679 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
680 ac_ct_OBJCXX = @ac_ct_OBJCXX@
681 am__include = @am__include@
682 am__leading_dot = @am__leading_dot@
683 am__quote = @am__quote@
684 am__tar = @am__tar@
685 am__untar = @am__untar@
686 bindir = @bindir@
687 build = @build@
688 build_alias = @build_alias@
689 build_cpu = @build_cpu@
690 build_os = @build_os@
691 build_vendor = @build_vendor@
692 builddir = @builddir@
693 datadir = @datadir@
694 datarootdir = @datarootdir@
695 docdir = @docdir@
696 dvidir = @dvidir@
697 exec_prefix = @exec_prefix@
698 gl_LIBOBJS = @gl_LIBOBJS@
699 gl_LTLIBOBJS = @gl_LTLIBOBJS@
700 gltests_LIBOBJS = @gltests_LIBOBJS@
701 gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
702 gltests_WITNESS = @gltests_WITNESS@
703 host = @host@
704 host_alias = @host_alias@
705 host_cpu = @host_cpu@
706 host_os = @host_os@
707 host_vendor = @host_vendor@
708 htmldir = @htmldir@
709 includedir = @includedir@
710 infodir = @infodir@
711 install_sh = @install_sh@
712 libdir = @libdir@
713 libexecdir = @libexecdir@
714 lispdir = @lispdir@
715 localedir = @localedir@
716 localstatedir = @localstatedir@
717 mandir = @mandir@
718 mkdir_p = @mkdir_p@
719 objdir = @objdir@
720 oldincludedir = @oldincludedir@
721 pdfdir = @pdfdir@
722 prefix = @prefix@
723 program_transform_name = @program_transform_name@
724 psdir = @psdir@
725 runstatedir = @runstatedir@
726 sbindir = @sbindir@
727 sharedstatedir = @sharedstatedir@
728 shlibext = @shlibext@
729 srcdir = @srcdir@
730 sysconfdir = @sysconfdir@
731 target_alias = @target_alias@
732 top_build_prefix = @top_build_prefix@
733 top_builddir = @top_builddir@
734 top_srcdir = @top_srcdir@
735
736 # Initialize variables that will be added to by Makefile.gnulib
737
738 #if GNU_MAKE
739 # [nicer features that work only with GNU Make]
740 #else
741 # [fallback features that work in any 'make' implementation; see
742 # http://www.opengroup.org/susv3/utilities/make.html
743 # for the 2004 POSIX specification]
744 #endif
745 EXTRA_DIST = $(top_srcdir)/build-aux/bootstrap.in \
746 $(top_srcdir)/build-aux/extract-trace flock.c \
747 $(top_srcdir)/build-aux/funclib.sh getopt-cdefs.in.h \
748 getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h \
749 getopt.c getopt.in.h getopt1.c getopt_int.h \
750 $(top_srcdir)/build-aux/inline-source malloc.c msvc-inval.c \
751 msvc-inval.h msvc-nothrow.c msvc-nothrow.h \
752 $(top_srcdir)/build-aux/options-parser rawmemchr.c \
753 rawmemchr.valgrind relocatable.c relocatable.h \
754 relocatable.valgrind _Noreturn.h arg-nonnull.h c++defs.h \
755 unused-parameter.h warn-on-use.h stddef.in.h stdlib.in.h \
756 strchrnul.c strchrnul.valgrind strdup.c string.in.h \
757 sys_file.in.h sys_types.in.h unistd.in.h
758 BUILT_SOURCES = configmake.h $(GETOPT_H) $(GETOPT_CDEFS_H) $(STDDEF_H) \
759 stdlib.h string.h sys/file.h sys/types.h unistd.h
760 MOSTLYCLEANFILES = core *.stackdump getopt.h getopt.h-t getopt-cdefs.h \
761 getopt-cdefs.h-t stddef.h stddef.h-t stdlib.h stdlib.h-t \
762 string.h string.h-t sys/file.h sys/file.h-t sys/types.h \
763 sys/types.h-t unistd.h unistd.h-t
764 MOSTLYCLEANDIRS = sys
765 CLEANFILES = configmake.h configmake.h-t
766 # No GNU Make output.
767 noinst_LTLIBRARIES = libgnu.la
768
769 # Set compilation flags needed for relocatable.c used by relocatable-lib-lgpl
770 AM_CPPFLAGS = -DIN_LIBRARY -DENABLE_COSTLY_RELOCATABLE $(am__append_1) \
771 $(am__append_2)
772 libgnu_la_SOURCES = gettext.h unistd.c
773 libgnu_la_LIBADD = $(gl_LTLIBOBJS)
774 libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
775 EXTRA_libgnu_la_SOURCES = flock.c getopt.c getopt1.c malloc.c \
776 msvc-inval.c msvc-nothrow.c rawmemchr.c relocatable.c \
777 strchrnul.c strdup.c
778 libgnu_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(LTLIBINTL)
779
780 # Use this preprocessor expression to decide whether #include_next works.
781 # Do not rely on a 'configure'-time test for this, since the expression
782 # might appear in an installed header, which is used by some other compiler.
783 HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
784
785 # Because this Makefile snippet defines a variable used by other
786 # gnulib Makefile snippets, it must be present in all makefiles that
787 # need it. This is ensured by the applicability 'all' defined above.
788 _NORETURN_H = $(srcdir)/_Noreturn.h
789
790 # Because this Makefile snippet defines a variable used by other
791 # gnulib Makefile snippets, it must be present in all makefiles that
792 # need it. This is ensured by the applicability 'all' defined above.
793 ARG_NONNULL_H = $(srcdir)/arg-nonnull.h
794
795 # Because this Makefile snippet defines a variable used by other
796 # gnulib Makefile snippets, it must be present in all makefiles that
797 # need it. This is ensured by the applicability 'all' defined above.
798 CXXDEFS_H = $(srcdir)/c++defs.h
799
800 # Because this Makefile snippet defines a variable used by other
801 # gnulib Makefile snippets, it must be present in all makefiles that
802 # need it. This is ensured by the applicability 'all' defined above.
803 UNUSED_PARAMETER_H = $(srcdir)/unused-parameter.h
804
805 # Because this Makefile snippet defines a variable used by other
806 # gnulib Makefile snippets, it must be present in all makefiles that
807 # need it. This is ensured by the applicability 'all' defined above.
808 WARN_ON_USE_H = $(srcdir)/warn-on-use.h
809 all: $(BUILT_SOURCES)
810 $(MAKE) $(AM_MAKEFLAGS) all-am
811
812 .SUFFIXES:
813 .SUFFIXES: .c .lo .o .obj
814 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/Makefile.gnulib $(am__configure_deps)
815 @for dep in $?; do \
816 case '$(am__configure_deps)' in \
817 *$$dep*) \
818 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
819 && { if test -f $@; then exit 0; else break; fi; }; \
820 exit 1;; \
821 esac; \
822 done; \
823 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
824 $(am__cd) $(top_srcdir) && \
825 $(AUTOMAKE) --gnu lib/Makefile
826 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
827 @case '$?' in \
828 *config.status*) \
829 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
830 *) \
831 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
832 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
833 esac;
834 $(srcdir)/Makefile.gnulib $(am__empty):
835
836 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
837 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
838
839 $(top_srcdir)/configure: $(am__configure_deps)
840 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
841 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
842 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
843 $(am__aclocal_m4_deps):
844
845 clean-noinstLTLIBRARIES:
846 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
847 @list='$(noinst_LTLIBRARIES)'; \
848 locs=`for p in $$list; do echo $$p; done | \
849 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
850 sort -u`; \
851 test -z "$$locs" || { \
852 echo rm -f $${locs}; \
853 rm -f $${locs}; \
854 }
855
856 libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) $(EXTRA_libgnu_la_DEPENDENCIES)
857 $(AM_V_CCLD)$(libgnu_la_LINK) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS)
858
859 mostlyclean-compile:
860 -rm -f *.$(OBJEXT)
861
862 distclean-compile:
863 -rm -f *.tab.c
864
865 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Plo@am__quote@
866 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@
867 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Plo@am__quote@
868 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@
869 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Plo@am__quote@
870 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Plo@am__quote@
871 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Plo@am__quote@
872 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relocatable.Plo@am__quote@
873 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Plo@am__quote@
874 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@
875 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Plo@am__quote@
876
877 .c.o:
878 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
879 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
880 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
881 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
882 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
883 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
884
885 .c.obj:
886 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
887 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
888 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
889 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
890 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
891 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
892
893 .c.lo:
894 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
895 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
896 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
897 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
898 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
899 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
900
901 mostlyclean-libtool:
902 -rm -f *.lo
903
904 clean-libtool:
905 -rm -rf .libs _libs
906
907 ID: $(am__tagged_files)
908 $(am__define_uniq_tagged_files); mkid -fID $$unique
909 tags: tags-am
910 TAGS: tags
911
912 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
913 set x; \
914 here=`pwd`; \
915 $(am__define_uniq_tagged_files); \
916 shift; \
917 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
918 test -n "$$unique" || unique=$$empty_fix; \
919 if test $$# -gt 0; then \
920 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
921 "$$@" $$unique; \
922 else \
923 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
924 $$unique; \
925 fi; \
926 fi
927 ctags: ctags-am
928
929 CTAGS: ctags
930 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
931 $(am__define_uniq_tagged_files); \
932 test -z "$(CTAGS_ARGS)$$unique" \
933 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
934 $$unique
935
936 GTAGS:
937 here=`$(am__cd) $(top_builddir) && pwd` \
938 && $(am__cd) $(top_srcdir) \
939 && gtags -i $(GTAGS_ARGS) "$$here"
940 cscopelist: cscopelist-am
941
942 cscopelist-am: $(am__tagged_files)
943 list='$(am__tagged_files)'; \
944 case "$(srcdir)" in \
945 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
946 *) sdir=$(subdir)/$(srcdir) ;; \
947 esac; \
948 for i in $$list; do \
949 if test -f "$$i"; then \
950 echo "$(subdir)/$$i"; \
951 else \
952 echo "$$sdir/$$i"; \
953 fi; \
954 done >> $(top_builddir)/cscope.files
955
956 distclean-tags:
957 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
958
959 distdir: $(DISTFILES)
960 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
961 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
962 list='$(DISTFILES)'; \
963 dist_files=`for file in $$list; do echo $$file; done | \
964 sed -e "s|^$$srcdirstrip/||;t" \
965 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
966 case $$dist_files in \
967 */*) $(MKDIR_P) `echo "$$dist_files" | \
968 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
969 sort -u` ;; \
970 esac; \
971 for file in $$dist_files; do \
972 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
973 if test -d $$d/$$file; then \
974 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
975 if test -d "$(distdir)/$$file"; then \
976 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
977 fi; \
978 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
979 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
980 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
981 fi; \
982 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
983 else \
984 test -f "$(distdir)/$$file" \
985 || cp -p $$d/$$file "$(distdir)/$$file" \
986 || exit 1; \
987 fi; \
988 done
989 check-am: all-am
990 check: $(BUILT_SOURCES)
991 $(MAKE) $(AM_MAKEFLAGS) check-am
992 all-am: Makefile $(LTLIBRARIES)
993 installdirs:
994 install: $(BUILT_SOURCES)
995 $(MAKE) $(AM_MAKEFLAGS) install-am
996 install-exec: install-exec-am
997 install-data: install-data-am
998 uninstall: uninstall-am
999
1000 install-am: all-am
1001 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1002
1003 installcheck: installcheck-am
1004 install-strip:
1005 if test -z '$(STRIP)'; then \
1006 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1007 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1008 install; \
1009 else \
1010 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1011 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1012 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
1013 fi
1014 mostlyclean-generic:
1015 -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
1016
1017 clean-generic:
1018 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
1019
1020 distclean-generic:
1021 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1022 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1023
1024 maintainer-clean-generic:
1025 @echo "This command is intended for maintainers to use"
1026 @echo "it deletes files that may require special tools to rebuild."
1027 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
1028 clean: clean-am
1029
1030 clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
1031 mostlyclean-am
1032
1033 distclean: distclean-am
1034 -rm -rf ./$(DEPDIR)
1035 -rm -f Makefile
1036 distclean-am: clean-am distclean-compile distclean-generic \
1037 distclean-tags
1038
1039 dvi: dvi-am
1040
1041 dvi-am:
1042
1043 html: html-am
1044
1045 html-am:
1046
1047 info: info-am
1048
1049 info-am:
1050
1051 install-data-am:
1052
1053 install-dvi: install-dvi-am
1054
1055 install-dvi-am:
1056
1057 install-exec-am:
1058
1059 install-html: install-html-am
1060
1061 install-html-am:
1062
1063 install-info: install-info-am
1064
1065 install-info-am:
1066
1067 install-man:
1068
1069 install-pdf: install-pdf-am
1070
1071 install-pdf-am:
1072
1073 install-ps: install-ps-am
1074
1075 install-ps-am:
1076
1077 installcheck-am:
1078
1079 maintainer-clean: maintainer-clean-am
1080 -rm -rf ./$(DEPDIR)
1081 -rm -f Makefile
1082 maintainer-clean-am: distclean-am maintainer-clean-generic
1083
1084 mostlyclean: mostlyclean-am
1085
1086 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1087 mostlyclean-libtool mostlyclean-local
1088
1089 pdf: pdf-am
1090
1091 pdf-am:
1092
1093 ps: ps-am
1094
1095 ps-am:
1096
1097 uninstall-am:
1098
1099 .MAKE: all check install install-am install-strip
1100
1101 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
1102 clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
1103 ctags-am distclean distclean-compile distclean-generic \
1104 distclean-libtool distclean-tags distdir dvi dvi-am html \
1105 html-am info info-am install install-am install-data \
1106 install-data-am install-dvi install-dvi-am install-exec \
1107 install-exec-am install-html install-html-am install-info \
1108 install-info-am install-man install-pdf install-pdf-am \
1109 install-ps install-ps-am install-strip installcheck \
1110 installcheck-am installdirs maintainer-clean \
1111 maintainer-clean-generic mostlyclean mostlyclean-compile \
1112 mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
1113 pdf-am ps ps-am tags tags-am uninstall uninstall-am
1114
1115 .PRECIOUS: Makefile
1116
1117
1118 # Listed in the same order as the GNU makefile conventions, and
1119 # provided by autoconf 2.59c+ or 2.70.
1120 # The Automake-defined pkg* macros are appended, in the order
1121 # listed in the Automake 1.10a+ documentation.
1122 configmake.h: Makefile
1123 $(AM_V_GEN)rm -f $@-t && \
1124 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1125 echo '#define PREFIX "$(prefix)"'; \
1126 echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
1127 echo '#define BINDIR "$(bindir)"'; \
1128 echo '#define SBINDIR "$(sbindir)"'; \
1129 echo '#define LIBEXECDIR "$(libexecdir)"'; \
1130 echo '#define DATAROOTDIR "$(datarootdir)"'; \
1131 echo '#define DATADIR "$(datadir)"'; \
1132 echo '#define SYSCONFDIR "$(sysconfdir)"'; \
1133 echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
1134 echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
1135 echo '#define RUNSTATEDIR "$(runstatedir)"'; \
1136 echo '#define INCLUDEDIR "$(includedir)"'; \
1137 echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
1138 echo '#define DOCDIR "$(docdir)"'; \
1139 echo '#define INFODIR "$(infodir)"'; \
1140 echo '#define HTMLDIR "$(htmldir)"'; \
1141 echo '#define DVIDIR "$(dvidir)"'; \
1142 echo '#define PDFDIR "$(pdfdir)"'; \
1143 echo '#define PSDIR "$(psdir)"'; \
1144 echo '#define LIBDIR "$(libdir)"'; \
1145 echo '#define LISPDIR "$(lispdir)"'; \
1146 echo '#define LOCALEDIR "$(localedir)"'; \
1147 echo '#define MANDIR "$(mandir)"'; \
1148 echo '#define MANEXT "$(manext)"'; \
1149 echo '#define PKGDATADIR "$(pkgdatadir)"'; \
1150 echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
1151 echo '#define PKGLIBDIR "$(pkglibdir)"'; \
1152 echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
1153 } | sed '/""/d' > $@-t && \
1154 mv -f $@-t $@
1155
1156 # We need the following in order to create <getopt.h> when the system
1157 # doesn't have one that works with the given compiler.
1158 getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
1159 $(AM_V_GEN)rm -f $@-t $@ && \
1160 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1161 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1162 -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
1163 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1164 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1165 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1166 -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
1167 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1168 < $(srcdir)/getopt.in.h; \
1169 } > $@-t && \
1170 mv -f $@-t $@
1171
1172 getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
1173 $(AM_V_GEN)rm -f $@-t $@ && \
1174 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1175 sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
1176 < $(srcdir)/getopt-cdefs.in.h; \
1177 } > $@-t && \
1178 mv -f $@-t $@
1179
1180 # We need the following in order to create <stddef.h> when the system
1181 # doesn't have one that works with the given compiler.
1182 @GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status
1183 @GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
1184 @GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1185 @GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1186 @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1187 @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1188 @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1189 @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
1190 @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
1191 @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
1192 @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
1193 @GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \
1194 @GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \
1195 @GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@
1196 @GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status
1197 @GL_GENERATE_STDDEF_H_FALSE@ rm -f $@
1198
1199 # We need the following in order to create <stdlib.h> when the system
1200 # doesn't have one that works with the given compiler.
1201 stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
1202 $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1203 $(AM_V_GEN)rm -f $@-t $@ && \
1204 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1205 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1206 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1207 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1208 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1209 -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
1210 -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
1211 -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
1212 -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
1213 -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
1214 -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
1215 -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
1216 -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
1217 -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
1218 -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
1219 -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
1220 -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
1221 -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
1222 -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
1223 -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
1224 -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
1225 -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
1226 -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
1227 -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
1228 -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
1229 -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
1230 -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
1231 -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
1232 -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \
1233 -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
1234 -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
1235 -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
1236 -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
1237 -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
1238 -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
1239 -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
1240 -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
1241 -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
1242 -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
1243 -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
1244 < $(srcdir)/stdlib.in.h | \
1245 sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
1246 -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
1247 -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
1248 -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
1249 -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
1250 -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
1251 -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \
1252 -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
1253 -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
1254 -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
1255 -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
1256 -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
1257 -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
1258 -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
1259 -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
1260 -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
1261 -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
1262 -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
1263 -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
1264 -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \
1265 -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
1266 -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
1267 -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
1268 -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
1269 -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
1270 -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
1271 -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
1272 -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
1273 -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
1274 -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
1275 -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
1276 -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
1277 -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
1278 -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
1279 -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
1280 -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
1281 -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
1282 -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
1283 -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
1284 -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
1285 -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
1286 -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
1287 -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
1288 -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
1289 -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
1290 -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
1291 -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
1292 -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
1293 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
1294 -e '/definition of _Noreturn/r $(_NORETURN_H)' \
1295 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1296 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
1297 } > $@-t && \
1298 mv $@-t $@
1299
1300 # We need the following in order to create <string.h> when the system
1301 # doesn't have one that works with the given compiler.
1302 string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1303 $(AM_V_GEN)rm -f $@-t $@ && \
1304 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1305 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1306 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1307 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1308 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1309 -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
1310 -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
1311 -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
1312 -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
1313 -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
1314 -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
1315 -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
1316 -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
1317 -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
1318 -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
1319 -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
1320 -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
1321 -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
1322 -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
1323 -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
1324 -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
1325 -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
1326 -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
1327 -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
1328 -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
1329 -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
1330 -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
1331 -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
1332 -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
1333 -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
1334 -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
1335 -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
1336 -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
1337 -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
1338 -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
1339 -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
1340 -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
1341 -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
1342 -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
1343 -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
1344 -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
1345 -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
1346 -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
1347 -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
1348 < $(srcdir)/string.in.h | \
1349 sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
1350 -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
1351 -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
1352 -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
1353 -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
1354 -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
1355 -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
1356 -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
1357 -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
1358 -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
1359 -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
1360 -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
1361 -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
1362 -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
1363 -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
1364 -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
1365 -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
1366 -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
1367 -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
1368 -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
1369 -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
1370 -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
1371 -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
1372 -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
1373 -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
1374 -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
1375 -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
1376 -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
1377 -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
1378 -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
1379 -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
1380 -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
1381 -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
1382 -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
1383 -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
1384 -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
1385 -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
1386 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
1387 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1388 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
1389 < $(srcdir)/string.in.h; \
1390 } > $@-t && \
1391 mv $@-t $@
1392
1393 # We need the following in order to create <sys/file.h> when the system
1394 # has one that is incomplete.
1395 sys/file.h: sys_file.in.h $(top_builddir)/config.status $(WARN_ON_USE_H)
1396 $(AM_V_at)$(MKDIR_P) sys
1397 $(AM_V_GEN)rm -f $@-t $@ && \
1398 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1399 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1400 -e 's/@''HAVE_SYS_FILE_H''@/$(HAVE_SYS_FILE_H)/g' \
1401 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1402 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1403 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1404 -e 's|@''NEXT_SYS_FILE_H''@|$(NEXT_SYS_FILE_H)|g' \
1405 -e 's/@''HAVE_FLOCK''@/$(HAVE_FLOCK)/g' \
1406 -e 's/@''GNULIB_FLOCK''@/$(GNULIB_FLOCK)/g' \
1407 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
1408 < $(srcdir)/sys_file.in.h; \
1409 } > $@-t && \
1410 mv $@-t $@
1411
1412 # We need the following in order to create <sys/types.h> when the system
1413 # doesn't have one that works with the given compiler.
1414 sys/types.h: sys_types.in.h $(top_builddir)/config.status
1415 $(AM_V_at)$(MKDIR_P) sys
1416 $(AM_V_GEN)rm -f $@-t $@ && \
1417 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1418 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1419 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1420 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1421 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1422 -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
1423 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
1424 -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \
1425 < $(srcdir)/sys_types.in.h; \
1426 } > $@-t && \
1427 mv $@-t $@
1428
1429 # We need the following in order to create an empty placeholder for
1430 # <unistd.h> when the system doesn't have one.
1431 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1432 $(AM_V_GEN)rm -f $@-t $@ && \
1433 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1434 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1435 -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
1436 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1437 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1438 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1439 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
1440 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
1441 -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
1442 -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
1443 -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
1444 -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
1445 -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
1446 -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
1447 -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
1448 -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
1449 -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
1450 -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
1451 -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
1452 -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
1453 -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
1454 -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
1455 -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
1456 -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
1457 -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
1458 -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
1459 -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
1460 -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
1461 -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
1462 -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
1463 -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
1464 -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
1465 -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
1466 -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
1467 -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
1468 -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
1469 -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
1470 -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
1471 -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
1472 -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
1473 -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
1474 -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
1475 -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
1476 -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
1477 -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
1478 -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
1479 -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
1480 -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
1481 -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
1482 -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
1483 -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
1484 -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
1485 -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
1486 -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
1487 -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
1488 -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
1489 -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
1490 -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
1491 -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
1492 < $(srcdir)/unistd.in.h | \
1493 sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
1494 -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
1495 -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
1496 -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
1497 -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
1498 -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
1499 -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
1500 -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
1501 -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
1502 -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
1503 -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
1504 -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
1505 -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
1506 -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
1507 -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \
1508 -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
1509 -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
1510 -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
1511 -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
1512 -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
1513 -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
1514 -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
1515 -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
1516 -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
1517 -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
1518 -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
1519 -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
1520 -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
1521 -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
1522 -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
1523 -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
1524 -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
1525 -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
1526 -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
1527 -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
1528 -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \
1529 -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
1530 -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
1531 -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
1532 -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
1533 -e 's|@''HAVE_DECL_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|g' \
1534 -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
1535 -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
1536 -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
1537 | \
1538 sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
1539 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
1540 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
1541 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
1542 -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
1543 -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
1544 -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
1545 -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
1546 -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
1547 -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
1548 -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
1549 -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
1550 -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
1551 -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \
1552 -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
1553 -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
1554 -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
1555 -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
1556 -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
1557 -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
1558 -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
1559 -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
1560 -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
1561 -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
1562 -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
1563 -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
1564 -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
1565 -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
1566 -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \
1567 -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
1568 -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
1569 -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
1570 -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
1571 -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
1572 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
1573 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
1574 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
1575 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1576 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
1577 } > $@-t && \
1578 mv $@-t $@
1579
1580 mostlyclean-local: mostlyclean-generic
1581 @for dir in '' $(MOSTLYCLEANDIRS); do \
1582 if test -n "$$dir" && test -d $$dir; then \
1583 echo "rmdir $$dir"; rmdir $$dir; \
1584 fi; \
1585 done; \
1586 :
1587
1588 # Include auto-generated makefile
1589
1590 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1591 # Otherwise a system limit (for SysV at least) may be exceeded.
1592 .NOEXPORT:
0 #if !defined _Noreturn && __STDC_VERSION__ < 201112
1 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
2 || 0x5110 <= __SUNPRO_C)
3 # define _Noreturn __attribute__ ((__noreturn__))
4 # elif 1200 <= _MSC_VER
5 # define _Noreturn __declspec (noreturn)
6 # else
7 # define _Noreturn
8 # endif
9 #endif
0 /* A C macro for declaring that specific arguments must not be NULL.
1 Copyright (C) 2009-2018 Free Software Foundation, Inc.
2
3 This program is free software: you can redistribute it and/or modify it
4 under the terms of the GNU Lesser General Public License as published
5 by the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with this program. If not, see <https://www.gnu.org/licenses/>. */
15
16 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
17 that the values passed as arguments n, ..., m must be non-NULL pointers.
18 n = 1 stands for the first argument, n = 2 for the second argument etc. */
19 #ifndef _GL_ARG_NONNULL
20 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
21 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
22 # else
23 # define _GL_ARG_NONNULL(params)
24 # endif
25 #endif
0 /* C++ compatible function declaration macros.
1 Copyright (C) 2010-2018 Free Software Foundation, Inc.
2
3 This program is free software: you can redistribute it and/or modify it
4 under the terms of the GNU Lesser General Public License as published
5 by the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with this program. If not, see <https://www.gnu.org/licenses/>. */
15
16 #ifndef _GL_CXXDEFS_H
17 #define _GL_CXXDEFS_H
18
19 /* Begin/end the GNULIB_NAMESPACE namespace. */
20 #if defined __cplusplus && defined GNULIB_NAMESPACE
21 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
22 # define _GL_END_NAMESPACE }
23 #else
24 # define _GL_BEGIN_NAMESPACE
25 # define _GL_END_NAMESPACE
26 #endif
27
28 /* The three most frequent use cases of these macros are:
29
30 * For providing a substitute for a function that is missing on some
31 platforms, but is declared and works fine on the platforms on which
32 it exists:
33
34 #if @GNULIB_FOO@
35 # if !@HAVE_FOO@
36 _GL_FUNCDECL_SYS (foo, ...);
37 # endif
38 _GL_CXXALIAS_SYS (foo, ...);
39 _GL_CXXALIASWARN (foo);
40 #elif defined GNULIB_POSIXCHECK
41 ...
42 #endif
43
44 * For providing a replacement for a function that exists on all platforms,
45 but is broken/insufficient and needs to be replaced on some platforms:
46
47 #if @GNULIB_FOO@
48 # if @REPLACE_FOO@
49 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
50 # undef foo
51 # define foo rpl_foo
52 # endif
53 _GL_FUNCDECL_RPL (foo, ...);
54 _GL_CXXALIAS_RPL (foo, ...);
55 # else
56 _GL_CXXALIAS_SYS (foo, ...);
57 # endif
58 _GL_CXXALIASWARN (foo);
59 #elif defined GNULIB_POSIXCHECK
60 ...
61 #endif
62
63 * For providing a replacement for a function that exists on some platforms
64 but is broken/insufficient and needs to be replaced on some of them and
65 is additionally either missing or undeclared on some other platforms:
66
67 #if @GNULIB_FOO@
68 # if @REPLACE_FOO@
69 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
70 # undef foo
71 # define foo rpl_foo
72 # endif
73 _GL_FUNCDECL_RPL (foo, ...);
74 _GL_CXXALIAS_RPL (foo, ...);
75 # else
76 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
77 _GL_FUNCDECL_SYS (foo, ...);
78 # endif
79 _GL_CXXALIAS_SYS (foo, ...);
80 # endif
81 _GL_CXXALIASWARN (foo);
82 #elif defined GNULIB_POSIXCHECK
83 ...
84 #endif
85 */
86
87 /* _GL_EXTERN_C declaration;
88 performs the declaration with C linkage. */
89 #if defined __cplusplus
90 # define _GL_EXTERN_C extern "C"
91 #else
92 # define _GL_EXTERN_C extern
93 #endif
94
95 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
96 declares a replacement function, named rpl_func, with the given prototype,
97 consisting of return type, parameters, and attributes.
98 Example:
99 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
100 _GL_ARG_NONNULL ((1)));
101 */
102 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
103 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
104 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
105 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
106
107 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
108 declares the system function, named func, with the given prototype,
109 consisting of return type, parameters, and attributes.
110 Example:
111 _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
112 _GL_ARG_NONNULL ((1)));
113 */
114 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
115 _GL_EXTERN_C rettype func parameters_and_attributes
116
117 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
118 declares a C++ alias called GNULIB_NAMESPACE::func
119 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
120 Example:
121 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
122
123 Wrapping rpl_func in an object with an inline conversion operator
124 avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
125 actually used in the program. */
126 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
127 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
128 #if defined __cplusplus && defined GNULIB_NAMESPACE
129 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
130 namespace GNULIB_NAMESPACE \
131 { \
132 static const struct _gl_ ## func ## _wrapper \
133 { \
134 typedef rettype (*type) parameters; \
135 \
136 inline operator type () const \
137 { \
138 return ::rpl_func; \
139 } \
140 } func = {}; \
141 } \
142 _GL_EXTERN_C int _gl_cxxalias_dummy
143 #else
144 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
145 _GL_EXTERN_C int _gl_cxxalias_dummy
146 #endif
147
148 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
149 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
150 except that the C function rpl_func may have a slightly different
151 declaration. A cast is used to silence the "invalid conversion" error
152 that would otherwise occur. */
153 #if defined __cplusplus && defined GNULIB_NAMESPACE
154 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
155 namespace GNULIB_NAMESPACE \
156 { \
157 static const struct _gl_ ## func ## _wrapper \
158 { \
159 typedef rettype (*type) parameters; \
160 \
161 inline operator type () const \
162 { \
163 return reinterpret_cast<type>(::rpl_func); \
164 } \
165 } func = {}; \
166 } \
167 _GL_EXTERN_C int _gl_cxxalias_dummy
168 #else
169 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
170 _GL_EXTERN_C int _gl_cxxalias_dummy
171 #endif
172
173 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
174 declares a C++ alias called GNULIB_NAMESPACE::func
175 that redirects to the system provided function func, if GNULIB_NAMESPACE
176 is defined.
177 Example:
178 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
179
180 Wrapping func in an object with an inline conversion operator
181 avoids a reference to func unless GNULIB_NAMESPACE::func is
182 actually used in the program. */
183 #if defined __cplusplus && defined GNULIB_NAMESPACE
184 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
185 namespace GNULIB_NAMESPACE \
186 { \
187 static const struct _gl_ ## func ## _wrapper \
188 { \
189 typedef rettype (*type) parameters; \
190 \
191 inline operator type () const \
192 { \
193 return ::func; \
194 } \
195 } func = {}; \
196 } \
197 _GL_EXTERN_C int _gl_cxxalias_dummy
198 #else
199 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
200 _GL_EXTERN_C int _gl_cxxalias_dummy
201 #endif
202
203 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
204 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
205 except that the C function func may have a slightly different declaration.
206 A cast is used to silence the "invalid conversion" error that would
207 otherwise occur. */
208 #if defined __cplusplus && defined GNULIB_NAMESPACE
209 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
210 namespace GNULIB_NAMESPACE \
211 { \
212 static const struct _gl_ ## func ## _wrapper \
213 { \
214 typedef rettype (*type) parameters; \
215 \
216 inline operator type () const \
217 { \
218 return reinterpret_cast<type>(::func); \
219 } \
220 } func = {}; \
221 } \
222 _GL_EXTERN_C int _gl_cxxalias_dummy
223 #else
224 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
225 _GL_EXTERN_C int _gl_cxxalias_dummy
226 #endif
227
228 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
229 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
230 except that the C function is picked among a set of overloaded functions,
231 namely the one with rettype2 and parameters2. Two consecutive casts
232 are used to silence the "cannot find a match" and "invalid conversion"
233 errors that would otherwise occur. */
234 #if defined __cplusplus && defined GNULIB_NAMESPACE
235 /* The outer cast must be a reinterpret_cast.
236 The inner cast: When the function is defined as a set of overloaded
237 functions, it works as a static_cast<>, choosing the designated variant.
238 When the function is defined as a single variant, it works as a
239 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
240 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
241 namespace GNULIB_NAMESPACE \
242 { \
243 static const struct _gl_ ## func ## _wrapper \
244 { \
245 typedef rettype (*type) parameters; \
246 \
247 inline operator type () const \
248 { \
249 return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
250 } \
251 } func = {}; \
252 } \
253 _GL_EXTERN_C int _gl_cxxalias_dummy
254 #else
255 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
256 _GL_EXTERN_C int _gl_cxxalias_dummy
257 #endif
258
259 /* _GL_CXXALIASWARN (func);
260 causes a warning to be emitted when ::func is used but not when
261 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
262 variants. */
263 #if defined __cplusplus && defined GNULIB_NAMESPACE
264 # define _GL_CXXALIASWARN(func) \
265 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
266 # define _GL_CXXALIASWARN_1(func,namespace) \
267 _GL_CXXALIASWARN_2 (func, namespace)
268 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
269 we enable the warning only when not optimizing. */
270 # if !__OPTIMIZE__
271 # define _GL_CXXALIASWARN_2(func,namespace) \
272 _GL_WARN_ON_USE (func, \
273 "The symbol ::" #func " refers to the system function. " \
274 "Use " #namespace "::" #func " instead.")
275 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
276 # define _GL_CXXALIASWARN_2(func,namespace) \
277 extern __typeof__ (func) func
278 # else
279 # define _GL_CXXALIASWARN_2(func,namespace) \
280 _GL_EXTERN_C int _gl_cxxalias_dummy
281 # endif
282 #else
283 # define _GL_CXXALIASWARN(func) \
284 _GL_EXTERN_C int _gl_cxxalias_dummy
285 #endif
286
287 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
288 causes a warning to be emitted when the given overloaded variant of ::func
289 is used but not when GNULIB_NAMESPACE::func is used. */
290 #if defined __cplusplus && defined GNULIB_NAMESPACE
291 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
292 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
293 GNULIB_NAMESPACE)
294 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
295 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
296 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
297 we enable the warning only when not optimizing. */
298 # if !__OPTIMIZE__
299 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
300 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
301 "The symbol ::" #func " refers to the system function. " \
302 "Use " #namespace "::" #func " instead.")
303 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
304 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
305 extern __typeof__ (func) func
306 # else
307 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
308 _GL_EXTERN_C int _gl_cxxalias_dummy
309 # endif
310 #else
311 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
312 _GL_EXTERN_C int _gl_cxxalias_dummy
313 #endif
314
315 #endif /* _GL_CXXDEFS_H */
0 /* Emulate flock on platforms that lack it, primarily Windows and MinGW.
1
2 This is derived from sqlite3 sources.
3 https://www.sqlite.org/src/finfo?name=src/os_win.c
4 https://www.sqlite.org/copyright.html
5
6 Written by Richard W.M. Jones <rjones.at.redhat.com>
7
8 Copyright (C) 2008-2018 Free Software Foundation, Inc.
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library 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 GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with this program. If not, see <https://www.gnu.org/licenses/>. */
22
23 #include <config.h>
24 #include <sys/file.h>
25
26 #if defined _WIN32 && ! defined __CYGWIN__
27
28 /* LockFileEx */
29 # define WIN32_LEAN_AND_MEAN
30 # include <windows.h>
31
32 # include <errno.h>
33
34 /* _get_osfhandle */
35 # if GNULIB_MSVC_NOTHROW
36 # include "msvc-nothrow.h"
37 # else
38 # include <io.h>
39 # endif
40
41 /* Determine the current size of a file. Because the other braindead
42 * APIs we'll call need lower/upper 32 bit pairs, keep the file size
43 * like that too.
44 */
45 static BOOL
46 file_size (HANDLE h, DWORD * lower, DWORD * upper)
47 {
48 *lower = GetFileSize (h, upper);
49 return 1;
50 }
51
52 /* LOCKFILE_FAIL_IMMEDIATELY is undefined on some Windows systems. */
53 # ifndef LOCKFILE_FAIL_IMMEDIATELY
54 # define LOCKFILE_FAIL_IMMEDIATELY 1
55 # endif
56
57 /* Acquire a lock. */
58 static BOOL
59 do_lock (HANDLE h, int non_blocking, int exclusive)
60 {
61 BOOL res;
62 DWORD size_lower, size_upper;
63 OVERLAPPED ovlp;
64 int flags = 0;
65
66 /* We're going to lock the whole file, so get the file size. */
67 res = file_size (h, &size_lower, &size_upper);
68 if (!res)
69 return 0;
70
71 /* Start offset is 0, and also zero the remaining members of this struct. */
72 memset (&ovlp, 0, sizeof ovlp);
73
74 if (non_blocking)
75 flags |= LOCKFILE_FAIL_IMMEDIATELY;
76 if (exclusive)
77 flags |= LOCKFILE_EXCLUSIVE_LOCK;
78
79 return LockFileEx (h, flags, 0, size_lower, size_upper, &ovlp);
80 }
81
82 /* Unlock reader or exclusive lock. */
83 static BOOL
84 do_unlock (HANDLE h)
85 {
86 int res;
87 DWORD size_lower, size_upper;
88
89 res = file_size (h, &size_lower, &size_upper);
90 if (!res)
91 return 0;
92
93 return UnlockFile (h, 0, 0, size_lower, size_upper);
94 }
95
96 /* Now our BSD-like flock operation. */
97 int
98 flock (int fd, int operation)
99 {
100 HANDLE h = (HANDLE) _get_osfhandle (fd);
101 DWORD res;
102 int non_blocking;
103
104 if (h == INVALID_HANDLE_VALUE)
105 {
106 errno = EBADF;
107 return -1;
108 }
109
110 non_blocking = operation & LOCK_NB;
111 operation &= ~LOCK_NB;
112
113 switch (operation)
114 {
115 case LOCK_SH:
116 res = do_lock (h, non_blocking, 0);
117 break;
118 case LOCK_EX:
119 res = do_lock (h, non_blocking, 1);
120 break;
121 case LOCK_UN:
122 res = do_unlock (h);
123 break;
124 default:
125 errno = EINVAL;
126 return -1;
127 }
128
129 /* Map Windows errors into Unix errnos. As usual MSDN fails to
130 * document the permissible error codes.
131 */
132 if (!res)
133 {
134 DWORD err = GetLastError ();
135 switch (err)
136 {
137 /* This means someone else is holding a lock. */
138 case ERROR_LOCK_VIOLATION:
139 errno = EAGAIN;
140 break;
141
142 /* Out of memory. */
143 case ERROR_NOT_ENOUGH_MEMORY:
144 errno = ENOMEM;
145 break;
146
147 case ERROR_BAD_COMMAND:
148 errno = EINVAL;
149 break;
150
151 /* Unlikely to be other errors, but at least don't lose the
152 * error code.
153 */
154 default:
155 errno = err;
156 }
157
158 return -1;
159 }
160
161 return 0;
162 }
163
164 #else /* !Windows */
165
166 # ifdef HAVE_STRUCT_FLOCK_L_TYPE
167 /* We know how to implement flock in terms of fcntl. */
168
169 # include <fcntl.h>
170
171 # ifdef HAVE_UNISTD_H
172 # include <unistd.h>
173 # endif
174
175 # include <errno.h>
176 # include <string.h>
177
178 int
179 flock (int fd, int operation)
180 {
181 int cmd, r;
182 struct flock fl;
183
184 if (operation & LOCK_NB)
185 cmd = F_SETLK;
186 else
187 cmd = F_SETLKW;
188 operation &= ~LOCK_NB;
189
190 memset (&fl, 0, sizeof fl);
191 fl.l_whence = SEEK_SET;
192 /* l_start & l_len are 0, which as a special case means "whole file". */
193
194 switch (operation)
195 {
196 case LOCK_SH:
197 fl.l_type = F_RDLCK;
198 break;
199 case LOCK_EX:
200 fl.l_type = F_WRLCK;
201 break;
202 case LOCK_UN:
203 fl.l_type = F_UNLCK;
204 break;
205 default:
206 errno = EINVAL;
207 return -1;
208 }
209
210 r = fcntl (fd, cmd, &fl);
211 if (r == -1 && errno == EACCES)
212 errno = EAGAIN;
213
214 return r;
215 }
216
217 # else /* !HAVE_STRUCT_FLOCK_L_TYPE */
218
219 # error "This platform lacks flock function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
220
221 # endif /* !HAVE_STRUCT_FLOCK_L_TYPE */
222
223 #endif /* !Windows */
0 /* getopt-on-non-glibc compatibility macros.
1 Copyright (C) 1989-2018 Free Software Foundation, Inc.
2 This file is part of gnulib.
3 Unlike most of the getopt implementation, it is NOT shared
4 with the GNU C Library.
5
6 This file is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1 of
9 the License, or (at your option) any later version.
10
11 This file is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with gnulib; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20 #ifndef _GETOPT_CDEFS_H
21 #define _GETOPT_CDEFS_H 1
22
23 /* This header should not be used directly; include getopt.h or
24 unistd.h instead. It does not have a protective #error, because
25 the guard macro for getopt.h in gnulib is not fixed. */
26
27 /* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect
28 a number of the internal macros supplied to GNU libc's headers by
29 sys/cdefs.h. Provide fallback definitions for all of them. */
30 #if @HAVE_SYS_CDEFS_H@
31 # include <sys/cdefs.h>
32 #endif
33
34 #ifndef __BEGIN_DECLS
35 # ifdef __cplusplus
36 # define __BEGIN_DECLS extern "C" {
37 # else
38 # define __BEGIN_DECLS /* nothing */
39 # endif
40 #endif
41 #ifndef __END_DECLS
42 # ifdef __cplusplus
43 # define __END_DECLS }
44 # else
45 # define __END_DECLS /* nothing */
46 # endif
47 #endif
48
49 #ifndef __GNUC_PREREQ
50 # if defined __GNUC__ && defined __GNUC_VERSION__
51 # define __GNUC_PREREQ(maj, min) \
52 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
53 # else
54 # define __GNUC_PREREQ(maj, min) 0
55 # endif
56 #endif
57
58 #ifndef __THROW
59 # if defined __cplusplus && __GNUC_PREREQ (2,8)
60 # define __THROW throw ()
61 # else
62 # define __THROW
63 # endif
64 #endif
65
66 #endif /* _GETOPT_CDEFS_H */
0 /* Declarations for getopt (basic, portable features only).
1 Copyright (C) 1989-2018 Free Software Foundation, Inc.
2 This file is part of the GNU C Library and is also part of gnulib.
3 Patches to this file should be submitted to both projects.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _GETOPT_CORE_H
20 #define _GETOPT_CORE_H 1
21
22 /* This header should not be used directly; include getopt.h or
23 unistd.h instead. Unlike most bits headers, it does not have
24 a protective #error, because the guard macro for getopt.h in
25 gnulib is not fixed. */
26
27 __BEGIN_DECLS
28
29 /* For communication from 'getopt' to the caller.
30 When 'getopt' finds an option that takes an argument,
31 the argument value is returned here.
32 Also, when 'ordering' is RETURN_IN_ORDER,
33 each non-option ARGV-element is returned here. */
34
35 extern char *optarg;
36
37 /* Index in ARGV of the next element to be scanned.
38 This is used for communication to and from the caller
39 and for communication between successive calls to 'getopt'.
40
41 On entry to 'getopt', zero means this is the first call; initialize.
42
43 When 'getopt' returns -1, this is the index of the first of the
44 non-option elements that the caller should itself scan.
45
46 Otherwise, 'optind' communicates from one call to the next
47 how much of ARGV has been scanned so far. */
48
49 extern int optind;
50
51 /* Callers store zero here to inhibit the error message 'getopt' prints
52 for unrecognized options. */
53
54 extern int opterr;
55
56 /* Set to an option character which was unrecognized. */
57
58 extern int optopt;
59
60 /* Get definitions and prototypes for functions to process the
61 arguments in ARGV (ARGC of them, minus the program name) for
62 options given in OPTS.
63
64 Return the option character from OPTS just read. Return -1 when
65 there are no more options. For unrecognized options, or options
66 missing arguments, 'optopt' is set to the option letter, and '?' is
67 returned.
68
69 The OPTS string is a list of characters which are recognized option
70 letters, optionally followed by colons, specifying that that letter
71 takes an argument, to be placed in 'optarg'.
72
73 If a letter in OPTS is followed by two colons, its argument is
74 optional. This behavior is specific to the GNU 'getopt'.
75
76 The argument '--' causes premature termination of argument
77 scanning, explicitly telling 'getopt' that there are no more
78 options.
79
80 If OPTS begins with '-', then non-option arguments are treated as
81 arguments to the option '\1'. This behavior is specific to the GNU
82 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in
83 the environment, then do not permute arguments.
84
85 For standards compliance, the 'argv' argument has the type
86 char *const *, but this is inaccurate; if argument permutation is
87 enabled, the argv array (not the strings it points to) must be
88 writable. */
89
90 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
91 __THROW _GL_ARG_NONNULL ((2, 3));
92
93 __END_DECLS
94
95 #endif /* _GETOPT_CORE_H */
0 /* Declarations for getopt (GNU extensions).
1 Copyright (C) 1989-2018 Free Software Foundation, Inc.
2 This file is part of the GNU C Library and is also part of gnulib.
3 Patches to this file should be submitted to both projects.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _GETOPT_EXT_H
20 #define _GETOPT_EXT_H 1
21
22 /* This header should not be used directly; include getopt.h instead.
23 Unlike most bits headers, it does not have a protective #error,
24 because the guard macro for getopt.h in gnulib is not fixed. */
25
26 __BEGIN_DECLS
27
28 /* Describe the long-named options requested by the application.
29 The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
30 of 'struct option' terminated by an element containing a name which is
31 zero.
32
33 The field 'has_arg' is:
34 no_argument (or 0) if the option does not take an argument,
35 required_argument (or 1) if the option requires an argument,
36 optional_argument (or 2) if the option takes an optional argument.
37
38 If the field 'flag' is not NULL, it points to a variable that is set
39 to the value given in the field 'val' when the option is found, but
40 left unchanged if the option is not found.
41
42 To have a long-named option do something other than set an 'int' to
43 a compiled-in constant, such as set a value from 'optarg', set the
44 option's 'flag' field to zero and its 'val' field to a nonzero
45 value (the equivalent single-letter option character, if there is
46 one). For long options that have a zero 'flag' field, 'getopt'
47 returns the contents of the 'val' field. */
48
49 struct option
50 {
51 const char *name;
52 /* has_arg can't be an enum because some compilers complain about
53 type mismatches in all the code that assumes it is an int. */
54 int has_arg;
55 int *flag;
56 int val;
57 };
58
59 /* Names for the values of the 'has_arg' field of 'struct option'. */
60
61 #define no_argument 0
62 #define required_argument 1
63 #define optional_argument 2
64
65 extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
66 const char *__shortopts,
67 const struct option *__longopts, int *__longind)
68 __THROW _GL_ARG_NONNULL ((2, 3));
69 extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
70 const char *__shortopts,
71 const struct option *__longopts, int *__longind)
72 __THROW _GL_ARG_NONNULL ((2, 3));
73
74 __END_DECLS
75
76 #endif /* _GETOPT_EXT_H */
0 /* getopt (basic, portable features) gnulib wrapper header.
1 Copyright (C) 1989-2018 Free Software Foundation, Inc.
2 This file is part of gnulib.
3 Unlike most of the getopt implementation, it is NOT shared
4 with the GNU C Library.
5
6 This file is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1 of
9 the License, or (at your option) any later version.
10
11 This file is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with gnulib; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20 #ifndef _GETOPT_PFX_CORE_H
21 #define _GETOPT_PFX_CORE_H 1
22
23 /* This header should not be used directly; include getopt.h or
24 unistd.h instead. It does not have a protective #error, because
25 the guard macro for getopt.h in gnulib is not fixed. */
26
27 /* Standalone applications should #define __GETOPT_PREFIX to an
28 identifier that prefixes the external functions and variables
29 defined in getopt-core.h and getopt-ext.h. Systematically
30 rename identifiers so that they do not collide with the system
31 functions and variables. Renaming avoids problems with some
32 compilers and linkers. */
33 #ifdef __GETOPT_PREFIX
34 # ifndef __GETOPT_ID
35 # define __GETOPT_CONCAT(x, y) x ## y
36 # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
37 # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
38 # endif
39 # undef getopt
40 # undef optarg
41 # undef opterr
42 # undef optind
43 # undef optopt
44 # define getopt __GETOPT_ID (getopt)
45 # define optarg __GETOPT_ID (optarg)
46 # define opterr __GETOPT_ID (opterr)
47 # define optind __GETOPT_ID (optind)
48 # define optopt __GETOPT_ID (optopt)
49
50 /* The system's getopt.h may have already included getopt-core.h to
51 declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that
52 getopt-core.h declares them with prefixes. */
53 # undef _GETOPT_CORE_H
54 #endif
55
56 #include <getopt-core.h>
57
58 #endif /* _GETOPT_PFX_CORE_H */
0 /* getopt (GNU extensions) gnulib wrapper header.
1 Copyright (C) 1989-2018 Free Software Foundation, Inc.
2 This file is part of gnulib.
3 Unlike most of the getopt implementation, it is NOT shared
4 with the GNU C Library.
5
6 This file is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1 of
9 the License, or (at your option) any later version.
10
11 This file is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with gnulib; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20 #ifndef _GETOPT_PFX_EXT_H
21 #define _GETOPT_PFX_EXT_H 1
22
23 /* This header should not be used directly; include getopt.h instead.
24 It does not have a protective #error, because the guard macro for
25 getopt.h in gnulib is not fixed. */
26
27 /* Standalone applications should #define __GETOPT_PREFIX to an
28 identifier that prefixes the external functions and variables
29 defined in getopt-core.h and getopt-ext.h. Systematically
30 rename identifiers so that they do not collide with the system
31 functions and variables. Renaming avoids problems with some
32 compilers and linkers. */
33 #ifdef __GETOPT_PREFIX
34 # ifndef __GETOPT_ID
35 # define __GETOPT_CONCAT(x, y) x ## y
36 # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
37 # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
38 # endif
39 # undef getopt_long
40 # undef getopt_long_only
41 # undef option
42 # undef _getopt_internal
43 # define getopt_long __GETOPT_ID (getopt_long)
44 # define getopt_long_only __GETOPT_ID (getopt_long_only)
45 # define option __GETOPT_ID (option)
46 # define _getopt_internal __GETOPT_ID (getopt_internal)
47
48 /* The system's getopt.h may have already included getopt-ext.h to
49 declare the unprefixed identifiers. Undef _GETOPT_EXT_H so that
50 getopt-ext.h declares them with prefixes. */
51 # undef _GETOPT_EXT_H
52 #endif
53
54 /* Standalone applications get correct prototypes for getopt_long and
55 getopt_long_only; they declare "char **argv". For backward
56 compatibility with old applications, if __GETOPT_PREFIX is not
57 defined, we supply GNU-libc-compatible, but incorrect, prototypes
58 using "char *const *argv". (GNU libc is stuck with the incorrect
59 prototypes, as they are baked into older versions of LSB.) */
60 #ifndef __getopt_argv_const
61 # if defined __GETOPT_PREFIX
62 # define __getopt_argv_const /* empty */
63 # else
64 # define __getopt_argv_const const
65 # endif
66 #endif
67
68 #include <getopt-ext.h>
69
70 #endif /* _GETOPT_PFX_EXT_H */
0 /* Getopt for GNU.
1 Copyright (C) 1987-2018 Free Software Foundation, Inc.
2 This file is part of the GNU C Library and is also part of gnulib.
3 Patches to this file should be submitted to both projects.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _LIBC
20 # include <config.h>
21 #endif
22
23 #include "getopt.h"
24
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include <string.h>
28 #include <unistd.h>
29
30 #ifdef _LIBC
31 /* When used as part of glibc, error printing must be done differently
32 for standards compliance. getopt is not a cancellation point, so
33 it must not call functions that are, and it is specified by an
34 older standard than stdio locking, so it must not refer to
35 functions in the "user namespace" related to stdio locking.
36 Finally, it must use glibc's internal message translation so that
37 the messages are looked up in the proper text domain. */
38 # include <libintl.h>
39 # define fprintf __fxprintf_nocancel
40 # define flockfile(fp) _IO_flockfile (fp)
41 # define funlockfile(fp) _IO_funlockfile (fp)
42 #else
43 # include "gettext.h"
44 # define _(msgid) gettext (msgid)
45 /* When used standalone, flockfile and funlockfile might not be
46 available. */
47 # if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
48 || (defined _WIN32 && ! defined __CYGWIN__))
49 # define flockfile(fp) /* nop */
50 # define funlockfile(fp) /* nop */
51 # endif
52 /* When used standalone, do not attempt to use alloca. */
53 # define __libc_use_alloca(size) 0
54 # undef alloca
55 # define alloca(size) (abort (), (void *)0)
56 #endif
57
58 /* This implementation of 'getopt' has three modes for handling
59 options interspersed with non-option arguments. It can stop
60 scanning for options at the first non-option argument encountered,
61 as POSIX specifies. It can continue scanning for options after the
62 first non-option argument, but permute 'argv' as it goes so that,
63 after 'getopt' is done, all the options precede all the non-option
64 arguments and 'optind' points to the first non-option argument.
65 Or, it can report non-option arguments as if they were arguments to
66 the option character '\x01'.
67
68 The default behavior of 'getopt_long' is to permute the argument list.
69 When this implementation is used standalone, the default behavior of
70 'getopt' is to stop at the first non-option argument, but when it is
71 used as part of GNU libc it also permutes the argument list. In both
72 cases, setting the environment variable POSIXLY_CORRECT to any value
73 disables permutation.
74
75 If the first character of the OPTSTRING argument to 'getopt' or
76 'getopt_long' is '+', both functions will stop at the first
77 non-option argument. If it is '-', both functions will report
78 non-option arguments as arguments to the option character '\x01'. */
79
80 #include "getopt_int.h"
81
82 /* For communication from 'getopt' to the caller.
83 When 'getopt' finds an option that takes an argument,
84 the argument value is returned here.
85 Also, when 'ordering' is RETURN_IN_ORDER,
86 each non-option ARGV-element is returned here. */
87
88 char *optarg;
89
90 /* Index in ARGV of the next element to be scanned.
91 This is used for communication to and from the caller
92 and for communication between successive calls to 'getopt'.
93
94 On entry to 'getopt', zero means this is the first call; initialize.
95
96 When 'getopt' returns -1, this is the index of the first of the
97 non-option elements that the caller should itself scan.
98
99 Otherwise, 'optind' communicates from one call to the next
100 how much of ARGV has been scanned so far. */
101
102 /* 1003.2 says this must be 1 before any call. */
103 int optind = 1;
104
105 /* Callers store zero here to inhibit the error message
106 for unrecognized options. */
107
108 int opterr = 1;
109
110 /* Set to an option character which was unrecognized.
111 This must be initialized on some systems to avoid linking in the
112 system's own getopt implementation. */
113
114 int optopt = '?';
115
116 /* Keep a global copy of all internal members of getopt_data. */
117
118 static struct _getopt_data getopt_data;
119
120 /* Exchange two adjacent subsequences of ARGV.
121 One subsequence is elements [first_nonopt,last_nonopt)
122 which contains all the non-options that have been skipped so far.
123 The other is elements [last_nonopt,optind), which contains all
124 the options processed since those non-options were skipped.
125
126 'first_nonopt' and 'last_nonopt' are relocated so that they describe
127 the new indices of the non-options in ARGV after they are moved. */
128
129 static void
130 exchange (char **argv, struct _getopt_data *d)
131 {
132 int bottom = d->__first_nonopt;
133 int middle = d->__last_nonopt;
134 int top = d->optind;
135 char *tem;
136
137 /* Exchange the shorter segment with the far end of the longer segment.
138 That puts the shorter segment into the right place.
139 It leaves the longer segment in the right place overall,
140 but it consists of two parts that need to be swapped next. */
141
142 while (top > middle && middle > bottom)
143 {
144 if (top - middle > middle - bottom)
145 {
146 /* Bottom segment is the short one. */
147 int len = middle - bottom;
148 int i;
149
150 /* Swap it with the top part of the top segment. */
151 for (i = 0; i < len; i++)
152 {
153 tem = argv[bottom + i];
154 argv[bottom + i] = argv[top - (middle - bottom) + i];
155 argv[top - (middle - bottom) + i] = tem;
156 }
157 /* Exclude the moved bottom segment from further swapping. */
158 top -= len;
159 }
160 else
161 {
162 /* Top segment is the short one. */
163 int len = top - middle;
164 int i;
165
166 /* Swap it with the bottom part of the bottom segment. */
167 for (i = 0; i < len; i++)
168 {
169 tem = argv[bottom + i];
170 argv[bottom + i] = argv[middle + i];
171 argv[middle + i] = tem;
172 }
173 /* Exclude the moved top segment from further swapping. */
174 bottom += len;
175 }
176 }
177
178 /* Update records for the slots the non-options now occupy. */
179
180 d->__first_nonopt += (d->optind - d->__last_nonopt);
181 d->__last_nonopt = d->optind;
182 }
183
184 /* Process the argument starting with d->__nextchar as a long option.
185 d->optind should *not* have been advanced over this argument.
186
187 If the value returned is -1, it was not actually a long option, the
188 state is unchanged, and the argument should be processed as a set
189 of short options (this can only happen when long_only is true).
190 Otherwise, the option (and its argument, if any) have been consumed
191 and the return value is the value to return from _getopt_internal_r. */
192 static int
193 process_long_option (int argc, char **argv, const char *optstring,
194 const struct option *longopts, int *longind,
195 int long_only, struct _getopt_data *d,
196 int print_errors, const char *prefix)
197 {
198 char *nameend;
199 size_t namelen;
200 const struct option *p;
201 const struct option *pfound = NULL;
202 int n_options;
203 int option_index;
204
205 for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
206 /* Do nothing. */ ;
207 namelen = nameend - d->__nextchar;
208
209 /* First look for an exact match, counting the options as a side
210 effect. */
211 for (p = longopts, n_options = 0; p->name; p++, n_options++)
212 if (!strncmp (p->name, d->__nextchar, namelen)
213 && namelen == strlen (p->name))
214 {
215 /* Exact match found. */
216 pfound = p;
217 option_index = n_options;
218 break;
219 }
220
221 if (pfound == NULL)
222 {
223 /* Didn't find an exact match, so look for abbreviations. */
224 unsigned char *ambig_set = NULL;
225 int ambig_malloced = 0;
226 int ambig_fallback = 0;
227 int indfound = -1;
228
229 for (p = longopts, option_index = 0; p->name; p++, option_index++)
230 if (!strncmp (p->name, d->__nextchar, namelen))
231 {
232 if (pfound == NULL)
233 {
234 /* First nonexact match found. */
235 pfound = p;
236 indfound = option_index;
237 }
238 else if (long_only
239 || pfound->has_arg != p->has_arg
240 || pfound->flag != p->flag
241 || pfound->val != p->val)
242 {
243 /* Second or later nonexact match found. */
244 if (!ambig_fallback)
245 {
246 if (!print_errors)
247 /* Don't waste effort tracking the ambig set if
248 we're not going to print it anyway. */
249 ambig_fallback = 1;
250 else if (!ambig_set)
251 {
252 if (__libc_use_alloca (n_options))
253 ambig_set = alloca (n_options);
254 else if ((ambig_set = malloc (n_options)) == NULL)
255 /* Fall back to simpler error message. */
256 ambig_fallback = 1;
257 else
258 ambig_malloced = 1;
259
260 if (ambig_set)
261 {
262 memset (ambig_set, 0, n_options);
263 ambig_set[indfound] = 1;
264 }
265 }
266 if (ambig_set)
267 ambig_set[option_index] = 1;
268 }
269 }
270 }
271
272 if (ambig_set || ambig_fallback)
273 {
274 if (print_errors)
275 {
276 if (ambig_fallback)
277 fprintf (stderr, _("%s: option '%s%s' is ambiguous\n"),
278 argv[0], prefix, d->__nextchar);
279 else
280 {
281 flockfile (stderr);
282 fprintf (stderr,
283 _("%s: option '%s%s' is ambiguous; possibilities:"),
284 argv[0], prefix, d->__nextchar);
285
286 for (option_index = 0; option_index < n_options; option_index++)
287 if (ambig_set[option_index])
288 fprintf (stderr, " '%s%s'",
289 prefix, longopts[option_index].name);
290
291 /* This must use 'fprintf' even though it's only
292 printing a single character, so that it goes through
293 __fxprintf_nocancel when compiled as part of glibc. */
294 fprintf (stderr, "\n");
295 funlockfile (stderr);
296 }
297 }
298 if (ambig_malloced)
299 free (ambig_set);
300 d->__nextchar += strlen (d->__nextchar);
301 d->optind++;
302 d->optopt = 0;
303 return '?';
304 }
305
306 option_index = indfound;
307 }
308
309 if (pfound == NULL)
310 {
311 /* Can't find it as a long option. If this is not getopt_long_only,
312 or the option starts with '--' or is not a valid short option,
313 then it's an error. */
314 if (!long_only || argv[d->optind][1] == '-'
315 || strchr (optstring, *d->__nextchar) == NULL)
316 {
317 if (print_errors)
318 fprintf (stderr, _("%s: unrecognized option '%s%s'\n"),
319 argv[0], prefix, d->__nextchar);
320
321 d->__nextchar = NULL;
322 d->optind++;
323 d->optopt = 0;
324 return '?';
325 }
326
327 /* Otherwise interpret it as a short option. */
328 return -1;
329 }
330
331 /* We have found a matching long option. Consume it. */
332 d->optind++;
333 d->__nextchar = NULL;
334 if (*nameend)
335 {
336 /* Don't test has_arg with >, because some C compilers don't
337 allow it to be used on enums. */
338 if (pfound->has_arg)
339 d->optarg = nameend + 1;
340 else
341 {
342 if (print_errors)
343 fprintf (stderr,
344 _("%s: option '%s%s' doesn't allow an argument\n"),
345 argv[0], prefix, pfound->name);
346
347 d->optopt = pfound->val;
348 return '?';
349 }
350 }
351 else if (pfound->has_arg == 1)
352 {
353 if (d->optind < argc)
354 d->optarg = argv[d->optind++];
355 else
356 {
357 if (print_errors)
358 fprintf (stderr,
359 _("%s: option '%s%s' requires an argument\n"),
360 argv[0], prefix, pfound->name);
361
362 d->optopt = pfound->val;
363 return optstring[0] == ':' ? ':' : '?';
364 }
365 }
366
367 if (longind != NULL)
368 *longind = option_index;
369 if (pfound->flag)
370 {
371 *(pfound->flag) = pfound->val;
372 return 0;
373 }
374 return pfound->val;
375 }
376
377 /* Initialize internal data upon the first call to getopt. */
378
379 static const char *
380 _getopt_initialize (int argc _GL_UNUSED,
381 char **argv _GL_UNUSED, const char *optstring,
382 struct _getopt_data *d, int posixly_correct)
383 {
384 /* Start processing options with ARGV-element 1 (since ARGV-element 0
385 is the program name); the sequence of previously skipped
386 non-option ARGV-elements is empty. */
387 if (d->optind == 0)
388 d->optind = 1;
389
390 d->__first_nonopt = d->__last_nonopt = d->optind;
391 d->__nextchar = NULL;
392
393 /* Determine how to handle the ordering of options and nonoptions. */
394 if (optstring[0] == '-')
395 {
396 d->__ordering = RETURN_IN_ORDER;
397 ++optstring;
398 }
399 else if (optstring[0] == '+')
400 {
401 d->__ordering = REQUIRE_ORDER;
402 ++optstring;
403 }
404 else if (posixly_correct || !!getenv ("POSIXLY_CORRECT"))
405 d->__ordering = REQUIRE_ORDER;
406 else
407 d->__ordering = PERMUTE;
408
409 d->__initialized = 1;
410 return optstring;
411 }
412
413 /* Scan elements of ARGV (whose length is ARGC) for option characters
414 given in OPTSTRING.
415
416 If an element of ARGV starts with '-', and is not exactly "-" or "--",
417 then it is an option element. The characters of this element
418 (aside from the initial '-') are option characters. If 'getopt'
419 is called repeatedly, it returns successively each of the option characters
420 from each of the option elements.
421
422 If 'getopt' finds another option character, it returns that character,
423 updating 'optind' and 'nextchar' so that the next call to 'getopt' can
424 resume the scan with the following option character or ARGV-element.
425
426 If there are no more option characters, 'getopt' returns -1.
427 Then 'optind' is the index in ARGV of the first ARGV-element
428 that is not an option. (The ARGV-elements have been permuted
429 so that those that are not options now come last.)
430
431 OPTSTRING is a string containing the legitimate option characters.
432 If an option character is seen that is not listed in OPTSTRING,
433 return '?' after printing an error message. If you set 'opterr' to
434 zero, the error message is suppressed but we still return '?'.
435
436 If a char in OPTSTRING is followed by a colon, that means it wants an arg,
437 so the following text in the same ARGV-element, or the text of the following
438 ARGV-element, is returned in 'optarg'. Two colons mean an option that
439 wants an optional arg; if there is text in the current ARGV-element,
440 it is returned in 'optarg', otherwise 'optarg' is set to zero.
441
442 If OPTSTRING starts with '-' or '+', it requests different methods of
443 handling the non-option ARGV-elements.
444 See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
445
446 Long-named options begin with '--' instead of '-'.
447 Their names may be abbreviated as long as the abbreviation is unique
448 or is an exact match for some defined option. If they have an
449 argument, it follows the option name in the same ARGV-element, separated
450 from the option name by a '=', or else the in next ARGV-element.
451 When 'getopt' finds a long-named option, it returns 0 if that option's
452 'flag' field is nonzero, the value of the option's 'val' field
453 if the 'flag' field is zero.
454
455 The elements of ARGV aren't really const, because we permute them.
456 But we pretend they're const in the prototype to be compatible
457 with other systems.
458
459 LONGOPTS is a vector of 'struct option' terminated by an
460 element containing a name which is zero.
461
462 LONGIND returns the index in LONGOPT of the long-named option found.
463 It is only valid when a long-named option has been found by the most
464 recent call.
465
466 If LONG_ONLY is nonzero, '-' as well as '--' can introduce
467 long-named options. */
468
469 int
470 _getopt_internal_r (int argc, char **argv, const char *optstring,
471 const struct option *longopts, int *longind,
472 int long_only, struct _getopt_data *d, int posixly_correct)
473 {
474 int print_errors = d->opterr;
475
476 if (argc < 1)
477 return -1;
478
479 d->optarg = NULL;
480
481 if (d->optind == 0 || !d->__initialized)
482 optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct);
483 else if (optstring[0] == '-' || optstring[0] == '+')
484 optstring++;
485
486 if (optstring[0] == ':')
487 print_errors = 0;
488
489 /* Test whether ARGV[optind] points to a non-option argument. */
490 #define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
491
492 if (d->__nextchar == NULL || *d->__nextchar == '\0')
493 {
494 /* Advance to the next ARGV-element. */
495
496 /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
497 moved back by the user (who may also have changed the arguments). */
498 if (d->__last_nonopt > d->optind)
499 d->__last_nonopt = d->optind;
500 if (d->__first_nonopt > d->optind)
501 d->__first_nonopt = d->optind;
502
503 if (d->__ordering == PERMUTE)
504 {
505 /* If we have just processed some options following some non-options,
506 exchange them so that the options come first. */
507
508 if (d->__first_nonopt != d->__last_nonopt
509 && d->__last_nonopt != d->optind)
510 exchange (argv, d);
511 else if (d->__last_nonopt != d->optind)
512 d->__first_nonopt = d->optind;
513
514 /* Skip any additional non-options
515 and extend the range of non-options previously skipped. */
516
517 while (d->optind < argc && NONOPTION_P)
518 d->optind++;
519 d->__last_nonopt = d->optind;
520 }
521
522 /* The special ARGV-element '--' means premature end of options.
523 Skip it like a null option,
524 then exchange with previous non-options as if it were an option,
525 then skip everything else like a non-option. */
526
527 if (d->optind != argc && !strcmp (argv[d->optind], "--"))
528 {
529 d->optind++;
530
531 if (d->__first_nonopt != d->__last_nonopt
532 && d->__last_nonopt != d->optind)
533 exchange (argv, d);
534 else if (d->__first_nonopt == d->__last_nonopt)
535 d->__first_nonopt = d->optind;
536 d->__last_nonopt = argc;
537
538 d->optind = argc;
539 }
540
541 /* If we have done all the ARGV-elements, stop the scan
542 and back over any non-options that we skipped and permuted. */
543
544 if (d->optind == argc)
545 {
546 /* Set the next-arg-index to point at the non-options
547 that we previously skipped, so the caller will digest them. */
548 if (d->__first_nonopt != d->__last_nonopt)
549 d->optind = d->__first_nonopt;
550 return -1;
551 }
552
553 /* If we have come to a non-option and did not permute it,
554 either stop the scan or describe it to the caller and pass it by. */
555
556 if (NONOPTION_P)
557 {
558 if (d->__ordering == REQUIRE_ORDER)
559 return -1;
560 d->optarg = argv[d->optind++];
561 return 1;
562 }
563
564 /* We have found another option-ARGV-element.
565 Check whether it might be a long option. */
566 if (longopts)
567 {
568 if (argv[d->optind][1] == '-')
569 {
570 /* "--foo" is always a long option. The special option
571 "--" was handled above. */
572 d->__nextchar = argv[d->optind] + 2;
573 return process_long_option (argc, argv, optstring, longopts,
574 longind, long_only, d,
575 print_errors, "--");
576 }
577
578 /* If long_only and the ARGV-element has the form "-f",
579 where f is a valid short option, don't consider it an
580 abbreviated form of a long option that starts with f.
581 Otherwise there would be no way to give the -f short
582 option.
583
584 On the other hand, if there's a long option "fubar" and
585 the ARGV-element is "-fu", do consider that an
586 abbreviation of the long option, just like "--fu", and
587 not "-f" with arg "u".
588
589 This distinction seems to be the most useful approach. */
590 if (long_only && (argv[d->optind][2]
591 || !strchr (optstring, argv[d->optind][1])))
592 {
593 int code;
594 d->__nextchar = argv[d->optind] + 1;
595 code = process_long_option (argc, argv, optstring, longopts,
596 longind, long_only, d,
597 print_errors, "-");
598 if (code != -1)
599 return code;
600 }
601 }
602
603 /* It is not a long option. Skip the initial punctuation. */
604 d->__nextchar = argv[d->optind] + 1;
605 }
606
607 /* Look at and handle the next short option-character. */
608
609 {
610 char c = *d->__nextchar++;
611 const char *temp = strchr (optstring, c);
612
613 /* Increment 'optind' when we start to process its last character. */
614 if (*d->__nextchar == '\0')
615 ++d->optind;
616
617 if (temp == NULL || c == ':' || c == ';')
618 {
619 if (print_errors)
620 fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
621 d->optopt = c;
622 return '?';
623 }
624
625 /* Convenience. Treat POSIX -W foo same as long option --foo */
626 if (temp[0] == 'W' && temp[1] == ';' && longopts != NULL)
627 {
628 /* This is an option that requires an argument. */
629 if (*d->__nextchar != '\0')
630 d->optarg = d->__nextchar;
631 else if (d->optind == argc)
632 {
633 if (print_errors)
634 fprintf (stderr,
635 _("%s: option requires an argument -- '%c'\n"),
636 argv[0], c);
637
638 d->optopt = c;
639 if (optstring[0] == ':')
640 c = ':';
641 else
642 c = '?';
643 return c;
644 }
645 else
646 d->optarg = argv[d->optind];
647
648 d->__nextchar = d->optarg;
649 d->optarg = NULL;
650 return process_long_option (argc, argv, optstring, longopts, longind,
651 0 /* long_only */, d, print_errors, "-W ");
652 }
653 if (temp[1] == ':')
654 {
655 if (temp[2] == ':')
656 {
657 /* This is an option that accepts an argument optionally. */
658 if (*d->__nextchar != '\0')
659 {
660 d->optarg = d->__nextchar;
661 d->optind++;
662 }
663 else
664 d->optarg = NULL;
665 d->__nextchar = NULL;
666 }
667 else
668 {
669 /* This is an option that requires an argument. */
670 if (*d->__nextchar != '\0')
671 {
672 d->optarg = d->__nextchar;
673 /* If we end this ARGV-element by taking the rest as an arg,
674 we must advance to the next element now. */
675 d->optind++;
676 }
677 else if (d->optind == argc)
678 {
679 if (print_errors)
680 fprintf (stderr,
681 _("%s: option requires an argument -- '%c'\n"),
682 argv[0], c);
683
684 d->optopt = c;
685 if (optstring[0] == ':')
686 c = ':';
687 else
688 c = '?';
689 }
690 else
691 /* We already incremented 'optind' once;
692 increment it again when taking next ARGV-elt as argument. */
693 d->optarg = argv[d->optind++];
694 d->__nextchar = NULL;
695 }
696 }
697 return c;
698 }
699 }
700
701 int
702 _getopt_internal (int argc, char **argv, const char *optstring,
703 const struct option *longopts, int *longind, int long_only,
704 int posixly_correct)
705 {
706 int result;
707
708 getopt_data.optind = optind;
709 getopt_data.opterr = opterr;
710
711 result = _getopt_internal_r (argc, argv, optstring, longopts,
712 longind, long_only, &getopt_data,
713 posixly_correct);
714
715 optind = getopt_data.optind;
716 optarg = getopt_data.optarg;
717 optopt = getopt_data.optopt;
718
719 return result;
720 }
721
722 /* glibc gets a LSB-compliant getopt and a POSIX-complaint __posix_getopt.
723 Standalone applications just get a POSIX-compliant getopt.
724 POSIX and LSB both require these functions to take 'char *const *argv'
725 even though this is incorrect (because of the permutation). */
726 #define GETOPT_ENTRY(NAME, POSIXLY_CORRECT) \
727 int \
728 NAME (int argc, char *const *argv, const char *optstring) \
729 { \
730 return _getopt_internal (argc, (char **)argv, optstring, \
731 0, 0, 0, POSIXLY_CORRECT); \
732 }
733
734 #ifdef _LIBC
735 GETOPT_ENTRY(getopt, 0)
736 GETOPT_ENTRY(__posix_getopt, 1)
737 #else
738 GETOPT_ENTRY(getopt, 1)
739 #endif
740
741
742 #ifdef TEST
743
744 /* Compile with -DTEST to make an executable for use in testing
745 the above definition of 'getopt'. */
746
747 int
748 main (int argc, char **argv)
749 {
750 int c;
751 int digit_optind = 0;
752
753 while (1)
754 {
755 int this_option_optind = optind ? optind : 1;
756
757 c = getopt (argc, argv, "abc:d:0123456789");
758 if (c == -1)
759 break;
760
761 switch (c)
762 {
763 case '0':
764 case '1':
765 case '2':
766 case '3':
767 case '4':
768 case '5':
769 case '6':
770 case '7':
771 case '8':
772 case '9':
773 if (digit_optind != 0 && digit_optind != this_option_optind)
774 printf ("digits occur in two different argv-elements.\n");
775 digit_optind = this_option_optind;
776 printf ("option %c\n", c);
777 break;
778
779 case 'a':
780 printf ("option a\n");
781 break;
782
783 case 'b':
784 printf ("option b\n");
785 break;
786
787 case 'c':
788 printf ("option c with value '%s'\n", optarg);
789 break;
790
791 case '?':
792 break;
793
794 default:
795 printf ("?? getopt returned character code 0%o ??\n", c);
796 }
797 }
798
799 if (optind < argc)
800 {
801 printf ("non-option ARGV-elements: ");
802 while (optind < argc)
803 printf ("%s ", argv[optind++]);
804 printf ("\n");
805 }
806
807 exit (0);
808 }
809
810 #endif /* TEST */
0 /* Declarations for getopt.
1 Copyright (C) 1989-2018 Free Software Foundation, Inc.
2 This file is part of gnulib.
3 Unlike most of the getopt implementation, it is NOT shared
4 with the GNU C Library, which supplies a different version of
5 this file.
6
7 This file is free software; you can redistribute it and/or modify it
8 under the terms of the GNU Lesser General Public License as
9 published by the Free Software Foundation; either version 2.1 of
10 the License, or (at your option) any later version.
11
12 This file is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with gnulib; if not, see <https://www.gnu.org/licenses/>. */
19
20 #ifndef _@GUARD_PREFIX@_GETOPT_H
21
22 #if __GNUC__ >= 3
23 @PRAGMA_SYSTEM_HEADER@
24 #endif
25 @PRAGMA_COLUMNS@
26
27 /* The include_next requires a split double-inclusion guard. We must
28 also inform the replacement unistd.h to not recursively use
29 <getopt.h>; our definitions will be present soon enough. */
30 #if @HAVE_GETOPT_H@
31 # define _GL_SYSTEM_GETOPT
32 # @INCLUDE_NEXT@ @NEXT_GETOPT_H@
33 # undef _GL_SYSTEM_GETOPT
34 #endif
35
36 #define _@GUARD_PREFIX@_GETOPT_H 1
37
38 /* Standalone applications should #define __GETOPT_PREFIX to an
39 identifier that prefixes the external functions and variables
40 defined in getopt-core.h and getopt-ext.h. When this happens,
41 include the headers that might declare getopt so that they will not
42 cause confusion if included after this file (if the system had
43 <getopt.h>, we have already included it). */
44 #if defined __GETOPT_PREFIX
45 # if !@HAVE_GETOPT_H@
46 # define __need_system_stdlib_h
47 # include <stdlib.h>
48 # undef __need_system_stdlib_h
49 # include <stdio.h>
50 # include <unistd.h>
51 # endif
52 #endif
53
54 /* The definition of _GL_ARG_NONNULL is copied here. */
55
56 #include <getopt-cdefs.h>
57 #include <getopt-pfx-core.h>
58 #include <getopt-pfx-ext.h>
59
60 #endif /* _@GUARD_PREFIX@_GETOPT_H */
0 /* getopt_long and getopt_long_only entry points for GNU getopt.
1 Copyright (C) 1987-2018 Free Software Foundation, Inc.
2 This file is part of the GNU C Library and is also part of gnulib.
3 Patches to this file should be submitted to both projects.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _LIBC
20 # include <config.h>
21 #endif
22
23 #include "getopt.h"
24 #include "getopt_int.h"
25
26 int
27 getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
28 const struct option *long_options, int *opt_index)
29 {
30 return _getopt_internal (argc, (char **) argv, options, long_options,
31 opt_index, 0, 0);
32 }
33
34 int
35 _getopt_long_r (int argc, char **argv, const char *options,
36 const struct option *long_options, int *opt_index,
37 struct _getopt_data *d)
38 {
39 return _getopt_internal_r (argc, argv, options, long_options, opt_index,
40 0, d, 0);
41 }
42
43 /* Like getopt_long, but '-' as well as '--' can indicate a long option.
44 If an option that starts with '-' (not '--') doesn't match a long option,
45 but does match a short option, it is parsed as a short option
46 instead. */
47
48 int
49 getopt_long_only (int argc, char *__getopt_argv_const *argv,
50 const char *options,
51 const struct option *long_options, int *opt_index)
52 {
53 return _getopt_internal (argc, (char **) argv, options, long_options,
54 opt_index, 1, 0);
55 }
56
57 int
58 _getopt_long_only_r (int argc, char **argv, const char *options,
59 const struct option *long_options, int *opt_index,
60 struct _getopt_data *d)
61 {
62 return _getopt_internal_r (argc, argv, options, long_options, opt_index,
63 1, d, 0);
64 }
65
66
67 #ifdef TEST
68
69 #include <stdio.h>
70 #include <stdlib.h>
71
72 int
73 main (int argc, char **argv)
74 {
75 int c;
76 int digit_optind = 0;
77
78 while (1)
79 {
80 int this_option_optind = optind ? optind : 1;
81 int option_index = 0;
82 static const struct option long_options[] =
83 {
84 {"add", 1, 0, 0},
85 {"append", 0, 0, 0},
86 {"delete", 1, 0, 0},
87 {"verbose", 0, 0, 0},
88 {"create", 0, 0, 0},
89 {"file", 1, 0, 0},
90 {0, 0, 0, 0}
91 };
92
93 c = getopt_long (argc, argv, "abc:d:0123456789",
94 long_options, &option_index);
95 if (c == -1)
96 break;
97
98 switch (c)
99 {
100 case 0:
101 printf ("option %s", long_options[option_index].name);
102 if (optarg)
103 printf (" with arg %s", optarg);
104 printf ("\n");
105 break;
106
107 case '0':
108 case '1':
109 case '2':
110 case '3':
111 case '4':
112 case '5':
113 case '6':
114 case '7':
115 case '8':
116 case '9':
117 if (digit_optind != 0 && digit_optind != this_option_optind)
118 printf ("digits occur in two different argv-elements.\n");
119 digit_optind = this_option_optind;
120 printf ("option %c\n", c);
121 break;
122
123 case 'a':
124 printf ("option a\n");
125 break;
126
127 case 'b':
128 printf ("option b\n");
129 break;
130
131 case 'c':
132 printf ("option c with value '%s'\n", optarg);
133 break;
134
135 case 'd':
136 printf ("option d with value '%s'\n", optarg);
137 break;
138
139 case '?':
140 break;
141
142 default:
143 printf ("?? getopt returned character code 0%o ??\n", c);
144 }
145 }
146
147 if (optind < argc)
148 {
149 printf ("non-option ARGV-elements: ");
150 while (optind < argc)
151 printf ("%s ", argv[optind++]);
152 printf ("\n");
153 }
154
155 exit (0);
156 }
157
158 #endif /* TEST */
0 /* Internal declarations for getopt.
1 Copyright (C) 1989-2018 Free Software Foundation, Inc.
2 This file is part of the GNU C Library and is also part of gnulib.
3 Patches to this file should be submitted to both projects.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _GETOPT_INT_H
20 #define _GETOPT_INT_H 1
21
22 #include <getopt.h>
23
24 extern int _getopt_internal (int ___argc, char **___argv,
25 const char *__shortopts,
26 const struct option *__longopts, int *__longind,
27 int __long_only, int __posixly_correct);
28
29
30 /* Reentrant versions which can handle parsing multiple argument
31 vectors at the same time. */
32
33 /* Describe how to deal with options that follow non-option ARGV-elements.
34
35 REQUIRE_ORDER means don't recognize them as options; stop option
36 processing when the first non-option is seen. This is what POSIX
37 specifies should happen.
38
39 PERMUTE means permute the contents of ARGV as we scan, so that
40 eventually all the non-options are at the end. This allows options
41 to be given in any order, even with programs that were not written
42 to expect this.
43
44 RETURN_IN_ORDER is an option available to programs that were
45 written to expect options and other ARGV-elements in any order
46 and that care about the ordering of the two. We describe each
47 non-option ARGV-element as if it were the argument of an option
48 with character code 1.
49
50 The special argument '--' forces an end of option-scanning regardless
51 of the value of 'ordering'. In the case of RETURN_IN_ORDER, only
52 '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */
53
54 enum __ord
55 {
56 REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
57 };
58
59 /* Data type for reentrant functions. */
60 struct _getopt_data
61 {
62 /* These have exactly the same meaning as the corresponding global
63 variables, except that they are used for the reentrant
64 versions of getopt. */
65 int optind;
66 int opterr;
67 int optopt;
68 char *optarg;
69
70 /* Internal members. */
71
72 /* True if the internal members have been initialized. */
73 int __initialized;
74
75 /* The next char to be scanned in the option-element
76 in which the last option character we returned was found.
77 This allows us to pick up the scan where we left off.
78
79 If this is zero, or a null string, it means resume the scan
80 by advancing to the next ARGV-element. */
81 char *__nextchar;
82
83 /* See __ord above. */
84 enum __ord __ordering;
85
86 /* Handle permutation of arguments. */
87
88 /* Describe the part of ARGV that contains non-options that have
89 been skipped. 'first_nonopt' is the index in ARGV of the first
90 of them; 'last_nonopt' is the index after the last of them. */
91
92 int __first_nonopt;
93 int __last_nonopt;
94 };
95
96 /* The initializer is necessary to set OPTIND and OPTERR to their
97 default values and to clear the initialization flag. */
98 #define _GETOPT_DATA_INITIALIZER { 1, 1 }
99
100 extern int _getopt_internal_r (int ___argc, char **___argv,
101 const char *__shortopts,
102 const struct option *__longopts, int *__longind,
103 int __long_only, struct _getopt_data *__data,
104 int __posixly_correct);
105
106 extern int _getopt_long_r (int ___argc, char **___argv,
107 const char *__shortopts,
108 const struct option *__longopts, int *__longind,
109 struct _getopt_data *__data);
110
111 extern int _getopt_long_only_r (int ___argc, char **___argv,
112 const char *__shortopts,
113 const struct option *__longopts,
114 int *__longind,
115 struct _getopt_data *__data);
116
117 #endif /* getopt_int.h */
0 /* Convenience header for conditional use of GNU <libintl.h>.
1 Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software
2 Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License along
15 with this program; if not, see <https://www.gnu.org/licenses/>. */
16
17 #ifndef _LIBGETTEXT_H
18 #define _LIBGETTEXT_H 1
19
20 /* NLS can be disabled through the configure --disable-nls option
21 or through "#define ENABLE NLS 0" before including this file. */
22 #if defined ENABLE_NLS && ENABLE_NLS
23
24 /* Get declarations of GNU message catalog functions. */
25 # include <libintl.h>
26
27 /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
28 the gettext() and ngettext() macros. This is an alternative to calling
29 textdomain(), and is useful for libraries. */
30 # ifdef DEFAULT_TEXT_DOMAIN
31 # undef gettext
32 # define gettext(Msgid) \
33 dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
34 # undef ngettext
35 # define ngettext(Msgid1, Msgid2, N) \
36 dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
37 # endif
38
39 #else
40
41 /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
42 chokes if dcgettext is defined as a macro. So include it now, to make
43 later inclusions of <locale.h> a NOP. We don't include <libintl.h>
44 as well because people using "gettext.h" will not include <libintl.h>,
45 and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
46 is OK. */
47 #if defined(__sun)
48 # include <locale.h>
49 #endif
50
51 /* Many header files from the libstdc++ coming with g++ 3.3 or newer include
52 <libintl.h>, which chokes if dcgettext is defined as a macro. So include
53 it now, to make later inclusions of <libintl.h> a NOP. */
54 #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
55 # include <cstdlib>
56 # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
57 # include <libintl.h>
58 # endif
59 #endif
60
61 /* Disabled NLS.
62 The casts to 'const char *' serve the purpose of producing warnings
63 for invalid uses of the value returned from these functions.
64 On pre-ANSI systems without 'const', the config.h file is supposed to
65 contain "#define const". */
66 # undef gettext
67 # define gettext(Msgid) ((const char *) (Msgid))
68 # undef dgettext
69 # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
70 # undef dcgettext
71 # define dcgettext(Domainname, Msgid, Category) \
72 ((void) (Category), dgettext (Domainname, Msgid))
73 # undef ngettext
74 # define ngettext(Msgid1, Msgid2, N) \
75 ((N) == 1 \
76 ? ((void) (Msgid2), (const char *) (Msgid1)) \
77 : ((void) (Msgid1), (const char *) (Msgid2)))
78 # undef dngettext
79 # define dngettext(Domainname, Msgid1, Msgid2, N) \
80 ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
81 # undef dcngettext
82 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
83 ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
84 # undef textdomain
85 # define textdomain(Domainname) ((const char *) (Domainname))
86 # undef bindtextdomain
87 # define bindtextdomain(Domainname, Dirname) \
88 ((void) (Domainname), (const char *) (Dirname))
89 # undef bind_textdomain_codeset
90 # define bind_textdomain_codeset(Domainname, Codeset) \
91 ((void) (Domainname), (const char *) (Codeset))
92
93 #endif
94
95 /* Prefer gnulib's setlocale override over libintl's setlocale override. */
96 #ifdef GNULIB_defined_setlocale
97 # undef setlocale
98 # define setlocale rpl_setlocale
99 #endif
100
101 /* A pseudo function call that serves as a marker for the automated
102 extraction of messages, but does not call gettext(). The run-time
103 translation is done at a different place in the code.
104 The argument, String, should be a literal string. Concatenated strings
105 and other string expressions won't work.
106 The macro's expansion is not parenthesized, so that it is suitable as
107 initializer for static 'char[]' or 'const char[]' variables. */
108 #define gettext_noop(String) String
109
110 /* The separator between msgctxt and msgid in a .mo file. */
111 #define GETTEXT_CONTEXT_GLUE "\004"
112
113 /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
114 MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
115 short and rarely need to change.
116 The letter 'p' stands for 'particular' or 'special'. */
117 #ifdef DEFAULT_TEXT_DOMAIN
118 # define pgettext(Msgctxt, Msgid) \
119 pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
120 #else
121 # define pgettext(Msgctxt, Msgid) \
122 pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
123 #endif
124 #define dpgettext(Domainname, Msgctxt, Msgid) \
125 pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
126 #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
127 pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
128 #ifdef DEFAULT_TEXT_DOMAIN
129 # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
130 npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
131 #else
132 # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
133 npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
134 #endif
135 #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
136 npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
137 #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
138 npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
139
140 #ifdef __GNUC__
141 __inline
142 #else
143 #ifdef __cplusplus
144 inline
145 #endif
146 #endif
147 static const char *
148 pgettext_aux (const char *domain,
149 const char *msg_ctxt_id, const char *msgid,
150 int category)
151 {
152 const char *translation = dcgettext (domain, msg_ctxt_id, category);
153 if (translation == msg_ctxt_id)
154 return msgid;
155 else
156 return translation;
157 }
158
159 #ifdef __GNUC__
160 __inline
161 #else
162 #ifdef __cplusplus
163 inline
164 #endif
165 #endif
166 static const char *
167 npgettext_aux (const char *domain,
168 const char *msg_ctxt_id, const char *msgid,
169 const char *msgid_plural, unsigned long int n,
170 int category)
171 {
172 const char *translation =
173 dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
174 if (translation == msg_ctxt_id || translation == msgid_plural)
175 return (n == 1 ? msgid : msgid_plural);
176 else
177 return translation;
178 }
179
180 /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
181 can be arbitrary expressions. But for string literals these macros are
182 less efficient than those above. */
183
184 #include <string.h>
185
186 #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
187 /* || __STDC_VERSION__ == 199901L
188 || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
189 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
190 #else
191 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
192 #endif
193
194 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
195 #include <stdlib.h>
196 #endif
197
198 #define pgettext_expr(Msgctxt, Msgid) \
199 dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
200 #define dpgettext_expr(Domainname, Msgctxt, Msgid) \
201 dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
202
203 #ifdef __GNUC__
204 __inline
205 #else
206 #ifdef __cplusplus
207 inline
208 #endif
209 #endif
210 static const char *
211 dcpgettext_expr (const char *domain,
212 const char *msgctxt, const char *msgid,
213 int category)
214 {
215 size_t msgctxt_len = strlen (msgctxt) + 1;
216 size_t msgid_len = strlen (msgid) + 1;
217 const char *translation;
218 #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
219 char msg_ctxt_id[msgctxt_len + msgid_len];
220 #else
221 char buf[1024];
222 char *msg_ctxt_id =
223 (msgctxt_len + msgid_len <= sizeof (buf)
224 ? buf
225 : (char *) malloc (msgctxt_len + msgid_len));
226 if (msg_ctxt_id != NULL)
227 #endif
228 {
229 int found_translation;
230 memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
231 msg_ctxt_id[msgctxt_len - 1] = '\004';
232 memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
233 translation = dcgettext (domain, msg_ctxt_id, category);
234 found_translation = (translation != msg_ctxt_id);
235 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
236 if (msg_ctxt_id != buf)
237 free (msg_ctxt_id);
238 #endif
239 if (found_translation)
240 return translation;
241 }
242 return msgid;
243 }
244
245 #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
246 dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
247 #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
248 dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
249
250 #ifdef __GNUC__
251 __inline
252 #else
253 #ifdef __cplusplus
254 inline
255 #endif
256 #endif
257 static const char *
258 dcnpgettext_expr (const char *domain,
259 const char *msgctxt, const char *msgid,
260 const char *msgid_plural, unsigned long int n,
261 int category)
262 {
263 size_t msgctxt_len = strlen (msgctxt) + 1;
264 size_t msgid_len = strlen (msgid) + 1;
265 const char *translation;
266 #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
267 char msg_ctxt_id[msgctxt_len + msgid_len];
268 #else
269 char buf[1024];
270 char *msg_ctxt_id =
271 (msgctxt_len + msgid_len <= sizeof (buf)
272 ? buf
273 : (char *) malloc (msgctxt_len + msgid_len));
274 if (msg_ctxt_id != NULL)
275 #endif
276 {
277 int found_translation;
278 memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
279 msg_ctxt_id[msgctxt_len - 1] = '\004';
280 memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
281 translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
282 found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
283 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
284 if (msg_ctxt_id != buf)
285 free (msg_ctxt_id);
286 #endif
287 if (found_translation)
288 return translation;
289 }
290 return (n == 1 ? msgid : msgid_plural);
291 }
292
293 #endif /* _LIBGETTEXT_H */
0 /* malloc() function that is glibc compatible.
1
2 Copyright (C) 1997-1998, 2006-2007, 2009-2018 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, see <https://www.gnu.org/licenses/>. */
16
17 /* written by Jim Meyering and Bruno Haible */
18
19 #define _GL_USE_STDLIB_ALLOC 1
20 #include <config.h>
21 /* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
22 #ifdef malloc
23 # define NEED_MALLOC_GNU 1
24 # undef malloc
25 /* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */
26 #elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU
27 # define NEED_MALLOC_GNU 1
28 #endif
29
30 #include <stdlib.h>
31
32 #include <errno.h>
33
34 /* Allocate an N-byte block of memory from the heap.
35 If N is zero, allocate a 1-byte block. */
36
37 void *
38 rpl_malloc (size_t n)
39 {
40 void *result;
41
42 #if NEED_MALLOC_GNU
43 if (n == 0)
44 n = 1;
45 #endif
46
47 result = malloc (n);
48
49 #if !HAVE_MALLOC_POSIX
50 if (result == NULL)
51 errno = ENOMEM;
52 #endif
53
54 return result;
55 }
0 /* Invalid parameter handler for MSVC runtime libraries.
1 Copyright (C) 2011-2018 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License along
14 with this program; if not, see <https://www.gnu.org/licenses/>. */
15
16 #include <config.h>
17
18 /* Specification. */
19 #include "msvc-inval.h"
20
21 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
22 && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING)
23
24 /* Get _invalid_parameter_handler type and _set_invalid_parameter_handler
25 declaration. */
26 # include <stdlib.h>
27
28 # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
29
30 static void __cdecl
31 gl_msvc_invalid_parameter_handler (const wchar_t *expression,
32 const wchar_t *function,
33 const wchar_t *file,
34 unsigned int line,
35 uintptr_t dummy)
36 {
37 }
38
39 # else
40
41 /* Get declarations of the native Windows API functions. */
42 # define WIN32_LEAN_AND_MEAN
43 # include <windows.h>
44
45 # if defined _MSC_VER
46
47 static void __cdecl
48 gl_msvc_invalid_parameter_handler (const wchar_t *expression,
49 const wchar_t *function,
50 const wchar_t *file,
51 unsigned int line,
52 uintptr_t dummy)
53 {
54 RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL);
55 }
56
57 # else
58
59 /* An index to thread-local storage. */
60 static DWORD tls_index;
61 static int tls_initialized /* = 0 */;
62
63 /* Used as a fallback only. */
64 static struct gl_msvc_inval_per_thread not_per_thread;
65
66 struct gl_msvc_inval_per_thread *
67 gl_msvc_inval_current (void)
68 {
69 if (!tls_initialized)
70 {
71 tls_index = TlsAlloc ();
72 tls_initialized = 1;
73 }
74 if (tls_index == TLS_OUT_OF_INDEXES)
75 /* TlsAlloc had failed. */
76 return &not_per_thread;
77 else
78 {
79 struct gl_msvc_inval_per_thread *pointer =
80 (struct gl_msvc_inval_per_thread *) TlsGetValue (tls_index);
81 if (pointer == NULL)
82 {
83 /* First call. Allocate a new 'struct gl_msvc_inval_per_thread'. */
84 pointer =
85 (struct gl_msvc_inval_per_thread *)
86 malloc (sizeof (struct gl_msvc_inval_per_thread));
87 if (pointer == NULL)
88 /* Could not allocate memory. Use the global storage. */
89 pointer = &not_per_thread;
90 TlsSetValue (tls_index, pointer);
91 }
92 return pointer;
93 }
94 }
95
96 static void __cdecl
97 gl_msvc_invalid_parameter_handler (const wchar_t *expression,
98 const wchar_t *function,
99 const wchar_t *file,
100 unsigned int line,
101 uintptr_t dummy)
102 {
103 struct gl_msvc_inval_per_thread *current = gl_msvc_inval_current ();
104 if (current->restart_valid)
105 longjmp (current->restart, 1);
106 else
107 /* An invalid parameter notification from outside the gnulib code.
108 Give the caller a chance to intervene. */
109 RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL);
110 }
111
112 # endif
113
114 # endif
115
116 static int gl_msvc_inval_initialized /* = 0 */;
117
118 void
119 gl_msvc_inval_ensure_handler (void)
120 {
121 if (gl_msvc_inval_initialized == 0)
122 {
123 _set_invalid_parameter_handler (gl_msvc_invalid_parameter_handler);
124 gl_msvc_inval_initialized = 1;
125 }
126 }
127
128 #endif
0 /* Invalid parameter handler for MSVC runtime libraries.
1 Copyright (C) 2011-2018 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License along
14 with this program; if not, see <https://www.gnu.org/licenses/>. */
15
16 #ifndef _MSVC_INVAL_H
17 #define _MSVC_INVAL_H
18
19 /* With MSVC runtime libraries with the "invalid parameter handler" concept,
20 functions like fprintf(), dup2(), or close() crash when the caller passes
21 an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF)
22 instead.
23 This file defines macros that turn such an invalid parameter notification
24 into a non-local exit. An error code can then be produced at the target
25 of this exit. You can thus write code like
26
27 TRY_MSVC_INVAL
28 {
29 <Code that can trigger an invalid parameter notification
30 but does not do 'return', 'break', 'continue', nor 'goto'.>
31 }
32 CATCH_MSVC_INVAL
33 {
34 <Code that handles an invalid parameter notification
35 but does not do 'return', 'break', 'continue', nor 'goto'.>
36 }
37 DONE_MSVC_INVAL;
38
39 This entire block expands to a single statement.
40
41 The handling of invalid parameters can be done in three ways:
42
43 * The default way, which is reasonable for programs (not libraries):
44 AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [DEFAULT_HANDLING])
45
46 * The way for libraries that make "hairy" calls (like close(-1), or
47 fclose(fp) where fileno(fp) is closed, or simply getdtablesize()):
48 AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [HAIRY_LIBRARY_HANDLING])
49
50 * The way for libraries that make no "hairy" calls:
51 AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING])
52 */
53
54 #define DEFAULT_HANDLING 0
55 #define HAIRY_LIBRARY_HANDLING 1
56 #define SANE_LIBRARY_HANDLING 2
57
58 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
59 && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING)
60 /* A native Windows platform with the "invalid parameter handler" concept,
61 and either DEFAULT_HANDLING or HAIRY_LIBRARY_HANDLING. */
62
63 # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
64 /* Default handling. */
65
66 # ifdef __cplusplus
67 extern "C" {
68 # endif
69
70 /* Ensure that the invalid parameter handler in installed that just returns.
71 Because we assume no other part of the program installs a different
72 invalid parameter handler, this solution is multithread-safe. */
73 extern void gl_msvc_inval_ensure_handler (void);
74
75 # ifdef __cplusplus
76 }
77 # endif
78
79 # define TRY_MSVC_INVAL \
80 do \
81 { \
82 gl_msvc_inval_ensure_handler (); \
83 if (1)
84 # define CATCH_MSVC_INVAL \
85 else
86 # define DONE_MSVC_INVAL \
87 } \
88 while (0)
89
90 # else
91 /* Handling for hairy libraries. */
92
93 # include <excpt.h>
94
95 /* Gnulib can define its own status codes, as described in the page
96 "Raising Software Exceptions" on microsoft.com
97 <https://msdn.microsoft.com/en-us/library/het71c37.aspx>.
98 Our status codes are composed of
99 - 0xE0000000, mandatory for all user-defined status codes,
100 - 0x474E550, a API identifier ("GNU"),
101 - 0, 1, 2, ..., used to distinguish different status codes from the
102 same API. */
103 # define STATUS_GNULIB_INVALID_PARAMETER (0xE0000000 + 0x474E550 + 0)
104
105 # if defined _MSC_VER
106 /* A compiler that supports __try/__except, as described in the page
107 "try-except statement" on microsoft.com
108 <https://msdn.microsoft.com/en-us/library/s58ftw19.aspx>.
109 With __try/__except, we can use the multithread-safe exception handling. */
110
111 # ifdef __cplusplus
112 extern "C" {
113 # endif
114
115 /* Ensure that the invalid parameter handler in installed that raises a
116 software exception with code STATUS_GNULIB_INVALID_PARAMETER.
117 Because we assume no other part of the program installs a different
118 invalid parameter handler, this solution is multithread-safe. */
119 extern void gl_msvc_inval_ensure_handler (void);
120
121 # ifdef __cplusplus
122 }
123 # endif
124
125 # define TRY_MSVC_INVAL \
126 do \
127 { \
128 gl_msvc_inval_ensure_handler (); \
129 __try
130 # define CATCH_MSVC_INVAL \
131 __except (GetExceptionCode () == STATUS_GNULIB_INVALID_PARAMETER \
132 ? EXCEPTION_EXECUTE_HANDLER \
133 : EXCEPTION_CONTINUE_SEARCH)
134 # define DONE_MSVC_INVAL \
135 } \
136 while (0)
137
138 # else
139 /* Any compiler.
140 We can only use setjmp/longjmp. */
141
142 # include <setjmp.h>
143
144 # ifdef __cplusplus
145 extern "C" {
146 # endif
147
148 struct gl_msvc_inval_per_thread
149 {
150 /* The restart that will resume execution at the code between
151 CATCH_MSVC_INVAL and DONE_MSVC_INVAL. It is enabled only between
152 TRY_MSVC_INVAL and CATCH_MSVC_INVAL. */
153 jmp_buf restart;
154
155 /* Tells whether the contents of restart is valid. */
156 int restart_valid;
157 };
158
159 /* Ensure that the invalid parameter handler in installed that passes
160 control to the gl_msvc_inval_restart if it is valid, or raises a
161 software exception with code STATUS_GNULIB_INVALID_PARAMETER otherwise.
162 Because we assume no other part of the program installs a different
163 invalid parameter handler, this solution is multithread-safe. */
164 extern void gl_msvc_inval_ensure_handler (void);
165
166 /* Return a pointer to the per-thread data for the current thread. */
167 extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void);
168
169 # ifdef __cplusplus
170 }
171 # endif
172
173 # define TRY_MSVC_INVAL \
174 do \
175 { \
176 struct gl_msvc_inval_per_thread *msvc_inval_current; \
177 gl_msvc_inval_ensure_handler (); \
178 msvc_inval_current = gl_msvc_inval_current (); \
179 /* First, initialize gl_msvc_inval_restart. */ \
180 if (setjmp (msvc_inval_current->restart) == 0) \
181 { \
182 /* Then, mark it as valid. */ \
183 msvc_inval_current->restart_valid = 1;
184 # define CATCH_MSVC_INVAL \
185 /* Execution completed. \
186 Mark gl_msvc_inval_restart as invalid. */ \
187 msvc_inval_current->restart_valid = 0; \
188 } \
189 else \
190 { \
191 /* Execution triggered an invalid parameter notification. \
192 Mark gl_msvc_inval_restart as invalid. */ \
193 msvc_inval_current->restart_valid = 0;
194 # define DONE_MSVC_INVAL \
195 } \
196 } \
197 while (0)
198
199 # endif
200
201 # endif
202
203 #else
204 /* A platform that does not need to the invalid parameter handler,
205 or when SANE_LIBRARY_HANDLING is desired. */
206
207 /* The braces here avoid GCC warnings like
208 "warning: suggest explicit braces to avoid ambiguous 'else'". */
209 # define TRY_MSVC_INVAL \
210 do \
211 { \
212 if (1)
213 # define CATCH_MSVC_INVAL \
214 else
215 # define DONE_MSVC_INVAL \
216 } \
217 while (0)
218
219 #endif
220
221 #endif /* _MSVC_INVAL_H */
0 /* Wrappers that don't throw invalid parameter notifications
1 with MSVC runtime libraries.
2 Copyright (C) 2011-2018 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License along
15 with this program; if not, see <https://www.gnu.org/licenses/>. */
16
17 #include <config.h>
18
19 /* Specification. */
20 #include "msvc-nothrow.h"
21
22 /* Get declarations of the native Windows API functions. */
23 #define WIN32_LEAN_AND_MEAN
24 #include <windows.h>
25
26 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
27 # include "msvc-inval.h"
28 #endif
29
30 #undef _get_osfhandle
31
32 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
33 intptr_t
34 _gl_nothrow_get_osfhandle (int fd)
35 {
36 intptr_t result;
37
38 TRY_MSVC_INVAL
39 {
40 result = _get_osfhandle (fd);
41 }
42 CATCH_MSVC_INVAL
43 {
44 result = (intptr_t) INVALID_HANDLE_VALUE;
45 }
46 DONE_MSVC_INVAL;
47
48 return result;
49 }
50 #endif
0 /* Wrappers that don't throw invalid parameter notifications
1 with MSVC runtime libraries.
2 Copyright (C) 2011-2018 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License along
15 with this program; if not, see <https://www.gnu.org/licenses/>. */
16
17 #ifndef _MSVC_NOTHROW_H
18 #define _MSVC_NOTHROW_H
19
20 /* With MSVC runtime libraries with the "invalid parameter handler" concept,
21 functions like fprintf(), dup2(), or close() crash when the caller passes
22 an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF)
23 instead.
24 This file defines wrappers that turn such an invalid parameter notification
25 into an error code. */
26
27 #if defined _WIN32 && ! defined __CYGWIN__
28
29 /* Get original declaration of _get_osfhandle. */
30 # include <io.h>
31
32 # if HAVE_MSVC_INVALID_PARAMETER_HANDLER
33
34 /* Override _get_osfhandle. */
35 extern intptr_t _gl_nothrow_get_osfhandle (int fd);
36 # define _get_osfhandle _gl_nothrow_get_osfhandle
37
38 # endif
39
40 #endif
41
42 #endif /* _MSVC_NOTHROW_H */
0 /* Searching in a string.
1 Copyright (C) 2008-2018 Free Software Foundation, Inc.
2
3 This program is free software: you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as published by
5 the Free Software Foundation; either version 3 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with this program. If not, see <https://www.gnu.org/licenses/>. */
15
16 #include <config.h>
17
18 /* Specification. */
19 #include <string.h>
20
21 /* Find the first occurrence of C in S. */
22 void *
23 rawmemchr (const void *s, int c_in)
24 {
25 /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
26 long instead of a 64-bit uintmax_t tends to give better
27 performance. On 64-bit hardware, unsigned long is generally 64
28 bits already. Change this typedef to experiment with
29 performance. */
30 typedef unsigned long int longword;
31
32 const unsigned char *char_ptr;
33 const longword *longword_ptr;
34 longword repeated_one;
35 longword repeated_c;
36 unsigned char c;
37
38 c = (unsigned char) c_in;
39
40 /* Handle the first few bytes by reading one byte at a time.
41 Do this until CHAR_PTR is aligned on a longword boundary. */
42 for (char_ptr = (const unsigned char *) s;
43 (size_t) char_ptr % sizeof (longword) != 0;
44 ++char_ptr)
45 if (*char_ptr == c)
46 return (void *) char_ptr;
47
48 longword_ptr = (const longword *) char_ptr;
49
50 /* All these elucidatory comments refer to 4-byte longwords,
51 but the theory applies equally well to any size longwords. */
52
53 /* Compute auxiliary longword values:
54 repeated_one is a value which has a 1 in every byte.
55 repeated_c has c in every byte. */
56 repeated_one = 0x01010101;
57 repeated_c = c | (c << 8);
58 repeated_c |= repeated_c << 16;
59 if (0xffffffffU < (longword) -1)
60 {
61 repeated_one |= repeated_one << 31 << 1;
62 repeated_c |= repeated_c << 31 << 1;
63 if (8 < sizeof (longword))
64 {
65 size_t i;
66
67 for (i = 64; i < sizeof (longword) * 8; i *= 2)
68 {
69 repeated_one |= repeated_one << i;
70 repeated_c |= repeated_c << i;
71 }
72 }
73 }
74
75 /* Instead of the traditional loop which tests each byte, we will
76 test a longword at a time. The tricky part is testing if *any of
77 the four* bytes in the longword in question are equal to NUL or
78 c. We first use an xor with repeated_c. This reduces the task
79 to testing whether *any of the four* bytes in longword1 is zero.
80
81 We compute tmp =
82 ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
83 That is, we perform the following operations:
84 1. Subtract repeated_one.
85 2. & ~longword1.
86 3. & a mask consisting of 0x80 in every byte.
87 Consider what happens in each byte:
88 - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
89 and step 3 transforms it into 0x80. A carry can also be propagated
90 to more significant bytes.
91 - If a byte of longword1 is nonzero, let its lowest 1 bit be at
92 position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
93 the byte ends in a single bit of value 0 and k bits of value 1.
94 After step 2, the result is just k bits of value 1: 2^k - 1. After
95 step 3, the result is 0. And no carry is produced.
96 So, if longword1 has only non-zero bytes, tmp is zero.
97 Whereas if longword1 has a zero byte, call j the position of the least
98 significant zero byte. Then the result has a zero at positions 0, ...,
99 j-1 and a 0x80 at position j. We cannot predict the result at the more
100 significant bytes (positions j+1..3), but it does not matter since we
101 already have a non-zero bit at position 8*j+7.
102
103 The test whether any byte in longword1 is zero is equivalent
104 to testing whether tmp is nonzero.
105
106 This test can read beyond the end of a string, depending on where
107 C_IN is encountered. However, this is considered safe since the
108 initialization phase ensured that the read will be aligned,
109 therefore, the read will not cross page boundaries and will not
110 cause a fault. */
111
112 while (1)
113 {
114 longword longword1 = *longword_ptr ^ repeated_c;
115
116 if ((((longword1 - repeated_one) & ~longword1)
117 & (repeated_one << 7)) != 0)
118 break;
119 longword_ptr++;
120 }
121
122 char_ptr = (const unsigned char *) longword_ptr;
123
124 /* At this point, we know that one of the sizeof (longword) bytes
125 starting at char_ptr is == c. On little-endian machines, we
126 could determine the first such byte without any further memory
127 accesses, just by looking at the tmp result from the last loop
128 iteration. But this does not work on big-endian machines.
129 Choose code that works in both cases. */
130
131 char_ptr = (unsigned char *) longword_ptr;
132 while (*char_ptr != c)
133 char_ptr++;
134 return (void *) char_ptr;
135 }
0 # Suppress a valgrind message about use of uninitialized memory in rawmemchr().
1 # This use is OK because it provides only a speedup.
2 {
3 rawmemchr-value4
4 Memcheck:Value4
5 fun:rawmemchr
6 }
7 {
8 rawmemchr-value8
9 Memcheck:Value8
10 fun:rawmemchr
11 }
0 /* Provide relocatable packages.
1 Copyright (C) 2003-2006, 2008-2018 Free Software Foundation, Inc.
2 Written by Bruno Haible <bruno@clisp.org>, 2003.
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
16
17
18 /* Tell glibc's <stdio.h> to provide a prototype for getline().
19 This must come before <config.h> because <config.h> may include
20 <features.h>, and once <features.h> has been included, it's too late. */
21 #ifndef _GNU_SOURCE
22 # define _GNU_SOURCE 1
23 #endif
24
25 #define _GL_USE_STDLIB_ALLOC 1
26 #include <config.h>
27
28 /* Specification. */
29 #include "relocatable.h"
30
31 #if ENABLE_RELOCATABLE
32
33 #include <stddef.h>
34 #include <stdio.h>
35 #include <stdlib.h>
36 #include <string.h>
37
38 #ifdef NO_XMALLOC
39 # define xmalloc malloc
40 #else
41 # include "xalloc.h"
42 #endif
43
44 #if defined _WIN32 && !defined __CYGWIN__
45 # define WIN32_LEAN_AND_MEAN
46 # include <windows.h>
47 #endif
48
49 #ifdef __EMX__
50 # define INCL_DOS
51 # include <os2.h>
52
53 # define strcmp stricmp
54 # define strncmp strnicmp
55 #endif
56
57 #if DEPENDS_ON_LIBCHARSET
58 # include <libcharset.h>
59 #endif
60 #if DEPENDS_ON_LIBICONV && HAVE_ICONV
61 # include <iconv.h>
62 #endif
63 #if DEPENDS_ON_LIBINTL && ENABLE_NLS
64 # include <libintl.h>
65 #endif
66
67 /* Faked cheap 'bool'. */
68 #undef bool
69 #undef false
70 #undef true
71 #define bool int
72 #define false 0
73 #define true 1
74
75 /* Pathname support.
76 ISSLASH(C) tests whether C is a directory separator character.
77 IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
78 */
79 #if (defined _WIN32 && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__
80 /* Native Windows, OS/2, DOS */
81 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
82 # define HAS_DEVICE(P) \
83 ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
84 && (P)[1] == ':')
85 # define IS_PATH_WITH_DIR(P) \
86 (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
87 # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
88 #else
89 /* Unix */
90 # define ISSLASH(C) ((C) == '/')
91 # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
92 # define FILE_SYSTEM_PREFIX_LEN(P) 0
93 #endif
94
95 /* Whether to enable the more costly support for relocatable libraries.
96 It allows libraries to be have been installed with a different original
97 prefix than the program. But it is quite costly, especially on Cygwin
98 platforms, see below. Therefore we enable it by default only on native
99 Windows platforms. */
100 #ifndef ENABLE_COSTLY_RELOCATABLE
101 # if defined _WIN32 && !defined __CYGWIN__
102 # define ENABLE_COSTLY_RELOCATABLE 1
103 # else
104 # define ENABLE_COSTLY_RELOCATABLE 0
105 # endif
106 #endif
107
108 /* Original installation prefix. */
109 static char *orig_prefix;
110 static size_t orig_prefix_len;
111 /* Current installation prefix. */
112 static char *curr_prefix;
113 static size_t curr_prefix_len;
114 /* These prefixes do not end in a slash. Anything that will be concatenated
115 to them must start with a slash. */
116
117 /* Sets the original and the current installation prefix of this module.
118 Relocation simply replaces a pathname starting with the original prefix
119 by the corresponding pathname with the current prefix instead. Both
120 prefixes should be directory names without trailing slash (i.e. use ""
121 instead of "/"). */
122 static void
123 set_this_relocation_prefix (const char *orig_prefix_arg,
124 const char *curr_prefix_arg)
125 {
126 if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
127 /* Optimization: if orig_prefix and curr_prefix are equal, the
128 relocation is a nop. */
129 && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
130 {
131 /* Duplicate the argument strings. */
132 char *memory;
133
134 orig_prefix_len = strlen (orig_prefix_arg);
135 curr_prefix_len = strlen (curr_prefix_arg);
136 memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
137 #ifdef NO_XMALLOC
138 if (memory != NULL)
139 #endif
140 {
141 memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
142 orig_prefix = memory;
143 memory += orig_prefix_len + 1;
144 memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
145 curr_prefix = memory;
146 return;
147 }
148 }
149 orig_prefix = NULL;
150 curr_prefix = NULL;
151 /* Don't worry about wasted memory here - this function is usually only
152 called once. */
153 }
154
155 /* Sets the original and the current installation prefix of the package.
156 Relocation simply replaces a pathname starting with the original prefix
157 by the corresponding pathname with the current prefix instead. Both
158 prefixes should be directory names without trailing slash (i.e. use ""
159 instead of "/"). */
160 void
161 set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
162 {
163 set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
164
165 /* Now notify all dependent libraries. */
166 #if DEPENDS_ON_LIBCHARSET
167 libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
168 #endif
169 #if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
170 libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
171 #endif
172 #if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
173 libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
174 #endif
175 }
176
177 #if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
178
179 /* Convenience function:
180 Computes the current installation prefix, based on the original
181 installation prefix, the original installation directory of a particular
182 file, and the current pathname of this file.
183 Returns it, freshly allocated. Returns NULL upon failure. */
184 #ifdef IN_LIBRARY
185 #define compute_curr_prefix local_compute_curr_prefix
186 static
187 #endif
188 char *
189 compute_curr_prefix (const char *orig_installprefix,
190 const char *orig_installdir,
191 const char *curr_pathname)
192 {
193 char *curr_installdir;
194 const char *rel_installdir;
195
196 if (curr_pathname == NULL)
197 return NULL;
198
199 /* Determine the relative installation directory, relative to the prefix.
200 This is simply the difference between orig_installprefix and
201 orig_installdir. */
202 if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
203 != 0)
204 /* Shouldn't happen - nothing should be installed outside $(prefix). */
205 return NULL;
206 rel_installdir = orig_installdir + strlen (orig_installprefix);
207
208 /* Determine the current installation directory. */
209 {
210 const char *p_base = curr_pathname + FILE_SYSTEM_PREFIX_LEN (curr_pathname);
211 const char *p = curr_pathname + strlen (curr_pathname);
212 char *q;
213
214 while (p > p_base)
215 {
216 p--;
217 if (ISSLASH (*p))
218 break;
219 }
220
221 q = (char *) xmalloc (p - curr_pathname + 1);
222 #ifdef NO_XMALLOC
223 if (q == NULL)
224 return NULL;
225 #endif
226 memcpy (q, curr_pathname, p - curr_pathname);
227 q[p - curr_pathname] = '\0';
228 curr_installdir = q;
229 }
230
231 /* Compute the current installation prefix by removing the trailing
232 rel_installdir from it. */
233 {
234 const char *rp = rel_installdir + strlen (rel_installdir);
235 const char *cp = curr_installdir + strlen (curr_installdir);
236 const char *cp_base =
237 curr_installdir + FILE_SYSTEM_PREFIX_LEN (curr_installdir);
238
239 while (rp > rel_installdir && cp > cp_base)
240 {
241 bool same = false;
242 const char *rpi = rp;
243 const char *cpi = cp;
244
245 while (rpi > rel_installdir && cpi > cp_base)
246 {
247 rpi--;
248 cpi--;
249 if (ISSLASH (*rpi) || ISSLASH (*cpi))
250 {
251 if (ISSLASH (*rpi) && ISSLASH (*cpi))
252 same = true;
253 break;
254 }
255 /* Do case-insensitive comparison if the file system is always or
256 often case-insensitive. It's better to accept the comparison
257 if the difference is only in case, rather than to fail. */
258 #if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
259 /* Native Windows, Cygwin, OS/2, DOS - case insignificant file system */
260 if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
261 != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
262 break;
263 #else
264 if (*rpi != *cpi)
265 break;
266 #endif
267 }
268 if (!same)
269 break;
270 /* The last pathname component was the same. opi and cpi now point
271 to the slash before it. */
272 rp = rpi;
273 cp = cpi;
274 }
275
276 if (rp > rel_installdir)
277 {
278 /* Unexpected: The curr_installdir does not end with rel_installdir. */
279 free (curr_installdir);
280 return NULL;
281 }
282
283 {
284 size_t curr_prefix_len = cp - curr_installdir;
285 char *curr_prefix;
286
287 curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
288 #ifdef NO_XMALLOC
289 if (curr_prefix == NULL)
290 {
291 free (curr_installdir);
292 return NULL;
293 }
294 #endif
295 memcpy (curr_prefix, curr_installdir, curr_prefix_len);
296 curr_prefix[curr_prefix_len] = '\0';
297
298 free (curr_installdir);
299
300 return curr_prefix;
301 }
302 }
303 }
304
305 #endif /* !IN_LIBRARY || PIC */
306
307 #if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
308
309 /* Full pathname of shared library, or NULL. */
310 static char *shared_library_fullname;
311
312 #if defined _WIN32 && !defined __CYGWIN__
313 /* Native Windows only.
314 On Cygwin, it is better to use the Cygwin provided /proc interface, than
315 to use native Windows API and cygwin_conv_to_posix_path, because it
316 supports longer file names
317 (see <https://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */
318
319 /* Determine the full pathname of the shared library when it is loaded. */
320
321 BOOL WINAPI
322 DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
323 {
324 (void) reserved;
325
326 if (event == DLL_PROCESS_ATTACH)
327 {
328 /* The DLL is being loaded into an application's address range. */
329 static char location[MAX_PATH];
330
331 if (!GetModuleFileName (module_handle, location, sizeof (location)))
332 /* Shouldn't happen. */
333 return FALSE;
334
335 if (!IS_PATH_WITH_DIR (location))
336 /* Shouldn't happen. */
337 return FALSE;
338
339 shared_library_fullname = strdup (location);
340 }
341
342 return TRUE;
343 }
344
345 #elif defined __EMX__
346
347 extern int _CRT_init (void);
348 extern void _CRT_term (void);
349 extern void __ctordtorInit (void);
350 extern void __ctordtorTerm (void);
351
352 unsigned long _System
353 _DLL_InitTerm (unsigned long hModule, unsigned long ulFlag)
354 {
355 static char location[CCHMAXPATH];
356
357 switch (ulFlag)
358 {
359 case 0:
360 if (_CRT_init () == -1)
361 return 0;
362
363 __ctordtorInit();
364
365 /* See http://cyberkinetica.homeunix.net/os2tk45/cp1/1247_L2H_DosQueryModuleNameSy.html
366 for specification of DosQueryModuleName(). */
367 if (DosQueryModuleName (hModule, sizeof (location), location))
368 return 0;
369
370 _fnslashify (location);
371 shared_library_fullname = strdup (location);
372 break;
373
374 case 1:
375 __ctordtorTerm();
376
377 _CRT_term ();
378 break;
379 }
380
381 return 1;
382 }
383
384 #else /* Unix */
385
386 static void
387 find_shared_library_fullname ()
388 {
389 #if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
390 /* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
391 function.
392 Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
393 But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
394 Cygwin 1.7. */
395 FILE *fp;
396
397 /* Open the current process' maps file. It describes one VMA per line. */
398 fp = fopen ("/proc/self/maps", "r");
399 if (fp)
400 {
401 unsigned long address = (unsigned long) &find_shared_library_fullname;
402 for (;;)
403 {
404 unsigned long start, end;
405 int c;
406
407 if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
408 break;
409 if (address >= start && address <= end - 1)
410 {
411 /* Found it. Now see if this line contains a filename. */
412 while (c = getc (fp), c != EOF && c != '\n' && c != '/')
413 continue;
414 if (c == '/')
415 {
416 size_t size;
417 int len;
418
419 ungetc (c, fp);
420 shared_library_fullname = NULL; size = 0;
421 len = getline (&shared_library_fullname, &size, fp);
422 if (len >= 0)
423 {
424 /* Success: filled shared_library_fullname. */
425 if (len > 0 && shared_library_fullname[len - 1] == '\n')
426 shared_library_fullname[len - 1] = '\0';
427 }
428 }
429 break;
430 }
431 while (c = getc (fp), c != EOF && c != '\n')
432 continue;
433 }
434 fclose (fp);
435 }
436 #endif
437 }
438
439 #endif /* Native Windows / EMX / Unix */
440
441 /* Return the full pathname of the current shared library.
442 Return NULL if unknown.
443 Guaranteed to work only on Linux, EMX, Cygwin, and native Windows. */
444 static char *
445 get_shared_library_fullname ()
446 {
447 #if !(defined _WIN32 && !defined __CYGWIN__) && !defined __EMX__
448 static bool tried_find_shared_library_fullname;
449 if (!tried_find_shared_library_fullname)
450 {
451 find_shared_library_fullname ();
452 tried_find_shared_library_fullname = true;
453 }
454 #endif
455 return shared_library_fullname;
456 }
457
458 #endif /* PIC */
459
460 /* Returns the pathname, relocated according to the current installation
461 directory.
462 The returned string is either PATHNAME unmodified or a freshly allocated
463 string that you can free with free() after casting it to 'char *'. */
464 const char *
465 relocate (const char *pathname)
466 {
467 #if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
468 static int initialized;
469
470 /* Initialization code for a shared library. */
471 if (!initialized)
472 {
473 /* At this point, orig_prefix and curr_prefix likely have already been
474 set through the main program's set_program_name_and_installdir
475 function. This is sufficient in the case that the library has
476 initially been installed in the same orig_prefix. But we can do
477 better, to also cover the cases that 1. it has been installed
478 in a different prefix before being moved to orig_prefix and (later)
479 to curr_prefix, 2. unlike the program, it has not moved away from
480 orig_prefix. */
481 const char *orig_installprefix = INSTALLPREFIX;
482 const char *orig_installdir = INSTALLDIR;
483 char *curr_prefix_better;
484
485 curr_prefix_better =
486 compute_curr_prefix (orig_installprefix, orig_installdir,
487 get_shared_library_fullname ());
488
489 set_relocation_prefix (orig_installprefix,
490 curr_prefix_better != NULL
491 ? curr_prefix_better
492 : curr_prefix);
493
494 if (curr_prefix_better != NULL)
495 free (curr_prefix_better);
496
497 initialized = 1;
498 }
499 #endif
500
501 /* Note: It is not necessary to perform case insensitive comparison here,
502 even for DOS-like file systems, because the pathname argument was
503 typically created from the same Makefile variable as orig_prefix came
504 from. */
505 if (orig_prefix != NULL && curr_prefix != NULL
506 && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
507 {
508 if (pathname[orig_prefix_len] == '\0')
509 {
510 /* pathname equals orig_prefix. */
511 char *result = (char *) xmalloc (strlen (curr_prefix) + 1);
512
513 #ifdef NO_XMALLOC
514 if (result != NULL)
515 #endif
516 {
517 strcpy (result, curr_prefix);
518 return result;
519 }
520 }
521 else if (ISSLASH (pathname[orig_prefix_len]))
522 {
523 /* pathname starts with orig_prefix. */
524 const char *pathname_tail = &pathname[orig_prefix_len];
525 char *result =
526 (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);
527
528 #ifdef NO_XMALLOC
529 if (result != NULL)
530 #endif
531 {
532 memcpy (result, curr_prefix, curr_prefix_len);
533 strcpy (result + curr_prefix_len, pathname_tail);
534 return result;
535 }
536 }
537 }
538
539 #ifdef __EMX__
540 # ifdef __KLIBC__
541 # undef strncmp
542
543 if (strncmp (pathname, "/@unixroot", 10) == 0
544 && (pathname[10] == '\0' || ISSLASH (pathname[10])))
545 {
546 /* kLIBC itself processes /@unixroot prefix */
547 return pathname;
548 }
549 else
550 # endif
551 if (ISSLASH (pathname[0]))
552 {
553 const char *unixroot = getenv ("UNIXROOT");
554
555 if (unixroot && HAS_DEVICE (unixroot) && unixroot[2] == '\0')
556 {
557 char *result = (char *) xmalloc (2 + strlen (pathname) + 1);
558 #ifdef NO_XMALLOC
559 if (result != NULL)
560 #endif
561 {
562 memcpy (result, unixroot, 2);
563 strcpy (result + 2, pathname);
564 return result;
565 }
566 }
567 }
568 #endif
569
570 /* Nothing to relocate. */
571 return pathname;
572 }
573
574 /* Returns the pathname, relocated according to the current installation
575 directory.
576 This function sets *ALLOCATEDP to the allocated memory, or to NULL if
577 no memory allocation occurs. So that, after you're done with the return
578 value, to reclaim allocated memory, you can do: free (*ALLOCATEDP). */
579 const char *
580 relocate2 (const char *pathname, char **allocatedp)
581 {
582 const char *result = relocate (pathname);
583 *allocatedp = (result != pathname ? (char *) result : NULL);
584 return result;
585 }
586
587 #endif
0 /* Provide relocatable packages.
1 Copyright (C) 2003, 2005, 2008-2018 Free Software Foundation, Inc.
2 Written by Bruno Haible <bruno@clisp.org>, 2003.
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
16
17 #ifndef _RELOCATABLE_H
18 #define _RELOCATABLE_H
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24
25 /* This can be enabled through the configure --enable-relocatable option. */
26 #if ENABLE_RELOCATABLE
27
28 /* When building a DLL, we must export some functions. Note that because
29 this is a private .h file, we don't need to use __declspec(dllimport)
30 in any case. */
31 #if HAVE_VISIBILITY && BUILDING_DLL
32 # define RELOCATABLE_DLL_EXPORTED __attribute__((__visibility__("default")))
33 #elif defined _MSC_VER && BUILDING_DLL
34 # define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
35 #else
36 # define RELOCATABLE_DLL_EXPORTED
37 #endif
38
39 /* Sets the original and the current installation prefix of the package.
40 Relocation simply replaces a pathname starting with the original prefix
41 by the corresponding pathname with the current prefix instead. Both
42 prefixes should be directory names without trailing slash (i.e. use ""
43 instead of "/"). */
44 extern RELOCATABLE_DLL_EXPORTED void
45 set_relocation_prefix (const char *orig_prefix,
46 const char *curr_prefix);
47
48 /* Returns the pathname, relocated according to the current installation
49 directory.
50 The returned string is either PATHNAME unmodified or a freshly allocated
51 string that you can free with free() after casting it to 'char *'. */
52 extern const char * relocate (const char *pathname);
53
54 /* Returns the pathname, relocated according to the current installation
55 directory.
56 This function sets *ALLOCATEDP to the allocated memory, or to NULL if
57 no memory allocation occurs. So that, after you're done with the return
58 value, to reclaim allocated memory, you can do: free (*ALLOCATEDP). */
59 extern const char * relocate2 (const char *pathname, char **allocatedp);
60
61 /* Memory management: relocate() potentially allocates memory, because it has
62 to construct a fresh pathname. If this is a problem because your program
63 calls relocate() frequently or because you want to fix all potential memory
64 leaks anyway, you have three options:
65 1) Use this idiom:
66 const char *pathname = ...;
67 const char *rel_pathname = relocate (pathname);
68 ...
69 if (rel_pathname != pathname)
70 free ((char *) rel_pathname);
71 2) Use this idiom:
72 char *allocated;
73 const char *rel_pathname = relocate2 (..., &allocated);
74 ...
75 free (allocated);
76 3) Think about caching the result. */
77
78 /* Convenience function:
79 Computes the current installation prefix, based on the original
80 installation prefix, the original installation directory of a particular
81 file, and the current pathname of this file.
82 Returns it, freshly allocated. Returns NULL upon failure. */
83 extern char * compute_curr_prefix (const char *orig_installprefix,
84 const char *orig_installdir,
85 const char *curr_pathname);
86
87 #else
88
89 /* By default, we use the hardwired pathnames. */
90 #define relocate(pathname) (pathname)
91 #define relocate2(pathname,allocatedp) (*(allocatedp) = NULL, (pathname))
92
93 #endif
94
95
96 #ifdef __cplusplus
97 }
98 #endif
99
100 #endif /* _RELOCATABLE_H */
0 # set_this_relocation_prefix leaks intentionally
1 {
2 relocatable/set_this_relocation_prefix
3 Memcheck:Leak
4 fun:malloc
5 fun:set_this_relocation_prefix
6 fun:set_relocation_prefix
7 }
0 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
1
2 Copyright (C) 2009-2018 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, see <https://www.gnu.org/licenses/>. */
16
17 /* Written by Eric Blake. */
18
19 /*
20 * POSIX 2008 <stddef.h> for platforms that have issues.
21 * <http://www.opengroup.org/susv3xbd/stddef.h.html>
22 */
23
24 #if __GNUC__ >= 3
25 @PRAGMA_SYSTEM_HEADER@
26 #endif
27 @PRAGMA_COLUMNS@
28
29 #if defined __need_wchar_t || defined __need_size_t \
30 || defined __need_ptrdiff_t || defined __need_NULL \
31 || defined __need_wint_t
32 /* Special invocation convention inside gcc header files. In
33 particular, gcc provides a version of <stddef.h> that blindly
34 redefines NULL even when __need_wint_t was defined, even though
35 wint_t is not normally provided by <stddef.h>. Hence, we must
36 remember if special invocation has ever been used to obtain wint_t,
37 in which case we need to clean up NULL yet again. */
38
39 # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
40 # ifdef __need_wint_t
41 # define _GL_STDDEF_WINT_T
42 # endif
43 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
44 # endif
45
46 #else
47 /* Normal invocation convention. */
48
49 # ifndef _@GUARD_PREFIX@_STDDEF_H
50
51 /* The include_next requires a split double-inclusion guard. */
52
53 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
54
55 /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
56 # if (@REPLACE_NULL@ \
57 && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T))
58 # undef NULL
59 # ifdef __cplusplus
60 /* ISO C++ says that the macro NULL must expand to an integer constant
61 expression, hence '((void *) 0)' is not allowed in C++. */
62 # if __GNUG__ >= 3
63 /* GNU C++ has a __null macro that behaves like an integer ('int' or
64 'long') but has the same size as a pointer. Use that, to avoid
65 warnings. */
66 # define NULL __null
67 # else
68 # define NULL 0L
69 # endif
70 # else
71 # define NULL ((void *) 0)
72 # endif
73 # endif
74
75 # ifndef _@GUARD_PREFIX@_STDDEF_H
76 # define _@GUARD_PREFIX@_STDDEF_H
77
78 /* Some platforms lack wchar_t. */
79 #if !@HAVE_WCHAR_T@
80 # define wchar_t int
81 #endif
82
83 /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is
84 a hack in case the configure-time test was done with g++ even though
85 we are currently compiling with gcc. */
86 #if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
87 # if !GNULIB_defined_max_align_t
88 /* On the x86, the maximum storage alignment of double, long, etc. is 4,
89 but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
90 and the C11 standard allows this. Work around this problem by
91 using __alignof__ (which returns 8 for double) rather than _Alignof
92 (which returns 4), and align each union member accordingly. */
93 # ifdef __GNUC__
94 # define _GL_STDDEF_ALIGNAS(type) \
95 __attribute__ ((__aligned__ (__alignof__ (type))))
96 # else
97 # define _GL_STDDEF_ALIGNAS(type) /* */
98 # endif
99 typedef union
100 {
101 char *__p _GL_STDDEF_ALIGNAS (char *);
102 double __d _GL_STDDEF_ALIGNAS (double);
103 long double __ld _GL_STDDEF_ALIGNAS (long double);
104 long int __i _GL_STDDEF_ALIGNAS (long int);
105 } rpl_max_align_t;
106 # define max_align_t rpl_max_align_t
107 # define GNULIB_defined_max_align_t 1
108 # endif
109 #endif
110
111 # endif /* _@GUARD_PREFIX@_STDDEF_H */
112 # endif /* _@GUARD_PREFIX@_STDDEF_H */
113 #endif /* __need_XXX */
0 /* A GNU-like <stdlib.h>.
1
2 Copyright (C) 1995, 2001-2004, 2006-2018 Free Software Foundation, Inc.
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
16
17 #if __GNUC__ >= 3
18 @PRAGMA_SYSTEM_HEADER@
19 #endif
20 @PRAGMA_COLUMNS@
21
22 #if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
23 /* Special invocation conventions inside some gnulib header files,
24 and inside some glibc header files, respectively. */
25
26 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
27
28 #else
29 /* Normal invocation convention. */
30
31 #ifndef _@GUARD_PREFIX@_STDLIB_H
32
33 /* The include_next requires a split double-inclusion guard. */
34 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
35
36 #ifndef _@GUARD_PREFIX@_STDLIB_H
37 #define _@GUARD_PREFIX@_STDLIB_H
38
39 /* NetBSD 5.0 mis-defines NULL. */
40 #include <stddef.h>
41
42 /* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. */
43 #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS
44 # include <sys/wait.h>
45 #endif
46
47 /* Solaris declares getloadavg() in <sys/loadavg.h>. */
48 #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
49 /* OpenIndiana has a bug: <sys/time.h> must be included before
50 <sys/loadavg.h>. */
51 # include <sys/time.h>
52 # include <sys/loadavg.h>
53 #endif
54
55 /* Native Windows platforms declare mktemp() in <io.h>. */
56 #if 0 && (defined _WIN32 && ! defined __CYGWIN__)
57 # include <io.h>
58 #endif
59
60 #if @GNULIB_RANDOM_R@
61
62 /* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
63 from <stdlib.h> if _REENTRANT is defined. Include it whenever we need
64 'struct random_data'. */
65 # if @HAVE_RANDOM_H@
66 # include <random.h>
67 # endif
68
69 # if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
70 # include <stdint.h>
71 # endif
72
73 # if !@HAVE_STRUCT_RANDOM_DATA@
74 /* Define 'struct random_data'.
75 But allow multiple gnulib generated <stdlib.h> replacements to coexist. */
76 # if !GNULIB_defined_struct_random_data
77 struct random_data
78 {
79 int32_t *fptr; /* Front pointer. */
80 int32_t *rptr; /* Rear pointer. */
81 int32_t *state; /* Array of state values. */
82 int rand_type; /* Type of random number generator. */
83 int rand_deg; /* Degree of random number generator. */
84 int rand_sep; /* Distance between front and rear. */
85 int32_t *end_ptr; /* Pointer behind state table. */
86 };
87 # define GNULIB_defined_struct_random_data 1
88 # endif
89 # endif
90 #endif
91
92 #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__)
93 /* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
94 /* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
95 /* On Mac OS X 10.13, only <unistd.h> declares mkostemp and mkostemps. */
96 /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
97 /* But avoid namespace pollution on glibc systems and native Windows. */
98 # include <unistd.h>
99 #endif
100
101 /* The __attribute__ feature is available in gcc versions 2.5 and later.
102 The attribute __pure__ was added in gcc 2.96. */
103 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
104 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
105 #else
106 # define _GL_ATTRIBUTE_PURE /* empty */
107 #endif
108
109 /* The definition of _Noreturn is copied here. */
110
111 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
112
113 /* The definition of _GL_ARG_NONNULL is copied here. */
114
115 /* The definition of _GL_WARN_ON_USE is copied here. */
116
117
118 /* Some systems do not define EXIT_*, despite otherwise supporting C89. */
119 #ifndef EXIT_SUCCESS
120 # define EXIT_SUCCESS 0
121 #endif
122 /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
123 with proper operation of xargs. */
124 #ifndef EXIT_FAILURE
125 # define EXIT_FAILURE 1
126 #elif EXIT_FAILURE != 1
127 # undef EXIT_FAILURE
128 # define EXIT_FAILURE 1
129 #endif
130
131
132 #if @GNULIB__EXIT@
133 /* Terminate the current process with the given return code, without running
134 the 'atexit' handlers. */
135 # if !@HAVE__EXIT@
136 _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
137 # endif
138 _GL_CXXALIAS_SYS (_Exit, void, (int status));
139 _GL_CXXALIASWARN (_Exit);
140 #elif defined GNULIB_POSIXCHECK
141 # undef _Exit
142 # if HAVE_RAW_DECL__EXIT
143 _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
144 "use gnulib module _Exit for portability");
145 # endif
146 #endif
147
148
149 #if @GNULIB_ATOLL@
150 /* Parse a signed decimal integer.
151 Returns the value of the integer. Errors are not detected. */
152 # if !@HAVE_ATOLL@
153 _GL_FUNCDECL_SYS (atoll, long long, (const char *string)
154 _GL_ATTRIBUTE_PURE
155 _GL_ARG_NONNULL ((1)));
156 # endif
157 _GL_CXXALIAS_SYS (atoll, long long, (const char *string));
158 _GL_CXXALIASWARN (atoll);
159 #elif defined GNULIB_POSIXCHECK
160 # undef atoll
161 # if HAVE_RAW_DECL_ATOLL
162 _GL_WARN_ON_USE (atoll, "atoll is unportable - "
163 "use gnulib module atoll for portability");
164 # endif
165 #endif
166
167 #if @GNULIB_CALLOC_POSIX@
168 # if @REPLACE_CALLOC@
169 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
170 # undef calloc
171 # define calloc rpl_calloc
172 # endif
173 _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
174 _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
175 # else
176 _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
177 # endif
178 _GL_CXXALIASWARN (calloc);
179 #elif defined GNULIB_POSIXCHECK
180 # undef calloc
181 /* Assume calloc is always declared. */
182 _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
183 "use gnulib module calloc-posix for portability");
184 #endif
185
186 #if @GNULIB_CANONICALIZE_FILE_NAME@
187 # if @REPLACE_CANONICALIZE_FILE_NAME@
188 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
189 # define canonicalize_file_name rpl_canonicalize_file_name
190 # endif
191 _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name)
192 _GL_ARG_NONNULL ((1)));
193 _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
194 # else
195 # if !@HAVE_CANONICALIZE_FILE_NAME@
196 _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
197 _GL_ARG_NONNULL ((1)));
198 # endif
199 _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
200 # endif
201 _GL_CXXALIASWARN (canonicalize_file_name);
202 #elif defined GNULIB_POSIXCHECK
203 # undef canonicalize_file_name
204 # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
205 _GL_WARN_ON_USE (canonicalize_file_name,
206 "canonicalize_file_name is unportable - "
207 "use gnulib module canonicalize-lgpl for portability");
208 # endif
209 #endif
210
211 #if @GNULIB_GETLOADAVG@
212 /* Store max(NELEM,3) load average numbers in LOADAVG[].
213 The three numbers are the load average of the last 1 minute, the last 5
214 minutes, and the last 15 minutes, respectively.
215 LOADAVG is an array of NELEM numbers. */
216 # if !@HAVE_DECL_GETLOADAVG@
217 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
218 _GL_ARG_NONNULL ((1)));
219 # endif
220 _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
221 _GL_CXXALIASWARN (getloadavg);
222 #elif defined GNULIB_POSIXCHECK
223 # undef getloadavg
224 # if HAVE_RAW_DECL_GETLOADAVG
225 _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
226 "use gnulib module getloadavg for portability");
227 # endif
228 #endif
229
230 #if @GNULIB_GETSUBOPT@
231 /* Assuming *OPTIONP is a comma separated list of elements of the form
232 "token" or "token=value", getsubopt parses the first of these elements.
233 If the first element refers to a "token" that is member of the given
234 NULL-terminated array of tokens:
235 - It replaces the comma with a NUL byte, updates *OPTIONP to point past
236 the first option and the comma, sets *VALUEP to the value of the
237 element (or NULL if it doesn't contain an "=" sign),
238 - It returns the index of the "token" in the given array of tokens.
239 Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
240 For more details see the POSIX:2001 specification.
241 http://www.opengroup.org/susv3xsh/getsubopt.html */
242 # if !@HAVE_GETSUBOPT@
243 _GL_FUNCDECL_SYS (getsubopt, int,
244 (char **optionp, char *const *tokens, char **valuep)
245 _GL_ARG_NONNULL ((1, 2, 3)));
246 # endif
247 _GL_CXXALIAS_SYS (getsubopt, int,
248 (char **optionp, char *const *tokens, char **valuep));
249 _GL_CXXALIASWARN (getsubopt);
250 #elif defined GNULIB_POSIXCHECK
251 # undef getsubopt
252 # if HAVE_RAW_DECL_GETSUBOPT
253 _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
254 "use gnulib module getsubopt for portability");
255 # endif
256 #endif
257
258 #if @GNULIB_GRANTPT@
259 /* Change the ownership and access permission of the slave side of the
260 pseudo-terminal whose master side is specified by FD. */
261 # if !@HAVE_GRANTPT@
262 _GL_FUNCDECL_SYS (grantpt, int, (int fd));
263 # endif
264 _GL_CXXALIAS_SYS (grantpt, int, (int fd));
265 _GL_CXXALIASWARN (grantpt);
266 #elif defined GNULIB_POSIXCHECK
267 # undef grantpt
268 # if HAVE_RAW_DECL_GRANTPT
269 _GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
270 "use gnulib module grantpt for portability");
271 # endif
272 #endif
273
274 /* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not
275 rely on GNU or POSIX semantics for malloc and realloc (for example,
276 by never specifying a zero size), so it does not need malloc or
277 realloc to be redefined. */
278 #if @GNULIB_MALLOC_POSIX@
279 # if @REPLACE_MALLOC@
280 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
281 || _GL_USE_STDLIB_ALLOC)
282 # undef malloc
283 # define malloc rpl_malloc
284 # endif
285 _GL_FUNCDECL_RPL (malloc, void *, (size_t size));
286 _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
287 # else
288 _GL_CXXALIAS_SYS (malloc, void *, (size_t size));
289 # endif
290 _GL_CXXALIASWARN (malloc);
291 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
292 # undef malloc
293 /* Assume malloc is always declared. */
294 _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
295 "use gnulib module malloc-posix for portability");
296 #endif
297
298 /* Convert a multibyte character to a wide character. */
299 #if @GNULIB_MBTOWC@
300 # if @REPLACE_MBTOWC@
301 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
302 # undef mbtowc
303 # define mbtowc rpl_mbtowc
304 # endif
305 _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
306 _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
307 # else
308 _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
309 # endif
310 _GL_CXXALIASWARN (mbtowc);
311 #endif
312
313 #if @GNULIB_MKDTEMP@
314 /* Create a unique temporary directory from TEMPLATE.
315 The last six characters of TEMPLATE must be "XXXXXX";
316 they are replaced with a string that makes the directory name unique.
317 Returns TEMPLATE, or a null pointer if it cannot get a unique name.
318 The directory is created mode 700. */
319 # if !@HAVE_MKDTEMP@
320 _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
321 # endif
322 _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
323 _GL_CXXALIASWARN (mkdtemp);
324 #elif defined GNULIB_POSIXCHECK
325 # undef mkdtemp
326 # if HAVE_RAW_DECL_MKDTEMP
327 _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
328 "use gnulib module mkdtemp for portability");
329 # endif
330 #endif
331
332 #if @GNULIB_MKOSTEMP@
333 /* Create a unique temporary file from TEMPLATE.
334 The last six characters of TEMPLATE must be "XXXXXX";
335 they are replaced with a string that makes the file name unique.
336 The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
337 and O_TEXT, O_BINARY (defined in "binary-io.h").
338 The file is then created, with the specified flags, ensuring it didn't exist
339 before.
340 The file is created read-write (mask at least 0600 & ~umask), but it may be
341 world-readable and world-writable (mask 0666 & ~umask), depending on the
342 implementation.
343 Returns the open file descriptor if successful, otherwise -1 and errno
344 set. */
345 # if !@HAVE_MKOSTEMP@
346 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
347 _GL_ARG_NONNULL ((1)));
348 # endif
349 _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
350 _GL_CXXALIASWARN (mkostemp);
351 #elif defined GNULIB_POSIXCHECK
352 # undef mkostemp
353 # if HAVE_RAW_DECL_MKOSTEMP
354 _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
355 "use gnulib module mkostemp for portability");
356 # endif
357 #endif
358
359 #if @GNULIB_MKOSTEMPS@
360 /* Create a unique temporary file from TEMPLATE.
361 The last six characters of TEMPLATE before a suffix of length
362 SUFFIXLEN must be "XXXXXX";
363 they are replaced with a string that makes the file name unique.
364 The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
365 and O_TEXT, O_BINARY (defined in "binary-io.h").
366 The file is then created, with the specified flags, ensuring it didn't exist
367 before.
368 The file is created read-write (mask at least 0600 & ~umask), but it may be
369 world-readable and world-writable (mask 0666 & ~umask), depending on the
370 implementation.
371 Returns the open file descriptor if successful, otherwise -1 and errno
372 set. */
373 # if !@HAVE_MKOSTEMPS@
374 _GL_FUNCDECL_SYS (mkostemps, int,
375 (char * /*template*/, int /*suffixlen*/, int /*flags*/)
376 _GL_ARG_NONNULL ((1)));
377 # endif
378 _GL_CXXALIAS_SYS (mkostemps, int,
379 (char * /*template*/, int /*suffixlen*/, int /*flags*/));
380 _GL_CXXALIASWARN (mkostemps);
381 #elif defined GNULIB_POSIXCHECK
382 # undef mkostemps
383 # if HAVE_RAW_DECL_MKOSTEMPS
384 _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
385 "use gnulib module mkostemps for portability");
386 # endif
387 #endif
388
389 #if @GNULIB_MKSTEMP@
390 /* Create a unique temporary file from TEMPLATE.
391 The last six characters of TEMPLATE must be "XXXXXX";
392 they are replaced with a string that makes the file name unique.
393 The file is then created, ensuring it didn't exist before.
394 The file is created read-write (mask at least 0600 & ~umask), but it may be
395 world-readable and world-writable (mask 0666 & ~umask), depending on the
396 implementation.
397 Returns the open file descriptor if successful, otherwise -1 and errno
398 set. */
399 # if @REPLACE_MKSTEMP@
400 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
401 # define mkstemp rpl_mkstemp
402 # endif
403 _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
404 _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
405 # else
406 # if ! @HAVE_MKSTEMP@
407 _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
408 # endif
409 _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
410 # endif
411 _GL_CXXALIASWARN (mkstemp);
412 #elif defined GNULIB_POSIXCHECK
413 # undef mkstemp
414 # if HAVE_RAW_DECL_MKSTEMP
415 _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
416 "use gnulib module mkstemp for portability");
417 # endif
418 #endif
419
420 #if @GNULIB_MKSTEMPS@
421 /* Create a unique temporary file from TEMPLATE.
422 The last six characters of TEMPLATE prior to a suffix of length
423 SUFFIXLEN must be "XXXXXX";
424 they are replaced with a string that makes the file name unique.
425 The file is then created, ensuring it didn't exist before.
426 The file is created read-write (mask at least 0600 & ~umask), but it may be
427 world-readable and world-writable (mask 0666 & ~umask), depending on the
428 implementation.
429 Returns the open file descriptor if successful, otherwise -1 and errno
430 set. */
431 # if !@HAVE_MKSTEMPS@
432 _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
433 _GL_ARG_NONNULL ((1)));
434 # endif
435 _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
436 _GL_CXXALIASWARN (mkstemps);
437 #elif defined GNULIB_POSIXCHECK
438 # undef mkstemps
439 # if HAVE_RAW_DECL_MKSTEMPS
440 _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
441 "use gnulib module mkstemps for portability");
442 # endif
443 #endif
444
445 #if @GNULIB_POSIX_OPENPT@
446 /* Return an FD open to the master side of a pseudo-terminal. Flags should
447 include O_RDWR, and may also include O_NOCTTY. */
448 # if !@HAVE_POSIX_OPENPT@
449 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
450 # endif
451 _GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
452 _GL_CXXALIASWARN (posix_openpt);
453 #elif defined GNULIB_POSIXCHECK
454 # undef posix_openpt
455 # if HAVE_RAW_DECL_POSIX_OPENPT
456 _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
457 "use gnulib module posix_openpt for portability");
458 # endif
459 #endif
460
461 #if @GNULIB_PTSNAME@
462 /* Return the pathname of the pseudo-terminal slave associated with
463 the master FD is open on, or NULL on errors. */
464 # if @REPLACE_PTSNAME@
465 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
466 # undef ptsname
467 # define ptsname rpl_ptsname
468 # endif
469 _GL_FUNCDECL_RPL (ptsname, char *, (int fd));
470 _GL_CXXALIAS_RPL (ptsname, char *, (int fd));
471 # else
472 # if !@HAVE_PTSNAME@
473 _GL_FUNCDECL_SYS (ptsname, char *, (int fd));
474 # endif
475 _GL_CXXALIAS_SYS (ptsname, char *, (int fd));
476 # endif
477 _GL_CXXALIASWARN (ptsname);
478 #elif defined GNULIB_POSIXCHECK
479 # undef ptsname
480 # if HAVE_RAW_DECL_PTSNAME
481 _GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
482 "use gnulib module ptsname for portability");
483 # endif
484 #endif
485
486 #if @GNULIB_PTSNAME_R@
487 /* Set the pathname of the pseudo-terminal slave associated with
488 the master FD is open on and return 0, or set errno and return
489 non-zero on errors. */
490 # if @REPLACE_PTSNAME_R@
491 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
492 # undef ptsname_r
493 # define ptsname_r rpl_ptsname_r
494 # endif
495 _GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
496 _GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
497 # else
498 # if !@HAVE_PTSNAME_R@
499 _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
500 # endif
501 _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
502 # endif
503 _GL_CXXALIASWARN (ptsname_r);
504 #elif defined GNULIB_POSIXCHECK
505 # undef ptsname_r
506 # if HAVE_RAW_DECL_PTSNAME_R
507 _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
508 "use gnulib module ptsname_r for portability");
509 # endif
510 #endif
511
512 #if @GNULIB_PUTENV@
513 # if @REPLACE_PUTENV@
514 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
515 # undef putenv
516 # define putenv rpl_putenv
517 # endif
518 _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
519 _GL_CXXALIAS_RPL (putenv, int, (char *string));
520 # else
521 _GL_CXXALIAS_SYS (putenv, int, (char *string));
522 # endif
523 _GL_CXXALIASWARN (putenv);
524 #endif
525
526 #if @GNULIB_QSORT_R@
527 /* Sort an array of NMEMB elements, starting at address BASE, each element
528 occupying SIZE bytes, in ascending order according to the comparison
529 function COMPARE. */
530 # if @REPLACE_QSORT_R@
531 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
532 # undef qsort_r
533 # define qsort_r rpl_qsort_r
534 # endif
535 _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
536 int (*compare) (void const *, void const *,
537 void *),
538 void *arg) _GL_ARG_NONNULL ((1, 4)));
539 _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
540 int (*compare) (void const *, void const *,
541 void *),
542 void *arg));
543 # else
544 # if !@HAVE_QSORT_R@
545 _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
546 int (*compare) (void const *, void const *,
547 void *),
548 void *arg) _GL_ARG_NONNULL ((1, 4)));
549 # endif
550 _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
551 int (*compare) (void const *, void const *,
552 void *),
553 void *arg));
554 # endif
555 _GL_CXXALIASWARN (qsort_r);
556 #elif defined GNULIB_POSIXCHECK
557 # undef qsort_r
558 # if HAVE_RAW_DECL_QSORT_R
559 _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
560 "use gnulib module qsort_r for portability");
561 # endif
562 #endif
563
564
565 #if @GNULIB_RANDOM_R@
566 # if !@HAVE_RANDOM_R@
567 # ifndef RAND_MAX
568 # define RAND_MAX 2147483647
569 # endif
570 # endif
571 #endif
572
573
574 #if @GNULIB_RANDOM@
575 # if !@HAVE_RANDOM@
576 _GL_FUNCDECL_SYS (random, long, (void));
577 # endif
578 _GL_CXXALIAS_SYS (random, long, (void));
579 _GL_CXXALIASWARN (random);
580 #elif defined GNULIB_POSIXCHECK
581 # undef random
582 # if HAVE_RAW_DECL_RANDOM
583 _GL_WARN_ON_USE (random, "random is unportable - "
584 "use gnulib module random for portability");
585 # endif
586 #endif
587
588 #if @GNULIB_RANDOM@
589 # if !@HAVE_RANDOM@
590 _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
591 # endif
592 _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
593 _GL_CXXALIASWARN (srandom);
594 #elif defined GNULIB_POSIXCHECK
595 # undef srandom
596 # if HAVE_RAW_DECL_SRANDOM
597 _GL_WARN_ON_USE (srandom, "srandom is unportable - "
598 "use gnulib module random for portability");
599 # endif
600 #endif
601
602 #if @GNULIB_RANDOM@
603 # if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@
604 _GL_FUNCDECL_SYS (initstate, char *,
605 (unsigned int seed, char *buf, size_t buf_size)
606 _GL_ARG_NONNULL ((2)));
607 # endif
608 _GL_CXXALIAS_SYS (initstate, char *,
609 (unsigned int seed, char *buf, size_t buf_size));
610 _GL_CXXALIASWARN (initstate);
611 #elif defined GNULIB_POSIXCHECK
612 # undef initstate
613 # if HAVE_RAW_DECL_INITSTATE_R
614 _GL_WARN_ON_USE (initstate, "initstate is unportable - "
615 "use gnulib module random for portability");
616 # endif
617 #endif
618
619 #if @GNULIB_RANDOM@
620 # if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@
621 _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
622 # endif
623 _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
624 _GL_CXXALIASWARN (setstate);
625 #elif defined GNULIB_POSIXCHECK
626 # undef setstate
627 # if HAVE_RAW_DECL_SETSTATE_R
628 _GL_WARN_ON_USE (setstate, "setstate is unportable - "
629 "use gnulib module random for portability");
630 # endif
631 #endif
632
633
634 #if @GNULIB_RANDOM_R@
635 # if @REPLACE_RANDOM_R@
636 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
637 # undef random_r
638 # define random_r rpl_random_r
639 # endif
640 _GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
641 _GL_ARG_NONNULL ((1, 2)));
642 _GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
643 # else
644 # if !@HAVE_RANDOM_R@
645 _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
646 _GL_ARG_NONNULL ((1, 2)));
647 # endif
648 _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
649 # endif
650 _GL_CXXALIASWARN (random_r);
651 #elif defined GNULIB_POSIXCHECK
652 # undef random_r
653 # if HAVE_RAW_DECL_RANDOM_R
654 _GL_WARN_ON_USE (random_r, "random_r is unportable - "
655 "use gnulib module random_r for portability");
656 # endif
657 #endif
658
659 #if @GNULIB_RANDOM_R@
660 # if @REPLACE_RANDOM_R@
661 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
662 # undef srandom_r
663 # define srandom_r rpl_srandom_r
664 # endif
665 _GL_FUNCDECL_RPL (srandom_r, int,
666 (unsigned int seed, struct random_data *rand_state)
667 _GL_ARG_NONNULL ((2)));
668 _GL_CXXALIAS_RPL (srandom_r, int,
669 (unsigned int seed, struct random_data *rand_state));
670 # else
671 # if !@HAVE_RANDOM_R@
672 _GL_FUNCDECL_SYS (srandom_r, int,
673 (unsigned int seed, struct random_data *rand_state)
674 _GL_ARG_NONNULL ((2)));
675 # endif
676 _GL_CXXALIAS_SYS (srandom_r, int,
677 (unsigned int seed, struct random_data *rand_state));
678 # endif
679 _GL_CXXALIASWARN (srandom_r);
680 #elif defined GNULIB_POSIXCHECK
681 # undef srandom_r
682 # if HAVE_RAW_DECL_SRANDOM_R
683 _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
684 "use gnulib module random_r for portability");
685 # endif
686 #endif
687
688 #if @GNULIB_RANDOM_R@
689 # if @REPLACE_RANDOM_R@
690 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
691 # undef initstate_r
692 # define initstate_r rpl_initstate_r
693 # endif
694 _GL_FUNCDECL_RPL (initstate_r, int,
695 (unsigned int seed, char *buf, size_t buf_size,
696 struct random_data *rand_state)
697 _GL_ARG_NONNULL ((2, 4)));
698 _GL_CXXALIAS_RPL (initstate_r, int,
699 (unsigned int seed, char *buf, size_t buf_size,
700 struct random_data *rand_state));
701 # else
702 # if !@HAVE_RANDOM_R@
703 _GL_FUNCDECL_SYS (initstate_r, int,
704 (unsigned int seed, char *buf, size_t buf_size,
705 struct random_data *rand_state)
706 _GL_ARG_NONNULL ((2, 4)));
707 # endif
708 _GL_CXXALIAS_SYS (initstate_r, int,
709 (unsigned int seed, char *buf, size_t buf_size,
710 struct random_data *rand_state));
711 # endif
712 _GL_CXXALIASWARN (initstate_r);
713 #elif defined GNULIB_POSIXCHECK
714 # undef initstate_r
715 # if HAVE_RAW_DECL_INITSTATE_R
716 _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
717 "use gnulib module random_r for portability");
718 # endif
719 #endif
720
721 #if @GNULIB_RANDOM_R@
722 # if @REPLACE_RANDOM_R@
723 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
724 # undef setstate_r
725 # define setstate_r rpl_setstate_r
726 # endif
727 _GL_FUNCDECL_RPL (setstate_r, int,
728 (char *arg_state, struct random_data *rand_state)
729 _GL_ARG_NONNULL ((1, 2)));
730 _GL_CXXALIAS_RPL (setstate_r, int,
731 (char *arg_state, struct random_data *rand_state));
732 # else
733 # if !@HAVE_RANDOM_R@
734 _GL_FUNCDECL_SYS (setstate_r, int,
735 (char *arg_state, struct random_data *rand_state)
736 _GL_ARG_NONNULL ((1, 2)));
737 # endif
738 _GL_CXXALIAS_SYS (setstate_r, int,
739 (char *arg_state, struct random_data *rand_state));
740 # endif
741 _GL_CXXALIASWARN (setstate_r);
742 #elif defined GNULIB_POSIXCHECK
743 # undef setstate_r
744 # if HAVE_RAW_DECL_SETSTATE_R
745 _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
746 "use gnulib module random_r for portability");
747 # endif
748 #endif
749
750
751 #if @GNULIB_REALLOC_POSIX@
752 # if @REPLACE_REALLOC@
753 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
754 || _GL_USE_STDLIB_ALLOC)
755 # undef realloc
756 # define realloc rpl_realloc
757 # endif
758 _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
759 _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
760 # else
761 _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
762 # endif
763 _GL_CXXALIASWARN (realloc);
764 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
765 # undef realloc
766 /* Assume realloc is always declared. */
767 _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
768 "use gnulib module realloc-posix for portability");
769 #endif
770
771
772 #if @GNULIB_REALLOCARRAY@
773 # if ! @HAVE_REALLOCARRAY@
774 _GL_FUNCDECL_SYS (reallocarray, void *,
775 (void *ptr, size_t nmemb, size_t size));
776 # endif
777 _GL_CXXALIAS_SYS (reallocarray, void *,
778 (void *ptr, size_t nmemb, size_t size));
779 _GL_CXXALIASWARN (reallocarray);
780 #elif defined GNULIB_POSIXCHECK
781 # undef reallocarray
782 # if HAVE_RAW_DECL_REALLOCARRAY
783 _GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - "
784 "use gnulib module reallocarray for portability");
785 # endif
786 #endif
787
788 #if @GNULIB_REALPATH@
789 # if @REPLACE_REALPATH@
790 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
791 # define realpath rpl_realpath
792 # endif
793 _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
794 _GL_ARG_NONNULL ((1)));
795 _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
796 # else
797 # if !@HAVE_REALPATH@
798 _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
799 _GL_ARG_NONNULL ((1)));
800 # endif
801 _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
802 # endif
803 _GL_CXXALIASWARN (realpath);
804 #elif defined GNULIB_POSIXCHECK
805 # undef realpath
806 # if HAVE_RAW_DECL_REALPATH
807 _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
808 "canonicalize or canonicalize-lgpl for portability");
809 # endif
810 #endif
811
812 #if @GNULIB_RPMATCH@
813 /* Test a user response to a question.
814 Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */
815 # if !@HAVE_RPMATCH@
816 _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
817 # endif
818 _GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
819 _GL_CXXALIASWARN (rpmatch);
820 #elif defined GNULIB_POSIXCHECK
821 # undef rpmatch
822 # if HAVE_RAW_DECL_RPMATCH
823 _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
824 "use gnulib module rpmatch for portability");
825 # endif
826 #endif
827
828 #if @GNULIB_SECURE_GETENV@
829 /* Look up NAME in the environment, returning 0 in insecure situations. */
830 # if !@HAVE_SECURE_GETENV@
831 _GL_FUNCDECL_SYS (secure_getenv, char *,
832 (char const *name) _GL_ARG_NONNULL ((1)));
833 # endif
834 _GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
835 _GL_CXXALIASWARN (secure_getenv);
836 #elif defined GNULIB_POSIXCHECK
837 # undef secure_getenv
838 # if HAVE_RAW_DECL_SECURE_GETENV
839 _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
840 "use gnulib module secure_getenv for portability");
841 # endif
842 #endif
843
844 #if @GNULIB_SETENV@
845 /* Set NAME to VALUE in the environment.
846 If REPLACE is nonzero, overwrite an existing value. */
847 # if @REPLACE_SETENV@
848 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
849 # undef setenv
850 # define setenv rpl_setenv
851 # endif
852 _GL_FUNCDECL_RPL (setenv, int,
853 (const char *name, const char *value, int replace)
854 _GL_ARG_NONNULL ((1)));
855 _GL_CXXALIAS_RPL (setenv, int,
856 (const char *name, const char *value, int replace));
857 # else
858 # if !@HAVE_DECL_SETENV@
859 _GL_FUNCDECL_SYS (setenv, int,
860 (const char *name, const char *value, int replace)
861 _GL_ARG_NONNULL ((1)));
862 # endif
863 _GL_CXXALIAS_SYS (setenv, int,
864 (const char *name, const char *value, int replace));
865 # endif
866 # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@)
867 _GL_CXXALIASWARN (setenv);
868 # endif
869 #elif defined GNULIB_POSIXCHECK
870 # undef setenv
871 # if HAVE_RAW_DECL_SETENV
872 _GL_WARN_ON_USE (setenv, "setenv is unportable - "
873 "use gnulib module setenv for portability");
874 # endif
875 #endif
876
877 #if @GNULIB_STRTOD@
878 /* Parse a double from STRING, updating ENDP if appropriate. */
879 # if @REPLACE_STRTOD@
880 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
881 # define strtod rpl_strtod
882 # endif
883 _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
884 _GL_ARG_NONNULL ((1)));
885 _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
886 # else
887 # if !@HAVE_STRTOD@
888 _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
889 _GL_ARG_NONNULL ((1)));
890 # endif
891 _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
892 # endif
893 _GL_CXXALIASWARN (strtod);
894 #elif defined GNULIB_POSIXCHECK
895 # undef strtod
896 # if HAVE_RAW_DECL_STRTOD
897 _GL_WARN_ON_USE (strtod, "strtod is unportable - "
898 "use gnulib module strtod for portability");
899 # endif
900 #endif
901
902 #if @GNULIB_STRTOLL@
903 /* Parse a signed integer whose textual representation starts at STRING.
904 The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
905 it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
906 "0x").
907 If ENDPTR is not NULL, the address of the first byte after the integer is
908 stored in *ENDPTR.
909 Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
910 to ERANGE. */
911 # if !@HAVE_STRTOLL@
912 _GL_FUNCDECL_SYS (strtoll, long long,
913 (const char *string, char **endptr, int base)
914 _GL_ARG_NONNULL ((1)));
915 # endif
916 _GL_CXXALIAS_SYS (strtoll, long long,
917 (const char *string, char **endptr, int base));
918 _GL_CXXALIASWARN (strtoll);
919 #elif defined GNULIB_POSIXCHECK
920 # undef strtoll
921 # if HAVE_RAW_DECL_STRTOLL
922 _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
923 "use gnulib module strtoll for portability");
924 # endif
925 #endif
926
927 #if @GNULIB_STRTOULL@
928 /* Parse an unsigned integer whose textual representation starts at STRING.
929 The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
930 it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
931 "0x").
932 If ENDPTR is not NULL, the address of the first byte after the integer is
933 stored in *ENDPTR.
934 Upon overflow, the return value is ULLONG_MAX, and errno is set to
935 ERANGE. */
936 # if !@HAVE_STRTOULL@
937 _GL_FUNCDECL_SYS (strtoull, unsigned long long,
938 (const char *string, char **endptr, int base)
939 _GL_ARG_NONNULL ((1)));
940 # endif
941 _GL_CXXALIAS_SYS (strtoull, unsigned long long,
942 (const char *string, char **endptr, int base));
943 _GL_CXXALIASWARN (strtoull);
944 #elif defined GNULIB_POSIXCHECK
945 # undef strtoull
946 # if HAVE_RAW_DECL_STRTOULL
947 _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
948 "use gnulib module strtoull for portability");
949 # endif
950 #endif
951
952 #if @GNULIB_UNLOCKPT@
953 /* Unlock the slave side of the pseudo-terminal whose master side is specified
954 by FD, so that it can be opened. */
955 # if !@HAVE_UNLOCKPT@
956 _GL_FUNCDECL_SYS (unlockpt, int, (int fd));
957 # endif
958 _GL_CXXALIAS_SYS (unlockpt, int, (int fd));
959 _GL_CXXALIASWARN (unlockpt);
960 #elif defined GNULIB_POSIXCHECK
961 # undef unlockpt
962 # if HAVE_RAW_DECL_UNLOCKPT
963 _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
964 "use gnulib module unlockpt for portability");
965 # endif
966 #endif
967
968 #if @GNULIB_UNSETENV@
969 /* Remove the variable NAME from the environment. */
970 # if @REPLACE_UNSETENV@
971 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
972 # undef unsetenv
973 # define unsetenv rpl_unsetenv
974 # endif
975 _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
976 _GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
977 # else
978 # if !@HAVE_DECL_UNSETENV@
979 _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
980 # endif
981 _GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
982 # endif
983 # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@)
984 _GL_CXXALIASWARN (unsetenv);
985 # endif
986 #elif defined GNULIB_POSIXCHECK
987 # undef unsetenv
988 # if HAVE_RAW_DECL_UNSETENV
989 _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
990 "use gnulib module unsetenv for portability");
991 # endif
992 #endif
993
994 /* Convert a wide character to a multibyte character. */
995 #if @GNULIB_WCTOMB@
996 # if @REPLACE_WCTOMB@
997 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
998 # undef wctomb
999 # define wctomb rpl_wctomb
1000 # endif
1001 _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
1002 _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
1003 # else
1004 _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
1005 # endif
1006 _GL_CXXALIASWARN (wctomb);
1007 #endif
1008
1009
1010 #endif /* _@GUARD_PREFIX@_STDLIB_H */
1011 #endif /* _@GUARD_PREFIX@_STDLIB_H */
1012 #endif
0 /* Searching in a string.
1 Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc.
2
3 This program is free software: you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as published by
5 the Free Software Foundation; either version 3 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with this program. If not, see <https://www.gnu.org/licenses/>. */
15
16 #include <config.h>
17
18 /* Specification. */
19 #include <string.h>
20
21 /* Find the first occurrence of C in S or the final NUL byte. */
22 char *
23 strchrnul (const char *s, int c_in)
24 {
25 /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
26 long instead of a 64-bit uintmax_t tends to give better
27 performance. On 64-bit hardware, unsigned long is generally 64
28 bits already. Change this typedef to experiment with
29 performance. */
30 typedef unsigned long int longword;
31
32 const unsigned char *char_ptr;
33 const longword *longword_ptr;
34 longword repeated_one;
35 longword repeated_c;
36 unsigned char c;
37
38 c = (unsigned char) c_in;
39 if (!c)
40 return rawmemchr (s, 0);
41
42 /* Handle the first few bytes by reading one byte at a time.
43 Do this until CHAR_PTR is aligned on a longword boundary. */
44 for (char_ptr = (const unsigned char *) s;
45 (size_t) char_ptr % sizeof (longword) != 0;
46 ++char_ptr)
47 if (!*char_ptr || *char_ptr == c)
48 return (char *) char_ptr;
49
50 longword_ptr = (const longword *) char_ptr;
51
52 /* All these elucidatory comments refer to 4-byte longwords,
53 but the theory applies equally well to any size longwords. */
54
55 /* Compute auxiliary longword values:
56 repeated_one is a value which has a 1 in every byte.
57 repeated_c has c in every byte. */
58 repeated_one = 0x01010101;
59 repeated_c = c | (c << 8);
60 repeated_c |= repeated_c << 16;
61 if (0xffffffffU < (longword) -1)
62 {
63 repeated_one |= repeated_one << 31 << 1;
64 repeated_c |= repeated_c << 31 << 1;
65 if (8 < sizeof (longword))
66 {
67 size_t i;
68
69 for (i = 64; i < sizeof (longword) * 8; i *= 2)
70 {
71 repeated_one |= repeated_one << i;
72 repeated_c |= repeated_c << i;
73 }
74 }
75 }
76
77 /* Instead of the traditional loop which tests each byte, we will
78 test a longword at a time. The tricky part is testing if *any of
79 the four* bytes in the longword in question are equal to NUL or
80 c. We first use an xor with repeated_c. This reduces the task
81 to testing whether *any of the four* bytes in longword1 or
82 longword2 is zero.
83
84 Let's consider longword1. We compute tmp =
85 ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
86 That is, we perform the following operations:
87 1. Subtract repeated_one.
88 2. & ~longword1.
89 3. & a mask consisting of 0x80 in every byte.
90 Consider what happens in each byte:
91 - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
92 and step 3 transforms it into 0x80. A carry can also be propagated
93 to more significant bytes.
94 - If a byte of longword1 is nonzero, let its lowest 1 bit be at
95 position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
96 the byte ends in a single bit of value 0 and k bits of value 1.
97 After step 2, the result is just k bits of value 1: 2^k - 1. After
98 step 3, the result is 0. And no carry is produced.
99 So, if longword1 has only non-zero bytes, tmp is zero.
100 Whereas if longword1 has a zero byte, call j the position of the least
101 significant zero byte. Then the result has a zero at positions 0, ...,
102 j-1 and a 0x80 at position j. We cannot predict the result at the more
103 significant bytes (positions j+1..3), but it does not matter since we
104 already have a non-zero bit at position 8*j+7.
105
106 The test whether any byte in longword1 or longword2 is zero is equivalent
107 to testing whether tmp1 is nonzero or tmp2 is nonzero. We can combine
108 this into a single test, whether (tmp1 | tmp2) is nonzero.
109
110 This test can read more than one byte beyond the end of a string,
111 depending on where the terminating NUL is encountered. However,
112 this is considered safe since the initialization phase ensured
113 that the read will be aligned, therefore, the read will not cross
114 page boundaries and will not cause a fault. */
115
116 while (1)
117 {
118 longword longword1 = *longword_ptr ^ repeated_c;
119 longword longword2 = *longword_ptr;
120
121 if (((((longword1 - repeated_one) & ~longword1)
122 | ((longword2 - repeated_one) & ~longword2))
123 & (repeated_one << 7)) != 0)
124 break;
125 longword_ptr++;
126 }
127
128 char_ptr = (const unsigned char *) longword_ptr;
129
130 /* At this point, we know that one of the sizeof (longword) bytes
131 starting at char_ptr is == 0 or == c. On little-endian machines,
132 we could determine the first such byte without any further memory
133 accesses, just by looking at the tmp result from the last loop
134 iteration. But this does not work on big-endian machines.
135 Choose code that works in both cases. */
136
137 char_ptr = (unsigned char *) longword_ptr;
138 while (*char_ptr && (*char_ptr != c))
139 char_ptr++;
140 return (char *) char_ptr;
141 }
0 # Suppress a valgrind message about use of uninitialized memory in strchrnul().
1 # This use is OK because it provides only a speedup.
2 {
3 strchrnul-value4
4 Memcheck:Value4
5 fun:strchrnul
6 }
7 {
8 strchrnul-value8
9 Memcheck:Value8
10 fun:strchrnul
11 }
0 /* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2018 Free Software
1 Foundation, Inc.
2
3 This file is part of the GNU C Library.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, see <https://www.gnu.org/licenses/>. */
17
18 #ifndef _LIBC
19 # include <config.h>
20 #endif
21
22 /* Get specification. */
23 #include <string.h>
24
25 #include <stdlib.h>
26
27 #undef __strdup
28 #ifdef _LIBC
29 # undef strdup
30 #endif
31
32 #ifndef weak_alias
33 # define __strdup strdup
34 #endif
35
36 /* Duplicate S, returning an identical malloc'd string. */
37 char *
38 __strdup (const char *s)
39 {
40 size_t len = strlen (s) + 1;
41 void *new = malloc (len);
42
43 if (new == NULL)
44 return NULL;
45
46 return (char *) memcpy (new, s, len);
47 }
48 #ifdef libc_hidden_def
49 libc_hidden_def (__strdup)
50 #endif
51 #ifdef weak_alias
52 weak_alias (__strdup, strdup)
53 #endif
0 /* A GNU-like <string.h>.
1
2 Copyright (C) 1995-1996, 2001-2018 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, see <https://www.gnu.org/licenses/>. */
16
17 #if __GNUC__ >= 3
18 @PRAGMA_SYSTEM_HEADER@
19 #endif
20 @PRAGMA_COLUMNS@
21
22 #if defined _GL_ALREADY_INCLUDING_STRING_H
23 /* Special invocation convention:
24 - On OS X/NetBSD we have a sequence of nested includes
25 <string.h> -> <strings.h> -> "string.h"
26 In this situation system _chk variants due to -D_FORTIFY_SOURCE
27 might be used after any replacements defined here. */
28
29 #@INCLUDE_NEXT@ @NEXT_STRING_H@
30
31 #else
32 /* Normal invocation convention. */
33
34 #ifndef _@GUARD_PREFIX@_STRING_H
35
36 #define _GL_ALREADY_INCLUDING_STRING_H
37
38 /* The include_next requires a split double-inclusion guard. */
39 #@INCLUDE_NEXT@ @NEXT_STRING_H@
40
41 #undef _GL_ALREADY_INCLUDING_STRING_H
42
43 #ifndef _@GUARD_PREFIX@_STRING_H
44 #define _@GUARD_PREFIX@_STRING_H
45
46 /* NetBSD 5.0 mis-defines NULL. */
47 #include <stddef.h>
48
49 /* MirBSD defines mbslen as a macro. */
50 #if @GNULIB_MBSLEN@ && defined __MirBSD__
51 # include <wchar.h>
52 #endif
53
54 /* The __attribute__ feature is available in gcc versions 2.5 and later.
55 The attribute __pure__ was added in gcc 2.96. */
56 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
57 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
58 #else
59 # define _GL_ATTRIBUTE_PURE /* empty */
60 #endif
61
62 /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */
63 /* But in any case avoid namespace pollution on glibc systems. */
64 #if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \
65 && ! defined __GLIBC__
66 # include <unistd.h>
67 #endif
68
69 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
70
71 /* The definition of _GL_ARG_NONNULL is copied here. */
72
73 /* The definition of _GL_WARN_ON_USE is copied here. */
74
75
76 /* Clear a block of memory. The compiler will not delete a call to
77 this function, even if the block is dead after the call. */
78 #if @GNULIB_EXPLICIT_BZERO@
79 # if ! @HAVE_EXPLICIT_BZERO@
80 _GL_FUNCDECL_SYS (explicit_bzero, void,
81 (void *__dest, size_t __n) _GL_ARG_NONNULL ((1)));
82 # endif
83 _GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n));
84 _GL_CXXALIASWARN (explicit_bzero);
85 #elif defined GNULIB_POSIXCHECK
86 # undef explicit_bzero
87 # if HAVE_RAW_DECL_EXPLICIT_BZERO
88 _GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - "
89 "use gnulib module explicit_bzero for portability");
90 # endif
91 #endif
92
93 /* Find the index of the least-significant set bit. */
94 #if @GNULIB_FFSL@
95 # if !@HAVE_FFSL@
96 _GL_FUNCDECL_SYS (ffsl, int, (long int i));
97 # endif
98 _GL_CXXALIAS_SYS (ffsl, int, (long int i));
99 _GL_CXXALIASWARN (ffsl);
100 #elif defined GNULIB_POSIXCHECK
101 # undef ffsl
102 # if HAVE_RAW_DECL_FFSL
103 _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
104 # endif
105 #endif
106
107
108 /* Find the index of the least-significant set bit. */
109 #if @GNULIB_FFSLL@
110 # if !@HAVE_FFSLL@
111 _GL_FUNCDECL_SYS (ffsll, int, (long long int i));
112 # endif
113 _GL_CXXALIAS_SYS (ffsll, int, (long long int i));
114 _GL_CXXALIASWARN (ffsll);
115 #elif defined GNULIB_POSIXCHECK
116 # undef ffsll
117 # if HAVE_RAW_DECL_FFSLL
118 _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
119 # endif
120 #endif
121
122
123 /* Return the first instance of C within N bytes of S, or NULL. */
124 #if @GNULIB_MEMCHR@
125 # if @REPLACE_MEMCHR@
126 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
127 # define memchr rpl_memchr
128 # endif
129 _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
130 _GL_ATTRIBUTE_PURE
131 _GL_ARG_NONNULL ((1)));
132 _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
133 # else
134 # if ! @HAVE_MEMCHR@
135 _GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
136 _GL_ATTRIBUTE_PURE
137 _GL_ARG_NONNULL ((1)));
138 # endif
139 /* On some systems, this function is defined as an overloaded function:
140 extern "C" { const void * std::memchr (const void *, int, size_t); }
141 extern "C++" { void * std::memchr (void *, int, size_t); } */
142 _GL_CXXALIAS_SYS_CAST2 (memchr,
143 void *, (void const *__s, int __c, size_t __n),
144 void const *, (void const *__s, int __c, size_t __n));
145 # endif
146 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
147 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
148 _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
149 _GL_CXXALIASWARN1 (memchr, void const *,
150 (void const *__s, int __c, size_t __n));
151 # else
152 _GL_CXXALIASWARN (memchr);
153 # endif
154 #elif defined GNULIB_POSIXCHECK
155 # undef memchr
156 /* Assume memchr is always declared. */
157 _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
158 "use gnulib module memchr for portability" );
159 #endif
160
161 /* Return the first occurrence of NEEDLE in HAYSTACK. */
162 #if @GNULIB_MEMMEM@
163 # if @REPLACE_MEMMEM@
164 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
165 # define memmem rpl_memmem
166 # endif
167 _GL_FUNCDECL_RPL (memmem, void *,
168 (void const *__haystack, size_t __haystack_len,
169 void const *__needle, size_t __needle_len)
170 _GL_ATTRIBUTE_PURE
171 _GL_ARG_NONNULL ((1, 3)));
172 _GL_CXXALIAS_RPL (memmem, void *,
173 (void const *__haystack, size_t __haystack_len,
174 void const *__needle, size_t __needle_len));
175 # else
176 # if ! @HAVE_DECL_MEMMEM@
177 _GL_FUNCDECL_SYS (memmem, void *,
178 (void const *__haystack, size_t __haystack_len,
179 void const *__needle, size_t __needle_len)
180 _GL_ATTRIBUTE_PURE
181 _GL_ARG_NONNULL ((1, 3)));
182 # endif
183 _GL_CXXALIAS_SYS (memmem, void *,
184 (void const *__haystack, size_t __haystack_len,
185 void const *__needle, size_t __needle_len));
186 # endif
187 _GL_CXXALIASWARN (memmem);
188 #elif defined GNULIB_POSIXCHECK
189 # undef memmem
190 # if HAVE_RAW_DECL_MEMMEM
191 _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
192 "use gnulib module memmem-simple for portability, "
193 "and module memmem for speed" );
194 # endif
195 #endif
196
197 /* Copy N bytes of SRC to DEST, return pointer to bytes after the
198 last written byte. */
199 #if @GNULIB_MEMPCPY@
200 # if ! @HAVE_MEMPCPY@
201 _GL_FUNCDECL_SYS (mempcpy, void *,
202 (void *restrict __dest, void const *restrict __src,
203 size_t __n)
204 _GL_ARG_NONNULL ((1, 2)));
205 # endif
206 _GL_CXXALIAS_SYS (mempcpy, void *,
207 (void *restrict __dest, void const *restrict __src,
208 size_t __n));
209 _GL_CXXALIASWARN (mempcpy);
210 #elif defined GNULIB_POSIXCHECK
211 # undef mempcpy
212 # if HAVE_RAW_DECL_MEMPCPY
213 _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
214 "use gnulib module mempcpy for portability");
215 # endif
216 #endif
217
218 /* Search backwards through a block for a byte (specified as an int). */
219 #if @GNULIB_MEMRCHR@
220 # if ! @HAVE_DECL_MEMRCHR@
221 _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
222 _GL_ATTRIBUTE_PURE
223 _GL_ARG_NONNULL ((1)));
224 # endif
225 /* On some systems, this function is defined as an overloaded function:
226 extern "C++" { const void * std::memrchr (const void *, int, size_t); }
227 extern "C++" { void * std::memrchr (void *, int, size_t); } */
228 _GL_CXXALIAS_SYS_CAST2 (memrchr,
229 void *, (void const *, int, size_t),
230 void const *, (void const *, int, size_t));
231 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
232 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
233 _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
234 _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
235 # else
236 _GL_CXXALIASWARN (memrchr);
237 # endif
238 #elif defined GNULIB_POSIXCHECK
239 # undef memrchr
240 # if HAVE_RAW_DECL_MEMRCHR
241 _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
242 "use gnulib module memrchr for portability");
243 # endif
244 #endif
245
246 /* Find the first occurrence of C in S. More efficient than
247 memchr(S,C,N), at the expense of undefined behavior if C does not
248 occur within N bytes. */
249 #if @GNULIB_RAWMEMCHR@
250 # if ! @HAVE_RAWMEMCHR@
251 _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
252 _GL_ATTRIBUTE_PURE
253 _GL_ARG_NONNULL ((1)));
254 # endif
255 /* On some systems, this function is defined as an overloaded function:
256 extern "C++" { const void * std::rawmemchr (const void *, int); }
257 extern "C++" { void * std::rawmemchr (void *, int); } */
258 _GL_CXXALIAS_SYS_CAST2 (rawmemchr,
259 void *, (void const *__s, int __c_in),
260 void const *, (void const *__s, int __c_in));
261 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
262 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
263 _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
264 _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
265 # else
266 _GL_CXXALIASWARN (rawmemchr);
267 # endif
268 #elif defined GNULIB_POSIXCHECK
269 # undef rawmemchr
270 # if HAVE_RAW_DECL_RAWMEMCHR
271 _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
272 "use gnulib module rawmemchr for portability");
273 # endif
274 #endif
275
276 /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
277 #if @GNULIB_STPCPY@
278 # if ! @HAVE_STPCPY@
279 _GL_FUNCDECL_SYS (stpcpy, char *,
280 (char *restrict __dst, char const *restrict __src)
281 _GL_ARG_NONNULL ((1, 2)));
282 # endif
283 _GL_CXXALIAS_SYS (stpcpy, char *,
284 (char *restrict __dst, char const *restrict __src));
285 _GL_CXXALIASWARN (stpcpy);
286 #elif defined GNULIB_POSIXCHECK
287 # undef stpcpy
288 # if HAVE_RAW_DECL_STPCPY
289 _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
290 "use gnulib module stpcpy for portability");
291 # endif
292 #endif
293
294 /* Copy no more than N bytes of SRC to DST, returning a pointer past the
295 last non-NUL byte written into DST. */
296 #if @GNULIB_STPNCPY@
297 # if @REPLACE_STPNCPY@
298 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
299 # undef stpncpy
300 # define stpncpy rpl_stpncpy
301 # endif
302 _GL_FUNCDECL_RPL (stpncpy, char *,
303 (char *restrict __dst, char const *restrict __src,
304 size_t __n)
305 _GL_ARG_NONNULL ((1, 2)));
306 _GL_CXXALIAS_RPL (stpncpy, char *,
307 (char *restrict __dst, char const *restrict __src,
308 size_t __n));
309 # else
310 # if ! @HAVE_STPNCPY@
311 _GL_FUNCDECL_SYS (stpncpy, char *,
312 (char *restrict __dst, char const *restrict __src,
313 size_t __n)
314 _GL_ARG_NONNULL ((1, 2)));
315 # endif
316 _GL_CXXALIAS_SYS (stpncpy, char *,
317 (char *restrict __dst, char const *restrict __src,
318 size_t __n));
319 # endif
320 _GL_CXXALIASWARN (stpncpy);
321 #elif defined GNULIB_POSIXCHECK
322 # undef stpncpy
323 # if HAVE_RAW_DECL_STPNCPY
324 _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
325 "use gnulib module stpncpy for portability");
326 # endif
327 #endif
328
329 #if defined GNULIB_POSIXCHECK
330 /* strchr() does not work with multibyte strings if the locale encoding is
331 GB18030 and the character to be searched is a digit. */
332 # undef strchr
333 /* Assume strchr is always declared. */
334 _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
335 "in some multibyte locales - "
336 "use mbschr if you care about internationalization");
337 #endif
338
339 /* Find the first occurrence of C in S or the final NUL byte. */
340 #if @GNULIB_STRCHRNUL@
341 # if @REPLACE_STRCHRNUL@
342 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
343 # define strchrnul rpl_strchrnul
344 # endif
345 _GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in)
346 _GL_ATTRIBUTE_PURE
347 _GL_ARG_NONNULL ((1)));
348 _GL_CXXALIAS_RPL (strchrnul, char *,
349 (const char *str, int ch));
350 # else
351 # if ! @HAVE_STRCHRNUL@
352 _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
353 _GL_ATTRIBUTE_PURE
354 _GL_ARG_NONNULL ((1)));
355 # endif
356 /* On some systems, this function is defined as an overloaded function:
357 extern "C++" { const char * std::strchrnul (const char *, int); }
358 extern "C++" { char * std::strchrnul (char *, int); } */
359 _GL_CXXALIAS_SYS_CAST2 (strchrnul,
360 char *, (char const *__s, int __c_in),
361 char const *, (char const *__s, int __c_in));
362 # endif
363 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
364 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
365 _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
366 _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
367 # else
368 _GL_CXXALIASWARN (strchrnul);
369 # endif
370 #elif defined GNULIB_POSIXCHECK
371 # undef strchrnul
372 # if HAVE_RAW_DECL_STRCHRNUL
373 _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
374 "use gnulib module strchrnul for portability");
375 # endif
376 #endif
377
378 /* Duplicate S, returning an identical malloc'd string. */
379 #if @GNULIB_STRDUP@
380 # if @REPLACE_STRDUP@
381 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
382 # undef strdup
383 # define strdup rpl_strdup
384 # endif
385 _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
386 _GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
387 # else
388 # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
389 /* strdup exists as a function and as a macro. Get rid of the macro. */
390 # undef strdup
391 # endif
392 # if !(@HAVE_DECL_STRDUP@ || defined strdup)
393 _GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
394 # endif
395 _GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
396 # endif
397 _GL_CXXALIASWARN (strdup);
398 #elif defined GNULIB_POSIXCHECK
399 # undef strdup
400 # if HAVE_RAW_DECL_STRDUP
401 _GL_WARN_ON_USE (strdup, "strdup is unportable - "
402 "use gnulib module strdup for portability");
403 # endif
404 #endif
405
406 /* Append no more than N characters from SRC onto DEST. */
407 #if @GNULIB_STRNCAT@
408 # if @REPLACE_STRNCAT@
409 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
410 # undef strncat
411 # define strncat rpl_strncat
412 # endif
413 _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n)
414 _GL_ARG_NONNULL ((1, 2)));
415 _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
416 # else
417 _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
418 # endif
419 _GL_CXXALIASWARN (strncat);
420 #elif defined GNULIB_POSIXCHECK
421 # undef strncat
422 # if HAVE_RAW_DECL_STRNCAT
423 _GL_WARN_ON_USE (strncat, "strncat is unportable - "
424 "use gnulib module strncat for portability");
425 # endif
426 #endif
427
428 /* Return a newly allocated copy of at most N bytes of STRING. */
429 #if @GNULIB_STRNDUP@
430 # if @REPLACE_STRNDUP@
431 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
432 # undef strndup
433 # define strndup rpl_strndup
434 # endif
435 _GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n)
436 _GL_ARG_NONNULL ((1)));
437 _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
438 # else
439 # if ! @HAVE_DECL_STRNDUP@
440 _GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n)
441 _GL_ARG_NONNULL ((1)));
442 # endif
443 _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
444 # endif
445 _GL_CXXALIASWARN (strndup);
446 #elif defined GNULIB_POSIXCHECK
447 # undef strndup
448 # if HAVE_RAW_DECL_STRNDUP
449 _GL_WARN_ON_USE (strndup, "strndup is unportable - "
450 "use gnulib module strndup for portability");
451 # endif
452 #endif
453
454 /* Find the length (number of bytes) of STRING, but scan at most
455 MAXLEN bytes. If no '\0' terminator is found in that many bytes,
456 return MAXLEN. */
457 #if @GNULIB_STRNLEN@
458 # if @REPLACE_STRNLEN@
459 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
460 # undef strnlen
461 # define strnlen rpl_strnlen
462 # endif
463 _GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)
464 _GL_ATTRIBUTE_PURE
465 _GL_ARG_NONNULL ((1)));
466 _GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen));
467 # else
468 # if ! @HAVE_DECL_STRNLEN@
469 _GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)
470 _GL_ATTRIBUTE_PURE
471 _GL_ARG_NONNULL ((1)));
472 # endif
473 _GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen));
474 # endif
475 _GL_CXXALIASWARN (strnlen);
476 #elif defined GNULIB_POSIXCHECK
477 # undef strnlen
478 # if HAVE_RAW_DECL_STRNLEN
479 _GL_WARN_ON_USE (strnlen, "strnlen is unportable - "
480 "use gnulib module strnlen for portability");
481 # endif
482 #endif
483
484 #if defined GNULIB_POSIXCHECK
485 /* strcspn() assumes the second argument is a list of single-byte characters.
486 Even in this simple case, it does not work with multibyte strings if the
487 locale encoding is GB18030 and one of the characters to be searched is a
488 digit. */
489 # undef strcspn
490 /* Assume strcspn is always declared. */
491 _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
492 "in multibyte locales - "
493 "use mbscspn if you care about internationalization");
494 #endif
495
496 /* Find the first occurrence in S of any character in ACCEPT. */
497 #if @GNULIB_STRPBRK@
498 # if ! @HAVE_STRPBRK@
499 _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
500 _GL_ATTRIBUTE_PURE
501 _GL_ARG_NONNULL ((1, 2)));
502 # endif
503 /* On some systems, this function is defined as an overloaded function:
504 extern "C" { const char * strpbrk (const char *, const char *); }
505 extern "C++" { char * strpbrk (char *, const char *); } */
506 _GL_CXXALIAS_SYS_CAST2 (strpbrk,
507 char *, (char const *__s, char const *__accept),
508 const char *, (char const *__s, char const *__accept));
509 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
510 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
511 _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
512 _GL_CXXALIASWARN1 (strpbrk, char const *,
513 (char const *__s, char const *__accept));
514 # else
515 _GL_CXXALIASWARN (strpbrk);
516 # endif
517 # if defined GNULIB_POSIXCHECK
518 /* strpbrk() assumes the second argument is a list of single-byte characters.
519 Even in this simple case, it does not work with multibyte strings if the
520 locale encoding is GB18030 and one of the characters to be searched is a
521 digit. */
522 # undef strpbrk
523 _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
524 "in multibyte locales - "
525 "use mbspbrk if you care about internationalization");
526 # endif
527 #elif defined GNULIB_POSIXCHECK
528 # undef strpbrk
529 # if HAVE_RAW_DECL_STRPBRK
530 _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
531 "use gnulib module strpbrk for portability");
532 # endif
533 #endif
534
535 #if defined GNULIB_POSIXCHECK
536 /* strspn() assumes the second argument is a list of single-byte characters.
537 Even in this simple case, it cannot work with multibyte strings. */
538 # undef strspn
539 /* Assume strspn is always declared. */
540 _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
541 "in multibyte locales - "
542 "use mbsspn if you care about internationalization");
543 #endif
544
545 #if defined GNULIB_POSIXCHECK
546 /* strrchr() does not work with multibyte strings if the locale encoding is
547 GB18030 and the character to be searched is a digit. */
548 # undef strrchr
549 /* Assume strrchr is always declared. */
550 _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
551 "in some multibyte locales - "
552 "use mbsrchr if you care about internationalization");
553 #endif
554
555 /* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
556 If one is found, overwrite it with a NUL, and advance *STRINGP
557 to point to the next char after it. Otherwise, set *STRINGP to NULL.
558 If *STRINGP was already NULL, nothing happens.
559 Return the old value of *STRINGP.
560
561 This is a variant of strtok() that is multithread-safe and supports
562 empty fields.
563
564 Caveat: It modifies the original string.
565 Caveat: These functions cannot be used on constant strings.
566 Caveat: The identity of the delimiting character is lost.
567 Caveat: It doesn't work with multibyte strings unless all of the delimiter
568 characters are ASCII characters < 0x30.
569
570 See also strtok_r(). */
571 #if @GNULIB_STRSEP@
572 # if ! @HAVE_STRSEP@
573 _GL_FUNCDECL_SYS (strsep, char *,
574 (char **restrict __stringp, char const *restrict __delim)
575 _GL_ARG_NONNULL ((1, 2)));
576 # endif
577 _GL_CXXALIAS_SYS (strsep, char *,
578 (char **restrict __stringp, char const *restrict __delim));
579 _GL_CXXALIASWARN (strsep);
580 # if defined GNULIB_POSIXCHECK
581 # undef strsep
582 _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
583 "in multibyte locales - "
584 "use mbssep if you care about internationalization");
585 # endif
586 #elif defined GNULIB_POSIXCHECK
587 # undef strsep
588 # if HAVE_RAW_DECL_STRSEP
589 _GL_WARN_ON_USE (strsep, "strsep is unportable - "
590 "use gnulib module strsep for portability");
591 # endif
592 #endif
593
594 #if @GNULIB_STRSTR@
595 # if @REPLACE_STRSTR@
596 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
597 # define strstr rpl_strstr
598 # endif
599 _GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
600 _GL_ATTRIBUTE_PURE
601 _GL_ARG_NONNULL ((1, 2)));
602 _GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
603 # else
604 /* On some systems, this function is defined as an overloaded function:
605 extern "C++" { const char * strstr (const char *, const char *); }
606 extern "C++" { char * strstr (char *, const char *); } */
607 _GL_CXXALIAS_SYS_CAST2 (strstr,
608 char *, (const char *haystack, const char *needle),
609 const char *, (const char *haystack, const char *needle));
610 # endif
611 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
612 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
613 _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
614 _GL_CXXALIASWARN1 (strstr, const char *,
615 (const char *haystack, const char *needle));
616 # else
617 _GL_CXXALIASWARN (strstr);
618 # endif
619 #elif defined GNULIB_POSIXCHECK
620 /* strstr() does not work with multibyte strings if the locale encoding is
621 different from UTF-8:
622 POSIX says that it operates on "strings", and "string" in POSIX is defined
623 as a sequence of bytes, not of characters. */
624 # undef strstr
625 /* Assume strstr is always declared. */
626 _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
627 "work correctly on character strings in most "
628 "multibyte locales - "
629 "use mbsstr if you care about internationalization, "
630 "or use strstr if you care about speed");
631 #endif
632
633 /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
634 comparison. */
635 #if @GNULIB_STRCASESTR@
636 # if @REPLACE_STRCASESTR@
637 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
638 # define strcasestr rpl_strcasestr
639 # endif
640 _GL_FUNCDECL_RPL (strcasestr, char *,
641 (const char *haystack, const char *needle)
642 _GL_ATTRIBUTE_PURE
643 _GL_ARG_NONNULL ((1, 2)));
644 _GL_CXXALIAS_RPL (strcasestr, char *,
645 (const char *haystack, const char *needle));
646 # else
647 # if ! @HAVE_STRCASESTR@
648 _GL_FUNCDECL_SYS (strcasestr, char *,
649 (const char *haystack, const char *needle)
650 _GL_ATTRIBUTE_PURE
651 _GL_ARG_NONNULL ((1, 2)));
652 # endif
653 /* On some systems, this function is defined as an overloaded function:
654 extern "C++" { const char * strcasestr (const char *, const char *); }
655 extern "C++" { char * strcasestr (char *, const char *); } */
656 _GL_CXXALIAS_SYS_CAST2 (strcasestr,
657 char *, (const char *haystack, const char *needle),
658 const char *, (const char *haystack, const char *needle));
659 # endif
660 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
661 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
662 _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
663 _GL_CXXALIASWARN1 (strcasestr, const char *,
664 (const char *haystack, const char *needle));
665 # else
666 _GL_CXXALIASWARN (strcasestr);
667 # endif
668 #elif defined GNULIB_POSIXCHECK
669 /* strcasestr() does not work with multibyte strings:
670 It is a glibc extension, and glibc implements it only for unibyte
671 locales. */
672 # undef strcasestr
673 # if HAVE_RAW_DECL_STRCASESTR
674 _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
675 "strings in multibyte locales - "
676 "use mbscasestr if you care about "
677 "internationalization, or use c-strcasestr if you want "
678 "a locale independent function");
679 # endif
680 #endif
681
682 /* Parse S into tokens separated by characters in DELIM.
683 If S is NULL, the saved pointer in SAVE_PTR is used as
684 the next starting point. For example:
685 char s[] = "-abc-=-def";
686 char *sp;
687 x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
688 x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
689 x = strtok_r(NULL, "=", &sp); // x = NULL
690 // s = "abc\0-def\0"
691
692 This is a variant of strtok() that is multithread-safe.
693
694 For the POSIX documentation for this function, see:
695 http://www.opengroup.org/susv3xsh/strtok.html
696
697 Caveat: It modifies the original string.
698 Caveat: These functions cannot be used on constant strings.
699 Caveat: The identity of the delimiting character is lost.
700 Caveat: It doesn't work with multibyte strings unless all of the delimiter
701 characters are ASCII characters < 0x30.
702
703 See also strsep(). */
704 #if @GNULIB_STRTOK_R@
705 # if @REPLACE_STRTOK_R@
706 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
707 # undef strtok_r
708 # define strtok_r rpl_strtok_r
709 # endif
710 _GL_FUNCDECL_RPL (strtok_r, char *,
711 (char *restrict s, char const *restrict delim,
712 char **restrict save_ptr)
713 _GL_ARG_NONNULL ((2, 3)));
714 _GL_CXXALIAS_RPL (strtok_r, char *,
715 (char *restrict s, char const *restrict delim,
716 char **restrict save_ptr));
717 # else
718 # if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
719 # undef strtok_r
720 # endif
721 # if ! @HAVE_DECL_STRTOK_R@
722 _GL_FUNCDECL_SYS (strtok_r, char *,
723 (char *restrict s, char const *restrict delim,
724 char **restrict save_ptr)
725 _GL_ARG_NONNULL ((2, 3)));
726 # endif
727 _GL_CXXALIAS_SYS (strtok_r, char *,
728 (char *restrict s, char const *restrict delim,
729 char **restrict save_ptr));
730 # endif
731 _GL_CXXALIASWARN (strtok_r);
732 # if defined GNULIB_POSIXCHECK
733 _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
734 "strings in multibyte locales - "
735 "use mbstok_r if you care about internationalization");
736 # endif
737 #elif defined GNULIB_POSIXCHECK
738 # undef strtok_r
739 # if HAVE_RAW_DECL_STRTOK_R
740 _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
741 "use gnulib module strtok_r for portability");
742 # endif
743 #endif
744
745
746 /* The following functions are not specified by POSIX. They are gnulib
747 extensions. */
748
749 #if @GNULIB_MBSLEN@
750 /* Return the number of multibyte characters in the character string STRING.
751 This considers multibyte characters, unlike strlen, which counts bytes. */
752 # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */
753 # undef mbslen
754 # endif
755 # if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */
756 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
757 # define mbslen rpl_mbslen
758 # endif
759 _GL_FUNCDECL_RPL (mbslen, size_t, (const char *string)
760 _GL_ATTRIBUTE_PURE
761 _GL_ARG_NONNULL ((1)));
762 _GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
763 # else
764 _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string)
765 _GL_ATTRIBUTE_PURE
766 _GL_ARG_NONNULL ((1)));
767 _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
768 # endif
769 _GL_CXXALIASWARN (mbslen);
770 #endif
771
772 #if @GNULIB_MBSNLEN@
773 /* Return the number of multibyte characters in the character string starting
774 at STRING and ending at STRING + LEN. */
775 _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
776 _GL_ATTRIBUTE_PURE
777 _GL_ARG_NONNULL ((1));
778 #endif
779
780 #if @GNULIB_MBSCHR@
781 /* Locate the first single-byte character C in the character string STRING,
782 and return a pointer to it. Return NULL if C is not found in STRING.
783 Unlike strchr(), this function works correctly in multibyte locales with
784 encodings such as GB18030. */
785 # if defined __hpux
786 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
787 # define mbschr rpl_mbschr /* avoid collision with HP-UX function */
788 # endif
789 _GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
790 _GL_ATTRIBUTE_PURE
791 _GL_ARG_NONNULL ((1)));
792 _GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
793 # else
794 _GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
795 _GL_ATTRIBUTE_PURE
796 _GL_ARG_NONNULL ((1)));
797 _GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
798 # endif
799 _GL_CXXALIASWARN (mbschr);
800 #endif
801
802 #if @GNULIB_MBSRCHR@
803 /* Locate the last single-byte character C in the character string STRING,
804 and return a pointer to it. Return NULL if C is not found in STRING.
805 Unlike strrchr(), this function works correctly in multibyte locales with
806 encodings such as GB18030. */
807 # if defined __hpux || defined __INTERIX
808 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
809 # define mbsrchr rpl_mbsrchr /* avoid collision with system function */
810 # endif
811 _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
812 _GL_ATTRIBUTE_PURE
813 _GL_ARG_NONNULL ((1)));
814 _GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
815 # else
816 _GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
817 _GL_ATTRIBUTE_PURE
818 _GL_ARG_NONNULL ((1)));
819 _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
820 # endif
821 _GL_CXXALIASWARN (mbsrchr);
822 #endif
823
824 #if @GNULIB_MBSSTR@
825 /* Find the first occurrence of the character string NEEDLE in the character
826 string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK.
827 Unlike strstr(), this function works correctly in multibyte locales with
828 encodings different from UTF-8. */
829 _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
830 _GL_ATTRIBUTE_PURE
831 _GL_ARG_NONNULL ((1, 2));
832 #endif
833
834 #if @GNULIB_MBSCASECMP@
835 /* Compare the character strings S1 and S2, ignoring case, returning less than,
836 equal to or greater than zero if S1 is lexicographically less than, equal to
837 or greater than S2.
838 Note: This function may, in multibyte locales, return 0 for strings of
839 different lengths!
840 Unlike strcasecmp(), this function works correctly in multibyte locales. */
841 _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
842 _GL_ATTRIBUTE_PURE
843 _GL_ARG_NONNULL ((1, 2));
844 #endif
845
846 #if @GNULIB_MBSNCASECMP@
847 /* Compare the initial segment of the character string S1 consisting of at most
848 N characters with the initial segment of the character string S2 consisting
849 of at most N characters, ignoring case, returning less than, equal to or
850 greater than zero if the initial segment of S1 is lexicographically less
851 than, equal to or greater than the initial segment of S2.
852 Note: This function may, in multibyte locales, return 0 for initial segments
853 of different lengths!
854 Unlike strncasecmp(), this function works correctly in multibyte locales.
855 But beware that N is not a byte count but a character count! */
856 _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
857 _GL_ATTRIBUTE_PURE
858 _GL_ARG_NONNULL ((1, 2));
859 #endif
860
861 #if @GNULIB_MBSPCASECMP@
862 /* Compare the initial segment of the character string STRING consisting of
863 at most mbslen (PREFIX) characters with the character string PREFIX,
864 ignoring case. If the two match, return a pointer to the first byte
865 after this prefix in STRING. Otherwise, return NULL.
866 Note: This function may, in multibyte locales, return non-NULL if STRING
867 is of smaller length than PREFIX!
868 Unlike strncasecmp(), this function works correctly in multibyte
869 locales. */
870 _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
871 _GL_ATTRIBUTE_PURE
872 _GL_ARG_NONNULL ((1, 2));
873 #endif
874
875 #if @GNULIB_MBSCASESTR@
876 /* Find the first occurrence of the character string NEEDLE in the character
877 string HAYSTACK, using case-insensitive comparison.
878 Note: This function may, in multibyte locales, return success even if
879 strlen (haystack) < strlen (needle) !
880 Unlike strcasestr(), this function works correctly in multibyte locales. */
881 _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
882 _GL_ATTRIBUTE_PURE
883 _GL_ARG_NONNULL ((1, 2));
884 #endif
885
886 #if @GNULIB_MBSCSPN@
887 /* Find the first occurrence in the character string STRING of any character
888 in the character string ACCEPT. Return the number of bytes from the
889 beginning of the string to this occurrence, or to the end of the string
890 if none exists.
891 Unlike strcspn(), this function works correctly in multibyte locales. */
892 _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
893 _GL_ATTRIBUTE_PURE
894 _GL_ARG_NONNULL ((1, 2));
895 #endif
896
897 #if @GNULIB_MBSPBRK@
898 /* Find the first occurrence in the character string STRING of any character
899 in the character string ACCEPT. Return the pointer to it, or NULL if none
900 exists.
901 Unlike strpbrk(), this function works correctly in multibyte locales. */
902 # if defined __hpux
903 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
904 # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
905 # endif
906 _GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
907 _GL_ATTRIBUTE_PURE
908 _GL_ARG_NONNULL ((1, 2)));
909 _GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
910 # else
911 _GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
912 _GL_ATTRIBUTE_PURE
913 _GL_ARG_NONNULL ((1, 2)));
914 _GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
915 # endif
916 _GL_CXXALIASWARN (mbspbrk);
917 #endif
918
919 #if @GNULIB_MBSSPN@
920 /* Find the first occurrence in the character string STRING of any character
921 not in the character string REJECT. Return the number of bytes from the
922 beginning of the string to this occurrence, or to the end of the string
923 if none exists.
924 Unlike strspn(), this function works correctly in multibyte locales. */
925 _GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
926 _GL_ATTRIBUTE_PURE
927 _GL_ARG_NONNULL ((1, 2));
928 #endif
929
930 #if @GNULIB_MBSSEP@
931 /* Search the next delimiter (multibyte character listed in the character
932 string DELIM) starting at the character string *STRINGP.
933 If one is found, overwrite it with a NUL, and advance *STRINGP to point
934 to the next multibyte character after it. Otherwise, set *STRINGP to NULL.
935 If *STRINGP was already NULL, nothing happens.
936 Return the old value of *STRINGP.
937
938 This is a variant of mbstok_r() that supports empty fields.
939
940 Caveat: It modifies the original string.
941 Caveat: These functions cannot be used on constant strings.
942 Caveat: The identity of the delimiting character is lost.
943
944 See also mbstok_r(). */
945 _GL_EXTERN_C char * mbssep (char **stringp, const char *delim)
946 _GL_ARG_NONNULL ((1, 2));
947 #endif
948
949 #if @GNULIB_MBSTOK_R@
950 /* Parse the character string STRING into tokens separated by characters in
951 the character string DELIM.
952 If STRING is NULL, the saved pointer in SAVE_PTR is used as
953 the next starting point. For example:
954 char s[] = "-abc-=-def";
955 char *sp;
956 x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def"
957 x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL
958 x = mbstok_r(NULL, "=", &sp); // x = NULL
959 // s = "abc\0-def\0"
960
961 Caveat: It modifies the original string.
962 Caveat: These functions cannot be used on constant strings.
963 Caveat: The identity of the delimiting character is lost.
964
965 See also mbssep(). */
966 _GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr)
967 _GL_ARG_NONNULL ((2, 3));
968 #endif
969
970 /* Map any int, typically from errno, into an error message. */
971 #if @GNULIB_STRERROR@
972 # if @REPLACE_STRERROR@
973 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
974 # undef strerror
975 # define strerror rpl_strerror
976 # endif
977 _GL_FUNCDECL_RPL (strerror, char *, (int));
978 _GL_CXXALIAS_RPL (strerror, char *, (int));
979 # else
980 _GL_CXXALIAS_SYS (strerror, char *, (int));
981 # endif
982 _GL_CXXALIASWARN (strerror);
983 #elif defined GNULIB_POSIXCHECK
984 # undef strerror
985 /* Assume strerror is always declared. */
986 _GL_WARN_ON_USE (strerror, "strerror is unportable - "
987 "use gnulib module strerror to guarantee non-NULL result");
988 #endif
989
990 /* Map any int, typically from errno, into an error message. Multithread-safe.
991 Uses the POSIX declaration, not the glibc declaration. */
992 #if @GNULIB_STRERROR_R@
993 # if @REPLACE_STRERROR_R@
994 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
995 # undef strerror_r
996 # define strerror_r rpl_strerror_r
997 # endif
998 _GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)
999 _GL_ARG_NONNULL ((2)));
1000 _GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen));
1001 # else
1002 # if !@HAVE_DECL_STRERROR_R@
1003 _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
1004 _GL_ARG_NONNULL ((2)));
1005 # endif
1006 _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
1007 # endif
1008 # if @HAVE_DECL_STRERROR_R@
1009 _GL_CXXALIASWARN (strerror_r);
1010 # endif
1011 #elif defined GNULIB_POSIXCHECK
1012 # undef strerror_r
1013 # if HAVE_RAW_DECL_STRERROR_R
1014 _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
1015 "use gnulib module strerror_r-posix for portability");
1016 # endif
1017 #endif
1018
1019 #if @GNULIB_STRSIGNAL@
1020 # if @REPLACE_STRSIGNAL@
1021 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1022 # define strsignal rpl_strsignal
1023 # endif
1024 _GL_FUNCDECL_RPL (strsignal, char *, (int __sig));
1025 _GL_CXXALIAS_RPL (strsignal, char *, (int __sig));
1026 # else
1027 # if ! @HAVE_DECL_STRSIGNAL@
1028 _GL_FUNCDECL_SYS (strsignal, char *, (int __sig));
1029 # endif
1030 /* Need to cast, because on Cygwin 1.5.x systems, the return type is
1031 'const char *'. */
1032 _GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig));
1033 # endif
1034 _GL_CXXALIASWARN (strsignal);
1035 #elif defined GNULIB_POSIXCHECK
1036 # undef strsignal
1037 # if HAVE_RAW_DECL_STRSIGNAL
1038 _GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
1039 "use gnulib module strsignal for portability");
1040 # endif
1041 #endif
1042
1043 #if @GNULIB_STRVERSCMP@
1044 # if !@HAVE_STRVERSCMP@
1045 _GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
1046 _GL_ATTRIBUTE_PURE
1047 _GL_ARG_NONNULL ((1, 2)));
1048 # endif
1049 _GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
1050 _GL_CXXALIASWARN (strverscmp);
1051 #elif defined GNULIB_POSIXCHECK
1052 # undef strverscmp
1053 # if HAVE_RAW_DECL_STRVERSCMP
1054 _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
1055 "use gnulib module strverscmp for portability");
1056 # endif
1057 #endif
1058
1059
1060 #endif /* _@GUARD_PREFIX@_STRING_H */
1061 #endif /* _@GUARD_PREFIX@_STRING_H */
1062 #endif
0 /* Provide a more complete sys/file.h.
1
2 Copyright (C) 2007-2018 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, see <https://www.gnu.org/licenses/>. */
16
17 /* Written by Richard W.M. Jones. */
18
19 #ifndef _@GUARD_PREFIX@_SYS_FILE_H
20
21 #if __GNUC__ >= 3
22 @PRAGMA_SYSTEM_HEADER@
23 #endif
24 @PRAGMA_COLUMNS@
25
26 /* The include_next requires a split double-inclusion guard. */
27 #if @HAVE_SYS_FILE_H@
28 # @INCLUDE_NEXT@ @NEXT_SYS_FILE_H@
29 #endif
30
31 #ifndef _@GUARD_PREFIX@_SYS_FILE_H
32 #define _@GUARD_PREFIX@_SYS_FILE_H
33
34 #ifndef LOCK_SH
35 /* Operations for the 'flock' call (same as Linux kernel constants). */
36 # define LOCK_SH 1 /* Shared lock. */
37 # define LOCK_EX 2 /* Exclusive lock. */
38 # define LOCK_UN 8 /* Unlock. */
39
40 /* Can be OR'd in to one of the above. */
41 # define LOCK_NB 4 /* Don't block when locking. */
42 #endif
43
44 /* The definition of _GL_WARN_ON_USE is copied here. */
45
46 #if @GNULIB_FLOCK@
47 /* Apply or remove advisory locks on an open file.
48 Return 0 if successful, otherwise -1 and errno set. */
49 # if !@HAVE_FLOCK@
50 extern int flock (int fd, int operation);
51 # endif
52 #elif defined GNULIB_POSIXCHECK
53 # undef flock
54 # if HAVE_RAW_DECL_FLOCK
55 _GL_WARN_ON_USE (flock, "flock is unportable - "
56 "use gnulib module flock for portability");
57 # endif
58 #endif
59
60
61 #endif /* _@GUARD_PREFIX@_SYS_FILE_H */
62 #endif /* _@GUARD_PREFIX@_SYS_FILE_H */
0 /* Provide a more complete sys/types.h.
1
2 Copyright (C) 2011-2018 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, see <https://www.gnu.org/licenses/>. */
16
17 #if __GNUC__ >= 3
18 @PRAGMA_SYSTEM_HEADER@
19 #endif
20 @PRAGMA_COLUMNS@
21
22 #if defined _WIN32 && !defined __CYGWIN__ \
23 && (defined __need_off_t || defined __need___off64_t \
24 || defined __need_ssize_t || defined __need_time_t)
25
26 /* Special invocation convention inside mingw header files. */
27
28 #@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
29
30 #else
31 /* Normal invocation convention. */
32
33 #ifndef _@GUARD_PREFIX@_SYS_TYPES_H
34
35 /* The include_next requires a split double-inclusion guard. */
36 # define _GL_INCLUDING_SYS_TYPES_H
37 #@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
38 # undef _GL_INCLUDING_SYS_TYPES_H
39
40 #ifndef _@GUARD_PREFIX@_SYS_TYPES_H
41 #define _@GUARD_PREFIX@_SYS_TYPES_H
42
43 /* Override off_t if Large File Support is requested on native Windows. */
44 #if @WINDOWS_64_BIT_OFF_T@
45 /* Same as int64_t in <stdint.h>. */
46 # if defined _MSC_VER
47 # define off_t __int64
48 # else
49 # define off_t long long int
50 # endif
51 /* Indicator, for gnulib internal purposes. */
52 # define _GL_WINDOWS_64_BIT_OFF_T 1
53 #endif
54
55 /* Override dev_t and ino_t if distinguishable inodes support is requested
56 on native Windows. */
57 #if @WINDOWS_STAT_INODES@
58
59 # if @WINDOWS_STAT_INODES@ == 2
60 /* Experimental, not useful in Windows 10. */
61
62 /* Define dev_t to a 64-bit type. */
63 # if !defined GNULIB_defined_dev_t
64 typedef unsigned long long int rpl_dev_t;
65 # undef dev_t
66 # define dev_t rpl_dev_t
67 # define GNULIB_defined_dev_t 1
68 # endif
69
70 /* Define ino_t to a 128-bit type. */
71 # if !defined GNULIB_defined_ino_t
72 /* MSVC does not have a 128-bit integer type.
73 GCC has a 128-bit integer type __int128, but only on 64-bit targets. */
74 typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t;
75 # undef ino_t
76 # define ino_t rpl_ino_t
77 # define GNULIB_defined_ino_t 1
78 # endif
79
80 # else /* @WINDOWS_STAT_INODES@ == 1 */
81
82 /* Define ino_t to a 64-bit type. */
83 # if !defined GNULIB_defined_ino_t
84 typedef unsigned long long int rpl_ino_t;
85 # undef ino_t
86 # define ino_t rpl_ino_t
87 # define GNULIB_defined_ino_t 1
88 # endif
89
90 # endif
91
92 /* Indicator, for gnulib internal purposes. */
93 # define _GL_WINDOWS_STAT_INODES @WINDOWS_STAT_INODES@
94
95 #endif
96
97 /* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */
98 /* But avoid namespace pollution on glibc systems. */
99 #if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__
100 # include <stddef.h>
101 #endif
102
103 #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
104 #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
105 #endif /* __need_XXX */
0 #include <config.h>
1 #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
2 #include "unistd.h"
3 typedef int dummy;
0 /* Substitute for and wrapper around <unistd.h>.
1 Copyright (C) 2003-2018 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with this program; if not, see <https://www.gnu.org/licenses/>. */
15
16 #ifndef _@GUARD_PREFIX@_UNISTD_H
17
18 #if __GNUC__ >= 3
19 @PRAGMA_SYSTEM_HEADER@
20 #endif
21 @PRAGMA_COLUMNS@
22
23 #ifdef _GL_INCLUDING_UNISTD_H
24 /* Special invocation convention:
25 - On Mac OS X 10.3.9 we have a sequence of nested includes
26 <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
27 In this situation, the functions are not yet declared, therefore we cannot
28 provide the C++ aliases. */
29
30 #@INCLUDE_NEXT@ @NEXT_UNISTD_H@
31
32 #else
33 /* Normal invocation convention. */
34
35 /* The include_next requires a split double-inclusion guard. */
36 #if @HAVE_UNISTD_H@
37 # define _GL_INCLUDING_UNISTD_H
38 # @INCLUDE_NEXT@ @NEXT_UNISTD_H@
39 # undef _GL_INCLUDING_UNISTD_H
40 #endif
41
42 /* Get all possible declarations of gethostname(). */
43 #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
44 && !defined _GL_INCLUDING_WINSOCK2_H
45 # define _GL_INCLUDING_WINSOCK2_H
46 # include <winsock2.h>
47 # undef _GL_INCLUDING_WINSOCK2_H
48 #endif
49
50 #if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
51 #define _@GUARD_PREFIX@_UNISTD_H
52
53 /* NetBSD 5.0 mis-defines NULL. Also get size_t. */
54 #include <stddef.h>
55
56 /* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
57 /* MSVC declares 'unlink' in <stdio.h>, not in <unistd.h>. We must include
58 it before we #define unlink rpl_unlink. */
59 /* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
60 /* But avoid namespace pollution on glibc systems. */
61 #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
62 || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \
63 && (defined _WIN32 && ! defined __CYGWIN__)) \
64 || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
65 && defined __CYGWIN__)) \
66 && ! defined __GLIBC__
67 # include <stdio.h>
68 #endif
69
70 /* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
71 /* But avoid namespace pollution on glibc systems. */
72 #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
73 && ! defined __GLIBC__
74 # include <fcntl.h>
75 #endif
76
77 /* mingw fails to declare _exit in <unistd.h>. */
78 /* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in
79 <unistd.h>. */
80 /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
81 /* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is
82 included here. */
83 /* But avoid namespace pollution on glibc systems. */
84 #if !defined __GLIBC__ && !defined __osf__
85 # define __need_system_stdlib_h
86 # include <stdlib.h>
87 # undef __need_system_stdlib_h
88 #endif
89
90 /* Native Windows platforms declare chdir, getcwd, rmdir in
91 <io.h> and/or <direct.h>, not in <unistd.h>.
92 They also declare access(), chmod(), close(), dup(), dup2(), isatty(),
93 lseek(), read(), unlink(), write() in <io.h>. */
94 #if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
95 || defined GNULIB_POSIXCHECK) \
96 && (defined _WIN32 && ! defined __CYGWIN__))
97 # include <io.h> /* mingw32, mingw64 */
98 # include <direct.h> /* mingw64, MSVC 9 */
99 #elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \
100 || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \
101 || defined GNULIB_POSIXCHECK) \
102 && (defined _WIN32 && ! defined __CYGWIN__)
103 # include <io.h>
104 #endif
105
106 /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.
107 NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>. */
108 /* But avoid namespace pollution on glibc systems. */
109 #if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \
110 || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \
111 && !defined __GLIBC__
112 # include <netdb.h>
113 #endif
114
115 /* MSVC defines off_t in <sys/types.h>.
116 May also define off_t to a 64-bit type on native Windows. */
117 #if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@
118 /* Get off_t. */
119 # include <sys/types.h>
120 #endif
121
122 #if (@GNULIB_READ@ || @GNULIB_WRITE@ \
123 || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
124 || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
125 /* Get ssize_t. */
126 # include <sys/types.h>
127 #endif
128
129 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
130
131 /* The definition of _GL_ARG_NONNULL is copied here. */
132
133 /* The definition of _GL_WARN_ON_USE is copied here. */
134
135
136 /* Get getopt(), optarg, optind, opterr, optopt. */
137 #if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
138 # include <getopt-cdefs.h>
139 # include <getopt-pfx-core.h>
140 #endif
141
142 #ifndef _GL_INLINE_HEADER_BEGIN
143 #error "Please include config.h first."
144 #endif
145 _GL_INLINE_HEADER_BEGIN
146 #ifndef _GL_UNISTD_INLINE
147 # define _GL_UNISTD_INLINE _GL_INLINE
148 #endif
149
150 /* Hide some function declarations from <winsock2.h>. */
151
152 #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
153 # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
154 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
155 # undef socket
156 # define socket socket_used_without_including_sys_socket_h
157 # undef connect
158 # define connect connect_used_without_including_sys_socket_h
159 # undef accept
160 # define accept accept_used_without_including_sys_socket_h
161 # undef bind
162 # define bind bind_used_without_including_sys_socket_h
163 # undef getpeername
164 # define getpeername getpeername_used_without_including_sys_socket_h
165 # undef getsockname
166 # define getsockname getsockname_used_without_including_sys_socket_h
167 # undef getsockopt
168 # define getsockopt getsockopt_used_without_including_sys_socket_h
169 # undef listen
170 # define listen listen_used_without_including_sys_socket_h
171 # undef recv
172 # define recv recv_used_without_including_sys_socket_h
173 # undef send
174 # define send send_used_without_including_sys_socket_h
175 # undef recvfrom
176 # define recvfrom recvfrom_used_without_including_sys_socket_h
177 # undef sendto
178 # define sendto sendto_used_without_including_sys_socket_h
179 # undef setsockopt
180 # define setsockopt setsockopt_used_without_including_sys_socket_h
181 # undef shutdown
182 # define shutdown shutdown_used_without_including_sys_socket_h
183 # else
184 _GL_WARN_ON_USE (socket,
185 "socket() used without including <sys/socket.h>");
186 _GL_WARN_ON_USE (connect,
187 "connect() used without including <sys/socket.h>");
188 _GL_WARN_ON_USE (accept,
189 "accept() used without including <sys/socket.h>");
190 _GL_WARN_ON_USE (bind,
191 "bind() used without including <sys/socket.h>");
192 _GL_WARN_ON_USE (getpeername,
193 "getpeername() used without including <sys/socket.h>");
194 _GL_WARN_ON_USE (getsockname,
195 "getsockname() used without including <sys/socket.h>");
196 _GL_WARN_ON_USE (getsockopt,
197 "getsockopt() used without including <sys/socket.h>");
198 _GL_WARN_ON_USE (listen,
199 "listen() used without including <sys/socket.h>");
200 _GL_WARN_ON_USE (recv,
201 "recv() used without including <sys/socket.h>");
202 _GL_WARN_ON_USE (send,
203 "send() used without including <sys/socket.h>");
204 _GL_WARN_ON_USE (recvfrom,
205 "recvfrom() used without including <sys/socket.h>");
206 _GL_WARN_ON_USE (sendto,
207 "sendto() used without including <sys/socket.h>");
208 _GL_WARN_ON_USE (setsockopt,
209 "setsockopt() used without including <sys/socket.h>");
210 _GL_WARN_ON_USE (shutdown,
211 "shutdown() used without including <sys/socket.h>");
212 # endif
213 # endif
214 # if !defined _@GUARD_PREFIX@_SYS_SELECT_H
215 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
216 # undef select
217 # define select select_used_without_including_sys_select_h
218 # else
219 _GL_WARN_ON_USE (select,
220 "select() used without including <sys/select.h>");
221 # endif
222 # endif
223 #endif
224
225
226 /* OS/2 EMX lacks these macros. */
227 #ifndef STDIN_FILENO
228 # define STDIN_FILENO 0
229 #endif
230 #ifndef STDOUT_FILENO
231 # define STDOUT_FILENO 1
232 #endif
233 #ifndef STDERR_FILENO
234 # define STDERR_FILENO 2
235 #endif
236
237 /* Ensure *_OK macros exist. */
238 #ifndef F_OK
239 # define F_OK 0
240 # define X_OK 1
241 # define W_OK 2
242 # define R_OK 4
243 #endif
244
245
246 /* Declare overridden functions. */
247
248
249 #if defined GNULIB_POSIXCHECK
250 /* The access() function is a security risk. */
251 _GL_WARN_ON_USE (access, "the access function is a security risk - "
252 "use the gnulib module faccessat instead");
253 #endif
254
255
256 #if @GNULIB_CHDIR@
257 _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
258 _GL_CXXALIASWARN (chdir);
259 #elif defined GNULIB_POSIXCHECK
260 # undef chdir
261 # if HAVE_RAW_DECL_CHDIR
262 _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
263 "use gnulib module chdir for portability");
264 # endif
265 #endif
266
267
268 #if @GNULIB_CHOWN@
269 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
270 to GID (if GID is not -1). Follow symbolic links.
271 Return 0 if successful, otherwise -1 and errno set.
272 See the POSIX:2008 specification
273 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */
274 # if @REPLACE_CHOWN@
275 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
276 # undef chown
277 # define chown rpl_chown
278 # endif
279 _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)
280 _GL_ARG_NONNULL ((1)));
281 _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid));
282 # else
283 # if !@HAVE_CHOWN@
284 _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)
285 _GL_ARG_NONNULL ((1)));
286 # endif
287 _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid));
288 # endif
289 _GL_CXXALIASWARN (chown);
290 #elif defined GNULIB_POSIXCHECK
291 # undef chown
292 # if HAVE_RAW_DECL_CHOWN
293 _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
294 "doesn't treat a uid or gid of -1 on some systems - "
295 "use gnulib module chown for portability");
296 # endif
297 #endif
298
299
300 #if @GNULIB_CLOSE@
301 # if @REPLACE_CLOSE@
302 /* Automatically included by modules that need a replacement for close. */
303 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
304 # undef close
305 # define close rpl_close
306 # endif
307 _GL_FUNCDECL_RPL (close, int, (int fd));
308 _GL_CXXALIAS_RPL (close, int, (int fd));
309 # else
310 _GL_CXXALIAS_SYS (close, int, (int fd));
311 # endif
312 _GL_CXXALIASWARN (close);
313 #elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
314 # undef close
315 # define close close_used_without_requesting_gnulib_module_close
316 #elif defined GNULIB_POSIXCHECK
317 # undef close
318 /* Assume close is always declared. */
319 _GL_WARN_ON_USE (close, "close does not portably work on sockets - "
320 "use gnulib module close for portability");
321 #endif
322
323
324 #if @GNULIB_DUP@
325 # if @REPLACE_DUP@
326 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
327 # define dup rpl_dup
328 # endif
329 _GL_FUNCDECL_RPL (dup, int, (int oldfd));
330 _GL_CXXALIAS_RPL (dup, int, (int oldfd));
331 # else
332 _GL_CXXALIAS_SYS (dup, int, (int oldfd));
333 # endif
334 _GL_CXXALIASWARN (dup);
335 #elif defined GNULIB_POSIXCHECK
336 # undef dup
337 # if HAVE_RAW_DECL_DUP
338 _GL_WARN_ON_USE (dup, "dup is unportable - "
339 "use gnulib module dup for portability");
340 # endif
341 #endif
342
343
344 #if @GNULIB_DUP2@
345 /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
346 NEWFD = OLDFD, otherwise close NEWFD first if it is open.
347 Return newfd if successful, otherwise -1 and errno set.
348 See the POSIX:2008 specification
349 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */
350 # if @REPLACE_DUP2@
351 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
352 # define dup2 rpl_dup2
353 # endif
354 _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd));
355 _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd));
356 # else
357 # if !@HAVE_DUP2@
358 _GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd));
359 # endif
360 _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
361 # endif
362 _GL_CXXALIASWARN (dup2);
363 #elif defined GNULIB_POSIXCHECK
364 # undef dup2
365 # if HAVE_RAW_DECL_DUP2
366 _GL_WARN_ON_USE (dup2, "dup2 is unportable - "
367 "use gnulib module dup2 for portability");
368 # endif
369 #endif
370
371
372 #if @GNULIB_DUP3@
373 /* Copy the file descriptor OLDFD into file descriptor NEWFD, with the
374 specified flags.
375 The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
376 and O_TEXT, O_BINARY (defined in "binary-io.h").
377 Close NEWFD first if it is open.
378 Return newfd if successful, otherwise -1 and errno set.
379 See the Linux man page at
380 <https://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */
381 # if @HAVE_DUP3@
382 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
383 # define dup3 rpl_dup3
384 # endif
385 _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags));
386 _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags));
387 # else
388 _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags));
389 _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags));
390 # endif
391 _GL_CXXALIASWARN (dup3);
392 #elif defined GNULIB_POSIXCHECK
393 # undef dup3
394 # if HAVE_RAW_DECL_DUP3
395 _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
396 "use gnulib module dup3 for portability");
397 # endif
398 #endif
399
400
401 #if @GNULIB_ENVIRON@
402 # if defined __CYGWIN__ && !defined __i386__
403 /* The 'environ' variable is defined in a DLL. Therefore its declaration needs
404 the '__declspec(dllimport)' attribute, but the system's <unistd.h> lacks it.
405 This leads to a link error on 64-bit Cygwin when the option
406 -Wl,--disable-auto-import is in use. */
407 _GL_EXTERN_C __declspec(dllimport) char **environ;
408 # endif
409 # if !@HAVE_DECL_ENVIRON@
410 /* Set of environment variables and values. An array of strings of the form
411 "VARIABLE=VALUE", terminated with a NULL. */
412 # if defined __APPLE__ && defined __MACH__
413 # include <TargetConditionals.h>
414 # if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
415 # define _GL_USE_CRT_EXTERNS
416 # endif
417 # endif
418 # ifdef _GL_USE_CRT_EXTERNS
419 # include <crt_externs.h>
420 # define environ (*_NSGetEnviron ())
421 # else
422 # ifdef __cplusplus
423 extern "C" {
424 # endif
425 extern char **environ;
426 # ifdef __cplusplus
427 }
428 # endif
429 # endif
430 # endif
431 #elif defined GNULIB_POSIXCHECK
432 # if HAVE_RAW_DECL_ENVIRON
433 _GL_UNISTD_INLINE char ***
434 _GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - "
435 "use gnulib module environ for portability")
436 rpl_environ (void)
437 {
438 return &environ;
439 }
440 # undef environ
441 # define environ (*rpl_environ ())
442 # endif
443 #endif
444
445
446 #if @GNULIB_EUIDACCESS@
447 /* Like access(), except that it uses the effective user id and group id of
448 the current process. */
449 # if !@HAVE_EUIDACCESS@
450 _GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode)
451 _GL_ARG_NONNULL ((1)));
452 # endif
453 _GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode));
454 _GL_CXXALIASWARN (euidaccess);
455 # if defined GNULIB_POSIXCHECK
456 /* Like access(), this function is a security risk. */
457 _GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - "
458 "use the gnulib module faccessat instead");
459 # endif
460 #elif defined GNULIB_POSIXCHECK
461 # undef euidaccess
462 # if HAVE_RAW_DECL_EUIDACCESS
463 _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
464 "use gnulib module euidaccess for portability");
465 # endif
466 #endif
467
468
469 #if @GNULIB_FACCESSAT@
470 # if @REPLACE_FACCESSAT@
471 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
472 # undef faccessat
473 # define faccessat rpl_faccessat
474 # endif
475 _GL_FUNCDECL_RPL (faccessat, int,
476 (int fd, char const *name, int mode, int flag)
477 _GL_ARG_NONNULL ((2)));
478 _GL_CXXALIAS_RPL (faccessat, int,
479 (int fd, char const *name, int mode, int flag));
480 # else
481 # if !@HAVE_FACCESSAT@
482 _GL_FUNCDECL_SYS (faccessat, int,
483 (int fd, char const *file, int mode, int flag)
484 _GL_ARG_NONNULL ((2)));
485 # endif
486 _GL_CXXALIAS_SYS (faccessat, int,
487 (int fd, char const *file, int mode, int flag));
488 # endif
489 _GL_CXXALIASWARN (faccessat);
490 #elif defined GNULIB_POSIXCHECK
491 # undef faccessat
492 # if HAVE_RAW_DECL_FACCESSAT
493 _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
494 "use gnulib module faccessat for portability");
495 # endif
496 #endif
497
498
499 #if @GNULIB_FCHDIR@
500 /* Change the process' current working directory to the directory on which
501 the given file descriptor is open.
502 Return 0 if successful, otherwise -1 and errno set.
503 See the POSIX:2008 specification
504 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */
505 # if ! @HAVE_FCHDIR@
506 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
507
508 /* Gnulib internal hooks needed to maintain the fchdir metadata. */
509 _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename)
510 _GL_ARG_NONNULL ((2));
511 _GL_EXTERN_C void _gl_unregister_fd (int fd);
512 _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
513 _GL_EXTERN_C const char *_gl_directory_name (int fd);
514
515 # else
516 # if !@HAVE_DECL_FCHDIR@
517 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
518 # endif
519 # endif
520 _GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
521 _GL_CXXALIASWARN (fchdir);
522 #elif defined GNULIB_POSIXCHECK
523 # undef fchdir
524 # if HAVE_RAW_DECL_FCHDIR
525 _GL_WARN_ON_USE (fchdir, "fchdir is unportable - "
526 "use gnulib module fchdir for portability");
527 # endif
528 #endif
529
530
531 #if @GNULIB_FCHOWNAT@
532 # if @REPLACE_FCHOWNAT@
533 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
534 # undef fchownat
535 # define fchownat rpl_fchownat
536 # endif
537 _GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file,
538 uid_t owner, gid_t group, int flag)
539 _GL_ARG_NONNULL ((2)));
540 _GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file,
541 uid_t owner, gid_t group, int flag));
542 # else
543 # if !@HAVE_FCHOWNAT@
544 _GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file,
545 uid_t owner, gid_t group, int flag)
546 _GL_ARG_NONNULL ((2)));
547 # endif
548 _GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file,
549 uid_t owner, gid_t group, int flag));
550 # endif
551 _GL_CXXALIASWARN (fchownat);
552 #elif defined GNULIB_POSIXCHECK
553 # undef fchownat
554 # if HAVE_RAW_DECL_FCHOWNAT
555 _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
556 "use gnulib module openat for portability");
557 # endif
558 #endif
559
560
561 #if @GNULIB_FDATASYNC@
562 /* Synchronize changes to a file.
563 Return 0 if successful, otherwise -1 and errno set.
564 See POSIX:2008 specification
565 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */
566 # if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
567 _GL_FUNCDECL_SYS (fdatasync, int, (int fd));
568 # endif
569 _GL_CXXALIAS_SYS (fdatasync, int, (int fd));
570 _GL_CXXALIASWARN (fdatasync);
571 #elif defined GNULIB_POSIXCHECK
572 # undef fdatasync
573 # if HAVE_RAW_DECL_FDATASYNC
574 _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - "
575 "use gnulib module fdatasync for portability");
576 # endif
577 #endif
578
579
580 #if @GNULIB_FSYNC@
581 /* Synchronize changes, including metadata, to a file.
582 Return 0 if successful, otherwise -1 and errno set.
583 See POSIX:2008 specification
584 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */
585 # if !@HAVE_FSYNC@
586 _GL_FUNCDECL_SYS (fsync, int, (int fd));
587 # endif
588 _GL_CXXALIAS_SYS (fsync, int, (int fd));
589 _GL_CXXALIASWARN (fsync);
590 #elif defined GNULIB_POSIXCHECK
591 # undef fsync
592 # if HAVE_RAW_DECL_FSYNC
593 _GL_WARN_ON_USE (fsync, "fsync is unportable - "
594 "use gnulib module fsync for portability");
595 # endif
596 #endif
597
598
599 #if @GNULIB_FTRUNCATE@
600 /* Change the size of the file to which FD is opened to become equal to LENGTH.
601 Return 0 if successful, otherwise -1 and errno set.
602 See the POSIX:2008 specification
603 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */
604 # if @REPLACE_FTRUNCATE@
605 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
606 # undef ftruncate
607 # define ftruncate rpl_ftruncate
608 # endif
609 _GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length));
610 _GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length));
611 # else
612 # if !@HAVE_FTRUNCATE@
613 _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
614 # endif
615 _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
616 # endif
617 _GL_CXXALIASWARN (ftruncate);
618 #elif defined GNULIB_POSIXCHECK
619 # undef ftruncate
620 # if HAVE_RAW_DECL_FTRUNCATE
621 _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
622 "use gnulib module ftruncate for portability");
623 # endif
624 #endif
625
626
627 #if @GNULIB_GETCWD@
628 /* Get the name of the current working directory, and put it in SIZE bytes
629 of BUF.
630 Return BUF if successful, or NULL if the directory couldn't be determined
631 or SIZE was too small.
632 See the POSIX:2008 specification
633 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
634 Additionally, the gnulib module 'getcwd' guarantees the following GNU
635 extension: If BUF is NULL, an array is allocated with 'malloc'; the array
636 is SIZE bytes long, unless SIZE == 0, in which case it is as big as
637 necessary. */
638 # if @REPLACE_GETCWD@
639 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
640 # define getcwd rpl_getcwd
641 # endif
642 _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
643 _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
644 # else
645 /* Need to cast, because on mingw, the second parameter is
646 int size. */
647 _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
648 # endif
649 _GL_CXXALIASWARN (getcwd);
650 #elif defined GNULIB_POSIXCHECK
651 # undef getcwd
652 # if HAVE_RAW_DECL_GETCWD
653 _GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
654 "use gnulib module getcwd for portability");
655 # endif
656 #endif
657
658
659 #if @GNULIB_GETDOMAINNAME@
660 /* Return the NIS domain name of the machine.
661 WARNING! The NIS domain name is unrelated to the fully qualified host name
662 of the machine. It is also unrelated to email addresses.
663 WARNING! The NIS domain name is usually the empty string or "(none)" when
664 not using NIS.
665
666 Put up to LEN bytes of the NIS domain name into NAME.
667 Null terminate it if the name is shorter than LEN.
668 If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
669 Return 0 if successful, otherwise set errno and return -1. */
670 # if @REPLACE_GETDOMAINNAME@
671 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
672 # undef getdomainname
673 # define getdomainname rpl_getdomainname
674 # endif
675 _GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len)
676 _GL_ARG_NONNULL ((1)));
677 _GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len));
678 # else
679 # if !@HAVE_DECL_GETDOMAINNAME@
680 _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
681 _GL_ARG_NONNULL ((1)));
682 # endif
683 _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
684 # endif
685 _GL_CXXALIASWARN (getdomainname);
686 #elif defined GNULIB_POSIXCHECK
687 # undef getdomainname
688 # if HAVE_RAW_DECL_GETDOMAINNAME
689 _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
690 "use gnulib module getdomainname for portability");
691 # endif
692 #endif
693
694
695 #if @GNULIB_GETDTABLESIZE@
696 /* Return the maximum number of file descriptors in the current process.
697 In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
698 # if @REPLACE_GETDTABLESIZE@
699 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
700 # undef getdtablesize
701 # define getdtablesize rpl_getdtablesize
702 # endif
703 _GL_FUNCDECL_RPL (getdtablesize, int, (void));
704 _GL_CXXALIAS_RPL (getdtablesize, int, (void));
705 # else
706 # if !@HAVE_GETDTABLESIZE@
707 _GL_FUNCDECL_SYS (getdtablesize, int, (void));
708 # endif
709 _GL_CXXALIAS_SYS (getdtablesize, int, (void));
710 # endif
711 _GL_CXXALIASWARN (getdtablesize);
712 #elif defined GNULIB_POSIXCHECK
713 # undef getdtablesize
714 # if HAVE_RAW_DECL_GETDTABLESIZE
715 _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
716 "use gnulib module getdtablesize for portability");
717 # endif
718 #endif
719
720
721 #if @GNULIB_GETGROUPS@
722 /* Return the supplemental groups that the current process belongs to.
723 It is unspecified whether the effective group id is in the list.
724 If N is 0, return the group count; otherwise, N describes how many
725 entries are available in GROUPS. Return -1 and set errno if N is
726 not 0 and not large enough. Fails with ENOSYS on some systems. */
727 # if @REPLACE_GETGROUPS@
728 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
729 # undef getgroups
730 # define getgroups rpl_getgroups
731 # endif
732 _GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups));
733 _GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups));
734 # else
735 # if !@HAVE_GETGROUPS@
736 _GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups));
737 # endif
738 _GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups));
739 # endif
740 _GL_CXXALIASWARN (getgroups);
741 #elif defined GNULIB_POSIXCHECK
742 # undef getgroups
743 # if HAVE_RAW_DECL_GETGROUPS
744 _GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
745 "use gnulib module getgroups for portability");
746 # endif
747 #endif
748
749
750 #if @GNULIB_GETHOSTNAME@
751 /* Return the standard host name of the machine.
752 WARNING! The host name may or may not be fully qualified.
753
754 Put up to LEN bytes of the host name into NAME.
755 Null terminate it if the name is shorter than LEN.
756 If the host name is longer than LEN, set errno = EINVAL and return -1.
757 Return 0 if successful, otherwise set errno and return -1. */
758 # if @UNISTD_H_HAVE_WINSOCK2_H@
759 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
760 # undef gethostname
761 # define gethostname rpl_gethostname
762 # endif
763 _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len)
764 _GL_ARG_NONNULL ((1)));
765 _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len));
766 # else
767 # if !@HAVE_GETHOSTNAME@
768 _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len)
769 _GL_ARG_NONNULL ((1)));
770 # endif
771 /* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second
772 parameter is
773 int len. */
774 _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
775 # endif
776 _GL_CXXALIASWARN (gethostname);
777 #elif @UNISTD_H_HAVE_WINSOCK2_H@
778 # undef gethostname
779 # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
780 #elif defined GNULIB_POSIXCHECK
781 # undef gethostname
782 # if HAVE_RAW_DECL_GETHOSTNAME
783 _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
784 "use gnulib module gethostname for portability");
785 # endif
786 #endif
787
788
789 #if @GNULIB_GETLOGIN@
790 /* Returns the user's login name, or NULL if it cannot be found. Upon error,
791 returns NULL with errno set.
792
793 See <http://www.opengroup.org/susv3xsh/getlogin.html>.
794
795 Most programs don't need to use this function, because the information is
796 available through environment variables:
797 ${LOGNAME-$USER} on Unix platforms,
798 $USERNAME on native Windows platforms.
799 */
800 # if !@HAVE_DECL_GETLOGIN@
801 _GL_FUNCDECL_SYS (getlogin, char *, (void));
802 # endif
803 _GL_CXXALIAS_SYS (getlogin, char *, (void));
804 _GL_CXXALIASWARN (getlogin);
805 #elif defined GNULIB_POSIXCHECK
806 # undef getlogin
807 # if HAVE_RAW_DECL_GETLOGIN
808 _GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
809 "use gnulib module getlogin for portability");
810 # endif
811 #endif
812
813
814 #if @GNULIB_GETLOGIN_R@
815 /* Copies the user's login name to NAME.
816 The array pointed to by NAME has room for SIZE bytes.
817
818 Returns 0 if successful. Upon error, an error number is returned, or -1 in
819 the case that the login name cannot be found but no specific error is
820 provided (this case is hopefully rare but is left open by the POSIX spec).
821
822 See <http://www.opengroup.org/susv3xsh/getlogin.html>.
823
824 Most programs don't need to use this function, because the information is
825 available through environment variables:
826 ${LOGNAME-$USER} on Unix platforms,
827 $USERNAME on native Windows platforms.
828 */
829 # if @REPLACE_GETLOGIN_R@
830 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
831 # define getlogin_r rpl_getlogin_r
832 # endif
833 _GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size)
834 _GL_ARG_NONNULL ((1)));
835 _GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size));
836 # else
837 # if !@HAVE_DECL_GETLOGIN_R@
838 _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size)
839 _GL_ARG_NONNULL ((1)));
840 # endif
841 /* Need to cast, because on Solaris 10 systems, the second argument is
842 int size. */
843 _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size));
844 # endif
845 _GL_CXXALIASWARN (getlogin_r);
846 #elif defined GNULIB_POSIXCHECK
847 # undef getlogin_r
848 # if HAVE_RAW_DECL_GETLOGIN_R
849 _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
850 "use gnulib module getlogin_r for portability");
851 # endif
852 #endif
853
854
855 #if @GNULIB_GETPAGESIZE@
856 # if @REPLACE_GETPAGESIZE@
857 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
858 # define getpagesize rpl_getpagesize
859 # endif
860 _GL_FUNCDECL_RPL (getpagesize, int, (void));
861 _GL_CXXALIAS_RPL (getpagesize, int, (void));
862 # else
863 # if !@HAVE_GETPAGESIZE@
864 # if !defined getpagesize
865 /* This is for POSIX systems. */
866 # if !defined _gl_getpagesize && defined _SC_PAGESIZE
867 # if ! (defined __VMS && __VMS_VER < 70000000)
868 # define _gl_getpagesize() sysconf (_SC_PAGESIZE)
869 # endif
870 # endif
871 /* This is for older VMS. */
872 # if !defined _gl_getpagesize && defined __VMS
873 # ifdef __ALPHA
874 # define _gl_getpagesize() 8192
875 # else
876 # define _gl_getpagesize() 512
877 # endif
878 # endif
879 /* This is for BeOS. */
880 # if !defined _gl_getpagesize && @HAVE_OS_H@
881 # include <OS.h>
882 # if defined B_PAGE_SIZE
883 # define _gl_getpagesize() B_PAGE_SIZE
884 # endif
885 # endif
886 /* This is for AmigaOS4.0. */
887 # if !defined _gl_getpagesize && defined __amigaos4__
888 # define _gl_getpagesize() 2048
889 # endif
890 /* This is for older Unix systems. */
891 # if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@
892 # include <sys/param.h>
893 # ifdef EXEC_PAGESIZE
894 # define _gl_getpagesize() EXEC_PAGESIZE
895 # else
896 # ifdef NBPG
897 # ifndef CLSIZE
898 # define CLSIZE 1
899 # endif
900 # define _gl_getpagesize() (NBPG * CLSIZE)
901 # else
902 # ifdef NBPC
903 # define _gl_getpagesize() NBPC
904 # endif
905 # endif
906 # endif
907 # endif
908 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
909 # define getpagesize() _gl_getpagesize ()
910 # else
911 # if !GNULIB_defined_getpagesize_function
912 _GL_UNISTD_INLINE int
913 getpagesize ()
914 {
915 return _gl_getpagesize ();
916 }
917 # define GNULIB_defined_getpagesize_function 1
918 # endif
919 # endif
920 # endif
921 # endif
922 /* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */
923 _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void));
924 # endif
925 # if @HAVE_DECL_GETPAGESIZE@
926 _GL_CXXALIASWARN (getpagesize);
927 # endif
928 #elif defined GNULIB_POSIXCHECK
929 # undef getpagesize
930 # if HAVE_RAW_DECL_GETPAGESIZE
931 _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
932 "use gnulib module getpagesize for portability");
933 # endif
934 #endif
935
936
937 #if @GNULIB_GETPASS@
938 /* Function getpass() from module 'getpass':
939 Read a password from /dev/tty or stdin.
940 Function getpass() from module 'getpass-gnu':
941 Read a password of arbitrary length from /dev/tty or stdin. */
942 # if @REPLACE_GETPASS@
943 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
944 # undef getpass
945 # define getpass rpl_getpass
946 # endif
947 _GL_FUNCDECL_RPL (getpass, char *, (const char *prompt)
948 _GL_ARG_NONNULL ((1)));
949 _GL_CXXALIAS_RPL (getpass, char *, (const char *prompt));
950 # else
951 # if !@HAVE_GETPASS@
952 _GL_FUNCDECL_SYS (getpass, char *, (const char *prompt)
953 _GL_ARG_NONNULL ((1)));
954 # endif
955 _GL_CXXALIAS_SYS (getpass, char *, (const char *prompt));
956 # endif
957 _GL_CXXALIASWARN (getpass);
958 #elif defined GNULIB_POSIXCHECK
959 # undef getpass
960 # if HAVE_RAW_DECL_GETPASS
961 _GL_WARN_ON_USE (getpass, "getpass is unportable - "
962 "use gnulib module getpass or getpass-gnu for portability");
963 # endif
964 #endif
965
966
967 #if @GNULIB_GETUSERSHELL@
968 /* Return the next valid login shell on the system, or NULL when the end of
969 the list has been reached. */
970 # if !@HAVE_DECL_GETUSERSHELL@
971 _GL_FUNCDECL_SYS (getusershell, char *, (void));
972 # endif
973 _GL_CXXALIAS_SYS (getusershell, char *, (void));
974 _GL_CXXALIASWARN (getusershell);
975 #elif defined GNULIB_POSIXCHECK
976 # undef getusershell
977 # if HAVE_RAW_DECL_GETUSERSHELL
978 _GL_WARN_ON_USE (getusershell, "getusershell is unportable - "
979 "use gnulib module getusershell for portability");
980 # endif
981 #endif
982
983 #if @GNULIB_GETUSERSHELL@
984 /* Rewind to pointer that is advanced at each getusershell() call. */
985 # if !@HAVE_DECL_GETUSERSHELL@
986 _GL_FUNCDECL_SYS (setusershell, void, (void));
987 # endif
988 _GL_CXXALIAS_SYS (setusershell, void, (void));
989 _GL_CXXALIASWARN (setusershell);
990 #elif defined GNULIB_POSIXCHECK
991 # undef setusershell
992 # if HAVE_RAW_DECL_SETUSERSHELL
993 _GL_WARN_ON_USE (setusershell, "setusershell is unportable - "
994 "use gnulib module getusershell for portability");
995 # endif
996 #endif
997
998 #if @GNULIB_GETUSERSHELL@
999 /* Free the pointer that is advanced at each getusershell() call and
1000 associated resources. */
1001 # if !@HAVE_DECL_GETUSERSHELL@
1002 _GL_FUNCDECL_SYS (endusershell, void, (void));
1003 # endif
1004 _GL_CXXALIAS_SYS (endusershell, void, (void));
1005 _GL_CXXALIASWARN (endusershell);
1006 #elif defined GNULIB_POSIXCHECK
1007 # undef endusershell
1008 # if HAVE_RAW_DECL_ENDUSERSHELL
1009 _GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
1010 "use gnulib module getusershell for portability");
1011 # endif
1012 #endif
1013
1014
1015 #if @GNULIB_GROUP_MEMBER@
1016 /* Determine whether group id is in calling user's group list. */
1017 # if !@HAVE_GROUP_MEMBER@
1018 _GL_FUNCDECL_SYS (group_member, int, (gid_t gid));
1019 # endif
1020 _GL_CXXALIAS_SYS (group_member, int, (gid_t gid));
1021 _GL_CXXALIASWARN (group_member);
1022 #elif defined GNULIB_POSIXCHECK
1023 # undef group_member
1024 # if HAVE_RAW_DECL_GROUP_MEMBER
1025 _GL_WARN_ON_USE (group_member, "group_member is unportable - "
1026 "use gnulib module group-member for portability");
1027 # endif
1028 #endif
1029
1030
1031 #if @GNULIB_ISATTY@
1032 # if @REPLACE_ISATTY@
1033 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1034 # undef isatty
1035 # define isatty rpl_isatty
1036 # endif
1037 _GL_FUNCDECL_RPL (isatty, int, (int fd));
1038 _GL_CXXALIAS_RPL (isatty, int, (int fd));
1039 # else
1040 _GL_CXXALIAS_SYS (isatty, int, (int fd));
1041 # endif
1042 _GL_CXXALIASWARN (isatty);
1043 #elif defined GNULIB_POSIXCHECK
1044 # undef isatty
1045 # if HAVE_RAW_DECL_ISATTY
1046 _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
1047 "use gnulib module isatty for portability");
1048 # endif
1049 #endif
1050
1051
1052 #if @GNULIB_LCHOWN@
1053 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
1054 to GID (if GID is not -1). Do not follow symbolic links.
1055 Return 0 if successful, otherwise -1 and errno set.
1056 See the POSIX:2008 specification
1057 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */
1058 # if @REPLACE_LCHOWN@
1059 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1060 # undef lchown
1061 # define lchown rpl_lchown
1062 # endif
1063 _GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)
1064 _GL_ARG_NONNULL ((1)));
1065 _GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group));
1066 # else
1067 # if !@HAVE_LCHOWN@
1068 _GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)
1069 _GL_ARG_NONNULL ((1)));
1070 # endif
1071 _GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group));
1072 # endif
1073 _GL_CXXALIASWARN (lchown);
1074 #elif defined GNULIB_POSIXCHECK
1075 # undef lchown
1076 # if HAVE_RAW_DECL_LCHOWN
1077 _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
1078 "use gnulib module lchown for portability");
1079 # endif
1080 #endif
1081
1082
1083 #if @GNULIB_LINK@
1084 /* Create a new hard link for an existing file.
1085 Return 0 if successful, otherwise -1 and errno set.
1086 See POSIX:2008 specification
1087 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */
1088 # if @REPLACE_LINK@
1089 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1090 # define link rpl_link
1091 # endif
1092 _GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2)
1093 _GL_ARG_NONNULL ((1, 2)));
1094 _GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2));
1095 # else
1096 # if !@HAVE_LINK@
1097 _GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2)
1098 _GL_ARG_NONNULL ((1, 2)));
1099 # endif
1100 _GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2));
1101 # endif
1102 _GL_CXXALIASWARN (link);
1103 #elif defined GNULIB_POSIXCHECK
1104 # undef link
1105 # if HAVE_RAW_DECL_LINK
1106 _GL_WARN_ON_USE (link, "link is unportable - "
1107 "use gnulib module link for portability");
1108 # endif
1109 #endif
1110
1111
1112 #if @GNULIB_LINKAT@
1113 /* Create a new hard link for an existing file, relative to two
1114 directories. FLAG controls whether symlinks are followed.
1115 Return 0 if successful, otherwise -1 and errno set. */
1116 # if @REPLACE_LINKAT@
1117 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1118 # undef linkat
1119 # define linkat rpl_linkat
1120 # endif
1121 _GL_FUNCDECL_RPL (linkat, int,
1122 (int fd1, const char *path1, int fd2, const char *path2,
1123 int flag)
1124 _GL_ARG_NONNULL ((2, 4)));
1125 _GL_CXXALIAS_RPL (linkat, int,
1126 (int fd1, const char *path1, int fd2, const char *path2,
1127 int flag));
1128 # else
1129 # if !@HAVE_LINKAT@
1130 _GL_FUNCDECL_SYS (linkat, int,
1131 (int fd1, const char *path1, int fd2, const char *path2,
1132 int flag)
1133 _GL_ARG_NONNULL ((2, 4)));
1134 # endif
1135 _GL_CXXALIAS_SYS (linkat, int,
1136 (int fd1, const char *path1, int fd2, const char *path2,
1137 int flag));
1138 # endif
1139 _GL_CXXALIASWARN (linkat);
1140 #elif defined GNULIB_POSIXCHECK
1141 # undef linkat
1142 # if HAVE_RAW_DECL_LINKAT
1143 _GL_WARN_ON_USE (linkat, "linkat is unportable - "
1144 "use gnulib module linkat for portability");
1145 # endif
1146 #endif
1147
1148
1149 #if @GNULIB_LSEEK@
1150 /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
1151 Return the new offset if successful, otherwise -1 and errno set.
1152 See the POSIX:2008 specification
1153 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */
1154 # if @REPLACE_LSEEK@
1155 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1156 # define lseek rpl_lseek
1157 # endif
1158 _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence));
1159 _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence));
1160 # else
1161 _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
1162 # endif
1163 _GL_CXXALIASWARN (lseek);
1164 #elif defined GNULIB_POSIXCHECK
1165 # undef lseek
1166 # if HAVE_RAW_DECL_LSEEK
1167 _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
1168 "systems - use gnulib module lseek for portability");
1169 # endif
1170 #endif
1171
1172
1173 #if @GNULIB_PIPE@
1174 /* Create a pipe, defaulting to O_BINARY mode.
1175 Store the read-end as fd[0] and the write-end as fd[1].
1176 Return 0 upon success, or -1 with errno set upon failure. */
1177 # if !@HAVE_PIPE@
1178 _GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1)));
1179 # endif
1180 _GL_CXXALIAS_SYS (pipe, int, (int fd[2]));
1181 _GL_CXXALIASWARN (pipe);
1182 #elif defined GNULIB_POSIXCHECK
1183 # undef pipe
1184 # if HAVE_RAW_DECL_PIPE
1185 _GL_WARN_ON_USE (pipe, "pipe is unportable - "
1186 "use gnulib module pipe-posix for portability");
1187 # endif
1188 #endif
1189
1190
1191 #if @GNULIB_PIPE2@
1192 /* Create a pipe, applying the given flags when opening the read-end of the
1193 pipe and the write-end of the pipe.
1194 The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
1195 and O_TEXT, O_BINARY (defined in "binary-io.h").
1196 Store the read-end as fd[0] and the write-end as fd[1].
1197 Return 0 upon success, or -1 with errno set upon failure.
1198 See also the Linux man page at
1199 <https://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */
1200 # if @HAVE_PIPE2@
1201 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1202 # define pipe2 rpl_pipe2
1203 # endif
1204 _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
1205 _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags));
1206 # else
1207 _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
1208 _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags));
1209 # endif
1210 _GL_CXXALIASWARN (pipe2);
1211 #elif defined GNULIB_POSIXCHECK
1212 # undef pipe2
1213 # if HAVE_RAW_DECL_PIPE2
1214 _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
1215 "use gnulib module pipe2 for portability");
1216 # endif
1217 #endif
1218
1219
1220 #if @GNULIB_PREAD@
1221 /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET.
1222 Return the number of bytes placed into BUF if successful, otherwise
1223 set errno and return -1. 0 indicates EOF.
1224 See the POSIX:2008 specification
1225 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */
1226 # if @REPLACE_PREAD@
1227 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1228 # undef pread
1229 # define pread rpl_pread
1230 # endif
1231 _GL_FUNCDECL_RPL (pread, ssize_t,
1232 (int fd, void *buf, size_t bufsize, off_t offset)
1233 _GL_ARG_NONNULL ((2)));
1234 _GL_CXXALIAS_RPL (pread, ssize_t,
1235 (int fd, void *buf, size_t bufsize, off_t offset));
1236 # else
1237 # if !@HAVE_PREAD@
1238 _GL_FUNCDECL_SYS (pread, ssize_t,
1239 (int fd, void *buf, size_t bufsize, off_t offset)
1240 _GL_ARG_NONNULL ((2)));
1241 # endif
1242 _GL_CXXALIAS_SYS (pread, ssize_t,
1243 (int fd, void *buf, size_t bufsize, off_t offset));
1244 # endif
1245 _GL_CXXALIASWARN (pread);
1246 #elif defined GNULIB_POSIXCHECK
1247 # undef pread
1248 # if HAVE_RAW_DECL_PREAD
1249 _GL_WARN_ON_USE (pread, "pread is unportable - "
1250 "use gnulib module pread for portability");
1251 # endif
1252 #endif
1253
1254
1255 #if @GNULIB_PWRITE@
1256 /* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET.
1257 Return the number of bytes written if successful, otherwise
1258 set errno and return -1. 0 indicates nothing written. See the
1259 POSIX:2008 specification
1260 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */
1261 # if @REPLACE_PWRITE@
1262 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1263 # undef pwrite
1264 # define pwrite rpl_pwrite
1265 # endif
1266 _GL_FUNCDECL_RPL (pwrite, ssize_t,
1267 (int fd, const void *buf, size_t bufsize, off_t offset)
1268 _GL_ARG_NONNULL ((2)));
1269 _GL_CXXALIAS_RPL (pwrite, ssize_t,
1270 (int fd, const void *buf, size_t bufsize, off_t offset));
1271 # else
1272 # if !@HAVE_PWRITE@
1273 _GL_FUNCDECL_SYS (pwrite, ssize_t,
1274 (int fd, const void *buf, size_t bufsize, off_t offset)
1275 _GL_ARG_NONNULL ((2)));
1276 # endif
1277 _GL_CXXALIAS_SYS (pwrite, ssize_t,
1278 (int fd, const void *buf, size_t bufsize, off_t offset));
1279 # endif
1280 _GL_CXXALIASWARN (pwrite);
1281 #elif defined GNULIB_POSIXCHECK
1282 # undef pwrite
1283 # if HAVE_RAW_DECL_PWRITE
1284 _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
1285 "use gnulib module pwrite for portability");
1286 # endif
1287 #endif
1288
1289
1290 #if @GNULIB_READ@
1291 /* Read up to COUNT bytes from file descriptor FD into the buffer starting
1292 at BUF. See the POSIX:2008 specification
1293 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */
1294 # if @REPLACE_READ@
1295 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1296 # undef read
1297 # define read rpl_read
1298 # endif
1299 _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
1300 _GL_ARG_NONNULL ((2)));
1301 _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
1302 # else
1303 /* Need to cast, because on mingw, the third parameter is
1304 unsigned int count
1305 and the return type is 'int'. */
1306 _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count));
1307 # endif
1308 _GL_CXXALIASWARN (read);
1309 #endif
1310
1311
1312 #if @GNULIB_READLINK@
1313 /* Read the contents of the symbolic link FILE and place the first BUFSIZE
1314 bytes of it into BUF. Return the number of bytes placed into BUF if
1315 successful, otherwise -1 and errno set.
1316 See the POSIX:2008 specification
1317 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */
1318 # if @REPLACE_READLINK@
1319 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1320 # define readlink rpl_readlink
1321 # endif
1322 _GL_FUNCDECL_RPL (readlink, ssize_t,
1323 (const char *file, char *buf, size_t bufsize)
1324 _GL_ARG_NONNULL ((1, 2)));
1325 _GL_CXXALIAS_RPL (readlink, ssize_t,
1326 (const char *file, char *buf, size_t bufsize));
1327 # else
1328 # if !@HAVE_READLINK@
1329 _GL_FUNCDECL_SYS (readlink, ssize_t,
1330 (const char *file, char *buf, size_t bufsize)
1331 _GL_ARG_NONNULL ((1, 2)));
1332 # endif
1333 _GL_CXXALIAS_SYS (readlink, ssize_t,
1334 (const char *file, char *buf, size_t bufsize));
1335 # endif
1336 _GL_CXXALIASWARN (readlink);
1337 #elif defined GNULIB_POSIXCHECK
1338 # undef readlink
1339 # if HAVE_RAW_DECL_READLINK
1340 _GL_WARN_ON_USE (readlink, "readlink is unportable - "
1341 "use gnulib module readlink for portability");
1342 # endif
1343 #endif
1344
1345
1346 #if @GNULIB_READLINKAT@
1347 # if @REPLACE_READLINKAT@
1348 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1349 # define readlinkat rpl_readlinkat
1350 # endif
1351 _GL_FUNCDECL_RPL (readlinkat, ssize_t,
1352 (int fd, char const *file, char *buf, size_t len)
1353 _GL_ARG_NONNULL ((2, 3)));
1354 _GL_CXXALIAS_RPL (readlinkat, ssize_t,
1355 (int fd, char const *file, char *buf, size_t len));
1356 # else
1357 # if !@HAVE_READLINKAT@
1358 _GL_FUNCDECL_SYS (readlinkat, ssize_t,
1359 (int fd, char const *file, char *buf, size_t len)
1360 _GL_ARG_NONNULL ((2, 3)));
1361 # endif
1362 _GL_CXXALIAS_SYS (readlinkat, ssize_t,
1363 (int fd, char const *file, char *buf, size_t len));
1364 # endif
1365 _GL_CXXALIASWARN (readlinkat);
1366 #elif defined GNULIB_POSIXCHECK
1367 # undef readlinkat
1368 # if HAVE_RAW_DECL_READLINKAT
1369 _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
1370 "use gnulib module readlinkat for portability");
1371 # endif
1372 #endif
1373
1374
1375 #if @GNULIB_RMDIR@
1376 /* Remove the directory DIR. */
1377 # if @REPLACE_RMDIR@
1378 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1379 # define rmdir rpl_rmdir
1380 # endif
1381 _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1)));
1382 _GL_CXXALIAS_RPL (rmdir, int, (char const *name));
1383 # else
1384 _GL_CXXALIAS_SYS (rmdir, int, (char const *name));
1385 # endif
1386 _GL_CXXALIASWARN (rmdir);
1387 #elif defined GNULIB_POSIXCHECK
1388 # undef rmdir
1389 # if HAVE_RAW_DECL_RMDIR
1390 _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
1391 "use gnulib module rmdir for portability");
1392 # endif
1393 #endif
1394
1395
1396 #if @GNULIB_SETHOSTNAME@
1397 /* Set the host name of the machine.
1398 The host name may or may not be fully qualified.
1399
1400 Put LEN bytes of NAME into the host name.
1401 Return 0 if successful, otherwise, set errno and return -1.
1402
1403 Platforms with no ability to set the hostname return -1 and set
1404 errno = ENOSYS. */
1405 # if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
1406 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
1407 _GL_ARG_NONNULL ((1)));
1408 # endif
1409 /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
1410 and FreeBSD 6.4 the second parameter is int. On Solaris 11
1411 2011-10, the first parameter is not const. */
1412 _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
1413 _GL_CXXALIASWARN (sethostname);
1414 #elif defined GNULIB_POSIXCHECK
1415 # undef sethostname
1416 # if HAVE_RAW_DECL_SETHOSTNAME
1417 _GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
1418 "use gnulib module sethostname for portability");
1419 # endif
1420 #endif
1421
1422
1423 #if @GNULIB_SLEEP@
1424 /* Pause the execution of the current thread for N seconds.
1425 Returns the number of seconds left to sleep.
1426 See the POSIX:2008 specification
1427 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */
1428 # if @REPLACE_SLEEP@
1429 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1430 # undef sleep
1431 # define sleep rpl_sleep
1432 # endif
1433 _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n));
1434 _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n));
1435 # else
1436 # if !@HAVE_SLEEP@
1437 _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n));
1438 # endif
1439 _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n));
1440 # endif
1441 _GL_CXXALIASWARN (sleep);
1442 #elif defined GNULIB_POSIXCHECK
1443 # undef sleep
1444 # if HAVE_RAW_DECL_SLEEP
1445 _GL_WARN_ON_USE (sleep, "sleep is unportable - "
1446 "use gnulib module sleep for portability");
1447 # endif
1448 #endif
1449
1450
1451 #if @GNULIB_SYMLINK@
1452 # if @REPLACE_SYMLINK@
1453 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1454 # undef symlink
1455 # define symlink rpl_symlink
1456 # endif
1457 _GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file)
1458 _GL_ARG_NONNULL ((1, 2)));
1459 _GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file));
1460 # else
1461 # if !@HAVE_SYMLINK@
1462 _GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file)
1463 _GL_ARG_NONNULL ((1, 2)));
1464 # endif
1465 _GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file));
1466 # endif
1467 _GL_CXXALIASWARN (symlink);
1468 #elif defined GNULIB_POSIXCHECK
1469 # undef symlink
1470 # if HAVE_RAW_DECL_SYMLINK
1471 _GL_WARN_ON_USE (symlink, "symlink is not portable - "
1472 "use gnulib module symlink for portability");
1473 # endif
1474 #endif
1475
1476
1477 #if @GNULIB_SYMLINKAT@
1478 # if @REPLACE_SYMLINKAT@
1479 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1480 # undef symlinkat
1481 # define symlinkat rpl_symlinkat
1482 # endif
1483 _GL_FUNCDECL_RPL (symlinkat, int,
1484 (char const *contents, int fd, char const *file)
1485 _GL_ARG_NONNULL ((1, 3)));
1486 _GL_CXXALIAS_RPL (symlinkat, int,
1487 (char const *contents, int fd, char const *file));
1488 # else
1489 # if !@HAVE_SYMLINKAT@
1490 _GL_FUNCDECL_SYS (symlinkat, int,
1491 (char const *contents, int fd, char const *file)
1492 _GL_ARG_NONNULL ((1, 3)));
1493 # endif
1494 _GL_CXXALIAS_SYS (symlinkat, int,
1495 (char const *contents, int fd, char const *file));
1496 # endif
1497 _GL_CXXALIASWARN (symlinkat);
1498 #elif defined GNULIB_POSIXCHECK
1499 # undef symlinkat
1500 # if HAVE_RAW_DECL_SYMLINKAT
1501 _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
1502 "use gnulib module symlinkat for portability");
1503 # endif
1504 #endif
1505
1506
1507 #if @GNULIB_TRUNCATE@
1508 /* Change the size of the file designated by FILENAME to become equal to LENGTH.
1509 Return 0 if successful, otherwise -1 and errno set.
1510 See the POSIX:2008 specification
1511 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>. */
1512 # if @REPLACE_TRUNCATE@
1513 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1514 # undef truncate
1515 # define truncate rpl_truncate
1516 # endif
1517 _GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length)
1518 _GL_ARG_NONNULL ((1)));
1519 _GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length));
1520 # else
1521 # if !@HAVE_DECL_TRUNCATE@
1522 _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length)
1523 _GL_ARG_NONNULL ((1)));
1524 # endif
1525 _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length));
1526 # endif
1527 _GL_CXXALIASWARN (truncate);
1528 #elif defined GNULIB_POSIXCHECK
1529 # undef truncate
1530 # if HAVE_RAW_DECL_TRUNCATE
1531 _GL_WARN_ON_USE (truncate, "truncate is unportable - "
1532 "use gnulib module truncate for portability");
1533 # endif
1534 #endif
1535
1536
1537 #if @GNULIB_TTYNAME_R@
1538 /* Store at most BUFLEN characters of the pathname of the terminal FD is
1539 open on in BUF. Return 0 on success, otherwise an error number. */
1540 # if @REPLACE_TTYNAME_R@
1541 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1542 # undef ttyname_r
1543 # define ttyname_r rpl_ttyname_r
1544 # endif
1545 _GL_FUNCDECL_RPL (ttyname_r, int,
1546 (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
1547 _GL_CXXALIAS_RPL (ttyname_r, int,
1548 (int fd, char *buf, size_t buflen));
1549 # else
1550 # if !@HAVE_DECL_TTYNAME_R@
1551 _GL_FUNCDECL_SYS (ttyname_r, int,
1552 (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
1553 # endif
1554 _GL_CXXALIAS_SYS (ttyname_r, int,
1555 (int fd, char *buf, size_t buflen));
1556 # endif
1557 _GL_CXXALIASWARN (ttyname_r);
1558 #elif defined GNULIB_POSIXCHECK
1559 # undef ttyname_r
1560 # if HAVE_RAW_DECL_TTYNAME_R
1561 _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
1562 "use gnulib module ttyname_r for portability");
1563 # endif
1564 #endif
1565
1566
1567 #if @GNULIB_UNLINK@
1568 # if @REPLACE_UNLINK@
1569 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1570 # undef unlink
1571 # define unlink rpl_unlink
1572 # endif
1573 _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1)));
1574 _GL_CXXALIAS_RPL (unlink, int, (char const *file));
1575 # else
1576 _GL_CXXALIAS_SYS (unlink, int, (char const *file));
1577 # endif
1578 _GL_CXXALIASWARN (unlink);
1579 #elif defined GNULIB_POSIXCHECK
1580 # undef unlink
1581 # if HAVE_RAW_DECL_UNLINK
1582 _GL_WARN_ON_USE (unlink, "unlink is not portable - "
1583 "use gnulib module unlink for portability");
1584 # endif
1585 #endif
1586
1587
1588 #if @GNULIB_UNLINKAT@
1589 # if @REPLACE_UNLINKAT@
1590 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1591 # undef unlinkat
1592 # define unlinkat rpl_unlinkat
1593 # endif
1594 _GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag)
1595 _GL_ARG_NONNULL ((2)));
1596 _GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag));
1597 # else
1598 # if !@HAVE_UNLINKAT@
1599 _GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag)
1600 _GL_ARG_NONNULL ((2)));
1601 # endif
1602 _GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag));
1603 # endif
1604 _GL_CXXALIASWARN (unlinkat);
1605 #elif defined GNULIB_POSIXCHECK
1606 # undef unlinkat
1607 # if HAVE_RAW_DECL_UNLINKAT
1608 _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
1609 "use gnulib module openat for portability");
1610 # endif
1611 #endif
1612
1613
1614 #if @GNULIB_USLEEP@
1615 /* Pause the execution of the current thread for N microseconds.
1616 Returns 0 on completion, or -1 on range error.
1617 See the POSIX:2001 specification
1618 <http://www.opengroup.org/susv3xsh/usleep.html>. */
1619 # if @REPLACE_USLEEP@
1620 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1621 # undef usleep
1622 # define usleep rpl_usleep
1623 # endif
1624 _GL_FUNCDECL_RPL (usleep, int, (useconds_t n));
1625 _GL_CXXALIAS_RPL (usleep, int, (useconds_t n));
1626 # else
1627 # if !@HAVE_USLEEP@
1628 _GL_FUNCDECL_SYS (usleep, int, (useconds_t n));
1629 # endif
1630 _GL_CXXALIAS_SYS (usleep, int, (useconds_t n));
1631 # endif
1632 _GL_CXXALIASWARN (usleep);
1633 #elif defined GNULIB_POSIXCHECK
1634 # undef usleep
1635 # if HAVE_RAW_DECL_USLEEP
1636 _GL_WARN_ON_USE (usleep, "usleep is unportable - "
1637 "use gnulib module usleep for portability");
1638 # endif
1639 #endif
1640
1641
1642 #if @GNULIB_WRITE@
1643 /* Write up to COUNT bytes starting at BUF to file descriptor FD.
1644 See the POSIX:2008 specification
1645 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */
1646 # if @REPLACE_WRITE@
1647 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1648 # undef write
1649 # define write rpl_write
1650 # endif
1651 _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
1652 _GL_ARG_NONNULL ((2)));
1653 _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
1654 # else
1655 /* Need to cast, because on mingw, the third parameter is
1656 unsigned int count
1657 and the return type is 'int'. */
1658 _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
1659 # endif
1660 _GL_CXXALIASWARN (write);
1661 #endif
1662
1663 _GL_INLINE_HEADER_END
1664
1665 #endif /* _@GUARD_PREFIX@_UNISTD_H */
1666 #endif /* _GL_INCLUDING_UNISTD_H */
1667 #endif /* _@GUARD_PREFIX@_UNISTD_H */
0 /* A C macro for declaring that specific function parameters are not used.
1 Copyright (C) 2008-2018 Free Software Foundation, Inc.
2
3 This program is free software: you can redistribute it and/or modify it
4 under the terms of the GNU Lesser General Public License as published
5 by the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with this program. If not, see <https://www.gnu.org/licenses/>. */
15
16 /* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
17 declarations for parameters that are not used. This helps to reduce
18 warnings, such as from GCC -Wunused-parameter. The syntax is as follows:
19 type param _GL_UNUSED_PARAMETER
20 or more generally
21 param_decl _GL_UNUSED_PARAMETER
22 For example:
23 int param _GL_UNUSED_PARAMETER
24 int *(*param)(void) _GL_UNUSED_PARAMETER
25 Other possible, but obscure and discouraged syntaxes:
26 int _GL_UNUSED_PARAMETER *(*param)(void)
27 _GL_UNUSED_PARAMETER int *(*param)(void)
28 */
29 #ifndef _GL_UNUSED_PARAMETER
30 # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
31 # define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
32 # else
33 # define _GL_UNUSED_PARAMETER
34 # endif
35 #endif
0 /* A C macro for emitting warnings if a function is used.
1 Copyright (C) 2010-2018 Free Software Foundation, Inc.
2
3 This program is free software: you can redistribute it and/or modify it
4 under the terms of the GNU Lesser General Public License as published
5 by the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with this program. If not, see <https://www.gnu.org/licenses/>. */
15
16 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
17 for FUNCTION which will then trigger a compiler warning containing
18 the text of "literal string" anywhere that function is called, if
19 supported by the compiler. If the compiler does not support this
20 feature, the macro expands to an unused extern declaration.
21
22 _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
23 attribute used in _GL_WARN_ON_USE. If the compiler does not support
24 this feature, it expands to empty.
25
26 These macros are useful for marking a function as a potential
27 portability trap, with the intent that "literal string" include
28 instructions on the replacement function that should be used
29 instead.
30 _GL_WARN_ON_USE is for functions with 'extern' linkage.
31 _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
32 linkage.
33
34 However, one of the reasons that a function is a portability trap is
35 if it has the wrong signature. Declaring FUNCTION with a different
36 signature in C is a compilation error, so this macro must use the
37 same type as any existing declaration so that programs that avoid
38 the problematic FUNCTION do not fail to compile merely because they
39 included a header that poisoned the function. But this implies that
40 _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
41 have a declaration. Use of this macro implies that there must not
42 be any other macro hiding the declaration of FUNCTION; but
43 undefining FUNCTION first is part of the poisoning process anyway
44 (although for symbols that are provided only via a macro, the result
45 is a compilation error rather than a warning containing
46 "literal string"). Also note that in C++, it is only safe to use if
47 FUNCTION has no overloads.
48
49 For an example, it is possible to poison 'getline' by:
50 - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
51 [getline]) in configure.ac, which potentially defines
52 HAVE_RAW_DECL_GETLINE
53 - adding this code to a header that wraps the system <stdio.h>:
54 #undef getline
55 #if HAVE_RAW_DECL_GETLINE
56 _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
57 "not universally present; use the gnulib module getline");
58 #endif
59
60 It is not possible to directly poison global variables. But it is
61 possible to write a wrapper accessor function, and poison that
62 (less common usage, like &environ, will cause a compilation error
63 rather than issue the nice warning, but the end result of informing
64 the developer about their portability problem is still achieved):
65 #if HAVE_RAW_DECL_ENVIRON
66 static char ***
67 rpl_environ (void) { return &environ; }
68 _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
69 # undef environ
70 # define environ (*rpl_environ ())
71 #endif
72 or better (avoiding contradictory use of 'static' and 'extern'):
73 #if HAVE_RAW_DECL_ENVIRON
74 static char ***
75 _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
76 rpl_environ (void) { return &environ; }
77 # undef environ
78 # define environ (*rpl_environ ())
79 #endif
80 */
81 #ifndef _GL_WARN_ON_USE
82
83 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
84 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
85 # define _GL_WARN_ON_USE(function, message) \
86 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
87 # define _GL_WARN_ON_USE_ATTRIBUTE(message) \
88 __attribute__ ((__warning__ (message)))
89 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
90 /* Verify the existence of the function. */
91 # define _GL_WARN_ON_USE(function, message) \
92 extern __typeof__ (function) function
93 # define _GL_WARN_ON_USE_ATTRIBUTE(message)
94 # else /* Unsupported. */
95 # define _GL_WARN_ON_USE(function, message) \
96 _GL_WARN_EXTERN_C int _gl_warn_on_use
97 # define _GL_WARN_ON_USE_ATTRIBUTE(message)
98 # endif
99 #endif
100
101 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
102 is like _GL_WARN_ON_USE (function, "string"), except that the function is
103 declared with the given prototype, consisting of return type, parameters,
104 and attributes.
105 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
106 not work in this case. */
107 #ifndef _GL_WARN_ON_USE_CXX
108 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
109 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
110 extern rettype function parameters_and_attributes \
111 __attribute__ ((__warning__ (msg)))
112 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
113 /* Verify the existence of the function. */
114 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
115 extern rettype function parameters_and_attributes
116 # else /* Unsupported. */
117 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
118 _GL_WARN_EXTERN_C int _gl_warn_on_use
119 # endif
120 #endif
121
122 /* _GL_WARN_EXTERN_C declaration;
123 performs the declaration with C linkage. */
124 #ifndef _GL_WARN_EXTERN_C
125 # if defined __cplusplus
126 # define _GL_WARN_EXTERN_C extern "C"
127 # else
128 # define _GL_WARN_EXTERN_C extern
129 # endif
130 #endif
0 #! /bin/sh
1 ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
2 ## by inline-source v2014-01-03.01
3
4 # libtool (GNU libtool) 2.4.6
5 # Provide generalized library-building support services.
6 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7
8 # Copyright (C) 1996-2015 Free Software Foundation, Inc.
9 # This is free software; see the source for copying conditions. There is NO
10 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
12 # GNU Libtool is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # As a special exception to the GNU General Public License,
18 # if you distribute this file as part of a program or library that
19 # is built using GNU Libtool, you may include this file under the
20 # same distribution terms that you use for the rest of that program.
21 #
22 # GNU Libtool is distributed in the hope that it will be useful, but
23 # WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 # General Public License for more details.
26 #
27 # You should have received a copy of the GNU General Public License
28 # along with this program. If not, see <http://www.gnu.org/licenses/>.
29
30
31 PROGRAM=libtool
32 PACKAGE=libtool
33 VERSION="2.4.6 Debian-2.4.6-0.1"
34 package_revision=2.4.6
35
36
37 ## ------ ##
38 ## Usage. ##
39 ## ------ ##
40
41 # Run './libtool --help' for help with using this script from the
42 # command line.
43
44
45 ## ------------------------------- ##
46 ## User overridable command paths. ##
47 ## ------------------------------- ##
48
49 # After configure completes, it has a better idea of some of the
50 # shell tools we need than the defaults used by the functions shared
51 # with bootstrap, so set those here where they can still be over-
52 # ridden by the user, but otherwise take precedence.
53
54 : ${AUTOCONF="autoconf"}
55 : ${AUTOMAKE="automake"}
56
57
58 ## -------------------------- ##
59 ## Source external libraries. ##
60 ## -------------------------- ##
61
62 # Much of our low-level functionality needs to be sourced from external
63 # libraries, which are installed to $pkgauxdir.
64
65 # Set a version string for this script.
66 scriptversion=2015-01-20.17; # UTC
67
68 # General shell script boiler plate, and helper functions.
69 # Written by Gary V. Vaughan, 2004
70
71 # Copyright (C) 2004-2015 Free Software Foundation, Inc.
72 # This is free software; see the source for copying conditions. There is NO
73 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
74
75 # This program is free software; you can redistribute it and/or modify
76 # it under the terms of the GNU General Public License as published by
77 # the Free Software Foundation; either version 3 of the License, or
78 # (at your option) any later version.
79
80 # As a special exception to the GNU General Public License, if you distribute
81 # this file as part of a program or library that is built using GNU Libtool,
82 # you may include this file under the same distribution terms that you use
83 # for the rest of that program.
84
85 # This program is distributed in the hope that it will be useful,
86 # but WITHOUT ANY WARRANTY; without even the implied warranty of
87 # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
88 # General Public License for more details.
89
90 # You should have received a copy of the GNU General Public License
91 # along with this program. If not, see <http://www.gnu.org/licenses/>.
92
93 # Please report bugs or propose patches to gary@gnu.org.
94
95
96 ## ------ ##
97 ## Usage. ##
98 ## ------ ##
99
100 # Evaluate this file near the top of your script to gain access to
101 # the functions and variables defined here:
102 #
103 # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
104 #
105 # If you need to override any of the default environment variable
106 # settings, do that before evaluating this file.
107
108
109 ## -------------------- ##
110 ## Shell normalisation. ##
111 ## -------------------- ##
112
113 # Some shells need a little help to be as Bourne compatible as possible.
114 # Before doing anything else, make sure all that help has been provided!
115
116 DUALCASE=1; export DUALCASE # for MKS sh
117 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
118 emulate sh
119 NULLCMD=:
120 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
121 # is contrary to our usage. Disable this feature.
122 alias -g '${1+"$@"}'='"$@"'
123 setopt NO_GLOB_SUBST
124 else
125 case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
126 fi
127
128 # NLS nuisances: We save the old values in case they are required later.
129 _G_user_locale=
130 _G_safe_locale=
131 for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
132 do
133 eval "if test set = \"\${$_G_var+set}\"; then
134 save_$_G_var=\$$_G_var
135 $_G_var=C
136 export $_G_var
137 _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
138 _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
139 fi"
140 done
141
142 # CDPATH.
143 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
144
145 # Make sure IFS has a sensible default
146 sp=' '
147 nl='
148 '
149 IFS="$sp $nl"
150
151 # There are apparently some retarded systems that use ';' as a PATH separator!
152 if test "${PATH_SEPARATOR+set}" != set; then
153 PATH_SEPARATOR=:
154 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
155 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
156 PATH_SEPARATOR=';'
157 }
158 fi
159
160
161
162 ## ------------------------- ##
163 ## Locate command utilities. ##
164 ## ------------------------- ##
165
166
167 # func_executable_p FILE
168 # ----------------------
169 # Check that FILE is an executable regular file.
170 func_executable_p ()
171 {
172 test -f "$1" && test -x "$1"
173 }
174
175
176 # func_path_progs PROGS_LIST CHECK_FUNC [PATH]
177 # --------------------------------------------
178 # Search for either a program that responds to --version with output
179 # containing "GNU", or else returned by CHECK_FUNC otherwise, by
180 # trying all the directories in PATH with each of the elements of
181 # PROGS_LIST.
182 #
183 # CHECK_FUNC should accept the path to a candidate program, and
184 # set $func_check_prog_result if it truncates its output less than
185 # $_G_path_prog_max characters.
186 func_path_progs ()
187 {
188 _G_progs_list=$1
189 _G_check_func=$2
190 _G_PATH=${3-"$PATH"}
191
192 _G_path_prog_max=0
193 _G_path_prog_found=false
194 _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
195 for _G_dir in $_G_PATH; do
196 IFS=$_G_save_IFS
197 test -z "$_G_dir" && _G_dir=.
198 for _G_prog_name in $_G_progs_list; do
199 for _exeext in '' .EXE; do
200 _G_path_prog=$_G_dir/$_G_prog_name$_exeext
201 func_executable_p "$_G_path_prog" || continue
202 case `"$_G_path_prog" --version 2>&1` in
203 *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
204 *) $_G_check_func $_G_path_prog
205 func_path_progs_result=$func_check_prog_result
206 ;;
207 esac
208 $_G_path_prog_found && break 3
209 done
210 done
211 done
212 IFS=$_G_save_IFS
213 test -z "$func_path_progs_result" && {
214 echo "no acceptable sed could be found in \$PATH" >&2
215 exit 1
216 }
217 }
218
219
220 # We want to be able to use the functions in this file before configure
221 # has figured out where the best binaries are kept, which means we have
222 # to search for them ourselves - except when the results are already set
223 # where we skip the searches.
224
225 # Unless the user overrides by setting SED, search the path for either GNU
226 # sed, or the sed that truncates its output the least.
227 test -z "$SED" && {
228 _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
229 for _G_i in 1 2 3 4 5 6 7; do
230 _G_sed_script=$_G_sed_script$nl$_G_sed_script
231 done
232 echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
233 _G_sed_script=
234
235 func_check_prog_sed ()
236 {
237 _G_path_prog=$1
238
239 _G_count=0
240 printf 0123456789 >conftest.in
241 while :
242 do
243 cat conftest.in conftest.in >conftest.tmp
244 mv conftest.tmp conftest.in
245 cp conftest.in conftest.nl
246 echo '' >> conftest.nl
247 "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
248 diff conftest.out conftest.nl >/dev/null 2>&1 || break
249 _G_count=`expr $_G_count + 1`
250 if test "$_G_count" -gt "$_G_path_prog_max"; then
251 # Best one so far, save it but keep looking for a better one
252 func_check_prog_result=$_G_path_prog
253 _G_path_prog_max=$_G_count
254 fi
255 # 10*(2^10) chars as input seems more than enough
256 test 10 -lt "$_G_count" && break
257 done
258 rm -f conftest.in conftest.tmp conftest.nl conftest.out
259 }
260
261 func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
262 rm -f conftest.sed
263 SED=$func_path_progs_result
264 }
265
266
267 # Unless the user overrides by setting GREP, search the path for either GNU
268 # grep, or the grep that truncates its output the least.
269 test -z "$GREP" && {
270 func_check_prog_grep ()
271 {
272 _G_path_prog=$1
273
274 _G_count=0
275 _G_path_prog_max=0
276 printf 0123456789 >conftest.in
277 while :
278 do
279 cat conftest.in conftest.in >conftest.tmp
280 mv conftest.tmp conftest.in
281 cp conftest.in conftest.nl
282 echo 'GREP' >> conftest.nl
283 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
284 diff conftest.out conftest.nl >/dev/null 2>&1 || break
285 _G_count=`expr $_G_count + 1`
286 if test "$_G_count" -gt "$_G_path_prog_max"; then
287 # Best one so far, save it but keep looking for a better one
288 func_check_prog_result=$_G_path_prog
289 _G_path_prog_max=$_G_count
290 fi
291 # 10*(2^10) chars as input seems more than enough
292 test 10 -lt "$_G_count" && break
293 done
294 rm -f conftest.in conftest.tmp conftest.nl conftest.out
295 }
296
297 func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
298 GREP=$func_path_progs_result
299 }
300
301
302 ## ------------------------------- ##
303 ## User overridable command paths. ##
304 ## ------------------------------- ##
305
306 # All uppercase variable names are used for environment variables. These
307 # variables can be overridden by the user before calling a script that
308 # uses them if a suitable command of that name is not already available
309 # in the command search PATH.
310
311 : ${CP="cp -f"}
312 : ${ECHO="printf %s\n"}
313 : ${EGREP="$GREP -E"}
314 : ${FGREP="$GREP -F"}
315 : ${LN_S="ln -s"}
316 : ${MAKE="make"}
317 : ${MKDIR="mkdir"}
318 : ${MV="mv -f"}
319 : ${RM="rm -f"}
320 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
321
322
323 ## -------------------- ##
324 ## Useful sed snippets. ##
325 ## -------------------- ##
326
327 sed_dirname='s|/[^/]*$||'
328 sed_basename='s|^.*/||'
329
330 # Sed substitution that helps us do robust quoting. It backslashifies
331 # metacharacters that are still active within double-quoted strings.
332 sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
333
334 # Same as above, but do not quote variable references.
335 sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
336
337 # Sed substitution that turns a string into a regex matching for the
338 # string literally.
339 sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
340
341 # Sed substitution that converts a w32 file name or path
342 # that contains forward slashes, into one that contains
343 # (escaped) backslashes. A very naive implementation.
344 sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
345
346 # Re-'\' parameter expansions in output of sed_double_quote_subst that
347 # were '\'-ed in input to the same. If an odd number of '\' preceded a
348 # '$' in input to sed_double_quote_subst, that '$' was protected from
349 # expansion. Since each input '\' is now two '\'s, look for any number
350 # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
351 _G_bs='\\'
352 _G_bs2='\\\\'
353 _G_bs4='\\\\\\\\'
354 _G_dollar='\$'
355 sed_double_backslash="\
356 s/$_G_bs4/&\\
357 /g
358 s/^$_G_bs2$_G_dollar/$_G_bs&/
359 s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
360 s/\n//g"
361
362
363 ## ----------------- ##
364 ## Global variables. ##
365 ## ----------------- ##
366
367 # Except for the global variables explicitly listed below, the following
368 # functions in the '^func_' namespace, and the '^require_' namespace
369 # variables initialised in the 'Resource management' section, sourcing
370 # this file will not pollute your global namespace with anything
371 # else. There's no portable way to scope variables in Bourne shell
372 # though, so actually running these functions will sometimes place
373 # results into a variable named after the function, and often use
374 # temporary variables in the '^_G_' namespace. If you are careful to
375 # avoid using those namespaces casually in your sourcing script, things
376 # should continue to work as you expect. And, of course, you can freely
377 # overwrite any of the functions or variables defined here before
378 # calling anything to customize them.
379
380 EXIT_SUCCESS=0
381 EXIT_FAILURE=1
382 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
383 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
384
385 # Allow overriding, eg assuming that you follow the convention of
386 # putting '$debug_cmd' at the start of all your functions, you can get
387 # bash to show function call trace with:
388 #
389 # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
390 debug_cmd=${debug_cmd-":"}
391 exit_cmd=:
392
393 # By convention, finish your script with:
394 #
395 # exit $exit_status
396 #
397 # so that you can set exit_status to non-zero if you want to indicate
398 # something went wrong during execution without actually bailing out at
399 # the point of failure.
400 exit_status=$EXIT_SUCCESS
401
402 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
403 # is ksh but when the shell is invoked as "sh" and the current value of
404 # the _XPG environment variable is not equal to 1 (one), the special
405 # positional parameter $0, within a function call, is the name of the
406 # function.
407 progpath=$0
408
409 # The name of this program.
410 progname=`$ECHO "$progpath" |$SED "$sed_basename"`
411
412 # Make sure we have an absolute progpath for reexecution:
413 case $progpath in
414 [\\/]*|[A-Za-z]:\\*) ;;
415 *[\\/]*)
416 progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
417 progdir=`cd "$progdir" && pwd`
418 progpath=$progdir/$progname
419 ;;
420 *)
421 _G_IFS=$IFS
422 IFS=${PATH_SEPARATOR-:}
423 for progdir in $PATH; do
424 IFS=$_G_IFS
425 test -x "$progdir/$progname" && break
426 done
427 IFS=$_G_IFS
428 test -n "$progdir" || progdir=`pwd`
429 progpath=$progdir/$progname
430 ;;
431 esac
432
433
434 ## ----------------- ##
435 ## Standard options. ##
436 ## ----------------- ##
437
438 # The following options affect the operation of the functions defined
439 # below, and should be set appropriately depending on run-time para-
440 # meters passed on the command line.
441
442 opt_dry_run=false
443 opt_quiet=false
444 opt_verbose=false
445
446 # Categories 'all' and 'none' are always available. Append any others
447 # you will pass as the first argument to func_warning from your own
448 # code.
449 warning_categories=
450
451 # By default, display warnings according to 'opt_warning_types'. Set
452 # 'warning_func' to ':' to elide all warnings, or func_fatal_error to
453 # treat the next displayed warning as a fatal error.
454 warning_func=func_warn_and_continue
455
456 # Set to 'all' to display all warnings, 'none' to suppress all
457 # warnings, or a space delimited list of some subset of
458 # 'warning_categories' to display only the listed warnings.
459 opt_warning_types=all
460
461
462 ## -------------------- ##
463 ## Resource management. ##
464 ## -------------------- ##
465
466 # This section contains definitions for functions that each ensure a
467 # particular resource (a file, or a non-empty configuration variable for
468 # example) is available, and if appropriate to extract default values
469 # from pertinent package files. Call them using their associated
470 # 'require_*' variable to ensure that they are executed, at most, once.
471 #
472 # It's entirely deliberate that calling these functions can set
473 # variables that don't obey the namespace limitations obeyed by the rest
474 # of this file, in order that that they be as useful as possible to
475 # callers.
476
477
478 # require_term_colors
479 # -------------------
480 # Allow display of bold text on terminals that support it.
481 require_term_colors=func_require_term_colors
482 func_require_term_colors ()
483 {
484 $debug_cmd
485
486 test -t 1 && {
487 # COLORTERM and USE_ANSI_COLORS environment variables take
488 # precedence, because most terminfo databases neglect to describe
489 # whether color sequences are supported.
490 test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
491
492 if test 1 = "$USE_ANSI_COLORS"; then
493 # Standard ANSI escape sequences
494 tc_reset=''
495 tc_bold=''; tc_standout=''
496 tc_red=''; tc_green=''
497 tc_blue=''; tc_cyan=''
498 else
499 # Otherwise trust the terminfo database after all.
500 test -n "`tput sgr0 2>/dev/null`" && {
501 tc_reset=`tput sgr0`
502 test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
503 tc_standout=$tc_bold
504 test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
505 test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
506 test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
507 test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
508 test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
509 }
510 fi
511 }
512
513 require_term_colors=:
514 }
515
516
517 ## ----------------- ##
518 ## Function library. ##
519 ## ----------------- ##
520
521 # This section contains a variety of useful functions to call in your
522 # scripts. Take note of the portable wrappers for features provided by
523 # some modern shells, which will fall back to slower equivalents on
524 # less featureful shells.
525
526
527 # func_append VAR VALUE
528 # ---------------------
529 # Append VALUE onto the existing contents of VAR.
530
531 # We should try to minimise forks, especially on Windows where they are
532 # unreasonably slow, so skip the feature probes when bash or zsh are
533 # being used:
534 if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
535 : ${_G_HAVE_ARITH_OP="yes"}
536 : ${_G_HAVE_XSI_OPS="yes"}
537 # The += operator was introduced in bash 3.1
538 case $BASH_VERSION in
539 [12].* | 3.0 | 3.0*) ;;
540 *)
541 : ${_G_HAVE_PLUSEQ_OP="yes"}
542 ;;
543 esac
544 fi
545
546 # _G_HAVE_PLUSEQ_OP
547 # Can be empty, in which case the shell is probed, "yes" if += is
548 # useable or anything else if it does not work.
549 test -z "$_G_HAVE_PLUSEQ_OP" \
550 && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
551 && _G_HAVE_PLUSEQ_OP=yes
552
553 if test yes = "$_G_HAVE_PLUSEQ_OP"
554 then
555 # This is an XSI compatible shell, allowing a faster implementation...
556 eval 'func_append ()
557 {
558 $debug_cmd
559
560 eval "$1+=\$2"
561 }'
562 else
563 # ...otherwise fall back to using expr, which is often a shell builtin.
564 func_append ()
565 {
566 $debug_cmd
567
568 eval "$1=\$$1\$2"
569 }
570 fi
571
572
573 # func_append_quoted VAR VALUE
574 # ----------------------------
575 # Quote VALUE and append to the end of shell variable VAR, separated
576 # by a space.
577 if test yes = "$_G_HAVE_PLUSEQ_OP"; then
578 eval 'func_append_quoted ()
579 {
580 $debug_cmd
581
582 func_quote_for_eval "$2"
583 eval "$1+=\\ \$func_quote_for_eval_result"
584 }'
585 else
586 func_append_quoted ()
587 {
588 $debug_cmd
589
590 func_quote_for_eval "$2"
591 eval "$1=\$$1\\ \$func_quote_for_eval_result"
592 }
593 fi
594
595
596 # func_append_uniq VAR VALUE
597 # --------------------------
598 # Append unique VALUE onto the existing contents of VAR, assuming
599 # entries are delimited by the first character of VALUE. For example:
600 #
601 # func_append_uniq options " --another-option option-argument"
602 #
603 # will only append to $options if " --another-option option-argument "
604 # is not already present somewhere in $options already (note spaces at
605 # each end implied by leading space in second argument).
606 func_append_uniq ()
607 {
608 $debug_cmd
609
610 eval _G_current_value='`$ECHO $'$1'`'
611 _G_delim=`expr "$2" : '\(.\)'`
612
613 case $_G_delim$_G_current_value$_G_delim in
614 *"$2$_G_delim"*) ;;
615 *) func_append "$@" ;;
616 esac
617 }
618
619
620 # func_arith TERM...
621 # ------------------
622 # Set func_arith_result to the result of evaluating TERMs.
623 test -z "$_G_HAVE_ARITH_OP" \
624 && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
625 && _G_HAVE_ARITH_OP=yes
626
627 if test yes = "$_G_HAVE_ARITH_OP"; then
628 eval 'func_arith ()
629 {
630 $debug_cmd
631
632 func_arith_result=$(( $* ))
633 }'
634 else
635 func_arith ()
636 {
637 $debug_cmd
638
639 func_arith_result=`expr "$@"`
640 }
641 fi
642
643
644 # func_basename FILE
645 # ------------------
646 # Set func_basename_result to FILE with everything up to and including
647 # the last / stripped.
648 if test yes = "$_G_HAVE_XSI_OPS"; then
649 # If this shell supports suffix pattern removal, then use it to avoid
650 # forking. Hide the definitions single quotes in case the shell chokes
651 # on unsupported syntax...
652 _b='func_basename_result=${1##*/}'
653 _d='case $1 in
654 */*) func_dirname_result=${1%/*}$2 ;;
655 * ) func_dirname_result=$3 ;;
656 esac'
657
658 else
659 # ...otherwise fall back to using sed.
660 _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
661 _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
662 if test "X$func_dirname_result" = "X$1"; then
663 func_dirname_result=$3
664 else
665 func_append func_dirname_result "$2"
666 fi'
667 fi
668
669 eval 'func_basename ()
670 {
671 $debug_cmd
672
673 '"$_b"'
674 }'
675
676
677 # func_dirname FILE APPEND NONDIR_REPLACEMENT
678 # -------------------------------------------
679 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
680 # otherwise set result to NONDIR_REPLACEMENT.
681 eval 'func_dirname ()
682 {
683 $debug_cmd
684
685 '"$_d"'
686 }'
687
688
689 # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
690 # --------------------------------------------------------
691 # Perform func_basename and func_dirname in a single function
692 # call:
693 # dirname: Compute the dirname of FILE. If nonempty,
694 # add APPEND to the result, otherwise set result
695 # to NONDIR_REPLACEMENT.
696 # value returned in "$func_dirname_result"
697 # basename: Compute filename of FILE.
698 # value retuned in "$func_basename_result"
699 # For efficiency, we do not delegate to the functions above but instead
700 # duplicate the functionality here.
701 eval 'func_dirname_and_basename ()
702 {
703 $debug_cmd
704
705 '"$_b"'
706 '"$_d"'
707 }'
708
709
710 # func_echo ARG...
711 # ----------------
712 # Echo program name prefixed message.
713 func_echo ()
714 {
715 $debug_cmd
716
717 _G_message=$*
718
719 func_echo_IFS=$IFS
720 IFS=$nl
721 for _G_line in $_G_message; do
722 IFS=$func_echo_IFS
723 $ECHO "$progname: $_G_line"
724 done
725 IFS=$func_echo_IFS
726 }
727
728
729 # func_echo_all ARG...
730 # --------------------
731 # Invoke $ECHO with all args, space-separated.
732 func_echo_all ()
733 {
734 $ECHO "$*"
735 }
736
737
738 # func_echo_infix_1 INFIX ARG...
739 # ------------------------------
740 # Echo program name, followed by INFIX on the first line, with any
741 # additional lines not showing INFIX.
742 func_echo_infix_1 ()
743 {
744 $debug_cmd
745
746 $require_term_colors
747
748 _G_infix=$1; shift
749 _G_indent=$_G_infix
750 _G_prefix="$progname: $_G_infix: "
751 _G_message=$*
752
753 # Strip color escape sequences before counting printable length
754 for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
755 do
756 test -n "$_G_tc" && {
757 _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
758 _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
759 }
760 done
761 _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
762
763 func_echo_infix_1_IFS=$IFS
764 IFS=$nl
765 for _G_line in $_G_message; do
766 IFS=$func_echo_infix_1_IFS
767 $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
768 _G_prefix=$_G_indent
769 done
770 IFS=$func_echo_infix_1_IFS
771 }
772
773
774 # func_error ARG...
775 # -----------------
776 # Echo program name prefixed message to standard error.
777 func_error ()
778 {
779 $debug_cmd
780
781 $require_term_colors
782
783 func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
784 }
785
786
787 # func_fatal_error ARG...
788 # -----------------------
789 # Echo program name prefixed message to standard error, and exit.
790 func_fatal_error ()
791 {
792 $debug_cmd
793
794 func_error "$*"
795 exit $EXIT_FAILURE
796 }
797
798
799 # func_grep EXPRESSION FILENAME
800 # -----------------------------
801 # Check whether EXPRESSION matches any line of FILENAME, without output.
802 func_grep ()
803 {
804 $debug_cmd
805
806 $GREP "$1" "$2" >/dev/null 2>&1
807 }
808
809
810 # func_len STRING
811 # ---------------
812 # Set func_len_result to the length of STRING. STRING may not
813 # start with a hyphen.
814 test -z "$_G_HAVE_XSI_OPS" \
815 && (eval 'x=a/b/c;
816 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
817 && _G_HAVE_XSI_OPS=yes
818
819 if test yes = "$_G_HAVE_XSI_OPS"; then
820 eval 'func_len ()
821 {
822 $debug_cmd
823
824 func_len_result=${#1}
825 }'
826 else
827 func_len ()
828 {
829 $debug_cmd
830
831 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
832 }
833 fi
834
835
836 # func_mkdir_p DIRECTORY-PATH
837 # ---------------------------
838 # Make sure the entire path to DIRECTORY-PATH is available.
839 func_mkdir_p ()
840 {
841 $debug_cmd
842
843 _G_directory_path=$1
844 _G_dir_list=
845
846 if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
847
848 # Protect directory names starting with '-'
849 case $_G_directory_path in
850 -*) _G_directory_path=./$_G_directory_path ;;
851 esac
852
853 # While some portion of DIR does not yet exist...
854 while test ! -d "$_G_directory_path"; do
855 # ...make a list in topmost first order. Use a colon delimited
856 # list incase some portion of path contains whitespace.
857 _G_dir_list=$_G_directory_path:$_G_dir_list
858
859 # If the last portion added has no slash in it, the list is done
860 case $_G_directory_path in */*) ;; *) break ;; esac
861
862 # ...otherwise throw away the child directory and loop
863 _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
864 done
865 _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
866
867 func_mkdir_p_IFS=$IFS; IFS=:
868 for _G_dir in $_G_dir_list; do
869 IFS=$func_mkdir_p_IFS
870 # mkdir can fail with a 'File exist' error if two processes
871 # try to create one of the directories concurrently. Don't
872 # stop in that case!
873 $MKDIR "$_G_dir" 2>/dev/null || :
874 done
875 IFS=$func_mkdir_p_IFS
876
877 # Bail out if we (or some other process) failed to create a directory.
878 test -d "$_G_directory_path" || \
879 func_fatal_error "Failed to create '$1'"
880 fi
881 }
882
883
884 # func_mktempdir [BASENAME]
885 # -------------------------
886 # Make a temporary directory that won't clash with other running
887 # libtool processes, and avoids race conditions if possible. If
888 # given, BASENAME is the basename for that directory.
889 func_mktempdir ()
890 {
891 $debug_cmd
892
893 _G_template=${TMPDIR-/tmp}/${1-$progname}
894
895 if test : = "$opt_dry_run"; then
896 # Return a directory name, but don't create it in dry-run mode
897 _G_tmpdir=$_G_template-$$
898 else
899
900 # If mktemp works, use that first and foremost
901 _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
902
903 if test ! -d "$_G_tmpdir"; then
904 # Failing that, at least try and use $RANDOM to avoid a race
905 _G_tmpdir=$_G_template-${RANDOM-0}$$
906
907 func_mktempdir_umask=`umask`
908 umask 0077
909 $MKDIR "$_G_tmpdir"
910 umask $func_mktempdir_umask
911 fi
912
913 # If we're not in dry-run mode, bomb out on failure
914 test -d "$_G_tmpdir" || \
915 func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
916 fi
917
918 $ECHO "$_G_tmpdir"
919 }
920
921
922 # func_normal_abspath PATH
923 # ------------------------
924 # Remove doubled-up and trailing slashes, "." path components,
925 # and cancel out any ".." path components in PATH after making
926 # it an absolute path.
927 func_normal_abspath ()
928 {
929 $debug_cmd
930
931 # These SED scripts presuppose an absolute path with a trailing slash.
932 _G_pathcar='s|^/\([^/]*\).*$|\1|'
933 _G_pathcdr='s|^/[^/]*||'
934 _G_removedotparts=':dotsl
935 s|/\./|/|g
936 t dotsl
937 s|/\.$|/|'
938 _G_collapseslashes='s|/\{1,\}|/|g'
939 _G_finalslash='s|/*$|/|'
940
941 # Start from root dir and reassemble the path.
942 func_normal_abspath_result=
943 func_normal_abspath_tpath=$1
944 func_normal_abspath_altnamespace=
945 case $func_normal_abspath_tpath in
946 "")
947 # Empty path, that just means $cwd.
948 func_stripname '' '/' "`pwd`"
949 func_normal_abspath_result=$func_stripname_result
950 return
951 ;;
952 # The next three entries are used to spot a run of precisely
953 # two leading slashes without using negated character classes;
954 # we take advantage of case's first-match behaviour.
955 ///*)
956 # Unusual form of absolute path, do nothing.
957 ;;
958 //*)
959 # Not necessarily an ordinary path; POSIX reserves leading '//'
960 # and for example Cygwin uses it to access remote file shares
961 # over CIFS/SMB, so we conserve a leading double slash if found.
962 func_normal_abspath_altnamespace=/
963 ;;
964 /*)
965 # Absolute path, do nothing.
966 ;;
967 *)
968 # Relative path, prepend $cwd.
969 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
970 ;;
971 esac
972
973 # Cancel out all the simple stuff to save iterations. We also want
974 # the path to end with a slash for ease of parsing, so make sure
975 # there is one (and only one) here.
976 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
977 -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
978 while :; do
979 # Processed it all yet?
980 if test / = "$func_normal_abspath_tpath"; then
981 # If we ascended to the root using ".." the result may be empty now.
982 if test -z "$func_normal_abspath_result"; then
983 func_normal_abspath_result=/
984 fi
985 break
986 fi
987 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
988 -e "$_G_pathcar"`
989 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
990 -e "$_G_pathcdr"`
991 # Figure out what to do with it
992 case $func_normal_abspath_tcomponent in
993 "")
994 # Trailing empty path component, ignore it.
995 ;;
996 ..)
997 # Parent dir; strip last assembled component from result.
998 func_dirname "$func_normal_abspath_result"
999 func_normal_abspath_result=$func_dirname_result
1000 ;;
1001 *)
1002 # Actual path component, append it.
1003 func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
1004 ;;
1005 esac
1006 done
1007 # Restore leading double-slash if one was found on entry.
1008 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
1009 }
1010
1011
1012 # func_notquiet ARG...
1013 # --------------------
1014 # Echo program name prefixed message only when not in quiet mode.
1015 func_notquiet ()
1016 {
1017 $debug_cmd
1018
1019 $opt_quiet || func_echo ${1+"$@"}
1020
1021 # A bug in bash halts the script if the last line of a function
1022 # fails when set -e is in force, so we need another command to
1023 # work around that:
1024 :
1025 }
1026
1027
1028 # func_relative_path SRCDIR DSTDIR
1029 # --------------------------------
1030 # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
1031 func_relative_path ()
1032 {
1033 $debug_cmd
1034
1035 func_relative_path_result=
1036 func_normal_abspath "$1"
1037 func_relative_path_tlibdir=$func_normal_abspath_result
1038 func_normal_abspath "$2"
1039 func_relative_path_tbindir=$func_normal_abspath_result
1040
1041 # Ascend the tree starting from libdir
1042 while :; do
1043 # check if we have found a prefix of bindir
1044 case $func_relative_path_tbindir in
1045 $func_relative_path_tlibdir)
1046 # found an exact match
1047 func_relative_path_tcancelled=
1048 break
1049 ;;
1050 $func_relative_path_tlibdir*)
1051 # found a matching prefix
1052 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
1053 func_relative_path_tcancelled=$func_stripname_result
1054 if test -z "$func_relative_path_result"; then
1055 func_relative_path_result=.
1056 fi
1057 break
1058 ;;
1059 *)
1060 func_dirname $func_relative_path_tlibdir
1061 func_relative_path_tlibdir=$func_dirname_result
1062 if test -z "$func_relative_path_tlibdir"; then
1063 # Have to descend all the way to the root!
1064 func_relative_path_result=../$func_relative_path_result
1065 func_relative_path_tcancelled=$func_relative_path_tbindir
1066 break
1067 fi
1068 func_relative_path_result=../$func_relative_path_result
1069 ;;
1070 esac
1071 done
1072
1073 # Now calculate path; take care to avoid doubling-up slashes.
1074 func_stripname '' '/' "$func_relative_path_result"
1075 func_relative_path_result=$func_stripname_result
1076 func_stripname '/' '/' "$func_relative_path_tcancelled"
1077 if test -n "$func_stripname_result"; then
1078 func_append func_relative_path_result "/$func_stripname_result"
1079 fi
1080
1081 # Normalisation. If bindir is libdir, return '.' else relative path.
1082 if test -n "$func_relative_path_result"; then
1083 func_stripname './' '' "$func_relative_path_result"
1084 func_relative_path_result=$func_stripname_result
1085 fi
1086
1087 test -n "$func_relative_path_result" || func_relative_path_result=.
1088
1089 :
1090 }
1091
1092
1093 # func_quote_for_eval ARG...
1094 # --------------------------
1095 # Aesthetically quote ARGs to be evaled later.
1096 # This function returns two values:
1097 # i) func_quote_for_eval_result
1098 # double-quoted, suitable for a subsequent eval
1099 # ii) func_quote_for_eval_unquoted_result
1100 # has all characters that are still active within double
1101 # quotes backslashified.
1102 func_quote_for_eval ()
1103 {
1104 $debug_cmd
1105
1106 func_quote_for_eval_unquoted_result=
1107 func_quote_for_eval_result=
1108 while test 0 -lt $#; do
1109 case $1 in
1110 *[\\\`\"\$]*)
1111 _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
1112 *)
1113 _G_unquoted_arg=$1 ;;
1114 esac
1115 if test -n "$func_quote_for_eval_unquoted_result"; then
1116 func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
1117 else
1118 func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
1119 fi
1120
1121 case $_G_unquoted_arg in
1122 # Double-quote args containing shell metacharacters to delay
1123 # word splitting, command substitution and variable expansion
1124 # for a subsequent eval.
1125 # Many Bourne shells cannot handle close brackets correctly
1126 # in scan sets, so we specify it separately.
1127 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1128 _G_quoted_arg=\"$_G_unquoted_arg\"
1129 ;;
1130 *)
1131 _G_quoted_arg=$_G_unquoted_arg
1132 ;;
1133 esac
1134
1135 if test -n "$func_quote_for_eval_result"; then
1136 func_append func_quote_for_eval_result " $_G_quoted_arg"
1137 else
1138 func_append func_quote_for_eval_result "$_G_quoted_arg"
1139 fi
1140 shift
1141 done
1142 }
1143
1144
1145 # func_quote_for_expand ARG
1146 # -------------------------
1147 # Aesthetically quote ARG to be evaled later; same as above,
1148 # but do not quote variable references.
1149 func_quote_for_expand ()
1150 {
1151 $debug_cmd
1152
1153 case $1 in
1154 *[\\\`\"]*)
1155 _G_arg=`$ECHO "$1" | $SED \
1156 -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
1157 *)
1158 _G_arg=$1 ;;
1159 esac
1160
1161 case $_G_arg in
1162 # Double-quote args containing shell metacharacters to delay
1163 # word splitting and command substitution for a subsequent eval.
1164 # Many Bourne shells cannot handle close brackets correctly
1165 # in scan sets, so we specify it separately.
1166 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1167 _G_arg=\"$_G_arg\"
1168 ;;
1169 esac
1170
1171 func_quote_for_expand_result=$_G_arg
1172 }
1173
1174
1175 # func_stripname PREFIX SUFFIX NAME
1176 # ---------------------------------
1177 # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
1178 # PREFIX and SUFFIX must not contain globbing or regex special
1179 # characters, hashes, percent signs, but SUFFIX may contain a leading
1180 # dot (in which case that matches only a dot).
1181 if test yes = "$_G_HAVE_XSI_OPS"; then
1182 eval 'func_stripname ()
1183 {
1184 $debug_cmd
1185
1186 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1187 # positional parameters, so assign one to ordinary variable first.
1188 func_stripname_result=$3
1189 func_stripname_result=${func_stripname_result#"$1"}
1190 func_stripname_result=${func_stripname_result%"$2"}
1191 }'
1192 else
1193 func_stripname ()
1194 {
1195 $debug_cmd
1196
1197 case $2 in
1198 .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
1199 *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
1200 esac
1201 }
1202 fi
1203
1204
1205 # func_show_eval CMD [FAIL_EXP]
1206 # -----------------------------
1207 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1208 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1209 # is given, then evaluate it.
1210 func_show_eval ()
1211 {
1212 $debug_cmd
1213
1214 _G_cmd=$1
1215 _G_fail_exp=${2-':'}
1216
1217 func_quote_for_expand "$_G_cmd"
1218 eval "func_notquiet $func_quote_for_expand_result"
1219
1220 $opt_dry_run || {
1221 eval "$_G_cmd"
1222 _G_status=$?
1223 if test 0 -ne "$_G_status"; then
1224 eval "(exit $_G_status); $_G_fail_exp"
1225 fi
1226 }
1227 }
1228
1229
1230 # func_show_eval_locale CMD [FAIL_EXP]
1231 # ------------------------------------
1232 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1233 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1234 # is given, then evaluate it. Use the saved locale for evaluation.
1235 func_show_eval_locale ()
1236 {
1237 $debug_cmd
1238
1239 _G_cmd=$1
1240 _G_fail_exp=${2-':'}
1241
1242 $opt_quiet || {
1243 func_quote_for_expand "$_G_cmd"
1244 eval "func_echo $func_quote_for_expand_result"
1245 }
1246
1247 $opt_dry_run || {
1248 eval "$_G_user_locale
1249 $_G_cmd"
1250 _G_status=$?
1251 eval "$_G_safe_locale"
1252 if test 0 -ne "$_G_status"; then
1253 eval "(exit $_G_status); $_G_fail_exp"
1254 fi
1255 }
1256 }
1257
1258
1259 # func_tr_sh
1260 # ----------
1261 # Turn $1 into a string suitable for a shell variable name.
1262 # Result is stored in $func_tr_sh_result. All characters
1263 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
1264 # if $1 begins with a digit, a '_' is prepended as well.
1265 func_tr_sh ()
1266 {
1267 $debug_cmd
1268
1269 case $1 in
1270 [0-9]* | *[!a-zA-Z0-9_]*)
1271 func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
1272 ;;
1273 * )
1274 func_tr_sh_result=$1
1275 ;;
1276 esac
1277 }
1278
1279
1280 # func_verbose ARG...
1281 # -------------------
1282 # Echo program name prefixed message in verbose mode only.
1283 func_verbose ()
1284 {
1285 $debug_cmd
1286
1287 $opt_verbose && func_echo "$*"
1288
1289 :
1290 }
1291
1292
1293 # func_warn_and_continue ARG...
1294 # -----------------------------
1295 # Echo program name prefixed warning message to standard error.
1296 func_warn_and_continue ()
1297 {
1298 $debug_cmd
1299
1300 $require_term_colors
1301
1302 func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
1303 }
1304
1305
1306 # func_warning CATEGORY ARG...
1307 # ----------------------------
1308 # Echo program name prefixed warning message to standard error. Warning
1309 # messages can be filtered according to CATEGORY, where this function
1310 # elides messages where CATEGORY is not listed in the global variable
1311 # 'opt_warning_types'.
1312 func_warning ()
1313 {
1314 $debug_cmd
1315
1316 # CATEGORY must be in the warning_categories list!
1317 case " $warning_categories " in
1318 *" $1 "*) ;;
1319 *) func_internal_error "invalid warning category '$1'" ;;
1320 esac
1321
1322 _G_category=$1
1323 shift
1324
1325 case " $opt_warning_types " in
1326 *" $_G_category "*) $warning_func ${1+"$@"} ;;
1327 esac
1328 }
1329
1330
1331 # func_sort_ver VER1 VER2
1332 # -----------------------
1333 # 'sort -V' is not generally available.
1334 # Note this deviates from the version comparison in automake
1335 # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
1336 # but this should suffice as we won't be specifying old
1337 # version formats or redundant trailing .0 in bootstrap.conf.
1338 # If we did want full compatibility then we should probably
1339 # use m4_version_compare from autoconf.
1340 func_sort_ver ()
1341 {
1342 $debug_cmd
1343
1344 printf '%s\n%s\n' "$1" "$2" \
1345 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
1346 }
1347
1348 # func_lt_ver PREV CURR
1349 # ---------------------
1350 # Return true if PREV and CURR are in the correct order according to
1351 # func_sort_ver, otherwise false. Use it like this:
1352 #
1353 # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
1354 func_lt_ver ()
1355 {
1356 $debug_cmd
1357
1358 test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
1359 }
1360
1361
1362 # Local variables:
1363 # mode: shell-script
1364 # sh-indentation: 2
1365 # eval: (add-hook 'before-save-hook 'time-stamp)
1366 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1367 # time-stamp-time-zone: "UTC"
1368 # End:
1369 #! /bin/sh
1370
1371 # Set a version string for this script.
1372 scriptversion=2014-01-07.03; # UTC
1373
1374 # A portable, pluggable option parser for Bourne shell.
1375 # Written by Gary V. Vaughan, 2010
1376
1377 # Copyright (C) 2010-2015 Free Software Foundation, Inc.
1378 # This is free software; see the source for copying conditions. There is NO
1379 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1380
1381 # This program is free software: you can redistribute it and/or modify
1382 # it under the terms of the GNU General Public License as published by
1383 # the Free Software Foundation, either version 3 of the License, or
1384 # (at your option) any later version.
1385
1386 # This program is distributed in the hope that it will be useful,
1387 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1388 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1389 # GNU General Public License for more details.
1390
1391 # You should have received a copy of the GNU General Public License
1392 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1393
1394 # Please report bugs or propose patches to gary@gnu.org.
1395
1396
1397 ## ------ ##
1398 ## Usage. ##
1399 ## ------ ##
1400
1401 # This file is a library for parsing options in your shell scripts along
1402 # with assorted other useful supporting features that you can make use
1403 # of too.
1404 #
1405 # For the simplest scripts you might need only:
1406 #
1407 # #!/bin/sh
1408 # . relative/path/to/funclib.sh
1409 # . relative/path/to/options-parser
1410 # scriptversion=1.0
1411 # func_options ${1+"$@"}
1412 # eval set dummy "$func_options_result"; shift
1413 # ...rest of your script...
1414 #
1415 # In order for the '--version' option to work, you will need to have a
1416 # suitably formatted comment like the one at the top of this file
1417 # starting with '# Written by ' and ending with '# warranty; '.
1418 #
1419 # For '-h' and '--help' to work, you will also need a one line
1420 # description of your script's purpose in a comment directly above the
1421 # '# Written by ' line, like the one at the top of this file.
1422 #
1423 # The default options also support '--debug', which will turn on shell
1424 # execution tracing (see the comment above debug_cmd below for another
1425 # use), and '--verbose' and the func_verbose function to allow your script
1426 # to display verbose messages only when your user has specified
1427 # '--verbose'.
1428 #
1429 # After sourcing this file, you can plug processing for additional
1430 # options by amending the variables from the 'Configuration' section
1431 # below, and following the instructions in the 'Option parsing'
1432 # section further down.
1433
1434 ## -------------- ##
1435 ## Configuration. ##
1436 ## -------------- ##
1437
1438 # You should override these variables in your script after sourcing this
1439 # file so that they reflect the customisations you have added to the
1440 # option parser.
1441
1442 # The usage line for option parsing errors and the start of '-h' and
1443 # '--help' output messages. You can embed shell variables for delayed
1444 # expansion at the time the message is displayed, but you will need to
1445 # quote other shell meta-characters carefully to prevent them being
1446 # expanded when the contents are evaled.
1447 usage='$progpath [OPTION]...'
1448
1449 # Short help message in response to '-h' and '--help'. Add to this or
1450 # override it after sourcing this library to reflect the full set of
1451 # options your script accepts.
1452 usage_message="\
1453 --debug enable verbose shell tracing
1454 -W, --warnings=CATEGORY
1455 report the warnings falling in CATEGORY [all]
1456 -v, --verbose verbosely report processing
1457 --version print version information and exit
1458 -h, --help print short or long help message and exit
1459 "
1460
1461 # Additional text appended to 'usage_message' in response to '--help'.
1462 long_help_message="
1463 Warning categories include:
1464 'all' show all warnings
1465 'none' turn off all the warnings
1466 'error' warnings are treated as fatal errors"
1467
1468 # Help message printed before fatal option parsing errors.
1469 fatal_help="Try '\$progname --help' for more information."
1470
1471
1472
1473 ## ------------------------- ##
1474 ## Hook function management. ##
1475 ## ------------------------- ##
1476
1477 # This section contains functions for adding, removing, and running hooks
1478 # to the main code. A hook is just a named list of of function, that can
1479 # be run in order later on.
1480
1481 # func_hookable FUNC_NAME
1482 # -----------------------
1483 # Declare that FUNC_NAME will run hooks added with
1484 # 'func_add_hook FUNC_NAME ...'.
1485 func_hookable ()
1486 {
1487 $debug_cmd
1488
1489 func_append hookable_fns " $1"
1490 }
1491
1492
1493 # func_add_hook FUNC_NAME HOOK_FUNC
1494 # ---------------------------------
1495 # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
1496 # first have been declared "hookable" by a call to 'func_hookable'.
1497 func_add_hook ()
1498 {
1499 $debug_cmd
1500
1501 case " $hookable_fns " in
1502 *" $1 "*) ;;
1503 *) func_fatal_error "'$1' does not accept hook functions." ;;
1504 esac
1505
1506 eval func_append ${1}_hooks '" $2"'
1507 }
1508
1509
1510 # func_remove_hook FUNC_NAME HOOK_FUNC
1511 # ------------------------------------
1512 # Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
1513 func_remove_hook ()
1514 {
1515 $debug_cmd
1516
1517 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
1518 }
1519
1520
1521 # func_run_hooks FUNC_NAME [ARG]...
1522 # ---------------------------------
1523 # Run all hook functions registered to FUNC_NAME.
1524 # It is assumed that the list of hook functions contains nothing more
1525 # than a whitespace-delimited list of legal shell function names, and
1526 # no effort is wasted trying to catch shell meta-characters or preserve
1527 # whitespace.
1528 func_run_hooks ()
1529 {
1530 $debug_cmd
1531
1532 case " $hookable_fns " in
1533 *" $1 "*) ;;
1534 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
1535 esac
1536
1537 eval _G_hook_fns=\$$1_hooks; shift
1538
1539 for _G_hook in $_G_hook_fns; do
1540 eval $_G_hook '"$@"'
1541
1542 # store returned options list back into positional
1543 # parameters for next 'cmd' execution.
1544 eval _G_hook_result=\$${_G_hook}_result
1545 eval set dummy "$_G_hook_result"; shift
1546 done
1547
1548 func_quote_for_eval ${1+"$@"}
1549 func_run_hooks_result=$func_quote_for_eval_result
1550 }
1551
1552
1553
1554 ## --------------- ##
1555 ## Option parsing. ##
1556 ## --------------- ##
1557
1558 # In order to add your own option parsing hooks, you must accept the
1559 # full positional parameter list in your hook function, remove any
1560 # options that you action, and then pass back the remaining unprocessed
1561 # options in '<hooked_function_name>_result', escaped suitably for
1562 # 'eval'. Like this:
1563 #
1564 # my_options_prep ()
1565 # {
1566 # $debug_cmd
1567 #
1568 # # Extend the existing usage message.
1569 # usage_message=$usage_message'
1570 # -s, --silent don'\''t print informational messages
1571 # '
1572 #
1573 # func_quote_for_eval ${1+"$@"}
1574 # my_options_prep_result=$func_quote_for_eval_result
1575 # }
1576 # func_add_hook func_options_prep my_options_prep
1577 #
1578 #
1579 # my_silent_option ()
1580 # {
1581 # $debug_cmd
1582 #
1583 # # Note that for efficiency, we parse as many options as we can
1584 # # recognise in a loop before passing the remainder back to the
1585 # # caller on the first unrecognised argument we encounter.
1586 # while test $# -gt 0; do
1587 # opt=$1; shift
1588 # case $opt in
1589 # --silent|-s) opt_silent=: ;;
1590 # # Separate non-argument short options:
1591 # -s*) func_split_short_opt "$_G_opt"
1592 # set dummy "$func_split_short_opt_name" \
1593 # "-$func_split_short_opt_arg" ${1+"$@"}
1594 # shift
1595 # ;;
1596 # *) set dummy "$_G_opt" "$*"; shift; break ;;
1597 # esac
1598 # done
1599 #
1600 # func_quote_for_eval ${1+"$@"}
1601 # my_silent_option_result=$func_quote_for_eval_result
1602 # }
1603 # func_add_hook func_parse_options my_silent_option
1604 #
1605 #
1606 # my_option_validation ()
1607 # {
1608 # $debug_cmd
1609 #
1610 # $opt_silent && $opt_verbose && func_fatal_help "\
1611 # '--silent' and '--verbose' options are mutually exclusive."
1612 #
1613 # func_quote_for_eval ${1+"$@"}
1614 # my_option_validation_result=$func_quote_for_eval_result
1615 # }
1616 # func_add_hook func_validate_options my_option_validation
1617 #
1618 # You'll alse need to manually amend $usage_message to reflect the extra
1619 # options you parse. It's preferable to append if you can, so that
1620 # multiple option parsing hooks can be added safely.
1621
1622
1623 # func_options [ARG]...
1624 # ---------------------
1625 # All the functions called inside func_options are hookable. See the
1626 # individual implementations for details.
1627 func_hookable func_options
1628 func_options ()
1629 {
1630 $debug_cmd
1631
1632 func_options_prep ${1+"$@"}
1633 eval func_parse_options \
1634 ${func_options_prep_result+"$func_options_prep_result"}
1635 eval func_validate_options \
1636 ${func_parse_options_result+"$func_parse_options_result"}
1637
1638 eval func_run_hooks func_options \
1639 ${func_validate_options_result+"$func_validate_options_result"}
1640
1641 # save modified positional parameters for caller
1642 func_options_result=$func_run_hooks_result
1643 }
1644
1645
1646 # func_options_prep [ARG]...
1647 # --------------------------
1648 # All initialisations required before starting the option parse loop.
1649 # Note that when calling hook functions, we pass through the list of
1650 # positional parameters. If a hook function modifies that list, and
1651 # needs to propogate that back to rest of this script, then the complete
1652 # modified list must be put in 'func_run_hooks_result' before
1653 # returning.
1654 func_hookable func_options_prep
1655 func_options_prep ()
1656 {
1657 $debug_cmd
1658
1659 # Option defaults:
1660 opt_verbose=false
1661 opt_warning_types=
1662
1663 func_run_hooks func_options_prep ${1+"$@"}
1664
1665 # save modified positional parameters for caller
1666 func_options_prep_result=$func_run_hooks_result
1667 }
1668
1669
1670 # func_parse_options [ARG]...
1671 # ---------------------------
1672 # The main option parsing loop.
1673 func_hookable func_parse_options
1674 func_parse_options ()
1675 {
1676 $debug_cmd
1677
1678 func_parse_options_result=
1679
1680 # this just eases exit handling
1681 while test $# -gt 0; do
1682 # Defer to hook functions for initial option parsing, so they
1683 # get priority in the event of reusing an option name.
1684 func_run_hooks func_parse_options ${1+"$@"}
1685
1686 # Adjust func_parse_options positional parameters to match
1687 eval set dummy "$func_run_hooks_result"; shift
1688
1689 # Break out of the loop if we already parsed every option.
1690 test $# -gt 0 || break
1691
1692 _G_opt=$1
1693 shift
1694 case $_G_opt in
1695 --debug|-x) debug_cmd='set -x'
1696 func_echo "enabling shell trace mode"
1697 $debug_cmd
1698 ;;
1699
1700 --no-warnings|--no-warning|--no-warn)
1701 set dummy --warnings none ${1+"$@"}
1702 shift
1703 ;;
1704
1705 --warnings|--warning|-W)
1706 test $# = 0 && func_missing_arg $_G_opt && break
1707 case " $warning_categories $1" in
1708 *" $1 "*)
1709 # trailing space prevents matching last $1 above
1710 func_append_uniq opt_warning_types " $1"
1711 ;;
1712 *all)
1713 opt_warning_types=$warning_categories
1714 ;;
1715 *none)
1716 opt_warning_types=none
1717 warning_func=:
1718 ;;
1719 *error)
1720 opt_warning_types=$warning_categories
1721 warning_func=func_fatal_error
1722 ;;
1723 *)
1724 func_fatal_error \
1725 "unsupported warning category: '$1'"
1726 ;;
1727 esac
1728 shift
1729 ;;
1730
1731 --verbose|-v) opt_verbose=: ;;
1732 --version) func_version ;;
1733 -\?|-h) func_usage ;;
1734 --help) func_help ;;
1735
1736 # Separate optargs to long options (plugins may need this):
1737 --*=*) func_split_equals "$_G_opt"
1738 set dummy "$func_split_equals_lhs" \
1739 "$func_split_equals_rhs" ${1+"$@"}
1740 shift
1741 ;;
1742
1743 # Separate optargs to short options:
1744 -W*)
1745 func_split_short_opt "$_G_opt"
1746 set dummy "$func_split_short_opt_name" \
1747 "$func_split_short_opt_arg" ${1+"$@"}
1748 shift
1749 ;;
1750
1751 # Separate non-argument short options:
1752 -\?*|-h*|-v*|-x*)
1753 func_split_short_opt "$_G_opt"
1754 set dummy "$func_split_short_opt_name" \
1755 "-$func_split_short_opt_arg" ${1+"$@"}
1756 shift
1757 ;;
1758
1759 --) break ;;
1760 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1761 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1762 esac
1763 done
1764
1765 # save modified positional parameters for caller
1766 func_quote_for_eval ${1+"$@"}
1767 func_parse_options_result=$func_quote_for_eval_result
1768 }
1769
1770
1771 # func_validate_options [ARG]...
1772 # ------------------------------
1773 # Perform any sanity checks on option settings and/or unconsumed
1774 # arguments.
1775 func_hookable func_validate_options
1776 func_validate_options ()
1777 {
1778 $debug_cmd
1779
1780 # Display all warnings if -W was not given.
1781 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
1782
1783 func_run_hooks func_validate_options ${1+"$@"}
1784
1785 # Bail if the options were screwed!
1786 $exit_cmd $EXIT_FAILURE
1787
1788 # save modified positional parameters for caller
1789 func_validate_options_result=$func_run_hooks_result
1790 }
1791
1792
1793
1794 ## ----------------- ##
1795 ## Helper functions. ##
1796 ## ----------------- ##
1797
1798 # This section contains the helper functions used by the rest of the
1799 # hookable option parser framework in ascii-betical order.
1800
1801
1802 # func_fatal_help ARG...
1803 # ----------------------
1804 # Echo program name prefixed message to standard error, followed by
1805 # a help hint, and exit.
1806 func_fatal_help ()
1807 {
1808 $debug_cmd
1809
1810 eval \$ECHO \""Usage: $usage"\"
1811 eval \$ECHO \""$fatal_help"\"
1812 func_error ${1+"$@"}
1813 exit $EXIT_FAILURE
1814 }
1815
1816
1817 # func_help
1818 # ---------
1819 # Echo long help message to standard output and exit.
1820 func_help ()
1821 {
1822 $debug_cmd
1823
1824 func_usage_message
1825 $ECHO "$long_help_message"
1826 exit 0
1827 }
1828
1829
1830 # func_missing_arg ARGNAME
1831 # ------------------------
1832 # Echo program name prefixed message to standard error and set global
1833 # exit_cmd.
1834 func_missing_arg ()
1835 {
1836 $debug_cmd
1837
1838 func_error "Missing argument for '$1'."
1839 exit_cmd=exit
1840 }
1841
1842
1843 # func_split_equals STRING
1844 # ------------------------
1845 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1846 # splitting STRING at the '=' sign.
1847 test -z "$_G_HAVE_XSI_OPS" \
1848 && (eval 'x=a/b/c;
1849 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
1850 && _G_HAVE_XSI_OPS=yes
1851
1852 if test yes = "$_G_HAVE_XSI_OPS"
1853 then
1854 # This is an XSI compatible shell, allowing a faster implementation...
1855 eval 'func_split_equals ()
1856 {
1857 $debug_cmd
1858
1859 func_split_equals_lhs=${1%%=*}
1860 func_split_equals_rhs=${1#*=}
1861 test "x$func_split_equals_lhs" = "x$1" \
1862 && func_split_equals_rhs=
1863 }'
1864 else
1865 # ...otherwise fall back to using expr, which is often a shell builtin.
1866 func_split_equals ()
1867 {
1868 $debug_cmd
1869
1870 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
1871 func_split_equals_rhs=
1872 test "x$func_split_equals_lhs" = "x$1" \
1873 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
1874 }
1875 fi #func_split_equals
1876
1877
1878 # func_split_short_opt SHORTOPT
1879 # -----------------------------
1880 # Set func_split_short_opt_name and func_split_short_opt_arg shell
1881 # variables after splitting SHORTOPT after the 2nd character.
1882 if test yes = "$_G_HAVE_XSI_OPS"
1883 then
1884 # This is an XSI compatible shell, allowing a faster implementation...
1885 eval 'func_split_short_opt ()
1886 {
1887 $debug_cmd
1888
1889 func_split_short_opt_arg=${1#??}
1890 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
1891 }'
1892 else
1893 # ...otherwise fall back to using expr, which is often a shell builtin.
1894 func_split_short_opt ()
1895 {
1896 $debug_cmd
1897
1898 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
1899 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
1900 }
1901 fi #func_split_short_opt
1902
1903
1904 # func_usage
1905 # ----------
1906 # Echo short help message to standard output and exit.
1907 func_usage ()
1908 {
1909 $debug_cmd
1910
1911 func_usage_message
1912 $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
1913 exit 0
1914 }
1915
1916
1917 # func_usage_message
1918 # ------------------
1919 # Echo short help message to standard output.
1920 func_usage_message ()
1921 {
1922 $debug_cmd
1923
1924 eval \$ECHO \""Usage: $usage"\"
1925 echo
1926 $SED -n 's|^# ||
1927 /^Written by/{
1928 x;p;x
1929 }
1930 h
1931 /^Written by/q' < "$progpath"
1932 echo
1933 eval \$ECHO \""$usage_message"\"
1934 }
1935
1936
1937 # func_version
1938 # ------------
1939 # Echo version message to standard output and exit.
1940 func_version ()
1941 {
1942 $debug_cmd
1943
1944 printf '%s\n' "$progname $scriptversion"
1945 $SED -n '
1946 /(C)/!b go
1947 :more
1948 /\./!{
1949 N
1950 s|\n# | |
1951 b more
1952 }
1953 :go
1954 /^# Written by /,/# warranty; / {
1955 s|^# ||
1956 s|^# *$||
1957 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
1958 p
1959 }
1960 /^# Written by / {
1961 s|^# ||
1962 p
1963 }
1964 /^warranty; /q' < "$progpath"
1965
1966 exit $?
1967 }
1968
1969
1970 # Local variables:
1971 # mode: shell-script
1972 # sh-indentation: 2
1973 # eval: (add-hook 'before-save-hook 'time-stamp)
1974 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1975 # time-stamp-time-zone: "UTC"
1976 # End:
1977
1978 # Set a version string.
1979 scriptversion='(GNU libtool) 2.4.6'
1980
1981
1982 # func_echo ARG...
1983 # ----------------
1984 # Libtool also displays the current mode in messages, so override
1985 # funclib.sh func_echo with this custom definition.
1986 func_echo ()
1987 {
1988 $debug_cmd
1989
1990 _G_message=$*
1991
1992 func_echo_IFS=$IFS
1993 IFS=$nl
1994 for _G_line in $_G_message; do
1995 IFS=$func_echo_IFS
1996 $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
1997 done
1998 IFS=$func_echo_IFS
1999 }
2000
2001
2002 # func_warning ARG...
2003 # -------------------
2004 # Libtool warnings are not categorized, so override funclib.sh
2005 # func_warning with this simpler definition.
2006 func_warning ()
2007 {
2008 $debug_cmd
2009
2010 $warning_func ${1+"$@"}
2011 }
2012
2013
2014 ## ---------------- ##
2015 ## Options parsing. ##
2016 ## ---------------- ##
2017
2018 # Hook in the functions to make sure our own options are parsed during
2019 # the option parsing loop.
2020
2021 usage='$progpath [OPTION]... [MODE-ARG]...'
2022
2023 # Short help message in response to '-h'.
2024 usage_message="Options:
2025 --config show all configuration variables
2026 --debug enable verbose shell tracing
2027 -n, --dry-run display commands without modifying any files
2028 --features display basic configuration information and exit
2029 --mode=MODE use operation mode MODE
2030 --no-warnings equivalent to '-Wnone'
2031 --preserve-dup-deps don't remove duplicate dependency libraries
2032 --quiet, --silent don't print informational messages
2033 --tag=TAG use configuration variables from tag TAG
2034 -v, --verbose print more informational messages than default
2035 --version print version information
2036 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
2037 -h, --help, --help-all print short, long, or detailed help message
2038 "
2039
2040 # Additional text appended to 'usage_message' in response to '--help'.
2041 func_help ()
2042 {
2043 $debug_cmd
2044
2045 func_usage_message
2046 $ECHO "$long_help_message
2047
2048 MODE must be one of the following:
2049
2050 clean remove files from the build directory
2051 compile compile a source file into a libtool object
2052 execute automatically set library path, then run a program
2053 finish complete the installation of libtool libraries
2054 install install libraries or executables
2055 link create a library or an executable
2056 uninstall remove libraries from an installed directory
2057
2058 MODE-ARGS vary depending on the MODE. When passed as first option,
2059 '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
2060 Try '$progname --help --mode=MODE' for a more detailed description of MODE.
2061
2062 When reporting a bug, please describe a test case to reproduce it and
2063 include the following information:
2064
2065 host-triplet: $host
2066 shell: $SHELL
2067 compiler: $LTCC
2068 compiler flags: $LTCFLAGS
2069 linker: $LD (gnu? $with_gnu_ld)
2070 version: $progname (GNU libtool) 2.4.6
2071 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
2072 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
2073
2074 Report bugs to <bug-libtool@gnu.org>.
2075 GNU libtool home page: <http://www.gnu.org/s/libtool/>.
2076 General help using GNU software: <http://www.gnu.org/gethelp/>."
2077 exit 0
2078 }
2079
2080
2081 # func_lo2o OBJECT-NAME
2082 # ---------------------
2083 # Transform OBJECT-NAME from a '.lo' suffix to the platform specific
2084 # object suffix.
2085
2086 lo2o=s/\\.lo\$/.$objext/
2087 o2lo=s/\\.$objext\$/.lo/
2088
2089 if test yes = "$_G_HAVE_XSI_OPS"; then
2090 eval 'func_lo2o ()
2091 {
2092 case $1 in
2093 *.lo) func_lo2o_result=${1%.lo}.$objext ;;
2094 * ) func_lo2o_result=$1 ;;
2095 esac
2096 }'
2097
2098 # func_xform LIBOBJ-OR-SOURCE
2099 # ---------------------------
2100 # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
2101 # suffix to a '.lo' libtool-object suffix.
2102 eval 'func_xform ()
2103 {
2104 func_xform_result=${1%.*}.lo
2105 }'
2106 else
2107 # ...otherwise fall back to using sed.
2108 func_lo2o ()
2109 {
2110 func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
2111 }
2112
2113 func_xform ()
2114 {
2115 func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
2116 }
2117 fi
2118
2119
2120 # func_fatal_configuration ARG...
2121 # -------------------------------
2122 # Echo program name prefixed message to standard error, followed by
2123 # a configuration failure hint, and exit.
2124 func_fatal_configuration ()
2125 {
2126 func__fatal_error ${1+"$@"} \
2127 "See the $PACKAGE documentation for more information." \
2128 "Fatal configuration error."
2129 }
2130
2131
2132 # func_config
2133 # -----------
2134 # Display the configuration for all the tags in this script.
2135 func_config ()
2136 {
2137 re_begincf='^# ### BEGIN LIBTOOL'
2138 re_endcf='^# ### END LIBTOOL'
2139
2140 # Default configuration.
2141 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
2142
2143 # Now print the configurations for the tags.
2144 for tagname in $taglist; do
2145 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
2146 done
2147
2148 exit $?
2149 }
2150
2151
2152 # func_features
2153 # -------------
2154 # Display the features supported by this script.
2155 func_features ()
2156 {
2157 echo "host: $host"
2158 if test yes = "$build_libtool_libs"; then
2159 echo "enable shared libraries"
2160 else
2161 echo "disable shared libraries"
2162 fi
2163 if test yes = "$build_old_libs"; then
2164 echo "enable static libraries"
2165 else
2166 echo "disable static libraries"
2167 fi
2168
2169 exit $?
2170 }
2171
2172
2173 # func_enable_tag TAGNAME
2174 # -----------------------
2175 # Verify that TAGNAME is valid, and either flag an error and exit, or
2176 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
2177 # variable here.
2178 func_enable_tag ()
2179 {
2180 # Global variable:
2181 tagname=$1
2182
2183 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
2184 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
2185 sed_extractcf=/$re_begincf/,/$re_endcf/p
2186
2187 # Validate tagname.
2188 case $tagname in
2189 *[!-_A-Za-z0-9,/]*)
2190 func_fatal_error "invalid tag name: $tagname"
2191 ;;
2192 esac
2193
2194 # Don't test for the "default" C tag, as we know it's
2195 # there but not specially marked.
2196 case $tagname in
2197 CC) ;;
2198 *)
2199 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
2200 taglist="$taglist $tagname"
2201
2202 # Evaluate the configuration. Be careful to quote the path
2203 # and the sed script, to avoid splitting on whitespace, but
2204 # also don't use non-portable quotes within backquotes within
2205 # quotes we have to do it in 2 steps:
2206 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
2207 eval "$extractedcf"
2208 else
2209 func_error "ignoring unknown tag $tagname"
2210 fi
2211 ;;
2212 esac
2213 }
2214
2215
2216 # func_check_version_match
2217 # ------------------------
2218 # Ensure that we are using m4 macros, and libtool script from the same
2219 # release of libtool.
2220 func_check_version_match ()
2221 {
2222 if test "$package_revision" != "$macro_revision"; then
2223 if test "$VERSION" != "$macro_version"; then
2224 if test -z "$macro_version"; then
2225 cat >&2 <<_LT_EOF
2226 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2227 $progname: definition of this LT_INIT comes from an older release.
2228 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2229 $progname: and run autoconf again.
2230 _LT_EOF
2231 else
2232 cat >&2 <<_LT_EOF
2233 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2234 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
2235 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2236 $progname: and run autoconf again.
2237 _LT_EOF
2238 fi
2239 else
2240 cat >&2 <<_LT_EOF
2241 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
2242 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
2243 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
2244 $progname: of $PACKAGE $VERSION and run autoconf again.
2245 _LT_EOF
2246 fi
2247
2248 exit $EXIT_MISMATCH
2249 fi
2250 }
2251
2252
2253 # libtool_options_prep [ARG]...
2254 # -----------------------------
2255 # Preparation for options parsed by libtool.
2256 libtool_options_prep ()
2257 {
2258 $debug_mode
2259
2260 # Option defaults:
2261 opt_config=false
2262 opt_dlopen=
2263 opt_dry_run=false
2264 opt_help=false
2265 opt_mode=
2266 opt_preserve_dup_deps=false
2267 opt_quiet=false
2268
2269 nonopt=
2270 preserve_args=
2271
2272 # Shorthand for --mode=foo, only valid as the first argument
2273 case $1 in
2274 clean|clea|cle|cl)
2275 shift; set dummy --mode clean ${1+"$@"}; shift
2276 ;;
2277 compile|compil|compi|comp|com|co|c)
2278 shift; set dummy --mode compile ${1+"$@"}; shift
2279 ;;
2280 execute|execut|execu|exec|exe|ex|e)
2281 shift; set dummy --mode execute ${1+"$@"}; shift
2282 ;;
2283 finish|finis|fini|fin|fi|f)
2284 shift; set dummy --mode finish ${1+"$@"}; shift
2285 ;;
2286 install|instal|insta|inst|ins|in|i)
2287 shift; set dummy --mode install ${1+"$@"}; shift
2288 ;;
2289 link|lin|li|l)
2290 shift; set dummy --mode link ${1+"$@"}; shift
2291 ;;
2292 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2293 shift; set dummy --mode uninstall ${1+"$@"}; shift
2294 ;;
2295 esac
2296
2297 # Pass back the list of options.
2298 func_quote_for_eval ${1+"$@"}
2299 libtool_options_prep_result=$func_quote_for_eval_result
2300 }
2301 func_add_hook func_options_prep libtool_options_prep
2302
2303
2304 # libtool_parse_options [ARG]...
2305 # ---------------------------------
2306 # Provide handling for libtool specific options.
2307 libtool_parse_options ()
2308 {
2309 $debug_cmd
2310
2311 # Perform our own loop to consume as many options as possible in
2312 # each iteration.
2313 while test $# -gt 0; do
2314 _G_opt=$1
2315 shift
2316 case $_G_opt in
2317 --dry-run|--dryrun|-n)
2318 opt_dry_run=:
2319 ;;
2320
2321 --config) func_config ;;
2322
2323 --dlopen|-dlopen)
2324 opt_dlopen="${opt_dlopen+$opt_dlopen
2325 }$1"
2326 shift
2327 ;;
2328
2329 --preserve-dup-deps)
2330 opt_preserve_dup_deps=: ;;
2331
2332 --features) func_features ;;
2333
2334 --finish) set dummy --mode finish ${1+"$@"}; shift ;;
2335
2336 --help) opt_help=: ;;
2337
2338 --help-all) opt_help=': help-all' ;;
2339
2340 --mode) test $# = 0 && func_missing_arg $_G_opt && break
2341 opt_mode=$1
2342 case $1 in
2343 # Valid mode arguments:
2344 clean|compile|execute|finish|install|link|relink|uninstall) ;;
2345
2346 # Catch anything else as an error
2347 *) func_error "invalid argument for $_G_opt"
2348 exit_cmd=exit
2349 break
2350 ;;
2351 esac
2352 shift
2353 ;;
2354
2355 --no-silent|--no-quiet)
2356 opt_quiet=false
2357 func_append preserve_args " $_G_opt"
2358 ;;
2359
2360 --no-warnings|--no-warning|--no-warn)
2361 opt_warning=false
2362 func_append preserve_args " $_G_opt"
2363 ;;
2364
2365 --no-verbose)
2366 opt_verbose=false
2367 func_append preserve_args " $_G_opt"
2368 ;;
2369
2370 --silent|--quiet)
2371 opt_quiet=:
2372 opt_verbose=false
2373 func_append preserve_args " $_G_opt"
2374 ;;
2375
2376 --tag) test $# = 0 && func_missing_arg $_G_opt && break
2377 opt_tag=$1
2378 func_append preserve_args " $_G_opt $1"
2379 func_enable_tag "$1"
2380 shift
2381 ;;
2382
2383 --verbose|-v) opt_quiet=false
2384 opt_verbose=:
2385 func_append preserve_args " $_G_opt"
2386 ;;
2387
2388 # An option not handled by this hook function:
2389 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
2390 esac
2391 done
2392
2393
2394 # save modified positional parameters for caller
2395 func_quote_for_eval ${1+"$@"}
2396 libtool_parse_options_result=$func_quote_for_eval_result
2397 }
2398 func_add_hook func_parse_options libtool_parse_options
2399
2400
2401
2402 # libtool_validate_options [ARG]...
2403 # ---------------------------------
2404 # Perform any sanity checks on option settings and/or unconsumed
2405 # arguments.
2406 libtool_validate_options ()
2407 {
2408 # save first non-option argument
2409 if test 0 -lt $#; then
2410 nonopt=$1
2411 shift
2412 fi
2413
2414 # preserve --debug
2415 test : = "$debug_cmd" || func_append preserve_args " --debug"
2416
2417 case $host in
2418 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
2419 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
2420 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
2421 # don't eliminate duplications in $postdeps and $predeps
2422 opt_duplicate_compiler_generated_deps=:
2423 ;;
2424 *)
2425 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
2426 ;;
2427 esac
2428
2429 $opt_help || {
2430 # Sanity checks first:
2431 func_check_version_match
2432
2433 test yes != "$build_libtool_libs" \
2434 && test yes != "$build_old_libs" \
2435 && func_fatal_configuration "not configured to build any kind of library"
2436
2437 # Darwin sucks
2438 eval std_shrext=\"$shrext_cmds\"
2439
2440 # Only execute mode is allowed to have -dlopen flags.
2441 if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
2442 func_error "unrecognized option '-dlopen'"
2443 $ECHO "$help" 1>&2
2444 exit $EXIT_FAILURE
2445 fi
2446
2447 # Change the help message to a mode-specific one.
2448 generic_help=$help
2449 help="Try '$progname --help --mode=$opt_mode' for more information."
2450 }
2451
2452 # Pass back the unparsed argument list
2453 func_quote_for_eval ${1+"$@"}
2454 libtool_validate_options_result=$func_quote_for_eval_result
2455 }
2456 func_add_hook func_validate_options libtool_validate_options
2457
2458
2459 # Process options as early as possible so that --help and --version
2460 # can return quickly.
2461 func_options ${1+"$@"}
2462 eval set dummy "$func_options_result"; shift
2463
2464
2465
2466 ## ----------- ##
2467 ## Main. ##
2468 ## ----------- ##
2469
2470 magic='%%%MAGIC variable%%%'
2471 magic_exe='%%%MAGIC EXE variable%%%'
2472
2473 # Global variables.
2474 extracted_archives=
2475 extracted_serial=0
2476
2477 # If this variable is set in any of the actions, the command in it
2478 # will be execed at the end. This prevents here-documents from being
2479 # left over by shells.
2480 exec_cmd=
2481
2482
2483 # A function that is used when there is no print builtin or printf.
2484 func_fallback_echo ()
2485 {
2486 eval 'cat <<_LTECHO_EOF
2487 $1
2488 _LTECHO_EOF'
2489 }
2490
2491 # func_generated_by_libtool
2492 # True iff stdin has been generated by Libtool. This function is only
2493 # a basic sanity check; it will hardly flush out determined imposters.
2494 func_generated_by_libtool_p ()
2495 {
2496 $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
2497 }
2498
2499 # func_lalib_p file
2500 # True iff FILE is a libtool '.la' library or '.lo' object file.
2501 # This function is only a basic sanity check; it will hardly flush out
2502 # determined imposters.
2503 func_lalib_p ()
2504 {
2505 test -f "$1" &&
2506 $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
2507 }
2508
2509 # func_lalib_unsafe_p file
2510 # True iff FILE is a libtool '.la' library or '.lo' object file.
2511 # This function implements the same check as func_lalib_p without
2512 # resorting to external programs. To this end, it redirects stdin and
2513 # closes it afterwards, without saving the original file descriptor.
2514 # As a safety measure, use it only where a negative result would be
2515 # fatal anyway. Works if 'file' does not exist.
2516 func_lalib_unsafe_p ()
2517 {
2518 lalib_p=no
2519 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
2520 for lalib_p_l in 1 2 3 4
2521 do
2522 read lalib_p_line
2523 case $lalib_p_line in
2524 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
2525 esac
2526 done
2527 exec 0<&5 5<&-
2528 fi
2529 test yes = "$lalib_p"
2530 }
2531
2532 # func_ltwrapper_script_p file
2533 # True iff FILE is a libtool wrapper script
2534 # This function is only a basic sanity check; it will hardly flush out
2535 # determined imposters.
2536 func_ltwrapper_script_p ()
2537 {
2538 test -f "$1" &&
2539 $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
2540 }
2541
2542 # func_ltwrapper_executable_p file
2543 # True iff FILE is a libtool wrapper executable
2544 # This function is only a basic sanity check; it will hardly flush out
2545 # determined imposters.
2546 func_ltwrapper_executable_p ()
2547 {
2548 func_ltwrapper_exec_suffix=
2549 case $1 in
2550 *.exe) ;;
2551 *) func_ltwrapper_exec_suffix=.exe ;;
2552 esac
2553 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
2554 }
2555
2556 # func_ltwrapper_scriptname file
2557 # Assumes file is an ltwrapper_executable
2558 # uses $file to determine the appropriate filename for a
2559 # temporary ltwrapper_script.
2560 func_ltwrapper_scriptname ()
2561 {
2562 func_dirname_and_basename "$1" "" "."
2563 func_stripname '' '.exe' "$func_basename_result"
2564 func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
2565 }
2566
2567 # func_ltwrapper_p file
2568 # True iff FILE is a libtool wrapper script or wrapper executable
2569 # This function is only a basic sanity check; it will hardly flush out
2570 # determined imposters.
2571 func_ltwrapper_p ()
2572 {
2573 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
2574 }
2575
2576
2577 # func_execute_cmds commands fail_cmd
2578 # Execute tilde-delimited COMMANDS.
2579 # If FAIL_CMD is given, eval that upon failure.
2580 # FAIL_CMD may read-access the current command in variable CMD!
2581 func_execute_cmds ()
2582 {
2583 $debug_cmd
2584
2585 save_ifs=$IFS; IFS='~'
2586 for cmd in $1; do
2587 IFS=$sp$nl
2588 eval cmd=\"$cmd\"
2589 IFS=$save_ifs
2590 func_show_eval "$cmd" "${2-:}"
2591 done
2592 IFS=$save_ifs
2593 }
2594
2595
2596 # func_source file
2597 # Source FILE, adding directory component if necessary.
2598 # Note that it is not necessary on cygwin/mingw to append a dot to
2599 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
2600 # behavior happens only for exec(3), not for open(2)! Also, sourcing
2601 # 'FILE.' does not work on cygwin managed mounts.
2602 func_source ()
2603 {
2604 $debug_cmd
2605
2606 case $1 in
2607 */* | *\\*) . "$1" ;;
2608 *) . "./$1" ;;
2609 esac
2610 }
2611
2612
2613 # func_resolve_sysroot PATH
2614 # Replace a leading = in PATH with a sysroot. Store the result into
2615 # func_resolve_sysroot_result
2616 func_resolve_sysroot ()
2617 {
2618 func_resolve_sysroot_result=$1
2619 case $func_resolve_sysroot_result in
2620 =*)
2621 func_stripname '=' '' "$func_resolve_sysroot_result"
2622 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
2623 ;;
2624 esac
2625 }
2626
2627 # func_replace_sysroot PATH
2628 # If PATH begins with the sysroot, replace it with = and
2629 # store the result into func_replace_sysroot_result.
2630 func_replace_sysroot ()
2631 {
2632 case $lt_sysroot:$1 in
2633 ?*:"$lt_sysroot"*)
2634 func_stripname "$lt_sysroot" '' "$1"
2635 func_replace_sysroot_result='='$func_stripname_result
2636 ;;
2637 *)
2638 # Including no sysroot.
2639 func_replace_sysroot_result=$1
2640 ;;
2641 esac
2642 }
2643
2644 # func_infer_tag arg
2645 # Infer tagged configuration to use if any are available and
2646 # if one wasn't chosen via the "--tag" command line option.
2647 # Only attempt this if the compiler in the base compile
2648 # command doesn't match the default compiler.
2649 # arg is usually of the form 'gcc ...'
2650 func_infer_tag ()
2651 {
2652 $debug_cmd
2653
2654 if test -n "$available_tags" && test -z "$tagname"; then
2655 CC_quoted=
2656 for arg in $CC; do
2657 func_append_quoted CC_quoted "$arg"
2658 done
2659 CC_expanded=`func_echo_all $CC`
2660 CC_quoted_expanded=`func_echo_all $CC_quoted`
2661 case $@ in
2662 # Blanks in the command may have been stripped by the calling shell,
2663 # but not from the CC environment variable when configure was run.
2664 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2665 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
2666 # Blanks at the start of $base_compile will cause this to fail
2667 # if we don't check for them as well.
2668 *)
2669 for z in $available_tags; do
2670 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
2671 # Evaluate the configuration.
2672 eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
2673 CC_quoted=
2674 for arg in $CC; do
2675 # Double-quote args containing other shell metacharacters.
2676 func_append_quoted CC_quoted "$arg"
2677 done
2678 CC_expanded=`func_echo_all $CC`
2679 CC_quoted_expanded=`func_echo_all $CC_quoted`
2680 case "$@ " in
2681 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2682 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
2683 # The compiler in the base compile command matches
2684 # the one in the tagged configuration.
2685 # Assume this is the tagged configuration we want.
2686 tagname=$z
2687 break
2688 ;;
2689 esac
2690 fi
2691 done
2692 # If $tagname still isn't set, then no tagged configuration
2693 # was found and let the user know that the "--tag" command
2694 # line option must be used.
2695 if test -z "$tagname"; then
2696 func_echo "unable to infer tagged configuration"
2697 func_fatal_error "specify a tag with '--tag'"
2698 # else
2699 # func_verbose "using $tagname tagged configuration"
2700 fi
2701 ;;
2702 esac
2703 fi
2704 }
2705
2706
2707
2708 # func_write_libtool_object output_name pic_name nonpic_name
2709 # Create a libtool object file (analogous to a ".la" file),
2710 # but don't create it if we're doing a dry run.
2711 func_write_libtool_object ()
2712 {
2713 write_libobj=$1
2714 if test yes = "$build_libtool_libs"; then
2715 write_lobj=\'$2\'
2716 else
2717 write_lobj=none
2718 fi
2719
2720 if test yes = "$build_old_libs"; then
2721 write_oldobj=\'$3\'
2722 else
2723 write_oldobj=none
2724 fi
2725
2726 $opt_dry_run || {
2727 cat >${write_libobj}T <<EOF
2728 # $write_libobj - a libtool object file
2729 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
2730 #
2731 # Please DO NOT delete this file!
2732 # It is necessary for linking the library.
2733
2734 # Name of the PIC object.
2735 pic_object=$write_lobj
2736
2737 # Name of the non-PIC object
2738 non_pic_object=$write_oldobj
2739
2740 EOF
2741 $MV "${write_libobj}T" "$write_libobj"
2742 }
2743 }
2744
2745
2746 ##################################################
2747 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
2748 ##################################################
2749
2750 # func_convert_core_file_wine_to_w32 ARG
2751 # Helper function used by file name conversion functions when $build is *nix,
2752 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
2753 # correctly configured wine environment available, with the winepath program
2754 # in $build's $PATH.
2755 #
2756 # ARG is the $build file name to be converted to w32 format.
2757 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
2758 # be empty on error (or when ARG is empty)
2759 func_convert_core_file_wine_to_w32 ()
2760 {
2761 $debug_cmd
2762
2763 func_convert_core_file_wine_to_w32_result=$1
2764 if test -n "$1"; then
2765 # Unfortunately, winepath does not exit with a non-zero error code, so we
2766 # are forced to check the contents of stdout. On the other hand, if the
2767 # command is not found, the shell will set an exit code of 127 and print
2768 # *an error message* to stdout. So we must check for both error code of
2769 # zero AND non-empty stdout, which explains the odd construction:
2770 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
2771 if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
2772 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
2773 $SED -e "$sed_naive_backslashify"`
2774 else
2775 func_convert_core_file_wine_to_w32_result=
2776 fi
2777 fi
2778 }
2779 # end: func_convert_core_file_wine_to_w32
2780
2781
2782 # func_convert_core_path_wine_to_w32 ARG
2783 # Helper function used by path conversion functions when $build is *nix, and
2784 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
2785 # configured wine environment available, with the winepath program in $build's
2786 # $PATH. Assumes ARG has no leading or trailing path separator characters.
2787 #
2788 # ARG is path to be converted from $build format to win32.
2789 # Result is available in $func_convert_core_path_wine_to_w32_result.
2790 # Unconvertible file (directory) names in ARG are skipped; if no directory names
2791 # are convertible, then the result may be empty.
2792 func_convert_core_path_wine_to_w32 ()
2793 {
2794 $debug_cmd
2795
2796 # unfortunately, winepath doesn't convert paths, only file names
2797 func_convert_core_path_wine_to_w32_result=
2798 if test -n "$1"; then
2799 oldIFS=$IFS
2800 IFS=:
2801 for func_convert_core_path_wine_to_w32_f in $1; do
2802 IFS=$oldIFS
2803 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
2804 if test -n "$func_convert_core_file_wine_to_w32_result"; then
2805 if test -z "$func_convert_core_path_wine_to_w32_result"; then
2806 func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
2807 else
2808 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
2809 fi
2810 fi
2811 done
2812 IFS=$oldIFS
2813 fi
2814 }
2815 # end: func_convert_core_path_wine_to_w32
2816
2817
2818 # func_cygpath ARGS...
2819 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
2820 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
2821 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
2822 # (2), returns the Cygwin file name or path in func_cygpath_result (input
2823 # file name or path is assumed to be in w32 format, as previously converted
2824 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
2825 # or path in func_cygpath_result (input file name or path is assumed to be in
2826 # Cygwin format). Returns an empty string on error.
2827 #
2828 # ARGS are passed to cygpath, with the last one being the file name or path to
2829 # be converted.
2830 #
2831 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
2832 # environment variable; do not put it in $PATH.
2833 func_cygpath ()
2834 {
2835 $debug_cmd
2836
2837 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
2838 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
2839 if test "$?" -ne 0; then
2840 # on failure, ensure result is empty
2841 func_cygpath_result=
2842 fi
2843 else
2844 func_cygpath_result=
2845 func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
2846 fi
2847 }
2848 #end: func_cygpath
2849
2850
2851 # func_convert_core_msys_to_w32 ARG
2852 # Convert file name or path ARG from MSYS format to w32 format. Return
2853 # result in func_convert_core_msys_to_w32_result.
2854 func_convert_core_msys_to_w32 ()
2855 {
2856 $debug_cmd
2857
2858 # awkward: cmd appends spaces to result
2859 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
2860 $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
2861 }
2862 #end: func_convert_core_msys_to_w32
2863
2864
2865 # func_convert_file_check ARG1 ARG2
2866 # Verify that ARG1 (a file name in $build format) was converted to $host
2867 # format in ARG2. Otherwise, emit an error message, but continue (resetting
2868 # func_to_host_file_result to ARG1).
2869 func_convert_file_check ()
2870 {
2871 $debug_cmd
2872
2873 if test -z "$2" && test -n "$1"; then
2874 func_error "Could not determine host file name corresponding to"
2875 func_error " '$1'"
2876 func_error "Continuing, but uninstalled executables may not work."
2877 # Fallback:
2878 func_to_host_file_result=$1
2879 fi
2880 }
2881 # end func_convert_file_check
2882
2883
2884 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
2885 # Verify that FROM_PATH (a path in $build format) was converted to $host
2886 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
2887 # func_to_host_file_result to a simplistic fallback value (see below).
2888 func_convert_path_check ()
2889 {
2890 $debug_cmd
2891
2892 if test -z "$4" && test -n "$3"; then
2893 func_error "Could not determine the host path corresponding to"
2894 func_error " '$3'"
2895 func_error "Continuing, but uninstalled executables may not work."
2896 # Fallback. This is a deliberately simplistic "conversion" and
2897 # should not be "improved". See libtool.info.
2898 if test "x$1" != "x$2"; then
2899 lt_replace_pathsep_chars="s|$1|$2|g"
2900 func_to_host_path_result=`echo "$3" |
2901 $SED -e "$lt_replace_pathsep_chars"`
2902 else
2903 func_to_host_path_result=$3
2904 fi
2905 fi
2906 }
2907 # end func_convert_path_check
2908
2909
2910 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
2911 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
2912 # and appending REPL if ORIG matches BACKPAT.
2913 func_convert_path_front_back_pathsep ()
2914 {
2915 $debug_cmd
2916
2917 case $4 in
2918 $1 ) func_to_host_path_result=$3$func_to_host_path_result
2919 ;;
2920 esac
2921 case $4 in
2922 $2 ) func_append func_to_host_path_result "$3"
2923 ;;
2924 esac
2925 }
2926 # end func_convert_path_front_back_pathsep
2927
2928
2929 ##################################################
2930 # $build to $host FILE NAME CONVERSION FUNCTIONS #
2931 ##################################################
2932 # invoked via '$to_host_file_cmd ARG'
2933 #
2934 # In each case, ARG is the path to be converted from $build to $host format.
2935 # Result will be available in $func_to_host_file_result.
2936
2937
2938 # func_to_host_file ARG
2939 # Converts the file name ARG from $build format to $host format. Return result
2940 # in func_to_host_file_result.
2941 func_to_host_file ()
2942 {
2943 $debug_cmd
2944
2945 $to_host_file_cmd "$1"
2946 }
2947 # end func_to_host_file
2948
2949
2950 # func_to_tool_file ARG LAZY
2951 # converts the file name ARG from $build format to toolchain format. Return
2952 # result in func_to_tool_file_result. If the conversion in use is listed
2953 # in (the comma separated) LAZY, no conversion takes place.
2954 func_to_tool_file ()
2955 {
2956 $debug_cmd
2957
2958 case ,$2, in
2959 *,"$to_tool_file_cmd",*)
2960 func_to_tool_file_result=$1
2961 ;;
2962 *)
2963 $to_tool_file_cmd "$1"
2964 func_to_tool_file_result=$func_to_host_file_result
2965 ;;
2966 esac
2967 }
2968 # end func_to_tool_file
2969
2970
2971 # func_convert_file_noop ARG
2972 # Copy ARG to func_to_host_file_result.
2973 func_convert_file_noop ()
2974 {
2975 func_to_host_file_result=$1
2976 }
2977 # end func_convert_file_noop
2978
2979
2980 # func_convert_file_msys_to_w32 ARG
2981 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
2982 # conversion to w32 is not available inside the cwrapper. Returns result in
2983 # func_to_host_file_result.
2984 func_convert_file_msys_to_w32 ()
2985 {
2986 $debug_cmd
2987
2988 func_to_host_file_result=$1
2989 if test -n "$1"; then
2990 func_convert_core_msys_to_w32 "$1"
2991 func_to_host_file_result=$func_convert_core_msys_to_w32_result
2992 fi
2993 func_convert_file_check "$1" "$func_to_host_file_result"
2994 }
2995 # end func_convert_file_msys_to_w32
2996
2997
2998 # func_convert_file_cygwin_to_w32 ARG
2999 # Convert file name ARG from Cygwin to w32 format. Returns result in
3000 # func_to_host_file_result.
3001 func_convert_file_cygwin_to_w32 ()
3002 {
3003 $debug_cmd
3004
3005 func_to_host_file_result=$1
3006 if test -n "$1"; then
3007 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
3008 # LT_CYGPATH in this case.
3009 func_to_host_file_result=`cygpath -m "$1"`
3010 fi
3011 func_convert_file_check "$1" "$func_to_host_file_result"
3012 }
3013 # end func_convert_file_cygwin_to_w32
3014
3015
3016 # func_convert_file_nix_to_w32 ARG
3017 # Convert file name ARG from *nix to w32 format. Requires a wine environment
3018 # and a working winepath. Returns result in func_to_host_file_result.
3019 func_convert_file_nix_to_w32 ()
3020 {
3021 $debug_cmd
3022
3023 func_to_host_file_result=$1
3024 if test -n "$1"; then
3025 func_convert_core_file_wine_to_w32 "$1"
3026 func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
3027 fi
3028 func_convert_file_check "$1" "$func_to_host_file_result"
3029 }
3030 # end func_convert_file_nix_to_w32
3031
3032
3033 # func_convert_file_msys_to_cygwin ARG
3034 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3035 # Returns result in func_to_host_file_result.
3036 func_convert_file_msys_to_cygwin ()
3037 {
3038 $debug_cmd
3039
3040 func_to_host_file_result=$1
3041 if test -n "$1"; then
3042 func_convert_core_msys_to_w32 "$1"
3043 func_cygpath -u "$func_convert_core_msys_to_w32_result"
3044 func_to_host_file_result=$func_cygpath_result
3045 fi
3046 func_convert_file_check "$1" "$func_to_host_file_result"
3047 }
3048 # end func_convert_file_msys_to_cygwin
3049
3050
3051 # func_convert_file_nix_to_cygwin ARG
3052 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
3053 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
3054 # in func_to_host_file_result.
3055 func_convert_file_nix_to_cygwin ()
3056 {
3057 $debug_cmd
3058
3059 func_to_host_file_result=$1
3060 if test -n "$1"; then
3061 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
3062 func_convert_core_file_wine_to_w32 "$1"
3063 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
3064 func_to_host_file_result=$func_cygpath_result
3065 fi
3066 func_convert_file_check "$1" "$func_to_host_file_result"
3067 }
3068 # end func_convert_file_nix_to_cygwin
3069
3070
3071 #############################################
3072 # $build to $host PATH CONVERSION FUNCTIONS #
3073 #############################################
3074 # invoked via '$to_host_path_cmd ARG'
3075 #
3076 # In each case, ARG is the path to be converted from $build to $host format.
3077 # The result will be available in $func_to_host_path_result.
3078 #
3079 # Path separators are also converted from $build format to $host format. If
3080 # ARG begins or ends with a path separator character, it is preserved (but
3081 # converted to $host format) on output.
3082 #
3083 # All path conversion functions are named using the following convention:
3084 # file name conversion function : func_convert_file_X_to_Y ()
3085 # path conversion function : func_convert_path_X_to_Y ()
3086 # where, for any given $build/$host combination the 'X_to_Y' value is the
3087 # same. If conversion functions are added for new $build/$host combinations,
3088 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
3089 # will break.
3090
3091
3092 # func_init_to_host_path_cmd
3093 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
3094 # appropriate value, based on the value of $to_host_file_cmd.
3095 to_host_path_cmd=
3096 func_init_to_host_path_cmd ()
3097 {
3098 $debug_cmd
3099
3100 if test -z "$to_host_path_cmd"; then
3101 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
3102 to_host_path_cmd=func_convert_path_$func_stripname_result
3103 fi
3104 }
3105
3106
3107 # func_to_host_path ARG
3108 # Converts the path ARG from $build format to $host format. Return result
3109 # in func_to_host_path_result.
3110 func_to_host_path ()
3111 {
3112 $debug_cmd
3113
3114 func_init_to_host_path_cmd
3115 $to_host_path_cmd "$1"
3116 }
3117 # end func_to_host_path
3118
3119
3120 # func_convert_path_noop ARG
3121 # Copy ARG to func_to_host_path_result.
3122 func_convert_path_noop ()
3123 {
3124 func_to_host_path_result=$1
3125 }
3126 # end func_convert_path_noop
3127
3128
3129 # func_convert_path_msys_to_w32 ARG
3130 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
3131 # conversion to w32 is not available inside the cwrapper. Returns result in
3132 # func_to_host_path_result.
3133 func_convert_path_msys_to_w32 ()
3134 {
3135 $debug_cmd
3136
3137 func_to_host_path_result=$1
3138 if test -n "$1"; then
3139 # Remove leading and trailing path separator characters from ARG. MSYS
3140 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
3141 # and winepath ignores them completely.
3142 func_stripname : : "$1"
3143 func_to_host_path_tmp1=$func_stripname_result
3144 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3145 func_to_host_path_result=$func_convert_core_msys_to_w32_result
3146 func_convert_path_check : ";" \
3147 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3148 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3149 fi
3150 }
3151 # end func_convert_path_msys_to_w32
3152
3153
3154 # func_convert_path_cygwin_to_w32 ARG
3155 # Convert path ARG from Cygwin to w32 format. Returns result in
3156 # func_to_host_file_result.
3157 func_convert_path_cygwin_to_w32 ()
3158 {
3159 $debug_cmd
3160
3161 func_to_host_path_result=$1
3162 if test -n "$1"; then
3163 # See func_convert_path_msys_to_w32:
3164 func_stripname : : "$1"
3165 func_to_host_path_tmp1=$func_stripname_result
3166 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
3167 func_convert_path_check : ";" \
3168 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3169 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3170 fi
3171 }
3172 # end func_convert_path_cygwin_to_w32
3173
3174
3175 # func_convert_path_nix_to_w32 ARG
3176 # Convert path ARG from *nix to w32 format. Requires a wine environment and
3177 # a working winepath. Returns result in func_to_host_file_result.
3178 func_convert_path_nix_to_w32 ()
3179 {
3180 $debug_cmd
3181
3182 func_to_host_path_result=$1
3183 if test -n "$1"; then
3184 # See func_convert_path_msys_to_w32:
3185 func_stripname : : "$1"
3186 func_to_host_path_tmp1=$func_stripname_result
3187 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3188 func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
3189 func_convert_path_check : ";" \
3190 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3191 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3192 fi
3193 }
3194 # end func_convert_path_nix_to_w32
3195
3196
3197 # func_convert_path_msys_to_cygwin ARG
3198 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3199 # Returns result in func_to_host_file_result.
3200 func_convert_path_msys_to_cygwin ()
3201 {
3202 $debug_cmd
3203
3204 func_to_host_path_result=$1
3205 if test -n "$1"; then
3206 # See func_convert_path_msys_to_w32:
3207 func_stripname : : "$1"
3208 func_to_host_path_tmp1=$func_stripname_result
3209 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3210 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
3211 func_to_host_path_result=$func_cygpath_result
3212 func_convert_path_check : : \
3213 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3214 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3215 fi
3216 }
3217 # end func_convert_path_msys_to_cygwin
3218
3219
3220 # func_convert_path_nix_to_cygwin ARG
3221 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
3222 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
3223 # func_to_host_file_result.
3224 func_convert_path_nix_to_cygwin ()
3225 {
3226 $debug_cmd
3227
3228 func_to_host_path_result=$1
3229 if test -n "$1"; then
3230 # Remove leading and trailing path separator characters from
3231 # ARG. msys behavior is inconsistent here, cygpath turns them
3232 # into '.;' and ';.', and winepath ignores them completely.
3233 func_stripname : : "$1"
3234 func_to_host_path_tmp1=$func_stripname_result
3235 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3236 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
3237 func_to_host_path_result=$func_cygpath_result
3238 func_convert_path_check : : \
3239 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3240 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3241 fi
3242 }
3243 # end func_convert_path_nix_to_cygwin
3244
3245
3246 # func_dll_def_p FILE
3247 # True iff FILE is a Windows DLL '.def' file.
3248 # Keep in sync with _LT_DLL_DEF_P in libtool.m4
3249 func_dll_def_p ()
3250 {
3251 $debug_cmd
3252
3253 func_dll_def_p_tmp=`$SED -n \
3254 -e 's/^[ ]*//' \
3255 -e '/^\(;.*\)*$/d' \
3256 -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
3257 -e q \
3258 "$1"`
3259 test DEF = "$func_dll_def_p_tmp"
3260 }
3261
3262
3263 # func_mode_compile arg...
3264 func_mode_compile ()
3265 {
3266 $debug_cmd
3267
3268 # Get the compilation command and the source file.
3269 base_compile=
3270 srcfile=$nonopt # always keep a non-empty value in "srcfile"
3271 suppress_opt=yes
3272 suppress_output=
3273 arg_mode=normal
3274 libobj=
3275 later=
3276 pie_flag=
3277
3278 for arg
3279 do
3280 case $arg_mode in
3281 arg )
3282 # do not "continue". Instead, add this to base_compile
3283 lastarg=$arg
3284 arg_mode=normal
3285 ;;
3286
3287 target )
3288 libobj=$arg
3289 arg_mode=normal
3290 continue
3291 ;;
3292
3293 normal )
3294 # Accept any command-line options.
3295 case $arg in
3296 -o)
3297 test -n "$libobj" && \
3298 func_fatal_error "you cannot specify '-o' more than once"
3299 arg_mode=target
3300 continue
3301 ;;
3302
3303 -pie | -fpie | -fPIE)
3304 func_append pie_flag " $arg"
3305 continue
3306 ;;
3307
3308 -shared | -static | -prefer-pic | -prefer-non-pic)
3309 func_append later " $arg"
3310 continue
3311 ;;
3312
3313 -no-suppress)
3314 suppress_opt=no
3315 continue
3316 ;;
3317
3318 -Xcompiler)
3319 arg_mode=arg # the next one goes into the "base_compile" arg list
3320 continue # The current "srcfile" will either be retained or
3321 ;; # replaced later. I would guess that would be a bug.
3322
3323 -Wc,*)
3324 func_stripname '-Wc,' '' "$arg"
3325 args=$func_stripname_result
3326 lastarg=
3327 save_ifs=$IFS; IFS=,
3328 for arg in $args; do
3329 IFS=$save_ifs
3330 func_append_quoted lastarg "$arg"
3331 done
3332 IFS=$save_ifs
3333 func_stripname ' ' '' "$lastarg"
3334 lastarg=$func_stripname_result
3335
3336 # Add the arguments to base_compile.
3337 func_append base_compile " $lastarg"
3338 continue
3339 ;;
3340
3341 *)
3342 # Accept the current argument as the source file.
3343 # The previous "srcfile" becomes the current argument.
3344 #
3345 lastarg=$srcfile
3346 srcfile=$arg
3347 ;;
3348 esac # case $arg
3349 ;;
3350 esac # case $arg_mode
3351
3352 # Aesthetically quote the previous argument.
3353 func_append_quoted base_compile "$lastarg"
3354 done # for arg
3355
3356 case $arg_mode in
3357 arg)
3358 func_fatal_error "you must specify an argument for -Xcompile"
3359 ;;
3360 target)
3361 func_fatal_error "you must specify a target with '-o'"
3362 ;;
3363 *)
3364 # Get the name of the library object.
3365 test -z "$libobj" && {
3366 func_basename "$srcfile"
3367 libobj=$func_basename_result
3368 }
3369 ;;
3370 esac
3371
3372 # Recognize several different file suffixes.
3373 # If the user specifies -o file.o, it is replaced with file.lo
3374 case $libobj in
3375 *.[cCFSifmso] | \
3376 *.ada | *.adb | *.ads | *.asm | \
3377 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
3378 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
3379 func_xform "$libobj"
3380 libobj=$func_xform_result
3381 ;;
3382 esac
3383
3384 case $libobj in
3385 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
3386 *)
3387 func_fatal_error "cannot determine name of library object from '$libobj'"
3388 ;;
3389 esac
3390
3391 func_infer_tag $base_compile
3392
3393 for arg in $later; do
3394 case $arg in
3395 -shared)
3396 test yes = "$build_libtool_libs" \
3397 || func_fatal_configuration "cannot build a shared library"
3398 build_old_libs=no
3399 continue
3400 ;;
3401
3402 -static)
3403 build_libtool_libs=no
3404 build_old_libs=yes
3405 continue
3406 ;;
3407
3408 -prefer-pic)
3409 pic_mode=yes
3410 continue
3411 ;;
3412
3413 -prefer-non-pic)
3414 pic_mode=no
3415 continue
3416 ;;
3417 esac
3418 done
3419
3420 func_quote_for_eval "$libobj"
3421 test "X$libobj" != "X$func_quote_for_eval_result" \
3422 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
3423 && func_warning "libobj name '$libobj' may not contain shell special characters."
3424 func_dirname_and_basename "$obj" "/" ""
3425 objname=$func_basename_result
3426 xdir=$func_dirname_result
3427 lobj=$xdir$objdir/$objname
3428
3429 test -z "$base_compile" && \
3430 func_fatal_help "you must specify a compilation command"
3431
3432 # Delete any leftover library objects.
3433 if test yes = "$build_old_libs"; then
3434 removelist="$obj $lobj $libobj ${libobj}T"
3435 else
3436 removelist="$lobj $libobj ${libobj}T"
3437 fi
3438
3439 # On Cygwin there's no "real" PIC flag so we must build both object types
3440 case $host_os in
3441 cygwin* | mingw* | pw32* | os2* | cegcc*)
3442 pic_mode=default
3443 ;;
3444 esac
3445 if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
3446 # non-PIC code in shared libraries is not supported
3447 pic_mode=default
3448 fi
3449
3450 # Calculate the filename of the output object if compiler does
3451 # not support -o with -c
3452 if test no = "$compiler_c_o"; then
3453 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
3454 lockfile=$output_obj.lock
3455 else
3456 output_obj=
3457 need_locks=no
3458 lockfile=
3459 fi
3460
3461 # Lock this critical section if it is needed
3462 # We use this script file to make the link, it avoids creating a new file
3463 if test yes = "$need_locks"; then
3464 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3465 func_echo "Waiting for $lockfile to be removed"
3466 sleep 2
3467 done
3468 elif test warn = "$need_locks"; then
3469 if test -f "$lockfile"; then
3470 $ECHO "\
3471 *** ERROR, $lockfile exists and contains:
3472 `cat $lockfile 2>/dev/null`
3473
3474 This indicates that another process is trying to use the same
3475 temporary object file, and libtool could not work around it because
3476 your compiler does not support '-c' and '-o' together. If you
3477 repeat this compilation, it may succeed, by chance, but you had better
3478 avoid parallel builds (make -j) in this platform, or get a better
3479 compiler."
3480
3481 $opt_dry_run || $RM $removelist
3482 exit $EXIT_FAILURE
3483 fi
3484 func_append removelist " $output_obj"
3485 $ECHO "$srcfile" > "$lockfile"
3486 fi
3487
3488 $opt_dry_run || $RM $removelist
3489 func_append removelist " $lockfile"
3490 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
3491
3492 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
3493 srcfile=$func_to_tool_file_result
3494 func_quote_for_eval "$srcfile"
3495 qsrcfile=$func_quote_for_eval_result
3496
3497 # Only build a PIC object if we are building libtool libraries.
3498 if test yes = "$build_libtool_libs"; then
3499 # Without this assignment, base_compile gets emptied.
3500 fbsd_hideous_sh_bug=$base_compile
3501
3502 if test no != "$pic_mode"; then
3503 command="$base_compile $qsrcfile $pic_flag"
3504 else
3505 # Don't build PIC code
3506 command="$base_compile $qsrcfile"
3507 fi
3508
3509 func_mkdir_p "$xdir$objdir"
3510
3511 if test -z "$output_obj"; then
3512 # Place PIC objects in $objdir
3513 func_append command " -o $lobj"
3514 fi
3515
3516 func_show_eval_locale "$command" \
3517 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
3518
3519 if test warn = "$need_locks" &&
3520 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
3521 $ECHO "\
3522 *** ERROR, $lockfile contains:
3523 `cat $lockfile 2>/dev/null`
3524
3525 but it should contain:
3526 $srcfile
3527
3528 This indicates that another process is trying to use the same
3529 temporary object file, and libtool could not work around it because
3530 your compiler does not support '-c' and '-o' together. If you
3531 repeat this compilation, it may succeed, by chance, but you had better
3532 avoid parallel builds (make -j) in this platform, or get a better
3533 compiler."
3534
3535 $opt_dry_run || $RM $removelist
3536 exit $EXIT_FAILURE
3537 fi
3538
3539 # Just move the object if needed, then go on to compile the next one
3540 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
3541 func_show_eval '$MV "$output_obj" "$lobj"' \
3542 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
3543 fi
3544
3545 # Allow error messages only from the first compilation.
3546 if test yes = "$suppress_opt"; then
3547 suppress_output=' >/dev/null 2>&1'
3548 fi
3549 fi
3550
3551 # Only build a position-dependent object if we build old libraries.
3552 if test yes = "$build_old_libs"; then
3553 if test yes != "$pic_mode"; then
3554 # Don't build PIC code
3555 command="$base_compile $qsrcfile$pie_flag"
3556 else
3557 command="$base_compile $qsrcfile $pic_flag"
3558 fi
3559 if test yes = "$compiler_c_o"; then
3560 func_append command " -o $obj"
3561 fi
3562
3563 # Suppress compiler output if we already did a PIC compilation.
3564 func_append command "$suppress_output"
3565 func_show_eval_locale "$command" \
3566 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
3567
3568 if test warn = "$need_locks" &&
3569 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
3570 $ECHO "\
3571 *** ERROR, $lockfile contains:
3572 `cat $lockfile 2>/dev/null`
3573
3574 but it should contain:
3575 $srcfile
3576
3577 This indicates that another process is trying to use the same
3578 temporary object file, and libtool could not work around it because
3579 your compiler does not support '-c' and '-o' together. If you
3580 repeat this compilation, it may succeed, by chance, but you had better
3581 avoid parallel builds (make -j) in this platform, or get a better
3582 compiler."
3583
3584 $opt_dry_run || $RM $removelist
3585 exit $EXIT_FAILURE
3586 fi
3587
3588 # Just move the object if needed
3589 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
3590 func_show_eval '$MV "$output_obj" "$obj"' \
3591 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
3592 fi
3593 fi
3594
3595 $opt_dry_run || {
3596 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
3597
3598 # Unlock the critical section if it was locked
3599 if test no != "$need_locks"; then
3600 removelist=$lockfile
3601 $RM "$lockfile"
3602 fi
3603 }
3604
3605 exit $EXIT_SUCCESS
3606 }
3607
3608 $opt_help || {
3609 test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
3610 }
3611
3612 func_mode_help ()
3613 {
3614 # We need to display help for each of the modes.
3615 case $opt_mode in
3616 "")
3617 # Generic help is extracted from the usage comments
3618 # at the start of this file.
3619 func_help
3620 ;;
3621
3622 clean)
3623 $ECHO \
3624 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
3625
3626 Remove files from the build directory.
3627
3628 RM is the name of the program to use to delete files associated with each FILE
3629 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
3630 to RM.
3631
3632 If FILE is a libtool library, object or program, all the files associated
3633 with it are deleted. Otherwise, only FILE itself is deleted using RM."
3634 ;;
3635
3636 compile)
3637 $ECHO \
3638 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
3639
3640 Compile a source file into a libtool library object.
3641
3642 This mode accepts the following additional options:
3643
3644 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3645 -no-suppress do not suppress compiler output for multiple passes
3646 -prefer-pic try to build PIC objects only
3647 -prefer-non-pic try to build non-PIC objects only
3648 -shared do not build a '.o' file suitable for static linking
3649 -static only build a '.o' file suitable for static linking
3650 -Wc,FLAG pass FLAG directly to the compiler
3651
3652 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
3653 from the given SOURCEFILE.
3654
3655 The output file name is determined by removing the directory component from
3656 SOURCEFILE, then substituting the C source code suffix '.c' with the
3657 library object suffix, '.lo'."
3658 ;;
3659
3660 execute)
3661 $ECHO \
3662 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
3663
3664 Automatically set library path, then run a program.
3665
3666 This mode accepts the following additional options:
3667
3668 -dlopen FILE add the directory containing FILE to the library path
3669
3670 This mode sets the library path environment variable according to '-dlopen'
3671 flags.
3672
3673 If any of the ARGS are libtool executable wrappers, then they are translated
3674 into their corresponding uninstalled binary, and any of their required library
3675 directories are added to the library path.
3676
3677 Then, COMMAND is executed, with ARGS as arguments."
3678 ;;
3679
3680 finish)
3681 $ECHO \
3682 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
3683
3684 Complete the installation of libtool libraries.
3685
3686 Each LIBDIR is a directory that contains libtool libraries.
3687
3688 The commands that this mode executes may require superuser privileges. Use
3689 the '--dry-run' option if you just want to see what would be executed."
3690 ;;
3691
3692 install)
3693 $ECHO \
3694 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
3695
3696 Install executables or libraries.
3697
3698 INSTALL-COMMAND is the installation command. The first component should be
3699 either the 'install' or 'cp' program.
3700
3701 The following components of INSTALL-COMMAND are treated specially:
3702
3703 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
3704
3705 The rest of the components are interpreted as arguments to that command (only
3706 BSD-compatible install options are recognized)."
3707 ;;
3708
3709 link)
3710 $ECHO \
3711 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
3712
3713 Link object files or libraries together to form another library, or to
3714 create an executable program.
3715
3716 LINK-COMMAND is a command using the C compiler that you would use to create
3717 a program from several object files.
3718
3719 The following components of LINK-COMMAND are treated specially:
3720
3721 -all-static do not do any dynamic linking at all
3722 -avoid-version do not add a version suffix if possible
3723 -bindir BINDIR specify path to binaries directory (for systems where
3724 libraries must be found in the PATH setting at runtime)
3725 -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
3726 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
3727 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
3728 -export-symbols SYMFILE
3729 try to export only the symbols listed in SYMFILE
3730 -export-symbols-regex REGEX
3731 try to export only the symbols matching REGEX
3732 -LLIBDIR search LIBDIR for required installed libraries
3733 -lNAME OUTPUT-FILE requires the installed library libNAME
3734 -module build a library that can dlopened
3735 -no-fast-install disable the fast-install mode
3736 -no-install link a not-installable executable
3737 -no-undefined declare that a library does not refer to external symbols
3738 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
3739 -objectlist FILE use a list of object files found in FILE to specify objects
3740 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
3741 -precious-files-regex REGEX
3742 don't remove output files matching REGEX
3743 -release RELEASE specify package release information
3744 -rpath LIBDIR the created library will eventually be installed in LIBDIR
3745 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
3746 -shared only do dynamic linking of libtool libraries
3747 -shrext SUFFIX override the standard shared library file extension
3748 -static do not do any dynamic linking of uninstalled libtool libraries
3749 -static-libtool-libs
3750 do not do any dynamic linking of libtool libraries
3751 -version-info CURRENT[:REVISION[:AGE]]
3752 specify library version info [each variable defaults to 0]
3753 -weak LIBNAME declare that the target provides the LIBNAME interface
3754 -Wc,FLAG
3755 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
3756 -Wl,FLAG
3757 -Xlinker FLAG pass linker-specific FLAG directly to the linker
3758 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
3759
3760 All other options (arguments beginning with '-') are ignored.
3761
3762 Every other argument is treated as a filename. Files ending in '.la' are
3763 treated as uninstalled libtool libraries, other files are standard or library
3764 object files.
3765
3766 If the OUTPUT-FILE ends in '.la', then a libtool library is created,
3767 only library objects ('.lo' files) may be specified, and '-rpath' is
3768 required, except when creating a convenience library.
3769
3770 If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
3771 using 'ar' and 'ranlib', or on Windows using 'lib'.
3772
3773 If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
3774 is created, otherwise an executable program is created."
3775 ;;
3776
3777 uninstall)
3778 $ECHO \
3779 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
3780
3781 Remove libraries from an installation directory.
3782
3783 RM is the name of the program to use to delete files associated with each FILE
3784 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
3785 to RM.
3786
3787 If FILE is a libtool library, all the files associated with it are deleted.
3788 Otherwise, only FILE itself is deleted using RM."
3789 ;;
3790
3791 *)
3792 func_fatal_help "invalid operation mode '$opt_mode'"
3793 ;;
3794 esac
3795
3796 echo
3797 $ECHO "Try '$progname --help' for more information about other modes."
3798 }
3799
3800 # Now that we've collected a possible --mode arg, show help if necessary
3801 if $opt_help; then
3802 if test : = "$opt_help"; then
3803 func_mode_help
3804 else
3805 {
3806 func_help noexit
3807 for opt_mode in compile link execute install finish uninstall clean; do
3808 func_mode_help
3809 done
3810 } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
3811 {
3812 func_help noexit
3813 for opt_mode in compile link execute install finish uninstall clean; do
3814 echo
3815 func_mode_help
3816 done
3817 } |
3818 $SED '1d
3819 /^When reporting/,/^Report/{
3820 H
3821 d
3822 }
3823 $x
3824 /information about other modes/d
3825 /more detailed .*MODE/d
3826 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
3827 fi
3828 exit $?
3829 fi
3830
3831
3832 # func_mode_execute arg...
3833 func_mode_execute ()
3834 {
3835 $debug_cmd
3836
3837 # The first argument is the command name.
3838 cmd=$nonopt
3839 test -z "$cmd" && \
3840 func_fatal_help "you must specify a COMMAND"
3841
3842 # Handle -dlopen flags immediately.
3843 for file in $opt_dlopen; do
3844 test -f "$file" \
3845 || func_fatal_help "'$file' is not a file"
3846
3847 dir=
3848 case $file in
3849 *.la)
3850 func_resolve_sysroot "$file"
3851 file=$func_resolve_sysroot_result
3852
3853 # Check to see that this really is a libtool archive.
3854 func_lalib_unsafe_p "$file" \
3855 || func_fatal_help "'$lib' is not a valid libtool archive"
3856
3857 # Read the libtool library.
3858 dlname=
3859 library_names=
3860 func_source "$file"
3861
3862 # Skip this library if it cannot be dlopened.
3863 if test -z "$dlname"; then
3864 # Warn if it was a shared library.
3865 test -n "$library_names" && \
3866 func_warning "'$file' was not linked with '-export-dynamic'"
3867 continue
3868 fi
3869
3870 func_dirname "$file" "" "."
3871 dir=$func_dirname_result
3872
3873 if test -f "$dir/$objdir/$dlname"; then
3874 func_append dir "/$objdir"
3875 else
3876 if test ! -f "$dir/$dlname"; then
3877 func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
3878 fi
3879 fi
3880 ;;
3881
3882 *.lo)
3883 # Just add the directory containing the .lo file.
3884 func_dirname "$file" "" "."
3885 dir=$func_dirname_result
3886 ;;
3887
3888 *)
3889 func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
3890 continue
3891 ;;
3892 esac
3893
3894 # Get the absolute pathname.
3895 absdir=`cd "$dir" && pwd`
3896 test -n "$absdir" && dir=$absdir
3897
3898 # Now add the directory to shlibpath_var.
3899 if eval "test -z \"\$$shlibpath_var\""; then
3900 eval "$shlibpath_var=\"\$dir\""
3901 else
3902 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
3903 fi
3904 done
3905
3906 # This variable tells wrapper scripts just to set shlibpath_var
3907 # rather than running their programs.
3908 libtool_execute_magic=$magic
3909
3910 # Check if any of the arguments is a wrapper script.
3911 args=
3912 for file
3913 do
3914 case $file in
3915 -* | *.la | *.lo ) ;;
3916 *)
3917 # Do a test to see if this is really a libtool program.
3918 if func_ltwrapper_script_p "$file"; then
3919 func_source "$file"
3920 # Transform arg to wrapped name.
3921 file=$progdir/$program
3922 elif func_ltwrapper_executable_p "$file"; then
3923 func_ltwrapper_scriptname "$file"
3924 func_source "$func_ltwrapper_scriptname_result"
3925 # Transform arg to wrapped name.
3926 file=$progdir/$program
3927 fi
3928 ;;
3929 esac
3930 # Quote arguments (to preserve shell metacharacters).
3931 func_append_quoted args "$file"
3932 done
3933
3934 if $opt_dry_run; then
3935 # Display what would be done.
3936 if test -n "$shlibpath_var"; then
3937 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
3938 echo "export $shlibpath_var"
3939 fi
3940 $ECHO "$cmd$args"
3941 exit $EXIT_SUCCESS
3942 else
3943 if test -n "$shlibpath_var"; then
3944 # Export the shlibpath_var.
3945 eval "export $shlibpath_var"
3946 fi
3947
3948 # Restore saved environment variables
3949 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
3950 do
3951 eval "if test \"\${save_$lt_var+set}\" = set; then
3952 $lt_var=\$save_$lt_var; export $lt_var
3953 else
3954 $lt_unset $lt_var
3955 fi"
3956 done
3957
3958 # Now prepare to actually exec the command.
3959 exec_cmd=\$cmd$args
3960 fi
3961 }
3962
3963 test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
3964
3965
3966 # func_mode_finish arg...
3967 func_mode_finish ()
3968 {
3969 $debug_cmd
3970
3971 libs=
3972 libdirs=
3973 admincmds=
3974
3975 for opt in "$nonopt" ${1+"$@"}
3976 do
3977 if test -d "$opt"; then
3978 func_append libdirs " $opt"
3979
3980 elif test -f "$opt"; then
3981 if func_lalib_unsafe_p "$opt"; then
3982 func_append libs " $opt"
3983 else
3984 func_warning "'$opt' is not a valid libtool archive"
3985 fi
3986
3987 else
3988 func_fatal_error "invalid argument '$opt'"
3989 fi
3990 done
3991
3992 if test -n "$libs"; then
3993 if test -n "$lt_sysroot"; then
3994 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
3995 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
3996 else
3997 sysroot_cmd=
3998 fi
3999
4000 # Remove sysroot references
4001 if $opt_dry_run; then
4002 for lib in $libs; do
4003 echo "removing references to $lt_sysroot and '=' prefixes from $lib"
4004 done
4005 else
4006 tmpdir=`func_mktempdir`
4007 for lib in $libs; do
4008 $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
4009 > $tmpdir/tmp-la
4010 mv -f $tmpdir/tmp-la $lib
4011 done
4012 ${RM}r "$tmpdir"
4013 fi
4014 fi
4015
4016 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4017 for libdir in $libdirs; do
4018 if test -n "$finish_cmds"; then
4019 # Do each command in the finish commands.
4020 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
4021 '"$cmd"'"'
4022 fi
4023 if test -n "$finish_eval"; then
4024 # Do the single finish_eval.
4025 eval cmds=\"$finish_eval\"
4026 $opt_dry_run || eval "$cmds" || func_append admincmds "
4027 $cmds"
4028 fi
4029 done
4030 fi
4031
4032 # Exit here if they wanted silent mode.
4033 $opt_quiet && exit $EXIT_SUCCESS
4034
4035 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4036 echo "----------------------------------------------------------------------"
4037 echo "Libraries have been installed in:"
4038 for libdir in $libdirs; do
4039 $ECHO " $libdir"
4040 done
4041 echo
4042 echo "If you ever happen to want to link against installed libraries"
4043 echo "in a given directory, LIBDIR, you must either use libtool, and"
4044 echo "specify the full pathname of the library, or use the '-LLIBDIR'"
4045 echo "flag during linking and do at least one of the following:"
4046 if test -n "$shlibpath_var"; then
4047 echo " - add LIBDIR to the '$shlibpath_var' environment variable"
4048 echo " during execution"
4049 fi
4050 if test -n "$runpath_var"; then
4051 echo " - add LIBDIR to the '$runpath_var' environment variable"
4052 echo " during linking"
4053 fi
4054 if test -n "$hardcode_libdir_flag_spec"; then
4055 libdir=LIBDIR
4056 eval flag=\"$hardcode_libdir_flag_spec\"
4057
4058 $ECHO " - use the '$flag' linker flag"
4059 fi
4060 if test -n "$admincmds"; then
4061 $ECHO " - have your system administrator run these commands:$admincmds"
4062 fi
4063 if test -f /etc/ld.so.conf; then
4064 echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
4065 fi
4066 echo
4067
4068 echo "See any operating system documentation about shared libraries for"
4069 case $host in
4070 solaris2.[6789]|solaris2.1[0-9])
4071 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
4072 echo "pages."
4073 ;;
4074 *)
4075 echo "more information, such as the ld(1) and ld.so(8) manual pages."
4076 ;;
4077 esac
4078 echo "----------------------------------------------------------------------"
4079 fi
4080 exit $EXIT_SUCCESS
4081 }
4082
4083 test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
4084
4085
4086 # func_mode_install arg...
4087 func_mode_install ()
4088 {
4089 $debug_cmd
4090
4091 # There may be an optional sh(1) argument at the beginning of
4092 # install_prog (especially on Windows NT).
4093 if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
4094 # Allow the use of GNU shtool's install command.
4095 case $nonopt in *shtool*) :;; *) false;; esac
4096 then
4097 # Aesthetically quote it.
4098 func_quote_for_eval "$nonopt"
4099 install_prog="$func_quote_for_eval_result "
4100 arg=$1
4101 shift
4102 else
4103 install_prog=
4104 arg=$nonopt
4105 fi
4106
4107 # The real first argument should be the name of the installation program.
4108 # Aesthetically quote it.
4109 func_quote_for_eval "$arg"
4110 func_append install_prog "$func_quote_for_eval_result"
4111 install_shared_prog=$install_prog
4112 case " $install_prog " in
4113 *[\\\ /]cp\ *) install_cp=: ;;
4114 *) install_cp=false ;;
4115 esac
4116
4117 # We need to accept at least all the BSD install flags.
4118 dest=
4119 files=
4120 opts=
4121 prev=
4122 install_type=
4123 isdir=false
4124 stripme=
4125 no_mode=:
4126 for arg
4127 do
4128 arg2=
4129 if test -n "$dest"; then
4130 func_append files " $dest"
4131 dest=$arg
4132 continue
4133 fi
4134
4135 case $arg in
4136 -d) isdir=: ;;
4137 -f)
4138 if $install_cp; then :; else
4139 prev=$arg
4140 fi
4141 ;;
4142 -g | -m | -o)
4143 prev=$arg
4144 ;;
4145 -s)
4146 stripme=" -s"
4147 continue
4148 ;;
4149 -*)
4150 ;;
4151 *)
4152 # If the previous option needed an argument, then skip it.
4153 if test -n "$prev"; then
4154 if test X-m = "X$prev" && test -n "$install_override_mode"; then
4155 arg2=$install_override_mode
4156 no_mode=false
4157 fi
4158 prev=
4159 else
4160 dest=$arg
4161 continue
4162 fi
4163 ;;
4164 esac
4165
4166 # Aesthetically quote the argument.
4167 func_quote_for_eval "$arg"
4168 func_append install_prog " $func_quote_for_eval_result"
4169 if test -n "$arg2"; then
4170 func_quote_for_eval "$arg2"
4171 fi
4172 func_append install_shared_prog " $func_quote_for_eval_result"
4173 done
4174
4175 test -z "$install_prog" && \
4176 func_fatal_help "you must specify an install program"
4177
4178 test -n "$prev" && \
4179 func_fatal_help "the '$prev' option requires an argument"
4180
4181 if test -n "$install_override_mode" && $no_mode; then
4182 if $install_cp; then :; else
4183 func_quote_for_eval "$install_override_mode"
4184 func_append install_shared_prog " -m $func_quote_for_eval_result"
4185 fi
4186 fi
4187
4188 if test -z "$files"; then
4189 if test -z "$dest"; then
4190 func_fatal_help "no file or destination specified"
4191 else
4192 func_fatal_help "you must specify a destination"
4193 fi
4194 fi
4195
4196 # Strip any trailing slash from the destination.
4197 func_stripname '' '/' "$dest"
4198 dest=$func_stripname_result
4199
4200 # Check to see that the destination is a directory.
4201 test -d "$dest" && isdir=:
4202 if $isdir; then
4203 destdir=$dest
4204 destname=
4205 else
4206 func_dirname_and_basename "$dest" "" "."
4207 destdir=$func_dirname_result
4208 destname=$func_basename_result
4209
4210 # Not a directory, so check to see that there is only one file specified.
4211 set dummy $files; shift
4212 test "$#" -gt 1 && \
4213 func_fatal_help "'$dest' is not a directory"
4214 fi
4215 case $destdir in
4216 [\\/]* | [A-Za-z]:[\\/]*) ;;
4217 *)
4218 for file in $files; do
4219 case $file in
4220 *.lo) ;;
4221 *)
4222 func_fatal_help "'$destdir' must be an absolute directory name"
4223 ;;
4224 esac
4225 done
4226 ;;
4227 esac
4228
4229 # This variable tells wrapper scripts just to set variables rather
4230 # than running their programs.
4231 libtool_install_magic=$magic
4232
4233 staticlibs=
4234 future_libdirs=
4235 current_libdirs=
4236 for file in $files; do
4237
4238 # Do each installation.
4239 case $file in
4240 *.$libext)
4241 # Do the static libraries later.
4242 func_append staticlibs " $file"
4243 ;;
4244
4245 *.la)
4246 func_resolve_sysroot "$file"
4247 file=$func_resolve_sysroot_result
4248
4249 # Check to see that this really is a libtool archive.
4250 func_lalib_unsafe_p "$file" \
4251 || func_fatal_help "'$file' is not a valid libtool archive"
4252
4253 library_names=
4254 old_library=
4255 relink_command=
4256 func_source "$file"
4257
4258 # Add the libdir to current_libdirs if it is the destination.
4259 if test "X$destdir" = "X$libdir"; then
4260 case "$current_libdirs " in
4261 *" $libdir "*) ;;
4262 *) func_append current_libdirs " $libdir" ;;
4263 esac
4264 else
4265 # Note the libdir as a future libdir.
4266 case "$future_libdirs " in
4267 *" $libdir "*) ;;
4268 *) func_append future_libdirs " $libdir" ;;
4269 esac
4270 fi
4271
4272 func_dirname "$file" "/" ""
4273 dir=$func_dirname_result
4274 func_append dir "$objdir"
4275
4276 if test -n "$relink_command"; then
4277 # Determine the prefix the user has applied to our future dir.
4278 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
4279
4280 # Don't allow the user to place us outside of our expected
4281 # location b/c this prevents finding dependent libraries that
4282 # are installed to the same prefix.
4283 # At present, this check doesn't affect windows .dll's that
4284 # are installed into $libdir/../bin (currently, that works fine)
4285 # but it's something to keep an eye on.
4286 test "$inst_prefix_dir" = "$destdir" && \
4287 func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
4288
4289 if test -n "$inst_prefix_dir"; then
4290 # Stick the inst_prefix_dir data into the link command.
4291 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
4292 else
4293 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
4294 fi
4295
4296 func_warning "relinking '$file'"
4297 func_show_eval "$relink_command" \
4298 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
4299 fi
4300
4301 # See the names of the shared library.
4302 set dummy $library_names; shift
4303 if test -n "$1"; then
4304 realname=$1
4305 shift
4306
4307 srcname=$realname
4308 test -n "$relink_command" && srcname=${realname}T
4309
4310 # Install the shared library and build the symlinks.
4311 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
4312 'exit $?'
4313 tstripme=$stripme
4314 case $host_os in
4315 cygwin* | mingw* | pw32* | cegcc*)
4316 case $realname in
4317 *.dll.a)
4318 tstripme=
4319 ;;
4320 esac
4321 ;;
4322 os2*)
4323 case $realname in
4324 *_dll.a)
4325 tstripme=
4326 ;;
4327 esac
4328 ;;
4329 esac
4330 if test -n "$tstripme" && test -n "$striplib"; then
4331 func_show_eval "$striplib $destdir/$realname" 'exit $?'
4332 fi
4333
4334 if test "$#" -gt 0; then
4335 # Delete the old symlinks, and create new ones.
4336 # Try 'ln -sf' first, because the 'ln' binary might depend on
4337 # the symlink we replace! Solaris /bin/ln does not understand -f,
4338 # so we also need to try rm && ln -s.
4339 for linkname
4340 do
4341 test "$linkname" != "$realname" \
4342 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
4343 done
4344 fi
4345
4346 # Do each command in the postinstall commands.
4347 lib=$destdir/$realname
4348 func_execute_cmds "$postinstall_cmds" 'exit $?'
4349 fi
4350
4351 # Install the pseudo-library for information purposes.
4352 func_basename "$file"
4353 name=$func_basename_result
4354 instname=$dir/${name}i
4355 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
4356
4357 # Maybe install the static library, too.
4358 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
4359 ;;
4360
4361 *.lo)
4362 # Install (i.e. copy) a libtool object.
4363
4364 # Figure out destination file name, if it wasn't already specified.
4365 if test -n "$destname"; then
4366 destfile=$destdir/$destname
4367 else
4368 func_basename "$file"
4369 destfile=$func_basename_result
4370 destfile=$destdir/$destfile
4371 fi
4372
4373 # Deduce the name of the destination old-style object file.
4374 case $destfile in
4375 *.lo)
4376 func_lo2o "$destfile"
4377 staticdest=$func_lo2o_result
4378 ;;
4379 *.$objext)
4380 staticdest=$destfile
4381 destfile=
4382 ;;
4383 *)
4384 func_fatal_help "cannot copy a libtool object to '$destfile'"
4385 ;;
4386 esac
4387
4388 # Install the libtool object if requested.
4389 test -n "$destfile" && \
4390 func_show_eval "$install_prog $file $destfile" 'exit $?'
4391
4392 # Install the old object if enabled.
4393 if test yes = "$build_old_libs"; then
4394 # Deduce the name of the old-style object file.
4395 func_lo2o "$file"
4396 staticobj=$func_lo2o_result
4397 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
4398 fi
4399 exit $EXIT_SUCCESS
4400 ;;
4401
4402 *)
4403 # Figure out destination file name, if it wasn't already specified.
4404 if test -n "$destname"; then
4405 destfile=$destdir/$destname
4406 else
4407 func_basename "$file"
4408 destfile=$func_basename_result
4409 destfile=$destdir/$destfile
4410 fi
4411
4412 # If the file is missing, and there is a .exe on the end, strip it
4413 # because it is most likely a libtool script we actually want to
4414 # install
4415 stripped_ext=
4416 case $file in
4417 *.exe)
4418 if test ! -f "$file"; then
4419 func_stripname '' '.exe' "$file"
4420 file=$func_stripname_result
4421 stripped_ext=.exe
4422 fi
4423 ;;
4424 esac
4425
4426 # Do a test to see if this is really a libtool program.
4427 case $host in
4428 *cygwin* | *mingw*)
4429 if func_ltwrapper_executable_p "$file"; then
4430 func_ltwrapper_scriptname "$file"
4431 wrapper=$func_ltwrapper_scriptname_result
4432 else
4433 func_stripname '' '.exe' "$file"
4434 wrapper=$func_stripname_result
4435 fi
4436 ;;
4437 *)
4438 wrapper=$file
4439 ;;
4440 esac
4441 if func_ltwrapper_script_p "$wrapper"; then
4442 notinst_deplibs=
4443 relink_command=
4444
4445 func_source "$wrapper"
4446
4447 # Check the variables that should have been set.
4448 test -z "$generated_by_libtool_version" && \
4449 func_fatal_error "invalid libtool wrapper script '$wrapper'"
4450
4451 finalize=:
4452 for lib in $notinst_deplibs; do
4453 # Check to see that each library is installed.
4454 libdir=
4455 if test -f "$lib"; then
4456 func_source "$lib"
4457 fi
4458 libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
4459 if test -n "$libdir" && test ! -f "$libfile"; then
4460 func_warning "'$lib' has not been installed in '$libdir'"
4461 finalize=false
4462 fi
4463 done
4464
4465 relink_command=
4466 func_source "$wrapper"
4467
4468 outputname=
4469 if test no = "$fast_install" && test -n "$relink_command"; then
4470 $opt_dry_run || {
4471 if $finalize; then
4472 tmpdir=`func_mktempdir`
4473 func_basename "$file$stripped_ext"
4474 file=$func_basename_result
4475 outputname=$tmpdir/$file
4476 # Replace the output file specification.
4477 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
4478
4479 $opt_quiet || {
4480 func_quote_for_expand "$relink_command"
4481 eval "func_echo $func_quote_for_expand_result"
4482 }
4483 if eval "$relink_command"; then :
4484 else
4485 func_error "error: relink '$file' with the above command before installing it"
4486 $opt_dry_run || ${RM}r "$tmpdir"
4487 continue
4488 fi
4489 file=$outputname
4490 else
4491 func_warning "cannot relink '$file'"
4492 fi
4493 }
4494 else
4495 # Install the binary that we compiled earlier.
4496 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
4497 fi
4498 fi
4499
4500 # remove .exe since cygwin /usr/bin/install will append another
4501 # one anyway
4502 case $install_prog,$host in
4503 */usr/bin/install*,*cygwin*)
4504 case $file:$destfile in
4505 *.exe:*.exe)
4506 # this is ok
4507 ;;
4508 *.exe:*)
4509 destfile=$destfile.exe
4510 ;;
4511 *:*.exe)
4512 func_stripname '' '.exe' "$destfile"
4513 destfile=$func_stripname_result
4514 ;;
4515 esac
4516 ;;
4517 esac
4518 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
4519 $opt_dry_run || if test -n "$outputname"; then
4520 ${RM}r "$tmpdir"
4521 fi
4522 ;;
4523 esac
4524 done
4525
4526 for file in $staticlibs; do
4527 func_basename "$file"
4528 name=$func_basename_result
4529
4530 # Set up the ranlib parameters.
4531 oldlib=$destdir/$name
4532 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
4533 tool_oldlib=$func_to_tool_file_result
4534
4535 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
4536
4537 if test -n "$stripme" && test -n "$old_striplib"; then
4538 func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
4539 fi
4540
4541 # Do each command in the postinstall commands.
4542 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
4543 done
4544
4545 test -n "$future_libdirs" && \
4546 func_warning "remember to run '$progname --finish$future_libdirs'"
4547
4548 if test -n "$current_libdirs"; then
4549 # Maybe just do a dry run.
4550 $opt_dry_run && current_libdirs=" -n$current_libdirs"
4551 exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
4552 else
4553 exit $EXIT_SUCCESS
4554 fi
4555 }
4556
4557 test install = "$opt_mode" && func_mode_install ${1+"$@"}
4558
4559
4560 # func_generate_dlsyms outputname originator pic_p
4561 # Extract symbols from dlprefiles and create ${outputname}S.o with
4562 # a dlpreopen symbol table.
4563 func_generate_dlsyms ()
4564 {
4565 $debug_cmd
4566
4567 my_outputname=$1
4568 my_originator=$2
4569 my_pic_p=${3-false}
4570 my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
4571 my_dlsyms=
4572
4573 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
4574 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4575 my_dlsyms=${my_outputname}S.c
4576 else
4577 func_error "not configured to extract global symbols from dlpreopened files"
4578 fi
4579 fi
4580
4581 if test -n "$my_dlsyms"; then
4582 case $my_dlsyms in
4583 "") ;;
4584 *.c)
4585 # Discover the nlist of each of the dlfiles.
4586 nlist=$output_objdir/$my_outputname.nm
4587
4588 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
4589
4590 # Parse the name list into a source file.
4591 func_verbose "creating $output_objdir/$my_dlsyms"
4592
4593 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
4594 /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
4595 /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
4596
4597 #ifdef __cplusplus
4598 extern \"C\" {
4599 #endif
4600
4601 #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
4602 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
4603 #endif
4604
4605 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4606 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4607 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4608 relocations are performed -- see ld's documentation on pseudo-relocs. */
4609 # define LT_DLSYM_CONST
4610 #elif defined __osf__
4611 /* This system does not cope well with relocations in const data. */
4612 # define LT_DLSYM_CONST
4613 #else
4614 # define LT_DLSYM_CONST const
4615 #endif
4616
4617 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
4618
4619 /* External symbol declarations for the compiler. */\
4620 "
4621
4622 if test yes = "$dlself"; then
4623 func_verbose "generating symbol list for '$output'"
4624
4625 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
4626
4627 # Add our own program objects to the symbol list.
4628 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
4629 for progfile in $progfiles; do
4630 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
4631 func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
4632 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
4633 done
4634
4635 if test -n "$exclude_expsyms"; then
4636 $opt_dry_run || {
4637 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4638 eval '$MV "$nlist"T "$nlist"'
4639 }
4640 fi
4641
4642 if test -n "$export_symbols_regex"; then
4643 $opt_dry_run || {
4644 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4645 eval '$MV "$nlist"T "$nlist"'
4646 }
4647 fi
4648
4649 # Prepare the list of exported symbols
4650 if test -z "$export_symbols"; then
4651 export_symbols=$output_objdir/$outputname.exp
4652 $opt_dry_run || {
4653 $RM $export_symbols
4654 eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4655 case $host in
4656 *cygwin* | *mingw* | *cegcc* )
4657 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4658 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4659 ;;
4660 esac
4661 }
4662 else
4663 $opt_dry_run || {
4664 eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4665 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4666 eval '$MV "$nlist"T "$nlist"'
4667 case $host in
4668 *cygwin* | *mingw* | *cegcc* )
4669 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4670 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4671 ;;
4672 esac
4673 }
4674 fi
4675 fi
4676
4677 for dlprefile in $dlprefiles; do
4678 func_verbose "extracting global C symbols from '$dlprefile'"
4679 func_basename "$dlprefile"
4680 name=$func_basename_result
4681 case $host in
4682 *cygwin* | *mingw* | *cegcc* )
4683 # if an import library, we need to obtain dlname
4684 if func_win32_import_lib_p "$dlprefile"; then
4685 func_tr_sh "$dlprefile"
4686 eval "curr_lafile=\$libfile_$func_tr_sh_result"
4687 dlprefile_dlbasename=
4688 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
4689 # Use subshell, to avoid clobbering current variable values
4690 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
4691 if test -n "$dlprefile_dlname"; then
4692 func_basename "$dlprefile_dlname"
4693 dlprefile_dlbasename=$func_basename_result
4694 else
4695 # no lafile. user explicitly requested -dlpreopen <import library>.
4696 $sharedlib_from_linklib_cmd "$dlprefile"
4697 dlprefile_dlbasename=$sharedlib_from_linklib_result
4698 fi
4699 fi
4700 $opt_dry_run || {
4701 if test -n "$dlprefile_dlbasename"; then
4702 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
4703 else
4704 func_warning "Could not compute DLL name from $name"
4705 eval '$ECHO ": $name " >> "$nlist"'
4706 fi
4707 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4708 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
4709 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
4710 }
4711 else # not an import lib
4712 $opt_dry_run || {
4713 eval '$ECHO ": $name " >> "$nlist"'
4714 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4715 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
4716 }
4717 fi
4718 ;;
4719 *)
4720 $opt_dry_run || {
4721 eval '$ECHO ": $name " >> "$nlist"'
4722 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4723 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
4724 }
4725 ;;
4726 esac
4727 done
4728
4729 $opt_dry_run || {
4730 # Make sure we have at least an empty file.
4731 test -f "$nlist" || : > "$nlist"
4732
4733 if test -n "$exclude_expsyms"; then
4734 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4735 $MV "$nlist"T "$nlist"
4736 fi
4737
4738 # Try sorting and uniquifying the output.
4739 if $GREP -v "^: " < "$nlist" |
4740 if sort -k 3 </dev/null >/dev/null 2>&1; then
4741 sort -k 3
4742 else
4743 sort +2
4744 fi |
4745 uniq > "$nlist"S; then
4746 :
4747 else
4748 $GREP -v "^: " < "$nlist" > "$nlist"S
4749 fi
4750
4751 if test -f "$nlist"S; then
4752 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
4753 else
4754 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
4755 fi
4756
4757 func_show_eval '$RM "${nlist}I"'
4758 if test -n "$global_symbol_to_import"; then
4759 eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
4760 fi
4761
4762 echo >> "$output_objdir/$my_dlsyms" "\
4763
4764 /* The mapping between symbol names and symbols. */
4765 typedef struct {
4766 const char *name;
4767 void *address;
4768 } lt_dlsymlist;
4769 extern LT_DLSYM_CONST lt_dlsymlist
4770 lt_${my_prefix}_LTX_preloaded_symbols[];\
4771 "
4772
4773 if test -s "$nlist"I; then
4774 echo >> "$output_objdir/$my_dlsyms" "\
4775 static void lt_syminit(void)
4776 {
4777 LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
4778 for (; symbol->name; ++symbol)
4779 {"
4780 $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
4781 echo >> "$output_objdir/$my_dlsyms" "\
4782 }
4783 }"
4784 fi
4785 echo >> "$output_objdir/$my_dlsyms" "\
4786 LT_DLSYM_CONST lt_dlsymlist
4787 lt_${my_prefix}_LTX_preloaded_symbols[] =
4788 { {\"$my_originator\", (void *) 0},"
4789
4790 if test -s "$nlist"I; then
4791 echo >> "$output_objdir/$my_dlsyms" "\
4792 {\"@INIT@\", (void *) &lt_syminit},"
4793 fi
4794
4795 case $need_lib_prefix in
4796 no)
4797 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
4798 ;;
4799 *)
4800 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
4801 ;;
4802 esac
4803 echo >> "$output_objdir/$my_dlsyms" "\
4804 {0, (void *) 0}
4805 };
4806
4807 /* This works around a problem in FreeBSD linker */
4808 #ifdef FREEBSD_WORKAROUND
4809 static const void *lt_preloaded_setup() {
4810 return lt_${my_prefix}_LTX_preloaded_symbols;
4811 }
4812 #endif
4813
4814 #ifdef __cplusplus
4815 }
4816 #endif\
4817 "
4818 } # !$opt_dry_run
4819
4820 pic_flag_for_symtable=
4821 case "$compile_command " in
4822 *" -static "*) ;;
4823 *)
4824 case $host in
4825 # compiling the symbol table file with pic_flag works around
4826 # a FreeBSD bug that causes programs to crash when -lm is
4827 # linked before any other PIC object. But we must not use
4828 # pic_flag when linking with -static. The problem exists in
4829 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4830 *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4831 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
4832 *-*-hpux*)
4833 pic_flag_for_symtable=" $pic_flag" ;;
4834 *)
4835 $my_pic_p && pic_flag_for_symtable=" $pic_flag"
4836 ;;
4837 esac
4838 ;;
4839 esac
4840 symtab_cflags=
4841 for arg in $LTCFLAGS; do
4842 case $arg in
4843 -pie | -fpie | -fPIE) ;;
4844 *) func_append symtab_cflags " $arg" ;;
4845 esac
4846 done
4847
4848 # Now compile the dynamic symbol file.
4849 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
4850
4851 # Clean up the generated files.
4852 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
4853
4854 # Transform the symbol file into the correct name.
4855 symfileobj=$output_objdir/${my_outputname}S.$objext
4856 case $host in
4857 *cygwin* | *mingw* | *cegcc* )
4858 if test -f "$output_objdir/$my_outputname.def"; then
4859 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
4860 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
4861 else
4862 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4863 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4864 fi
4865 ;;
4866 *)
4867 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4868 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4869 ;;
4870 esac
4871 ;;
4872 *)
4873 func_fatal_error "unknown suffix for '$my_dlsyms'"
4874 ;;
4875 esac
4876 else
4877 # We keep going just in case the user didn't refer to
4878 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4879 # really was required.
4880
4881 # Nullify the symbol file.
4882 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
4883 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
4884 fi
4885 }
4886
4887 # func_cygming_gnu_implib_p ARG
4888 # This predicate returns with zero status (TRUE) if
4889 # ARG is a GNU/binutils-style import library. Returns
4890 # with nonzero status (FALSE) otherwise.
4891 func_cygming_gnu_implib_p ()
4892 {
4893 $debug_cmd
4894
4895 func_to_tool_file "$1" func_convert_file_msys_to_w32
4896 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
4897 test -n "$func_cygming_gnu_implib_tmp"
4898 }
4899
4900 # func_cygming_ms_implib_p ARG
4901 # This predicate returns with zero status (TRUE) if
4902 # ARG is an MS-style import library. Returns
4903 # with nonzero status (FALSE) otherwise.
4904 func_cygming_ms_implib_p ()
4905 {
4906 $debug_cmd
4907
4908 func_to_tool_file "$1" func_convert_file_msys_to_w32
4909 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
4910 test -n "$func_cygming_ms_implib_tmp"
4911 }
4912
4913 # func_win32_libid arg
4914 # return the library type of file 'arg'
4915 #
4916 # Need a lot of goo to handle *both* DLLs and import libs
4917 # Has to be a shell function in order to 'eat' the argument
4918 # that is supplied when $file_magic_command is called.
4919 # Despite the name, also deal with 64 bit binaries.
4920 func_win32_libid ()
4921 {
4922 $debug_cmd
4923
4924 win32_libid_type=unknown
4925 win32_fileres=`file -L $1 2>/dev/null`
4926 case $win32_fileres in
4927 *ar\ archive\ import\ library*) # definitely import
4928 win32_libid_type="x86 archive import"
4929 ;;
4930 *ar\ archive*) # could be an import, or static
4931 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
4932 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
4933 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
4934 case $nm_interface in
4935 "MS dumpbin")
4936 if func_cygming_ms_implib_p "$1" ||
4937 func_cygming_gnu_implib_p "$1"
4938 then
4939 win32_nmres=import
4940 else
4941 win32_nmres=
4942 fi
4943 ;;
4944 *)
4945 func_to_tool_file "$1" func_convert_file_msys_to_w32
4946 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
4947 $SED -n -e '
4948 1,100{
4949 / I /{
4950 s|.*|import|
4951 p
4952 q
4953 }
4954 }'`
4955 ;;
4956 esac
4957 case $win32_nmres in
4958 import*) win32_libid_type="x86 archive import";;
4959 *) win32_libid_type="x86 archive static";;
4960 esac
4961 fi
4962 ;;
4963 *DLL*)
4964 win32_libid_type="x86 DLL"
4965 ;;
4966 *executable*) # but shell scripts are "executable" too...
4967 case $win32_fileres in
4968 *MS\ Windows\ PE\ Intel*)
4969 win32_libid_type="x86 DLL"
4970 ;;
4971 esac
4972 ;;
4973 esac
4974 $ECHO "$win32_libid_type"
4975 }
4976
4977 # func_cygming_dll_for_implib ARG
4978 #
4979 # Platform-specific function to extract the
4980 # name of the DLL associated with the specified
4981 # import library ARG.
4982 # Invoked by eval'ing the libtool variable
4983 # $sharedlib_from_linklib_cmd
4984 # Result is available in the variable
4985 # $sharedlib_from_linklib_result
4986 func_cygming_dll_for_implib ()
4987 {
4988 $debug_cmd
4989
4990 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
4991 }
4992
4993 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
4994 #
4995 # The is the core of a fallback implementation of a
4996 # platform-specific function to extract the name of the
4997 # DLL associated with the specified import library LIBNAME.
4998 #
4999 # SECTION_NAME is either .idata$6 or .idata$7, depending
5000 # on the platform and compiler that created the implib.
5001 #
5002 # Echos the name of the DLL associated with the
5003 # specified import library.
5004 func_cygming_dll_for_implib_fallback_core ()
5005 {
5006 $debug_cmd
5007
5008 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
5009 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
5010 $SED '/^Contents of section '"$match_literal"':/{
5011 # Place marker at beginning of archive member dllname section
5012 s/.*/====MARK====/
5013 p
5014 d
5015 }
5016 # These lines can sometimes be longer than 43 characters, but
5017 # are always uninteresting
5018 /:[ ]*file format pe[i]\{,1\}-/d
5019 /^In archive [^:]*:/d
5020 # Ensure marker is printed
5021 /^====MARK====/p
5022 # Remove all lines with less than 43 characters
5023 /^.\{43\}/!d
5024 # From remaining lines, remove first 43 characters
5025 s/^.\{43\}//' |
5026 $SED -n '
5027 # Join marker and all lines until next marker into a single line
5028 /^====MARK====/ b para
5029 H
5030 $ b para
5031 b
5032 :para
5033 x
5034 s/\n//g
5035 # Remove the marker
5036 s/^====MARK====//
5037 # Remove trailing dots and whitespace
5038 s/[\. \t]*$//
5039 # Print
5040 /./p' |
5041 # we now have a list, one entry per line, of the stringified
5042 # contents of the appropriate section of all members of the
5043 # archive that possess that section. Heuristic: eliminate
5044 # all those that have a first or second character that is
5045 # a '.' (that is, objdump's representation of an unprintable
5046 # character.) This should work for all archives with less than
5047 # 0x302f exports -- but will fail for DLLs whose name actually
5048 # begins with a literal '.' or a single character followed by
5049 # a '.'.
5050 #
5051 # Of those that remain, print the first one.
5052 $SED -e '/^\./d;/^.\./d;q'
5053 }
5054
5055 # func_cygming_dll_for_implib_fallback ARG
5056 # Platform-specific function to extract the
5057 # name of the DLL associated with the specified
5058 # import library ARG.
5059 #
5060 # This fallback implementation is for use when $DLLTOOL
5061 # does not support the --identify-strict option.
5062 # Invoked by eval'ing the libtool variable
5063 # $sharedlib_from_linklib_cmd
5064 # Result is available in the variable
5065 # $sharedlib_from_linklib_result
5066 func_cygming_dll_for_implib_fallback ()
5067 {
5068 $debug_cmd
5069
5070 if func_cygming_gnu_implib_p "$1"; then
5071 # binutils import library
5072 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
5073 elif func_cygming_ms_implib_p "$1"; then
5074 # ms-generated import library
5075 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
5076 else
5077 # unknown
5078 sharedlib_from_linklib_result=
5079 fi
5080 }
5081
5082
5083 # func_extract_an_archive dir oldlib
5084 func_extract_an_archive ()
5085 {
5086 $debug_cmd
5087
5088 f_ex_an_ar_dir=$1; shift
5089 f_ex_an_ar_oldlib=$1
5090 if test yes = "$lock_old_archive_extraction"; then
5091 lockfile=$f_ex_an_ar_oldlib.lock
5092 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
5093 func_echo "Waiting for $lockfile to be removed"
5094 sleep 2
5095 done
5096 fi
5097 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
5098 'stat=$?; rm -f "$lockfile"; exit $stat'
5099 if test yes = "$lock_old_archive_extraction"; then
5100 $opt_dry_run || rm -f "$lockfile"
5101 fi
5102 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
5103 :
5104 else
5105 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
5106 fi
5107 }
5108
5109
5110 # func_extract_archives gentop oldlib ...
5111 func_extract_archives ()
5112 {
5113 $debug_cmd
5114
5115 my_gentop=$1; shift
5116 my_oldlibs=${1+"$@"}
5117 my_oldobjs=
5118 my_xlib=
5119 my_xabs=
5120 my_xdir=
5121
5122 for my_xlib in $my_oldlibs; do
5123 # Extract the objects.
5124 case $my_xlib in
5125 [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
5126 *) my_xabs=`pwd`"/$my_xlib" ;;
5127 esac
5128 func_basename "$my_xlib"
5129 my_xlib=$func_basename_result
5130 my_xlib_u=$my_xlib
5131 while :; do
5132 case " $extracted_archives " in
5133 *" $my_xlib_u "*)
5134 func_arith $extracted_serial + 1
5135 extracted_serial=$func_arith_result
5136 my_xlib_u=lt$extracted_serial-$my_xlib ;;
5137 *) break ;;
5138 esac
5139 done
5140 extracted_archives="$extracted_archives $my_xlib_u"
5141 my_xdir=$my_gentop/$my_xlib_u
5142
5143 func_mkdir_p "$my_xdir"
5144
5145 case $host in
5146 *-darwin*)
5147 func_verbose "Extracting $my_xabs"
5148 # Do not bother doing anything if just a dry run
5149 $opt_dry_run || {
5150 darwin_orig_dir=`pwd`
5151 cd $my_xdir || exit $?
5152 darwin_archive=$my_xabs
5153 darwin_curdir=`pwd`
5154 func_basename "$darwin_archive"
5155 darwin_base_archive=$func_basename_result
5156 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
5157 if test -n "$darwin_arches"; then
5158 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
5159 darwin_arch=
5160 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
5161 for darwin_arch in $darwin_arches; do
5162 func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
5163 $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
5164 cd "unfat-$$/$darwin_base_archive-$darwin_arch"
5165 func_extract_an_archive "`pwd`" "$darwin_base_archive"
5166 cd "$darwin_curdir"
5167 $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
5168 done # $darwin_arches
5169 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
5170 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
5171 darwin_file=
5172 darwin_files=
5173 for darwin_file in $darwin_filelist; do
5174 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
5175 $LIPO -create -output "$darwin_file" $darwin_files
5176 done # $darwin_filelist
5177 $RM -rf unfat-$$
5178 cd "$darwin_orig_dir"
5179 else
5180 cd $darwin_orig_dir
5181 func_extract_an_archive "$my_xdir" "$my_xabs"
5182 fi # $darwin_arches
5183 } # !$opt_dry_run
5184 ;;
5185 *)
5186 func_extract_an_archive "$my_xdir" "$my_xabs"
5187 ;;
5188 esac
5189 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
5190 done
5191
5192 func_extract_archives_result=$my_oldobjs
5193 }
5194
5195
5196 # func_emit_wrapper [arg=no]
5197 #
5198 # Emit a libtool wrapper script on stdout.
5199 # Don't directly open a file because we may want to
5200 # incorporate the script contents within a cygwin/mingw
5201 # wrapper executable. Must ONLY be called from within
5202 # func_mode_link because it depends on a number of variables
5203 # set therein.
5204 #
5205 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
5206 # variable will take. If 'yes', then the emitted script
5207 # will assume that the directory where it is stored is
5208 # the $objdir directory. This is a cygwin/mingw-specific
5209 # behavior.
5210 func_emit_wrapper ()
5211 {
5212 func_emit_wrapper_arg1=${1-no}
5213
5214 $ECHO "\
5215 #! $SHELL
5216
5217 # $output - temporary wrapper script for $objdir/$outputname
5218 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
5219 #
5220 # The $output program cannot be directly executed until all the libtool
5221 # libraries that it depends on are installed.
5222 #
5223 # This wrapper script should never be moved out of the build directory.
5224 # If it is, it will not operate correctly.
5225
5226 # Sed substitution that helps us do robust quoting. It backslashifies
5227 # metacharacters that are still active within double-quoted strings.
5228 sed_quote_subst='$sed_quote_subst'
5229
5230 # Be Bourne compatible
5231 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5232 emulate sh
5233 NULLCMD=:
5234 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5235 # is contrary to our usage. Disable this feature.
5236 alias -g '\${1+\"\$@\"}'='\"\$@\"'
5237 setopt NO_GLOB_SUBST
5238 else
5239 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5240 fi
5241 BIN_SH=xpg4; export BIN_SH # for Tru64
5242 DUALCASE=1; export DUALCASE # for MKS sh
5243
5244 # The HP-UX ksh and POSIX shell print the target directory to stdout
5245 # if CDPATH is set.
5246 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5247
5248 relink_command=\"$relink_command\"
5249
5250 # This environment variable determines our operation mode.
5251 if test \"\$libtool_install_magic\" = \"$magic\"; then
5252 # install mode needs the following variables:
5253 generated_by_libtool_version='$macro_version'
5254 notinst_deplibs='$notinst_deplibs'
5255 else
5256 # When we are sourced in execute mode, \$file and \$ECHO are already set.
5257 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5258 file=\"\$0\""
5259
5260 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
5261 $ECHO "\
5262
5263 # A function that is used when there is no print builtin or printf.
5264 func_fallback_echo ()
5265 {
5266 eval 'cat <<_LTECHO_EOF
5267 \$1
5268 _LTECHO_EOF'
5269 }
5270 ECHO=\"$qECHO\"
5271 fi
5272
5273 # Very basic option parsing. These options are (a) specific to
5274 # the libtool wrapper, (b) are identical between the wrapper
5275 # /script/ and the wrapper /executable/ that is used only on
5276 # windows platforms, and (c) all begin with the string "--lt-"
5277 # (application programs are unlikely to have options that match
5278 # this pattern).
5279 #
5280 # There are only two supported options: --lt-debug and
5281 # --lt-dump-script. There is, deliberately, no --lt-help.
5282 #
5283 # The first argument to this parsing function should be the
5284 # script's $0 value, followed by "$@".
5285 lt_option_debug=
5286 func_parse_lt_options ()
5287 {
5288 lt_script_arg0=\$0
5289 shift
5290 for lt_opt
5291 do
5292 case \"\$lt_opt\" in
5293 --lt-debug) lt_option_debug=1 ;;
5294 --lt-dump-script)
5295 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
5296 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
5297 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
5298 cat \"\$lt_dump_D/\$lt_dump_F\"
5299 exit 0
5300 ;;
5301 --lt-*)
5302 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
5303 exit 1
5304 ;;
5305 esac
5306 done
5307
5308 # Print the debug banner immediately:
5309 if test -n \"\$lt_option_debug\"; then
5310 echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
5311 fi
5312 }
5313
5314 # Used when --lt-debug. Prints its arguments to stdout
5315 # (redirection is the responsibility of the caller)
5316 func_lt_dump_args ()
5317 {
5318 lt_dump_args_N=1;
5319 for lt_arg
5320 do
5321 \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
5322 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
5323 done
5324 }
5325
5326 # Core function for launching the target application
5327 func_exec_program_core ()
5328 {
5329 "
5330 case $host in
5331 # Backslashes separate directories on plain windows
5332 *-*-mingw | *-*-os2* | *-cegcc*)
5333 $ECHO "\
5334 if test -n \"\$lt_option_debug\"; then
5335 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
5336 func_lt_dump_args \${1+\"\$@\"} 1>&2
5337 fi
5338 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5339 "
5340 ;;
5341
5342 *)
5343 $ECHO "\
5344 if test -n \"\$lt_option_debug\"; then
5345 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
5346 func_lt_dump_args \${1+\"\$@\"} 1>&2
5347 fi
5348 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5349 "
5350 ;;
5351 esac
5352 $ECHO "\
5353 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
5354 exit 1
5355 }
5356
5357 # A function to encapsulate launching the target application
5358 # Strips options in the --lt-* namespace from \$@ and
5359 # launches target application with the remaining arguments.
5360 func_exec_program ()
5361 {
5362 case \" \$* \" in
5363 *\\ --lt-*)
5364 for lt_wr_arg
5365 do
5366 case \$lt_wr_arg in
5367 --lt-*) ;;
5368 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
5369 esac
5370 shift
5371 done ;;
5372 esac
5373 func_exec_program_core \${1+\"\$@\"}
5374 }
5375
5376 # Parse options
5377 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
5378
5379 # Find the directory that this script lives in.
5380 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
5381 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5382
5383 # Follow symbolic links until we get to the real thisdir.
5384 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
5385 while test -n \"\$file\"; do
5386 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
5387
5388 # If there was a directory component, then change thisdir.
5389 if test \"x\$destdir\" != \"x\$file\"; then
5390 case \"\$destdir\" in
5391 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5392 *) thisdir=\"\$thisdir/\$destdir\" ;;
5393 esac
5394 fi
5395
5396 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
5397 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
5398 done
5399
5400 # Usually 'no', except on cygwin/mingw when embedded into
5401 # the cwrapper.
5402 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
5403 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
5404 # special case for '.'
5405 if test \"\$thisdir\" = \".\"; then
5406 thisdir=\`pwd\`
5407 fi
5408 # remove .libs from thisdir
5409 case \"\$thisdir\" in
5410 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
5411 $objdir ) thisdir=. ;;
5412 esac
5413 fi
5414
5415 # Try to get the absolute directory name.
5416 absdir=\`cd \"\$thisdir\" && pwd\`
5417 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5418 "
5419
5420 if test yes = "$fast_install"; then
5421 $ECHO "\
5422 program=lt-'$outputname'$exeext
5423 progdir=\"\$thisdir/$objdir\"
5424
5425 if test ! -f \"\$progdir/\$program\" ||
5426 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
5427 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5428
5429 file=\"\$\$-\$program\"
5430
5431 if test ! -d \"\$progdir\"; then
5432 $MKDIR \"\$progdir\"
5433 else
5434 $RM \"\$progdir/\$file\"
5435 fi"
5436
5437 $ECHO "\
5438
5439 # relink executable if necessary
5440 if test -n \"\$relink_command\"; then
5441 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5442 else
5443 \$ECHO \"\$relink_command_output\" >&2
5444 $RM \"\$progdir/\$file\"
5445 exit 1
5446 fi
5447 fi
5448
5449 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5450 { $RM \"\$progdir/\$program\";
5451 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5452 $RM \"\$progdir/\$file\"
5453 fi"
5454 else
5455 $ECHO "\
5456 program='$outputname'
5457 progdir=\"\$thisdir/$objdir\"
5458 "
5459 fi
5460
5461 $ECHO "\
5462
5463 if test -f \"\$progdir/\$program\"; then"
5464
5465 # fixup the dll searchpath if we need to.
5466 #
5467 # Fix the DLL searchpath if we need to. Do this before prepending
5468 # to shlibpath, because on Windows, both are PATH and uninstalled
5469 # libraries must come first.
5470 if test -n "$dllsearchpath"; then
5471 $ECHO "\
5472 # Add the dll search path components to the executable PATH
5473 PATH=$dllsearchpath:\$PATH
5474 "
5475 fi
5476
5477 # Export our shlibpath_var if we have one.
5478 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5479 $ECHO "\
5480 # Add our own library path to $shlibpath_var
5481 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5482
5483 # Some systems cannot cope with colon-terminated $shlibpath_var
5484 # The second colon is a workaround for a bug in BeOS R4 sed
5485 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
5486
5487 export $shlibpath_var
5488 "
5489 fi
5490
5491 $ECHO "\
5492 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5493 # Run the actual program with our arguments.
5494 func_exec_program \${1+\"\$@\"}
5495 fi
5496 else
5497 # The program doesn't exist.
5498 \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
5499 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
5500 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
5501 exit 1
5502 fi
5503 fi\
5504 "
5505 }
5506
5507
5508 # func_emit_cwrapperexe_src
5509 # emit the source code for a wrapper executable on stdout
5510 # Must ONLY be called from within func_mode_link because
5511 # it depends on a number of variable set therein.
5512 func_emit_cwrapperexe_src ()
5513 {
5514 cat <<EOF
5515
5516 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5517 Generated by $PROGRAM (GNU $PACKAGE) $VERSION
5518
5519 The $output program cannot be directly executed until all the libtool
5520 libraries that it depends on are installed.
5521
5522 This wrapper executable should never be moved out of the build directory.
5523 If it is, it will not operate correctly.
5524 */
5525 EOF
5526 cat <<"EOF"
5527 #ifdef _MSC_VER
5528 # define _CRT_SECURE_NO_DEPRECATE 1
5529 #endif
5530 #include <stdio.h>
5531 #include <stdlib.h>
5532 #ifdef _MSC_VER
5533 # include <direct.h>
5534 # include <process.h>
5535 # include <io.h>
5536 #else
5537 # include <unistd.h>
5538 # include <stdint.h>
5539 # ifdef __CYGWIN__
5540 # include <io.h>
5541 # endif
5542 #endif
5543 #include <malloc.h>
5544 #include <stdarg.h>
5545 #include <assert.h>
5546 #include <string.h>
5547 #include <ctype.h>
5548 #include <errno.h>
5549 #include <fcntl.h>
5550 #include <sys/stat.h>
5551
5552 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
5553
5554 /* declarations of non-ANSI functions */
5555 #if defined __MINGW32__
5556 # ifdef __STRICT_ANSI__
5557 int _putenv (const char *);
5558 # endif
5559 #elif defined __CYGWIN__
5560 # ifdef __STRICT_ANSI__
5561 char *realpath (const char *, char *);
5562 int putenv (char *);
5563 int setenv (const char *, const char *, int);
5564 # endif
5565 /* #elif defined other_platform || defined ... */
5566 #endif
5567
5568 /* portability defines, excluding path handling macros */
5569 #if defined _MSC_VER
5570 # define setmode _setmode
5571 # define stat _stat
5572 # define chmod _chmod
5573 # define getcwd _getcwd
5574 # define putenv _putenv
5575 # define S_IXUSR _S_IEXEC
5576 #elif defined __MINGW32__
5577 # define setmode _setmode
5578 # define stat _stat
5579 # define chmod _chmod
5580 # define getcwd _getcwd
5581 # define putenv _putenv
5582 #elif defined __CYGWIN__
5583 # define HAVE_SETENV
5584 # define FOPEN_WB "wb"
5585 /* #elif defined other platforms ... */
5586 #endif
5587
5588 #if defined PATH_MAX
5589 # define LT_PATHMAX PATH_MAX
5590 #elif defined MAXPATHLEN
5591 # define LT_PATHMAX MAXPATHLEN
5592 #else
5593 # define LT_PATHMAX 1024
5594 #endif
5595
5596 #ifndef S_IXOTH
5597 # define S_IXOTH 0
5598 #endif
5599 #ifndef S_IXGRP
5600 # define S_IXGRP 0
5601 #endif
5602
5603 /* path handling portability macros */
5604 #ifndef DIR_SEPARATOR
5605 # define DIR_SEPARATOR '/'
5606 # define PATH_SEPARATOR ':'
5607 #endif
5608
5609 #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
5610 defined __OS2__
5611 # define HAVE_DOS_BASED_FILE_SYSTEM
5612 # define FOPEN_WB "wb"
5613 # ifndef DIR_SEPARATOR_2
5614 # define DIR_SEPARATOR_2 '\\'
5615 # endif
5616 # ifndef PATH_SEPARATOR_2
5617 # define PATH_SEPARATOR_2 ';'
5618 # endif
5619 #endif
5620
5621 #ifndef DIR_SEPARATOR_2
5622 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5623 #else /* DIR_SEPARATOR_2 */
5624 # define IS_DIR_SEPARATOR(ch) \
5625 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5626 #endif /* DIR_SEPARATOR_2 */
5627
5628 #ifndef PATH_SEPARATOR_2
5629 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5630 #else /* PATH_SEPARATOR_2 */
5631 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5632 #endif /* PATH_SEPARATOR_2 */
5633
5634 #ifndef FOPEN_WB
5635 # define FOPEN_WB "w"
5636 #endif
5637 #ifndef _O_BINARY
5638 # define _O_BINARY 0
5639 #endif
5640
5641 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5642 #define XFREE(stale) do { \
5643 if (stale) { free (stale); stale = 0; } \
5644 } while (0)
5645
5646 #if defined LT_DEBUGWRAPPER
5647 static int lt_debug = 1;
5648 #else
5649 static int lt_debug = 0;
5650 #endif
5651
5652 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
5653
5654 void *xmalloc (size_t num);
5655 char *xstrdup (const char *string);
5656 const char *base_name (const char *name);
5657 char *find_executable (const char *wrapper);
5658 char *chase_symlinks (const char *pathspec);
5659 int make_executable (const char *path);
5660 int check_executable (const char *path);
5661 char *strendzap (char *str, const char *pat);
5662 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
5663 void lt_fatal (const char *file, int line, const char *message, ...);
5664 static const char *nonnull (const char *s);
5665 static const char *nonempty (const char *s);
5666 void lt_setenv (const char *name, const char *value);
5667 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
5668 void lt_update_exe_path (const char *name, const char *value);
5669 void lt_update_lib_path (const char *name, const char *value);
5670 char **prepare_spawn (char **argv);
5671 void lt_dump_script (FILE *f);
5672 EOF
5673
5674 cat <<EOF
5675 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
5676 # define externally_visible volatile
5677 #else
5678 # define externally_visible __attribute__((externally_visible)) volatile
5679 #endif
5680 externally_visible const char * MAGIC_EXE = "$magic_exe";
5681 const char * LIB_PATH_VARNAME = "$shlibpath_var";
5682 EOF
5683
5684 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5685 func_to_host_path "$temp_rpath"
5686 cat <<EOF
5687 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
5688 EOF
5689 else
5690 cat <<"EOF"
5691 const char * LIB_PATH_VALUE = "";
5692 EOF
5693 fi
5694
5695 if test -n "$dllsearchpath"; then
5696 func_to_host_path "$dllsearchpath:"
5697 cat <<EOF
5698 const char * EXE_PATH_VARNAME = "PATH";
5699 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
5700 EOF
5701 else
5702 cat <<"EOF"
5703 const char * EXE_PATH_VARNAME = "";
5704 const char * EXE_PATH_VALUE = "";
5705 EOF
5706 fi
5707
5708 if test yes = "$fast_install"; then
5709 cat <<EOF
5710 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
5711 EOF
5712 else
5713 cat <<EOF
5714 const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
5715 EOF
5716 fi
5717
5718
5719 cat <<"EOF"
5720
5721 #define LTWRAPPER_OPTION_PREFIX "--lt-"
5722
5723 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
5724 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
5725 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
5726
5727 int
5728 main (int argc, char *argv[])
5729 {
5730 char **newargz;
5731 int newargc;
5732 char *tmp_pathspec;
5733 char *actual_cwrapper_path;
5734 char *actual_cwrapper_name;
5735 char *target_name;
5736 char *lt_argv_zero;
5737 int rval = 127;
5738
5739 int i;
5740
5741 program_name = (char *) xstrdup (base_name (argv[0]));
5742 newargz = XMALLOC (char *, (size_t) argc + 1);
5743
5744 /* very simple arg parsing; don't want to rely on getopt
5745 * also, copy all non cwrapper options to newargz, except
5746 * argz[0], which is handled differently
5747 */
5748 newargc=0;
5749 for (i = 1; i < argc; i++)
5750 {
5751 if (STREQ (argv[i], dumpscript_opt))
5752 {
5753 EOF
5754 case $host in
5755 *mingw* | *cygwin* )
5756 # make stdout use "unix" line endings
5757 echo " setmode(1,_O_BINARY);"
5758 ;;
5759 esac
5760
5761 cat <<"EOF"
5762 lt_dump_script (stdout);
5763 return 0;
5764 }
5765 if (STREQ (argv[i], debug_opt))
5766 {
5767 lt_debug = 1;
5768 continue;
5769 }
5770 if (STREQ (argv[i], ltwrapper_option_prefix))
5771 {
5772 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
5773 namespace, but it is not one of the ones we know about and
5774 have already dealt with, above (inluding dump-script), then
5775 report an error. Otherwise, targets might begin to believe
5776 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
5777 namespace. The first time any user complains about this, we'll
5778 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
5779 or a configure.ac-settable value.
5780 */
5781 lt_fatal (__FILE__, __LINE__,
5782 "unrecognized %s option: '%s'",
5783 ltwrapper_option_prefix, argv[i]);
5784 }
5785 /* otherwise ... */
5786 newargz[++newargc] = xstrdup (argv[i]);
5787 }
5788 newargz[++newargc] = NULL;
5789
5790 EOF
5791 cat <<EOF
5792 /* The GNU banner must be the first non-error debug message */
5793 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
5794 EOF
5795 cat <<"EOF"
5796 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
5797 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
5798
5799 tmp_pathspec = find_executable (argv[0]);
5800 if (tmp_pathspec == NULL)
5801 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
5802 lt_debugprintf (__FILE__, __LINE__,
5803 "(main) found exe (before symlink chase) at: %s\n",
5804 tmp_pathspec);
5805
5806 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
5807 lt_debugprintf (__FILE__, __LINE__,
5808 "(main) found exe (after symlink chase) at: %s\n",
5809 actual_cwrapper_path);
5810 XFREE (tmp_pathspec);
5811
5812 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
5813 strendzap (actual_cwrapper_path, actual_cwrapper_name);
5814
5815 /* wrapper name transforms */
5816 strendzap (actual_cwrapper_name, ".exe");
5817 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
5818 XFREE (actual_cwrapper_name);
5819 actual_cwrapper_name = tmp_pathspec;
5820 tmp_pathspec = 0;
5821
5822 /* target_name transforms -- use actual target program name; might have lt- prefix */
5823 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
5824 strendzap (target_name, ".exe");
5825 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
5826 XFREE (target_name);
5827 target_name = tmp_pathspec;
5828 tmp_pathspec = 0;
5829
5830 lt_debugprintf (__FILE__, __LINE__,
5831 "(main) libtool target name: %s\n",
5832 target_name);
5833 EOF
5834
5835 cat <<EOF
5836 newargz[0] =
5837 XMALLOC (char, (strlen (actual_cwrapper_path) +
5838 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
5839 strcpy (newargz[0], actual_cwrapper_path);
5840 strcat (newargz[0], "$objdir");
5841 strcat (newargz[0], "/");
5842 EOF
5843
5844 cat <<"EOF"
5845 /* stop here, and copy so we don't have to do this twice */
5846 tmp_pathspec = xstrdup (newargz[0]);
5847
5848 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
5849 strcat (newargz[0], actual_cwrapper_name);
5850
5851 /* DO want the lt- prefix here if it exists, so use target_name */
5852 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
5853 XFREE (tmp_pathspec);
5854 tmp_pathspec = NULL;
5855 EOF
5856
5857 case $host_os in
5858 mingw*)
5859 cat <<"EOF"
5860 {
5861 char* p;
5862 while ((p = strchr (newargz[0], '\\')) != NULL)
5863 {
5864 *p = '/';
5865 }
5866 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
5867 {
5868 *p = '/';
5869 }
5870 }
5871 EOF
5872 ;;
5873 esac
5874
5875 cat <<"EOF"
5876 XFREE (target_name);
5877 XFREE (actual_cwrapper_path);
5878 XFREE (actual_cwrapper_name);
5879
5880 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
5881 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
5882 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
5883 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
5884 because on Windows, both *_VARNAMEs are PATH but uninstalled
5885 libraries must come first. */
5886 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
5887 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
5888
5889 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
5890 nonnull (lt_argv_zero));
5891 for (i = 0; i < newargc; i++)
5892 {
5893 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
5894 i, nonnull (newargz[i]));
5895 }
5896
5897 EOF
5898
5899 case $host_os in
5900 mingw*)
5901 cat <<"EOF"
5902 /* execv doesn't actually work on mingw as expected on unix */
5903 newargz = prepare_spawn (newargz);
5904 rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
5905 if (rval == -1)
5906 {
5907 /* failed to start process */
5908 lt_debugprintf (__FILE__, __LINE__,
5909 "(main) failed to launch target \"%s\": %s\n",
5910 lt_argv_zero, nonnull (strerror (errno)));
5911 return 127;
5912 }
5913 return rval;
5914 EOF
5915 ;;
5916 *)
5917 cat <<"EOF"
5918 execv (lt_argv_zero, newargz);
5919 return rval; /* =127, but avoids unused variable warning */
5920 EOF
5921 ;;
5922 esac
5923
5924 cat <<"EOF"
5925 }
5926
5927 void *
5928 xmalloc (size_t num)
5929 {
5930 void *p = (void *) malloc (num);
5931 if (!p)
5932 lt_fatal (__FILE__, __LINE__, "memory exhausted");
5933
5934 return p;
5935 }
5936
5937 char *
5938 xstrdup (const char *string)
5939 {
5940 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
5941 string) : NULL;
5942 }
5943
5944 const char *
5945 base_name (const char *name)
5946 {
5947 const char *base;
5948
5949 #if defined HAVE_DOS_BASED_FILE_SYSTEM
5950 /* Skip over the disk name in MSDOS pathnames. */
5951 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
5952 name += 2;
5953 #endif
5954
5955 for (base = name; *name; name++)
5956 if (IS_DIR_SEPARATOR (*name))
5957 base = name + 1;
5958 return base;
5959 }
5960
5961 int
5962 check_executable (const char *path)
5963 {
5964 struct stat st;
5965
5966 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
5967 nonempty (path));
5968 if ((!path) || (!*path))
5969 return 0;
5970
5971 if ((stat (path, &st) >= 0)
5972 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
5973 return 1;
5974 else
5975 return 0;
5976 }
5977
5978 int
5979 make_executable (const char *path)
5980 {
5981 int rval = 0;
5982 struct stat st;
5983
5984 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
5985 nonempty (path));
5986 if ((!path) || (!*path))
5987 return 0;
5988
5989 if (stat (path, &st) >= 0)
5990 {
5991 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
5992 }
5993 return rval;
5994 }
5995
5996 /* Searches for the full path of the wrapper. Returns
5997 newly allocated full path name if found, NULL otherwise
5998 Does not chase symlinks, even on platforms that support them.
5999 */
6000 char *
6001 find_executable (const char *wrapper)
6002 {
6003 int has_slash = 0;
6004 const char *p;
6005 const char *p_next;
6006 /* static buffer for getcwd */
6007 char tmp[LT_PATHMAX + 1];
6008 size_t tmp_len;
6009 char *concat_name;
6010
6011 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
6012 nonempty (wrapper));
6013
6014 if ((wrapper == NULL) || (*wrapper == '\0'))
6015 return NULL;
6016
6017 /* Absolute path? */
6018 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6019 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
6020 {
6021 concat_name = xstrdup (wrapper);
6022 if (check_executable (concat_name))
6023 return concat_name;
6024 XFREE (concat_name);
6025 }
6026 else
6027 {
6028 #endif
6029 if (IS_DIR_SEPARATOR (wrapper[0]))
6030 {
6031 concat_name = xstrdup (wrapper);
6032 if (check_executable (concat_name))
6033 return concat_name;
6034 XFREE (concat_name);
6035 }
6036 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6037 }
6038 #endif
6039
6040 for (p = wrapper; *p; p++)
6041 if (*p == '/')
6042 {
6043 has_slash = 1;
6044 break;
6045 }
6046 if (!has_slash)
6047 {
6048 /* no slashes; search PATH */
6049 const char *path = getenv ("PATH");
6050 if (path != NULL)
6051 {
6052 for (p = path; *p; p = p_next)
6053 {
6054 const char *q;
6055 size_t p_len;
6056 for (q = p; *q; q++)
6057 if (IS_PATH_SEPARATOR (*q))
6058 break;
6059 p_len = (size_t) (q - p);
6060 p_next = (*q == '\0' ? q : q + 1);
6061 if (p_len == 0)
6062 {
6063 /* empty path: current directory */
6064 if (getcwd (tmp, LT_PATHMAX) == NULL)
6065 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
6066 nonnull (strerror (errno)));
6067 tmp_len = strlen (tmp);
6068 concat_name =
6069 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
6070 memcpy (concat_name, tmp, tmp_len);
6071 concat_name[tmp_len] = '/';
6072 strcpy (concat_name + tmp_len + 1, wrapper);
6073 }
6074 else
6075 {
6076 concat_name =
6077 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
6078 memcpy (concat_name, p, p_len);
6079 concat_name[p_len] = '/';
6080 strcpy (concat_name + p_len + 1, wrapper);
6081 }
6082 if (check_executable (concat_name))
6083 return concat_name;
6084 XFREE (concat_name);
6085 }
6086 }
6087 /* not found in PATH; assume curdir */
6088 }
6089 /* Relative path | not found in path: prepend cwd */
6090 if (getcwd (tmp, LT_PATHMAX) == NULL)
6091 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
6092 nonnull (strerror (errno)));
6093 tmp_len = strlen (tmp);
6094 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
6095 memcpy (concat_name, tmp, tmp_len);
6096 concat_name[tmp_len] = '/';
6097 strcpy (concat_name + tmp_len + 1, wrapper);
6098
6099 if (check_executable (concat_name))
6100 return concat_name;
6101 XFREE (concat_name);
6102 return NULL;
6103 }
6104
6105 char *
6106 chase_symlinks (const char *pathspec)
6107 {
6108 #ifndef S_ISLNK
6109 return xstrdup (pathspec);
6110 #else
6111 char buf[LT_PATHMAX];
6112 struct stat s;
6113 char *tmp_pathspec = xstrdup (pathspec);
6114 char *p;
6115 int has_symlinks = 0;
6116 while (strlen (tmp_pathspec) && !has_symlinks)
6117 {
6118 lt_debugprintf (__FILE__, __LINE__,
6119 "checking path component for symlinks: %s\n",
6120 tmp_pathspec);
6121 if (lstat (tmp_pathspec, &s) == 0)
6122 {
6123 if (S_ISLNK (s.st_mode) != 0)
6124 {
6125 has_symlinks = 1;
6126 break;
6127 }
6128
6129 /* search backwards for last DIR_SEPARATOR */
6130 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
6131 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
6132 p--;
6133 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
6134 {
6135 /* no more DIR_SEPARATORS left */
6136 break;
6137 }
6138 *p = '\0';
6139 }
6140 else
6141 {
6142 lt_fatal (__FILE__, __LINE__,
6143 "error accessing file \"%s\": %s",
6144 tmp_pathspec, nonnull (strerror (errno)));
6145 }
6146 }
6147 XFREE (tmp_pathspec);
6148
6149 if (!has_symlinks)
6150 {
6151 return xstrdup (pathspec);
6152 }
6153
6154 tmp_pathspec = realpath (pathspec, buf);
6155 if (tmp_pathspec == 0)
6156 {
6157 lt_fatal (__FILE__, __LINE__,
6158 "could not follow symlinks for %s", pathspec);
6159 }
6160 return xstrdup (tmp_pathspec);
6161 #endif
6162 }
6163
6164 char *
6165 strendzap (char *str, const char *pat)
6166 {
6167 size_t len, patlen;
6168
6169 assert (str != NULL);
6170 assert (pat != NULL);
6171
6172 len = strlen (str);
6173 patlen = strlen (pat);
6174
6175 if (patlen <= len)
6176 {
6177 str += len - patlen;
6178 if (STREQ (str, pat))
6179 *str = '\0';
6180 }
6181 return str;
6182 }
6183
6184 void
6185 lt_debugprintf (const char *file, int line, const char *fmt, ...)
6186 {
6187 va_list args;
6188 if (lt_debug)
6189 {
6190 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
6191 va_start (args, fmt);
6192 (void) vfprintf (stderr, fmt, args);
6193 va_end (args);
6194 }
6195 }
6196
6197 static void
6198 lt_error_core (int exit_status, const char *file,
6199 int line, const char *mode,
6200 const char *message, va_list ap)
6201 {
6202 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
6203 vfprintf (stderr, message, ap);
6204 fprintf (stderr, ".\n");
6205
6206 if (exit_status >= 0)
6207 exit (exit_status);
6208 }
6209
6210 void
6211 lt_fatal (const char *file, int line, const char *message, ...)
6212 {
6213 va_list ap;
6214 va_start (ap, message);
6215 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
6216 va_end (ap);
6217 }
6218
6219 static const char *
6220 nonnull (const char *s)
6221 {
6222 return s ? s : "(null)";
6223 }
6224
6225 static const char *
6226 nonempty (const char *s)
6227 {
6228 return (s && !*s) ? "(empty)" : nonnull (s);
6229 }
6230
6231 void
6232 lt_setenv (const char *name, const char *value)
6233 {
6234 lt_debugprintf (__FILE__, __LINE__,
6235 "(lt_setenv) setting '%s' to '%s'\n",
6236 nonnull (name), nonnull (value));
6237 {
6238 #ifdef HAVE_SETENV
6239 /* always make a copy, for consistency with !HAVE_SETENV */
6240 char *str = xstrdup (value);
6241 setenv (name, str, 1);
6242 #else
6243 size_t len = strlen (name) + 1 + strlen (value) + 1;
6244 char *str = XMALLOC (char, len);
6245 sprintf (str, "%s=%s", name, value);
6246 if (putenv (str) != EXIT_SUCCESS)
6247 {
6248 XFREE (str);
6249 }
6250 #endif
6251 }
6252 }
6253
6254 char *
6255 lt_extend_str (const char *orig_value, const char *add, int to_end)
6256 {
6257 char *new_value;
6258 if (orig_value && *orig_value)
6259 {
6260 size_t orig_value_len = strlen (orig_value);
6261 size_t add_len = strlen (add);
6262 new_value = XMALLOC (char, add_len + orig_value_len + 1);
6263 if (to_end)
6264 {
6265 strcpy (new_value, orig_value);
6266 strcpy (new_value + orig_value_len, add);
6267 }
6268 else
6269 {
6270 strcpy (new_value, add);
6271 strcpy (new_value + add_len, orig_value);
6272 }
6273 }
6274 else
6275 {
6276 new_value = xstrdup (add);
6277 }
6278 return new_value;
6279 }
6280
6281 void
6282 lt_update_exe_path (const char *name, const char *value)
6283 {
6284 lt_debugprintf (__FILE__, __LINE__,
6285 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
6286 nonnull (name), nonnull (value));
6287
6288 if (name && *name && value && *value)
6289 {
6290 char *new_value = lt_extend_str (getenv (name), value, 0);
6291 /* some systems can't cope with a ':'-terminated path #' */
6292 size_t len = strlen (new_value);
6293 while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
6294 {
6295 new_value[--len] = '\0';
6296 }
6297 lt_setenv (name, new_value);
6298 XFREE (new_value);
6299 }
6300 }
6301
6302 void
6303 lt_update_lib_path (const char *name, const char *value)
6304 {
6305 lt_debugprintf (__FILE__, __LINE__,
6306 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
6307 nonnull (name), nonnull (value));
6308
6309 if (name && *name && value && *value)
6310 {
6311 char *new_value = lt_extend_str (getenv (name), value, 0);
6312 lt_setenv (name, new_value);
6313 XFREE (new_value);
6314 }
6315 }
6316
6317 EOF
6318 case $host_os in
6319 mingw*)
6320 cat <<"EOF"
6321
6322 /* Prepares an argument vector before calling spawn().
6323 Note that spawn() does not by itself call the command interpreter
6324 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
6325 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
6326 GetVersionEx(&v);
6327 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
6328 }) ? "cmd.exe" : "command.com").
6329 Instead it simply concatenates the arguments, separated by ' ', and calls
6330 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
6331 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
6332 special way:
6333 - Space and tab are interpreted as delimiters. They are not treated as
6334 delimiters if they are surrounded by double quotes: "...".
6335 - Unescaped double quotes are removed from the input. Their only effect is
6336 that within double quotes, space and tab are treated like normal
6337 characters.
6338 - Backslashes not followed by double quotes are not special.
6339 - But 2*n+1 backslashes followed by a double quote become
6340 n backslashes followed by a double quote (n >= 0):
6341 \" -> "
6342 \\\" -> \"
6343 \\\\\" -> \\"
6344 */
6345 #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
6346 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
6347 char **
6348 prepare_spawn (char **argv)
6349 {
6350 size_t argc;
6351 char **new_argv;
6352 size_t i;
6353
6354 /* Count number of arguments. */
6355 for (argc = 0; argv[argc] != NULL; argc++)
6356 ;
6357
6358 /* Allocate new argument vector. */
6359 new_argv = XMALLOC (char *, argc + 1);
6360
6361 /* Put quoted arguments into the new argument vector. */
6362 for (i = 0; i < argc; i++)
6363 {
6364 const char *string = argv[i];
6365
6366 if (string[0] == '\0')
6367 new_argv[i] = xstrdup ("\"\"");
6368 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
6369 {
6370 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
6371 size_t length;
6372 unsigned int backslashes;
6373 const char *s;
6374 char *quoted_string;
6375 char *p;
6376
6377 length = 0;
6378 backslashes = 0;
6379 if (quote_around)
6380 length++;
6381 for (s = string; *s != '\0'; s++)
6382 {
6383 char c = *s;
6384 if (c == '"')
6385 length += backslashes + 1;
6386 length++;
6387 if (c == '\\')
6388 backslashes++;
6389 else
6390 backslashes = 0;
6391 }
6392 if (quote_around)
6393 length += backslashes + 1;
6394
6395 quoted_string = XMALLOC (char, length + 1);
6396
6397 p = quoted_string;
6398 backslashes = 0;
6399 if (quote_around)
6400 *p++ = '"';
6401 for (s = string; *s != '\0'; s++)
6402 {
6403 char c = *s;
6404 if (c == '"')
6405 {
6406 unsigned int j;
6407 for (j = backslashes + 1; j > 0; j--)
6408 *p++ = '\\';
6409 }
6410 *p++ = c;
6411 if (c == '\\')
6412 backslashes++;
6413 else
6414 backslashes = 0;
6415 }
6416 if (quote_around)
6417 {
6418 unsigned int j;
6419 for (j = backslashes; j > 0; j--)
6420 *p++ = '\\';
6421 *p++ = '"';
6422 }
6423 *p = '\0';
6424
6425 new_argv[i] = quoted_string;
6426 }
6427 else
6428 new_argv[i] = (char *) string;
6429 }
6430 new_argv[argc] = NULL;
6431
6432 return new_argv;
6433 }
6434 EOF
6435 ;;
6436 esac
6437
6438 cat <<"EOF"
6439 void lt_dump_script (FILE* f)
6440 {
6441 EOF
6442 func_emit_wrapper yes |
6443 $SED -n -e '
6444 s/^\(.\{79\}\)\(..*\)/\1\
6445 \2/
6446 h
6447 s/\([\\"]\)/\\\1/g
6448 s/$/\\n/
6449 s/\([^\n]*\).*/ fputs ("\1", f);/p
6450 g
6451 D'
6452 cat <<"EOF"
6453 }
6454 EOF
6455 }
6456 # end: func_emit_cwrapperexe_src
6457
6458 # func_win32_import_lib_p ARG
6459 # True if ARG is an import lib, as indicated by $file_magic_cmd
6460 func_win32_import_lib_p ()
6461 {
6462 $debug_cmd
6463
6464 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
6465 *import*) : ;;
6466 *) false ;;
6467 esac
6468 }
6469
6470 # func_suncc_cstd_abi
6471 # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
6472 # Several compiler flags select an ABI that is incompatible with the
6473 # Cstd library. Avoid specifying it if any are in CXXFLAGS.
6474 func_suncc_cstd_abi ()
6475 {
6476 $debug_cmd
6477
6478 case " $compile_command " in
6479 *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
6480 suncc_use_cstd_abi=no
6481 ;;
6482 *)
6483 suncc_use_cstd_abi=yes
6484 ;;
6485 esac
6486 }
6487
6488 # func_mode_link arg...
6489 func_mode_link ()
6490 {
6491 $debug_cmd
6492
6493 case $host in
6494 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
6495 # It is impossible to link a dll without this setting, and
6496 # we shouldn't force the makefile maintainer to figure out
6497 # what system we are compiling for in order to pass an extra
6498 # flag for every libtool invocation.
6499 # allow_undefined=no
6500
6501 # FIXME: Unfortunately, there are problems with the above when trying
6502 # to make a dll that has undefined symbols, in which case not
6503 # even a static library is built. For now, we need to specify
6504 # -no-undefined on the libtool link line when we can be certain
6505 # that all symbols are satisfied, otherwise we get a static library.
6506 allow_undefined=yes
6507 ;;
6508 *)
6509 allow_undefined=yes
6510 ;;
6511 esac
6512 libtool_args=$nonopt
6513 base_compile="$nonopt $@"
6514 compile_command=$nonopt
6515 finalize_command=$nonopt
6516
6517 compile_rpath=
6518 finalize_rpath=
6519 compile_shlibpath=
6520 finalize_shlibpath=
6521 convenience=
6522 old_convenience=
6523 deplibs=
6524 old_deplibs=
6525 compiler_flags=
6526 linker_flags=
6527 dllsearchpath=
6528 lib_search_path=`pwd`
6529 inst_prefix_dir=
6530 new_inherited_linker_flags=
6531
6532 avoid_version=no
6533 bindir=
6534 dlfiles=
6535 dlprefiles=
6536 dlself=no
6537 export_dynamic=no
6538 export_symbols=
6539 export_symbols_regex=
6540 generated=
6541 libobjs=
6542 ltlibs=
6543 module=no
6544 no_install=no
6545 objs=
6546 os2dllname=
6547 non_pic_objects=
6548 precious_files_regex=
6549 prefer_static_libs=no
6550 preload=false
6551 prev=
6552 prevarg=
6553 release=
6554 rpath=
6555 xrpath=
6556 perm_rpath=
6557 temp_rpath=
6558 thread_safe=no
6559 vinfo=
6560 vinfo_number=no
6561 weak_libs=
6562 single_module=$wl-single_module
6563 func_infer_tag $base_compile
6564
6565 # We need to know -static, to get the right output filenames.
6566 for arg
6567 do
6568 case $arg in
6569 -shared)
6570 test yes != "$build_libtool_libs" \
6571 && func_fatal_configuration "cannot build a shared library"
6572 build_old_libs=no
6573 break
6574 ;;
6575 -all-static | -static | -static-libtool-libs)
6576 case $arg in
6577 -all-static)
6578 if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
6579 func_warning "complete static linking is impossible in this configuration"
6580 fi
6581 if test -n "$link_static_flag"; then
6582 dlopen_self=$dlopen_self_static
6583 fi
6584 prefer_static_libs=yes
6585 ;;
6586 -static)
6587 if test -z "$pic_flag" && test -n "$link_static_flag"; then
6588 dlopen_self=$dlopen_self_static
6589 fi
6590 prefer_static_libs=built
6591 ;;
6592 -static-libtool-libs)
6593 if test -z "$pic_flag" && test -n "$link_static_flag"; then
6594 dlopen_self=$dlopen_self_static
6595 fi
6596 prefer_static_libs=yes
6597 ;;
6598 esac
6599 build_libtool_libs=no
6600 build_old_libs=yes
6601 break
6602 ;;
6603 esac
6604 done
6605
6606 # See if our shared archives depend on static archives.
6607 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
6608
6609 # Go through the arguments, transforming them on the way.
6610 while test "$#" -gt 0; do
6611 arg=$1
6612 shift
6613 func_quote_for_eval "$arg"
6614 qarg=$func_quote_for_eval_unquoted_result
6615 func_append libtool_args " $func_quote_for_eval_result"
6616
6617 # If the previous option needs an argument, assign it.
6618 if test -n "$prev"; then
6619 case $prev in
6620 output)
6621 func_append compile_command " @OUTPUT@"
6622 func_append finalize_command " @OUTPUT@"
6623 ;;
6624 esac
6625
6626 case $prev in
6627 bindir)
6628 bindir=$arg
6629 prev=
6630 continue
6631 ;;
6632 dlfiles|dlprefiles)
6633 $preload || {
6634 # Add the symbol object into the linking commands.
6635 func_append compile_command " @SYMFILE@"
6636 func_append finalize_command " @SYMFILE@"
6637 preload=:
6638 }
6639 case $arg in
6640 *.la | *.lo) ;; # We handle these cases below.
6641 force)
6642 if test no = "$dlself"; then
6643 dlself=needless
6644 export_dynamic=yes
6645 fi
6646 prev=
6647 continue
6648 ;;
6649 self)
6650 if test dlprefiles = "$prev"; then
6651 dlself=yes
6652 elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
6653 dlself=yes
6654 else
6655 dlself=needless
6656 export_dynamic=yes
6657 fi
6658 prev=
6659 continue
6660 ;;
6661 *)
6662 if test dlfiles = "$prev"; then
6663 func_append dlfiles " $arg"
6664 else
6665 func_append dlprefiles " $arg"
6666 fi
6667 prev=
6668 continue
6669 ;;
6670 esac
6671 ;;
6672 expsyms)
6673 export_symbols=$arg
6674 test -f "$arg" \
6675 || func_fatal_error "symbol file '$arg' does not exist"
6676 prev=
6677 continue
6678 ;;
6679 expsyms_regex)
6680 export_symbols_regex=$arg
6681 prev=
6682 continue
6683 ;;
6684 framework)
6685 case $host in
6686 *-*-darwin*)
6687 case "$deplibs " in
6688 *" $qarg.ltframework "*) ;;
6689 *) func_append deplibs " $qarg.ltframework" # this is fixed later
6690 ;;
6691 esac
6692 ;;
6693 esac
6694 prev=
6695 continue
6696 ;;
6697 inst_prefix)
6698 inst_prefix_dir=$arg
6699 prev=
6700 continue
6701 ;;
6702 mllvm)
6703 # Clang does not use LLVM to link, so we can simply discard any
6704 # '-mllvm $arg' options when doing the link step.
6705 prev=
6706 continue
6707 ;;
6708 objectlist)
6709 if test -f "$arg"; then
6710 save_arg=$arg
6711 moreargs=
6712 for fil in `cat "$save_arg"`
6713 do
6714 # func_append moreargs " $fil"
6715 arg=$fil
6716 # A libtool-controlled object.
6717
6718 # Check to see that this really is a libtool object.
6719 if func_lalib_unsafe_p "$arg"; then
6720 pic_object=
6721 non_pic_object=
6722
6723 # Read the .lo file
6724 func_source "$arg"
6725
6726 if test -z "$pic_object" ||
6727 test -z "$non_pic_object" ||
6728 test none = "$pic_object" &&
6729 test none = "$non_pic_object"; then
6730 func_fatal_error "cannot find name of object for '$arg'"
6731 fi
6732
6733 # Extract subdirectory from the argument.
6734 func_dirname "$arg" "/" ""
6735 xdir=$func_dirname_result
6736
6737 if test none != "$pic_object"; then
6738 # Prepend the subdirectory the object is found in.
6739 pic_object=$xdir$pic_object
6740
6741 if test dlfiles = "$prev"; then
6742 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
6743 func_append dlfiles " $pic_object"
6744 prev=
6745 continue
6746 else
6747 # If libtool objects are unsupported, then we need to preload.
6748 prev=dlprefiles
6749 fi
6750 fi
6751
6752 # CHECK ME: I think I busted this. -Ossama
6753 if test dlprefiles = "$prev"; then
6754 # Preload the old-style object.
6755 func_append dlprefiles " $pic_object"
6756 prev=
6757 fi
6758
6759 # A PIC object.
6760 func_append libobjs " $pic_object"
6761 arg=$pic_object
6762 fi
6763
6764 # Non-PIC object.
6765 if test none != "$non_pic_object"; then
6766 # Prepend the subdirectory the object is found in.
6767 non_pic_object=$xdir$non_pic_object
6768
6769 # A standard non-PIC object
6770 func_append non_pic_objects " $non_pic_object"
6771 if test -z "$pic_object" || test none = "$pic_object"; then
6772 arg=$non_pic_object
6773 fi
6774 else
6775 # If the PIC object exists, use it instead.
6776 # $xdir was prepended to $pic_object above.
6777 non_pic_object=$pic_object
6778 func_append non_pic_objects " $non_pic_object"
6779 fi
6780 else
6781 # Only an error if not doing a dry-run.
6782 if $opt_dry_run; then
6783 # Extract subdirectory from the argument.
6784 func_dirname "$arg" "/" ""
6785 xdir=$func_dirname_result
6786
6787 func_lo2o "$arg"
6788 pic_object=$xdir$objdir/$func_lo2o_result
6789 non_pic_object=$xdir$func_lo2o_result
6790 func_append libobjs " $pic_object"
6791 func_append non_pic_objects " $non_pic_object"
6792 else
6793 func_fatal_error "'$arg' is not a valid libtool object"
6794 fi
6795 fi
6796 done
6797 else
6798 func_fatal_error "link input file '$arg' does not exist"
6799 fi
6800 arg=$save_arg
6801 prev=
6802 continue
6803 ;;
6804 os2dllname)
6805 os2dllname=$arg
6806 prev=
6807 continue
6808 ;;
6809 precious_regex)
6810 precious_files_regex=$arg
6811 prev=
6812 continue
6813 ;;
6814 release)
6815 release=-$arg
6816 prev=
6817 continue
6818 ;;
6819 rpath | xrpath)
6820 # We need an absolute path.
6821 case $arg in
6822 [\\/]* | [A-Za-z]:[\\/]*) ;;
6823 *)
6824 func_fatal_error "only absolute run-paths are allowed"
6825 ;;
6826 esac
6827 if test rpath = "$prev"; then
6828 case "$rpath " in
6829 *" $arg "*) ;;
6830 *) func_append rpath " $arg" ;;
6831 esac
6832 else
6833 case "$xrpath " in
6834 *" $arg "*) ;;
6835 *) func_append xrpath " $arg" ;;
6836 esac
6837 fi
6838 prev=
6839 continue
6840 ;;
6841 shrext)
6842 shrext_cmds=$arg
6843 prev=
6844 continue
6845 ;;
6846 weak)
6847 func_append weak_libs " $arg"
6848 prev=
6849 continue
6850 ;;
6851 xcclinker)
6852 func_append linker_flags " $qarg"
6853 func_append compiler_flags " $qarg"
6854 prev=
6855 func_append compile_command " $qarg"
6856 func_append finalize_command " $qarg"
6857 continue
6858 ;;
6859 xcompiler)
6860 func_append compiler_flags " $qarg"
6861 prev=
6862 func_append compile_command " $qarg"
6863 func_append finalize_command " $qarg"
6864 continue
6865 ;;
6866 xlinker)
6867 func_append linker_flags " $qarg"
6868 func_append compiler_flags " $wl$qarg"
6869 prev=
6870 func_append compile_command " $wl$qarg"
6871 func_append finalize_command " $wl$qarg"
6872 continue
6873 ;;
6874 *)
6875 eval "$prev=\"\$arg\""
6876 prev=
6877 continue
6878 ;;
6879 esac
6880 fi # test -n "$prev"
6881
6882 prevarg=$arg
6883
6884 case $arg in
6885 -all-static)
6886 if test -n "$link_static_flag"; then
6887 # See comment for -static flag below, for more details.
6888 func_append compile_command " $link_static_flag"
6889 func_append finalize_command " $link_static_flag"
6890 fi
6891 continue
6892 ;;
6893
6894 -allow-undefined)
6895 # FIXME: remove this flag sometime in the future.
6896 func_fatal_error "'-allow-undefined' must not be used because it is the default"
6897 ;;
6898
6899 -avoid-version)
6900 avoid_version=yes
6901 continue
6902 ;;
6903
6904 -bindir)
6905 prev=bindir
6906 continue
6907 ;;
6908
6909 -dlopen)
6910 prev=dlfiles
6911 continue
6912 ;;
6913
6914 -dlpreopen)
6915 prev=dlprefiles
6916 continue
6917 ;;
6918
6919 -export-dynamic)
6920 export_dynamic=yes
6921 continue
6922 ;;
6923
6924 -export-symbols | -export-symbols-regex)
6925 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
6926 func_fatal_error "more than one -exported-symbols argument is not allowed"
6927 fi
6928 if test X-export-symbols = "X$arg"; then
6929 prev=expsyms
6930 else
6931 prev=expsyms_regex
6932 fi
6933 continue
6934 ;;
6935
6936 -framework)
6937 prev=framework
6938 continue
6939 ;;
6940
6941 -inst-prefix-dir)
6942 prev=inst_prefix
6943 continue
6944 ;;
6945
6946 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
6947 # so, if we see these flags be careful not to treat them like -L
6948 -L[A-Z][A-Z]*:*)
6949 case $with_gcc/$host in
6950 no/*-*-irix* | /*-*-irix*)
6951 func_append compile_command " $arg"
6952 func_append finalize_command " $arg"
6953 ;;
6954 esac
6955 continue
6956 ;;
6957
6958 -L*)
6959 func_stripname "-L" '' "$arg"
6960 if test -z "$func_stripname_result"; then
6961 if test "$#" -gt 0; then
6962 func_fatal_error "require no space between '-L' and '$1'"
6963 else
6964 func_fatal_error "need path for '-L' option"
6965 fi
6966 fi
6967 func_resolve_sysroot "$func_stripname_result"
6968 dir=$func_resolve_sysroot_result
6969 # We need an absolute path.
6970 case $dir in
6971 [\\/]* | [A-Za-z]:[\\/]*) ;;
6972 *)
6973 absdir=`cd "$dir" && pwd`
6974 test -z "$absdir" && \
6975 func_fatal_error "cannot determine absolute directory name of '$dir'"
6976 dir=$absdir
6977 ;;
6978 esac
6979 case "$deplibs " in
6980 *" -L$dir "* | *" $arg "*)
6981 # Will only happen for absolute or sysroot arguments
6982 ;;
6983 *)
6984 # Preserve sysroot, but never include relative directories
6985 case $dir in
6986 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
6987 *) func_append deplibs " -L$dir" ;;
6988 esac
6989 func_append lib_search_path " $dir"
6990 ;;
6991 esac
6992 case $host in
6993 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
6994 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
6995 case :$dllsearchpath: in
6996 *":$dir:"*) ;;
6997 ::) dllsearchpath=$dir;;
6998 *) func_append dllsearchpath ":$dir";;
6999 esac
7000 case :$dllsearchpath: in
7001 *":$testbindir:"*) ;;
7002 ::) dllsearchpath=$testbindir;;
7003 *) func_append dllsearchpath ":$testbindir";;
7004 esac
7005 ;;
7006 esac
7007 continue
7008 ;;
7009
7010 -l*)
7011 if test X-lc = "X$arg" || test X-lm = "X$arg"; then
7012 case $host in
7013 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
7014 # These systems don't actually have a C or math library (as such)
7015 continue
7016 ;;
7017 *-*-os2*)
7018 # These systems don't actually have a C library (as such)
7019 test X-lc = "X$arg" && continue
7020 ;;
7021 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7022 # Do not include libc due to us having libc/libc_r.
7023 test X-lc = "X$arg" && continue
7024 ;;
7025 *-*-rhapsody* | *-*-darwin1.[012])
7026 # Rhapsody C and math libraries are in the System framework
7027 func_append deplibs " System.ltframework"
7028 continue
7029 ;;
7030 *-*-sco3.2v5* | *-*-sco5v6*)
7031 # Causes problems with __ctype
7032 test X-lc = "X$arg" && continue
7033 ;;
7034 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
7035 # Compiler inserts libc in the correct place for threads to work
7036 test X-lc = "X$arg" && continue
7037 ;;
7038 esac
7039 elif test X-lc_r = "X$arg"; then
7040 case $host in
7041 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7042 # Do not include libc_r directly, use -pthread flag.
7043 continue
7044 ;;
7045 esac
7046 fi
7047 func_append deplibs " $arg"
7048 continue
7049 ;;
7050
7051 -mllvm)
7052 prev=mllvm
7053 continue
7054 ;;
7055
7056 -module)
7057 module=yes
7058 continue
7059 ;;
7060
7061 # Tru64 UNIX uses -model [arg] to determine the layout of C++
7062 # classes, name mangling, and exception handling.
7063 # Darwin uses the -arch flag to determine output architecture.
7064 -model|-arch|-isysroot|--sysroot)
7065 func_append compiler_flags " $arg"
7066 func_append compile_command " $arg"
7067 func_append finalize_command " $arg"
7068 prev=xcompiler
7069 continue
7070 ;;
7071
7072 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7073 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7074 func_append compiler_flags " $arg"
7075 func_append compile_command " $arg"
7076 func_append finalize_command " $arg"
7077 case "$new_inherited_linker_flags " in
7078 *" $arg "*) ;;
7079 * ) func_append new_inherited_linker_flags " $arg" ;;
7080 esac
7081 continue
7082 ;;
7083
7084 -multi_module)
7085 single_module=$wl-multi_module
7086 continue
7087 ;;
7088
7089 -no-fast-install)
7090 fast_install=no
7091 continue
7092 ;;
7093
7094 -no-install)
7095 case $host in
7096 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
7097 # The PATH hackery in wrapper scripts is required on Windows
7098 # and Darwin in order for the loader to find any dlls it needs.
7099 func_warning "'-no-install' is ignored for $host"
7100 func_warning "assuming '-no-fast-install' instead"
7101 fast_install=no
7102 ;;
7103 *) no_install=yes ;;
7104 esac
7105 continue
7106 ;;
7107
7108 -no-undefined)
7109 allow_undefined=no
7110 continue
7111 ;;
7112
7113 -objectlist)
7114 prev=objectlist
7115 continue
7116 ;;
7117
7118 -os2dllname)
7119 prev=os2dllname
7120 continue
7121 ;;
7122
7123 -o) prev=output ;;
7124
7125 -precious-files-regex)
7126 prev=precious_regex
7127 continue
7128 ;;
7129
7130 -release)
7131 prev=release
7132 continue
7133 ;;
7134
7135 -rpath)
7136 prev=rpath
7137 continue
7138 ;;
7139
7140 -R)
7141 prev=xrpath
7142 continue
7143 ;;
7144
7145 -R*)
7146 func_stripname '-R' '' "$arg"
7147 dir=$func_stripname_result
7148 # We need an absolute path.
7149 case $dir in
7150 [\\/]* | [A-Za-z]:[\\/]*) ;;
7151 =*)
7152 func_stripname '=' '' "$dir"
7153 dir=$lt_sysroot$func_stripname_result
7154 ;;
7155 *)
7156 func_fatal_error "only absolute run-paths are allowed"
7157 ;;
7158 esac
7159 case "$xrpath " in
7160 *" $dir "*) ;;
7161 *) func_append xrpath " $dir" ;;
7162 esac
7163 continue
7164 ;;
7165
7166 -shared)
7167 # The effects of -shared are defined in a previous loop.
7168 continue
7169 ;;
7170
7171 -shrext)
7172 prev=shrext
7173 continue
7174 ;;
7175
7176 -static | -static-libtool-libs)
7177 # The effects of -static are defined in a previous loop.
7178 # We used to do the same as -all-static on platforms that
7179 # didn't have a PIC flag, but the assumption that the effects
7180 # would be equivalent was wrong. It would break on at least
7181 # Digital Unix and AIX.
7182 continue
7183 ;;
7184
7185 -thread-safe)
7186 thread_safe=yes
7187 continue
7188 ;;
7189
7190 -version-info)
7191 prev=vinfo
7192 continue
7193 ;;
7194
7195 -version-number)
7196 prev=vinfo
7197 vinfo_number=yes
7198 continue
7199 ;;
7200
7201 -weak)
7202 prev=weak
7203 continue
7204 ;;
7205
7206 -Wc,*)
7207 func_stripname '-Wc,' '' "$arg"
7208 args=$func_stripname_result
7209 arg=
7210 save_ifs=$IFS; IFS=,
7211 for flag in $args; do
7212 IFS=$save_ifs
7213 func_quote_for_eval "$flag"
7214 func_append arg " $func_quote_for_eval_result"
7215 func_append compiler_flags " $func_quote_for_eval_result"
7216 done
7217 IFS=$save_ifs
7218 func_stripname ' ' '' "$arg"
7219 arg=$func_stripname_result
7220 ;;
7221
7222 -Wl,*)
7223 func_stripname '-Wl,' '' "$arg"
7224 args=$func_stripname_result
7225 arg=
7226 save_ifs=$IFS; IFS=,
7227 for flag in $args; do
7228 IFS=$save_ifs
7229 func_quote_for_eval "$flag"
7230 func_append arg " $wl$func_quote_for_eval_result"
7231 func_append compiler_flags " $wl$func_quote_for_eval_result"
7232 func_append linker_flags " $func_quote_for_eval_result"
7233 done
7234 IFS=$save_ifs
7235 func_stripname ' ' '' "$arg"
7236 arg=$func_stripname_result
7237 ;;
7238
7239 -Xcompiler)
7240 prev=xcompiler
7241 continue
7242 ;;
7243
7244 -Xlinker)
7245 prev=xlinker
7246 continue
7247 ;;
7248
7249 -XCClinker)
7250 prev=xcclinker
7251 continue
7252 ;;
7253
7254 # -msg_* for osf cc
7255 -msg_*)
7256 func_quote_for_eval "$arg"
7257 arg=$func_quote_for_eval_result
7258 ;;
7259
7260 # Flags to be passed through unchanged, with rationale:
7261 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
7262 # -r[0-9][0-9]* specify processor for the SGI compiler
7263 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
7264 # +DA*, +DD* enable 64-bit mode for the HP compiler
7265 # -q* compiler args for the IBM compiler
7266 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
7267 # -F/path path to uninstalled frameworks, gcc on darwin
7268 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
7269 # -fstack-protector* stack protector flags for GCC
7270 # @file GCC response files
7271 # -tp=* Portland pgcc target processor selection
7272 # --sysroot=* for sysroot support
7273 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7274 # -specs=* GCC specs files
7275 # -stdlib=* select c++ std lib with clang
7276 # -fsanitize=* Clang/GCC memory and address sanitizer
7277 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
7278 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
7279 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7280 -specs=*|-fsanitize=*)
7281 func_quote_for_eval "$arg"
7282 arg=$func_quote_for_eval_result
7283 func_append compile_command " $arg"
7284 func_append finalize_command " $arg"
7285 func_append compiler_flags " $arg"
7286 continue
7287 ;;
7288
7289 -Z*)
7290 if test os2 = "`expr $host : '.*\(os2\)'`"; then
7291 # OS/2 uses -Zxxx to specify OS/2-specific options
7292 compiler_flags="$compiler_flags $arg"
7293 func_append compile_command " $arg"
7294 func_append finalize_command " $arg"
7295 case $arg in
7296 -Zlinker | -Zstack)
7297 prev=xcompiler
7298 ;;
7299 esac
7300 continue
7301 else
7302 # Otherwise treat like 'Some other compiler flag' below
7303 func_quote_for_eval "$arg"
7304 arg=$func_quote_for_eval_result
7305 fi
7306 ;;
7307
7308 # Some other compiler flag.
7309 -* | +*)
7310 func_quote_for_eval "$arg"
7311 arg=$func_quote_for_eval_result
7312 ;;
7313
7314 *.$objext)
7315 # A standard object.
7316 func_append objs " $arg"
7317 ;;
7318
7319 *.lo)
7320 # A libtool-controlled object.
7321
7322 # Check to see that this really is a libtool object.
7323 if func_lalib_unsafe_p "$arg"; then
7324 pic_object=
7325 non_pic_object=
7326
7327 # Read the .lo file
7328 func_source "$arg"
7329
7330 if test -z "$pic_object" ||
7331 test -z "$non_pic_object" ||
7332 test none = "$pic_object" &&
7333 test none = "$non_pic_object"; then
7334 func_fatal_error "cannot find name of object for '$arg'"
7335 fi
7336
7337 # Extract subdirectory from the argument.
7338 func_dirname "$arg" "/" ""
7339 xdir=$func_dirname_result
7340
7341 test none = "$pic_object" || {
7342 # Prepend the subdirectory the object is found in.
7343 pic_object=$xdir$pic_object
7344
7345 if test dlfiles = "$prev"; then
7346 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
7347 func_append dlfiles " $pic_object"
7348 prev=
7349 continue
7350 else
7351 # If libtool objects are unsupported, then we need to preload.
7352 prev=dlprefiles
7353 fi
7354 fi
7355
7356 # CHECK ME: I think I busted this. -Ossama
7357 if test dlprefiles = "$prev"; then
7358 # Preload the old-style object.
7359 func_append dlprefiles " $pic_object"
7360 prev=
7361 fi
7362
7363 # A PIC object.
7364 func_append libobjs " $pic_object"
7365 arg=$pic_object
7366 }
7367
7368 # Non-PIC object.
7369 if test none != "$non_pic_object"; then
7370 # Prepend the subdirectory the object is found in.
7371 non_pic_object=$xdir$non_pic_object
7372
7373 # A standard non-PIC object
7374 func_append non_pic_objects " $non_pic_object"
7375 if test -z "$pic_object" || test none = "$pic_object"; then
7376 arg=$non_pic_object
7377 fi
7378 else
7379 # If the PIC object exists, use it instead.
7380 # $xdir was prepended to $pic_object above.
7381 non_pic_object=$pic_object
7382 func_append non_pic_objects " $non_pic_object"
7383 fi
7384 else
7385 # Only an error if not doing a dry-run.
7386 if $opt_dry_run; then
7387 # Extract subdirectory from the argument.
7388 func_dirname "$arg" "/" ""
7389 xdir=$func_dirname_result
7390
7391 func_lo2o "$arg"
7392 pic_object=$xdir$objdir/$func_lo2o_result
7393 non_pic_object=$xdir$func_lo2o_result
7394 func_append libobjs " $pic_object"
7395 func_append non_pic_objects " $non_pic_object"
7396 else
7397 func_fatal_error "'$arg' is not a valid libtool object"
7398 fi
7399 fi
7400 ;;
7401
7402 *.$libext)
7403 # An archive.
7404 func_append deplibs " $arg"
7405 func_append old_deplibs " $arg"
7406 continue
7407 ;;
7408
7409 *.la)
7410 # A libtool-controlled library.
7411
7412 func_resolve_sysroot "$arg"
7413 if test dlfiles = "$prev"; then
7414 # This library was specified with -dlopen.
7415 func_append dlfiles " $func_resolve_sysroot_result"
7416 prev=
7417 elif test dlprefiles = "$prev"; then
7418 # The library was specified with -dlpreopen.
7419 func_append dlprefiles " $func_resolve_sysroot_result"
7420 prev=
7421 else
7422 func_append deplibs " $func_resolve_sysroot_result"
7423 fi
7424 continue
7425 ;;
7426
7427 # Some other compiler argument.
7428 *)
7429 # Unknown arguments in both finalize_command and compile_command need
7430 # to be aesthetically quoted because they are evaled later.
7431 func_quote_for_eval "$arg"
7432 arg=$func_quote_for_eval_result
7433 ;;
7434 esac # arg
7435
7436 # Now actually substitute the argument into the commands.
7437 if test -n "$arg"; then
7438 func_append compile_command " $arg"
7439 func_append finalize_command " $arg"
7440 fi
7441 done # argument parsing loop
7442
7443 test -n "$prev" && \
7444 func_fatal_help "the '$prevarg' option requires an argument"
7445
7446 if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
7447 eval arg=\"$export_dynamic_flag_spec\"
7448 func_append compile_command " $arg"
7449 func_append finalize_command " $arg"
7450 fi
7451
7452 oldlibs=
7453 # calculate the name of the file, without its directory
7454 func_basename "$output"
7455 outputname=$func_basename_result
7456 libobjs_save=$libobjs
7457
7458 if test -n "$shlibpath_var"; then
7459 # get the directories listed in $shlibpath_var
7460 eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
7461 else
7462 shlib_search_path=
7463 fi
7464 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
7465 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
7466
7467 # Definition is injected by LT_CONFIG during libtool generation.
7468 func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
7469
7470 func_dirname "$output" "/" ""
7471 output_objdir=$func_dirname_result$objdir
7472 func_to_tool_file "$output_objdir/"
7473 tool_output_objdir=$func_to_tool_file_result
7474 # Create the object directory.
7475 func_mkdir_p "$output_objdir"
7476
7477 # Determine the type of output
7478 case $output in
7479 "")
7480 func_fatal_help "you must specify an output file"
7481 ;;
7482 *.$libext) linkmode=oldlib ;;
7483 *.lo | *.$objext) linkmode=obj ;;
7484 *.la) linkmode=lib ;;
7485 *) linkmode=prog ;; # Anything else should be a program.
7486 esac
7487
7488 specialdeplibs=
7489
7490 libs=
7491 # Find all interdependent deplibs by searching for libraries
7492 # that are linked more than once (e.g. -la -lb -la)
7493 for deplib in $deplibs; do
7494 if $opt_preserve_dup_deps; then
7495 case "$libs " in
7496 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7497 esac
7498 fi
7499 func_append libs " $deplib"
7500 done
7501
7502 if test lib = "$linkmode"; then
7503 libs="$predeps $libs $compiler_lib_search_path $postdeps"
7504
7505 # Compute libraries that are listed more than once in $predeps
7506 # $postdeps and mark them as special (i.e., whose duplicates are
7507 # not to be eliminated).
7508 pre_post_deps=
7509 if $opt_duplicate_compiler_generated_deps; then
7510 for pre_post_dep in $predeps $postdeps; do
7511 case "$pre_post_deps " in
7512 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
7513 esac
7514 func_append pre_post_deps " $pre_post_dep"
7515 done
7516 fi
7517 pre_post_deps=
7518 fi
7519
7520 deplibs=
7521 newdependency_libs=
7522 newlib_search_path=
7523 need_relink=no # whether we're linking any uninstalled libtool libraries
7524 notinst_deplibs= # not-installed libtool libraries
7525 notinst_path= # paths that contain not-installed libtool libraries
7526
7527 case $linkmode in
7528 lib)
7529 passes="conv dlpreopen link"
7530 for file in $dlfiles $dlprefiles; do
7531 case $file in
7532 *.la) ;;
7533 *)
7534 func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
7535 ;;
7536 esac
7537 done
7538 ;;
7539 prog)
7540 compile_deplibs=
7541 finalize_deplibs=
7542 alldeplibs=false
7543 newdlfiles=
7544 newdlprefiles=
7545 passes="conv scan dlopen dlpreopen link"
7546 ;;
7547 *) passes="conv"
7548 ;;
7549 esac
7550
7551 for pass in $passes; do
7552 # The preopen pass in lib mode reverses $deplibs; put it back here
7553 # so that -L comes before libs that need it for instance...
7554 if test lib,link = "$linkmode,$pass"; then
7555 ## FIXME: Find the place where the list is rebuilt in the wrong
7556 ## order, and fix it there properly
7557 tmp_deplibs=
7558 for deplib in $deplibs; do
7559 tmp_deplibs="$deplib $tmp_deplibs"
7560 done
7561 deplibs=$tmp_deplibs
7562 fi
7563
7564 if test lib,link = "$linkmode,$pass" ||
7565 test prog,scan = "$linkmode,$pass"; then
7566 libs=$deplibs
7567 deplibs=
7568 fi
7569 if test prog = "$linkmode"; then
7570 case $pass in
7571 dlopen) libs=$dlfiles ;;
7572 dlpreopen) libs=$dlprefiles ;;
7573 link)
7574 libs="$deplibs %DEPLIBS%"
7575 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
7576 ;;
7577 esac
7578 fi
7579 if test lib,dlpreopen = "$linkmode,$pass"; then
7580 # Collect and forward deplibs of preopened libtool libs
7581 for lib in $dlprefiles; do
7582 # Ignore non-libtool-libs
7583 dependency_libs=
7584 func_resolve_sysroot "$lib"
7585 case $lib in
7586 *.la) func_source "$func_resolve_sysroot_result" ;;
7587 esac
7588
7589 # Collect preopened libtool deplibs, except any this library
7590 # has declared as weak libs
7591 for deplib in $dependency_libs; do
7592 func_basename "$deplib"
7593 deplib_base=$func_basename_result
7594 case " $weak_libs " in
7595 *" $deplib_base "*) ;;
7596 *) func_append deplibs " $deplib" ;;
7597 esac
7598 done
7599 done
7600 libs=$dlprefiles
7601 fi
7602 if test dlopen = "$pass"; then
7603 # Collect dlpreopened libraries
7604 save_deplibs=$deplibs
7605 deplibs=
7606 fi
7607
7608 for deplib in $libs; do
7609 lib=
7610 found=false
7611 case $deplib in
7612 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7613 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7614 if test prog,link = "$linkmode,$pass"; then
7615 compile_deplibs="$deplib $compile_deplibs"
7616 finalize_deplibs="$deplib $finalize_deplibs"
7617 else
7618 func_append compiler_flags " $deplib"
7619 if test lib = "$linkmode"; then
7620 case "$new_inherited_linker_flags " in
7621 *" $deplib "*) ;;
7622 * ) func_append new_inherited_linker_flags " $deplib" ;;
7623 esac
7624 fi
7625 fi
7626 continue
7627 ;;
7628 -l*)
7629 if test lib != "$linkmode" && test prog != "$linkmode"; then
7630 func_warning "'-l' is ignored for archives/objects"
7631 continue
7632 fi
7633 func_stripname '-l' '' "$deplib"
7634 name=$func_stripname_result
7635 if test lib = "$linkmode"; then
7636 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
7637 else
7638 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
7639 fi
7640 for searchdir in $searchdirs; do
7641 for search_ext in .la $std_shrext .so .a; do
7642 # Search the libtool library
7643 lib=$searchdir/lib$name$search_ext
7644 if test -f "$lib"; then
7645 if test .la = "$search_ext"; then
7646 found=:
7647 else
7648 found=false
7649 fi
7650 break 2
7651 fi
7652 done
7653 done
7654 if $found; then
7655 # deplib is a libtool library
7656 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
7657 # We need to do some special things here, and not later.
7658 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
7659 case " $predeps $postdeps " in
7660 *" $deplib "*)
7661 if func_lalib_p "$lib"; then
7662 library_names=
7663 old_library=
7664 func_source "$lib"
7665 for l in $old_library $library_names; do
7666 ll=$l
7667 done
7668 if test "X$ll" = "X$old_library"; then # only static version available
7669 found=false
7670 func_dirname "$lib" "" "."
7671 ladir=$func_dirname_result
7672 lib=$ladir/$old_library
7673 if test prog,link = "$linkmode,$pass"; then
7674 compile_deplibs="$deplib $compile_deplibs"
7675 finalize_deplibs="$deplib $finalize_deplibs"
7676 else
7677 deplibs="$deplib $deplibs"
7678 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7679 fi
7680 continue
7681 fi
7682 fi
7683 ;;
7684 *) ;;
7685 esac
7686 fi
7687 else
7688 # deplib doesn't seem to be a libtool library
7689 if test prog,link = "$linkmode,$pass"; then
7690 compile_deplibs="$deplib $compile_deplibs"
7691 finalize_deplibs="$deplib $finalize_deplibs"
7692 else
7693 deplibs="$deplib $deplibs"
7694 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7695 fi
7696 continue
7697 fi
7698 ;; # -l
7699 *.ltframework)
7700 if test prog,link = "$linkmode,$pass"; then
7701 compile_deplibs="$deplib $compile_deplibs"
7702 finalize_deplibs="$deplib $finalize_deplibs"
7703 else
7704 deplibs="$deplib $deplibs"
7705 if test lib = "$linkmode"; then
7706 case "$new_inherited_linker_flags " in
7707 *" $deplib "*) ;;
7708 * ) func_append new_inherited_linker_flags " $deplib" ;;
7709 esac
7710 fi
7711 fi
7712 continue
7713 ;;
7714 -L*)
7715 case $linkmode in
7716 lib)
7717 deplibs="$deplib $deplibs"
7718 test conv = "$pass" && continue
7719 newdependency_libs="$deplib $newdependency_libs"
7720 func_stripname '-L' '' "$deplib"
7721 func_resolve_sysroot "$func_stripname_result"
7722 func_append newlib_search_path " $func_resolve_sysroot_result"
7723 ;;
7724 prog)
7725 if test conv = "$pass"; then
7726 deplibs="$deplib $deplibs"
7727 continue
7728 fi
7729 if test scan = "$pass"; then
7730 deplibs="$deplib $deplibs"
7731 else
7732 compile_deplibs="$deplib $compile_deplibs"
7733 finalize_deplibs="$deplib $finalize_deplibs"
7734 fi
7735 func_stripname '-L' '' "$deplib"
7736 func_resolve_sysroot "$func_stripname_result"
7737 func_append newlib_search_path " $func_resolve_sysroot_result"
7738 ;;
7739 *)
7740 func_warning "'-L' is ignored for archives/objects"
7741 ;;
7742 esac # linkmode
7743 continue
7744 ;; # -L
7745 -R*)
7746 if test link = "$pass"; then
7747 func_stripname '-R' '' "$deplib"
7748 func_resolve_sysroot "$func_stripname_result"
7749 dir=$func_resolve_sysroot_result
7750 # Make sure the xrpath contains only unique directories.
7751 case "$xrpath " in
7752 *" $dir "*) ;;
7753 *) func_append xrpath " $dir" ;;
7754 esac
7755 fi
7756 deplibs="$deplib $deplibs"
7757 continue
7758 ;;
7759 *.la)
7760 func_resolve_sysroot "$deplib"
7761 lib=$func_resolve_sysroot_result
7762 ;;
7763 *.$libext)
7764 if test conv = "$pass"; then
7765 deplibs="$deplib $deplibs"
7766 continue
7767 fi
7768 case $linkmode in
7769 lib)
7770 # Linking convenience modules into shared libraries is allowed,
7771 # but linking other static libraries is non-portable.
7772 case " $dlpreconveniencelibs " in
7773 *" $deplib "*) ;;
7774 *)
7775 valid_a_lib=false
7776 case $deplibs_check_method in
7777 match_pattern*)
7778 set dummy $deplibs_check_method; shift
7779 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7780 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
7781 | $EGREP "$match_pattern_regex" > /dev/null; then
7782 valid_a_lib=:
7783 fi
7784 ;;
7785 pass_all)
7786 valid_a_lib=:
7787 ;;
7788 esac
7789 if $valid_a_lib; then
7790 echo
7791 $ECHO "*** Warning: Linking the shared library $output against the"
7792 $ECHO "*** static library $deplib is not portable!"
7793 deplibs="$deplib $deplibs"
7794 else
7795 echo
7796 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
7797 echo "*** I have the capability to make that library automatically link in when"
7798 echo "*** you link to this library. But I can only do this if you have a"
7799 echo "*** shared version of the library, which you do not appear to have"
7800 echo "*** because the file extensions .$libext of this argument makes me believe"
7801 echo "*** that it is just a static archive that I should not use here."
7802 fi
7803 ;;
7804 esac
7805 continue
7806 ;;
7807 prog)
7808 if test link != "$pass"; then
7809 deplibs="$deplib $deplibs"
7810 else
7811 compile_deplibs="$deplib $compile_deplibs"
7812 finalize_deplibs="$deplib $finalize_deplibs"
7813 fi
7814 continue
7815 ;;
7816 esac # linkmode
7817 ;; # *.$libext
7818 *.lo | *.$objext)
7819 if test conv = "$pass"; then
7820 deplibs="$deplib $deplibs"
7821 elif test prog = "$linkmode"; then
7822 if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
7823 # If there is no dlopen support or we're linking statically,
7824 # we need to preload.
7825 func_append newdlprefiles " $deplib"
7826 compile_deplibs="$deplib $compile_deplibs"
7827 finalize_deplibs="$deplib $finalize_deplibs"
7828 else
7829 func_append newdlfiles " $deplib"
7830 fi
7831 fi
7832 continue
7833 ;;
7834 %DEPLIBS%)
7835 alldeplibs=:
7836 continue
7837 ;;
7838 esac # case $deplib
7839
7840 $found || test -f "$lib" \
7841 || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
7842
7843 # Check to see that this really is a libtool archive.
7844 func_lalib_unsafe_p "$lib" \
7845 || func_fatal_error "'$lib' is not a valid libtool archive"
7846
7847 func_dirname "$lib" "" "."
7848 ladir=$func_dirname_result
7849
7850 dlname=
7851 dlopen=
7852 dlpreopen=
7853 libdir=
7854 library_names=
7855 old_library=
7856 inherited_linker_flags=
7857 # If the library was installed with an old release of libtool,
7858 # it will not redefine variables installed, or shouldnotlink
7859 installed=yes
7860 shouldnotlink=no
7861 avoidtemprpath=
7862
7863
7864 # Read the .la file
7865 func_source "$lib"
7866
7867 # Convert "-framework foo" to "foo.ltframework"
7868 if test -n "$inherited_linker_flags"; then
7869 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
7870 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
7871 case " $new_inherited_linker_flags " in
7872 *" $tmp_inherited_linker_flag "*) ;;
7873 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
7874 esac
7875 done
7876 fi
7877 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7878 if test lib,link = "$linkmode,$pass" ||
7879 test prog,scan = "$linkmode,$pass" ||
7880 { test prog != "$linkmode" && test lib != "$linkmode"; }; then
7881 test -n "$dlopen" && func_append dlfiles " $dlopen"
7882 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
7883 fi
7884
7885 if test conv = "$pass"; then
7886 # Only check for convenience libraries
7887 deplibs="$lib $deplibs"
7888 if test -z "$libdir"; then
7889 if test -z "$old_library"; then
7890 func_fatal_error "cannot find name of link library for '$lib'"
7891 fi
7892 # It is a libtool convenience library, so add in its objects.
7893 func_append convenience " $ladir/$objdir/$old_library"
7894 func_append old_convenience " $ladir/$objdir/$old_library"
7895 tmp_libs=
7896 for deplib in $dependency_libs; do
7897 deplibs="$deplib $deplibs"
7898 if $opt_preserve_dup_deps; then
7899 case "$tmp_libs " in
7900 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7901 esac
7902 fi
7903 func_append tmp_libs " $deplib"
7904 done
7905 elif test prog != "$linkmode" && test lib != "$linkmode"; then
7906 func_fatal_error "'$lib' is not a convenience library"
7907 fi
7908 continue
7909 fi # $pass = conv
7910
7911
7912 # Get the name of the library we link against.
7913 linklib=
7914 if test -n "$old_library" &&
7915 { test yes = "$prefer_static_libs" ||
7916 test built,no = "$prefer_static_libs,$installed"; }; then
7917 linklib=$old_library
7918 else
7919 for l in $old_library $library_names; do
7920 linklib=$l
7921 done
7922 fi
7923 if test -z "$linklib"; then
7924 func_fatal_error "cannot find name of link library for '$lib'"
7925 fi
7926
7927 # This library was specified with -dlopen.
7928 if test dlopen = "$pass"; then
7929 test -z "$libdir" \
7930 && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
7931 if test -z "$dlname" ||
7932 test yes != "$dlopen_support" ||
7933 test no = "$build_libtool_libs"
7934 then
7935 # If there is no dlname, no dlopen support or we're linking
7936 # statically, we need to preload. We also need to preload any
7937 # dependent libraries so libltdl's deplib preloader doesn't
7938 # bomb out in the load deplibs phase.
7939 func_append dlprefiles " $lib $dependency_libs"
7940 else
7941 func_append newdlfiles " $lib"
7942 fi
7943 continue
7944 fi # $pass = dlopen
7945
7946 # We need an absolute path.
7947 case $ladir in
7948 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
7949 *)
7950 abs_ladir=`cd "$ladir" && pwd`
7951 if test -z "$abs_ladir"; then
7952 func_warning "cannot determine absolute directory name of '$ladir'"
7953 func_warning "passing it literally to the linker, although it might fail"
7954 abs_ladir=$ladir
7955 fi
7956 ;;
7957 esac
7958 func_basename "$lib"
7959 laname=$func_basename_result
7960
7961 # Find the relevant object directory and library name.
7962 if test yes = "$installed"; then
7963 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
7964 func_warning "library '$lib' was moved."
7965 dir=$ladir
7966 absdir=$abs_ladir
7967 libdir=$abs_ladir
7968 else
7969 dir=$lt_sysroot$libdir
7970 absdir=$lt_sysroot$libdir
7971 fi
7972 test yes = "$hardcode_automatic" && avoidtemprpath=yes
7973 else
7974 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
7975 dir=$ladir
7976 absdir=$abs_ladir
7977 # Remove this search path later
7978 func_append notinst_path " $abs_ladir"
7979 else
7980 dir=$ladir/$objdir
7981 absdir=$abs_ladir/$objdir
7982 # Remove this search path later
7983 func_append notinst_path " $abs_ladir"
7984 fi
7985 fi # $installed = yes
7986 func_stripname 'lib' '.la' "$laname"
7987 name=$func_stripname_result
7988
7989 # This library was specified with -dlpreopen.
7990 if test dlpreopen = "$pass"; then
7991 if test -z "$libdir" && test prog = "$linkmode"; then
7992 func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
7993 fi
7994 case $host in
7995 # special handling for platforms with PE-DLLs.
7996 *cygwin* | *mingw* | *cegcc* )
7997 # Linker will automatically link against shared library if both
7998 # static and shared are present. Therefore, ensure we extract
7999 # symbols from the import library if a shared library is present
8000 # (otherwise, the dlopen module name will be incorrect). We do
8001 # this by putting the import library name into $newdlprefiles.
8002 # We recover the dlopen module name by 'saving' the la file
8003 # name in a special purpose variable, and (later) extracting the
8004 # dlname from the la file.
8005 if test -n "$dlname"; then
8006 func_tr_sh "$dir/$linklib"
8007 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
8008 func_append newdlprefiles " $dir/$linklib"
8009 else
8010 func_append newdlprefiles " $dir/$old_library"
8011 # Keep a list of preopened convenience libraries to check
8012 # that they are being used correctly in the link pass.
8013 test -z "$libdir" && \
8014 func_append dlpreconveniencelibs " $dir/$old_library"
8015 fi
8016 ;;
8017 * )
8018 # Prefer using a static library (so that no silly _DYNAMIC symbols
8019 # are required to link).
8020 if test -n "$old_library"; then
8021 func_append newdlprefiles " $dir/$old_library"
8022 # Keep a list of preopened convenience libraries to check
8023 # that they are being used correctly in the link pass.
8024 test -z "$libdir" && \
8025 func_append dlpreconveniencelibs " $dir/$old_library"
8026 # Otherwise, use the dlname, so that lt_dlopen finds it.
8027 elif test -n "$dlname"; then
8028 func_append newdlprefiles " $dir/$dlname"
8029 else
8030 func_append newdlprefiles " $dir/$linklib"
8031 fi
8032 ;;
8033 esac
8034 fi # $pass = dlpreopen
8035
8036 if test -z "$libdir"; then
8037 # Link the convenience library
8038 if test lib = "$linkmode"; then
8039 deplibs="$dir/$old_library $deplibs"
8040 elif test prog,link = "$linkmode,$pass"; then
8041 compile_deplibs="$dir/$old_library $compile_deplibs"
8042 finalize_deplibs="$dir/$old_library $finalize_deplibs"
8043 else
8044 deplibs="$lib $deplibs" # used for prog,scan pass
8045 fi
8046 continue
8047 fi
8048
8049
8050 if test prog = "$linkmode" && test link != "$pass"; then
8051 func_append newlib_search_path " $ladir"
8052 deplibs="$lib $deplibs"
8053
8054 linkalldeplibs=false
8055 if test no != "$link_all_deplibs" || test -z "$library_names" ||
8056 test no = "$build_libtool_libs"; then
8057 linkalldeplibs=:
8058 fi
8059
8060 tmp_libs=
8061 for deplib in $dependency_libs; do
8062 case $deplib in
8063 -L*) func_stripname '-L' '' "$deplib"
8064 func_resolve_sysroot "$func_stripname_result"
8065 func_append newlib_search_path " $func_resolve_sysroot_result"
8066 ;;
8067 esac
8068 # Need to link against all dependency_libs?
8069 if $linkalldeplibs; then
8070 deplibs="$deplib $deplibs"
8071 else
8072 # Need to hardcode shared library paths
8073 # or/and link against static libraries
8074 newdependency_libs="$deplib $newdependency_libs"
8075 fi
8076 if $opt_preserve_dup_deps; then
8077 case "$tmp_libs " in
8078 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
8079 esac
8080 fi
8081 func_append tmp_libs " $deplib"
8082 done # for deplib
8083 continue
8084 fi # $linkmode = prog...
8085
8086 if test prog,link = "$linkmode,$pass"; then
8087 if test -n "$library_names" &&
8088 { { test no = "$prefer_static_libs" ||
8089 test built,yes = "$prefer_static_libs,$installed"; } ||
8090 test -z "$old_library"; }; then
8091 # We need to hardcode the library path
8092 if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
8093 # Make sure the rpath contains only unique directories.
8094 case $temp_rpath: in
8095 *"$absdir:"*) ;;
8096 *) func_append temp_rpath "$absdir:" ;;
8097 esac
8098 fi
8099
8100 # Hardcode the library path.
8101 # Skip directories that are in the system default run-time
8102 # search path.
8103 case " $sys_lib_dlsearch_path " in
8104 *" $absdir "*) ;;
8105 *)
8106 case "$compile_rpath " in
8107 *" $absdir "*) ;;
8108 *) func_append compile_rpath " $absdir" ;;
8109 esac
8110 ;;
8111 esac
8112 case " $sys_lib_dlsearch_path " in
8113 *" $libdir "*) ;;
8114 *)
8115 case "$finalize_rpath " in
8116 *" $libdir "*) ;;
8117 *) func_append finalize_rpath " $libdir" ;;
8118 esac
8119 ;;
8120 esac
8121 fi # $linkmode,$pass = prog,link...
8122
8123 if $alldeplibs &&
8124 { test pass_all = "$deplibs_check_method" ||
8125 { test yes = "$build_libtool_libs" &&
8126 test -n "$library_names"; }; }; then
8127 # We only need to search for static libraries
8128 continue
8129 fi
8130 fi
8131
8132 link_static=no # Whether the deplib will be linked statically
8133 use_static_libs=$prefer_static_libs
8134 if test built = "$use_static_libs" && test yes = "$installed"; then
8135 use_static_libs=no
8136 fi
8137 if test -n "$library_names" &&
8138 { test no = "$use_static_libs" || test -z "$old_library"; }; then
8139 case $host in
8140 *cygwin* | *mingw* | *cegcc* | *os2*)
8141 # No point in relinking DLLs because paths are not encoded
8142 func_append notinst_deplibs " $lib"
8143 need_relink=no
8144 ;;
8145 *)
8146 if test no = "$installed"; then
8147 func_append notinst_deplibs " $lib"
8148 need_relink=yes
8149 fi
8150 ;;
8151 esac
8152 # This is a shared library
8153
8154 # Warn about portability, can't link against -module's on some
8155 # systems (darwin). Don't bleat about dlopened modules though!
8156 dlopenmodule=
8157 for dlpremoduletest in $dlprefiles; do
8158 if test "X$dlpremoduletest" = "X$lib"; then
8159 dlopenmodule=$dlpremoduletest
8160 break
8161 fi
8162 done
8163 if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
8164 echo
8165 if test prog = "$linkmode"; then
8166 $ECHO "*** Warning: Linking the executable $output against the loadable module"
8167 else
8168 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
8169 fi
8170 $ECHO "*** $linklib is not portable!"
8171 fi
8172 if test lib = "$linkmode" &&
8173 test yes = "$hardcode_into_libs"; then
8174 # Hardcode the library path.
8175 # Skip directories that are in the system default run-time
8176 # search path.
8177 case " $sys_lib_dlsearch_path " in
8178 *" $absdir "*) ;;
8179 *)
8180 case "$compile_rpath " in
8181 *" $absdir "*) ;;
8182 *) func_append compile_rpath " $absdir" ;;
8183 esac
8184 ;;
8185 esac
8186 case " $sys_lib_dlsearch_path " in
8187 *" $libdir "*) ;;
8188 *)
8189 case "$finalize_rpath " in
8190 *" $libdir "*) ;;
8191 *) func_append finalize_rpath " $libdir" ;;
8192 esac
8193 ;;
8194 esac
8195 fi
8196
8197 if test -n "$old_archive_from_expsyms_cmds"; then
8198 # figure out the soname
8199 set dummy $library_names
8200 shift
8201 realname=$1
8202 shift
8203 libname=`eval "\\$ECHO \"$libname_spec\""`
8204 # use dlname if we got it. it's perfectly good, no?
8205 if test -n "$dlname"; then
8206 soname=$dlname
8207 elif test -n "$soname_spec"; then
8208 # bleh windows
8209 case $host in
8210 *cygwin* | mingw* | *cegcc* | *os2*)
8211 func_arith $current - $age
8212 major=$func_arith_result
8213 versuffix=-$major
8214 ;;
8215 esac
8216 eval soname=\"$soname_spec\"
8217 else
8218 soname=$realname
8219 fi
8220
8221 # Make a new name for the extract_expsyms_cmds to use
8222 soroot=$soname
8223 func_basename "$soroot"
8224 soname=$func_basename_result
8225 func_stripname 'lib' '.dll' "$soname"
8226 newlib=libimp-$func_stripname_result.a
8227
8228 # If the library has no export list, then create one now
8229 if test -f "$output_objdir/$soname-def"; then :
8230 else
8231 func_verbose "extracting exported symbol list from '$soname'"
8232 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
8233 fi
8234
8235 # Create $newlib
8236 if test -f "$output_objdir/$newlib"; then :; else
8237 func_verbose "generating import library for '$soname'"
8238 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
8239 fi
8240 # make sure the library variables are pointing to the new library
8241 dir=$output_objdir
8242 linklib=$newlib
8243 fi # test -n "$old_archive_from_expsyms_cmds"
8244
8245 if test prog = "$linkmode" || test relink != "$opt_mode"; then
8246 add_shlibpath=
8247 add_dir=
8248 add=
8249 lib_linked=yes
8250 case $hardcode_action in
8251 immediate | unsupported)
8252 if test no = "$hardcode_direct"; then
8253 add=$dir/$linklib
8254 case $host in
8255 *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
8256 *-*-sysv4*uw2*) add_dir=-L$dir ;;
8257 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
8258 *-*-unixware7*) add_dir=-L$dir ;;
8259 *-*-darwin* )
8260 # if the lib is a (non-dlopened) module then we cannot
8261 # link against it, someone is ignoring the earlier warnings
8262 if /usr/bin/file -L $add 2> /dev/null |
8263 $GREP ": [^:]* bundle" >/dev/null; then
8264 if test "X$dlopenmodule" != "X$lib"; then
8265 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
8266 if test -z "$old_library"; then
8267 echo
8268 echo "*** And there doesn't seem to be a static archive available"
8269 echo "*** The link will probably fail, sorry"
8270 else
8271 add=$dir/$old_library
8272 fi
8273 elif test -n "$old_library"; then
8274 add=$dir/$old_library
8275 fi
8276 fi
8277 esac
8278 elif test no = "$hardcode_minus_L"; then
8279 case $host in
8280 *-*-sunos*) add_shlibpath=$dir ;;
8281 esac
8282 add_dir=-L$dir
8283 add=-l$name
8284 elif test no = "$hardcode_shlibpath_var"; then
8285 add_shlibpath=$dir
8286 add=-l$name
8287 else
8288 lib_linked=no
8289 fi
8290 ;;
8291 relink)
8292 if test yes = "$hardcode_direct" &&
8293 test no = "$hardcode_direct_absolute"; then
8294 add=$dir/$linklib
8295 elif test yes = "$hardcode_minus_L"; then
8296 add_dir=-L$absdir
8297 # Try looking first in the location we're being installed to.
8298 if test -n "$inst_prefix_dir"; then
8299 case $libdir in
8300 [\\/]*)
8301 func_append add_dir " -L$inst_prefix_dir$libdir"
8302 ;;
8303 esac
8304 fi
8305 add=-l$name
8306 elif test yes = "$hardcode_shlibpath_var"; then
8307 add_shlibpath=$dir
8308 add=-l$name
8309 else
8310 lib_linked=no
8311 fi
8312 ;;
8313 *) lib_linked=no ;;
8314 esac
8315
8316 if test yes != "$lib_linked"; then
8317 func_fatal_configuration "unsupported hardcode properties"
8318 fi
8319
8320 if test -n "$add_shlibpath"; then
8321 case :$compile_shlibpath: in
8322 *":$add_shlibpath:"*) ;;
8323 *) func_append compile_shlibpath "$add_shlibpath:" ;;
8324 esac
8325 fi
8326 if test prog = "$linkmode"; then
8327 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
8328 test -n "$add" && compile_deplibs="$add $compile_deplibs"
8329 else
8330 test -n "$add_dir" && deplibs="$add_dir $deplibs"
8331 test -n "$add" && deplibs="$add $deplibs"
8332 if test yes != "$hardcode_direct" &&
8333 test yes != "$hardcode_minus_L" &&
8334 test yes = "$hardcode_shlibpath_var"; then
8335 case :$finalize_shlibpath: in
8336 *":$libdir:"*) ;;
8337 *) func_append finalize_shlibpath "$libdir:" ;;
8338 esac
8339 fi
8340 fi
8341 fi
8342
8343 if test prog = "$linkmode" || test relink = "$opt_mode"; then
8344 add_shlibpath=
8345 add_dir=
8346 add=
8347 # Finalize command for both is simple: just hardcode it.
8348 if test yes = "$hardcode_direct" &&
8349 test no = "$hardcode_direct_absolute"; then
8350 add=$libdir/$linklib
8351 elif test yes = "$hardcode_minus_L"; then
8352 add_dir=-L$libdir
8353 add=-l$name
8354 elif test yes = "$hardcode_shlibpath_var"; then
8355 case :$finalize_shlibpath: in
8356 *":$libdir:"*) ;;
8357 *) func_append finalize_shlibpath "$libdir:" ;;
8358 esac
8359 add=-l$name
8360 elif test yes = "$hardcode_automatic"; then
8361 if test -n "$inst_prefix_dir" &&
8362 test -f "$inst_prefix_dir$libdir/$linklib"; then
8363 add=$inst_prefix_dir$libdir/$linklib
8364 else
8365 add=$libdir/$linklib
8366 fi
8367 else
8368 # We cannot seem to hardcode it, guess we'll fake it.
8369 add_dir=-L$libdir
8370 # Try looking first in the location we're being installed to.
8371 if test -n "$inst_prefix_dir"; then
8372 case $libdir in
8373 [\\/]*)
8374 func_append add_dir " -L$inst_prefix_dir$libdir"
8375 ;;
8376 esac
8377 fi
8378 add=-l$name
8379 fi
8380
8381 if test prog = "$linkmode"; then
8382 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
8383 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
8384 else
8385 test -n "$add_dir" && deplibs="$add_dir $deplibs"
8386 test -n "$add" && deplibs="$add $deplibs"
8387 fi
8388 fi
8389 elif test prog = "$linkmode"; then
8390 # Here we assume that one of hardcode_direct or hardcode_minus_L
8391 # is not unsupported. This is valid on all known static and
8392 # shared platforms.
8393 if test unsupported != "$hardcode_direct"; then
8394 test -n "$old_library" && linklib=$old_library
8395 compile_deplibs="$dir/$linklib $compile_deplibs"
8396 finalize_deplibs="$dir/$linklib $finalize_deplibs"
8397 else
8398 compile_deplibs="-l$name -L$dir $compile_deplibs"
8399 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
8400 fi
8401 elif test yes = "$build_libtool_libs"; then
8402 # Not a shared library
8403 if test pass_all != "$deplibs_check_method"; then
8404 # We're trying link a shared library against a static one
8405 # but the system doesn't support it.
8406
8407 # Just print a warning and add the library to dependency_libs so
8408 # that the program can be linked against the static library.
8409 echo
8410 $ECHO "*** Warning: This system cannot link to static lib archive $lib."
8411 echo "*** I have the capability to make that library automatically link in when"
8412 echo "*** you link to this library. But I can only do this if you have a"
8413 echo "*** shared version of the library, which you do not appear to have."
8414 if test yes = "$module"; then
8415 echo "*** But as you try to build a module library, libtool will still create "
8416 echo "*** a static module, that should work as long as the dlopening application"
8417 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
8418 if test -z "$global_symbol_pipe"; then
8419 echo
8420 echo "*** However, this would only work if libtool was able to extract symbol"
8421 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
8422 echo "*** not find such a program. So, this module is probably useless."
8423 echo "*** 'nm' from GNU binutils and a full rebuild may help."
8424 fi
8425 if test no = "$build_old_libs"; then
8426 build_libtool_libs=module
8427 build_old_libs=yes
8428 else
8429 build_libtool_libs=no
8430 fi
8431 fi
8432 else
8433 deplibs="$dir/$old_library $deplibs"
8434 link_static=yes
8435 fi
8436 fi # link shared/static library?
8437
8438 if test lib = "$linkmode"; then
8439 if test -n "$dependency_libs" &&
8440 { test yes != "$hardcode_into_libs" ||
8441 test yes = "$build_old_libs" ||
8442 test yes = "$link_static"; }; then
8443 # Extract -R from dependency_libs
8444 temp_deplibs=
8445 for libdir in $dependency_libs; do
8446 case $libdir in
8447 -R*) func_stripname '-R' '' "$libdir"
8448 temp_xrpath=$func_stripname_result
8449 case " $xrpath " in
8450 *" $temp_xrpath "*) ;;
8451 *) func_append xrpath " $temp_xrpath";;
8452 esac;;
8453 *) func_append temp_deplibs " $libdir";;
8454 esac
8455 done
8456 dependency_libs=$temp_deplibs
8457 fi
8458
8459 func_append newlib_search_path " $absdir"
8460 # Link against this library
8461 test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
8462 # ... and its dependency_libs
8463 tmp_libs=
8464 for deplib in $dependency_libs; do
8465 newdependency_libs="$deplib $newdependency_libs"
8466 case $deplib in
8467 -L*) func_stripname '-L' '' "$deplib"
8468 func_resolve_sysroot "$func_stripname_result";;
8469 *) func_resolve_sysroot "$deplib" ;;
8470 esac
8471 if $opt_preserve_dup_deps; then
8472 case "$tmp_libs " in
8473 *" $func_resolve_sysroot_result "*)
8474 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
8475 esac
8476 fi
8477 func_append tmp_libs " $func_resolve_sysroot_result"
8478 done
8479
8480 if test no != "$link_all_deplibs"; then
8481 # Add the search paths of all dependency libraries
8482 for deplib in $dependency_libs; do
8483 path=
8484 case $deplib in
8485 -L*) path=$deplib ;;
8486 *.la)
8487 func_resolve_sysroot "$deplib"
8488 deplib=$func_resolve_sysroot_result
8489 func_dirname "$deplib" "" "."
8490 dir=$func_dirname_result
8491 # We need an absolute path.
8492 case $dir in
8493 [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
8494 *)
8495 absdir=`cd "$dir" && pwd`
8496 if test -z "$absdir"; then
8497 func_warning "cannot determine absolute directory name of '$dir'"
8498 absdir=$dir
8499 fi
8500 ;;
8501 esac
8502 if $GREP "^installed=no" $deplib > /dev/null; then
8503 case $host in
8504 *-*-darwin*)
8505 depdepl=
8506 eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
8507 if test -n "$deplibrary_names"; then
8508 for tmp in $deplibrary_names; do
8509 depdepl=$tmp
8510 done
8511 if test -f "$absdir/$objdir/$depdepl"; then
8512 depdepl=$absdir/$objdir/$depdepl
8513 darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8514 if test -z "$darwin_install_name"; then
8515 darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8516 fi
8517 func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
8518 func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
8519 path=
8520 fi
8521 fi
8522 ;;
8523 *)
8524 path=-L$absdir/$objdir
8525 ;;
8526 esac
8527 else
8528 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8529 test -z "$libdir" && \
8530 func_fatal_error "'$deplib' is not a valid libtool archive"
8531 test "$absdir" != "$libdir" && \
8532 func_warning "'$deplib' seems to be moved"
8533
8534 path=-L$absdir
8535 fi
8536 ;;
8537 esac
8538 case " $deplibs " in
8539 *" $path "*) ;;
8540 *) deplibs="$path $deplibs" ;;
8541 esac
8542 done
8543 fi # link_all_deplibs != no
8544 fi # linkmode = lib
8545 done # for deplib in $libs
8546 if test link = "$pass"; then
8547 if test prog = "$linkmode"; then
8548 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
8549 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
8550 else
8551 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8552 fi
8553 fi
8554 dependency_libs=$newdependency_libs
8555 if test dlpreopen = "$pass"; then
8556 # Link the dlpreopened libraries before other libraries
8557 for deplib in $save_deplibs; do
8558 deplibs="$deplib $deplibs"
8559 done
8560 fi
8561 if test dlopen != "$pass"; then
8562 test conv = "$pass" || {
8563 # Make sure lib_search_path contains only unique directories.
8564 lib_search_path=
8565 for dir in $newlib_search_path; do
8566 case "$lib_search_path " in
8567 *" $dir "*) ;;
8568 *) func_append lib_search_path " $dir" ;;
8569 esac
8570 done
8571 newlib_search_path=
8572 }
8573
8574 if test prog,link = "$linkmode,$pass"; then
8575 vars="compile_deplibs finalize_deplibs"
8576 else
8577 vars=deplibs
8578 fi
8579 for var in $vars dependency_libs; do
8580 # Add libraries to $var in reverse order
8581 eval tmp_libs=\"\$$var\"
8582 new_libs=
8583 for deplib in $tmp_libs; do
8584 # FIXME: Pedantically, this is the right thing to do, so
8585 # that some nasty dependency loop isn't accidentally
8586 # broken:
8587 #new_libs="$deplib $new_libs"
8588 # Pragmatically, this seems to cause very few problems in
8589 # practice:
8590 case $deplib in
8591 -L*) new_libs="$deplib $new_libs" ;;
8592 -R*) ;;
8593 *)
8594 # And here is the reason: when a library appears more
8595 # than once as an explicit dependence of a library, or
8596 # is implicitly linked in more than once by the
8597 # compiler, it is considered special, and multiple
8598 # occurrences thereof are not removed. Compare this
8599 # with having the same library being listed as a
8600 # dependency of multiple other libraries: in this case,
8601 # we know (pedantically, we assume) the library does not
8602 # need to be listed more than once, so we keep only the
8603 # last copy. This is not always right, but it is rare
8604 # enough that we require users that really mean to play
8605 # such unportable linking tricks to link the library
8606 # using -Wl,-lname, so that libtool does not consider it
8607 # for duplicate removal.
8608 case " $specialdeplibs " in
8609 *" $deplib "*) new_libs="$deplib $new_libs" ;;
8610 *)
8611 case " $new_libs " in
8612 *" $deplib "*) ;;
8613 *) new_libs="$deplib $new_libs" ;;
8614 esac
8615 ;;
8616 esac
8617 ;;
8618 esac
8619 done
8620 tmp_libs=
8621 for deplib in $new_libs; do
8622 case $deplib in
8623 -L*)
8624 case " $tmp_libs " in
8625 *" $deplib "*) ;;
8626 *) func_append tmp_libs " $deplib" ;;
8627 esac
8628 ;;
8629 *) func_append tmp_libs " $deplib" ;;
8630 esac
8631 done
8632 eval $var=\"$tmp_libs\"
8633 done # for var
8634 fi
8635
8636 # Add Sun CC postdeps if required:
8637 test CXX = "$tagname" && {
8638 case $host_os in
8639 linux*)
8640 case `$CC -V 2>&1 | sed 5q` in
8641 *Sun\ C*) # Sun C++ 5.9
8642 func_suncc_cstd_abi
8643
8644 if test no != "$suncc_use_cstd_abi"; then
8645 func_append postdeps ' -library=Cstd -library=Crun'
8646 fi
8647 ;;
8648 esac
8649 ;;
8650
8651 solaris*)
8652 func_cc_basename "$CC"
8653 case $func_cc_basename_result in
8654 CC* | sunCC*)
8655 func_suncc_cstd_abi
8656
8657 if test no != "$suncc_use_cstd_abi"; then
8658 func_append postdeps ' -library=Cstd -library=Crun'
8659 fi
8660 ;;
8661 esac
8662 ;;
8663 esac
8664 }
8665
8666 # Last step: remove runtime libs from dependency_libs
8667 # (they stay in deplibs)
8668 tmp_libs=
8669 for i in $dependency_libs; do
8670 case " $predeps $postdeps $compiler_lib_search_path " in
8671 *" $i "*)
8672 i=
8673 ;;
8674 esac
8675 if test -n "$i"; then
8676 func_append tmp_libs " $i"
8677 fi
8678 done
8679 dependency_libs=$tmp_libs
8680 done # for pass
8681 if test prog = "$linkmode"; then
8682 dlfiles=$newdlfiles
8683 fi
8684 if test prog = "$linkmode" || test lib = "$linkmode"; then
8685 dlprefiles=$newdlprefiles
8686 fi
8687
8688 case $linkmode in
8689 oldlib)
8690 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
8691 func_warning "'-dlopen' is ignored for archives"
8692 fi
8693
8694 case " $deplibs" in
8695 *\ -l* | *\ -L*)
8696 func_warning "'-l' and '-L' are ignored for archives" ;;
8697 esac
8698
8699 test -n "$rpath" && \
8700 func_warning "'-rpath' is ignored for archives"
8701
8702 test -n "$xrpath" && \
8703 func_warning "'-R' is ignored for archives"
8704
8705 test -n "$vinfo" && \
8706 func_warning "'-version-info/-version-number' is ignored for archives"
8707
8708 test -n "$release" && \
8709 func_warning "'-release' is ignored for archives"
8710
8711 test -n "$export_symbols$export_symbols_regex" && \
8712 func_warning "'-export-symbols' is ignored for archives"
8713
8714 # Now set the variables for building old libraries.
8715 build_libtool_libs=no
8716 oldlibs=$output
8717 func_append objs "$old_deplibs"
8718 ;;
8719
8720 lib)
8721 # Make sure we only generate libraries of the form 'libNAME.la'.
8722 case $outputname in
8723 lib*)
8724 func_stripname 'lib' '.la' "$outputname"
8725 name=$func_stripname_result
8726 eval shared_ext=\"$shrext_cmds\"
8727 eval libname=\"$libname_spec\"
8728 ;;
8729 *)
8730 test no = "$module" \
8731 && func_fatal_help "libtool library '$output' must begin with 'lib'"
8732
8733 if test no != "$need_lib_prefix"; then
8734 # Add the "lib" prefix for modules if required
8735 func_stripname '' '.la' "$outputname"
8736 name=$func_stripname_result
8737 eval shared_ext=\"$shrext_cmds\"
8738 eval libname=\"$libname_spec\"
8739 else
8740 func_stripname '' '.la' "$outputname"
8741 libname=$func_stripname_result
8742 fi
8743 ;;
8744 esac
8745
8746 if test -n "$objs"; then
8747 if test pass_all != "$deplibs_check_method"; then
8748 func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
8749 else
8750 echo
8751 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
8752 $ECHO "*** objects $objs is not portable!"
8753 func_append libobjs " $objs"
8754 fi
8755 fi
8756
8757 test no = "$dlself" \
8758 || func_warning "'-dlopen self' is ignored for libtool libraries"
8759
8760 set dummy $rpath
8761 shift
8762 test 1 -lt "$#" \
8763 && func_warning "ignoring multiple '-rpath's for a libtool library"
8764
8765 install_libdir=$1
8766
8767 oldlibs=
8768 if test -z "$rpath"; then
8769 if test yes = "$build_libtool_libs"; then
8770 # Building a libtool convenience library.
8771 # Some compilers have problems with a '.al' extension so
8772 # convenience libraries should have the same extension an
8773 # archive normally would.
8774 oldlibs="$output_objdir/$libname.$libext $oldlibs"
8775 build_libtool_libs=convenience
8776 build_old_libs=yes
8777 fi
8778
8779 test -n "$vinfo" && \
8780 func_warning "'-version-info/-version-number' is ignored for convenience libraries"
8781
8782 test -n "$release" && \
8783 func_warning "'-release' is ignored for convenience libraries"
8784 else
8785
8786 # Parse the version information argument.
8787 save_ifs=$IFS; IFS=:
8788 set dummy $vinfo 0 0 0
8789 shift
8790 IFS=$save_ifs
8791
8792 test -n "$7" && \
8793 func_fatal_help "too many parameters to '-version-info'"
8794
8795 # convert absolute version numbers to libtool ages
8796 # this retains compatibility with .la files and attempts
8797 # to make the code below a bit more comprehensible
8798
8799 case $vinfo_number in
8800 yes)
8801 number_major=$1
8802 number_minor=$2
8803 number_revision=$3
8804 #
8805 # There are really only two kinds -- those that
8806 # use the current revision as the major version
8807 # and those that subtract age and use age as
8808 # a minor version. But, then there is irix
8809 # that has an extra 1 added just for fun
8810 #
8811 case $version_type in
8812 # correct linux to gnu/linux during the next big refactor
8813 darwin|freebsd-elf|linux|osf|windows|none)
8814 func_arith $number_major + $number_minor
8815 current=$func_arith_result
8816 age=$number_minor
8817 revision=$number_revision
8818 ;;
8819 freebsd-aout|qnx|sunos)
8820 current=$number_major
8821 revision=$number_minor
8822 age=0
8823 ;;
8824 irix|nonstopux)
8825 func_arith $number_major + $number_minor
8826 current=$func_arith_result
8827 age=$number_minor
8828 revision=$number_minor
8829 lt_irix_increment=no
8830 ;;
8831 *)
8832 func_fatal_configuration "$modename: unknown library version type '$version_type'"
8833 ;;
8834 esac
8835 ;;
8836 no)
8837 current=$1
8838 revision=$2
8839 age=$3
8840 ;;
8841 esac
8842
8843 # Check that each of the things are valid numbers.
8844 case $current in
8845 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]) ;;
8846 *)
8847 func_error "CURRENT '$current' must be a nonnegative integer"
8848 func_fatal_error "'$vinfo' is not valid version information"
8849 ;;
8850 esac
8851
8852 case $revision in
8853 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]) ;;
8854 *)
8855 func_error "REVISION '$revision' must be a nonnegative integer"
8856 func_fatal_error "'$vinfo' is not valid version information"
8857 ;;
8858 esac
8859
8860 case $age in
8861 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]) ;;
8862 *)
8863 func_error "AGE '$age' must be a nonnegative integer"
8864 func_fatal_error "'$vinfo' is not valid version information"
8865 ;;
8866 esac
8867
8868 if test "$age" -gt "$current"; then
8869 func_error "AGE '$age' is greater than the current interface number '$current'"
8870 func_fatal_error "'$vinfo' is not valid version information"
8871 fi
8872
8873 # Calculate the version variables.
8874 major=
8875 versuffix=
8876 verstring=
8877 case $version_type in
8878 none) ;;
8879
8880 darwin)
8881 # Like Linux, but with the current version available in
8882 # verstring for coding it into the library header
8883 func_arith $current - $age
8884 major=.$func_arith_result
8885 versuffix=$major.$age.$revision
8886 # Darwin ld doesn't like 0 for these options...
8887 func_arith $current + 1
8888 minor_current=$func_arith_result
8889 xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8890 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8891 # On Darwin other compilers
8892 case $CC in
8893 nagfor*)
8894 verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8895 ;;
8896 *)
8897 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8898 ;;
8899 esac
8900 ;;
8901
8902 freebsd-aout)
8903 major=.$current
8904 versuffix=.$current.$revision
8905 ;;
8906
8907 freebsd-elf)
8908 func_arith $current - $age
8909 major=.$func_arith_result
8910 versuffix=$major.$age.$revision
8911 ;;
8912
8913 irix | nonstopux)
8914 if test no = "$lt_irix_increment"; then
8915 func_arith $current - $age
8916 else
8917 func_arith $current - $age + 1
8918 fi
8919 major=$func_arith_result
8920
8921 case $version_type in
8922 nonstopux) verstring_prefix=nonstopux ;;
8923 *) verstring_prefix=sgi ;;
8924 esac
8925 verstring=$verstring_prefix$major.$revision
8926
8927 # Add in all the interfaces that we are compatible with.
8928 loop=$revision
8929 while test 0 -ne "$loop"; do
8930 func_arith $revision - $loop
8931 iface=$func_arith_result
8932 func_arith $loop - 1
8933 loop=$func_arith_result
8934 verstring=$verstring_prefix$major.$iface:$verstring
8935 done
8936
8937 # Before this point, $major must not contain '.'.
8938 major=.$major
8939 versuffix=$major.$revision
8940 ;;
8941
8942 linux) # correct to gnu/linux during the next big refactor
8943 func_arith $current - $age
8944 major=.$func_arith_result
8945 versuffix=$major.$age.$revision
8946 ;;
8947
8948 osf)
8949 func_arith $current - $age
8950 major=.$func_arith_result
8951 versuffix=.$current.$age.$revision
8952 verstring=$current.$age.$revision
8953
8954 # Add in all the interfaces that we are compatible with.
8955 loop=$age
8956 while test 0 -ne "$loop"; do
8957 func_arith $current - $loop
8958 iface=$func_arith_result
8959 func_arith $loop - 1
8960 loop=$func_arith_result
8961 verstring=$verstring:$iface.0
8962 done
8963
8964 # Make executables depend on our current version.
8965 func_append verstring ":$current.0"
8966 ;;
8967
8968 qnx)
8969 major=.$current
8970 versuffix=.$current
8971 ;;
8972
8973 sco)
8974 major=.$current
8975 versuffix=.$current
8976 ;;
8977
8978 sunos)
8979 major=.$current
8980 versuffix=.$current.$revision
8981 ;;
8982
8983 windows)
8984 # Use '-' rather than '.', since we only want one
8985 # extension on DOS 8.3 file systems.
8986 func_arith $current - $age
8987 major=$func_arith_result
8988 versuffix=-$major
8989 ;;
8990
8991 *)
8992 func_fatal_configuration "unknown library version type '$version_type'"
8993 ;;
8994 esac
8995
8996 # Clear the version info if we defaulted, and they specified a release.
8997 if test -z "$vinfo" && test -n "$release"; then
8998 major=
8999 case $version_type in
9000 darwin)
9001 # we can't check for "0.0" in archive_cmds due to quoting
9002 # problems, so we reset it completely
9003 verstring=
9004 ;;
9005 *)
9006 verstring=0.0
9007 ;;
9008 esac
9009 if test no = "$need_version"; then
9010 versuffix=
9011 else
9012 versuffix=.0.0
9013 fi
9014 fi
9015
9016 # Remove version info from name if versioning should be avoided
9017 if test yes,no = "$avoid_version,$need_version"; then
9018 major=
9019 versuffix=
9020 verstring=
9021 fi
9022
9023 # Check to see if the archive will have undefined symbols.
9024 if test yes = "$allow_undefined"; then
9025 if test unsupported = "$allow_undefined_flag"; then
9026 if test yes = "$build_old_libs"; then
9027 func_warning "undefined symbols not allowed in $host shared libraries; building static only"
9028 build_libtool_libs=no
9029 else
9030 func_fatal_error "can't build $host shared library unless -no-undefined is specified"
9031 fi
9032 fi
9033 else
9034 # Don't allow undefined symbols.
9035 allow_undefined_flag=$no_undefined_flag
9036 fi
9037
9038 fi
9039
9040 func_generate_dlsyms "$libname" "$libname" :
9041 func_append libobjs " $symfileobj"
9042 test " " = "$libobjs" && libobjs=
9043
9044 if test relink != "$opt_mode"; then
9045 # Remove our outputs, but don't remove object files since they
9046 # may have been created when compiling PIC objects.
9047 removelist=
9048 tempremovelist=`$ECHO "$output_objdir/*"`
9049 for p in $tempremovelist; do
9050 case $p in
9051 *.$objext | *.gcno)
9052 ;;
9053 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
9054 if test -n "$precious_files_regex"; then
9055 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
9056 then
9057 continue
9058 fi
9059 fi
9060 func_append removelist " $p"
9061 ;;
9062 *) ;;
9063 esac
9064 done
9065 test -n "$removelist" && \
9066 func_show_eval "${RM}r \$removelist"
9067 fi
9068
9069 # Now set the variables for building old libraries.
9070 if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
9071 func_append oldlibs " $output_objdir/$libname.$libext"
9072
9073 # Transform .lo files to .o files.
9074 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
9075 fi
9076
9077 # Eliminate all temporary directories.
9078 #for path in $notinst_path; do
9079 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
9080 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
9081 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
9082 #done
9083
9084 if test -n "$xrpath"; then
9085 # If the user specified any rpath flags, then add them.
9086 temp_xrpath=
9087 for libdir in $xrpath; do
9088 func_replace_sysroot "$libdir"
9089 func_append temp_xrpath " -R$func_replace_sysroot_result"
9090 case "$finalize_rpath " in
9091 *" $libdir "*) ;;
9092 *) func_append finalize_rpath " $libdir" ;;
9093 esac
9094 done
9095 if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
9096 dependency_libs="$temp_xrpath $dependency_libs"
9097 fi
9098 fi
9099
9100 # Make sure dlfiles contains only unique files that won't be dlpreopened
9101 old_dlfiles=$dlfiles
9102 dlfiles=
9103 for lib in $old_dlfiles; do
9104 case " $dlprefiles $dlfiles " in
9105 *" $lib "*) ;;
9106 *) func_append dlfiles " $lib" ;;
9107 esac
9108 done
9109
9110 # Make sure dlprefiles contains only unique files
9111 old_dlprefiles=$dlprefiles
9112 dlprefiles=
9113 for lib in $old_dlprefiles; do
9114 case "$dlprefiles " in
9115 *" $lib "*) ;;
9116 *) func_append dlprefiles " $lib" ;;
9117 esac
9118 done
9119
9120 if test yes = "$build_libtool_libs"; then
9121 if test -n "$rpath"; then
9122 case $host in
9123 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
9124 # these systems don't actually have a c library (as such)!
9125 ;;
9126 *-*-rhapsody* | *-*-darwin1.[012])
9127 # Rhapsody C library is in the System framework
9128 func_append deplibs " System.ltframework"
9129 ;;
9130 *-*-netbsd*)
9131 # Don't link with libc until the a.out ld.so is fixed.
9132 ;;
9133 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
9134 # Do not include libc due to us having libc/libc_r.
9135 ;;
9136 *-*-sco3.2v5* | *-*-sco5v6*)
9137 # Causes problems with __ctype
9138 ;;
9139 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
9140 # Compiler inserts libc in the correct place for threads to work
9141 ;;
9142 *)
9143 # Add libc to deplibs on all other systems if necessary.
9144 if test yes = "$build_libtool_need_lc"; then
9145 func_append deplibs " -lc"
9146 fi
9147 ;;
9148 esac
9149 fi
9150
9151 # Transform deplibs into only deplibs that can be linked in shared.
9152 name_save=$name
9153 libname_save=$libname
9154 release_save=$release
9155 versuffix_save=$versuffix
9156 major_save=$major
9157 # I'm not sure if I'm treating the release correctly. I think
9158 # release should show up in the -l (ie -lgmp5) so we don't want to
9159 # add it in twice. Is that correct?
9160 release=
9161 versuffix=
9162 major=
9163 newdeplibs=
9164 droppeddeps=no
9165 case $deplibs_check_method in
9166 pass_all)
9167 # Don't check for shared/static. Everything works.
9168 # This might be a little naive. We might want to check
9169 # whether the library exists or not. But this is on
9170 # osf3 & osf4 and I'm not really sure... Just
9171 # implementing what was already the behavior.
9172 newdeplibs=$deplibs
9173 ;;
9174 test_compile)
9175 # This code stresses the "libraries are programs" paradigm to its
9176 # limits. Maybe even breaks it. We compile a program, linking it
9177 # against the deplibs as a proxy for the library. Then we can check
9178 # whether they linked in statically or dynamically with ldd.
9179 $opt_dry_run || $RM conftest.c
9180 cat > conftest.c <<EOF
9181 int main() { return 0; }
9182 EOF
9183 $opt_dry_run || $RM conftest
9184 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
9185 ldd_output=`ldd conftest`
9186 for i in $deplibs; do
9187 case $i in
9188 -l*)
9189 func_stripname -l '' "$i"
9190 name=$func_stripname_result
9191 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9192 case " $predeps $postdeps " in
9193 *" $i "*)
9194 func_append newdeplibs " $i"
9195 i=
9196 ;;
9197 esac
9198 fi
9199 if test -n "$i"; then
9200 libname=`eval "\\$ECHO \"$libname_spec\""`
9201 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9202 set dummy $deplib_matches; shift
9203 deplib_match=$1
9204 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9205 func_append newdeplibs " $i"
9206 else
9207 droppeddeps=yes
9208 echo
9209 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9210 echo "*** I have the capability to make that library automatically link in when"
9211 echo "*** you link to this library. But I can only do this if you have a"
9212 echo "*** shared version of the library, which I believe you do not have"
9213 echo "*** because a test_compile did reveal that the linker did not use it for"
9214 echo "*** its dynamic dependency list that programs get resolved with at runtime."
9215 fi
9216 fi
9217 ;;
9218 *)
9219 func_append newdeplibs " $i"
9220 ;;
9221 esac
9222 done
9223 else
9224 # Error occurred in the first compile. Let's try to salvage
9225 # the situation: Compile a separate program for each library.
9226 for i in $deplibs; do
9227 case $i in
9228 -l*)
9229 func_stripname -l '' "$i"
9230 name=$func_stripname_result
9231 $opt_dry_run || $RM conftest
9232 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
9233 ldd_output=`ldd conftest`
9234 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9235 case " $predeps $postdeps " in
9236 *" $i "*)
9237 func_append newdeplibs " $i"
9238 i=
9239 ;;
9240 esac
9241 fi
9242 if test -n "$i"; then
9243 libname=`eval "\\$ECHO \"$libname_spec\""`
9244 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9245 set dummy $deplib_matches; shift
9246 deplib_match=$1
9247 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9248 func_append newdeplibs " $i"
9249 else
9250 droppeddeps=yes
9251 echo
9252 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9253 echo "*** I have the capability to make that library automatically link in when"
9254 echo "*** you link to this library. But I can only do this if you have a"
9255 echo "*** shared version of the library, which you do not appear to have"
9256 echo "*** because a test_compile did reveal that the linker did not use this one"
9257 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
9258 fi
9259 fi
9260 else
9261 droppeddeps=yes
9262 echo
9263 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
9264 echo "*** make it link in! You will probably need to install it or some"
9265 echo "*** library that it depends on before this library will be fully"
9266 echo "*** functional. Installing it before continuing would be even better."
9267 fi
9268 ;;
9269 *)
9270 func_append newdeplibs " $i"
9271 ;;
9272 esac
9273 done
9274 fi
9275 ;;
9276 file_magic*)
9277 set dummy $deplibs_check_method; shift
9278 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
9279 for a_deplib in $deplibs; do
9280 case $a_deplib in
9281 -l*)
9282 func_stripname -l '' "$a_deplib"
9283 name=$func_stripname_result
9284 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9285 case " $predeps $postdeps " in
9286 *" $a_deplib "*)
9287 func_append newdeplibs " $a_deplib"
9288 a_deplib=
9289 ;;
9290 esac
9291 fi
9292 if test -n "$a_deplib"; then
9293 libname=`eval "\\$ECHO \"$libname_spec\""`
9294 if test -n "$file_magic_glob"; then
9295 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
9296 else
9297 libnameglob=$libname
9298 fi
9299 test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
9300 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9301 if test yes = "$want_nocaseglob"; then
9302 shopt -s nocaseglob
9303 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
9304 $nocaseglob
9305 else
9306 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
9307 fi
9308 for potent_lib in $potential_libs; do
9309 # Follow soft links.
9310 if ls -lLd "$potent_lib" 2>/dev/null |
9311 $GREP " -> " >/dev/null; then
9312 continue
9313 fi
9314 # The statement above tries to avoid entering an
9315 # endless loop below, in case of cyclic links.
9316 # We might still enter an endless loop, since a link
9317 # loop can be closed while we follow links,
9318 # but so what?
9319 potlib=$potent_lib
9320 while test -h "$potlib" 2>/dev/null; do
9321 potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
9322 case $potliblink in
9323 [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
9324 *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
9325 esac
9326 done
9327 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
9328 $SED -e 10q |
9329 $EGREP "$file_magic_regex" > /dev/null; then
9330 func_append newdeplibs " $a_deplib"
9331 a_deplib=
9332 break 2
9333 fi
9334 done
9335 done
9336 fi
9337 if test -n "$a_deplib"; then
9338 droppeddeps=yes
9339 echo
9340 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9341 echo "*** I have the capability to make that library automatically link in when"
9342 echo "*** you link to this library. But I can only do this if you have a"
9343 echo "*** shared version of the library, which you do not appear to have"
9344 echo "*** because I did check the linker path looking for a file starting"
9345 if test -z "$potlib"; then
9346 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
9347 else
9348 $ECHO "*** with $libname and none of the candidates passed a file format test"
9349 $ECHO "*** using a file magic. Last file checked: $potlib"
9350 fi
9351 fi
9352 ;;
9353 *)
9354 # Add a -L argument.
9355 func_append newdeplibs " $a_deplib"
9356 ;;
9357 esac
9358 done # Gone through all deplibs.
9359 ;;
9360 match_pattern*)
9361 set dummy $deplibs_check_method; shift
9362 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
9363 for a_deplib in $deplibs; do
9364 case $a_deplib in
9365 -l*)
9366 func_stripname -l '' "$a_deplib"
9367 name=$func_stripname_result
9368 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9369 case " $predeps $postdeps " in
9370 *" $a_deplib "*)
9371 func_append newdeplibs " $a_deplib"
9372 a_deplib=
9373 ;;
9374 esac
9375 fi
9376 if test -n "$a_deplib"; then
9377 libname=`eval "\\$ECHO \"$libname_spec\""`
9378 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9379 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
9380 for potent_lib in $potential_libs; do
9381 potlib=$potent_lib # see symlink-check above in file_magic test
9382 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
9383 $EGREP "$match_pattern_regex" > /dev/null; then
9384 func_append newdeplibs " $a_deplib"
9385 a_deplib=
9386 break 2
9387 fi
9388 done
9389 done
9390 fi
9391 if test -n "$a_deplib"; then
9392 droppeddeps=yes
9393 echo
9394 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9395 echo "*** I have the capability to make that library automatically link in when"
9396 echo "*** you link to this library. But I can only do this if you have a"
9397 echo "*** shared version of the library, which you do not appear to have"
9398 echo "*** because I did check the linker path looking for a file starting"
9399 if test -z "$potlib"; then
9400 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
9401 else
9402 $ECHO "*** with $libname and none of the candidates passed a file format test"
9403 $ECHO "*** using a regex pattern. Last file checked: $potlib"
9404 fi
9405 fi
9406 ;;
9407 *)
9408 # Add a -L argument.
9409 func_append newdeplibs " $a_deplib"
9410 ;;
9411 esac
9412 done # Gone through all deplibs.
9413 ;;
9414 none | unknown | *)
9415 newdeplibs=
9416 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
9417 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9418 for i in $predeps $postdeps; do
9419 # can't use Xsed below, because $i might contain '/'
9420 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
9421 done
9422 fi
9423 case $tmp_deplibs in
9424 *[!\ \ ]*)
9425 echo
9426 if test none = "$deplibs_check_method"; then
9427 echo "*** Warning: inter-library dependencies are not supported in this platform."
9428 else
9429 echo "*** Warning: inter-library dependencies are not known to be supported."
9430 fi
9431 echo "*** All declared inter-library dependencies are being dropped."
9432 droppeddeps=yes
9433 ;;
9434 esac
9435 ;;
9436 esac
9437 versuffix=$versuffix_save
9438 major=$major_save
9439 release=$release_save
9440 libname=$libname_save
9441 name=$name_save
9442
9443 case $host in
9444 *-*-rhapsody* | *-*-darwin1.[012])
9445 # On Rhapsody replace the C library with the System framework
9446 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
9447 ;;
9448 esac
9449
9450 if test yes = "$droppeddeps"; then
9451 if test yes = "$module"; then
9452 echo
9453 echo "*** Warning: libtool could not satisfy all declared inter-library"
9454 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
9455 echo "*** a static module, that should work as long as the dlopening"
9456 echo "*** application is linked with the -dlopen flag."
9457 if test -z "$global_symbol_pipe"; then
9458 echo
9459 echo "*** However, this would only work if libtool was able to extract symbol"
9460 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
9461 echo "*** not find such a program. So, this module is probably useless."
9462 echo "*** 'nm' from GNU binutils and a full rebuild may help."
9463 fi
9464 if test no = "$build_old_libs"; then
9465 oldlibs=$output_objdir/$libname.$libext
9466 build_libtool_libs=module
9467 build_old_libs=yes
9468 else
9469 build_libtool_libs=no
9470 fi
9471 else
9472 echo "*** The inter-library dependencies that have been dropped here will be"
9473 echo "*** automatically added whenever a program is linked with this library"
9474 echo "*** or is declared to -dlopen it."
9475
9476 if test no = "$allow_undefined"; then
9477 echo
9478 echo "*** Since this library must not contain undefined symbols,"
9479 echo "*** because either the platform does not support them or"
9480 echo "*** it was explicitly requested with -no-undefined,"
9481 echo "*** libtool will only create a static version of it."
9482 if test no = "$build_old_libs"; then
9483 oldlibs=$output_objdir/$libname.$libext
9484 build_libtool_libs=module
9485 build_old_libs=yes
9486 else
9487 build_libtool_libs=no
9488 fi
9489 fi
9490 fi
9491 fi
9492 # Done checking deplibs!
9493 deplibs=$newdeplibs
9494 fi
9495 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
9496 case $host in
9497 *-*-darwin*)
9498 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9499 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9500 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9501 ;;
9502 esac
9503
9504 # move library search paths that coincide with paths to not yet
9505 # installed libraries to the beginning of the library search list
9506 new_libs=
9507 for path in $notinst_path; do
9508 case " $new_libs " in
9509 *" -L$path/$objdir "*) ;;
9510 *)
9511 case " $deplibs " in
9512 *" -L$path/$objdir "*)
9513 func_append new_libs " -L$path/$objdir" ;;
9514 esac
9515 ;;
9516 esac
9517 done
9518 for deplib in $deplibs; do
9519 case $deplib in
9520 -L*)
9521 case " $new_libs " in
9522 *" $deplib "*) ;;
9523 *) func_append new_libs " $deplib" ;;
9524 esac
9525 ;;
9526 *) func_append new_libs " $deplib" ;;
9527 esac
9528 done
9529 deplibs=$new_libs
9530
9531 # All the library-specific variables (install_libdir is set above).
9532 library_names=
9533 old_library=
9534 dlname=
9535
9536 # Test again, we may have decided not to build it any more
9537 if test yes = "$build_libtool_libs"; then
9538 # Remove $wl instances when linking with ld.
9539 # FIXME: should test the right _cmds variable.
9540 case $archive_cmds in
9541 *\$LD\ *) wl= ;;
9542 esac
9543 if test yes = "$hardcode_into_libs"; then
9544 # Hardcode the library paths
9545 hardcode_libdirs=
9546 dep_rpath=
9547 rpath=$finalize_rpath
9548 test relink = "$opt_mode" || rpath=$compile_rpath$rpath
9549 for libdir in $rpath; do
9550 if test -n "$hardcode_libdir_flag_spec"; then
9551 if test -n "$hardcode_libdir_separator"; then
9552 func_replace_sysroot "$libdir"
9553 libdir=$func_replace_sysroot_result
9554 if test -z "$hardcode_libdirs"; then
9555 hardcode_libdirs=$libdir
9556 else
9557 # Just accumulate the unique libdirs.
9558 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
9559 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
9560 ;;
9561 *)
9562 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
9563 ;;
9564 esac
9565 fi
9566 else
9567 eval flag=\"$hardcode_libdir_flag_spec\"
9568 func_append dep_rpath " $flag"
9569 fi
9570 elif test -n "$runpath_var"; then
9571 case "$perm_rpath " in
9572 *" $libdir "*) ;;
9573 *) func_append perm_rpath " $libdir" ;;
9574 esac
9575 fi
9576 done
9577 # Substitute the hardcoded libdirs into the rpath.
9578 if test -n "$hardcode_libdir_separator" &&
9579 test -n "$hardcode_libdirs"; then
9580 libdir=$hardcode_libdirs
9581 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
9582 fi
9583 if test -n "$runpath_var" && test -n "$perm_rpath"; then
9584 # We should set the runpath_var.
9585 rpath=
9586 for dir in $perm_rpath; do
9587 func_append rpath "$dir:"
9588 done
9589 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
9590 fi
9591 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
9592 fi
9593
9594 shlibpath=$finalize_shlibpath
9595 test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
9596 if test -n "$shlibpath"; then
9597 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
9598 fi
9599
9600 # Get the real and link names of the library.
9601 eval shared_ext=\"$shrext_cmds\"
9602 eval library_names=\"$library_names_spec\"
9603 set dummy $library_names
9604 shift
9605 realname=$1
9606 shift
9607
9608 if test -n "$soname_spec"; then
9609 eval soname=\"$soname_spec\"
9610 else
9611 soname=$realname
9612 fi
9613 if test -z "$dlname"; then
9614 dlname=$soname
9615 fi
9616
9617 lib=$output_objdir/$realname
9618 linknames=
9619 for link
9620 do
9621 func_append linknames " $link"
9622 done
9623
9624 # Use standard objects if they are pic
9625 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
9626 test "X$libobjs" = "X " && libobjs=
9627
9628 delfiles=
9629 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9630 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
9631 export_symbols=$output_objdir/$libname.uexp
9632 func_append delfiles " $export_symbols"
9633 fi
9634
9635 orig_export_symbols=
9636 case $host_os in
9637 cygwin* | mingw* | cegcc*)
9638 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
9639 # exporting using user supplied symfile
9640 func_dll_def_p "$export_symbols" || {
9641 # and it's NOT already a .def file. Must figure out
9642 # which of the given symbols are data symbols and tag
9643 # them as such. So, trigger use of export_symbols_cmds.
9644 # export_symbols gets reassigned inside the "prepare
9645 # the list of exported symbols" if statement, so the
9646 # include_expsyms logic still works.
9647 orig_export_symbols=$export_symbols
9648 export_symbols=
9649 always_export_symbols=yes
9650 }
9651 fi
9652 ;;
9653 esac
9654
9655 # Prepare the list of exported symbols
9656 if test -z "$export_symbols"; then
9657 if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
9658 func_verbose "generating symbol list for '$libname.la'"
9659 export_symbols=$output_objdir/$libname.exp
9660 $opt_dry_run || $RM $export_symbols
9661 cmds=$export_symbols_cmds
9662 save_ifs=$IFS; IFS='~'
9663 for cmd1 in $cmds; do
9664 IFS=$save_ifs
9665 # Take the normal branch if the nm_file_list_spec branch
9666 # doesn't work or if tool conversion is not needed.
9667 case $nm_file_list_spec~$to_tool_file_cmd in
9668 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
9669 try_normal_branch=yes
9670 eval cmd=\"$cmd1\"
9671 func_len " $cmd"
9672 len=$func_len_result
9673 ;;
9674 *)
9675 try_normal_branch=no
9676 ;;
9677 esac
9678 if test yes = "$try_normal_branch" \
9679 && { test "$len" -lt "$max_cmd_len" \
9680 || test "$max_cmd_len" -le -1; }
9681 then
9682 func_show_eval "$cmd" 'exit $?'
9683 skipped_export=false
9684 elif test -n "$nm_file_list_spec"; then
9685 func_basename "$output"
9686 output_la=$func_basename_result
9687 save_libobjs=$libobjs
9688 save_output=$output
9689 output=$output_objdir/$output_la.nm
9690 func_to_tool_file "$output"
9691 libobjs=$nm_file_list_spec$func_to_tool_file_result
9692 func_append delfiles " $output"
9693 func_verbose "creating $NM input file list: $output"
9694 for obj in $save_libobjs; do
9695 func_to_tool_file "$obj"
9696 $ECHO "$func_to_tool_file_result"
9697 done > "$output"
9698 eval cmd=\"$cmd1\"
9699 func_show_eval "$cmd" 'exit $?'
9700 output=$save_output
9701 libobjs=$save_libobjs
9702 skipped_export=false
9703 else
9704 # The command line is too long to execute in one step.
9705 func_verbose "using reloadable object file for export list..."
9706 skipped_export=:
9707 # Break out early, otherwise skipped_export may be
9708 # set to false by a later but shorter cmd.
9709 break
9710 fi
9711 done
9712 IFS=$save_ifs
9713 if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
9714 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
9715 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
9716 fi
9717 fi
9718 fi
9719
9720 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9721 tmp_export_symbols=$export_symbols
9722 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
9723 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
9724 fi
9725
9726 if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
9727 # The given exports_symbols file has to be filtered, so filter it.
9728 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
9729 # FIXME: $output_objdir/$libname.filter potentially contains lots of
9730 # 's' commands, which not all seds can handle. GNU sed should be fine
9731 # though. Also, the filter scales superlinearly with the number of
9732 # global variables. join(1) would be nice here, but unfortunately
9733 # isn't a blessed tool.
9734 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
9735 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
9736 export_symbols=$output_objdir/$libname.def
9737 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
9738 fi
9739
9740 tmp_deplibs=
9741 for test_deplib in $deplibs; do
9742 case " $convenience " in
9743 *" $test_deplib "*) ;;
9744 *)
9745 func_append tmp_deplibs " $test_deplib"
9746 ;;
9747 esac
9748 done
9749 deplibs=$tmp_deplibs
9750
9751 if test -n "$convenience"; then
9752 if test -n "$whole_archive_flag_spec" &&
9753 test yes = "$compiler_needs_object" &&
9754 test -z "$libobjs"; then
9755 # extract the archives, so we have objects to list.
9756 # TODO: could optimize this to just extract one archive.
9757 whole_archive_flag_spec=
9758 fi
9759 if test -n "$whole_archive_flag_spec"; then
9760 save_libobjs=$libobjs
9761 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
9762 test "X$libobjs" = "X " && libobjs=
9763 else
9764 gentop=$output_objdir/${outputname}x
9765 func_append generated " $gentop"
9766
9767 func_extract_archives $gentop $convenience
9768 func_append libobjs " $func_extract_archives_result"
9769 test "X$libobjs" = "X " && libobjs=
9770 fi
9771 fi
9772
9773 if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
9774 eval flag=\"$thread_safe_flag_spec\"
9775 func_append linker_flags " $flag"
9776 fi
9777
9778 # Make a backup of the uninstalled library when relinking
9779 if test relink = "$opt_mode"; then
9780 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
9781 fi
9782
9783 # Do each of the archive commands.
9784 if test yes = "$module" && test -n "$module_cmds"; then
9785 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
9786 eval test_cmds=\"$module_expsym_cmds\"
9787 cmds=$module_expsym_cmds
9788 else
9789 eval test_cmds=\"$module_cmds\"
9790 cmds=$module_cmds
9791 fi
9792 else
9793 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
9794 eval test_cmds=\"$archive_expsym_cmds\"
9795 cmds=$archive_expsym_cmds
9796 else
9797 eval test_cmds=\"$archive_cmds\"
9798 cmds=$archive_cmds
9799 fi
9800 fi
9801
9802 if test : != "$skipped_export" &&
9803 func_len " $test_cmds" &&
9804 len=$func_len_result &&
9805 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9806 :
9807 else
9808 # The command line is too long to link in one step, link piecewise
9809 # or, if using GNU ld and skipped_export is not :, use a linker
9810 # script.
9811
9812 # Save the value of $output and $libobjs because we want to
9813 # use them later. If we have whole_archive_flag_spec, we
9814 # want to use save_libobjs as it was before
9815 # whole_archive_flag_spec was expanded, because we can't
9816 # assume the linker understands whole_archive_flag_spec.
9817 # This may have to be revisited, in case too many
9818 # convenience libraries get linked in and end up exceeding
9819 # the spec.
9820 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
9821 save_libobjs=$libobjs
9822 fi
9823 save_output=$output
9824 func_basename "$output"
9825 output_la=$func_basename_result
9826
9827 # Clear the reloadable object creation command queue and
9828 # initialize k to one.
9829 test_cmds=
9830 concat_cmds=
9831 objlist=
9832 last_robj=
9833 k=1
9834
9835 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
9836 output=$output_objdir/$output_la.lnkscript
9837 func_verbose "creating GNU ld script: $output"
9838 echo 'INPUT (' > $output
9839 for obj in $save_libobjs
9840 do
9841 func_to_tool_file "$obj"
9842 $ECHO "$func_to_tool_file_result" >> $output
9843 done
9844 echo ')' >> $output
9845 func_append delfiles " $output"
9846 func_to_tool_file "$output"
9847 output=$func_to_tool_file_result
9848 elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
9849 output=$output_objdir/$output_la.lnk
9850 func_verbose "creating linker input file list: $output"
9851 : > $output
9852 set x $save_libobjs
9853 shift
9854 firstobj=
9855 if test yes = "$compiler_needs_object"; then
9856 firstobj="$1 "
9857 shift
9858 fi
9859 for obj
9860 do
9861 func_to_tool_file "$obj"
9862 $ECHO "$func_to_tool_file_result" >> $output
9863 done
9864 func_append delfiles " $output"
9865 func_to_tool_file "$output"
9866 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
9867 else
9868 if test -n "$save_libobjs"; then
9869 func_verbose "creating reloadable object files..."
9870 output=$output_objdir/$output_la-$k.$objext
9871 eval test_cmds=\"$reload_cmds\"
9872 func_len " $test_cmds"
9873 len0=$func_len_result
9874 len=$len0
9875
9876 # Loop over the list of objects to be linked.
9877 for obj in $save_libobjs
9878 do
9879 func_len " $obj"
9880 func_arith $len + $func_len_result
9881 len=$func_arith_result
9882 if test -z "$objlist" ||
9883 test "$len" -lt "$max_cmd_len"; then
9884 func_append objlist " $obj"
9885 else
9886 # The command $test_cmds is almost too long, add a
9887 # command to the queue.
9888 if test 1 -eq "$k"; then
9889 # The first file doesn't have a previous command to add.
9890 reload_objs=$objlist
9891 eval concat_cmds=\"$reload_cmds\"
9892 else
9893 # All subsequent reloadable object files will link in
9894 # the last one created.
9895 reload_objs="$objlist $last_robj"
9896 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
9897 fi
9898 last_robj=$output_objdir/$output_la-$k.$objext
9899 func_arith $k + 1
9900 k=$func_arith_result
9901 output=$output_objdir/$output_la-$k.$objext
9902 objlist=" $obj"
9903 func_len " $last_robj"
9904 func_arith $len0 + $func_len_result
9905 len=$func_arith_result
9906 fi
9907 done
9908 # Handle the remaining objects by creating one last
9909 # reloadable object file. All subsequent reloadable object
9910 # files will link in the last one created.
9911 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9912 reload_objs="$objlist $last_robj"
9913 eval concat_cmds=\"\$concat_cmds$reload_cmds\"
9914 if test -n "$last_robj"; then
9915 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
9916 fi
9917 func_append delfiles " $output"
9918
9919 else
9920 output=
9921 fi
9922
9923 ${skipped_export-false} && {
9924 func_verbose "generating symbol list for '$libname.la'"
9925 export_symbols=$output_objdir/$libname.exp
9926 $opt_dry_run || $RM $export_symbols
9927 libobjs=$output
9928 # Append the command to create the export file.
9929 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9930 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
9931 if test -n "$last_robj"; then
9932 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
9933 fi
9934 }
9935
9936 test -n "$save_libobjs" &&
9937 func_verbose "creating a temporary reloadable object file: $output"
9938
9939 # Loop through the commands generated above and execute them.
9940 save_ifs=$IFS; IFS='~'
9941 for cmd in $concat_cmds; do
9942 IFS=$save_ifs
9943 $opt_quiet || {
9944 func_quote_for_expand "$cmd"
9945 eval "func_echo $func_quote_for_expand_result"
9946 }
9947 $opt_dry_run || eval "$cmd" || {
9948 lt_exit=$?
9949
9950 # Restore the uninstalled library and exit
9951 if test relink = "$opt_mode"; then
9952 ( cd "$output_objdir" && \
9953 $RM "${realname}T" && \
9954 $MV "${realname}U" "$realname" )
9955 fi
9956
9957 exit $lt_exit
9958 }
9959 done
9960 IFS=$save_ifs
9961
9962 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
9963 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
9964 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
9965 fi
9966 fi
9967
9968 ${skipped_export-false} && {
9969 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9970 tmp_export_symbols=$export_symbols
9971 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
9972 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
9973 fi
9974
9975 if test -n "$orig_export_symbols"; then
9976 # The given exports_symbols file has to be filtered, so filter it.
9977 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
9978 # FIXME: $output_objdir/$libname.filter potentially contains lots of
9979 # 's' commands, which not all seds can handle. GNU sed should be fine
9980 # though. Also, the filter scales superlinearly with the number of
9981 # global variables. join(1) would be nice here, but unfortunately
9982 # isn't a blessed tool.
9983 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
9984 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
9985 export_symbols=$output_objdir/$libname.def
9986 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
9987 fi
9988 }
9989
9990 libobjs=$output
9991 # Restore the value of output.
9992 output=$save_output
9993
9994 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
9995 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
9996 test "X$libobjs" = "X " && libobjs=
9997 fi
9998 # Expand the library linking commands again to reset the
9999 # value of $libobjs for piecewise linking.
10000
10001 # Do each of the archive commands.
10002 if test yes = "$module" && test -n "$module_cmds"; then
10003 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
10004 cmds=$module_expsym_cmds
10005 else
10006 cmds=$module_cmds
10007 fi
10008 else
10009 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
10010 cmds=$archive_expsym_cmds
10011 else
10012 cmds=$archive_cmds
10013 fi
10014 fi
10015 fi
10016
10017 if test -n "$delfiles"; then
10018 # Append the command to remove temporary files to $cmds.
10019 eval cmds=\"\$cmds~\$RM $delfiles\"
10020 fi
10021
10022 # Add any objects from preloaded convenience libraries
10023 if test -n "$dlprefiles"; then
10024 gentop=$output_objdir/${outputname}x
10025 func_append generated " $gentop"
10026
10027 func_extract_archives $gentop $dlprefiles
10028 func_append libobjs " $func_extract_archives_result"
10029 test "X$libobjs" = "X " && libobjs=
10030 fi
10031
10032 save_ifs=$IFS; IFS='~'
10033 for cmd in $cmds; do
10034 IFS=$sp$nl
10035 eval cmd=\"$cmd\"
10036 IFS=$save_ifs
10037 $opt_quiet || {
10038 func_quote_for_expand "$cmd"
10039 eval "func_echo $func_quote_for_expand_result"
10040 }
10041 $opt_dry_run || eval "$cmd" || {
10042 lt_exit=$?
10043
10044 # Restore the uninstalled library and exit
10045 if test relink = "$opt_mode"; then
10046 ( cd "$output_objdir" && \
10047 $RM "${realname}T" && \
10048 $MV "${realname}U" "$realname" )
10049 fi
10050
10051 exit $lt_exit
10052 }
10053 done
10054 IFS=$save_ifs
10055
10056 # Restore the uninstalled library and exit
10057 if test relink = "$opt_mode"; then
10058 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
10059
10060 if test -n "$convenience"; then
10061 if test -z "$whole_archive_flag_spec"; then
10062 func_show_eval '${RM}r "$gentop"'
10063 fi
10064 fi
10065
10066 exit $EXIT_SUCCESS
10067 fi
10068
10069 # Create links to the real library.
10070 for linkname in $linknames; do
10071 if test "$realname" != "$linkname"; then
10072 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
10073 fi
10074 done
10075
10076 # If -module or -export-dynamic was specified, set the dlname.
10077 if test yes = "$module" || test yes = "$export_dynamic"; then
10078 # On all known operating systems, these are identical.
10079 dlname=$soname
10080 fi
10081 fi
10082 ;;
10083
10084 obj)
10085 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
10086 func_warning "'-dlopen' is ignored for objects"
10087 fi
10088
10089 case " $deplibs" in
10090 *\ -l* | *\ -L*)
10091 func_warning "'-l' and '-L' are ignored for objects" ;;
10092 esac
10093
10094 test -n "$rpath" && \
10095 func_warning "'-rpath' is ignored for objects"
10096
10097 test -n "$xrpath" && \
10098 func_warning "'-R' is ignored for objects"
10099
10100 test -n "$vinfo" && \
10101 func_warning "'-version-info' is ignored for objects"
10102
10103 test -n "$release" && \
10104 func_warning "'-release' is ignored for objects"
10105
10106 case $output in
10107 *.lo)
10108 test -n "$objs$old_deplibs" && \
10109 func_fatal_error "cannot build library object '$output' from non-libtool objects"
10110
10111 libobj=$output
10112 func_lo2o "$libobj"
10113 obj=$func_lo2o_result
10114 ;;
10115 *)
10116 libobj=
10117 obj=$output
10118 ;;
10119 esac
10120
10121 # Delete the old objects.
10122 $opt_dry_run || $RM $obj $libobj
10123
10124 # Objects from convenience libraries. This assumes
10125 # single-version convenience libraries. Whenever we create
10126 # different ones for PIC/non-PIC, this we'll have to duplicate
10127 # the extraction.
10128 reload_conv_objs=
10129 gentop=
10130 # if reload_cmds runs $LD directly, get rid of -Wl from
10131 # whole_archive_flag_spec and hope we can get by with turning comma
10132 # into space.
10133 case $reload_cmds in
10134 *\$LD[\ \$]*) wl= ;;
10135 esac
10136 if test -n "$convenience"; then
10137 if test -n "$whole_archive_flag_spec"; then
10138 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
10139 test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
10140 reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
10141 else
10142 gentop=$output_objdir/${obj}x
10143 func_append generated " $gentop"
10144
10145 func_extract_archives $gentop $convenience
10146 reload_conv_objs="$reload_objs $func_extract_archives_result"
10147 fi
10148 fi
10149
10150 # If we're not building shared, we need to use non_pic_objs
10151 test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
10152
10153 # Create the old-style object.
10154 reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
10155
10156 output=$obj
10157 func_execute_cmds "$reload_cmds" 'exit $?'
10158
10159 # Exit if we aren't doing a library object file.
10160 if test -z "$libobj"; then
10161 if test -n "$gentop"; then
10162 func_show_eval '${RM}r "$gentop"'
10163 fi
10164
10165 exit $EXIT_SUCCESS
10166 fi
10167
10168 test yes = "$build_libtool_libs" || {
10169 if test -n "$gentop"; then
10170 func_show_eval '${RM}r "$gentop"'
10171 fi
10172
10173 # Create an invalid libtool object if no PIC, so that we don't
10174 # accidentally link it into a program.
10175 # $show "echo timestamp > $libobj"
10176 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
10177 exit $EXIT_SUCCESS
10178 }
10179
10180 if test -n "$pic_flag" || test default != "$pic_mode"; then
10181 # Only do commands if we really have different PIC objects.
10182 reload_objs="$libobjs $reload_conv_objs"
10183 output=$libobj
10184 func_execute_cmds "$reload_cmds" 'exit $?'
10185 fi
10186
10187 if test -n "$gentop"; then
10188 func_show_eval '${RM}r "$gentop"'
10189 fi
10190
10191 exit $EXIT_SUCCESS
10192 ;;
10193
10194 prog)
10195 case $host in
10196 *cygwin*) func_stripname '' '.exe' "$output"
10197 output=$func_stripname_result.exe;;
10198 esac
10199 test -n "$vinfo" && \
10200 func_warning "'-version-info' is ignored for programs"
10201
10202 test -n "$release" && \
10203 func_warning "'-release' is ignored for programs"
10204
10205 $preload \
10206 && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
10207 && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
10208
10209 case $host in
10210 *-*-rhapsody* | *-*-darwin1.[012])
10211 # On Rhapsody replace the C library is the System framework
10212 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
10213 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
10214 ;;
10215 esac
10216
10217 case $host in
10218 *-*-darwin*)
10219 # Don't allow lazy linking, it breaks C++ global constructors
10220 # But is supposedly fixed on 10.4 or later (yay!).
10221 if test CXX = "$tagname"; then
10222 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
10223 10.[0123])
10224 func_append compile_command " $wl-bind_at_load"
10225 func_append finalize_command " $wl-bind_at_load"
10226 ;;
10227 esac
10228 fi
10229 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
10230 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
10231 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
10232 ;;
10233 esac
10234
10235
10236 # move library search paths that coincide with paths to not yet
10237 # installed libraries to the beginning of the library search list
10238 new_libs=
10239 for path in $notinst_path; do
10240 case " $new_libs " in
10241 *" -L$path/$objdir "*) ;;
10242 *)
10243 case " $compile_deplibs " in
10244 *" -L$path/$objdir "*)
10245 func_append new_libs " -L$path/$objdir" ;;
10246 esac
10247 ;;
10248 esac
10249 done
10250 for deplib in $compile_deplibs; do
10251 case $deplib in
10252 -L*)
10253 case " $new_libs " in
10254 *" $deplib "*) ;;
10255 *) func_append new_libs " $deplib" ;;
10256 esac
10257 ;;
10258 *) func_append new_libs " $deplib" ;;
10259 esac
10260 done
10261 compile_deplibs=$new_libs
10262
10263
10264 func_append compile_command " $compile_deplibs"
10265 func_append finalize_command " $finalize_deplibs"
10266
10267 if test -n "$rpath$xrpath"; then
10268 # If the user specified any rpath flags, then add them.
10269 for libdir in $rpath $xrpath; do
10270 # This is the magic to use -rpath.
10271 case "$finalize_rpath " in
10272 *" $libdir "*) ;;
10273 *) func_append finalize_rpath " $libdir" ;;
10274 esac
10275 done
10276 fi
10277
10278 # Now hardcode the library paths
10279 rpath=
10280 hardcode_libdirs=
10281 for libdir in $compile_rpath $finalize_rpath; do
10282 if test -n "$hardcode_libdir_flag_spec"; then
10283 if test -n "$hardcode_libdir_separator"; then
10284 if test -z "$hardcode_libdirs"; then
10285 hardcode_libdirs=$libdir
10286 else
10287 # Just accumulate the unique libdirs.
10288 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
10289 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
10290 ;;
10291 *)
10292 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
10293 ;;
10294 esac
10295 fi
10296 else
10297 eval flag=\"$hardcode_libdir_flag_spec\"
10298 func_append rpath " $flag"
10299 fi
10300 elif test -n "$runpath_var"; then
10301 case "$perm_rpath " in
10302 *" $libdir "*) ;;
10303 *) func_append perm_rpath " $libdir" ;;
10304 esac
10305 fi
10306 case $host in
10307 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
10308 testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
10309 case :$dllsearchpath: in
10310 *":$libdir:"*) ;;
10311 ::) dllsearchpath=$libdir;;
10312 *) func_append dllsearchpath ":$libdir";;
10313 esac
10314 case :$dllsearchpath: in
10315 *":$testbindir:"*) ;;
10316 ::) dllsearchpath=$testbindir;;
10317 *) func_append dllsearchpath ":$testbindir";;
10318 esac
10319 ;;
10320 esac
10321 done
10322 # Substitute the hardcoded libdirs into the rpath.
10323 if test -n "$hardcode_libdir_separator" &&
10324 test -n "$hardcode_libdirs"; then
10325 libdir=$hardcode_libdirs
10326 eval rpath=\" $hardcode_libdir_flag_spec\"
10327 fi
10328 compile_rpath=$rpath
10329
10330 rpath=
10331 hardcode_libdirs=
10332 for libdir in $finalize_rpath; do
10333 if test -n "$hardcode_libdir_flag_spec"; then
10334 if test -n "$hardcode_libdir_separator"; then
10335 if test -z "$hardcode_libdirs"; then
10336 hardcode_libdirs=$libdir
10337 else
10338 # Just accumulate the unique libdirs.
10339 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
10340 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
10341 ;;
10342 *)
10343 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
10344 ;;
10345 esac
10346 fi
10347 else
10348 eval flag=\"$hardcode_libdir_flag_spec\"
10349 func_append rpath " $flag"
10350 fi
10351 elif test -n "$runpath_var"; then
10352 case "$finalize_perm_rpath " in
10353 *" $libdir "*) ;;
10354 *) func_append finalize_perm_rpath " $libdir" ;;
10355 esac
10356 fi
10357 done
10358 # Substitute the hardcoded libdirs into the rpath.
10359 if test -n "$hardcode_libdir_separator" &&
10360 test -n "$hardcode_libdirs"; then
10361 libdir=$hardcode_libdirs
10362 eval rpath=\" $hardcode_libdir_flag_spec\"
10363 fi
10364 finalize_rpath=$rpath
10365
10366 if test -n "$libobjs" && test yes = "$build_old_libs"; then
10367 # Transform all the library objects into standard objects.
10368 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
10369 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
10370 fi
10371
10372 func_generate_dlsyms "$outputname" "@PROGRAM@" false
10373
10374 # template prelinking step
10375 if test -n "$prelink_cmds"; then
10376 func_execute_cmds "$prelink_cmds" 'exit $?'
10377 fi
10378
10379 wrappers_required=:
10380 case $host in
10381 *cegcc* | *mingw32ce*)
10382 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
10383 wrappers_required=false
10384 ;;
10385 *cygwin* | *mingw* )
10386 test yes = "$build_libtool_libs" || wrappers_required=false
10387 ;;
10388 *)
10389 if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
10390 wrappers_required=false
10391 fi
10392 ;;
10393 esac
10394 $wrappers_required || {
10395 # Replace the output file specification.
10396 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
10397 link_command=$compile_command$compile_rpath
10398
10399 # We have no uninstalled library dependencies, so finalize right now.
10400 exit_status=0
10401 func_show_eval "$link_command" 'exit_status=$?'
10402
10403 if test -n "$postlink_cmds"; then
10404 func_to_tool_file "$output"
10405 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10406 func_execute_cmds "$postlink_cmds" 'exit $?'
10407 fi
10408
10409 # Delete the generated files.
10410 if test -f "$output_objdir/${outputname}S.$objext"; then
10411 func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
10412 fi
10413
10414 exit $exit_status
10415 }
10416
10417 if test -n "$compile_shlibpath$finalize_shlibpath"; then
10418 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
10419 fi
10420 if test -n "$finalize_shlibpath"; then
10421 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
10422 fi
10423
10424 compile_var=
10425 finalize_var=
10426 if test -n "$runpath_var"; then
10427 if test -n "$perm_rpath"; then
10428 # We should set the runpath_var.
10429 rpath=
10430 for dir in $perm_rpath; do
10431 func_append rpath "$dir:"
10432 done
10433 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
10434 fi
10435 if test -n "$finalize_perm_rpath"; then
10436 # We should set the runpath_var.
10437 rpath=
10438 for dir in $finalize_perm_rpath; do
10439 func_append rpath "$dir:"
10440 done
10441 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
10442 fi
10443 fi
10444
10445 if test yes = "$no_install"; then
10446 # We don't need to create a wrapper script.
10447 link_command=$compile_var$compile_command$compile_rpath
10448 # Replace the output file specification.
10449 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
10450 # Delete the old output file.
10451 $opt_dry_run || $RM $output
10452 # Link the executable and exit
10453 func_show_eval "$link_command" 'exit $?'
10454
10455 if test -n "$postlink_cmds"; then
10456 func_to_tool_file "$output"
10457 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10458 func_execute_cmds "$postlink_cmds" 'exit $?'
10459 fi
10460
10461 exit $EXIT_SUCCESS
10462 fi
10463
10464 case $hardcode_action,$fast_install in
10465 relink,*)
10466 # Fast installation is not supported
10467 link_command=$compile_var$compile_command$compile_rpath
10468 relink_command=$finalize_var$finalize_command$finalize_rpath
10469
10470 func_warning "this platform does not like uninstalled shared libraries"
10471 func_warning "'$output' will be relinked during installation"
10472 ;;
10473 *,yes)
10474 link_command=$finalize_var$compile_command$finalize_rpath
10475 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
10476 ;;
10477 *,no)
10478 link_command=$compile_var$compile_command$compile_rpath
10479 relink_command=$finalize_var$finalize_command$finalize_rpath
10480 ;;
10481 *,needless)
10482 link_command=$finalize_var$compile_command$finalize_rpath
10483 relink_command=
10484 ;;
10485 esac
10486
10487 # Replace the output file specification.
10488 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
10489
10490 # Delete the old output files.
10491 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
10492
10493 func_show_eval "$link_command" 'exit $?'
10494
10495 if test -n "$postlink_cmds"; then
10496 func_to_tool_file "$output_objdir/$outputname"
10497 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10498 func_execute_cmds "$postlink_cmds" 'exit $?'
10499 fi
10500
10501 # Now create the wrapper script.
10502 func_verbose "creating $output"
10503
10504 # Quote the relink command for shipping.
10505 if test -n "$relink_command"; then
10506 # Preserve any variables that may affect compiler behavior
10507 for var in $variables_saved_for_relink; do
10508 if eval test -z \"\${$var+set}\"; then
10509 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
10510 elif eval var_value=\$$var; test -z "$var_value"; then
10511 relink_command="$var=; export $var; $relink_command"
10512 else
10513 func_quote_for_eval "$var_value"
10514 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10515 fi
10516 done
10517 relink_command="(cd `pwd`; $relink_command)"
10518 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10519 fi
10520
10521 # Only actually do things if not in dry run mode.
10522 $opt_dry_run || {
10523 # win32 will think the script is a binary if it has
10524 # a .exe suffix, so we strip it off here.
10525 case $output in
10526 *.exe) func_stripname '' '.exe' "$output"
10527 output=$func_stripname_result ;;
10528 esac
10529 # test for cygwin because mv fails w/o .exe extensions
10530 case $host in
10531 *cygwin*)
10532 exeext=.exe
10533 func_stripname '' '.exe' "$outputname"
10534 outputname=$func_stripname_result ;;
10535 *) exeext= ;;
10536 esac
10537 case $host in
10538 *cygwin* | *mingw* )
10539 func_dirname_and_basename "$output" "" "."
10540 output_name=$func_basename_result
10541 output_path=$func_dirname_result
10542 cwrappersource=$output_path/$objdir/lt-$output_name.c
10543 cwrapper=$output_path/$output_name.exe
10544 $RM $cwrappersource $cwrapper
10545 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
10546
10547 func_emit_cwrapperexe_src > $cwrappersource
10548
10549 # The wrapper executable is built using the $host compiler,
10550 # because it contains $host paths and files. If cross-
10551 # compiling, it, like the target executable, must be
10552 # executed on the $host or under an emulation environment.
10553 $opt_dry_run || {
10554 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
10555 $STRIP $cwrapper
10556 }
10557
10558 # Now, create the wrapper script for func_source use:
10559 func_ltwrapper_scriptname $cwrapper
10560 $RM $func_ltwrapper_scriptname_result
10561 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
10562 $opt_dry_run || {
10563 # note: this script will not be executed, so do not chmod.
10564 if test "x$build" = "x$host"; then
10565 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
10566 else
10567 func_emit_wrapper no > $func_ltwrapper_scriptname_result
10568 fi
10569 }
10570 ;;
10571 * )
10572 $RM $output
10573 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
10574
10575 func_emit_wrapper no > $output
10576 chmod +x $output
10577 ;;
10578 esac
10579 }
10580 exit $EXIT_SUCCESS
10581 ;;
10582 esac
10583
10584 # See if we need to build an old-fashioned archive.
10585 for oldlib in $oldlibs; do
10586
10587 case $build_libtool_libs in
10588 convenience)
10589 oldobjs="$libobjs_save $symfileobj"
10590 addlibs=$convenience
10591 build_libtool_libs=no
10592 ;;
10593 module)
10594 oldobjs=$libobjs_save
10595 addlibs=$old_convenience
10596 build_libtool_libs=no
10597 ;;
10598 *)
10599 oldobjs="$old_deplibs $non_pic_objects"
10600 $preload && test -f "$symfileobj" \
10601 && func_append oldobjs " $symfileobj"
10602 addlibs=$old_convenience
10603 ;;
10604 esac
10605
10606 if test -n "$addlibs"; then
10607 gentop=$output_objdir/${outputname}x
10608 func_append generated " $gentop"
10609
10610 func_extract_archives $gentop $addlibs
10611 func_append oldobjs " $func_extract_archives_result"
10612 fi
10613
10614 # Do each command in the archive commands.
10615 if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
10616 cmds=$old_archive_from_new_cmds
10617 else
10618
10619 # Add any objects from preloaded convenience libraries
10620 if test -n "$dlprefiles"; then
10621 gentop=$output_objdir/${outputname}x
10622 func_append generated " $gentop"
10623
10624 func_extract_archives $gentop $dlprefiles
10625 func_append oldobjs " $func_extract_archives_result"
10626 fi
10627
10628 # POSIX demands no paths to be encoded in archives. We have
10629 # to avoid creating archives with duplicate basenames if we
10630 # might have to extract them afterwards, e.g., when creating a
10631 # static archive out of a convenience library, or when linking
10632 # the entirety of a libtool archive into another (currently
10633 # not supported by libtool).
10634 if (for obj in $oldobjs
10635 do
10636 func_basename "$obj"
10637 $ECHO "$func_basename_result"
10638 done | sort | sort -uc >/dev/null 2>&1); then
10639 :
10640 else
10641 echo "copying selected object files to avoid basename conflicts..."
10642 gentop=$output_objdir/${outputname}x
10643 func_append generated " $gentop"
10644 func_mkdir_p "$gentop"
10645 save_oldobjs=$oldobjs
10646 oldobjs=
10647 counter=1
10648 for obj in $save_oldobjs
10649 do
10650 func_basename "$obj"
10651 objbase=$func_basename_result
10652 case " $oldobjs " in
10653 " ") oldobjs=$obj ;;
10654 *[\ /]"$objbase "*)
10655 while :; do
10656 # Make sure we don't pick an alternate name that also
10657 # overlaps.
10658 newobj=lt$counter-$objbase
10659 func_arith $counter + 1
10660 counter=$func_arith_result
10661 case " $oldobjs " in
10662 *[\ /]"$newobj "*) ;;
10663 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
10664 esac
10665 done
10666 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
10667 func_append oldobjs " $gentop/$newobj"
10668 ;;
10669 *) func_append oldobjs " $obj" ;;
10670 esac
10671 done
10672 fi
10673 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
10674 tool_oldlib=$func_to_tool_file_result
10675 eval cmds=\"$old_archive_cmds\"
10676
10677 func_len " $cmds"
10678 len=$func_len_result
10679 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
10680 cmds=$old_archive_cmds
10681 elif test -n "$archiver_list_spec"; then
10682 func_verbose "using command file archive linking..."
10683 for obj in $oldobjs
10684 do
10685 func_to_tool_file "$obj"
10686 $ECHO "$func_to_tool_file_result"
10687 done > $output_objdir/$libname.libcmd
10688 func_to_tool_file "$output_objdir/$libname.libcmd"
10689 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
10690 cmds=$old_archive_cmds
10691 else
10692 # the command line is too long to link in one step, link in parts
10693 func_verbose "using piecewise archive linking..."
10694 save_RANLIB=$RANLIB
10695 RANLIB=:
10696 objlist=
10697 concat_cmds=
10698 save_oldobjs=$oldobjs
10699 oldobjs=
10700 # Is there a better way of finding the last object in the list?
10701 for obj in $save_oldobjs
10702 do
10703 last_oldobj=$obj
10704 done
10705 eval test_cmds=\"$old_archive_cmds\"
10706 func_len " $test_cmds"
10707 len0=$func_len_result
10708 len=$len0
10709 for obj in $save_oldobjs
10710 do
10711 func_len " $obj"
10712 func_arith $len + $func_len_result
10713 len=$func_arith_result
10714 func_append objlist " $obj"
10715 if test "$len" -lt "$max_cmd_len"; then
10716 :
10717 else
10718 # the above command should be used before it gets too long
10719 oldobjs=$objlist
10720 if test "$obj" = "$last_oldobj"; then
10721 RANLIB=$save_RANLIB
10722 fi
10723 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
10724 eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
10725 objlist=
10726 len=$len0
10727 fi
10728 done
10729 RANLIB=$save_RANLIB
10730 oldobjs=$objlist
10731 if test -z "$oldobjs"; then
10732 eval cmds=\"\$concat_cmds\"
10733 else
10734 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
10735 fi
10736 fi
10737 fi
10738 func_execute_cmds "$cmds" 'exit $?'
10739 done
10740
10741 test -n "$generated" && \
10742 func_show_eval "${RM}r$generated"
10743
10744 # Now create the libtool archive.
10745 case $output in
10746 *.la)
10747 old_library=
10748 test yes = "$build_old_libs" && old_library=$libname.$libext
10749 func_verbose "creating $output"
10750
10751 # Preserve any variables that may affect compiler behavior
10752 for var in $variables_saved_for_relink; do
10753 if eval test -z \"\${$var+set}\"; then
10754 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
10755 elif eval var_value=\$$var; test -z "$var_value"; then
10756 relink_command="$var=; export $var; $relink_command"
10757 else
10758 func_quote_for_eval "$var_value"
10759 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10760 fi
10761 done
10762 # Quote the link command for shipping.
10763 relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10764 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10765 if test yes = "$hardcode_automatic"; then
10766 relink_command=
10767 fi
10768
10769 # Only create the output if not a dry run.
10770 $opt_dry_run || {
10771 for installed in no yes; do
10772 if test yes = "$installed"; then
10773 if test -z "$install_libdir"; then
10774 break
10775 fi
10776 output=$output_objdir/${outputname}i
10777 # Replace all uninstalled libtool libraries with the installed ones
10778 newdependency_libs=
10779 for deplib in $dependency_libs; do
10780 case $deplib in
10781 *.la)
10782 func_basename "$deplib"
10783 name=$func_basename_result
10784 func_resolve_sysroot "$deplib"
10785 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
10786 test -z "$libdir" && \
10787 func_fatal_error "'$deplib' is not a valid libtool archive"
10788 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
10789 ;;
10790 -L*)
10791 func_stripname -L '' "$deplib"
10792 func_replace_sysroot "$func_stripname_result"
10793 func_append newdependency_libs " -L$func_replace_sysroot_result"
10794 ;;
10795 -R*)
10796 func_stripname -R '' "$deplib"
10797 func_replace_sysroot "$func_stripname_result"
10798 func_append newdependency_libs " -R$func_replace_sysroot_result"
10799 ;;
10800 *) func_append newdependency_libs " $deplib" ;;
10801 esac
10802 done
10803 dependency_libs=$newdependency_libs
10804 newdlfiles=
10805
10806 for lib in $dlfiles; do
10807 case $lib in
10808 *.la)
10809 func_basename "$lib"
10810 name=$func_basename_result
10811 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10812 test -z "$libdir" && \
10813 func_fatal_error "'$lib' is not a valid libtool archive"
10814 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
10815 ;;
10816 *) func_append newdlfiles " $lib" ;;
10817 esac
10818 done
10819 dlfiles=$newdlfiles
10820 newdlprefiles=
10821 for lib in $dlprefiles; do
10822 case $lib in
10823 *.la)
10824 # Only pass preopened files to the pseudo-archive (for
10825 # eventual linking with the app. that links it) if we
10826 # didn't already link the preopened objects directly into
10827 # the library:
10828 func_basename "$lib"
10829 name=$func_basename_result
10830 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10831 test -z "$libdir" && \
10832 func_fatal_error "'$lib' is not a valid libtool archive"
10833 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
10834 ;;
10835 esac
10836 done
10837 dlprefiles=$newdlprefiles
10838 else
10839 newdlfiles=
10840 for lib in $dlfiles; do
10841 case $lib in
10842 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
10843 *) abs=`pwd`"/$lib" ;;
10844 esac
10845 func_append newdlfiles " $abs"
10846 done
10847 dlfiles=$newdlfiles
10848 newdlprefiles=
10849 for lib in $dlprefiles; do
10850 case $lib in
10851 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
10852 *) abs=`pwd`"/$lib" ;;
10853 esac
10854 func_append newdlprefiles " $abs"
10855 done
10856 dlprefiles=$newdlprefiles
10857 fi
10858 $RM $output
10859 # place dlname in correct position for cygwin
10860 # In fact, it would be nice if we could use this code for all target
10861 # systems that can't hard-code library paths into their executables
10862 # and that have no shared library path variable independent of PATH,
10863 # but it turns out we can't easily determine that from inspecting
10864 # libtool variables, so we have to hard-code the OSs to which it
10865 # applies here; at the moment, that means platforms that use the PE
10866 # object format with DLL files. See the long comment at the top of
10867 # tests/bindir.at for full details.
10868 tdlname=$dlname
10869 case $host,$output,$installed,$module,$dlname in
10870 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
10871 # If a -bindir argument was supplied, place the dll there.
10872 if test -n "$bindir"; then
10873 func_relative_path "$install_libdir" "$bindir"
10874 tdlname=$func_relative_path_result/$dlname
10875 else
10876 # Otherwise fall back on heuristic.
10877 tdlname=../bin/$dlname
10878 fi
10879 ;;
10880 esac
10881 $ECHO > $output "\
10882 # $outputname - a libtool library file
10883 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
10884 #
10885 # Please DO NOT delete this file!
10886 # It is necessary for linking the library.
10887
10888 # The name that we can dlopen(3).
10889 dlname='$tdlname'
10890
10891 # Names of this library.
10892 library_names='$library_names'
10893
10894 # The name of the static archive.
10895 old_library='$old_library'
10896
10897 # Linker flags that cannot go in dependency_libs.
10898 inherited_linker_flags='$new_inherited_linker_flags'
10899
10900 # Libraries that this one depends upon.
10901 dependency_libs='$dependency_libs'
10902
10903 # Names of additional weak libraries provided by this library
10904 weak_library_names='$weak_libs'
10905
10906 # Version information for $libname.
10907 current=$current
10908 age=$age
10909 revision=$revision
10910
10911 # Is this an already installed library?
10912 installed=$installed
10913
10914 # Should we warn about portability when linking against -modules?
10915 shouldnotlink=$module
10916
10917 # Files to dlopen/dlpreopen
10918 dlopen='$dlfiles'
10919 dlpreopen='$dlprefiles'
10920
10921 # Directory that this library needs to be installed in:
10922 libdir='$install_libdir'"
10923 if test no,yes = "$installed,$need_relink"; then
10924 $ECHO >> $output "\
10925 relink_command=\"$relink_command\""
10926 fi
10927 done
10928 }
10929
10930 # Do a symbolic link so that the libtool archive can be found in
10931 # LD_LIBRARY_PATH before the program is installed.
10932 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
10933 ;;
10934 esac
10935 exit $EXIT_SUCCESS
10936 }
10937
10938 if test link = "$opt_mode" || test relink = "$opt_mode"; then
10939 func_mode_link ${1+"$@"}
10940 fi
10941
10942
10943 # func_mode_uninstall arg...
10944 func_mode_uninstall ()
10945 {
10946 $debug_cmd
10947
10948 RM=$nonopt
10949 files=
10950 rmforce=false
10951 exit_status=0
10952
10953 # This variable tells wrapper scripts just to set variables rather
10954 # than running their programs.
10955 libtool_install_magic=$magic
10956
10957 for arg
10958 do
10959 case $arg in
10960 -f) func_append RM " $arg"; rmforce=: ;;
10961 -*) func_append RM " $arg" ;;
10962 *) func_append files " $arg" ;;
10963 esac
10964 done
10965
10966 test -z "$RM" && \
10967 func_fatal_help "you must specify an RM program"
10968
10969 rmdirs=
10970
10971 for file in $files; do
10972 func_dirname "$file" "" "."
10973 dir=$func_dirname_result
10974 if test . = "$dir"; then
10975 odir=$objdir
10976 else
10977 odir=$dir/$objdir
10978 fi
10979 func_basename "$file"
10980 name=$func_basename_result
10981 test uninstall = "$opt_mode" && odir=$dir
10982
10983 # Remember odir for removal later, being careful to avoid duplicates
10984 if test clean = "$opt_mode"; then
10985 case " $rmdirs " in
10986 *" $odir "*) ;;
10987 *) func_append rmdirs " $odir" ;;
10988 esac
10989 fi
10990
10991 # Don't error if the file doesn't exist and rm -f was used.
10992 if { test -L "$file"; } >/dev/null 2>&1 ||
10993 { test -h "$file"; } >/dev/null 2>&1 ||
10994 test -f "$file"; then
10995 :
10996 elif test -d "$file"; then
10997 exit_status=1
10998 continue
10999 elif $rmforce; then
11000 continue
11001 fi
11002
11003 rmfiles=$file
11004
11005 case $name in
11006 *.la)
11007 # Possibly a libtool archive, so verify it.
11008 if func_lalib_p "$file"; then
11009 func_source $dir/$name
11010
11011 # Delete the libtool libraries and symlinks.
11012 for n in $library_names; do
11013 func_append rmfiles " $odir/$n"
11014 done
11015 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
11016
11017 case $opt_mode in
11018 clean)
11019 case " $library_names " in
11020 *" $dlname "*) ;;
11021 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
11022 esac
11023 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
11024 ;;
11025 uninstall)
11026 if test -n "$library_names"; then
11027 # Do each command in the postuninstall commands.
11028 func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
11029 fi
11030
11031 if test -n "$old_library"; then
11032 # Do each command in the old_postuninstall commands.
11033 func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
11034 fi
11035 # FIXME: should reinstall the best remaining shared library.
11036 ;;
11037 esac
11038 fi
11039 ;;
11040
11041 *.lo)
11042 # Possibly a libtool object, so verify it.
11043 if func_lalib_p "$file"; then
11044
11045 # Read the .lo file
11046 func_source $dir/$name
11047
11048 # Add PIC object to the list of files to remove.
11049 if test -n "$pic_object" && test none != "$pic_object"; then
11050 func_append rmfiles " $dir/$pic_object"
11051 fi
11052
11053 # Add non-PIC object to the list of files to remove.
11054 if test -n "$non_pic_object" && test none != "$non_pic_object"; then
11055 func_append rmfiles " $dir/$non_pic_object"
11056 fi
11057 fi
11058 ;;
11059
11060 *)
11061 if test clean = "$opt_mode"; then
11062 noexename=$name
11063 case $file in
11064 *.exe)
11065 func_stripname '' '.exe' "$file"
11066 file=$func_stripname_result
11067 func_stripname '' '.exe' "$name"
11068 noexename=$func_stripname_result
11069 # $file with .exe has already been added to rmfiles,
11070 # add $file without .exe
11071 func_append rmfiles " $file"
11072 ;;
11073 esac
11074 # Do a test to see if this is a libtool program.
11075 if func_ltwrapper_p "$file"; then
11076 if func_ltwrapper_executable_p "$file"; then
11077 func_ltwrapper_scriptname "$file"
11078 relink_command=
11079 func_source $func_ltwrapper_scriptname_result
11080 func_append rmfiles " $func_ltwrapper_scriptname_result"
11081 else
11082 relink_command=
11083 func_source $dir/$noexename
11084 fi
11085
11086 # note $name still contains .exe if it was in $file originally
11087 # as does the version of $file that was added into $rmfiles
11088 func_append rmfiles " $odir/$name $odir/${name}S.$objext"
11089 if test yes = "$fast_install" && test -n "$relink_command"; then
11090 func_append rmfiles " $odir/lt-$name"
11091 fi
11092 if test "X$noexename" != "X$name"; then
11093 func_append rmfiles " $odir/lt-$noexename.c"
11094 fi
11095 fi
11096 fi
11097 ;;
11098 esac
11099 func_show_eval "$RM $rmfiles" 'exit_status=1'
11100 done
11101
11102 # Try to remove the $objdir's in the directories where we deleted files
11103 for dir in $rmdirs; do
11104 if test -d "$dir"; then
11105 func_show_eval "rmdir $dir >/dev/null 2>&1"
11106 fi
11107 done
11108
11109 exit $exit_status
11110 }
11111
11112 if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
11113 func_mode_uninstall ${1+"$@"}
11114 fi
11115
11116 test -z "$opt_mode" && {
11117 help=$generic_help
11118 func_fatal_help "you must specify a MODE"
11119 }
11120
11121 test -z "$exec_cmd" && \
11122 func_fatal_help "invalid operation mode '$opt_mode'"
11123
11124 if test -n "$exec_cmd"; then
11125 eval exec "$exec_cmd"
11126 exit $EXIT_FAILURE
11127 fi
11128
11129 exit $exit_status
11130
11131
11132 # The TAGs below are defined such that we never get into a situation
11133 # where we disable both kinds of libraries. Given conflicting
11134 # choices, we go for a static library, that is the most portable,
11135 # since we can't tell whether shared libraries were disabled because
11136 # the user asked for that or because the platform doesn't support
11137 # them. This is particularly important on AIX, because we don't
11138 # support having both static and shared libraries enabled at the same
11139 # time on that platform, so we default to a shared-only configuration.
11140 # If a disable-shared tag is given, we'll fallback to a static-only
11141 # configuration. But we'll never go from static-only to shared-only.
11142
11143 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
11144 build_libtool_libs=no
11145 build_old_libs=yes
11146 # ### END LIBTOOL TAG CONFIG: disable-shared
11147
11148 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
11149 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
11150 # ### END LIBTOOL TAG CONFIG: disable-static
11151
11152 # Local Variables:
11153 # mode:shell-script
11154 # sh-indentation:2
11155 # End:
+0
-59
m4/.gitignore less more
0 /libtool.m4
1 /ltoptions.m4
2 /ltsugar.m4
3 /ltversion.m4
4 /lt~obsolete.m4
5 /pkg.m4
6 /00gnulib.m4
7 /absolute-header.m4
8 /flock.m4
9 /gnulib-common.m4
10 /gnulib-comp.m4
11 /gnulib-tool.m4
12 /include_next.m4
13 /msvc-inval.m4
14 /msvc-nothrow.m4
15 /onceonly.m4
16 /sys_file_h.m4
17 /warn-on-use.m4
18 /alloca.m4
19 /eealloc.m4
20 /environ.m4
21 /extensions.m4
22 /extern-inline.m4
23 /limits-h.m4
24 /longlong.m4
25 /malloca.m4
26 /multiarch.m4
27 /off_t.m4
28 /setenv.m4
29 /stddef_h.m4
30 /stdint.m4
31 /stdlib_h.m4
32 /sys_types_h.m4
33 /unistd_h.m4
34 /wchar_t.m4
35 /wint_t.m4
36 /ssize_t.m4
37 /manywarnings.m4
38 /warnings.m4
39 /malloc.m4
40 /strdup.m4
41 /string_h.m4
42 /dirname.m4
43 /double-slash-root.m4
44 /errno_h.m4
45 /error.m4
46 /getprogname.m4
47 /relocatable-lib.m4
48 /stdbool.m4
49 /stdio_h.m4
50 /strerror.m4
51 /sys_socket_h.m4
52 /configmake.m4
53 /valgrind-tests.m4
54 /std-gnu11.m4
55 /rawmemchr.m4
56 /strchrnul.m4
57 /manywarnings-c++.m4
58 /gnu-make.m4
0 # 00gnulib.m4 serial 3
1 dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl This file must be named something that sorts before all other
7 dnl gnulib-provided .m4 files. It is needed until such time as we can
8 dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
9 dnl m4_divert semantics.
10
11 # Until autoconf 2.63, handling of the diversion stack required m4_init
12 # to be called first; but this does not happen with aclocal. Wrapping
13 # the entire execution in another layer of the diversion stack fixes this.
14 # Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4
15 # for whether it was FIFO or LIFO; in order to properly balance with
16 # m4_init, we need to undo our push just before anything wrapped within
17 # the m4_init body. The way to ensure this is to wrap both sides of
18 # m4_init with a one-shot macro that does the pop at the right time.
19 m4_ifndef([_m4_divert_diversion],
20 [m4_divert_push([KILL])
21 m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])])
22 m4_define([m4_init],
23 [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])])
24
25
26 # AC_DEFUN_ONCE([NAME], VALUE)
27 # ----------------------------
28 # Define NAME to expand to VALUE on the first use (whether by direct
29 # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
30 # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This
31 # definition is slower than the version in Autoconf 2.64, because it
32 # can only use interfaces that existed since 2.59; but it achieves the
33 # same effect. Quoting is necessary to avoid confusing Automake.
34 m4_version_prereq([2.63.263], [],
35 [m4_define([AC][_DEFUN_ONCE],
36 [AC][_DEFUN([$1],
37 [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
38 [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
39 [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
40
41 # gl_00GNULIB
42 # -----------
43 # Witness macro that this file has been included. Needed to force
44 # Automake to include this file prior to all other gnulib .m4 files.
45 AC_DEFUN([gl_00GNULIB])
0 # absolute-header.m4 serial 16
1 dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Derek Price.
7
8 # gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
9 # ---------------------------------------
10 # Find the absolute name of a header file, testing first if the header exists.
11 # If the header were sys/inttypes.h, this macro would define
12 # ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h
13 # in config.h
14 # (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
15 # The three "///" are to pacify Sun C 5.8, which otherwise would say
16 # "warning: #include of /usr/include/... may be non-portable".
17 # Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
18 # Note: This macro assumes that the header file is not empty after
19 # preprocessing, i.e. it does not only define preprocessor macros but also
20 # provides some type/enum definitions or function/variable declarations.
21 AC_DEFUN([gl_ABSOLUTE_HEADER],
22 [AC_REQUIRE([AC_CANONICAL_HOST])
23 AC_LANG_PREPROC_REQUIRE()dnl
24 dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted
25 dnl until we can assume autoconf 2.64 or newer.
26 m4_foreach_w([gl_HEADER_NAME], [$1],
27 [AS_VAR_PUSHDEF([gl_absolute_header],
28 [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl
29 AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>],
30 m4_defn([gl_absolute_header]),
31 [AS_VAR_PUSHDEF([ac_header_exists],
32 [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl
33 AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl
34 if test AS_VAR_GET(ac_header_exists) = yes; then
35 gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME]))
36 fi
37 AS_VAR_POPDEF([ac_header_exists])dnl
38 ])dnl
39 AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])),
40 ["AS_VAR_GET(gl_absolute_header)"],
41 [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.])
42 AS_VAR_POPDEF([gl_absolute_header])dnl
43 ])dnl
44 ])# gl_ABSOLUTE_HEADER
45
46 # gl_ABSOLUTE_HEADER_ONE(HEADER)
47 # ------------------------------
48 # Like gl_ABSOLUTE_HEADER, except that:
49 # - it assumes that the header exists,
50 # - it uses the current CPPFLAGS,
51 # - it does not cache the result,
52 # - it is silent.
53 AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
54 [
55 AC_REQUIRE([AC_CANONICAL_HOST])
56 AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])])
57 dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
58 dnl that contain only a #include of other header files and no
59 dnl non-comment tokens of their own. This leads to a failure to
60 dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
61 dnl and others. The workaround is to force preservation of comments
62 dnl through option -C. This ensures all necessary #line directives
63 dnl are present. GCC supports option -C as well.
64 case "$host_os" in
65 aix*) gl_absname_cpp="$ac_cpp -C" ;;
66 *) gl_absname_cpp="$ac_cpp" ;;
67 esac
68 changequote(,)
69 case "$host_os" in
70 mingw*)
71 dnl For the sake of native Windows compilers (excluding gcc),
72 dnl treat backslash as a directory separator, like /.
73 dnl Actually, these compilers use a double-backslash as
74 dnl directory separator, inside the
75 dnl # line "filename"
76 dnl directives.
77 gl_dirsep_regex='[/\\]'
78 ;;
79 *)
80 gl_dirsep_regex='\/'
81 ;;
82 esac
83 dnl A sed expression that turns a string into a basic regular
84 dnl expression, for use within "/.../".
85 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
86 gl_header_literal_regex=`echo '$1' \
87 | sed -e "$gl_make_literal_regex_sed"`
88 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
89 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
90 s|^/[^/]|//&|
91 p
92 q
93 }'
94 changequote([,])
95 dnl eval is necessary to expand gl_absname_cpp.
96 dnl Ultrix and Pyramid sh refuse to redirect output of eval,
97 dnl so use subshell.
98 AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]),
99 [`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
100 sed -n "$gl_absolute_header_sed"`])
101 ])
+0
-37
m4/ax_require_defined.m4 less more
0 # ===========================================================================
1 # http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
2 # ===========================================================================
3 #
4 # SYNOPSIS
5 #
6 # AX_REQUIRE_DEFINED(MACRO)
7 #
8 # DESCRIPTION
9 #
10 # AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
11 # been defined and thus are available for use. This avoids random issues
12 # where a macro isn't expanded. Instead the configure script emits a
13 # non-fatal:
14 #
15 # ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
16 #
17 # It's like AC_REQUIRE except it doesn't expand the required macro.
18 #
19 # Here's an example:
20 #
21 # AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
22 #
23 # LICENSE
24 #
25 # Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
26 #
27 # Copying and distribution of this file, with or without modification, are
28 # permitted in any medium without royalty provided the copyright notice
29 # and this notice are preserved. This file is offered as-is, without any
30 # warranty.
31
32 #serial 1
33
34 AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
35 m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
36 ])dnl AX_REQUIRE_DEFINED
0 # configmake.m4 serial 3
1 dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_PREREQ([2.60])
7
8 # gl_CONFIGMAKE_PREP
9 # ------------------
10 # Guarantee all of the standard directory variables, even when used with
11 # autoconf 2.63 (runstatedir wasn't supported before 2.70) or
12 # automake 1.11 (runstatedir isn't supported even in 1.16.1).
13 AC_DEFUN([gl_CONFIGMAKE_PREP],
14 [
15 if test "x$lispdir" = x; then
16 AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp'])
17 fi
18 dnl Added in autoconf 2.70.
19 if test "x$runstatedir" = x; then
20 AC_SUBST([runstatedir], ['${localstatedir}/run'])
21 fi
22
23 dnl Automake 1.11 provides pkglibexecdir merely without AC_SUBST.
24 dnl This blind use of AC_SUBST is safe.
25 AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}'])
26 ])
0 # serial 18 -*- Autoconf -*-
1 # Enable extensions on systems that normally disable them.
2
3 # Copyright (C) 2003, 2006-2018 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git
9 # Autoconf. Perhaps we can remove this once we can assume Autoconf
10 # 2.70 or later everywhere, but since Autoconf mutates rapidly
11 # enough in this area it's likely we'll need to redefine
12 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
13
14 # If autoconf reports a warning
15 # warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
16 # or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
17 # the fix is
18 # 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
19 # but always AC_REQUIREd,
20 # 2) to ensure that for each occurrence of
21 # AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
22 # or
23 # AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
24 # the corresponding gnulib module description has 'extensions' among
25 # its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
26 # invocation occurs in gl_EARLY, not in gl_INIT.
27
28 # AC_USE_SYSTEM_EXTENSIONS
29 # ------------------------
30 # Enable extensions on systems that normally disable them,
31 # typically due to standards-conformance issues.
32 #
33 # Remember that #undef in AH_VERBATIM gets replaced with #define by
34 # AC_DEFINE. The goal here is to define all known feature-enabling
35 # macros, then, if reports of conflicts are made, disable macros that
36 # cause problems on some platforms (such as __EXTENSIONS__).
37 AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
38 [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
39 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
40
41 AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
42 if test "$MINIX" = yes; then
43 AC_DEFINE([_POSIX_SOURCE], [1],
44 [Define to 1 if you need to in order for 'stat' and other
45 things to work.])
46 AC_DEFINE([_POSIX_1_SOURCE], [2],
47 [Define to 2 if the system does not provide POSIX.1 features
48 except with this defined.])
49 AC_DEFINE([_MINIX], [1],
50 [Define to 1 if on MINIX.])
51 AC_DEFINE([_NETBSD_SOURCE], [1],
52 [Define to 1 to make NetBSD features available. MINIX 3 needs this.])
53 fi
54
55 dnl Use a different key than __EXTENSIONS__, as that name broke existing
56 dnl configure.ac when using autoheader 2.62.
57 AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
58 [/* Enable extensions on AIX 3, Interix. */
59 #ifndef _ALL_SOURCE
60 # undef _ALL_SOURCE
61 #endif
62 /* Enable general extensions on macOS. */
63 #ifndef _DARWIN_C_SOURCE
64 # undef _DARWIN_C_SOURCE
65 #endif
66 /* Enable GNU extensions on systems that have them. */
67 #ifndef _GNU_SOURCE
68 # undef _GNU_SOURCE
69 #endif
70 /* Enable NetBSD extensions on NetBSD. */
71 #ifndef _NETBSD_SOURCE
72 # undef _NETBSD_SOURCE
73 #endif
74 /* Enable OpenBSD extensions on NetBSD. */
75 #ifndef _OPENBSD_SOURCE
76 # undef _OPENBSD_SOURCE
77 #endif
78 /* Enable threading extensions on Solaris. */
79 #ifndef _POSIX_PTHREAD_SEMANTICS
80 # undef _POSIX_PTHREAD_SEMANTICS
81 #endif
82 /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
83 #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
84 # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
85 #endif
86 /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
87 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
88 # undef __STDC_WANT_IEC_60559_BFP_EXT__
89 #endif
90 /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
91 #ifndef __STDC_WANT_IEC_60559_DFP_EXT__
92 # undef __STDC_WANT_IEC_60559_DFP_EXT__
93 #endif
94 /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
95 #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
96 # undef __STDC_WANT_IEC_60559_FUNCS_EXT__
97 #endif
98 /* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
99 #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
100 # undef __STDC_WANT_IEC_60559_TYPES_EXT__
101 #endif
102 /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
103 #ifndef __STDC_WANT_LIB_EXT2__
104 # undef __STDC_WANT_LIB_EXT2__
105 #endif
106 /* Enable extensions specified by ISO/IEC 24747:2009. */
107 #ifndef __STDC_WANT_MATH_SPEC_FUNCS__
108 # undef __STDC_WANT_MATH_SPEC_FUNCS__
109 #endif
110 /* Enable extensions on HP NonStop. */
111 #ifndef _TANDEM_SOURCE
112 # undef _TANDEM_SOURCE
113 #endif
114 /* Enable X/Open extensions if necessary. HP-UX 11.11 defines
115 mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
116 whether compiling with -Ae or -D_HPUX_SOURCE=1. */
117 #ifndef _XOPEN_SOURCE
118 # undef _XOPEN_SOURCE
119 #endif
120 /* Enable X/Open compliant socket functions that do not require linking
121 with -lxnet on HP-UX 11.11. */
122 #ifndef _HPUX_ALT_XOPEN_SOCKET_API
123 # undef _HPUX_ALT_XOPEN_SOCKET_API
124 #endif
125 /* Enable general extensions on Solaris. */
126 #ifndef __EXTENSIONS__
127 # undef __EXTENSIONS__
128 #endif
129 ])
130 AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
131 [ac_cv_safe_to_define___extensions__],
132 [AC_COMPILE_IFELSE(
133 [AC_LANG_PROGRAM([[
134 # define __EXTENSIONS__ 1
135 ]AC_INCLUDES_DEFAULT])],
136 [ac_cv_safe_to_define___extensions__=yes],
137 [ac_cv_safe_to_define___extensions__=no])])
138 test $ac_cv_safe_to_define___extensions__ = yes &&
139 AC_DEFINE([__EXTENSIONS__])
140 AC_DEFINE([_ALL_SOURCE])
141 AC_DEFINE([_DARWIN_C_SOURCE])
142 AC_DEFINE([_GNU_SOURCE])
143 AC_DEFINE([_NETBSD_SOURCE])
144 AC_DEFINE([_OPENBSD_SOURCE])
145 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
146 AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
147 AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
148 AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__])
149 AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__])
150 AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__])
151 AC_DEFINE([__STDC_WANT_LIB_EXT2__])
152 AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__])
153 AC_DEFINE([_TANDEM_SOURCE])
154 AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
155 [ac_cv_should_define__xopen_source],
156 [ac_cv_should_define__xopen_source=no
157 AC_COMPILE_IFELSE(
158 [AC_LANG_PROGRAM([[
159 #include <wchar.h>
160 mbstate_t x;]])],
161 [],
162 [AC_COMPILE_IFELSE(
163 [AC_LANG_PROGRAM([[
164 #define _XOPEN_SOURCE 500
165 #include <wchar.h>
166 mbstate_t x;]])],
167 [ac_cv_should_define__xopen_source=yes])])])
168 test $ac_cv_should_define__xopen_source = yes &&
169 AC_DEFINE([_XOPEN_SOURCE], [500])
170 AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API])
171 ])# AC_USE_SYSTEM_EXTENSIONS
172
173 # gl_USE_SYSTEM_EXTENSIONS
174 # ------------------------
175 # Enable extensions on systems that normally disable them,
176 # typically due to standards-conformance issues.
177 AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
178 [
179 dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
180 dnl gnulib does not need it. But if it gets required by third-party macros
181 dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
182 dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
183 dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
184 dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
185 AC_REQUIRE([AC_GNU_SOURCE])
186
187 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
188 ])
0 dnl 'extern inline' a la ISO C99.
1
2 dnl Copyright 2012-2018 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 AC_DEFUN([gl_EXTERN_INLINE],
8 [
9 AH_VERBATIM([extern_inline],
10 [/* Please see the Gnulib manual for how to use these macros.
11
12 Suppress extern inline with HP-UX cc, as it appears to be broken; see
13 <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
14
15 Suppress extern inline with Sun C in standards-conformance mode, as it
16 mishandles inline functions that call each other. E.g., for 'inline void f
17 (void) { } inline void g (void) { f (); }', c99 incorrectly complains
18 'reference to static identifier "f" in extern inline function'.
19 This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
20
21 Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
22 on configurations that mistakenly use 'static inline' to implement
23 functions or macros in standard C headers like <ctype.h>. For example,
24 if isdigit is mistakenly implemented via a static inline function,
25 a program containing an extern inline function that calls isdigit
26 may not work since the C standard prohibits extern inline functions
27 from calling static functions (ISO C 99 section 6.7.4.(3).
28 This bug is known to occur on:
29
30 OS X 10.8 and earlier; see:
31 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
32
33 DragonFly; see
34 http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
35
36 FreeBSD; see:
37 https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
38
39 OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
40 for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
41 Assume DragonFly and FreeBSD will be similar.
42
43 GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
44 inline semantics, unless -fgnu89-inline is used. It defines a macro
45 __GNUC_STDC_INLINE__ to indicate this situation or a macro
46 __GNUC_GNU_INLINE__ to indicate the opposite situation.
47 GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
48 semantics but warns, unless -fgnu89-inline is used:
49 warning: C99 inline functions are not supported; using GNU89
50 warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
51 It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.
52 */
53 #if (((defined __APPLE__ && defined __MACH__) \
54 || defined __DragonFly__ || defined __FreeBSD__) \
55 && (defined __header_inline \
56 ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
57 && ! defined __clang__) \
58 : ((! defined _DONT_USE_CTYPE_INLINE_ \
59 && (defined __GNUC__ || defined __cplusplus)) \
60 || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
61 && defined __GNUC__ && ! defined __cplusplus))))
62 # define _GL_EXTERN_INLINE_STDHEADER_BUG
63 #endif
64 #if ((__GNUC__ \
65 ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
66 : (199901L <= __STDC_VERSION__ \
67 && !defined __HP_cc \
68 && !defined __PGI \
69 && !(defined __SUNPRO_C && __STDC__))) \
70 && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
71 # define _GL_INLINE inline
72 # define _GL_EXTERN_INLINE extern inline
73 # define _GL_EXTERN_INLINE_IN_USE
74 #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
75 && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
76 # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
77 /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
78 # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
79 # else
80 # define _GL_INLINE extern inline
81 # endif
82 # define _GL_EXTERN_INLINE extern
83 # define _GL_EXTERN_INLINE_IN_USE
84 #else
85 # define _GL_INLINE static _GL_UNUSED
86 # define _GL_EXTERN_INLINE static _GL_UNUSED
87 #endif
88
89 /* In GCC 4.6 (inclusive) to 5.1 (exclusive),
90 suppress bogus "no previous prototype for 'FOO'"
91 and "no previous declaration for 'FOO'" diagnostics,
92 when FOO is an inline function in the header; see
93 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
94 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
95 #if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
96 # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
97 # define _GL_INLINE_HEADER_CONST_PRAGMA
98 # else
99 # define _GL_INLINE_HEADER_CONST_PRAGMA \
100 _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
101 # endif
102 # define _GL_INLINE_HEADER_BEGIN \
103 _Pragma ("GCC diagnostic push") \
104 _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
105 _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
106 _GL_INLINE_HEADER_CONST_PRAGMA
107 # define _GL_INLINE_HEADER_END \
108 _Pragma ("GCC diagnostic pop")
109 #else
110 # define _GL_INLINE_HEADER_BEGIN
111 # define _GL_INLINE_HEADER_END
112 #endif])
113 ])
0 # flock.m4 serial 3
1 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_DEFUN([gl_FUNC_FLOCK],
7 [
8 AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
9 AC_CHECK_FUNCS_ONCE([flock])
10 if test $ac_cv_func_flock = no; then
11 HAVE_FLOCK=0
12 fi
13 ])
14
15 dnl Prerequisites of lib/flock.c.
16 AC_DEFUN([gl_PREREQ_FLOCK],
17 [
18 AC_CHECK_FUNCS_ONCE([fcntl])
19 AC_CHECK_HEADERS_ONCE([unistd.h])
20
21 dnl Do we have a POSIX fcntl lock implementation?
22 AC_CHECK_MEMBERS([struct flock.l_type],[],[],[[#include <fcntl.h>]])
23 ])
0 # getopt.m4 serial 46
1 dnl Copyright (C) 2002-2006, 2008-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 # Request a POSIX compliant getopt function.
7 AC_DEFUN([gl_FUNC_GETOPT_POSIX],
8 [
9 m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
10 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
11 AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
12 dnl Other modules can request the gnulib implementation of the getopt
13 dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS.
14 dnl argp.m4 does this.
15 m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [
16 REPLACE_GETOPT=1
17 ], [
18 REPLACE_GETOPT=0
19 if test -n "$gl_replace_getopt"; then
20 REPLACE_GETOPT=1
21 fi
22 ])
23 if test $REPLACE_GETOPT = 1; then
24 dnl Arrange for getopt.h to be created.
25 gl_GETOPT_SUBSTITUTE_HEADER
26 fi
27 ])
28
29 # Request a POSIX compliant getopt function with GNU extensions (such as
30 # options with optional arguments) and the functions getopt_long,
31 # getopt_long_only.
32 AC_DEFUN([gl_FUNC_GETOPT_GNU],
33 [
34 dnl Set the variable gl_getopt_required, so that all invocations of
35 dnl gl_GETOPT_CHECK_HEADERS in the scope of the current configure file
36 dnl will check for getopt with GNU extensions.
37 dnl This means that if one gnulib-tool invocation requests getopt-posix
38 dnl and another gnulib-tool invocation requests getopt-gnu, it is as if
39 dnl both had requested getopt-gnu.
40 m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU])
41
42 dnl No need to invoke gl_FUNC_GETOPT_POSIX here; this is automatically
43 dnl done through the module dependency getopt-gnu -> getopt-posix.
44 ])
45
46 # Determine whether to replace the entire getopt facility.
47 AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
48 [
49 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
50 AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON
51
52 dnl Persuade Solaris <unistd.h> to declare optarg, optind, opterr, optopt.
53 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
54
55 gl_CHECK_NEXT_HEADERS([getopt.h])
56 if test $ac_cv_header_getopt_h = yes; then
57 HAVE_GETOPT_H=1
58 else
59 HAVE_GETOPT_H=0
60 fi
61 AC_SUBST([HAVE_GETOPT_H])
62
63 gl_replace_getopt=
64
65 dnl Test whether <getopt.h> is available.
66 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
67 AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes])
68 fi
69
70 dnl Test whether the function getopt_long is available.
71 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
72 AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
73 fi
74
75 dnl POSIX 2008 does not specify leading '+' behavior, but see
76 dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on
77 dnl the next version of POSIX. For now, we only guarantee leading '+'
78 dnl behavior with getopt-gnu.
79 if test -z "$gl_replace_getopt"; then
80 AC_CACHE_CHECK([whether getopt is POSIX compatible],
81 [gl_cv_func_getopt_posix],
82 [
83 dnl Merging these three different test programs into a single one
84 dnl would require a reset mechanism. On BSD systems, it can be done
85 dnl through 'optreset'; on some others (glibc), it can be done by
86 dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1,
87 dnl Solaris 9, musl libc), there is no such mechanism.
88 if test $cross_compiling = no; then
89 dnl Sanity check. Succeeds everywhere (except on MSVC,
90 dnl which lacks <unistd.h> and getopt() entirely).
91 AC_RUN_IFELSE(
92 [AC_LANG_SOURCE([[
93 #include <unistd.h>
94 #include <stdlib.h>
95 #include <string.h>
96
97 int
98 main ()
99 {
100 static char program[] = "program";
101 static char a[] = "-a";
102 static char foo[] = "foo";
103 static char bar[] = "bar";
104 char *argv[] = { program, a, foo, bar, NULL };
105 int c;
106
107 c = getopt (4, argv, "ab");
108 if (!(c == 'a'))
109 return 1;
110 c = getopt (4, argv, "ab");
111 if (!(c == -1))
112 return 2;
113 if (!(optind == 2))
114 return 3;
115 return 0;
116 }
117 ]])],
118 [gl_cv_func_getopt_posix=maybe],
119 [gl_cv_func_getopt_posix=no])
120 if test $gl_cv_func_getopt_posix = maybe; then
121 dnl Sanity check with '+'. Succeeds everywhere (except on MSVC,
122 dnl which lacks <unistd.h> and getopt() entirely).
123 AC_RUN_IFELSE(
124 [AC_LANG_SOURCE([[
125 #include <unistd.h>
126 #include <stdlib.h>
127 #include <string.h>
128
129 int
130 main ()
131 {
132 static char program[] = "program";
133 static char donald[] = "donald";
134 static char p[] = "-p";
135 static char billy[] = "billy";
136 static char duck[] = "duck";
137 static char a[] = "-a";
138 static char bar[] = "bar";
139 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
140 int c;
141
142 c = getopt (7, argv, "+abp:q:");
143 if (!(c == -1))
144 return 4;
145 if (!(strcmp (argv[0], "program") == 0))
146 return 5;
147 if (!(strcmp (argv[1], "donald") == 0))
148 return 6;
149 if (!(strcmp (argv[2], "-p") == 0))
150 return 7;
151 if (!(strcmp (argv[3], "billy") == 0))
152 return 8;
153 if (!(strcmp (argv[4], "duck") == 0))
154 return 9;
155 if (!(strcmp (argv[5], "-a") == 0))
156 return 10;
157 if (!(strcmp (argv[6], "bar") == 0))
158 return 11;
159 if (!(optind == 1))
160 return 12;
161 return 0;
162 }
163 ]])],
164 [gl_cv_func_getopt_posix=maybe],
165 [gl_cv_func_getopt_posix=no])
166 fi
167 if test $gl_cv_func_getopt_posix = maybe; then
168 dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug.
169 AC_RUN_IFELSE(
170 [AC_LANG_SOURCE([[
171 #include <unistd.h>
172 #include <stdlib.h>
173 #include <string.h>
174
175 int
176 main ()
177 {
178 static char program[] = "program";
179 static char ab[] = "-ab";
180 char *argv[3] = { program, ab, NULL };
181 if (getopt (2, argv, "ab:") != 'a')
182 return 13;
183 if (getopt (2, argv, "ab:") != '?')
184 return 14;
185 if (optopt != 'b')
186 return 15;
187 if (optind != 2)
188 return 16;
189 return 0;
190 }
191 ]])],
192 [gl_cv_func_getopt_posix=yes],
193 [gl_cv_func_getopt_posix=no])
194 fi
195 else
196 case "$host_os" in
197 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
198 *) gl_cv_func_getopt_posix="guessing yes";;
199 esac
200 fi
201 ])
202 case "$gl_cv_func_getopt_posix" in
203 *no) gl_replace_getopt=yes ;;
204 esac
205 fi
206
207 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
208 AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu],
209 [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
210 # optstring is necessary for programs like m4 that have POSIX-mandated
211 # semantics for supporting options interspersed with files.
212 # Also, since getopt_long is a GNU extension, we require optind=0.
213 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
214 # so take care to revert to the correct (non-)export state.
215 dnl GNU Coding Standards currently allow awk but not env; besides, env
216 dnl is ambiguous with environment values that contain newlines.
217 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
218 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
219 xx) gl_had_POSIXLY_CORRECT=exported ;;
220 x) gl_had_POSIXLY_CORRECT=yes ;;
221 *) gl_had_POSIXLY_CORRECT= ;;
222 esac
223 POSIXLY_CORRECT=1
224 export POSIXLY_CORRECT
225 AC_RUN_IFELSE(
226 [AC_LANG_PROGRAM([[#include <getopt.h>
227 #include <stddef.h>
228 #include <string.h>
229 ]GL_NOCRASH[
230 ]], [[
231 int result = 0;
232
233 nocrash_init();
234
235 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
236 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
237 OSF/1 5.1, Solaris 10. */
238 {
239 static char conftest[] = "conftest";
240 static char plus[] = "-+";
241 char *argv[3] = { conftest, plus, NULL };
242 opterr = 0;
243 if (getopt (2, argv, "+a") != '?')
244 result |= 1;
245 }
246 /* This code succeeds on glibc 2.8, mingw,
247 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
248 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
249 {
250 static char program[] = "program";
251 static char p[] = "-p";
252 static char foo[] = "foo";
253 static char bar[] = "bar";
254 char *argv[] = { program, p, foo, bar, NULL };
255
256 optind = 1;
257 if (getopt (4, argv, "p::") != 'p')
258 result |= 2;
259 else if (optarg != NULL)
260 result |= 4;
261 else if (getopt (4, argv, "p::") != -1)
262 result |= 6;
263 else if (optind != 2)
264 result |= 8;
265 }
266 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
267 {
268 static char program[] = "program";
269 static char foo[] = "foo";
270 static char p[] = "-p";
271 char *argv[] = { program, foo, p, NULL };
272 optind = 0;
273 if (getopt (3, argv, "-p") != 1)
274 result |= 16;
275 else if (getopt (3, argv, "-p") != 'p')
276 result |= 16;
277 }
278 /* This code fails on glibc 2.11. */
279 {
280 static char program[] = "program";
281 static char b[] = "-b";
282 static char a[] = "-a";
283 char *argv[] = { program, b, a, NULL };
284 optind = opterr = 0;
285 if (getopt (3, argv, "+:a:b") != 'b')
286 result |= 32;
287 else if (getopt (3, argv, "+:a:b") != ':')
288 result |= 32;
289 }
290 /* This code dumps core on glibc 2.14. */
291 {
292 static char program[] = "program";
293 static char w[] = "-W";
294 static char dummy[] = "dummy";
295 char *argv[] = { program, w, dummy, NULL };
296 optind = opterr = 1;
297 if (getopt (3, argv, "W;") != 'W')
298 result |= 64;
299 }
300 return result;
301 ]])],
302 [gl_cv_func_getopt_gnu=yes],
303 [gl_cv_func_getopt_gnu=no],
304 [dnl Cross compiling. Assume the worst, even on glibc platforms.
305 gl_cv_func_getopt_gnu="guessing no"
306 ])
307 case $gl_had_POSIXLY_CORRECT in
308 exported) ;;
309 yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;;
310 *) AS_UNSET([POSIXLY_CORRECT]) ;;
311 esac
312 ])
313 if test "$gl_cv_func_getopt_gnu" != yes; then
314 gl_replace_getopt=yes
315 else
316 AC_CACHE_CHECK([for working GNU getopt_long function],
317 [gl_cv_func_getopt_long_gnu],
318 [AC_RUN_IFELSE(
319 [AC_LANG_PROGRAM(
320 [[#include <getopt.h>
321 #include <stddef.h>
322 #include <string.h>
323 ]],
324 [[static const struct option long_options[] =
325 {
326 { "xtremely-",no_argument, NULL, 1003 },
327 { "xtra", no_argument, NULL, 1001 },
328 { "xtreme", no_argument, NULL, 1002 },
329 { "xtremely", no_argument, NULL, 1003 },
330 { NULL, 0, NULL, 0 }
331 };
332 /* This code fails on OpenBSD 5.0. */
333 {
334 static char program[] = "program";
335 static char xtremel[] = "--xtremel";
336 char *argv[] = { program, xtremel, NULL };
337 int option_index;
338 optind = 1; opterr = 0;
339 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
340 return 1;
341 }
342 return 0;
343 ]])],
344 [gl_cv_func_getopt_long_gnu=yes],
345 [gl_cv_func_getopt_long_gnu=no],
346 [dnl Cross compiling. Guess no on OpenBSD, yes otherwise.
347 case "$host_os" in
348 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
349 *) gl_cv_func_getopt_long_gnu="guessing yes";;
350 esac
351 ])
352 ])
353 case "$gl_cv_func_getopt_long_gnu" in
354 *yes) ;;
355 *) gl_replace_getopt=yes ;;
356 esac
357 fi
358 fi
359 ])
360
361 AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
362 [
363 AC_CHECK_HEADERS_ONCE([sys/cdefs.h])
364 if test $ac_cv_header_sys_cdefs_h = yes; then
365 HAVE_SYS_CDEFS_H=1
366 else
367 HAVE_SYS_CDEFS_H=0
368 fi
369 AC_SUBST([HAVE_SYS_CDEFS_H])
370
371 AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
372 [Define to rpl_ if the getopt replacement functions and variables
373 should be used.])
374 GETOPT_H=getopt.h
375 GETOPT_CDEFS_H=getopt-cdefs.h
376 AC_SUBST([GETOPT_H])
377 AC_SUBST([GETOPT_CDEFS_H])
378 ])
0 # Determine whether recent-enough GNU Make is being used.
1
2 # Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
3
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # Written by Paul Eggert.
9
10 # Set GNU_MAKE if we are using a recent-enough version of GNU make.
11
12 AC_DEFUN([gl_GNU_MAKE],
13 [
14 AM_CONDITIONAL([GNU_MAKE],
15 [LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null])
16 ])
4242 # c99 \
4343 # configmake \
4444 # flock \
45 # getopt-posix \
4546 # gnu-make \
4647 # manywarnings \
4748 # relocatable-lib-lgpl \
4849 # snippet/unused-parameter \
4950 # ssize_t \
5051 # strchrnul \
51 # strdup-posix \
52 # valgrind-tests
52 # strdup-posix
5353
5454 # Specification in the form of a few gnulib-tool.m4 macro invocations:
5555 gl_LOCAL_DIR([gl:gl-mod/bootstrap])
5858 c99
5959 configmake
6060 flock
61 getopt-posix
6162 gnu-make
6263 manywarnings
6364 relocatable-lib-lgpl
6566 ssize_t
6667 strchrnul
6768 strdup-posix
68 valgrind-tests
6969 ])
7070 gl_AVOID([])
7171 gl_SOURCE_BASE([lib])
0 # gnulib-common.m4 serial 40
1 dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_PREREQ([2.62])
7
8 # gl_COMMON
9 # is expanded unconditionally through gnulib-tool magic.
10 AC_DEFUN([gl_COMMON], [
11 dnl Use AC_REQUIRE here, so that the code is expanded once only.
12 AC_REQUIRE([gl_00GNULIB])
13 AC_REQUIRE([gl_COMMON_BODY])
14 ])
15 AC_DEFUN([gl_COMMON_BODY], [
16 AH_VERBATIM([_Noreturn],
17 [/* The _Noreturn keyword of C11. */
18 #if ! (defined _Noreturn \
19 || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
20 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
21 || 0x5110 <= __SUNPRO_C)
22 # define _Noreturn __attribute__ ((__noreturn__))
23 # elif defined _MSC_VER && 1200 <= _MSC_VER
24 # define _Noreturn __declspec (noreturn)
25 # else
26 # define _Noreturn
27 # endif
28 #endif
29 ])
30 AH_VERBATIM([isoc99_inline],
31 [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
32 the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
33 earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
34 __APPLE__ && __MACH__ test for Mac OS X.
35 __APPLE_CC__ tests for the Apple compiler and its version.
36 __STDC_VERSION__ tests for the C99 mode. */
37 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
38 # define __GNUC_STDC_INLINE__ 1
39 #endif])
40 AH_VERBATIM([unused_parameter],
41 [/* Define as a marker that can be attached to declarations that might not
42 be used. This helps to reduce warnings, such as from
43 GCC -Wunused-parameter. */
44 #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
45 # define _GL_UNUSED __attribute__ ((__unused__))
46 #else
47 # define _GL_UNUSED
48 #endif
49 /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
50 is a misnomer outside of parameter lists. */
51 #define _UNUSED_PARAMETER_ _GL_UNUSED
52
53 /* gcc supports the "unused" attribute on possibly unused labels, and
54 g++ has since version 4.5. Note to support C++ as well as C,
55 _GL_UNUSED_LABEL should be used with a trailing ; */
56 #if !defined __cplusplus || __GNUC__ > 4 \
57 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
58 # define _GL_UNUSED_LABEL _GL_UNUSED
59 #else
60 # define _GL_UNUSED_LABEL
61 #endif
62
63 /* The __pure__ attribute was added in gcc 2.96. */
64 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
65 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
66 #else
67 # define _GL_ATTRIBUTE_PURE /* empty */
68 #endif
69
70 /* The __const__ attribute was added in gcc 2.95. */
71 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
72 # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
73 #else
74 # define _GL_ATTRIBUTE_CONST /* empty */
75 #endif
76
77 /* The __malloc__ attribute was added in gcc 3. */
78 #if 3 <= __GNUC__
79 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
80 #else
81 # define _GL_ATTRIBUTE_MALLOC /* empty */
82 #endif
83 ])
84 dnl Preparation for running test programs:
85 dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
86 dnl to /dev/tty, so they can be redirected to log files. Such diagnostics
87 dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N.
88 LIBC_FATAL_STDERR_=1
89 export LIBC_FATAL_STDERR_
90 ])
91
92 # gl_MODULE_INDICATOR_CONDITION
93 # expands to a C preprocessor expression that evaluates to 1 or 0, depending
94 # whether a gnulib module that has been requested shall be considered present
95 # or not.
96 m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
97
98 # gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
99 # sets the shell variable that indicates the presence of the given module to
100 # a C preprocessor expression that will evaluate to 1.
101 AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
102 [
103 gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
104 [GNULIB_[]m4_translit([[$1]],
105 [abcdefghijklmnopqrstuvwxyz./-],
106 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
107 [gl_MODULE_INDICATOR_CONDITION])
108 ])
109
110 # gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
111 # modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
112 # The shell variable's value is a C preprocessor expression that evaluates
113 # to 0 or 1.
114 AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
115 [
116 m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
117 [
118 dnl Simplify the expression VALUE || 1 to 1.
119 $1=1
120 ],
121 [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
122 [gl_MODULE_INDICATOR_CONDITION])])
123 ])
124
125 # gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
126 # modifies the shell variable to include the given condition. The shell
127 # variable's value is a C preprocessor expression that evaluates to 0 or 1.
128 AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
129 [
130 dnl Simplify the expression 1 || CONDITION to 1.
131 if test "$[]$1" != 1; then
132 dnl Simplify the expression 0 || CONDITION to CONDITION.
133 if test "$[]$1" = 0; then
134 $1=$2
135 else
136 $1="($[]$1 || $2)"
137 fi
138 fi
139 ])
140
141 # gl_MODULE_INDICATOR([modulename])
142 # defines a C macro indicating the presence of the given module
143 # in a location where it can be used.
144 # | Value | Value |
145 # | in lib/ | in tests/ |
146 # --------------------------------------------+---------+-----------+
147 # Module present among main modules: | 1 | 1 |
148 # --------------------------------------------+---------+-----------+
149 # Module present among tests-related modules: | 0 | 1 |
150 # --------------------------------------------+---------+-----------+
151 # Module not present at all: | 0 | 0 |
152 # --------------------------------------------+---------+-----------+
153 AC_DEFUN([gl_MODULE_INDICATOR],
154 [
155 AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]],
156 [abcdefghijklmnopqrstuvwxyz./-],
157 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]),
158 [gl_MODULE_INDICATOR_CONDITION],
159 [Define to a C preprocessor expression that evaluates to 1 or 0,
160 depending whether the gnulib module $1 shall be considered present.])
161 ])
162
163 # gl_MODULE_INDICATOR_FOR_TESTS([modulename])
164 # defines a C macro indicating the presence of the given module
165 # in lib or tests. This is useful to determine whether the module
166 # should be tested.
167 # | Value | Value |
168 # | in lib/ | in tests/ |
169 # --------------------------------------------+---------+-----------+
170 # Module present among main modules: | 1 | 1 |
171 # --------------------------------------------+---------+-----------+
172 # Module present among tests-related modules: | 1 | 1 |
173 # --------------------------------------------+---------+-----------+
174 # Module not present at all: | 0 | 0 |
175 # --------------------------------------------+---------+-----------+
176 AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
177 [
178 AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]],
179 [abcdefghijklmnopqrstuvwxyz./-],
180 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
181 [Define to 1 when the gnulib module $1 should be tested.])
182 ])
183
184 # gl_ASSERT_NO_GNULIB_POSIXCHECK
185 # asserts that there will never be a need to #define GNULIB_POSIXCHECK.
186 # and thereby enables an optimization of configure and config.h.
187 # Used by Emacs.
188 AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK],
189 [
190 dnl Override gl_WARN_ON_USE_PREPARE.
191 dnl But hide this definition from 'aclocal'.
192 AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], [])
193 ])
194
195 # gl_ASSERT_NO_GNULIB_TESTS
196 # asserts that there will be no gnulib tests in the scope of the configure.ac
197 # and thereby enables an optimization of config.h.
198 # Used by Emacs.
199 AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS],
200 [
201 dnl Override gl_MODULE_INDICATOR_FOR_TESTS.
202 AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [])
203 ])
204
205 # Test whether <features.h> exists.
206 # Set HAVE_FEATURES_H.
207 AC_DEFUN([gl_FEATURES_H],
208 [
209 AC_CHECK_HEADERS_ONCE([features.h])
210 if test $ac_cv_header_features_h = yes; then
211 HAVE_FEATURES_H=1
212 else
213 HAVE_FEATURES_H=0
214 fi
215 AC_SUBST([HAVE_FEATURES_H])
216 ])
217
218 # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
219 # ----------------------------------------------------
220 # Backport of autoconf-2.63b's macro.
221 # Remove this macro when we can assume autoconf >= 2.64.
222 m4_ifndef([AS_VAR_IF],
223 [m4_define([AS_VAR_IF],
224 [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
225
226 # gl_PROG_CC_C99
227 # Modifies the value of the shell variable CC in an attempt to make $CC
228 # understand ISO C99 source code.
229 # This is like AC_PROG_CC_C99, except that
230 # - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
231 # <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00367.html>,
232 # but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
233 # <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00441.html>.
234 # Remaining problems:
235 # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
236 # to CC twice
237 # <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00431.html>.
238 # - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
239 AC_DEFUN([gl_PROG_CC_C99],
240 [
241 dnl Change that version number to the minimum Autoconf version that supports
242 dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls.
243 m4_version_prereq([9.0],
244 [AC_REQUIRE([AC_PROG_CC_C99])],
245 [AC_REQUIRE([AC_PROG_CC_STDC])])
246 ])
247
248 # gl_PROG_AR_RANLIB
249 # Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
250 # The user can set the variables AR, ARFLAGS, RANLIB if he wants to override
251 # the values.
252 AC_DEFUN([gl_PROG_AR_RANLIB],
253 [
254 dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
255 dnl as "cc", and GCC as "gcc". They have different object file formats and
256 dnl library formats. In particular, the GNU binutils programs ar and ranlib
257 dnl produce libraries that work only with gcc, not with cc.
258 AC_REQUIRE([AC_PROG_CC])
259 dnl The '][' hides this use from 'aclocal'.
260 AC_BEFORE([$0], [A][M_PROG_AR])
261 AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
262 [
263 AC_EGREP_CPP([Amsterdam],
264 [
265 #ifdef __ACK__
266 Amsterdam
267 #endif
268 ],
269 [gl_cv_c_amsterdam_compiler=yes],
270 [gl_cv_c_amsterdam_compiler=no])
271 ])
272
273 dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not
274 dnl building with __ACK__.
275 if test $gl_cv_c_amsterdam_compiler = yes; then
276 if test -z "$AR"; then
277 AR='cc -c.a'
278 fi
279 if test -z "$ARFLAGS"; then
280 ARFLAGS='-o'
281 fi
282 else
283 dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST
284 dnl ARFLAGS variable (it is filed into Makefile.in directly by automake
285 dnl script on-demand, if not specified by ./configure of course).
286 dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above
287 dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block
288 dnl because AM_PROG_AR is written so it could re-set AR variable even for
289 dnl __ACK__. It may seem like its easier to avoid calling the macro here,
290 dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good
291 dnl default value and automake should usually know them).
292 dnl
293 dnl The '][' hides this use from 'aclocal'.
294 m4_ifdef([A][M_PROG_AR], [A][M_PROG_AR], [:])
295 fi
296
297 dnl In case the code above has not helped with setting AR/ARFLAGS, use
298 dnl Automake-documented default values for AR and ARFLAGS, but prefer
299 dnl ${host}-ar over ar (useful for cross-compiling).
300 AC_CHECK_TOOL([AR], [ar], [ar])
301 if test -z "$ARFLAGS"; then
302 ARFLAGS='cr'
303 fi
304
305 AC_SUBST([AR])
306 AC_SUBST([ARFLAGS])
307 if test -z "$RANLIB"; then
308 if test $gl_cv_c_amsterdam_compiler = yes; then
309 RANLIB=':'
310 else
311 dnl Use the ranlib program if it is available.
312 AC_PROG_RANLIB
313 fi
314 fi
315 AC_SUBST([RANLIB])
316 ])
317
318 # AC_C_RESTRICT
319 # This definition is copied from post-2.69 Autoconf and overrides the
320 # AC_C_RESTRICT macro from autoconf 2.60..2.69. It can be removed
321 # once autoconf >= 2.70 can be assumed. It's painful to check version
322 # numbers, and in practice this macro is more up-to-date than Autoconf
323 # is, so override Autoconf unconditionally.
324 AC_DEFUN([AC_C_RESTRICT],
325 [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
326 [ac_cv_c_restrict=no
327 # The order here caters to the fact that C++ does not require restrict.
328 for ac_kw in __restrict __restrict__ _Restrict restrict; do
329 AC_COMPILE_IFELSE(
330 [AC_LANG_PROGRAM(
331 [[typedef int *int_ptr;
332 int foo (int_ptr $ac_kw ip) { return ip[0]; }
333 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
334 int bar (int ip[$ac_kw]) { return ip[0]; }
335 ]],
336 [[int s[1];
337 int *$ac_kw t = s;
338 t[0] = 0;
339 return foo (t) + bar (t);
340 ]])],
341 [ac_cv_c_restrict=$ac_kw])
342 test "$ac_cv_c_restrict" != no && break
343 done
344 ])
345 AH_VERBATIM([restrict],
346 [/* Define to the equivalent of the C99 'restrict' keyword, or to
347 nothing if this is not supported. Do not define if restrict is
348 supported directly. */
349 #undef restrict
350 /* Work around a bug in Sun C++: it does not support _Restrict or
351 __restrict__, even though the corresponding Sun C compiler ends up with
352 "#define restrict _Restrict" or "#define restrict __restrict__" in the
353 previous line. Perhaps some future version of Sun C++ will work with
354 restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
355 #if defined __SUNPRO_CC && !defined __RESTRICT
356 # define _Restrict
357 # define __restrict__
358 #endif])
359 case $ac_cv_c_restrict in
360 restrict) ;;
361 no) AC_DEFINE([restrict], []) ;;
362 *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
363 esac
364 ])# AC_C_RESTRICT
365
366 # gl_BIGENDIAN
367 # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
368 # Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some
369 # macros invoke AC_C_BIGENDIAN with arguments.
370 AC_DEFUN([gl_BIGENDIAN],
371 [
372 AC_C_BIGENDIAN
373 ])
374
375 # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
376 # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
377 # output a spurious "(cached)" mark in the midst of other configure output.
378 # This macro should be used instead of AC_CACHE_VAL when it is not surrounded
379 # by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
380 AC_DEFUN([gl_CACHE_VAL_SILENT],
381 [
382 saved_as_echo_n="$as_echo_n"
383 as_echo_n=':'
384 AC_CACHE_VAL([$1], [$2])
385 as_echo_n="$saved_as_echo_n"
386 ])
387
388 # AS_VAR_COPY was added in autoconf 2.63b
389 m4_define_default([AS_VAR_COPY],
390 [AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
0 # DO NOT EDIT! GENERATED AUTOMATICALLY!
1 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
2 #
3 # This file is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This file is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this file. If not, see <https://www.gnu.org/licenses/>.
15 #
16 # As a special exception to the GNU General Public License,
17 # this file may be distributed as part of a program that
18 # contains a configuration script generated by Autoconf, under
19 # the same distribution terms as the rest of that program.
20 #
21 # Generated by gnulib-tool.
22 #
23 # This file represents the compiled summary of the specification in
24 # gnulib-cache.m4. It lists the computed macro invocations that need
25 # to be invoked from configure.ac.
26 # In projects that use version control, this file can be treated like
27 # other built files.
28
29
30 # This macro should be invoked from ./configure.ac, in the section
31 # "Checks for programs", right after AC_PROG_CC, and certainly before
32 # any checks for libraries, header files, types and library functions.
33 AC_DEFUN([gl_EARLY],
34 [
35 m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
36 m4_pattern_allow([^gl_ES$])dnl a valid locale name
37 m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
38 m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
39
40 # Pre-early section.
41 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
42 AC_REQUIRE([gl_PROG_AR_RANLIB])
43
44 # Code from module absolute-header:
45 # Code from module bootstrap:
46 # Code from module c99:
47 # Code from module configmake:
48 # Code from module extensions:
49 # Code from module extern-inline:
50 # Code from module extract-trace:
51 # Code from module flock:
52 # Code from module funclib.sh:
53 # Code from module getopt-posix:
54 # Code from module gettext-h:
55 # Code from module gnu-make:
56 # Code from module include_next:
57 # Code from module inline-source:
58 # Code from module malloc-posix:
59 # Code from module manywarnings:
60 # Code from module msvc-inval:
61 # Code from module msvc-nothrow:
62 # Code from module options-parser:
63 # Code from module rawmemchr:
64 # Code from module relocatable-lib-lgpl:
65 # Code from module snippet/_Noreturn:
66 # Code from module snippet/arg-nonnull:
67 # Code from module snippet/c++defs:
68 # Code from module snippet/unused-parameter:
69 # Code from module snippet/warn-on-use:
70 # Code from module ssize_t:
71 # Code from module std-gnu11:
72 # Code from module stddef:
73 # Code from module stdlib:
74 # Code from module strchrnul:
75 # Code from module strdup-posix:
76 # Code from module string:
77 # Code from module sys_file:
78 # Code from module sys_types:
79 # Code from module unistd:
80 # Code from module warnings:
81 ])
82
83 # This macro should be invoked from ./configure.ac, in the section
84 # "Check for header files, types and library functions".
85 AC_DEFUN([gl_INIT],
86 [
87 AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
88 gl_cond_libtool=true
89 gl_m4_base='m4'
90 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
91 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
92 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
93 m4_pushdef([gl_LIBSOURCES_LIST], [])
94 m4_pushdef([gl_LIBSOURCES_DIR], [])
95 gl_COMMON
96 gl_source_base='lib'
97 gl_CONFIGMAKE_PREP
98 AC_REQUIRE([gl_EXTERN_INLINE])
99 gl_FUNC_FLOCK
100 if test $HAVE_FLOCK = 0; then
101 AC_LIBOBJ([flock])
102 gl_PREREQ_FLOCK
103 fi
104 gl_HEADER_SYS_FILE_MODULE_INDICATOR([flock])
105 gl_FUNC_GETOPT_POSIX
106 if test $REPLACE_GETOPT = 1; then
107 AC_LIBOBJ([getopt])
108 AC_LIBOBJ([getopt1])
109 dnl Arrange for unistd.h to include getopt.h.
110 GNULIB_GL_UNISTD_H_GETOPT=1
111 fi
112 AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
113 AC_SUBST([LIBINTL])
114 AC_SUBST([LTLIBINTL])
115 gl_GNU_MAKE
116 gl_FUNC_MALLOC_POSIX
117 if test $REPLACE_MALLOC = 1; then
118 AC_LIBOBJ([malloc])
119 fi
120 gl_STDLIB_MODULE_INDICATOR([malloc-posix])
121 AC_REQUIRE([gl_MSVC_INVAL])
122 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
123 AC_LIBOBJ([msvc-inval])
124 fi
125 AC_REQUIRE([gl_MSVC_NOTHROW])
126 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
127 AC_LIBOBJ([msvc-nothrow])
128 fi
129 gl_MODULE_INDICATOR([msvc-nothrow])
130 gl_FUNC_RAWMEMCHR
131 if test $HAVE_RAWMEMCHR = 0; then
132 AC_LIBOBJ([rawmemchr])
133 gl_PREREQ_RAWMEMCHR
134 fi
135 gl_STRING_MODULE_INDICATOR([rawmemchr])
136 gl_RELOCATABLE_LIBRARY
137 if test $RELOCATABLE = yes; then
138 AC_LIBOBJ([relocatable])
139 fi
140 gt_TYPE_SSIZE_T
141 gl_STDDEF_H
142 gl_STDLIB_H
143 gl_FUNC_STRCHRNUL
144 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
145 AC_LIBOBJ([strchrnul])
146 gl_PREREQ_STRCHRNUL
147 fi
148 gl_STRING_MODULE_INDICATOR([strchrnul])
149 gl_FUNC_STRDUP_POSIX
150 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
151 AC_LIBOBJ([strdup])
152 gl_PREREQ_STRDUP
153 fi
154 gl_STRING_MODULE_INDICATOR([strdup])
155 gl_HEADER_STRING_H
156 gl_HEADER_SYS_FILE_H
157 AC_PROG_MKDIR_P
158 gl_SYS_TYPES_H
159 AC_PROG_MKDIR_P
160 gl_UNISTD_H
161 # End of code from modules
162 m4_ifval(gl_LIBSOURCES_LIST, [
163 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
164 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
165 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
166 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
167 exit 1
168 fi
169 done])dnl
170 m4_if(m4_sysval, [0], [],
171 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
172 ])
173 m4_popdef([gl_LIBSOURCES_DIR])
174 m4_popdef([gl_LIBSOURCES_LIST])
175 m4_popdef([AC_LIBSOURCES])
176 m4_popdef([AC_REPLACE_FUNCS])
177 m4_popdef([AC_LIBOBJ])
178 AC_CONFIG_COMMANDS_PRE([
179 gl_libobjs=
180 gl_ltlibobjs=
181 if test -n "$gl_LIBOBJS"; then
182 # Remove the extension.
183 sed_drop_objext='s/\.o$//;s/\.obj$//'
184 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
185 gl_libobjs="$gl_libobjs $i.$ac_objext"
186 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
187 done
188 fi
189 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
190 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
191 ])
192 gltests_libdeps=
193 gltests_ltlibdeps=
194 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
195 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
196 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
197 m4_pushdef([gltests_LIBSOURCES_LIST], [])
198 m4_pushdef([gltests_LIBSOURCES_DIR], [])
199 gl_COMMON
200 gl_source_base='tests'
201 changequote(,)dnl
202 gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
203 changequote([, ])dnl
204 AC_SUBST([gltests_WITNESS])
205 gl_module_indicator_condition=$gltests_WITNESS
206 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
207 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
208 m4_ifval(gltests_LIBSOURCES_LIST, [
209 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
210 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
211 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
212 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
213 exit 1
214 fi
215 done])dnl
216 m4_if(m4_sysval, [0], [],
217 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
218 ])
219 m4_popdef([gltests_LIBSOURCES_DIR])
220 m4_popdef([gltests_LIBSOURCES_LIST])
221 m4_popdef([AC_LIBSOURCES])
222 m4_popdef([AC_REPLACE_FUNCS])
223 m4_popdef([AC_LIBOBJ])
224 AC_CONFIG_COMMANDS_PRE([
225 gltests_libobjs=
226 gltests_ltlibobjs=
227 if test -n "$gltests_LIBOBJS"; then
228 # Remove the extension.
229 sed_drop_objext='s/\.o$//;s/\.obj$//'
230 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
231 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
232 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
233 done
234 fi
235 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
236 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
237 ])
238 ])
239
240 # Like AC_LIBOBJ, except that the module name goes
241 # into gl_LIBOBJS instead of into LIBOBJS.
242 AC_DEFUN([gl_LIBOBJ], [
243 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
244 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
245 ])
246
247 # Like AC_REPLACE_FUNCS, except that the module name goes
248 # into gl_LIBOBJS instead of into LIBOBJS.
249 AC_DEFUN([gl_REPLACE_FUNCS], [
250 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
251 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
252 ])
253
254 # Like AC_LIBSOURCES, except the directory where the source file is
255 # expected is derived from the gnulib-tool parameterization,
256 # and alloca is special cased (for the alloca-opt module).
257 # We could also entirely rely on EXTRA_lib..._SOURCES.
258 AC_DEFUN([gl_LIBSOURCES], [
259 m4_foreach([_gl_NAME], [$1], [
260 m4_if(_gl_NAME, [alloca.c], [], [
261 m4_define([gl_LIBSOURCES_DIR], [lib])
262 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
263 ])
264 ])
265 ])
266
267 # Like AC_LIBOBJ, except that the module name goes
268 # into gltests_LIBOBJS instead of into LIBOBJS.
269 AC_DEFUN([gltests_LIBOBJ], [
270 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
271 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
272 ])
273
274 # Like AC_REPLACE_FUNCS, except that the module name goes
275 # into gltests_LIBOBJS instead of into LIBOBJS.
276 AC_DEFUN([gltests_REPLACE_FUNCS], [
277 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
278 AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
279 ])
280
281 # Like AC_LIBSOURCES, except the directory where the source file is
282 # expected is derived from the gnulib-tool parameterization,
283 # and alloca is special cased (for the alloca-opt module).
284 # We could also entirely rely on EXTRA_lib..._SOURCES.
285 AC_DEFUN([gltests_LIBSOURCES], [
286 m4_foreach([_gl_NAME], [$1], [
287 m4_if(_gl_NAME, [alloca.c], [], [
288 m4_define([gltests_LIBSOURCES_DIR], [tests])
289 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
290 ])
291 ])
292 ])
293
294 # This macro records the list of files which have been installed by
295 # gnulib-tool and may be removed by future gnulib-tool invocations.
296 AC_DEFUN([gl_FILE_LIST], [
297 build-aux/bootstrap.in
298 build-aux/extract-trace
299 build-aux/funclib.sh
300 build-aux/inline-source
301 build-aux/options-parser
302 doc/relocatable.texi
303 lib/_Noreturn.h
304 lib/arg-nonnull.h
305 lib/c++defs.h
306 lib/flock.c
307 lib/getopt-cdefs.in.h
308 lib/getopt-core.h
309 lib/getopt-ext.h
310 lib/getopt-pfx-core.h
311 lib/getopt-pfx-ext.h
312 lib/getopt.c
313 lib/getopt.in.h
314 lib/getopt1.c
315 lib/getopt_int.h
316 lib/gettext.h
317 lib/malloc.c
318 lib/msvc-inval.c
319 lib/msvc-inval.h
320 lib/msvc-nothrow.c
321 lib/msvc-nothrow.h
322 lib/rawmemchr.c
323 lib/rawmemchr.valgrind
324 lib/relocatable.c
325 lib/relocatable.h
326 lib/relocatable.valgrind
327 lib/stddef.in.h
328 lib/stdlib.in.h
329 lib/strchrnul.c
330 lib/strchrnul.valgrind
331 lib/strdup.c
332 lib/string.in.h
333 lib/sys_file.in.h
334 lib/sys_types.in.h
335 lib/unistd.c
336 lib/unistd.in.h
337 lib/unused-parameter.h
338 lib/warn-on-use.h
339 m4/00gnulib.m4
340 m4/absolute-header.m4
341 m4/configmake.m4
342 m4/extensions.m4
343 m4/extern-inline.m4
344 m4/flock.m4
345 m4/getopt.m4
346 m4/gnu-make.m4
347 m4/gnulib-common.m4
348 m4/include_next.m4
349 m4/malloc.m4
350 m4/manywarnings-c++.m4
351 m4/manywarnings.m4
352 m4/msvc-inval.m4
353 m4/msvc-nothrow.m4
354 m4/off_t.m4
355 m4/rawmemchr.m4
356 m4/relocatable-lib.m4
357 m4/ssize_t.m4
358 m4/std-gnu11.m4
359 m4/stddef_h.m4
360 m4/stdlib_h.m4
361 m4/strchrnul.m4
362 m4/strdup.m4
363 m4/string_h.m4
364 m4/sys_file_h.m4
365 m4/sys_types_h.m4
366 m4/unistd_h.m4
367 m4/warn-on-use.m4
368 m4/warnings.m4
369 m4/wchar_t.m4
370 ])
0 # include_next.m4 serial 24
1 dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Paul Eggert and Derek Price.
7
8 dnl Sets INCLUDE_NEXT, INCLUDE_NEXT_AS_FIRST_DIRECTIVE, PRAGMA_SYSTEM_HEADER,
9 dnl and PRAGMA_COLUMNS.
10 dnl
11 dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
12 dnl 'include' otherwise.
13 dnl
14 dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler
15 dnl supports it in the special case that it is the first include directive in
16 dnl the given file, or to 'include' otherwise.
17 dnl
18 dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next,
19 dnl so as to avoid GCC warnings when the gcc option -pedantic is used.
20 dnl '#pragma GCC system_header' has the same effect as if the file was found
21 dnl through the include search path specified with '-isystem' options (as
22 dnl opposed to the search path specified with '-I' options). Namely, gcc
23 dnl does not warn about some things, and on some systems (Solaris and Interix)
24 dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
25 dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
26 dnl of plain '__STDC__'.
27 dnl
28 dnl PRAGMA_COLUMNS can be used in files that override system header files, so
29 dnl as to avoid compilation errors on HP NonStop systems when the gnulib file
30 dnl is included by a system header file that does a "#pragma COLUMNS 80" (which
31 dnl has the effect of truncating the lines of that file and all files that it
32 dnl includes to 80 columns) and the gnulib file has lines longer than 80
33 dnl columns.
34
35 AC_DEFUN([gl_INCLUDE_NEXT],
36 [
37 AC_LANG_PREPROC_REQUIRE()
38 AC_CACHE_CHECK([whether the preprocessor supports include_next],
39 [gl_cv_have_include_next],
40 [rm -rf conftestd1a conftestd1b conftestd2
41 mkdir conftestd1a conftestd1b conftestd2
42 dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on
43 dnl AIX 6.1 support include_next when used as first preprocessor directive
44 dnl in a file, but not when preceded by another include directive. Check
45 dnl for this bug by including <stdio.h>.
46 dnl Additionally, with this same compiler, include_next is a no-op when
47 dnl used in a header file that was included by specifying its absolute
48 dnl file name. Despite these two bugs, include_next is used in the
49 dnl compiler's <math.h>. By virtue of the second bug, we need to use
50 dnl include_next as well in this case.
51 cat <<EOF > conftestd1a/conftest.h
52 #define DEFINED_IN_CONFTESTD1
53 #include_next <conftest.h>
54 #ifdef DEFINED_IN_CONFTESTD2
55 int foo;
56 #else
57 #error "include_next doesn't work"
58 #endif
59 EOF
60 cat <<EOF > conftestd1b/conftest.h
61 #define DEFINED_IN_CONFTESTD1
62 #include <stdio.h>
63 #include_next <conftest.h>
64 #ifdef DEFINED_IN_CONFTESTD2
65 int foo;
66 #else
67 #error "include_next doesn't work"
68 #endif
69 EOF
70 cat <<EOF > conftestd2/conftest.h
71 #ifndef DEFINED_IN_CONFTESTD1
72 #error "include_next test doesn't work"
73 #endif
74 #define DEFINED_IN_CONFTESTD2
75 EOF
76 gl_save_CPPFLAGS="$CPPFLAGS"
77 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
78 dnl We intentionally avoid using AC_LANG_SOURCE here.
79 AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
80 [gl_cv_have_include_next=yes],
81 [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
82 AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
83 [gl_cv_have_include_next=buggy],
84 [gl_cv_have_include_next=no])
85 ])
86 CPPFLAGS="$gl_save_CPPFLAGS"
87 rm -rf conftestd1a conftestd1b conftestd2
88 ])
89 PRAGMA_SYSTEM_HEADER=
90 if test $gl_cv_have_include_next = yes; then
91 INCLUDE_NEXT=include_next
92 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
93 if test -n "$GCC"; then
94 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
95 fi
96 else
97 if test $gl_cv_have_include_next = buggy; then
98 INCLUDE_NEXT=include
99 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
100 else
101 INCLUDE_NEXT=include
102 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
103 fi
104 fi
105 AC_SUBST([INCLUDE_NEXT])
106 AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
107 AC_SUBST([PRAGMA_SYSTEM_HEADER])
108 AC_CACHE_CHECK([whether system header files limit the line length],
109 [gl_cv_pragma_columns],
110 [dnl HP NonStop systems, which define __TANDEM, have this misfeature.
111 AC_EGREP_CPP([choke me],
112 [
113 #ifdef __TANDEM
114 choke me
115 #endif
116 ],
117 [gl_cv_pragma_columns=yes],
118 [gl_cv_pragma_columns=no])
119 ])
120 if test $gl_cv_pragma_columns = yes; then
121 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
122 else
123 PRAGMA_COLUMNS=
124 fi
125 AC_SUBST([PRAGMA_COLUMNS])
126 ])
127
128 # gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
129 # ------------------------------------------
130 # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be
131 # '<foo.h>'; otherwise define it to be
132 # '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
133 # Also, if #include_next works as first preprocessing directive in a file,
134 # define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be '<foo.h>'; otherwise define it to
135 # be
136 # '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
137 # That way, a header file with the following line:
138 # #@INCLUDE_NEXT@ @NEXT_FOO_H@
139 # or
140 # #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@
141 # behaves (after sed substitution) as if it contained
142 # #include_next <foo.h>
143 # even if the compiler does not support include_next.
144 # The three "///" are to pacify Sun C 5.8, which otherwise would say
145 # "warning: #include of /usr/include/... may be non-portable".
146 # Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
147 # Note: This macro assumes that the header file is not empty after
148 # preprocessing, i.e. it does not only define preprocessor macros but also
149 # provides some type/enum definitions or function/variable declarations.
150 #
151 # This macro also checks whether each header exists, by invoking
152 # AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument.
153 AC_DEFUN([gl_CHECK_NEXT_HEADERS],
154 [
155 gl_NEXT_HEADERS_INTERNAL([$1], [check])
156 ])
157
158 # gl_NEXT_HEADERS(HEADER1 HEADER2 ...)
159 # ------------------------------------
160 # Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist.
161 # This is suitable for headers like <stddef.h> that are standardized by C89
162 # and therefore can be assumed to exist.
163 AC_DEFUN([gl_NEXT_HEADERS],
164 [
165 gl_NEXT_HEADERS_INTERNAL([$1], [assume])
166 ])
167
168 # The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS.
169 AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
170 [
171 AC_REQUIRE([gl_INCLUDE_NEXT])
172 AC_REQUIRE([AC_CANONICAL_HOST])
173
174 m4_if([$2], [check],
175 [AC_CHECK_HEADERS_ONCE([$1])
176 ])
177
178 dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
179 dnl until we can assume autoconf 2.64 or newer.
180 m4_foreach_w([gl_HEADER_NAME], [$1],
181 [AS_VAR_PUSHDEF([gl_next_header],
182 [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
183 if test $gl_cv_have_include_next = yes; then
184 AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
185 else
186 AC_CACHE_CHECK(
187 [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
188 m4_defn([gl_next_header]),
189 [m4_if([$2], [check],
190 [AS_VAR_PUSHDEF([gl_header_exists],
191 [ac_cv_header_]m4_defn([gl_HEADER_NAME]))
192 if test AS_VAR_GET(gl_header_exists) = yes; then
193 AS_VAR_POPDEF([gl_header_exists])
194 ])
195 gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
196 AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
197 AS_VAR_SET(gl_next_header, ['"'$gl_header'"'])
198 m4_if([$2], [check],
199 [else
200 AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
201 fi
202 ])
203 ])
204 fi
205 AC_SUBST(
206 AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
207 [AS_VAR_GET(gl_next_header)])
208 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
209 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
210 gl_next_as_first_directive='<'gl_HEADER_NAME'>'
211 else
212 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
213 gl_next_as_first_directive=AS_VAR_GET(gl_next_header)
214 fi
215 AC_SUBST(
216 AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
217 [$gl_next_as_first_directive])
218 AS_VAR_POPDEF([gl_next_header])])
219 ])
220
221 # Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE;
222 # this fallback is safe for all earlier autoconf versions.
223 m4_define_default([AC_LANG_DEFINES_PROVIDED])
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
3 # Written by Gordon Matzigkeit, 1996
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 m4_define([_LT_COPYING], [dnl
10 # Copyright (C) 2014 Free Software Foundation, Inc.
11 # This is free software; see the source for copying conditions. There is NO
12 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 # GNU Libtool is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of of the License, or
17 # (at your option) any later version.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program or library that is built
21 # using GNU Libtool, you may include this file under the same
22 # distribution terms that you use for the rest of that program.
23 #
24 # GNU Libtool is distributed in the hope that it will be useful, but
25 # WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 # GNU General Public License for more details.
28 #
29 # You should have received a copy of the GNU General Public License
30 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 ])
32
33 # serial 58 LT_INIT
34
35
36 # LT_PREREQ(VERSION)
37 # ------------------
38 # Complain and exit if this libtool version is less that VERSION.
39 m4_defun([LT_PREREQ],
40 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
41 [m4_default([$3],
42 [m4_fatal([Libtool version $1 or higher is required],
43 63)])],
44 [$2])])
45
46
47 # _LT_CHECK_BUILDDIR
48 # ------------------
49 # Complain if the absolute build directory name contains unusual characters
50 m4_defun([_LT_CHECK_BUILDDIR],
51 [case `pwd` in
52 *\ * | *\ *)
53 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
54 esac
55 ])
56
57
58 # LT_INIT([OPTIONS])
59 # ------------------
60 AC_DEFUN([LT_INIT],
61 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
62 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
63 AC_BEFORE([$0], [LT_LANG])dnl
64 AC_BEFORE([$0], [LT_OUTPUT])dnl
65 AC_BEFORE([$0], [LTDL_INIT])dnl
66 m4_require([_LT_CHECK_BUILDDIR])dnl
67
68 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
69 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
70 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
71 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
72 dnl unless we require an AC_DEFUNed macro:
73 AC_REQUIRE([LTOPTIONS_VERSION])dnl
74 AC_REQUIRE([LTSUGAR_VERSION])dnl
75 AC_REQUIRE([LTVERSION_VERSION])dnl
76 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
77 m4_require([_LT_PROG_LTMAIN])dnl
78
79 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
80
81 dnl Parse OPTIONS
82 _LT_SET_OPTIONS([$0], [$1])
83
84 # This can be used to rebuild libtool when needed
85 LIBTOOL_DEPS=$ltmain
86
87 # Always use our own libtool.
88 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
89 AC_SUBST(LIBTOOL)dnl
90
91 _LT_SETUP
92
93 # Only expand once:
94 m4_define([LT_INIT])
95 ])# LT_INIT
96
97 # Old names:
98 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
99 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
100 dnl aclocal-1.4 backwards compatibility:
101 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
102 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
103
104
105 # _LT_PREPARE_CC_BASENAME
106 # -----------------------
107 m4_defun([_LT_PREPARE_CC_BASENAME], [
108 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
109 func_cc_basename ()
110 {
111 for cc_temp in @S|@*""; do
112 case $cc_temp in
113 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
114 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
115 \-*) ;;
116 *) break;;
117 esac
118 done
119 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
120 }
121 ])# _LT_PREPARE_CC_BASENAME
122
123
124 # _LT_CC_BASENAME(CC)
125 # -------------------
126 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
127 # but that macro is also expanded into generated libtool script, which
128 # arranges for $SED and $ECHO to be set by different means.
129 m4_defun([_LT_CC_BASENAME],
130 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
131 AC_REQUIRE([_LT_DECL_SED])dnl
132 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
133 func_cc_basename $1
134 cc_basename=$func_cc_basename_result
135 ])
136
137
138 # _LT_FILEUTILS_DEFAULTS
139 # ----------------------
140 # It is okay to use these file commands and assume they have been set
141 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
142 m4_defun([_LT_FILEUTILS_DEFAULTS],
143 [: ${CP="cp -f"}
144 : ${MV="mv -f"}
145 : ${RM="rm -f"}
146 ])# _LT_FILEUTILS_DEFAULTS
147
148
149 # _LT_SETUP
150 # ---------
151 m4_defun([_LT_SETUP],
152 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
153 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
154 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
155 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
156
157 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
158 dnl
159 _LT_DECL([], [host_alias], [0], [The host system])dnl
160 _LT_DECL([], [host], [0])dnl
161 _LT_DECL([], [host_os], [0])dnl
162 dnl
163 _LT_DECL([], [build_alias], [0], [The build system])dnl
164 _LT_DECL([], [build], [0])dnl
165 _LT_DECL([], [build_os], [0])dnl
166 dnl
167 AC_REQUIRE([AC_PROG_CC])dnl
168 AC_REQUIRE([LT_PATH_LD])dnl
169 AC_REQUIRE([LT_PATH_NM])dnl
170 dnl
171 AC_REQUIRE([AC_PROG_LN_S])dnl
172 test -z "$LN_S" && LN_S="ln -s"
173 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
174 dnl
175 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
176 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
177 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
178 dnl
179 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
180 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
181 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
182 m4_require([_LT_CMD_RELOAD])dnl
183 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
184 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
185 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
186 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
187 m4_require([_LT_WITH_SYSROOT])dnl
188 m4_require([_LT_CMD_TRUNCATE])dnl
189
190 _LT_CONFIG_LIBTOOL_INIT([
191 # See if we are running on zsh, and set the options that allow our
192 # commands through without removal of \ escapes INIT.
193 if test -n "\${ZSH_VERSION+set}"; then
194 setopt NO_GLOB_SUBST
195 fi
196 ])
197 if test -n "${ZSH_VERSION+set}"; then
198 setopt NO_GLOB_SUBST
199 fi
200
201 _LT_CHECK_OBJDIR
202
203 m4_require([_LT_TAG_COMPILER])dnl
204
205 case $host_os in
206 aix3*)
207 # AIX sometimes has problems with the GCC collect2 program. For some
208 # reason, if we set the COLLECT_NAMES environment variable, the problems
209 # vanish in a puff of smoke.
210 if test set != "${COLLECT_NAMES+set}"; then
211 COLLECT_NAMES=
212 export COLLECT_NAMES
213 fi
214 ;;
215 esac
216
217 # Global variables:
218 ofile=libtool
219 can_build_shared=yes
220
221 # All known linkers require a '.a' archive for static linking (except MSVC,
222 # which needs '.lib').
223 libext=a
224
225 with_gnu_ld=$lt_cv_prog_gnu_ld
226
227 old_CC=$CC
228 old_CFLAGS=$CFLAGS
229
230 # Set sane defaults for various variables
231 test -z "$CC" && CC=cc
232 test -z "$LTCC" && LTCC=$CC
233 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
234 test -z "$LD" && LD=ld
235 test -z "$ac_objext" && ac_objext=o
236
237 _LT_CC_BASENAME([$compiler])
238
239 # Only perform the check for file, if the check method requires it
240 test -z "$MAGIC_CMD" && MAGIC_CMD=file
241 case $deplibs_check_method in
242 file_magic*)
243 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
244 _LT_PATH_MAGIC
245 fi
246 ;;
247 esac
248
249 # Use C for the default configuration in the libtool script
250 LT_SUPPORTED_TAG([CC])
251 _LT_LANG_C_CONFIG
252 _LT_LANG_DEFAULT_CONFIG
253 _LT_CONFIG_COMMANDS
254 ])# _LT_SETUP
255
256
257 # _LT_PREPARE_SED_QUOTE_VARS
258 # --------------------------
259 # Define a few sed substitution that help us do robust quoting.
260 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
261 [# Backslashify metacharacters that are still active within
262 # double-quoted strings.
263 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
264
265 # Same as above, but do not quote variable references.
266 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
267
268 # Sed substitution to delay expansion of an escaped shell variable in a
269 # double_quote_subst'ed string.
270 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
271
272 # Sed substitution to delay expansion of an escaped single quote.
273 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
274
275 # Sed substitution to avoid accidental globbing in evaled expressions
276 no_glob_subst='s/\*/\\\*/g'
277 ])
278
279 # _LT_PROG_LTMAIN
280 # ---------------
281 # Note that this code is called both from 'configure', and 'config.status'
282 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
283 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
284 # so we pass a copy along to make sure it has a sensible value anyway.
285 m4_defun([_LT_PROG_LTMAIN],
286 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
287 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
288 ltmain=$ac_aux_dir/ltmain.sh
289 ])# _LT_PROG_LTMAIN
290
291
292 ## ------------------------------------- ##
293 ## Accumulate code for creating libtool. ##
294 ## ------------------------------------- ##
295
296 # So that we can recreate a full libtool script including additional
297 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
298 # in macros and then make a single call at the end using the 'libtool'
299 # label.
300
301
302 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
303 # ----------------------------------------
304 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
305 m4_define([_LT_CONFIG_LIBTOOL_INIT],
306 [m4_ifval([$1],
307 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
308 [$1
309 ])])])
310
311 # Initialize.
312 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
313
314
315 # _LT_CONFIG_LIBTOOL([COMMANDS])
316 # ------------------------------
317 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
318 m4_define([_LT_CONFIG_LIBTOOL],
319 [m4_ifval([$1],
320 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
321 [$1
322 ])])])
323
324 # Initialize.
325 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
326
327
328 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
329 # -----------------------------------------------------
330 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
331 [_LT_CONFIG_LIBTOOL([$1])
332 _LT_CONFIG_LIBTOOL_INIT([$2])
333 ])
334
335
336 # _LT_FORMAT_COMMENT([COMMENT])
337 # -----------------------------
338 # Add leading comment marks to the start of each line, and a trailing
339 # full-stop to the whole comment if one is not present already.
340 m4_define([_LT_FORMAT_COMMENT],
341 [m4_ifval([$1], [
342 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
343 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
344 )])
345
346
347
348 ## ------------------------ ##
349 ## FIXME: Eliminate VARNAME ##
350 ## ------------------------ ##
351
352
353 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
354 # -------------------------------------------------------------------
355 # CONFIGNAME is the name given to the value in the libtool script.
356 # VARNAME is the (base) name used in the configure script.
357 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
358 # VARNAME. Any other value will be used directly.
359 m4_define([_LT_DECL],
360 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
361 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
362 [m4_ifval([$1], [$1], [$2])])
363 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
364 m4_ifval([$4],
365 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
366 lt_dict_add_subkey([lt_decl_dict], [$2],
367 [tagged?], [m4_ifval([$5], [yes], [no])])])
368 ])
369
370
371 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
372 # --------------------------------------------------------
373 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
374
375
376 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
377 # ------------------------------------------------
378 m4_define([lt_decl_tag_varnames],
379 [_lt_decl_filter([tagged?], [yes], $@)])
380
381
382 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
383 # ---------------------------------------------------------
384 m4_define([_lt_decl_filter],
385 [m4_case([$#],
386 [0], [m4_fatal([$0: too few arguments: $#])],
387 [1], [m4_fatal([$0: too few arguments: $#: $1])],
388 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
389 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
390 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
391 ])
392
393
394 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
395 # --------------------------------------------------
396 m4_define([lt_decl_quote_varnames],
397 [_lt_decl_filter([value], [1], $@)])
398
399
400 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
401 # ---------------------------------------------------
402 m4_define([lt_decl_dquote_varnames],
403 [_lt_decl_filter([value], [2], $@)])
404
405
406 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
407 # ---------------------------------------------------
408 m4_define([lt_decl_varnames_tagged],
409 [m4_assert([$# <= 2])dnl
410 _$0(m4_quote(m4_default([$1], [[, ]])),
411 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
412 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
413 m4_define([_lt_decl_varnames_tagged],
414 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
415
416
417 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
418 # ------------------------------------------------
419 m4_define([lt_decl_all_varnames],
420 [_$0(m4_quote(m4_default([$1], [[, ]])),
421 m4_if([$2], [],
422 m4_quote(lt_decl_varnames),
423 m4_quote(m4_shift($@))))[]dnl
424 ])
425 m4_define([_lt_decl_all_varnames],
426 [lt_join($@, lt_decl_varnames_tagged([$1],
427 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
428 ])
429
430
431 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
432 # ------------------------------------
433 # Quote a variable value, and forward it to 'config.status' so that its
434 # declaration there will have the same value as in 'configure'. VARNAME
435 # must have a single quote delimited value for this to work.
436 m4_define([_LT_CONFIG_STATUS_DECLARE],
437 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
438
439
440 # _LT_CONFIG_STATUS_DECLARATIONS
441 # ------------------------------
442 # We delimit libtool config variables with single quotes, so when
443 # we write them to config.status, we have to be sure to quote all
444 # embedded single quotes properly. In configure, this macro expands
445 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
446 #
447 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
448 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
449 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
450 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
451
452
453 # _LT_LIBTOOL_TAGS
454 # ----------------
455 # Output comment and list of tags supported by the script
456 m4_defun([_LT_LIBTOOL_TAGS],
457 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
458 available_tags='_LT_TAGS'dnl
459 ])
460
461
462 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
463 # -----------------------------------
464 # Extract the dictionary values for VARNAME (optionally with TAG) and
465 # expand to a commented shell variable setting:
466 #
467 # # Some comment about what VAR is for.
468 # visible_name=$lt_internal_name
469 m4_define([_LT_LIBTOOL_DECLARE],
470 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
471 [description])))[]dnl
472 m4_pushdef([_libtool_name],
473 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
474 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
475 [0], [_libtool_name=[$]$1],
476 [1], [_libtool_name=$lt_[]$1],
477 [2], [_libtool_name=$lt_[]$1],
478 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
479 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
480 ])
481
482
483 # _LT_LIBTOOL_CONFIG_VARS
484 # -----------------------
485 # Produce commented declarations of non-tagged libtool config variables
486 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
487 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
488 # section) are produced by _LT_LIBTOOL_TAG_VARS.
489 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
490 [m4_foreach([_lt_var],
491 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
492 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
493
494
495 # _LT_LIBTOOL_TAG_VARS(TAG)
496 # -------------------------
497 m4_define([_LT_LIBTOOL_TAG_VARS],
498 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
499 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
500
501
502 # _LT_TAGVAR(VARNAME, [TAGNAME])
503 # ------------------------------
504 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
505
506
507 # _LT_CONFIG_COMMANDS
508 # -------------------
509 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
510 # variables for single and double quote escaping we saved from calls
511 # to _LT_DECL, we can put quote escaped variables declarations
512 # into 'config.status', and then the shell code to quote escape them in
513 # for loops in 'config.status'. Finally, any additional code accumulated
514 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
515 m4_defun([_LT_CONFIG_COMMANDS],
516 [AC_PROVIDE_IFELSE([LT_OUTPUT],
517 dnl If the libtool generation code has been placed in $CONFIG_LT,
518 dnl instead of duplicating it all over again into config.status,
519 dnl then we will have config.status run $CONFIG_LT later, so it
520 dnl needs to know what name is stored there:
521 [AC_CONFIG_COMMANDS([libtool],
522 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
523 dnl If the libtool generation code is destined for config.status,
524 dnl expand the accumulated commands and init code now:
525 [AC_CONFIG_COMMANDS([libtool],
526 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
527 ])#_LT_CONFIG_COMMANDS
528
529
530 # Initialize.
531 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
532 [
533
534 # The HP-UX ksh and POSIX shell print the target directory to stdout
535 # if CDPATH is set.
536 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
537
538 sed_quote_subst='$sed_quote_subst'
539 double_quote_subst='$double_quote_subst'
540 delay_variable_subst='$delay_variable_subst'
541 _LT_CONFIG_STATUS_DECLARATIONS
542 LTCC='$LTCC'
543 LTCFLAGS='$LTCFLAGS'
544 compiler='$compiler_DEFAULT'
545
546 # A function that is used when there is no print builtin or printf.
547 func_fallback_echo ()
548 {
549 eval 'cat <<_LTECHO_EOF
550 \$[]1
551 _LTECHO_EOF'
552 }
553
554 # Quote evaled strings.
555 for var in lt_decl_all_varnames([[ \
556 ]], lt_decl_quote_varnames); do
557 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
558 *[[\\\\\\\`\\"\\\$]]*)
559 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
560 ;;
561 *)
562 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
563 ;;
564 esac
565 done
566
567 # Double-quote double-evaled strings.
568 for var in lt_decl_all_varnames([[ \
569 ]], lt_decl_dquote_varnames); do
570 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
571 *[[\\\\\\\`\\"\\\$]]*)
572 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
573 ;;
574 *)
575 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
576 ;;
577 esac
578 done
579
580 _LT_OUTPUT_LIBTOOL_INIT
581 ])
582
583 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
584 # ------------------------------------
585 # Generate a child script FILE with all initialization necessary to
586 # reuse the environment learned by the parent script, and make the
587 # file executable. If COMMENT is supplied, it is inserted after the
588 # '#!' sequence but before initialization text begins. After this
589 # macro, additional text can be appended to FILE to form the body of
590 # the child script. The macro ends with non-zero status if the
591 # file could not be fully written (such as if the disk is full).
592 m4_ifdef([AS_INIT_GENERATED],
593 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
594 [m4_defun([_LT_GENERATED_FILE_INIT],
595 [m4_require([AS_PREPARE])]dnl
596 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
597 [lt_write_fail=0
598 cat >$1 <<_ASEOF || lt_write_fail=1
599 #! $SHELL
600 # Generated by $as_me.
601 $2
602 SHELL=\${CONFIG_SHELL-$SHELL}
603 export SHELL
604 _ASEOF
605 cat >>$1 <<\_ASEOF || lt_write_fail=1
606 AS_SHELL_SANITIZE
607 _AS_PREPARE
608 exec AS_MESSAGE_FD>&1
609 _ASEOF
610 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
611 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
612
613 # LT_OUTPUT
614 # ---------
615 # This macro allows early generation of the libtool script (before
616 # AC_OUTPUT is called), incase it is used in configure for compilation
617 # tests.
618 AC_DEFUN([LT_OUTPUT],
619 [: ${CONFIG_LT=./config.lt}
620 AC_MSG_NOTICE([creating $CONFIG_LT])
621 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
622 [# Run this file to recreate a libtool stub with the current configuration.])
623
624 cat >>"$CONFIG_LT" <<\_LTEOF
625 lt_cl_silent=false
626 exec AS_MESSAGE_LOG_FD>>config.log
627 {
628 echo
629 AS_BOX([Running $as_me.])
630 } >&AS_MESSAGE_LOG_FD
631
632 lt_cl_help="\
633 '$as_me' creates a local libtool stub from the current configuration,
634 for use in further configure time tests before the real libtool is
635 generated.
636
637 Usage: $[0] [[OPTIONS]]
638
639 -h, --help print this help, then exit
640 -V, --version print version number, then exit
641 -q, --quiet do not print progress messages
642 -d, --debug don't remove temporary files
643
644 Report bugs to <bug-libtool@gnu.org>."
645
646 lt_cl_version="\
647 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
648 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
649 configured by $[0], generated by m4_PACKAGE_STRING.
650
651 Copyright (C) 2011 Free Software Foundation, Inc.
652 This config.lt script is free software; the Free Software Foundation
653 gives unlimited permision to copy, distribute and modify it."
654
655 while test 0 != $[#]
656 do
657 case $[1] in
658 --version | --v* | -V )
659 echo "$lt_cl_version"; exit 0 ;;
660 --help | --h* | -h )
661 echo "$lt_cl_help"; exit 0 ;;
662 --debug | --d* | -d )
663 debug=: ;;
664 --quiet | --q* | --silent | --s* | -q )
665 lt_cl_silent=: ;;
666
667 -*) AC_MSG_ERROR([unrecognized option: $[1]
668 Try '$[0] --help' for more information.]) ;;
669
670 *) AC_MSG_ERROR([unrecognized argument: $[1]
671 Try '$[0] --help' for more information.]) ;;
672 esac
673 shift
674 done
675
676 if $lt_cl_silent; then
677 exec AS_MESSAGE_FD>/dev/null
678 fi
679 _LTEOF
680
681 cat >>"$CONFIG_LT" <<_LTEOF
682 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
683 _LTEOF
684
685 cat >>"$CONFIG_LT" <<\_LTEOF
686 AC_MSG_NOTICE([creating $ofile])
687 _LT_OUTPUT_LIBTOOL_COMMANDS
688 AS_EXIT(0)
689 _LTEOF
690 chmod +x "$CONFIG_LT"
691
692 # configure is writing to config.log, but config.lt does its own redirection,
693 # appending to config.log, which fails on DOS, as config.log is still kept
694 # open by configure. Here we exec the FD to /dev/null, effectively closing
695 # config.log, so it can be properly (re)opened and appended to by config.lt.
696 lt_cl_success=:
697 test yes = "$silent" &&
698 lt_config_lt_args="$lt_config_lt_args --quiet"
699 exec AS_MESSAGE_LOG_FD>/dev/null
700 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
701 exec AS_MESSAGE_LOG_FD>>config.log
702 $lt_cl_success || AS_EXIT(1)
703 ])# LT_OUTPUT
704
705
706 # _LT_CONFIG(TAG)
707 # ---------------
708 # If TAG is the built-in tag, create an initial libtool script with a
709 # default configuration from the untagged config vars. Otherwise add code
710 # to config.status for appending the configuration named by TAG from the
711 # matching tagged config vars.
712 m4_defun([_LT_CONFIG],
713 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
714 _LT_CONFIG_SAVE_COMMANDS([
715 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
716 m4_if(_LT_TAG, [C], [
717 # See if we are running on zsh, and set the options that allow our
718 # commands through without removal of \ escapes.
719 if test -n "${ZSH_VERSION+set}"; then
720 setopt NO_GLOB_SUBST
721 fi
722
723 cfgfile=${ofile}T
724 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
725 $RM "$cfgfile"
726
727 cat <<_LT_EOF >> "$cfgfile"
728 #! $SHELL
729 # Generated automatically by $as_me ($PACKAGE) $VERSION
730 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
732
733 # Provide generalized library-building support services.
734 # Written by Gordon Matzigkeit, 1996
735
736 _LT_COPYING
737 _LT_LIBTOOL_TAGS
738
739 # Configured defaults for sys_lib_dlsearch_path munging.
740 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
741
742 # ### BEGIN LIBTOOL CONFIG
743 _LT_LIBTOOL_CONFIG_VARS
744 _LT_LIBTOOL_TAG_VARS
745 # ### END LIBTOOL CONFIG
746
747 _LT_EOF
748
749 cat <<'_LT_EOF' >> "$cfgfile"
750
751 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
752
753 _LT_PREPARE_MUNGE_PATH_LIST
754 _LT_PREPARE_CC_BASENAME
755
756 # ### END FUNCTIONS SHARED WITH CONFIGURE
757
758 _LT_EOF
759
760 case $host_os in
761 aix3*)
762 cat <<\_LT_EOF >> "$cfgfile"
763 # AIX sometimes has problems with the GCC collect2 program. For some
764 # reason, if we set the COLLECT_NAMES environment variable, the problems
765 # vanish in a puff of smoke.
766 if test set != "${COLLECT_NAMES+set}"; then
767 COLLECT_NAMES=
768 export COLLECT_NAMES
769 fi
770 _LT_EOF
771 ;;
772 esac
773
774 _LT_PROG_LTMAIN
775
776 # We use sed instead of cat because bash on DJGPP gets confused if
777 # if finds mixed CR/LF and LF-only lines. Since sed operates in
778 # text mode, it properly converts lines to CR/LF. This bash problem
779 # is reportedly fixed, but why not run on old versions too?
780 sed '$q' "$ltmain" >> "$cfgfile" \
781 || (rm -f "$cfgfile"; exit 1)
782
783 mv -f "$cfgfile" "$ofile" ||
784 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
785 chmod +x "$ofile"
786 ],
787 [cat <<_LT_EOF >> "$ofile"
788
789 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
790 dnl in a comment (ie after a #).
791 # ### BEGIN LIBTOOL TAG CONFIG: $1
792 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
793 # ### END LIBTOOL TAG CONFIG: $1
794 _LT_EOF
795 ])dnl /m4_if
796 ],
797 [m4_if([$1], [], [
798 PACKAGE='$PACKAGE'
799 VERSION='$VERSION'
800 RM='$RM'
801 ofile='$ofile'], [])
802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
803 ])# _LT_CONFIG
804
805
806 # LT_SUPPORTED_TAG(TAG)
807 # ---------------------
808 # Trace this macro to discover what tags are supported by the libtool
809 # --tag option, using:
810 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
811 AC_DEFUN([LT_SUPPORTED_TAG], [])
812
813
814 # C support is built-in for now
815 m4_define([_LT_LANG_C_enabled], [])
816 m4_define([_LT_TAGS], [])
817
818
819 # LT_LANG(LANG)
820 # -------------
821 # Enable libtool support for the given language if not already enabled.
822 AC_DEFUN([LT_LANG],
823 [AC_BEFORE([$0], [LT_OUTPUT])dnl
824 m4_case([$1],
825 [C], [_LT_LANG(C)],
826 [C++], [_LT_LANG(CXX)],
827 [Go], [_LT_LANG(GO)],
828 [Java], [_LT_LANG(GCJ)],
829 [Fortran 77], [_LT_LANG(F77)],
830 [Fortran], [_LT_LANG(FC)],
831 [Windows Resource], [_LT_LANG(RC)],
832 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
833 [_LT_LANG($1)],
834 [m4_fatal([$0: unsupported language: "$1"])])])dnl
835 ])# LT_LANG
836
837
838 # _LT_LANG(LANGNAME)
839 # ------------------
840 m4_defun([_LT_LANG],
841 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
842 [LT_SUPPORTED_TAG([$1])dnl
843 m4_append([_LT_TAGS], [$1 ])dnl
844 m4_define([_LT_LANG_]$1[_enabled], [])dnl
845 _LT_LANG_$1_CONFIG($1)])dnl
846 ])# _LT_LANG
847
848
849 m4_ifndef([AC_PROG_GO], [
850 ############################################################
851 # NOTE: This macro has been submitted for inclusion into #
852 # GNU Autoconf as AC_PROG_GO. When it is available in #
853 # a released version of Autoconf we should remove this #
854 # macro and use it instead. #
855 ############################################################
856 m4_defun([AC_PROG_GO],
857 [AC_LANG_PUSH(Go)dnl
858 AC_ARG_VAR([GOC], [Go compiler command])dnl
859 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
860 _AC_ARG_VAR_LDFLAGS()dnl
861 AC_CHECK_TOOL(GOC, gccgo)
862 if test -z "$GOC"; then
863 if test -n "$ac_tool_prefix"; then
864 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
865 fi
866 fi
867 if test -z "$GOC"; then
868 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
869 fi
870 ])#m4_defun
871 ])#m4_ifndef
872
873
874 # _LT_LANG_DEFAULT_CONFIG
875 # -----------------------
876 m4_defun([_LT_LANG_DEFAULT_CONFIG],
877 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
878 [LT_LANG(CXX)],
879 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
880
881 AC_PROVIDE_IFELSE([AC_PROG_F77],
882 [LT_LANG(F77)],
883 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
884
885 AC_PROVIDE_IFELSE([AC_PROG_FC],
886 [LT_LANG(FC)],
887 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
888
889 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
890 dnl pulling things in needlessly.
891 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
892 [LT_LANG(GCJ)],
893 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
894 [LT_LANG(GCJ)],
895 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
896 [LT_LANG(GCJ)],
897 [m4_ifdef([AC_PROG_GCJ],
898 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
899 m4_ifdef([A][M_PROG_GCJ],
900 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
901 m4_ifdef([LT_PROG_GCJ],
902 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
903
904 AC_PROVIDE_IFELSE([AC_PROG_GO],
905 [LT_LANG(GO)],
906 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
907
908 AC_PROVIDE_IFELSE([LT_PROG_RC],
909 [LT_LANG(RC)],
910 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
911 ])# _LT_LANG_DEFAULT_CONFIG
912
913 # Obsolete macros:
914 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
915 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
916 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
917 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
918 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
919 dnl aclocal-1.4 backwards compatibility:
920 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
921 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
922 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
923 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
924 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
925
926
927 # _LT_TAG_COMPILER
928 # ----------------
929 m4_defun([_LT_TAG_COMPILER],
930 [AC_REQUIRE([AC_PROG_CC])dnl
931
932 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
933 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
934 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
935 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
936
937 # If no C compiler was specified, use CC.
938 LTCC=${LTCC-"$CC"}
939
940 # If no C compiler flags were specified, use CFLAGS.
941 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
942
943 # Allow CC to be a program name with arguments.
944 compiler=$CC
945 ])# _LT_TAG_COMPILER
946
947
948 # _LT_COMPILER_BOILERPLATE
949 # ------------------------
950 # Check for compiler boilerplate output or warnings with
951 # the simple compiler test code.
952 m4_defun([_LT_COMPILER_BOILERPLATE],
953 [m4_require([_LT_DECL_SED])dnl
954 ac_outfile=conftest.$ac_objext
955 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
956 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
957 _lt_compiler_boilerplate=`cat conftest.err`
958 $RM conftest*
959 ])# _LT_COMPILER_BOILERPLATE
960
961
962 # _LT_LINKER_BOILERPLATE
963 # ----------------------
964 # Check for linker boilerplate output or warnings with
965 # the simple link test code.
966 m4_defun([_LT_LINKER_BOILERPLATE],
967 [m4_require([_LT_DECL_SED])dnl
968 ac_outfile=conftest.$ac_objext
969 echo "$lt_simple_link_test_code" >conftest.$ac_ext
970 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
971 _lt_linker_boilerplate=`cat conftest.err`
972 $RM -r conftest*
973 ])# _LT_LINKER_BOILERPLATE
974
975 # _LT_REQUIRED_DARWIN_CHECKS
976 # -------------------------
977 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
978 case $host_os in
979 rhapsody* | darwin*)
980 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
981 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
982 AC_CHECK_TOOL([LIPO], [lipo], [:])
983 AC_CHECK_TOOL([OTOOL], [otool], [:])
984 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
985 _LT_DECL([], [DSYMUTIL], [1],
986 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
987 _LT_DECL([], [NMEDIT], [1],
988 [Tool to change global to local symbols on Mac OS X])
989 _LT_DECL([], [LIPO], [1],
990 [Tool to manipulate fat objects and archives on Mac OS X])
991 _LT_DECL([], [OTOOL], [1],
992 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
993 _LT_DECL([], [OTOOL64], [1],
994 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
995
996 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
997 [lt_cv_apple_cc_single_mod=no
998 if test -z "$LT_MULTI_MODULE"; then
999 # By default we will add the -single_module flag. You can override
1000 # by either setting the environment variable LT_MULTI_MODULE
1001 # non-empty at configure time, or by adding -multi_module to the
1002 # link flags.
1003 rm -rf libconftest.dylib*
1004 echo "int foo(void){return 1;}" > conftest.c
1005 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1006 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1007 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1008 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1009 _lt_result=$?
1010 # If there is a non-empty error log, and "single_module"
1011 # appears in it, assume the flag caused a linker warning
1012 if test -s conftest.err && $GREP single_module conftest.err; then
1013 cat conftest.err >&AS_MESSAGE_LOG_FD
1014 # Otherwise, if the output was created with a 0 exit code from
1015 # the compiler, it worked.
1016 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1017 lt_cv_apple_cc_single_mod=yes
1018 else
1019 cat conftest.err >&AS_MESSAGE_LOG_FD
1020 fi
1021 rm -rf libconftest.dylib*
1022 rm -f conftest.*
1023 fi])
1024
1025 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1026 [lt_cv_ld_exported_symbols_list],
1027 [lt_cv_ld_exported_symbols_list=no
1028 save_LDFLAGS=$LDFLAGS
1029 echo "_main" > conftest.sym
1030 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1031 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1032 [lt_cv_ld_exported_symbols_list=yes],
1033 [lt_cv_ld_exported_symbols_list=no])
1034 LDFLAGS=$save_LDFLAGS
1035 ])
1036
1037 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1038 [lt_cv_ld_force_load=no
1039 cat > conftest.c << _LT_EOF
1040 int forced_loaded() { return 2;}
1041 _LT_EOF
1042 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1043 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1044 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1045 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1046 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1047 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1048 cat > conftest.c << _LT_EOF
1049 int main() { return 0;}
1050 _LT_EOF
1051 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1052 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1053 _lt_result=$?
1054 if test -s conftest.err && $GREP force_load conftest.err; then
1055 cat conftest.err >&AS_MESSAGE_LOG_FD
1056 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1057 lt_cv_ld_force_load=yes
1058 else
1059 cat conftest.err >&AS_MESSAGE_LOG_FD
1060 fi
1061 rm -f conftest.err libconftest.a conftest conftest.c
1062 rm -rf conftest.dSYM
1063 ])
1064 case $host_os in
1065 rhapsody* | darwin1.[[012]])
1066 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1067 darwin1.*)
1068 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1069 darwin*) # darwin 5.x on
1070 # if running on 10.5 or later, the deployment target defaults
1071 # to the OS version, if on x86, and 10.4, the deployment
1072 # target defaults to 10.4. Don't you love it?
1073 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1074 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1075 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1076 10.[[012]][[,.]]*)
1077 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1078 10.*)
1079 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1080 esac
1081 ;;
1082 esac
1083 if test yes = "$lt_cv_apple_cc_single_mod"; then
1084 _lt_dar_single_mod='$single_module'
1085 fi
1086 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1087 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1088 else
1089 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1090 fi
1091 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1092 _lt_dsymutil='~$DSYMUTIL $lib || :'
1093 else
1094 _lt_dsymutil=
1095 fi
1096 ;;
1097 esac
1098 ])
1099
1100
1101 # _LT_DARWIN_LINKER_FEATURES([TAG])
1102 # ---------------------------------
1103 # Checks for linker and compiler features on darwin
1104 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1105 [
1106 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1107 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1108 _LT_TAGVAR(hardcode_direct, $1)=no
1109 _LT_TAGVAR(hardcode_automatic, $1)=yes
1110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1111 if test yes = "$lt_cv_ld_force_load"; then
1112 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1113 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1114 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1115 else
1116 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1117 fi
1118 _LT_TAGVAR(link_all_deplibs, $1)=yes
1119 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1120 case $cc_basename in
1121 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1122 *) _lt_dar_can_shared=$GCC ;;
1123 esac
1124 if test yes = "$_lt_dar_can_shared"; then
1125 output_verbose_link_cmd=func_echo_all
1126 _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"
1127 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1128 _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"
1129 _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"
1130 m4_if([$1], [CXX],
1131 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1132 _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"
1133 _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"
1134 fi
1135 ],[])
1136 else
1137 _LT_TAGVAR(ld_shlibs, $1)=no
1138 fi
1139 ])
1140
1141 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1142 # ----------------------------------
1143 # Links a minimal program and checks the executable
1144 # for the system default hardcoded library path. In most cases,
1145 # this is /usr/lib:/lib, but when the MPI compilers are used
1146 # the location of the communication and MPI libs are included too.
1147 # If we don't find anything, use the default library path according
1148 # to the aix ld manual.
1149 # Store the results from the different compilers for each TAGNAME.
1150 # Allow to override them for all tags through lt_cv_aix_libpath.
1151 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1152 [m4_require([_LT_DECL_SED])dnl
1153 if test set = "${lt_cv_aix_libpath+set}"; then
1154 aix_libpath=$lt_cv_aix_libpath
1155 else
1156 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1157 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1158 lt_aix_libpath_sed='[
1159 /Import File Strings/,/^$/ {
1160 /^0/ {
1161 s/^0 *\([^ ]*\) *$/\1/
1162 p
1163 }
1164 }]'
1165 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1166 # Check for a 64-bit object if we didn't find anything.
1167 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1168 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1169 fi],[])
1170 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1171 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1172 fi
1173 ])
1174 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1175 fi
1176 ])# _LT_SYS_MODULE_PATH_AIX
1177
1178
1179 # _LT_SHELL_INIT(ARG)
1180 # -------------------
1181 m4_define([_LT_SHELL_INIT],
1182 [m4_divert_text([M4SH-INIT], [$1
1183 ])])# _LT_SHELL_INIT
1184
1185
1186
1187 # _LT_PROG_ECHO_BACKSLASH
1188 # -----------------------
1189 # Find how we can fake an echo command that does not interpret backslash.
1190 # In particular, with Autoconf 2.60 or later we add some code to the start
1191 # of the generated configure script that will find a shell with a builtin
1192 # printf (that we can use as an echo command).
1193 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1194 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1197
1198 AC_MSG_CHECKING([how to print strings])
1199 # Test print first, because it will be a builtin if present.
1200 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1201 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1202 ECHO='print -r --'
1203 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1204 ECHO='printf %s\n'
1205 else
1206 # Use this function as a fallback that always works.
1207 func_fallback_echo ()
1208 {
1209 eval 'cat <<_LTECHO_EOF
1210 $[]1
1211 _LTECHO_EOF'
1212 }
1213 ECHO='func_fallback_echo'
1214 fi
1215
1216 # func_echo_all arg...
1217 # Invoke $ECHO with all args, space-separated.
1218 func_echo_all ()
1219 {
1220 $ECHO "$*"
1221 }
1222
1223 case $ECHO in
1224 printf*) AC_MSG_RESULT([printf]) ;;
1225 print*) AC_MSG_RESULT([print -r]) ;;
1226 *) AC_MSG_RESULT([cat]) ;;
1227 esac
1228
1229 m4_ifdef([_AS_DETECT_SUGGESTED],
1230 [_AS_DETECT_SUGGESTED([
1231 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1232 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1233 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1235 PATH=/empty FPATH=/empty; export PATH FPATH
1236 test "X`printf %s $ECHO`" = "X$ECHO" \
1237 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1238
1239 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1240 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1241 ])# _LT_PROG_ECHO_BACKSLASH
1242
1243
1244 # _LT_WITH_SYSROOT
1245 # ----------------
1246 AC_DEFUN([_LT_WITH_SYSROOT],
1247 [AC_MSG_CHECKING([for sysroot])
1248 AC_ARG_WITH([sysroot],
1249 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1250 [Search for dependent libraries within DIR (or the compiler's sysroot
1251 if not specified).])],
1252 [], [with_sysroot=no])
1253
1254 dnl lt_sysroot will always be passed unquoted. We quote it here
1255 dnl in case the user passed a directory name.
1256 lt_sysroot=
1257 case $with_sysroot in #(
1258 yes)
1259 if test yes = "$GCC"; then
1260 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1261 fi
1262 ;; #(
1263 /*)
1264 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1265 ;; #(
1266 no|'')
1267 ;; #(
1268 *)
1269 AC_MSG_RESULT([$with_sysroot])
1270 AC_MSG_ERROR([The sysroot must be an absolute path.])
1271 ;;
1272 esac
1273
1274 AC_MSG_RESULT([${lt_sysroot:-no}])
1275 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1276 [dependent libraries, and where our libraries should be installed.])])
1277
1278 # _LT_ENABLE_LOCK
1279 # ---------------
1280 m4_defun([_LT_ENABLE_LOCK],
1281 [AC_ARG_ENABLE([libtool-lock],
1282 [AS_HELP_STRING([--disable-libtool-lock],
1283 [avoid locking (might break parallel builds)])])
1284 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1285
1286 # Some flags need to be propagated to the compiler or linker for good
1287 # libtool support.
1288 case $host in
1289 ia64-*-hpux*)
1290 # Find out what ABI is being produced by ac_compile, and set mode
1291 # options accordingly.
1292 echo 'int i;' > conftest.$ac_ext
1293 if AC_TRY_EVAL(ac_compile); then
1294 case `/usr/bin/file conftest.$ac_objext` in
1295 *ELF-32*)
1296 HPUX_IA64_MODE=32
1297 ;;
1298 *ELF-64*)
1299 HPUX_IA64_MODE=64
1300 ;;
1301 esac
1302 fi
1303 rm -rf conftest*
1304 ;;
1305 *-*-irix6*)
1306 # Find out what ABI is being produced by ac_compile, and set linker
1307 # options accordingly.
1308 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1309 if AC_TRY_EVAL(ac_compile); then
1310 if test yes = "$lt_cv_prog_gnu_ld"; then
1311 case `/usr/bin/file conftest.$ac_objext` in
1312 *32-bit*)
1313 LD="${LD-ld} -melf32bsmip"
1314 ;;
1315 *N32*)
1316 LD="${LD-ld} -melf32bmipn32"
1317 ;;
1318 *64-bit*)
1319 LD="${LD-ld} -melf64bmip"
1320 ;;
1321 esac
1322 else
1323 case `/usr/bin/file conftest.$ac_objext` in
1324 *32-bit*)
1325 LD="${LD-ld} -32"
1326 ;;
1327 *N32*)
1328 LD="${LD-ld} -n32"
1329 ;;
1330 *64-bit*)
1331 LD="${LD-ld} -64"
1332 ;;
1333 esac
1334 fi
1335 fi
1336 rm -rf conftest*
1337 ;;
1338
1339 mips64*-*linux*)
1340 # Find out what ABI is being produced by ac_compile, and set linker
1341 # options accordingly.
1342 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1343 if AC_TRY_EVAL(ac_compile); then
1344 emul=elf
1345 case `/usr/bin/file conftest.$ac_objext` in
1346 *32-bit*)
1347 emul="${emul}32"
1348 ;;
1349 *64-bit*)
1350 emul="${emul}64"
1351 ;;
1352 esac
1353 case `/usr/bin/file conftest.$ac_objext` in
1354 *MSB*)
1355 emul="${emul}btsmip"
1356 ;;
1357 *LSB*)
1358 emul="${emul}ltsmip"
1359 ;;
1360 esac
1361 case `/usr/bin/file conftest.$ac_objext` in
1362 *N32*)
1363 emul="${emul}n32"
1364 ;;
1365 esac
1366 LD="${LD-ld} -m $emul"
1367 fi
1368 rm -rf conftest*
1369 ;;
1370
1371 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1372 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1373 # Find out what ABI is being produced by ac_compile, and set linker
1374 # options accordingly. Note that the listed cases only cover the
1375 # situations where additional linker options are needed (such as when
1376 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1377 # vice versa); the common cases where no linker options are needed do
1378 # not appear in the list.
1379 echo 'int i;' > conftest.$ac_ext
1380 if AC_TRY_EVAL(ac_compile); then
1381 case `/usr/bin/file conftest.o` in
1382 *32-bit*)
1383 case $host in
1384 x86_64-*kfreebsd*-gnu)
1385 LD="${LD-ld} -m elf_i386_fbsd"
1386 ;;
1387 x86_64-*linux*)
1388 case `/usr/bin/file conftest.o` in
1389 *x86-64*)
1390 LD="${LD-ld} -m elf32_x86_64"
1391 ;;
1392 *)
1393 LD="${LD-ld} -m elf_i386"
1394 ;;
1395 esac
1396 ;;
1397 powerpc64le-*linux*)
1398 LD="${LD-ld} -m elf32lppclinux"
1399 ;;
1400 powerpc64-*linux*)
1401 LD="${LD-ld} -m elf32ppclinux"
1402 ;;
1403 s390x-*linux*)
1404 LD="${LD-ld} -m elf_s390"
1405 ;;
1406 sparc64-*linux*)
1407 LD="${LD-ld} -m elf32_sparc"
1408 ;;
1409 esac
1410 ;;
1411 *64-bit*)
1412 case $host in
1413 x86_64-*kfreebsd*-gnu)
1414 LD="${LD-ld} -m elf_x86_64_fbsd"
1415 ;;
1416 x86_64-*linux*)
1417 LD="${LD-ld} -m elf_x86_64"
1418 ;;
1419 powerpcle-*linux*)
1420 LD="${LD-ld} -m elf64lppc"
1421 ;;
1422 powerpc-*linux*)
1423 LD="${LD-ld} -m elf64ppc"
1424 ;;
1425 s390*-*linux*|s390*-*tpf*)
1426 LD="${LD-ld} -m elf64_s390"
1427 ;;
1428 sparc*-*linux*)
1429 LD="${LD-ld} -m elf64_sparc"
1430 ;;
1431 esac
1432 ;;
1433 esac
1434 fi
1435 rm -rf conftest*
1436 ;;
1437
1438 *-*-sco3.2v5*)
1439 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1440 SAVE_CFLAGS=$CFLAGS
1441 CFLAGS="$CFLAGS -belf"
1442 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1443 [AC_LANG_PUSH(C)
1444 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1445 AC_LANG_POP])
1446 if test yes != "$lt_cv_cc_needs_belf"; then
1447 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1448 CFLAGS=$SAVE_CFLAGS
1449 fi
1450 ;;
1451 *-*solaris*)
1452 # Find out what ABI is being produced by ac_compile, and set linker
1453 # options accordingly.
1454 echo 'int i;' > conftest.$ac_ext
1455 if AC_TRY_EVAL(ac_compile); then
1456 case `/usr/bin/file conftest.o` in
1457 *64-bit*)
1458 case $lt_cv_prog_gnu_ld in
1459 yes*)
1460 case $host in
1461 i?86-*-solaris*|x86_64-*-solaris*)
1462 LD="${LD-ld} -m elf_x86_64"
1463 ;;
1464 sparc*-*-solaris*)
1465 LD="${LD-ld} -m elf64_sparc"
1466 ;;
1467 esac
1468 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1469 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1470 LD=${LD-ld}_sol2
1471 fi
1472 ;;
1473 *)
1474 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1475 LD="${LD-ld} -64"
1476 fi
1477 ;;
1478 esac
1479 ;;
1480 esac
1481 fi
1482 rm -rf conftest*
1483 ;;
1484 esac
1485
1486 need_locks=$enable_libtool_lock
1487 ])# _LT_ENABLE_LOCK
1488
1489
1490 # _LT_PROG_AR
1491 # -----------
1492 m4_defun([_LT_PROG_AR],
1493 [AC_CHECK_TOOLS(AR, [ar], false)
1494 : ${AR=ar}
1495 : ${AR_FLAGS=cru}
1496 _LT_DECL([], [AR], [1], [The archiver])
1497 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1498
1499 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1500 [lt_cv_ar_at_file=no
1501 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1502 [echo conftest.$ac_objext > conftest.lst
1503 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1504 AC_TRY_EVAL([lt_ar_try])
1505 if test 0 -eq "$ac_status"; then
1506 # Ensure the archiver fails upon bogus file names.
1507 rm -f conftest.$ac_objext libconftest.a
1508 AC_TRY_EVAL([lt_ar_try])
1509 if test 0 -ne "$ac_status"; then
1510 lt_cv_ar_at_file=@
1511 fi
1512 fi
1513 rm -f conftest.* libconftest.a
1514 ])
1515 ])
1516
1517 if test no = "$lt_cv_ar_at_file"; then
1518 archiver_list_spec=
1519 else
1520 archiver_list_spec=$lt_cv_ar_at_file
1521 fi
1522 _LT_DECL([], [archiver_list_spec], [1],
1523 [How to feed a file listing to the archiver])
1524 ])# _LT_PROG_AR
1525
1526
1527 # _LT_CMD_OLD_ARCHIVE
1528 # -------------------
1529 m4_defun([_LT_CMD_OLD_ARCHIVE],
1530 [_LT_PROG_AR
1531
1532 AC_CHECK_TOOL(STRIP, strip, :)
1533 test -z "$STRIP" && STRIP=:
1534 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1535
1536 AC_CHECK_TOOL(RANLIB, ranlib, :)
1537 test -z "$RANLIB" && RANLIB=:
1538 _LT_DECL([], [RANLIB], [1],
1539 [Commands used to install an old-style archive])
1540
1541 # Determine commands to create old-style static archives.
1542 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1543 old_postinstall_cmds='chmod 644 $oldlib'
1544 old_postuninstall_cmds=
1545
1546 if test -n "$RANLIB"; then
1547 case $host_os in
1548 bitrig* | openbsd*)
1549 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1550 ;;
1551 *)
1552 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1553 ;;
1554 esac
1555 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1556 fi
1557
1558 case $host_os in
1559 darwin*)
1560 lock_old_archive_extraction=yes ;;
1561 *)
1562 lock_old_archive_extraction=no ;;
1563 esac
1564 _LT_DECL([], [old_postinstall_cmds], [2])
1565 _LT_DECL([], [old_postuninstall_cmds], [2])
1566 _LT_TAGDECL([], [old_archive_cmds], [2],
1567 [Commands used to build an old-style archive])
1568 _LT_DECL([], [lock_old_archive_extraction], [0],
1569 [Whether to use a lock for old archive extraction])
1570 ])# _LT_CMD_OLD_ARCHIVE
1571
1572
1573 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1574 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1575 # ----------------------------------------------------------------
1576 # Check whether the given compiler option works
1577 AC_DEFUN([_LT_COMPILER_OPTION],
1578 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1579 m4_require([_LT_DECL_SED])dnl
1580 AC_CACHE_CHECK([$1], [$2],
1581 [$2=no
1582 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1583 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1584 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1585 # Insert the option either (1) after the last *FLAGS variable, or
1586 # (2) before a word containing "conftest.", or (3) at the end.
1587 # Note that $ac_compile itself does not contain backslashes and begins
1588 # with a dollar sign (not a hyphen), so the echo should work correctly.
1589 # The option is referenced via a variable to avoid confusing sed.
1590 lt_compile=`echo "$ac_compile" | $SED \
1591 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1592 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1593 -e 's:$: $lt_compiler_flag:'`
1594 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1595 (eval "$lt_compile" 2>conftest.err)
1596 ac_status=$?
1597 cat conftest.err >&AS_MESSAGE_LOG_FD
1598 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1599 if (exit $ac_status) && test -s "$ac_outfile"; then
1600 # The compiler can only warn and ignore the option if not recognized
1601 # So say no if there are warnings other than the usual output.
1602 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1603 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1604 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1605 $2=yes
1606 fi
1607 fi
1608 $RM conftest*
1609 ])
1610
1611 if test yes = "[$]$2"; then
1612 m4_if([$5], , :, [$5])
1613 else
1614 m4_if([$6], , :, [$6])
1615 fi
1616 ])# _LT_COMPILER_OPTION
1617
1618 # Old name:
1619 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1620 dnl aclocal-1.4 backwards compatibility:
1621 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1622
1623
1624 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1625 # [ACTION-SUCCESS], [ACTION-FAILURE])
1626 # ----------------------------------------------------
1627 # Check whether the given linker option works
1628 AC_DEFUN([_LT_LINKER_OPTION],
1629 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1630 m4_require([_LT_DECL_SED])dnl
1631 AC_CACHE_CHECK([$1], [$2],
1632 [$2=no
1633 save_LDFLAGS=$LDFLAGS
1634 LDFLAGS="$LDFLAGS $3"
1635 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1636 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1637 # The linker can only warn and ignore the option if not recognized
1638 # So say no if there are warnings
1639 if test -s conftest.err; then
1640 # Append any errors to the config.log.
1641 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1642 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1643 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1644 if diff conftest.exp conftest.er2 >/dev/null; then
1645 $2=yes
1646 fi
1647 else
1648 $2=yes
1649 fi
1650 fi
1651 $RM -r conftest*
1652 LDFLAGS=$save_LDFLAGS
1653 ])
1654
1655 if test yes = "[$]$2"; then
1656 m4_if([$4], , :, [$4])
1657 else
1658 m4_if([$5], , :, [$5])
1659 fi
1660 ])# _LT_LINKER_OPTION
1661
1662 # Old name:
1663 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1664 dnl aclocal-1.4 backwards compatibility:
1665 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1666
1667
1668 # LT_CMD_MAX_LEN
1669 #---------------
1670 AC_DEFUN([LT_CMD_MAX_LEN],
1671 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1672 # find the maximum length of command line arguments
1673 AC_MSG_CHECKING([the maximum length of command line arguments])
1674 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1675 i=0
1676 teststring=ABCD
1677
1678 case $build_os in
1679 msdosdjgpp*)
1680 # On DJGPP, this test can blow up pretty badly due to problems in libc
1681 # (any single argument exceeding 2000 bytes causes a buffer overrun
1682 # during glob expansion). Even if it were fixed, the result of this
1683 # check would be larger than it should be.
1684 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1685 ;;
1686
1687 gnu*)
1688 # Under GNU Hurd, this test is not required because there is
1689 # no limit to the length of command line arguments.
1690 # Libtool will interpret -1 as no limit whatsoever
1691 lt_cv_sys_max_cmd_len=-1;
1692 ;;
1693
1694 cygwin* | mingw* | cegcc*)
1695 # On Win9x/ME, this test blows up -- it succeeds, but takes
1696 # about 5 minutes as the teststring grows exponentially.
1697 # Worse, since 9x/ME are not pre-emptively multitasking,
1698 # you end up with a "frozen" computer, even though with patience
1699 # the test eventually succeeds (with a max line length of 256k).
1700 # Instead, let's just punt: use the minimum linelength reported by
1701 # all of the supported platforms: 8192 (on NT/2K/XP).
1702 lt_cv_sys_max_cmd_len=8192;
1703 ;;
1704
1705 mint*)
1706 # On MiNT this can take a long time and run out of memory.
1707 lt_cv_sys_max_cmd_len=8192;
1708 ;;
1709
1710 amigaos*)
1711 # On AmigaOS with pdksh, this test takes hours, literally.
1712 # So we just punt and use a minimum line length of 8192.
1713 lt_cv_sys_max_cmd_len=8192;
1714 ;;
1715
1716 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1717 # This has been around since 386BSD, at least. Likely further.
1718 if test -x /sbin/sysctl; then
1719 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1720 elif test -x /usr/sbin/sysctl; then
1721 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1722 else
1723 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1724 fi
1725 # And add a safety zone
1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1728 ;;
1729
1730 interix*)
1731 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1732 lt_cv_sys_max_cmd_len=196608
1733 ;;
1734
1735 os2*)
1736 # The test takes a long time on OS/2.
1737 lt_cv_sys_max_cmd_len=8192
1738 ;;
1739
1740 osf*)
1741 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1742 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1743 # nice to cause kernel panics so lets avoid the loop below.
1744 # First set a reasonable default.
1745 lt_cv_sys_max_cmd_len=16384
1746 #
1747 if test -x /sbin/sysconfig; then
1748 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1749 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1750 esac
1751 fi
1752 ;;
1753 sco3.2v5*)
1754 lt_cv_sys_max_cmd_len=102400
1755 ;;
1756 sysv5* | sco5v6* | sysv4.2uw2*)
1757 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1758 if test -n "$kargmax"; then
1759 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1760 else
1761 lt_cv_sys_max_cmd_len=32768
1762 fi
1763 ;;
1764 *)
1765 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1766 if test -n "$lt_cv_sys_max_cmd_len" && \
1767 test undefined != "$lt_cv_sys_max_cmd_len"; then
1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1770 else
1771 # Make teststring a little bigger before we do anything with it.
1772 # a 1K string should be a reasonable start.
1773 for i in 1 2 3 4 5 6 7 8; do
1774 teststring=$teststring$teststring
1775 done
1776 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1777 # If test is not a shell built-in, we'll probably end up computing a
1778 # maximum length that is only half of the actual maximum length, but
1779 # we can't tell.
1780 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1781 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1782 test 17 != "$i" # 1/2 MB should be enough
1783 do
1784 i=`expr $i + 1`
1785 teststring=$teststring$teststring
1786 done
1787 # Only check the string length outside the loop.
1788 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1789 teststring=
1790 # Add a significant safety factor because C++ compilers can tack on
1791 # massive amounts of additional arguments before passing them to the
1792 # linker. It appears as though 1/2 is a usable value.
1793 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1794 fi
1795 ;;
1796 esac
1797 ])
1798 if test -n "$lt_cv_sys_max_cmd_len"; then
1799 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1800 else
1801 AC_MSG_RESULT(none)
1802 fi
1803 max_cmd_len=$lt_cv_sys_max_cmd_len
1804 _LT_DECL([], [max_cmd_len], [0],
1805 [What is the maximum length of a command?])
1806 ])# LT_CMD_MAX_LEN
1807
1808 # Old name:
1809 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1810 dnl aclocal-1.4 backwards compatibility:
1811 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1812
1813
1814 # _LT_HEADER_DLFCN
1815 # ----------------
1816 m4_defun([_LT_HEADER_DLFCN],
1817 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1818 ])# _LT_HEADER_DLFCN
1819
1820
1821 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1822 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1823 # ----------------------------------------------------------------
1824 m4_defun([_LT_TRY_DLOPEN_SELF],
1825 [m4_require([_LT_HEADER_DLFCN])dnl
1826 if test yes = "$cross_compiling"; then :
1827 [$4]
1828 else
1829 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1830 lt_status=$lt_dlunknown
1831 cat > conftest.$ac_ext <<_LT_EOF
1832 [#line $LINENO "configure"
1833 #include "confdefs.h"
1834
1835 #if HAVE_DLFCN_H
1836 #include <dlfcn.h>
1837 #endif
1838
1839 #include <stdio.h>
1840
1841 #ifdef RTLD_GLOBAL
1842 # define LT_DLGLOBAL RTLD_GLOBAL
1843 #else
1844 # ifdef DL_GLOBAL
1845 # define LT_DLGLOBAL DL_GLOBAL
1846 # else
1847 # define LT_DLGLOBAL 0
1848 # endif
1849 #endif
1850
1851 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1852 find out it does not work in some platform. */
1853 #ifndef LT_DLLAZY_OR_NOW
1854 # ifdef RTLD_LAZY
1855 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1856 # else
1857 # ifdef DL_LAZY
1858 # define LT_DLLAZY_OR_NOW DL_LAZY
1859 # else
1860 # ifdef RTLD_NOW
1861 # define LT_DLLAZY_OR_NOW RTLD_NOW
1862 # else
1863 # ifdef DL_NOW
1864 # define LT_DLLAZY_OR_NOW DL_NOW
1865 # else
1866 # define LT_DLLAZY_OR_NOW 0
1867 # endif
1868 # endif
1869 # endif
1870 # endif
1871 #endif
1872
1873 /* When -fvisibility=hidden is used, assume the code has been annotated
1874 correspondingly for the symbols needed. */
1875 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1876 int fnord () __attribute__((visibility("default")));
1877 #endif
1878
1879 int fnord () { return 42; }
1880 int main ()
1881 {
1882 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1883 int status = $lt_dlunknown;
1884
1885 if (self)
1886 {
1887 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1888 else
1889 {
1890 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1891 else puts (dlerror ());
1892 }
1893 /* dlclose (self); */
1894 }
1895 else
1896 puts (dlerror ());
1897
1898 return status;
1899 }]
1900 _LT_EOF
1901 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1902 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1903 lt_status=$?
1904 case x$lt_status in
1905 x$lt_dlno_uscore) $1 ;;
1906 x$lt_dlneed_uscore) $2 ;;
1907 x$lt_dlunknown|x*) $3 ;;
1908 esac
1909 else :
1910 # compilation failed
1911 $3
1912 fi
1913 fi
1914 rm -fr conftest*
1915 ])# _LT_TRY_DLOPEN_SELF
1916
1917
1918 # LT_SYS_DLOPEN_SELF
1919 # ------------------
1920 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1921 [m4_require([_LT_HEADER_DLFCN])dnl
1922 if test yes != "$enable_dlopen"; then
1923 enable_dlopen=unknown
1924 enable_dlopen_self=unknown
1925 enable_dlopen_self_static=unknown
1926 else
1927 lt_cv_dlopen=no
1928 lt_cv_dlopen_libs=
1929
1930 case $host_os in
1931 beos*)
1932 lt_cv_dlopen=load_add_on
1933 lt_cv_dlopen_libs=
1934 lt_cv_dlopen_self=yes
1935 ;;
1936
1937 mingw* | pw32* | cegcc*)
1938 lt_cv_dlopen=LoadLibrary
1939 lt_cv_dlopen_libs=
1940 ;;
1941
1942 cygwin*)
1943 lt_cv_dlopen=dlopen
1944 lt_cv_dlopen_libs=
1945 ;;
1946
1947 darwin*)
1948 # if libdl is installed we need to link against it
1949 AC_CHECK_LIB([dl], [dlopen],
1950 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1951 lt_cv_dlopen=dyld
1952 lt_cv_dlopen_libs=
1953 lt_cv_dlopen_self=yes
1954 ])
1955 ;;
1956
1957 tpf*)
1958 # Don't try to run any link tests for TPF. We know it's impossible
1959 # because TPF is a cross-compiler, and we know how we open DSOs.
1960 lt_cv_dlopen=dlopen
1961 lt_cv_dlopen_libs=
1962 lt_cv_dlopen_self=no
1963 ;;
1964
1965 *)
1966 AC_CHECK_FUNC([shl_load],
1967 [lt_cv_dlopen=shl_load],
1968 [AC_CHECK_LIB([dld], [shl_load],
1969 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1970 [AC_CHECK_FUNC([dlopen],
1971 [lt_cv_dlopen=dlopen],
1972 [AC_CHECK_LIB([dl], [dlopen],
1973 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1974 [AC_CHECK_LIB([svld], [dlopen],
1975 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1976 [AC_CHECK_LIB([dld], [dld_link],
1977 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1978 ])
1979 ])
1980 ])
1981 ])
1982 ])
1983 ;;
1984 esac
1985
1986 if test no = "$lt_cv_dlopen"; then
1987 enable_dlopen=no
1988 else
1989 enable_dlopen=yes
1990 fi
1991
1992 case $lt_cv_dlopen in
1993 dlopen)
1994 save_CPPFLAGS=$CPPFLAGS
1995 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1996
1997 save_LDFLAGS=$LDFLAGS
1998 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1999
2000 save_LIBS=$LIBS
2001 LIBS="$lt_cv_dlopen_libs $LIBS"
2002
2003 AC_CACHE_CHECK([whether a program can dlopen itself],
2004 lt_cv_dlopen_self, [dnl
2005 _LT_TRY_DLOPEN_SELF(
2006 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2007 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2008 ])
2009
2010 if test yes = "$lt_cv_dlopen_self"; then
2011 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2012 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2013 lt_cv_dlopen_self_static, [dnl
2014 _LT_TRY_DLOPEN_SELF(
2015 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2016 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2017 ])
2018 fi
2019
2020 CPPFLAGS=$save_CPPFLAGS
2021 LDFLAGS=$save_LDFLAGS
2022 LIBS=$save_LIBS
2023 ;;
2024 esac
2025
2026 case $lt_cv_dlopen_self in
2027 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2028 *) enable_dlopen_self=unknown ;;
2029 esac
2030
2031 case $lt_cv_dlopen_self_static in
2032 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2033 *) enable_dlopen_self_static=unknown ;;
2034 esac
2035 fi
2036 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2037 [Whether dlopen is supported])
2038 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2039 [Whether dlopen of programs is supported])
2040 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2041 [Whether dlopen of statically linked programs is supported])
2042 ])# LT_SYS_DLOPEN_SELF
2043
2044 # Old name:
2045 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2046 dnl aclocal-1.4 backwards compatibility:
2047 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2048
2049
2050 # _LT_COMPILER_C_O([TAGNAME])
2051 # ---------------------------
2052 # Check to see if options -c and -o are simultaneously supported by compiler.
2053 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2054 m4_defun([_LT_COMPILER_C_O],
2055 [m4_require([_LT_DECL_SED])dnl
2056 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2057 m4_require([_LT_TAG_COMPILER])dnl
2058 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2059 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2061 $RM -r conftest 2>/dev/null
2062 mkdir conftest
2063 cd conftest
2064 mkdir out
2065 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2066
2067 lt_compiler_flag="-o out/conftest2.$ac_objext"
2068 # Insert the option either (1) after the last *FLAGS variable, or
2069 # (2) before a word containing "conftest.", or (3) at the end.
2070 # Note that $ac_compile itself does not contain backslashes and begins
2071 # with a dollar sign (not a hyphen), so the echo should work correctly.
2072 lt_compile=`echo "$ac_compile" | $SED \
2073 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2074 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2075 -e 's:$: $lt_compiler_flag:'`
2076 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2077 (eval "$lt_compile" 2>out/conftest.err)
2078 ac_status=$?
2079 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2080 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2081 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2082 then
2083 # The compiler can only warn and ignore the option if not recognized
2084 # So say no if there are warnings
2085 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2086 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2087 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2088 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2089 fi
2090 fi
2091 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2092 $RM conftest*
2093 # SGI C++ compiler will create directory out/ii_files/ for
2094 # template instantiation
2095 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2096 $RM out/* && rmdir out
2097 cd ..
2098 $RM -r conftest
2099 $RM conftest*
2100 ])
2101 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2102 [Does compiler simultaneously support -c and -o options?])
2103 ])# _LT_COMPILER_C_O
2104
2105
2106 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2107 # ----------------------------------
2108 # Check to see if we can do hard links to lock some files if needed
2109 m4_defun([_LT_COMPILER_FILE_LOCKS],
2110 [m4_require([_LT_ENABLE_LOCK])dnl
2111 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2112 _LT_COMPILER_C_O([$1])
2113
2114 hard_links=nottested
2115 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2116 # do not overwrite the value of need_locks provided by the user
2117 AC_MSG_CHECKING([if we can lock with hard links])
2118 hard_links=yes
2119 $RM conftest*
2120 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2121 touch conftest.a
2122 ln conftest.a conftest.b 2>&5 || hard_links=no
2123 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2124 AC_MSG_RESULT([$hard_links])
2125 if test no = "$hard_links"; then
2126 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2127 need_locks=warn
2128 fi
2129 else
2130 need_locks=no
2131 fi
2132 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2133 ])# _LT_COMPILER_FILE_LOCKS
2134
2135
2136 # _LT_CHECK_OBJDIR
2137 # ----------------
2138 m4_defun([_LT_CHECK_OBJDIR],
2139 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2140 [rm -f .libs 2>/dev/null
2141 mkdir .libs 2>/dev/null
2142 if test -d .libs; then
2143 lt_cv_objdir=.libs
2144 else
2145 # MS-DOS does not allow filenames that begin with a dot.
2146 lt_cv_objdir=_libs
2147 fi
2148 rmdir .libs 2>/dev/null])
2149 objdir=$lt_cv_objdir
2150 _LT_DECL([], [objdir], [0],
2151 [The name of the directory that contains temporary libtool files])dnl
2152 m4_pattern_allow([LT_OBJDIR])dnl
2153 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2154 [Define to the sub-directory where libtool stores uninstalled libraries.])
2155 ])# _LT_CHECK_OBJDIR
2156
2157
2158 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2159 # --------------------------------------
2160 # Check hardcoding attributes.
2161 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2162 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2163 _LT_TAGVAR(hardcode_action, $1)=
2164 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2165 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2166 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2167
2168 # We can hardcode non-existent directories.
2169 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2170 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2171 # have to relink, otherwise we might link with an installed library
2172 # when we should be linking with a yet-to-be-installed one
2173 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2174 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2175 # Linking always hardcodes the temporary library directory.
2176 _LT_TAGVAR(hardcode_action, $1)=relink
2177 else
2178 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2179 _LT_TAGVAR(hardcode_action, $1)=immediate
2180 fi
2181 else
2182 # We cannot hardcode anything, or else we can only hardcode existing
2183 # directories.
2184 _LT_TAGVAR(hardcode_action, $1)=unsupported
2185 fi
2186 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2187
2188 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2189 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2190 # Fast installation is not supported
2191 enable_fast_install=no
2192 elif test yes = "$shlibpath_overrides_runpath" ||
2193 test no = "$enable_shared"; then
2194 # Fast installation is not necessary
2195 enable_fast_install=needless
2196 fi
2197 _LT_TAGDECL([], [hardcode_action], [0],
2198 [How to hardcode a shared library path into an executable])
2199 ])# _LT_LINKER_HARDCODE_LIBPATH
2200
2201
2202 # _LT_CMD_STRIPLIB
2203 # ----------------
2204 m4_defun([_LT_CMD_STRIPLIB],
2205 [m4_require([_LT_DECL_EGREP])
2206 striplib=
2207 old_striplib=
2208 AC_MSG_CHECKING([whether stripping libraries is possible])
2209 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2210 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2211 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2212 AC_MSG_RESULT([yes])
2213 else
2214 # FIXME - insert some real tests, host_os isn't really good enough
2215 case $host_os in
2216 darwin*)
2217 if test -n "$STRIP"; then
2218 striplib="$STRIP -x"
2219 old_striplib="$STRIP -S"
2220 AC_MSG_RESULT([yes])
2221 else
2222 AC_MSG_RESULT([no])
2223 fi
2224 ;;
2225 *)
2226 AC_MSG_RESULT([no])
2227 ;;
2228 esac
2229 fi
2230 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2231 _LT_DECL([], [striplib], [1])
2232 ])# _LT_CMD_STRIPLIB
2233
2234
2235 # _LT_PREPARE_MUNGE_PATH_LIST
2236 # ---------------------------
2237 # Make sure func_munge_path_list() is defined correctly.
2238 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2239 [[# func_munge_path_list VARIABLE PATH
2240 # -----------------------------------
2241 # VARIABLE is name of variable containing _space_ separated list of
2242 # directories to be munged by the contents of PATH, which is string
2243 # having a format:
2244 # "DIR[:DIR]:"
2245 # string "DIR[ DIR]" will be prepended to VARIABLE
2246 # ":DIR[:DIR]"
2247 # string "DIR[ DIR]" will be appended to VARIABLE
2248 # "DIRP[:DIRP]::[DIRA:]DIRA"
2249 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2250 # "DIRA[ DIRA]" will be appended to VARIABLE
2251 # "DIR[:DIR]"
2252 # VARIABLE will be replaced by "DIR[ DIR]"
2253 func_munge_path_list ()
2254 {
2255 case x@S|@2 in
2256 x)
2257 ;;
2258 *:)
2259 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2260 ;;
2261 x:*)
2262 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2263 ;;
2264 *::*)
2265 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2266 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2267 ;;
2268 *)
2269 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2270 ;;
2271 esac
2272 }
2273 ]])# _LT_PREPARE_PATH_LIST
2274
2275
2276 # _LT_SYS_DYNAMIC_LINKER([TAG])
2277 # -----------------------------
2278 # PORTME Fill in your ld.so characteristics
2279 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2280 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2281 m4_require([_LT_DECL_EGREP])dnl
2282 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2283 m4_require([_LT_DECL_OBJDUMP])dnl
2284 m4_require([_LT_DECL_SED])dnl
2285 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2286 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2287 AC_MSG_CHECKING([dynamic linker characteristics])
2288 m4_if([$1],
2289 [], [
2290 if test yes = "$GCC"; then
2291 case $host_os in
2292 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2293 *) lt_awk_arg='/^libraries:/' ;;
2294 esac
2295 case $host_os in
2296 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2297 *) lt_sed_strip_eq='s|=/|/|g' ;;
2298 esac
2299 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2300 case $lt_search_path_spec in
2301 *\;*)
2302 # if the path contains ";" then we assume it to be the separator
2303 # otherwise default to the standard path separator (i.e. ":") - it is
2304 # assumed that no part of a normal pathname contains ";" but that should
2305 # okay in the real world where ";" in dirpaths is itself problematic.
2306 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2307 ;;
2308 *)
2309 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2310 ;;
2311 esac
2312 # Ok, now we have the path, separated by spaces, we can step through it
2313 # and add multilib dir if necessary...
2314 lt_tmp_lt_search_path_spec=
2315 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2316 # ...but if some path component already ends with the multilib dir we assume
2317 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2318 case "$lt_multi_os_dir; $lt_search_path_spec " in
2319 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2320 lt_multi_os_dir=
2321 ;;
2322 esac
2323 for lt_sys_path in $lt_search_path_spec; do
2324 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2325 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2326 elif test -n "$lt_multi_os_dir"; then
2327 test -d "$lt_sys_path" && \
2328 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2329 fi
2330 done
2331 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2332 BEGIN {RS = " "; FS = "/|\n";} {
2333 lt_foo = "";
2334 lt_count = 0;
2335 for (lt_i = NF; lt_i > 0; lt_i--) {
2336 if ($lt_i != "" && $lt_i != ".") {
2337 if ($lt_i == "..") {
2338 lt_count++;
2339 } else {
2340 if (lt_count == 0) {
2341 lt_foo = "/" $lt_i lt_foo;
2342 } else {
2343 lt_count--;
2344 }
2345 }
2346 }
2347 }
2348 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2349 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2350 }'`
2351 # AWK program above erroneously prepends '/' to C:/dos/paths
2352 # for these hosts.
2353 case $host_os in
2354 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2355 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2356 esac
2357 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2358 else
2359 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2360 fi])
2361 library_names_spec=
2362 libname_spec='lib$name'
2363 soname_spec=
2364 shrext_cmds=.so
2365 postinstall_cmds=
2366 postuninstall_cmds=
2367 finish_cmds=
2368 finish_eval=
2369 shlibpath_var=
2370 shlibpath_overrides_runpath=unknown
2371 version_type=none
2372 dynamic_linker="$host_os ld.so"
2373 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2374 need_lib_prefix=unknown
2375 hardcode_into_libs=no
2376
2377 # when you set need_version to no, make sure it does not cause -set_version
2378 # flags to be left without arguments
2379 need_version=unknown
2380
2381 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2382 [User-defined run-time library search path.])
2383
2384 case $host_os in
2385 aix3*)
2386 version_type=linux # correct to gnu/linux during the next big refactor
2387 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2388 shlibpath_var=LIBPATH
2389
2390 # AIX 3 has no versioning support, so we append a major version to the name.
2391 soname_spec='$libname$release$shared_ext$major'
2392 ;;
2393
2394 aix[[4-9]]*)
2395 version_type=linux # correct to gnu/linux during the next big refactor
2396 need_lib_prefix=no
2397 need_version=no
2398 hardcode_into_libs=yes
2399 if test ia64 = "$host_cpu"; then
2400 # AIX 5 supports IA64
2401 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2402 shlibpath_var=LD_LIBRARY_PATH
2403 else
2404 # With GCC up to 2.95.x, collect2 would create an import file
2405 # for dependence libraries. The import file would start with
2406 # the line '#! .'. This would cause the generated library to
2407 # depend on '.', always an invalid library. This was fixed in
2408 # development snapshots of GCC prior to 3.0.
2409 case $host_os in
2410 aix4 | aix4.[[01]] | aix4.[[01]].*)
2411 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2412 echo ' yes '
2413 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2414 :
2415 else
2416 can_build_shared=no
2417 fi
2418 ;;
2419 esac
2420 # Using Import Files as archive members, it is possible to support
2421 # filename-based versioning of shared library archives on AIX. While
2422 # this would work for both with and without runtime linking, it will
2423 # prevent static linking of such archives. So we do filename-based
2424 # shared library versioning with .so extension only, which is used
2425 # when both runtime linking and shared linking is enabled.
2426 # Unfortunately, runtime linking may impact performance, so we do
2427 # not want this to be the default eventually. Also, we use the
2428 # versioned .so libs for executables only if there is the -brtl
2429 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2430 # To allow for filename-based versioning support, we need to create
2431 # libNAME.so.V as an archive file, containing:
2432 # *) an Import File, referring to the versioned filename of the
2433 # archive as well as the shared archive member, telling the
2434 # bitwidth (32 or 64) of that shared object, and providing the
2435 # list of exported symbols of that shared object, eventually
2436 # decorated with the 'weak' keyword
2437 # *) the shared object with the F_LOADONLY flag set, to really avoid
2438 # it being seen by the linker.
2439 # At run time we better use the real file rather than another symlink,
2440 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2441
2442 case $with_aix_soname,$aix_use_runtimelinking in
2443 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2444 # soname into executable. Probably we can add versioning support to
2445 # collect2, so additional links can be useful in future.
2446 aix,yes) # traditional libtool
2447 dynamic_linker='AIX unversionable lib.so'
2448 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2449 # instead of lib<name>.a to let people know that these are not
2450 # typical AIX shared libraries.
2451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2452 ;;
2453 aix,no) # traditional AIX only
2454 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2455 # We preserve .a as extension for shared libraries through AIX4.2
2456 # and later when we are not doing run time linking.
2457 library_names_spec='$libname$release.a $libname.a'
2458 soname_spec='$libname$release$shared_ext$major'
2459 ;;
2460 svr4,*) # full svr4 only
2461 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2462 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2463 # We do not specify a path in Import Files, so LIBPATH fires.
2464 shlibpath_overrides_runpath=yes
2465 ;;
2466 *,yes) # both, prefer svr4
2467 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2468 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2469 # unpreferred sharedlib libNAME.a needs extra handling
2470 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2471 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2472 # We do not specify a path in Import Files, so LIBPATH fires.
2473 shlibpath_overrides_runpath=yes
2474 ;;
2475 *,no) # both, prefer aix
2476 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2477 library_names_spec='$libname$release.a $libname.a'
2478 soname_spec='$libname$release$shared_ext$major'
2479 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2480 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2481 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2482 ;;
2483 esac
2484 shlibpath_var=LIBPATH
2485 fi
2486 ;;
2487
2488 amigaos*)
2489 case $host_cpu in
2490 powerpc)
2491 # Since July 2007 AmigaOS4 officially supports .so libraries.
2492 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2493 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2494 ;;
2495 m68k)
2496 library_names_spec='$libname.ixlibrary $libname.a'
2497 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2498 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
2499 ;;
2500 esac
2501 ;;
2502
2503 beos*)
2504 library_names_spec='$libname$shared_ext'
2505 dynamic_linker="$host_os ld.so"
2506 shlibpath_var=LIBRARY_PATH
2507 ;;
2508
2509 bsdi[[45]]*)
2510 version_type=linux # correct to gnu/linux during the next big refactor
2511 need_version=no
2512 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2513 soname_spec='$libname$release$shared_ext$major'
2514 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2515 shlibpath_var=LD_LIBRARY_PATH
2516 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2517 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2518 # the default ld.so.conf also contains /usr/contrib/lib and
2519 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2520 # libtool to hard-code these into programs
2521 ;;
2522
2523 cygwin* | mingw* | pw32* | cegcc*)
2524 version_type=windows
2525 shrext_cmds=.dll
2526 need_version=no
2527 need_lib_prefix=no
2528
2529 case $GCC,$cc_basename in
2530 yes,*)
2531 # gcc
2532 library_names_spec='$libname.dll.a'
2533 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2534 postinstall_cmds='base_file=`basename \$file`~
2535 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2536 dldir=$destdir/`dirname \$dlpath`~
2537 test -d \$dldir || mkdir -p \$dldir~
2538 $install_prog $dir/$dlname \$dldir/$dlname~
2539 chmod a+x \$dldir/$dlname~
2540 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2541 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2542 fi'
2543 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2544 dlpath=$dir/\$dldll~
2545 $RM \$dlpath'
2546 shlibpath_overrides_runpath=yes
2547
2548 case $host_os in
2549 cygwin*)
2550 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2551 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2552 m4_if([$1], [],[
2553 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2554 ;;
2555 mingw* | cegcc*)
2556 # MinGW DLLs use traditional 'lib' prefix
2557 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2558 ;;
2559 pw32*)
2560 # pw32 DLLs use 'pw' prefix rather than 'lib'
2561 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2562 ;;
2563 esac
2564 dynamic_linker='Win32 ld.exe'
2565 ;;
2566
2567 *,cl*)
2568 # Native MSVC
2569 libname_spec='$name'
2570 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2571 library_names_spec='$libname.dll.lib'
2572
2573 case $build_os in
2574 mingw*)
2575 sys_lib_search_path_spec=
2576 lt_save_ifs=$IFS
2577 IFS=';'
2578 for lt_path in $LIB
2579 do
2580 IFS=$lt_save_ifs
2581 # Let DOS variable expansion print the short 8.3 style file name.
2582 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2583 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2584 done
2585 IFS=$lt_save_ifs
2586 # Convert to MSYS style.
2587 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2588 ;;
2589 cygwin*)
2590 # Convert to unix form, then to dos form, then back to unix form
2591 # but this time dos style (no spaces!) so that the unix form looks
2592 # like /cygdrive/c/PROGRA~1:/cygdr...
2593 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2594 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2595 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2596 ;;
2597 *)
2598 sys_lib_search_path_spec=$LIB
2599 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2600 # It is most probably a Windows format PATH.
2601 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2602 else
2603 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2604 fi
2605 # FIXME: find the short name or the path components, as spaces are
2606 # common. (e.g. "Program Files" -> "PROGRA~1")
2607 ;;
2608 esac
2609
2610 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2611 postinstall_cmds='base_file=`basename \$file`~
2612 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2613 dldir=$destdir/`dirname \$dlpath`~
2614 test -d \$dldir || mkdir -p \$dldir~
2615 $install_prog $dir/$dlname \$dldir/$dlname'
2616 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2617 dlpath=$dir/\$dldll~
2618 $RM \$dlpath'
2619 shlibpath_overrides_runpath=yes
2620 dynamic_linker='Win32 link.exe'
2621 ;;
2622
2623 *)
2624 # Assume MSVC wrapper
2625 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2626 dynamic_linker='Win32 ld.exe'
2627 ;;
2628 esac
2629 # FIXME: first we should search . and the directory the executable is in
2630 shlibpath_var=PATH
2631 ;;
2632
2633 darwin* | rhapsody*)
2634 dynamic_linker="$host_os dyld"
2635 version_type=darwin
2636 need_lib_prefix=no
2637 need_version=no
2638 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2639 soname_spec='$libname$release$major$shared_ext'
2640 shlibpath_overrides_runpath=yes
2641 shlibpath_var=DYLD_LIBRARY_PATH
2642 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2643 m4_if([$1], [],[
2644 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2645 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2646 ;;
2647
2648 dgux*)
2649 version_type=linux # correct to gnu/linux during the next big refactor
2650 need_lib_prefix=no
2651 need_version=no
2652 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2653 soname_spec='$libname$release$shared_ext$major'
2654 shlibpath_var=LD_LIBRARY_PATH
2655 ;;
2656
2657 freebsd* | dragonfly*)
2658 # DragonFly does not have aout. When/if they implement a new
2659 # versioning mechanism, adjust this.
2660 if test -x /usr/bin/objformat; then
2661 objformat=`/usr/bin/objformat`
2662 else
2663 case $host_os in
2664 freebsd[[23]].*) objformat=aout ;;
2665 *) objformat=elf ;;
2666 esac
2667 fi
2668 version_type=freebsd-$objformat
2669 case $version_type in
2670 freebsd-elf*)
2671 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2672 soname_spec='$libname$release$shared_ext$major'
2673 need_version=no
2674 need_lib_prefix=no
2675 ;;
2676 freebsd-*)
2677 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2678 need_version=yes
2679 ;;
2680 esac
2681 shlibpath_var=LD_LIBRARY_PATH
2682 case $host_os in
2683 freebsd2.*)
2684 shlibpath_overrides_runpath=yes
2685 ;;
2686 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2687 shlibpath_overrides_runpath=yes
2688 hardcode_into_libs=yes
2689 ;;
2690 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2691 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2692 shlibpath_overrides_runpath=no
2693 hardcode_into_libs=yes
2694 ;;
2695 *) # from 4.6 on, and DragonFly
2696 shlibpath_overrides_runpath=yes
2697 hardcode_into_libs=yes
2698 ;;
2699 esac
2700 ;;
2701
2702 haiku*)
2703 version_type=linux # correct to gnu/linux during the next big refactor
2704 need_lib_prefix=no
2705 need_version=no
2706 dynamic_linker="$host_os runtime_loader"
2707 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2708 soname_spec='$libname$release$shared_ext$major'
2709 shlibpath_var=LIBRARY_PATH
2710 shlibpath_overrides_runpath=no
2711 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2712 hardcode_into_libs=yes
2713 ;;
2714
2715 hpux9* | hpux10* | hpux11*)
2716 # Give a soname corresponding to the major version so that dld.sl refuses to
2717 # link against other versions.
2718 version_type=sunos
2719 need_lib_prefix=no
2720 need_version=no
2721 case $host_cpu in
2722 ia64*)
2723 shrext_cmds='.so'
2724 hardcode_into_libs=yes
2725 dynamic_linker="$host_os dld.so"
2726 shlibpath_var=LD_LIBRARY_PATH
2727 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2728 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2729 soname_spec='$libname$release$shared_ext$major'
2730 if test 32 = "$HPUX_IA64_MODE"; then
2731 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2732 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2733 else
2734 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2735 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2736 fi
2737 ;;
2738 hppa*64*)
2739 shrext_cmds='.sl'
2740 hardcode_into_libs=yes
2741 dynamic_linker="$host_os dld.sl"
2742 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2743 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2744 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2745 soname_spec='$libname$release$shared_ext$major'
2746 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2747 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2748 ;;
2749 *)
2750 shrext_cmds='.sl'
2751 dynamic_linker="$host_os dld.sl"
2752 shlibpath_var=SHLIB_PATH
2753 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2754 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2755 soname_spec='$libname$release$shared_ext$major'
2756 ;;
2757 esac
2758 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2759 postinstall_cmds='chmod 555 $lib'
2760 # or fails outright, so override atomically:
2761 install_override_mode=555
2762 ;;
2763
2764 interix[[3-9]]*)
2765 version_type=linux # correct to gnu/linux during the next big refactor
2766 need_lib_prefix=no
2767 need_version=no
2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2769 soname_spec='$libname$release$shared_ext$major'
2770 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2771 shlibpath_var=LD_LIBRARY_PATH
2772 shlibpath_overrides_runpath=no
2773 hardcode_into_libs=yes
2774 ;;
2775
2776 irix5* | irix6* | nonstopux*)
2777 case $host_os in
2778 nonstopux*) version_type=nonstopux ;;
2779 *)
2780 if test yes = "$lt_cv_prog_gnu_ld"; then
2781 version_type=linux # correct to gnu/linux during the next big refactor
2782 else
2783 version_type=irix
2784 fi ;;
2785 esac
2786 need_lib_prefix=no
2787 need_version=no
2788 soname_spec='$libname$release$shared_ext$major'
2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2790 case $host_os in
2791 irix5* | nonstopux*)
2792 libsuff= shlibsuff=
2793 ;;
2794 *)
2795 case $LD in # libtool.m4 will add one of these switches to LD
2796 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2797 libsuff= shlibsuff= libmagic=32-bit;;
2798 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2799 libsuff=32 shlibsuff=N32 libmagic=N32;;
2800 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2801 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2802 *) libsuff= shlibsuff= libmagic=never-match;;
2803 esac
2804 ;;
2805 esac
2806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2807 shlibpath_overrides_runpath=no
2808 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2809 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2810 hardcode_into_libs=yes
2811 ;;
2812
2813 # No shared lib support for Linux oldld, aout, or coff.
2814 linux*oldld* | linux*aout* | linux*coff*)
2815 dynamic_linker=no
2816 ;;
2817
2818 linux*android*)
2819 version_type=none # Android doesn't support versioned libraries.
2820 need_lib_prefix=no
2821 need_version=no
2822 library_names_spec='$libname$release$shared_ext'
2823 soname_spec='$libname$release$shared_ext'
2824 finish_cmds=
2825 shlibpath_var=LD_LIBRARY_PATH
2826 shlibpath_overrides_runpath=yes
2827
2828 # This implies no fast_install, which is unacceptable.
2829 # Some rework will be needed to allow for fast_install
2830 # before this can be enabled.
2831 hardcode_into_libs=yes
2832
2833 dynamic_linker='Android linker'
2834 # Don't embed -rpath directories since the linker doesn't support them.
2835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2836 ;;
2837
2838 # This must be glibc/ELF.
2839 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2840 version_type=linux # correct to gnu/linux during the next big refactor
2841 need_lib_prefix=no
2842 need_version=no
2843 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2844 soname_spec='$libname$release$shared_ext$major'
2845 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2846 shlibpath_var=LD_LIBRARY_PATH
2847 shlibpath_overrides_runpath=no
2848
2849 # Some binutils ld are patched to set DT_RUNPATH
2850 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2851 [lt_cv_shlibpath_overrides_runpath=no
2852 save_LDFLAGS=$LDFLAGS
2853 save_libdir=$libdir
2854 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2855 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2856 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2857 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2858 [lt_cv_shlibpath_overrides_runpath=yes])])
2859 LDFLAGS=$save_LDFLAGS
2860 libdir=$save_libdir
2861 ])
2862 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2863
2864 # This implies no fast_install, which is unacceptable.
2865 # Some rework will be needed to allow for fast_install
2866 # before this can be enabled.
2867 hardcode_into_libs=yes
2868
2869 # Ideally, we could use ldconfig to report *all* directores which are
2870 # searched for libraries, however this is still not possible. Aside from not
2871 # being certain /sbin/ldconfig is available, command
2872 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2873 # even though it is searched at run-time. Try to do the best guess by
2874 # appending ld.so.conf contents (and includes) to the search path.
2875 if test -f /etc/ld.so.conf; then
2876 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;s/"//g;/^$/d' | tr '\n' ' '`
2877 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2878 fi
2879
2880 # We used to test for /lib/ld.so.1 and disable shared libraries on
2881 # powerpc, because MkLinux only supported shared libraries with the
2882 # GNU dynamic linker. Since this was broken with cross compilers,
2883 # most powerpc-linux boxes support dynamic linking these days and
2884 # people can always --disable-shared, the test was removed, and we
2885 # assume the GNU/Linux dynamic linker is in use.
2886 dynamic_linker='GNU/Linux ld.so'
2887 ;;
2888
2889 netbsdelf*-gnu)
2890 version_type=linux
2891 need_lib_prefix=no
2892 need_version=no
2893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2894 soname_spec='${libname}${release}${shared_ext}$major'
2895 shlibpath_var=LD_LIBRARY_PATH
2896 shlibpath_overrides_runpath=no
2897 hardcode_into_libs=yes
2898 dynamic_linker='NetBSD ld.elf_so'
2899 ;;
2900
2901 netbsd*)
2902 version_type=sunos
2903 need_lib_prefix=no
2904 need_version=no
2905 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2906 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2907 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2908 dynamic_linker='NetBSD (a.out) ld.so'
2909 else
2910 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2911 soname_spec='$libname$release$shared_ext$major'
2912 dynamic_linker='NetBSD ld.elf_so'
2913 fi
2914 shlibpath_var=LD_LIBRARY_PATH
2915 shlibpath_overrides_runpath=yes
2916 hardcode_into_libs=yes
2917 ;;
2918
2919 newsos6)
2920 version_type=linux # correct to gnu/linux during the next big refactor
2921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2922 shlibpath_var=LD_LIBRARY_PATH
2923 shlibpath_overrides_runpath=yes
2924 ;;
2925
2926 *nto* | *qnx*)
2927 version_type=qnx
2928 need_lib_prefix=no
2929 need_version=no
2930 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2931 soname_spec='$libname$release$shared_ext$major'
2932 shlibpath_var=LD_LIBRARY_PATH
2933 shlibpath_overrides_runpath=no
2934 hardcode_into_libs=yes
2935 dynamic_linker='ldqnx.so'
2936 ;;
2937
2938 openbsd* | bitrig*)
2939 version_type=sunos
2940 sys_lib_dlsearch_path_spec=/usr/lib
2941 need_lib_prefix=no
2942 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2943 need_version=no
2944 else
2945 need_version=yes
2946 fi
2947 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2948 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2949 shlibpath_var=LD_LIBRARY_PATH
2950 shlibpath_overrides_runpath=yes
2951 ;;
2952
2953 os2*)
2954 libname_spec='$name'
2955 version_type=windows
2956 shrext_cmds=.dll
2957 need_version=no
2958 need_lib_prefix=no
2959 # OS/2 can only load a DLL with a base name of 8 characters or less.
2960 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2961 v=$($ECHO $release$versuffix | tr -d .-);
2962 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2963 $ECHO $n$v`$shared_ext'
2964 library_names_spec='${libname}_dll.$libext'
2965 dynamic_linker='OS/2 ld.exe'
2966 shlibpath_var=BEGINLIBPATH
2967 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2968 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2969 postinstall_cmds='base_file=`basename \$file`~
2970 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2971 dldir=$destdir/`dirname \$dlpath`~
2972 test -d \$dldir || mkdir -p \$dldir~
2973 $install_prog $dir/$dlname \$dldir/$dlname~
2974 chmod a+x \$dldir/$dlname~
2975 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2976 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2977 fi'
2978 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2979 dlpath=$dir/\$dldll~
2980 $RM \$dlpath'
2981 ;;
2982
2983 osf3* | osf4* | osf5*)
2984 version_type=osf
2985 need_lib_prefix=no
2986 need_version=no
2987 soname_spec='$libname$release$shared_ext$major'
2988 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2989 shlibpath_var=LD_LIBRARY_PATH
2990 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2991 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2992 ;;
2993
2994 rdos*)
2995 dynamic_linker=no
2996 ;;
2997
2998 solaris*)
2999 version_type=linux # correct to gnu/linux during the next big refactor
3000 need_lib_prefix=no
3001 need_version=no
3002 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3003 soname_spec='$libname$release$shared_ext$major'
3004 shlibpath_var=LD_LIBRARY_PATH
3005 shlibpath_overrides_runpath=yes
3006 hardcode_into_libs=yes
3007 # ldd complains unless libraries are executable
3008 postinstall_cmds='chmod +x $lib'
3009 ;;
3010
3011 sunos4*)
3012 version_type=sunos
3013 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3014 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3015 shlibpath_var=LD_LIBRARY_PATH
3016 shlibpath_overrides_runpath=yes
3017 if test yes = "$with_gnu_ld"; then
3018 need_lib_prefix=no
3019 fi
3020 need_version=yes
3021 ;;
3022
3023 sysv4 | sysv4.3*)
3024 version_type=linux # correct to gnu/linux during the next big refactor
3025 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3026 soname_spec='$libname$release$shared_ext$major'
3027 shlibpath_var=LD_LIBRARY_PATH
3028 case $host_vendor in
3029 sni)
3030 shlibpath_overrides_runpath=no
3031 need_lib_prefix=no
3032 runpath_var=LD_RUN_PATH
3033 ;;
3034 siemens)
3035 need_lib_prefix=no
3036 ;;
3037 motorola)
3038 need_lib_prefix=no
3039 need_version=no
3040 shlibpath_overrides_runpath=no
3041 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3042 ;;
3043 esac
3044 ;;
3045
3046 sysv4*MP*)
3047 if test -d /usr/nec; then
3048 version_type=linux # correct to gnu/linux during the next big refactor
3049 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3050 soname_spec='$libname$shared_ext.$major'
3051 shlibpath_var=LD_LIBRARY_PATH
3052 fi
3053 ;;
3054
3055 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3056 version_type=sco
3057 need_lib_prefix=no
3058 need_version=no
3059 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3060 soname_spec='$libname$release$shared_ext$major'
3061 shlibpath_var=LD_LIBRARY_PATH
3062 shlibpath_overrides_runpath=yes
3063 hardcode_into_libs=yes
3064 if test yes = "$with_gnu_ld"; then
3065 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3066 else
3067 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3068 case $host_os in
3069 sco3.2v5*)
3070 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3071 ;;
3072 esac
3073 fi
3074 sys_lib_dlsearch_path_spec='/usr/lib'
3075 ;;
3076
3077 tpf*)
3078 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3079 version_type=linux # correct to gnu/linux during the next big refactor
3080 need_lib_prefix=no
3081 need_version=no
3082 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3083 shlibpath_var=LD_LIBRARY_PATH
3084 shlibpath_overrides_runpath=no
3085 hardcode_into_libs=yes
3086 ;;
3087
3088 uts4*)
3089 version_type=linux # correct to gnu/linux during the next big refactor
3090 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3091 soname_spec='$libname$release$shared_ext$major'
3092 shlibpath_var=LD_LIBRARY_PATH
3093 ;;
3094
3095 *)
3096 dynamic_linker=no
3097 ;;
3098 esac
3099 AC_MSG_RESULT([$dynamic_linker])
3100 test no = "$dynamic_linker" && can_build_shared=no
3101
3102 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3103 if test yes = "$GCC"; then
3104 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3105 fi
3106
3107 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3108 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3109 fi
3110
3111 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3112 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3113 fi
3114
3115 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3116 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3117
3118 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3119 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3120
3121 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3122 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3123
3124 _LT_DECL([], [variables_saved_for_relink], [1],
3125 [Variables whose values should be saved in libtool wrapper scripts and
3126 restored at link time])
3127 _LT_DECL([], [need_lib_prefix], [0],
3128 [Do we need the "lib" prefix for modules?])
3129 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3130 _LT_DECL([], [version_type], [0], [Library versioning type])
3131 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3132 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3133 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3134 [Is shlibpath searched before the hard-coded library search path?])
3135 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3136 _LT_DECL([], [library_names_spec], [1],
3137 [[List of archive names. First name is the real one, the rest are links.
3138 The last name is the one that the linker finds with -lNAME]])
3139 _LT_DECL([], [soname_spec], [1],
3140 [[The coded name of the library, if different from the real name]])
3141 _LT_DECL([], [install_override_mode], [1],
3142 [Permission mode override for installation of shared libraries])
3143 _LT_DECL([], [postinstall_cmds], [2],
3144 [Command to use after installation of a shared archive])
3145 _LT_DECL([], [postuninstall_cmds], [2],
3146 [Command to use after uninstallation of a shared archive])
3147 _LT_DECL([], [finish_cmds], [2],
3148 [Commands used to finish a libtool library installation in a directory])
3149 _LT_DECL([], [finish_eval], [1],
3150 [[As "finish_cmds", except a single script fragment to be evaled but
3151 not shown]])
3152 _LT_DECL([], [hardcode_into_libs], [0],
3153 [Whether we should hardcode library paths into libraries])
3154 _LT_DECL([], [sys_lib_search_path_spec], [2],
3155 [Compile-time system search path for libraries])
3156 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3157 [Detected run-time system search path for libraries])
3158 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3159 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3160 ])# _LT_SYS_DYNAMIC_LINKER
3161
3162
3163 # _LT_PATH_TOOL_PREFIX(TOOL)
3164 # --------------------------
3165 # find a file program that can recognize shared library
3166 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3167 [m4_require([_LT_DECL_EGREP])dnl
3168 AC_MSG_CHECKING([for $1])
3169 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3170 [case $MAGIC_CMD in
3171 [[\\/*] | ?:[\\/]*])
3172 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3173 ;;
3174 *)
3175 lt_save_MAGIC_CMD=$MAGIC_CMD
3176 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3177 dnl $ac_dummy forces splitting on constant user-supplied paths.
3178 dnl POSIX.2 word splitting is done only on the output of word expansions,
3179 dnl not every word. This closes a longstanding sh security hole.
3180 ac_dummy="m4_if([$2], , $PATH, [$2])"
3181 for ac_dir in $ac_dummy; do
3182 IFS=$lt_save_ifs
3183 test -z "$ac_dir" && ac_dir=.
3184 if test -f "$ac_dir/$1"; then
3185 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3186 if test -n "$file_magic_test_file"; then
3187 case $deplibs_check_method in
3188 "file_magic "*)
3189 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3190 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3191 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3192 $EGREP "$file_magic_regex" > /dev/null; then
3193 :
3194 else
3195 cat <<_LT_EOF 1>&2
3196
3197 *** Warning: the command libtool uses to detect shared libraries,
3198 *** $file_magic_cmd, produces output that libtool cannot recognize.
3199 *** The result is that libtool may fail to recognize shared libraries
3200 *** as such. This will affect the creation of libtool libraries that
3201 *** depend on shared libraries, but programs linked with such libtool
3202 *** libraries will work regardless of this problem. Nevertheless, you
3203 *** may want to report the problem to your system manager and/or to
3204 *** bug-libtool@gnu.org
3205
3206 _LT_EOF
3207 fi ;;
3208 esac
3209 fi
3210 break
3211 fi
3212 done
3213 IFS=$lt_save_ifs
3214 MAGIC_CMD=$lt_save_MAGIC_CMD
3215 ;;
3216 esac])
3217 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3218 if test -n "$MAGIC_CMD"; then
3219 AC_MSG_RESULT($MAGIC_CMD)
3220 else
3221 AC_MSG_RESULT(no)
3222 fi
3223 _LT_DECL([], [MAGIC_CMD], [0],
3224 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3225 ])# _LT_PATH_TOOL_PREFIX
3226
3227 # Old name:
3228 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3229 dnl aclocal-1.4 backwards compatibility:
3230 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3231
3232
3233 # _LT_PATH_MAGIC
3234 # --------------
3235 # find a file program that can recognize a shared library
3236 m4_defun([_LT_PATH_MAGIC],
3237 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3238 if test -z "$lt_cv_path_MAGIC_CMD"; then
3239 if test -n "$ac_tool_prefix"; then
3240 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3241 else
3242 MAGIC_CMD=:
3243 fi
3244 fi
3245 ])# _LT_PATH_MAGIC
3246
3247
3248 # LT_PATH_LD
3249 # ----------
3250 # find the pathname to the GNU or non-GNU linker
3251 AC_DEFUN([LT_PATH_LD],
3252 [AC_REQUIRE([AC_PROG_CC])dnl
3253 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3254 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3255 m4_require([_LT_DECL_SED])dnl
3256 m4_require([_LT_DECL_EGREP])dnl
3257 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3258
3259 AC_ARG_WITH([gnu-ld],
3260 [AS_HELP_STRING([--with-gnu-ld],
3261 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3262 [test no = "$withval" || with_gnu_ld=yes],
3263 [with_gnu_ld=no])dnl
3264
3265 ac_prog=ld
3266 if test yes = "$GCC"; then
3267 # Check if gcc -print-prog-name=ld gives a path.
3268 AC_MSG_CHECKING([for ld used by $CC])
3269 case $host in
3270 *-*-mingw*)
3271 # gcc leaves a trailing carriage return, which upsets mingw
3272 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3273 *)
3274 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3275 esac
3276 case $ac_prog in
3277 # Accept absolute paths.
3278 [[\\/]]* | ?:[[\\/]]*)
3279 re_direlt='/[[^/]][[^/]]*/\.\./'
3280 # Canonicalize the pathname of ld
3281 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3282 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3283 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3284 done
3285 test -z "$LD" && LD=$ac_prog
3286 ;;
3287 "")
3288 # If it fails, then pretend we aren't using GCC.
3289 ac_prog=ld
3290 ;;
3291 *)
3292 # If it is relative, then search for the first ld in PATH.
3293 with_gnu_ld=unknown
3294 ;;
3295 esac
3296 elif test yes = "$with_gnu_ld"; then
3297 AC_MSG_CHECKING([for GNU ld])
3298 else
3299 AC_MSG_CHECKING([for non-GNU ld])
3300 fi
3301 AC_CACHE_VAL(lt_cv_path_LD,
3302 [if test -z "$LD"; then
3303 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3304 for ac_dir in $PATH; do
3305 IFS=$lt_save_ifs
3306 test -z "$ac_dir" && ac_dir=.
3307 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3308 lt_cv_path_LD=$ac_dir/$ac_prog
3309 # Check to see if the program is GNU ld. I'd rather use --version,
3310 # but apparently some variants of GNU ld only accept -v.
3311 # Break only if it was the GNU/non-GNU ld that we prefer.
3312 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3313 *GNU* | *'with BFD'*)
3314 test no != "$with_gnu_ld" && break
3315 ;;
3316 *)
3317 test yes != "$with_gnu_ld" && break
3318 ;;
3319 esac
3320 fi
3321 done
3322 IFS=$lt_save_ifs
3323 else
3324 lt_cv_path_LD=$LD # Let the user override the test with a path.
3325 fi])
3326 LD=$lt_cv_path_LD
3327 if test -n "$LD"; then
3328 AC_MSG_RESULT($LD)
3329 else
3330 AC_MSG_RESULT(no)
3331 fi
3332 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3333 _LT_PATH_LD_GNU
3334 AC_SUBST([LD])
3335
3336 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3337 ])# LT_PATH_LD
3338
3339 # Old names:
3340 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3341 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3342 dnl aclocal-1.4 backwards compatibility:
3343 dnl AC_DEFUN([AM_PROG_LD], [])
3344 dnl AC_DEFUN([AC_PROG_LD], [])
3345
3346
3347 # _LT_PATH_LD_GNU
3348 #- --------------
3349 m4_defun([_LT_PATH_LD_GNU],
3350 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3351 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3352 case `$LD -v 2>&1 </dev/null` in
3353 *GNU* | *'with BFD'*)
3354 lt_cv_prog_gnu_ld=yes
3355 ;;
3356 *)
3357 lt_cv_prog_gnu_ld=no
3358 ;;
3359 esac])
3360 with_gnu_ld=$lt_cv_prog_gnu_ld
3361 ])# _LT_PATH_LD_GNU
3362
3363
3364 # _LT_CMD_RELOAD
3365 # --------------
3366 # find reload flag for linker
3367 # -- PORTME Some linkers may need a different reload flag.
3368 m4_defun([_LT_CMD_RELOAD],
3369 [AC_CACHE_CHECK([for $LD option to reload object files],
3370 lt_cv_ld_reload_flag,
3371 [lt_cv_ld_reload_flag='-r'])
3372 reload_flag=$lt_cv_ld_reload_flag
3373 case $reload_flag in
3374 "" | " "*) ;;
3375 *) reload_flag=" $reload_flag" ;;
3376 esac
3377 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3378 case $host_os in
3379 cygwin* | mingw* | pw32* | cegcc*)
3380 if test yes != "$GCC"; then
3381 reload_cmds=false
3382 fi
3383 ;;
3384 darwin*)
3385 if test yes = "$GCC"; then
3386 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3387 else
3388 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3389 fi
3390 ;;
3391 esac
3392 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3393 _LT_TAGDECL([], [reload_cmds], [2])dnl
3394 ])# _LT_CMD_RELOAD
3395
3396
3397 # _LT_PATH_DD
3398 # -----------
3399 # find a working dd
3400 m4_defun([_LT_PATH_DD],
3401 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3402 [printf 0123456789abcdef0123456789abcdef >conftest.i
3403 cat conftest.i conftest.i >conftest2.i
3404 : ${lt_DD:=$DD}
3405 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3406 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3407 cmp -s conftest.i conftest.out \
3408 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3409 fi])
3410 rm -f conftest.i conftest2.i conftest.out])
3411 ])# _LT_PATH_DD
3412
3413
3414 # _LT_CMD_TRUNCATE
3415 # ----------------
3416 # find command to truncate a binary pipe
3417 m4_defun([_LT_CMD_TRUNCATE],
3418 [m4_require([_LT_PATH_DD])
3419 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3420 [printf 0123456789abcdef0123456789abcdef >conftest.i
3421 cat conftest.i conftest.i >conftest2.i
3422 lt_cv_truncate_bin=
3423 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3424 cmp -s conftest.i conftest.out \
3425 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3426 fi
3427 rm -f conftest.i conftest2.i conftest.out
3428 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3429 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3430 [Command to truncate a binary pipe])
3431 ])# _LT_CMD_TRUNCATE
3432
3433
3434 # _LT_CHECK_MAGIC_METHOD
3435 # ----------------------
3436 # how to check for library dependencies
3437 # -- PORTME fill in with the dynamic library characteristics
3438 m4_defun([_LT_CHECK_MAGIC_METHOD],
3439 [m4_require([_LT_DECL_EGREP])
3440 m4_require([_LT_DECL_OBJDUMP])
3441 AC_CACHE_CHECK([how to recognize dependent libraries],
3442 lt_cv_deplibs_check_method,
3443 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3444 lt_cv_file_magic_test_file=
3445 lt_cv_deplibs_check_method='unknown'
3446 # Need to set the preceding variable on all platforms that support
3447 # interlibrary dependencies.
3448 # 'none' -- dependencies not supported.
3449 # 'unknown' -- same as none, but documents that we really don't know.
3450 # 'pass_all' -- all dependencies passed with no checks.
3451 # 'test_compile' -- check by making test program.
3452 # 'file_magic [[regex]]' -- check by looking for files in library path
3453 # that responds to the $file_magic_cmd with a given extended regex.
3454 # If you have 'file' or equivalent on your system and you're not sure
3455 # whether 'pass_all' will *always* work, you probably want this one.
3456
3457 case $host_os in
3458 aix[[4-9]]*)
3459 lt_cv_deplibs_check_method=pass_all
3460 ;;
3461
3462 beos*)
3463 lt_cv_deplibs_check_method=pass_all
3464 ;;
3465
3466 bsdi[[45]]*)
3467 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3468 lt_cv_file_magic_cmd='/usr/bin/file -L'
3469 lt_cv_file_magic_test_file=/shlib/libc.so
3470 ;;
3471
3472 cygwin*)
3473 # func_win32_libid is a shell function defined in ltmain.sh
3474 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3475 lt_cv_file_magic_cmd='func_win32_libid'
3476 ;;
3477
3478 mingw* | pw32*)
3479 # Base MSYS/MinGW do not provide the 'file' command needed by
3480 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3481 # unless we find 'file', for example because we are cross-compiling.
3482 if ( file / ) >/dev/null 2>&1; then
3483 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3484 lt_cv_file_magic_cmd='func_win32_libid'
3485 else
3486 # Keep this pattern in sync with the one in func_win32_libid.
3487 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3488 lt_cv_file_magic_cmd='$OBJDUMP -f'
3489 fi
3490 ;;
3491
3492 cegcc*)
3493 # use the weaker test based on 'objdump'. See mingw*.
3494 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3495 lt_cv_file_magic_cmd='$OBJDUMP -f'
3496 ;;
3497
3498 darwin* | rhapsody*)
3499 lt_cv_deplibs_check_method=pass_all
3500 ;;
3501
3502 freebsd* | dragonfly*)
3503 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3504 case $host_cpu in
3505 i*86 )
3506 # Not sure whether the presence of OpenBSD here was a mistake.
3507 # Let's accept both of them until this is cleared up.
3508 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3509 lt_cv_file_magic_cmd=/usr/bin/file
3510 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3511 ;;
3512 esac
3513 else
3514 lt_cv_deplibs_check_method=pass_all
3515 fi
3516 ;;
3517
3518 haiku*)
3519 lt_cv_deplibs_check_method=pass_all
3520 ;;
3521
3522 hpux10.20* | hpux11*)
3523 lt_cv_file_magic_cmd=/usr/bin/file
3524 case $host_cpu in
3525 ia64*)
3526 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3527 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3528 ;;
3529 hppa*64*)
3530 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3531 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3532 ;;
3533 *)
3534 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3535 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3536 ;;
3537 esac
3538 ;;
3539
3540 interix[[3-9]]*)
3541 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3542 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3543 ;;
3544
3545 irix5* | irix6* | nonstopux*)
3546 case $LD in
3547 *-32|*"-32 ") libmagic=32-bit;;
3548 *-n32|*"-n32 ") libmagic=N32;;
3549 *-64|*"-64 ") libmagic=64-bit;;
3550 *) libmagic=never-match;;
3551 esac
3552 lt_cv_deplibs_check_method=pass_all
3553 ;;
3554
3555 # This must be glibc/ELF.
3556 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3557 lt_cv_deplibs_check_method=pass_all
3558 ;;
3559
3560 netbsd* | netbsdelf*-gnu)
3561 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3562 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3563 else
3564 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3565 fi
3566 ;;
3567
3568 newos6*)
3569 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3570 lt_cv_file_magic_cmd=/usr/bin/file
3571 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3572 ;;
3573
3574 *nto* | *qnx*)
3575 lt_cv_deplibs_check_method=pass_all
3576 ;;
3577
3578 openbsd* | bitrig*)
3579 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3580 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3581 else
3582 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3583 fi
3584 ;;
3585
3586 osf3* | osf4* | osf5*)
3587 lt_cv_deplibs_check_method=pass_all
3588 ;;
3589
3590 rdos*)
3591 lt_cv_deplibs_check_method=pass_all
3592 ;;
3593
3594 solaris*)
3595 lt_cv_deplibs_check_method=pass_all
3596 ;;
3597
3598 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3599 lt_cv_deplibs_check_method=pass_all
3600 ;;
3601
3602 sysv4 | sysv4.3*)
3603 case $host_vendor in
3604 motorola)
3605 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]]'
3606 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3607 ;;
3608 ncr)
3609 lt_cv_deplibs_check_method=pass_all
3610 ;;
3611 sequent)
3612 lt_cv_file_magic_cmd='/bin/file'
3613 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3614 ;;
3615 sni)
3616 lt_cv_file_magic_cmd='/bin/file'
3617 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3618 lt_cv_file_magic_test_file=/lib/libc.so
3619 ;;
3620 siemens)
3621 lt_cv_deplibs_check_method=pass_all
3622 ;;
3623 pc)
3624 lt_cv_deplibs_check_method=pass_all
3625 ;;
3626 esac
3627 ;;
3628
3629 tpf*)
3630 lt_cv_deplibs_check_method=pass_all
3631 ;;
3632 os2*)
3633 lt_cv_deplibs_check_method=pass_all
3634 ;;
3635 esac
3636 ])
3637
3638 file_magic_glob=
3639 want_nocaseglob=no
3640 if test "$build" = "$host"; then
3641 case $host_os in
3642 mingw* | pw32*)
3643 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3644 want_nocaseglob=yes
3645 else
3646 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3647 fi
3648 ;;
3649 esac
3650 fi
3651
3652 file_magic_cmd=$lt_cv_file_magic_cmd
3653 deplibs_check_method=$lt_cv_deplibs_check_method
3654 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3655
3656 _LT_DECL([], [deplibs_check_method], [1],
3657 [Method to check whether dependent libraries are shared objects])
3658 _LT_DECL([], [file_magic_cmd], [1],
3659 [Command to use when deplibs_check_method = "file_magic"])
3660 _LT_DECL([], [file_magic_glob], [1],
3661 [How to find potential files when deplibs_check_method = "file_magic"])
3662 _LT_DECL([], [want_nocaseglob], [1],
3663 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3664 ])# _LT_CHECK_MAGIC_METHOD
3665
3666
3667 # LT_PATH_NM
3668 # ----------
3669 # find the pathname to a BSD- or MS-compatible name lister
3670 AC_DEFUN([LT_PATH_NM],
3671 [AC_REQUIRE([AC_PROG_CC])dnl
3672 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3673 [if test -n "$NM"; then
3674 # Let the user override the test.
3675 lt_cv_path_NM=$NM
3676 else
3677 lt_nm_to_check=${ac_tool_prefix}nm
3678 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3679 lt_nm_to_check="$lt_nm_to_check nm"
3680 fi
3681 for lt_tmp_nm in $lt_nm_to_check; do
3682 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3683 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3684 IFS=$lt_save_ifs
3685 test -z "$ac_dir" && ac_dir=.
3686 tmp_nm=$ac_dir/$lt_tmp_nm
3687 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3688 # Check to see if the nm accepts a BSD-compat flag.
3689 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3690 # nm: unknown option "B" ignored
3691 # Tru64's nm complains that /dev/null is an invalid object file
3692 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3693 case $build_os in
3694 mingw*) lt_bad_file=conftest.nm/nofile ;;
3695 *) lt_bad_file=/dev/null ;;
3696 esac
3697 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3698 *$lt_bad_file* | *'Invalid file or object type'*)
3699 lt_cv_path_NM="$tmp_nm -B"
3700 break 2
3701 ;;
3702 *)
3703 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3704 */dev/null*)
3705 lt_cv_path_NM="$tmp_nm -p"
3706 break 2
3707 ;;
3708 *)
3709 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3710 continue # so that we can try to find one that supports BSD flags
3711 ;;
3712 esac
3713 ;;
3714 esac
3715 fi
3716 done
3717 IFS=$lt_save_ifs
3718 done
3719 : ${lt_cv_path_NM=no}
3720 fi])
3721 if test no != "$lt_cv_path_NM"; then
3722 NM=$lt_cv_path_NM
3723 else
3724 # Didn't find any BSD compatible name lister, look for dumpbin.
3725 if test -n "$DUMPBIN"; then :
3726 # Let the user override the test.
3727 else
3728 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3729 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3730 *COFF*)
3731 DUMPBIN="$DUMPBIN -symbols -headers"
3732 ;;
3733 *)
3734 DUMPBIN=:
3735 ;;
3736 esac
3737 fi
3738 AC_SUBST([DUMPBIN])
3739 if test : != "$DUMPBIN"; then
3740 NM=$DUMPBIN
3741 fi
3742 fi
3743 test -z "$NM" && NM=nm
3744 AC_SUBST([NM])
3745 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3746
3747 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3748 [lt_cv_nm_interface="BSD nm"
3749 echo "int some_variable = 0;" > conftest.$ac_ext
3750 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3751 (eval "$ac_compile" 2>conftest.err)
3752 cat conftest.err >&AS_MESSAGE_LOG_FD
3753 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3754 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3755 cat conftest.err >&AS_MESSAGE_LOG_FD
3756 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3757 cat conftest.out >&AS_MESSAGE_LOG_FD
3758 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3759 lt_cv_nm_interface="MS dumpbin"
3760 fi
3761 rm -f conftest*])
3762 ])# LT_PATH_NM
3763
3764 # Old names:
3765 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3766 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3767 dnl aclocal-1.4 backwards compatibility:
3768 dnl AC_DEFUN([AM_PROG_NM], [])
3769 dnl AC_DEFUN([AC_PROG_NM], [])
3770
3771 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3772 # --------------------------------
3773 # how to determine the name of the shared library
3774 # associated with a specific link library.
3775 # -- PORTME fill in with the dynamic library characteristics
3776 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3777 [m4_require([_LT_DECL_EGREP])
3778 m4_require([_LT_DECL_OBJDUMP])
3779 m4_require([_LT_DECL_DLLTOOL])
3780 AC_CACHE_CHECK([how to associate runtime and link libraries],
3781 lt_cv_sharedlib_from_linklib_cmd,
3782 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3783
3784 case $host_os in
3785 cygwin* | mingw* | pw32* | cegcc*)
3786 # two different shell functions defined in ltmain.sh;
3787 # decide which one to use based on capabilities of $DLLTOOL
3788 case `$DLLTOOL --help 2>&1` in
3789 *--identify-strict*)
3790 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3791 ;;
3792 *)
3793 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3794 ;;
3795 esac
3796 ;;
3797 *)
3798 # fallback: assume linklib IS sharedlib
3799 lt_cv_sharedlib_from_linklib_cmd=$ECHO
3800 ;;
3801 esac
3802 ])
3803 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3804 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3805
3806 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3807 [Command to associate shared and link libraries])
3808 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3809
3810
3811 # _LT_PATH_MANIFEST_TOOL
3812 # ----------------------
3813 # locate the manifest tool
3814 m4_defun([_LT_PATH_MANIFEST_TOOL],
3815 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3816 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3817 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3818 [lt_cv_path_mainfest_tool=no
3819 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3820 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3821 cat conftest.err >&AS_MESSAGE_LOG_FD
3822 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3823 lt_cv_path_mainfest_tool=yes
3824 fi
3825 rm -f conftest*])
3826 if test yes != "$lt_cv_path_mainfest_tool"; then
3827 MANIFEST_TOOL=:
3828 fi
3829 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3830 ])# _LT_PATH_MANIFEST_TOOL
3831
3832
3833 # _LT_DLL_DEF_P([FILE])
3834 # ---------------------
3835 # True iff FILE is a Windows DLL '.def' file.
3836 # Keep in sync with func_dll_def_p in the libtool script
3837 AC_DEFUN([_LT_DLL_DEF_P],
3838 [dnl
3839 test DEF = "`$SED -n dnl
3840 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3841 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3842 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3843 -e q dnl Only consider the first "real" line
3844 $1`" dnl
3845 ])# _LT_DLL_DEF_P
3846
3847
3848 # LT_LIB_M
3849 # --------
3850 # check for math library
3851 AC_DEFUN([LT_LIB_M],
3852 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3853 LIBM=
3854 case $host in
3855 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3856 # These system don't have libm, or don't need it
3857 ;;
3858 *-ncr-sysv4.3*)
3859 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3860 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3861 ;;
3862 *)
3863 AC_CHECK_LIB(m, cos, LIBM=-lm)
3864 ;;
3865 esac
3866 AC_SUBST([LIBM])
3867 ])# LT_LIB_M
3868
3869 # Old name:
3870 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3871 dnl aclocal-1.4 backwards compatibility:
3872 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3873
3874
3875 # _LT_COMPILER_NO_RTTI([TAGNAME])
3876 # -------------------------------
3877 m4_defun([_LT_COMPILER_NO_RTTI],
3878 [m4_require([_LT_TAG_COMPILER])dnl
3879
3880 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3881
3882 if test yes = "$GCC"; then
3883 case $cc_basename in
3884 nvcc*)
3885 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3886 *)
3887 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3888 esac
3889
3890 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3891 lt_cv_prog_compiler_rtti_exceptions,
3892 [-fno-rtti -fno-exceptions], [],
3893 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3894 fi
3895 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3896 [Compiler flag to turn off builtin functions])
3897 ])# _LT_COMPILER_NO_RTTI
3898
3899
3900 # _LT_CMD_GLOBAL_SYMBOLS
3901 # ----------------------
3902 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3903 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3904 AC_REQUIRE([AC_PROG_CC])dnl
3905 AC_REQUIRE([AC_PROG_AWK])dnl
3906 AC_REQUIRE([LT_PATH_NM])dnl
3907 AC_REQUIRE([LT_PATH_LD])dnl
3908 m4_require([_LT_DECL_SED])dnl
3909 m4_require([_LT_DECL_EGREP])dnl
3910 m4_require([_LT_TAG_COMPILER])dnl
3911
3912 # Check for command to grab the raw symbol name followed by C symbol from nm.
3913 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3914 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3915 [
3916 # These are sane defaults that work on at least a few old systems.
3917 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3918
3919 # Character class describing NM global symbol codes.
3920 symcode='[[BCDEGRST]]'
3921
3922 # Regexp to match symbols that can be accessed directly from C.
3923 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3924
3925 # Define system-specific variables.
3926 case $host_os in
3927 aix*)
3928 symcode='[[BCDT]]'
3929 ;;
3930 cygwin* | mingw* | pw32* | cegcc*)
3931 symcode='[[ABCDGISTW]]'
3932 ;;
3933 hpux*)
3934 if test ia64 = "$host_cpu"; then
3935 symcode='[[ABCDEGRST]]'
3936 fi
3937 ;;
3938 irix* | nonstopux*)
3939 symcode='[[BCDEGRST]]'
3940 ;;
3941 osf*)
3942 symcode='[[BCDEGQRST]]'
3943 ;;
3944 solaris*)
3945 symcode='[[BDRT]]'
3946 ;;
3947 sco3.2v5*)
3948 symcode='[[DT]]'
3949 ;;
3950 sysv4.2uw2*)
3951 symcode='[[DT]]'
3952 ;;
3953 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3954 symcode='[[ABDT]]'
3955 ;;
3956 sysv4)
3957 symcode='[[DFNSTU]]'
3958 ;;
3959 esac
3960
3961 # If we're using GNU nm, then use its standard symbol codes.
3962 case `$NM -V 2>&1` in
3963 *GNU* | *'with BFD'*)
3964 symcode='[[ABCDGIRSTW]]' ;;
3965 esac
3966
3967 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3968 # Gets list of data symbols to import.
3969 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3970 # Adjust the below global symbol transforms to fixup imported variables.
3971 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3972 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3973 lt_c_name_lib_hook="\
3974 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3975 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3976 else
3977 # Disable hooks by default.
3978 lt_cv_sys_global_symbol_to_import=
3979 lt_cdecl_hook=
3980 lt_c_name_hook=
3981 lt_c_name_lib_hook=
3982 fi
3983
3984 # Transform an extracted symbol line into a proper C declaration.
3985 # Some systems (esp. on ia64) link data and code symbols differently,
3986 # so use this general approach.
3987 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3988 $lt_cdecl_hook\
3989 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3990 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
3991
3992 # Transform an extracted symbol line into symbol name and symbol address
3993 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3994 $lt_c_name_hook\
3995 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3996 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
3997
3998 # Transform an extracted symbol line into symbol name with lib prefix and
3999 # symbol address.
4000 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4001 $lt_c_name_lib_hook\
4002 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4003 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4004 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
4005
4006 # Handle CRLF in mingw tool chain
4007 opt_cr=
4008 case $build_os in
4009 mingw*)
4010 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4011 ;;
4012 esac
4013
4014 # Try without a prefix underscore, then with it.
4015 for ac_symprfx in "" "_"; do
4016
4017 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4018 symxfrm="\\1 $ac_symprfx\\2 \\2"
4019
4020 # Write the raw and C identifiers.
4021 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4022 # Fake it for dumpbin and say T for any non-static function,
4023 # D for any global variable and I for any imported variable.
4024 # Also find C++ and __fastcall symbols from MSVC++,
4025 # which start with @ or ?.
4026 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4027 " {last_section=section; section=\$ 3};"\
4028 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4029 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4030 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4031 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4032 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4033 " \$ 0!~/External *\|/{next};"\
4034 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4035 " {if(hide[section]) next};"\
4036 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4037 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4038 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4039 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4040 " ' prfx=^$ac_symprfx]"
4041 else
4042 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4043 fi
4044 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4045
4046 # Check to see that the pipe works correctly.
4047 pipe_works=no
4048
4049 rm -f conftest*
4050 cat > conftest.$ac_ext <<_LT_EOF
4051 #ifdef __cplusplus
4052 extern "C" {
4053 #endif
4054 char nm_test_var;
4055 void nm_test_func(void);
4056 void nm_test_func(void){}
4057 #ifdef __cplusplus
4058 }
4059 #endif
4060 int main(){nm_test_var='a';nm_test_func();return(0);}
4061 _LT_EOF
4062
4063 if AC_TRY_EVAL(ac_compile); then
4064 # Now try to grab the symbols.
4065 nlist=conftest.nm
4066 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4067 # Try sorting and uniquifying the output.
4068 if sort "$nlist" | uniq > "$nlist"T; then
4069 mv -f "$nlist"T "$nlist"
4070 else
4071 rm -f "$nlist"T
4072 fi
4073
4074 # Make sure that we snagged all the symbols we need.
4075 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4076 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4077 cat <<_LT_EOF > conftest.$ac_ext
4078 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4079 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4080 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4081 relocations are performed -- see ld's documentation on pseudo-relocs. */
4082 # define LT@&t@_DLSYM_CONST
4083 #elif defined __osf__
4084 /* This system does not cope well with relocations in const data. */
4085 # define LT@&t@_DLSYM_CONST
4086 #else
4087 # define LT@&t@_DLSYM_CONST const
4088 #endif
4089
4090 #ifdef __cplusplus
4091 extern "C" {
4092 #endif
4093
4094 _LT_EOF
4095 # Now generate the symbol file.
4096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4097
4098 cat <<_LT_EOF >> conftest.$ac_ext
4099
4100 /* The mapping between symbol names and symbols. */
4101 LT@&t@_DLSYM_CONST struct {
4102 const char *name;
4103 void *address;
4104 }
4105 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4106 {
4107 { "@PROGRAM@", (void *) 0 },
4108 _LT_EOF
4109 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4110 cat <<\_LT_EOF >> conftest.$ac_ext
4111 {0, (void *) 0}
4112 };
4113
4114 /* This works around a problem in FreeBSD linker */
4115 #ifdef FREEBSD_WORKAROUND
4116 static const void *lt_preloaded_setup() {
4117 return lt__PROGRAM__LTX_preloaded_symbols;
4118 }
4119 #endif
4120
4121 #ifdef __cplusplus
4122 }
4123 #endif
4124 _LT_EOF
4125 # Now try linking the two files.
4126 mv conftest.$ac_objext conftstm.$ac_objext
4127 lt_globsym_save_LIBS=$LIBS
4128 lt_globsym_save_CFLAGS=$CFLAGS
4129 LIBS=conftstm.$ac_objext
4130 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4131 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4132 pipe_works=yes
4133 fi
4134 LIBS=$lt_globsym_save_LIBS
4135 CFLAGS=$lt_globsym_save_CFLAGS
4136 else
4137 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4138 fi
4139 else
4140 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4141 fi
4142 else
4143 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4144 fi
4145 else
4146 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4147 cat conftest.$ac_ext >&5
4148 fi
4149 rm -rf conftest* conftst*
4150
4151 # Do not use the global_symbol_pipe unless it works.
4152 if test yes = "$pipe_works"; then
4153 break
4154 else
4155 lt_cv_sys_global_symbol_pipe=
4156 fi
4157 done
4158 ])
4159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4160 lt_cv_sys_global_symbol_to_cdecl=
4161 fi
4162 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4163 AC_MSG_RESULT(failed)
4164 else
4165 AC_MSG_RESULT(ok)
4166 fi
4167
4168 # Response file support.
4169 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4170 nm_file_list_spec='@'
4171 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4172 nm_file_list_spec='@'
4173 fi
4174
4175 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4176 [Take the output of nm and produce a listing of raw symbols and C names])
4177 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4178 [Transform the output of nm in a proper C declaration])
4179 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4180 [Transform the output of nm into a list of symbols to manually relocate])
4181 _LT_DECL([global_symbol_to_c_name_address],
4182 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4183 [Transform the output of nm in a C name address pair])
4184 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4185 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4186 [Transform the output of nm in a C name address pair when lib prefix is needed])
4187 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4188 [The name lister interface])
4189 _LT_DECL([], [nm_file_list_spec], [1],
4190 [Specify filename containing input files for $NM])
4191 ]) # _LT_CMD_GLOBAL_SYMBOLS
4192
4193
4194 # _LT_COMPILER_PIC([TAGNAME])
4195 # ---------------------------
4196 m4_defun([_LT_COMPILER_PIC],
4197 [m4_require([_LT_TAG_COMPILER])dnl
4198 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4199 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4200 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4201
4202 m4_if([$1], [CXX], [
4203 # C++ specific cases for pic, static, wl, etc.
4204 if test yes = "$GXX"; then
4205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4207
4208 case $host_os in
4209 aix*)
4210 # All AIX code is PIC.
4211 if test ia64 = "$host_cpu"; then
4212 # AIX 5 now supports IA64 processor
4213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4214 fi
4215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4216 ;;
4217
4218 amigaos*)
4219 case $host_cpu in
4220 powerpc)
4221 # see comment about AmigaOS4 .so support
4222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4223 ;;
4224 m68k)
4225 # FIXME: we need at least 68020 code to build shared libraries, but
4226 # adding the '-m68020' flag to GCC prevents building anything better,
4227 # like '-m68040'.
4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4229 ;;
4230 esac
4231 ;;
4232
4233 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4234 # PIC is the default for these OSes.
4235 ;;
4236 mingw* | cygwin* | os2* | pw32* | cegcc*)
4237 # This hack is so that the source file can tell whether it is being
4238 # built for inclusion in a dll (and should export symbols for example).
4239 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4240 # (--disable-auto-import) libraries
4241 m4_if([$1], [GCJ], [],
4242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4243 case $host_os in
4244 os2*)
4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4246 ;;
4247 esac
4248 ;;
4249 darwin* | rhapsody*)
4250 # PIC is the default on this platform
4251 # Common symbols not allowed in MH_DYLIB files
4252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4253 ;;
4254 *djgpp*)
4255 # DJGPP does not support shared libraries at all
4256 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4257 ;;
4258 haiku*)
4259 # PIC is the default for Haiku.
4260 # The "-static" flag exists, but is broken.
4261 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4262 ;;
4263 interix[[3-9]]*)
4264 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4265 # Instead, we relocate shared libraries at runtime.
4266 ;;
4267 sysv4*MP*)
4268 if test -d /usr/nec; then
4269 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4270 fi
4271 ;;
4272 hpux*)
4273 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4274 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4275 # sets the default TLS model and affects inlining.
4276 case $host_cpu in
4277 hppa*64*)
4278 ;;
4279 *)
4280 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4281 ;;
4282 esac
4283 ;;
4284 *qnx* | *nto*)
4285 # QNX uses GNU C++, but need to define -shared option too, otherwise
4286 # it will coredump.
4287 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4288 ;;
4289 *)
4290 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4291 ;;
4292 esac
4293 else
4294 case $host_os in
4295 aix[[4-9]]*)
4296 # All AIX code is PIC.
4297 if test ia64 = "$host_cpu"; then
4298 # AIX 5 now supports IA64 processor
4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4300 else
4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4302 fi
4303 ;;
4304 chorus*)
4305 case $cc_basename in
4306 cxch68*)
4307 # Green Hills C++ Compiler
4308 # _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"
4309 ;;
4310 esac
4311 ;;
4312 mingw* | cygwin* | os2* | pw32* | cegcc*)
4313 # This hack is so that the source file can tell whether it is being
4314 # built for inclusion in a dll (and should export symbols for example).
4315 m4_if([$1], [GCJ], [],
4316 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4317 ;;
4318 dgux*)
4319 case $cc_basename in
4320 ec++*)
4321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4322 ;;
4323 ghcx*)
4324 # Green Hills C++ Compiler
4325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4326 ;;
4327 *)
4328 ;;
4329 esac
4330 ;;
4331 freebsd* | dragonfly*)
4332 # FreeBSD uses GNU C++
4333 ;;
4334 hpux9* | hpux10* | hpux11*)
4335 case $cc_basename in
4336 CC*)
4337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4338 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4339 if test ia64 != "$host_cpu"; then
4340 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4341 fi
4342 ;;
4343 aCC*)
4344 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4345 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4346 case $host_cpu in
4347 hppa*64*|ia64*)
4348 # +Z the default
4349 ;;
4350 *)
4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4352 ;;
4353 esac
4354 ;;
4355 *)
4356 ;;
4357 esac
4358 ;;
4359 interix*)
4360 # This is c89, which is MS Visual C++ (no shared libs)
4361 # Anyone wants to do a port?
4362 ;;
4363 irix5* | irix6* | nonstopux*)
4364 case $cc_basename in
4365 CC*)
4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4367 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4368 # CC pic flag -KPIC is the default.
4369 ;;
4370 *)
4371 ;;
4372 esac
4373 ;;
4374 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4375 case $cc_basename in
4376 KCC*)
4377 # KAI C++ Compiler
4378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4380 ;;
4381 ecpc* )
4382 # old Intel C++ for x86_64, which still supported -KPIC.
4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4386 ;;
4387 icpc* )
4388 # Intel C++, used to be incompatible with GCC.
4389 # ICC 10 doesn't accept -KPIC any more.
4390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4391 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4393 ;;
4394 pgCC* | pgcpp*)
4395 # Portland Group C++ compiler
4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4399 ;;
4400 cxx*)
4401 # Compaq C++
4402 # Make sure the PIC flag is empty. It appears that all Alpha
4403 # Linux and Compaq Tru64 Unix objects are PIC.
4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4406 ;;
4407 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4408 # IBM XL 8.0, 9.0 on PPC and BlueGene
4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4412 ;;
4413 *)
4414 case `$CC -V 2>&1 | sed 5q` in
4415 *Sun\ C*)
4416 # Sun C++ 5.9
4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4420 ;;
4421 esac
4422 ;;
4423 esac
4424 ;;
4425 lynxos*)
4426 ;;
4427 m88k*)
4428 ;;
4429 mvs*)
4430 case $cc_basename in
4431 cxx*)
4432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4433 ;;
4434 *)
4435 ;;
4436 esac
4437 ;;
4438 netbsd* | netbsdelf*-gnu)
4439 ;;
4440 *qnx* | *nto*)
4441 # QNX uses GNU C++, but need to define -shared option too, otherwise
4442 # it will coredump.
4443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4444 ;;
4445 osf3* | osf4* | osf5*)
4446 case $cc_basename in
4447 KCC*)
4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4449 ;;
4450 RCC*)
4451 # Rational C++ 2.4.1
4452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4453 ;;
4454 cxx*)
4455 # Digital/Compaq C++
4456 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4457 # Make sure the PIC flag is empty. It appears that all Alpha
4458 # Linux and Compaq Tru64 Unix objects are PIC.
4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4461 ;;
4462 *)
4463 ;;
4464 esac
4465 ;;
4466 psos*)
4467 ;;
4468 solaris*)
4469 case $cc_basename in
4470 CC* | sunCC*)
4471 # Sun C++ 4.2, 5.x and Centerline C++
4472 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4473 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4475 ;;
4476 gcx*)
4477 # Green Hills C++ Compiler
4478 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4479 ;;
4480 *)
4481 ;;
4482 esac
4483 ;;
4484 sunos4*)
4485 case $cc_basename in
4486 CC*)
4487 # Sun C++ 4.x
4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4490 ;;
4491 lcc*)
4492 # Lucid
4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4494 ;;
4495 *)
4496 ;;
4497 esac
4498 ;;
4499 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4500 case $cc_basename in
4501 CC*)
4502 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4505 ;;
4506 esac
4507 ;;
4508 tandem*)
4509 case $cc_basename in
4510 NCC*)
4511 # NonStop-UX NCC 3.20
4512 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4513 ;;
4514 *)
4515 ;;
4516 esac
4517 ;;
4518 vxworks*)
4519 ;;
4520 *)
4521 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4522 ;;
4523 esac
4524 fi
4525 ],
4526 [
4527 if test yes = "$GCC"; then
4528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4530
4531 case $host_os in
4532 aix*)
4533 # All AIX code is PIC.
4534 if test ia64 = "$host_cpu"; then
4535 # AIX 5 now supports IA64 processor
4536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4537 fi
4538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4539 ;;
4540
4541 amigaos*)
4542 case $host_cpu in
4543 powerpc)
4544 # see comment about AmigaOS4 .so support
4545 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4546 ;;
4547 m68k)
4548 # FIXME: we need at least 68020 code to build shared libraries, but
4549 # adding the '-m68020' flag to GCC prevents building anything better,
4550 # like '-m68040'.
4551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4552 ;;
4553 esac
4554 ;;
4555
4556 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4557 # PIC is the default for these OSes.
4558 ;;
4559
4560 mingw* | cygwin* | pw32* | os2* | cegcc*)
4561 # This hack is so that the source file can tell whether it is being
4562 # built for inclusion in a dll (and should export symbols for example).
4563 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4564 # (--disable-auto-import) libraries
4565 m4_if([$1], [GCJ], [],
4566 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4567 case $host_os in
4568 os2*)
4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4570 ;;
4571 esac
4572 ;;
4573
4574 darwin* | rhapsody*)
4575 # PIC is the default on this platform
4576 # Common symbols not allowed in MH_DYLIB files
4577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4578 ;;
4579
4580 haiku*)
4581 # PIC is the default for Haiku.
4582 # The "-static" flag exists, but is broken.
4583 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4584 ;;
4585
4586 hpux*)
4587 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4588 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4589 # sets the default TLS model and affects inlining.
4590 case $host_cpu in
4591 hppa*64*)
4592 # +Z the default
4593 ;;
4594 *)
4595 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4596 ;;
4597 esac
4598 ;;
4599
4600 interix[[3-9]]*)
4601 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4602 # Instead, we relocate shared libraries at runtime.
4603 ;;
4604
4605 msdosdjgpp*)
4606 # Just because we use GCC doesn't mean we suddenly get shared libraries
4607 # on systems that don't support them.
4608 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4609 enable_shared=no
4610 ;;
4611
4612 *nto* | *qnx*)
4613 # QNX uses GNU C++, but need to define -shared option too, otherwise
4614 # it will coredump.
4615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4616 ;;
4617
4618 sysv4*MP*)
4619 if test -d /usr/nec; then
4620 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4621 fi
4622 ;;
4623
4624 *)
4625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4626 ;;
4627 esac
4628
4629 case $cc_basename in
4630 nvcc*) # Cuda Compiler Driver 2.2
4631 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4632 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4633 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4634 fi
4635 ;;
4636 esac
4637 else
4638 # PORTME Check for flag to pass linker flags through the system compiler.
4639 case $host_os in
4640 aix*)
4641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4642 if test ia64 = "$host_cpu"; then
4643 # AIX 5 now supports IA64 processor
4644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4645 else
4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4647 fi
4648 ;;
4649
4650 darwin* | rhapsody*)
4651 # PIC is the default on this platform
4652 # Common symbols not allowed in MH_DYLIB files
4653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4654 case $cc_basename in
4655 nagfor*)
4656 # NAG Fortran compiler
4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4660 ;;
4661 esac
4662 ;;
4663
4664 mingw* | cygwin* | pw32* | os2* | cegcc*)
4665 # This hack is so that the source file can tell whether it is being
4666 # built for inclusion in a dll (and should export symbols for example).
4667 m4_if([$1], [GCJ], [],
4668 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4669 case $host_os in
4670 os2*)
4671 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4672 ;;
4673 esac
4674 ;;
4675
4676 hpux9* | hpux10* | hpux11*)
4677 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4678 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4679 # not for PA HP-UX.
4680 case $host_cpu in
4681 hppa*64*|ia64*)
4682 # +Z the default
4683 ;;
4684 *)
4685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4686 ;;
4687 esac
4688 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4689 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4690 ;;
4691
4692 irix5* | irix6* | nonstopux*)
4693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4694 # PIC (with -KPIC) is the default.
4695 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4696 ;;
4697
4698 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4699 case $cc_basename in
4700 # old Intel for x86_64, which still supported -KPIC.
4701 ecc*)
4702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4705 ;;
4706 # icc used to be incompatible with GCC.
4707 # ICC 10 doesn't accept -KPIC any more.
4708 icc* | ifort*)
4709 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4710 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4711 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4712 ;;
4713 # Lahey Fortran 8.1.
4714 lf95*)
4715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4716 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4717 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4718 ;;
4719 nagfor*)
4720 # NAG Fortran compiler
4721 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4723 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4724 ;;
4725 tcc*)
4726 # Fabrice Bellard et al's Tiny C Compiler
4727 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4730 ;;
4731 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4732 # Portland Group compilers (*not* the Pentium gcc compiler,
4733 # which looks to be a dead project)
4734 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4735 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4736 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4737 ;;
4738 ccc*)
4739 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4740 # All Alpha code is PIC.
4741 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4742 ;;
4743 xl* | bgxl* | bgf* | mpixl*)
4744 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4746 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4747 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4748 ;;
4749 *)
4750 case `$CC -V 2>&1 | sed 5q` in
4751 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4752 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4753 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4754 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4755 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4756 ;;
4757 *Sun\ F* | *Sun*Fortran*)
4758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4759 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4761 ;;
4762 *Sun\ C*)
4763 # Sun C 5.9
4764 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4765 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4767 ;;
4768 *Intel*\ [[CF]]*Compiler*)
4769 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4770 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4771 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4772 ;;
4773 *Portland\ Group*)
4774 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4775 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4776 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4777 ;;
4778 esac
4779 ;;
4780 esac
4781 ;;
4782
4783 newsos6)
4784 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4786 ;;
4787
4788 *nto* | *qnx*)
4789 # QNX uses GNU C++, but need to define -shared option too, otherwise
4790 # it will coredump.
4791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4792 ;;
4793
4794 osf3* | osf4* | osf5*)
4795 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4796 # All OSF/1 code is PIC.
4797 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4798 ;;
4799
4800 rdos*)
4801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4802 ;;
4803
4804 solaris*)
4805 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4807 case $cc_basename in
4808 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4809 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4810 *)
4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4812 esac
4813 ;;
4814
4815 sunos4*)
4816 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4817 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4818 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4819 ;;
4820
4821 sysv4 | sysv4.2uw2* | sysv4.3*)
4822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4823 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4825 ;;
4826
4827 sysv4*MP*)
4828 if test -d /usr/nec; then
4829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4831 fi
4832 ;;
4833
4834 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4838 ;;
4839
4840 unicos*)
4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4842 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4843 ;;
4844
4845 uts4*)
4846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4847 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4848 ;;
4849
4850 *)
4851 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4852 ;;
4853 esac
4854 fi
4855 ])
4856 case $host_os in
4857 # For platforms that do not support PIC, -DPIC is meaningless:
4858 *djgpp*)
4859 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4860 ;;
4861 *)
4862 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4863 ;;
4864 esac
4865
4866 AC_CACHE_CHECK([for $compiler option to produce PIC],
4867 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4868 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4869 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4870
4871 #
4872 # Check to make sure the PIC flag actually works.
4873 #
4874 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4875 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4876 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4877 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4878 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4879 "" | " "*) ;;
4880 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4881 esac],
4882 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4883 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4884 fi
4885 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4886 [Additional compiler flags for building library objects])
4887
4888 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4889 [How to pass a linker flag through the compiler])
4890 #
4891 # Check to make sure the static flag actually works.
4892 #
4893 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4894 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4895 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4896 $lt_tmp_static_flag,
4897 [],
4898 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4899 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4900 [Compiler flag to prevent dynamic linking])
4901 ])# _LT_COMPILER_PIC
4902
4903
4904 # _LT_LINKER_SHLIBS([TAGNAME])
4905 # ----------------------------
4906 # See if the linker supports building shared libraries.
4907 m4_defun([_LT_LINKER_SHLIBS],
4908 [AC_REQUIRE([LT_PATH_LD])dnl
4909 AC_REQUIRE([LT_PATH_NM])dnl
4910 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4911 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4912 m4_require([_LT_DECL_EGREP])dnl
4913 m4_require([_LT_DECL_SED])dnl
4914 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4915 m4_require([_LT_TAG_COMPILER])dnl
4916 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4917 m4_if([$1], [CXX], [
4918 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4919 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4920 case $host_os in
4921 aix[[4-9]]*)
4922 # If we're using GNU nm, then we don't want the "-C" option.
4923 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4924 # Without the "-l" option, or with the "-B" option, AIX nm treats
4925 # weak defined symbols like other global defined symbols, whereas
4926 # GNU nm marks them as "W".
4927 # While the 'weak' keyword is ignored in the Export File, we need
4928 # it in the Import File for the 'aix-soname' feature, so we have
4929 # to replace the "-B" option with "-P" for AIX nm.
4930 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4931 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
4932 else
4933 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4934 fi
4935 ;;
4936 pw32*)
4937 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4938 ;;
4939 cygwin* | mingw* | cegcc*)
4940 case $cc_basename in
4941 cl*)
4942 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4943 ;;
4944 *)
4945 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4946 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4947 ;;
4948 esac
4949 ;;
4950 linux* | k*bsd*-gnu | gnu*)
4951 _LT_TAGVAR(link_all_deplibs, $1)=no
4952 ;;
4953 *)
4954 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4955 ;;
4956 esac
4957 ], [
4958 runpath_var=
4959 _LT_TAGVAR(allow_undefined_flag, $1)=
4960 _LT_TAGVAR(always_export_symbols, $1)=no
4961 _LT_TAGVAR(archive_cmds, $1)=
4962 _LT_TAGVAR(archive_expsym_cmds, $1)=
4963 _LT_TAGVAR(compiler_needs_object, $1)=no
4964 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4965 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4966 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4967 _LT_TAGVAR(hardcode_automatic, $1)=no
4968 _LT_TAGVAR(hardcode_direct, $1)=no
4969 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4970 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4971 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4972 _LT_TAGVAR(hardcode_minus_L, $1)=no
4973 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4974 _LT_TAGVAR(inherit_rpath, $1)=no
4975 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4976 _LT_TAGVAR(module_cmds, $1)=
4977 _LT_TAGVAR(module_expsym_cmds, $1)=
4978 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4979 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4980 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4981 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4982 # include_expsyms should be a list of space-separated symbols to be *always*
4983 # included in the symbol list
4984 _LT_TAGVAR(include_expsyms, $1)=
4985 # exclude_expsyms can be an extended regexp of symbols to exclude
4986 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4987 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4988 # as well as any symbol that contains 'd'.
4989 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4990 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4991 # platforms (ab)use it in PIC code, but their linkers get confused if
4992 # the symbol is explicitly referenced. Since portable code cannot
4993 # rely on this symbol name, it's probably fine to never include it in
4994 # preloaded symbol tables.
4995 # Exclude shared library initialization/finalization symbols.
4996 dnl Note also adjust exclude_expsyms for C++ above.
4997 extract_expsyms_cmds=
4998
4999 case $host_os in
5000 cygwin* | mingw* | pw32* | cegcc*)
5001 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5002 # When not using gcc, we currently assume that we are using
5003 # Microsoft Visual C++.
5004 if test yes != "$GCC"; then
5005 with_gnu_ld=no
5006 fi
5007 ;;
5008 interix*)
5009 # we just hope/assume this is gcc and not c89 (= MSVC++)
5010 with_gnu_ld=yes
5011 ;;
5012 openbsd* | bitrig*)
5013 with_gnu_ld=no
5014 ;;
5015 linux* | k*bsd*-gnu | gnu*)
5016 _LT_TAGVAR(link_all_deplibs, $1)=no
5017 ;;
5018 esac
5019
5020 _LT_TAGVAR(ld_shlibs, $1)=yes
5021
5022 # On some targets, GNU ld is compatible enough with the native linker
5023 # that we're better off using the native interface for both.
5024 lt_use_gnu_ld_interface=no
5025 if test yes = "$with_gnu_ld"; then
5026 case $host_os in
5027 aix*)
5028 # The AIX port of GNU ld has always aspired to compatibility
5029 # with the native linker. However, as the warning in the GNU ld
5030 # block says, versions before 2.19.5* couldn't really create working
5031 # shared libraries, regardless of the interface used.
5032 case `$LD -v 2>&1` in
5033 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5034 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5035 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5036 *)
5037 lt_use_gnu_ld_interface=yes
5038 ;;
5039 esac
5040 ;;
5041 *)
5042 lt_use_gnu_ld_interface=yes
5043 ;;
5044 esac
5045 fi
5046
5047 if test yes = "$lt_use_gnu_ld_interface"; then
5048 # If archive_cmds runs LD, not CC, wlarc should be empty
5049 wlarc='$wl'
5050
5051 # Set some defaults for GNU ld with shared library support. These
5052 # are reset later if shared libraries are not supported. Putting them
5053 # here allows them to be overridden if necessary.
5054 runpath_var=LD_RUN_PATH
5055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5057 # ancient GNU ld didn't support --whole-archive et. al.
5058 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5059 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5060 else
5061 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5062 fi
5063 supports_anon_versioning=no
5064 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5065 *GNU\ gold*) supports_anon_versioning=yes ;;
5066 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5067 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5068 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5069 *\ 2.11.*) ;; # other 2.11 versions
5070 *) supports_anon_versioning=yes ;;
5071 esac
5072
5073 # See if GNU ld supports shared libraries.
5074 case $host_os in
5075 aix[[3-9]]*)
5076 # On AIX/PPC, the GNU linker is very broken
5077 if test ia64 != "$host_cpu"; then
5078 _LT_TAGVAR(ld_shlibs, $1)=no
5079 cat <<_LT_EOF 1>&2
5080
5081 *** Warning: the GNU linker, at least up to release 2.19, is reported
5082 *** to be unable to reliably create shared libraries on AIX.
5083 *** Therefore, libtool is disabling shared libraries support. If you
5084 *** really care for shared libraries, you may want to install binutils
5085 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5086 *** You will then need to restart the configuration process.
5087
5088 _LT_EOF
5089 fi
5090 ;;
5091
5092 amigaos*)
5093 case $host_cpu in
5094 powerpc)
5095 # see comment about AmigaOS4 .so support
5096 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5097 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5098 ;;
5099 m68k)
5100 _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)'
5101 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5102 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5103 ;;
5104 esac
5105 ;;
5106
5107 beos*)
5108 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5109 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5110 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5111 # support --undefined. This deserves some investigation. FIXME
5112 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5113 else
5114 _LT_TAGVAR(ld_shlibs, $1)=no
5115 fi
5116 ;;
5117
5118 cygwin* | mingw* | pw32* | cegcc*)
5119 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5120 # as there is no search path for DLLs.
5121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5122 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5123 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5124 _LT_TAGVAR(always_export_symbols, $1)=no
5125 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5126 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5127 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5128
5129 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5130 _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'
5131 # If the export-symbols file already is a .def file, use it as
5132 # is; otherwise, prepend EXPORTS...
5133 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5134 cp $export_symbols $output_objdir/$soname.def;
5135 else
5136 echo EXPORTS > $output_objdir/$soname.def;
5137 cat $export_symbols >> $output_objdir/$soname.def;
5138 fi~
5139 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5140 else
5141 _LT_TAGVAR(ld_shlibs, $1)=no
5142 fi
5143 ;;
5144
5145 haiku*)
5146 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5147 _LT_TAGVAR(link_all_deplibs, $1)=yes
5148 ;;
5149
5150 os2*)
5151 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5152 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5153 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5154 shrext_cmds=.dll
5155 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5156 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5157 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5158 $ECHO EXPORTS >> $output_objdir/$libname.def~
5159 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5160 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5161 emximp -o $lib $output_objdir/$libname.def'
5162 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5163 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5164 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5165 $ECHO EXPORTS >> $output_objdir/$libname.def~
5166 prefix_cmds="$SED"~
5167 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5168 prefix_cmds="$prefix_cmds -e 1d";
5169 fi~
5170 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5171 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5172 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5173 emximp -o $lib $output_objdir/$libname.def'
5174 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5175 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5176 ;;
5177
5178 interix[[3-9]]*)
5179 _LT_TAGVAR(hardcode_direct, $1)=no
5180 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5182 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5183 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5184 # Instead, shared libraries are loaded at an image base (0x10000000 by
5185 # default) and relocated if they conflict, which is a slow very memory
5186 # consuming and fragmenting process. To avoid this, we pick a random,
5187 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5188 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5189 _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'
5190 _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'
5191 ;;
5192
5193 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5194 tmp_diet=no
5195 if test linux-dietlibc = "$host_os"; then
5196 case $cc_basename in
5197 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5198 esac
5199 fi
5200 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5201 && test no = "$tmp_diet"
5202 then
5203 tmp_addflag=' $pic_flag'
5204 tmp_sharedflag='-shared'
5205 case $cc_basename,$host_cpu in
5206 pgcc*) # Portland Group C compiler
5207 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5208 tmp_addflag=' $pic_flag'
5209 ;;
5210 pgf77* | pgf90* | pgf95* | pgfortran*)
5211 # Portland Group f77 and f90 compilers
5212 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5213 tmp_addflag=' $pic_flag -Mnomain' ;;
5214 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5215 tmp_addflag=' -i_dynamic' ;;
5216 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5217 tmp_addflag=' -i_dynamic -nofor_main' ;;
5218 ifc* | ifort*) # Intel Fortran compiler
5219 tmp_addflag=' -nofor_main' ;;
5220 lf95*) # Lahey Fortran 8.1
5221 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5222 tmp_sharedflag='--shared' ;;
5223 nagfor*) # NAGFOR 5.3
5224 tmp_sharedflag='-Wl,-shared' ;;
5225 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5226 tmp_sharedflag='-qmkshrobj'
5227 tmp_addflag= ;;
5228 nvcc*) # Cuda Compiler Driver 2.2
5229 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5230 _LT_TAGVAR(compiler_needs_object, $1)=yes
5231 ;;
5232 esac
5233 case `$CC -V 2>&1 | sed 5q` in
5234 *Sun\ C*) # Sun C 5.9
5235 _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; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5236 _LT_TAGVAR(compiler_needs_object, $1)=yes
5237 tmp_sharedflag='-G' ;;
5238 *Sun\ F*) # Sun Fortran 8.3
5239 tmp_sharedflag='-G' ;;
5240 esac
5241 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5242
5243 if test yes = "$supports_anon_versioning"; then
5244 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5245 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5246 echo "local: *; };" >> $output_objdir/$libname.ver~
5247 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5248 fi
5249
5250 case $cc_basename in
5251 tcc*)
5252 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5253 ;;
5254 xlf* | bgf* | bgxlf* | mpixlf*)
5255 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5256 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5257 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5258 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5259 if test yes = "$supports_anon_versioning"; then
5260 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5261 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5262 echo "local: *; };" >> $output_objdir/$libname.ver~
5263 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5264 fi
5265 ;;
5266 esac
5267 else
5268 _LT_TAGVAR(ld_shlibs, $1)=no
5269 fi
5270 ;;
5271
5272 netbsd* | netbsdelf*-gnu)
5273 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5274 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5275 wlarc=
5276 else
5277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5278 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5279 fi
5280 ;;
5281
5282 solaris*)
5283 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5284 _LT_TAGVAR(ld_shlibs, $1)=no
5285 cat <<_LT_EOF 1>&2
5286
5287 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5288 *** create shared libraries on Solaris systems. Therefore, libtool
5289 *** is disabling shared libraries support. We urge you to upgrade GNU
5290 *** binutils to release 2.9.1 or newer. Another option is to modify
5291 *** your PATH or compiler configuration so that the native linker is
5292 *** used, and then restart.
5293
5294 _LT_EOF
5295 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5297 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5298 else
5299 _LT_TAGVAR(ld_shlibs, $1)=no
5300 fi
5301 ;;
5302
5303 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5304 case `$LD -v 2>&1` in
5305 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5306 _LT_TAGVAR(ld_shlibs, $1)=no
5307 cat <<_LT_EOF 1>&2
5308
5309 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5310 *** reliably create shared libraries on SCO systems. Therefore, libtool
5311 *** is disabling shared libraries support. We urge you to upgrade GNU
5312 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5313 *** your PATH or compiler configuration so that the native linker is
5314 *** used, and then restart.
5315
5316 _LT_EOF
5317 ;;
5318 *)
5319 # For security reasons, it is highly recommended that you always
5320 # use absolute paths for naming shared libraries, and exclude the
5321 # DT_RUNPATH tag from executables and libraries. But doing so
5322 # requires that you compile everything twice, which is a pain.
5323 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5326 _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'
5327 else
5328 _LT_TAGVAR(ld_shlibs, $1)=no
5329 fi
5330 ;;
5331 esac
5332 ;;
5333
5334 sunos4*)
5335 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5336 wlarc=
5337 _LT_TAGVAR(hardcode_direct, $1)=yes
5338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5339 ;;
5340
5341 *)
5342 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5345 else
5346 _LT_TAGVAR(ld_shlibs, $1)=no
5347 fi
5348 ;;
5349 esac
5350
5351 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5352 runpath_var=
5353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5354 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5355 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5356 fi
5357 else
5358 # PORTME fill in a description of your system's linker (not GNU ld)
5359 case $host_os in
5360 aix3*)
5361 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5362 _LT_TAGVAR(always_export_symbols, $1)=yes
5363 _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'
5364 # Note: this linker hardcodes the directories in LIBPATH if there
5365 # are no directories specified by -L.
5366 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5367 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5368 # Neither direct hardcoding nor static linking is supported with a
5369 # broken collect2.
5370 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5371 fi
5372 ;;
5373
5374 aix[[4-9]]*)
5375 if test ia64 = "$host_cpu"; then
5376 # On IA64, the linker does run time linking by default, so we don't
5377 # have to do anything special.
5378 aix_use_runtimelinking=no
5379 exp_sym_flag='-Bexport'
5380 no_entry_flag=
5381 else
5382 # If we're using GNU nm, then we don't want the "-C" option.
5383 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5384 # Without the "-l" option, or with the "-B" option, AIX nm treats
5385 # weak defined symbols like other global defined symbols, whereas
5386 # GNU nm marks them as "W".
5387 # While the 'weak' keyword is ignored in the Export File, we need
5388 # it in the Import File for the 'aix-soname' feature, so we have
5389 # to replace the "-B" option with "-P" for AIX nm.
5390 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5391 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5392 else
5393 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5394 fi
5395 aix_use_runtimelinking=no
5396
5397 # Test if we are trying to use run time linking or normal
5398 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5399 # have runtime linking enabled, and use it for executables.
5400 # For shared libraries, we enable/disable runtime linking
5401 # depending on the kind of the shared library created -
5402 # when "with_aix_soname,aix_use_runtimelinking" is:
5403 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5404 # "aix,yes" lib.so shared, rtl:yes, for executables
5405 # lib.a static archive
5406 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5407 # lib.a(lib.so.V) shared, rtl:no, for executables
5408 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5409 # lib.a(lib.so.V) shared, rtl:no
5410 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5411 # lib.a static archive
5412 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5413 for ld_flag in $LDFLAGS; do
5414 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5415 aix_use_runtimelinking=yes
5416 break
5417 fi
5418 done
5419 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5420 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5421 # so we don't have lib.a shared libs to link our executables.
5422 # We have to force runtime linking in this case.
5423 aix_use_runtimelinking=yes
5424 LDFLAGS="$LDFLAGS -Wl,-brtl"
5425 fi
5426 ;;
5427 esac
5428
5429 exp_sym_flag='-bexport'
5430 no_entry_flag='-bnoentry'
5431 fi
5432
5433 # When large executables or shared objects are built, AIX ld can
5434 # have problems creating the table of contents. If linking a library
5435 # or program results in "error TOC overflow" add -mminimal-toc to
5436 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5437 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5438
5439 _LT_TAGVAR(archive_cmds, $1)=''
5440 _LT_TAGVAR(hardcode_direct, $1)=yes
5441 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5442 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5443 _LT_TAGVAR(link_all_deplibs, $1)=yes
5444 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5445 case $with_aix_soname,$aix_use_runtimelinking in
5446 aix,*) ;; # traditional, no import file
5447 svr4,* | *,yes) # use import file
5448 # The Import File defines what to hardcode.
5449 _LT_TAGVAR(hardcode_direct, $1)=no
5450 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5451 ;;
5452 esac
5453
5454 if test yes = "$GCC"; then
5455 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5456 # We only want to do this on AIX 4.2 and lower, the check
5457 # below for broken collect2 doesn't work under 4.3+
5458 collect2name=`$CC -print-prog-name=collect2`
5459 if test -f "$collect2name" &&
5460 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5461 then
5462 # We have reworked collect2
5463 :
5464 else
5465 # We have old collect2
5466 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5467 # It fails to find uninstalled libraries when the uninstalled
5468 # path is not listed in the libpath. Setting hardcode_minus_L
5469 # to unsupported forces relinking
5470 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5471 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5472 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5473 fi
5474 ;;
5475 esac
5476 shared_flag='-shared'
5477 if test yes = "$aix_use_runtimelinking"; then
5478 shared_flag="$shared_flag "'$wl-G'
5479 fi
5480 # Need to ensure runtime linking is disabled for the traditional
5481 # shared library, or the linker may eventually find shared libraries
5482 # /with/ Import File - we do not want to mix them.
5483 shared_flag_aix='-shared'
5484 shared_flag_svr4='-shared $wl-G'
5485 else
5486 # not using gcc
5487 if test ia64 = "$host_cpu"; then
5488 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5489 # chokes on -Wl,-G. The following line is correct:
5490 shared_flag='-G'
5491 else
5492 if test yes = "$aix_use_runtimelinking"; then
5493 shared_flag='$wl-G'
5494 else
5495 shared_flag='$wl-bM:SRE'
5496 fi
5497 shared_flag_aix='$wl-bM:SRE'
5498 shared_flag_svr4='$wl-G'
5499 fi
5500 fi
5501
5502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5503 # It seems that -bexpall does not export symbols beginning with
5504 # underscore (_), so it is better to generate a list of symbols to export.
5505 _LT_TAGVAR(always_export_symbols, $1)=yes
5506 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5507 # Warning - without using the other runtime loading flags (-brtl),
5508 # -berok will link without error, but may produce a broken library.
5509 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5510 # Determine the default libpath from the value encoded in an
5511 # empty executable.
5512 _LT_SYS_MODULE_PATH_AIX([$1])
5513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5514 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5515 else
5516 if test ia64 = "$host_cpu"; then
5517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5518 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5519 _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"
5520 else
5521 # Determine the default libpath from the value encoded in an
5522 # empty executable.
5523 _LT_SYS_MODULE_PATH_AIX([$1])
5524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5525 # Warning - without using the other run time loading flags,
5526 # -berok will link without error, but may produce a broken library.
5527 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5528 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5529 if test yes = "$with_gnu_ld"; then
5530 # We only use this code for GNU lds that support --whole-archive.
5531 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5532 else
5533 # Exported symbols can be pulled into shared objects from archives
5534 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5535 fi
5536 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5537 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5538 # -brtl affects multiple linker settings, -berok does not and is overridden later
5539 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5540 if test svr4 != "$with_aix_soname"; then
5541 # This is similar to how AIX traditionally builds its shared libraries.
5542 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5543 fi
5544 if test aix != "$with_aix_soname"; then
5545 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5546 else
5547 # used by -dlpreopen to get the symbols
5548 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5549 fi
5550 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5551 fi
5552 fi
5553 ;;
5554
5555 amigaos*)
5556 case $host_cpu in
5557 powerpc)
5558 # see comment about AmigaOS4 .so support
5559 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5560 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5561 ;;
5562 m68k)
5563 _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)'
5564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5565 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5566 ;;
5567 esac
5568 ;;
5569
5570 bsdi[[45]]*)
5571 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5572 ;;
5573
5574 cygwin* | mingw* | pw32* | cegcc*)
5575 # When not using gcc, we currently assume that we are using
5576 # Microsoft Visual C++.
5577 # hardcode_libdir_flag_spec is actually meaningless, as there is
5578 # no search path for DLLs.
5579 case $cc_basename in
5580 cl*)
5581 # Native MSVC
5582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5583 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5584 _LT_TAGVAR(always_export_symbols, $1)=yes
5585 _LT_TAGVAR(file_list_spec, $1)='@'
5586 # Tell ltmain to make .lib files, not .a files.
5587 libext=lib
5588 # Tell ltmain to make .dll files, not .so files.
5589 shrext_cmds=.dll
5590 # FIXME: Setting linknames here is a bad hack.
5591 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5592 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5593 cp "$export_symbols" "$output_objdir/$soname.def";
5594 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5595 else
5596 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5597 fi~
5598 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5599 linknames='
5600 # The linker will not automatically build a static lib if we build a DLL.
5601 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5602 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5603 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5604 _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'
5605 # Don't use ranlib
5606 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5607 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5608 lt_tool_outputfile="@TOOL_OUTPUT@"~
5609 case $lt_outputfile in
5610 *.exe|*.EXE) ;;
5611 *)
5612 lt_outputfile=$lt_outputfile.exe
5613 lt_tool_outputfile=$lt_tool_outputfile.exe
5614 ;;
5615 esac~
5616 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5617 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5618 $RM "$lt_outputfile.manifest";
5619 fi'
5620 ;;
5621 *)
5622 # Assume MSVC wrapper
5623 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5624 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5625 # Tell ltmain to make .lib files, not .a files.
5626 libext=lib
5627 # Tell ltmain to make .dll files, not .so files.
5628 shrext_cmds=.dll
5629 # FIXME: Setting linknames here is a bad hack.
5630 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5631 # The linker will automatically build a .lib file if we build a DLL.
5632 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5633 # FIXME: Should let the user specify the lib program.
5634 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5635 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5636 ;;
5637 esac
5638 ;;
5639
5640 darwin* | rhapsody*)
5641 _LT_DARWIN_LINKER_FEATURES($1)
5642 ;;
5643
5644 dgux*)
5645 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5646 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5647 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5648 ;;
5649
5650 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5651 # support. Future versions do this automatically, but an explicit c++rt0.o
5652 # does not break anything, and helps significantly (at the cost of a little
5653 # extra space).
5654 freebsd2.2*)
5655 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5657 _LT_TAGVAR(hardcode_direct, $1)=yes
5658 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5659 ;;
5660
5661 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5662 freebsd2.*)
5663 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5664 _LT_TAGVAR(hardcode_direct, $1)=yes
5665 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5666 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5667 ;;
5668
5669 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5670 freebsd* | dragonfly*)
5671 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5672 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5673 _LT_TAGVAR(hardcode_direct, $1)=yes
5674 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5675 ;;
5676
5677 hpux9*)
5678 if test yes = "$GCC"; then
5679 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5680 else
5681 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5682 fi
5683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5684 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5685 _LT_TAGVAR(hardcode_direct, $1)=yes
5686
5687 # hardcode_minus_L: Not really in the search PATH,
5688 # but as the default location of the library.
5689 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5691 ;;
5692
5693 hpux10*)
5694 if test yes,no = "$GCC,$with_gnu_ld"; then
5695 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5696 else
5697 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5698 fi
5699 if test no = "$with_gnu_ld"; then
5700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5701 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5702 _LT_TAGVAR(hardcode_direct, $1)=yes
5703 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5705 # hardcode_minus_L: Not really in the search PATH,
5706 # but as the default location of the library.
5707 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5708 fi
5709 ;;
5710
5711 hpux11*)
5712 if test yes,no = "$GCC,$with_gnu_ld"; then
5713 case $host_cpu in
5714 hppa*64*)
5715 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5716 ;;
5717 ia64*)
5718 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5719 ;;
5720 *)
5721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5722 ;;
5723 esac
5724 else
5725 case $host_cpu in
5726 hppa*64*)
5727 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5728 ;;
5729 ia64*)
5730 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5731 ;;
5732 *)
5733 m4_if($1, [], [
5734 # Older versions of the 11.00 compiler do not understand -b yet
5735 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5736 _LT_LINKER_OPTION([if $CC understands -b],
5737 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5738 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5739 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5740 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5741 ;;
5742 esac
5743 fi
5744 if test no = "$with_gnu_ld"; then
5745 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5746 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5747
5748 case $host_cpu in
5749 hppa*64*|ia64*)
5750 _LT_TAGVAR(hardcode_direct, $1)=no
5751 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5752 ;;
5753 *)
5754 _LT_TAGVAR(hardcode_direct, $1)=yes
5755 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5756 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5757
5758 # hardcode_minus_L: Not really in the search PATH,
5759 # but as the default location of the library.
5760 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5761 ;;
5762 esac
5763 fi
5764 ;;
5765
5766 irix5* | irix6* | nonstopux*)
5767 if test yes = "$GCC"; then
5768 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5769 # Try to use the -exported_symbol ld option, if it does not
5770 # work, assume that -exports_file does not work either and
5771 # implicitly export all symbols.
5772 # This should be the same for all languages, so no per-tag cache variable.
5773 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5774 [lt_cv_irix_exported_symbol],
5775 [save_LDFLAGS=$LDFLAGS
5776 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5777 AC_LINK_IFELSE(
5778 [AC_LANG_SOURCE(
5779 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5780 [C++], [[int foo (void) { return 0; }]],
5781 [Fortran 77], [[
5782 subroutine foo
5783 end]],
5784 [Fortran], [[
5785 subroutine foo
5786 end]])])],
5787 [lt_cv_irix_exported_symbol=yes],
5788 [lt_cv_irix_exported_symbol=no])
5789 LDFLAGS=$save_LDFLAGS])
5790 if test yes = "$lt_cv_irix_exported_symbol"; then
5791 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
5792 fi
5793 _LT_TAGVAR(link_all_deplibs, $1)=no
5794 else
5795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5796 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
5797 fi
5798 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5800 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5801 _LT_TAGVAR(inherit_rpath, $1)=yes
5802 _LT_TAGVAR(link_all_deplibs, $1)=yes
5803 ;;
5804
5805 linux*)
5806 case $cc_basename in
5807 tcc*)
5808 # Fabrice Bellard et al's Tiny C Compiler
5809 _LT_TAGVAR(ld_shlibs, $1)=yes
5810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5811 ;;
5812 esac
5813 ;;
5814
5815 netbsd* | netbsdelf*-gnu)
5816 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5817 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5818 else
5819 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5820 fi
5821 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5822 _LT_TAGVAR(hardcode_direct, $1)=yes
5823 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5824 ;;
5825
5826 newsos6)
5827 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5828 _LT_TAGVAR(hardcode_direct, $1)=yes
5829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5830 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5831 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5832 ;;
5833
5834 *nto* | *qnx*)
5835 ;;
5836
5837 openbsd* | bitrig*)
5838 if test -f /usr/libexec/ld.so; then
5839 _LT_TAGVAR(hardcode_direct, $1)=yes
5840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5841 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5842 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5845 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5846 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5847 else
5848 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5850 fi
5851 else
5852 _LT_TAGVAR(ld_shlibs, $1)=no
5853 fi
5854 ;;
5855
5856 os2*)
5857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5858 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5859 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5860 shrext_cmds=.dll
5861 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5862 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5863 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5864 $ECHO EXPORTS >> $output_objdir/$libname.def~
5865 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5866 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5867 emximp -o $lib $output_objdir/$libname.def'
5868 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5869 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5870 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5871 $ECHO EXPORTS >> $output_objdir/$libname.def~
5872 prefix_cmds="$SED"~
5873 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5874 prefix_cmds="$prefix_cmds -e 1d";
5875 fi~
5876 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5877 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5878 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5879 emximp -o $lib $output_objdir/$libname.def'
5880 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5881 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5882 ;;
5883
5884 osf3*)
5885 if test yes = "$GCC"; then
5886 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5887 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5888 else
5889 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5890 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5891 fi
5892 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5894 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5895 ;;
5896
5897 osf4* | osf5*) # as osf3* with the addition of -msym flag
5898 if test yes = "$GCC"; then
5899 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5900 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5901 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5902 else
5903 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5905 _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~
5906 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
5907
5908 # Both c and cxx compiler support -rpath directly
5909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5910 fi
5911 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5912 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5913 ;;
5914
5915 solaris*)
5916 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5917 if test yes = "$GCC"; then
5918 wlarc='$wl'
5919 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5920 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5921 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5922 else
5923 case `$CC -V 2>&1` in
5924 *"Compilers 5.0"*)
5925 wlarc=''
5926 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5927 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5928 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5929 ;;
5930 *)
5931 wlarc='$wl'
5932 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5933 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5934 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5935 ;;
5936 esac
5937 fi
5938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5939 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5940 case $host_os in
5941 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5942 *)
5943 # The compiler driver will combine and reorder linker options,
5944 # but understands '-z linker_flag'. GCC discards it without '$wl',
5945 # but is careful enough not to reorder.
5946 # Supported since Solaris 2.6 (maybe 2.5.1?)
5947 if test yes = "$GCC"; then
5948 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5949 else
5950 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5951 fi
5952 ;;
5953 esac
5954 _LT_TAGVAR(link_all_deplibs, $1)=yes
5955 ;;
5956
5957 sunos4*)
5958 if test sequent = "$host_vendor"; then
5959 # Use $CC to link under sequent, because it throws in some extra .o
5960 # files that make .init and .fini sections work.
5961 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5962 else
5963 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5964 fi
5965 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5966 _LT_TAGVAR(hardcode_direct, $1)=yes
5967 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5968 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5969 ;;
5970
5971 sysv4)
5972 case $host_vendor in
5973 sni)
5974 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5975 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5976 ;;
5977 siemens)
5978 ## LD is ld it makes a PLAMLIB
5979 ## CC just makes a GrossModule.
5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5981 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5982 _LT_TAGVAR(hardcode_direct, $1)=no
5983 ;;
5984 motorola)
5985 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5986 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5987 ;;
5988 esac
5989 runpath_var='LD_RUN_PATH'
5990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5991 ;;
5992
5993 sysv4.3*)
5994 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5995 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5996 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5997 ;;
5998
5999 sysv4*MP*)
6000 if test -d /usr/nec; then
6001 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6002 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6003 runpath_var=LD_RUN_PATH
6004 hardcode_runpath_var=yes
6005 _LT_TAGVAR(ld_shlibs, $1)=yes
6006 fi
6007 ;;
6008
6009 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6010 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6011 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6012 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6013 runpath_var='LD_RUN_PATH'
6014
6015 if test yes = "$GCC"; then
6016 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6017 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6018 else
6019 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6020 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6021 fi
6022 ;;
6023
6024 sysv5* | sco3.2v5* | sco5v6*)
6025 # Note: We CANNOT use -z defs as we might desire, because we do not
6026 # link with -lc, and that would cause any symbols used from libc to
6027 # always be unresolved, which means just about no library would
6028 # ever link correctly. If we're not using GNU ld we use -z text
6029 # though, which does catch some bad symbols but isn't as heavy-handed
6030 # as -z defs.
6031 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6032 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6033 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6035 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6036 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6037 _LT_TAGVAR(link_all_deplibs, $1)=yes
6038 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6039 runpath_var='LD_RUN_PATH'
6040
6041 if test yes = "$GCC"; then
6042 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6043 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6044 else
6045 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6046 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6047 fi
6048 ;;
6049
6050 uts4*)
6051 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6054 ;;
6055
6056 *)
6057 _LT_TAGVAR(ld_shlibs, $1)=no
6058 ;;
6059 esac
6060
6061 if test sni = "$host_vendor"; then
6062 case $host in
6063 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6065 ;;
6066 esac
6067 fi
6068 fi
6069 ])
6070 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6071 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6072
6073 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6074
6075 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6076 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6077 _LT_DECL([], [extract_expsyms_cmds], [2],
6078 [The commands to extract the exported symbol list from a shared archive])
6079
6080 #
6081 # Do we need to explicitly link libc?
6082 #
6083 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6084 x|xyes)
6085 # Assume -lc should be added
6086 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6087
6088 if test yes,yes = "$GCC,$enable_shared"; then
6089 case $_LT_TAGVAR(archive_cmds, $1) in
6090 *'~'*)
6091 # FIXME: we may have to deal with multi-command sequences.
6092 ;;
6093 '$CC '*)
6094 # Test whether the compiler implicitly links with -lc since on some
6095 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6096 # to ld, don't add -lc before -lgcc.
6097 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6098 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6099 [$RM conftest*
6100 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6101
6102 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6103 soname=conftest
6104 lib=conftest
6105 libobjs=conftest.$ac_objext
6106 deplibs=
6107 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6108 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6109 compiler_flags=-v
6110 linker_flags=-v
6111 verstring=
6112 output_objdir=.
6113 libname=conftest
6114 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6115 _LT_TAGVAR(allow_undefined_flag, $1)=
6116 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6117 then
6118 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6119 else
6120 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6121 fi
6122 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6123 else
6124 cat conftest.err 1>&5
6125 fi
6126 $RM conftest*
6127 ])
6128 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6129 ;;
6130 esac
6131 fi
6132 ;;
6133 esac
6134
6135 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6136 [Whether or not to add -lc for building shared libraries])
6137 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6138 [enable_shared_with_static_runtimes], [0],
6139 [Whether or not to disallow shared libs when runtime libs are static])
6140 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6141 [Compiler flag to allow reflexive dlopens])
6142 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6143 [Compiler flag to generate shared objects directly from archives])
6144 _LT_TAGDECL([], [compiler_needs_object], [1],
6145 [Whether the compiler copes with passing no objects directly])
6146 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6147 [Create an old-style archive from a shared archive])
6148 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6149 [Create a temporary old-style archive to link instead of a shared archive])
6150 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6151 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6152 _LT_TAGDECL([], [module_cmds], [2],
6153 [Commands used to build a loadable module if different from building
6154 a shared archive.])
6155 _LT_TAGDECL([], [module_expsym_cmds], [2])
6156 _LT_TAGDECL([], [with_gnu_ld], [1],
6157 [Whether we are building with GNU ld or not])
6158 _LT_TAGDECL([], [allow_undefined_flag], [1],
6159 [Flag that allows shared libraries with undefined symbols to be built])
6160 _LT_TAGDECL([], [no_undefined_flag], [1],
6161 [Flag that enforces no undefined symbols])
6162 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6163 [Flag to hardcode $libdir into a binary during linking.
6164 This must work even if $libdir does not exist])
6165 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6166 [Whether we need a single "-rpath" flag with a separated argument])
6167 _LT_TAGDECL([], [hardcode_direct], [0],
6168 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6169 DIR into the resulting binary])
6170 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6171 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6172 DIR into the resulting binary and the resulting library dependency is
6173 "absolute", i.e impossible to change by setting $shlibpath_var if the
6174 library is relocated])
6175 _LT_TAGDECL([], [hardcode_minus_L], [0],
6176 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6177 into the resulting binary])
6178 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6179 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6180 into the resulting binary])
6181 _LT_TAGDECL([], [hardcode_automatic], [0],
6182 [Set to "yes" if building a shared library automatically hardcodes DIR
6183 into the library and all subsequent libraries and executables linked
6184 against it])
6185 _LT_TAGDECL([], [inherit_rpath], [0],
6186 [Set to yes if linker adds runtime paths of dependent libraries
6187 to runtime path list])
6188 _LT_TAGDECL([], [link_all_deplibs], [0],
6189 [Whether libtool must link a program against all its dependency libraries])
6190 _LT_TAGDECL([], [always_export_symbols], [0],
6191 [Set to "yes" if exported symbols are required])
6192 _LT_TAGDECL([], [export_symbols_cmds], [2],
6193 [The commands to list exported symbols])
6194 _LT_TAGDECL([], [exclude_expsyms], [1],
6195 [Symbols that should not be listed in the preloaded symbols])
6196 _LT_TAGDECL([], [include_expsyms], [1],
6197 [Symbols that must always be exported])
6198 _LT_TAGDECL([], [prelink_cmds], [2],
6199 [Commands necessary for linking programs (against libraries) with templates])
6200 _LT_TAGDECL([], [postlink_cmds], [2],
6201 [Commands necessary for finishing linking programs])
6202 _LT_TAGDECL([], [file_list_spec], [1],
6203 [Specify filename containing input files])
6204 dnl FIXME: Not yet implemented
6205 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6206 dnl [Compiler flag to generate thread safe objects])
6207 ])# _LT_LINKER_SHLIBS
6208
6209
6210 # _LT_LANG_C_CONFIG([TAG])
6211 # ------------------------
6212 # Ensure that the configuration variables for a C compiler are suitably
6213 # defined. These variables are subsequently used by _LT_CONFIG to write
6214 # the compiler configuration to 'libtool'.
6215 m4_defun([_LT_LANG_C_CONFIG],
6216 [m4_require([_LT_DECL_EGREP])dnl
6217 lt_save_CC=$CC
6218 AC_LANG_PUSH(C)
6219
6220 # Source file extension for C test sources.
6221 ac_ext=c
6222
6223 # Object file extension for compiled C test sources.
6224 objext=o
6225 _LT_TAGVAR(objext, $1)=$objext
6226
6227 # Code to be used in simple compile tests
6228 lt_simple_compile_test_code="int some_variable = 0;"
6229
6230 # Code to be used in simple link tests
6231 lt_simple_link_test_code='int main(){return(0);}'
6232
6233 _LT_TAG_COMPILER
6234 # Save the default compiler, since it gets overwritten when the other
6235 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6236 compiler_DEFAULT=$CC
6237
6238 # save warnings/boilerplate of simple test code
6239 _LT_COMPILER_BOILERPLATE
6240 _LT_LINKER_BOILERPLATE
6241
6242 ## CAVEAT EMPTOR:
6243 ## There is no encapsulation within the following macros, do not change
6244 ## the running order or otherwise move them around unless you know exactly
6245 ## what you are doing...
6246 if test -n "$compiler"; then
6247 _LT_COMPILER_NO_RTTI($1)
6248 _LT_COMPILER_PIC($1)
6249 _LT_COMPILER_C_O($1)
6250 _LT_COMPILER_FILE_LOCKS($1)
6251 _LT_LINKER_SHLIBS($1)
6252 _LT_SYS_DYNAMIC_LINKER($1)
6253 _LT_LINKER_HARDCODE_LIBPATH($1)
6254 LT_SYS_DLOPEN_SELF
6255 _LT_CMD_STRIPLIB
6256
6257 # Report what library types will actually be built
6258 AC_MSG_CHECKING([if libtool supports shared libraries])
6259 AC_MSG_RESULT([$can_build_shared])
6260
6261 AC_MSG_CHECKING([whether to build shared libraries])
6262 test no = "$can_build_shared" && enable_shared=no
6263
6264 # On AIX, shared libraries and static libraries use the same namespace, and
6265 # are all built from PIC.
6266 case $host_os in
6267 aix3*)
6268 test yes = "$enable_shared" && enable_static=no
6269 if test -n "$RANLIB"; then
6270 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6271 postinstall_cmds='$RANLIB $lib'
6272 fi
6273 ;;
6274
6275 aix[[4-9]]*)
6276 if test ia64 != "$host_cpu"; then
6277 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6278 yes,aix,yes) ;; # shared object as lib.so file only
6279 yes,svr4,*) ;; # shared object as lib.so archive member only
6280 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6281 esac
6282 fi
6283 ;;
6284 esac
6285 AC_MSG_RESULT([$enable_shared])
6286
6287 AC_MSG_CHECKING([whether to build static libraries])
6288 # Make sure either enable_shared or enable_static is yes.
6289 test yes = "$enable_shared" || enable_static=yes
6290 AC_MSG_RESULT([$enable_static])
6291
6292 _LT_CONFIG($1)
6293 fi
6294 AC_LANG_POP
6295 CC=$lt_save_CC
6296 ])# _LT_LANG_C_CONFIG
6297
6298
6299 # _LT_LANG_CXX_CONFIG([TAG])
6300 # --------------------------
6301 # Ensure that the configuration variables for a C++ compiler are suitably
6302 # defined. These variables are subsequently used by _LT_CONFIG to write
6303 # the compiler configuration to 'libtool'.
6304 m4_defun([_LT_LANG_CXX_CONFIG],
6305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6306 m4_require([_LT_DECL_EGREP])dnl
6307 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6308 if test -n "$CXX" && ( test no != "$CXX" &&
6309 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6310 (test g++ != "$CXX"))); then
6311 AC_PROG_CXXCPP
6312 else
6313 _lt_caught_CXX_error=yes
6314 fi
6315
6316 AC_LANG_PUSH(C++)
6317 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6318 _LT_TAGVAR(allow_undefined_flag, $1)=
6319 _LT_TAGVAR(always_export_symbols, $1)=no
6320 _LT_TAGVAR(archive_expsym_cmds, $1)=
6321 _LT_TAGVAR(compiler_needs_object, $1)=no
6322 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6323 _LT_TAGVAR(hardcode_direct, $1)=no
6324 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6326 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6327 _LT_TAGVAR(hardcode_minus_L, $1)=no
6328 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6329 _LT_TAGVAR(hardcode_automatic, $1)=no
6330 _LT_TAGVAR(inherit_rpath, $1)=no
6331 _LT_TAGVAR(module_cmds, $1)=
6332 _LT_TAGVAR(module_expsym_cmds, $1)=
6333 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6334 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6335 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6336 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6337 _LT_TAGVAR(no_undefined_flag, $1)=
6338 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6339 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6340
6341 # Source file extension for C++ test sources.
6342 ac_ext=cpp
6343
6344 # Object file extension for compiled C++ test sources.
6345 objext=o
6346 _LT_TAGVAR(objext, $1)=$objext
6347
6348 # No sense in running all these tests if we already determined that
6349 # the CXX compiler isn't working. Some variables (like enable_shared)
6350 # are currently assumed to apply to all compilers on this platform,
6351 # and will be corrupted by setting them based on a non-working compiler.
6352 if test yes != "$_lt_caught_CXX_error"; then
6353 # Code to be used in simple compile tests
6354 lt_simple_compile_test_code="int some_variable = 0;"
6355
6356 # Code to be used in simple link tests
6357 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6358
6359 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6360 _LT_TAG_COMPILER
6361
6362 # save warnings/boilerplate of simple test code
6363 _LT_COMPILER_BOILERPLATE
6364 _LT_LINKER_BOILERPLATE
6365
6366 # Allow CC to be a program name with arguments.
6367 lt_save_CC=$CC
6368 lt_save_CFLAGS=$CFLAGS
6369 lt_save_LD=$LD
6370 lt_save_GCC=$GCC
6371 GCC=$GXX
6372 lt_save_with_gnu_ld=$with_gnu_ld
6373 lt_save_path_LD=$lt_cv_path_LD
6374 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6375 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6376 else
6377 $as_unset lt_cv_prog_gnu_ld
6378 fi
6379 if test -n "${lt_cv_path_LDCXX+set}"; then
6380 lt_cv_path_LD=$lt_cv_path_LDCXX
6381 else
6382 $as_unset lt_cv_path_LD
6383 fi
6384 test -z "${LDCXX+set}" || LD=$LDCXX
6385 CC=${CXX-"c++"}
6386 CFLAGS=$CXXFLAGS
6387 compiler=$CC
6388 _LT_TAGVAR(compiler, $1)=$CC
6389 _LT_CC_BASENAME([$compiler])
6390
6391 if test -n "$compiler"; then
6392 # We don't want -fno-exception when compiling C++ code, so set the
6393 # no_builtin_flag separately
6394 if test yes = "$GXX"; then
6395 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6396 else
6397 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6398 fi
6399
6400 if test yes = "$GXX"; then
6401 # Set up default GNU C++ configuration
6402
6403 LT_PATH_LD
6404
6405 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6406 # archiving commands below assume that GNU ld is being used.
6407 if test yes = "$with_gnu_ld"; then
6408 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6409 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6410
6411 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6412 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6413
6414 # If archive_cmds runs LD, not CC, wlarc should be empty
6415 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6416 # investigate it a little bit more. (MM)
6417 wlarc='$wl'
6418
6419 # ancient GNU ld didn't support --whole-archive et. al.
6420 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6421 $GREP 'no-whole-archive' > /dev/null; then
6422 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6423 else
6424 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6425 fi
6426 else
6427 with_gnu_ld=no
6428 wlarc=
6429
6430 # A generic and very simple default shared library creation
6431 # command for GNU C++ for the case where it uses the native
6432 # linker, instead of GNU ld. If possible, this setting should
6433 # overridden to take advantage of the native linker features on
6434 # the platform it is being used on.
6435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6436 fi
6437
6438 # Commands to make compiler produce verbose output that lists
6439 # what "hidden" libraries, object files and flags are used when
6440 # linking a shared library.
6441 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6442
6443 else
6444 GXX=no
6445 with_gnu_ld=no
6446 wlarc=
6447 fi
6448
6449 # PORTME: fill in a description of your system's C++ link characteristics
6450 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6451 _LT_TAGVAR(ld_shlibs, $1)=yes
6452 case $host_os in
6453 aix3*)
6454 # FIXME: insert proper C++ library support
6455 _LT_TAGVAR(ld_shlibs, $1)=no
6456 ;;
6457 aix[[4-9]]*)
6458 if test ia64 = "$host_cpu"; then
6459 # On IA64, the linker does run time linking by default, so we don't
6460 # have to do anything special.
6461 aix_use_runtimelinking=no
6462 exp_sym_flag='-Bexport'
6463 no_entry_flag=
6464 else
6465 aix_use_runtimelinking=no
6466
6467 # Test if we are trying to use run time linking or normal
6468 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6469 # have runtime linking enabled, and use it for executables.
6470 # For shared libraries, we enable/disable runtime linking
6471 # depending on the kind of the shared library created -
6472 # when "with_aix_soname,aix_use_runtimelinking" is:
6473 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6474 # "aix,yes" lib.so shared, rtl:yes, for executables
6475 # lib.a static archive
6476 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6477 # lib.a(lib.so.V) shared, rtl:no, for executables
6478 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6479 # lib.a(lib.so.V) shared, rtl:no
6480 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6481 # lib.a static archive
6482 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6483 for ld_flag in $LDFLAGS; do
6484 case $ld_flag in
6485 *-brtl*)
6486 aix_use_runtimelinking=yes
6487 break
6488 ;;
6489 esac
6490 done
6491 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6492 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6493 # so we don't have lib.a shared libs to link our executables.
6494 # We have to force runtime linking in this case.
6495 aix_use_runtimelinking=yes
6496 LDFLAGS="$LDFLAGS -Wl,-brtl"
6497 fi
6498 ;;
6499 esac
6500
6501 exp_sym_flag='-bexport'
6502 no_entry_flag='-bnoentry'
6503 fi
6504
6505 # When large executables or shared objects are built, AIX ld can
6506 # have problems creating the table of contents. If linking a library
6507 # or program results in "error TOC overflow" add -mminimal-toc to
6508 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6509 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6510
6511 _LT_TAGVAR(archive_cmds, $1)=''
6512 _LT_TAGVAR(hardcode_direct, $1)=yes
6513 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6514 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6515 _LT_TAGVAR(link_all_deplibs, $1)=yes
6516 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6517 case $with_aix_soname,$aix_use_runtimelinking in
6518 aix,*) ;; # no import file
6519 svr4,* | *,yes) # use import file
6520 # The Import File defines what to hardcode.
6521 _LT_TAGVAR(hardcode_direct, $1)=no
6522 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6523 ;;
6524 esac
6525
6526 if test yes = "$GXX"; then
6527 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6528 # We only want to do this on AIX 4.2 and lower, the check
6529 # below for broken collect2 doesn't work under 4.3+
6530 collect2name=`$CC -print-prog-name=collect2`
6531 if test -f "$collect2name" &&
6532 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6533 then
6534 # We have reworked collect2
6535 :
6536 else
6537 # We have old collect2
6538 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6539 # It fails to find uninstalled libraries when the uninstalled
6540 # path is not listed in the libpath. Setting hardcode_minus_L
6541 # to unsupported forces relinking
6542 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6544 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6545 fi
6546 esac
6547 shared_flag='-shared'
6548 if test yes = "$aix_use_runtimelinking"; then
6549 shared_flag=$shared_flag' $wl-G'
6550 fi
6551 # Need to ensure runtime linking is disabled for the traditional
6552 # shared library, or the linker may eventually find shared libraries
6553 # /with/ Import File - we do not want to mix them.
6554 shared_flag_aix='-shared'
6555 shared_flag_svr4='-shared $wl-G'
6556 else
6557 # not using gcc
6558 if test ia64 = "$host_cpu"; then
6559 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6560 # chokes on -Wl,-G. The following line is correct:
6561 shared_flag='-G'
6562 else
6563 if test yes = "$aix_use_runtimelinking"; then
6564 shared_flag='$wl-G'
6565 else
6566 shared_flag='$wl-bM:SRE'
6567 fi
6568 shared_flag_aix='$wl-bM:SRE'
6569 shared_flag_svr4='$wl-G'
6570 fi
6571 fi
6572
6573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6574 # It seems that -bexpall does not export symbols beginning with
6575 # underscore (_), so it is better to generate a list of symbols to
6576 # export.
6577 _LT_TAGVAR(always_export_symbols, $1)=yes
6578 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6579 # Warning - without using the other runtime loading flags (-brtl),
6580 # -berok will link without error, but may produce a broken library.
6581 # The "-G" linker flag allows undefined symbols.
6582 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6583 # Determine the default libpath from the value encoded in an empty
6584 # executable.
6585 _LT_SYS_MODULE_PATH_AIX([$1])
6586 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6587
6588 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6589 else
6590 if test ia64 = "$host_cpu"; then
6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6592 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6593 _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"
6594 else
6595 # Determine the default libpath from the value encoded in an
6596 # empty executable.
6597 _LT_SYS_MODULE_PATH_AIX([$1])
6598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6599 # Warning - without using the other run time loading flags,
6600 # -berok will link without error, but may produce a broken library.
6601 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6602 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6603 if test yes = "$with_gnu_ld"; then
6604 # We only use this code for GNU lds that support --whole-archive.
6605 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6606 else
6607 # Exported symbols can be pulled into shared objects from archives
6608 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6609 fi
6610 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6611 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6612 # -brtl affects multiple linker settings, -berok does not and is overridden later
6613 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6614 if test svr4 != "$with_aix_soname"; then
6615 # This is similar to how AIX traditionally builds its shared
6616 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6617 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6618 fi
6619 if test aix != "$with_aix_soname"; then
6620 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6621 else
6622 # used by -dlpreopen to get the symbols
6623 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6624 fi
6625 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6626 fi
6627 fi
6628 ;;
6629
6630 beos*)
6631 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6632 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6633 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6634 # support --undefined. This deserves some investigation. FIXME
6635 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6636 else
6637 _LT_TAGVAR(ld_shlibs, $1)=no
6638 fi
6639 ;;
6640
6641 chorus*)
6642 case $cc_basename in
6643 *)
6644 # FIXME: insert proper C++ library support
6645 _LT_TAGVAR(ld_shlibs, $1)=no
6646 ;;
6647 esac
6648 ;;
6649
6650 cygwin* | mingw* | pw32* | cegcc*)
6651 case $GXX,$cc_basename in
6652 ,cl* | no,cl*)
6653 # Native MSVC
6654 # hardcode_libdir_flag_spec is actually meaningless, as there is
6655 # no search path for DLLs.
6656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6657 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6658 _LT_TAGVAR(always_export_symbols, $1)=yes
6659 _LT_TAGVAR(file_list_spec, $1)='@'
6660 # Tell ltmain to make .lib files, not .a files.
6661 libext=lib
6662 # Tell ltmain to make .dll files, not .so files.
6663 shrext_cmds=.dll
6664 # FIXME: Setting linknames here is a bad hack.
6665 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6666 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6667 cp "$export_symbols" "$output_objdir/$soname.def";
6668 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6669 else
6670 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6671 fi~
6672 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6673 linknames='
6674 # The linker will not automatically build a static lib if we build a DLL.
6675 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6676 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6677 # Don't use ranlib
6678 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6679 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6680 lt_tool_outputfile="@TOOL_OUTPUT@"~
6681 case $lt_outputfile in
6682 *.exe|*.EXE) ;;
6683 *)
6684 lt_outputfile=$lt_outputfile.exe
6685 lt_tool_outputfile=$lt_tool_outputfile.exe
6686 ;;
6687 esac~
6688 func_to_tool_file "$lt_outputfile"~
6689 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6690 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6691 $RM "$lt_outputfile.manifest";
6692 fi'
6693 ;;
6694 *)
6695 # g++
6696 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6697 # as there is no search path for DLLs.
6698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6699 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6700 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6701 _LT_TAGVAR(always_export_symbols, $1)=no
6702 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6703
6704 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6705 _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'
6706 # If the export-symbols file already is a .def file, use it as
6707 # is; otherwise, prepend EXPORTS...
6708 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6709 cp $export_symbols $output_objdir/$soname.def;
6710 else
6711 echo EXPORTS > $output_objdir/$soname.def;
6712 cat $export_symbols >> $output_objdir/$soname.def;
6713 fi~
6714 $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'
6715 else
6716 _LT_TAGVAR(ld_shlibs, $1)=no
6717 fi
6718 ;;
6719 esac
6720 ;;
6721 darwin* | rhapsody*)
6722 _LT_DARWIN_LINKER_FEATURES($1)
6723 ;;
6724
6725 os2*)
6726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6727 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6728 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6729 shrext_cmds=.dll
6730 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6731 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6732 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6733 $ECHO EXPORTS >> $output_objdir/$libname.def~
6734 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6735 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6736 emximp -o $lib $output_objdir/$libname.def'
6737 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6738 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6739 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6740 $ECHO EXPORTS >> $output_objdir/$libname.def~
6741 prefix_cmds="$SED"~
6742 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6743 prefix_cmds="$prefix_cmds -e 1d";
6744 fi~
6745 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6746 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6747 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6748 emximp -o $lib $output_objdir/$libname.def'
6749 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6750 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6751 ;;
6752
6753 dgux*)
6754 case $cc_basename in
6755 ec++*)
6756 # FIXME: insert proper C++ library support
6757 _LT_TAGVAR(ld_shlibs, $1)=no
6758 ;;
6759 ghcx*)
6760 # Green Hills C++ Compiler
6761 # FIXME: insert proper C++ library support
6762 _LT_TAGVAR(ld_shlibs, $1)=no
6763 ;;
6764 *)
6765 # FIXME: insert proper C++ library support
6766 _LT_TAGVAR(ld_shlibs, $1)=no
6767 ;;
6768 esac
6769 ;;
6770
6771 freebsd2.*)
6772 # C++ shared libraries reported to be fairly broken before
6773 # switch to ELF
6774 _LT_TAGVAR(ld_shlibs, $1)=no
6775 ;;
6776
6777 freebsd-elf*)
6778 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6779 ;;
6780
6781 freebsd* | dragonfly*)
6782 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6783 # conventions
6784 _LT_TAGVAR(ld_shlibs, $1)=yes
6785 ;;
6786
6787 haiku*)
6788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6789 _LT_TAGVAR(link_all_deplibs, $1)=yes
6790 ;;
6791
6792 hpux9*)
6793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6794 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6796 _LT_TAGVAR(hardcode_direct, $1)=yes
6797 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6798 # but as the default
6799 # location of the library.
6800
6801 case $cc_basename in
6802 CC*)
6803 # FIXME: insert proper C++ library support
6804 _LT_TAGVAR(ld_shlibs, $1)=no
6805 ;;
6806 aCC*)
6807 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6808 # Commands to make compiler produce verbose output that lists
6809 # what "hidden" libraries, object files and flags are used when
6810 # linking a shared library.
6811 #
6812 # There doesn't appear to be a way to prevent this compiler from
6813 # explicitly linking system object files so we need to strip them
6814 # from the output so that they don't get included in the library
6815 # dependencies.
6816 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; func_echo_all "$list"'
6817 ;;
6818 *)
6819 if test yes = "$GXX"; then
6820 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6821 else
6822 # FIXME: insert proper C++ library support
6823 _LT_TAGVAR(ld_shlibs, $1)=no
6824 fi
6825 ;;
6826 esac
6827 ;;
6828
6829 hpux10*|hpux11*)
6830 if test no = "$with_gnu_ld"; then
6831 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6832 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6833
6834 case $host_cpu in
6835 hppa*64*|ia64*)
6836 ;;
6837 *)
6838 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6839 ;;
6840 esac
6841 fi
6842 case $host_cpu in
6843 hppa*64*|ia64*)
6844 _LT_TAGVAR(hardcode_direct, $1)=no
6845 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6846 ;;
6847 *)
6848 _LT_TAGVAR(hardcode_direct, $1)=yes
6849 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6850 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6851 # but as the default
6852 # location of the library.
6853 ;;
6854 esac
6855
6856 case $cc_basename in
6857 CC*)
6858 # FIXME: insert proper C++ library support
6859 _LT_TAGVAR(ld_shlibs, $1)=no
6860 ;;
6861 aCC*)
6862 case $host_cpu in
6863 hppa*64*)
6864 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6865 ;;
6866 ia64*)
6867 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6868 ;;
6869 *)
6870 _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'
6871 ;;
6872 esac
6873 # Commands to make compiler produce verbose output that lists
6874 # what "hidden" libraries, object files and flags are used when
6875 # linking a shared library.
6876 #
6877 # There doesn't appear to be a way to prevent this compiler from
6878 # explicitly linking system object files so we need to strip them
6879 # from the output so that they don't get included in the library
6880 # dependencies.
6881 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; func_echo_all "$list"'
6882 ;;
6883 *)
6884 if test yes = "$GXX"; then
6885 if test no = "$with_gnu_ld"; then
6886 case $host_cpu in
6887 hppa*64*)
6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6889 ;;
6890 ia64*)
6891 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6892 ;;
6893 *)
6894 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6895 ;;
6896 esac
6897 fi
6898 else
6899 # FIXME: insert proper C++ library support
6900 _LT_TAGVAR(ld_shlibs, $1)=no
6901 fi
6902 ;;
6903 esac
6904 ;;
6905
6906 interix[[3-9]]*)
6907 _LT_TAGVAR(hardcode_direct, $1)=no
6908 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6911 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6912 # Instead, shared libraries are loaded at an image base (0x10000000 by
6913 # default) and relocated if they conflict, which is a slow very memory
6914 # consuming and fragmenting process. To avoid this, we pick a random,
6915 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6916 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6917 _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'
6918 _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'
6919 ;;
6920 irix5* | irix6*)
6921 case $cc_basename in
6922 CC*)
6923 # SGI C++
6924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
6925
6926 # Archives containing C++ object files must be created using
6927 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6928 # necessary to make sure instantiated templates are included
6929 # in the archive.
6930 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6931 ;;
6932 *)
6933 if test yes = "$GXX"; then
6934 if test no = "$with_gnu_ld"; then
6935 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
6936 else
6937 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
6938 fi
6939 fi
6940 _LT_TAGVAR(link_all_deplibs, $1)=yes
6941 ;;
6942 esac
6943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6944 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6945 _LT_TAGVAR(inherit_rpath, $1)=yes
6946 ;;
6947
6948 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6949 case $cc_basename in
6950 KCC*)
6951 # Kuck and Associates, Inc. (KAI) C++ Compiler
6952
6953 # KCC will only create a shared library if the output file
6954 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6955 # to its proper name (with version) after linking.
6956 _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'
6957 _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'
6958 # Commands to make compiler produce verbose output that lists
6959 # what "hidden" libraries, object files and flags are used when
6960 # linking a shared library.
6961 #
6962 # There doesn't appear to be a way to prevent this compiler from
6963 # explicitly linking system object files so we need to strip them
6964 # from the output so that they don't get included in the library
6965 # dependencies.
6966 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; func_echo_all "$list"'
6967
6968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6969 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6970
6971 # Archives containing C++ object files must be created using
6972 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6973 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6974 ;;
6975 icpc* | ecpc* )
6976 # Intel C++
6977 with_gnu_ld=yes
6978 # version 8.0 and above of icpc choke on multiply defined symbols
6979 # if we add $predep_objects and $postdep_objects, however 7.1 and
6980 # earlier do not add the objects themselves.
6981 case `$CC -V 2>&1` in
6982 *"Version 7."*)
6983 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6984 _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'
6985 ;;
6986 *) # Version 8.0 or newer
6987 tmp_idyn=
6988 case $host_cpu in
6989 ia64*) tmp_idyn=' -i_dynamic';;
6990 esac
6991 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6992 _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'
6993 ;;
6994 esac
6995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6997 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6998 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6999 ;;
7000 pgCC* | pgcpp*)
7001 # Portland Group C++ compiler
7002 case `$CC -V` in
7003 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7004 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7005 rm -rf $tpldir~
7006 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7007 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7008 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7009 rm -rf $tpldir~
7010 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7011 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7012 $RANLIB $oldlib'
7013 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7014 rm -rf $tpldir~
7015 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7016 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7017 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7018 rm -rf $tpldir~
7019 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7020 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
7021 ;;
7022 *) # Version 6 and above use weak symbols
7023 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7024 _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'
7025 ;;
7026 esac
7027
7028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7029 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7030 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7031 ;;
7032 cxx*)
7033 # Compaq C++
7034 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7035 _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'
7036
7037 runpath_var=LD_RUN_PATH
7038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7039 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7040
7041 # Commands to make compiler produce verbose output that lists
7042 # what "hidden" libraries, object files and flags are used when
7043 # linking a shared library.
7044 #
7045 # There doesn't appear to be a way to prevent this compiler from
7046 # explicitly linking system object files so we need to strip them
7047 # from the output so that they don't get included in the library
7048 # dependencies.
7049 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7050 ;;
7051 xl* | mpixl* | bgxl*)
7052 # IBM XL 8.0 on PPC, with GNU ld
7053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7054 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7055 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7056 if test yes = "$supports_anon_versioning"; then
7057 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7058 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7059 echo "local: *; };" >> $output_objdir/$libname.ver~
7060 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7061 fi
7062 ;;
7063 *)
7064 case `$CC -V 2>&1 | sed 5q` in
7065 *Sun\ C*)
7066 # Sun C++ 5.9
7067 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7068 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7069 _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'
7070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7071 _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; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7072 _LT_TAGVAR(compiler_needs_object, $1)=yes
7073
7074 # Not sure whether something based on
7075 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7076 # would be better.
7077 output_verbose_link_cmd='func_echo_all'
7078
7079 # Archives containing C++ object files must be created using
7080 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7081 # necessary to make sure instantiated templates are included
7082 # in the archive.
7083 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7084 ;;
7085 esac
7086 ;;
7087 esac
7088 ;;
7089
7090 lynxos*)
7091 # FIXME: insert proper C++ library support
7092 _LT_TAGVAR(ld_shlibs, $1)=no
7093 ;;
7094
7095 m88k*)
7096 # FIXME: insert proper C++ library support
7097 _LT_TAGVAR(ld_shlibs, $1)=no
7098 ;;
7099
7100 mvs*)
7101 case $cc_basename in
7102 cxx*)
7103 # FIXME: insert proper C++ library support
7104 _LT_TAGVAR(ld_shlibs, $1)=no
7105 ;;
7106 *)
7107 # FIXME: insert proper C++ library support
7108 _LT_TAGVAR(ld_shlibs, $1)=no
7109 ;;
7110 esac
7111 ;;
7112
7113 netbsd*)
7114 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7115 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7116 wlarc=
7117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7118 _LT_TAGVAR(hardcode_direct, $1)=yes
7119 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7120 fi
7121 # Workaround some broken pre-1.5 toolchains
7122 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7123 ;;
7124
7125 *nto* | *qnx*)
7126 _LT_TAGVAR(ld_shlibs, $1)=yes
7127 ;;
7128
7129 openbsd* | bitrig*)
7130 if test -f /usr/libexec/ld.so; then
7131 _LT_TAGVAR(hardcode_direct, $1)=yes
7132 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7133 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7134 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7136 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7137 _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'
7138 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7139 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7140 fi
7141 output_verbose_link_cmd=func_echo_all
7142 else
7143 _LT_TAGVAR(ld_shlibs, $1)=no
7144 fi
7145 ;;
7146
7147 osf3* | osf4* | osf5*)
7148 case $cc_basename in
7149 KCC*)
7150 # Kuck and Associates, Inc. (KAI) C++ Compiler
7151
7152 # KCC will only create a shared library if the output file
7153 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7154 # to its proper name (with version) after linking.
7155 _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'
7156
7157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7158 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7159
7160 # Archives containing C++ object files must be created using
7161 # the KAI C++ compiler.
7162 case $host in
7163 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7164 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7165 esac
7166 ;;
7167 RCC*)
7168 # Rational C++ 2.4.1
7169 # FIXME: insert proper C++ library support
7170 _LT_TAGVAR(ld_shlibs, $1)=no
7171 ;;
7172 cxx*)
7173 case $host in
7174 osf3*)
7175 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7176 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7178 ;;
7179 *)
7180 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7181 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7182 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7183 echo "-hidden">> $lib.exp~
7184 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
7185 $RM $lib.exp'
7186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7187 ;;
7188 esac
7189
7190 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7191
7192 # Commands to make compiler produce verbose output that lists
7193 # what "hidden" libraries, object files and flags are used when
7194 # linking a shared library.
7195 #
7196 # There doesn't appear to be a way to prevent this compiler from
7197 # explicitly linking system object files so we need to strip them
7198 # from the output so that they don't get included in the library
7199 # dependencies.
7200 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7201 ;;
7202 *)
7203 if test yes,no = "$GXX,$with_gnu_ld"; then
7204 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7205 case $host in
7206 osf3*)
7207 _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" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7208 ;;
7209 *)
7210 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7211 ;;
7212 esac
7213
7214 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7215 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7216
7217 # Commands to make compiler produce verbose output that lists
7218 # what "hidden" libraries, object files and flags are used when
7219 # linking a shared library.
7220 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7221
7222 else
7223 # FIXME: insert proper C++ library support
7224 _LT_TAGVAR(ld_shlibs, $1)=no
7225 fi
7226 ;;
7227 esac
7228 ;;
7229
7230 psos*)
7231 # FIXME: insert proper C++ library support
7232 _LT_TAGVAR(ld_shlibs, $1)=no
7233 ;;
7234
7235 sunos4*)
7236 case $cc_basename in
7237 CC*)
7238 # Sun C++ 4.x
7239 # FIXME: insert proper C++ library support
7240 _LT_TAGVAR(ld_shlibs, $1)=no
7241 ;;
7242 lcc*)
7243 # Lucid
7244 # FIXME: insert proper C++ library support
7245 _LT_TAGVAR(ld_shlibs, $1)=no
7246 ;;
7247 *)
7248 # FIXME: insert proper C++ library support
7249 _LT_TAGVAR(ld_shlibs, $1)=no
7250 ;;
7251 esac
7252 ;;
7253
7254 solaris*)
7255 case $cc_basename in
7256 CC* | sunCC*)
7257 # Sun C++ 4.2, 5.x and Centerline C++
7258 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7259 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7260 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7261 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7262 $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'
7263
7264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7265 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7266 case $host_os in
7267 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7268 *)
7269 # The compiler driver will combine and reorder linker options,
7270 # but understands '-z linker_flag'.
7271 # Supported since Solaris 2.6 (maybe 2.5.1?)
7272 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7273 ;;
7274 esac
7275 _LT_TAGVAR(link_all_deplibs, $1)=yes
7276
7277 output_verbose_link_cmd='func_echo_all'
7278
7279 # Archives containing C++ object files must be created using
7280 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7281 # necessary to make sure instantiated templates are included
7282 # in the archive.
7283 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7284 ;;
7285 gcx*)
7286 # Green Hills C++ Compiler
7287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7288
7289 # The C++ compiler must be used to create the archive.
7290 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7291 ;;
7292 *)
7293 # GNU C++ compiler with Solaris linker
7294 if test yes,no = "$GXX,$with_gnu_ld"; then
7295 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7296 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7298 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7299 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7300
7301 # Commands to make compiler produce verbose output that lists
7302 # what "hidden" libraries, object files and flags are used when
7303 # linking a shared library.
7304 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7305 else
7306 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7307 # platform.
7308 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7309 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7310 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7311
7312 # Commands to make compiler produce verbose output that lists
7313 # what "hidden" libraries, object files and flags are used when
7314 # linking a shared library.
7315 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7316 fi
7317
7318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7319 case $host_os in
7320 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7321 *)
7322 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7323 ;;
7324 esac
7325 fi
7326 ;;
7327 esac
7328 ;;
7329
7330 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7331 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7332 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7333 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7334 runpath_var='LD_RUN_PATH'
7335
7336 case $cc_basename in
7337 CC*)
7338 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7339 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7340 ;;
7341 *)
7342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7344 ;;
7345 esac
7346 ;;
7347
7348 sysv5* | sco3.2v5* | sco5v6*)
7349 # Note: We CANNOT use -z defs as we might desire, because we do not
7350 # link with -lc, and that would cause any symbols used from libc to
7351 # always be unresolved, which means just about no library would
7352 # ever link correctly. If we're not using GNU ld we use -z text
7353 # though, which does catch some bad symbols but isn't as heavy-handed
7354 # as -z defs.
7355 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7356 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7357 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7358 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7360 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7361 _LT_TAGVAR(link_all_deplibs, $1)=yes
7362 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7363 runpath_var='LD_RUN_PATH'
7364
7365 case $cc_basename in
7366 CC*)
7367 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7368 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7369 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7370 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7371 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7372 '"$_LT_TAGVAR(reload_cmds, $1)"
7373 ;;
7374 *)
7375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7376 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7377 ;;
7378 esac
7379 ;;
7380
7381 tandem*)
7382 case $cc_basename in
7383 NCC*)
7384 # NonStop-UX NCC 3.20
7385 # FIXME: insert proper C++ library support
7386 _LT_TAGVAR(ld_shlibs, $1)=no
7387 ;;
7388 *)
7389 # FIXME: insert proper C++ library support
7390 _LT_TAGVAR(ld_shlibs, $1)=no
7391 ;;
7392 esac
7393 ;;
7394
7395 vxworks*)
7396 # FIXME: insert proper C++ library support
7397 _LT_TAGVAR(ld_shlibs, $1)=no
7398 ;;
7399
7400 *)
7401 # FIXME: insert proper C++ library support
7402 _LT_TAGVAR(ld_shlibs, $1)=no
7403 ;;
7404 esac
7405
7406 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7407 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7408
7409 _LT_TAGVAR(GCC, $1)=$GXX
7410 _LT_TAGVAR(LD, $1)=$LD
7411
7412 ## CAVEAT EMPTOR:
7413 ## There is no encapsulation within the following macros, do not change
7414 ## the running order or otherwise move them around unless you know exactly
7415 ## what you are doing...
7416 _LT_SYS_HIDDEN_LIBDEPS($1)
7417 _LT_COMPILER_PIC($1)
7418 _LT_COMPILER_C_O($1)
7419 _LT_COMPILER_FILE_LOCKS($1)
7420 _LT_LINKER_SHLIBS($1)
7421 _LT_SYS_DYNAMIC_LINKER($1)
7422 _LT_LINKER_HARDCODE_LIBPATH($1)
7423
7424 _LT_CONFIG($1)
7425 fi # test -n "$compiler"
7426
7427 CC=$lt_save_CC
7428 CFLAGS=$lt_save_CFLAGS
7429 LDCXX=$LD
7430 LD=$lt_save_LD
7431 GCC=$lt_save_GCC
7432 with_gnu_ld=$lt_save_with_gnu_ld
7433 lt_cv_path_LDCXX=$lt_cv_path_LD
7434 lt_cv_path_LD=$lt_save_path_LD
7435 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7436 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7437 fi # test yes != "$_lt_caught_CXX_error"
7438
7439 AC_LANG_POP
7440 ])# _LT_LANG_CXX_CONFIG
7441
7442
7443 # _LT_FUNC_STRIPNAME_CNF
7444 # ----------------------
7445 # func_stripname_cnf prefix suffix name
7446 # strip PREFIX and SUFFIX off of NAME.
7447 # PREFIX and SUFFIX must not contain globbing or regex special
7448 # characters, hashes, percent signs, but SUFFIX may contain a leading
7449 # dot (in which case that matches only a dot).
7450 #
7451 # This function is identical to the (non-XSI) version of func_stripname,
7452 # except this one can be used by m4 code that may be executed by configure,
7453 # rather than the libtool script.
7454 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7455 AC_REQUIRE([_LT_DECL_SED])
7456 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7457 func_stripname_cnf ()
7458 {
7459 case @S|@2 in
7460 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7461 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7462 esac
7463 } # func_stripname_cnf
7464 ])# _LT_FUNC_STRIPNAME_CNF
7465
7466
7467 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7468 # ---------------------------------
7469 # Figure out "hidden" library dependencies from verbose
7470 # compiler output when linking a shared library.
7471 # Parse the compiler output and extract the necessary
7472 # objects, libraries and library flags.
7473 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7474 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7475 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7476 # Dependencies to place before and after the object being linked:
7477 _LT_TAGVAR(predep_objects, $1)=
7478 _LT_TAGVAR(postdep_objects, $1)=
7479 _LT_TAGVAR(predeps, $1)=
7480 _LT_TAGVAR(postdeps, $1)=
7481 _LT_TAGVAR(compiler_lib_search_path, $1)=
7482
7483 dnl we can't use the lt_simple_compile_test_code here,
7484 dnl because it contains code intended for an executable,
7485 dnl not a library. It's possible we should let each
7486 dnl tag define a new lt_????_link_test_code variable,
7487 dnl but it's only used here...
7488 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7489 int a;
7490 void foo (void) { a = 0; }
7491 _LT_EOF
7492 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7493 class Foo
7494 {
7495 public:
7496 Foo (void) { a = 0; }
7497 private:
7498 int a;
7499 };
7500 _LT_EOF
7501 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7502 subroutine foo
7503 implicit none
7504 integer*4 a
7505 a=0
7506 return
7507 end
7508 _LT_EOF
7509 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7510 subroutine foo
7511 implicit none
7512 integer a
7513 a=0
7514 return
7515 end
7516 _LT_EOF
7517 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7518 public class foo {
7519 private int a;
7520 public void bar (void) {
7521 a = 0;
7522 }
7523 };
7524 _LT_EOF
7525 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7526 package foo
7527 func foo() {
7528 }
7529 _LT_EOF
7530 ])
7531
7532 _lt_libdeps_save_CFLAGS=$CFLAGS
7533 case "$CC $CFLAGS " in #(
7534 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7535 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7536 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7537 esac
7538
7539 dnl Parse the compiler output and extract the necessary
7540 dnl objects, libraries and library flags.
7541 if AC_TRY_EVAL(ac_compile); then
7542 # Parse the compiler output and extract the necessary
7543 # objects, libraries and library flags.
7544
7545 # Sentinel used to keep track of whether or not we are before
7546 # the conftest object file.
7547 pre_test_object_deps_done=no
7548
7549 for p in `eval "$output_verbose_link_cmd"`; do
7550 case $prev$p in
7551
7552 -L* | -R* | -l*)
7553 # Some compilers place space between "-{L,R}" and the path.
7554 # Remove the space.
7555 if test x-L = "$p" ||
7556 test x-R = "$p"; then
7557 prev=$p
7558 continue
7559 fi
7560
7561 # Expand the sysroot to ease extracting the directories later.
7562 if test -z "$prev"; then
7563 case $p in
7564 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7565 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7566 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7567 esac
7568 fi
7569 case $p in
7570 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7571 esac
7572 if test no = "$pre_test_object_deps_done"; then
7573 case $prev in
7574 -L | -R)
7575 # Internal compiler library paths should come after those
7576 # provided the user. The postdeps already come after the
7577 # user supplied libs so there is no need to process them.
7578 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7579 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7580 else
7581 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7582 fi
7583 ;;
7584 # The "-l" case would never come before the object being
7585 # linked, so don't bother handling this case.
7586 esac
7587 else
7588 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7589 _LT_TAGVAR(postdeps, $1)=$prev$p
7590 else
7591 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7592 fi
7593 fi
7594 prev=
7595 ;;
7596
7597 *.lto.$objext) ;; # Ignore GCC LTO objects
7598 *.$objext)
7599 # This assumes that the test object file only shows up
7600 # once in the compiler output.
7601 if test "$p" = "conftest.$objext"; then
7602 pre_test_object_deps_done=yes
7603 continue
7604 fi
7605
7606 if test no = "$pre_test_object_deps_done"; then
7607 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7608 _LT_TAGVAR(predep_objects, $1)=$p
7609 else
7610 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7611 fi
7612 else
7613 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7614 _LT_TAGVAR(postdep_objects, $1)=$p
7615 else
7616 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7617 fi
7618 fi
7619 ;;
7620
7621 *) ;; # Ignore the rest.
7622
7623 esac
7624 done
7625
7626 # Clean up.
7627 rm -f a.out a.exe
7628 else
7629 echo "libtool.m4: error: problem compiling $1 test program"
7630 fi
7631
7632 $RM -f confest.$objext
7633 CFLAGS=$_lt_libdeps_save_CFLAGS
7634
7635 # PORTME: override above test on systems where it is broken
7636 m4_if([$1], [CXX],
7637 [case $host_os in
7638 interix[[3-9]]*)
7639 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7640 # hack all around it, let's just trust "g++" to DTRT.
7641 _LT_TAGVAR(predep_objects,$1)=
7642 _LT_TAGVAR(postdep_objects,$1)=
7643 _LT_TAGVAR(postdeps,$1)=
7644 ;;
7645 esac
7646 ])
7647
7648 case " $_LT_TAGVAR(postdeps, $1) " in
7649 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7650 esac
7651 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7652 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7653 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7654 fi
7655 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7656 [The directories searched by this compiler when creating a shared library])
7657 _LT_TAGDECL([], [predep_objects], [1],
7658 [Dependencies to place before and after the objects being linked to
7659 create a shared library])
7660 _LT_TAGDECL([], [postdep_objects], [1])
7661 _LT_TAGDECL([], [predeps], [1])
7662 _LT_TAGDECL([], [postdeps], [1])
7663 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7664 [The library search path used internally by the compiler when linking
7665 a shared library])
7666 ])# _LT_SYS_HIDDEN_LIBDEPS
7667
7668
7669 # _LT_LANG_F77_CONFIG([TAG])
7670 # --------------------------
7671 # Ensure that the configuration variables for a Fortran 77 compiler are
7672 # suitably defined. These variables are subsequently used by _LT_CONFIG
7673 # to write the compiler configuration to 'libtool'.
7674 m4_defun([_LT_LANG_F77_CONFIG],
7675 [AC_LANG_PUSH(Fortran 77)
7676 if test -z "$F77" || test no = "$F77"; then
7677 _lt_disable_F77=yes
7678 fi
7679
7680 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7681 _LT_TAGVAR(allow_undefined_flag, $1)=
7682 _LT_TAGVAR(always_export_symbols, $1)=no
7683 _LT_TAGVAR(archive_expsym_cmds, $1)=
7684 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7685 _LT_TAGVAR(hardcode_direct, $1)=no
7686 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7688 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7689 _LT_TAGVAR(hardcode_minus_L, $1)=no
7690 _LT_TAGVAR(hardcode_automatic, $1)=no
7691 _LT_TAGVAR(inherit_rpath, $1)=no
7692 _LT_TAGVAR(module_cmds, $1)=
7693 _LT_TAGVAR(module_expsym_cmds, $1)=
7694 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7695 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7696 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7697 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7698 _LT_TAGVAR(no_undefined_flag, $1)=
7699 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7700 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7701
7702 # Source file extension for f77 test sources.
7703 ac_ext=f
7704
7705 # Object file extension for compiled f77 test sources.
7706 objext=o
7707 _LT_TAGVAR(objext, $1)=$objext
7708
7709 # No sense in running all these tests if we already determined that
7710 # the F77 compiler isn't working. Some variables (like enable_shared)
7711 # are currently assumed to apply to all compilers on this platform,
7712 # and will be corrupted by setting them based on a non-working compiler.
7713 if test yes != "$_lt_disable_F77"; then
7714 # Code to be used in simple compile tests
7715 lt_simple_compile_test_code="\
7716 subroutine t
7717 return
7718 end
7719 "
7720
7721 # Code to be used in simple link tests
7722 lt_simple_link_test_code="\
7723 program t
7724 end
7725 "
7726
7727 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7728 _LT_TAG_COMPILER
7729
7730 # save warnings/boilerplate of simple test code
7731 _LT_COMPILER_BOILERPLATE
7732 _LT_LINKER_BOILERPLATE
7733
7734 # Allow CC to be a program name with arguments.
7735 lt_save_CC=$CC
7736 lt_save_GCC=$GCC
7737 lt_save_CFLAGS=$CFLAGS
7738 CC=${F77-"f77"}
7739 CFLAGS=$FFLAGS
7740 compiler=$CC
7741 _LT_TAGVAR(compiler, $1)=$CC
7742 _LT_CC_BASENAME([$compiler])
7743 GCC=$G77
7744 if test -n "$compiler"; then
7745 AC_MSG_CHECKING([if libtool supports shared libraries])
7746 AC_MSG_RESULT([$can_build_shared])
7747
7748 AC_MSG_CHECKING([whether to build shared libraries])
7749 test no = "$can_build_shared" && enable_shared=no
7750
7751 # On AIX, shared libraries and static libraries use the same namespace, and
7752 # are all built from PIC.
7753 case $host_os in
7754 aix3*)
7755 test yes = "$enable_shared" && enable_static=no
7756 if test -n "$RANLIB"; then
7757 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7758 postinstall_cmds='$RANLIB $lib'
7759 fi
7760 ;;
7761 aix[[4-9]]*)
7762 if test ia64 != "$host_cpu"; then
7763 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7764 yes,aix,yes) ;; # shared object as lib.so file only
7765 yes,svr4,*) ;; # shared object as lib.so archive member only
7766 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7767 esac
7768 fi
7769 ;;
7770 esac
7771 AC_MSG_RESULT([$enable_shared])
7772
7773 AC_MSG_CHECKING([whether to build static libraries])
7774 # Make sure either enable_shared or enable_static is yes.
7775 test yes = "$enable_shared" || enable_static=yes
7776 AC_MSG_RESULT([$enable_static])
7777
7778 _LT_TAGVAR(GCC, $1)=$G77
7779 _LT_TAGVAR(LD, $1)=$LD
7780
7781 ## CAVEAT EMPTOR:
7782 ## There is no encapsulation within the following macros, do not change
7783 ## the running order or otherwise move them around unless you know exactly
7784 ## what you are doing...
7785 _LT_COMPILER_PIC($1)
7786 _LT_COMPILER_C_O($1)
7787 _LT_COMPILER_FILE_LOCKS($1)
7788 _LT_LINKER_SHLIBS($1)
7789 _LT_SYS_DYNAMIC_LINKER($1)
7790 _LT_LINKER_HARDCODE_LIBPATH($1)
7791
7792 _LT_CONFIG($1)
7793 fi # test -n "$compiler"
7794
7795 GCC=$lt_save_GCC
7796 CC=$lt_save_CC
7797 CFLAGS=$lt_save_CFLAGS
7798 fi # test yes != "$_lt_disable_F77"
7799
7800 AC_LANG_POP
7801 ])# _LT_LANG_F77_CONFIG
7802
7803
7804 # _LT_LANG_FC_CONFIG([TAG])
7805 # -------------------------
7806 # Ensure that the configuration variables for a Fortran compiler are
7807 # suitably defined. These variables are subsequently used by _LT_CONFIG
7808 # to write the compiler configuration to 'libtool'.
7809 m4_defun([_LT_LANG_FC_CONFIG],
7810 [AC_LANG_PUSH(Fortran)
7811
7812 if test -z "$FC" || test no = "$FC"; then
7813 _lt_disable_FC=yes
7814 fi
7815
7816 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7817 _LT_TAGVAR(allow_undefined_flag, $1)=
7818 _LT_TAGVAR(always_export_symbols, $1)=no
7819 _LT_TAGVAR(archive_expsym_cmds, $1)=
7820 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7821 _LT_TAGVAR(hardcode_direct, $1)=no
7822 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7823 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7824 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7825 _LT_TAGVAR(hardcode_minus_L, $1)=no
7826 _LT_TAGVAR(hardcode_automatic, $1)=no
7827 _LT_TAGVAR(inherit_rpath, $1)=no
7828 _LT_TAGVAR(module_cmds, $1)=
7829 _LT_TAGVAR(module_expsym_cmds, $1)=
7830 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7831 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7832 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7833 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7834 _LT_TAGVAR(no_undefined_flag, $1)=
7835 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7836 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7837
7838 # Source file extension for fc test sources.
7839 ac_ext=${ac_fc_srcext-f}
7840
7841 # Object file extension for compiled fc test sources.
7842 objext=o
7843 _LT_TAGVAR(objext, $1)=$objext
7844
7845 # No sense in running all these tests if we already determined that
7846 # the FC compiler isn't working. Some variables (like enable_shared)
7847 # are currently assumed to apply to all compilers on this platform,
7848 # and will be corrupted by setting them based on a non-working compiler.
7849 if test yes != "$_lt_disable_FC"; then
7850 # Code to be used in simple compile tests
7851 lt_simple_compile_test_code="\
7852 subroutine t
7853 return
7854 end
7855 "
7856
7857 # Code to be used in simple link tests
7858 lt_simple_link_test_code="\
7859 program t
7860 end
7861 "
7862
7863 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7864 _LT_TAG_COMPILER
7865
7866 # save warnings/boilerplate of simple test code
7867 _LT_COMPILER_BOILERPLATE
7868 _LT_LINKER_BOILERPLATE
7869
7870 # Allow CC to be a program name with arguments.
7871 lt_save_CC=$CC
7872 lt_save_GCC=$GCC
7873 lt_save_CFLAGS=$CFLAGS
7874 CC=${FC-"f95"}
7875 CFLAGS=$FCFLAGS
7876 compiler=$CC
7877 GCC=$ac_cv_fc_compiler_gnu
7878
7879 _LT_TAGVAR(compiler, $1)=$CC
7880 _LT_CC_BASENAME([$compiler])
7881
7882 if test -n "$compiler"; then
7883 AC_MSG_CHECKING([if libtool supports shared libraries])
7884 AC_MSG_RESULT([$can_build_shared])
7885
7886 AC_MSG_CHECKING([whether to build shared libraries])
7887 test no = "$can_build_shared" && enable_shared=no
7888
7889 # On AIX, shared libraries and static libraries use the same namespace, and
7890 # are all built from PIC.
7891 case $host_os in
7892 aix3*)
7893 test yes = "$enable_shared" && enable_static=no
7894 if test -n "$RANLIB"; then
7895 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7896 postinstall_cmds='$RANLIB $lib'
7897 fi
7898 ;;
7899 aix[[4-9]]*)
7900 if test ia64 != "$host_cpu"; then
7901 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7902 yes,aix,yes) ;; # shared object as lib.so file only
7903 yes,svr4,*) ;; # shared object as lib.so archive member only
7904 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7905 esac
7906 fi
7907 ;;
7908 esac
7909 AC_MSG_RESULT([$enable_shared])
7910
7911 AC_MSG_CHECKING([whether to build static libraries])
7912 # Make sure either enable_shared or enable_static is yes.
7913 test yes = "$enable_shared" || enable_static=yes
7914 AC_MSG_RESULT([$enable_static])
7915
7916 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7917 _LT_TAGVAR(LD, $1)=$LD
7918
7919 ## CAVEAT EMPTOR:
7920 ## There is no encapsulation within the following macros, do not change
7921 ## the running order or otherwise move them around unless you know exactly
7922 ## what you are doing...
7923 _LT_SYS_HIDDEN_LIBDEPS($1)
7924 _LT_COMPILER_PIC($1)
7925 _LT_COMPILER_C_O($1)
7926 _LT_COMPILER_FILE_LOCKS($1)
7927 _LT_LINKER_SHLIBS($1)
7928 _LT_SYS_DYNAMIC_LINKER($1)
7929 _LT_LINKER_HARDCODE_LIBPATH($1)
7930
7931 _LT_CONFIG($1)
7932 fi # test -n "$compiler"
7933
7934 GCC=$lt_save_GCC
7935 CC=$lt_save_CC
7936 CFLAGS=$lt_save_CFLAGS
7937 fi # test yes != "$_lt_disable_FC"
7938
7939 AC_LANG_POP
7940 ])# _LT_LANG_FC_CONFIG
7941
7942
7943 # _LT_LANG_GCJ_CONFIG([TAG])
7944 # --------------------------
7945 # Ensure that the configuration variables for the GNU Java Compiler compiler
7946 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7947 # to write the compiler configuration to 'libtool'.
7948 m4_defun([_LT_LANG_GCJ_CONFIG],
7949 [AC_REQUIRE([LT_PROG_GCJ])dnl
7950 AC_LANG_SAVE
7951
7952 # Source file extension for Java test sources.
7953 ac_ext=java
7954
7955 # Object file extension for compiled Java test sources.
7956 objext=o
7957 _LT_TAGVAR(objext, $1)=$objext
7958
7959 # Code to be used in simple compile tests
7960 lt_simple_compile_test_code="class foo {}"
7961
7962 # Code to be used in simple link tests
7963 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7964
7965 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7966 _LT_TAG_COMPILER
7967
7968 # save warnings/boilerplate of simple test code
7969 _LT_COMPILER_BOILERPLATE
7970 _LT_LINKER_BOILERPLATE
7971
7972 # Allow CC to be a program name with arguments.
7973 lt_save_CC=$CC
7974 lt_save_CFLAGS=$CFLAGS
7975 lt_save_GCC=$GCC
7976 GCC=yes
7977 CC=${GCJ-"gcj"}
7978 CFLAGS=$GCJFLAGS
7979 compiler=$CC
7980 _LT_TAGVAR(compiler, $1)=$CC
7981 _LT_TAGVAR(LD, $1)=$LD
7982 _LT_CC_BASENAME([$compiler])
7983
7984 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7985 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7986
7987 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7988 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7989 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7990
7991 ## CAVEAT EMPTOR:
7992 ## There is no encapsulation within the following macros, do not change
7993 ## the running order or otherwise move them around unless you know exactly
7994 ## what you are doing...
7995 if test -n "$compiler"; then
7996 _LT_COMPILER_NO_RTTI($1)
7997 _LT_COMPILER_PIC($1)
7998 _LT_COMPILER_C_O($1)
7999 _LT_COMPILER_FILE_LOCKS($1)
8000 _LT_LINKER_SHLIBS($1)
8001 _LT_LINKER_HARDCODE_LIBPATH($1)
8002
8003 _LT_CONFIG($1)
8004 fi
8005
8006 AC_LANG_RESTORE
8007
8008 GCC=$lt_save_GCC
8009 CC=$lt_save_CC
8010 CFLAGS=$lt_save_CFLAGS
8011 ])# _LT_LANG_GCJ_CONFIG
8012
8013
8014 # _LT_LANG_GO_CONFIG([TAG])
8015 # --------------------------
8016 # Ensure that the configuration variables for the GNU Go compiler
8017 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8018 # to write the compiler configuration to 'libtool'.
8019 m4_defun([_LT_LANG_GO_CONFIG],
8020 [AC_REQUIRE([LT_PROG_GO])dnl
8021 AC_LANG_SAVE
8022
8023 # Source file extension for Go test sources.
8024 ac_ext=go
8025
8026 # Object file extension for compiled Go test sources.
8027 objext=o
8028 _LT_TAGVAR(objext, $1)=$objext
8029
8030 # Code to be used in simple compile tests
8031 lt_simple_compile_test_code="package main; func main() { }"
8032
8033 # Code to be used in simple link tests
8034 lt_simple_link_test_code='package main; func main() { }'
8035
8036 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8037 _LT_TAG_COMPILER
8038
8039 # save warnings/boilerplate of simple test code
8040 _LT_COMPILER_BOILERPLATE
8041 _LT_LINKER_BOILERPLATE
8042
8043 # Allow CC to be a program name with arguments.
8044 lt_save_CC=$CC
8045 lt_save_CFLAGS=$CFLAGS
8046 lt_save_GCC=$GCC
8047 GCC=yes
8048 CC=${GOC-"gccgo"}
8049 CFLAGS=$GOFLAGS
8050 compiler=$CC
8051 _LT_TAGVAR(compiler, $1)=$CC
8052 _LT_TAGVAR(LD, $1)=$LD
8053 _LT_CC_BASENAME([$compiler])
8054
8055 # Go did not exist at the time GCC didn't implicitly link libc in.
8056 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8057
8058 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8059 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8060 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8061
8062 ## CAVEAT EMPTOR:
8063 ## There is no encapsulation within the following macros, do not change
8064 ## the running order or otherwise move them around unless you know exactly
8065 ## what you are doing...
8066 if test -n "$compiler"; then
8067 _LT_COMPILER_NO_RTTI($1)
8068 _LT_COMPILER_PIC($1)
8069 _LT_COMPILER_C_O($1)
8070 _LT_COMPILER_FILE_LOCKS($1)
8071 _LT_LINKER_SHLIBS($1)
8072 _LT_LINKER_HARDCODE_LIBPATH($1)
8073
8074 _LT_CONFIG($1)
8075 fi
8076
8077 AC_LANG_RESTORE
8078
8079 GCC=$lt_save_GCC
8080 CC=$lt_save_CC
8081 CFLAGS=$lt_save_CFLAGS
8082 ])# _LT_LANG_GO_CONFIG
8083
8084
8085 # _LT_LANG_RC_CONFIG([TAG])
8086 # -------------------------
8087 # Ensure that the configuration variables for the Windows resource compiler
8088 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8089 # to write the compiler configuration to 'libtool'.
8090 m4_defun([_LT_LANG_RC_CONFIG],
8091 [AC_REQUIRE([LT_PROG_RC])dnl
8092 AC_LANG_SAVE
8093
8094 # Source file extension for RC test sources.
8095 ac_ext=rc
8096
8097 # Object file extension for compiled RC test sources.
8098 objext=o
8099 _LT_TAGVAR(objext, $1)=$objext
8100
8101 # Code to be used in simple compile tests
8102 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8103
8104 # Code to be used in simple link tests
8105 lt_simple_link_test_code=$lt_simple_compile_test_code
8106
8107 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8108 _LT_TAG_COMPILER
8109
8110 # save warnings/boilerplate of simple test code
8111 _LT_COMPILER_BOILERPLATE
8112 _LT_LINKER_BOILERPLATE
8113
8114 # Allow CC to be a program name with arguments.
8115 lt_save_CC=$CC
8116 lt_save_CFLAGS=$CFLAGS
8117 lt_save_GCC=$GCC
8118 GCC=
8119 CC=${RC-"windres"}
8120 CFLAGS=
8121 compiler=$CC
8122 _LT_TAGVAR(compiler, $1)=$CC
8123 _LT_CC_BASENAME([$compiler])
8124 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8125
8126 if test -n "$compiler"; then
8127 :
8128 _LT_CONFIG($1)
8129 fi
8130
8131 GCC=$lt_save_GCC
8132 AC_LANG_RESTORE
8133 CC=$lt_save_CC
8134 CFLAGS=$lt_save_CFLAGS
8135 ])# _LT_LANG_RC_CONFIG
8136
8137
8138 # LT_PROG_GCJ
8139 # -----------
8140 AC_DEFUN([LT_PROG_GCJ],
8141 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8142 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8143 [AC_CHECK_TOOL(GCJ, gcj,)
8144 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8145 AC_SUBST(GCJFLAGS)])])[]dnl
8146 ])
8147
8148 # Old name:
8149 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8150 dnl aclocal-1.4 backwards compatibility:
8151 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8152
8153
8154 # LT_PROG_GO
8155 # ----------
8156 AC_DEFUN([LT_PROG_GO],
8157 [AC_CHECK_TOOL(GOC, gccgo,)
8158 ])
8159
8160
8161 # LT_PROG_RC
8162 # ----------
8163 AC_DEFUN([LT_PROG_RC],
8164 [AC_CHECK_TOOL(RC, windres,)
8165 ])
8166
8167 # Old name:
8168 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8169 dnl aclocal-1.4 backwards compatibility:
8170 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8171
8172
8173 # _LT_DECL_EGREP
8174 # --------------
8175 # If we don't have a new enough Autoconf to choose the best grep
8176 # available, choose the one first in the user's PATH.
8177 m4_defun([_LT_DECL_EGREP],
8178 [AC_REQUIRE([AC_PROG_EGREP])dnl
8179 AC_REQUIRE([AC_PROG_FGREP])dnl
8180 test -z "$GREP" && GREP=grep
8181 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8182 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8183 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8184 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8185 AC_SUBST([GREP])
8186 ])
8187
8188
8189 # _LT_DECL_OBJDUMP
8190 # --------------
8191 # If we don't have a new enough Autoconf to choose the best objdump
8192 # available, choose the one first in the user's PATH.
8193 m4_defun([_LT_DECL_OBJDUMP],
8194 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8195 test -z "$OBJDUMP" && OBJDUMP=objdump
8196 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8197 AC_SUBST([OBJDUMP])
8198 ])
8199
8200 # _LT_DECL_DLLTOOL
8201 # ----------------
8202 # Ensure DLLTOOL variable is set.
8203 m4_defun([_LT_DECL_DLLTOOL],
8204 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8205 test -z "$DLLTOOL" && DLLTOOL=dlltool
8206 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8207 AC_SUBST([DLLTOOL])
8208 ])
8209
8210 # _LT_DECL_SED
8211 # ------------
8212 # Check for a fully-functional sed program, that truncates
8213 # as few characters as possible. Prefer GNU sed if found.
8214 m4_defun([_LT_DECL_SED],
8215 [AC_PROG_SED
8216 test -z "$SED" && SED=sed
8217 Xsed="$SED -e 1s/^X//"
8218 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8219 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8220 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8221 ])# _LT_DECL_SED
8222
8223 m4_ifndef([AC_PROG_SED], [
8224 ############################################################
8225 # NOTE: This macro has been submitted for inclusion into #
8226 # GNU Autoconf as AC_PROG_SED. When it is available in #
8227 # a released version of Autoconf we should remove this #
8228 # macro and use it instead. #
8229 ############################################################
8230
8231 m4_defun([AC_PROG_SED],
8232 [AC_MSG_CHECKING([for a sed that does not truncate output])
8233 AC_CACHE_VAL(lt_cv_path_SED,
8234 [# Loop through the user's path and test for sed and gsed.
8235 # Then use that list of sed's as ones to test for truncation.
8236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237 for as_dir in $PATH
8238 do
8239 IFS=$as_save_IFS
8240 test -z "$as_dir" && as_dir=.
8241 for lt_ac_prog in sed gsed; do
8242 for ac_exec_ext in '' $ac_executable_extensions; do
8243 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8244 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8245 fi
8246 done
8247 done
8248 done
8249 IFS=$as_save_IFS
8250 lt_ac_max=0
8251 lt_ac_count=0
8252 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8253 # along with /bin/sed that truncates output.
8254 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8255 test ! -f "$lt_ac_sed" && continue
8256 cat /dev/null > conftest.in
8257 lt_ac_count=0
8258 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8259 # Check for GNU sed and select it if it is found.
8260 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8261 lt_cv_path_SED=$lt_ac_sed
8262 break
8263 fi
8264 while true; do
8265 cat conftest.in conftest.in >conftest.tmp
8266 mv conftest.tmp conftest.in
8267 cp conftest.in conftest.nl
8268 echo >>conftest.nl
8269 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8270 cmp -s conftest.out conftest.nl || break
8271 # 10000 chars as input seems more than enough
8272 test 10 -lt "$lt_ac_count" && break
8273 lt_ac_count=`expr $lt_ac_count + 1`
8274 if test "$lt_ac_count" -gt "$lt_ac_max"; then
8275 lt_ac_max=$lt_ac_count
8276 lt_cv_path_SED=$lt_ac_sed
8277 fi
8278 done
8279 done
8280 ])
8281 SED=$lt_cv_path_SED
8282 AC_SUBST([SED])
8283 AC_MSG_RESULT([$SED])
8284 ])#AC_PROG_SED
8285 ])#m4_ifndef
8286
8287 # Old name:
8288 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8289 dnl aclocal-1.4 backwards compatibility:
8290 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8291
8292
8293 # _LT_CHECK_SHELL_FEATURES
8294 # ------------------------
8295 # Find out whether the shell is Bourne or XSI compatible,
8296 # or has some other useful features.
8297 m4_defun([_LT_CHECK_SHELL_FEATURES],
8298 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8299 lt_unset=unset
8300 else
8301 lt_unset=false
8302 fi
8303 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8304
8305 # test EBCDIC or ASCII
8306 case `echo X|tr X '\101'` in
8307 A) # ASCII based system
8308 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8309 lt_SP2NL='tr \040 \012'
8310 lt_NL2SP='tr \015\012 \040\040'
8311 ;;
8312 *) # EBCDIC based system
8313 lt_SP2NL='tr \100 \n'
8314 lt_NL2SP='tr \r\n \100\100'
8315 ;;
8316 esac
8317 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8318 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8319 ])# _LT_CHECK_SHELL_FEATURES
8320
8321
8322 # _LT_PATH_CONVERSION_FUNCTIONS
8323 # -----------------------------
8324 # Determine what file name conversion functions should be used by
8325 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8326 # for certain cross-compile configurations and native mingw.
8327 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8328 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8329 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8330 AC_MSG_CHECKING([how to convert $build file names to $host format])
8331 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8332 [case $host in
8333 *-*-mingw* )
8334 case $build in
8335 *-*-mingw* ) # actually msys
8336 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8337 ;;
8338 *-*-cygwin* )
8339 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8340 ;;
8341 * ) # otherwise, assume *nix
8342 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8343 ;;
8344 esac
8345 ;;
8346 *-*-cygwin* )
8347 case $build in
8348 *-*-mingw* ) # actually msys
8349 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8350 ;;
8351 *-*-cygwin* )
8352 lt_cv_to_host_file_cmd=func_convert_file_noop
8353 ;;
8354 * ) # otherwise, assume *nix
8355 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8356 ;;
8357 esac
8358 ;;
8359 * ) # unhandled hosts (and "normal" native builds)
8360 lt_cv_to_host_file_cmd=func_convert_file_noop
8361 ;;
8362 esac
8363 ])
8364 to_host_file_cmd=$lt_cv_to_host_file_cmd
8365 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8366 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8367 [0], [convert $build file names to $host format])dnl
8368
8369 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8370 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8371 [#assume ordinary cross tools, or native build.
8372 lt_cv_to_tool_file_cmd=func_convert_file_noop
8373 case $host in
8374 *-*-mingw* )
8375 case $build in
8376 *-*-mingw* ) # actually msys
8377 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8378 ;;
8379 esac
8380 ;;
8381 esac
8382 ])
8383 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8384 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8385 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8386 [0], [convert $build files to toolchain format])dnl
8387 ])# _LT_PATH_CONVERSION_FUNCTIONS
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
3 # 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 8 ltoptions.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17 # ------------------------------------------
18 m4_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.
27 m4_define([_LT_SET_OPTION],
28 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29 m4_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.
38 m4_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.
46 m4_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
50 m4_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.
61 m4_defun([_LT_SET_OPTIONS],
62 [# Set options
63 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66 m4_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 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
85 [_LT_WITH_AIX_SONAME([aix])])
86 ])
87 ])# _LT_SET_OPTIONS
88
89
90 ## --------------------------------- ##
91 ## Macros to handle LT_INIT options. ##
92 ## --------------------------------- ##
93
94 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
95 # -----------------------------------------
96 m4_define([_LT_MANGLE_DEFUN],
97 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
98
99
100 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
101 # -----------------------------------------------
102 m4_define([LT_OPTION_DEFINE],
103 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
104 ])# LT_OPTION_DEFINE
105
106
107 # dlopen
108 # ------
109 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
110 ])
111
112 AU_DEFUN([AC_LIBTOOL_DLOPEN],
113 [_LT_SET_OPTION([LT_INIT], [dlopen])
114 AC_DIAGNOSE([obsolete],
115 [$0: Remove this warning and the call to _LT_SET_OPTION when you
116 put the 'dlopen' option into LT_INIT's first parameter.])
117 ])
118
119 dnl aclocal-1.4 backwards compatibility:
120 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
121
122
123 # win32-dll
124 # ---------
125 # Declare package support for building win32 dll's.
126 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
127 [enable_win32_dll=yes
128
129 case $host in
130 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
131 AC_CHECK_TOOL(AS, as, false)
132 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
133 AC_CHECK_TOOL(OBJDUMP, objdump, false)
134 ;;
135 esac
136
137 test -z "$AS" && AS=as
138 _LT_DECL([], [AS], [1], [Assembler program])dnl
139
140 test -z "$DLLTOOL" && DLLTOOL=dlltool
141 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
142
143 test -z "$OBJDUMP" && OBJDUMP=objdump
144 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
145 ])# win32-dll
146
147 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
148 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
149 _LT_SET_OPTION([LT_INIT], [win32-dll])
150 AC_DIAGNOSE([obsolete],
151 [$0: Remove this warning and the call to _LT_SET_OPTION when you
152 put the 'win32-dll' option into LT_INIT's first parameter.])
153 ])
154
155 dnl aclocal-1.4 backwards compatibility:
156 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
157
158
159 # _LT_ENABLE_SHARED([DEFAULT])
160 # ----------------------------
161 # implement the --enable-shared flag, and supports the 'shared' and
162 # 'disable-shared' LT_INIT options.
163 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
164 m4_define([_LT_ENABLE_SHARED],
165 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
166 AC_ARG_ENABLE([shared],
167 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
168 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
169 [p=${PACKAGE-default}
170 case $enableval in
171 yes) enable_shared=yes ;;
172 no) enable_shared=no ;;
173 *)
174 enable_shared=no
175 # Look at the argument we got. We use all the common list separators.
176 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
177 for pkg in $enableval; do
178 IFS=$lt_save_ifs
179 if test "X$pkg" = "X$p"; then
180 enable_shared=yes
181 fi
182 done
183 IFS=$lt_save_ifs
184 ;;
185 esac],
186 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
187
188 _LT_DECL([build_libtool_libs], [enable_shared], [0],
189 [Whether or not to build shared libraries])
190 ])# _LT_ENABLE_SHARED
191
192 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
193 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
194
195 # Old names:
196 AC_DEFUN([AC_ENABLE_SHARED],
197 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
198 ])
199
200 AC_DEFUN([AC_DISABLE_SHARED],
201 [_LT_SET_OPTION([LT_INIT], [disable-shared])
202 ])
203
204 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
205 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
206
207 dnl aclocal-1.4 backwards compatibility:
208 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
209 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
210
211
212
213 # _LT_ENABLE_STATIC([DEFAULT])
214 # ----------------------------
215 # implement the --enable-static flag, and support the 'static' and
216 # 'disable-static' LT_INIT options.
217 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
218 m4_define([_LT_ENABLE_STATIC],
219 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
220 AC_ARG_ENABLE([static],
221 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
222 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
223 [p=${PACKAGE-default}
224 case $enableval in
225 yes) enable_static=yes ;;
226 no) enable_static=no ;;
227 *)
228 enable_static=no
229 # Look at the argument we got. We use all the common list separators.
230 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
231 for pkg in $enableval; do
232 IFS=$lt_save_ifs
233 if test "X$pkg" = "X$p"; then
234 enable_static=yes
235 fi
236 done
237 IFS=$lt_save_ifs
238 ;;
239 esac],
240 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
241
242 _LT_DECL([build_old_libs], [enable_static], [0],
243 [Whether or not to build static libraries])
244 ])# _LT_ENABLE_STATIC
245
246 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
247 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
248
249 # Old names:
250 AC_DEFUN([AC_ENABLE_STATIC],
251 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
252 ])
253
254 AC_DEFUN([AC_DISABLE_STATIC],
255 [_LT_SET_OPTION([LT_INIT], [disable-static])
256 ])
257
258 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
259 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
260
261 dnl aclocal-1.4 backwards compatibility:
262 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
263 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
264
265
266
267 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
268 # ----------------------------------
269 # implement the --enable-fast-install flag, and support the 'fast-install'
270 # and 'disable-fast-install' LT_INIT options.
271 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
272 m4_define([_LT_ENABLE_FAST_INSTALL],
273 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
274 AC_ARG_ENABLE([fast-install],
275 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
276 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
277 [p=${PACKAGE-default}
278 case $enableval in
279 yes) enable_fast_install=yes ;;
280 no) enable_fast_install=no ;;
281 *)
282 enable_fast_install=no
283 # Look at the argument we got. We use all the common list separators.
284 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
285 for pkg in $enableval; do
286 IFS=$lt_save_ifs
287 if test "X$pkg" = "X$p"; then
288 enable_fast_install=yes
289 fi
290 done
291 IFS=$lt_save_ifs
292 ;;
293 esac],
294 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
295
296 _LT_DECL([fast_install], [enable_fast_install], [0],
297 [Whether or not to optimize for fast installation])dnl
298 ])# _LT_ENABLE_FAST_INSTALL
299
300 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
301 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
302
303 # Old names:
304 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
305 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
306 AC_DIAGNOSE([obsolete],
307 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
308 the 'fast-install' option into LT_INIT's first parameter.])
309 ])
310
311 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
312 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
313 AC_DIAGNOSE([obsolete],
314 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
315 the 'disable-fast-install' option into LT_INIT's first parameter.])
316 ])
317
318 dnl aclocal-1.4 backwards compatibility:
319 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
320 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
321
322
323 # _LT_WITH_AIX_SONAME([DEFAULT])
324 # ----------------------------------
325 # implement the --with-aix-soname flag, and support the `aix-soname=aix'
326 # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
327 # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
328 m4_define([_LT_WITH_AIX_SONAME],
329 [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
330 shared_archive_member_spec=
331 case $host,$enable_shared in
332 power*-*-aix[[5-9]]*,yes)
333 AC_MSG_CHECKING([which variant of shared library versioning to provide])
334 AC_ARG_WITH([aix-soname],
335 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
336 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
337 [case $withval in
338 aix|svr4|both)
339 ;;
340 *)
341 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
342 ;;
343 esac
344 lt_cv_with_aix_soname=$with_aix_soname],
345 [AC_CACHE_VAL([lt_cv_with_aix_soname],
346 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
347 with_aix_soname=$lt_cv_with_aix_soname])
348 AC_MSG_RESULT([$with_aix_soname])
349 if test aix != "$with_aix_soname"; then
350 # For the AIX way of multilib, we name the shared archive member
351 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
352 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
353 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
354 # the AIX toolchain works better with OBJECT_MODE set (default 32).
355 if test 64 = "${OBJECT_MODE-32}"; then
356 shared_archive_member_spec=shr_64
357 else
358 shared_archive_member_spec=shr
359 fi
360 fi
361 ;;
362 *)
363 with_aix_soname=aix
364 ;;
365 esac
366
367 _LT_DECL([], [shared_archive_member_spec], [0],
368 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
369 ])# _LT_WITH_AIX_SONAME
370
371 LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
372 LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
373 LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
374
375
376 # _LT_WITH_PIC([MODE])
377 # --------------------
378 # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
379 # LT_INIT options.
380 # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
381 m4_define([_LT_WITH_PIC],
382 [AC_ARG_WITH([pic],
383 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
384 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
385 [lt_p=${PACKAGE-default}
386 case $withval in
387 yes|no) pic_mode=$withval ;;
388 *)
389 pic_mode=default
390 # Look at the argument we got. We use all the common list separators.
391 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
392 for lt_pkg in $withval; do
393 IFS=$lt_save_ifs
394 if test "X$lt_pkg" = "X$lt_p"; then
395 pic_mode=yes
396 fi
397 done
398 IFS=$lt_save_ifs
399 ;;
400 esac],
401 [pic_mode=m4_default([$1], [default])])
402
403 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
404 ])# _LT_WITH_PIC
405
406 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
407 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
408
409 # Old name:
410 AU_DEFUN([AC_LIBTOOL_PICMODE],
411 [_LT_SET_OPTION([LT_INIT], [pic-only])
412 AC_DIAGNOSE([obsolete],
413 [$0: Remove this warning and the call to _LT_SET_OPTION when you
414 put the 'pic-only' option into LT_INIT's first parameter.])
415 ])
416
417 dnl aclocal-1.4 backwards compatibility:
418 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
419
420 ## ----------------- ##
421 ## LTDL_INIT Options ##
422 ## ----------------- ##
423
424 m4_define([_LTDL_MODE], [])
425 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
426 [m4_define([_LTDL_MODE], [nonrecursive])])
427 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
428 [m4_define([_LTDL_MODE], [recursive])])
429 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
430 [m4_define([_LTDL_MODE], [subproject])])
431
432 m4_define([_LTDL_TYPE], [])
433 LT_OPTION_DEFINE([LTDL_INIT], [installable],
434 [m4_define([_LTDL_TYPE], [installable])])
435 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
436 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
3 # 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.
13 AC_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.
22 m4_define([lt_join],
23 [m4_if([$#], [1], [],
24 [$#], [2], [[$2]],
25 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
26 m4_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.
37 m4_define([lt_car], [[$1]])
38 m4_define([lt_cdr],
39 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
40 [$#], 1, [],
41 [m4_dquote(m4_shift($@))])])
42 m4_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.
55 m4_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.
67 m4_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.
80 m4_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 # -----------------------------
90 m4_define([lt_dict_add],
91 [m4_define([$1($2)], [$3])])
92
93
94 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
95 # --------------------------------------------
96 m4_define([lt_dict_add_subkey],
97 [m4_define([$1($2:$3)], [$4])])
98
99
100 # lt_dict_fetch(DICT, KEY, [SUBKEY])
101 # ----------------------------------
102 m4_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 # -----------------------------------------------------------------
110 m4_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 # --------------------------------------------------------------
118 m4_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 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # @configure_input@
10
11 # serial 4179 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4.6])
15 m4_define([LT_PACKAGE_REVISION], [2.4.6])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.6'
19 macro_revision='2.4.6'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
3 # 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 5 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.
36 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
37
38 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
39 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
40 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
41 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
42 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
43 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
44 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
45 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
46 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
47 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
48 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
49 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
50 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
51 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
52 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
53 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
54 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
55 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
56 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
57 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
58 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
59 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
60 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
61 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
62 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
63 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
64 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
65 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
66 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
67 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
68 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
69 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
70 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
71 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
72 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
73 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
74 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
75 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
76 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
77 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
78 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
79 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
80 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
81 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
82 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
83 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
84 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
85 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
86 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
87 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
88 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
89 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
90 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
91 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
92 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
93 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
94 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
95 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
96 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
97 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
98 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
0 # malloc.m4 serial 17
1 dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 m4_version_prereq([2.70], [] ,[
7
8 # This is adapted with modifications from upstream Autoconf here:
9 # https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
10 AC_DEFUN([_AC_FUNC_MALLOC_IF],
11 [
12 AC_REQUIRE([AC_HEADER_STDC])dnl
13 AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
14 AC_CHECK_HEADERS([stdlib.h])
15 AC_CACHE_CHECK([for GNU libc compatible malloc],
16 [ac_cv_func_malloc_0_nonnull],
17 [AC_RUN_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
20 # include <stdlib.h>
21 #else
22 char *malloc ();
23 #endif
24 ]],
25 [[char *p = malloc (0);
26 int result = !p;
27 free (p);
28 return result;]])
29 ],
30 [ac_cv_func_malloc_0_nonnull=yes],
31 [ac_cv_func_malloc_0_nonnull=no],
32 [case "$host_os" in
33 # Guess yes on platforms where we know the result.
34 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
35 | hpux* | solaris* | cygwin* | mingw*)
36 ac_cv_func_malloc_0_nonnull=yes ;;
37 # If we don't know, assume the worst.
38 *) ac_cv_func_malloc_0_nonnull=no ;;
39 esac
40 ])
41 ])
42 AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
43 ])# _AC_FUNC_MALLOC_IF
44
45 ])
46
47 # gl_FUNC_MALLOC_GNU
48 # ------------------
49 # Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
50 # it is not.
51 AC_DEFUN([gl_FUNC_MALLOC_GNU],
52 [
53 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
54 dnl _AC_FUNC_MALLOC_IF is defined in Autoconf.
55 _AC_FUNC_MALLOC_IF(
56 [AC_DEFINE([HAVE_MALLOC_GNU], [1],
57 [Define to 1 if your system has a GNU libc compatible 'malloc'
58 function, and to 0 otherwise.])],
59 [AC_DEFINE([HAVE_MALLOC_GNU], [0])
60 REPLACE_MALLOC=1
61 ])
62 ])
63
64 # gl_FUNC_MALLOC_POSIX
65 # --------------------
66 # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
67 # fails), and replace malloc if it is not.
68 AC_DEFUN([gl_FUNC_MALLOC_POSIX],
69 [
70 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
71 AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
72 if test $gl_cv_func_malloc_posix = yes; then
73 AC_DEFINE([HAVE_MALLOC_POSIX], [1],
74 [Define if the 'malloc' function is POSIX compliant.])
75 else
76 REPLACE_MALLOC=1
77 fi
78 ])
79
80 # Test whether malloc, realloc, calloc are POSIX compliant,
81 # Set gl_cv_func_malloc_posix to yes or no accordingly.
82 AC_DEFUN([gl_CHECK_MALLOC_POSIX],
83 [
84 AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
85 [gl_cv_func_malloc_posix],
86 [
87 dnl It is too dangerous to try to allocate a large amount of memory:
88 dnl some systems go to their knees when you do that. So assume that
89 dnl all Unix implementations of the function are POSIX compliant.
90 AC_COMPILE_IFELSE(
91 [AC_LANG_PROGRAM(
92 [[]],
93 [[#if defined _WIN32 && ! defined __CYGWIN__
94 choke me
95 #endif
96 ]])],
97 [gl_cv_func_malloc_posix=yes],
98 [gl_cv_func_malloc_posix=no])
99 ])
100 ])
0 # manywarnings-c++.m4 serial 3
1 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 # Implementation of the specialization of gl_MANYWARN_ALL_GCC
7 # for _AC_LANG = C++.
8 AC_DEFUN([gl_MANYWARN_ALL_GCC_CXX_IMPL],
9 [
10 AC_LANG_PUSH([C++])
11
12 dnl First, check for some issues that only occur when combining multiple
13 dnl gcc warning categories.
14 AC_REQUIRE([AC_PROG_CXX])
15 if test -n "$GXX"; then
16
17 dnl Check if -W -Werror -Wno-missing-field-initializers is supported
18 dnl with the current $CXX $CXXFLAGS $CPPFLAGS.
19 AC_CACHE_CHECK([whether -Wno-missing-field-initializers is supported],
20 [gl_cv_cxx_nomfi_supported],
21 [gl_save_CXXFLAGS="$CXXFLAGS"
22 CXXFLAGS="$CXXFLAGS -W -Werror -Wno-missing-field-initializers"
23 AC_COMPILE_IFELSE(
24 [AC_LANG_PROGRAM([[]], [[]])],
25 [gl_cv_cxx_nomfi_supported=yes],
26 [gl_cv_cxx_nomfi_supported=no])
27 CXXFLAGS="$gl_save_CXXFLAGS"
28 ])
29
30 if test "$gl_cv_cxx_nomfi_supported" = yes; then
31 dnl Now check whether -Wno-missing-field-initializers is needed
32 dnl for the { 0, } construct.
33 AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed],
34 [gl_cv_cxx_nomfi_needed],
35 [gl_save_CXXFLAGS="$CXXFLAGS"
36 CXXFLAGS="$CXXFLAGS -W -Werror"
37 AC_COMPILE_IFELSE(
38 [AC_LANG_PROGRAM(
39 [[int f (void)
40 {
41 typedef struct { int a; int b; } s_t;
42 s_t s1 = { 0, };
43 return s1.b;
44 }
45 ]],
46 [[]])],
47 [gl_cv_cxx_nomfi_needed=no],
48 [gl_cv_cxx_nomfi_needed=yes])
49 CXXFLAGS="$gl_save_CXXFLAGS"
50 ])
51 fi
52
53 dnl Next, check if -Werror -Wuninitialized is useful with the
54 dnl user's choice of $CXXFLAGS; some versions of gcc warn that it
55 dnl has no effect if -O is not also used
56 AC_CACHE_CHECK([whether -Wuninitialized is supported],
57 [gl_cv_cxx_uninitialized_supported],
58 [gl_save_CXXFLAGS="$CXXFLAGS"
59 CXXFLAGS="$CXXFLAGS -Werror -Wuninitialized"
60 AC_COMPILE_IFELSE(
61 [AC_LANG_PROGRAM([[]], [[]])],
62 [gl_cv_cxx_uninitialized_supported=yes],
63 [gl_cv_cxx_uninitialized_supported=no])
64 CXXFLAGS="$gl_save_CXXFLAGS"
65 ])
66
67 fi
68
69 # List all gcc warning categories.
70 # To compare this list to your installed GCC's, run this Bash command:
71 #
72 # comm -3 \
73 # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings-c++.m4 | sort) \
74 # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
75 # grep -v -x -f <(
76 # awk '/^[^#]/ {print $1}' ../build-aux/g++-warning.spec))
77
78 gl_manywarn_set=
79 for gl_manywarn_item in \
80 -W \
81 -Wabi \
82 -Wabi-tag \
83 -Waddress \
84 -Waggressive-loop-optimizations \
85 -Wall \
86 -Wattributes \
87 -Wbool-compare \
88 -Wbuiltin-macro-redefined \
89 -Wcast-align \
90 -Wchar-subscripts \
91 -Wchkp \
92 -Wclobbered \
93 -Wcomment \
94 -Wcomments \
95 -Wconditionally-supported \
96 -Wconversion-null \
97 -Wcoverage-mismatch \
98 -Wcpp \
99 -Wctor-dtor-privacy \
100 -Wdate-time \
101 -Wdelete-incomplete \
102 -Wdelete-non-virtual-dtor \
103 -Wdeprecated \
104 -Wdeprecated-declarations \
105 -Wdisabled-optimization \
106 -Wdiv-by-zero \
107 -Wdouble-promotion \
108 -Weffc++ \
109 -Wempty-body \
110 -Wendif-labels \
111 -Wenum-compare \
112 -Wextra \
113 -Wformat-contains-nul \
114 -Wformat-extra-args \
115 -Wformat-nonliteral \
116 -Wformat-security \
117 -Wformat-signedness \
118 -Wformat-y2k \
119 -Wformat-zero-length \
120 -Wfree-nonheap-object \
121 -Wignored-qualifiers \
122 -Winherited-variadic-ctor \
123 -Winit-self \
124 -Winline \
125 -Wint-to-pointer-cast \
126 -Winvalid-memory-model \
127 -Winvalid-offsetof \
128 -Winvalid-pch \
129 -Wliteral-suffix \
130 -Wlogical-not-parentheses \
131 -Wlogical-op \
132 -Wmain \
133 -Wmaybe-uninitialized \
134 -Wmemset-transposed-args \
135 -Wmissing-braces \
136 -Wmissing-declarations \
137 -Wmissing-field-initializers \
138 -Wmissing-include-dirs \
139 -Wmultichar \
140 -Wnarrowing \
141 -Wnoexcept \
142 -Wnon-template-friend \
143 -Wnon-virtual-dtor \
144 -Wnonnull \
145 -Wodr \
146 -Wold-style-cast \
147 -Wopenmp-simd \
148 -Woverflow \
149 -Woverlength-strings \
150 -Woverloaded-virtual \
151 -Wpacked \
152 -Wpacked-bitfield-compat \
153 -Wparentheses \
154 -Wpmf-conversions \
155 -Wpointer-arith \
156 -Wpragmas \
157 -Wreorder \
158 -Wreturn-local-addr \
159 -Wreturn-type \
160 -Wsequence-point \
161 -Wshadow \
162 -Wshift-count-negative \
163 -Wshift-count-overflow \
164 -Wsign-promo \
165 -Wsized-deallocation \
166 -Wsizeof-array-argument \
167 -Wsizeof-pointer-memaccess \
168 -Wstack-protector \
169 -Wstrict-aliasing \
170 -Wstrict-null-sentinel \
171 -Wstrict-overflow \
172 -Wsuggest-attribute=const \
173 -Wsuggest-attribute=format \
174 -Wsuggest-attribute=noreturn \
175 -Wsuggest-attribute=pure \
176 -Wsuggest-final-methods \
177 -Wsuggest-final-types \
178 -Wsuggest-override \
179 -Wswitch \
180 -Wswitch-bool \
181 -Wsync-nand \
182 -Wsystem-headers \
183 -Wtrampolines \
184 -Wtrigraphs \
185 -Wtype-limits \
186 -Wuninitialized \
187 -Wunknown-pragmas \
188 -Wunsafe-loop-optimizations \
189 -Wunused \
190 -Wunused-but-set-parameter \
191 -Wunused-but-set-variable \
192 -Wunused-function \
193 -Wunused-label \
194 -Wunused-local-typedefs \
195 -Wunused-macros \
196 -Wunused-parameter \
197 -Wunused-result \
198 -Wunused-value \
199 -Wunused-variable \
200 -Wuseless-cast \
201 -Wvarargs \
202 -Wvariadic-macros \
203 -Wvector-operation-performance \
204 -Wvirtual-move-assign \
205 -Wvla \
206 -Wvolatile-register-var \
207 -Wwrite-strings \
208 -Wzero-as-null-pointer-constant \
209 \
210 ; do
211 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
212 done
213
214 # gcc --help=warnings outputs an unusual form for these options; list
215 # them here so that the above 'comm' command doesn't report a false match.
216 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
217 gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
218 gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
219 gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
220
221 # These are needed for older GCC versions.
222 if test -n "$GXX"; then
223 case `($CXX --version) 2>/dev/null` in
224 'g++ (GCC) '[[0-3]].* | \
225 'g++ (GCC) '4.[[0-7]].*)
226 gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
227 gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
228 ;;
229 esac
230 fi
231
232 # Disable specific options as needed.
233 if test "$gl_cv_cxx_nomfi_needed" = yes; then
234 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
235 fi
236
237 if test "$gl_cv_cxx_uninitialized_supported" = no; then
238 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
239 fi
240
241 $1=$gl_manywarn_set
242
243 AC_LANG_POP([C++])
244 ])
0 # manywarnings.m4 serial 17
1 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Simon Josefsson
7
8 # gl_MANYWARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR)
9 # --------------------------------------------------
10 # Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR.
11 # Elements separated by whitespace. In set logic terms, the function
12 # does OUTVAR = LISTVAR \ REMOVEVAR.
13 AC_DEFUN([gl_MANYWARN_COMPLEMENT],
14 [
15 gl_warn_set=
16 set x $2; shift
17 for gl_warn_item
18 do
19 case " $3 " in
20 *" $gl_warn_item "*)
21 ;;
22 *)
23 gl_warn_set="$gl_warn_set $gl_warn_item"
24 ;;
25 esac
26 done
27 $1=$gl_warn_set
28 ])
29
30 # gl_MANYWARN_ALL_GCC(VARIABLE)
31 # -----------------------------
32 # Add all documented GCC warning parameters to variable VARIABLE.
33 # Note that you need to test them using gl_WARN_ADD if you want to
34 # make sure your gcc understands it.
35 #
36 # The effects of this macro depend on the current language (_AC_LANG).
37 AC_DEFUN([gl_MANYWARN_ALL_GCC],
38 [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
39
40 # Specialization for _AC_LANG = C.
41 # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
42 m4_defun([gl_MANYWARN_ALL_GCC(C)],
43 [
44 AC_LANG_PUSH([C])
45
46 dnl First, check for some issues that only occur when combining multiple
47 dnl gcc warning categories.
48 AC_REQUIRE([AC_PROG_CC])
49 if test -n "$GCC"; then
50
51 dnl Check if -W -Werror -Wno-missing-field-initializers is supported
52 dnl with the current $CC $CFLAGS $CPPFLAGS.
53 AC_CACHE_CHECK([whether -Wno-missing-field-initializers is supported],
54 [gl_cv_cc_nomfi_supported],
55 [gl_save_CFLAGS="$CFLAGS"
56 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
57 AC_COMPILE_IFELSE(
58 [AC_LANG_PROGRAM([[]], [[]])],
59 [gl_cv_cc_nomfi_supported=yes],
60 [gl_cv_cc_nomfi_supported=no])
61 CFLAGS="$gl_save_CFLAGS"
62 ])
63
64 if test "$gl_cv_cc_nomfi_supported" = yes; then
65 dnl Now check whether -Wno-missing-field-initializers is needed
66 dnl for the { 0, } construct.
67 AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed],
68 [gl_cv_cc_nomfi_needed],
69 [gl_save_CFLAGS="$CFLAGS"
70 CFLAGS="$CFLAGS -W -Werror"
71 AC_COMPILE_IFELSE(
72 [AC_LANG_PROGRAM(
73 [[int f (void)
74 {
75 typedef struct { int a; int b; } s_t;
76 s_t s1 = { 0, };
77 return s1.b;
78 }
79 ]],
80 [[]])],
81 [gl_cv_cc_nomfi_needed=no],
82 [gl_cv_cc_nomfi_needed=yes])
83 CFLAGS="$gl_save_CFLAGS"
84 ])
85 fi
86
87 dnl Next, check if -Werror -Wuninitialized is useful with the
88 dnl user's choice of $CFLAGS; some versions of gcc warn that it
89 dnl has no effect if -O is not also used
90 AC_CACHE_CHECK([whether -Wuninitialized is supported],
91 [gl_cv_cc_uninitialized_supported],
92 [gl_save_CFLAGS="$CFLAGS"
93 CFLAGS="$CFLAGS -Werror -Wuninitialized"
94 AC_COMPILE_IFELSE(
95 [AC_LANG_PROGRAM([[]], [[]])],
96 [gl_cv_cc_uninitialized_supported=yes],
97 [gl_cv_cc_uninitialized_supported=no])
98 CFLAGS="$gl_save_CFLAGS"
99 ])
100
101 fi
102
103 # List all gcc warning categories.
104 # To compare this list to your installed GCC's, run this Bash command:
105 #
106 # comm -3 \
107 # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
108 # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
109 # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
110
111 gl_manywarn_set=
112 for gl_manywarn_item in -fno-common \
113 -W \
114 -Waddress \
115 -Waggressive-loop-optimizations \
116 -Wall \
117 -Wattribute-alias \
118 -Wattributes \
119 -Wbad-function-cast \
120 -Wbool-compare \
121 -Wbool-operation \
122 -Wbuiltin-declaration-mismatch \
123 -Wbuiltin-macro-redefined \
124 -Wcast-align \
125 -Wcast-align=strict \
126 -Wcast-function-type \
127 -Wchar-subscripts \
128 -Wclobbered \
129 -Wcomment \
130 -Wcomments \
131 -Wcoverage-mismatch \
132 -Wcpp \
133 -Wdangling-else \
134 -Wdate-time \
135 -Wdeprecated \
136 -Wdeprecated-declarations \
137 -Wdesignated-init \
138 -Wdisabled-optimization \
139 -Wdiscarded-array-qualifiers \
140 -Wdiscarded-qualifiers \
141 -Wdiv-by-zero \
142 -Wdouble-promotion \
143 -Wduplicated-branches \
144 -Wduplicated-cond \
145 -Wduplicate-decl-specifier \
146 -Wempty-body \
147 -Wendif-labels \
148 -Wenum-compare \
149 -Wexpansion-to-defined \
150 -Wextra \
151 -Wformat-contains-nul \
152 -Wformat-extra-args \
153 -Wformat-nonliteral \
154 -Wformat-security \
155 -Wformat-signedness \
156 -Wformat-y2k \
157 -Wformat-zero-length \
158 -Wframe-address \
159 -Wfree-nonheap-object \
160 -Whsa \
161 -Wif-not-aligned \
162 -Wignored-attributes \
163 -Wignored-qualifiers \
164 -Wimplicit \
165 -Wimplicit-function-declaration \
166 -Wimplicit-int \
167 -Wincompatible-pointer-types \
168 -Winit-self \
169 -Winline \
170 -Wint-conversion \
171 -Wint-in-bool-context \
172 -Wint-to-pointer-cast \
173 -Winvalid-memory-model \
174 -Winvalid-pch \
175 -Wlogical-not-parentheses \
176 -Wlogical-op \
177 -Wmain \
178 -Wmaybe-uninitialized \
179 -Wmemset-elt-size \
180 -Wmemset-transposed-args \
181 -Wmisleading-indentation \
182 -Wmissing-attributes \
183 -Wmissing-braces \
184 -Wmissing-declarations \
185 -Wmissing-field-initializers \
186 -Wmissing-include-dirs \
187 -Wmissing-parameter-type \
188 -Wmissing-prototypes \
189 -Wmultichar \
190 -Wmultistatement-macros \
191 -Wnarrowing \
192 -Wnested-externs \
193 -Wnonnull \
194 -Wnonnull-compare \
195 -Wnull-dereference \
196 -Wodr \
197 -Wold-style-declaration \
198 -Wold-style-definition \
199 -Wopenmp-simd \
200 -Woverflow \
201 -Woverlength-strings \
202 -Woverride-init \
203 -Wpacked \
204 -Wpacked-bitfield-compat \
205 -Wpacked-not-aligned \
206 -Wparentheses \
207 -Wpointer-arith \
208 -Wpointer-compare \
209 -Wpointer-sign \
210 -Wpointer-to-int-cast \
211 -Wpragmas \
212 -Wpsabi \
213 -Wrestrict \
214 -Wreturn-local-addr \
215 -Wreturn-type \
216 -Wscalar-storage-order \
217 -Wsequence-point \
218 -Wshadow \
219 -Wshift-count-negative \
220 -Wshift-count-overflow \
221 -Wshift-negative-value \
222 -Wsizeof-array-argument \
223 -Wsizeof-pointer-div \
224 -Wsizeof-pointer-memaccess \
225 -Wstack-protector \
226 -Wstrict-aliasing \
227 -Wstrict-overflow \
228 -Wstrict-prototypes \
229 -Wstringop-truncation \
230 -Wsuggest-attribute=cold \
231 -Wsuggest-attribute=const \
232 -Wsuggest-attribute=format \
233 -Wsuggest-attribute=malloc \
234 -Wsuggest-attribute=noreturn \
235 -Wsuggest-attribute=pure \
236 -Wsuggest-final-methods \
237 -Wsuggest-final-types \
238 -Wswitch \
239 -Wswitch-bool \
240 -Wswitch-unreachable \
241 -Wsync-nand \
242 -Wsystem-headers \
243 -Wtautological-compare \
244 -Wtrampolines \
245 -Wtrigraphs \
246 -Wtype-limits \
247 -Wuninitialized \
248 -Wunknown-pragmas \
249 -Wunsafe-loop-optimizations \
250 -Wunused \
251 -Wunused-but-set-parameter \
252 -Wunused-but-set-variable \
253 -Wunused-function \
254 -Wunused-label \
255 -Wunused-local-typedefs \
256 -Wunused-macros \
257 -Wunused-parameter \
258 -Wunused-result \
259 -Wunused-value \
260 -Wunused-variable \
261 -Wvarargs \
262 -Wvariadic-macros \
263 -Wvector-operation-performance \
264 -Wvla \
265 -Wvolatile-register-var \
266 -Wwrite-strings \
267 \
268 ; do
269 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
270 done
271
272 # gcc --help=warnings outputs an unusual form for these options; list
273 # them here so that the above 'comm' command doesn't report a false match.
274 # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
275 # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
276 # the only platforms where it does not fit in a long, so make that
277 # a special case.
278 AC_MSG_CHECKING([max safe object size])
279 AC_COMPUTE_INT([gl_alloc_max],
280 [LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
281 ? -1
282 : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1],
283 [[#include <limits.h>
284 #include <stddef.h>
285 #include <stdint.h>
286 ]],
287 [gl_alloc_max=2147483647])
288 case $gl_alloc_max in
289 -1) gl_alloc_max=9223372036854775807;;
290 esac
291 AC_MSG_RESULT([$gl_alloc_max])
292 gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
293 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
294 gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
295 gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
296 gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
297 gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
298 gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
299 gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
300 gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
301 gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
302
303 # These are needed for older GCC versions.
304 if test -n "$GCC"; then
305 case `($CC --version) 2>/dev/null` in
306 'gcc (GCC) '[[0-3]].* | \
307 'gcc (GCC) '4.[[0-7]].*)
308 gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
309 gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
310 ;;
311 esac
312 fi
313
314 # Disable specific options as needed.
315 if test "$gl_cv_cc_nomfi_needed" = yes; then
316 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
317 fi
318
319 if test "$gl_cv_cc_uninitialized_supported" = no; then
320 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
321 fi
322
323 $1=$gl_manywarn_set
324
325 AC_LANG_POP([C])
326 ])
327
328 # Specialization for _AC_LANG = C++.
329 # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
330 m4_defun([gl_MANYWARN_ALL_GCC(C++)],
331 [
332 gl_MANYWARN_ALL_GCC_CXX_IMPL([$1])
333 ])
0 # msvc-inval.m4 serial 1
1 dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_DEFUN([gl_MSVC_INVAL],
7 [
8 AC_CHECK_FUNCS_ONCE([_set_invalid_parameter_handler])
9 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
10 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
11 AC_DEFINE([HAVE_MSVC_INVALID_PARAMETER_HANDLER], [1],
12 [Define to 1 on MSVC platforms that have the "invalid parameter handler"
13 concept.])
14 else
15 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
16 fi
17 AC_SUBST([HAVE_MSVC_INVALID_PARAMETER_HANDLER])
18 ])
0 # msvc-nothrow.m4 serial 1
1 dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_DEFUN([gl_MSVC_NOTHROW],
7 [
8 AC_REQUIRE([gl_MSVC_INVAL])
9 ])
0 # off_t.m4 serial 1
1 dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl Check whether to override the 'off_t' type.
7 dnl Set WINDOWS_64_BIT_OFF_T.
8
9 AC_DEFUN([gl_TYPE_OFF_T],
10 [
11 m4_ifdef([gl_LARGEFILE], [
12 AC_REQUIRE([gl_LARGEFILE])
13 ], [
14 WINDOWS_64_BIT_OFF_T=0
15 ])
16 AC_SUBST([WINDOWS_64_BIT_OFF_T])
17 ])
0 dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1 dnl serial 11 (pkg-config-0.29.1)
2 dnl
3 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
4 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
5 dnl
6 dnl This program is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 2 of the License, or
9 dnl (at your option) any later version.
10 dnl
11 dnl This program is distributed in the hope that it will be useful, but
12 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 dnl General Public License for more details.
15 dnl
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with this program; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 dnl 02111-1307, USA.
20 dnl
21 dnl As a special exception to the GNU General Public License, if you
22 dnl distribute this file as part of a program that contains a
23 dnl configuration script generated by Autoconf, you may include it under
24 dnl the same distribution terms that you use for the rest of that
25 dnl program.
26
27 dnl PKG_PREREQ(MIN-VERSION)
28 dnl -----------------------
29 dnl Since: 0.29
30 dnl
31 dnl Verify that the version of the pkg-config macros are at least
32 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
33 dnl installed version of pkg-config, this checks the developer's version
34 dnl of pkg.m4 when generating configure.
35 dnl
36 dnl To ensure that this macro is defined, also add:
37 dnl m4_ifndef([PKG_PREREQ],
38 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
39 dnl
40 dnl See the "Since" comment for each macro you use to see what version
41 dnl of the macros you require.
42 m4_defun([PKG_PREREQ],
43 [m4_define([PKG_MACROS_VERSION], [0.29.1])
44 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
45 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
46 ])dnl PKG_PREREQ
47
48 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
49 dnl ----------------------------------
50 dnl Since: 0.16
51 dnl
52 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
53 dnl first found in the path. Checks that the version of pkg-config found
54 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
55 dnl used since that's the first version where most current features of
56 dnl pkg-config existed.
57 AC_DEFUN([PKG_PROG_PKG_CONFIG],
58 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
59 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
60 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
61 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
62 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
63 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
64
65 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
66 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
67 fi
68 if test -n "$PKG_CONFIG"; then
69 _pkg_min_version=m4_default([$1], [0.9.0])
70 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
71 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
72 AC_MSG_RESULT([yes])
73 else
74 AC_MSG_RESULT([no])
75 PKG_CONFIG=""
76 fi
77 fi[]dnl
78 ])dnl PKG_PROG_PKG_CONFIG
79
80 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
81 dnl -------------------------------------------------------------------
82 dnl Since: 0.18
83 dnl
84 dnl Check to see whether a particular set of modules exists. Similar to
85 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
86 dnl
87 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
88 dnl only at the first occurence in configure.ac, so if the first place
89 dnl it's called might be skipped (such as if it is within an "if", you
90 dnl have to call PKG_CHECK_EXISTS manually
91 AC_DEFUN([PKG_CHECK_EXISTS],
92 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
93 if test -n "$PKG_CONFIG" && \
94 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
95 m4_default([$2], [:])
96 m4_ifvaln([$3], [else
97 $3])dnl
98 fi])
99
100 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
101 dnl ---------------------------------------------
102 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
103 dnl pkg_failed based on the result.
104 m4_define([_PKG_CONFIG],
105 [if test -n "$$1"; then
106 pkg_cv_[]$1="$$1"
107 elif test -n "$PKG_CONFIG"; then
108 PKG_CHECK_EXISTS([$3],
109 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
110 test "x$?" != "x0" && pkg_failed=yes ],
111 [pkg_failed=yes])
112 else
113 pkg_failed=untried
114 fi[]dnl
115 ])dnl _PKG_CONFIG
116
117 dnl _PKG_SHORT_ERRORS_SUPPORTED
118 dnl ---------------------------
119 dnl Internal check to see if pkg-config supports short errors.
120 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
121 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
122 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
123 _pkg_short_errors_supported=yes
124 else
125 _pkg_short_errors_supported=no
126 fi[]dnl
127 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
128
129
130 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
131 dnl [ACTION-IF-NOT-FOUND])
132 dnl --------------------------------------------------------------
133 dnl Since: 0.4.0
134 dnl
135 dnl Note that if there is a possibility the first call to
136 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
137 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
138 AC_DEFUN([PKG_CHECK_MODULES],
139 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
140 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
141 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
142
143 pkg_failed=no
144 AC_MSG_CHECKING([for $1])
145
146 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
147 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
148
149 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
150 and $1[]_LIBS to avoid the need to call pkg-config.
151 See the pkg-config man page for more details.])
152
153 if test $pkg_failed = yes; then
154 AC_MSG_RESULT([no])
155 _PKG_SHORT_ERRORS_SUPPORTED
156 if test $_pkg_short_errors_supported = yes; then
157 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
158 else
159 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
160 fi
161 # Put the nasty error message in config.log where it belongs
162 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
163
164 m4_default([$4], [AC_MSG_ERROR(
165 [Package requirements ($2) were not met:
166
167 $$1_PKG_ERRORS
168
169 Consider adjusting the PKG_CONFIG_PATH environment variable if you
170 installed software in a non-standard prefix.
171
172 _PKG_TEXT])[]dnl
173 ])
174 elif test $pkg_failed = untried; then
175 AC_MSG_RESULT([no])
176 m4_default([$4], [AC_MSG_FAILURE(
177 [The pkg-config script could not be found or is too old. Make sure it
178 is in your PATH or set the PKG_CONFIG environment variable to the full
179 path to pkg-config.
180
181 _PKG_TEXT
182
183 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
184 ])
185 else
186 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
187 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
188 AC_MSG_RESULT([yes])
189 $3
190 fi[]dnl
191 ])dnl PKG_CHECK_MODULES
192
193
194 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
195 dnl [ACTION-IF-NOT-FOUND])
196 dnl ---------------------------------------------------------------------
197 dnl Since: 0.29
198 dnl
199 dnl Checks for existence of MODULES and gathers its build flags with
200 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
201 dnl and VARIABLE-PREFIX_LIBS from --libs.
202 dnl
203 dnl Note that if there is a possibility the first call to
204 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
205 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
206 dnl configure.ac.
207 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
208 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
209 _save_PKG_CONFIG=$PKG_CONFIG
210 PKG_CONFIG="$PKG_CONFIG --static"
211 PKG_CHECK_MODULES($@)
212 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
213 ])dnl PKG_CHECK_MODULES_STATIC
214
215
216 dnl PKG_INSTALLDIR([DIRECTORY])
217 dnl -------------------------
218 dnl Since: 0.27
219 dnl
220 dnl Substitutes the variable pkgconfigdir as the location where a module
221 dnl should install pkg-config .pc files. By default the directory is
222 dnl $libdir/pkgconfig, but the default can be changed by passing
223 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
224 dnl parameter.
225 AC_DEFUN([PKG_INSTALLDIR],
226 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
227 m4_pushdef([pkg_description],
228 [pkg-config installation directory @<:@]pkg_default[@:>@])
229 AC_ARG_WITH([pkgconfigdir],
230 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
231 [with_pkgconfigdir=]pkg_default)
232 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
233 m4_popdef([pkg_default])
234 m4_popdef([pkg_description])
235 ])dnl PKG_INSTALLDIR
236
237
238 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
239 dnl --------------------------------
240 dnl Since: 0.27
241 dnl
242 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
243 dnl module should install arch-independent pkg-config .pc files. By
244 dnl default the directory is $datadir/pkgconfig, but the default can be
245 dnl changed by passing DIRECTORY. The user can override through the
246 dnl --with-noarch-pkgconfigdir parameter.
247 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
248 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
249 m4_pushdef([pkg_description],
250 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
251 AC_ARG_WITH([noarch-pkgconfigdir],
252 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
253 [with_noarch_pkgconfigdir=]pkg_default)
254 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
255 m4_popdef([pkg_default])
256 m4_popdef([pkg_description])
257 ])dnl PKG_NOARCH_INSTALLDIR
258
259
260 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
261 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
262 dnl -------------------------------------------
263 dnl Since: 0.28
264 dnl
265 dnl Retrieves the value of the pkg-config variable for the given module.
266 AC_DEFUN([PKG_CHECK_VAR],
267 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
268 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
269
270 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
271 AS_VAR_COPY([$1], [pkg_cv_][$1])
272
273 AS_VAR_IF([$1], [""], [$5], [$4])dnl
274 ])dnl PKG_CHECK_VAR
0 # rawmemchr.m4 serial 2
1 dnl Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_DEFUN([gl_FUNC_RAWMEMCHR],
7 [
8 dnl Persuade glibc <string.h> to declare rawmemchr().
9 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
10
11 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
12 AC_CHECK_FUNCS([rawmemchr])
13 if test $ac_cv_func_rawmemchr = no; then
14 HAVE_RAWMEMCHR=0
15 fi
16 ])
17
18 # Prerequisites of lib/strchrnul.c.
19 AC_DEFUN([gl_PREREQ_RAWMEMCHR], [:])
0 # relocatable-lib.m4 serial 6
1 dnl Copyright (C) 2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Bruno Haible.
7
8 dnl Support for relocatable libraries.
9 AC_DEFUN([gl_RELOCATABLE_LIBRARY],
10 [
11 AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
12 ])
13 AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
14 [
15 AC_REQUIRE([gl_RELOCATABLE_NOP])
16 dnl Easier to put this here once, instead of into the DEFS of each Makefile.
17 if test "X$prefix" = "XNONE"; then
18 reloc_final_prefix="$ac_default_prefix"
19 else
20 reloc_final_prefix="$prefix"
21 fi
22 AC_DEFINE_UNQUOTED([INSTALLPREFIX], ["${reloc_final_prefix}"],
23 [Define to the value of ${prefix}, as a string.])
24 if test $RELOCATABLE = yes; then
25 AC_DEFINE([ENABLE_RELOCATABLE], [1],
26 [Define to 1 if the package shall run at any location in the file
27 system.])
28 fi
29 ])
30
31 dnl Support for relocatable packages for which it is a nop.
32 AC_DEFUN([gl_RELOCATABLE_NOP],
33 [
34 AC_MSG_CHECKING([whether to activate relocatable installation])
35 AC_ARG_ENABLE([relocatable],
36 [AS_HELP_STRING([--enable-relocatable],
37 [install a package that can be moved in the file system])],
38 [if test "$enableval" != no; then
39 RELOCATABLE=yes
40 else
41 RELOCATABLE=no
42 fi
43 ], RELOCATABLE=no)
44 AC_SUBST([RELOCATABLE])
45 AC_MSG_RESULT([$RELOCATABLE])
46 ])
0 # ssize_t.m4 serial 5 (gettext-0.18.2)
1 dnl Copyright (C) 2001-2003, 2006, 2010-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Bruno Haible.
7 dnl Test whether ssize_t is defined.
8
9 AC_DEFUN([gt_TYPE_SSIZE_T],
10 [
11 AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
12 [AC_COMPILE_IFELSE(
13 [AC_LANG_PROGRAM(
14 [[#include <sys/types.h>]],
15 [[int x = sizeof (ssize_t *) + sizeof (ssize_t);
16 return !x;]])],
17 [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
18 if test $gt_cv_ssize_t = no; then
19 AC_DEFINE([ssize_t], [int],
20 [Define as a signed type of the same size as size_t.])
21 fi
22 ])
0 # Prefer GNU C11 and C++11 to earlier versions. -*- coding: utf-8 -*-
1
2 # This implementation is taken from GNU Autoconf lib/autoconf/c.m4
3 # commit 017d5ddd82854911f0119691d91ea8a1438824d6
4 # dated Sun Apr 3 13:57:17 2016 -0700
5 # This implementation will be obsolete once we can assume Autoconf 2.70
6 # or later is installed everywhere a Gnulib program might be developed.
7
8
9 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
10
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program. If not, see <https://www.gnu.org/licenses/>.
23
24 # Written by David MacKenzie, with help from
25 # Akim Demaille, Paul Eggert,
26 # François Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
27 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
28
29
30 # AC_PROG_CC([COMPILER ...])
31 # --------------------------
32 # COMPILER ... is a space separated list of C compilers to search for.
33 # This just gives the user an opportunity to specify an alternative
34 # search list for the C compiler.
35 AC_DEFUN_ONCE([AC_PROG_CC],
36 [AC_LANG_PUSH(C)dnl
37 AC_ARG_VAR([CC], [C compiler command])dnl
38 AC_ARG_VAR([CFLAGS], [C compiler flags])dnl
39 _AC_ARG_VAR_LDFLAGS()dnl
40 _AC_ARG_VAR_LIBS()dnl
41 _AC_ARG_VAR_CPPFLAGS()dnl
42 m4_ifval([$1],
43 [AC_CHECK_TOOLS(CC, [$1])],
44 [AC_CHECK_TOOL(CC, gcc)
45 if test -z "$CC"; then
46 dnl Here we want:
47 dnl AC_CHECK_TOOL(CC, cc)
48 dnl but without the check for a tool without the prefix.
49 dnl Until the check is removed from there, copy the code:
50 if test -n "$ac_tool_prefix"; then
51 AC_CHECK_PROG(CC, [${ac_tool_prefix}cc], [${ac_tool_prefix}cc])
52 fi
53 fi
54 if test -z "$CC"; then
55 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
56 fi
57 if test -z "$CC"; then
58 AC_CHECK_TOOLS(CC, cl.exe)
59 fi
60 if test -z "$CC"; then
61 AC_CHECK_TOOL(CC, clang)
62 fi
63 ])
64
65 test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH])
66
67 # Provide some information about the compiler.
68 _AS_ECHO_LOG([checking for _AC_LANG compiler version])
69 set X $ac_compile
70 ac_compiler=$[2]
71 for ac_option in --version -v -V -qversion -version; do
72 m4_ifdef([_AC_DO_LIMIT],[_AC_DO_LIMIT],[_AC_DO])([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
73 done
74
75 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
76 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
77 _AC_LANG_COMPILER_GNU
78 if test $ac_compiler_gnu = yes; then
79 GCC=yes
80 else
81 GCC=
82 fi
83 _AC_PROG_CC_G
84 dnl
85 dnl Set ac_prog_cc_stdc to the supported C version.
86 dnl Also set the documented variable ac_cv_prog_cc_stdc;
87 dnl its name was chosen when it was cached, but it is no longer cached.
88 _AC_PROG_CC_C11([ac_prog_cc_stdc=c11
89 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11],
90 [_AC_PROG_CC_C99([ac_prog_cc_stdc=c99
91 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99],
92 [_AC_PROG_CC_C89([ac_prog_cc_stdc=c89
93 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89],
94 [ac_prog_cc_stdc=no
95 ac_cv_prog_cc_stdc=no])])])
96 dnl
97 AC_LANG_POP(C)dnl
98 ])# AC_PROG_CC
99
100
101
102 # AC_PROG_CXX([LIST-OF-COMPILERS])
103 # --------------------------------
104 # LIST-OF-COMPILERS is a space separated list of C++ compilers to search
105 # for (if not specified, a default list is used). This just gives the
106 # user an opportunity to specify an alternative search list for the C++
107 # compiler.
108 # aCC HP-UX C++ compiler much better than `CC', so test before.
109 # FCC Fujitsu C++ compiler
110 # KCC KAI C++ compiler
111 # RCC Rational C++
112 # xlC_r AIX C Set++ (with support for reentrant code)
113 # xlC AIX C Set++
114 AC_DEFUN([AC_PROG_CXX],
115 [AC_LANG_PUSH(C++)dnl
116 AC_ARG_VAR([CXX], [C++ compiler command])dnl
117 AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])dnl
118 _AC_ARG_VAR_LDFLAGS()dnl
119 _AC_ARG_VAR_LIBS()dnl
120 _AC_ARG_VAR_CPPFLAGS()dnl
121 _AC_ARG_VAR_PRECIOUS([CCC])dnl
122 if test -z "$CXX"; then
123 if test -n "$CCC"; then
124 CXX=$CCC
125 else
126 AC_CHECK_TOOLS(CXX,
127 [m4_default([$1],
128 [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++])],
129 g++)
130 fi
131 fi
132 # Provide some information about the compiler.
133 _AS_ECHO_LOG([checking for _AC_LANG compiler version])
134 set X $ac_compile
135 ac_compiler=$[2]
136 for ac_option in --version -v -V -qversion; do
137 m4_ifdef([_AC_DO_LIMIT],[_AC_DO_LIMIT],[_AC_DO])([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
138 done
139
140 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
141 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
142 _AC_LANG_COMPILER_GNU
143 if test $ac_compiler_gnu = yes; then
144 GXX=yes
145 else
146 GXX=
147 fi
148 _AC_PROG_CXX_G
149 _AC_PROG_CXX_CXX11([ac_prog_cxx_stdcxx=cxx11
150 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
151 ac_cv_prog_cxx_cxx98=$ac_cv_prog_cxx_cxx11],
152 [_AC_PROG_CXX_CXX98([ac_prog_cxx_stdcxx=cxx98
153 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98],
154 [ac_prog_cxx_stdcxx=no
155 ac_cv_prog_cxx_stdcxx=no])])
156 AC_LANG_POP(C++)dnl
157 ])# AC_PROG_CXX
158
159
160 # _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
161 # ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
162 # --------------------------------------------------------------
163 # Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99')
164 # by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails,
165 # try again with each compiler option in the space-separated OPTION-LIST; if one
166 # helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE,
167 # else ACTION-IF-UNAVAILABLE.
168 AC_DEFUN([_AC_C_STD_TRY],
169 [AC_MSG_CHECKING([for $CC option to enable ]m4_translit($1, [c], [C])[ features])
170 AC_CACHE_VAL(ac_cv_prog_cc_$1,
171 [ac_cv_prog_cc_$1=no
172 ac_save_CC=$CC
173 AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])])
174 for ac_arg in '' $4
175 do
176 CC="$ac_save_CC $ac_arg"
177 _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg])
178 test "x$ac_cv_prog_cc_$1" != "xno" && break
179 done
180 rm -f conftest.$ac_ext
181 CC=$ac_save_CC
182 ])# AC_CACHE_VAL
183 ac_prog_cc_stdc_options=
184 case "x$ac_cv_prog_cc_$1" in
185 x)
186 AC_MSG_RESULT([none needed]) ;;
187 xno)
188 AC_MSG_RESULT([unsupported]) ;;
189 *)
190 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_$1"
191 CC=$CC$ac_prog_cc_stdc_options
192 AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;;
193 esac
194 AS_IF([test "x$ac_cv_prog_cc_$1" != xno], [$5], [$6])
195 ])# _AC_C_STD_TRY
196
197 # _AC_C_C99_TEST_HEADER
198 # ---------------------
199 # A C header suitable for testing for C99.
200 AC_DEFUN([_AC_C_C99_TEST_HEADER],
201 [[#include <stdarg.h>
202 #include <stdbool.h>
203 #include <stddef.h>
204 #include <stdlib.h>
205 #include <wchar.h>
206 #include <stdio.h>
207
208 // Check varargs macros. These examples are taken from C99 6.10.3.5.
209 #define debug(...) fprintf (stderr, __VA_ARGS__)
210 #define showlist(...) puts (#__VA_ARGS__)
211 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
212 static void
213 test_varargs_macros (void)
214 {
215 int x = 1234;
216 int y = 5678;
217 debug ("Flag");
218 debug ("X = %d\n", x);
219 showlist (The first, second, and third items.);
220 report (x>y, "x is %d but y is %d", x, y);
221 }
222
223 // Check long long types.
224 #define BIG64 18446744073709551615ull
225 #define BIG32 4294967295ul
226 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
227 #if !BIG_OK
228 your preprocessor is broken;
229 #endif
230 #if BIG_OK
231 #else
232 your preprocessor is broken;
233 #endif
234 static long long int bignum = -9223372036854775807LL;
235 static unsigned long long int ubignum = BIG64;
236
237 struct incomplete_array
238 {
239 int datasize;
240 double data[];
241 };
242
243 struct named_init {
244 int number;
245 const wchar_t *name;
246 double average;
247 };
248
249 typedef const char *ccp;
250
251 static inline int
252 test_restrict (ccp restrict text)
253 {
254 // See if C++-style comments work.
255 // Iterate through items via the restricted pointer.
256 // Also check for declarations in for loops.
257 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
258 continue;
259 return 0;
260 }
261
262 // Check varargs and va_copy.
263 static bool
264 test_varargs (const char *format, ...)
265 {
266 va_list args;
267 va_start (args, format);
268 va_list args_copy;
269 va_copy (args_copy, args);
270
271 const char *str = "";
272 int number = 0;
273 float fnumber = 0;
274
275 while (*format)
276 {
277 switch (*format++)
278 {
279 case 's': // string
280 str = va_arg (args_copy, const char *);
281 break;
282 case 'd': // int
283 number = va_arg (args_copy, int);
284 break;
285 case 'f': // float
286 fnumber = va_arg (args_copy, double);
287 break;
288 default:
289 break;
290 }
291 }
292 va_end (args_copy);
293 va_end (args);
294
295 return *str && number && fnumber;
296 }]])# _AC_C_C99_TEST_HEADER
297
298 # _AC_C_C99_TEST_BODY
299 # -------------------
300 # A C body suitable for testing for C99, assuming the corresponding header.
301 AC_DEFUN([_AC_C_C99_TEST_BODY],
302 [[
303 // Check bool.
304 _Bool success = false;
305
306 // Check restrict.
307 if (test_restrict ("String literal") == 0)
308 success = true;
309 char *restrict newvar = "Another string";
310
311 // Check varargs.
312 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
313 test_varargs_macros ();
314
315 // Check flexible array members.
316 struct incomplete_array *ia =
317 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
318 ia->datasize = 10;
319 for (int i = 0; i < ia->datasize; ++i)
320 ia->data[i] = i * 1.234;
321
322 // Check named initializers.
323 struct named_init ni = {
324 .number = 34,
325 .name = L"Test wide string",
326 .average = 543.34343,
327 };
328
329 ni.number = 58;
330
331 int dynamic_array[ni.number];
332 dynamic_array[ni.number - 1] = 543;
333
334 // work around unused variable warnings
335 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
336 || dynamic_array[ni.number - 1] != 543);
337 ]])
338
339 # _AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE])
340 # ----------------------------------------------------------------
341 # If the C compiler is not in ISO C99 mode by default, try to add an
342 # option to output variable CC to make it so. This macro tries
343 # various options that select ISO C99 on some system or another. It
344 # considers the compiler to be in ISO C99 mode if it handles _Bool,
345 # // comments, flexible array members, inline, long long int, mixed
346 # code and declarations, named initialization of structs, restrict,
347 # va_copy, varargs macros, variable declarations in for loops and
348 # variable length arrays.
349 AC_DEFUN([_AC_PROG_CC_C99],
350 [_AC_C_STD_TRY([c99],
351 [_AC_C_C99_TEST_HEADER],
352 [_AC_C_C99_TEST_BODY],
353 dnl Try
354 dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999)
355 dnl IBM XL C -qlanglvl=extc1x (V12.1; does not pass C11 test)
356 dnl IBM XL C -qlanglvl=extc99
357 dnl (pre-V12.1; unused restrictive mode: -qlanglvl=stdc99)
358 dnl HP cc -AC99
359 dnl Intel ICC -std=c99, -c99 (deprecated)
360 dnl IRIX -c99
361 dnl Solaris -D_STDC_C99=
362 dnl cc's -xc99 option uses linker magic to define the external
363 dnl symbol __xpg4 as if by "int __xpg4 = 1;", which enables C99
364 dnl behavior for C library functions. This is not wanted here,
365 dnl because it means that a single module compiled with -xc99
366 dnl alters C runtime behavior for the entire program, not for
367 dnl just the module. Instead, define the (private) symbol
368 dnl _STDC_C99, which suppresses a bogus failure in <stdbool.h>.
369 dnl The resulting compiler passes the test case here, and that's
370 dnl good enough. For more, please see the thread starting at:
371 dnl https://lists.gnu.org/r/autoconf/2010-12/msg00059.html
372 dnl Tru64 -c99
373 dnl with extended modes being tried first.
374 [[-std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99]], [$1], [$2])[]dnl
375 ])# _AC_PROG_CC_C99
376
377
378 # _AC_PROG_CC_C11 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE])
379 # ----------------------------------------------------------------
380 # If the C compiler is not in ISO C11 mode by default, try to add an
381 # option to output variable CC to make it so. This macro tries
382 # various options that select ISO C11 on some system or another. It
383 # considers the compiler to be in ISO C11 mode if it handles _Alignas,
384 # _Alignof, _Noreturn, _Static_assert, UTF-8 string literals,
385 # duplicate typedefs, and anonymous structures and unions.
386 AC_DEFUN([_AC_PROG_CC_C11],
387 [_AC_C_STD_TRY([c11],
388 [_AC_C_C99_TEST_HEADER[
389 // Check _Alignas.
390 char _Alignas (double) aligned_as_double;
391 char _Alignas (0) no_special_alignment;
392 extern char aligned_as_int;
393 char _Alignas (0) _Alignas (int) aligned_as_int;
394
395 // Check _Alignof.
396 enum
397 {
398 int_alignment = _Alignof (int),
399 int_array_alignment = _Alignof (int[100]),
400 char_alignment = _Alignof (char)
401 };
402 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
403
404 // Check _Noreturn.
405 int _Noreturn does_not_return (void) { for (;;) continue; }
406
407 // Check _Static_assert.
408 struct test_static_assert
409 {
410 int x;
411 _Static_assert (sizeof (int) <= sizeof (long int),
412 "_Static_assert does not work in struct");
413 long int y;
414 };
415
416 // Check UTF-8 literals.
417 #define u8 syntax error!
418 char const utf8_literal[] = u8"happens to be ASCII" "another string";
419
420 // Check duplicate typedefs.
421 typedef long *long_ptr;
422 typedef long int *long_ptr;
423 typedef long_ptr long_ptr;
424
425 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
426 struct anonymous
427 {
428 union {
429 struct { int i; int j; };
430 struct { int k; long int l; } w;
431 };
432 int m;
433 } v1;
434 ]],
435 [_AC_C_C99_TEST_BODY[
436 v1.i = 2;
437 v1.w.k = 5;
438 _Static_assert ((offsetof (struct anonymous, i)
439 == offsetof (struct anonymous, w.k)),
440 "Anonymous union alignment botch");
441 ]],
442 dnl Try
443 dnl GCC -std=gnu11 (unused restrictive mode: -std=c11)
444 dnl with extended modes being tried first.
445 dnl
446 dnl Do not try -qlanglvl=extc1x, because IBM XL C V12.1 (the latest version as
447 dnl of September 2012) does not pass the C11 test. For now, try extc1x when
448 dnl compiling the C99 test instead, since it enables _Static_assert and
449 dnl _Noreturn, which is a win. If -qlanglvl=extc11 or -qlanglvl=extc1x passes
450 dnl the C11 test in some future version of IBM XL C, we'll add it here,
451 dnl preferably extc11.
452 [[-std=gnu11]], [$1], [$2])[]dnl
453 ])# _AC_PROG_CC_C11
454
455
456 # AC_PROG_CC_C89
457 # --------------
458 # Do not use AU_ALIAS here and in AC_PROG_CC_C99 and AC_PROG_CC_STDC,
459 # as that'd be incompatible with how Automake redefines AC_PROG_CC. See
460 # <https://lists.gnu.org/r/autoconf/2012-10/msg00048.html>.
461 AU_DEFUN([AC_PROG_CC_C89],
462 [AC_REQUIRE([AC_PROG_CC])],
463 [$0 is obsolete; use AC_PROG_CC]
464 )
465
466 # AC_PROG_CC_C99
467 # --------------
468 AU_DEFUN([AC_PROG_CC_C99],
469 [AC_REQUIRE([AC_PROG_CC])],
470 [$0 is obsolete; use AC_PROG_CC]
471 )
472
473 # AC_PROG_CC_STDC
474 # ---------------
475 AU_DEFUN([AC_PROG_CC_STDC],
476 [AC_REQUIRE([AC_PROG_CC])],
477 [$0 is obsolete; use AC_PROG_CC]
478 )
479
480
481 # AC_C_PROTOTYPES
482 # ---------------
483 # Check if the C compiler supports prototypes, included if it needs
484 # options.
485 AC_DEFUN([AC_C_PROTOTYPES],
486 [AC_REQUIRE([AC_PROG_CC])dnl
487 if test "$ac_prog_cc_stdc" != no; then
488 AC_DEFINE(PROTOTYPES, 1,
489 [Define to 1 if the C compiler supports function prototypes.])
490 AC_DEFINE(__PROTOTYPES, 1,
491 [Define like PROTOTYPES; this can be used by system headers.])
492 fi
493 ])# AC_C_PROTOTYPES
494
495
496 # _AC_CXX_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
497 # ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
498 # ----------------------------------------------------------------
499 # Check whether the C++ compiler accepts features of STANDARD (e.g
500 # `cxx98', `cxx11') by trying to compile a program of TEST-PROLOGUE
501 # and TEST-BODY. If this fails, try again with each compiler option
502 # in the space-separated OPTION-LIST; if one helps, append it to CXX.
503 # If eventually successful, run ACTION-IF-AVAILABLE, else
504 # ACTION-IF-UNAVAILABLE.
505 AC_DEFUN([_AC_CXX_STD_TRY],
506 [AC_MSG_CHECKING([for $CXX option to enable ]m4_translit(m4_translit($1, [x], [+]), [a-z], [A-Z])[ features])
507 AC_LANG_PUSH(C++)dnl
508 AC_CACHE_VAL(ac_cv_prog_cxx_$1,
509 [ac_cv_prog_cxx_$1=no
510 ac_save_CXX=$CXX
511 AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])])
512 for ac_arg in '' $4
513 do
514 CXX="$ac_save_CXX $ac_arg"
515 _AC_COMPILE_IFELSE([], [ac_cv_prog_cxx_$1=$ac_arg])
516 test "x$ac_cv_prog_cxx_$1" != "xno" && break
517 done
518 rm -f conftest.$ac_ext
519 CXX=$ac_save_CXX
520 ])# AC_CACHE_VAL
521 ac_prog_cxx_stdcxx_options=
522 case "x$ac_cv_prog_cxx_$1" in
523 x)
524 AC_MSG_RESULT([none needed]) ;;
525 xno)
526 AC_MSG_RESULT([unsupported]) ;;
527 *)
528 ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_$1"
529 CXX=$CXX$ac_prog_cxx_stdcxx_options
530 AC_MSG_RESULT([$ac_cv_prog_cxx_$1]) ;;
531 esac
532 AC_LANG_POP(C++)dnl
533 AS_IF([test "x$ac_cv_prog_cxx_$1" != xno], [$5], [$6])
534 ])# _AC_CXX_STD_TRY
535
536 # _AC_CXX_CXX98_TEST_HEADER
537 # -------------------------
538 # A C++ header suitable for testing for CXX98.
539 AC_DEFUN([_AC_CXX_CXX98_TEST_HEADER],
540 [[
541 #include <algorithm>
542 #include <cstdlib>
543 #include <fstream>
544 #include <iomanip>
545 #include <iostream>
546 #include <list>
547 #include <map>
548 #include <set>
549 #include <sstream>
550 #include <stdexcept>
551 #include <string>
552 #include <utility>
553 #include <vector>
554
555 namespace test {
556 typedef std::vector<std::string> string_vec;
557 typedef std::pair<int,bool> map_value;
558 typedef std::map<std::string,map_value> map_type;
559 typedef std::set<int> set_type;
560
561 template<typename T>
562 class printer {
563 public:
564 printer(std::ostringstream& os): os(os) {}
565 void operator() (T elem) { os << elem << std::endl; }
566 private:
567 std::ostringstream& os;
568 };
569 }
570 ]])# _AC_CXX_CXX98_TEST_HEADER
571
572 # _AC_CXX_CXX98_TEST_BODY
573 # -----------------------
574 # A C++ body suitable for testing for CXX98, assuming the corresponding header.
575 AC_DEFUN([_AC_CXX_CXX98_TEST_BODY],
576 [[
577
578 try {
579 // Basic string.
580 std::string teststr("ASCII text");
581 teststr += " string";
582
583 // Simple vector.
584 test::string_vec testvec;
585 testvec.push_back(teststr);
586 testvec.push_back("foo");
587 testvec.push_back("bar");
588 if (testvec.size() != 3) {
589 throw std::runtime_error("vector size is not 1");
590 }
591
592 // Dump vector into stringstream and obtain string.
593 std::ostringstream os;
594 for (test::string_vec::const_iterator i = testvec.begin();
595 i != testvec.end(); ++i) {
596 if (i + 1 != testvec.end()) {
597 os << teststr << '\n';
598 }
599 }
600 // Check algorithms work.
601 std::for_each(testvec.begin(), testvec.end(), test::printer<std::string>(os));
602 std::string os_out = os.str();
603
604 // Test pair and map.
605 test::map_type testmap;
606 testmap.insert(std::make_pair(std::string("key"),
607 std::make_pair(53,false)));
608
609 // Test set.
610 int values[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
611 test::set_type testset(values, values + sizeof(values)/sizeof(values[0]));
612 std::list<int> testlist(testset.begin(), testset.end());
613 std::copy(testset.begin(), testset.end(), std::back_inserter(testlist));
614 } catch (const std::exception& e) {
615 std::cerr << "Caught exception: " << e.what() << std::endl;
616
617 // Test fstream
618 std::ofstream of("test.txt");
619 of << "Test ASCII text\n" << std::flush;
620 of << "N= " << std::hex << std::setw(8) << std::left << 534 << std::endl;
621 of.close();
622 }
623 std::exit(0);
624 ]])
625
626 # _AC_CXX_CXX11_TEST_HEADER
627 # -------------------------
628 # A C++ header suitable for testing for CXX11.
629 AC_DEFUN([_AC_CXX_CXX11_TEST_HEADER],
630 [[
631 #include <deque>
632 #include <functional>
633 #include <memory>
634 #include <tuple>
635 #include <array>
636 #include <regex>
637 #include <iostream>
638
639 namespace cxx11test
640 {
641 typedef std::shared_ptr<std::string> sptr;
642 typedef std::weak_ptr<std::string> wptr;
643
644 typedef std::tuple<std::string,int,double> tp;
645 typedef std::array<int, 20> int_array;
646
647 constexpr int get_val() { return 20; }
648
649 struct testinit
650 {
651 int i;
652 double d;
653 };
654
655 class delegate {
656 public:
657 delegate(int n) : n(n) {}
658 delegate(): delegate(2354) {}
659
660 virtual int getval() { return this->n; };
661 protected:
662 int n;
663 };
664
665 class overridden : public delegate {
666 public:
667 overridden(int n): delegate(n) {}
668 virtual int getval() override final { return this->n * 2; }
669 };
670
671 class nocopy {
672 public:
673 nocopy(int i): i(i) {}
674 nocopy() = default;
675 nocopy(const nocopy&) = delete;
676 nocopy & operator=(const nocopy&) = delete;
677 private:
678 int i;
679 };
680 }
681 ]])# _AC_CXX_CXX11_TEST_HEADER
682
683 # _AC_CXX_CXX11_TEST_BODY
684 # -----------------------
685 # A C++ body suitable for testing for CXX11, assuming the corresponding header.
686 AC_DEFUN([_AC_CXX_CXX11_TEST_BODY],
687 [[
688 {
689 // Test auto and decltype
690 std::deque<int> d;
691 d.push_front(43);
692 d.push_front(484);
693 d.push_front(3);
694 d.push_front(844);
695 int total = 0;
696 for (auto i = d.begin(); i != d.end(); ++i) { total += *i; }
697
698 auto a1 = 6538;
699 auto a2 = 48573953.4;
700 auto a3 = "String literal";
701
702 decltype(a2) a4 = 34895.034;
703 }
704 {
705 // Test constexpr
706 short sa[cxx11test::get_val()] = { 0 };
707 }
708 {
709 // Test initializer lists
710 cxx11test::testinit il = { 4323, 435234.23544 };
711 }
712 {
713 // Test range-based for and lambda
714 cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
715 for (int &x : array) { x += 23; }
716 std::for_each(array.begin(), array.end(), [](int v1){ std::cout << v1; });
717 }
718 {
719 using cxx11test::sptr;
720 using cxx11test::wptr;
721
722 sptr sp(new std::string("ASCII string"));
723 wptr wp(sp);
724 sptr sp2(wp);
725 }
726 {
727 cxx11test::tp tuple("test", 54, 45.53434);
728 double d = std::get<2>(tuple);
729 std::string s;
730 int i;
731 std::tie(s,i,d) = tuple;
732 }
733 {
734 static std::regex filename_regex("^_?([a-z0-9_.]+-)+[a-z0-9]+$");
735 std::string testmatch("Test if this string matches");
736 bool match = std::regex_search(testmatch, filename_regex);
737 }
738 {
739 cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
740 cxx11test::int_array::size_type size = array.size();
741 }
742 {
743 // Test constructor delegation
744 cxx11test::delegate d1;
745 cxx11test::delegate d2();
746 cxx11test::delegate d3(45);
747 }
748 {
749 // Test override and final
750 cxx11test::overridden o1(55464);
751 }
752 {
753 // Test nullptr
754 char *c = nullptr;
755 }
756 {
757 // Test template brackets
758 std::vector<std::pair<int,char*>> v1;
759 }
760 {
761 // Unicode literals
762 char const *utf8 = u8"UTF-8 string \u2500";
763 char16_t const *utf16 = u"UTF-8 string \u2500";
764 char32_t const *utf32 = U"UTF-32 string \u2500";
765 }
766 ]])
767
768 # _AC_PROG_CXX_CXX98 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE])
769 # -------------------------------------------------------------------
770
771 # If the C++ compiler is not in ISO C++98 mode by default, try to add
772 # an option to output variable CXX to make it so. This macro tries
773 # various options that select ISO C++98 on some system or another. It
774 # considers the compiler to be in ISO C++98 mode if it handles basic
775 # features of the std namespace including: string, containers (list,
776 # map, set, vector), streams (fstreams, iostreams, stringstreams,
777 # iomanip), pair, exceptions and algorithms.
778
779
780 AC_DEFUN([_AC_PROG_CXX_CXX98],
781 [_AC_CXX_STD_TRY([cxx98],
782 [_AC_CXX_CXX98_TEST_HEADER],
783 [_AC_CXX_CXX98_TEST_BODY],
784 dnl Try
785 dnl GCC -std=gnu++98 (unused restrictive mode: -std=c++98)
786 dnl IBM XL C -qlanglvl=extended
787 dnl HP aC++ -AA
788 dnl Intel ICC -std=gnu++98
789 dnl Solaris N/A (default)
790 dnl Tru64 N/A (default, but -std gnu could be used)
791 dnl with extended modes being tried first.
792 [[-std=gnu++98 -std=c++98 -qlanglvl=extended -AA]], [$1], [$2])[]dnl
793 ])# _AC_PROG_CXX_CXX98
794
795 # _AC_PROG_CXX_CXX11 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE])
796 # -------------------------------------------------------------------
797 # If the C++ compiler is not in ISO CXX11 mode by default, try to add
798 # an option to output variable CXX to make it so. This macro tries
799 # various options that select ISO C++11 on some system or another. It
800 # considers the compiler to be in ISO C++11 mode if it handles all the
801 # tests from the C++98 checks, plus the following: Language features
802 # (auto, constexpr, decltype, default/deleted constructors, delegate
803 # constructors, final, initializer lists, lambda functions, nullptr,
804 # override, range-based for loops, template brackets without spaces,
805 # unicode literals) and library features (array, memory (shared_ptr,
806 # weak_ptr), regex and tuple types).
807 AC_DEFUN([_AC_PROG_CXX_CXX11],
808 [_AC_CXX_STD_TRY([cxx11],
809 [_AC_CXX_CXX11_TEST_HEADER
810 _AC_CXX_CXX98_TEST_HEADER],
811 [_AC_CXX_CXX11_TEST_BODY
812 _AC_CXX_CXX98_TEST_BODY],
813 dnl Try
814 dnl GCC -std=gnu++11 (unused restrictive mode: -std=c++11) [and 0x variants]
815 dnl IBM XL C -qlanglvl=extended0x
816 dnl (pre-V12.1; unused restrictive mode: -qlanglvl=stdcxx11)
817 dnl HP aC++ -AA
818 dnl Intel ICC -std=c++11 -std=c++0x
819 dnl Solaris N/A (no support)
820 dnl Tru64 N/A (no support)
821 dnl with extended modes being tried first.
822 [[-std=gnu++11 -std=c++11 -std=gnu++0x -std=c++0x -qlanglvl=extended0x -AA]], [$1], [$2])[]dnl
823 ])# _AC_PROG_CXX_CXX11
0 dnl A placeholder for <stddef.h>, for platforms that have issues.
1 # stddef_h.m4 serial 6
2 dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 AC_DEFUN([gl_STDDEF_H],
8 [
9 AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
10 AC_REQUIRE([gt_TYPE_WCHAR_T])
11 STDDEF_H=
12
13 dnl Test whether the type max_align_t exists and whether its alignment
14 dnl "is as great as is supported by the implementation in all contexts".
15 AC_CACHE_CHECK([for good max_align_t],
16 [gl_cv_type_max_align_t],
17 [AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[#include <stddef.h>
20 unsigned int s = sizeof (max_align_t);
21 #if defined __GNUC__ || defined __IBM__ALIGNOF__
22 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
23 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
24 #endif
25 ]])],
26 [gl_cv_type_max_align_t=yes],
27 [gl_cv_type_max_align_t=no])
28 ])
29 if test $gl_cv_type_max_align_t = no; then
30 HAVE_MAX_ALIGN_T=0
31 STDDEF_H=stddef.h
32 fi
33
34 if test $gt_cv_c_wchar_t = no; then
35 HAVE_WCHAR_T=0
36 STDDEF_H=stddef.h
37 fi
38
39 AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
40 [gl_cv_decl_null_works],
41 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
42 int test[2 * (sizeof NULL == sizeof (void *)) -1];
43 ]])],
44 [gl_cv_decl_null_works=yes],
45 [gl_cv_decl_null_works=no])])
46 if test $gl_cv_decl_null_works = no; then
47 REPLACE_NULL=1
48 STDDEF_H=stddef.h
49 fi
50
51 AC_SUBST([STDDEF_H])
52 AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
53 if test -n "$STDDEF_H"; then
54 gl_NEXT_HEADERS([stddef.h])
55 fi
56 ])
57
58 AC_DEFUN([gl_STDDEF_MODULE_INDICATOR],
59 [
60 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
61 AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
62 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
63 ])
64
65 AC_DEFUN([gl_STDDEF_H_DEFAULTS],
66 [
67 dnl Assume proper GNU behavior unless another module says otherwise.
68 REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
69 HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T])
70 HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
71 ])
0 # stdlib_h.m4 serial 45
1 dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_DEFUN([gl_STDLIB_H],
7 [
8 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
9 gl_NEXT_HEADERS([stdlib.h])
10
11 dnl Check for declarations of anything we want to poison if the
12 dnl corresponding gnulib module is not in use, and which is not
13 dnl guaranteed by C89.
14 gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
15 #if HAVE_SYS_LOADAVG_H
16 /* OpenIndiana has a bug: <sys/time.h> must be included before
17 <sys/loadavg.h>. */
18 # include <sys/time.h>
19 # include <sys/loadavg.h>
20 #endif
21 #if HAVE_RANDOM_H
22 # include <random.h>
23 #endif
24 ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
25 initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
26 posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray
27 realpath rpmatch secure_getenv setenv setstate setstate_r srandom
28 srandom_r strtod strtoll strtoull unlockpt unsetenv])
29 ])
30
31 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
32 [
33 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
34 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
35 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
36 dnl Define it also as a C macro, for the benefit of the unit tests.
37 gl_MODULE_INDICATOR_FOR_TESTS([$1])
38 ])
39
40 AC_DEFUN([gl_STDLIB_H_DEFAULTS],
41 [
42 GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT])
43 GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
44 GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
45 GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
46 GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG])
47 GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
48 GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT])
49 GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
50 GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC])
51 GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
52 GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP])
53 GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
54 GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
55 GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
56 GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT])
57 GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
58 GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R])
59 GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
60 GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R])
61 GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM])
62 GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
63 GNULIB_REALLOCARRAY=0; AC_SUBST([GNULIB_REALLOCARRAY])
64 GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
65 GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
66 GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
67 GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV])
68 GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
69 GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
70 GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
71 GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
72 GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX])
73 GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT])
74 GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
75 GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB])
76 dnl Assume proper GNU behavior unless another module says otherwise.
77 HAVE__EXIT=1; AC_SUBST([HAVE__EXIT])
78 HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
79 HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
80 HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
81 HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
82 HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
83 HAVE_DECL_INITSTATE=1; AC_SUBST([HAVE_DECL_INITSTATE])
84 HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
85 HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
86 HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
87 HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP])
88 HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
89 HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT])
90 HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
91 HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R])
92 HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R])
93 HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM])
94 HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
95 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
96 HAVE_REALLOCARRAY=1; AC_SUBST([HAVE_REALLOCARRAY])
97 HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
98 HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
99 HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV])
100 HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
101 HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV])
102 HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE])
103 HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
104 HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
105 HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
106 HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
107 HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
108 HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
109 HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV])
110 REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC])
111 REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
112 REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
113 REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
114 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
115 REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
116 REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
117 REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
118 REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R])
119 REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
120 REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC])
121 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
122 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
123 REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
124 REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
125 REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB])
126 ])
0 # strchrnul.m4 serial 9
1 dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_DEFUN([gl_FUNC_STRCHRNUL],
7 [
8 dnl Persuade glibc <string.h> to declare strchrnul().
9 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
10
11 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
12 AC_CHECK_FUNCS([strchrnul])
13 if test $ac_cv_func_strchrnul = no; then
14 HAVE_STRCHRNUL=0
15 else
16 AC_CACHE_CHECK([whether strchrnul works],
17 [gl_cv_func_strchrnul_works],
18 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
19 #include <string.h> /* for strchrnul */
20 ]], [[const char *buf = "a";
21 return strchrnul (buf, 'b') != buf + 1;
22 ]])],
23 [gl_cv_func_strchrnul_works=yes],
24 [gl_cv_func_strchrnul_works=no],
25 [dnl Cygwin 1.7.9 introduced strchrnul, but it was broken until 1.7.10
26 AC_EGREP_CPP([Lucky user],
27 [
28 #if defined __CYGWIN__
29 #include <cygwin/version.h>
30 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
31 Lucky user
32 #endif
33 #else
34 Lucky user
35 #endif
36 ],
37 [gl_cv_func_strchrnul_works="guessing yes"],
38 [gl_cv_func_strchrnul_works="guessing no"])
39 ])
40 ])
41 case "$gl_cv_func_strchrnul_works" in
42 *yes) ;;
43 *) REPLACE_STRCHRNUL=1 ;;
44 esac
45 fi
46 ])
47
48 # Prerequisites of lib/strchrnul.c.
49 AC_DEFUN([gl_PREREQ_STRCHRNUL], [:])
0 # strdup.m4 serial 13
1
2 dnl Copyright (C) 2002-2018 Free Software Foundation, Inc.
3
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7
8 AC_DEFUN([gl_FUNC_STRDUP],
9 [
10 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
11 AC_CHECK_FUNCS_ONCE([strdup])
12 AC_CHECK_DECLS_ONCE([strdup])
13 if test $ac_cv_have_decl_strdup = no; then
14 HAVE_DECL_STRDUP=0
15 fi
16 ])
17
18 AC_DEFUN([gl_FUNC_STRDUP_POSIX],
19 [
20 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
21 AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
22 AC_CHECK_FUNCS_ONCE([strdup])
23 if test $ac_cv_func_strdup = yes; then
24 if test $gl_cv_func_malloc_posix != yes; then
25 REPLACE_STRDUP=1
26 fi
27 fi
28 AC_CHECK_DECLS_ONCE([strdup])
29 if test $ac_cv_have_decl_strdup = no; then
30 HAVE_DECL_STRDUP=0
31 fi
32 ])
33
34 # Prerequisites of lib/strdup.c.
35 AC_DEFUN([gl_PREREQ_STRDUP], [:])
0 # Configure a GNU-like replacement for <string.h>.
1
2 # Copyright (C) 2007-2018 Free Software Foundation, Inc.
3 # This file is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # serial 22
8
9 # Written by Paul Eggert.
10
11 AC_DEFUN([gl_HEADER_STRING_H],
12 [
13 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
14 dnl once only, before all statements that occur in other macros.
15 AC_REQUIRE([gl_HEADER_STRING_H_BODY])
16 ])
17
18 AC_DEFUN([gl_HEADER_STRING_H_BODY],
19 [
20 AC_REQUIRE([AC_C_RESTRICT])
21 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
22 gl_NEXT_HEADERS([string.h])
23
24 dnl Check for declarations of anything we want to poison if the
25 dnl corresponding gnulib module is not in use, and which is not
26 dnl guaranteed by C89.
27 gl_WARN_ON_USE_PREPARE([[#include <string.h>
28 ]],
29 [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
30 strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
31 strerror_r strsignal strverscmp])
32 ])
33
34 AC_DEFUN([gl_STRING_MODULE_INDICATOR],
35 [
36 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
37 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
38 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
39 dnl Define it also as a C macro, for the benefit of the unit tests.
40 gl_MODULE_INDICATOR_FOR_TESTS([$1])
41 ])
42
43 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
44 [
45 GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
46 GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
47 GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
48 GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
49 GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
50 GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
51 GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
52 GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
53 GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
54 GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
55 GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
56 GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
57 GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT])
58 GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
59 GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
60 GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
61 GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
62 GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
63 GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
64 GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
65 GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
66 GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
67 GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
68 GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
69 GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
70 GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
71 GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
72 GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
73 GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
74 GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
75 GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
76 GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
77 GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
78 GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
79 GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
80 GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R])
81 GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
82 GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
83 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
84 dnl Assume proper GNU behavior unless another module says otherwise.
85 HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO])
86 HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
87 HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
88 HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
89 HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
90 HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
91 HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
92 HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
93 HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
94 HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
95 HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
96 HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
97 HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
98 HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
99 HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
100 HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
101 HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
102 HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
103 HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R])
104 HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
105 HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
106 REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
107 REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
108 REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY])
109 REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
110 REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
111 REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
112 REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
113 REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
114 REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
115 REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
116 REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
117 REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
118 REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
119 REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
120 UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
121 ])
0 # Configure a replacement for <sys/file.h>.
1 # serial 6
2
3 # Copyright (C) 2008-2018 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # Written by Richard W.M. Jones.
9
10 AC_DEFUN([gl_HEADER_SYS_FILE_H],
11 [
12 AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
13
14 dnl <sys/file.h> is always overridden, because of GNULIB_POSIXCHECK.
15 gl_CHECK_NEXT_HEADERS([sys/file.h])
16
17 if test $ac_cv_header_sys_file_h = yes; then
18 HAVE_SYS_FILE_H=1
19 else
20 HAVE_SYS_FILE_H=0
21 fi
22 AC_SUBST([HAVE_SYS_FILE_H])
23
24 dnl Check for declarations of anything we want to poison if the
25 dnl corresponding gnulib module is not in use.
26 gl_WARN_ON_USE_PREPARE([[#include <sys/file.h>
27 ]], [flock])
28 ])
29
30 AC_DEFUN([gl_HEADER_SYS_FILE_MODULE_INDICATOR],
31 [
32 AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
33 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
34 ])
35
36 AC_DEFUN([gl_HEADER_SYS_FILE_H_DEFAULTS],
37 [
38 GNULIB_FLOCK=0; AC_SUBST([GNULIB_FLOCK])
39 HAVE_FLOCK=1; AC_SUBST([HAVE_FLOCK])
40 ])
0 # sys_types_h.m4 serial 9
1 dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_DEFUN_ONCE([gl_SYS_TYPES_H],
7 [
8 dnl Use sane struct stat types in OpenVMS 8.2 and later.
9 AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.])
10
11 AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
12 gl_NEXT_HEADERS([sys/types.h])
13
14 dnl Ensure the type pid_t gets defined.
15 AC_REQUIRE([AC_TYPE_PID_T])
16
17 dnl Ensure the type mode_t gets defined.
18 AC_REQUIRE([AC_TYPE_MODE_T])
19
20 dnl Whether to override the 'off_t' type.
21 AC_REQUIRE([gl_TYPE_OFF_T])
22
23 dnl Whether to override the 'dev_t' and 'ino_t' types.
24 m4_ifdef([gl_WINDOWS_STAT_INODES], [
25 AC_REQUIRE([gl_WINDOWS_STAT_INODES])
26 ], [
27 WINDOWS_STAT_INODES=0
28 ])
29 AC_SUBST([WINDOWS_STAT_INODES])
30 ])
31
32 AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
33 [
34 ])
35
36 # This works around a buggy version in autoconf <= 2.69.
37 # See <https://lists.gnu.org/r/autoconf/2016-08/msg00014.html>
38
39 m4_version_prereq([2.70], [], [
40
41 # This is taken from the following Autoconf patch:
42 # https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e987d7ee695fb4294a82d987ec3dc9b974
43
44 m4_undefine([AC_HEADER_MAJOR])
45 AC_DEFUN([AC_HEADER_MAJOR],
46 [AC_CHECK_HEADERS_ONCE([sys/types.h])
47 AC_CHECK_HEADER([sys/mkdev.h],
48 [AC_DEFINE([MAJOR_IN_MKDEV], [1],
49 [Define to 1 if `major', `minor', and `makedev' are declared in
50 <mkdev.h>.])])
51 if test $ac_cv_header_sys_mkdev_h = no; then
52 AC_CHECK_HEADER([sys/sysmacros.h],
53 [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
54 [Define to 1 if `major', `minor', and `makedev' are declared in
55 <sysmacros.h>.])])
56 fi
57 ])
58
59 ])
0 # unistd_h.m4 serial 74
1 dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl Written by Simon Josefsson, Bruno Haible.
7
8 AC_DEFUN([gl_UNISTD_H],
9 [
10 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
11 dnl once only, before all statements that occur in other macros.
12 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
13
14 gl_CHECK_NEXT_HEADERS([unistd.h])
15 if test $ac_cv_header_unistd_h = yes; then
16 HAVE_UNISTD_H=1
17 else
18 HAVE_UNISTD_H=0
19 fi
20 AC_SUBST([HAVE_UNISTD_H])
21
22 dnl Ensure the type pid_t gets defined.
23 AC_REQUIRE([AC_TYPE_PID_T])
24
25 dnl Determine WINDOWS_64_BIT_OFF_T.
26 AC_REQUIRE([gl_TYPE_OFF_T])
27
28 dnl Check for declarations of anything we want to poison if the
29 dnl corresponding gnulib module is not in use.
30 gl_WARN_ON_USE_PREPARE([[
31 #if HAVE_UNISTD_H
32 # include <unistd.h>
33 #endif
34 /* Some systems declare various items in the wrong headers. */
35 #if !(defined __GLIBC__ && !defined __UCLIBC__)
36 # include <fcntl.h>
37 # include <stdio.h>
38 # include <stdlib.h>
39 # if defined _WIN32 && ! defined __CYGWIN__
40 # include <io.h>
41 # endif
42 #endif
43 ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
44 fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
45 gethostname getlogin getlogin_r getpagesize getpass
46 getusershell setusershell endusershell
47 group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
48 readlink readlinkat rmdir sethostname sleep symlink symlinkat
49 truncate ttyname_r unlink unlinkat usleep])
50 ])
51
52 AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
53 [
54 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
55 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
56 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
57 dnl Define it also as a C macro, for the benefit of the unit tests.
58 gl_MODULE_INDICATOR_FOR_TESTS([$1])
59 ])
60
61 AC_DEFUN([gl_UNISTD_H_DEFAULTS],
62 [
63 GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR])
64 GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
65 GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
66 GNULIB_DUP=0; AC_SUBST([GNULIB_DUP])
67 GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
68 GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3])
69 GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
70 GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS])
71 GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT])
72 GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
73 GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT])
74 GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC])
75 GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
76 GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
77 GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
78 GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME])
79 GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
80 GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS])
81 GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
82 GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
83 GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
84 GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
85 GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS])
86 GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
87 GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER])
88 GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY])
89 GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
90 GNULIB_LINK=0; AC_SUBST([GNULIB_LINK])
91 GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
92 GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
93 GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE])
94 GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
95 GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
96 GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE])
97 GNULIB_READ=0; AC_SUBST([GNULIB_READ])
98 GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
99 GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
100 GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
101 GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME])
102 GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
103 GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
104 GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
105 GNULIB_TRUNCATE=0; AC_SUBST([GNULIB_TRUNCATE])
106 GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R])
107 GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
108 GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
109 GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
110 GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT])
111 GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP])
112 GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
113 dnl Assume proper GNU behavior unless another module says otherwise.
114 HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
115 HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
116 HAVE_DUP3=1; AC_SUBST([HAVE_DUP3])
117 HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS])
118 HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT])
119 HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR])
120 HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT])
121 HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC])
122 HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
123 HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
124 HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
125 HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS])
126 HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
127 HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
128 HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
129 HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS])
130 HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER])
131 HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
132 HAVE_LINK=1; AC_SUBST([HAVE_LINK])
133 HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
134 HAVE_PIPE=1; AC_SUBST([HAVE_PIPE])
135 HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2])
136 HAVE_PREAD=1; AC_SUBST([HAVE_PREAD])
137 HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE])
138 HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
139 HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
140 HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME])
141 HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
142 HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
143 HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
144 HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
145 HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
146 HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
147 HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR])
148 HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC])
149 HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
150 HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN])
151 HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
152 HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
153 HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
154 HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
155 HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE])
156 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
157 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
158 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
159 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
160 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
161 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
162 REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
163 REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT])
164 REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
165 REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
166 REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
167 REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
168 REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
169 REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
170 REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
171 REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
172 REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS])
173 REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY])
174 REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
175 REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
176 REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
177 REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
178 REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
179 REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE])
180 REPLACE_READ=0; AC_SUBST([REPLACE_READ])
181 REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
182 REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT])
183 REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
184 REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
185 REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
186 REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT])
187 REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE])
188 REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R])
189 REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
190 REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
191 REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP])
192 REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
193 UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
194 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
195 AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
196 ])
0 # warn-on-use.m4 serial 6
1 dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES)
7 # ---------------------------------------
8 # If the module 'posixcheck' is in use:
9 #
10 # For each whitespace-separated element in the list of NAMES, define
11 # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES
12 # even after being undefined as a macro.
13 #
14 # See warn-on-use.h for some hints on how to poison function names, as
15 # well as ideas on poisoning global variables and macros. NAMES may
16 # include global variables, but remember that only functions work with
17 # _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single
18 # header, but if the replacement header pulls in other headers because
19 # some systems declare functions in the wrong header, then INCLUDES
20 # should do likewise.
21 #
22 # It is generally safe to assume declarations for functions declared
23 # in the intersection of C89 and C11 (such as printf) without
24 # needing gl_WARN_ON_USE_PREPARE.
25 AC_DEFUN([gl_WARN_ON_USE_PREPARE],
26 [
27 m4_ifdef([gl_POSIXCHECK],
28 [m4_foreach_w([gl_decl], [$2],
29 [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
30 [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
31 undefining macros.])])dnl
32 dnl FIXME: gl_Symbol must be used unquoted until we can assume
33 dnl autoconf 2.64 or newer.
34 for gl_func in m4_flatten([$2]); do
35 AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
36 AC_CACHE_CHECK([whether $gl_func is declared without a macro],
37 gl_Symbol,
38 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
39 [@%:@undef $gl_func
40 (void) $gl_func;])],
41 [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
42 AS_VAR_IF(gl_Symbol, [yes],
43 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
44 dnl shortcut - if the raw declaration exists, then set a cache
45 dnl variable to allow skipping any later AC_CHECK_DECL efforts
46 eval ac_cv_have_decl_$gl_func=yes])
47 AS_VAR_POPDEF([gl_Symbol])dnl
48 done
49 ])
50 ])
0 # warnings.m4 serial 14
1 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Simon Josefsson
7
8 # gl_AS_VAR_APPEND(VAR, VALUE)
9 # ----------------------------
10 # Provide the functionality of AS_VAR_APPEND if Autoconf does not have it.
11 m4_ifdef([AS_VAR_APPEND],
12 [m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])],
13 [m4_define([gl_AS_VAR_APPEND],
14 [AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
15
16
17 # gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED],
18 # [PROGRAM = AC_LANG_PROGRAM()])
19 # -----------------------------------------------------------------
20 # Check if the compiler supports OPTION when compiling PROGRAM.
21 #
22 # The effects of this macro depend on the current language (_AC_LANG).
23 AC_DEFUN([gl_COMPILER_OPTION_IF],
24 [
25 dnl FIXME: gl_Warn must be used unquoted until we can assume Autoconf
26 dnl 2.64 or newer.
27 AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
28 AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
29 AS_LITERAL_IF([$1],
30 [m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))],
31 [gl_positive="$1"
32 case $gl_positive in
33 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
34 esac
35 m4_pushdef([gl_Positive], [$gl_positive])])dnl
36 AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
37 gl_save_compiler_FLAGS="$gl_Flags"
38 gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
39 [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
40 AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
41 [AS_VAR_SET(gl_Warn, [yes])],
42 [AS_VAR_SET(gl_Warn, [no])])
43 gl_Flags="$gl_save_compiler_FLAGS"
44 ])
45 AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
46 m4_popdef([gl_Positive])dnl
47 AS_VAR_POPDEF([gl_Flags])dnl
48 AS_VAR_POPDEF([gl_Warn])dnl
49 ])
50
51 # gl_UNKNOWN_WARNINGS_ARE_ERRORS
52 # ------------------------------
53 # Clang doesn't complain about unknown warning options unless one also
54 # specifies -Wunknown-warning-option -Werror. Detect this.
55 #
56 # The effects of this macro depend on the current language (_AC_LANG).
57 AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS],
58 [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
59
60 # Specialization for _AC_LANG = C. This macro can be AC_REQUIREd.
61 # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
62 m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
63 [
64 AC_LANG_PUSH([C])
65 gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
66 AC_LANG_POP([C])
67 ])
68
69 # Specialization for _AC_LANG = C++. This macro can be AC_REQUIREd.
70 # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
71 m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)],
72 [
73 AC_LANG_PUSH([C++])
74 gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
75 AC_LANG_POP([C++])
76 ])
77
78 # Specialization for _AC_LANG = Objective C. This macro can be AC_REQUIREd.
79 # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
80 m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)],
81 [
82 AC_LANG_PUSH([Objective C])
83 gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
84 AC_LANG_POP([Objective C])
85 ])
86
87 AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL],
88 [gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option],
89 [gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'],
90 [gl_unknown_warnings_are_errors=])])
91
92 # gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS/WARN_CXXFLAGS],
93 # [PROGRAM = AC_LANG_PROGRAM()])
94 # -----------------------------------------------------------
95 # Adds parameter to WARN_CFLAGS/WARN_CXXFLAGS if the compiler supports it
96 # when compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]).
97 #
98 # If VARIABLE is a variable name, AC_SUBST it.
99 #
100 # The effects of this macro depend on the current language (_AC_LANG).
101 AC_DEFUN([gl_WARN_ADD],
102 [AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS(]_AC_LANG[)])
103 gl_COMPILER_OPTION_IF([$1],
104 [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_]_AC_LANG_PREFIX[FLAGS]], [[$2]]), [" $1"])],
105 [],
106 [$3])
107 m4_ifval([$2],
108 [AS_LITERAL_IF([$2], [AC_SUBST([$2])])],
109 [AC_SUBST([WARN_]_AC_LANG_PREFIX[FLAGS])])dnl
110 ])
111
112 # Local Variables:
113 # mode: autoconf
114 # End:
0 # wchar_t.m4 serial 4 (gettext-0.18.2)
1 dnl Copyright (C) 2002-2003, 2008-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Bruno Haible.
7 dnl Test whether <stddef.h> has the 'wchar_t' type.
8 dnl Prerequisite: AC_PROG_CC
9
10 AC_DEFUN([gt_TYPE_WCHAR_T],
11 [
12 AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
13 [AC_COMPILE_IFELSE(
14 [AC_LANG_PROGRAM(
15 [[#include <stddef.h>
16 wchar_t foo = (wchar_t)'\0';]],
17 [[]])],
18 [gt_cv_c_wchar_t=yes],
19 [gt_cv_c_wchar_t=no])])
20 if test $gt_cv_c_wchar_t = yes; then
21 AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
22 fi
23 ])
0 #! /bin/sh
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2013-10-28.13; # UTC
4
5 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
6 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 if test $# -eq 0; then
27 echo 1>&2 "Try '$0 --help' for more information"
28 exit 1
29 fi
30
31 case $1 in
32
33 --is-lightweight)
34 # Used by our autoconf macros to check whether the available missing
35 # script is modern enough.
36 exit 0
37 ;;
38
39 --run)
40 # Back-compat with the calling convention used by older automake.
41 shift
42 ;;
43
44 -h|--h|--he|--hel|--help)
45 echo "\
46 $0 [OPTION]... PROGRAM [ARGUMENT]...
47
48 Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
49 to PROGRAM being missing or too old.
50
51 Options:
52 -h, --help display this help and exit
53 -v, --version output version information and exit
54
55 Supported PROGRAM values:
56 aclocal autoconf autoheader autom4te automake makeinfo
57 bison yacc flex lex help2man
58
59 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
60 'g' are ignored when checking the name.
61
62 Send bug reports to <bug-automake@gnu.org>."
63 exit $?
64 ;;
65
66 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
67 echo "missing $scriptversion (GNU Automake)"
68 exit $?
69 ;;
70
71 -*)
72 echo 1>&2 "$0: unknown '$1' option"
73 echo 1>&2 "Try '$0 --help' for more information"
74 exit 1
75 ;;
76
77 esac
78
79 # Run the given program, remember its exit status.
80 "$@"; st=$?
81
82 # If it succeeded, we are done.
83 test $st -eq 0 && exit 0
84
85 # Also exit now if we it failed (or wasn't found), and '--version' was
86 # passed; such an option is passed most likely to detect whether the
87 # program is present and works.
88 case $2 in --version|--help) exit $st;; esac
89
90 # Exit code 63 means version mismatch. This often happens when the user
91 # tries to use an ancient version of a tool on a file that requires a
92 # minimum version.
93 if test $st -eq 63; then
94 msg="probably too old"
95 elif test $st -eq 127; then
96 # Program was missing.
97 msg="missing on your system"
98 else
99 # Program was found and executed, but failed. Give up.
100 exit $st
101 fi
102
103 perl_URL=http://www.perl.org/
104 flex_URL=http://flex.sourceforge.net/
105 gnu_software_URL=http://www.gnu.org/software
106
107 program_details ()
108 {
109 case $1 in
110 aclocal|automake)
111 echo "The '$1' program is part of the GNU Automake package:"
112 echo "<$gnu_software_URL/automake>"
113 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
114 echo "<$gnu_software_URL/autoconf>"
115 echo "<$gnu_software_URL/m4/>"
116 echo "<$perl_URL>"
117 ;;
118 autoconf|autom4te|autoheader)
119 echo "The '$1' program is part of the GNU Autoconf package:"
120 echo "<$gnu_software_URL/autoconf/>"
121 echo "It also requires GNU m4 and Perl in order to run:"
122 echo "<$gnu_software_URL/m4/>"
123 echo "<$perl_URL>"
124 ;;
125 esac
126 }
127
128 give_advice ()
129 {
130 # Normalize program name to check for.
131 normalized_program=`echo "$1" | sed '
132 s/^gnu-//; t
133 s/^gnu//; t
134 s/^g//; t'`
135
136 printf '%s\n' "'$1' is $msg."
137
138 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
139 case $normalized_program in
140 autoconf*)
141 echo "You should only need it if you modified 'configure.ac',"
142 echo "or m4 files included by it."
143 program_details 'autoconf'
144 ;;
145 autoheader*)
146 echo "You should only need it if you modified 'acconfig.h' or"
147 echo "$configure_deps."
148 program_details 'autoheader'
149 ;;
150 automake*)
151 echo "You should only need it if you modified 'Makefile.am' or"
152 echo "$configure_deps."
153 program_details 'automake'
154 ;;
155 aclocal*)
156 echo "You should only need it if you modified 'acinclude.m4' or"
157 echo "$configure_deps."
158 program_details 'aclocal'
159 ;;
160 autom4te*)
161 echo "You might have modified some maintainer files that require"
162 echo "the 'autom4te' program to be rebuilt."
163 program_details 'autom4te'
164 ;;
165 bison*|yacc*)
166 echo "You should only need it if you modified a '.y' file."
167 echo "You may want to install the GNU Bison package:"
168 echo "<$gnu_software_URL/bison/>"
169 ;;
170 lex*|flex*)
171 echo "You should only need it if you modified a '.l' file."
172 echo "You may want to install the Fast Lexical Analyzer package:"
173 echo "<$flex_URL>"
174 ;;
175 help2man*)
176 echo "You should only need it if you modified a dependency" \
177 "of a man page."
178 echo "You may want to install the GNU Help2man package:"
179 echo "<$gnu_software_URL/help2man/>"
180 ;;
181 makeinfo*)
182 echo "You should only need it if you modified a '.texi' file, or"
183 echo "any other file indirectly affecting the aspect of the manual."
184 echo "You might want to install the Texinfo package:"
185 echo "<$gnu_software_URL/texinfo/>"
186 echo "The spurious makeinfo call might also be the consequence of"
187 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
188 echo "want to install GNU make:"
189 echo "<$gnu_software_URL/make/>"
190 ;;
191 *)
192 echo "You might have modified some files without having the proper"
193 echo "tools for further handling them. Check the 'README' file, it"
194 echo "often tells you about the needed prerequisites for installing"
195 echo "this package. You may also peek at any GNU archive site, in"
196 echo "case some other package contains this missing '$1' program."
197 ;;
198 esac
199 }
200
201 give_advice "$1" | sed -e '1s/^/WARNING: /' \
202 -e '2,$s/^/ /' >&2
203
204 # Propagate the correct exit status (expected to be 127 for a program
205 # not found, 63 for a program that failed due to version mismatch).
206 exit $st
207
208 # Local variables:
209 # eval: (add-hook 'write-file-hooks 'time-stamp)
210 # time-stamp-start: "scriptversion="
211 # time-stamp-format: "%:y-%02m-%02d.%02H"
212 # time-stamp-time-zone: "UTC"
213 # time-stamp-end: "; # UTC"
214 # End:
2323 enchant_hunspell_la_LIBADD = $(HUNSPELL_LIBS)
2424 enchant_hunspell_la_SOURCES = enchant_hunspell.cpp
2525
26 if WITH_NUSPELL
27 provider_LTLIBRARIES += enchant_nuspell.la
28 endif
29 enchant_nuspell_la_CXXFLAGS = $(AM_CXXFLAGS) $(NUSPELL_CFLAGS) -std=c++17
30 enchant_nuspell_la_LIBADD = $(NUSPELL_LIBS)
31 enchant_nuspell_la_SOURCES = enchant_nuspell.cpp
32
2633 if WITH_VOIKKO
2734 provider_LTLIBRARIES += enchant_voikko.la
2835 endif
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
4
5 # This Makefile.in 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
14 @SET_MAKE@
15
16
17 VPATH = @srcdir@
18 am__is_gnu_make = { \
19 if test -z '$(MAKELEVEL)'; then \
20 false; \
21 elif test -n '$(MAKE_HOST)'; then \
22 true; \
23 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
24 true; \
25 else \
26 false; \
27 fi; \
28 }
29 am__make_running_with_option = \
30 case $${target_option-} in \
31 ?) ;; \
32 *) echo "am__make_running_with_option: internal error: invalid" \
33 "target option '$${target_option-}' specified" >&2; \
34 exit 1;; \
35 esac; \
36 has_opt=no; \
37 sane_makeflags=$$MAKEFLAGS; \
38 if $(am__is_gnu_make); then \
39 sane_makeflags=$$MFLAGS; \
40 else \
41 case $$MAKEFLAGS in \
42 *\\[\ \ ]*) \
43 bs=\\; \
44 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
45 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
46 esac; \
47 fi; \
48 skip_next=no; \
49 strip_trailopt () \
50 { \
51 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
52 }; \
53 for flg in $$sane_makeflags; do \
54 test $$skip_next = yes && { skip_next=no; continue; }; \
55 case $$flg in \
56 *=*|--*) continue;; \
57 -*I) strip_trailopt 'I'; skip_next=yes;; \
58 -*I?*) strip_trailopt 'I';; \
59 -*O) strip_trailopt 'O'; skip_next=yes;; \
60 -*O?*) strip_trailopt 'O';; \
61 -*l) strip_trailopt 'l'; skip_next=yes;; \
62 -*l?*) strip_trailopt 'l';; \
63 -[dEDm]) skip_next=yes;; \
64 -[JT]) skip_next=yes;; \
65 esac; \
66 case $$flg in \
67 *$$target_option*) has_opt=yes; break;; \
68 esac; \
69 done; \
70 test $$has_opt = yes
71 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
72 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
73 pkgdatadir = $(datadir)/@PACKAGE@
74 pkgincludedir = $(includedir)/@PACKAGE@
75 pkglibdir = $(libdir)/@PACKAGE@
76 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
77 install_sh_DATA = $(install_sh) -c -m 644
78 install_sh_PROGRAM = $(install_sh) -c
79 install_sh_SCRIPT = $(install_sh) -c
80 INSTALL_HEADER = $(INSTALL_DATA)
81 transform = $(program_transform_name)
82 NORMAL_INSTALL = :
83 PRE_INSTALL = :
84 POST_INSTALL = :
85 NORMAL_UNINSTALL = :
86 PRE_UNINSTALL = :
87 POST_UNINSTALL = :
88 build_triplet = @build@
89 host_triplet = @host@
90 @WITH_ASPELL_TRUE@am__append_1 = enchant_aspell.la
91 @WITH_HSPELL_TRUE@am__append_2 = enchant_hspell.la
92 @WITH_HUNSPELL_TRUE@am__append_3 = enchant_hunspell.la
93 @WITH_NUSPELL_TRUE@am__append_4 = enchant_nuspell.la
94 @WITH_VOIKKO_TRUE@am__append_5 = enchant_voikko.la
95 @WITH_ZEMBEREK_TRUE@am__append_6 = enchant_zemberek.la
96 @WITH_APPLESPELL_TRUE@am__append_7 = enchant_applespell.la
97 subdir = providers
98 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
99 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
100 $(top_srcdir)/m4/absolute-header.m4 \
101 $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
102 $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \
103 $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \
104 $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \
105 $(top_srcdir)/m4/gnulib-common.m4 \
106 $(top_srcdir)/m4/gnulib-comp.m4 \
107 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \
108 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
109 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
110 $(top_srcdir)/m4/malloc.m4 \
111 $(top_srcdir)/m4/manywarnings-c++.m4 \
112 $(top_srcdir)/m4/manywarnings.m4 \
113 $(top_srcdir)/m4/msvc-inval.m4 \
114 $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \
115 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/rawmemchr.m4 \
116 $(top_srcdir)/m4/relocatable-lib.m4 \
117 $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \
118 $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
119 $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \
120 $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \
121 $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \
122 $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
123 $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
124 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
125 $(ACLOCAL_M4)
126 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
127 mkinstalldirs = $(install_sh) -d
128 CONFIG_HEADER = $(top_builddir)/config.h
129 CONFIG_CLEAN_FILES =
130 CONFIG_CLEAN_VPATH_FILES =
131 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
132 am__vpath_adj = case $$p in \
133 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
134 *) f=$$p;; \
135 esac;
136 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
137 am__install_max = 40
138 am__nobase_strip_setup = \
139 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
140 am__nobase_strip = \
141 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
142 am__nobase_list = $(am__nobase_strip_setup); \
143 for p in $$list; do echo "$$p $$p"; done | \
144 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
145 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
146 if (++n[$$2] == $(am__install_max)) \
147 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
148 END { for (dir in files) print dir, files[dir] }'
149 am__base_list = \
150 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
151 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
152 am__uninstall_files_from_dir = { \
153 test -z "$$files" \
154 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
155 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
156 $(am__cd) "$$dir" && rm -f $$files; }; \
157 }
158 am__installdirs = "$(DESTDIR)$(providerdir)" "$(DESTDIR)$(pkgdatadir)"
159 LTLIBRARIES = $(provider_LTLIBRARIES)
160 enchant_applespell_la_LIBADD =
161 am_enchant_applespell_la_OBJECTS = \
162 enchant_applespell_la-applespell_checker.lo
163 enchant_applespell_la_OBJECTS = $(am_enchant_applespell_la_OBJECTS)
164 AM_V_lt = $(am__v_lt_@AM_V@)
165 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
166 am__v_lt_0 = --silent
167 am__v_lt_1 =
168 enchant_applespell_la_LINK = $(LIBTOOL) $(AM_V_lt) \
169 $(enchant_applespell_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
170 --mode=link $(OBJCXXLD) $(enchant_applespell_la_OBJCXXFLAGS) \
171 $(OBJCXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
172 @WITH_APPLESPELL_TRUE@am_enchant_applespell_la_rpath = -rpath \
173 @WITH_APPLESPELL_TRUE@ $(providerdir)
174 enchant_aspell_la_LIBADD =
175 enchant_aspell_la_SOURCES = enchant_aspell.c
176 enchant_aspell_la_OBJECTS = enchant_aspell.lo
177 @WITH_ASPELL_TRUE@am_enchant_aspell_la_rpath = -rpath $(providerdir)
178 enchant_hspell_la_LIBADD =
179 enchant_hspell_la_SOURCES = enchant_hspell.c
180 enchant_hspell_la_OBJECTS = enchant_hspell.lo
181 @WITH_HSPELL_TRUE@am_enchant_hspell_la_rpath = -rpath $(providerdir)
182 am__DEPENDENCIES_1 =
183 enchant_hunspell_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
184 am_enchant_hunspell_la_OBJECTS = \
185 enchant_hunspell_la-enchant_hunspell.lo
186 enchant_hunspell_la_OBJECTS = $(am_enchant_hunspell_la_OBJECTS)
187 enchant_hunspell_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
188 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
189 $(enchant_hunspell_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
190 $(LDFLAGS) -o $@
191 @WITH_HUNSPELL_TRUE@am_enchant_hunspell_la_rpath = -rpath \
192 @WITH_HUNSPELL_TRUE@ $(providerdir)
193 enchant_nuspell_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
194 am_enchant_nuspell_la_OBJECTS = enchant_nuspell_la-enchant_nuspell.lo
195 enchant_nuspell_la_OBJECTS = $(am_enchant_nuspell_la_OBJECTS)
196 enchant_nuspell_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
197 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
198 $(enchant_nuspell_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
199 $(LDFLAGS) -o $@
200 @WITH_NUSPELL_TRUE@am_enchant_nuspell_la_rpath = -rpath $(providerdir)
201 enchant_voikko_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
202 enchant_voikko_la_SOURCES = enchant_voikko.c
203 enchant_voikko_la_OBJECTS = enchant_voikko.lo
204 @WITH_VOIKKO_TRUE@am_enchant_voikko_la_rpath = -rpath $(providerdir)
205 enchant_zemberek_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
206 am_enchant_zemberek_la_OBJECTS = \
207 enchant_zemberek_la-enchant_zemberek.lo
208 enchant_zemberek_la_OBJECTS = $(am_enchant_zemberek_la_OBJECTS)
209 enchant_zemberek_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
210 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
211 $(enchant_zemberek_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
212 $(LDFLAGS) -o $@
213 @WITH_ZEMBEREK_TRUE@am_enchant_zemberek_la_rpath = -rpath \
214 @WITH_ZEMBEREK_TRUE@ $(providerdir)
215 AM_V_P = $(am__v_P_@AM_V@)
216 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
217 am__v_P_0 = false
218 am__v_P_1 = :
219 AM_V_GEN = $(am__v_GEN_@AM_V@)
220 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
221 am__v_GEN_0 = @echo " GEN " $@;
222 am__v_GEN_1 =
223 AM_V_at = $(am__v_at_@AM_V@)
224 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
225 am__v_at_0 = @
226 am__v_at_1 =
227 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
228 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
229 am__depfiles_maybe = depfiles
230 am__mv = mv -f
231 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
232 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
233 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
234 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
235 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
236 $(AM_CFLAGS) $(CFLAGS)
237 AM_V_CC = $(am__v_CC_@AM_V@)
238 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
239 am__v_CC_0 = @echo " CC " $@;
240 am__v_CC_1 =
241 CCLD = $(CC)
242 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
243 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
244 $(AM_LDFLAGS) $(LDFLAGS) -o $@
245 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
246 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
247 am__v_CCLD_0 = @echo " CCLD " $@;
248 am__v_CCLD_1 =
249 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
250 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
251 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
252 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
253 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
254 $(AM_CXXFLAGS) $(CXXFLAGS)
255 AM_V_CXX = $(am__v_CXX_@AM_V@)
256 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
257 am__v_CXX_0 = @echo " CXX " $@;
258 am__v_CXX_1 =
259 CXXLD = $(CXX)
260 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
261 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
262 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
263 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
264 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
265 am__v_CXXLD_0 = @echo " CXXLD " $@;
266 am__v_CXXLD_1 =
267 OBJCXXCOMPILE = $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
268 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS)
269 LTOBJCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
270 $(LIBTOOLFLAGS) --mode=compile $(OBJCXX) $(DEFS) \
271 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
272 $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS)
273 AM_V_OBJCXX = $(am__v_OBJCXX_@AM_V@)
274 am__v_OBJCXX_ = $(am__v_OBJCXX_@AM_DEFAULT_V@)
275 am__v_OBJCXX_0 = @echo " OBJCXX " $@;
276 am__v_OBJCXX_1 =
277 OBJCXXLD = $(OBJCXX)
278 OBJCXXLINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
279 --mode=link $(OBJCXXLD) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS) \
280 $(AM_LDFLAGS) $(LDFLAGS) -o $@
281 AM_V_OBJCXXLD = $(am__v_OBJCXXLD_@AM_V@)
282 am__v_OBJCXXLD_ = $(am__v_OBJCXXLD_@AM_DEFAULT_V@)
283 am__v_OBJCXXLD_0 = @echo " OBJCXXLD" $@;
284 am__v_OBJCXXLD_1 =
285 SOURCES = $(enchant_applespell_la_SOURCES) enchant_aspell.c \
286 enchant_hspell.c $(enchant_hunspell_la_SOURCES) \
287 $(enchant_nuspell_la_SOURCES) enchant_voikko.c \
288 $(enchant_zemberek_la_SOURCES)
289 DIST_SOURCES = $(enchant_applespell_la_SOURCES) enchant_aspell.c \
290 enchant_hspell.c $(enchant_hunspell_la_SOURCES) \
291 $(enchant_nuspell_la_SOURCES) enchant_voikko.c \
292 $(enchant_zemberek_la_SOURCES)
293 am__can_run_installinfo = \
294 case $$AM_UPDATE_INFO_DIR in \
295 n|no|NO) false;; \
296 *) (install-info --version) >/dev/null 2>&1;; \
297 esac
298 DATA = $(pkgdata_DATA)
299 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
300 # Read a list of newline-separated strings from the standard input,
301 # and print each of them once, without duplicates. Input order is
302 # *not* preserved.
303 am__uniquify_input = $(AWK) '\
304 BEGIN { nonempty = 0; } \
305 { items[$$0] = 1; nonempty = 1; } \
306 END { if (nonempty) { for (i in items) print i; }; } \
307 '
308 # Make sure the list of sources is unique. This is necessary because,
309 # e.g., the same source file might be shared among _SOURCES variables
310 # for different programs/libraries.
311 am__define_uniq_tagged_files = \
312 list='$(am__tagged_files)'; \
313 unique=`for i in $$list; do \
314 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
315 done | $(am__uniquify_input)`
316 ETAGS = etags
317 CTAGS = ctags
318 am__DIST_COMMON = $(srcdir)/Makefile.in \
319 $(top_srcdir)/build-aux/depcomp
320 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
321 pkglibexecdir = @pkglibexecdir@
322 ACLOCAL = @ACLOCAL@
323 AMTAR = @AMTAR@
324 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
325 AR = @AR@
326 ARFLAGS = @ARFLAGS@
327 AS = @AS@
328 AUTOCONF = @AUTOCONF@
329 AUTOHEADER = @AUTOHEADER@
330 AUTOMAKE = @AUTOMAKE@
331 AWK = @AWK@
332 CC = @CC@
333 CCDEPMODE = @CCDEPMODE@
334 CFLAGS = @CFLAGS@
335 CPP = @CPP@
336 CPPFLAGS = @CPPFLAGS@
337 CXX = @CXX@
338 CXXCPP = @CXXCPP@
339 CXXDEPMODE = @CXXDEPMODE@
340 CXXFLAGS = @CXXFLAGS@
341 CYGPATH_W = @CYGPATH_W@
342 DEFS = @DEFS@
343 DEPDIR = @DEPDIR@
344 DLLTOOL = @DLLTOOL@
345 DSYMUTIL = @DSYMUTIL@
346 DUMPBIN = @DUMPBIN@
347 ECHO_C = @ECHO_C@
348 ECHO_N = @ECHO_N@
349 ECHO_T = @ECHO_T@
350 EGREP = @EGREP@
351 ENCHANT_CFLAGS = @ENCHANT_CFLAGS@
352 ENCHANT_LIBS = @ENCHANT_LIBS@
353 ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@
354 ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@
355 ENCHANT_MINOR_VERSION = @ENCHANT_MINOR_VERSION@
356 EXEEXT = @EXEEXT@
357 FGREP = @FGREP@
358 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
359 GETOPT_H = @GETOPT_H@
360 GLIB_CFLAGS = @GLIB_CFLAGS@
361 GLIB_LIBS = @GLIB_LIBS@
362 GNULIB_ATOLL = @GNULIB_ATOLL@
363 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
364 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
365 GNULIB_CHDIR = @GNULIB_CHDIR@
366 GNULIB_CHOWN = @GNULIB_CHOWN@
367 GNULIB_CLOSE = @GNULIB_CLOSE@
368 GNULIB_DUP = @GNULIB_DUP@
369 GNULIB_DUP2 = @GNULIB_DUP2@
370 GNULIB_DUP3 = @GNULIB_DUP3@
371 GNULIB_ENVIRON = @GNULIB_ENVIRON@
372 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
373 GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
374 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
375 GNULIB_FCHDIR = @GNULIB_FCHDIR@
376 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
377 GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
378 GNULIB_FFSL = @GNULIB_FFSL@
379 GNULIB_FFSLL = @GNULIB_FFSLL@
380 GNULIB_FLOCK = @GNULIB_FLOCK@
381 GNULIB_FSYNC = @GNULIB_FSYNC@
382 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
383 GNULIB_GETCWD = @GNULIB_GETCWD@
384 GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
385 GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
386 GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
387 GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
388 GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
389 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
390 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
391 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
392 GNULIB_GETPASS = @GNULIB_GETPASS@
393 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
394 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
395 GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
396 GNULIB_GRANTPT = @GNULIB_GRANTPT@
397 GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
398 GNULIB_ISATTY = @GNULIB_ISATTY@
399 GNULIB_LCHOWN = @GNULIB_LCHOWN@
400 GNULIB_LINK = @GNULIB_LINK@
401 GNULIB_LINKAT = @GNULIB_LINKAT@
402 GNULIB_LSEEK = @GNULIB_LSEEK@
403 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
404 GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
405 GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
406 GNULIB_MBSCHR = @GNULIB_MBSCHR@
407 GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
408 GNULIB_MBSLEN = @GNULIB_MBSLEN@
409 GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
410 GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
411 GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
412 GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
413 GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
414 GNULIB_MBSSEP = @GNULIB_MBSSEP@
415 GNULIB_MBSSPN = @GNULIB_MBSSPN@
416 GNULIB_MBSSTR = @GNULIB_MBSSTR@
417 GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
418 GNULIB_MBTOWC = @GNULIB_MBTOWC@
419 GNULIB_MEMCHR = @GNULIB_MEMCHR@
420 GNULIB_MEMMEM = @GNULIB_MEMMEM@
421 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
422 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
423 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
424 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
425 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
426 GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
427 GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
428 GNULIB_PIPE = @GNULIB_PIPE@
429 GNULIB_PIPE2 = @GNULIB_PIPE2@
430 GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
431 GNULIB_PREAD = @GNULIB_PREAD@
432 GNULIB_PTSNAME = @GNULIB_PTSNAME@
433 GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
434 GNULIB_PUTENV = @GNULIB_PUTENV@
435 GNULIB_PWRITE = @GNULIB_PWRITE@
436 GNULIB_QSORT_R = @GNULIB_QSORT_R@
437 GNULIB_RANDOM = @GNULIB_RANDOM@
438 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
439 GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
440 GNULIB_READ = @GNULIB_READ@
441 GNULIB_READLINK = @GNULIB_READLINK@
442 GNULIB_READLINKAT = @GNULIB_READLINKAT@
443 GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
444 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
445 GNULIB_REALPATH = @GNULIB_REALPATH@
446 GNULIB_RMDIR = @GNULIB_RMDIR@
447 GNULIB_RPMATCH = @GNULIB_RPMATCH@
448 GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
449 GNULIB_SETENV = @GNULIB_SETENV@
450 GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
451 GNULIB_SLEEP = @GNULIB_SLEEP@
452 GNULIB_STPCPY = @GNULIB_STPCPY@
453 GNULIB_STPNCPY = @GNULIB_STPNCPY@
454 GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
455 GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
456 GNULIB_STRDUP = @GNULIB_STRDUP@
457 GNULIB_STRERROR = @GNULIB_STRERROR@
458 GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
459 GNULIB_STRNCAT = @GNULIB_STRNCAT@
460 GNULIB_STRNDUP = @GNULIB_STRNDUP@
461 GNULIB_STRNLEN = @GNULIB_STRNLEN@
462 GNULIB_STRPBRK = @GNULIB_STRPBRK@
463 GNULIB_STRSEP = @GNULIB_STRSEP@
464 GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
465 GNULIB_STRSTR = @GNULIB_STRSTR@
466 GNULIB_STRTOD = @GNULIB_STRTOD@
467 GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
468 GNULIB_STRTOLL = @GNULIB_STRTOLL@
469 GNULIB_STRTOULL = @GNULIB_STRTOULL@
470 GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
471 GNULIB_SYMLINK = @GNULIB_SYMLINK@
472 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
473 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
474 GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
475 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
476 GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
477 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
478 GNULIB_UNLINK = @GNULIB_UNLINK@
479 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
480 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
481 GNULIB_UNSETENV = @GNULIB_UNSETENV@
482 GNULIB_USLEEP = @GNULIB_USLEEP@
483 GNULIB_WCTOMB = @GNULIB_WCTOMB@
484 GNULIB_WRITE = @GNULIB_WRITE@
485 GNULIB__EXIT = @GNULIB__EXIT@
486 GREP = @GREP@
487 HAVE_ATOLL = @HAVE_ATOLL@
488 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
489 HAVE_CHOWN = @HAVE_CHOWN@
490 HAVE_CXX11 = @HAVE_CXX11@
491 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
492 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
493 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
494 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
495 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
496 HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
497 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
498 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
499 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
500 HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
501 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
502 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
503 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
504 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
505 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
506 HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
507 HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
508 HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
509 HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
510 HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
511 HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
512 HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
513 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
514 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
515 HAVE_DUP2 = @HAVE_DUP2@
516 HAVE_DUP3 = @HAVE_DUP3@
517 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
518 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
519 HAVE_FACCESSAT = @HAVE_FACCESSAT@
520 HAVE_FCHDIR = @HAVE_FCHDIR@
521 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
522 HAVE_FDATASYNC = @HAVE_FDATASYNC@
523 HAVE_FFSL = @HAVE_FFSL@
524 HAVE_FFSLL = @HAVE_FFSLL@
525 HAVE_FLOCK = @HAVE_FLOCK@
526 HAVE_FSYNC = @HAVE_FSYNC@
527 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
528 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
529 HAVE_GETGROUPS = @HAVE_GETGROUPS@
530 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
531 HAVE_GETLOGIN = @HAVE_GETLOGIN@
532 HAVE_GETOPT_H = @HAVE_GETOPT_H@
533 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
534 HAVE_GETPASS = @HAVE_GETPASS@
535 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
536 HAVE_GRANTPT = @HAVE_GRANTPT@
537 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
538 HAVE_LCHOWN = @HAVE_LCHOWN@
539 HAVE_LINK = @HAVE_LINK@
540 HAVE_LINKAT = @HAVE_LINKAT@
541 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
542 HAVE_MBSLEN = @HAVE_MBSLEN@
543 HAVE_MEMCHR = @HAVE_MEMCHR@
544 HAVE_MEMPCPY = @HAVE_MEMPCPY@
545 HAVE_MKDTEMP = @HAVE_MKDTEMP@
546 HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
547 HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
548 HAVE_MKSTEMP = @HAVE_MKSTEMP@
549 HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
550 HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
551 HAVE_OS_H = @HAVE_OS_H@
552 HAVE_PIPE = @HAVE_PIPE@
553 HAVE_PIPE2 = @HAVE_PIPE2@
554 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
555 HAVE_PREAD = @HAVE_PREAD@
556 HAVE_PTSNAME = @HAVE_PTSNAME@
557 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
558 HAVE_PWRITE = @HAVE_PWRITE@
559 HAVE_QSORT_R = @HAVE_QSORT_R@
560 HAVE_RANDOM = @HAVE_RANDOM@
561 HAVE_RANDOM_H = @HAVE_RANDOM_H@
562 HAVE_RANDOM_R = @HAVE_RANDOM_R@
563 HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
564 HAVE_READLINK = @HAVE_READLINK@
565 HAVE_READLINKAT = @HAVE_READLINKAT@
566 HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@
567 HAVE_REALPATH = @HAVE_REALPATH@
568 HAVE_RPMATCH = @HAVE_RPMATCH@
569 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
570 HAVE_SETENV = @HAVE_SETENV@
571 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
572 HAVE_SLEEP = @HAVE_SLEEP@
573 HAVE_STPCPY = @HAVE_STPCPY@
574 HAVE_STPNCPY = @HAVE_STPNCPY@
575 HAVE_STRCASESTR = @HAVE_STRCASESTR@
576 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
577 HAVE_STRPBRK = @HAVE_STRPBRK@
578 HAVE_STRSEP = @HAVE_STRSEP@
579 HAVE_STRTOD = @HAVE_STRTOD@
580 HAVE_STRTOLL = @HAVE_STRTOLL@
581 HAVE_STRTOULL = @HAVE_STRTOULL@
582 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
583 HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
584 HAVE_SYMLINK = @HAVE_SYMLINK@
585 HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
586 HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
587 HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@
588 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
589 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
590 HAVE_UNISTD_H = @HAVE_UNISTD_H@
591 HAVE_UNLINKAT = @HAVE_UNLINKAT@
592 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
593 HAVE_USLEEP = @HAVE_USLEEP@
594 HAVE_WCHAR_T = @HAVE_WCHAR_T@
595 HAVE__EXIT = @HAVE__EXIT@
596 HUNSPELL_CFLAGS = @HUNSPELL_CFLAGS@
597 HUNSPELL_LIBS = @HUNSPELL_LIBS@
598 INCLUDE_NEXT = @INCLUDE_NEXT@
599 INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
600 INSTALL = @INSTALL@
601 INSTALL_DATA = @INSTALL_DATA@
602 INSTALL_PROGRAM = @INSTALL_PROGRAM@
603 INSTALL_SCRIPT = @INSTALL_SCRIPT@
604 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
605 ISYSTEM = @ISYSTEM@
606 LD = @LD@
607 LDFLAGS = @LDFLAGS@
608 LIBINTL = @LIBINTL@
609 LIBOBJS = @LIBOBJS@
610 LIBS = @LIBS@
611 LIBTOOL = @LIBTOOL@
612 LIPO = @LIPO@
613 LN_S = @LN_S@
614 LTLIBINTL = @LTLIBINTL@
615 LTLIBOBJS = @LTLIBOBJS@
616 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
617 MAKEINFO = @MAKEINFO@
618 MANIFEST_TOOL = @MANIFEST_TOOL@
619 MKDIR_P = @MKDIR_P@
620 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
621 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
622 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
623 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
624 NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@
625 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
626 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
627 NEXT_GETOPT_H = @NEXT_GETOPT_H@
628 NEXT_STDDEF_H = @NEXT_STDDEF_H@
629 NEXT_STDLIB_H = @NEXT_STDLIB_H@
630 NEXT_STRING_H = @NEXT_STRING_H@
631 NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@
632 NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
633 NEXT_UNISTD_H = @NEXT_UNISTD_H@
634 NM = @NM@
635 NMEDIT = @NMEDIT@
636 NUSPELL_CFLAGS = @NUSPELL_CFLAGS@
637 NUSPELL_LIBS = @NUSPELL_LIBS@
638 OBJCXX = @OBJCXX@
639 OBJCXXCPP = @OBJCXXCPP@
640 OBJCXXDEPMODE = @OBJCXXDEPMODE@
641 OBJCXXFLAGS = @OBJCXXFLAGS@
642 OBJDUMP = @OBJDUMP@
643 OBJEXT = @OBJEXT@
644 OTOOL = @OTOOL@
645 OTOOL64 = @OTOOL64@
646 PACKAGE = @PACKAGE@
647 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
648 PACKAGE_NAME = @PACKAGE_NAME@
649 PACKAGE_STRING = @PACKAGE_STRING@
650 PACKAGE_TARNAME = @PACKAGE_TARNAME@
651 PACKAGE_URL = @PACKAGE_URL@
652 PACKAGE_VERSION = @PACKAGE_VERSION@
653 PATH_SEPARATOR = @PATH_SEPARATOR@
654 PKG_CONFIG = @PKG_CONFIG@
655 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
656 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
657 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
658 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
659 RANLIB = @RANLIB@
660 RC = @RC@
661 RELOCATABLE = @RELOCATABLE@
662 REPLACE_CALLOC = @REPLACE_CALLOC@
663 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
664 REPLACE_CHOWN = @REPLACE_CHOWN@
665 REPLACE_CLOSE = @REPLACE_CLOSE@
666 REPLACE_DUP = @REPLACE_DUP@
667 REPLACE_DUP2 = @REPLACE_DUP2@
668 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
669 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
670 REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
671 REPLACE_GETCWD = @REPLACE_GETCWD@
672 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
673 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
674 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
675 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
676 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
677 REPLACE_GETPASS = @REPLACE_GETPASS@
678 REPLACE_ISATTY = @REPLACE_ISATTY@
679 REPLACE_LCHOWN = @REPLACE_LCHOWN@
680 REPLACE_LINK = @REPLACE_LINK@
681 REPLACE_LINKAT = @REPLACE_LINKAT@
682 REPLACE_LSEEK = @REPLACE_LSEEK@
683 REPLACE_MALLOC = @REPLACE_MALLOC@
684 REPLACE_MBTOWC = @REPLACE_MBTOWC@
685 REPLACE_MEMCHR = @REPLACE_MEMCHR@
686 REPLACE_MEMMEM = @REPLACE_MEMMEM@
687 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
688 REPLACE_NULL = @REPLACE_NULL@
689 REPLACE_PREAD = @REPLACE_PREAD@
690 REPLACE_PTSNAME = @REPLACE_PTSNAME@
691 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
692 REPLACE_PUTENV = @REPLACE_PUTENV@
693 REPLACE_PWRITE = @REPLACE_PWRITE@
694 REPLACE_QSORT_R = @REPLACE_QSORT_R@
695 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
696 REPLACE_READ = @REPLACE_READ@
697 REPLACE_READLINK = @REPLACE_READLINK@
698 REPLACE_READLINKAT = @REPLACE_READLINKAT@
699 REPLACE_REALLOC = @REPLACE_REALLOC@
700 REPLACE_REALPATH = @REPLACE_REALPATH@
701 REPLACE_RMDIR = @REPLACE_RMDIR@
702 REPLACE_SETENV = @REPLACE_SETENV@
703 REPLACE_SLEEP = @REPLACE_SLEEP@
704 REPLACE_STPNCPY = @REPLACE_STPNCPY@
705 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
706 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
707 REPLACE_STRDUP = @REPLACE_STRDUP@
708 REPLACE_STRERROR = @REPLACE_STRERROR@
709 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
710 REPLACE_STRNCAT = @REPLACE_STRNCAT@
711 REPLACE_STRNDUP = @REPLACE_STRNDUP@
712 REPLACE_STRNLEN = @REPLACE_STRNLEN@
713 REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
714 REPLACE_STRSTR = @REPLACE_STRSTR@
715 REPLACE_STRTOD = @REPLACE_STRTOD@
716 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
717 REPLACE_SYMLINK = @REPLACE_SYMLINK@
718 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
719 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
720 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
721 REPLACE_UNLINK = @REPLACE_UNLINK@
722 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
723 REPLACE_UNSETENV = @REPLACE_UNSETENV@
724 REPLACE_USLEEP = @REPLACE_USLEEP@
725 REPLACE_WCTOMB = @REPLACE_WCTOMB@
726 REPLACE_WRITE = @REPLACE_WRITE@
727 SED = @SED@
728 SET_MAKE = @SET_MAKE@
729 SHELL = @SHELL@
730 STDDEF_H = @STDDEF_H@
731 STRIP = @STRIP@
732 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
733 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
734 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
735 UNITTESTPP_CFLAGS = @UNITTESTPP_CFLAGS@
736 UNITTESTPP_LIBS = @UNITTESTPP_LIBS@
737 VERSION = @VERSION@
738 VERSION_INFO = @VERSION_INFO@
739 VOIKKO_CFLAGS = @VOIKKO_CFLAGS@
740 VOIKKO_LIBS = @VOIKKO_LIBS@
741 WARN_CFLAGS = @WARN_CFLAGS@
742 WARN_CXXFLAGS = @WARN_CXXFLAGS@
743 WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
744 WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
745 ZEMBEREK_CFLAGS = @ZEMBEREK_CFLAGS@
746 ZEMBEREK_LIBS = @ZEMBEREK_LIBS@
747 abs_builddir = @abs_builddir@
748 abs_srcdir = @abs_srcdir@
749 abs_top_builddir = @abs_top_builddir@
750 abs_top_srcdir = @abs_top_srcdir@
751 ac_ct_AR = @ac_ct_AR@
752 ac_ct_CC = @ac_ct_CC@
753 ac_ct_CXX = @ac_ct_CXX@
754 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
755 ac_ct_OBJCXX = @ac_ct_OBJCXX@
756 am__include = @am__include@
757 am__leading_dot = @am__leading_dot@
758 am__quote = @am__quote@
759 am__tar = @am__tar@
760 am__untar = @am__untar@
761 bindir = @bindir@
762 build = @build@
763 build_alias = @build_alias@
764 build_cpu = @build_cpu@
765 build_os = @build_os@
766 build_vendor = @build_vendor@
767 builddir = @builddir@
768 datadir = @datadir@
769 datarootdir = @datarootdir@
770 docdir = @docdir@
771 dvidir = @dvidir@
772 exec_prefix = @exec_prefix@
773 gl_LIBOBJS = @gl_LIBOBJS@
774 gl_LTLIBOBJS = @gl_LTLIBOBJS@
775 gltests_LIBOBJS = @gltests_LIBOBJS@
776 gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
777 gltests_WITNESS = @gltests_WITNESS@
778 host = @host@
779 host_alias = @host_alias@
780 host_cpu = @host_cpu@
781 host_os = @host_os@
782 host_vendor = @host_vendor@
783 htmldir = @htmldir@
784 includedir = @includedir@
785 infodir = @infodir@
786 install_sh = @install_sh@
787 libdir = @libdir@
788 libexecdir = @libexecdir@
789 lispdir = @lispdir@
790 localedir = @localedir@
791 localstatedir = @localstatedir@
792 mandir = @mandir@
793 mkdir_p = @mkdir_p@
794 objdir = @objdir@
795 oldincludedir = @oldincludedir@
796 pdfdir = @pdfdir@
797 prefix = @prefix@
798 program_transform_name = @program_transform_name@
799 psdir = @psdir@
800 runstatedir = @runstatedir@
801 sbindir = @sbindir@
802 sharedstatedir = @sharedstatedir@
803 shlibext = @shlibext@
804 srcdir = @srcdir@
805 sysconfdir = @sysconfdir@
806 target_alias = @target_alias@
807 top_build_prefix = @top_build_prefix@
808 top_builddir = @top_builddir@
809 top_srcdir = @top_srcdir@
810 EXTRA_DIST = \
811 AppleSpell.config
812
813 provider_LTLIBRARIES = $(am__append_1) $(am__append_2) $(am__append_3) \
814 $(am__append_4) $(am__append_5) $(am__append_6) \
815 $(am__append_7)
816 providerdir = $(pkglibdir)-@ENCHANT_MAJOR_VERSION@
817 AM_CPPFLAGS = -I$(top_srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib -I$(top_srcdir)/src $(ENCHANT_CFLAGS) -D_ENCHANT_BUILD=1
818 AM_CFLAGS = $(WARN_CFLAGS)
819 AM_CXXFLAGS = $(WARN_CXXFLAGS)
820 AM_LDFLAGS = -module -avoid-version -no-undefined $(ENCHANT_LIBS) $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(top_builddir)/lib/libgnu.la
821 enchant_hunspell_la_CXXFLAGS = $(AM_CXXFLAGS) $(HUNSPELL_CFLAGS)
822 enchant_hunspell_la_LIBADD = $(HUNSPELL_LIBS)
823 enchant_hunspell_la_SOURCES = enchant_hunspell.cpp
824 enchant_nuspell_la_CXXFLAGS = $(AM_CXXFLAGS) $(NUSPELL_CFLAGS) -std=c++17
825 enchant_nuspell_la_LIBADD = $(NUSPELL_LIBS)
826 enchant_nuspell_la_SOURCES = enchant_nuspell.cpp
827 enchant_voikko_la_CXXFLAGS = $(AM_CXXFLAGS) $(VOIKKO_CFLAGS)
828 enchant_voikko_la_LIBADD = $(VOIKKO_LIBS)
829 enchant_zemberek_la_CXXFLAGS = $(AM_CXXFLAGS) $(ZEMBEREK_CFLAGS)
830 enchant_zemberek_la_LIBADD = $(ZEMBEREK_LIBS)
831 enchant_zemberek_la_SOURCES = enchant_zemberek.cpp
832 @WITH_APPLESPELL_TRUE@pkgdata_DATA = AppleSpell.config
833 enchant_applespell_la_LIBTOOLFLAGS = $(AM_LIBTOOLFLAGS) --tag=CXX
834 enchant_applespell_la_OBJCXXFLAGS = $(AM_OBJCXXFLAGS)
835 enchant_applespell_la_SOURCES = applespell_checker.mm
836 all: all-am
837
838 .SUFFIXES:
839 .SUFFIXES: .c .cpp .lo .mm .o .obj
840 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
841 @for dep in $?; do \
842 case '$(am__configure_deps)' in \
843 *$$dep*) \
844 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
845 && { if test -f $@; then exit 0; else break; fi; }; \
846 exit 1;; \
847 esac; \
848 done; \
849 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu providers/Makefile'; \
850 $(am__cd) $(top_srcdir) && \
851 $(AUTOMAKE) --gnu providers/Makefile
852 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
853 @case '$?' in \
854 *config.status*) \
855 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
856 *) \
857 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
858 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
859 esac;
860
861 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
862 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
863
864 $(top_srcdir)/configure: $(am__configure_deps)
865 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
866 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
867 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
868 $(am__aclocal_m4_deps):
869
870 install-providerLTLIBRARIES: $(provider_LTLIBRARIES)
871 @$(NORMAL_INSTALL)
872 @list='$(provider_LTLIBRARIES)'; test -n "$(providerdir)" || list=; \
873 list2=; for p in $$list; do \
874 if test -f $$p; then \
875 list2="$$list2 $$p"; \
876 else :; fi; \
877 done; \
878 test -z "$$list2" || { \
879 echo " $(MKDIR_P) '$(DESTDIR)$(providerdir)'"; \
880 $(MKDIR_P) "$(DESTDIR)$(providerdir)" || exit 1; \
881 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(providerdir)'"; \
882 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(providerdir)"; \
883 }
884
885 uninstall-providerLTLIBRARIES:
886 @$(NORMAL_UNINSTALL)
887 @list='$(provider_LTLIBRARIES)'; test -n "$(providerdir)" || list=; \
888 for p in $$list; do \
889 $(am__strip_dir) \
890 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(providerdir)/$$f'"; \
891 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(providerdir)/$$f"; \
892 done
893
894 clean-providerLTLIBRARIES:
895 -test -z "$(provider_LTLIBRARIES)" || rm -f $(provider_LTLIBRARIES)
896 @list='$(provider_LTLIBRARIES)'; \
897 locs=`for p in $$list; do echo $$p; done | \
898 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
899 sort -u`; \
900 test -z "$$locs" || { \
901 echo rm -f $${locs}; \
902 rm -f $${locs}; \
903 }
904
905 enchant_applespell.la: $(enchant_applespell_la_OBJECTS) $(enchant_applespell_la_DEPENDENCIES) $(EXTRA_enchant_applespell_la_DEPENDENCIES)
906 $(AM_V_OBJCXXLD)$(enchant_applespell_la_LINK) $(am_enchant_applespell_la_rpath) $(enchant_applespell_la_OBJECTS) $(enchant_applespell_la_LIBADD) $(LIBS)
907
908 enchant_aspell.la: $(enchant_aspell_la_OBJECTS) $(enchant_aspell_la_DEPENDENCIES) $(EXTRA_enchant_aspell_la_DEPENDENCIES)
909 $(AM_V_CCLD)$(LINK) $(am_enchant_aspell_la_rpath) $(enchant_aspell_la_OBJECTS) $(enchant_aspell_la_LIBADD) $(LIBS)
910
911 enchant_hspell.la: $(enchant_hspell_la_OBJECTS) $(enchant_hspell_la_DEPENDENCIES) $(EXTRA_enchant_hspell_la_DEPENDENCIES)
912 $(AM_V_CCLD)$(LINK) $(am_enchant_hspell_la_rpath) $(enchant_hspell_la_OBJECTS) $(enchant_hspell_la_LIBADD) $(LIBS)
913
914 enchant_hunspell.la: $(enchant_hunspell_la_OBJECTS) $(enchant_hunspell_la_DEPENDENCIES) $(EXTRA_enchant_hunspell_la_DEPENDENCIES)
915 $(AM_V_CXXLD)$(enchant_hunspell_la_LINK) $(am_enchant_hunspell_la_rpath) $(enchant_hunspell_la_OBJECTS) $(enchant_hunspell_la_LIBADD) $(LIBS)
916
917 enchant_nuspell.la: $(enchant_nuspell_la_OBJECTS) $(enchant_nuspell_la_DEPENDENCIES) $(EXTRA_enchant_nuspell_la_DEPENDENCIES)
918 $(AM_V_CXXLD)$(enchant_nuspell_la_LINK) $(am_enchant_nuspell_la_rpath) $(enchant_nuspell_la_OBJECTS) $(enchant_nuspell_la_LIBADD) $(LIBS)
919
920 enchant_voikko.la: $(enchant_voikko_la_OBJECTS) $(enchant_voikko_la_DEPENDENCIES) $(EXTRA_enchant_voikko_la_DEPENDENCIES)
921 $(AM_V_CCLD)$(LINK) $(am_enchant_voikko_la_rpath) $(enchant_voikko_la_OBJECTS) $(enchant_voikko_la_LIBADD) $(LIBS)
922
923 enchant_zemberek.la: $(enchant_zemberek_la_OBJECTS) $(enchant_zemberek_la_DEPENDENCIES) $(EXTRA_enchant_zemberek_la_DEPENDENCIES)
924 $(AM_V_CXXLD)$(enchant_zemberek_la_LINK) $(am_enchant_zemberek_la_rpath) $(enchant_zemberek_la_OBJECTS) $(enchant_zemberek_la_LIBADD) $(LIBS)
925
926 mostlyclean-compile:
927 -rm -f *.$(OBJEXT)
928
929 distclean-compile:
930 -rm -f *.tab.c
931
932 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enchant_applespell_la-applespell_checker.Plo@am__quote@
933 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enchant_aspell.Plo@am__quote@
934 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enchant_hspell.Plo@am__quote@
935 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enchant_hunspell_la-enchant_hunspell.Plo@am__quote@
936 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enchant_nuspell_la-enchant_nuspell.Plo@am__quote@
937 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enchant_voikko.Plo@am__quote@
938 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enchant_zemberek_la-enchant_zemberek.Plo@am__quote@
939
940 .c.o:
941 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
942 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
943 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
944 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
945 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
946 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
947
948 .c.obj:
949 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
950 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
951 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
952 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
953 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
954 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
955
956 .c.lo:
957 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
958 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
959 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
960 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
961 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
962 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
963
964 .cpp.o:
965 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
966 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
967 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
968 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
969 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
970 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
971
972 .cpp.obj:
973 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
974 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
975 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
976 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
977 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
978 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
979
980 .cpp.lo:
981 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
982 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
983 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
984 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
985 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
986 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
987
988 enchant_hunspell_la-enchant_hunspell.lo: enchant_hunspell.cpp
989 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enchant_hunspell_la_CXXFLAGS) $(CXXFLAGS) -MT enchant_hunspell_la-enchant_hunspell.lo -MD -MP -MF $(DEPDIR)/enchant_hunspell_la-enchant_hunspell.Tpo -c -o enchant_hunspell_la-enchant_hunspell.lo `test -f 'enchant_hunspell.cpp' || echo '$(srcdir)/'`enchant_hunspell.cpp
990 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enchant_hunspell_la-enchant_hunspell.Tpo $(DEPDIR)/enchant_hunspell_la-enchant_hunspell.Plo
991 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='enchant_hunspell.cpp' object='enchant_hunspell_la-enchant_hunspell.lo' libtool=yes @AMDEPBACKSLASH@
992 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
993 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enchant_hunspell_la_CXXFLAGS) $(CXXFLAGS) -c -o enchant_hunspell_la-enchant_hunspell.lo `test -f 'enchant_hunspell.cpp' || echo '$(srcdir)/'`enchant_hunspell.cpp
994
995 enchant_nuspell_la-enchant_nuspell.lo: enchant_nuspell.cpp
996 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enchant_nuspell_la_CXXFLAGS) $(CXXFLAGS) -MT enchant_nuspell_la-enchant_nuspell.lo -MD -MP -MF $(DEPDIR)/enchant_nuspell_la-enchant_nuspell.Tpo -c -o enchant_nuspell_la-enchant_nuspell.lo `test -f 'enchant_nuspell.cpp' || echo '$(srcdir)/'`enchant_nuspell.cpp
997 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enchant_nuspell_la-enchant_nuspell.Tpo $(DEPDIR)/enchant_nuspell_la-enchant_nuspell.Plo
998 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='enchant_nuspell.cpp' object='enchant_nuspell_la-enchant_nuspell.lo' libtool=yes @AMDEPBACKSLASH@
999 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1000 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enchant_nuspell_la_CXXFLAGS) $(CXXFLAGS) -c -o enchant_nuspell_la-enchant_nuspell.lo `test -f 'enchant_nuspell.cpp' || echo '$(srcdir)/'`enchant_nuspell.cpp
1001
1002 enchant_zemberek_la-enchant_zemberek.lo: enchant_zemberek.cpp
1003 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enchant_zemberek_la_CXXFLAGS) $(CXXFLAGS) -MT enchant_zemberek_la-enchant_zemberek.lo -MD -MP -MF $(DEPDIR)/enchant_zemberek_la-enchant_zemberek.Tpo -c -o enchant_zemberek_la-enchant_zemberek.lo `test -f 'enchant_zemberek.cpp' || echo '$(srcdir)/'`enchant_zemberek.cpp
1004 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enchant_zemberek_la-enchant_zemberek.Tpo $(DEPDIR)/enchant_zemberek_la-enchant_zemberek.Plo
1005 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='enchant_zemberek.cpp' object='enchant_zemberek_la-enchant_zemberek.lo' libtool=yes @AMDEPBACKSLASH@
1006 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1007 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enchant_zemberek_la_CXXFLAGS) $(CXXFLAGS) -c -o enchant_zemberek_la-enchant_zemberek.lo `test -f 'enchant_zemberek.cpp' || echo '$(srcdir)/'`enchant_zemberek.cpp
1008
1009 .mm.o:
1010 @am__fastdepOBJCXX_TRUE@ $(AM_V_OBJCXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
1011 @am__fastdepOBJCXX_TRUE@ $(OBJCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
1012 @am__fastdepOBJCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
1013 @AMDEP_TRUE@@am__fastdepOBJCXX_FALSE@ $(AM_V_OBJCXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
1014 @AMDEP_TRUE@@am__fastdepOBJCXX_FALSE@ DEPDIR=$(DEPDIR) $(OBJCXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1015 @am__fastdepOBJCXX_FALSE@ $(AM_V_OBJCXX@am__nodep@)$(OBJCXXCOMPILE) -c -o $@ $<
1016
1017 .mm.obj:
1018 @am__fastdepOBJCXX_TRUE@ $(AM_V_OBJCXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
1019 @am__fastdepOBJCXX_TRUE@ $(OBJCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
1020 @am__fastdepOBJCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
1021 @AMDEP_TRUE@@am__fastdepOBJCXX_FALSE@ $(AM_V_OBJCXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
1022 @AMDEP_TRUE@@am__fastdepOBJCXX_FALSE@ DEPDIR=$(DEPDIR) $(OBJCXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1023 @am__fastdepOBJCXX_FALSE@ $(AM_V_OBJCXX@am__nodep@)$(OBJCXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
1024
1025 .mm.lo:
1026 @am__fastdepOBJCXX_TRUE@ $(AM_V_OBJCXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
1027 @am__fastdepOBJCXX_TRUE@ $(LTOBJCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
1028 @am__fastdepOBJCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
1029 @AMDEP_TRUE@@am__fastdepOBJCXX_FALSE@ $(AM_V_OBJCXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
1030 @AMDEP_TRUE@@am__fastdepOBJCXX_FALSE@ DEPDIR=$(DEPDIR) $(OBJCXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1031 @am__fastdepOBJCXX_FALSE@ $(AM_V_OBJCXX@am__nodep@)$(LTOBJCXXCOMPILE) -c -o $@ $<
1032
1033 enchant_applespell_la-applespell_checker.lo: applespell_checker.mm
1034 @am__fastdepOBJCXX_TRUE@ $(AM_V_OBJCXX)$(LIBTOOL) $(AM_V_lt) $(enchant_applespell_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enchant_applespell_la_OBJCXXFLAGS) $(OBJCXXFLAGS) -MT enchant_applespell_la-applespell_checker.lo -MD -MP -MF $(DEPDIR)/enchant_applespell_la-applespell_checker.Tpo -c -o enchant_applespell_la-applespell_checker.lo `test -f 'applespell_checker.mm' || echo '$(srcdir)/'`applespell_checker.mm
1035 @am__fastdepOBJCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enchant_applespell_la-applespell_checker.Tpo $(DEPDIR)/enchant_applespell_la-applespell_checker.Plo
1036 @AMDEP_TRUE@@am__fastdepOBJCXX_FALSE@ $(AM_V_OBJCXX)source='applespell_checker.mm' object='enchant_applespell_la-applespell_checker.lo' libtool=yes @AMDEPBACKSLASH@
1037 @AMDEP_TRUE@@am__fastdepOBJCXX_FALSE@ DEPDIR=$(DEPDIR) $(OBJCXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1038 @am__fastdepOBJCXX_FALSE@ $(AM_V_OBJCXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(enchant_applespell_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enchant_applespell_la_OBJCXXFLAGS) $(OBJCXXFLAGS) -c -o enchant_applespell_la-applespell_checker.lo `test -f 'applespell_checker.mm' || echo '$(srcdir)/'`applespell_checker.mm
1039
1040 mostlyclean-libtool:
1041 -rm -f *.lo
1042
1043 clean-libtool:
1044 -rm -rf .libs _libs
1045 install-pkgdataDATA: $(pkgdata_DATA)
1046 @$(NORMAL_INSTALL)
1047 @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
1048 if test -n "$$list"; then \
1049 echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
1050 $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
1051 fi; \
1052 for p in $$list; do \
1053 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
1054 echo "$$d$$p"; \
1055 done | $(am__base_list) | \
1056 while read files; do \
1057 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
1058 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
1059 done
1060
1061 uninstall-pkgdataDATA:
1062 @$(NORMAL_UNINSTALL)
1063 @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
1064 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
1065 dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
1066
1067 ID: $(am__tagged_files)
1068 $(am__define_uniq_tagged_files); mkid -fID $$unique
1069 tags: tags-am
1070 TAGS: tags
1071
1072 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1073 set x; \
1074 here=`pwd`; \
1075 $(am__define_uniq_tagged_files); \
1076 shift; \
1077 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
1078 test -n "$$unique" || unique=$$empty_fix; \
1079 if test $$# -gt 0; then \
1080 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1081 "$$@" $$unique; \
1082 else \
1083 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1084 $$unique; \
1085 fi; \
1086 fi
1087 ctags: ctags-am
1088
1089 CTAGS: ctags
1090 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1091 $(am__define_uniq_tagged_files); \
1092 test -z "$(CTAGS_ARGS)$$unique" \
1093 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
1094 $$unique
1095
1096 GTAGS:
1097 here=`$(am__cd) $(top_builddir) && pwd` \
1098 && $(am__cd) $(top_srcdir) \
1099 && gtags -i $(GTAGS_ARGS) "$$here"
1100 cscopelist: cscopelist-am
1101
1102 cscopelist-am: $(am__tagged_files)
1103 list='$(am__tagged_files)'; \
1104 case "$(srcdir)" in \
1105 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
1106 *) sdir=$(subdir)/$(srcdir) ;; \
1107 esac; \
1108 for i in $$list; do \
1109 if test -f "$$i"; then \
1110 echo "$(subdir)/$$i"; \
1111 else \
1112 echo "$$sdir/$$i"; \
1113 fi; \
1114 done >> $(top_builddir)/cscope.files
1115
1116 distclean-tags:
1117 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
1118
1119 distdir: $(DISTFILES)
1120 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1121 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1122 list='$(DISTFILES)'; \
1123 dist_files=`for file in $$list; do echo $$file; done | \
1124 sed -e "s|^$$srcdirstrip/||;t" \
1125 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
1126 case $$dist_files in \
1127 */*) $(MKDIR_P) `echo "$$dist_files" | \
1128 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
1129 sort -u` ;; \
1130 esac; \
1131 for file in $$dist_files; do \
1132 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
1133 if test -d $$d/$$file; then \
1134 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
1135 if test -d "$(distdir)/$$file"; then \
1136 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1137 fi; \
1138 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
1139 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
1140 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1141 fi; \
1142 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
1143 else \
1144 test -f "$(distdir)/$$file" \
1145 || cp -p $$d/$$file "$(distdir)/$$file" \
1146 || exit 1; \
1147 fi; \
1148 done
1149 check-am: all-am
1150 check: check-am
1151 all-am: Makefile $(LTLIBRARIES) $(DATA)
1152 installdirs:
1153 for dir in "$(DESTDIR)$(providerdir)" "$(DESTDIR)$(pkgdatadir)"; do \
1154 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
1155 done
1156 install: install-am
1157 install-exec: install-exec-am
1158 install-data: install-data-am
1159 uninstall: uninstall-am
1160
1161 install-am: all-am
1162 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1163
1164 installcheck: installcheck-am
1165 install-strip:
1166 if test -z '$(STRIP)'; then \
1167 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1168 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1169 install; \
1170 else \
1171 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1172 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1173 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
1174 fi
1175 mostlyclean-generic:
1176
1177 clean-generic:
1178
1179 distclean-generic:
1180 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1181 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1182
1183 maintainer-clean-generic:
1184 @echo "This command is intended for maintainers to use"
1185 @echo "it deletes files that may require special tools to rebuild."
1186 clean: clean-am
1187
1188 clean-am: clean-generic clean-libtool clean-providerLTLIBRARIES \
1189 mostlyclean-am
1190
1191 distclean: distclean-am
1192 -rm -rf ./$(DEPDIR)
1193 -rm -f Makefile
1194 distclean-am: clean-am distclean-compile distclean-generic \
1195 distclean-tags
1196
1197 dvi: dvi-am
1198
1199 dvi-am:
1200
1201 html: html-am
1202
1203 html-am:
1204
1205 info: info-am
1206
1207 info-am:
1208
1209 install-data-am: install-pkgdataDATA install-providerLTLIBRARIES
1210
1211 install-dvi: install-dvi-am
1212
1213 install-dvi-am:
1214
1215 install-exec-am:
1216
1217 install-html: install-html-am
1218
1219 install-html-am:
1220
1221 install-info: install-info-am
1222
1223 install-info-am:
1224
1225 install-man:
1226
1227 install-pdf: install-pdf-am
1228
1229 install-pdf-am:
1230
1231 install-ps: install-ps-am
1232
1233 install-ps-am:
1234
1235 installcheck-am:
1236
1237 maintainer-clean: maintainer-clean-am
1238 -rm -rf ./$(DEPDIR)
1239 -rm -f Makefile
1240 maintainer-clean-am: distclean-am maintainer-clean-generic
1241
1242 mostlyclean: mostlyclean-am
1243
1244 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1245 mostlyclean-libtool
1246
1247 pdf: pdf-am
1248
1249 pdf-am:
1250
1251 ps: ps-am
1252
1253 ps-am:
1254
1255 uninstall-am: uninstall-pkgdataDATA uninstall-providerLTLIBRARIES
1256
1257 .MAKE: install-am install-strip
1258
1259 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
1260 clean-libtool clean-providerLTLIBRARIES cscopelist-am ctags \
1261 ctags-am distclean distclean-compile distclean-generic \
1262 distclean-libtool distclean-tags distdir dvi dvi-am html \
1263 html-am info info-am install install-am install-data \
1264 install-data-am install-dvi install-dvi-am install-exec \
1265 install-exec-am install-html install-html-am install-info \
1266 install-info-am install-man install-pdf install-pdf-am \
1267 install-pkgdataDATA install-providerLTLIBRARIES install-ps \
1268 install-ps-am install-strip installcheck installcheck-am \
1269 installdirs maintainer-clean maintainer-clean-generic \
1270 mostlyclean mostlyclean-compile mostlyclean-generic \
1271 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
1272 uninstall-am uninstall-pkgdataDATA \
1273 uninstall-providerLTLIBRARIES
1274
1275 .PRECIOUS: Makefile
1276
1277
1278 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1279 # Otherwise a system limit (for SysV at least) may be exceeded.
1280 .NOEXPORT:
0 /* enchant
1 * Copyright (C) 2020 Sander van Geloven
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17 *
18 * In addition, as a special exception, Dom Lachowicz
19 * gives permission to link the code of this program with
20 * non-LGPL Spelling Provider libraries (eg: a MSFT Office
21 * spell checker backend) and distribute linked combinations including
22 * the two. You must obey the GNU General Public License in all
23 * respects for all of the code used other than said providers. If you modify
24 * this file, you may extend this exception to your version of the
25 * file, but you are not obligated to do so. If you do not wish to
26 * do so, delete this exception statement from your version.
27 */
28
29 /*
30 * This is the Nuspell Enchant Backend.
31 * Nuspell is by Dimitrij Mijoski and Sander van Geloven.
32 * See: http://nuspell.github.io/
33 */
34
35 #include "config.h"
36
37 #include <stdio.h>
38 #include <stdlib.h>
39 #include <string.h>
40
41 #include <string>
42 #include <vector>
43
44 #include "enchant-provider.h"
45 #include "unused-parameter.h"
46
47 #include <nuspell/dictionary.hxx>
48 #include <nuspell/finder.hxx>
49
50 #include <glib.h>
51
52 using namespace std;
53 using namespace nuspell;
54
55 /***************************************************************************/
56
57 class NuspellChecker
58 {
59 public:
60 bool checkWord (const char *word, size_t len);
61 char **suggestWord (const char* const word, size_t len, size_t *out_n_suggs);
62
63 bool requestDictionary (const char * szLang);
64
65 private:
66 Dictionary nuspell;
67 };
68
69 /***************************************************************************/
70
71 bool
72 NuspellChecker::checkWord(const char *utf8Word, size_t len)
73 {
74 // the 8-bit encodings use precomposed forms
75 char *normalizedWord = g_utf8_normalize (utf8Word, len, G_NORMALIZE_NFC);
76
77 return nuspell.spell(string(normalizedWord));
78 }
79
80 char**
81 NuspellChecker::suggestWord(const char* const utf8Word, size_t len, size_t *nsug)
82 {
83 // the 8-bit encodings use precomposed forms
84 char *normalizedWord = g_utf8_normalize (utf8Word, len, G_NORMALIZE_NFC);
85 auto suggestions = vector<string>();
86 nuspell.suggest(string(normalizedWord), suggestions);
87 if (suggestions.empty())
88 return nullptr;
89 *nsug = suggestions.size();
90 char **sug = g_new0 (char *, *nsug + 1);
91 size_t i = 0;
92 for (auto& suggest : suggestions) {
93 char *word = g_new0(char, suggest.size() + 1);
94 strcpy(word, suggest.c_str());
95 sug[i] = word;
96 i++;
97 }
98 return sug;
99 }
100
101 static void
102 s_buildDictionaryDirs (vector<string> & dirs)
103 {
104 dirs.clear ();
105
106 /* 1. personal overrides for Enchant
107 * ~/.config/enchant/nuspell
108 */
109 gchar * tmp;
110 char * config_dir = enchant_get_user_config_dir ();
111 tmp = g_build_filename (config_dir, "nuspell", nullptr);
112 dirs.push_back (tmp);
113 free (config_dir);
114 g_free(tmp);
115
116 /* Dynamically retrieved from Nuspell dictionary finder:
117 * 2. personal overrides for Hunspell
118 * ~/.local/share/hunspell
119 * 3. system installed for Hunspell
120 * /usr/local/share/hunspell
121 * /usr/share/hunspell
122 * 4. personal or system installations for
123 * Mozilla (such as Firefox and Thunderbird),
124 * LibreOffice and Apache OpenOffice
125 */
126 auto nuspell_finder = nuspell::Finder::search_all_dirs_for_dicts();
127 for (auto& path : nuspell_finder.get_dir_paths()) {
128 if (path.compare(".") != 0)
129 dirs.push_back (path.c_str());
130 }
131
132 /* 5. system installations by Enchant
133 * /usr/local/share/enchant/nuspell
134 * /usr/share/enchant/nuspell
135 */
136 char * enchant_prefix = enchant_get_prefix_dir();
137 if (enchant_prefix) {
138 tmp = g_build_filename(enchant_prefix, "share", "enchant", "nuspell", nullptr);
139 dirs.push_back (tmp);
140 g_free(enchant_prefix);
141 g_free(tmp);
142 }
143
144 /* Hunspell paths are used, therefore ENCHANT_NUSPELL_DICT_DIR is
145 * irrelevant. Hence, the following paths are not to be considered:
146 * /usr/local/share/nuspell and /usr/share/nuspell
147 */
148 }
149
150 static void
151 s_buildHashNames (vector<string> & names, const char * dict)
152 {
153 names.clear ();
154
155 vector<string> dirs;
156 s_buildDictionaryDirs (dirs);
157
158 char *dict_dic = g_strconcat(dict, ".dic", nullptr);
159 for (size_t i = 0; i < dirs.size(); i++) {
160 char *tmp = g_build_filename (dirs[i].c_str(), dict_dic, nullptr);
161 names.push_back (tmp);
162 g_free (tmp);
163 }
164
165 g_free(dict_dic);
166 }
167
168 static const string
169 s_correspondingAffFile(const string & dicFile)
170 {
171 string aff = dicFile;
172 if (aff.size() >= 4 && aff.compare(aff.size() - 4, 4, ".dic") == 0) {
173 aff.erase(aff.size() - 3);
174 aff += "aff";
175 }
176 return aff;
177 }
178
179 static bool
180 s_fileExists(const string & file)
181 {
182 return g_file_test(file.c_str(), G_FILE_TEST_EXISTS) != 0;
183 }
184
185 static bool is_plausible_dict_for_tag(const char *dir_entry, const char *tag)
186 {
187 const char *dic_suffix = ".dic";
188 size_t dic_suffix_len = strlen(dic_suffix);
189 size_t dir_entry_len = strlen(dir_entry);
190 size_t tag_len = strlen(tag);
191
192 if (dir_entry_len - dic_suffix_len < tag_len)
193 return false;
194 if (strcmp(dir_entry + dir_entry_len - dic_suffix_len, dic_suffix) != 0)
195 return false;
196 if (strncmp (dir_entry, tag, tag_len) != 0)
197 return false;
198 //e.g. requested dict for "fi",
199 //reject "fil_PH.dic"
200 //allow "fi-FOO.dic", "fi_FOO.dic", "fi.dic", etc.
201 if (!ispunct(dir_entry[tag_len]))
202 return false;
203 return true;
204 }
205
206 static char *
207 nuspell_request_dictionary (const char * tag)
208 {
209 vector<string> names;
210
211 s_buildHashNames (names, tag);
212
213 for (size_t i = 0; i < names.size (); i++) {
214 if (g_file_test(names[i].c_str(), G_FILE_TEST_EXISTS) &&
215 s_fileExists(s_correspondingAffFile(names[i]))) {
216 return strdup (names[i].c_str());
217 }
218 }
219
220 vector<string> dirs;
221 s_buildDictionaryDirs (dirs);
222
223 for (size_t i = 0; i < dirs.size(); i++) {
224 GDir *dir = g_dir_open (dirs[i].c_str(), 0, nullptr);
225 if (dir) {
226 const char *dir_entry;
227 while ((dir_entry = g_dir_read_name (dir)) != NULL) {
228 if (is_plausible_dict_for_tag(dir_entry, tag)) {
229 char *dict = g_build_filename (dirs[i].c_str(),
230 dir_entry, nullptr);
231 if(s_fileExists(s_correspondingAffFile(dict))) {
232 g_dir_close (dir);
233 return dict;
234 }
235 g_free(dict);
236 }
237 }
238
239 g_dir_close (dir);
240 }
241 }
242
243 return NULL;
244 }
245
246 bool
247 NuspellChecker::requestDictionary(const char *szLang)
248 {
249 char *dic = nuspell_request_dictionary (szLang);
250 if (!dic)
251 return false;
252 string aff(s_correspondingAffFile(dic));
253 if (!s_fileExists(aff))
254 return false;
255 auto path = string(dic);
256 if (path.size() >= 4 && path.compare(path.size() - 4, 4, ".dic") == 0)
257 path.erase(path.size() - 4);
258 else
259 return false;
260 try {
261 nuspell = nuspell::Dictionary::load_from_path(path);
262 } catch (const std::runtime_error& e) {
263 return false;
264 }
265
266 return true;
267 }
268
269 /*
270 * Enchant
271 */
272
273 static char **
274 nuspell_dict_suggest (EnchantDict * me, const char *const word,
275 size_t len, size_t * out_n_suggs)
276 {
277 NuspellChecker * checker = static_cast<NuspellChecker *>(me->user_data);
278 return checker->suggestWord (word, len, out_n_suggs);
279 }
280
281 static int
282 nuspell_dict_check (EnchantDict * me, const char *const word, size_t len)
283 {
284 NuspellChecker * checker = static_cast<NuspellChecker *>(me->user_data);
285
286 return !(checker->checkWord(word, len));
287 }
288
289 static int
290 nuspell_dict_is_word_character (EnchantDict * me _GL_UNUSED_PARAMETER,
291 uint32_t uc, size_t n _GL_UNUSED_PARAMETER)
292 {
293 return g_unichar_isalpha(uc);
294 }
295
296 static void
297 nuspell_provider_enum_dicts (const char * const directory,
298 vector<string> & out_dicts)
299 {
300 GDir * dir = g_dir_open (directory, 0, nullptr);
301 if (dir) {
302 const char * entry;
303 while ((entry = g_dir_read_name (dir)) != NULL) {
304 char * utf8_entry = g_filename_to_utf8 (entry, -1, nullptr, nullptr, nullptr);
305 if (utf8_entry) {
306 string dir_entry (utf8_entry);
307 g_free (utf8_entry);
308
309 int hit = dir_entry.rfind (".dic");
310 // don't include hyphenation dictionaries
311 if (hit != -1) {
312 // require .aff file to be present
313 if(dir_entry.compare (0, 5, "hyph_") != 0) {
314 char * dic = g_build_filename(directory, dir_entry.c_str(), nullptr);
315 if (s_fileExists(s_correspondingAffFile(dic))) {
316 out_dicts.push_back (dir_entry.substr (0, hit));
317 }
318 g_free(dic);
319 }
320 }
321 }
322 }
323
324 g_dir_close (dir);
325 }
326 }
327
328 extern "C" {
329
330 static char **
331 nuspell_provider_list_dicts (EnchantProvider * me _GL_UNUSED_PARAMETER,
332 size_t * out_n_dicts)
333 {
334 vector<string> dict_dirs, dicts;
335 char ** dictionary_list = NULL;
336
337 s_buildDictionaryDirs (dict_dirs);
338
339 for (size_t i = 0; i < dict_dirs.size(); i++) {
340 nuspell_provider_enum_dicts (dict_dirs[i].c_str(), dicts);
341 }
342
343 if (dicts.size () > 0) {
344 dictionary_list = g_new0 (char *, dicts.size() + 1);
345
346 for (size_t i = 0; i < dicts.size(); i++)
347 dictionary_list[i] = g_strdup (dicts[i].c_str());
348 }
349
350 *out_n_dicts = dicts.size ();
351 return dictionary_list;
352 }
353
354 static EnchantDict *
355 nuspell_provider_request_dict(EnchantProvider * me _GL_UNUSED_PARAMETER, const char *const tag)
356 {
357 NuspellChecker * checker = new NuspellChecker();
358
359 if (!checker)
360 return NULL;
361
362 if (!checker->requestDictionary(tag)) {
363 delete checker;
364 return NULL;
365 }
366
367 EnchantDict *dict = g_new0(EnchantDict, 1);
368 dict->user_data = (void *) checker;
369 dict->check = nuspell_dict_check;
370 dict->suggest = nuspell_dict_suggest;
371 // don't implement personal, session
372 dict->is_word_character = nuspell_dict_is_word_character;
373
374 return dict;
375 }
376
377 static void
378 nuspell_provider_dispose_dict (EnchantProvider * me _GL_UNUSED_PARAMETER, EnchantDict * dict)
379 {
380 NuspellChecker *checker = (NuspellChecker *) dict->user_data;
381 delete checker;
382
383 g_free (dict);
384 }
385
386 static int
387 nuspell_provider_dictionary_exists (struct str_enchant_provider * me _GL_UNUSED_PARAMETER,
388 const char *const tag)
389 {
390 vector <string> names;
391 s_buildHashNames (names, tag);
392 for (size_t i = 0; i < names.size(); i++) {
393 if (g_file_test (names[i].c_str(), G_FILE_TEST_EXISTS) &&
394 s_fileExists(s_correspondingAffFile(names[i]))) {
395 return 1;
396 }
397 }
398
399 return 0;
400 }
401
402 static void
403 nuspell_provider_dispose (EnchantProvider * me)
404 {
405 g_free (me);
406 }
407
408 static const char *
409 nuspell_provider_identify (EnchantProvider * me _GL_UNUSED_PARAMETER)
410 {
411 return "nuspell";
412 }
413
414 static const char *
415 nuspell_provider_describe (EnchantProvider * me _GL_UNUSED_PARAMETER)
416 {
417 return "Nuspell Provider";
418 }
419
420 EnchantProvider *init_enchant_provider (void);
421
422 EnchantProvider *
423 init_enchant_provider (void)
424 {
425 EnchantProvider *provider = g_new0(EnchantProvider, 1);
426 provider->dispose = nuspell_provider_dispose;
427 provider->request_dict = nuspell_provider_request_dict;
428 provider->dispose_dict = nuspell_provider_dispose_dict;
429 provider->dictionary_exists = nuspell_provider_dictionary_exists;
430 provider->identify = nuspell_provider_identify;
431 provider->describe = nuspell_provider_describe;
432 provider->list_dicts = nuspell_provider_list_dicts;
433
434 return provider;
435 }
436
437 } // extern C linkage
+0
-10
src/.gitignore less more
0 /enchant-[0-9]
1 /enchant.1
2 /enchant-[0-9].1
3 /enchant.1.in
4 /enchant-[0-9].exe
5 /enchant-lsmod-[0-9]
6 /enchant-lsmod-[0-9].exe
7 /enchant-lsmod.1
8 /enchant-lsmod-[0-9].1
9 /libenchant.rc
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
4
5 # This Makefile.in 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
14 @SET_MAKE@
15
16
17
18
19 VPATH = @srcdir@
20 am__is_gnu_make = { \
21 if test -z '$(MAKELEVEL)'; then \
22 false; \
23 elif test -n '$(MAKE_HOST)'; then \
24 true; \
25 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
26 true; \
27 else \
28 false; \
29 fi; \
30 }
31 am__make_running_with_option = \
32 case $${target_option-} in \
33 ?) ;; \
34 *) echo "am__make_running_with_option: internal error: invalid" \
35 "target option '$${target_option-}' specified" >&2; \
36 exit 1;; \
37 esac; \
38 has_opt=no; \
39 sane_makeflags=$$MAKEFLAGS; \
40 if $(am__is_gnu_make); then \
41 sane_makeflags=$$MFLAGS; \
42 else \
43 case $$MAKEFLAGS in \
44 *\\[\ \ ]*) \
45 bs=\\; \
46 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
47 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
48 esac; \
49 fi; \
50 skip_next=no; \
51 strip_trailopt () \
52 { \
53 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
54 }; \
55 for flg in $$sane_makeflags; do \
56 test $$skip_next = yes && { skip_next=no; continue; }; \
57 case $$flg in \
58 *=*|--*) continue;; \
59 -*I) strip_trailopt 'I'; skip_next=yes;; \
60 -*I?*) strip_trailopt 'I';; \
61 -*O) strip_trailopt 'O'; skip_next=yes;; \
62 -*O?*) strip_trailopt 'O';; \
63 -*l) strip_trailopt 'l'; skip_next=yes;; \
64 -*l?*) strip_trailopt 'l';; \
65 -[dEDm]) skip_next=yes;; \
66 -[JT]) skip_next=yes;; \
67 esac; \
68 case $$flg in \
69 *$$target_option*) has_opt=yes; break;; \
70 esac; \
71 done; \
72 test $$has_opt = yes
73 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
74 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
75 pkgdatadir = $(datadir)/@PACKAGE@
76 pkgincludedir = $(includedir)/@PACKAGE@
77 pkglibdir = $(libdir)/@PACKAGE@
78 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
79 install_sh_DATA = $(install_sh) -c -m 644
80 install_sh_PROGRAM = $(install_sh) -c
81 install_sh_SCRIPT = $(install_sh) -c
82 INSTALL_HEADER = $(INSTALL_DATA)
83 transform = $(program_transform_name)
84 NORMAL_INSTALL = :
85 PRE_INSTALL = :
86 POST_INSTALL = :
87 NORMAL_UNINSTALL = :
88 PRE_UNINSTALL = :
89 POST_UNINSTALL = :
90 build_triplet = @build@
91 host_triplet = @host@
92 @OS_WIN32_TRUE@am__append_1 = -avoid-version
93 @OS_WIN32_FALSE@am__append_2 = -version-info $(VERSION_INFO)
94 @OS_WIN32_TRUE@am__append_3 = libenchant.rc
95 bin_PROGRAMS = enchant-@ENCHANT_MAJOR_VERSION@$(EXEEXT) \
96 enchant-lsmod-@ENCHANT_MAJOR_VERSION@$(EXEEXT)
97 subdir = src
98 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
99 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
100 $(top_srcdir)/m4/absolute-header.m4 \
101 $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
102 $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \
103 $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \
104 $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \
105 $(top_srcdir)/m4/gnulib-common.m4 \
106 $(top_srcdir)/m4/gnulib-comp.m4 \
107 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \
108 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
109 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
110 $(top_srcdir)/m4/malloc.m4 \
111 $(top_srcdir)/m4/manywarnings-c++.m4 \
112 $(top_srcdir)/m4/manywarnings.m4 \
113 $(top_srcdir)/m4/msvc-inval.m4 \
114 $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \
115 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/rawmemchr.m4 \
116 $(top_srcdir)/m4/relocatable-lib.m4 \
117 $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \
118 $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
119 $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \
120 $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \
121 $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \
122 $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
123 $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
124 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
125 $(ACLOCAL_M4)
126 DIST_COMMON = $(srcdir)/Makefile.am $(libenchant_include_HEADERS) \
127 $(am__DIST_COMMON)
128 mkinstalldirs = $(install_sh) -d
129 CONFIG_HEADER = $(top_builddir)/config.h
130 CONFIG_CLEAN_FILES = libenchant.rc enchant.1 enchant-lsmod.1
131 CONFIG_CLEAN_VPATH_FILES =
132 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
133 am__vpath_adj = case $$p in \
134 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
135 *) f=$$p;; \
136 esac;
137 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
138 am__install_max = 40
139 am__nobase_strip_setup = \
140 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
141 am__nobase_strip = \
142 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
143 am__nobase_list = $(am__nobase_strip_setup); \
144 for p in $$list; do echo "$$p $$p"; done | \
145 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
146 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
147 if (++n[$$2] == $(am__install_max)) \
148 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
149 END { for (dir in files) print dir, files[dir] }'
150 am__base_list = \
151 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
152 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
153 am__uninstall_files_from_dir = { \
154 test -z "$$files" \
155 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
156 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
157 $(am__cd) "$$dir" && rm -f $$files; }; \
158 }
159 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
160 "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgdatadir)" \
161 "$(DESTDIR)$(libenchant_includedir)"
162 LTLIBRARIES = $(lib_LTLIBRARIES)
163 am__DEPENDENCIES_1 =
164 LIBOBJDIR = ../lib/
165 libenchant_@ENCHANT_MAJOR_VERSION@_la_DEPENDENCIES = \
166 $(top_builddir)/lib/libgnu.la $(am__DEPENDENCIES_1) \
167 $(LTLIBOBJS)
168 am__libenchant_@ENCHANT_MAJOR_VERSION@_la_SOURCES_DIST = lib.c pwl.c \
169 enchant.h pwl.h libenchant.rc
170 @OS_WIN32_TRUE@am__objects_1 = libenchant.lo
171 am_libenchant_@ENCHANT_MAJOR_VERSION@_la_OBJECTS = \
172 libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.lo \
173 libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.lo $(am__objects_1)
174 libenchant_@ENCHANT_MAJOR_VERSION@_la_OBJECTS = \
175 $(am_libenchant_@ENCHANT_MAJOR_VERSION@_la_OBJECTS)
176 AM_V_lt = $(am__v_lt_@AM_V@)
177 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
178 am__v_lt_0 = --silent
179 am__v_lt_1 =
180 libenchant_@ENCHANT_MAJOR_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
181 --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
182 $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
183 $(libenchant_@ENCHANT_MAJOR_VERSION@_la_LDFLAGS) $(LDFLAGS) -o \
184 $@
185 PROGRAMS = $(bin_PROGRAMS)
186 am_enchant_@ENCHANT_MAJOR_VERSION@_OBJECTS = enchant.$(OBJEXT)
187 enchant_@ENCHANT_MAJOR_VERSION@_OBJECTS = \
188 $(am_enchant_@ENCHANT_MAJOR_VERSION@_OBJECTS)
189 enchant_@ENCHANT_MAJOR_VERSION@_LDADD = $(LDADD)
190 enchant_@ENCHANT_MAJOR_VERSION@_DEPENDENCIES = \
191 libenchant-@ENCHANT_MAJOR_VERSION@.la $(am__DEPENDENCIES_1) \
192 $(top_builddir)/lib/libgnu.la
193 am_enchant_lsmod_@ENCHANT_MAJOR_VERSION@_OBJECTS = \
194 enchant-lsmod.$(OBJEXT)
195 enchant_lsmod_@ENCHANT_MAJOR_VERSION@_OBJECTS = \
196 $(am_enchant_lsmod_@ENCHANT_MAJOR_VERSION@_OBJECTS)
197 enchant_lsmod_@ENCHANT_MAJOR_VERSION@_LDADD = $(LDADD)
198 enchant_lsmod_@ENCHANT_MAJOR_VERSION@_DEPENDENCIES = \
199 libenchant-@ENCHANT_MAJOR_VERSION@.la $(am__DEPENDENCIES_1) \
200 $(top_builddir)/lib/libgnu.la
201 AM_V_P = $(am__v_P_@AM_V@)
202 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
203 am__v_P_0 = false
204 am__v_P_1 = :
205 AM_V_GEN = $(am__v_GEN_@AM_V@)
206 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
207 am__v_GEN_0 = @echo " GEN " $@;
208 am__v_GEN_1 =
209 AM_V_at = $(am__v_at_@AM_V@)
210 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
211 am__v_at_0 = @
212 am__v_at_1 =
213 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
214 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
215 am__depfiles_maybe = depfiles
216 am__mv = mv -f
217 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
218 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
219 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
220 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
221 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
222 $(AM_CFLAGS) $(CFLAGS)
223 AM_V_CC = $(am__v_CC_@AM_V@)
224 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
225 am__v_CC_0 = @echo " CC " $@;
226 am__v_CC_1 =
227 CCLD = $(CC)
228 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
229 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
230 $(AM_LDFLAGS) $(LDFLAGS) -o $@
231 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
232 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
233 am__v_CCLD_0 = @echo " CCLD " $@;
234 am__v_CCLD_1 =
235 SOURCES = $(libenchant_@ENCHANT_MAJOR_VERSION@_la_SOURCES) \
236 $(enchant_@ENCHANT_MAJOR_VERSION@_SOURCES) \
237 $(enchant_lsmod_@ENCHANT_MAJOR_VERSION@_SOURCES)
238 DIST_SOURCES = \
239 $(am__libenchant_@ENCHANT_MAJOR_VERSION@_la_SOURCES_DIST) \
240 $(enchant_@ENCHANT_MAJOR_VERSION@_SOURCES) \
241 $(enchant_lsmod_@ENCHANT_MAJOR_VERSION@_SOURCES)
242 am__can_run_installinfo = \
243 case $$AM_UPDATE_INFO_DIR in \
244 n|no|NO) false;; \
245 *) (install-info --version) >/dev/null 2>&1;; \
246 esac
247 man1dir = $(mandir)/man1
248 NROFF = nroff
249 MANS = $(dist_man_MANS)
250 DATA = $(pkgdata_DATA)
251 HEADERS = $(libenchant_include_HEADERS)
252 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
253 # Read a list of newline-separated strings from the standard input,
254 # and print each of them once, without duplicates. Input order is
255 # *not* preserved.
256 am__uniquify_input = $(AWK) '\
257 BEGIN { nonempty = 0; } \
258 { items[$$0] = 1; nonempty = 1; } \
259 END { if (nonempty) { for (i in items) print i; }; } \
260 '
261 # Make sure the list of sources is unique. This is necessary because,
262 # e.g., the same source file might be shared among _SOURCES variables
263 # for different programs/libraries.
264 am__define_uniq_tagged_files = \
265 list='$(am__tagged_files)'; \
266 unique=`for i in $$list; do \
267 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
268 done | $(am__uniquify_input)`
269 ETAGS = etags
270 CTAGS = ctags
271 am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
272 $(srcdir)/enchant-lsmod.1.in $(srcdir)/enchant.1.in \
273 $(srcdir)/libenchant.rc.in $(top_srcdir)/build-aux/depcomp
274 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
275 pkglibexecdir = @pkglibexecdir@
276 ACLOCAL = @ACLOCAL@
277 AMTAR = @AMTAR@
278 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
279 AR = @AR@
280 ARFLAGS = @ARFLAGS@
281 AS = @AS@
282 AUTOCONF = @AUTOCONF@
283 AUTOHEADER = @AUTOHEADER@
284 AUTOMAKE = @AUTOMAKE@
285 AWK = @AWK@
286 CC = @CC@
287 CCDEPMODE = @CCDEPMODE@
288 CFLAGS = @CFLAGS@
289 CPP = @CPP@
290 CPPFLAGS = @CPPFLAGS@
291 CXX = @CXX@
292 CXXCPP = @CXXCPP@
293 CXXDEPMODE = @CXXDEPMODE@
294 CXXFLAGS = @CXXFLAGS@
295 CYGPATH_W = @CYGPATH_W@
296 DEFS = @DEFS@
297 DEPDIR = @DEPDIR@
298 DLLTOOL = @DLLTOOL@
299 DSYMUTIL = @DSYMUTIL@
300 DUMPBIN = @DUMPBIN@
301 ECHO_C = @ECHO_C@
302 ECHO_N = @ECHO_N@
303 ECHO_T = @ECHO_T@
304 EGREP = @EGREP@
305 ENCHANT_CFLAGS = @ENCHANT_CFLAGS@
306 ENCHANT_LIBS = @ENCHANT_LIBS@
307 ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@
308 ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@
309 ENCHANT_MINOR_VERSION = @ENCHANT_MINOR_VERSION@
310 EXEEXT = @EXEEXT@
311 FGREP = @FGREP@
312 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
313 GETOPT_H = @GETOPT_H@
314 GLIB_CFLAGS = @GLIB_CFLAGS@
315 GLIB_LIBS = @GLIB_LIBS@
316 GNULIB_ATOLL = @GNULIB_ATOLL@
317 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
318 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
319 GNULIB_CHDIR = @GNULIB_CHDIR@
320 GNULIB_CHOWN = @GNULIB_CHOWN@
321 GNULIB_CLOSE = @GNULIB_CLOSE@
322 GNULIB_DUP = @GNULIB_DUP@
323 GNULIB_DUP2 = @GNULIB_DUP2@
324 GNULIB_DUP3 = @GNULIB_DUP3@
325 GNULIB_ENVIRON = @GNULIB_ENVIRON@
326 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
327 GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
328 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
329 GNULIB_FCHDIR = @GNULIB_FCHDIR@
330 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
331 GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
332 GNULIB_FFSL = @GNULIB_FFSL@
333 GNULIB_FFSLL = @GNULIB_FFSLL@
334 GNULIB_FLOCK = @GNULIB_FLOCK@
335 GNULIB_FSYNC = @GNULIB_FSYNC@
336 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
337 GNULIB_GETCWD = @GNULIB_GETCWD@
338 GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
339 GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
340 GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
341 GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
342 GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
343 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
344 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
345 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
346 GNULIB_GETPASS = @GNULIB_GETPASS@
347 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
348 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
349 GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
350 GNULIB_GRANTPT = @GNULIB_GRANTPT@
351 GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
352 GNULIB_ISATTY = @GNULIB_ISATTY@
353 GNULIB_LCHOWN = @GNULIB_LCHOWN@
354 GNULIB_LINK = @GNULIB_LINK@
355 GNULIB_LINKAT = @GNULIB_LINKAT@
356 GNULIB_LSEEK = @GNULIB_LSEEK@
357 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
358 GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
359 GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
360 GNULIB_MBSCHR = @GNULIB_MBSCHR@
361 GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
362 GNULIB_MBSLEN = @GNULIB_MBSLEN@
363 GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
364 GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
365 GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
366 GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
367 GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
368 GNULIB_MBSSEP = @GNULIB_MBSSEP@
369 GNULIB_MBSSPN = @GNULIB_MBSSPN@
370 GNULIB_MBSSTR = @GNULIB_MBSSTR@
371 GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
372 GNULIB_MBTOWC = @GNULIB_MBTOWC@
373 GNULIB_MEMCHR = @GNULIB_MEMCHR@
374 GNULIB_MEMMEM = @GNULIB_MEMMEM@
375 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
376 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
377 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
378 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
379 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
380 GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
381 GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
382 GNULIB_PIPE = @GNULIB_PIPE@
383 GNULIB_PIPE2 = @GNULIB_PIPE2@
384 GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
385 GNULIB_PREAD = @GNULIB_PREAD@
386 GNULIB_PTSNAME = @GNULIB_PTSNAME@
387 GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
388 GNULIB_PUTENV = @GNULIB_PUTENV@
389 GNULIB_PWRITE = @GNULIB_PWRITE@
390 GNULIB_QSORT_R = @GNULIB_QSORT_R@
391 GNULIB_RANDOM = @GNULIB_RANDOM@
392 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
393 GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
394 GNULIB_READ = @GNULIB_READ@
395 GNULIB_READLINK = @GNULIB_READLINK@
396 GNULIB_READLINKAT = @GNULIB_READLINKAT@
397 GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
398 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
399 GNULIB_REALPATH = @GNULIB_REALPATH@
400 GNULIB_RMDIR = @GNULIB_RMDIR@
401 GNULIB_RPMATCH = @GNULIB_RPMATCH@
402 GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
403 GNULIB_SETENV = @GNULIB_SETENV@
404 GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
405 GNULIB_SLEEP = @GNULIB_SLEEP@
406 GNULIB_STPCPY = @GNULIB_STPCPY@
407 GNULIB_STPNCPY = @GNULIB_STPNCPY@
408 GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
409 GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
410 GNULIB_STRDUP = @GNULIB_STRDUP@
411 GNULIB_STRERROR = @GNULIB_STRERROR@
412 GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
413 GNULIB_STRNCAT = @GNULIB_STRNCAT@
414 GNULIB_STRNDUP = @GNULIB_STRNDUP@
415 GNULIB_STRNLEN = @GNULIB_STRNLEN@
416 GNULIB_STRPBRK = @GNULIB_STRPBRK@
417 GNULIB_STRSEP = @GNULIB_STRSEP@
418 GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
419 GNULIB_STRSTR = @GNULIB_STRSTR@
420 GNULIB_STRTOD = @GNULIB_STRTOD@
421 GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
422 GNULIB_STRTOLL = @GNULIB_STRTOLL@
423 GNULIB_STRTOULL = @GNULIB_STRTOULL@
424 GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
425 GNULIB_SYMLINK = @GNULIB_SYMLINK@
426 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
427 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
428 GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
429 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
430 GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
431 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
432 GNULIB_UNLINK = @GNULIB_UNLINK@
433 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
434 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
435 GNULIB_UNSETENV = @GNULIB_UNSETENV@
436 GNULIB_USLEEP = @GNULIB_USLEEP@
437 GNULIB_WCTOMB = @GNULIB_WCTOMB@
438 GNULIB_WRITE = @GNULIB_WRITE@
439 GNULIB__EXIT = @GNULIB__EXIT@
440 GREP = @GREP@
441 HAVE_ATOLL = @HAVE_ATOLL@
442 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
443 HAVE_CHOWN = @HAVE_CHOWN@
444 HAVE_CXX11 = @HAVE_CXX11@
445 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
446 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
447 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
448 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
449 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
450 HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
451 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
452 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
453 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
454 HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
455 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
456 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
457 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
458 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
459 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
460 HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
461 HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
462 HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
463 HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
464 HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
465 HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
466 HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
467 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
468 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
469 HAVE_DUP2 = @HAVE_DUP2@
470 HAVE_DUP3 = @HAVE_DUP3@
471 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
472 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
473 HAVE_FACCESSAT = @HAVE_FACCESSAT@
474 HAVE_FCHDIR = @HAVE_FCHDIR@
475 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
476 HAVE_FDATASYNC = @HAVE_FDATASYNC@
477 HAVE_FFSL = @HAVE_FFSL@
478 HAVE_FFSLL = @HAVE_FFSLL@
479 HAVE_FLOCK = @HAVE_FLOCK@
480 HAVE_FSYNC = @HAVE_FSYNC@
481 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
482 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
483 HAVE_GETGROUPS = @HAVE_GETGROUPS@
484 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
485 HAVE_GETLOGIN = @HAVE_GETLOGIN@
486 HAVE_GETOPT_H = @HAVE_GETOPT_H@
487 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
488 HAVE_GETPASS = @HAVE_GETPASS@
489 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
490 HAVE_GRANTPT = @HAVE_GRANTPT@
491 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
492 HAVE_LCHOWN = @HAVE_LCHOWN@
493 HAVE_LINK = @HAVE_LINK@
494 HAVE_LINKAT = @HAVE_LINKAT@
495 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
496 HAVE_MBSLEN = @HAVE_MBSLEN@
497 HAVE_MEMCHR = @HAVE_MEMCHR@
498 HAVE_MEMPCPY = @HAVE_MEMPCPY@
499 HAVE_MKDTEMP = @HAVE_MKDTEMP@
500 HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
501 HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
502 HAVE_MKSTEMP = @HAVE_MKSTEMP@
503 HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
504 HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
505 HAVE_OS_H = @HAVE_OS_H@
506 HAVE_PIPE = @HAVE_PIPE@
507 HAVE_PIPE2 = @HAVE_PIPE2@
508 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
509 HAVE_PREAD = @HAVE_PREAD@
510 HAVE_PTSNAME = @HAVE_PTSNAME@
511 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
512 HAVE_PWRITE = @HAVE_PWRITE@
513 HAVE_QSORT_R = @HAVE_QSORT_R@
514 HAVE_RANDOM = @HAVE_RANDOM@
515 HAVE_RANDOM_H = @HAVE_RANDOM_H@
516 HAVE_RANDOM_R = @HAVE_RANDOM_R@
517 HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
518 HAVE_READLINK = @HAVE_READLINK@
519 HAVE_READLINKAT = @HAVE_READLINKAT@
520 HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@
521 HAVE_REALPATH = @HAVE_REALPATH@
522 HAVE_RPMATCH = @HAVE_RPMATCH@
523 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
524 HAVE_SETENV = @HAVE_SETENV@
525 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
526 HAVE_SLEEP = @HAVE_SLEEP@
527 HAVE_STPCPY = @HAVE_STPCPY@
528 HAVE_STPNCPY = @HAVE_STPNCPY@
529 HAVE_STRCASESTR = @HAVE_STRCASESTR@
530 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
531 HAVE_STRPBRK = @HAVE_STRPBRK@
532 HAVE_STRSEP = @HAVE_STRSEP@
533 HAVE_STRTOD = @HAVE_STRTOD@
534 HAVE_STRTOLL = @HAVE_STRTOLL@
535 HAVE_STRTOULL = @HAVE_STRTOULL@
536 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
537 HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
538 HAVE_SYMLINK = @HAVE_SYMLINK@
539 HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
540 HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
541 HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@
542 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
543 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
544 HAVE_UNISTD_H = @HAVE_UNISTD_H@
545 HAVE_UNLINKAT = @HAVE_UNLINKAT@
546 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
547 HAVE_USLEEP = @HAVE_USLEEP@
548 HAVE_WCHAR_T = @HAVE_WCHAR_T@
549 HAVE__EXIT = @HAVE__EXIT@
550 HUNSPELL_CFLAGS = @HUNSPELL_CFLAGS@
551 HUNSPELL_LIBS = @HUNSPELL_LIBS@
552 INCLUDE_NEXT = @INCLUDE_NEXT@
553 INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
554 INSTALL = @INSTALL@
555 INSTALL_DATA = @INSTALL_DATA@
556 INSTALL_PROGRAM = @INSTALL_PROGRAM@
557 INSTALL_SCRIPT = @INSTALL_SCRIPT@
558 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
559 ISYSTEM = @ISYSTEM@
560 LD = @LD@
561 LDFLAGS = @LDFLAGS@
562 LIBINTL = @LIBINTL@
563 LIBOBJS = @LIBOBJS@
564 LIBS = @LIBS@
565 LIBTOOL = @LIBTOOL@
566 LIPO = @LIPO@
567 LN_S = @LN_S@
568 LTLIBINTL = @LTLIBINTL@
569 LTLIBOBJS = @LTLIBOBJS@
570 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
571 MAKEINFO = @MAKEINFO@
572 MANIFEST_TOOL = @MANIFEST_TOOL@
573 MKDIR_P = @MKDIR_P@
574 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
575 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
576 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
577 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
578 NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@
579 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
580 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
581 NEXT_GETOPT_H = @NEXT_GETOPT_H@
582 NEXT_STDDEF_H = @NEXT_STDDEF_H@
583 NEXT_STDLIB_H = @NEXT_STDLIB_H@
584 NEXT_STRING_H = @NEXT_STRING_H@
585 NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@
586 NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
587 NEXT_UNISTD_H = @NEXT_UNISTD_H@
588 NM = @NM@
589 NMEDIT = @NMEDIT@
590 NUSPELL_CFLAGS = @NUSPELL_CFLAGS@
591 NUSPELL_LIBS = @NUSPELL_LIBS@
592 OBJCXX = @OBJCXX@
593 OBJCXXCPP = @OBJCXXCPP@
594 OBJCXXDEPMODE = @OBJCXXDEPMODE@
595 OBJCXXFLAGS = @OBJCXXFLAGS@
596 OBJDUMP = @OBJDUMP@
597 OBJEXT = @OBJEXT@
598 OTOOL = @OTOOL@
599 OTOOL64 = @OTOOL64@
600 PACKAGE = @PACKAGE@
601 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
602 PACKAGE_NAME = @PACKAGE_NAME@
603 PACKAGE_STRING = @PACKAGE_STRING@
604 PACKAGE_TARNAME = @PACKAGE_TARNAME@
605 PACKAGE_URL = @PACKAGE_URL@
606 PACKAGE_VERSION = @PACKAGE_VERSION@
607 PATH_SEPARATOR = @PATH_SEPARATOR@
608 PKG_CONFIG = @PKG_CONFIG@
609 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
610 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
611 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
612 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
613 RANLIB = @RANLIB@
614 RC = @RC@
615 RELOCATABLE = @RELOCATABLE@
616 REPLACE_CALLOC = @REPLACE_CALLOC@
617 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
618 REPLACE_CHOWN = @REPLACE_CHOWN@
619 REPLACE_CLOSE = @REPLACE_CLOSE@
620 REPLACE_DUP = @REPLACE_DUP@
621 REPLACE_DUP2 = @REPLACE_DUP2@
622 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
623 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
624 REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
625 REPLACE_GETCWD = @REPLACE_GETCWD@
626 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
627 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
628 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
629 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
630 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
631 REPLACE_GETPASS = @REPLACE_GETPASS@
632 REPLACE_ISATTY = @REPLACE_ISATTY@
633 REPLACE_LCHOWN = @REPLACE_LCHOWN@
634 REPLACE_LINK = @REPLACE_LINK@
635 REPLACE_LINKAT = @REPLACE_LINKAT@
636 REPLACE_LSEEK = @REPLACE_LSEEK@
637 REPLACE_MALLOC = @REPLACE_MALLOC@
638 REPLACE_MBTOWC = @REPLACE_MBTOWC@
639 REPLACE_MEMCHR = @REPLACE_MEMCHR@
640 REPLACE_MEMMEM = @REPLACE_MEMMEM@
641 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
642 REPLACE_NULL = @REPLACE_NULL@
643 REPLACE_PREAD = @REPLACE_PREAD@
644 REPLACE_PTSNAME = @REPLACE_PTSNAME@
645 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
646 REPLACE_PUTENV = @REPLACE_PUTENV@
647 REPLACE_PWRITE = @REPLACE_PWRITE@
648 REPLACE_QSORT_R = @REPLACE_QSORT_R@
649 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
650 REPLACE_READ = @REPLACE_READ@
651 REPLACE_READLINK = @REPLACE_READLINK@
652 REPLACE_READLINKAT = @REPLACE_READLINKAT@
653 REPLACE_REALLOC = @REPLACE_REALLOC@
654 REPLACE_REALPATH = @REPLACE_REALPATH@
655 REPLACE_RMDIR = @REPLACE_RMDIR@
656 REPLACE_SETENV = @REPLACE_SETENV@
657 REPLACE_SLEEP = @REPLACE_SLEEP@
658 REPLACE_STPNCPY = @REPLACE_STPNCPY@
659 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
660 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
661 REPLACE_STRDUP = @REPLACE_STRDUP@
662 REPLACE_STRERROR = @REPLACE_STRERROR@
663 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
664 REPLACE_STRNCAT = @REPLACE_STRNCAT@
665 REPLACE_STRNDUP = @REPLACE_STRNDUP@
666 REPLACE_STRNLEN = @REPLACE_STRNLEN@
667 REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
668 REPLACE_STRSTR = @REPLACE_STRSTR@
669 REPLACE_STRTOD = @REPLACE_STRTOD@
670 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
671 REPLACE_SYMLINK = @REPLACE_SYMLINK@
672 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
673 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
674 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
675 REPLACE_UNLINK = @REPLACE_UNLINK@
676 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
677 REPLACE_UNSETENV = @REPLACE_UNSETENV@
678 REPLACE_USLEEP = @REPLACE_USLEEP@
679 REPLACE_WCTOMB = @REPLACE_WCTOMB@
680 REPLACE_WRITE = @REPLACE_WRITE@
681 SED = @SED@
682 SET_MAKE = @SET_MAKE@
683 SHELL = @SHELL@
684 STDDEF_H = @STDDEF_H@
685 STRIP = @STRIP@
686 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
687 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
688 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
689 UNITTESTPP_CFLAGS = @UNITTESTPP_CFLAGS@
690 UNITTESTPP_LIBS = @UNITTESTPP_LIBS@
691 VERSION = @VERSION@
692 VERSION_INFO = @VERSION_INFO@
693 VOIKKO_CFLAGS = @VOIKKO_CFLAGS@
694 VOIKKO_LIBS = @VOIKKO_LIBS@
695 WARN_CFLAGS = @WARN_CFLAGS@
696 WARN_CXXFLAGS = @WARN_CXXFLAGS@
697 WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
698 WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
699 ZEMBEREK_CFLAGS = @ZEMBEREK_CFLAGS@
700 ZEMBEREK_LIBS = @ZEMBEREK_LIBS@
701 abs_builddir = @abs_builddir@
702 abs_srcdir = @abs_srcdir@
703 abs_top_builddir = @abs_top_builddir@
704 abs_top_srcdir = @abs_top_srcdir@
705 ac_ct_AR = @ac_ct_AR@
706 ac_ct_CC = @ac_ct_CC@
707 ac_ct_CXX = @ac_ct_CXX@
708 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
709 ac_ct_OBJCXX = @ac_ct_OBJCXX@
710 am__include = @am__include@
711 am__leading_dot = @am__leading_dot@
712 am__quote = @am__quote@
713 am__tar = @am__tar@
714 am__untar = @am__untar@
715 bindir = @bindir@
716 build = @build@
717 build_alias = @build_alias@
718 build_cpu = @build_cpu@
719 build_os = @build_os@
720 build_vendor = @build_vendor@
721 builddir = @builddir@
722 datadir = @datadir@
723 datarootdir = @datarootdir@
724 docdir = @docdir@
725 dvidir = @dvidir@
726 exec_prefix = @exec_prefix@
727 gl_LIBOBJS = @gl_LIBOBJS@
728 gl_LTLIBOBJS = @gl_LTLIBOBJS@
729 gltests_LIBOBJS = @gltests_LIBOBJS@
730 gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
731 gltests_WITNESS = @gltests_WITNESS@
732 host = @host@
733 host_alias = @host_alias@
734 host_cpu = @host_cpu@
735 host_os = @host_os@
736 host_vendor = @host_vendor@
737 htmldir = @htmldir@
738 includedir = @includedir@
739 infodir = @infodir@
740 install_sh = @install_sh@
741 libdir = @libdir@
742 libexecdir = @libexecdir@
743 lispdir = @lispdir@
744 localedir = @localedir@
745 localstatedir = @localstatedir@
746 mandir = @mandir@
747 mkdir_p = @mkdir_p@
748 objdir = @objdir@
749 oldincludedir = @oldincludedir@
750 pdfdir = @pdfdir@
751 prefix = @prefix@
752 program_transform_name = @program_transform_name@
753 psdir = @psdir@
754 runstatedir = @runstatedir@
755 sbindir = @sbindir@
756 sharedstatedir = @sharedstatedir@
757 shlibext = @shlibext@
758 srcdir = @srcdir@
759 sysconfdir = @sysconfdir@
760 target_alias = @target_alias@
761 top_build_prefix = @top_build_prefix@
762 top_builddir = @top_builddir@
763 top_srcdir = @top_srcdir@
764 AM_CPPFLAGS = -I$(top_srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib $(ENCHANT_CFLAGS) $(WARN_CFLAGS)
765 lib_LTLIBRARIES = libenchant-@ENCHANT_MAJOR_VERSION@.la
766 libenchant_@ENCHANT_MAJOR_VERSION@_la_CPPFLAGS = $(AM_CPPFLAGS) -D_ENCHANT_BUILD=1 -DENCHANT_VERSION_STRING=\"@ENCHANT_MAJOR_VERSION@.@ENCHANT_MINOR_VERSION@.@ENCHANT_MICRO_VERSION@\" -DENCHANT_MAJOR_VERSION=\"@ENCHANT_MAJOR_VERSION@\"
767 libenchant_@ENCHANT_MAJOR_VERSION@_la_LIBADD = $(top_builddir)/lib/libgnu.la $(ENCHANT_LIBS) $(LTLIBOBJS)
768 libenchant_@ENCHANT_MAJOR_VERSION@_la_LDFLAGS = -no-undefined \
769 -export-symbols-regex '^enchant_.*' $(am__append_1) \
770 $(am__append_2)
771 libenchant_@ENCHANT_MAJOR_VERSION@_la_SOURCES = lib.c pwl.c enchant.h \
772 pwl.h $(am__append_3)
773 libenchant_includedir = $(pkgincludedir)-@ENCHANT_MAJOR_VERSION@
774 libenchant_include_HEADERS = enchant.h enchant-provider.h enchant++.h
775 pkgdata_DATA = enchant.ordering
776 dist_man_MANS = enchant-@ENCHANT_MAJOR_VERSION@.1 enchant-lsmod-@ENCHANT_MAJOR_VERSION@.1
777 edit = sed \
778 -e 's|@datadir[@]|$(datadir)|g'
779
780 DISTCLEANFILES = $(dist_man_MANS)
781 LDADD = libenchant-@ENCHANT_MAJOR_VERSION@.la $(ENCHANT_LIBS) $(top_builddir)/lib/libgnu.la
782 enchant_@ENCHANT_MAJOR_VERSION@_SOURCES = enchant.c
783 enchant_lsmod_@ENCHANT_MAJOR_VERSION@_SOURCES = enchant-lsmod.c
784 EXTRA_DIST = $(pkgdata_DATA) enchant.1.in enchant-lsmod.1.in
785 all: all-am
786
787 .SUFFIXES:
788 .SUFFIXES: .c .lo .o .obj .rc
789 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
790 @for dep in $?; do \
791 case '$(am__configure_deps)' in \
792 *$$dep*) \
793 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
794 && { if test -f $@; then exit 0; else break; fi; }; \
795 exit 1;; \
796 esac; \
797 done; \
798 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
799 $(am__cd) $(top_srcdir) && \
800 $(AUTOMAKE) --gnu src/Makefile
801 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
802 @case '$?' in \
803 *config.status*) \
804 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
805 *) \
806 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
807 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
808 esac;
809
810 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
811 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
812
813 $(top_srcdir)/configure: $(am__configure_deps)
814 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
815 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
816 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
817 $(am__aclocal_m4_deps):
818 libenchant.rc: $(top_builddir)/config.status $(srcdir)/libenchant.rc.in
819 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
820 enchant.1: $(top_builddir)/config.status $(srcdir)/enchant.1.in
821 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
822 enchant-lsmod.1: $(top_builddir)/config.status $(srcdir)/enchant-lsmod.1.in
823 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
824
825 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
826 @$(NORMAL_INSTALL)
827 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
828 list2=; for p in $$list; do \
829 if test -f $$p; then \
830 list2="$$list2 $$p"; \
831 else :; fi; \
832 done; \
833 test -z "$$list2" || { \
834 echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
835 $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
836 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
837 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
838 }
839
840 uninstall-libLTLIBRARIES:
841 @$(NORMAL_UNINSTALL)
842 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
843 for p in $$list; do \
844 $(am__strip_dir) \
845 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
846 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
847 done
848
849 clean-libLTLIBRARIES:
850 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
851 @list='$(lib_LTLIBRARIES)'; \
852 locs=`for p in $$list; do echo $$p; done | \
853 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
854 sort -u`; \
855 test -z "$$locs" || { \
856 echo rm -f $${locs}; \
857 rm -f $${locs}; \
858 }
859
860 libenchant-@ENCHANT_MAJOR_VERSION@.la: $(libenchant_@ENCHANT_MAJOR_VERSION@_la_OBJECTS) $(libenchant_@ENCHANT_MAJOR_VERSION@_la_DEPENDENCIES) $(EXTRA_libenchant_@ENCHANT_MAJOR_VERSION@_la_DEPENDENCIES)
861 $(AM_V_CCLD)$(libenchant_@ENCHANT_MAJOR_VERSION@_la_LINK) -rpath $(libdir) $(libenchant_@ENCHANT_MAJOR_VERSION@_la_OBJECTS) $(libenchant_@ENCHANT_MAJOR_VERSION@_la_LIBADD) $(LIBS)
862 install-binPROGRAMS: $(bin_PROGRAMS)
863 @$(NORMAL_INSTALL)
864 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
865 if test -n "$$list"; then \
866 echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
867 $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
868 fi; \
869 for p in $$list; do echo "$$p $$p"; done | \
870 sed 's/$(EXEEXT)$$//' | \
871 while read p p1; do if test -f $$p \
872 || test -f $$p1 \
873 ; then echo "$$p"; echo "$$p"; else :; fi; \
874 done | \
875 sed -e 'p;s,.*/,,;n;h' \
876 -e 's|.*|.|' \
877 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
878 sed 'N;N;N;s,\n, ,g' | \
879 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
880 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
881 if ($$2 == $$4) files[d] = files[d] " " $$1; \
882 else { print "f", $$3 "/" $$4, $$1; } } \
883 END { for (d in files) print "f", d, files[d] }' | \
884 while read type dir files; do \
885 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
886 test -z "$$files" || { \
887 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
888 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
889 } \
890 ; done
891
892 uninstall-binPROGRAMS:
893 @$(NORMAL_UNINSTALL)
894 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
895 files=`for p in $$list; do echo "$$p"; done | \
896 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
897 -e 's/$$/$(EXEEXT)/' \
898 `; \
899 test -n "$$list" || exit 0; \
900 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
901 cd "$(DESTDIR)$(bindir)" && rm -f $$files
902
903 clean-binPROGRAMS:
904 @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
905 echo " rm -f" $$list; \
906 rm -f $$list || exit $$?; \
907 test -n "$(EXEEXT)" || exit 0; \
908 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
909 echo " rm -f" $$list; \
910 rm -f $$list
911
912 enchant-@ENCHANT_MAJOR_VERSION@$(EXEEXT): $(enchant_@ENCHANT_MAJOR_VERSION@_OBJECTS) $(enchant_@ENCHANT_MAJOR_VERSION@_DEPENDENCIES) $(EXTRA_enchant_@ENCHANT_MAJOR_VERSION@_DEPENDENCIES)
913 @rm -f enchant-@ENCHANT_MAJOR_VERSION@$(EXEEXT)
914 $(AM_V_CCLD)$(LINK) $(enchant_@ENCHANT_MAJOR_VERSION@_OBJECTS) $(enchant_@ENCHANT_MAJOR_VERSION@_LDADD) $(LIBS)
915
916 enchant-lsmod-@ENCHANT_MAJOR_VERSION@$(EXEEXT): $(enchant_lsmod_@ENCHANT_MAJOR_VERSION@_OBJECTS) $(enchant_lsmod_@ENCHANT_MAJOR_VERSION@_DEPENDENCIES) $(EXTRA_enchant_lsmod_@ENCHANT_MAJOR_VERSION@_DEPENDENCIES)
917 @rm -f enchant-lsmod-@ENCHANT_MAJOR_VERSION@$(EXEEXT)
918 $(AM_V_CCLD)$(LINK) $(enchant_lsmod_@ENCHANT_MAJOR_VERSION@_OBJECTS) $(enchant_lsmod_@ENCHANT_MAJOR_VERSION@_LDADD) $(LIBS)
919
920 mostlyclean-compile:
921 -rm -f *.$(OBJEXT)
922
923 distclean-compile:
924 -rm -f *.tab.c
925
926 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enchant-lsmod.Po@am__quote@
927 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enchant.Po@am__quote@
928 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.Plo@am__quote@
929 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.Plo@am__quote@
930
931 .c.o:
932 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
933 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
934 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
935 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
936 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
937 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
938
939 .c.obj:
940 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
941 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
942 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
943 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
944 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
945 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
946
947 .c.lo:
948 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
949 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
950 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
951 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
952 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
953 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
954
955 libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.lo: lib.c
956 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_@ENCHANT_MAJOR_VERSION@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.lo -MD -MP -MF $(DEPDIR)/libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.Tpo -c -o libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.lo `test -f 'lib.c' || echo '$(srcdir)/'`lib.c
957 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.Tpo $(DEPDIR)/libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.Plo
958 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib.c' object='libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.lo' libtool=yes @AMDEPBACKSLASH@
959 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
960 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_@ENCHANT_MAJOR_VERSION@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libenchant_@ENCHANT_MAJOR_VERSION@_la-lib.lo `test -f 'lib.c' || echo '$(srcdir)/'`lib.c
961
962 libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.lo: pwl.c
963 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_@ENCHANT_MAJOR_VERSION@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.lo -MD -MP -MF $(DEPDIR)/libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.Tpo -c -o libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.lo `test -f 'pwl.c' || echo '$(srcdir)/'`pwl.c
964 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.Tpo $(DEPDIR)/libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.Plo
965 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwl.c' object='libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.lo' libtool=yes @AMDEPBACKSLASH@
966 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
967 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_@ENCHANT_MAJOR_VERSION@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libenchant_@ENCHANT_MAJOR_VERSION@_la-pwl.lo `test -f 'pwl.c' || echo '$(srcdir)/'`pwl.c
968
969 mostlyclean-libtool:
970 -rm -f *.lo
971
972 clean-libtool:
973 -rm -rf .libs _libs
974 install-man1: $(dist_man_MANS)
975 @$(NORMAL_INSTALL)
976 @list1=''; \
977 list2='$(dist_man_MANS)'; \
978 test -n "$(man1dir)" \
979 && test -n "`echo $$list1$$list2`" \
980 || exit 0; \
981 echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
982 $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
983 { for i in $$list1; do echo "$$i"; done; \
984 if test -n "$$list2"; then \
985 for i in $$list2; do echo "$$i"; done \
986 | sed -n '/\.1[a-z]*$$/p'; \
987 fi; \
988 } | while read p; do \
989 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
990 echo "$$d$$p"; echo "$$p"; \
991 done | \
992 sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
993 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
994 sed 'N;N;s,\n, ,g' | { \
995 list=; while read file base inst; do \
996 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
997 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
998 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
999 fi; \
1000 done; \
1001 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
1002 while read files; do \
1003 test -z "$$files" || { \
1004 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
1005 $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
1006 done; }
1007
1008 uninstall-man1:
1009 @$(NORMAL_UNINSTALL)
1010 @list=''; test -n "$(man1dir)" || exit 0; \
1011 files=`{ for i in $$list; do echo "$$i"; done; \
1012 l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
1013 sed -n '/\.1[a-z]*$$/p'; \
1014 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
1015 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
1016 dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
1017 install-pkgdataDATA: $(pkgdata_DATA)
1018 @$(NORMAL_INSTALL)
1019 @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
1020 if test -n "$$list"; then \
1021 echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
1022 $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
1023 fi; \
1024 for p in $$list; do \
1025 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
1026 echo "$$d$$p"; \
1027 done | $(am__base_list) | \
1028 while read files; do \
1029 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
1030 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
1031 done
1032
1033 uninstall-pkgdataDATA:
1034 @$(NORMAL_UNINSTALL)
1035 @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
1036 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
1037 dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
1038 install-libenchant_includeHEADERS: $(libenchant_include_HEADERS)
1039 @$(NORMAL_INSTALL)
1040 @list='$(libenchant_include_HEADERS)'; test -n "$(libenchant_includedir)" || list=; \
1041 if test -n "$$list"; then \
1042 echo " $(MKDIR_P) '$(DESTDIR)$(libenchant_includedir)'"; \
1043 $(MKDIR_P) "$(DESTDIR)$(libenchant_includedir)" || exit 1; \
1044 fi; \
1045 for p in $$list; do \
1046 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
1047 echo "$$d$$p"; \
1048 done | $(am__base_list) | \
1049 while read files; do \
1050 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libenchant_includedir)'"; \
1051 $(INSTALL_HEADER) $$files "$(DESTDIR)$(libenchant_includedir)" || exit $$?; \
1052 done
1053
1054 uninstall-libenchant_includeHEADERS:
1055 @$(NORMAL_UNINSTALL)
1056 @list='$(libenchant_include_HEADERS)'; test -n "$(libenchant_includedir)" || list=; \
1057 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
1058 dir='$(DESTDIR)$(libenchant_includedir)'; $(am__uninstall_files_from_dir)
1059
1060 ID: $(am__tagged_files)
1061 $(am__define_uniq_tagged_files); mkid -fID $$unique
1062 tags: tags-am
1063 TAGS: tags
1064
1065 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1066 set x; \
1067 here=`pwd`; \
1068 $(am__define_uniq_tagged_files); \
1069 shift; \
1070 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
1071 test -n "$$unique" || unique=$$empty_fix; \
1072 if test $$# -gt 0; then \
1073 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1074 "$$@" $$unique; \
1075 else \
1076 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1077 $$unique; \
1078 fi; \
1079 fi
1080 ctags: ctags-am
1081
1082 CTAGS: ctags
1083 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1084 $(am__define_uniq_tagged_files); \
1085 test -z "$(CTAGS_ARGS)$$unique" \
1086 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
1087 $$unique
1088
1089 GTAGS:
1090 here=`$(am__cd) $(top_builddir) && pwd` \
1091 && $(am__cd) $(top_srcdir) \
1092 && gtags -i $(GTAGS_ARGS) "$$here"
1093 cscopelist: cscopelist-am
1094
1095 cscopelist-am: $(am__tagged_files)
1096 list='$(am__tagged_files)'; \
1097 case "$(srcdir)" in \
1098 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
1099 *) sdir=$(subdir)/$(srcdir) ;; \
1100 esac; \
1101 for i in $$list; do \
1102 if test -f "$$i"; then \
1103 echo "$(subdir)/$$i"; \
1104 else \
1105 echo "$$sdir/$$i"; \
1106 fi; \
1107 done >> $(top_builddir)/cscope.files
1108
1109 distclean-tags:
1110 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
1111
1112 distdir: $(DISTFILES)
1113 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1114 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1115 list='$(DISTFILES)'; \
1116 dist_files=`for file in $$list; do echo $$file; done | \
1117 sed -e "s|^$$srcdirstrip/||;t" \
1118 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
1119 case $$dist_files in \
1120 */*) $(MKDIR_P) `echo "$$dist_files" | \
1121 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
1122 sort -u` ;; \
1123 esac; \
1124 for file in $$dist_files; do \
1125 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
1126 if test -d $$d/$$file; then \
1127 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
1128 if test -d "$(distdir)/$$file"; then \
1129 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1130 fi; \
1131 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
1132 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
1133 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1134 fi; \
1135 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
1136 else \
1137 test -f "$(distdir)/$$file" \
1138 || cp -p $$d/$$file "$(distdir)/$$file" \
1139 || exit 1; \
1140 fi; \
1141 done
1142 check-am: all-am
1143 check: check-am
1144 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS)
1145 install-binPROGRAMS: install-libLTLIBRARIES
1146
1147 installdirs:
1148 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(libenchant_includedir)"; do \
1149 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
1150 done
1151 install: install-am
1152 install-exec: install-exec-am
1153 install-data: install-data-am
1154 uninstall: uninstall-am
1155
1156 install-am: all-am
1157 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1158
1159 installcheck: installcheck-am
1160 install-strip:
1161 if test -z '$(STRIP)'; then \
1162 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1163 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1164 install; \
1165 else \
1166 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1167 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1168 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
1169 fi
1170 mostlyclean-generic:
1171 -test -z "$(LIBOBJS)" || rm -f $(LIBOBJS)
1172 -test -z "$(LTLIBOBJS)" || rm -f $(LTLIBOBJS)
1173
1174 clean-generic:
1175
1176 distclean-generic:
1177 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1178 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1179 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
1180
1181 maintainer-clean-generic:
1182 @echo "This command is intended for maintainers to use"
1183 @echo "it deletes files that may require special tools to rebuild."
1184 clean: clean-am
1185
1186 clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
1187 clean-libtool mostlyclean-am
1188
1189 distclean: distclean-am
1190 -rm -rf ./$(DEPDIR)
1191 -rm -f Makefile
1192 distclean-am: clean-am distclean-compile distclean-generic \
1193 distclean-tags
1194
1195 dvi: dvi-am
1196
1197 dvi-am:
1198
1199 html: html-am
1200
1201 html-am:
1202
1203 info: info-am
1204
1205 info-am:
1206
1207 install-data-am: install-libenchant_includeHEADERS install-man \
1208 install-pkgdataDATA
1209
1210 install-dvi: install-dvi-am
1211
1212 install-dvi-am:
1213
1214 install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
1215
1216 install-html: install-html-am
1217
1218 install-html-am:
1219
1220 install-info: install-info-am
1221
1222 install-info-am:
1223
1224 install-man: install-man1
1225
1226 install-pdf: install-pdf-am
1227
1228 install-pdf-am:
1229
1230 install-ps: install-ps-am
1231
1232 install-ps-am:
1233
1234 installcheck-am:
1235
1236 maintainer-clean: maintainer-clean-am
1237 -rm -rf ./$(DEPDIR)
1238 -rm -f Makefile
1239 maintainer-clean-am: distclean-am maintainer-clean-generic
1240
1241 mostlyclean: mostlyclean-am
1242
1243 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1244 mostlyclean-libtool
1245
1246 pdf: pdf-am
1247
1248 pdf-am:
1249
1250 ps: ps-am
1251
1252 ps-am:
1253
1254 uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \
1255 uninstall-libenchant_includeHEADERS uninstall-man \
1256 uninstall-pkgdataDATA
1257
1258 uninstall-man: uninstall-man1
1259
1260 .MAKE: install-am install-strip
1261
1262 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
1263 clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
1264 clean-libtool cscopelist-am ctags ctags-am distclean \
1265 distclean-compile distclean-generic distclean-libtool \
1266 distclean-tags distdir dvi dvi-am html html-am info info-am \
1267 install install-am install-binPROGRAMS install-data \
1268 install-data-am install-dvi install-dvi-am install-exec \
1269 install-exec-am install-html install-html-am install-info \
1270 install-info-am install-libLTLIBRARIES \
1271 install-libenchant_includeHEADERS install-man install-man1 \
1272 install-pdf install-pdf-am install-pkgdataDATA install-ps \
1273 install-ps-am install-strip installcheck installcheck-am \
1274 installdirs maintainer-clean maintainer-clean-generic \
1275 mostlyclean mostlyclean-compile mostlyclean-generic \
1276 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
1277 uninstall-am uninstall-binPROGRAMS uninstall-libLTLIBRARIES \
1278 uninstall-libenchant_includeHEADERS uninstall-man \
1279 uninstall-man1 uninstall-pkgdataDATA
1280
1281 .PRECIOUS: Makefile
1282
1283
1284 enchant-@ENCHANT_MAJOR_VERSION@.1: $(builddir)/enchant.1 Makefile.am $(top_builddir)/config.status
1285 rm -f $@ $@.tmp
1286 $(edit) $(abs_builddir)/enchant.1 >$@.tmp
1287 mv $@.tmp $@
1288
1289 enchant-lsmod-@ENCHANT_MAJOR_VERSION@.1: $(builddir)/enchant-lsmod.1 Makefile.am $(top_builddir)/config.status
1290 rm -f $@ $@.tmp
1291 $(edit) $(abs_builddir)/enchant-lsmod.1 >$@.tmp
1292 mv $@.tmp $@
1293
1294 .rc.lo:
1295 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
1296
1297 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1298 # Otherwise a system limit (for SysV at least) may be exceeded.
1299 .NOEXPORT:
0 .TH ENCHANT-2 1
1 .SH NAME
2 Enchant \- a spellchecker
3 .SH SYNOPSIS
4 .ll +8
5 .B enchant-2
6 \fB\-a\fR|\fB\-l\fR|\fB\-h\fR|\fB\-v\fR [\fB\-L\fR] [\fB\-d\fR \fIDICTIONARY\fR] [\fIFILE\fR]
7 .ll -8
8 .br
9 .SH DESCRIPTION
10 .B Enchant
11 is an ispell-compatible spellchecker.
12 .TP
13 \fB\-d \fIDICTIONARY\fR
14 use the given dictionary
15 .TP
16 .B "\-a"
17 list suggestions in ispell pipe mode format
18 .TP
19 .B "\-l"
20 list only the misspellings
21 .TP
22 .B "\-L"
23 display line numbers
24 .TP
25 .B "\-h"
26 display help and exit
27 .TP
28 .B "\-v"
29 display version information and exit
30 .SH ENCHANT ORDERING FILE
31 Enchant uses global and per-user ordering files named \fIenchant.ordering\fR
32 to decide which spelling provider to use for particular languages.
33 The per-user file takes precedence.
34 .PP
35 The ordering file takes the form language_tag:<comma-separated list of spelling
36 providers>. To see what providers are available, run \fIenchant-lsmod-2\fR. '*' is
37 used to mean "use this ordering for all languages, unless instructed otherwise." For example:
38 .PP
39 *:aspell,hunspell,nuspell
40 .br
41 en:aspell,hunspell,nuspell
42 .br
43 en_GB:hunspell,nuspell,aspell
44 .br
45 fr:hunspell,nuspell,aspell
46 .SH FILES AND DIRECTORIES
47 Enchant looks in the following places for files, in decreasing order of precedence:
48 .TP
49 \fIENCHANT_CONFIG_DIR\fR
50 (If the environment variable is set.)
51 .TP
52 \fIXDG_CONFIG_HOME/enchant\fR (non-Windows systems)
53 Default: \fI~/.config/enchant\fR
54 .TP
55 \fICSIDL_LOCAL_APPDATA\\enchant\fR (Windows systems)
56 Default: \fIC:\\Documents and Settings\\\fRusername\fI\\Local Settings\\Application Data\\enchant
57 .TP
58 \fI${prefix}/share/enchant\fR
59 (Or the equivalent location relative to the enchant library for a relocatable build.)
60 .PP
61 Dictionaries are looked for in a subdirectory with the same name as the
62 provider; for example, \fI${prefix}/share/enchant/hunspell\fR and
63 \fI~/.config/enchant/hunspell\fR.
64 .PP
65 Some providers may also look in a standard system directory for their
66 dictionaries; the hunspell provider can be configured to do so at build
67 time.
68 .SH "SEE ALSO"
69 .BR aspell (1),
70 .BR enchant-lsmod-2 (1)
71 .SH "AUTHOR"
72 Written by Dom Lachowicz and Reuben Thomas.
0 .TH ENCHANT-LSMOD-2 1 "August 2017"
1 .SH NAME
2 Enchant \- list provider and dictionary information
3 .SH SYNOPSIS
4 .ll +8
5 .B enchant-lsmod-2
6 [[\fB\-lang\fR|\fB-word-chars\fR] [\fBlanguage_tag\fR]|\fB\-list-dicts\fR|\fB\-help\fR|\fB\-version\fR]
7 .ll -8
8 .br
9 .SH DESCRIPTION
10 .B enchant-lsmod-2
11 gives information about Enchant's spell-checker providers and the dictionaries each offers.
12 See \fBenchant-2\fR(1) for details about how the providers and dictionaries are located.
13 If no command-line options are given, the available providers are listed.
14 .SS OPTIONS
15 .TP
16 .B "\-lang"
17 Show which provider and dictionary will be used for the given language, or all languages if none is supplied.
18 .TP
19 .B "\-word\-chars"
20 Show the extra word characters for the given language, if available. This is of little interest to most users.
21 .TP
22 .B "\-list\-dicts"
23 List the provider and dictionary for all available languages.
24 .TP
25 .B "\-help"
26 Show brief help.
27 .TP
28 .B "\-version"
29 Prints the program's version.
30 .SH "SEE ALSO"
31 .BR enchant-2(1)
32 .SH "AUTHOR"
33 Written by Dom Lachowicz and Reuben Thomas.
33 .SH SYNOPSIS
44 .ll +8
55 .B enchant-@ENCHANT_MAJOR_VERSION@
6 [\fB\-a\fR] [\fB\-d dict\fR] [\fB\-h\fR] [\fB\-l\fR] [\fB\-L\fR] [\fB\-v\fR]
6 \fB\-a\fR|\fB\-l\fR|\fB\-h\fR|\fB\-v\fR [\fB\-L\fR] [\fB\-d\fR \fIDICTIONARY\fR] [\fIFILE\fR]
77 .ll -8
88 .br
99 .SH DESCRIPTION
1010 .B Enchant
1111 is an ispell-compatible spellchecker.
12 .SS OPTIONS
12 .TP
13 \fB\-d \fIDICTIONARY\fR
14 use the given dictionary
1315 .TP
1416 .B "\-a"
15 List suggestions in ispell pipe mode format.
17 list suggestions in ispell pipe mode format
1618 .TP
17 .B "\-d DICTIONARY"
18 Use the given dictionary.
19 .B "\-l"
20 list only the misspellings
21 .TP
22 .B "\-L"
23 display line numbers
1924 .TP
2025 .B "\-h"
21 Show short help.
22 .TP
23 .B "\-l"
24 List only the misspellings.
25 .TP
26 .B "\-L"
27 Include the line number in the output.
26 display help and exit
2827 .TP
2928 .B "\-v"
30 Prints the program's version.
29 display version information and exit
3130 .SH ENCHANT ORDERING FILE
3231 Enchant uses global and per-user ordering files named \fIenchant.ordering\fR
3332 to decide which spelling provider to use for particular languages.
3736 providers>. To see what providers are available, run \fIenchant-lsmod-@ENCHANT_MAJOR_VERSION@\fR. '*' is
3837 used to mean "use this ordering for all languages, unless instructed otherwise." For example:
3938 .PP
40 *:aspell,hunspell
39 *:aspell,hunspell,nuspell
4140 .br
42 en:aspell,hunspell
41 en:aspell,hunspell,nuspell
4342 .br
44 en_GB:hunspell,aspell
43 en_GB:hunspell,nuspell,aspell
4544 .br
46 fr:hunspell,aspell
45 fr:hunspell,nuspell,aspell
4746 .SH FILES AND DIRECTORIES
4847 Enchant looks in the following places for files, in decreasing order of precedence:
4948 .TP
3838 #include <stdlib.h>
3939 #include <string.h>
4040 #include <locale.h>
41 #include <getopt.h>
4142 #include <glib.h>
4243 #include <glib/gstdio.h>
4344 #ifdef _WIN32
5657 typedef enum
5758 {
5859 MODE_NONE,
59 MODE_VERSION,
6060 MODE_A,
6161 MODE_L
6262 } IspellMode_t;
6969 }
7070
7171 static void
72 print_help (FILE * to, const char * prog)
73 {
74 fprintf (to,
75 "Usage: %s [OPTION...] FILE\n\
76 -a lists suggestions in ispell pipe mode format\n\
77 -d DICTIONARY uses the given dictionary\n\
78 -h Show this help message\n\
79 -l lists misspellings\n\
80 -L displays line numbers\n\
81 -v displays program version.\n", prog);
72 print_help (const char * prog)
73 {
74 fprintf (stderr,
75 "Usage: %s -a|-l|-h|-v [-L] [-d DICTIONARY] [FILE]\n\
76 -d DICTIONARY use the given dictionary\n\
77 -a list suggestions in ispell pipe mode format\n\
78 -l list only the misspellings\n\
79 -L display line numbers\n\
80 -h display help and exit\n\
81 -v display version information and exit\n", prog);
8282 }
8383
8484 static gboolean
116116 }
117117
118118 static void
119 print_utf (FILE * out, const char * str)
119 print_utf (const char * str)
120120 {
121121 gsize bytes_read, bytes_written;
122122 gchar * native;
123123
124124 native = g_locale_from_utf8 (str, -1, &bytes_read, &bytes_written, NULL);
125125 if (native) {
126 fwrite (native, 1, bytes_written, out);
126 fwrite (native, 1, bytes_written, stdout);
127127 g_free (native);
128128 } else {
129 /* We'll assume that it's already utf8 and glib is just being stupid. */
130 fwrite (str, 1, strlen (str), out);
129 /* Assume that it's already utf8 and glib is just being stupid. */
130 printf ("%s", str);
131131 }
132132 }
133133
134134 static void
135 do_mode_a (FILE * out, EnchantDict * dict, GString * word, size_t start_pos, size_t lineCount, gboolean terse_mode)
135 do_mode_a (EnchantDict * dict, GString * word, size_t start_pos, size_t lineCount, gboolean terse_mode)
136136 {
137137 size_t n_suggs;
138138 char ** suggs;
140140 if (word->len <= MIN_WORD_LENGTH || enchant_dict_check (dict, word->str, word->len) == 0) {
141141 if (!terse_mode) {
142142 if (lineCount)
143 fprintf (out, "* %u\n", (unsigned int)lineCount);
143 printf ("* %u\n", (unsigned int)lineCount);
144144 else
145 fwrite ("*\n", 1, 2, out);
145 printf ("*\n");
146146 }
147147 }
148148 else {
149149 suggs = enchant_dict_suggest (dict, word->str,
150150 word->len, &n_suggs);
151151 if (!n_suggs || !suggs) {
152 fwrite ("# ", 1, 2, out);
152 printf ("# ");
153153 if (lineCount)
154 fprintf (out, "%u ", (unsigned int)lineCount);
155 print_utf (out, word->str);
156 fprintf (out, " %u\n", (unsigned int)start_pos);
154 printf ("%u ", (unsigned int)lineCount);
155 print_utf (word->str);
156 printf (" %u\n", (unsigned int)start_pos);
157157 }
158158 else {
159159 size_t i = 0;
160160
161 fwrite ("& ", 1, 2, out);
161 printf ("& ");
162162 if (lineCount)
163 fprintf (out, "%u ", (unsigned int)lineCount);
164 print_utf (out, word->str);
165 fprintf (out, " %u %u:", (unsigned int)n_suggs, (unsigned int)start_pos);
163 printf ("%u ", (unsigned int)lineCount);
164 print_utf (word->str);
165 printf (" %u %u:", (unsigned int)n_suggs, (unsigned int)start_pos);
166166
167167 for (i = 0; i < n_suggs; i++) {
168 fprintf (out, " ");
169 print_utf (out, suggs[i]);
168 putchar (' ');
169 print_utf (suggs[i]);
170170
171171 if (i != (n_suggs - 1))
172 fwrite (",", 1, 1, out);
172 putchar(',');
173173 else
174 fwrite ("\n", 1, 1, out);
174 putchar('\n');
175175 }
176176
177177 enchant_dict_free_string_list (dict, suggs);
180180 }
181181
182182 static void
183 do_mode_l (FILE * out, EnchantDict * dict, GString * word, size_t lineCount)
183 do_mode_l (EnchantDict * dict, GString * word, size_t lineCount)
184184 {
185185 if (enchant_dict_check (dict, word->str, word->len) != 0) {
186186 if (lineCount)
187 fprintf (out, "%u ", (unsigned int)lineCount);
188 print_utf (out, word->str);
189 fwrite ("\n", 1, 1, out);
187 printf ("%u ", (unsigned int)lineCount);
188 print_utf (word->str);
189 putchar ('\n');
190190 }
191191 }
192192
244244 }
245245
246246 static int
247 parse_file (FILE * in, FILE * out, IspellMode_t mode, int countLines, gchar *dictionary)
247 parse_file (FILE * in, IspellMode_t mode, gboolean countLines, gchar *dictionary)
248248 {
249249 EnchantBroker * broker;
250250 EnchantDict * dict;
257257 gboolean was_last_line = FALSE, corrected_something = FALSE, terse_mode = FALSE;
258258
259259 if (mode == MODE_A)
260 print_version (out);
260 print_version (stdout);
261261
262262 if (dictionary)
263263 lang = strdup (dictionary);
351351 ssize_t cor_len = strlen(str->str) - (cor - str->str);
352352 enchant_dict_store_replacement(dict, mis, mis_len, cor, cor_len);
353353 } else if (g_str_has_prefix(str->str, "$$wc")) { /* Return the extra word chars list */
354 fprintf(out, "%s\n", enchant_dict_get_extra_word_characters(dict));
354 printf("%s\n", enchant_dict_get_extra_word_characters(dict));
355355 }
356356 }
357357 break;
364364 break;
365365
366366 empty_word:
367 fprintf (out, "Error: The word \"\" is invalid. Empty string.\n");
367 printf ("Error: The word \"\" is invalid. Empty string.\n");
368368 }
369369 }
370370
371371 if (mode != MODE_A || mode_A_no_command) {
372372 token_ptr = tokens = tokenize_line (dict, str);
373373 if (tokens == NULL)
374 putc('\n', out);
374 putchar('\n');
375375 while (tokens != NULL) {
376376 corrected_something = TRUE;
377377
381381 tokens = tokens->next;
382382
383383 if (mode == MODE_A)
384 do_mode_a (out, dict, word, pos, lineCount, terse_mode);
384 do_mode_a (dict, word, pos, lineCount, terse_mode);
385385 else if (mode == MODE_L)
386 do_mode_l (out, dict, word, lineCount);
386 do_mode_l (dict, word, lineCount);
387387
388388 g_string_free(word, TRUE);
389389 }
393393 }
394394
395395 if (mode == MODE_A && corrected_something) {
396 fwrite ("\n", 1, 1, out);
396 putchar('\n');
397397 }
398398 g_string_truncate (str, 0);
399 fflush (out);
399 fflush (stdout);
400400 }
401401
402402 enchant_broker_free_dict (broker, dict);
410410 int main (int argc, char ** argv)
411411 {
412412 IspellMode_t mode = MODE_NONE;
413
414413 char * file = NULL;
415 int i, rval = 0;
416
414 int rval = 0;
417415 FILE * fp = stdin;
418
419 int countLines = 0;
416 gboolean countLines = FALSE;
420417 gchar *dictionary = NULL; /* -d dictionary */
421418
422419 /* Initialize system locale */
430427 }
431428 #endif
432429
433 for (i = 1; i < argc; i++) {
434 char * arg = argv[i];
435 if (arg[0] == '-') {
436 if (strlen (arg) == 2) {
437 /* It seems that the first one of these that is specified gets precedence. */
438 if (arg[1] == 'a' && MODE_NONE == mode)
439 mode = MODE_A;
440 else if (arg[1] == 'l' && MODE_NONE == mode)
441 mode = MODE_L;
442 else if (arg[1] == 'v' && MODE_NONE == mode)
443 mode = MODE_VERSION;
444 else if (arg[1] == 'L' && MODE_NONE == mode)
445 countLines = 1;
446 else if (arg[1] == 'm')
447 ; /* Ignore. Emacs calls ispell with '-m'. */
448 else if (arg[1] == 'd') {
449 i++;
450 dictionary = argv[i]; /* Emacs calls ispell with '-d dictionary'. */
451 }
452 }
453 else if ((strlen (arg) == 3) && (arg[1] == 'v') && (arg[2] == 'v')) {
454 mode = MODE_VERSION; /* Emacs calls ispell with '-vv'. */
455 }
456 else if (arg[1] == 'd') {
457 dictionary = arg + 2; /* Accept "-ddictionary", i.e. no space between -d and dictionary. */
458 }
459 else if (strlen (arg) > 2) {
460 fprintf (stderr, "-%c does not take any parameters.\n", arg[1]);
461 exit(1);
462 }
463 else
464 file = arg;
465 }
466 else
467 file = arg;
468 }
469
470 if (mode == MODE_VERSION) {
471 print_version (stdout);
472 }
473 else if (mode == MODE_NONE && !file) {
474 print_help (stdout, argv[0]);
475 }
476 else {
477 if (file) {
478 fp = g_fopen (file, "rb");
479 if (!fp) {
480 fprintf (stderr, "Error: Could not open the file \"%s\" for reading.\n", file);
481 exit (1);
482 }
483 }
484
485 rval = parse_file (fp, stdout, mode, countLines, dictionary);
486
487 if (file)
488 fclose (fp);
489 }
430 int optchar;
431 while ((optchar = getopt (argc, argv, ":d:alvLm")) != -1) {
432 switch (optchar) {
433 case 'd':
434 dictionary = optarg; /* Emacs calls ispell with '-d dictionary'. */
435 break;
436 /* The first mode specified takes precedence. */
437 case 'a':
438 if (mode == MODE_NONE)
439 mode = MODE_A;
440 break;
441 case 'l':
442 if (mode == MODE_NONE)
443 mode = MODE_L;
444 break;
445 case 'L':
446 countLines = TRUE;
447 break;
448 case 'v':
449 print_version (stderr);
450 exit (0);
451 case 'm':
452 /* Ignore: Emacs calls ispell with '-m'. */
453 break;
454 case 'h':
455 print_help (argv[0]);
456 exit (0);
457 case ':':
458 fprintf (stderr, "missing argument to option\n");
459 /* FALLTHROUGH */
460 case '?':
461 print_help (argv[0]);
462 exit (1);
463 }
464 }
465
466 /* Get file argument if given. */
467 if (optind < argc) {
468 file = argv[optind++];
469 }
470
471 /* Exit with usage if either no mode is set, or if there are excess
472 non-option arguments. */
473 if (mode == MODE_NONE || optind < argc) {
474 print_help (argv[0]);
475 exit (1);
476 }
477
478 /* Process the file or standard input. */
479 if (file) {
480 fp = g_fopen (file, "rb");
481 if (!fp) {
482 fprintf (stderr, "Error: Could not open the file \"%s\" for reading.\n", file);
483 exit (1);
484 }
485 }
486 rval = parse_file (fp, mode, countLines, dictionary);
487 if (file)
488 fclose (fp);
490489
491490 return rval;
492491 }
101101 * enchant_broker_set_ordering
102102 * @broker: A non-null #EnchantBroker
103103 * @tag: A non-null language tag (en_US)
104 * @ordering: A non-null ordering (aspell,hunspell,hspell)
104 * @ordering: A non-null ordering (nuspell,aspell,hunspell,hspell)
105105 *
106106 * Declares a preference of dictionaries to use for the language
107107 * described/referred to by @tag. The ordering is a comma delimited
0 *:hunspell,aspell
1 fi:voikko,hunspell,aspell
2 fi_FI:voikko,hunspell,aspell
3 he:hspell,hunspell
4 he_IL:hspell,hunspell
5 tr:zemberek
6 tr_TR:zemberek
0 *:hunspell,nuspell,aspell
1 fi:voikko,hunspell,nuspell,aspell
2 fi_FI:voikko,hunspell,nuspell,aspell
3 he:hspell,hunspell,nuspell
4 he_IL:hspell,hunspell,nuspell
5 tr:zemberek,nuspell
6 tr_TR:zemberek,nuspell
0 #include <winver.h>
1
2 VS_VERSION_INFO VERSIONINFO
3 FILEVERSION 2,2,8
4 PRODUCTVERSION 2,2,8,0
5 FILEFLAGSMASK 0
6 FILEFLAGS 0
7 FILEOS VOS__WINDOWS32
8 FILETYPE VFT_DLL
9 FILESUBTYPE VFT2_UNKNOWN
10 BEGIN
11 BLOCK "StringFileInfo"
12 BEGIN
13 BLOCK "040904B0"
14 BEGIN
15 VALUE "CompanyName", "none"
16 VALUE "FileDescription", "libenchant"
17 VALUE "FileVersion", "2.2.8"
18 VALUE "InternalName", "libenchant-2.2"
19 VALUE "LegalCopyright", "Copyright (C) 2002-2007 Dom Lachowicz"
20 VALUE "OriginalFilename", "libenchant-2.2.dll"
21 VALUE "ProductName", "libenchant"
22 VALUE "ProductVersion", "2.2.8"
23 END
24 END
25 BLOCK "VarFileInfo"
26 BEGIN
27 VALUE "Translation", 0x409, 1200
28 END
29 END
963963 EnchantTrieMatcher* matcher = g_new(EnchantTrieMatcher,1);
964964 matcher->num_errors = 0;
965965 matcher->max_errors = maxerrs;
966 matcher->word = g_new0(char,len+maxerrs+1); // Ensure matcher does not overrun buffer
966 matcher->word = g_new0(char,len+maxerrs+2); // Ensure matcher does not overrun buffer: +2 for transpose check
967967 strcpy(matcher->word, pattern);
968968 g_free(pattern);
969969 matcher->word_pos = 0;
+0
-13
tests/.gitignore less more
0 /test.pwl
1 /main.test
2 /main.test.exe
3 libenchant_*.so
4 libenchant_*.dylib
5 *enchant*.dll
6 enchant*.so
7 /_Noreturn.h
8 /arg-nonnull.h
9 /c++defs.h
10 /dummy.c
11 /unused-parameter.h
12 /warn-on-use.h
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
4
5 # This Makefile.in 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
14 @SET_MAKE@
15 VPATH = @srcdir@
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
27 am__make_running_with_option = \
28 case $${target_option-} in \
29 ?) ;; \
30 *) echo "am__make_running_with_option: internal error: invalid" \
31 "target option '$${target_option-}' specified" >&2; \
32 exit 1;; \
33 esac; \
34 has_opt=no; \
35 sane_makeflags=$$MAKEFLAGS; \
36 if $(am__is_gnu_make); then \
37 sane_makeflags=$$MFLAGS; \
38 else \
39 case $$MAKEFLAGS in \
40 *\\[\ \ ]*) \
41 bs=\\; \
42 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
43 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
44 esac; \
45 fi; \
46 skip_next=no; \
47 strip_trailopt () \
48 { \
49 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
50 }; \
51 for flg in $$sane_makeflags; do \
52 test $$skip_next = yes && { skip_next=no; continue; }; \
53 case $$flg in \
54 *=*|--*) continue;; \
55 -*I) strip_trailopt 'I'; skip_next=yes;; \
56 -*I?*) strip_trailopt 'I';; \
57 -*O) strip_trailopt 'O'; skip_next=yes;; \
58 -*O?*) strip_trailopt 'O';; \
59 -*l) strip_trailopt 'l'; skip_next=yes;; \
60 -*l?*) strip_trailopt 'l';; \
61 -[dEDm]) skip_next=yes;; \
62 -[JT]) skip_next=yes;; \
63 esac; \
64 case $$flg in \
65 *$$target_option*) has_opt=yes; break;; \
66 esac; \
67 done; \
68 test $$has_opt = yes
69 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
70 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
71 pkgdatadir = $(datadir)/@PACKAGE@
72 pkgincludedir = $(includedir)/@PACKAGE@
73 pkglibdir = $(libdir)/@PACKAGE@
74 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
75 install_sh_DATA = $(install_sh) -c -m 644
76 install_sh_PROGRAM = $(install_sh) -c
77 install_sh_SCRIPT = $(install_sh) -c
78 INSTALL_HEADER = $(INSTALL_DATA)
79 transform = $(program_transform_name)
80 NORMAL_INSTALL = :
81 PRE_INSTALL = :
82 POST_INSTALL = :
83 NORMAL_UNINSTALL = :
84 PRE_UNINSTALL = :
85 POST_UNINSTALL = :
86 build_triplet = @build@
87 host_triplet = @host@
88 check_PROGRAMS = main.test$(EXEEXT)
89 subdir = tests
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
92 $(top_srcdir)/m4/absolute-header.m4 \
93 $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
94 $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \
95 $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \
96 $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \
97 $(top_srcdir)/m4/gnulib-common.m4 \
98 $(top_srcdir)/m4/gnulib-comp.m4 \
99 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \
100 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
101 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
102 $(top_srcdir)/m4/malloc.m4 \
103 $(top_srcdir)/m4/manywarnings-c++.m4 \
104 $(top_srcdir)/m4/manywarnings.m4 \
105 $(top_srcdir)/m4/msvc-inval.m4 \
106 $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \
107 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/rawmemchr.m4 \
108 $(top_srcdir)/m4/relocatable-lib.m4 \
109 $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \
110 $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
111 $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \
112 $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \
113 $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \
114 $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
115 $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
116 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
117 $(ACLOCAL_M4)
118 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
119 mkinstalldirs = $(install_sh) -d
120 CONFIG_HEADER = $(top_builddir)/config.h
121 CONFIG_CLEAN_FILES =
122 CONFIG_CLEAN_VPATH_FILES =
123 libenchant_mock_provider_la_LIBADD =
124 am_libenchant_mock_provider_la_OBJECTS = \
125 libenchant_mock_provider_la-mock_provider.lo
126 libenchant_mock_provider_la_OBJECTS = \
127 $(am_libenchant_mock_provider_la_OBJECTS)
128 AM_V_lt = $(am__v_lt_@AM_V@)
129 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
130 am__v_lt_0 = --silent
131 am__v_lt_1 =
132 libenchant_mock_provider_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
133 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
134 $(AM_CXXFLAGS) $(CXXFLAGS) \
135 $(libenchant_mock_provider_la_LDFLAGS) $(LDFLAGS) -o $@
136 libenchant_mock_provider2_la_LIBADD =
137 am__objects_1 = libenchant_mock_provider2_la-mock_provider.lo
138 am_libenchant_mock_provider2_la_OBJECTS = $(am__objects_1)
139 libenchant_mock_provider2_la_OBJECTS = \
140 $(am_libenchant_mock_provider2_la_OBJECTS)
141 libenchant_mock_provider2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
142 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
143 $(AM_CXXFLAGS) $(CXXFLAGS) \
144 $(libenchant_mock_provider2_la_LDFLAGS) $(LDFLAGS) -o $@
145 libenchant_null_describe_la_LIBADD =
146 am__objects_2 = libenchant_null_describe_la-mock_provider.lo
147 am_libenchant_null_describe_la_OBJECTS = $(am__objects_2)
148 libenchant_null_describe_la_OBJECTS = \
149 $(am_libenchant_null_describe_la_OBJECTS)
150 libenchant_null_describe_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
151 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
152 $(AM_CXXFLAGS) $(CXXFLAGS) \
153 $(libenchant_null_describe_la_LDFLAGS) $(LDFLAGS) -o $@
154 libenchant_null_identify_la_LIBADD =
155 am__objects_3 = libenchant_null_identify_la-mock_provider.lo
156 am_libenchant_null_identify_la_OBJECTS = $(am__objects_3)
157 libenchant_null_identify_la_OBJECTS = \
158 $(am_libenchant_null_identify_la_OBJECTS)
159 libenchant_null_identify_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
160 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
161 $(AM_CXXFLAGS) $(CXXFLAGS) \
162 $(libenchant_null_identify_la_LDFLAGS) $(LDFLAGS) -o $@
163 libenchant_null_provider_la_LIBADD =
164 am__objects_4 = libenchant_null_provider_la-mock_provider.lo
165 am_libenchant_null_provider_la_OBJECTS = $(am__objects_4)
166 libenchant_null_provider_la_OBJECTS = \
167 $(am_libenchant_null_provider_la_OBJECTS)
168 libenchant_null_provider_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
169 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
170 $(AM_CXXFLAGS) $(CXXFLAGS) \
171 $(libenchant_null_provider_la_LDFLAGS) $(LDFLAGS) -o $@
172 am__dirstamp = $(am__leading_dot)dirstamp
173 am_main_test_OBJECTS = main_test-main.test.$(OBJEXT) \
174 dictionary/main_test-enchant_dict_add_tests.$(OBJEXT) \
175 dictionary/main_test-enchant_dict_add_to_session_tests.$(OBJEXT) \
176 dictionary/main_test-enchant_dict_check_tests.$(OBJEXT) \
177 dictionary/main_test-enchant_dict_describe_tests.$(OBJEXT) \
178 dictionary/main_test-enchant_dict_free_string_list_tests.$(OBJEXT) \
179 dictionary/main_test-enchant_dict_get_error_tests.$(OBJEXT) \
180 dictionary/main_test-enchant_dict_get_extra_word_characters_tests.$(OBJEXT) \
181 dictionary/main_test-enchant_dict_is_added_tests.$(OBJEXT) \
182 dictionary/main_test-enchant_dict_is_removed_tests.$(OBJEXT) \
183 dictionary/main_test-enchant_dict_is_word_character_tests.$(OBJEXT) \
184 dictionary/main_test-enchant_dict_remove_from_session_tests.$(OBJEXT) \
185 dictionary/main_test-enchant_dict_remove_tests.$(OBJEXT) \
186 dictionary/main_test-enchant_dict_store_replacement_tests.$(OBJEXT) \
187 dictionary/main_test-enchant_dict_suggest_tests.$(OBJEXT) \
188 broker/main_test-enchant_broker_describe_tests.$(OBJEXT) \
189 broker/main_test-enchant_broker_dict_exists_tests.$(OBJEXT) \
190 broker/main_test-enchant_broker_free_dict_tests.$(OBJEXT) \
191 broker/main_test-enchant_broker_free_tests.$(OBJEXT) \
192 broker/main_test-enchant_broker_get_error_tests.$(OBJEXT) \
193 broker/main_test-enchant_broker_init_tests.$(OBJEXT) \
194 broker/main_test-enchant_broker_list_dicts_tests.$(OBJEXT) \
195 broker/main_test-enchant_broker_request_dict_tests.$(OBJEXT) \
196 broker/main_test-enchant_broker_request_pwl_dict_tests.$(OBJEXT) \
197 broker/main_test-enchant_broker_set_ordering_tests.$(OBJEXT) \
198 pwl/main_test-enchant_pwl_tests.$(OBJEXT) \
199 provider/main_test-enchant_provider_broker_set_error_tests.$(OBJEXT) \
200 provider/main_test-enchant_provider_dict_set_error_tests.$(OBJEXT) \
201 provider/main_test-enchant_provider_get_prefix_dir_tests.$(OBJEXT) \
202 provider/main_test-enchant_provider_get_user_config_dirs_tests.$(OBJEXT) \
203 provider/main_test-enchant_provider_get_user_language_tests.$(OBJEXT)
204 main_test_OBJECTS = $(am_main_test_OBJECTS)
205 am__DEPENDENCIES_1 =
206 AM_V_P = $(am__v_P_@AM_V@)
207 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
208 am__v_P_0 = false
209 am__v_P_1 = :
210 AM_V_GEN = $(am__v_GEN_@AM_V@)
211 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
212 am__v_GEN_0 = @echo " GEN " $@;
213 am__v_GEN_1 =
214 AM_V_at = $(am__v_at_@AM_V@)
215 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
216 am__v_at_0 = @
217 am__v_at_1 =
218 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
219 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
220 am__depfiles_maybe = depfiles
221 am__mv = mv -f
222 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
223 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
224 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
225 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
226 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
227 $(AM_CXXFLAGS) $(CXXFLAGS)
228 AM_V_CXX = $(am__v_CXX_@AM_V@)
229 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
230 am__v_CXX_0 = @echo " CXX " $@;
231 am__v_CXX_1 =
232 CXXLD = $(CXX)
233 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
234 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
235 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
236 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
237 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
238 am__v_CXXLD_0 = @echo " CXXLD " $@;
239 am__v_CXXLD_1 =
240 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
241 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
242 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
243 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
244 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
245 $(AM_CFLAGS) $(CFLAGS)
246 AM_V_CC = $(am__v_CC_@AM_V@)
247 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
248 am__v_CC_0 = @echo " CC " $@;
249 am__v_CC_1 =
250 CCLD = $(CC)
251 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
252 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
253 $(AM_LDFLAGS) $(LDFLAGS) -o $@
254 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
255 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
256 am__v_CCLD_0 = @echo " CCLD " $@;
257 am__v_CCLD_1 =
258 SOURCES = $(libenchant_mock_provider_la_SOURCES) \
259 $(libenchant_mock_provider2_la_SOURCES) \
260 $(libenchant_null_describe_la_SOURCES) \
261 $(libenchant_null_identify_la_SOURCES) \
262 $(libenchant_null_provider_la_SOURCES) $(main_test_SOURCES)
263 DIST_SOURCES = $(libenchant_mock_provider_la_SOURCES) \
264 $(libenchant_mock_provider2_la_SOURCES) \
265 $(libenchant_null_describe_la_SOURCES) \
266 $(libenchant_null_identify_la_SOURCES) \
267 $(libenchant_null_provider_la_SOURCES) $(main_test_SOURCES)
268 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
269 ctags-recursive dvi-recursive html-recursive info-recursive \
270 install-data-recursive install-dvi-recursive \
271 install-exec-recursive install-html-recursive \
272 install-info-recursive install-pdf-recursive \
273 install-ps-recursive install-recursive installcheck-recursive \
274 installdirs-recursive pdf-recursive ps-recursive \
275 tags-recursive uninstall-recursive
276 am__can_run_installinfo = \
277 case $$AM_UPDATE_INFO_DIR in \
278 n|no|NO) false;; \
279 *) (install-info --version) >/dev/null 2>&1;; \
280 esac
281 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
282 distclean-recursive maintainer-clean-recursive
283 am__recursive_targets = \
284 $(RECURSIVE_TARGETS) \
285 $(RECURSIVE_CLEAN_TARGETS) \
286 $(am__extra_recursive_targets)
287 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
288 check recheck distdir
289 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
290 # Read a list of newline-separated strings from the standard input,
291 # and print each of them once, without duplicates. Input order is
292 # *not* preserved.
293 am__uniquify_input = $(AWK) '\
294 BEGIN { nonempty = 0; } \
295 { items[$$0] = 1; nonempty = 1; } \
296 END { if (nonempty) { for (i in items) print i; }; } \
297 '
298 # Make sure the list of sources is unique. This is necessary because,
299 # e.g., the same source file might be shared among _SOURCES variables
300 # for different programs/libraries.
301 am__define_uniq_tagged_files = \
302 list='$(am__tagged_files)'; \
303 unique=`for i in $$list; do \
304 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
305 done | $(am__uniquify_input)`
306 ETAGS = etags
307 CTAGS = ctags
308 am__tty_colors_dummy = \
309 mgn= red= grn= lgn= blu= brg= std=; \
310 am__color_tests=no
311 am__tty_colors = { \
312 $(am__tty_colors_dummy); \
313 if test "X$(AM_COLOR_TESTS)" = Xno; then \
314 am__color_tests=no; \
315 elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
316 am__color_tests=yes; \
317 elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
318 am__color_tests=yes; \
319 fi; \
320 if test $$am__color_tests = yes; then \
321 red=''; \
322 grn=''; \
323 lgn=''; \
324 blu=''; \
325 mgn=''; \
326 brg=''; \
327 std=''; \
328 fi; \
329 }
330 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
331 am__vpath_adj = case $$p in \
332 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
333 *) f=$$p;; \
334 esac;
335 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
336 am__install_max = 40
337 am__nobase_strip_setup = \
338 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
339 am__nobase_strip = \
340 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
341 am__nobase_list = $(am__nobase_strip_setup); \
342 for p in $$list; do echo "$$p $$p"; done | \
343 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
344 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
345 if (++n[$$2] == $(am__install_max)) \
346 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
347 END { for (dir in files) print dir, files[dir] }'
348 am__base_list = \
349 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
350 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
351 am__uninstall_files_from_dir = { \
352 test -z "$$files" \
353 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
354 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
355 $(am__cd) "$$dir" && rm -f $$files; }; \
356 }
357 am__recheck_rx = ^[ ]*:recheck:[ ]*
358 am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
359 am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
360 # A command that, given a newline-separated list of test names on the
361 # standard input, print the name of the tests that are to be re-run
362 # upon "make recheck".
363 am__list_recheck_tests = $(AWK) '{ \
364 recheck = 1; \
365 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
366 { \
367 if (rc < 0) \
368 { \
369 if ((getline line2 < ($$0 ".log")) < 0) \
370 recheck = 0; \
371 break; \
372 } \
373 else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
374 { \
375 recheck = 0; \
376 break; \
377 } \
378 else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
379 { \
380 break; \
381 } \
382 }; \
383 if (recheck) \
384 print $$0; \
385 close ($$0 ".trs"); \
386 close ($$0 ".log"); \
387 }'
388 # A command that, given a newline-separated list of test names on the
389 # standard input, create the global log from their .trs and .log files.
390 am__create_global_log = $(AWK) ' \
391 function fatal(msg) \
392 { \
393 print "fatal: making $@: " msg | "cat >&2"; \
394 exit 1; \
395 } \
396 function rst_section(header) \
397 { \
398 print header; \
399 len = length(header); \
400 for (i = 1; i <= len; i = i + 1) \
401 printf "="; \
402 printf "\n\n"; \
403 } \
404 { \
405 copy_in_global_log = 1; \
406 global_test_result = "RUN"; \
407 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
408 { \
409 if (rc < 0) \
410 fatal("failed to read from " $$0 ".trs"); \
411 if (line ~ /$(am__global_test_result_rx)/) \
412 { \
413 sub("$(am__global_test_result_rx)", "", line); \
414 sub("[ ]*$$", "", line); \
415 global_test_result = line; \
416 } \
417 else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
418 copy_in_global_log = 0; \
419 }; \
420 if (copy_in_global_log) \
421 { \
422 rst_section(global_test_result ": " $$0); \
423 while ((rc = (getline line < ($$0 ".log"))) != 0) \
424 { \
425 if (rc < 0) \
426 fatal("failed to read from " $$0 ".log"); \
427 print line; \
428 }; \
429 printf "\n"; \
430 }; \
431 close ($$0 ".trs"); \
432 close ($$0 ".log"); \
433 }'
434 # Restructured Text title.
435 am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
436 # Solaris 10 'make', and several other traditional 'make' implementations,
437 # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
438 # by disabling -e (using the XSI extension "set +e") if it's set.
439 am__sh_e_setup = case $$- in *e*) set +e;; esac
440 # Default flags passed to test drivers.
441 am__common_driver_flags = \
442 --color-tests "$$am__color_tests" \
443 --enable-hard-errors "$$am__enable_hard_errors" \
444 --expect-failure "$$am__expect_failure"
445 # To be inserted before the command running the test. Creates the
446 # directory for the log if needed. Stores in $dir the directory
447 # containing $f, in $tst the test, in $log the log. Executes the
448 # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
449 # passes TESTS_ENVIRONMENT. Set up options for the wrapper that
450 # will run the test scripts (or their associated LOG_COMPILER, if
451 # thy have one).
452 am__check_pre = \
453 $(am__sh_e_setup); \
454 $(am__vpath_adj_setup) $(am__vpath_adj) \
455 $(am__tty_colors); \
456 srcdir=$(srcdir); export srcdir; \
457 case "$@" in \
458 */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
459 *) am__odir=.;; \
460 esac; \
461 test "x$$am__odir" = x"." || test -d "$$am__odir" \
462 || $(MKDIR_P) "$$am__odir" || exit $$?; \
463 if test -f "./$$f"; then dir=./; \
464 elif test -f "$$f"; then dir=; \
465 else dir="$(srcdir)/"; fi; \
466 tst=$$dir$$f; log='$@'; \
467 if test -n '$(DISABLE_HARD_ERRORS)'; then \
468 am__enable_hard_errors=no; \
469 else \
470 am__enable_hard_errors=yes; \
471 fi; \
472 case " $(XFAIL_TESTS) " in \
473 *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
474 am__expect_failure=yes;; \
475 *) \
476 am__expect_failure=no;; \
477 esac; \
478 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
479 # A shell command to get the names of the tests scripts with any registered
480 # extension removed (i.e., equivalently, the names of the test logs, with
481 # the '.log' extension removed). The result is saved in the shell variable
482 # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
483 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
484 # since that might cause problem with VPATH rewrites for suffix-less tests.
485 # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
486 am__set_TESTS_bases = \
487 bases='$(TEST_LOGS)'; \
488 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
489 bases=`echo $$bases`
490 RECHECK_LOGS = $(TEST_LOGS)
491 TEST_SUITE_LOG = test-suite.log
492 TEST_EXTENSIONS = @EXEEXT@ .test
493 am__test_logs1 = $(TESTS:=.log)
494 am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
495 TEST_LOGS = $(am__test_logs2:.test.log=.log)
496 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
497 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
498 $(TEST_LOG_FLAGS)
499 am__set_b = \
500 case '$@' in \
501 */*) \
502 case '$*' in \
503 */*) b='$*';; \
504 *) b=`echo '$@' | sed 's/\.log$$//'`; \
505 esac;; \
506 *) \
507 b='$*';; \
508 esac
509 DIST_SUBDIRS = $(SUBDIRS)
510 am__DIST_COMMON = $(srcdir)/Makefile.in \
511 $(top_srcdir)/build-aux/depcomp \
512 $(top_srcdir)/build-aux/test-driver
513 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
514 am__relativize = \
515 dir0=`pwd`; \
516 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
517 sed_rest='s,^[^/]*/*,,'; \
518 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
519 sed_butlast='s,/*[^/]*$$,,'; \
520 while test -n "$$dir1"; do \
521 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
522 if test "$$first" != "."; then \
523 if test "$$first" = ".."; then \
524 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
525 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
526 else \
527 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
528 if test "$$first2" = "$$first"; then \
529 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
530 else \
531 dir2="../$$dir2"; \
532 fi; \
533 dir0="$$dir0"/"$$first"; \
534 fi; \
535 fi; \
536 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
537 done; \
538 reldir="$$dir2"
539 pkglibexecdir = @pkglibexecdir@
540 ACLOCAL = @ACLOCAL@
541 AMTAR = @AMTAR@
542 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
543 AR = @AR@
544 ARFLAGS = @ARFLAGS@
545 AS = @AS@
546 AUTOCONF = @AUTOCONF@
547 AUTOHEADER = @AUTOHEADER@
548 AUTOMAKE = @AUTOMAKE@
549 AWK = @AWK@
550 CC = @CC@
551 CCDEPMODE = @CCDEPMODE@
552 CFLAGS = @CFLAGS@
553 CPP = @CPP@
554 CPPFLAGS = @CPPFLAGS@
555 CXX = @CXX@
556 CXXCPP = @CXXCPP@
557 CXXDEPMODE = @CXXDEPMODE@
558 CXXFLAGS = @CXXFLAGS@
559 CYGPATH_W = @CYGPATH_W@
560 DEFS = @DEFS@
561 DEPDIR = @DEPDIR@
562 DLLTOOL = @DLLTOOL@
563 DSYMUTIL = @DSYMUTIL@
564 DUMPBIN = @DUMPBIN@
565 ECHO_C = @ECHO_C@
566 ECHO_N = @ECHO_N@
567 ECHO_T = @ECHO_T@
568 EGREP = @EGREP@
569 ENCHANT_CFLAGS = @ENCHANT_CFLAGS@
570 ENCHANT_LIBS = @ENCHANT_LIBS@
571 ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@
572 ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@
573 ENCHANT_MINOR_VERSION = @ENCHANT_MINOR_VERSION@
574 EXEEXT = @EXEEXT@
575 FGREP = @FGREP@
576 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
577 GETOPT_H = @GETOPT_H@
578 GLIB_CFLAGS = @GLIB_CFLAGS@
579 GLIB_LIBS = @GLIB_LIBS@
580 GNULIB_ATOLL = @GNULIB_ATOLL@
581 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
582 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
583 GNULIB_CHDIR = @GNULIB_CHDIR@
584 GNULIB_CHOWN = @GNULIB_CHOWN@
585 GNULIB_CLOSE = @GNULIB_CLOSE@
586 GNULIB_DUP = @GNULIB_DUP@
587 GNULIB_DUP2 = @GNULIB_DUP2@
588 GNULIB_DUP3 = @GNULIB_DUP3@
589 GNULIB_ENVIRON = @GNULIB_ENVIRON@
590 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
591 GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
592 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
593 GNULIB_FCHDIR = @GNULIB_FCHDIR@
594 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
595 GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
596 GNULIB_FFSL = @GNULIB_FFSL@
597 GNULIB_FFSLL = @GNULIB_FFSLL@
598 GNULIB_FLOCK = @GNULIB_FLOCK@
599 GNULIB_FSYNC = @GNULIB_FSYNC@
600 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
601 GNULIB_GETCWD = @GNULIB_GETCWD@
602 GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
603 GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
604 GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
605 GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
606 GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
607 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
608 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
609 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
610 GNULIB_GETPASS = @GNULIB_GETPASS@
611 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
612 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
613 GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
614 GNULIB_GRANTPT = @GNULIB_GRANTPT@
615 GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
616 GNULIB_ISATTY = @GNULIB_ISATTY@
617 GNULIB_LCHOWN = @GNULIB_LCHOWN@
618 GNULIB_LINK = @GNULIB_LINK@
619 GNULIB_LINKAT = @GNULIB_LINKAT@
620 GNULIB_LSEEK = @GNULIB_LSEEK@
621 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
622 GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
623 GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
624 GNULIB_MBSCHR = @GNULIB_MBSCHR@
625 GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
626 GNULIB_MBSLEN = @GNULIB_MBSLEN@
627 GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
628 GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
629 GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
630 GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
631 GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
632 GNULIB_MBSSEP = @GNULIB_MBSSEP@
633 GNULIB_MBSSPN = @GNULIB_MBSSPN@
634 GNULIB_MBSSTR = @GNULIB_MBSSTR@
635 GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
636 GNULIB_MBTOWC = @GNULIB_MBTOWC@
637 GNULIB_MEMCHR = @GNULIB_MEMCHR@
638 GNULIB_MEMMEM = @GNULIB_MEMMEM@
639 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
640 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
641 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
642 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
643 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
644 GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
645 GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
646 GNULIB_PIPE = @GNULIB_PIPE@
647 GNULIB_PIPE2 = @GNULIB_PIPE2@
648 GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
649 GNULIB_PREAD = @GNULIB_PREAD@
650 GNULIB_PTSNAME = @GNULIB_PTSNAME@
651 GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
652 GNULIB_PUTENV = @GNULIB_PUTENV@
653 GNULIB_PWRITE = @GNULIB_PWRITE@
654 GNULIB_QSORT_R = @GNULIB_QSORT_R@
655 GNULIB_RANDOM = @GNULIB_RANDOM@
656 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
657 GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
658 GNULIB_READ = @GNULIB_READ@
659 GNULIB_READLINK = @GNULIB_READLINK@
660 GNULIB_READLINKAT = @GNULIB_READLINKAT@
661 GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
662 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
663 GNULIB_REALPATH = @GNULIB_REALPATH@
664 GNULIB_RMDIR = @GNULIB_RMDIR@
665 GNULIB_RPMATCH = @GNULIB_RPMATCH@
666 GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
667 GNULIB_SETENV = @GNULIB_SETENV@
668 GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
669 GNULIB_SLEEP = @GNULIB_SLEEP@
670 GNULIB_STPCPY = @GNULIB_STPCPY@
671 GNULIB_STPNCPY = @GNULIB_STPNCPY@
672 GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
673 GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
674 GNULIB_STRDUP = @GNULIB_STRDUP@
675 GNULIB_STRERROR = @GNULIB_STRERROR@
676 GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
677 GNULIB_STRNCAT = @GNULIB_STRNCAT@
678 GNULIB_STRNDUP = @GNULIB_STRNDUP@
679 GNULIB_STRNLEN = @GNULIB_STRNLEN@
680 GNULIB_STRPBRK = @GNULIB_STRPBRK@
681 GNULIB_STRSEP = @GNULIB_STRSEP@
682 GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
683 GNULIB_STRSTR = @GNULIB_STRSTR@
684 GNULIB_STRTOD = @GNULIB_STRTOD@
685 GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
686 GNULIB_STRTOLL = @GNULIB_STRTOLL@
687 GNULIB_STRTOULL = @GNULIB_STRTOULL@
688 GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
689 GNULIB_SYMLINK = @GNULIB_SYMLINK@
690 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
691 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
692 GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
693 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
694 GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
695 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
696 GNULIB_UNLINK = @GNULIB_UNLINK@
697 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
698 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
699 GNULIB_UNSETENV = @GNULIB_UNSETENV@
700 GNULIB_USLEEP = @GNULIB_USLEEP@
701 GNULIB_WCTOMB = @GNULIB_WCTOMB@
702 GNULIB_WRITE = @GNULIB_WRITE@
703 GNULIB__EXIT = @GNULIB__EXIT@
704 GREP = @GREP@
705 HAVE_ATOLL = @HAVE_ATOLL@
706 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
707 HAVE_CHOWN = @HAVE_CHOWN@
708 HAVE_CXX11 = @HAVE_CXX11@
709 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
710 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
711 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
712 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
713 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
714 HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
715 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
716 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
717 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
718 HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
719 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
720 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
721 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
722 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
723 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
724 HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
725 HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
726 HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
727 HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
728 HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
729 HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
730 HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
731 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
732 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
733 HAVE_DUP2 = @HAVE_DUP2@
734 HAVE_DUP3 = @HAVE_DUP3@
735 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
736 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
737 HAVE_FACCESSAT = @HAVE_FACCESSAT@
738 HAVE_FCHDIR = @HAVE_FCHDIR@
739 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
740 HAVE_FDATASYNC = @HAVE_FDATASYNC@
741 HAVE_FFSL = @HAVE_FFSL@
742 HAVE_FFSLL = @HAVE_FFSLL@
743 HAVE_FLOCK = @HAVE_FLOCK@
744 HAVE_FSYNC = @HAVE_FSYNC@
745 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
746 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
747 HAVE_GETGROUPS = @HAVE_GETGROUPS@
748 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
749 HAVE_GETLOGIN = @HAVE_GETLOGIN@
750 HAVE_GETOPT_H = @HAVE_GETOPT_H@
751 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
752 HAVE_GETPASS = @HAVE_GETPASS@
753 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
754 HAVE_GRANTPT = @HAVE_GRANTPT@
755 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
756 HAVE_LCHOWN = @HAVE_LCHOWN@
757 HAVE_LINK = @HAVE_LINK@
758 HAVE_LINKAT = @HAVE_LINKAT@
759 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
760 HAVE_MBSLEN = @HAVE_MBSLEN@
761 HAVE_MEMCHR = @HAVE_MEMCHR@
762 HAVE_MEMPCPY = @HAVE_MEMPCPY@
763 HAVE_MKDTEMP = @HAVE_MKDTEMP@
764 HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
765 HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
766 HAVE_MKSTEMP = @HAVE_MKSTEMP@
767 HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
768 HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
769 HAVE_OS_H = @HAVE_OS_H@
770 HAVE_PIPE = @HAVE_PIPE@
771 HAVE_PIPE2 = @HAVE_PIPE2@
772 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
773 HAVE_PREAD = @HAVE_PREAD@
774 HAVE_PTSNAME = @HAVE_PTSNAME@
775 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
776 HAVE_PWRITE = @HAVE_PWRITE@
777 HAVE_QSORT_R = @HAVE_QSORT_R@
778 HAVE_RANDOM = @HAVE_RANDOM@
779 HAVE_RANDOM_H = @HAVE_RANDOM_H@
780 HAVE_RANDOM_R = @HAVE_RANDOM_R@
781 HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
782 HAVE_READLINK = @HAVE_READLINK@
783 HAVE_READLINKAT = @HAVE_READLINKAT@
784 HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@
785 HAVE_REALPATH = @HAVE_REALPATH@
786 HAVE_RPMATCH = @HAVE_RPMATCH@
787 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
788 HAVE_SETENV = @HAVE_SETENV@
789 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
790 HAVE_SLEEP = @HAVE_SLEEP@
791 HAVE_STPCPY = @HAVE_STPCPY@
792 HAVE_STPNCPY = @HAVE_STPNCPY@
793 HAVE_STRCASESTR = @HAVE_STRCASESTR@
794 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
795 HAVE_STRPBRK = @HAVE_STRPBRK@
796 HAVE_STRSEP = @HAVE_STRSEP@
797 HAVE_STRTOD = @HAVE_STRTOD@
798 HAVE_STRTOLL = @HAVE_STRTOLL@
799 HAVE_STRTOULL = @HAVE_STRTOULL@
800 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
801 HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
802 HAVE_SYMLINK = @HAVE_SYMLINK@
803 HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
804 HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
805 HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@
806 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
807 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
808 HAVE_UNISTD_H = @HAVE_UNISTD_H@
809 HAVE_UNLINKAT = @HAVE_UNLINKAT@
810 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
811 HAVE_USLEEP = @HAVE_USLEEP@
812 HAVE_WCHAR_T = @HAVE_WCHAR_T@
813 HAVE__EXIT = @HAVE__EXIT@
814 HUNSPELL_CFLAGS = @HUNSPELL_CFLAGS@
815 HUNSPELL_LIBS = @HUNSPELL_LIBS@
816 INCLUDE_NEXT = @INCLUDE_NEXT@
817 INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
818 INSTALL = @INSTALL@
819 INSTALL_DATA = @INSTALL_DATA@
820 INSTALL_PROGRAM = @INSTALL_PROGRAM@
821 INSTALL_SCRIPT = @INSTALL_SCRIPT@
822 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
823 ISYSTEM = @ISYSTEM@
824 LD = @LD@
825 LDFLAGS = @LDFLAGS@
826 LIBINTL = @LIBINTL@
827 LIBOBJS = @LIBOBJS@
828 LIBS = @LIBS@
829 LIBTOOL = @LIBTOOL@
830 LIPO = @LIPO@
831 LN_S = @LN_S@
832 LTLIBINTL = @LTLIBINTL@
833 LTLIBOBJS = @LTLIBOBJS@
834 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
835 MAKEINFO = @MAKEINFO@
836 MANIFEST_TOOL = @MANIFEST_TOOL@
837 MKDIR_P = @MKDIR_P@
838 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
839 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
840 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
841 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
842 NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@
843 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
844 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
845 NEXT_GETOPT_H = @NEXT_GETOPT_H@
846 NEXT_STDDEF_H = @NEXT_STDDEF_H@
847 NEXT_STDLIB_H = @NEXT_STDLIB_H@
848 NEXT_STRING_H = @NEXT_STRING_H@
849 NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@
850 NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
851 NEXT_UNISTD_H = @NEXT_UNISTD_H@
852 NM = @NM@
853 NMEDIT = @NMEDIT@
854 NUSPELL_CFLAGS = @NUSPELL_CFLAGS@
855 NUSPELL_LIBS = @NUSPELL_LIBS@
856 OBJCXX = @OBJCXX@
857 OBJCXXCPP = @OBJCXXCPP@
858 OBJCXXDEPMODE = @OBJCXXDEPMODE@
859 OBJCXXFLAGS = @OBJCXXFLAGS@
860 OBJDUMP = @OBJDUMP@
861 OBJEXT = @OBJEXT@
862 OTOOL = @OTOOL@
863 OTOOL64 = @OTOOL64@
864 PACKAGE = @PACKAGE@
865 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
866 PACKAGE_NAME = @PACKAGE_NAME@
867 PACKAGE_STRING = @PACKAGE_STRING@
868 PACKAGE_TARNAME = @PACKAGE_TARNAME@
869 PACKAGE_URL = @PACKAGE_URL@
870 PACKAGE_VERSION = @PACKAGE_VERSION@
871 PATH_SEPARATOR = @PATH_SEPARATOR@
872 PKG_CONFIG = @PKG_CONFIG@
873 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
874 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
875 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
876 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
877 RANLIB = @RANLIB@
878 RC = @RC@
879 RELOCATABLE = @RELOCATABLE@
880 REPLACE_CALLOC = @REPLACE_CALLOC@
881 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
882 REPLACE_CHOWN = @REPLACE_CHOWN@
883 REPLACE_CLOSE = @REPLACE_CLOSE@
884 REPLACE_DUP = @REPLACE_DUP@
885 REPLACE_DUP2 = @REPLACE_DUP2@
886 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
887 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
888 REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
889 REPLACE_GETCWD = @REPLACE_GETCWD@
890 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
891 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
892 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
893 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
894 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
895 REPLACE_GETPASS = @REPLACE_GETPASS@
896 REPLACE_ISATTY = @REPLACE_ISATTY@
897 REPLACE_LCHOWN = @REPLACE_LCHOWN@
898 REPLACE_LINK = @REPLACE_LINK@
899 REPLACE_LINKAT = @REPLACE_LINKAT@
900 REPLACE_LSEEK = @REPLACE_LSEEK@
901 REPLACE_MALLOC = @REPLACE_MALLOC@
902 REPLACE_MBTOWC = @REPLACE_MBTOWC@
903 REPLACE_MEMCHR = @REPLACE_MEMCHR@
904 REPLACE_MEMMEM = @REPLACE_MEMMEM@
905 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
906 REPLACE_NULL = @REPLACE_NULL@
907 REPLACE_PREAD = @REPLACE_PREAD@
908 REPLACE_PTSNAME = @REPLACE_PTSNAME@
909 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
910 REPLACE_PUTENV = @REPLACE_PUTENV@
911 REPLACE_PWRITE = @REPLACE_PWRITE@
912 REPLACE_QSORT_R = @REPLACE_QSORT_R@
913 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
914 REPLACE_READ = @REPLACE_READ@
915 REPLACE_READLINK = @REPLACE_READLINK@
916 REPLACE_READLINKAT = @REPLACE_READLINKAT@
917 REPLACE_REALLOC = @REPLACE_REALLOC@
918 REPLACE_REALPATH = @REPLACE_REALPATH@
919 REPLACE_RMDIR = @REPLACE_RMDIR@
920 REPLACE_SETENV = @REPLACE_SETENV@
921 REPLACE_SLEEP = @REPLACE_SLEEP@
922 REPLACE_STPNCPY = @REPLACE_STPNCPY@
923 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
924 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
925 REPLACE_STRDUP = @REPLACE_STRDUP@
926 REPLACE_STRERROR = @REPLACE_STRERROR@
927 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
928 REPLACE_STRNCAT = @REPLACE_STRNCAT@
929 REPLACE_STRNDUP = @REPLACE_STRNDUP@
930 REPLACE_STRNLEN = @REPLACE_STRNLEN@
931 REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
932 REPLACE_STRSTR = @REPLACE_STRSTR@
933 REPLACE_STRTOD = @REPLACE_STRTOD@
934 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
935 REPLACE_SYMLINK = @REPLACE_SYMLINK@
936 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
937 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
938 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
939 REPLACE_UNLINK = @REPLACE_UNLINK@
940 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
941 REPLACE_UNSETENV = @REPLACE_UNSETENV@
942 REPLACE_USLEEP = @REPLACE_USLEEP@
943 REPLACE_WCTOMB = @REPLACE_WCTOMB@
944 REPLACE_WRITE = @REPLACE_WRITE@
945 SED = @SED@
946 SET_MAKE = @SET_MAKE@
947 SHELL = @SHELL@
948 STDDEF_H = @STDDEF_H@
949 STRIP = @STRIP@
950 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
951 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
952 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
953 UNITTESTPP_CFLAGS = @UNITTESTPP_CFLAGS@
954 UNITTESTPP_LIBS = @UNITTESTPP_LIBS@
955 VERSION = @VERSION@
956 VERSION_INFO = @VERSION_INFO@
957 VOIKKO_CFLAGS = @VOIKKO_CFLAGS@
958 VOIKKO_LIBS = @VOIKKO_LIBS@
959 WARN_CFLAGS = @WARN_CFLAGS@
960 WARN_CXXFLAGS = @WARN_CXXFLAGS@
961 WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
962 WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
963 ZEMBEREK_CFLAGS = @ZEMBEREK_CFLAGS@
964 ZEMBEREK_LIBS = @ZEMBEREK_LIBS@
965 abs_builddir = @abs_builddir@
966 abs_srcdir = @abs_srcdir@
967 abs_top_builddir = @abs_top_builddir@
968 abs_top_srcdir = @abs_top_srcdir@
969 ac_ct_AR = @ac_ct_AR@
970 ac_ct_CC = @ac_ct_CC@
971 ac_ct_CXX = @ac_ct_CXX@
972 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
973 ac_ct_OBJCXX = @ac_ct_OBJCXX@
974 am__include = @am__include@
975 am__leading_dot = @am__leading_dot@
976 am__quote = @am__quote@
977 am__tar = @am__tar@
978 am__untar = @am__untar@
979 bindir = @bindir@
980 build = @build@
981 build_alias = @build_alias@
982 build_cpu = @build_cpu@
983 build_os = @build_os@
984 build_vendor = @build_vendor@
985 builddir = @builddir@
986 datadir = @datadir@
987 datarootdir = @datarootdir@
988 docdir = @docdir@
989 dvidir = @dvidir@
990 exec_prefix = @exec_prefix@
991 gl_LIBOBJS = @gl_LIBOBJS@
992 gl_LTLIBOBJS = @gl_LTLIBOBJS@
993 gltests_LIBOBJS = @gltests_LIBOBJS@
994 gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
995 gltests_WITNESS = @gltests_WITNESS@
996 host = @host@
997 host_alias = @host_alias@
998 host_cpu = @host_cpu@
999 host_os = @host_os@
1000 host_vendor = @host_vendor@
1001 htmldir = @htmldir@
1002 includedir = @includedir@
1003 infodir = @infodir@
1004 install_sh = @install_sh@
1005 libdir = @libdir@
1006 libexecdir = @libexecdir@
1007 lispdir = @lispdir@
1008 localedir = @localedir@
1009 localstatedir = @localstatedir@
1010 mandir = @mandir@
1011 mkdir_p = @mkdir_p@
1012 objdir = @objdir@
1013 oldincludedir = @oldincludedir@
1014 pdfdir = @pdfdir@
1015 prefix = @prefix@
1016 program_transform_name = @program_transform_name@
1017 psdir = @psdir@
1018 runstatedir = @runstatedir@
1019 sbindir = @sbindir@
1020 sharedstatedir = @sharedstatedir@
1021 shlibext = @shlibext@
1022 srcdir = @srcdir@
1023 sysconfdir = @sysconfdir@
1024 target_alias = @target_alias@
1025 top_build_prefix = @top_build_prefix@
1026 top_builddir = @top_builddir@
1027 top_srcdir = @top_srcdir@
1028 SUBDIRS = enchant_providers
1029 @GNU_MAKE_FALSE@libdir_subdir = lib
1030
1031 # Get libdir suffix
1032 @GNU_MAKE_TRUE@libdir_subdir = $(shell echo "$(libdir)" | sed -e 's|^$(exec_prefix)/||' | sed -e 's|^/||')
1033 AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS) -DENCHANT_MAJOR_VERSION=\"@ENCHANT_MAJOR_VERSION@\"
1034 ENCHANT_CONFIG_DIR = config
1035 AM_TESTS_ENVIRONMENT = \
1036 export ENCHANT_CONFIG_DIR=$(ENCHANT_CONFIG_DIR); \
1037 export LIBTOOL=$(top_builddir)/libtool; \
1038 rm -f test.pwl; \
1039 $(MAKE) libenchant-copy; \
1040 cp $(srcdir)/test.pwl.orig $(builddir)/test.pwl; \
1041 cp $(builddir)/@objdir@/*@shlibext@ .; \
1042 chmod +w $(builddir)/test.pwl; \
1043 export LSAN_OPTIONS=suppressions=$(srcdir)/asan-suppressions.txt;
1044
1045 DISTCLEANFILES = test.pwl *@shlibext@
1046 EXTRA_DIST = test.pwl.orig mock_provider.h run-test
1047 LIBENCHANT_COPY = $(builddir)/$(libdir_subdir)/libenchant-@ENCHANT_MAJOR_VERSION@.la
1048 LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS)
1049 LIBADD = $(LIBENCHANT_COPY)
1050 DEPS = $(LIBENCHANT_COPY)
1051 check_LTLIBRARIES = \
1052 libenchant_mock_provider.la \
1053 libenchant_mock_provider2.la \
1054 libenchant_null_provider.la \
1055 libenchant_null_identify.la \
1056 libenchant_null_describe.la
1057
1058
1059 # Should not really use _ENCHANT_BUILD here, but seems to be necessary to get correct DLL exports for Windows
1060 libenchant_mock_provider_la_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS) -D_ENCHANT_BUILD=1
1061 # Adding -rpath to LDFLAGS causes the .so to be built even though the lib is not to be installed
1062 libenchant_mock_provider_la_LDFLAGS = -module -avoid-version -no-undefined -rpath /foo $(ENCHANT_LIBS)
1063 libenchant_mock_provider_la_SOURCES = mock_provider.cpp
1064
1065 # Build distinct libraries rather than copying a single one, to avoid being
1066 # defeated by caching, so we can configure each one differently.
1067 libenchant_mock_provider2_la_CPPFLAGS = $(libenchant_mock_provider_la_CPPFLAGS)
1068 libenchant_mock_provider2_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS)
1069 libenchant_mock_provider2_la_SOURCES = $(libenchant_mock_provider_la_SOURCES)
1070 libenchant_null_provider_la_CPPFLAGS = $(libenchant_mock_provider_la_CPPFLAGS) -DENCHANT_TEST_NULL_PROVIDER
1071 libenchant_null_provider_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS)
1072 libenchant_null_provider_la_SOURCES = $(libenchant_mock_provider_la_SOURCES)
1073 libenchant_null_identify_la_CPPFLAGS = $(libenchant_mock_provider_la_CPPFLAGS) -DENCHANT_TEST_NULL_IDENTIFY
1074 libenchant_null_identify_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS)
1075 libenchant_null_identify_la_SOURCES = $(libenchant_mock_provider_la_SOURCES)
1076 libenchant_null_describe_la_CPPFLAGS = $(libenchant_mock_provider_la_CPPFLAGS) -DENCHANT_TEST_NULL_DESCRIBE
1077 libenchant_null_describe_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS)
1078 libenchant_null_describe_la_SOURCES = $(libenchant_mock_provider_la_SOURCES)
1079 LOG_COMPILER = $(srcdir)/run-test
1080 main_test_SOURCES = main.test.cpp \
1081 EnchantBrokerTestFixture.h \
1082 EnchantDictionaryTestFixture.h \
1083 EnchantTestFixture.h \
1084 mock_provider.h \
1085 dictionary/enchant_dict_add_tests.cpp \
1086 dictionary/enchant_dict_add_to_session_tests.cpp \
1087 dictionary/enchant_dict_check_tests.cpp \
1088 dictionary/enchant_dict_describe_tests.cpp \
1089 dictionary/enchant_dict_free_string_list_tests.cpp \
1090 dictionary/enchant_dict_get_error_tests.cpp \
1091 dictionary/enchant_dict_get_extra_word_characters_tests.cpp \
1092 dictionary/enchant_dict_is_added_tests.cpp \
1093 dictionary/enchant_dict_is_removed_tests.cpp \
1094 dictionary/enchant_dict_is_word_character_tests.cpp \
1095 dictionary/enchant_dict_remove_from_session_tests.cpp \
1096 dictionary/enchant_dict_remove_tests.cpp \
1097 dictionary/enchant_dict_store_replacement_tests.cpp \
1098 dictionary/enchant_dict_suggest_tests.cpp \
1099 broker/enchant_broker_describe_tests.cpp \
1100 broker/enchant_broker_dict_exists_tests.cpp \
1101 broker/enchant_broker_dict_exists_tests.i \
1102 broker/enchant_broker_free_dict_tests.cpp \
1103 broker/enchant_broker_free_tests.cpp \
1104 broker/enchant_broker_get_error_tests.cpp \
1105 broker/enchant_broker_init_tests.cpp \
1106 broker/enchant_broker_list_dicts_tests.cpp \
1107 broker/enchant_broker_request_dict_tests.cpp \
1108 broker/enchant_broker_request_pwl_dict_tests.cpp \
1109 broker/enchant_broker_set_ordering_tests.cpp \
1110 pwl/enchant_pwl_tests.cpp \
1111 provider/enchant_provider_broker_set_error_tests.cpp \
1112 provider/enchant_provider_dict_set_error_tests.cpp \
1113 provider/enchant_provider_get_prefix_dir_tests.cpp \
1114 provider/enchant_provider_get_user_config_dirs_tests.cpp \
1115 provider/enchant_provider_get_user_language_tests.cpp \
1116 $(NULL)
1117
1118 main_test_DEPENDENCIES = $(LIBENCHANT_COPY)
1119 main_test_LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS) $(UNITTESTPP_LIBS)
1120 main_test_CPPFLAGS = $(AM_CPPFLAGS) $(UNITTESTPP_CFLAGS) -DLIBDIR_SUBDIR=\"$(libdir_subdir)\"
1121 TESTS = $(check_PROGRAMS)
1122 all: all-recursive
1123
1124 .SUFFIXES:
1125 .SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
1126 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
1127 @for dep in $?; do \
1128 case '$(am__configure_deps)' in \
1129 *$$dep*) \
1130 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
1131 && { if test -f $@; then exit 0; else break; fi; }; \
1132 exit 1;; \
1133 esac; \
1134 done; \
1135 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
1136 $(am__cd) $(top_srcdir) && \
1137 $(AUTOMAKE) --gnu tests/Makefile
1138 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
1139 @case '$?' in \
1140 *config.status*) \
1141 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
1142 *) \
1143 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
1144 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
1145 esac;
1146
1147 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
1148 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
1149
1150 $(top_srcdir)/configure: $(am__configure_deps)
1151 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
1152 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
1153 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
1154 $(am__aclocal_m4_deps):
1155
1156 clean-checkLTLIBRARIES:
1157 -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES)
1158 @list='$(check_LTLIBRARIES)'; \
1159 locs=`for p in $$list; do echo $$p; done | \
1160 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
1161 sort -u`; \
1162 test -z "$$locs" || { \
1163 echo rm -f $${locs}; \
1164 rm -f $${locs}; \
1165 }
1166
1167 libenchant_mock_provider.la: $(libenchant_mock_provider_la_OBJECTS) $(libenchant_mock_provider_la_DEPENDENCIES) $(EXTRA_libenchant_mock_provider_la_DEPENDENCIES)
1168 $(AM_V_CXXLD)$(libenchant_mock_provider_la_LINK) $(libenchant_mock_provider_la_OBJECTS) $(libenchant_mock_provider_la_LIBADD) $(LIBS)
1169
1170 libenchant_mock_provider2.la: $(libenchant_mock_provider2_la_OBJECTS) $(libenchant_mock_provider2_la_DEPENDENCIES) $(EXTRA_libenchant_mock_provider2_la_DEPENDENCIES)
1171 $(AM_V_CXXLD)$(libenchant_mock_provider2_la_LINK) $(libenchant_mock_provider2_la_OBJECTS) $(libenchant_mock_provider2_la_LIBADD) $(LIBS)
1172
1173 libenchant_null_describe.la: $(libenchant_null_describe_la_OBJECTS) $(libenchant_null_describe_la_DEPENDENCIES) $(EXTRA_libenchant_null_describe_la_DEPENDENCIES)
1174 $(AM_V_CXXLD)$(libenchant_null_describe_la_LINK) $(libenchant_null_describe_la_OBJECTS) $(libenchant_null_describe_la_LIBADD) $(LIBS)
1175
1176 libenchant_null_identify.la: $(libenchant_null_identify_la_OBJECTS) $(libenchant_null_identify_la_DEPENDENCIES) $(EXTRA_libenchant_null_identify_la_DEPENDENCIES)
1177 $(AM_V_CXXLD)$(libenchant_null_identify_la_LINK) $(libenchant_null_identify_la_OBJECTS) $(libenchant_null_identify_la_LIBADD) $(LIBS)
1178
1179 libenchant_null_provider.la: $(libenchant_null_provider_la_OBJECTS) $(libenchant_null_provider_la_DEPENDENCIES) $(EXTRA_libenchant_null_provider_la_DEPENDENCIES)
1180 $(AM_V_CXXLD)$(libenchant_null_provider_la_LINK) $(libenchant_null_provider_la_OBJECTS) $(libenchant_null_provider_la_LIBADD) $(LIBS)
1181
1182 clean-checkPROGRAMS:
1183 @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
1184 echo " rm -f" $$list; \
1185 rm -f $$list || exit $$?; \
1186 test -n "$(EXEEXT)" || exit 0; \
1187 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
1188 echo " rm -f" $$list; \
1189 rm -f $$list
1190 dictionary/$(am__dirstamp):
1191 @$(MKDIR_P) dictionary
1192 @: > dictionary/$(am__dirstamp)
1193 dictionary/$(DEPDIR)/$(am__dirstamp):
1194 @$(MKDIR_P) dictionary/$(DEPDIR)
1195 @: > dictionary/$(DEPDIR)/$(am__dirstamp)
1196 dictionary/main_test-enchant_dict_add_tests.$(OBJEXT): \
1197 dictionary/$(am__dirstamp) \
1198 dictionary/$(DEPDIR)/$(am__dirstamp)
1199 dictionary/main_test-enchant_dict_add_to_session_tests.$(OBJEXT): \
1200 dictionary/$(am__dirstamp) \
1201 dictionary/$(DEPDIR)/$(am__dirstamp)
1202 dictionary/main_test-enchant_dict_check_tests.$(OBJEXT): \
1203 dictionary/$(am__dirstamp) \
1204 dictionary/$(DEPDIR)/$(am__dirstamp)
1205 dictionary/main_test-enchant_dict_describe_tests.$(OBJEXT): \
1206 dictionary/$(am__dirstamp) \
1207 dictionary/$(DEPDIR)/$(am__dirstamp)
1208 dictionary/main_test-enchant_dict_free_string_list_tests.$(OBJEXT): \
1209 dictionary/$(am__dirstamp) \
1210 dictionary/$(DEPDIR)/$(am__dirstamp)
1211 dictionary/main_test-enchant_dict_get_error_tests.$(OBJEXT): \
1212 dictionary/$(am__dirstamp) \
1213 dictionary/$(DEPDIR)/$(am__dirstamp)
1214 dictionary/main_test-enchant_dict_get_extra_word_characters_tests.$(OBJEXT): \
1215 dictionary/$(am__dirstamp) \
1216 dictionary/$(DEPDIR)/$(am__dirstamp)
1217 dictionary/main_test-enchant_dict_is_added_tests.$(OBJEXT): \
1218 dictionary/$(am__dirstamp) \
1219 dictionary/$(DEPDIR)/$(am__dirstamp)
1220 dictionary/main_test-enchant_dict_is_removed_tests.$(OBJEXT): \
1221 dictionary/$(am__dirstamp) \
1222 dictionary/$(DEPDIR)/$(am__dirstamp)
1223 dictionary/main_test-enchant_dict_is_word_character_tests.$(OBJEXT): \
1224 dictionary/$(am__dirstamp) \
1225 dictionary/$(DEPDIR)/$(am__dirstamp)
1226 dictionary/main_test-enchant_dict_remove_from_session_tests.$(OBJEXT): \
1227 dictionary/$(am__dirstamp) \
1228 dictionary/$(DEPDIR)/$(am__dirstamp)
1229 dictionary/main_test-enchant_dict_remove_tests.$(OBJEXT): \
1230 dictionary/$(am__dirstamp) \
1231 dictionary/$(DEPDIR)/$(am__dirstamp)
1232 dictionary/main_test-enchant_dict_store_replacement_tests.$(OBJEXT): \
1233 dictionary/$(am__dirstamp) \
1234 dictionary/$(DEPDIR)/$(am__dirstamp)
1235 dictionary/main_test-enchant_dict_suggest_tests.$(OBJEXT): \
1236 dictionary/$(am__dirstamp) \
1237 dictionary/$(DEPDIR)/$(am__dirstamp)
1238 broker/$(am__dirstamp):
1239 @$(MKDIR_P) broker
1240 @: > broker/$(am__dirstamp)
1241 broker/$(DEPDIR)/$(am__dirstamp):
1242 @$(MKDIR_P) broker/$(DEPDIR)
1243 @: > broker/$(DEPDIR)/$(am__dirstamp)
1244 broker/main_test-enchant_broker_describe_tests.$(OBJEXT): \
1245 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1246 broker/main_test-enchant_broker_dict_exists_tests.$(OBJEXT): \
1247 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1248 broker/main_test-enchant_broker_free_dict_tests.$(OBJEXT): \
1249 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1250 broker/main_test-enchant_broker_free_tests.$(OBJEXT): \
1251 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1252 broker/main_test-enchant_broker_get_error_tests.$(OBJEXT): \
1253 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1254 broker/main_test-enchant_broker_init_tests.$(OBJEXT): \
1255 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1256 broker/main_test-enchant_broker_list_dicts_tests.$(OBJEXT): \
1257 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1258 broker/main_test-enchant_broker_request_dict_tests.$(OBJEXT): \
1259 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1260 broker/main_test-enchant_broker_request_pwl_dict_tests.$(OBJEXT): \
1261 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1262 broker/main_test-enchant_broker_set_ordering_tests.$(OBJEXT): \
1263 broker/$(am__dirstamp) broker/$(DEPDIR)/$(am__dirstamp)
1264 pwl/$(am__dirstamp):
1265 @$(MKDIR_P) pwl
1266 @: > pwl/$(am__dirstamp)
1267 pwl/$(DEPDIR)/$(am__dirstamp):
1268 @$(MKDIR_P) pwl/$(DEPDIR)
1269 @: > pwl/$(DEPDIR)/$(am__dirstamp)
1270 pwl/main_test-enchant_pwl_tests.$(OBJEXT): pwl/$(am__dirstamp) \
1271 pwl/$(DEPDIR)/$(am__dirstamp)
1272 provider/$(am__dirstamp):
1273 @$(MKDIR_P) provider
1274 @: > provider/$(am__dirstamp)
1275 provider/$(DEPDIR)/$(am__dirstamp):
1276 @$(MKDIR_P) provider/$(DEPDIR)
1277 @: > provider/$(DEPDIR)/$(am__dirstamp)
1278 provider/main_test-enchant_provider_broker_set_error_tests.$(OBJEXT): \
1279 provider/$(am__dirstamp) provider/$(DEPDIR)/$(am__dirstamp)
1280 provider/main_test-enchant_provider_dict_set_error_tests.$(OBJEXT): \
1281 provider/$(am__dirstamp) provider/$(DEPDIR)/$(am__dirstamp)
1282 provider/main_test-enchant_provider_get_prefix_dir_tests.$(OBJEXT): \
1283 provider/$(am__dirstamp) provider/$(DEPDIR)/$(am__dirstamp)
1284 provider/main_test-enchant_provider_get_user_config_dirs_tests.$(OBJEXT): \
1285 provider/$(am__dirstamp) provider/$(DEPDIR)/$(am__dirstamp)
1286 provider/main_test-enchant_provider_get_user_language_tests.$(OBJEXT): \
1287 provider/$(am__dirstamp) provider/$(DEPDIR)/$(am__dirstamp)
1288
1289 main.test$(EXEEXT): $(main_test_OBJECTS) $(main_test_DEPENDENCIES) $(EXTRA_main_test_DEPENDENCIES)
1290 @rm -f main.test$(EXEEXT)
1291 $(AM_V_CXXLD)$(CXXLINK) $(main_test_OBJECTS) $(main_test_LDADD) $(LIBS)
1292
1293 mostlyclean-compile:
1294 -rm -f *.$(OBJEXT)
1295 -rm -f broker/*.$(OBJEXT)
1296 -rm -f dictionary/*.$(OBJEXT)
1297 -rm -f provider/*.$(OBJEXT)
1298 -rm -f pwl/*.$(OBJEXT)
1299
1300 distclean-compile:
1301 -rm -f *.tab.c
1302
1303 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libenchant_mock_provider2_la-mock_provider.Plo@am__quote@
1304 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libenchant_mock_provider_la-mock_provider.Plo@am__quote@
1305 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libenchant_null_describe_la-mock_provider.Plo@am__quote@
1306 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libenchant_null_identify_la-mock_provider.Plo@am__quote@
1307 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libenchant_null_provider_la-mock_provider.Plo@am__quote@
1308 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main_test-main.test.Po@am__quote@
1309 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_describe_tests.Po@am__quote@
1310 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_dict_exists_tests.Po@am__quote@
1311 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_free_dict_tests.Po@am__quote@
1312 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_free_tests.Po@am__quote@
1313 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_get_error_tests.Po@am__quote@
1314 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_init_tests.Po@am__quote@
1315 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_list_dicts_tests.Po@am__quote@
1316 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_request_dict_tests.Po@am__quote@
1317 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_request_pwl_dict_tests.Po@am__quote@
1318 @AMDEP_TRUE@@am__include@ @am__quote@broker/$(DEPDIR)/main_test-enchant_broker_set_ordering_tests.Po@am__quote@
1319 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_add_tests.Po@am__quote@
1320 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_add_to_session_tests.Po@am__quote@
1321 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_check_tests.Po@am__quote@
1322 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_describe_tests.Po@am__quote@
1323 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_free_string_list_tests.Po@am__quote@
1324 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_get_error_tests.Po@am__quote@
1325 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_get_extra_word_characters_tests.Po@am__quote@
1326 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_is_added_tests.Po@am__quote@
1327 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_is_removed_tests.Po@am__quote@
1328 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_is_word_character_tests.Po@am__quote@
1329 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_remove_from_session_tests.Po@am__quote@
1330 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_remove_tests.Po@am__quote@
1331 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_store_replacement_tests.Po@am__quote@
1332 @AMDEP_TRUE@@am__include@ @am__quote@dictionary/$(DEPDIR)/main_test-enchant_dict_suggest_tests.Po@am__quote@
1333 @AMDEP_TRUE@@am__include@ @am__quote@provider/$(DEPDIR)/main_test-enchant_provider_broker_set_error_tests.Po@am__quote@
1334 @AMDEP_TRUE@@am__include@ @am__quote@provider/$(DEPDIR)/main_test-enchant_provider_dict_set_error_tests.Po@am__quote@
1335 @AMDEP_TRUE@@am__include@ @am__quote@provider/$(DEPDIR)/main_test-enchant_provider_get_prefix_dir_tests.Po@am__quote@
1336 @AMDEP_TRUE@@am__include@ @am__quote@provider/$(DEPDIR)/main_test-enchant_provider_get_user_config_dirs_tests.Po@am__quote@
1337 @AMDEP_TRUE@@am__include@ @am__quote@provider/$(DEPDIR)/main_test-enchant_provider_get_user_language_tests.Po@am__quote@
1338 @AMDEP_TRUE@@am__include@ @am__quote@pwl/$(DEPDIR)/main_test-enchant_pwl_tests.Po@am__quote@
1339
1340 .cpp.o:
1341 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
1342 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
1343 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
1344 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
1345 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1346 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
1347
1348 .cpp.obj:
1349 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
1350 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
1351 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
1352 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
1353 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1354 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
1355
1356 .cpp.lo:
1357 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
1358 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
1359 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
1360 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
1361 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1362 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
1363
1364 libenchant_mock_provider_la-mock_provider.lo: mock_provider.cpp
1365 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_mock_provider_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libenchant_mock_provider_la-mock_provider.lo -MD -MP -MF $(DEPDIR)/libenchant_mock_provider_la-mock_provider.Tpo -c -o libenchant_mock_provider_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1366 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libenchant_mock_provider_la-mock_provider.Tpo $(DEPDIR)/libenchant_mock_provider_la-mock_provider.Plo
1367 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mock_provider.cpp' object='libenchant_mock_provider_la-mock_provider.lo' libtool=yes @AMDEPBACKSLASH@
1368 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1369 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_mock_provider_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libenchant_mock_provider_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1370
1371 libenchant_mock_provider2_la-mock_provider.lo: mock_provider.cpp
1372 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_mock_provider2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libenchant_mock_provider2_la-mock_provider.lo -MD -MP -MF $(DEPDIR)/libenchant_mock_provider2_la-mock_provider.Tpo -c -o libenchant_mock_provider2_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1373 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libenchant_mock_provider2_la-mock_provider.Tpo $(DEPDIR)/libenchant_mock_provider2_la-mock_provider.Plo
1374 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mock_provider.cpp' object='libenchant_mock_provider2_la-mock_provider.lo' libtool=yes @AMDEPBACKSLASH@
1375 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1376 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_mock_provider2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libenchant_mock_provider2_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1377
1378 libenchant_null_describe_la-mock_provider.lo: mock_provider.cpp
1379 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_null_describe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libenchant_null_describe_la-mock_provider.lo -MD -MP -MF $(DEPDIR)/libenchant_null_describe_la-mock_provider.Tpo -c -o libenchant_null_describe_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1380 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libenchant_null_describe_la-mock_provider.Tpo $(DEPDIR)/libenchant_null_describe_la-mock_provider.Plo
1381 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mock_provider.cpp' object='libenchant_null_describe_la-mock_provider.lo' libtool=yes @AMDEPBACKSLASH@
1382 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1383 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_null_describe_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libenchant_null_describe_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1384
1385 libenchant_null_identify_la-mock_provider.lo: mock_provider.cpp
1386 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_null_identify_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libenchant_null_identify_la-mock_provider.lo -MD -MP -MF $(DEPDIR)/libenchant_null_identify_la-mock_provider.Tpo -c -o libenchant_null_identify_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1387 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libenchant_null_identify_la-mock_provider.Tpo $(DEPDIR)/libenchant_null_identify_la-mock_provider.Plo
1388 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mock_provider.cpp' object='libenchant_null_identify_la-mock_provider.lo' libtool=yes @AMDEPBACKSLASH@
1389 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1390 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_null_identify_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libenchant_null_identify_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1391
1392 libenchant_null_provider_la-mock_provider.lo: mock_provider.cpp
1393 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_null_provider_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libenchant_null_provider_la-mock_provider.lo -MD -MP -MF $(DEPDIR)/libenchant_null_provider_la-mock_provider.Tpo -c -o libenchant_null_provider_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1394 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libenchant_null_provider_la-mock_provider.Tpo $(DEPDIR)/libenchant_null_provider_la-mock_provider.Plo
1395 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mock_provider.cpp' object='libenchant_null_provider_la-mock_provider.lo' libtool=yes @AMDEPBACKSLASH@
1396 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1397 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libenchant_null_provider_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libenchant_null_provider_la-mock_provider.lo `test -f 'mock_provider.cpp' || echo '$(srcdir)/'`mock_provider.cpp
1398
1399 main_test-main.test.o: main.test.cpp
1400 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT main_test-main.test.o -MD -MP -MF $(DEPDIR)/main_test-main.test.Tpo -c -o main_test-main.test.o `test -f 'main.test.cpp' || echo '$(srcdir)/'`main.test.cpp
1401 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/main_test-main.test.Tpo $(DEPDIR)/main_test-main.test.Po
1402 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.test.cpp' object='main_test-main.test.o' libtool=no @AMDEPBACKSLASH@
1403 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1404 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o main_test-main.test.o `test -f 'main.test.cpp' || echo '$(srcdir)/'`main.test.cpp
1405
1406 main_test-main.test.obj: main.test.cpp
1407 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT main_test-main.test.obj -MD -MP -MF $(DEPDIR)/main_test-main.test.Tpo -c -o main_test-main.test.obj `if test -f 'main.test.cpp'; then $(CYGPATH_W) 'main.test.cpp'; else $(CYGPATH_W) '$(srcdir)/main.test.cpp'; fi`
1408 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/main_test-main.test.Tpo $(DEPDIR)/main_test-main.test.Po
1409 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.test.cpp' object='main_test-main.test.obj' libtool=no @AMDEPBACKSLASH@
1410 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1411 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o main_test-main.test.obj `if test -f 'main.test.cpp'; then $(CYGPATH_W) 'main.test.cpp'; else $(CYGPATH_W) '$(srcdir)/main.test.cpp'; fi`
1412
1413 dictionary/main_test-enchant_dict_add_tests.o: dictionary/enchant_dict_add_tests.cpp
1414 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_add_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_add_tests.Tpo -c -o dictionary/main_test-enchant_dict_add_tests.o `test -f 'dictionary/enchant_dict_add_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_add_tests.cpp
1415 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_add_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_add_tests.Po
1416 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_add_tests.cpp' object='dictionary/main_test-enchant_dict_add_tests.o' libtool=no @AMDEPBACKSLASH@
1417 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1418 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_add_tests.o `test -f 'dictionary/enchant_dict_add_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_add_tests.cpp
1419
1420 dictionary/main_test-enchant_dict_add_tests.obj: dictionary/enchant_dict_add_tests.cpp
1421 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_add_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_add_tests.Tpo -c -o dictionary/main_test-enchant_dict_add_tests.obj `if test -f 'dictionary/enchant_dict_add_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_add_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_add_tests.cpp'; fi`
1422 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_add_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_add_tests.Po
1423 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_add_tests.cpp' object='dictionary/main_test-enchant_dict_add_tests.obj' libtool=no @AMDEPBACKSLASH@
1424 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1425 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_add_tests.obj `if test -f 'dictionary/enchant_dict_add_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_add_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_add_tests.cpp'; fi`
1426
1427 dictionary/main_test-enchant_dict_add_to_session_tests.o: dictionary/enchant_dict_add_to_session_tests.cpp
1428 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_add_to_session_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_add_to_session_tests.Tpo -c -o dictionary/main_test-enchant_dict_add_to_session_tests.o `test -f 'dictionary/enchant_dict_add_to_session_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_add_to_session_tests.cpp
1429 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_add_to_session_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_add_to_session_tests.Po
1430 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_add_to_session_tests.cpp' object='dictionary/main_test-enchant_dict_add_to_session_tests.o' libtool=no @AMDEPBACKSLASH@
1431 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1432 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_add_to_session_tests.o `test -f 'dictionary/enchant_dict_add_to_session_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_add_to_session_tests.cpp
1433
1434 dictionary/main_test-enchant_dict_add_to_session_tests.obj: dictionary/enchant_dict_add_to_session_tests.cpp
1435 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_add_to_session_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_add_to_session_tests.Tpo -c -o dictionary/main_test-enchant_dict_add_to_session_tests.obj `if test -f 'dictionary/enchant_dict_add_to_session_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_add_to_session_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_add_to_session_tests.cpp'; fi`
1436 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_add_to_session_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_add_to_session_tests.Po
1437 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_add_to_session_tests.cpp' object='dictionary/main_test-enchant_dict_add_to_session_tests.obj' libtool=no @AMDEPBACKSLASH@
1438 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1439 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_add_to_session_tests.obj `if test -f 'dictionary/enchant_dict_add_to_session_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_add_to_session_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_add_to_session_tests.cpp'; fi`
1440
1441 dictionary/main_test-enchant_dict_check_tests.o: dictionary/enchant_dict_check_tests.cpp
1442 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_check_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_check_tests.Tpo -c -o dictionary/main_test-enchant_dict_check_tests.o `test -f 'dictionary/enchant_dict_check_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_check_tests.cpp
1443 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_check_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_check_tests.Po
1444 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_check_tests.cpp' object='dictionary/main_test-enchant_dict_check_tests.o' libtool=no @AMDEPBACKSLASH@
1445 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1446 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_check_tests.o `test -f 'dictionary/enchant_dict_check_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_check_tests.cpp
1447
1448 dictionary/main_test-enchant_dict_check_tests.obj: dictionary/enchant_dict_check_tests.cpp
1449 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_check_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_check_tests.Tpo -c -o dictionary/main_test-enchant_dict_check_tests.obj `if test -f 'dictionary/enchant_dict_check_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_check_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_check_tests.cpp'; fi`
1450 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_check_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_check_tests.Po
1451 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_check_tests.cpp' object='dictionary/main_test-enchant_dict_check_tests.obj' libtool=no @AMDEPBACKSLASH@
1452 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1453 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_check_tests.obj `if test -f 'dictionary/enchant_dict_check_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_check_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_check_tests.cpp'; fi`
1454
1455 dictionary/main_test-enchant_dict_describe_tests.o: dictionary/enchant_dict_describe_tests.cpp
1456 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_describe_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_describe_tests.Tpo -c -o dictionary/main_test-enchant_dict_describe_tests.o `test -f 'dictionary/enchant_dict_describe_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_describe_tests.cpp
1457 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_describe_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_describe_tests.Po
1458 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_describe_tests.cpp' object='dictionary/main_test-enchant_dict_describe_tests.o' libtool=no @AMDEPBACKSLASH@
1459 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1460 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_describe_tests.o `test -f 'dictionary/enchant_dict_describe_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_describe_tests.cpp
1461
1462 dictionary/main_test-enchant_dict_describe_tests.obj: dictionary/enchant_dict_describe_tests.cpp
1463 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_describe_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_describe_tests.Tpo -c -o dictionary/main_test-enchant_dict_describe_tests.obj `if test -f 'dictionary/enchant_dict_describe_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_describe_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_describe_tests.cpp'; fi`
1464 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_describe_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_describe_tests.Po
1465 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_describe_tests.cpp' object='dictionary/main_test-enchant_dict_describe_tests.obj' libtool=no @AMDEPBACKSLASH@
1466 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1467 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_describe_tests.obj `if test -f 'dictionary/enchant_dict_describe_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_describe_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_describe_tests.cpp'; fi`
1468
1469 dictionary/main_test-enchant_dict_free_string_list_tests.o: dictionary/enchant_dict_free_string_list_tests.cpp
1470 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_free_string_list_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_free_string_list_tests.Tpo -c -o dictionary/main_test-enchant_dict_free_string_list_tests.o `test -f 'dictionary/enchant_dict_free_string_list_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_free_string_list_tests.cpp
1471 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_free_string_list_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_free_string_list_tests.Po
1472 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_free_string_list_tests.cpp' object='dictionary/main_test-enchant_dict_free_string_list_tests.o' libtool=no @AMDEPBACKSLASH@
1473 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1474 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_free_string_list_tests.o `test -f 'dictionary/enchant_dict_free_string_list_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_free_string_list_tests.cpp
1475
1476 dictionary/main_test-enchant_dict_free_string_list_tests.obj: dictionary/enchant_dict_free_string_list_tests.cpp
1477 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_free_string_list_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_free_string_list_tests.Tpo -c -o dictionary/main_test-enchant_dict_free_string_list_tests.obj `if test -f 'dictionary/enchant_dict_free_string_list_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_free_string_list_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_free_string_list_tests.cpp'; fi`
1478 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_free_string_list_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_free_string_list_tests.Po
1479 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_free_string_list_tests.cpp' object='dictionary/main_test-enchant_dict_free_string_list_tests.obj' libtool=no @AMDEPBACKSLASH@
1480 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1481 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_free_string_list_tests.obj `if test -f 'dictionary/enchant_dict_free_string_list_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_free_string_list_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_free_string_list_tests.cpp'; fi`
1482
1483 dictionary/main_test-enchant_dict_get_error_tests.o: dictionary/enchant_dict_get_error_tests.cpp
1484 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_get_error_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_get_error_tests.Tpo -c -o dictionary/main_test-enchant_dict_get_error_tests.o `test -f 'dictionary/enchant_dict_get_error_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_get_error_tests.cpp
1485 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_get_error_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_get_error_tests.Po
1486 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_get_error_tests.cpp' object='dictionary/main_test-enchant_dict_get_error_tests.o' libtool=no @AMDEPBACKSLASH@
1487 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1488 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_get_error_tests.o `test -f 'dictionary/enchant_dict_get_error_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_get_error_tests.cpp
1489
1490 dictionary/main_test-enchant_dict_get_error_tests.obj: dictionary/enchant_dict_get_error_tests.cpp
1491 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_get_error_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_get_error_tests.Tpo -c -o dictionary/main_test-enchant_dict_get_error_tests.obj `if test -f 'dictionary/enchant_dict_get_error_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_get_error_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_get_error_tests.cpp'; fi`
1492 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_get_error_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_get_error_tests.Po
1493 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_get_error_tests.cpp' object='dictionary/main_test-enchant_dict_get_error_tests.obj' libtool=no @AMDEPBACKSLASH@
1494 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1495 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_get_error_tests.obj `if test -f 'dictionary/enchant_dict_get_error_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_get_error_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_get_error_tests.cpp'; fi`
1496
1497 dictionary/main_test-enchant_dict_get_extra_word_characters_tests.o: dictionary/enchant_dict_get_extra_word_characters_tests.cpp
1498 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_get_extra_word_characters_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_get_extra_word_characters_tests.Tpo -c -o dictionary/main_test-enchant_dict_get_extra_word_characters_tests.o `test -f 'dictionary/enchant_dict_get_extra_word_characters_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_get_extra_word_characters_tests.cpp
1499 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_get_extra_word_characters_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_get_extra_word_characters_tests.Po
1500 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_get_extra_word_characters_tests.cpp' object='dictionary/main_test-enchant_dict_get_extra_word_characters_tests.o' libtool=no @AMDEPBACKSLASH@
1501 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1502 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_get_extra_word_characters_tests.o `test -f 'dictionary/enchant_dict_get_extra_word_characters_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_get_extra_word_characters_tests.cpp
1503
1504 dictionary/main_test-enchant_dict_get_extra_word_characters_tests.obj: dictionary/enchant_dict_get_extra_word_characters_tests.cpp
1505 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_get_extra_word_characters_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_get_extra_word_characters_tests.Tpo -c -o dictionary/main_test-enchant_dict_get_extra_word_characters_tests.obj `if test -f 'dictionary/enchant_dict_get_extra_word_characters_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_get_extra_word_characters_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_get_extra_word_characters_tests.cpp'; fi`
1506 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_get_extra_word_characters_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_get_extra_word_characters_tests.Po
1507 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_get_extra_word_characters_tests.cpp' object='dictionary/main_test-enchant_dict_get_extra_word_characters_tests.obj' libtool=no @AMDEPBACKSLASH@
1508 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1509 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_get_extra_word_characters_tests.obj `if test -f 'dictionary/enchant_dict_get_extra_word_characters_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_get_extra_word_characters_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_get_extra_word_characters_tests.cpp'; fi`
1510
1511 dictionary/main_test-enchant_dict_is_added_tests.o: dictionary/enchant_dict_is_added_tests.cpp
1512 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_is_added_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_is_added_tests.Tpo -c -o dictionary/main_test-enchant_dict_is_added_tests.o `test -f 'dictionary/enchant_dict_is_added_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_is_added_tests.cpp
1513 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_is_added_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_is_added_tests.Po
1514 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_is_added_tests.cpp' object='dictionary/main_test-enchant_dict_is_added_tests.o' libtool=no @AMDEPBACKSLASH@
1515 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1516 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_is_added_tests.o `test -f 'dictionary/enchant_dict_is_added_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_is_added_tests.cpp
1517
1518 dictionary/main_test-enchant_dict_is_added_tests.obj: dictionary/enchant_dict_is_added_tests.cpp
1519 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_is_added_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_is_added_tests.Tpo -c -o dictionary/main_test-enchant_dict_is_added_tests.obj `if test -f 'dictionary/enchant_dict_is_added_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_is_added_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_is_added_tests.cpp'; fi`
1520 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_is_added_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_is_added_tests.Po
1521 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_is_added_tests.cpp' object='dictionary/main_test-enchant_dict_is_added_tests.obj' libtool=no @AMDEPBACKSLASH@
1522 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1523 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_is_added_tests.obj `if test -f 'dictionary/enchant_dict_is_added_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_is_added_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_is_added_tests.cpp'; fi`
1524
1525 dictionary/main_test-enchant_dict_is_removed_tests.o: dictionary/enchant_dict_is_removed_tests.cpp
1526 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_is_removed_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_is_removed_tests.Tpo -c -o dictionary/main_test-enchant_dict_is_removed_tests.o `test -f 'dictionary/enchant_dict_is_removed_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_is_removed_tests.cpp
1527 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_is_removed_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_is_removed_tests.Po
1528 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_is_removed_tests.cpp' object='dictionary/main_test-enchant_dict_is_removed_tests.o' libtool=no @AMDEPBACKSLASH@
1529 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1530 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_is_removed_tests.o `test -f 'dictionary/enchant_dict_is_removed_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_is_removed_tests.cpp
1531
1532 dictionary/main_test-enchant_dict_is_removed_tests.obj: dictionary/enchant_dict_is_removed_tests.cpp
1533 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_is_removed_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_is_removed_tests.Tpo -c -o dictionary/main_test-enchant_dict_is_removed_tests.obj `if test -f 'dictionary/enchant_dict_is_removed_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_is_removed_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_is_removed_tests.cpp'; fi`
1534 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_is_removed_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_is_removed_tests.Po
1535 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_is_removed_tests.cpp' object='dictionary/main_test-enchant_dict_is_removed_tests.obj' libtool=no @AMDEPBACKSLASH@
1536 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1537 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_is_removed_tests.obj `if test -f 'dictionary/enchant_dict_is_removed_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_is_removed_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_is_removed_tests.cpp'; fi`
1538
1539 dictionary/main_test-enchant_dict_is_word_character_tests.o: dictionary/enchant_dict_is_word_character_tests.cpp
1540 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_is_word_character_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_is_word_character_tests.Tpo -c -o dictionary/main_test-enchant_dict_is_word_character_tests.o `test -f 'dictionary/enchant_dict_is_word_character_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_is_word_character_tests.cpp
1541 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_is_word_character_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_is_word_character_tests.Po
1542 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_is_word_character_tests.cpp' object='dictionary/main_test-enchant_dict_is_word_character_tests.o' libtool=no @AMDEPBACKSLASH@
1543 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1544 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_is_word_character_tests.o `test -f 'dictionary/enchant_dict_is_word_character_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_is_word_character_tests.cpp
1545
1546 dictionary/main_test-enchant_dict_is_word_character_tests.obj: dictionary/enchant_dict_is_word_character_tests.cpp
1547 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_is_word_character_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_is_word_character_tests.Tpo -c -o dictionary/main_test-enchant_dict_is_word_character_tests.obj `if test -f 'dictionary/enchant_dict_is_word_character_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_is_word_character_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_is_word_character_tests.cpp'; fi`
1548 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_is_word_character_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_is_word_character_tests.Po
1549 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_is_word_character_tests.cpp' object='dictionary/main_test-enchant_dict_is_word_character_tests.obj' libtool=no @AMDEPBACKSLASH@
1550 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1551 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_is_word_character_tests.obj `if test -f 'dictionary/enchant_dict_is_word_character_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_is_word_character_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_is_word_character_tests.cpp'; fi`
1552
1553 dictionary/main_test-enchant_dict_remove_from_session_tests.o: dictionary/enchant_dict_remove_from_session_tests.cpp
1554 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_remove_from_session_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_remove_from_session_tests.Tpo -c -o dictionary/main_test-enchant_dict_remove_from_session_tests.o `test -f 'dictionary/enchant_dict_remove_from_session_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_remove_from_session_tests.cpp
1555 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_remove_from_session_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_remove_from_session_tests.Po
1556 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_remove_from_session_tests.cpp' object='dictionary/main_test-enchant_dict_remove_from_session_tests.o' libtool=no @AMDEPBACKSLASH@
1557 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1558 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_remove_from_session_tests.o `test -f 'dictionary/enchant_dict_remove_from_session_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_remove_from_session_tests.cpp
1559
1560 dictionary/main_test-enchant_dict_remove_from_session_tests.obj: dictionary/enchant_dict_remove_from_session_tests.cpp
1561 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_remove_from_session_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_remove_from_session_tests.Tpo -c -o dictionary/main_test-enchant_dict_remove_from_session_tests.obj `if test -f 'dictionary/enchant_dict_remove_from_session_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_remove_from_session_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_remove_from_session_tests.cpp'; fi`
1562 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_remove_from_session_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_remove_from_session_tests.Po
1563 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_remove_from_session_tests.cpp' object='dictionary/main_test-enchant_dict_remove_from_session_tests.obj' libtool=no @AMDEPBACKSLASH@
1564 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1565 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_remove_from_session_tests.obj `if test -f 'dictionary/enchant_dict_remove_from_session_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_remove_from_session_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_remove_from_session_tests.cpp'; fi`
1566
1567 dictionary/main_test-enchant_dict_remove_tests.o: dictionary/enchant_dict_remove_tests.cpp
1568 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_remove_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_remove_tests.Tpo -c -o dictionary/main_test-enchant_dict_remove_tests.o `test -f 'dictionary/enchant_dict_remove_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_remove_tests.cpp
1569 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_remove_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_remove_tests.Po
1570 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_remove_tests.cpp' object='dictionary/main_test-enchant_dict_remove_tests.o' libtool=no @AMDEPBACKSLASH@
1571 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1572 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_remove_tests.o `test -f 'dictionary/enchant_dict_remove_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_remove_tests.cpp
1573
1574 dictionary/main_test-enchant_dict_remove_tests.obj: dictionary/enchant_dict_remove_tests.cpp
1575 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_remove_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_remove_tests.Tpo -c -o dictionary/main_test-enchant_dict_remove_tests.obj `if test -f 'dictionary/enchant_dict_remove_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_remove_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_remove_tests.cpp'; fi`
1576 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_remove_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_remove_tests.Po
1577 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_remove_tests.cpp' object='dictionary/main_test-enchant_dict_remove_tests.obj' libtool=no @AMDEPBACKSLASH@
1578 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1579 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_remove_tests.obj `if test -f 'dictionary/enchant_dict_remove_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_remove_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_remove_tests.cpp'; fi`
1580
1581 dictionary/main_test-enchant_dict_store_replacement_tests.o: dictionary/enchant_dict_store_replacement_tests.cpp
1582 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_store_replacement_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_store_replacement_tests.Tpo -c -o dictionary/main_test-enchant_dict_store_replacement_tests.o `test -f 'dictionary/enchant_dict_store_replacement_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_store_replacement_tests.cpp
1583 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_store_replacement_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_store_replacement_tests.Po
1584 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_store_replacement_tests.cpp' object='dictionary/main_test-enchant_dict_store_replacement_tests.o' libtool=no @AMDEPBACKSLASH@
1585 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1586 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_store_replacement_tests.o `test -f 'dictionary/enchant_dict_store_replacement_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_store_replacement_tests.cpp
1587
1588 dictionary/main_test-enchant_dict_store_replacement_tests.obj: dictionary/enchant_dict_store_replacement_tests.cpp
1589 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_store_replacement_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_store_replacement_tests.Tpo -c -o dictionary/main_test-enchant_dict_store_replacement_tests.obj `if test -f 'dictionary/enchant_dict_store_replacement_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_store_replacement_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_store_replacement_tests.cpp'; fi`
1590 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_store_replacement_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_store_replacement_tests.Po
1591 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_store_replacement_tests.cpp' object='dictionary/main_test-enchant_dict_store_replacement_tests.obj' libtool=no @AMDEPBACKSLASH@
1592 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1593 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_store_replacement_tests.obj `if test -f 'dictionary/enchant_dict_store_replacement_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_store_replacement_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_store_replacement_tests.cpp'; fi`
1594
1595 dictionary/main_test-enchant_dict_suggest_tests.o: dictionary/enchant_dict_suggest_tests.cpp
1596 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_suggest_tests.o -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_suggest_tests.Tpo -c -o dictionary/main_test-enchant_dict_suggest_tests.o `test -f 'dictionary/enchant_dict_suggest_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_suggest_tests.cpp
1597 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_suggest_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_suggest_tests.Po
1598 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_suggest_tests.cpp' object='dictionary/main_test-enchant_dict_suggest_tests.o' libtool=no @AMDEPBACKSLASH@
1599 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1600 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_suggest_tests.o `test -f 'dictionary/enchant_dict_suggest_tests.cpp' || echo '$(srcdir)/'`dictionary/enchant_dict_suggest_tests.cpp
1601
1602 dictionary/main_test-enchant_dict_suggest_tests.obj: dictionary/enchant_dict_suggest_tests.cpp
1603 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dictionary/main_test-enchant_dict_suggest_tests.obj -MD -MP -MF dictionary/$(DEPDIR)/main_test-enchant_dict_suggest_tests.Tpo -c -o dictionary/main_test-enchant_dict_suggest_tests.obj `if test -f 'dictionary/enchant_dict_suggest_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_suggest_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_suggest_tests.cpp'; fi`
1604 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) dictionary/$(DEPDIR)/main_test-enchant_dict_suggest_tests.Tpo dictionary/$(DEPDIR)/main_test-enchant_dict_suggest_tests.Po
1605 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dictionary/enchant_dict_suggest_tests.cpp' object='dictionary/main_test-enchant_dict_suggest_tests.obj' libtool=no @AMDEPBACKSLASH@
1606 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1607 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dictionary/main_test-enchant_dict_suggest_tests.obj `if test -f 'dictionary/enchant_dict_suggest_tests.cpp'; then $(CYGPATH_W) 'dictionary/enchant_dict_suggest_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/dictionary/enchant_dict_suggest_tests.cpp'; fi`
1608
1609 broker/main_test-enchant_broker_describe_tests.o: broker/enchant_broker_describe_tests.cpp
1610 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_describe_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_describe_tests.Tpo -c -o broker/main_test-enchant_broker_describe_tests.o `test -f 'broker/enchant_broker_describe_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_describe_tests.cpp
1611 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_describe_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_describe_tests.Po
1612 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_describe_tests.cpp' object='broker/main_test-enchant_broker_describe_tests.o' libtool=no @AMDEPBACKSLASH@
1613 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1614 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_describe_tests.o `test -f 'broker/enchant_broker_describe_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_describe_tests.cpp
1615
1616 broker/main_test-enchant_broker_describe_tests.obj: broker/enchant_broker_describe_tests.cpp
1617 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_describe_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_describe_tests.Tpo -c -o broker/main_test-enchant_broker_describe_tests.obj `if test -f 'broker/enchant_broker_describe_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_describe_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_describe_tests.cpp'; fi`
1618 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_describe_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_describe_tests.Po
1619 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_describe_tests.cpp' object='broker/main_test-enchant_broker_describe_tests.obj' libtool=no @AMDEPBACKSLASH@
1620 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1621 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_describe_tests.obj `if test -f 'broker/enchant_broker_describe_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_describe_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_describe_tests.cpp'; fi`
1622
1623 broker/main_test-enchant_broker_dict_exists_tests.o: broker/enchant_broker_dict_exists_tests.cpp
1624 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_dict_exists_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_dict_exists_tests.Tpo -c -o broker/main_test-enchant_broker_dict_exists_tests.o `test -f 'broker/enchant_broker_dict_exists_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_dict_exists_tests.cpp
1625 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_dict_exists_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_dict_exists_tests.Po
1626 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_dict_exists_tests.cpp' object='broker/main_test-enchant_broker_dict_exists_tests.o' libtool=no @AMDEPBACKSLASH@
1627 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1628 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_dict_exists_tests.o `test -f 'broker/enchant_broker_dict_exists_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_dict_exists_tests.cpp
1629
1630 broker/main_test-enchant_broker_dict_exists_tests.obj: broker/enchant_broker_dict_exists_tests.cpp
1631 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_dict_exists_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_dict_exists_tests.Tpo -c -o broker/main_test-enchant_broker_dict_exists_tests.obj `if test -f 'broker/enchant_broker_dict_exists_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_dict_exists_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_dict_exists_tests.cpp'; fi`
1632 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_dict_exists_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_dict_exists_tests.Po
1633 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_dict_exists_tests.cpp' object='broker/main_test-enchant_broker_dict_exists_tests.obj' libtool=no @AMDEPBACKSLASH@
1634 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1635 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_dict_exists_tests.obj `if test -f 'broker/enchant_broker_dict_exists_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_dict_exists_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_dict_exists_tests.cpp'; fi`
1636
1637 broker/main_test-enchant_broker_free_dict_tests.o: broker/enchant_broker_free_dict_tests.cpp
1638 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_free_dict_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_free_dict_tests.Tpo -c -o broker/main_test-enchant_broker_free_dict_tests.o `test -f 'broker/enchant_broker_free_dict_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_free_dict_tests.cpp
1639 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_free_dict_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_free_dict_tests.Po
1640 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_free_dict_tests.cpp' object='broker/main_test-enchant_broker_free_dict_tests.o' libtool=no @AMDEPBACKSLASH@
1641 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1642 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_free_dict_tests.o `test -f 'broker/enchant_broker_free_dict_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_free_dict_tests.cpp
1643
1644 broker/main_test-enchant_broker_free_dict_tests.obj: broker/enchant_broker_free_dict_tests.cpp
1645 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_free_dict_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_free_dict_tests.Tpo -c -o broker/main_test-enchant_broker_free_dict_tests.obj `if test -f 'broker/enchant_broker_free_dict_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_free_dict_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_free_dict_tests.cpp'; fi`
1646 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_free_dict_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_free_dict_tests.Po
1647 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_free_dict_tests.cpp' object='broker/main_test-enchant_broker_free_dict_tests.obj' libtool=no @AMDEPBACKSLASH@
1648 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1649 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_free_dict_tests.obj `if test -f 'broker/enchant_broker_free_dict_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_free_dict_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_free_dict_tests.cpp'; fi`
1650
1651 broker/main_test-enchant_broker_free_tests.o: broker/enchant_broker_free_tests.cpp
1652 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_free_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_free_tests.Tpo -c -o broker/main_test-enchant_broker_free_tests.o `test -f 'broker/enchant_broker_free_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_free_tests.cpp
1653 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_free_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_free_tests.Po
1654 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_free_tests.cpp' object='broker/main_test-enchant_broker_free_tests.o' libtool=no @AMDEPBACKSLASH@
1655 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1656 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_free_tests.o `test -f 'broker/enchant_broker_free_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_free_tests.cpp
1657
1658 broker/main_test-enchant_broker_free_tests.obj: broker/enchant_broker_free_tests.cpp
1659 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_free_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_free_tests.Tpo -c -o broker/main_test-enchant_broker_free_tests.obj `if test -f 'broker/enchant_broker_free_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_free_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_free_tests.cpp'; fi`
1660 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_free_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_free_tests.Po
1661 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_free_tests.cpp' object='broker/main_test-enchant_broker_free_tests.obj' libtool=no @AMDEPBACKSLASH@
1662 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1663 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_free_tests.obj `if test -f 'broker/enchant_broker_free_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_free_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_free_tests.cpp'; fi`
1664
1665 broker/main_test-enchant_broker_get_error_tests.o: broker/enchant_broker_get_error_tests.cpp
1666 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_get_error_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_get_error_tests.Tpo -c -o broker/main_test-enchant_broker_get_error_tests.o `test -f 'broker/enchant_broker_get_error_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_get_error_tests.cpp
1667 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_get_error_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_get_error_tests.Po
1668 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_get_error_tests.cpp' object='broker/main_test-enchant_broker_get_error_tests.o' libtool=no @AMDEPBACKSLASH@
1669 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1670 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_get_error_tests.o `test -f 'broker/enchant_broker_get_error_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_get_error_tests.cpp
1671
1672 broker/main_test-enchant_broker_get_error_tests.obj: broker/enchant_broker_get_error_tests.cpp
1673 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_get_error_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_get_error_tests.Tpo -c -o broker/main_test-enchant_broker_get_error_tests.obj `if test -f 'broker/enchant_broker_get_error_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_get_error_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_get_error_tests.cpp'; fi`
1674 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_get_error_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_get_error_tests.Po
1675 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_get_error_tests.cpp' object='broker/main_test-enchant_broker_get_error_tests.obj' libtool=no @AMDEPBACKSLASH@
1676 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1677 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_get_error_tests.obj `if test -f 'broker/enchant_broker_get_error_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_get_error_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_get_error_tests.cpp'; fi`
1678
1679 broker/main_test-enchant_broker_init_tests.o: broker/enchant_broker_init_tests.cpp
1680 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_init_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_init_tests.Tpo -c -o broker/main_test-enchant_broker_init_tests.o `test -f 'broker/enchant_broker_init_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_init_tests.cpp
1681 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_init_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_init_tests.Po
1682 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_init_tests.cpp' object='broker/main_test-enchant_broker_init_tests.o' libtool=no @AMDEPBACKSLASH@
1683 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1684 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_init_tests.o `test -f 'broker/enchant_broker_init_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_init_tests.cpp
1685
1686 broker/main_test-enchant_broker_init_tests.obj: broker/enchant_broker_init_tests.cpp
1687 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_init_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_init_tests.Tpo -c -o broker/main_test-enchant_broker_init_tests.obj `if test -f 'broker/enchant_broker_init_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_init_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_init_tests.cpp'; fi`
1688 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_init_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_init_tests.Po
1689 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_init_tests.cpp' object='broker/main_test-enchant_broker_init_tests.obj' libtool=no @AMDEPBACKSLASH@
1690 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1691 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_init_tests.obj `if test -f 'broker/enchant_broker_init_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_init_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_init_tests.cpp'; fi`
1692
1693 broker/main_test-enchant_broker_list_dicts_tests.o: broker/enchant_broker_list_dicts_tests.cpp
1694 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_list_dicts_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_list_dicts_tests.Tpo -c -o broker/main_test-enchant_broker_list_dicts_tests.o `test -f 'broker/enchant_broker_list_dicts_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_list_dicts_tests.cpp
1695 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_list_dicts_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_list_dicts_tests.Po
1696 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_list_dicts_tests.cpp' object='broker/main_test-enchant_broker_list_dicts_tests.o' libtool=no @AMDEPBACKSLASH@
1697 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1698 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_list_dicts_tests.o `test -f 'broker/enchant_broker_list_dicts_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_list_dicts_tests.cpp
1699
1700 broker/main_test-enchant_broker_list_dicts_tests.obj: broker/enchant_broker_list_dicts_tests.cpp
1701 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_list_dicts_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_list_dicts_tests.Tpo -c -o broker/main_test-enchant_broker_list_dicts_tests.obj `if test -f 'broker/enchant_broker_list_dicts_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_list_dicts_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_list_dicts_tests.cpp'; fi`
1702 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_list_dicts_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_list_dicts_tests.Po
1703 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_list_dicts_tests.cpp' object='broker/main_test-enchant_broker_list_dicts_tests.obj' libtool=no @AMDEPBACKSLASH@
1704 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1705 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_list_dicts_tests.obj `if test -f 'broker/enchant_broker_list_dicts_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_list_dicts_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_list_dicts_tests.cpp'; fi`
1706
1707 broker/main_test-enchant_broker_request_dict_tests.o: broker/enchant_broker_request_dict_tests.cpp
1708 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_request_dict_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_request_dict_tests.Tpo -c -o broker/main_test-enchant_broker_request_dict_tests.o `test -f 'broker/enchant_broker_request_dict_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_request_dict_tests.cpp
1709 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_request_dict_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_request_dict_tests.Po
1710 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_request_dict_tests.cpp' object='broker/main_test-enchant_broker_request_dict_tests.o' libtool=no @AMDEPBACKSLASH@
1711 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1712 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_request_dict_tests.o `test -f 'broker/enchant_broker_request_dict_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_request_dict_tests.cpp
1713
1714 broker/main_test-enchant_broker_request_dict_tests.obj: broker/enchant_broker_request_dict_tests.cpp
1715 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_request_dict_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_request_dict_tests.Tpo -c -o broker/main_test-enchant_broker_request_dict_tests.obj `if test -f 'broker/enchant_broker_request_dict_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_request_dict_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_request_dict_tests.cpp'; fi`
1716 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_request_dict_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_request_dict_tests.Po
1717 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_request_dict_tests.cpp' object='broker/main_test-enchant_broker_request_dict_tests.obj' libtool=no @AMDEPBACKSLASH@
1718 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1719 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_request_dict_tests.obj `if test -f 'broker/enchant_broker_request_dict_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_request_dict_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_request_dict_tests.cpp'; fi`
1720
1721 broker/main_test-enchant_broker_request_pwl_dict_tests.o: broker/enchant_broker_request_pwl_dict_tests.cpp
1722 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_request_pwl_dict_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_request_pwl_dict_tests.Tpo -c -o broker/main_test-enchant_broker_request_pwl_dict_tests.o `test -f 'broker/enchant_broker_request_pwl_dict_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_request_pwl_dict_tests.cpp
1723 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_request_pwl_dict_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_request_pwl_dict_tests.Po
1724 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_request_pwl_dict_tests.cpp' object='broker/main_test-enchant_broker_request_pwl_dict_tests.o' libtool=no @AMDEPBACKSLASH@
1725 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1726 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_request_pwl_dict_tests.o `test -f 'broker/enchant_broker_request_pwl_dict_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_request_pwl_dict_tests.cpp
1727
1728 broker/main_test-enchant_broker_request_pwl_dict_tests.obj: broker/enchant_broker_request_pwl_dict_tests.cpp
1729 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_request_pwl_dict_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_request_pwl_dict_tests.Tpo -c -o broker/main_test-enchant_broker_request_pwl_dict_tests.obj `if test -f 'broker/enchant_broker_request_pwl_dict_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_request_pwl_dict_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_request_pwl_dict_tests.cpp'; fi`
1730 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_request_pwl_dict_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_request_pwl_dict_tests.Po
1731 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_request_pwl_dict_tests.cpp' object='broker/main_test-enchant_broker_request_pwl_dict_tests.obj' libtool=no @AMDEPBACKSLASH@
1732 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1733 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_request_pwl_dict_tests.obj `if test -f 'broker/enchant_broker_request_pwl_dict_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_request_pwl_dict_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_request_pwl_dict_tests.cpp'; fi`
1734
1735 broker/main_test-enchant_broker_set_ordering_tests.o: broker/enchant_broker_set_ordering_tests.cpp
1736 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_set_ordering_tests.o -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_set_ordering_tests.Tpo -c -o broker/main_test-enchant_broker_set_ordering_tests.o `test -f 'broker/enchant_broker_set_ordering_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_set_ordering_tests.cpp
1737 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_set_ordering_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_set_ordering_tests.Po
1738 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_set_ordering_tests.cpp' object='broker/main_test-enchant_broker_set_ordering_tests.o' libtool=no @AMDEPBACKSLASH@
1739 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1740 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_set_ordering_tests.o `test -f 'broker/enchant_broker_set_ordering_tests.cpp' || echo '$(srcdir)/'`broker/enchant_broker_set_ordering_tests.cpp
1741
1742 broker/main_test-enchant_broker_set_ordering_tests.obj: broker/enchant_broker_set_ordering_tests.cpp
1743 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT broker/main_test-enchant_broker_set_ordering_tests.obj -MD -MP -MF broker/$(DEPDIR)/main_test-enchant_broker_set_ordering_tests.Tpo -c -o broker/main_test-enchant_broker_set_ordering_tests.obj `if test -f 'broker/enchant_broker_set_ordering_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_set_ordering_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_set_ordering_tests.cpp'; fi`
1744 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) broker/$(DEPDIR)/main_test-enchant_broker_set_ordering_tests.Tpo broker/$(DEPDIR)/main_test-enchant_broker_set_ordering_tests.Po
1745 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='broker/enchant_broker_set_ordering_tests.cpp' object='broker/main_test-enchant_broker_set_ordering_tests.obj' libtool=no @AMDEPBACKSLASH@
1746 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1747 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o broker/main_test-enchant_broker_set_ordering_tests.obj `if test -f 'broker/enchant_broker_set_ordering_tests.cpp'; then $(CYGPATH_W) 'broker/enchant_broker_set_ordering_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/broker/enchant_broker_set_ordering_tests.cpp'; fi`
1748
1749 pwl/main_test-enchant_pwl_tests.o: pwl/enchant_pwl_tests.cpp
1750 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pwl/main_test-enchant_pwl_tests.o -MD -MP -MF pwl/$(DEPDIR)/main_test-enchant_pwl_tests.Tpo -c -o pwl/main_test-enchant_pwl_tests.o `test -f 'pwl/enchant_pwl_tests.cpp' || echo '$(srcdir)/'`pwl/enchant_pwl_tests.cpp
1751 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) pwl/$(DEPDIR)/main_test-enchant_pwl_tests.Tpo pwl/$(DEPDIR)/main_test-enchant_pwl_tests.Po
1752 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pwl/enchant_pwl_tests.cpp' object='pwl/main_test-enchant_pwl_tests.o' libtool=no @AMDEPBACKSLASH@
1753 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1754 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pwl/main_test-enchant_pwl_tests.o `test -f 'pwl/enchant_pwl_tests.cpp' || echo '$(srcdir)/'`pwl/enchant_pwl_tests.cpp
1755
1756 pwl/main_test-enchant_pwl_tests.obj: pwl/enchant_pwl_tests.cpp
1757 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pwl/main_test-enchant_pwl_tests.obj -MD -MP -MF pwl/$(DEPDIR)/main_test-enchant_pwl_tests.Tpo -c -o pwl/main_test-enchant_pwl_tests.obj `if test -f 'pwl/enchant_pwl_tests.cpp'; then $(CYGPATH_W) 'pwl/enchant_pwl_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/pwl/enchant_pwl_tests.cpp'; fi`
1758 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) pwl/$(DEPDIR)/main_test-enchant_pwl_tests.Tpo pwl/$(DEPDIR)/main_test-enchant_pwl_tests.Po
1759 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pwl/enchant_pwl_tests.cpp' object='pwl/main_test-enchant_pwl_tests.obj' libtool=no @AMDEPBACKSLASH@
1760 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1761 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pwl/main_test-enchant_pwl_tests.obj `if test -f 'pwl/enchant_pwl_tests.cpp'; then $(CYGPATH_W) 'pwl/enchant_pwl_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/pwl/enchant_pwl_tests.cpp'; fi`
1762
1763 provider/main_test-enchant_provider_broker_set_error_tests.o: provider/enchant_provider_broker_set_error_tests.cpp
1764 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_broker_set_error_tests.o -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_broker_set_error_tests.Tpo -c -o provider/main_test-enchant_provider_broker_set_error_tests.o `test -f 'provider/enchant_provider_broker_set_error_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_broker_set_error_tests.cpp
1765 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_broker_set_error_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_broker_set_error_tests.Po
1766 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_broker_set_error_tests.cpp' object='provider/main_test-enchant_provider_broker_set_error_tests.o' libtool=no @AMDEPBACKSLASH@
1767 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1768 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_broker_set_error_tests.o `test -f 'provider/enchant_provider_broker_set_error_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_broker_set_error_tests.cpp
1769
1770 provider/main_test-enchant_provider_broker_set_error_tests.obj: provider/enchant_provider_broker_set_error_tests.cpp
1771 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_broker_set_error_tests.obj -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_broker_set_error_tests.Tpo -c -o provider/main_test-enchant_provider_broker_set_error_tests.obj `if test -f 'provider/enchant_provider_broker_set_error_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_broker_set_error_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_broker_set_error_tests.cpp'; fi`
1772 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_broker_set_error_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_broker_set_error_tests.Po
1773 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_broker_set_error_tests.cpp' object='provider/main_test-enchant_provider_broker_set_error_tests.obj' libtool=no @AMDEPBACKSLASH@
1774 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1775 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_broker_set_error_tests.obj `if test -f 'provider/enchant_provider_broker_set_error_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_broker_set_error_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_broker_set_error_tests.cpp'; fi`
1776
1777 provider/main_test-enchant_provider_dict_set_error_tests.o: provider/enchant_provider_dict_set_error_tests.cpp
1778 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_dict_set_error_tests.o -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_dict_set_error_tests.Tpo -c -o provider/main_test-enchant_provider_dict_set_error_tests.o `test -f 'provider/enchant_provider_dict_set_error_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_dict_set_error_tests.cpp
1779 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_dict_set_error_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_dict_set_error_tests.Po
1780 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_dict_set_error_tests.cpp' object='provider/main_test-enchant_provider_dict_set_error_tests.o' libtool=no @AMDEPBACKSLASH@
1781 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1782 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_dict_set_error_tests.o `test -f 'provider/enchant_provider_dict_set_error_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_dict_set_error_tests.cpp
1783
1784 provider/main_test-enchant_provider_dict_set_error_tests.obj: provider/enchant_provider_dict_set_error_tests.cpp
1785 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_dict_set_error_tests.obj -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_dict_set_error_tests.Tpo -c -o provider/main_test-enchant_provider_dict_set_error_tests.obj `if test -f 'provider/enchant_provider_dict_set_error_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_dict_set_error_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_dict_set_error_tests.cpp'; fi`
1786 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_dict_set_error_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_dict_set_error_tests.Po
1787 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_dict_set_error_tests.cpp' object='provider/main_test-enchant_provider_dict_set_error_tests.obj' libtool=no @AMDEPBACKSLASH@
1788 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1789 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_dict_set_error_tests.obj `if test -f 'provider/enchant_provider_dict_set_error_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_dict_set_error_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_dict_set_error_tests.cpp'; fi`
1790
1791 provider/main_test-enchant_provider_get_prefix_dir_tests.o: provider/enchant_provider_get_prefix_dir_tests.cpp
1792 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_get_prefix_dir_tests.o -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_get_prefix_dir_tests.Tpo -c -o provider/main_test-enchant_provider_get_prefix_dir_tests.o `test -f 'provider/enchant_provider_get_prefix_dir_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_get_prefix_dir_tests.cpp
1793 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_get_prefix_dir_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_get_prefix_dir_tests.Po
1794 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_get_prefix_dir_tests.cpp' object='provider/main_test-enchant_provider_get_prefix_dir_tests.o' libtool=no @AMDEPBACKSLASH@
1795 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1796 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_get_prefix_dir_tests.o `test -f 'provider/enchant_provider_get_prefix_dir_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_get_prefix_dir_tests.cpp
1797
1798 provider/main_test-enchant_provider_get_prefix_dir_tests.obj: provider/enchant_provider_get_prefix_dir_tests.cpp
1799 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_get_prefix_dir_tests.obj -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_get_prefix_dir_tests.Tpo -c -o provider/main_test-enchant_provider_get_prefix_dir_tests.obj `if test -f 'provider/enchant_provider_get_prefix_dir_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_get_prefix_dir_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_get_prefix_dir_tests.cpp'; fi`
1800 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_get_prefix_dir_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_get_prefix_dir_tests.Po
1801 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_get_prefix_dir_tests.cpp' object='provider/main_test-enchant_provider_get_prefix_dir_tests.obj' libtool=no @AMDEPBACKSLASH@
1802 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1803 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_get_prefix_dir_tests.obj `if test -f 'provider/enchant_provider_get_prefix_dir_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_get_prefix_dir_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_get_prefix_dir_tests.cpp'; fi`
1804
1805 provider/main_test-enchant_provider_get_user_config_dirs_tests.o: provider/enchant_provider_get_user_config_dirs_tests.cpp
1806 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_get_user_config_dirs_tests.o -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_get_user_config_dirs_tests.Tpo -c -o provider/main_test-enchant_provider_get_user_config_dirs_tests.o `test -f 'provider/enchant_provider_get_user_config_dirs_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_get_user_config_dirs_tests.cpp
1807 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_get_user_config_dirs_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_get_user_config_dirs_tests.Po
1808 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_get_user_config_dirs_tests.cpp' object='provider/main_test-enchant_provider_get_user_config_dirs_tests.o' libtool=no @AMDEPBACKSLASH@
1809 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1810 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_get_user_config_dirs_tests.o `test -f 'provider/enchant_provider_get_user_config_dirs_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_get_user_config_dirs_tests.cpp
1811
1812 provider/main_test-enchant_provider_get_user_config_dirs_tests.obj: provider/enchant_provider_get_user_config_dirs_tests.cpp
1813 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_get_user_config_dirs_tests.obj -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_get_user_config_dirs_tests.Tpo -c -o provider/main_test-enchant_provider_get_user_config_dirs_tests.obj `if test -f 'provider/enchant_provider_get_user_config_dirs_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_get_user_config_dirs_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_get_user_config_dirs_tests.cpp'; fi`
1814 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_get_user_config_dirs_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_get_user_config_dirs_tests.Po
1815 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_get_user_config_dirs_tests.cpp' object='provider/main_test-enchant_provider_get_user_config_dirs_tests.obj' libtool=no @AMDEPBACKSLASH@
1816 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1817 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_get_user_config_dirs_tests.obj `if test -f 'provider/enchant_provider_get_user_config_dirs_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_get_user_config_dirs_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_get_user_config_dirs_tests.cpp'; fi`
1818
1819 provider/main_test-enchant_provider_get_user_language_tests.o: provider/enchant_provider_get_user_language_tests.cpp
1820 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_get_user_language_tests.o -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_get_user_language_tests.Tpo -c -o provider/main_test-enchant_provider_get_user_language_tests.o `test -f 'provider/enchant_provider_get_user_language_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_get_user_language_tests.cpp
1821 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_get_user_language_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_get_user_language_tests.Po
1822 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_get_user_language_tests.cpp' object='provider/main_test-enchant_provider_get_user_language_tests.o' libtool=no @AMDEPBACKSLASH@
1823 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1824 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_get_user_language_tests.o `test -f 'provider/enchant_provider_get_user_language_tests.cpp' || echo '$(srcdir)/'`provider/enchant_provider_get_user_language_tests.cpp
1825
1826 provider/main_test-enchant_provider_get_user_language_tests.obj: provider/enchant_provider_get_user_language_tests.cpp
1827 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT provider/main_test-enchant_provider_get_user_language_tests.obj -MD -MP -MF provider/$(DEPDIR)/main_test-enchant_provider_get_user_language_tests.Tpo -c -o provider/main_test-enchant_provider_get_user_language_tests.obj `if test -f 'provider/enchant_provider_get_user_language_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_get_user_language_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_get_user_language_tests.cpp'; fi`
1828 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) provider/$(DEPDIR)/main_test-enchant_provider_get_user_language_tests.Tpo provider/$(DEPDIR)/main_test-enchant_provider_get_user_language_tests.Po
1829 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='provider/enchant_provider_get_user_language_tests.cpp' object='provider/main_test-enchant_provider_get_user_language_tests.obj' libtool=no @AMDEPBACKSLASH@
1830 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1831 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o provider/main_test-enchant_provider_get_user_language_tests.obj `if test -f 'provider/enchant_provider_get_user_language_tests.cpp'; then $(CYGPATH_W) 'provider/enchant_provider_get_user_language_tests.cpp'; else $(CYGPATH_W) '$(srcdir)/provider/enchant_provider_get_user_language_tests.cpp'; fi`
1832
1833 mostlyclean-libtool:
1834 -rm -f *.lo
1835
1836 clean-libtool:
1837 -rm -rf .libs _libs
1838
1839 # This directory's subdirectories are mostly independent; you can cd
1840 # into them and run 'make' without going through this Makefile.
1841 # To change the values of 'make' variables: instead of editing Makefiles,
1842 # (1) if the variable is set in 'config.status', edit 'config.status'
1843 # (which will cause the Makefiles to be regenerated when you run 'make');
1844 # (2) otherwise, pass the desired values on the 'make' command line.
1845 $(am__recursive_targets):
1846 @fail=; \
1847 if $(am__make_keepgoing); then \
1848 failcom='fail=yes'; \
1849 else \
1850 failcom='exit 1'; \
1851 fi; \
1852 dot_seen=no; \
1853 target=`echo $@ | sed s/-recursive//`; \
1854 case "$@" in \
1855 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
1856 *) list='$(SUBDIRS)' ;; \
1857 esac; \
1858 for subdir in $$list; do \
1859 echo "Making $$target in $$subdir"; \
1860 if test "$$subdir" = "."; then \
1861 dot_seen=yes; \
1862 local_target="$$target-am"; \
1863 else \
1864 local_target="$$target"; \
1865 fi; \
1866 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
1867 || eval $$failcom; \
1868 done; \
1869 if test "$$dot_seen" = "no"; then \
1870 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
1871 fi; test -z "$$fail"
1872
1873 ID: $(am__tagged_files)
1874 $(am__define_uniq_tagged_files); mkid -fID $$unique
1875 tags: tags-recursive
1876 TAGS: tags
1877
1878 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1879 set x; \
1880 here=`pwd`; \
1881 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
1882 include_option=--etags-include; \
1883 empty_fix=.; \
1884 else \
1885 include_option=--include; \
1886 empty_fix=; \
1887 fi; \
1888 list='$(SUBDIRS)'; for subdir in $$list; do \
1889 if test "$$subdir" = .; then :; else \
1890 test ! -f $$subdir/TAGS || \
1891 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
1892 fi; \
1893 done; \
1894 $(am__define_uniq_tagged_files); \
1895 shift; \
1896 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
1897 test -n "$$unique" || unique=$$empty_fix; \
1898 if test $$# -gt 0; then \
1899 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1900 "$$@" $$unique; \
1901 else \
1902 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1903 $$unique; \
1904 fi; \
1905 fi
1906 ctags: ctags-recursive
1907
1908 CTAGS: ctags
1909 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1910 $(am__define_uniq_tagged_files); \
1911 test -z "$(CTAGS_ARGS)$$unique" \
1912 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
1913 $$unique
1914
1915 GTAGS:
1916 here=`$(am__cd) $(top_builddir) && pwd` \
1917 && $(am__cd) $(top_srcdir) \
1918 && gtags -i $(GTAGS_ARGS) "$$here"
1919 cscopelist: cscopelist-recursive
1920
1921 cscopelist-am: $(am__tagged_files)
1922 list='$(am__tagged_files)'; \
1923 case "$(srcdir)" in \
1924 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
1925 *) sdir=$(subdir)/$(srcdir) ;; \
1926 esac; \
1927 for i in $$list; do \
1928 if test -f "$$i"; then \
1929 echo "$(subdir)/$$i"; \
1930 else \
1931 echo "$$sdir/$$i"; \
1932 fi; \
1933 done >> $(top_builddir)/cscope.files
1934
1935 distclean-tags:
1936 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
1937
1938 # Recover from deleted '.trs' file; this should ensure that
1939 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
1940 # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
1941 # to avoid problems with "make -n".
1942 .log.trs:
1943 rm -f $< $@
1944 $(MAKE) $(AM_MAKEFLAGS) $<
1945
1946 # Leading 'am--fnord' is there to ensure the list of targets does not
1947 # expand to empty, as could happen e.g. with make check TESTS=''.
1948 am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
1949 am--force-recheck:
1950 @:
1951
1952 $(TEST_SUITE_LOG): $(TEST_LOGS)
1953 @$(am__set_TESTS_bases); \
1954 am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
1955 redo_bases=`for i in $$bases; do \
1956 am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
1957 done`; \
1958 if test -n "$$redo_bases"; then \
1959 redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
1960 redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
1961 if $(am__make_dryrun); then :; else \
1962 rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
1963 fi; \
1964 fi; \
1965 if test -n "$$am__remaking_logs"; then \
1966 echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
1967 "recursion detected" >&2; \
1968 elif test -n "$$redo_logs"; then \
1969 am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
1970 fi; \
1971 if $(am__make_dryrun); then :; else \
1972 st=0; \
1973 errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
1974 for i in $$redo_bases; do \
1975 test -f $$i.trs && test -r $$i.trs \
1976 || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
1977 test -f $$i.log && test -r $$i.log \
1978 || { echo "$$errmsg $$i.log" >&2; st=1; }; \
1979 done; \
1980 test $$st -eq 0 || exit 1; \
1981 fi
1982 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
1983 ws='[ ]'; \
1984 results=`for b in $$bases; do echo $$b.trs; done`; \
1985 test -n "$$results" || results=/dev/null; \
1986 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
1987 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
1988 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
1989 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
1990 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
1991 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
1992 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
1993 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
1994 success=true; \
1995 else \
1996 success=false; \
1997 fi; \
1998 br='==================='; br=$$br$$br$$br$$br; \
1999 result_count () \
2000 { \
2001 if test x"$$1" = x"--maybe-color"; then \
2002 maybe_colorize=yes; \
2003 elif test x"$$1" = x"--no-color"; then \
2004 maybe_colorize=no; \
2005 else \
2006 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
2007 fi; \
2008 shift; \
2009 desc=$$1 count=$$2; \
2010 if test $$maybe_colorize = yes && test $$count -gt 0; then \
2011 color_start=$$3 color_end=$$std; \
2012 else \
2013 color_start= color_end=; \
2014 fi; \
2015 echo "$${color_start}# $$desc $$count$${color_end}"; \
2016 }; \
2017 create_testsuite_report () \
2018 { \
2019 result_count $$1 "TOTAL:" $$all "$$brg"; \
2020 result_count $$1 "PASS: " $$pass "$$grn"; \
2021 result_count $$1 "SKIP: " $$skip "$$blu"; \
2022 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
2023 result_count $$1 "FAIL: " $$fail "$$red"; \
2024 result_count $$1 "XPASS:" $$xpass "$$red"; \
2025 result_count $$1 "ERROR:" $$error "$$mgn"; \
2026 }; \
2027 { \
2028 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
2029 $(am__rst_title); \
2030 create_testsuite_report --no-color; \
2031 echo; \
2032 echo ".. contents:: :depth: 2"; \
2033 echo; \
2034 for b in $$bases; do echo $$b; done \
2035 | $(am__create_global_log); \
2036 } >$(TEST_SUITE_LOG).tmp || exit 1; \
2037 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
2038 if $$success; then \
2039 col="$$grn"; \
2040 else \
2041 col="$$red"; \
2042 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
2043 fi; \
2044 echo "$${col}$$br$${std}"; \
2045 echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
2046 echo "$${col}$$br$${std}"; \
2047 create_testsuite_report --maybe-color; \
2048 echo "$$col$$br$$std"; \
2049 if $$success; then :; else \
2050 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
2051 if test -n "$(PACKAGE_BUGREPORT)"; then \
2052 echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
2053 fi; \
2054 echo "$$col$$br$$std"; \
2055 fi; \
2056 $$success || exit 1
2057
2058 check-TESTS:
2059 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
2060 @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
2061 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
2062 @set +e; $(am__set_TESTS_bases); \
2063 log_list=`for i in $$bases; do echo $$i.log; done`; \
2064 trs_list=`for i in $$bases; do echo $$i.trs; done`; \
2065 log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
2066 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
2067 exit $$?;
2068 recheck: all $(check_LTLIBRARIES) $(check_PROGRAMS)
2069 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
2070 @set +e; $(am__set_TESTS_bases); \
2071 bases=`for i in $$bases; do echo $$i; done \
2072 | $(am__list_recheck_tests)` || exit 1; \
2073 log_list=`for i in $$bases; do echo $$i.log; done`; \
2074 log_list=`echo $$log_list`; \
2075 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
2076 am__force_recheck=am--force-recheck \
2077 TEST_LOGS="$$log_list"; \
2078 exit $$?
2079 .test.log:
2080 @p='$<'; \
2081 $(am__set_b); \
2082 $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
2083 --log-file $$b.log --trs-file $$b.trs \
2084 $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
2085 "$$tst" $(AM_TESTS_FD_REDIRECT)
2086 @am__EXEEXT_TRUE@.test$(EXEEXT).log:
2087 @am__EXEEXT_TRUE@ @p='$<'; \
2088 @am__EXEEXT_TRUE@ $(am__set_b); \
2089 @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
2090 @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
2091 @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
2092 @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
2093
2094 distdir: $(DISTFILES)
2095 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
2096 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
2097 list='$(DISTFILES)'; \
2098 dist_files=`for file in $$list; do echo $$file; done | \
2099 sed -e "s|^$$srcdirstrip/||;t" \
2100 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
2101 case $$dist_files in \
2102 */*) $(MKDIR_P) `echo "$$dist_files" | \
2103 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
2104 sort -u` ;; \
2105 esac; \
2106 for file in $$dist_files; do \
2107 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
2108 if test -d $$d/$$file; then \
2109 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
2110 if test -d "$(distdir)/$$file"; then \
2111 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
2112 fi; \
2113 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
2114 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
2115 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
2116 fi; \
2117 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
2118 else \
2119 test -f "$(distdir)/$$file" \
2120 || cp -p $$d/$$file "$(distdir)/$$file" \
2121 || exit 1; \
2122 fi; \
2123 done
2124 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
2125 if test "$$subdir" = .; then :; else \
2126 $(am__make_dryrun) \
2127 || test -d "$(distdir)/$$subdir" \
2128 || $(MKDIR_P) "$(distdir)/$$subdir" \
2129 || exit 1; \
2130 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
2131 $(am__relativize); \
2132 new_distdir=$$reldir; \
2133 dir1=$$subdir; dir2="$(top_distdir)"; \
2134 $(am__relativize); \
2135 new_top_distdir=$$reldir; \
2136 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
2137 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
2138 ($(am__cd) $$subdir && \
2139 $(MAKE) $(AM_MAKEFLAGS) \
2140 top_distdir="$$new_top_distdir" \
2141 distdir="$$new_distdir" \
2142 am__remove_distdir=: \
2143 am__skip_length_check=: \
2144 am__skip_mode_fix=: \
2145 distdir) \
2146 || exit 1; \
2147 fi; \
2148 done
2149 check-am: all-am
2150 $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS)
2151 $(MAKE) $(AM_MAKEFLAGS) check-TESTS
2152 check: check-recursive
2153 all-am: Makefile
2154 installdirs: installdirs-recursive
2155 installdirs-am:
2156 install: install-recursive
2157 install-exec: install-exec-recursive
2158 install-data: install-data-recursive
2159 uninstall: uninstall-recursive
2160
2161 install-am: all-am
2162 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
2163
2164 installcheck: installcheck-recursive
2165 install-strip:
2166 if test -z '$(STRIP)'; then \
2167 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
2168 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
2169 install; \
2170 else \
2171 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
2172 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
2173 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
2174 fi
2175 mostlyclean-generic:
2176 -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
2177 -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
2178 -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
2179
2180 clean-generic:
2181
2182 distclean-generic:
2183 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
2184 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
2185 -rm -f broker/$(DEPDIR)/$(am__dirstamp)
2186 -rm -f broker/$(am__dirstamp)
2187 -rm -f dictionary/$(DEPDIR)/$(am__dirstamp)
2188 -rm -f dictionary/$(am__dirstamp)
2189 -rm -f provider/$(DEPDIR)/$(am__dirstamp)
2190 -rm -f provider/$(am__dirstamp)
2191 -rm -f pwl/$(DEPDIR)/$(am__dirstamp)
2192 -rm -f pwl/$(am__dirstamp)
2193 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
2194
2195 maintainer-clean-generic:
2196 @echo "This command is intended for maintainers to use"
2197 @echo "it deletes files that may require special tools to rebuild."
2198 clean: clean-recursive
2199
2200 clean-am: clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \
2201 clean-libtool mostlyclean-am
2202
2203 distclean: distclean-recursive
2204 -rm -rf ./$(DEPDIR) broker/$(DEPDIR) dictionary/$(DEPDIR) provider/$(DEPDIR) pwl/$(DEPDIR)
2205 -rm -f Makefile
2206 distclean-am: clean-am distclean-compile distclean-generic \
2207 distclean-local distclean-tags
2208
2209 dvi: dvi-recursive
2210
2211 dvi-am:
2212
2213 html: html-recursive
2214
2215 html-am:
2216
2217 info: info-recursive
2218
2219 info-am:
2220
2221 install-data-am:
2222
2223 install-dvi: install-dvi-recursive
2224
2225 install-dvi-am:
2226
2227 install-exec-am:
2228
2229 install-html: install-html-recursive
2230
2231 install-html-am:
2232
2233 install-info: install-info-recursive
2234
2235 install-info-am:
2236
2237 install-man:
2238
2239 install-pdf: install-pdf-recursive
2240
2241 install-pdf-am:
2242
2243 install-ps: install-ps-recursive
2244
2245 install-ps-am:
2246
2247 installcheck-am:
2248
2249 maintainer-clean: maintainer-clean-recursive
2250 -rm -rf ./$(DEPDIR) broker/$(DEPDIR) dictionary/$(DEPDIR) provider/$(DEPDIR) pwl/$(DEPDIR)
2251 -rm -f Makefile
2252 maintainer-clean-am: distclean-am maintainer-clean-generic
2253
2254 mostlyclean: mostlyclean-recursive
2255
2256 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
2257 mostlyclean-libtool
2258
2259 pdf: pdf-recursive
2260
2261 pdf-am:
2262
2263 ps: ps-recursive
2264
2265 ps-am:
2266
2267 uninstall-am:
2268
2269 .MAKE: $(am__recursive_targets) check-am install-am install-strip
2270
2271 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
2272 check-TESTS check-am clean clean-checkLTLIBRARIES \
2273 clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
2274 ctags ctags-am distclean distclean-compile distclean-generic \
2275 distclean-libtool distclean-local distclean-tags distdir dvi \
2276 dvi-am html html-am info info-am install install-am \
2277 install-data install-data-am install-dvi install-dvi-am \
2278 install-exec install-exec-am install-html install-html-am \
2279 install-info install-info-am install-man install-pdf \
2280 install-pdf-am install-ps install-ps-am install-strip \
2281 installcheck installcheck-am installdirs installdirs-am \
2282 maintainer-clean maintainer-clean-generic mostlyclean \
2283 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
2284 pdf pdf-am ps ps-am recheck tags tags-am uninstall \
2285 uninstall-am
2286
2287 .PRECIOUS: Makefile
2288
2289
2290 distclean-local:
2291 rm -rf $(libdir_subdir) $(ENCHANT_CONFIG_DIR)
2292 $(LIBENCHANT_COPY): $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la
2293 $(MAKE) libenchant-copy
2294
2295 libenchant-copy:
2296 rm -rf $(libdir_subdir)
2297 $(MKDIR_P) $(libdir_subdir)/enchant-@ENCHANT_MAJOR_VERSION@
2298 cp -r $(top_builddir)/src/@objdir@ $(libdir_subdir)/
2299 cp $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(libdir_subdir)/
2300
2301 # Tell versions [3.59,3.63) of GNU make to not export all variables.
2302 # Otherwise a system limit (for SysV at least) may be exceeded.
2303 .NOEXPORT:
+0
-3
tests/Readme.txt less more
0 Enchant Unit Tests are written using the UnitTest++ framework.
1
2 See https://github.com/unittest-cpp/unittest-cpp for more details.
+0
-5
tests/asan-suppressions.txt less more
0 # glibc
1 leak:getdelim
2
3 # gnulib
4 leak:set_this_relocation_prefix
132132 * enchant_broker_set_ordering
133133 * @broker: A non-null #EnchantBroker
134134 * @tag: A non-null language tag (en_US)
135 * @ordering: A non-null ordering (aspell,hunspell,hspell)
135 * @ordering: A non-null ordering (aspell,hunspell,nuspell,hspell)
136136 *
137137 * Declares a preference of dictionaries to use for the language
138138 * described/referred to by @tag. The ordering is a comma delimited
+0
-6
tests/enchant_providers/.gitignore less more
0 /config
1 /enchant_*.so
2 /enchant_*.dylib
3 /enchant*.dll
4 /providers.test
5 /providers.test.exe
3535 //Setup
3636 DictionaryCheck_TestFixture():_dict(NULL)
3737 {
38 _dict = GetFirstAvailableDictionary();
38 _dict = GetDefaultDictionary();
3939 /* FIXME: hspell does not consider non-Hebrew letters to be valid letters */
4040 if (_dict) {
4141 _provider_name = _provider->identify(_provider);
3131 //Setup
3232 DictionarySuggest_TestFixture():_dict(NULL)
3333 {
34 _dict = GetFirstAvailableDictionary();
34 _dict = GetDefaultDictionary();
3535 }
3636
3737 //Teardown
166166 i != suggestions.end();
167167 ++i)
168168 {
169 if(i->compare("baa") != 0) //FIXME This condition can be removed when
170 // the output of `echo Aaa|nuspell -d en_US` no longer contains "baa"
171 // as a suggestion. This change in Nuspell is planned but not yet
172 // available. The Nuspell team has also an internal issue reminding them
173 // to remove this condition when the required change has been released.
169174 CHECK(IsFirstLetterCapitalOrTitleCase(*i));
170175 }
171176 }
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
4
5 # This Makefile.in 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
14 @SET_MAKE@
15
16 # FIXME: common up with tests/Makefile.am
17 VPATH = @srcdir@
18 am__is_gnu_make = { \
19 if test -z '$(MAKELEVEL)'; then \
20 false; \
21 elif test -n '$(MAKE_HOST)'; then \
22 true; \
23 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
24 true; \
25 else \
26 false; \
27 fi; \
28 }
29 am__make_running_with_option = \
30 case $${target_option-} in \
31 ?) ;; \
32 *) echo "am__make_running_with_option: internal error: invalid" \
33 "target option '$${target_option-}' specified" >&2; \
34 exit 1;; \
35 esac; \
36 has_opt=no; \
37 sane_makeflags=$$MAKEFLAGS; \
38 if $(am__is_gnu_make); then \
39 sane_makeflags=$$MFLAGS; \
40 else \
41 case $$MAKEFLAGS in \
42 *\\[\ \ ]*) \
43 bs=\\; \
44 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
45 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
46 esac; \
47 fi; \
48 skip_next=no; \
49 strip_trailopt () \
50 { \
51 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
52 }; \
53 for flg in $$sane_makeflags; do \
54 test $$skip_next = yes && { skip_next=no; continue; }; \
55 case $$flg in \
56 *=*|--*) continue;; \
57 -*I) strip_trailopt 'I'; skip_next=yes;; \
58 -*I?*) strip_trailopt 'I';; \
59 -*O) strip_trailopt 'O'; skip_next=yes;; \
60 -*O?*) strip_trailopt 'O';; \
61 -*l) strip_trailopt 'l'; skip_next=yes;; \
62 -*l?*) strip_trailopt 'l';; \
63 -[dEDm]) skip_next=yes;; \
64 -[JT]) skip_next=yes;; \
65 esac; \
66 case $$flg in \
67 *$$target_option*) has_opt=yes; break;; \
68 esac; \
69 done; \
70 test $$has_opt = yes
71 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
72 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
73 pkgdatadir = $(datadir)/@PACKAGE@
74 pkgincludedir = $(includedir)/@PACKAGE@
75 pkglibdir = $(libdir)/@PACKAGE@
76 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
77 install_sh_DATA = $(install_sh) -c -m 644
78 install_sh_PROGRAM = $(install_sh) -c
79 install_sh_SCRIPT = $(install_sh) -c
80 INSTALL_HEADER = $(INSTALL_DATA)
81 transform = $(program_transform_name)
82 NORMAL_INSTALL = :
83 PRE_INSTALL = :
84 POST_INSTALL = :
85 NORMAL_UNINSTALL = :
86 PRE_UNINSTALL = :
87 POST_UNINSTALL = :
88 build_triplet = @build@
89 host_triplet = @host@
90 check_PROGRAMS = providers.test$(EXEEXT)
91 subdir = tests/enchant_providers
92 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
93 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
94 $(top_srcdir)/m4/absolute-header.m4 \
95 $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
96 $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \
97 $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \
98 $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \
99 $(top_srcdir)/m4/gnulib-common.m4 \
100 $(top_srcdir)/m4/gnulib-comp.m4 \
101 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \
102 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
103 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
104 $(top_srcdir)/m4/malloc.m4 \
105 $(top_srcdir)/m4/manywarnings-c++.m4 \
106 $(top_srcdir)/m4/manywarnings.m4 \
107 $(top_srcdir)/m4/msvc-inval.m4 \
108 $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \
109 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/rawmemchr.m4 \
110 $(top_srcdir)/m4/relocatable-lib.m4 \
111 $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \
112 $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
113 $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \
114 $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \
115 $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \
116 $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
117 $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
118 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
119 $(ACLOCAL_M4)
120 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
121 mkinstalldirs = $(install_sh) -d
122 CONFIG_HEADER = $(top_builddir)/config.h
123 CONFIG_CLEAN_FILES =
124 CONFIG_CLEAN_VPATH_FILES =
125 am__dirstamp = $(am__leading_dot)dirstamp
126 am_providers_test_OBJECTS = providers_test-providers.test.$(OBJEXT) \
127 Dictionary/providers_test-dictionary_check.$(OBJEXT) \
128 Dictionary/providers_test-dictionary_suggest.$(OBJEXT) \
129 Provider/providers_test-provider_describe_dict.$(OBJEXT) \
130 Provider/providers_test-provider_dictionary_exists.$(OBJEXT) \
131 Provider/providers_test-provider_identify_dict.$(OBJEXT) \
132 Provider/providers_test-provider_list_dicts.$(OBJEXT) \
133 Provider/providers_test-provider_request_dict.$(OBJEXT)
134 providers_test_OBJECTS = $(am_providers_test_OBJECTS)
135 am__DEPENDENCIES_1 =
136 AM_V_lt = $(am__v_lt_@AM_V@)
137 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
138 am__v_lt_0 = --silent
139 am__v_lt_1 =
140 AM_V_P = $(am__v_P_@AM_V@)
141 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
142 am__v_P_0 = false
143 am__v_P_1 = :
144 AM_V_GEN = $(am__v_GEN_@AM_V@)
145 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
146 am__v_GEN_0 = @echo " GEN " $@;
147 am__v_GEN_1 =
148 AM_V_at = $(am__v_at_@AM_V@)
149 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
150 am__v_at_0 = @
151 am__v_at_1 =
152 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
153 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
154 am__depfiles_maybe = depfiles
155 am__mv = mv -f
156 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
157 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
158 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
159 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
160 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
161 $(AM_CXXFLAGS) $(CXXFLAGS)
162 AM_V_CXX = $(am__v_CXX_@AM_V@)
163 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
164 am__v_CXX_0 = @echo " CXX " $@;
165 am__v_CXX_1 =
166 CXXLD = $(CXX)
167 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
168 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
169 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
170 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
171 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
172 am__v_CXXLD_0 = @echo " CXXLD " $@;
173 am__v_CXXLD_1 =
174 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
175 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
176 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
177 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
178 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
179 $(AM_CFLAGS) $(CFLAGS)
180 AM_V_CC = $(am__v_CC_@AM_V@)
181 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
182 am__v_CC_0 = @echo " CC " $@;
183 am__v_CC_1 =
184 CCLD = $(CC)
185 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
186 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
187 $(AM_LDFLAGS) $(LDFLAGS) -o $@
188 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
189 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
190 am__v_CCLD_0 = @echo " CCLD " $@;
191 am__v_CCLD_1 =
192 SOURCES = $(providers_test_SOURCES)
193 DIST_SOURCES = $(providers_test_SOURCES)
194 am__can_run_installinfo = \
195 case $$AM_UPDATE_INFO_DIR in \
196 n|no|NO) false;; \
197 *) (install-info --version) >/dev/null 2>&1;; \
198 esac
199 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
200 # Read a list of newline-separated strings from the standard input,
201 # and print each of them once, without duplicates. Input order is
202 # *not* preserved.
203 am__uniquify_input = $(AWK) '\
204 BEGIN { nonempty = 0; } \
205 { items[$$0] = 1; nonempty = 1; } \
206 END { if (nonempty) { for (i in items) print i; }; } \
207 '
208 # Make sure the list of sources is unique. This is necessary because,
209 # e.g., the same source file might be shared among _SOURCES variables
210 # for different programs/libraries.
211 am__define_uniq_tagged_files = \
212 list='$(am__tagged_files)'; \
213 unique=`for i in $$list; do \
214 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
215 done | $(am__uniquify_input)`
216 ETAGS = etags
217 CTAGS = ctags
218 am__tty_colors_dummy = \
219 mgn= red= grn= lgn= blu= brg= std=; \
220 am__color_tests=no
221 am__tty_colors = { \
222 $(am__tty_colors_dummy); \
223 if test "X$(AM_COLOR_TESTS)" = Xno; then \
224 am__color_tests=no; \
225 elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
226 am__color_tests=yes; \
227 elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
228 am__color_tests=yes; \
229 fi; \
230 if test $$am__color_tests = yes; then \
231 red=''; \
232 grn=''; \
233 lgn=''; \
234 blu=''; \
235 mgn=''; \
236 brg=''; \
237 std=''; \
238 fi; \
239 }
240 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
241 am__vpath_adj = case $$p in \
242 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
243 *) f=$$p;; \
244 esac;
245 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
246 am__install_max = 40
247 am__nobase_strip_setup = \
248 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
249 am__nobase_strip = \
250 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
251 am__nobase_list = $(am__nobase_strip_setup); \
252 for p in $$list; do echo "$$p $$p"; done | \
253 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
254 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
255 if (++n[$$2] == $(am__install_max)) \
256 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
257 END { for (dir in files) print dir, files[dir] }'
258 am__base_list = \
259 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
260 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
261 am__uninstall_files_from_dir = { \
262 test -z "$$files" \
263 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
264 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
265 $(am__cd) "$$dir" && rm -f $$files; }; \
266 }
267 am__recheck_rx = ^[ ]*:recheck:[ ]*
268 am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
269 am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
270 # A command that, given a newline-separated list of test names on the
271 # standard input, print the name of the tests that are to be re-run
272 # upon "make recheck".
273 am__list_recheck_tests = $(AWK) '{ \
274 recheck = 1; \
275 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
276 { \
277 if (rc < 0) \
278 { \
279 if ((getline line2 < ($$0 ".log")) < 0) \
280 recheck = 0; \
281 break; \
282 } \
283 else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
284 { \
285 recheck = 0; \
286 break; \
287 } \
288 else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
289 { \
290 break; \
291 } \
292 }; \
293 if (recheck) \
294 print $$0; \
295 close ($$0 ".trs"); \
296 close ($$0 ".log"); \
297 }'
298 # A command that, given a newline-separated list of test names on the
299 # standard input, create the global log from their .trs and .log files.
300 am__create_global_log = $(AWK) ' \
301 function fatal(msg) \
302 { \
303 print "fatal: making $@: " msg | "cat >&2"; \
304 exit 1; \
305 } \
306 function rst_section(header) \
307 { \
308 print header; \
309 len = length(header); \
310 for (i = 1; i <= len; i = i + 1) \
311 printf "="; \
312 printf "\n\n"; \
313 } \
314 { \
315 copy_in_global_log = 1; \
316 global_test_result = "RUN"; \
317 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
318 { \
319 if (rc < 0) \
320 fatal("failed to read from " $$0 ".trs"); \
321 if (line ~ /$(am__global_test_result_rx)/) \
322 { \
323 sub("$(am__global_test_result_rx)", "", line); \
324 sub("[ ]*$$", "", line); \
325 global_test_result = line; \
326 } \
327 else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
328 copy_in_global_log = 0; \
329 }; \
330 if (copy_in_global_log) \
331 { \
332 rst_section(global_test_result ": " $$0); \
333 while ((rc = (getline line < ($$0 ".log"))) != 0) \
334 { \
335 if (rc < 0) \
336 fatal("failed to read from " $$0 ".log"); \
337 print line; \
338 }; \
339 printf "\n"; \
340 }; \
341 close ($$0 ".trs"); \
342 close ($$0 ".log"); \
343 }'
344 # Restructured Text title.
345 am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
346 # Solaris 10 'make', and several other traditional 'make' implementations,
347 # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
348 # by disabling -e (using the XSI extension "set +e") if it's set.
349 am__sh_e_setup = case $$- in *e*) set +e;; esac
350 # Default flags passed to test drivers.
351 am__common_driver_flags = \
352 --color-tests "$$am__color_tests" \
353 --enable-hard-errors "$$am__enable_hard_errors" \
354 --expect-failure "$$am__expect_failure"
355 # To be inserted before the command running the test. Creates the
356 # directory for the log if needed. Stores in $dir the directory
357 # containing $f, in $tst the test, in $log the log. Executes the
358 # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
359 # passes TESTS_ENVIRONMENT. Set up options for the wrapper that
360 # will run the test scripts (or their associated LOG_COMPILER, if
361 # thy have one).
362 am__check_pre = \
363 $(am__sh_e_setup); \
364 $(am__vpath_adj_setup) $(am__vpath_adj) \
365 $(am__tty_colors); \
366 srcdir=$(srcdir); export srcdir; \
367 case "$@" in \
368 */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
369 *) am__odir=.;; \
370 esac; \
371 test "x$$am__odir" = x"." || test -d "$$am__odir" \
372 || $(MKDIR_P) "$$am__odir" || exit $$?; \
373 if test -f "./$$f"; then dir=./; \
374 elif test -f "$$f"; then dir=; \
375 else dir="$(srcdir)/"; fi; \
376 tst=$$dir$$f; log='$@'; \
377 if test -n '$(DISABLE_HARD_ERRORS)'; then \
378 am__enable_hard_errors=no; \
379 else \
380 am__enable_hard_errors=yes; \
381 fi; \
382 case " $(XFAIL_TESTS) " in \
383 *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
384 am__expect_failure=yes;; \
385 *) \
386 am__expect_failure=no;; \
387 esac; \
388 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
389 # A shell command to get the names of the tests scripts with any registered
390 # extension removed (i.e., equivalently, the names of the test logs, with
391 # the '.log' extension removed). The result is saved in the shell variable
392 # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
393 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
394 # since that might cause problem with VPATH rewrites for suffix-less tests.
395 # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
396 am__set_TESTS_bases = \
397 bases='$(TEST_LOGS)'; \
398 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
399 bases=`echo $$bases`
400 RECHECK_LOGS = $(TEST_LOGS)
401 AM_RECURSIVE_TARGETS = check recheck
402 TEST_SUITE_LOG = test-suite.log
403 TEST_EXTENSIONS = @EXEEXT@ .test
404 am__test_logs1 = $(TESTS:=.log)
405 am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
406 TEST_LOGS = $(am__test_logs2:.test.log=.log)
407 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
408 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
409 $(TEST_LOG_FLAGS)
410 am__set_b = \
411 case '$@' in \
412 */*) \
413 case '$*' in \
414 */*) b='$*';; \
415 *) b=`echo '$@' | sed 's/\.log$$//'`; \
416 esac;; \
417 *) \
418 b='$*';; \
419 esac
420 am__DIST_COMMON = $(srcdir)/Makefile.in \
421 $(top_srcdir)/build-aux/depcomp \
422 $(top_srcdir)/build-aux/test-driver
423 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
424 pkglibexecdir = @pkglibexecdir@
425 ACLOCAL = @ACLOCAL@
426 AMTAR = @AMTAR@
427 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
428 AR = @AR@
429 ARFLAGS = @ARFLAGS@
430 AS = @AS@
431 AUTOCONF = @AUTOCONF@
432 AUTOHEADER = @AUTOHEADER@
433 AUTOMAKE = @AUTOMAKE@
434 AWK = @AWK@
435 CC = @CC@
436 CCDEPMODE = @CCDEPMODE@
437 CFLAGS = @CFLAGS@
438 CPP = @CPP@
439 CPPFLAGS = @CPPFLAGS@
440 CXX = @CXX@
441 CXXCPP = @CXXCPP@
442 CXXDEPMODE = @CXXDEPMODE@
443 CXXFLAGS = @CXXFLAGS@
444 CYGPATH_W = @CYGPATH_W@
445 DEFS = @DEFS@
446 DEPDIR = @DEPDIR@
447 DLLTOOL = @DLLTOOL@
448 DSYMUTIL = @DSYMUTIL@
449 DUMPBIN = @DUMPBIN@
450 ECHO_C = @ECHO_C@
451 ECHO_N = @ECHO_N@
452 ECHO_T = @ECHO_T@
453 EGREP = @EGREP@
454 ENCHANT_CFLAGS = @ENCHANT_CFLAGS@
455 ENCHANT_LIBS = @ENCHANT_LIBS@
456 ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@
457 ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@
458 ENCHANT_MINOR_VERSION = @ENCHANT_MINOR_VERSION@
459 EXEEXT = @EXEEXT@
460 FGREP = @FGREP@
461 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
462 GETOPT_H = @GETOPT_H@
463 GLIB_CFLAGS = @GLIB_CFLAGS@
464 GLIB_LIBS = @GLIB_LIBS@
465 GNULIB_ATOLL = @GNULIB_ATOLL@
466 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
467 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
468 GNULIB_CHDIR = @GNULIB_CHDIR@
469 GNULIB_CHOWN = @GNULIB_CHOWN@
470 GNULIB_CLOSE = @GNULIB_CLOSE@
471 GNULIB_DUP = @GNULIB_DUP@
472 GNULIB_DUP2 = @GNULIB_DUP2@
473 GNULIB_DUP3 = @GNULIB_DUP3@
474 GNULIB_ENVIRON = @GNULIB_ENVIRON@
475 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
476 GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
477 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
478 GNULIB_FCHDIR = @GNULIB_FCHDIR@
479 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
480 GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
481 GNULIB_FFSL = @GNULIB_FFSL@
482 GNULIB_FFSLL = @GNULIB_FFSLL@
483 GNULIB_FLOCK = @GNULIB_FLOCK@
484 GNULIB_FSYNC = @GNULIB_FSYNC@
485 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
486 GNULIB_GETCWD = @GNULIB_GETCWD@
487 GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
488 GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
489 GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
490 GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
491 GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
492 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
493 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
494 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
495 GNULIB_GETPASS = @GNULIB_GETPASS@
496 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
497 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
498 GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
499 GNULIB_GRANTPT = @GNULIB_GRANTPT@
500 GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
501 GNULIB_ISATTY = @GNULIB_ISATTY@
502 GNULIB_LCHOWN = @GNULIB_LCHOWN@
503 GNULIB_LINK = @GNULIB_LINK@
504 GNULIB_LINKAT = @GNULIB_LINKAT@
505 GNULIB_LSEEK = @GNULIB_LSEEK@
506 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
507 GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
508 GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
509 GNULIB_MBSCHR = @GNULIB_MBSCHR@
510 GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
511 GNULIB_MBSLEN = @GNULIB_MBSLEN@
512 GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
513 GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
514 GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
515 GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
516 GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
517 GNULIB_MBSSEP = @GNULIB_MBSSEP@
518 GNULIB_MBSSPN = @GNULIB_MBSSPN@
519 GNULIB_MBSSTR = @GNULIB_MBSSTR@
520 GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
521 GNULIB_MBTOWC = @GNULIB_MBTOWC@
522 GNULIB_MEMCHR = @GNULIB_MEMCHR@
523 GNULIB_MEMMEM = @GNULIB_MEMMEM@
524 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
525 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
526 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
527 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
528 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
529 GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
530 GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
531 GNULIB_PIPE = @GNULIB_PIPE@
532 GNULIB_PIPE2 = @GNULIB_PIPE2@
533 GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
534 GNULIB_PREAD = @GNULIB_PREAD@
535 GNULIB_PTSNAME = @GNULIB_PTSNAME@
536 GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
537 GNULIB_PUTENV = @GNULIB_PUTENV@
538 GNULIB_PWRITE = @GNULIB_PWRITE@
539 GNULIB_QSORT_R = @GNULIB_QSORT_R@
540 GNULIB_RANDOM = @GNULIB_RANDOM@
541 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
542 GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
543 GNULIB_READ = @GNULIB_READ@
544 GNULIB_READLINK = @GNULIB_READLINK@
545 GNULIB_READLINKAT = @GNULIB_READLINKAT@
546 GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
547 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
548 GNULIB_REALPATH = @GNULIB_REALPATH@
549 GNULIB_RMDIR = @GNULIB_RMDIR@
550 GNULIB_RPMATCH = @GNULIB_RPMATCH@
551 GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
552 GNULIB_SETENV = @GNULIB_SETENV@
553 GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
554 GNULIB_SLEEP = @GNULIB_SLEEP@
555 GNULIB_STPCPY = @GNULIB_STPCPY@
556 GNULIB_STPNCPY = @GNULIB_STPNCPY@
557 GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
558 GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
559 GNULIB_STRDUP = @GNULIB_STRDUP@
560 GNULIB_STRERROR = @GNULIB_STRERROR@
561 GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
562 GNULIB_STRNCAT = @GNULIB_STRNCAT@
563 GNULIB_STRNDUP = @GNULIB_STRNDUP@
564 GNULIB_STRNLEN = @GNULIB_STRNLEN@
565 GNULIB_STRPBRK = @GNULIB_STRPBRK@
566 GNULIB_STRSEP = @GNULIB_STRSEP@
567 GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
568 GNULIB_STRSTR = @GNULIB_STRSTR@
569 GNULIB_STRTOD = @GNULIB_STRTOD@
570 GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
571 GNULIB_STRTOLL = @GNULIB_STRTOLL@
572 GNULIB_STRTOULL = @GNULIB_STRTOULL@
573 GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
574 GNULIB_SYMLINK = @GNULIB_SYMLINK@
575 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
576 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
577 GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
578 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
579 GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
580 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
581 GNULIB_UNLINK = @GNULIB_UNLINK@
582 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
583 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
584 GNULIB_UNSETENV = @GNULIB_UNSETENV@
585 GNULIB_USLEEP = @GNULIB_USLEEP@
586 GNULIB_WCTOMB = @GNULIB_WCTOMB@
587 GNULIB_WRITE = @GNULIB_WRITE@
588 GNULIB__EXIT = @GNULIB__EXIT@
589 GREP = @GREP@
590 HAVE_ATOLL = @HAVE_ATOLL@
591 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
592 HAVE_CHOWN = @HAVE_CHOWN@
593 HAVE_CXX11 = @HAVE_CXX11@
594 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
595 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
596 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
597 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
598 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
599 HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
600 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
601 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
602 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
603 HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
604 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
605 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
606 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
607 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
608 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
609 HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
610 HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
611 HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
612 HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
613 HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
614 HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
615 HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
616 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
617 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
618 HAVE_DUP2 = @HAVE_DUP2@
619 HAVE_DUP3 = @HAVE_DUP3@
620 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
621 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
622 HAVE_FACCESSAT = @HAVE_FACCESSAT@
623 HAVE_FCHDIR = @HAVE_FCHDIR@
624 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
625 HAVE_FDATASYNC = @HAVE_FDATASYNC@
626 HAVE_FFSL = @HAVE_FFSL@
627 HAVE_FFSLL = @HAVE_FFSLL@
628 HAVE_FLOCK = @HAVE_FLOCK@
629 HAVE_FSYNC = @HAVE_FSYNC@
630 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
631 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
632 HAVE_GETGROUPS = @HAVE_GETGROUPS@
633 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
634 HAVE_GETLOGIN = @HAVE_GETLOGIN@
635 HAVE_GETOPT_H = @HAVE_GETOPT_H@
636 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
637 HAVE_GETPASS = @HAVE_GETPASS@
638 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
639 HAVE_GRANTPT = @HAVE_GRANTPT@
640 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
641 HAVE_LCHOWN = @HAVE_LCHOWN@
642 HAVE_LINK = @HAVE_LINK@
643 HAVE_LINKAT = @HAVE_LINKAT@
644 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
645 HAVE_MBSLEN = @HAVE_MBSLEN@
646 HAVE_MEMCHR = @HAVE_MEMCHR@
647 HAVE_MEMPCPY = @HAVE_MEMPCPY@
648 HAVE_MKDTEMP = @HAVE_MKDTEMP@
649 HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
650 HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
651 HAVE_MKSTEMP = @HAVE_MKSTEMP@
652 HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
653 HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
654 HAVE_OS_H = @HAVE_OS_H@
655 HAVE_PIPE = @HAVE_PIPE@
656 HAVE_PIPE2 = @HAVE_PIPE2@
657 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
658 HAVE_PREAD = @HAVE_PREAD@
659 HAVE_PTSNAME = @HAVE_PTSNAME@
660 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
661 HAVE_PWRITE = @HAVE_PWRITE@
662 HAVE_QSORT_R = @HAVE_QSORT_R@
663 HAVE_RANDOM = @HAVE_RANDOM@
664 HAVE_RANDOM_H = @HAVE_RANDOM_H@
665 HAVE_RANDOM_R = @HAVE_RANDOM_R@
666 HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
667 HAVE_READLINK = @HAVE_READLINK@
668 HAVE_READLINKAT = @HAVE_READLINKAT@
669 HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@
670 HAVE_REALPATH = @HAVE_REALPATH@
671 HAVE_RPMATCH = @HAVE_RPMATCH@
672 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
673 HAVE_SETENV = @HAVE_SETENV@
674 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
675 HAVE_SLEEP = @HAVE_SLEEP@
676 HAVE_STPCPY = @HAVE_STPCPY@
677 HAVE_STPNCPY = @HAVE_STPNCPY@
678 HAVE_STRCASESTR = @HAVE_STRCASESTR@
679 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
680 HAVE_STRPBRK = @HAVE_STRPBRK@
681 HAVE_STRSEP = @HAVE_STRSEP@
682 HAVE_STRTOD = @HAVE_STRTOD@
683 HAVE_STRTOLL = @HAVE_STRTOLL@
684 HAVE_STRTOULL = @HAVE_STRTOULL@
685 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
686 HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
687 HAVE_SYMLINK = @HAVE_SYMLINK@
688 HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
689 HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
690 HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@
691 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
692 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
693 HAVE_UNISTD_H = @HAVE_UNISTD_H@
694 HAVE_UNLINKAT = @HAVE_UNLINKAT@
695 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
696 HAVE_USLEEP = @HAVE_USLEEP@
697 HAVE_WCHAR_T = @HAVE_WCHAR_T@
698 HAVE__EXIT = @HAVE__EXIT@
699 HUNSPELL_CFLAGS = @HUNSPELL_CFLAGS@
700 HUNSPELL_LIBS = @HUNSPELL_LIBS@
701 INCLUDE_NEXT = @INCLUDE_NEXT@
702 INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
703 INSTALL = @INSTALL@
704 INSTALL_DATA = @INSTALL_DATA@
705 INSTALL_PROGRAM = @INSTALL_PROGRAM@
706 INSTALL_SCRIPT = @INSTALL_SCRIPT@
707 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
708 ISYSTEM = @ISYSTEM@
709 LD = @LD@
710 LDFLAGS = @LDFLAGS@
711 LIBINTL = @LIBINTL@
712 LIBOBJS = @LIBOBJS@
713 LIBS = @LIBS@
714 LIBTOOL = @LIBTOOL@
715 LIPO = @LIPO@
716 LN_S = @LN_S@
717 LTLIBINTL = @LTLIBINTL@
718 LTLIBOBJS = @LTLIBOBJS@
719 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
720 MAKEINFO = @MAKEINFO@
721 MANIFEST_TOOL = @MANIFEST_TOOL@
722 MKDIR_P = @MKDIR_P@
723 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
724 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
725 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
726 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
727 NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@
728 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
729 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
730 NEXT_GETOPT_H = @NEXT_GETOPT_H@
731 NEXT_STDDEF_H = @NEXT_STDDEF_H@
732 NEXT_STDLIB_H = @NEXT_STDLIB_H@
733 NEXT_STRING_H = @NEXT_STRING_H@
734 NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@
735 NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
736 NEXT_UNISTD_H = @NEXT_UNISTD_H@
737 NM = @NM@
738 NMEDIT = @NMEDIT@
739 NUSPELL_CFLAGS = @NUSPELL_CFLAGS@
740 NUSPELL_LIBS = @NUSPELL_LIBS@
741 OBJCXX = @OBJCXX@
742 OBJCXXCPP = @OBJCXXCPP@
743 OBJCXXDEPMODE = @OBJCXXDEPMODE@
744 OBJCXXFLAGS = @OBJCXXFLAGS@
745 OBJDUMP = @OBJDUMP@
746 OBJEXT = @OBJEXT@
747 OTOOL = @OTOOL@
748 OTOOL64 = @OTOOL64@
749 PACKAGE = @PACKAGE@
750 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
751 PACKAGE_NAME = @PACKAGE_NAME@
752 PACKAGE_STRING = @PACKAGE_STRING@
753 PACKAGE_TARNAME = @PACKAGE_TARNAME@
754 PACKAGE_URL = @PACKAGE_URL@
755 PACKAGE_VERSION = @PACKAGE_VERSION@
756 PATH_SEPARATOR = @PATH_SEPARATOR@
757 PKG_CONFIG = @PKG_CONFIG@
758 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
759 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
760 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
761 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
762 RANLIB = @RANLIB@
763 RC = @RC@
764 RELOCATABLE = @RELOCATABLE@
765 REPLACE_CALLOC = @REPLACE_CALLOC@
766 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
767 REPLACE_CHOWN = @REPLACE_CHOWN@
768 REPLACE_CLOSE = @REPLACE_CLOSE@
769 REPLACE_DUP = @REPLACE_DUP@
770 REPLACE_DUP2 = @REPLACE_DUP2@
771 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
772 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
773 REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
774 REPLACE_GETCWD = @REPLACE_GETCWD@
775 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
776 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
777 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
778 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
779 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
780 REPLACE_GETPASS = @REPLACE_GETPASS@
781 REPLACE_ISATTY = @REPLACE_ISATTY@
782 REPLACE_LCHOWN = @REPLACE_LCHOWN@
783 REPLACE_LINK = @REPLACE_LINK@
784 REPLACE_LINKAT = @REPLACE_LINKAT@
785 REPLACE_LSEEK = @REPLACE_LSEEK@
786 REPLACE_MALLOC = @REPLACE_MALLOC@
787 REPLACE_MBTOWC = @REPLACE_MBTOWC@
788 REPLACE_MEMCHR = @REPLACE_MEMCHR@
789 REPLACE_MEMMEM = @REPLACE_MEMMEM@
790 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
791 REPLACE_NULL = @REPLACE_NULL@
792 REPLACE_PREAD = @REPLACE_PREAD@
793 REPLACE_PTSNAME = @REPLACE_PTSNAME@
794 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
795 REPLACE_PUTENV = @REPLACE_PUTENV@
796 REPLACE_PWRITE = @REPLACE_PWRITE@
797 REPLACE_QSORT_R = @REPLACE_QSORT_R@
798 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
799 REPLACE_READ = @REPLACE_READ@
800 REPLACE_READLINK = @REPLACE_READLINK@
801 REPLACE_READLINKAT = @REPLACE_READLINKAT@
802 REPLACE_REALLOC = @REPLACE_REALLOC@
803 REPLACE_REALPATH = @REPLACE_REALPATH@
804 REPLACE_RMDIR = @REPLACE_RMDIR@
805 REPLACE_SETENV = @REPLACE_SETENV@
806 REPLACE_SLEEP = @REPLACE_SLEEP@
807 REPLACE_STPNCPY = @REPLACE_STPNCPY@
808 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
809 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
810 REPLACE_STRDUP = @REPLACE_STRDUP@
811 REPLACE_STRERROR = @REPLACE_STRERROR@
812 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
813 REPLACE_STRNCAT = @REPLACE_STRNCAT@
814 REPLACE_STRNDUP = @REPLACE_STRNDUP@
815 REPLACE_STRNLEN = @REPLACE_STRNLEN@
816 REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
817 REPLACE_STRSTR = @REPLACE_STRSTR@
818 REPLACE_STRTOD = @REPLACE_STRTOD@
819 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
820 REPLACE_SYMLINK = @REPLACE_SYMLINK@
821 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
822 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
823 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
824 REPLACE_UNLINK = @REPLACE_UNLINK@
825 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
826 REPLACE_UNSETENV = @REPLACE_UNSETENV@
827 REPLACE_USLEEP = @REPLACE_USLEEP@
828 REPLACE_WCTOMB = @REPLACE_WCTOMB@
829 REPLACE_WRITE = @REPLACE_WRITE@
830 SED = @SED@
831 SET_MAKE = @SET_MAKE@
832 SHELL = @SHELL@
833 STDDEF_H = @STDDEF_H@
834 STRIP = @STRIP@
835 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
836 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
837 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
838 UNITTESTPP_CFLAGS = @UNITTESTPP_CFLAGS@
839 UNITTESTPP_LIBS = @UNITTESTPP_LIBS@
840 VERSION = @VERSION@
841 VERSION_INFO = @VERSION_INFO@
842 VOIKKO_CFLAGS = @VOIKKO_CFLAGS@
843 VOIKKO_LIBS = @VOIKKO_LIBS@
844 WARN_CFLAGS = @WARN_CFLAGS@
845 WARN_CXXFLAGS = @WARN_CXXFLAGS@
846 WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
847 WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
848 ZEMBEREK_CFLAGS = @ZEMBEREK_CFLAGS@
849 ZEMBEREK_LIBS = @ZEMBEREK_LIBS@
850 abs_builddir = @abs_builddir@
851 abs_srcdir = @abs_srcdir@
852 abs_top_builddir = @abs_top_builddir@
853 abs_top_srcdir = @abs_top_srcdir@
854 ac_ct_AR = @ac_ct_AR@
855 ac_ct_CC = @ac_ct_CC@
856 ac_ct_CXX = @ac_ct_CXX@
857 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
858 ac_ct_OBJCXX = @ac_ct_OBJCXX@
859 am__include = @am__include@
860 am__leading_dot = @am__leading_dot@
861 am__quote = @am__quote@
862 am__tar = @am__tar@
863 am__untar = @am__untar@
864 bindir = @bindir@
865 build = @build@
866 build_alias = @build_alias@
867 build_cpu = @build_cpu@
868 build_os = @build_os@
869 build_vendor = @build_vendor@
870 builddir = @builddir@
871 datadir = @datadir@
872 datarootdir = @datarootdir@
873 docdir = @docdir@
874 dvidir = @dvidir@
875 exec_prefix = @exec_prefix@
876 gl_LIBOBJS = @gl_LIBOBJS@
877 gl_LTLIBOBJS = @gl_LTLIBOBJS@
878 gltests_LIBOBJS = @gltests_LIBOBJS@
879 gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
880 gltests_WITNESS = @gltests_WITNESS@
881 host = @host@
882 host_alias = @host_alias@
883 host_cpu = @host_cpu@
884 host_os = @host_os@
885 host_vendor = @host_vendor@
886 htmldir = @htmldir@
887 includedir = @includedir@
888 infodir = @infodir@
889 install_sh = @install_sh@
890 libdir = @libdir@
891 libexecdir = @libexecdir@
892 lispdir = @lispdir@
893 localedir = @localedir@
894 localstatedir = @localstatedir@
895 mandir = @mandir@
896 mkdir_p = @mkdir_p@
897 objdir = @objdir@
898 oldincludedir = @oldincludedir@
899 pdfdir = @pdfdir@
900 prefix = @prefix@
901 program_transform_name = @program_transform_name@
902 psdir = @psdir@
903 runstatedir = @runstatedir@
904 sbindir = @sbindir@
905 sharedstatedir = @sharedstatedir@
906 shlibext = @shlibext@
907 srcdir = @srcdir@
908 sysconfdir = @sysconfdir@
909 target_alias = @target_alias@
910 top_build_prefix = @top_build_prefix@
911 top_builddir = @top_builddir@
912 top_srcdir = @top_srcdir@
913 @GNU_MAKE_FALSE@libdir_subdir = lib
914
915 # Get libdir suffix
916 @GNU_MAKE_TRUE@libdir_subdir = $(shell echo "$(libdir)" | sed -e 's|^$(exec_prefix)/||' | sed -e 's|^/||')
917 AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS)
918 ENCHANT_CONFIG_DIR = config
919 AM_TESTS_ENVIRONMENT = \
920 export ENCHANT_CONFIG_DIR=$(ENCHANT_CONFIG_DIR); \
921 export LIBTOOL=$(top_builddir)/libtool; \
922 $(MAKE) libenchant-copy; \
923 cp $(top_builddir)/providers/@objdir@/*@shlibext@ $(builddir) || :; \
924 export LSAN_OPTIONS=suppressions=$(top_srcdir)/tests/asan-suppressions.txt;
925
926 DISTCLEANFILES = *@shlibext@
927 LIBENCHANT_COPY = $(builddir)/$(libdir_subdir)/libenchant-@ENCHANT_MAJOR_VERSION@.la
928 APPLESPELL_CONFIG = config/AppleSpell.config
929 LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS)
930 LIBADD = $(LIBENCHANT_COPY)
931 DEPS = $(LIBENCHANT_COPY)
932 LOG_COMPILER = $(srcdir)/../run-test
933 providers_test_SOURCES = providers.test.cpp \
934 ../EnchantTestFixture.h \
935 ../EnchantBrokerTestFixture.h \
936 ../EnchantDictionaryTestFixture.h \
937 unittest_enchant_providers.h \
938 Dictionary/dictionary_check.cpp \
939 Dictionary/dictionary_suggest.cpp \
940 Provider/provider_describe_dict.cpp \
941 Provider/provider_dictionary_exists.cpp \
942 Provider/provider_identify_dict.cpp \
943 Provider/provider_list_dicts.cpp \
944 Provider/provider_request_dict.cpp \
945 $(NULL)
946
947 providers_test_DEPENDENCIES = $(LIBENCHANT_COPY) $(APPLESPELL_CONFIG)
948 providers_test_LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS) $(UNITTESTPP_LIBS)
949 providers_test_CPPFLAGS = $(AM_CPPFLAGS) $(UNITTESTPP_CFLAGS) -DLIBDIR_SUBDIR=\"$(libdir_subdir)\"
950 TESTS = $(check_PROGRAMS)
951 all: all-am
952
953 .SUFFIXES:
954 .SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
955 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
956 @for dep in $?; do \
957 case '$(am__configure_deps)' in \
958 *$$dep*) \
959 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
960 && { if test -f $@; then exit 0; else break; fi; }; \
961 exit 1;; \
962 esac; \
963 done; \
964 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/enchant_providers/Makefile'; \
965 $(am__cd) $(top_srcdir) && \
966 $(AUTOMAKE) --gnu tests/enchant_providers/Makefile
967 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
968 @case '$?' in \
969 *config.status*) \
970 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
971 *) \
972 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
973 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
974 esac;
975
976 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
977 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
978
979 $(top_srcdir)/configure: $(am__configure_deps)
980 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
981 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
982 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
983 $(am__aclocal_m4_deps):
984
985 clean-checkPROGRAMS:
986 @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
987 echo " rm -f" $$list; \
988 rm -f $$list || exit $$?; \
989 test -n "$(EXEEXT)" || exit 0; \
990 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
991 echo " rm -f" $$list; \
992 rm -f $$list
993 Dictionary/$(am__dirstamp):
994 @$(MKDIR_P) Dictionary
995 @: > Dictionary/$(am__dirstamp)
996 Dictionary/$(DEPDIR)/$(am__dirstamp):
997 @$(MKDIR_P) Dictionary/$(DEPDIR)
998 @: > Dictionary/$(DEPDIR)/$(am__dirstamp)
999 Dictionary/providers_test-dictionary_check.$(OBJEXT): \
1000 Dictionary/$(am__dirstamp) \
1001 Dictionary/$(DEPDIR)/$(am__dirstamp)
1002 Dictionary/providers_test-dictionary_suggest.$(OBJEXT): \
1003 Dictionary/$(am__dirstamp) \
1004 Dictionary/$(DEPDIR)/$(am__dirstamp)
1005 Provider/$(am__dirstamp):
1006 @$(MKDIR_P) Provider
1007 @: > Provider/$(am__dirstamp)
1008 Provider/$(DEPDIR)/$(am__dirstamp):
1009 @$(MKDIR_P) Provider/$(DEPDIR)
1010 @: > Provider/$(DEPDIR)/$(am__dirstamp)
1011 Provider/providers_test-provider_describe_dict.$(OBJEXT): \
1012 Provider/$(am__dirstamp) Provider/$(DEPDIR)/$(am__dirstamp)
1013 Provider/providers_test-provider_dictionary_exists.$(OBJEXT): \
1014 Provider/$(am__dirstamp) Provider/$(DEPDIR)/$(am__dirstamp)
1015 Provider/providers_test-provider_identify_dict.$(OBJEXT): \
1016 Provider/$(am__dirstamp) Provider/$(DEPDIR)/$(am__dirstamp)
1017 Provider/providers_test-provider_list_dicts.$(OBJEXT): \
1018 Provider/$(am__dirstamp) Provider/$(DEPDIR)/$(am__dirstamp)
1019 Provider/providers_test-provider_request_dict.$(OBJEXT): \
1020 Provider/$(am__dirstamp) Provider/$(DEPDIR)/$(am__dirstamp)
1021
1022 providers.test$(EXEEXT): $(providers_test_OBJECTS) $(providers_test_DEPENDENCIES) $(EXTRA_providers_test_DEPENDENCIES)
1023 @rm -f providers.test$(EXEEXT)
1024 $(AM_V_CXXLD)$(CXXLINK) $(providers_test_OBJECTS) $(providers_test_LDADD) $(LIBS)
1025
1026 mostlyclean-compile:
1027 -rm -f *.$(OBJEXT)
1028 -rm -f Dictionary/*.$(OBJEXT)
1029 -rm -f Provider/*.$(OBJEXT)
1030
1031 distclean-compile:
1032 -rm -f *.tab.c
1033
1034 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/providers_test-providers.test.Po@am__quote@
1035 @AMDEP_TRUE@@am__include@ @am__quote@Dictionary/$(DEPDIR)/providers_test-dictionary_check.Po@am__quote@
1036 @AMDEP_TRUE@@am__include@ @am__quote@Dictionary/$(DEPDIR)/providers_test-dictionary_suggest.Po@am__quote@
1037 @AMDEP_TRUE@@am__include@ @am__quote@Provider/$(DEPDIR)/providers_test-provider_describe_dict.Po@am__quote@
1038 @AMDEP_TRUE@@am__include@ @am__quote@Provider/$(DEPDIR)/providers_test-provider_dictionary_exists.Po@am__quote@
1039 @AMDEP_TRUE@@am__include@ @am__quote@Provider/$(DEPDIR)/providers_test-provider_identify_dict.Po@am__quote@
1040 @AMDEP_TRUE@@am__include@ @am__quote@Provider/$(DEPDIR)/providers_test-provider_list_dicts.Po@am__quote@
1041 @AMDEP_TRUE@@am__include@ @am__quote@Provider/$(DEPDIR)/providers_test-provider_request_dict.Po@am__quote@
1042
1043 .cpp.o:
1044 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
1045 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
1046 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
1047 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
1048 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1049 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
1050
1051 .cpp.obj:
1052 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
1053 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
1054 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
1055 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
1056 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1057 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
1058
1059 .cpp.lo:
1060 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
1061 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
1062 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
1063 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
1064 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1065 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
1066
1067 providers_test-providers.test.o: providers.test.cpp
1068 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT providers_test-providers.test.o -MD -MP -MF $(DEPDIR)/providers_test-providers.test.Tpo -c -o providers_test-providers.test.o `test -f 'providers.test.cpp' || echo '$(srcdir)/'`providers.test.cpp
1069 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/providers_test-providers.test.Tpo $(DEPDIR)/providers_test-providers.test.Po
1070 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='providers.test.cpp' object='providers_test-providers.test.o' libtool=no @AMDEPBACKSLASH@
1071 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1072 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o providers_test-providers.test.o `test -f 'providers.test.cpp' || echo '$(srcdir)/'`providers.test.cpp
1073
1074 providers_test-providers.test.obj: providers.test.cpp
1075 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT providers_test-providers.test.obj -MD -MP -MF $(DEPDIR)/providers_test-providers.test.Tpo -c -o providers_test-providers.test.obj `if test -f 'providers.test.cpp'; then $(CYGPATH_W) 'providers.test.cpp'; else $(CYGPATH_W) '$(srcdir)/providers.test.cpp'; fi`
1076 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/providers_test-providers.test.Tpo $(DEPDIR)/providers_test-providers.test.Po
1077 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='providers.test.cpp' object='providers_test-providers.test.obj' libtool=no @AMDEPBACKSLASH@
1078 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1079 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o providers_test-providers.test.obj `if test -f 'providers.test.cpp'; then $(CYGPATH_W) 'providers.test.cpp'; else $(CYGPATH_W) '$(srcdir)/providers.test.cpp'; fi`
1080
1081 Dictionary/providers_test-dictionary_check.o: Dictionary/dictionary_check.cpp
1082 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dictionary/providers_test-dictionary_check.o -MD -MP -MF Dictionary/$(DEPDIR)/providers_test-dictionary_check.Tpo -c -o Dictionary/providers_test-dictionary_check.o `test -f 'Dictionary/dictionary_check.cpp' || echo '$(srcdir)/'`Dictionary/dictionary_check.cpp
1083 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dictionary/$(DEPDIR)/providers_test-dictionary_check.Tpo Dictionary/$(DEPDIR)/providers_test-dictionary_check.Po
1084 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Dictionary/dictionary_check.cpp' object='Dictionary/providers_test-dictionary_check.o' libtool=no @AMDEPBACKSLASH@
1085 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1086 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dictionary/providers_test-dictionary_check.o `test -f 'Dictionary/dictionary_check.cpp' || echo '$(srcdir)/'`Dictionary/dictionary_check.cpp
1087
1088 Dictionary/providers_test-dictionary_check.obj: Dictionary/dictionary_check.cpp
1089 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dictionary/providers_test-dictionary_check.obj -MD -MP -MF Dictionary/$(DEPDIR)/providers_test-dictionary_check.Tpo -c -o Dictionary/providers_test-dictionary_check.obj `if test -f 'Dictionary/dictionary_check.cpp'; then $(CYGPATH_W) 'Dictionary/dictionary_check.cpp'; else $(CYGPATH_W) '$(srcdir)/Dictionary/dictionary_check.cpp'; fi`
1090 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dictionary/$(DEPDIR)/providers_test-dictionary_check.Tpo Dictionary/$(DEPDIR)/providers_test-dictionary_check.Po
1091 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Dictionary/dictionary_check.cpp' object='Dictionary/providers_test-dictionary_check.obj' libtool=no @AMDEPBACKSLASH@
1092 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1093 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dictionary/providers_test-dictionary_check.obj `if test -f 'Dictionary/dictionary_check.cpp'; then $(CYGPATH_W) 'Dictionary/dictionary_check.cpp'; else $(CYGPATH_W) '$(srcdir)/Dictionary/dictionary_check.cpp'; fi`
1094
1095 Dictionary/providers_test-dictionary_suggest.o: Dictionary/dictionary_suggest.cpp
1096 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dictionary/providers_test-dictionary_suggest.o -MD -MP -MF Dictionary/$(DEPDIR)/providers_test-dictionary_suggest.Tpo -c -o Dictionary/providers_test-dictionary_suggest.o `test -f 'Dictionary/dictionary_suggest.cpp' || echo '$(srcdir)/'`Dictionary/dictionary_suggest.cpp
1097 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dictionary/$(DEPDIR)/providers_test-dictionary_suggest.Tpo Dictionary/$(DEPDIR)/providers_test-dictionary_suggest.Po
1098 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Dictionary/dictionary_suggest.cpp' object='Dictionary/providers_test-dictionary_suggest.o' libtool=no @AMDEPBACKSLASH@
1099 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1100 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dictionary/providers_test-dictionary_suggest.o `test -f 'Dictionary/dictionary_suggest.cpp' || echo '$(srcdir)/'`Dictionary/dictionary_suggest.cpp
1101
1102 Dictionary/providers_test-dictionary_suggest.obj: Dictionary/dictionary_suggest.cpp
1103 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dictionary/providers_test-dictionary_suggest.obj -MD -MP -MF Dictionary/$(DEPDIR)/providers_test-dictionary_suggest.Tpo -c -o Dictionary/providers_test-dictionary_suggest.obj `if test -f 'Dictionary/dictionary_suggest.cpp'; then $(CYGPATH_W) 'Dictionary/dictionary_suggest.cpp'; else $(CYGPATH_W) '$(srcdir)/Dictionary/dictionary_suggest.cpp'; fi`
1104 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dictionary/$(DEPDIR)/providers_test-dictionary_suggest.Tpo Dictionary/$(DEPDIR)/providers_test-dictionary_suggest.Po
1105 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Dictionary/dictionary_suggest.cpp' object='Dictionary/providers_test-dictionary_suggest.obj' libtool=no @AMDEPBACKSLASH@
1106 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1107 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dictionary/providers_test-dictionary_suggest.obj `if test -f 'Dictionary/dictionary_suggest.cpp'; then $(CYGPATH_W) 'Dictionary/dictionary_suggest.cpp'; else $(CYGPATH_W) '$(srcdir)/Dictionary/dictionary_suggest.cpp'; fi`
1108
1109 Provider/providers_test-provider_describe_dict.o: Provider/provider_describe_dict.cpp
1110 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_describe_dict.o -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_describe_dict.Tpo -c -o Provider/providers_test-provider_describe_dict.o `test -f 'Provider/provider_describe_dict.cpp' || echo '$(srcdir)/'`Provider/provider_describe_dict.cpp
1111 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_describe_dict.Tpo Provider/$(DEPDIR)/providers_test-provider_describe_dict.Po
1112 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_describe_dict.cpp' object='Provider/providers_test-provider_describe_dict.o' libtool=no @AMDEPBACKSLASH@
1113 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1114 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_describe_dict.o `test -f 'Provider/provider_describe_dict.cpp' || echo '$(srcdir)/'`Provider/provider_describe_dict.cpp
1115
1116 Provider/providers_test-provider_describe_dict.obj: Provider/provider_describe_dict.cpp
1117 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_describe_dict.obj -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_describe_dict.Tpo -c -o Provider/providers_test-provider_describe_dict.obj `if test -f 'Provider/provider_describe_dict.cpp'; then $(CYGPATH_W) 'Provider/provider_describe_dict.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_describe_dict.cpp'; fi`
1118 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_describe_dict.Tpo Provider/$(DEPDIR)/providers_test-provider_describe_dict.Po
1119 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_describe_dict.cpp' object='Provider/providers_test-provider_describe_dict.obj' libtool=no @AMDEPBACKSLASH@
1120 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1121 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_describe_dict.obj `if test -f 'Provider/provider_describe_dict.cpp'; then $(CYGPATH_W) 'Provider/provider_describe_dict.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_describe_dict.cpp'; fi`
1122
1123 Provider/providers_test-provider_dictionary_exists.o: Provider/provider_dictionary_exists.cpp
1124 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_dictionary_exists.o -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_dictionary_exists.Tpo -c -o Provider/providers_test-provider_dictionary_exists.o `test -f 'Provider/provider_dictionary_exists.cpp' || echo '$(srcdir)/'`Provider/provider_dictionary_exists.cpp
1125 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_dictionary_exists.Tpo Provider/$(DEPDIR)/providers_test-provider_dictionary_exists.Po
1126 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_dictionary_exists.cpp' object='Provider/providers_test-provider_dictionary_exists.o' libtool=no @AMDEPBACKSLASH@
1127 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1128 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_dictionary_exists.o `test -f 'Provider/provider_dictionary_exists.cpp' || echo '$(srcdir)/'`Provider/provider_dictionary_exists.cpp
1129
1130 Provider/providers_test-provider_dictionary_exists.obj: Provider/provider_dictionary_exists.cpp
1131 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_dictionary_exists.obj -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_dictionary_exists.Tpo -c -o Provider/providers_test-provider_dictionary_exists.obj `if test -f 'Provider/provider_dictionary_exists.cpp'; then $(CYGPATH_W) 'Provider/provider_dictionary_exists.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_dictionary_exists.cpp'; fi`
1132 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_dictionary_exists.Tpo Provider/$(DEPDIR)/providers_test-provider_dictionary_exists.Po
1133 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_dictionary_exists.cpp' object='Provider/providers_test-provider_dictionary_exists.obj' libtool=no @AMDEPBACKSLASH@
1134 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1135 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_dictionary_exists.obj `if test -f 'Provider/provider_dictionary_exists.cpp'; then $(CYGPATH_W) 'Provider/provider_dictionary_exists.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_dictionary_exists.cpp'; fi`
1136
1137 Provider/providers_test-provider_identify_dict.o: Provider/provider_identify_dict.cpp
1138 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_identify_dict.o -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_identify_dict.Tpo -c -o Provider/providers_test-provider_identify_dict.o `test -f 'Provider/provider_identify_dict.cpp' || echo '$(srcdir)/'`Provider/provider_identify_dict.cpp
1139 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_identify_dict.Tpo Provider/$(DEPDIR)/providers_test-provider_identify_dict.Po
1140 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_identify_dict.cpp' object='Provider/providers_test-provider_identify_dict.o' libtool=no @AMDEPBACKSLASH@
1141 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1142 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_identify_dict.o `test -f 'Provider/provider_identify_dict.cpp' || echo '$(srcdir)/'`Provider/provider_identify_dict.cpp
1143
1144 Provider/providers_test-provider_identify_dict.obj: Provider/provider_identify_dict.cpp
1145 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_identify_dict.obj -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_identify_dict.Tpo -c -o Provider/providers_test-provider_identify_dict.obj `if test -f 'Provider/provider_identify_dict.cpp'; then $(CYGPATH_W) 'Provider/provider_identify_dict.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_identify_dict.cpp'; fi`
1146 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_identify_dict.Tpo Provider/$(DEPDIR)/providers_test-provider_identify_dict.Po
1147 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_identify_dict.cpp' object='Provider/providers_test-provider_identify_dict.obj' libtool=no @AMDEPBACKSLASH@
1148 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1149 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_identify_dict.obj `if test -f 'Provider/provider_identify_dict.cpp'; then $(CYGPATH_W) 'Provider/provider_identify_dict.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_identify_dict.cpp'; fi`
1150
1151 Provider/providers_test-provider_list_dicts.o: Provider/provider_list_dicts.cpp
1152 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_list_dicts.o -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_list_dicts.Tpo -c -o Provider/providers_test-provider_list_dicts.o `test -f 'Provider/provider_list_dicts.cpp' || echo '$(srcdir)/'`Provider/provider_list_dicts.cpp
1153 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_list_dicts.Tpo Provider/$(DEPDIR)/providers_test-provider_list_dicts.Po
1154 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_list_dicts.cpp' object='Provider/providers_test-provider_list_dicts.o' libtool=no @AMDEPBACKSLASH@
1155 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1156 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_list_dicts.o `test -f 'Provider/provider_list_dicts.cpp' || echo '$(srcdir)/'`Provider/provider_list_dicts.cpp
1157
1158 Provider/providers_test-provider_list_dicts.obj: Provider/provider_list_dicts.cpp
1159 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_list_dicts.obj -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_list_dicts.Tpo -c -o Provider/providers_test-provider_list_dicts.obj `if test -f 'Provider/provider_list_dicts.cpp'; then $(CYGPATH_W) 'Provider/provider_list_dicts.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_list_dicts.cpp'; fi`
1160 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_list_dicts.Tpo Provider/$(DEPDIR)/providers_test-provider_list_dicts.Po
1161 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_list_dicts.cpp' object='Provider/providers_test-provider_list_dicts.obj' libtool=no @AMDEPBACKSLASH@
1162 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1163 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_list_dicts.obj `if test -f 'Provider/provider_list_dicts.cpp'; then $(CYGPATH_W) 'Provider/provider_list_dicts.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_list_dicts.cpp'; fi`
1164
1165 Provider/providers_test-provider_request_dict.o: Provider/provider_request_dict.cpp
1166 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_request_dict.o -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_request_dict.Tpo -c -o Provider/providers_test-provider_request_dict.o `test -f 'Provider/provider_request_dict.cpp' || echo '$(srcdir)/'`Provider/provider_request_dict.cpp
1167 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_request_dict.Tpo Provider/$(DEPDIR)/providers_test-provider_request_dict.Po
1168 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_request_dict.cpp' object='Provider/providers_test-provider_request_dict.o' libtool=no @AMDEPBACKSLASH@
1169 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1170 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_request_dict.o `test -f 'Provider/provider_request_dict.cpp' || echo '$(srcdir)/'`Provider/provider_request_dict.cpp
1171
1172 Provider/providers_test-provider_request_dict.obj: Provider/provider_request_dict.cpp
1173 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Provider/providers_test-provider_request_dict.obj -MD -MP -MF Provider/$(DEPDIR)/providers_test-provider_request_dict.Tpo -c -o Provider/providers_test-provider_request_dict.obj `if test -f 'Provider/provider_request_dict.cpp'; then $(CYGPATH_W) 'Provider/provider_request_dict.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_request_dict.cpp'; fi`
1174 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Provider/$(DEPDIR)/providers_test-provider_request_dict.Tpo Provider/$(DEPDIR)/providers_test-provider_request_dict.Po
1175 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Provider/provider_request_dict.cpp' object='Provider/providers_test-provider_request_dict.obj' libtool=no @AMDEPBACKSLASH@
1176 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1177 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(providers_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Provider/providers_test-provider_request_dict.obj `if test -f 'Provider/provider_request_dict.cpp'; then $(CYGPATH_W) 'Provider/provider_request_dict.cpp'; else $(CYGPATH_W) '$(srcdir)/Provider/provider_request_dict.cpp'; fi`
1178
1179 mostlyclean-libtool:
1180 -rm -f *.lo
1181
1182 clean-libtool:
1183 -rm -rf .libs _libs
1184
1185 ID: $(am__tagged_files)
1186 $(am__define_uniq_tagged_files); mkid -fID $$unique
1187 tags: tags-am
1188 TAGS: tags
1189
1190 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1191 set x; \
1192 here=`pwd`; \
1193 $(am__define_uniq_tagged_files); \
1194 shift; \
1195 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
1196 test -n "$$unique" || unique=$$empty_fix; \
1197 if test $$# -gt 0; then \
1198 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1199 "$$@" $$unique; \
1200 else \
1201 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1202 $$unique; \
1203 fi; \
1204 fi
1205 ctags: ctags-am
1206
1207 CTAGS: ctags
1208 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1209 $(am__define_uniq_tagged_files); \
1210 test -z "$(CTAGS_ARGS)$$unique" \
1211 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
1212 $$unique
1213
1214 GTAGS:
1215 here=`$(am__cd) $(top_builddir) && pwd` \
1216 && $(am__cd) $(top_srcdir) \
1217 && gtags -i $(GTAGS_ARGS) "$$here"
1218 cscopelist: cscopelist-am
1219
1220 cscopelist-am: $(am__tagged_files)
1221 list='$(am__tagged_files)'; \
1222 case "$(srcdir)" in \
1223 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
1224 *) sdir=$(subdir)/$(srcdir) ;; \
1225 esac; \
1226 for i in $$list; do \
1227 if test -f "$$i"; then \
1228 echo "$(subdir)/$$i"; \
1229 else \
1230 echo "$$sdir/$$i"; \
1231 fi; \
1232 done >> $(top_builddir)/cscope.files
1233
1234 distclean-tags:
1235 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
1236
1237 # Recover from deleted '.trs' file; this should ensure that
1238 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
1239 # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
1240 # to avoid problems with "make -n".
1241 .log.trs:
1242 rm -f $< $@
1243 $(MAKE) $(AM_MAKEFLAGS) $<
1244
1245 # Leading 'am--fnord' is there to ensure the list of targets does not
1246 # expand to empty, as could happen e.g. with make check TESTS=''.
1247 am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
1248 am--force-recheck:
1249 @:
1250
1251 $(TEST_SUITE_LOG): $(TEST_LOGS)
1252 @$(am__set_TESTS_bases); \
1253 am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
1254 redo_bases=`for i in $$bases; do \
1255 am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
1256 done`; \
1257 if test -n "$$redo_bases"; then \
1258 redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
1259 redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
1260 if $(am__make_dryrun); then :; else \
1261 rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
1262 fi; \
1263 fi; \
1264 if test -n "$$am__remaking_logs"; then \
1265 echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
1266 "recursion detected" >&2; \
1267 elif test -n "$$redo_logs"; then \
1268 am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
1269 fi; \
1270 if $(am__make_dryrun); then :; else \
1271 st=0; \
1272 errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
1273 for i in $$redo_bases; do \
1274 test -f $$i.trs && test -r $$i.trs \
1275 || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
1276 test -f $$i.log && test -r $$i.log \
1277 || { echo "$$errmsg $$i.log" >&2; st=1; }; \
1278 done; \
1279 test $$st -eq 0 || exit 1; \
1280 fi
1281 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
1282 ws='[ ]'; \
1283 results=`for b in $$bases; do echo $$b.trs; done`; \
1284 test -n "$$results" || results=/dev/null; \
1285 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
1286 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
1287 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
1288 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
1289 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
1290 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
1291 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
1292 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
1293 success=true; \
1294 else \
1295 success=false; \
1296 fi; \
1297 br='==================='; br=$$br$$br$$br$$br; \
1298 result_count () \
1299 { \
1300 if test x"$$1" = x"--maybe-color"; then \
1301 maybe_colorize=yes; \
1302 elif test x"$$1" = x"--no-color"; then \
1303 maybe_colorize=no; \
1304 else \
1305 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
1306 fi; \
1307 shift; \
1308 desc=$$1 count=$$2; \
1309 if test $$maybe_colorize = yes && test $$count -gt 0; then \
1310 color_start=$$3 color_end=$$std; \
1311 else \
1312 color_start= color_end=; \
1313 fi; \
1314 echo "$${color_start}# $$desc $$count$${color_end}"; \
1315 }; \
1316 create_testsuite_report () \
1317 { \
1318 result_count $$1 "TOTAL:" $$all "$$brg"; \
1319 result_count $$1 "PASS: " $$pass "$$grn"; \
1320 result_count $$1 "SKIP: " $$skip "$$blu"; \
1321 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
1322 result_count $$1 "FAIL: " $$fail "$$red"; \
1323 result_count $$1 "XPASS:" $$xpass "$$red"; \
1324 result_count $$1 "ERROR:" $$error "$$mgn"; \
1325 }; \
1326 { \
1327 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
1328 $(am__rst_title); \
1329 create_testsuite_report --no-color; \
1330 echo; \
1331 echo ".. contents:: :depth: 2"; \
1332 echo; \
1333 for b in $$bases; do echo $$b; done \
1334 | $(am__create_global_log); \
1335 } >$(TEST_SUITE_LOG).tmp || exit 1; \
1336 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
1337 if $$success; then \
1338 col="$$grn"; \
1339 else \
1340 col="$$red"; \
1341 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
1342 fi; \
1343 echo "$${col}$$br$${std}"; \
1344 echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
1345 echo "$${col}$$br$${std}"; \
1346 create_testsuite_report --maybe-color; \
1347 echo "$$col$$br$$std"; \
1348 if $$success; then :; else \
1349 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
1350 if test -n "$(PACKAGE_BUGREPORT)"; then \
1351 echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
1352 fi; \
1353 echo "$$col$$br$$std"; \
1354 fi; \
1355 $$success || exit 1
1356
1357 check-TESTS:
1358 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
1359 @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
1360 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
1361 @set +e; $(am__set_TESTS_bases); \
1362 log_list=`for i in $$bases; do echo $$i.log; done`; \
1363 trs_list=`for i in $$bases; do echo $$i.trs; done`; \
1364 log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
1365 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
1366 exit $$?;
1367 recheck: all $(check_PROGRAMS)
1368 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
1369 @set +e; $(am__set_TESTS_bases); \
1370 bases=`for i in $$bases; do echo $$i; done \
1371 | $(am__list_recheck_tests)` || exit 1; \
1372 log_list=`for i in $$bases; do echo $$i.log; done`; \
1373 log_list=`echo $$log_list`; \
1374 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
1375 am__force_recheck=am--force-recheck \
1376 TEST_LOGS="$$log_list"; \
1377 exit $$?
1378 .test.log:
1379 @p='$<'; \
1380 $(am__set_b); \
1381 $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
1382 --log-file $$b.log --trs-file $$b.trs \
1383 $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
1384 "$$tst" $(AM_TESTS_FD_REDIRECT)
1385 @am__EXEEXT_TRUE@.test$(EXEEXT).log:
1386 @am__EXEEXT_TRUE@ @p='$<'; \
1387 @am__EXEEXT_TRUE@ $(am__set_b); \
1388 @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
1389 @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
1390 @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
1391 @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
1392
1393 distdir: $(DISTFILES)
1394 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1395 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1396 list='$(DISTFILES)'; \
1397 dist_files=`for file in $$list; do echo $$file; done | \
1398 sed -e "s|^$$srcdirstrip/||;t" \
1399 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
1400 case $$dist_files in \
1401 */*) $(MKDIR_P) `echo "$$dist_files" | \
1402 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
1403 sort -u` ;; \
1404 esac; \
1405 for file in $$dist_files; do \
1406 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
1407 if test -d $$d/$$file; then \
1408 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
1409 if test -d "$(distdir)/$$file"; then \
1410 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1411 fi; \
1412 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
1413 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
1414 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1415 fi; \
1416 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
1417 else \
1418 test -f "$(distdir)/$$file" \
1419 || cp -p $$d/$$file "$(distdir)/$$file" \
1420 || exit 1; \
1421 fi; \
1422 done
1423 check-am: all-am
1424 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
1425 $(MAKE) $(AM_MAKEFLAGS) check-TESTS
1426 check: check-am
1427 all-am: Makefile
1428 installdirs:
1429 install: install-am
1430 install-exec: install-exec-am
1431 install-data: install-data-am
1432 uninstall: uninstall-am
1433
1434 install-am: all-am
1435 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1436
1437 installcheck: installcheck-am
1438 install-strip:
1439 if test -z '$(STRIP)'; then \
1440 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1441 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1442 install; \
1443 else \
1444 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1445 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1446 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
1447 fi
1448 mostlyclean-generic:
1449 -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
1450 -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
1451 -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
1452
1453 clean-generic:
1454
1455 distclean-generic:
1456 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1457 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1458 -rm -f Dictionary/$(DEPDIR)/$(am__dirstamp)
1459 -rm -f Dictionary/$(am__dirstamp)
1460 -rm -f Provider/$(DEPDIR)/$(am__dirstamp)
1461 -rm -f Provider/$(am__dirstamp)
1462 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
1463
1464 maintainer-clean-generic:
1465 @echo "This command is intended for maintainers to use"
1466 @echo "it deletes files that may require special tools to rebuild."
1467 clean: clean-am
1468
1469 clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
1470 mostlyclean-am
1471
1472 distclean: distclean-am
1473 -rm -rf ./$(DEPDIR) Dictionary/$(DEPDIR) Provider/$(DEPDIR)
1474 -rm -f Makefile
1475 distclean-am: clean-am distclean-compile distclean-generic \
1476 distclean-local distclean-tags
1477
1478 dvi: dvi-am
1479
1480 dvi-am:
1481
1482 html: html-am
1483
1484 html-am:
1485
1486 info: info-am
1487
1488 info-am:
1489
1490 install-data-am:
1491
1492 install-dvi: install-dvi-am
1493
1494 install-dvi-am:
1495
1496 install-exec-am:
1497
1498 install-html: install-html-am
1499
1500 install-html-am:
1501
1502 install-info: install-info-am
1503
1504 install-info-am:
1505
1506 install-man:
1507
1508 install-pdf: install-pdf-am
1509
1510 install-pdf-am:
1511
1512 install-ps: install-ps-am
1513
1514 install-ps-am:
1515
1516 installcheck-am:
1517
1518 maintainer-clean: maintainer-clean-am
1519 -rm -rf ./$(DEPDIR) Dictionary/$(DEPDIR) Provider/$(DEPDIR)
1520 -rm -f Makefile
1521 maintainer-clean-am: distclean-am maintainer-clean-generic
1522
1523 mostlyclean: mostlyclean-am
1524
1525 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1526 mostlyclean-libtool
1527
1528 pdf: pdf-am
1529
1530 pdf-am:
1531
1532 ps: ps-am
1533
1534 ps-am:
1535
1536 uninstall-am:
1537
1538 .MAKE: check-am install-am install-strip
1539
1540 .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
1541 clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
1542 ctags ctags-am distclean distclean-compile distclean-generic \
1543 distclean-libtool distclean-local distclean-tags distdir dvi \
1544 dvi-am html html-am info info-am install install-am \
1545 install-data install-data-am install-dvi install-dvi-am \
1546 install-exec install-exec-am install-html install-html-am \
1547 install-info install-info-am install-man install-pdf \
1548 install-pdf-am install-ps install-ps-am install-strip \
1549 installcheck installcheck-am installdirs maintainer-clean \
1550 maintainer-clean-generic mostlyclean mostlyclean-compile \
1551 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
1552 recheck tags tags-am uninstall uninstall-am
1553
1554 .PRECIOUS: Makefile
1555
1556
1557 distclean-local:
1558 rm -rf $(libdir_subdir) $(ENCHANT_CONFIG_DIR)
1559 $(LIBENCHANT_COPY): $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la
1560 $(MAKE) libenchant-copy
1561
1562 libenchant-copy:
1563 rm -rf $(libdir_subdir)
1564 $(MKDIR_P) $(libdir_subdir)/enchant-@ENCHANT_MAJOR_VERSION@
1565 cp -r $(top_builddir)/src/@objdir@ $(libdir_subdir)/
1566 cp $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(libdir_subdir)/
1567 $(APPLESPELL_CONFIG): $(top_srcdir)/providers/AppleSpell.config
1568 $(MKDIR_P) config
1569 cp $(top_srcdir)/providers/AppleSpell.config config/
1570
1571 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1572 # Otherwise a system limit (for SysV at least) may be exceeded.
1573 .NOEXPORT:
+0
-5
tests/enchant_providers/Readme.txt less more
0 These are generic tests to test the providers. They should work on any provider.
1 When a provider does not support a particular function, those tests will just pass.
2
3 Some tests rely on the provider having specific language support:
4 fr_FR
6262 return ws;
6363 }
6464
65 EnchantDict* GetFirstAvailableDictionary()
65 EnchantDict* GetDefaultDictionary()
6666 {
6767 EnchantDict* dict=NULL;
6868
69 // get the first dictionary listed as being available
70 if(_provider->list_dicts && _provider->request_dict)
69 // Try getting dictionary for user's default language
70 char *lang = enchant_get_user_language();
71 if (_provider->request_dict)
72 {
73 dict = (*_provider->request_dict) (_provider, lang);
74 }
75 g_free (lang);
76
77 // If not available, get the first dictionary listed as being available
78 if (!dict && _provider->list_dicts && _provider->request_dict)
7179 {
7280 size_t n_dicts;
7381
2424 #include <string.h>
2525
2626 /////////////////////////////////////////////////////////////////////////////
27 // Utility functions
28 std::string origLangEnv;
29 bool hasLangEnv;
30
31 static void SaveLangEnv()
32 {
33 hasLangEnv = (g_getenv("LANG") != NULL);
34 if(hasLangEnv)
35 {
36 origLangEnv = std::string(g_getenv("LANG"));
37 }
38 }
39
40 static void RestoreLangEnv()
41 {
42 if(hasLangEnv)
43 {
44 g_setenv("LANG", origLangEnv.c_str(), TRUE);
45 }
46 else{
47 g_unsetenv("LANG");
48 }
49 }
50
51 /////////////////////////////////////////////////////////////////////////////
2752 // Test Normal Operation
2853 TEST(EnchantGetUserLanguage)
2954 {
3459
3560 TEST(EnchantGetUserLanguage_FromLangEnvironmentVariable)
3661 {
37 std::string origLangEnv;
38 bool hasLangEnv = (g_getenv("LANG") != NULL);
39 if(hasLangEnv)
40 {
41 origLangEnv = std::string(g_getenv("LANG"));
42 }
62 SaveLangEnv();
4363
4464 g_setenv("LANG", "qaa", TRUE);
4565 char* userLanguage = enchant_get_user_language();
4868
4969 g_free(userLanguage);
5070
51 if(hasLangEnv)
52 {
53 g_setenv("LANG", origLangEnv.c_str(), TRUE);
54 }
55 else{
56 g_unsetenv("LANG");
57 }
71 RestoreLangEnv();
5872 }
5973
6074 static void SetLocaleAndCheckLanguage(const char *locale, const char *language)
6175 {
76 SaveLangEnv();
77 g_unsetenv("LANG"); // Ensure LANG does not override locale for enchant_get_user_language
78
6279 std::string origLocale(setlocale (LC_ALL, NULL));
6380
6481 setlocale (LC_ALL, locale);
7592 g_free(userLanguage);
7693
7794 setlocale (LC_ALL, origLocale.c_str());
95
96 RestoreLangEnv();
7897 }
7998
8099 TEST(EnchantGetUserLanguage_LocaleIsC_LocalIsEn)
00 #!/bin/sh
11 # Run the given binary via a libtool wrapper script
2 $LIBTOOL --mode=execute $VALGRIND "$@"
2 $LIBTOOL --mode=execute "$@"