Codebase list libhtp / fresh-snapshots/main
New upstream snapshot. Debian Janitor 2 years ago
44 changed file(s) with 52642 addition(s) and 3633 deletion(s). Raw diff Collapse all Expand all
+0
-67
.gitignore less more
0 .deps
1 .dirstamp
2 .libs
3 *~
4 *.exe
5 *.gcda
6 *.gcno
7 *.gcov
8 *.la
9 *.lo
10 *.o
11 *.slo
12 *.stackdump
13 *.dSYM
14 *.a
15 *.pdf
16 *.sig
17 *_config_auto_gen.h
18 *_config_auto_gen.h.in
19 htp-*.tar.gz
20 compile
21 .cproject
22 /Makefile
23 /Makefile.in
24 /aclocal.m4
25 /autom4te.cache
26 /config.guess
27 /config.h
28 /config.h.in
29 /config.log
30 /config.status
31 /config.sub
32 /configure
33 /depcomp
34 lcov
35 /docs/doxygen
36 /htp.pc
37 /htp/.libs/
38 /htp/Makefile
39 /htp/Makefile.in
40 /INSTALL
41 /install-sh
42 /libtool
43 /ltmain.sh
44 /missing
45 m4
46 /nbproject/
47 /nbproject/private/
48 /stamp-h1
49 /test-driver
50 /test/.libs/
51 /test/Makefile
52 /test/Makefile.in
53 /test/main*
54 /test/test_bstr
55 /test/test_hybrid
56 /test/test_utils
57 /test/test_all
58 /test/test_all.log
59 /test/test_all.trs
60 /test/test-suite.log
61 extras/ruby/*.gem
62 /docs/Makefile
63 /docs/Makefile.in
64 /test/test_main
65 /test/coverage.info
66 /htp/htp_version.h
+0
-24
.travis.yml less more
0 language: c
1 compiler:
2 - gcc
3 - clang
4 # Change this to your needs
5 script: sh autogen.sh && ./configure && make && (make check || cat test/test-suite.log) && make distcheck
6 before_install:
7 - sudo apt-get update -qq
8 - sudo apt-get install -y build-essential autoconf automake libtool zlib1g zlib1g-dev make
9
10 matrix:
11 include:
12 - name: fuzza
13 env: CXX="clang++" ASAN_OPTIONS=detect_leaks=0 CXXFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address" CFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address" LDFLAGS="-fsanitize=address"
14 compiler: clang
15 os: linux
16 - name: fuzzm
17 env: CXX="clang++" CXXFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=memory" CFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=memory" LDFLAGS="-fsanitize=memory"
18 compiler: clang
19 os: linux
20 - name: fuzzu
21 env: CXX="clang++" CXXFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined" CFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined -fno-sanitize-recover=undefined,integer" LDFLAGS="-fsanitize=undefined"
22 compiler: clang
23 os: linux
0 Installation Instructions
1 *************************
2
3 Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
4 Software Foundation, Inc.
5
6 Copying and distribution of this file, with or without modification,
7 are permitted in any medium without royalty provided the copyright
8 notice and this notice are preserved. This file is offered as-is,
9 without warranty of any kind.
10
11 Basic Installation
12 ==================
13
14 Briefly, the shell command './configure && make && make install'
15 should configure, build, and install this package. The following
16 more-detailed instructions are generic; see the 'README' file for
17 instructions specific to this package. Some packages provide this
18 'INSTALL' file but do not implement all of the features documented
19 below. The lack of an optional feature in a given package is not
20 necessarily a bug. More recommendations for GNU packages can be found
21 in *note Makefile Conventions: (standards)Makefile Conventions.
22
23 The 'configure' shell script attempts to guess correct values for
24 various system-dependent variables used during compilation. It uses
25 those values to create a 'Makefile' in each directory of the package.
26 It may also create one or more '.h' files containing system-dependent
27 definitions. Finally, it creates a shell script 'config.status' that
28 you can run in the future to recreate the current configuration, and a
29 file 'config.log' containing compiler output (useful mainly for
30 debugging 'configure').
31
32 It can also use an optional file (typically called 'config.cache' and
33 enabled with '--cache-file=config.cache' or simply '-C') that saves the
34 results of its tests to speed up reconfiguring. Caching is disabled by
35 default to prevent problems with accidental use of stale cache files.
36
37 If you need to do unusual things to compile the package, please try
38 to figure out how 'configure' could check whether to do them, and mail
39 diffs or instructions to the address given in the 'README' so they can
40 be considered for the next release. If you are using the cache, and at
41 some point 'config.cache' contains results you don't want to keep, you
42 may remove or edit it.
43
44 The file 'configure.ac' (or 'configure.in') is used to create
45 'configure' by a program called 'autoconf'. You need 'configure.ac' if
46 you want to change it or regenerate 'configure' using a newer version of
47 'autoconf'.
48
49 The simplest way to compile this package is:
50
51 1. 'cd' to the directory containing the package's source code and type
52 './configure' to configure the package for your system.
53
54 Running 'configure' might take a while. While running, it prints
55 some messages telling which features it is checking for.
56
57 2. Type 'make' to compile the package.
58
59 3. Optionally, type 'make check' to run any self-tests that come with
60 the package, generally using the just-built uninstalled binaries.
61
62 4. Type 'make install' to install the programs and any data files and
63 documentation. When installing into a prefix owned by root, it is
64 recommended that the package be configured and built as a regular
65 user, and only the 'make install' phase executed with root
66 privileges.
67
68 5. Optionally, type 'make installcheck' to repeat any self-tests, but
69 this time using the binaries in their final installed location.
70 This target does not install anything. Running this target as a
71 regular user, particularly if the prior 'make install' required
72 root privileges, verifies that the installation completed
73 correctly.
74
75 6. You can remove the program binaries and object files from the
76 source code directory by typing 'make clean'. To also remove the
77 files that 'configure' created (so you can compile the package for
78 a different kind of computer), type 'make distclean'. There is
79 also a 'make maintainer-clean' target, but that is intended mainly
80 for the package's developers. If you use it, you may have to get
81 all sorts of other programs in order to regenerate files that came
82 with the distribution.
83
84 7. Often, you can also type 'make uninstall' to remove the installed
85 files again. In practice, not all packages have tested that
86 uninstallation works correctly, even though it is required by the
87 GNU Coding Standards.
88
89 8. Some packages, particularly those that use Automake, provide 'make
90 distcheck', which can by used by developers to test that all other
91 targets like 'make install' and 'make uninstall' work correctly.
92 This target is generally not run by end users.
93
94 Compilers and Options
95 =====================
96
97 Some systems require unusual options for compilation or linking that
98 the 'configure' script does not know about. Run './configure --help'
99 for details on some of the pertinent environment variables.
100
101 You can give 'configure' initial values for configuration parameters
102 by setting variables in the command line or in the environment. Here is
103 an example:
104
105 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
106
107 *Note Defining Variables::, for more details.
108
109 Compiling For Multiple Architectures
110 ====================================
111
112 You can compile the package for more than one kind of computer at the
113 same time, by placing the object files for each architecture in their
114 own directory. To do this, you can use GNU 'make'. 'cd' to the
115 directory where you want the object files and executables to go and run
116 the 'configure' script. 'configure' automatically checks for the source
117 code in the directory that 'configure' is in and in '..'. This is known
118 as a "VPATH" build.
119
120 With a non-GNU 'make', it is safer to compile the package for one
121 architecture at a time in the source code directory. After you have
122 installed the package for one architecture, use 'make distclean' before
123 reconfiguring for another architecture.
124
125 On MacOS X 10.5 and later systems, you can create libraries and
126 executables that work on multiple system types--known as "fat" or
127 "universal" binaries--by specifying multiple '-arch' options to the
128 compiler but only a single '-arch' option to the preprocessor. Like
129 this:
130
131 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
132 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
133 CPP="gcc -E" CXXCPP="g++ -E"
134
135 This is not guaranteed to produce working output in all cases, you
136 may have to build one architecture at a time and combine the results
137 using the 'lipo' tool if you have problems.
138
139 Installation Names
140 ==================
141
142 By default, 'make install' installs the package's commands under
143 '/usr/local/bin', include files under '/usr/local/include', etc. You
144 can specify an installation prefix other than '/usr/local' by giving
145 'configure' the option '--prefix=PREFIX', where PREFIX must be an
146 absolute file name.
147
148 You can specify separate installation prefixes for
149 architecture-specific files and architecture-independent files. If you
150 pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
151 PREFIX as the prefix for installing programs and libraries.
152 Documentation and other data files still use the regular prefix.
153
154 In addition, if you use an unusual directory layout you can give
155 options like '--bindir=DIR' to specify different values for particular
156 kinds of files. Run 'configure --help' for a list of the directories
157 you can set and what kinds of files go in them. In general, the default
158 for these options is expressed in terms of '${prefix}', so that
159 specifying just '--prefix' will affect all of the other directory
160 specifications that were not explicitly provided.
161
162 The most portable way to affect installation locations is to pass the
163 correct locations to 'configure'; however, many packages provide one or
164 both of the following shortcuts of passing variable assignments to the
165 'make install' command line to change installation locations without
166 having to reconfigure or recompile.
167
168 The first method involves providing an override variable for each
169 affected directory. For example, 'make install
170 prefix=/alternate/directory' will choose an alternate location for all
171 directory configuration variables that were expressed in terms of
172 '${prefix}'. Any directories that were specified during 'configure',
173 but not in terms of '${prefix}', must each be overridden at install time
174 for the entire installation to be relocated. The approach of makefile
175 variable overrides for each directory variable is required by the GNU
176 Coding Standards, and ideally causes no recompilation. However, some
177 platforms have known limitations with the semantics of shared libraries
178 that end up requiring recompilation when using this method, particularly
179 noticeable in packages that use GNU Libtool.
180
181 The second method involves providing the 'DESTDIR' variable. For
182 example, 'make install DESTDIR=/alternate/directory' will prepend
183 '/alternate/directory' before all installation names. The approach of
184 'DESTDIR' overrides is not required by the GNU Coding Standards, and
185 does not work on platforms that have drive letters. On the other hand,
186 it does better at avoiding recompilation issues, and works well even
187 when some directory options were not specified in terms of '${prefix}'
188 at 'configure' time.
189
190 Optional Features
191 =================
192
193 If the package supports it, you can cause programs to be installed
194 with an extra prefix or suffix on their names by giving 'configure' the
195 option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
196
197 Some packages pay attention to '--enable-FEATURE' options to
198 'configure', where FEATURE indicates an optional part of the package.
199 They may also pay attention to '--with-PACKAGE' options, where PACKAGE
200 is something like 'gnu-as' or 'x' (for the X Window System). The
201 'README' should mention any '--enable-' and '--with-' options that the
202 package recognizes.
203
204 For packages that use the X Window System, 'configure' can usually
205 find the X include and library files automatically, but if it doesn't,
206 you can use the 'configure' options '--x-includes=DIR' and
207 '--x-libraries=DIR' to specify their locations.
208
209 Some packages offer the ability to configure how verbose the
210 execution of 'make' will be. For these packages, running './configure
211 --enable-silent-rules' sets the default to minimal output, which can be
212 overridden with 'make V=1'; while running './configure
213 --disable-silent-rules' sets the default to verbose, which can be
214 overridden with 'make V=0'.
215
216 Particular systems
217 ==================
218
219 On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
220 is not installed, it is recommended to use the following options in
221 order to use an ANSI C compiler:
222
223 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
224
225 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
226
227 HP-UX 'make' updates targets which have the same timestamps as their
228 prerequisites, which makes it generally unusable when shipped generated
229 files such as 'configure' are involved. Use GNU 'make' instead.
230
231 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
232 parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
233 workaround. If GNU CC is not installed, it is therefore recommended to
234 try
235
236 ./configure CC="cc"
237
238 and if that doesn't work, try
239
240 ./configure CC="cc -nodtk"
241
242 On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
243 directory contains several dysfunctional programs; working variants of
244 these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
245 in your 'PATH', put it _after_ '/usr/bin'.
246
247 On Haiku, software installed for all users goes in '/boot/common',
248 not '/usr/local'. It is recommended to use the following options:
249
250 ./configure --prefix=/boot/common
251
252 Specifying the System Type
253 ==========================
254
255 There may be some features 'configure' cannot figure out
256 automatically, but needs to determine by the type of machine the package
257 will run on. Usually, assuming the package is built to be run on the
258 _same_ architectures, 'configure' can figure that out, but if it prints
259 a message saying it cannot guess the machine type, give it the
260 '--build=TYPE' option. TYPE can either be a short name for the system
261 type, such as 'sun4', or a canonical name which has the form:
262
263 CPU-COMPANY-SYSTEM
264
265 where SYSTEM can have one of these forms:
266
267 OS
268 KERNEL-OS
269
270 See the file 'config.sub' for the possible values of each field. If
271 'config.sub' isn't included in this package, then this package doesn't
272 need to know the machine type.
273
274 If you are _building_ compiler tools for cross-compiling, you should
275 use the option '--target=TYPE' to select the type of system they will
276 produce code for.
277
278 If you want to _use_ a cross compiler, that generates code for a
279 platform different from the build platform, you should specify the
280 "host" platform (i.e., that on which the generated programs will
281 eventually be run) with '--host=TYPE'.
282
283 Sharing Defaults
284 ================
285
286 If you want to set default values for 'configure' scripts to share,
287 you can create a site shell script called 'config.site' that gives
288 default values for variables like 'CC', 'cache_file', and 'prefix'.
289 'configure' looks for 'PREFIX/share/config.site' if it exists, then
290 'PREFIX/etc/config.site' if it exists. Or, you can set the
291 'CONFIG_SITE' environment variable to the location of the site script.
292 A warning: not all 'configure' scripts look for a site script.
293
294 Defining Variables
295 ==================
296
297 Variables not defined in a site shell script can be set in the
298 environment passed to 'configure'. However, some packages may run
299 configure again during the build, and the customized values of these
300 variables may be lost. In order to avoid this problem, you should set
301 them in the 'configure' command line, using 'VAR=value'. For example:
302
303 ./configure CC=/usr/local2/bin/gcc
304
305 causes the specified 'gcc' to be used as the C compiler (unless it is
306 overridden in the site shell script).
307
308 Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
309 Autoconf limitation. Until the limitation is lifted, you can use this
310 workaround:
311
312 CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
313
314 'configure' Invocation
315 ======================
316
317 'configure' recognizes the following options to control how it
318 operates.
319
320 '--help'
321 '-h'
322 Print a summary of all of the options to 'configure', and exit.
323
324 '--help=short'
325 '--help=recursive'
326 Print a summary of the options unique to this package's
327 'configure', and exit. The 'short' variant lists options used only
328 in the top level, while the 'recursive' variant lists options also
329 present in any nested packages.
330
331 '--version'
332 '-V'
333 Print the version of Autoconf used to generate the 'configure'
334 script, and exit.
335
336 '--cache-file=FILE'
337 Enable the cache: use and save the results of the tests in FILE,
338 traditionally 'config.cache'. FILE defaults to '/dev/null' to
339 disable caching.
340
341 '--config-cache'
342 '-C'
343 Alias for '--cache-file=config.cache'.
344
345 '--quiet'
346 '--silent'
347 '-q'
348 Do not print messages saying which checks are being made. To
349 suppress all normal output, redirect it to '/dev/null' (any error
350 messages will still be shown).
351
352 '--srcdir=DIR'
353 Look for the package's source code in directory DIR. Usually
354 'configure' can determine that directory automatically.
355
356 '--prefix=DIR'
357 Use DIR as the installation prefix. *note Installation Names:: for
358 more details, including other options available for fine-tuning the
359 installation locations.
360
361 '--no-create'
362 '-n'
363 Run the configure checks, but stop before creating any output
364 files.
365
366 'configure' also accepts some other, not widely useful, options. Run
367 'configure --help' for more details.
0 # Makefile.in generated by automake 1.16.5 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2021 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 pkglibexecdir = $(libexecdir)/@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 subdir = .
91 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
92 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
93 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
94 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
95 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
96 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
97 $(top_srcdir)/configure.ac
98 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
99 $(ACLOCAL_M4)
100 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
101 $(am__configure_deps) $(am__DIST_COMMON)
102 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
103 configure.lineno config.status.lineno
104 mkinstalldirs = $(install_sh) -d
105 CONFIG_HEADER = htp_config_auto_gen.h
106 CONFIG_CLEAN_FILES = htp.pc
107 CONFIG_CLEAN_VPATH_FILES =
108 AM_V_P = $(am__v_P_@AM_V@)
109 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
110 am__v_P_0 = false
111 am__v_P_1 = :
112 AM_V_GEN = $(am__v_GEN_@AM_V@)
113 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
114 am__v_GEN_0 = @echo " GEN " $@;
115 am__v_GEN_1 =
116 AM_V_at = $(am__v_at_@AM_V@)
117 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
118 am__v_at_0 = @
119 am__v_at_1 =
120 SOURCES =
121 DIST_SOURCES =
122 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
123 ctags-recursive dvi-recursive html-recursive info-recursive \
124 install-data-recursive install-dvi-recursive \
125 install-exec-recursive install-html-recursive \
126 install-info-recursive install-pdf-recursive \
127 install-ps-recursive install-recursive installcheck-recursive \
128 installdirs-recursive pdf-recursive ps-recursive \
129 tags-recursive uninstall-recursive
130 am__can_run_installinfo = \
131 case $$AM_UPDATE_INFO_DIR in \
132 n|no|NO) false;; \
133 *) (install-info --version) >/dev/null 2>&1;; \
134 esac
135 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
136 am__vpath_adj = case $$p in \
137 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
138 *) f=$$p;; \
139 esac;
140 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
141 am__install_max = 40
142 am__nobase_strip_setup = \
143 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
144 am__nobase_strip = \
145 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
146 am__nobase_list = $(am__nobase_strip_setup); \
147 for p in $$list; do echo "$$p $$p"; done | \
148 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
149 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
150 if (++n[$$2] == $(am__install_max)) \
151 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
152 END { for (dir in files) print dir, files[dir] }'
153 am__base_list = \
154 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
155 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
156 am__uninstall_files_from_dir = { \
157 test -z "$$files" \
158 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
159 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
160 $(am__cd) "$$dir" && rm -f $$files; }; \
161 }
162 am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
163 DATA = $(pkgconfig_DATA)
164 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
165 distclean-recursive maintainer-clean-recursive
166 am__recursive_targets = \
167 $(RECURSIVE_TARGETS) \
168 $(RECURSIVE_CLEAN_TARGETS) \
169 $(am__extra_recursive_targets)
170 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
171 cscope distdir distdir-am dist dist-all distcheck
172 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
173 htp_config_auto_gen.h.in
174 # Read a list of newline-separated strings from the standard input,
175 # and print each of them once, without duplicates. Input order is
176 # *not* preserved.
177 am__uniquify_input = $(AWK) '\
178 BEGIN { nonempty = 0; } \
179 { items[$$0] = 1; nonempty = 1; } \
180 END { if (nonempty) { for (i in items) print i; }; } \
181 '
182 # Make sure the list of sources is unique. This is necessary because,
183 # e.g., the same source file might be shared among _SOURCES variables
184 # for different programs/libraries.
185 am__define_uniq_tagged_files = \
186 list='$(am__tagged_files)'; \
187 unique=`for i in $$list; do \
188 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
189 done | $(am__uniquify_input)`
190 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/htp.pc.in \
191 $(srcdir)/htp_config_auto_gen.h.in AUTHORS COPYING ChangeLog \
192 INSTALL NEWS README compile config.guess config.rpath \
193 config.sub install-sh ltmain.sh missing
194 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
195 distdir = $(PACKAGE)-$(VERSION)
196 top_distdir = $(distdir)
197 am__remove_distdir = \
198 if test -d "$(distdir)"; then \
199 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
200 && rm -rf "$(distdir)" \
201 || { sleep 5 && rm -rf "$(distdir)"; }; \
202 else :; fi
203 am__post_remove_distdir = $(am__remove_distdir)
204 am__relativize = \
205 dir0=`pwd`; \
206 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
207 sed_rest='s,^[^/]*/*,,'; \
208 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
209 sed_butlast='s,/*[^/]*$$,,'; \
210 while test -n "$$dir1"; do \
211 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
212 if test "$$first" != "."; then \
213 if test "$$first" = ".."; then \
214 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
215 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
216 else \
217 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
218 if test "$$first2" = "$$first"; then \
219 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
220 else \
221 dir2="../$$dir2"; \
222 fi; \
223 dir0="$$dir0"/"$$first"; \
224 fi; \
225 fi; \
226 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
227 done; \
228 reldir="$$dir2"
229 DIST_ARCHIVES = $(distdir).tar.gz
230 GZIP_ENV = --best
231 DIST_TARGETS = dist-gzip
232 # Exists only to be overridden by the user if desired.
233 AM_DISTCHECK_DVI_TARGET = dvi
234 distuninstallcheck_listfiles = find . -type f -print
235 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
236 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
237 distcleancheck_listfiles = find . -type f -print
238 ACLOCAL = @ACLOCAL@
239 AMTAR = @AMTAR@
240 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
241 AR = @AR@
242 AUTOCONF = @AUTOCONF@
243 AUTOHEADER = @AUTOHEADER@
244 AUTOMAKE = @AUTOMAKE@
245 AWK = @AWK@
246 CC = @CC@
247 CCDEPMODE = @CCDEPMODE@
248 CFLAGS = @CFLAGS@
249 CPP = @CPP@
250 CPPFLAGS = @CPPFLAGS@
251 CSCOPE = @CSCOPE@
252 CTAGS = @CTAGS@
253 CXX = @CXX@
254 CXXCPP = @CXXCPP@
255 CXXDEPMODE = @CXXDEPMODE@
256 CXXFLAGS = @CXXFLAGS@
257 CYGPATH_W = @CYGPATH_W@
258 DEFS = @DEFS@
259 DEPDIR = @DEPDIR@
260 DLLTOOL = @DLLTOOL@
261 DOXYGEN = @DOXYGEN@
262 DSYMUTIL = @DSYMUTIL@
263 DUMPBIN = @DUMPBIN@
264 ECHO_C = @ECHO_C@
265 ECHO_N = @ECHO_N@
266 ECHO_T = @ECHO_T@
267 EGREP = @EGREP@
268 ETAGS = @ETAGS@
269 EXEEXT = @EXEEXT@
270 FGREP = @FGREP@
271 GENERIC_LIBRARY_NAME = @GENERIC_LIBRARY_NAME@
272 GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@
273 GENERIC_RELEASE = @GENERIC_RELEASE@
274 GENERIC_VERSION = @GENERIC_VERSION@
275 GREP = @GREP@
276 INSTALL = @INSTALL@
277 INSTALL_DATA = @INSTALL_DATA@
278 INSTALL_PROGRAM = @INSTALL_PROGRAM@
279 INSTALL_SCRIPT = @INSTALL_SCRIPT@
280 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
281 LCOV = @LCOV@
282 LD = @LD@
283 LDFLAGS = @LDFLAGS@
284 LIBICONV = @LIBICONV@
285 LIBOBJS = @LIBOBJS@
286 LIBS = @LIBS@
287 LIBTOOL = @LIBTOOL@
288 LIPO = @LIPO@
289 LN_S = @LN_S@
290 LTLIBICONV = @LTLIBICONV@
291 LTLIBOBJS = @LTLIBOBJS@
292 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
293 MAKEINFO = @MAKEINFO@
294 MANIFEST_TOOL = @MANIFEST_TOOL@
295 MKDIR_P = @MKDIR_P@
296 NM = @NM@
297 NMEDIT = @NMEDIT@
298 OBJDUMP = @OBJDUMP@
299 OBJEXT = @OBJEXT@
300 OTOOL = @OTOOL@
301 OTOOL64 = @OTOOL64@
302 PACKAGE = @PACKAGE@
303 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
304 PACKAGE_NAME = @PACKAGE_NAME@
305 PACKAGE_STRING = @PACKAGE_STRING@
306 PACKAGE_TARNAME = @PACKAGE_TARNAME@
307 PACKAGE_URL = @PACKAGE_URL@
308 PACKAGE_VERSION = @PACKAGE_VERSION@
309 PATH_SEPARATOR = @PATH_SEPARATOR@
310 RANLIB = @RANLIB@
311 SED = @SED@
312 SET_MAKE = @SET_MAKE@
313 SHELL = @SHELL@
314 STRIP = @STRIP@
315 VERSION = @VERSION@
316 abs_builddir = @abs_builddir@
317 abs_srcdir = @abs_srcdir@
318 abs_top_builddir = @abs_top_builddir@
319 abs_top_srcdir = @abs_top_srcdir@
320 ac_ct_AR = @ac_ct_AR@
321 ac_ct_CC = @ac_ct_CC@
322 ac_ct_CXX = @ac_ct_CXX@
323 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
324 am__include = @am__include@
325 am__leading_dot = @am__leading_dot@
326 am__quote = @am__quote@
327 am__tar = @am__tar@
328 am__untar = @am__untar@
329 bindir = @bindir@
330 build = @build@
331 build_alias = @build_alias@
332 build_cpu = @build_cpu@
333 build_os = @build_os@
334 build_vendor = @build_vendor@
335 builddir = @builddir@
336 datadir = @datadir@
337 datarootdir = @datarootdir@
338 docdir = @docdir@
339 doxygen = @doxygen@
340 dvidir = @dvidir@
341 exec_prefix = @exec_prefix@
342 host = @host@
343 host_alias = @host_alias@
344 host_cpu = @host_cpu@
345 host_os = @host_os@
346 host_vendor = @host_vendor@
347 htmldir = @htmldir@
348 includedir = @includedir@
349 infodir = @infodir@
350 install_sh = @install_sh@
351 libdir = @libdir@
352 libexecdir = @libexecdir@
353 localedir = @localedir@
354 localstatedir = @localstatedir@
355 mandir = @mandir@
356 mkdir_p = @mkdir_p@
357 oldincludedir = @oldincludedir@
358 pdfdir = @pdfdir@
359 prefix = @prefix@
360 program_transform_name = @program_transform_name@
361 psdir = @psdir@
362 runstatedir = @runstatedir@
363 sbindir = @sbindir@
364 sharedstatedir = @sharedstatedir@
365 srcdir = @srcdir@
366 sysconfdir = @sysconfdir@
367 target_alias = @target_alias@
368 top_build_prefix = @top_build_prefix@
369 top_builddir = @top_builddir@
370 top_srcdir = @top_srcdir@
371 ACLOCAL_AMFLAGS = -I m4
372 SUBDIRS = htp test docs
373 DIST_SUBDIRS = htp test docs
374 EXTRA_DIST = LICENSE NOTICE docs/doxygen.conf docs/QUICK_START VERSION get-version.sh \
375 docs/COMPATIBILITY_CHANGES
376
377 pkgconfigdir = $(libdir)/pkgconfig
378 pkgconfig_DATA = htp.pc
379 all: htp_config_auto_gen.h
380 $(MAKE) $(AM_MAKEFLAGS) all-recursive
381
382 .SUFFIXES:
383 am--refresh: Makefile
384 @:
385 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
386 @for dep in $?; do \
387 case '$(am__configure_deps)' in \
388 *$$dep*) \
389 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
390 $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
391 && exit 0; \
392 exit 1;; \
393 esac; \
394 done; \
395 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
396 $(am__cd) $(top_srcdir) && \
397 $(AUTOMAKE) --gnu Makefile
398 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
399 @case '$?' in \
400 *config.status*) \
401 echo ' $(SHELL) ./config.status'; \
402 $(SHELL) ./config.status;; \
403 *) \
404 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
405 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
406 esac;
407
408 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
409 $(SHELL) ./config.status --recheck
410
411 $(top_srcdir)/configure: $(am__configure_deps)
412 $(am__cd) $(srcdir) && $(AUTOCONF)
413 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
414 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
415 $(am__aclocal_m4_deps):
416
417 htp_config_auto_gen.h: stamp-h1
418 @test -f $@ || rm -f stamp-h1
419 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
420
421 stamp-h1: $(srcdir)/htp_config_auto_gen.h.in $(top_builddir)/config.status
422 @rm -f stamp-h1
423 cd $(top_builddir) && $(SHELL) ./config.status htp_config_auto_gen.h
424 $(srcdir)/htp_config_auto_gen.h.in: $(am__configure_deps)
425 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
426 rm -f stamp-h1
427 touch $@
428
429 distclean-hdr:
430 -rm -f htp_config_auto_gen.h stamp-h1
431 htp.pc: $(top_builddir)/config.status $(srcdir)/htp.pc.in
432 cd $(top_builddir) && $(SHELL) ./config.status $@
433
434 mostlyclean-libtool:
435 -rm -f *.lo
436
437 clean-libtool:
438 -rm -rf .libs _libs
439
440 distclean-libtool:
441 -rm -f libtool config.lt
442 install-pkgconfigDATA: $(pkgconfig_DATA)
443 @$(NORMAL_INSTALL)
444 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
445 if test -n "$$list"; then \
446 echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
447 $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
448 fi; \
449 for p in $$list; do \
450 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
451 echo "$$d$$p"; \
452 done | $(am__base_list) | \
453 while read files; do \
454 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
455 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
456 done
457
458 uninstall-pkgconfigDATA:
459 @$(NORMAL_UNINSTALL)
460 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
461 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
462 dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
463
464 # This directory's subdirectories are mostly independent; you can cd
465 # into them and run 'make' without going through this Makefile.
466 # To change the values of 'make' variables: instead of editing Makefiles,
467 # (1) if the variable is set in 'config.status', edit 'config.status'
468 # (which will cause the Makefiles to be regenerated when you run 'make');
469 # (2) otherwise, pass the desired values on the 'make' command line.
470 $(am__recursive_targets):
471 @fail=; \
472 if $(am__make_keepgoing); then \
473 failcom='fail=yes'; \
474 else \
475 failcom='exit 1'; \
476 fi; \
477 dot_seen=no; \
478 target=`echo $@ | sed s/-recursive//`; \
479 case "$@" in \
480 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
481 *) list='$(SUBDIRS)' ;; \
482 esac; \
483 for subdir in $$list; do \
484 echo "Making $$target in $$subdir"; \
485 if test "$$subdir" = "."; then \
486 dot_seen=yes; \
487 local_target="$$target-am"; \
488 else \
489 local_target="$$target"; \
490 fi; \
491 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
492 || eval $$failcom; \
493 done; \
494 if test "$$dot_seen" = "no"; then \
495 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
496 fi; test -z "$$fail"
497
498 ID: $(am__tagged_files)
499 $(am__define_uniq_tagged_files); mkid -fID $$unique
500 tags: tags-recursive
501 TAGS: tags
502
503 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
504 set x; \
505 here=`pwd`; \
506 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
507 include_option=--etags-include; \
508 empty_fix=.; \
509 else \
510 include_option=--include; \
511 empty_fix=; \
512 fi; \
513 list='$(SUBDIRS)'; for subdir in $$list; do \
514 if test "$$subdir" = .; then :; else \
515 test ! -f $$subdir/TAGS || \
516 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
517 fi; \
518 done; \
519 $(am__define_uniq_tagged_files); \
520 shift; \
521 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
522 test -n "$$unique" || unique=$$empty_fix; \
523 if test $$# -gt 0; then \
524 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
525 "$$@" $$unique; \
526 else \
527 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
528 $$unique; \
529 fi; \
530 fi
531 ctags: ctags-recursive
532
533 CTAGS: ctags
534 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
535 $(am__define_uniq_tagged_files); \
536 test -z "$(CTAGS_ARGS)$$unique" \
537 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
538 $$unique
539
540 GTAGS:
541 here=`$(am__cd) $(top_builddir) && pwd` \
542 && $(am__cd) $(top_srcdir) \
543 && gtags -i $(GTAGS_ARGS) "$$here"
544 cscope: cscope.files
545 test ! -s cscope.files \
546 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
547 clean-cscope:
548 -rm -f cscope.files
549 cscope.files: clean-cscope cscopelist
550 cscopelist: cscopelist-recursive
551
552 cscopelist-am: $(am__tagged_files)
553 list='$(am__tagged_files)'; \
554 case "$(srcdir)" in \
555 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
556 *) sdir=$(subdir)/$(srcdir) ;; \
557 esac; \
558 for i in $$list; do \
559 if test -f "$$i"; then \
560 echo "$(subdir)/$$i"; \
561 else \
562 echo "$$sdir/$$i"; \
563 fi; \
564 done >> $(top_builddir)/cscope.files
565
566 distclean-tags:
567 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
568 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
569 distdir: $(BUILT_SOURCES)
570 $(MAKE) $(AM_MAKEFLAGS) distdir-am
571
572 distdir-am: $(DISTFILES)
573 $(am__remove_distdir)
574 test -d "$(distdir)" || mkdir "$(distdir)"
575 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
576 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
577 list='$(DISTFILES)'; \
578 dist_files=`for file in $$list; do echo $$file; done | \
579 sed -e "s|^$$srcdirstrip/||;t" \
580 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
581 case $$dist_files in \
582 */*) $(MKDIR_P) `echo "$$dist_files" | \
583 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
584 sort -u` ;; \
585 esac; \
586 for file in $$dist_files; do \
587 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
588 if test -d $$d/$$file; then \
589 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
590 if test -d "$(distdir)/$$file"; then \
591 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
592 fi; \
593 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
594 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
595 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
596 fi; \
597 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
598 else \
599 test -f "$(distdir)/$$file" \
600 || cp -p $$d/$$file "$(distdir)/$$file" \
601 || exit 1; \
602 fi; \
603 done
604 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
605 if test "$$subdir" = .; then :; else \
606 $(am__make_dryrun) \
607 || test -d "$(distdir)/$$subdir" \
608 || $(MKDIR_P) "$(distdir)/$$subdir" \
609 || exit 1; \
610 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
611 $(am__relativize); \
612 new_distdir=$$reldir; \
613 dir1=$$subdir; dir2="$(top_distdir)"; \
614 $(am__relativize); \
615 new_top_distdir=$$reldir; \
616 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
617 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
618 ($(am__cd) $$subdir && \
619 $(MAKE) $(AM_MAKEFLAGS) \
620 top_distdir="$$new_top_distdir" \
621 distdir="$$new_distdir" \
622 am__remove_distdir=: \
623 am__skip_length_check=: \
624 am__skip_mode_fix=: \
625 distdir) \
626 || exit 1; \
627 fi; \
628 done
629 -test -n "$(am__skip_mode_fix)" \
630 || find "$(distdir)" -type d ! -perm -755 \
631 -exec chmod u+rwx,go+rx {} \; -o \
632 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
633 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
634 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
635 || chmod -R a+r "$(distdir)"
636 dist-gzip: distdir
637 tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
638 $(am__post_remove_distdir)
639
640 dist-bzip2: distdir
641 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
642 $(am__post_remove_distdir)
643
644 dist-lzip: distdir
645 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
646 $(am__post_remove_distdir)
647
648 dist-xz: distdir
649 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
650 $(am__post_remove_distdir)
651
652 dist-zstd: distdir
653 tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
654 $(am__post_remove_distdir)
655
656 dist-tarZ: distdir
657 @echo WARNING: "Support for distribution archives compressed with" \
658 "legacy program 'compress' is deprecated." >&2
659 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
660 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
661 $(am__post_remove_distdir)
662
663 dist-shar: distdir
664 @echo WARNING: "Support for shar distribution archives is" \
665 "deprecated." >&2
666 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
667 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
668 $(am__post_remove_distdir)
669
670 dist-zip: distdir
671 -rm -f $(distdir).zip
672 zip -rq $(distdir).zip $(distdir)
673 $(am__post_remove_distdir)
674
675 dist dist-all:
676 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
677 $(am__post_remove_distdir)
678
679 # This target untars the dist file and tries a VPATH configuration. Then
680 # it guarantees that the distribution is self-contained by making another
681 # tarfile.
682 distcheck: dist
683 case '$(DIST_ARCHIVES)' in \
684 *.tar.gz*) \
685 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
686 *.tar.bz2*) \
687 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
688 *.tar.lz*) \
689 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
690 *.tar.xz*) \
691 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
692 *.tar.Z*) \
693 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
694 *.shar.gz*) \
695 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
696 *.zip*) \
697 unzip $(distdir).zip ;;\
698 *.tar.zst*) \
699 zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
700 esac
701 chmod -R a-w $(distdir)
702 chmod u+w $(distdir)
703 mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
704 chmod a-w $(distdir)
705 test -d $(distdir)/_build || exit 0; \
706 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
707 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
708 && am__cwd=`pwd` \
709 && $(am__cd) $(distdir)/_build/sub \
710 && ../../configure \
711 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
712 $(DISTCHECK_CONFIGURE_FLAGS) \
713 --srcdir=../.. --prefix="$$dc_install_base" \
714 && $(MAKE) $(AM_MAKEFLAGS) \
715 && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
716 && $(MAKE) $(AM_MAKEFLAGS) check \
717 && $(MAKE) $(AM_MAKEFLAGS) install \
718 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
719 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
720 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
721 distuninstallcheck \
722 && chmod -R a-w "$$dc_install_base" \
723 && ({ \
724 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
725 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
726 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
727 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
728 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
729 } || { rm -rf "$$dc_destdir"; exit 1; }) \
730 && rm -rf "$$dc_destdir" \
731 && $(MAKE) $(AM_MAKEFLAGS) dist \
732 && rm -rf $(DIST_ARCHIVES) \
733 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
734 && cd "$$am__cwd" \
735 || exit 1
736 $(am__post_remove_distdir)
737 @(echo "$(distdir) archives ready for distribution: "; \
738 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
739 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
740 distuninstallcheck:
741 @test -n '$(distuninstallcheck_dir)' || { \
742 echo 'ERROR: trying to run $@ with an empty' \
743 '$$(distuninstallcheck_dir)' >&2; \
744 exit 1; \
745 }; \
746 $(am__cd) '$(distuninstallcheck_dir)' || { \
747 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
748 exit 1; \
749 }; \
750 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
751 || { echo "ERROR: files left after uninstall:" ; \
752 if test -n "$(DESTDIR)"; then \
753 echo " (check DESTDIR support)"; \
754 fi ; \
755 $(distuninstallcheck_listfiles) ; \
756 exit 1; } >&2
757 distcleancheck: distclean
758 @if test '$(srcdir)' = . ; then \
759 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
760 exit 1 ; \
761 fi
762 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
763 || { echo "ERROR: files left in build directory after distclean:" ; \
764 $(distcleancheck_listfiles) ; \
765 exit 1; } >&2
766 check-am: all-am
767 check: check-recursive
768 all-am: Makefile $(DATA) htp_config_auto_gen.h
769 installdirs: installdirs-recursive
770 installdirs-am:
771 for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
772 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
773 done
774 install: install-recursive
775 install-exec: install-exec-recursive
776 install-data: install-data-recursive
777 uninstall: uninstall-recursive
778
779 install-am: all-am
780 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
781
782 installcheck: installcheck-recursive
783 install-strip:
784 if test -z '$(STRIP)'; then \
785 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
786 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
787 install; \
788 else \
789 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
790 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
791 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
792 fi
793 mostlyclean-generic:
794
795 clean-generic:
796
797 distclean-generic:
798 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
799 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
800
801 maintainer-clean-generic:
802 @echo "This command is intended for maintainers to use"
803 @echo "it deletes files that may require special tools to rebuild."
804 clean: clean-recursive
805
806 clean-am: clean-generic clean-libtool clean-local mostlyclean-am
807
808 distclean: distclean-recursive
809 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
810 -rm -f Makefile
811 distclean-am: clean-am distclean-generic distclean-hdr \
812 distclean-libtool distclean-tags
813
814 dvi: dvi-recursive
815
816 dvi-am:
817
818 html: html-recursive
819
820 html-am:
821
822 info: info-recursive
823
824 info-am:
825
826 install-data-am: install-pkgconfigDATA
827
828 install-dvi: install-dvi-recursive
829
830 install-dvi-am:
831
832 install-exec-am:
833
834 install-html: install-html-recursive
835
836 install-html-am:
837
838 install-info: install-info-recursive
839
840 install-info-am:
841
842 install-man:
843
844 install-pdf: install-pdf-recursive
845
846 install-pdf-am:
847
848 install-ps: install-ps-recursive
849
850 install-ps-am:
851
852 installcheck-am:
853
854 maintainer-clean: maintainer-clean-recursive
855 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
856 -rm -rf $(top_srcdir)/autom4te.cache
857 -rm -f Makefile
858 maintainer-clean-am: distclean-am maintainer-clean-generic
859
860 mostlyclean: mostlyclean-recursive
861
862 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
863
864 pdf: pdf-recursive
865
866 pdf-am:
867
868 ps: ps-recursive
869
870 ps-am:
871
872 uninstall-am: uninstall-pkgconfigDATA
873
874 .MAKE: $(am__recursive_targets) all install-am install-strip
875
876 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
877 am--refresh check check-am clean clean-cscope clean-generic \
878 clean-libtool clean-local cscope cscopelist-am ctags ctags-am \
879 dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \
880 dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \
881 distclean-generic distclean-hdr distclean-libtool \
882 distclean-tags distcleancheck distdir distuninstallcheck dvi \
883 dvi-am html html-am info info-am install install-am \
884 install-data install-data-am install-dvi install-dvi-am \
885 install-exec install-exec-am install-html install-html-am \
886 install-info install-info-am install-man install-pdf \
887 install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
888 install-strip installcheck installcheck-am installdirs \
889 installdirs-am maintainer-clean maintainer-clean-generic \
890 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
891 ps ps-am tags tags-am uninstall uninstall-am \
892 uninstall-pkgconfigDATA
893
894 .PRECIOUS: Makefile
895
896
897 test: all
898 @(cd test && $(MAKE) $@)
899
900 test-compile-only: all
901 @(cd test && $(MAKE) $@)
902
903 check-compile-only: all
904 @(cd test && $(MAKE) $@)
905
906 doxygen doxygen-pdf:
907 @(cd docs && $(MAKE) $@)
908
909 gcov: test
910 @ if [[ -x $(LCOV) ]]; then \
911 lcov --capture --directory $(top_builddir)/htp/ --output-file $(top_builddir)/test/coverage.info --no-external ; \
912 genhtml $(top_builddir)/test/coverage.info --output-directory $(top_builddir)/docs/lcov ; \
913 echo "" ; \
914 echo "Open docs/lcov/index.html to review lcov output" ; \
915 fi
916
917 clean-local:
918 rm -rf $(top_builddir)/docs/doxygen
919 rm -rf $(top_builddir)/docs/lcov
920 find $(top_builddir) -type f \( -name '*.gcda' -o -name '*.gcno' -o -name '*.gcov' \) -exec rm '{}' ';'
921
922 # Tell versions [3.59,3.63) of GNU make to not export all variables.
923 # Otherwise a system limit (for SysV at least) may be exceeded.
924 .NOEXPORT:
0 # generated automatically by aclocal 1.16.5 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2021 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.71],,
17 [m4_warning([this file was generated for autoconf 2.71.
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 # Copyright (C) 2002-2021 Free Software Foundation, Inc.
23 #
24 # This file is free software; the Free Software Foundation
25 # gives unlimited permission to copy and/or distribute it,
26 # with or without modifications, as long as this notice is preserved.
27
28 # AM_AUTOMAKE_VERSION(VERSION)
29 # ----------------------------
30 # Automake X.Y traces this macro to ensure aclocal.m4 has been
31 # generated from the m4 files accompanying Automake X.Y.
32 # (This private macro should not be called outside this file.)
33 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.16'
35 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.16.5], [],
38 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39 ])
40
41 # _AM_AUTOCONF_VERSION(VERSION)
42 # -----------------------------
43 # aclocal traces this macro to find the Autoconf version.
44 # This is a private macro too. Using m4_define simplifies
45 # the logic in aclocal, which can simply ignore this definition.
46 m4_define([_AM_AUTOCONF_VERSION], [])
47
48 # AM_SET_CURRENT_AUTOMAKE_VERSION
49 # -------------------------------
50 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.16.5])dnl
54 m4_ifndef([AC_AUTOCONF_VERSION],
55 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
59
60 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
61 #
62 # This file is free software; the Free Software Foundation
63 # gives unlimited permission to copy and/or distribute it,
64 # with or without modifications, as long as this notice is preserved.
65
66 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
68 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
69 #
70 # Of course, Automake must honor this variable whenever it calls a
71 # tool from the auxiliary directory. The problem is that $srcdir (and
72 # therefore $ac_aux_dir as well) can be either absolute or relative,
73 # depending on how configure is run. This is pretty annoying, since
74 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
75 # source directory, any form will work fine, but in subdirectories a
76 # relative path needs to be adjusted first.
77 #
78 # $ac_aux_dir/missing
79 # fails when called from a subdirectory if $ac_aux_dir is relative
80 # $top_srcdir/$ac_aux_dir/missing
81 # fails if $ac_aux_dir is absolute,
82 # fails when called from a subdirectory in a VPATH build with
83 # a relative $ac_aux_dir
84 #
85 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86 # are both prefixed by $srcdir. In an in-source build this is usually
87 # harmless because $srcdir is '.', but things will broke when you
88 # start a VPATH build or use an absolute $srcdir.
89 #
90 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
92 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93 # and then we would define $MISSING as
94 # MISSING="\${SHELL} $am_aux_dir/missing"
95 # This will work as long as MISSING is not called from configure, because
96 # unfortunately $(top_srcdir) has no meaning in configure.
97 # However there are other variables, like CC, which are often used in
98 # configure, and could therefore not use this "fixed" $ac_aux_dir.
99 #
100 # Another solution, used here, is to always expand $ac_aux_dir to an
101 # absolute PATH. The drawback is that using absolute paths prevent a
102 # configured tree to be moved without reconfiguration.
103
104 AC_DEFUN([AM_AUX_DIR_EXPAND],
105 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
106 # Expand $ac_aux_dir to an absolute path.
107 am_aux_dir=`cd "$ac_aux_dir" && pwd`
108 ])
109
110 # AM_CONDITIONAL -*- Autoconf -*-
111
112 # Copyright (C) 1997-2021 Free Software Foundation, Inc.
113 #
114 # This file is free software; the Free Software Foundation
115 # gives unlimited permission to copy and/or distribute it,
116 # with or without modifications, as long as this notice is preserved.
117
118 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
119 # -------------------------------------
120 # Define a conditional.
121 AC_DEFUN([AM_CONDITIONAL],
122 [AC_PREREQ([2.52])dnl
123 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
124 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
125 AC_SUBST([$1_TRUE])dnl
126 AC_SUBST([$1_FALSE])dnl
127 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
128 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
129 m4_define([_AM_COND_VALUE_$1], [$2])dnl
130 if $2; then
131 $1_TRUE=
132 $1_FALSE='#'
133 else
134 $1_TRUE='#'
135 $1_FALSE=
136 fi
137 AC_CONFIG_COMMANDS_PRE(
138 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
139 AC_MSG_ERROR([[conditional "$1" was never defined.
140 Usually this means the macro was only invoked conditionally.]])
141 fi])])
142
143 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
144 #
145 # This file is free software; the Free Software Foundation
146 # gives unlimited permission to copy and/or distribute it,
147 # with or without modifications, as long as this notice is preserved.
148
149
150 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
151 # written in clear, in which case automake, when reading aclocal.m4,
152 # will think it sees a *use*, and therefore will trigger all it's
153 # C support machinery. Also note that it means that autoscan, seeing
154 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
155
156
157 # _AM_DEPENDENCIES(NAME)
158 # ----------------------
159 # See how the compiler implements dependency checking.
160 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
161 # We try a few techniques and use that to set a single cache variable.
162 #
163 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
164 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
165 # dependency, and given that the user is not expected to run this macro,
166 # just rely on AC_PROG_CC.
167 AC_DEFUN([_AM_DEPENDENCIES],
168 [AC_REQUIRE([AM_SET_DEPDIR])dnl
169 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
170 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
171 AC_REQUIRE([AM_DEP_TRACK])dnl
172
173 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
174 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
175 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
176 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
177 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
178 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
179 [depcc="$$1" am_compiler_list=])
180
181 AC_CACHE_CHECK([dependency style of $depcc],
182 [am_cv_$1_dependencies_compiler_type],
183 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
184 # We make a subdir and do the tests there. Otherwise we can end up
185 # making bogus files that we don't know about and never remove. For
186 # instance it was reported that on HP-UX the gcc test will end up
187 # making a dummy file named 'D' -- because '-MD' means "put the output
188 # in D".
189 rm -rf conftest.dir
190 mkdir conftest.dir
191 # Copy depcomp to subdir because otherwise we won't find it if we're
192 # using a relative directory.
193 cp "$am_depcomp" conftest.dir
194 cd conftest.dir
195 # We will build objects and dependencies in a subdirectory because
196 # it helps to detect inapplicable dependency modes. For instance
197 # both Tru64's cc and ICC support -MD to output dependencies as a
198 # side effect of compilation, but ICC will put the dependencies in
199 # the current directory while Tru64 will put them in the object
200 # directory.
201 mkdir sub
202
203 am_cv_$1_dependencies_compiler_type=none
204 if test "$am_compiler_list" = ""; then
205 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
206 fi
207 am__universal=false
208 m4_case([$1], [CC],
209 [case " $depcc " in #(
210 *\ -arch\ *\ -arch\ *) am__universal=true ;;
211 esac],
212 [CXX],
213 [case " $depcc " in #(
214 *\ -arch\ *\ -arch\ *) am__universal=true ;;
215 esac])
216
217 for depmode in $am_compiler_list; do
218 # Setup a source with many dependencies, because some compilers
219 # like to wrap large dependency lists on column 80 (with \), and
220 # we should not choose a depcomp mode which is confused by this.
221 #
222 # We need to recreate these files for each test, as the compiler may
223 # overwrite some of them when testing with obscure command lines.
224 # This happens at least with the AIX C compiler.
225 : > sub/conftest.c
226 for i in 1 2 3 4 5 6; do
227 echo '#include "conftst'$i'.h"' >> sub/conftest.c
228 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
229 # Solaris 10 /bin/sh.
230 echo '/* dummy */' > sub/conftst$i.h
231 done
232 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
233
234 # We check with '-c' and '-o' for the sake of the "dashmstdout"
235 # mode. It turns out that the SunPro C++ compiler does not properly
236 # handle '-M -o', and we need to detect this. Also, some Intel
237 # versions had trouble with output in subdirs.
238 am__obj=sub/conftest.${OBJEXT-o}
239 am__minus_obj="-o $am__obj"
240 case $depmode in
241 gcc)
242 # This depmode causes a compiler race in universal mode.
243 test "$am__universal" = false || continue
244 ;;
245 nosideeffect)
246 # After this tag, mechanisms are not by side-effect, so they'll
247 # only be used when explicitly requested.
248 if test "x$enable_dependency_tracking" = xyes; then
249 continue
250 else
251 break
252 fi
253 ;;
254 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
255 # This compiler won't grok '-c -o', but also, the minuso test has
256 # not run yet. These depmodes are late enough in the game, and
257 # so weak that their functioning should not be impacted.
258 am__obj=conftest.${OBJEXT-o}
259 am__minus_obj=
260 ;;
261 none) break ;;
262 esac
263 if depmode=$depmode \
264 source=sub/conftest.c object=$am__obj \
265 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
266 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
267 >/dev/null 2>conftest.err &&
268 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
269 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
270 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
271 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
272 # icc doesn't choke on unknown options, it will just issue warnings
273 # or remarks (even with -Werror). So we grep stderr for any message
274 # that says an option was ignored or not supported.
275 # When given -MP, icc 7.0 and 7.1 complain thusly:
276 # icc: Command line warning: ignoring option '-M'; no argument required
277 # The diagnosis changed in icc 8.0:
278 # icc: Command line remark: option '-MP' not supported
279 if (grep 'ignoring option' conftest.err ||
280 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
281 am_cv_$1_dependencies_compiler_type=$depmode
282 break
283 fi
284 fi
285 done
286
287 cd ..
288 rm -rf conftest.dir
289 else
290 am_cv_$1_dependencies_compiler_type=none
291 fi
292 ])
293 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
294 AM_CONDITIONAL([am__fastdep$1], [
295 test "x$enable_dependency_tracking" != xno \
296 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
297 ])
298
299
300 # AM_SET_DEPDIR
301 # -------------
302 # Choose a directory name for dependency files.
303 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
304 AC_DEFUN([AM_SET_DEPDIR],
305 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
306 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
307 ])
308
309
310 # AM_DEP_TRACK
311 # ------------
312 AC_DEFUN([AM_DEP_TRACK],
313 [AC_ARG_ENABLE([dependency-tracking], [dnl
314 AS_HELP_STRING(
315 [--enable-dependency-tracking],
316 [do not reject slow dependency extractors])
317 AS_HELP_STRING(
318 [--disable-dependency-tracking],
319 [speeds up one-time build])])
320 if test "x$enable_dependency_tracking" != xno; then
321 am_depcomp="$ac_aux_dir/depcomp"
322 AMDEPBACKSLASH='\'
323 am__nodep='_no'
324 fi
325 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
326 AC_SUBST([AMDEPBACKSLASH])dnl
327 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
328 AC_SUBST([am__nodep])dnl
329 _AM_SUBST_NOTMAKE([am__nodep])dnl
330 ])
331
332 # Generate code to set up dependency tracking. -*- Autoconf -*-
333
334 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
335 #
336 # This file is free software; the Free Software Foundation
337 # gives unlimited permission to copy and/or distribute it,
338 # with or without modifications, as long as this notice is preserved.
339
340 # _AM_OUTPUT_DEPENDENCY_COMMANDS
341 # ------------------------------
342 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343 [{
344 # Older Autoconf quotes --file arguments for eval, but not when files
345 # are listed without --file. Let's play safe and only enable the eval
346 # if we detect the quoting.
347 # TODO: see whether this extra hack can be removed once we start
348 # requiring Autoconf 2.70 or later.
349 AS_CASE([$CONFIG_FILES],
350 [*\'*], [eval set x "$CONFIG_FILES"],
351 [*], [set x $CONFIG_FILES])
352 shift
353 # Used to flag and report bootstrapping failures.
354 am_rc=0
355 for am_mf
356 do
357 # Strip MF so we end up with the name of the file.
358 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
359 # Check whether this is an Automake generated Makefile which includes
360 # dependency-tracking related rules and includes.
361 # Grep'ing the whole file directly is not great: AIX grep has a line
362 # limit of 2048, but all sed's we know have understand at least 4000.
363 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
364 || continue
365 am_dirpart=`AS_DIRNAME(["$am_mf"])`
366 am_filepart=`AS_BASENAME(["$am_mf"])`
367 AM_RUN_LOG([cd "$am_dirpart" \
368 && sed -e '/# am--include-marker/d' "$am_filepart" \
369 | $MAKE -f - am--depfiles]) || am_rc=$?
370 done
371 if test $am_rc -ne 0; then
372 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
373 for automatic dependency tracking. If GNU make was not used, consider
374 re-running the configure script with MAKE="gmake" (or whatever is
375 necessary). You can also try re-running configure with the
376 '--disable-dependency-tracking' option to at least be able to build
377 the package (albeit without support for automatic dependency tracking).])
378 fi
379 AS_UNSET([am_dirpart])
380 AS_UNSET([am_filepart])
381 AS_UNSET([am_mf])
382 AS_UNSET([am_rc])
383 rm -f conftest-deps.mk
384 }
385 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
386
387
388 # AM_OUTPUT_DEPENDENCY_COMMANDS
389 # -----------------------------
390 # This macro should only be invoked once -- use via AC_REQUIRE.
391 #
392 # This code is only required when automatic dependency tracking is enabled.
393 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
394 # order to bootstrap the dependency handling code.
395 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
396 [AC_CONFIG_COMMANDS([depfiles],
397 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
398 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
399
400 # Do all the work for Automake. -*- Autoconf -*-
401
402 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
403 #
404 # This file is free software; the Free Software Foundation
405 # gives unlimited permission to copy and/or distribute it,
406 # with or without modifications, as long as this notice is preserved.
407
408 # This macro actually does too much. Some checks are only needed if
409 # your package does certain things. But this isn't really a big deal.
410
411 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
412 m4_define([AC_PROG_CC],
413 m4_defn([AC_PROG_CC])
414 [_AM_PROG_CC_C_O
415 ])
416
417 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
418 # AM_INIT_AUTOMAKE([OPTIONS])
419 # -----------------------------------------------
420 # The call with PACKAGE and VERSION arguments is the old style
421 # call (pre autoconf-2.50), which is being phased out. PACKAGE
422 # and VERSION should now be passed to AC_INIT and removed from
423 # the call to AM_INIT_AUTOMAKE.
424 # We support both call styles for the transition. After
425 # the next Automake release, Autoconf can make the AC_INIT
426 # arguments mandatory, and then we can depend on a new Autoconf
427 # release and drop the old call support.
428 AC_DEFUN([AM_INIT_AUTOMAKE],
429 [AC_PREREQ([2.65])dnl
430 m4_ifdef([_$0_ALREADY_INIT],
431 [m4_fatal([$0 expanded multiple times
432 ]m4_defn([_$0_ALREADY_INIT]))],
433 [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
434 dnl Autoconf wants to disallow AM_ names. We explicitly allow
435 dnl the ones we care about.
436 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
437 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
438 AC_REQUIRE([AC_PROG_INSTALL])dnl
439 if test "`cd $srcdir && pwd`" != "`pwd`"; then
440 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
441 # is not polluted with repeated "-I."
442 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
443 # test to see if srcdir already configured
444 if test -f $srcdir/config.status; then
445 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
446 fi
447 fi
448
449 # test whether we have cygpath
450 if test -z "$CYGPATH_W"; then
451 if (cygpath --version) >/dev/null 2>/dev/null; then
452 CYGPATH_W='cygpath -w'
453 else
454 CYGPATH_W=echo
455 fi
456 fi
457 AC_SUBST([CYGPATH_W])
458
459 # Define the identity of the package.
460 dnl Distinguish between old-style and new-style calls.
461 m4_ifval([$2],
462 [AC_DIAGNOSE([obsolete],
463 [$0: two- and three-arguments forms are deprecated.])
464 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465 AC_SUBST([PACKAGE], [$1])dnl
466 AC_SUBST([VERSION], [$2])],
467 [_AM_SET_OPTIONS([$1])dnl
468 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469 m4_if(
470 m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
471 [ok:ok],,
472 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
473 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
474 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
475
476 _AM_IF_OPTION([no-define],,
477 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
478 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
479
480 # Some tools Automake needs.
481 AC_REQUIRE([AM_SANITY_CHECK])dnl
482 AC_REQUIRE([AC_ARG_PROGRAM])dnl
483 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
484 AM_MISSING_PROG([AUTOCONF], [autoconf])
485 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
486 AM_MISSING_PROG([AUTOHEADER], [autoheader])
487 AM_MISSING_PROG([MAKEINFO], [makeinfo])
488 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
489 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
490 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
491 # For better backward compatibility. To be removed once Automake 1.9.x
492 # dies out for good. For more background, see:
493 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
494 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
495 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
496 # We need awk for the "check" target (and possibly the TAP driver). The
497 # system "awk" is bad on some platforms.
498 AC_REQUIRE([AC_PROG_AWK])dnl
499 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
500 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
501 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
502 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
503 [_AM_PROG_TAR([v7])])])
504 _AM_IF_OPTION([no-dependencies],,
505 [AC_PROVIDE_IFELSE([AC_PROG_CC],
506 [_AM_DEPENDENCIES([CC])],
507 [m4_define([AC_PROG_CC],
508 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
509 AC_PROVIDE_IFELSE([AC_PROG_CXX],
510 [_AM_DEPENDENCIES([CXX])],
511 [m4_define([AC_PROG_CXX],
512 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
513 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
514 [_AM_DEPENDENCIES([OBJC])],
515 [m4_define([AC_PROG_OBJC],
516 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
517 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
518 [_AM_DEPENDENCIES([OBJCXX])],
519 [m4_define([AC_PROG_OBJCXX],
520 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
521 ])
522 # Variables for tags utilities; see am/tags.am
523 if test -z "$CTAGS"; then
524 CTAGS=ctags
525 fi
526 AC_SUBST([CTAGS])
527 if test -z "$ETAGS"; then
528 ETAGS=etags
529 fi
530 AC_SUBST([ETAGS])
531 if test -z "$CSCOPE"; then
532 CSCOPE=cscope
533 fi
534 AC_SUBST([CSCOPE])
535
536 AC_REQUIRE([AM_SILENT_RULES])dnl
537 dnl The testsuite driver may need to know about EXEEXT, so add the
538 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
539 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
540 AC_CONFIG_COMMANDS_PRE(dnl
541 [m4_provide_if([_AM_COMPILER_EXEEXT],
542 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
543
544 # POSIX will say in a future version that running "rm -f" with no argument
545 # is OK; and we want to be able to make that assumption in our Makefile
546 # recipes. So use an aggressive probe to check that the usage we want is
547 # actually supported "in the wild" to an acceptable degree.
548 # See automake bug#10828.
549 # To make any issue more visible, cause the running configure to be aborted
550 # by default if the 'rm' program in use doesn't match our expectations; the
551 # user can still override this though.
552 if rm -f && rm -fr && rm -rf; then : OK; else
553 cat >&2 <<'END'
554 Oops!
555
556 Your 'rm' program seems unable to run without file operands specified
557 on the command line, even when the '-f' option is present. This is contrary
558 to the behaviour of most rm programs out there, and not conforming with
559 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
560
561 Please tell bug-automake@gnu.org about your system, including the value
562 of your $PATH and any error possibly output before this message. This
563 can help us improve future automake versions.
564
565 END
566 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
567 echo 'Configuration will proceed anyway, since you have set the' >&2
568 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
569 echo >&2
570 else
571 cat >&2 <<'END'
572 Aborting the configuration process, to ensure you take notice of the issue.
573
574 You can download and install GNU coreutils to get an 'rm' implementation
575 that behaves properly: <https://www.gnu.org/software/coreutils/>.
576
577 If you want to complete the configuration process using your problematic
578 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
579 to "yes", and re-run configure.
580
581 END
582 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
583 fi
584 fi
585 dnl The trailing newline in this macro's definition is deliberate, for
586 dnl backward compatibility and to allow trailing 'dnl'-style comments
587 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
588 ])
589
590 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
591 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
592 dnl mangled by Autoconf and run in a shell conditional statement.
593 m4_define([_AC_COMPILER_EXEEXT],
594 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
595
596 # When config.status generates a header, we must update the stamp-h file.
597 # This file resides in the same directory as the config header
598 # that is generated. The stamp files are numbered to have different names.
599
600 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
601 # loop where config.status creates the headers, so we can generate
602 # our stamp files there.
603 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
604 [# Compute $1's index in $config_headers.
605 _am_arg=$1
606 _am_stamp_count=1
607 for _am_header in $config_headers :; do
608 case $_am_header in
609 $_am_arg | $_am_arg:* )
610 break ;;
611 * )
612 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
613 esac
614 done
615 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
616
617 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
618 #
619 # This file is free software; the Free Software Foundation
620 # gives unlimited permission to copy and/or distribute it,
621 # with or without modifications, as long as this notice is preserved.
622
623 # AM_PROG_INSTALL_SH
624 # ------------------
625 # Define $install_sh.
626 AC_DEFUN([AM_PROG_INSTALL_SH],
627 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
628 if test x"${install_sh+set}" != xset; then
629 case $am_aux_dir in
630 *\ * | *\ *)
631 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
632 *)
633 install_sh="\${SHELL} $am_aux_dir/install-sh"
634 esac
635 fi
636 AC_SUBST([install_sh])])
637
638 # Copyright (C) 2003-2021 Free Software Foundation, Inc.
639 #
640 # This file is free software; the Free Software Foundation
641 # gives unlimited permission to copy and/or distribute it,
642 # with or without modifications, as long as this notice is preserved.
643
644 # Check whether the underlying file-system supports filenames
645 # with a leading dot. For instance MS-DOS doesn't.
646 AC_DEFUN([AM_SET_LEADING_DOT],
647 [rm -rf .tst 2>/dev/null
648 mkdir .tst 2>/dev/null
649 if test -d .tst; then
650 am__leading_dot=.
651 else
652 am__leading_dot=_
653 fi
654 rmdir .tst 2>/dev/null
655 AC_SUBST([am__leading_dot])])
656
657 # Check to see how 'make' treats includes. -*- Autoconf -*-
658
659 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
660 #
661 # This file is free software; the Free Software Foundation
662 # gives unlimited permission to copy and/or distribute it,
663 # with or without modifications, as long as this notice is preserved.
664
665 # AM_MAKE_INCLUDE()
666 # -----------------
667 # Check whether make has an 'include' directive that can support all
668 # the idioms we need for our automatic dependency tracking code.
669 AC_DEFUN([AM_MAKE_INCLUDE],
670 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
671 cat > confinc.mk << 'END'
672 am__doit:
673 @echo this is the am__doit target >confinc.out
674 .PHONY: am__doit
675 END
676 am__include="#"
677 am__quote=
678 # BSD make does it like this.
679 echo '.include "confinc.mk" # ignored' > confmf.BSD
680 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
681 echo 'include confinc.mk # ignored' > confmf.GNU
682 _am_result=no
683 for s in GNU BSD; do
684 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
685 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
686 ['0:this is the am__doit target'],
687 [AS_CASE([$s],
688 [BSD], [am__include='.include' am__quote='"'],
689 [am__include='include' am__quote=''])])
690 if test "$am__include" != "#"; then
691 _am_result="yes ($s style)"
692 break
693 fi
694 done
695 rm -f confinc.* confmf.*
696 AC_MSG_RESULT([${_am_result}])
697 AC_SUBST([am__include])])
698 AC_SUBST([am__quote])])
699
700 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
701
702 # Copyright (C) 1997-2021 Free Software Foundation, Inc.
703 #
704 # This file is free software; the Free Software Foundation
705 # gives unlimited permission to copy and/or distribute it,
706 # with or without modifications, as long as this notice is preserved.
707
708 # AM_MISSING_PROG(NAME, PROGRAM)
709 # ------------------------------
710 AC_DEFUN([AM_MISSING_PROG],
711 [AC_REQUIRE([AM_MISSING_HAS_RUN])
712 $1=${$1-"${am_missing_run}$2"}
713 AC_SUBST($1)])
714
715 # AM_MISSING_HAS_RUN
716 # ------------------
717 # Define MISSING if not defined so far and test if it is modern enough.
718 # If it is, set am_missing_run to use it, otherwise, to nothing.
719 AC_DEFUN([AM_MISSING_HAS_RUN],
720 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
721 AC_REQUIRE_AUX_FILE([missing])dnl
722 if test x"${MISSING+set}" != xset; then
723 MISSING="\${SHELL} '$am_aux_dir/missing'"
724 fi
725 # Use eval to expand $SHELL
726 if eval "$MISSING --is-lightweight"; then
727 am_missing_run="$MISSING "
728 else
729 am_missing_run=
730 AC_MSG_WARN(['missing' script is too old or missing])
731 fi
732 ])
733
734 # Helper functions for option handling. -*- Autoconf -*-
735
736 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
737 #
738 # This file is free software; the Free Software Foundation
739 # gives unlimited permission to copy and/or distribute it,
740 # with or without modifications, as long as this notice is preserved.
741
742 # _AM_MANGLE_OPTION(NAME)
743 # -----------------------
744 AC_DEFUN([_AM_MANGLE_OPTION],
745 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
746
747 # _AM_SET_OPTION(NAME)
748 # --------------------
749 # Set option NAME. Presently that only means defining a flag for this option.
750 AC_DEFUN([_AM_SET_OPTION],
751 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
752
753 # _AM_SET_OPTIONS(OPTIONS)
754 # ------------------------
755 # OPTIONS is a space-separated list of Automake options.
756 AC_DEFUN([_AM_SET_OPTIONS],
757 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
758
759 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
760 # -------------------------------------------
761 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
762 AC_DEFUN([_AM_IF_OPTION],
763 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
764
765 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
766 #
767 # This file is free software; the Free Software Foundation
768 # gives unlimited permission to copy and/or distribute it,
769 # with or without modifications, as long as this notice is preserved.
770
771 # _AM_PROG_CC_C_O
772 # ---------------
773 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
774 # to automatically call this.
775 AC_DEFUN([_AM_PROG_CC_C_O],
776 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
777 AC_REQUIRE_AUX_FILE([compile])dnl
778 AC_LANG_PUSH([C])dnl
779 AC_CACHE_CHECK(
780 [whether $CC understands -c and -o together],
781 [am_cv_prog_cc_c_o],
782 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
783 # Make sure it works both with $CC and with simple cc.
784 # Following AC_PROG_CC_C_O, we do the test twice because some
785 # compilers refuse to overwrite an existing .o file with -o,
786 # though they will create one.
787 am_cv_prog_cc_c_o=yes
788 for am_i in 1 2; do
789 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
790 && test -f conftest2.$ac_objext; then
791 : OK
792 else
793 am_cv_prog_cc_c_o=no
794 break
795 fi
796 done
797 rm -f core conftest*
798 unset am_i])
799 if test "$am_cv_prog_cc_c_o" != yes; then
800 # Losing compiler, so override with the script.
801 # FIXME: It is wrong to rewrite CC.
802 # But if we don't then we get into trouble of one sort or another.
803 # A longer-term fix would be to have automake use am__CC in this case,
804 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
805 CC="$am_aux_dir/compile $CC"
806 fi
807 AC_LANG_POP([C])])
808
809 # For backward compatibility.
810 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
811
812 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
813 #
814 # This file is free software; the Free Software Foundation
815 # gives unlimited permission to copy and/or distribute it,
816 # with or without modifications, as long as this notice is preserved.
817
818 # AM_RUN_LOG(COMMAND)
819 # -------------------
820 # Run COMMAND, save the exit status in ac_status, and log it.
821 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
822 AC_DEFUN([AM_RUN_LOG],
823 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
824 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
825 ac_status=$?
826 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
827 (exit $ac_status); }])
828
829 # Check to make sure that the build environment is sane. -*- Autoconf -*-
830
831 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
832 #
833 # This file is free software; the Free Software Foundation
834 # gives unlimited permission to copy and/or distribute it,
835 # with or without modifications, as long as this notice is preserved.
836
837 # AM_SANITY_CHECK
838 # ---------------
839 AC_DEFUN([AM_SANITY_CHECK],
840 [AC_MSG_CHECKING([whether build environment is sane])
841 # Reject unsafe characters in $srcdir or the absolute working directory
842 # name. Accept space and tab only in the latter.
843 am_lf='
844 '
845 case `pwd` in
846 *[[\\\"\#\$\&\'\`$am_lf]]*)
847 AC_MSG_ERROR([unsafe absolute working directory name]);;
848 esac
849 case $srcdir in
850 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
851 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
852 esac
853
854 # Do 'set' in a subshell so we don't clobber the current shell's
855 # arguments. Must try -L first in case configure is actually a
856 # symlink; some systems play weird games with the mod time of symlinks
857 # (eg FreeBSD returns the mod time of the symlink's containing
858 # directory).
859 if (
860 am_has_slept=no
861 for am_try in 1 2; do
862 echo "timestamp, slept: $am_has_slept" > conftest.file
863 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
864 if test "$[*]" = "X"; then
865 # -L didn't work.
866 set X `ls -t "$srcdir/configure" conftest.file`
867 fi
868 if test "$[*]" != "X $srcdir/configure conftest.file" \
869 && test "$[*]" != "X conftest.file $srcdir/configure"; then
870
871 # If neither matched, then we have a broken ls. This can happen
872 # if, for instance, CONFIG_SHELL is bash and it inherits a
873 # broken ls alias from the environment. This has actually
874 # happened. Such a system could not be considered "sane".
875 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
876 alias in your environment])
877 fi
878 if test "$[2]" = conftest.file || test $am_try -eq 2; then
879 break
880 fi
881 # Just in case.
882 sleep 1
883 am_has_slept=yes
884 done
885 test "$[2]" = conftest.file
886 )
887 then
888 # Ok.
889 :
890 else
891 AC_MSG_ERROR([newly created file is older than distributed files!
892 Check your system clock])
893 fi
894 AC_MSG_RESULT([yes])
895 # If we didn't sleep, we still need to ensure time stamps of config.status and
896 # generated files are strictly newer.
897 am_sleep_pid=
898 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
899 ( sleep 1 ) &
900 am_sleep_pid=$!
901 fi
902 AC_CONFIG_COMMANDS_PRE(
903 [AC_MSG_CHECKING([that generated files are newer than configure])
904 if test -n "$am_sleep_pid"; then
905 # Hide warnings about reused PIDs.
906 wait $am_sleep_pid 2>/dev/null
907 fi
908 AC_MSG_RESULT([done])])
909 rm -f conftest.file
910 ])
911
912 # Copyright (C) 2009-2021 Free Software Foundation, Inc.
913 #
914 # This file is free software; the Free Software Foundation
915 # gives unlimited permission to copy and/or distribute it,
916 # with or without modifications, as long as this notice is preserved.
917
918 # AM_SILENT_RULES([DEFAULT])
919 # --------------------------
920 # Enable less verbose build rules; with the default set to DEFAULT
921 # ("yes" being less verbose, "no" or empty being verbose).
922 AC_DEFUN([AM_SILENT_RULES],
923 [AC_ARG_ENABLE([silent-rules], [dnl
924 AS_HELP_STRING(
925 [--enable-silent-rules],
926 [less verbose build output (undo: "make V=1")])
927 AS_HELP_STRING(
928 [--disable-silent-rules],
929 [verbose build output (undo: "make V=0")])dnl
930 ])
931 case $enable_silent_rules in @%:@ (((
932 yes) AM_DEFAULT_VERBOSITY=0;;
933 no) AM_DEFAULT_VERBOSITY=1;;
934 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
935 esac
936 dnl
937 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
938 dnl do not support nested variable expansions.
939 dnl See automake bug#9928 and bug#10237.
940 am_make=${MAKE-make}
941 AC_CACHE_CHECK([whether $am_make supports nested variables],
942 [am_cv_make_support_nested_variables],
943 [if AS_ECHO([['TRUE=$(BAR$(V))
944 BAR0=false
945 BAR1=true
946 V=1
947 am__doit:
948 @$(TRUE)
949 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
950 am_cv_make_support_nested_variables=yes
951 else
952 am_cv_make_support_nested_variables=no
953 fi])
954 if test $am_cv_make_support_nested_variables = yes; then
955 dnl Using '$V' instead of '$(V)' breaks IRIX make.
956 AM_V='$(V)'
957 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
958 else
959 AM_V=$AM_DEFAULT_VERBOSITY
960 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
961 fi
962 AC_SUBST([AM_V])dnl
963 AM_SUBST_NOTMAKE([AM_V])dnl
964 AC_SUBST([AM_DEFAULT_V])dnl
965 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
966 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
967 AM_BACKSLASH='\'
968 AC_SUBST([AM_BACKSLASH])dnl
969 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
970 ])
971
972 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
973 #
974 # This file is free software; the Free Software Foundation
975 # gives unlimited permission to copy and/or distribute it,
976 # with or without modifications, as long as this notice is preserved.
977
978 # AM_PROG_INSTALL_STRIP
979 # ---------------------
980 # One issue with vendor 'install' (even GNU) is that you can't
981 # specify the program used to strip binaries. This is especially
982 # annoying in cross-compiling environments, where the build's strip
983 # is unlikely to handle the host's binaries.
984 # Fortunately install-sh will honor a STRIPPROG variable, so we
985 # always use install-sh in "make install-strip", and initialize
986 # STRIPPROG with the value of the STRIP variable (set by the user).
987 AC_DEFUN([AM_PROG_INSTALL_STRIP],
988 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
989 # Installed binaries are usually stripped using 'strip' when the user
990 # run "make install-strip". However 'strip' might not be the right
991 # tool to use in cross-compilation environments, therefore Automake
992 # will honor the 'STRIP' environment variable to overrule this program.
993 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
994 if test "$cross_compiling" != no; then
995 AC_CHECK_TOOL([STRIP], [strip], :)
996 fi
997 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
998 AC_SUBST([INSTALL_STRIP_PROGRAM])])
999
1000 # Copyright (C) 2006-2021 Free Software Foundation, Inc.
1001 #
1002 # This file is free software; the Free Software Foundation
1003 # gives unlimited permission to copy and/or distribute it,
1004 # with or without modifications, as long as this notice is preserved.
1005
1006 # _AM_SUBST_NOTMAKE(VARIABLE)
1007 # ---------------------------
1008 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1009 # This macro is traced by Automake.
1010 AC_DEFUN([_AM_SUBST_NOTMAKE])
1011
1012 # AM_SUBST_NOTMAKE(VARIABLE)
1013 # --------------------------
1014 # Public sister of _AM_SUBST_NOTMAKE.
1015 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1016
1017 # Check how to create a tarball. -*- Autoconf -*-
1018
1019 # Copyright (C) 2004-2021 Free Software Foundation, Inc.
1020 #
1021 # This file is free software; the Free Software Foundation
1022 # gives unlimited permission to copy and/or distribute it,
1023 # with or without modifications, as long as this notice is preserved.
1024
1025 # _AM_PROG_TAR(FORMAT)
1026 # --------------------
1027 # Check how to create a tarball in format FORMAT.
1028 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1029 #
1030 # Substitute a variable $(am__tar) that is a command
1031 # writing to stdout a FORMAT-tarball containing the directory
1032 # $tardir.
1033 # tardir=directory && $(am__tar) > result.tar
1034 #
1035 # Substitute a variable $(am__untar) that extract such
1036 # a tarball read from stdin.
1037 # $(am__untar) < result.tar
1038 #
1039 AC_DEFUN([_AM_PROG_TAR],
1040 [# Always define AMTAR for backward compatibility. Yes, it's still used
1041 # in the wild :-( We should find a proper way to deprecate it ...
1042 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1043
1044 # We'll loop over all known methods to create a tar archive until one works.
1045 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1046
1047 m4_if([$1], [v7],
1048 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1049
1050 [m4_case([$1],
1051 [ustar],
1052 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1053 # There is notably a 21 bits limit for the UID and the GID. In fact,
1054 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1055 # and bug#13588).
1056 am_max_uid=2097151 # 2^21 - 1
1057 am_max_gid=$am_max_uid
1058 # The $UID and $GID variables are not portable, so we need to resort
1059 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1060 # below are definitely unexpected, so allow the users to see them
1061 # (that is, avoid stderr redirection).
1062 am_uid=`id -u || echo unknown`
1063 am_gid=`id -g || echo unknown`
1064 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1065 if test $am_uid -le $am_max_uid; then
1066 AC_MSG_RESULT([yes])
1067 else
1068 AC_MSG_RESULT([no])
1069 _am_tools=none
1070 fi
1071 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1072 if test $am_gid -le $am_max_gid; then
1073 AC_MSG_RESULT([yes])
1074 else
1075 AC_MSG_RESULT([no])
1076 _am_tools=none
1077 fi],
1078
1079 [pax],
1080 [],
1081
1082 [m4_fatal([Unknown tar format])])
1083
1084 AC_MSG_CHECKING([how to create a $1 tar archive])
1085
1086 # Go ahead even if we have the value already cached. We do so because we
1087 # need to set the values for the 'am__tar' and 'am__untar' variables.
1088 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1089
1090 for _am_tool in $_am_tools; do
1091 case $_am_tool in
1092 gnutar)
1093 for _am_tar in tar gnutar gtar; do
1094 AM_RUN_LOG([$_am_tar --version]) && break
1095 done
1096 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1097 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1098 am__untar="$_am_tar -xf -"
1099 ;;
1100 plaintar)
1101 # Must skip GNU tar: if it does not support --format= it doesn't create
1102 # ustar tarball either.
1103 (tar --version) >/dev/null 2>&1 && continue
1104 am__tar='tar chf - "$$tardir"'
1105 am__tar_='tar chf - "$tardir"'
1106 am__untar='tar xf -'
1107 ;;
1108 pax)
1109 am__tar='pax -L -x $1 -w "$$tardir"'
1110 am__tar_='pax -L -x $1 -w "$tardir"'
1111 am__untar='pax -r'
1112 ;;
1113 cpio)
1114 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1115 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1116 am__untar='cpio -i -H $1 -d'
1117 ;;
1118 none)
1119 am__tar=false
1120 am__tar_=false
1121 am__untar=false
1122 ;;
1123 esac
1124
1125 # If the value was cached, stop now. We just wanted to have am__tar
1126 # and am__untar set.
1127 test -n "${am_cv_prog_tar_$1}" && break
1128
1129 # tar/untar a dummy directory, and stop if the command works.
1130 rm -rf conftest.dir
1131 mkdir conftest.dir
1132 echo GrepMe > conftest.dir/file
1133 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1134 rm -rf conftest.dir
1135 if test -s conftest.tar; then
1136 AM_RUN_LOG([$am__untar <conftest.tar])
1137 AM_RUN_LOG([cat conftest.dir/file])
1138 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1139 fi
1140 done
1141 rm -rf conftest.dir
1142
1143 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1144 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1145
1146 AC_SUBST([am__tar])
1147 AC_SUBST([am__untar])
1148 ]) # _AM_PROG_TAR
1149
1150 m4_include([m4/libtool.m4])
1151 m4_include([m4/ltoptions.m4])
1152 m4_include([m4/ltsugar.m4])
1153 m4_include([m4/ltversion.m4])
1154 m4_include([m4/lt~obsolete.m4])
+0
-18
appveyor.yml less more
0 environment:
1 matrix:
2 - COMPILER: mingw-w64
3 MINGW_DIR: c:\msys64\mingw64
4 MINGW_ARCH: x86_64
5
6 - COMPILER: mingw
7 MINGW_DIR: c:\msys64\mingw32
8 MINGW_ARCH: i686
9
10 build_script:
11 - set Path=%MINGW_DIR%\bin;c:\msys64\usr\bin;%Path%
12 - bash autogen.sh
13 - bash configure
14 - make distcheck
15
16 #on_finish:
17 # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+0
-7
autogen.sh less more
0 #!/bin/sh
1
2 # Cleanup
3 rm -rf autom4te.cache
4
5 # Generate
6 autoreconf -i -f -v
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-2021 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* | MSYS*)
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/* | msys/*)
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-02-24'
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 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 # If ldd exists, use it to detect musl libc.
154 if command -v ldd >/dev/null && \
155 ldd --version 2>&1 | grep -q ^musl
156 then
157 LIBC=musl
158 fi
159 ;;
160 esac
161
162 # Note: order is significant - the case branches are not exclusive.
163
164 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
165 *:NetBSD:*:*)
166 # NetBSD (nbsd) targets should (where applicable) match one or
167 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
168 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
169 # switched to ELF, *-*-netbsd* would select the old
170 # object file format. This provides both forward
171 # compatibility and a consistent mechanism for selecting the
172 # object file format.
173 #
174 # Note: NetBSD doesn't particularly care about the vendor
175 # portion of the name. We always set it to "unknown".
176 sysctl="sysctl -n hw.machine_arch"
177 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
178 "/sbin/$sysctl" 2>/dev/null || \
179 "/usr/sbin/$sysctl" 2>/dev/null || \
180 echo unknown)`
181 case "$UNAME_MACHINE_ARCH" in
182 armeb) machine=armeb-unknown ;;
183 arm*) machine=arm-unknown ;;
184 sh3el) machine=shl-unknown ;;
185 sh3eb) machine=sh-unknown ;;
186 sh5el) machine=sh5le-unknown ;;
187 earmv*)
188 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
189 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
190 machine="${arch}${endian}"-unknown
191 ;;
192 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
193 esac
194 # The Operating System including object format, if it has switched
195 # to ELF recently (or will in the future) and ABI.
196 case "$UNAME_MACHINE_ARCH" in
197 earm*)
198 os=netbsdelf
199 ;;
200 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
201 eval "$set_cc_for_build"
202 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
203 | grep -q __ELF__
204 then
205 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
206 # Return netbsd for either. FIX?
207 os=netbsd
208 else
209 os=netbsdelf
210 fi
211 ;;
212 *)
213 os=netbsd
214 ;;
215 esac
216 # Determine ABI tags.
217 case "$UNAME_MACHINE_ARCH" in
218 earm*)
219 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
220 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
221 ;;
222 esac
223 # The OS release
224 # Debian GNU/NetBSD machines have a different userland, and
225 # thus, need a distinct triplet. However, they do not need
226 # kernel version information, so it can be replaced with a
227 # suitable tag, in the style of linux-gnu.
228 case "$UNAME_VERSION" in
229 Debian*)
230 release='-gnu'
231 ;;
232 *)
233 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
234 ;;
235 esac
236 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
237 # contains redundant information, the shorter form:
238 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
239 echo "$machine-${os}${release}${abi}"
240 exit ;;
241 *:Bitrig:*:*)
242 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
243 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
244 exit ;;
245 *:OpenBSD:*:*)
246 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
247 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
248 exit ;;
249 *:LibertyBSD:*:*)
250 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
251 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
252 exit ;;
253 *:MidnightBSD:*:*)
254 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
255 exit ;;
256 *:ekkoBSD:*:*)
257 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
258 exit ;;
259 *:SolidBSD:*:*)
260 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
261 exit ;;
262 macppc:MirBSD:*:*)
263 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
264 exit ;;
265 *:MirBSD:*:*)
266 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
267 exit ;;
268 *:Sortix:*:*)
269 echo "$UNAME_MACHINE"-unknown-sortix
270 exit ;;
271 *:Redox:*:*)
272 echo "$UNAME_MACHINE"-unknown-redox
273 exit ;;
274 mips:OSF1:*.*)
275 echo mips-dec-osf1
276 exit ;;
277 alpha:OSF1:*:*)
278 case $UNAME_RELEASE in
279 *4.0)
280 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
281 ;;
282 *5.*)
283 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
284 ;;
285 esac
286 # According to Compaq, /usr/sbin/psrinfo has been available on
287 # OSF/1 and Tru64 systems produced since 1995. I hope that
288 # covers most systems running today. This code pipes the CPU
289 # types through head -n 1, so we only detect the type of CPU 0.
290 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
291 case "$ALPHA_CPU_TYPE" in
292 "EV4 (21064)")
293 UNAME_MACHINE=alpha ;;
294 "EV4.5 (21064)")
295 UNAME_MACHINE=alpha ;;
296 "LCA4 (21066/21068)")
297 UNAME_MACHINE=alpha ;;
298 "EV5 (21164)")
299 UNAME_MACHINE=alphaev5 ;;
300 "EV5.6 (21164A)")
301 UNAME_MACHINE=alphaev56 ;;
302 "EV5.6 (21164PC)")
303 UNAME_MACHINE=alphapca56 ;;
304 "EV5.7 (21164PC)")
305 UNAME_MACHINE=alphapca57 ;;
306 "EV6 (21264)")
307 UNAME_MACHINE=alphaev6 ;;
308 "EV6.7 (21264A)")
309 UNAME_MACHINE=alphaev67 ;;
310 "EV6.8CB (21264C)")
311 UNAME_MACHINE=alphaev68 ;;
312 "EV6.8AL (21264B)")
313 UNAME_MACHINE=alphaev68 ;;
314 "EV6.8CX (21264D)")
315 UNAME_MACHINE=alphaev68 ;;
316 "EV6.9A (21264/EV69A)")
317 UNAME_MACHINE=alphaev69 ;;
318 "EV7 (21364)")
319 UNAME_MACHINE=alphaev7 ;;
320 "EV7.9 (21364A)")
321 UNAME_MACHINE=alphaev79 ;;
322 esac
323 # A Pn.n version is a patched version.
324 # A Vn.n version is a released version.
325 # A Tn.n version is a released field test version.
326 # A Xn.n version is an unreleased experimental baselevel.
327 # 1.2 uses "1.2" for uname -r.
328 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
329 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
330 exitcode=$?
331 trap '' 0
332 exit $exitcode ;;
333 Amiga*:UNIX_System_V:4.0:*)
334 echo m68k-unknown-sysv4
335 exit ;;
336 *:[Aa]miga[Oo][Ss]:*:*)
337 echo "$UNAME_MACHINE"-unknown-amigaos
338 exit ;;
339 *:[Mm]orph[Oo][Ss]:*:*)
340 echo "$UNAME_MACHINE"-unknown-morphos
341 exit ;;
342 *:OS/390:*:*)
343 echo i370-ibm-openedition
344 exit ;;
345 *:z/VM:*:*)
346 echo s390-ibm-zvmoe
347 exit ;;
348 *:OS400:*:*)
349 echo powerpc-ibm-os400
350 exit ;;
351 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
352 echo arm-acorn-riscix"$UNAME_RELEASE"
353 exit ;;
354 arm*:riscos:*:*|arm*:RISCOS:*:*)
355 echo arm-unknown-riscos
356 exit ;;
357 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
358 echo hppa1.1-hitachi-hiuxmpp
359 exit ;;
360 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
361 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
362 if test "`(/bin/universe) 2>/dev/null`" = att ; then
363 echo pyramid-pyramid-sysv3
364 else
365 echo pyramid-pyramid-bsd
366 fi
367 exit ;;
368 NILE*:*:*:dcosx)
369 echo pyramid-pyramid-svr4
370 exit ;;
371 DRS?6000:unix:4.0:6*)
372 echo sparc-icl-nx6
373 exit ;;
374 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
375 case `/usr/bin/uname -p` in
376 sparc) echo sparc-icl-nx7; exit ;;
377 esac ;;
378 s390x:SunOS:*:*)
379 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
380 exit ;;
381 sun4H:SunOS:5.*:*)
382 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
383 exit ;;
384 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
385 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
386 exit ;;
387 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
388 echo i386-pc-auroraux"$UNAME_RELEASE"
389 exit ;;
390 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
391 eval "$set_cc_for_build"
392 SUN_ARCH=i386
393 # If there is a compiler, see if it is configured for 64-bit objects.
394 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
395 # This test works for both compilers.
396 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
397 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
398 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
399 grep IS_64BIT_ARCH >/dev/null
400 then
401 SUN_ARCH=x86_64
402 fi
403 fi
404 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
405 exit ;;
406 sun4*:SunOS:6*:*)
407 # According to config.sub, this is the proper way to canonicalize
408 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
409 # it's likely to be more like Solaris than SunOS4.
410 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
411 exit ;;
412 sun4*:SunOS:*:*)
413 case "`/usr/bin/arch -k`" in
414 Series*|S4*)
415 UNAME_RELEASE=`uname -v`
416 ;;
417 esac
418 # Japanese Language versions have a version number like `4.1.3-JL'.
419 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
420 exit ;;
421 sun3*:SunOS:*:*)
422 echo m68k-sun-sunos"$UNAME_RELEASE"
423 exit ;;
424 sun*:*:4.2BSD:*)
425 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
426 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
427 case "`/bin/arch`" in
428 sun3)
429 echo m68k-sun-sunos"$UNAME_RELEASE"
430 ;;
431 sun4)
432 echo sparc-sun-sunos"$UNAME_RELEASE"
433 ;;
434 esac
435 exit ;;
436 aushp:SunOS:*:*)
437 echo sparc-auspex-sunos"$UNAME_RELEASE"
438 exit ;;
439 # The situation for MiNT is a little confusing. The machine name
440 # can be virtually everything (everything which is not
441 # "atarist" or "atariste" at least should have a processor
442 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
443 # to the lowercase version "mint" (or "freemint"). Finally
444 # the system name "TOS" denotes a system which is actually not
445 # MiNT. But MiNT is downward compatible to TOS, so this should
446 # be no problem.
447 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
448 echo m68k-atari-mint"$UNAME_RELEASE"
449 exit ;;
450 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
451 echo m68k-atari-mint"$UNAME_RELEASE"
452 exit ;;
453 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
454 echo m68k-atari-mint"$UNAME_RELEASE"
455 exit ;;
456 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
457 echo m68k-milan-mint"$UNAME_RELEASE"
458 exit ;;
459 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
460 echo m68k-hades-mint"$UNAME_RELEASE"
461 exit ;;
462 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
463 echo m68k-unknown-mint"$UNAME_RELEASE"
464 exit ;;
465 m68k:machten:*:*)
466 echo m68k-apple-machten"$UNAME_RELEASE"
467 exit ;;
468 powerpc:machten:*:*)
469 echo powerpc-apple-machten"$UNAME_RELEASE"
470 exit ;;
471 RISC*:Mach:*:*)
472 echo mips-dec-mach_bsd4.3
473 exit ;;
474 RISC*:ULTRIX:*:*)
475 echo mips-dec-ultrix"$UNAME_RELEASE"
476 exit ;;
477 VAX*:ULTRIX*:*:*)
478 echo vax-dec-ultrix"$UNAME_RELEASE"
479 exit ;;
480 2020:CLIX:*:* | 2430:CLIX:*:*)
481 echo clipper-intergraph-clix"$UNAME_RELEASE"
482 exit ;;
483 mips:*:*:UMIPS | mips:*:*:RISCos)
484 eval "$set_cc_for_build"
485 sed 's/^ //' << EOF > "$dummy.c"
486 #ifdef __cplusplus
487 #include <stdio.h> /* for printf() prototype */
488 int main (int argc, char *argv[]) {
489 #else
490 int main (argc, argv) int argc; char *argv[]; {
491 #endif
492 #if defined (host_mips) && defined (MIPSEB)
493 #if defined (SYSTYPE_SYSV)
494 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
495 #endif
496 #if defined (SYSTYPE_SVR4)
497 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
498 #endif
499 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
500 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
501 #endif
502 #endif
503 exit (-1);
504 }
505 EOF
506 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
507 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
508 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
509 { echo "$SYSTEM_NAME"; exit; }
510 echo mips-mips-riscos"$UNAME_RELEASE"
511 exit ;;
512 Motorola:PowerMAX_OS:*:*)
513 echo powerpc-motorola-powermax
514 exit ;;
515 Motorola:*:4.3:PL8-*)
516 echo powerpc-harris-powermax
517 exit ;;
518 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
519 echo powerpc-harris-powermax
520 exit ;;
521 Night_Hawk:Power_UNIX:*:*)
522 echo powerpc-harris-powerunix
523 exit ;;
524 m88k:CX/UX:7*:*)
525 echo m88k-harris-cxux7
526 exit ;;
527 m88k:*:4*:R4*)
528 echo m88k-motorola-sysv4
529 exit ;;
530 m88k:*:3*:R3*)
531 echo m88k-motorola-sysv3
532 exit ;;
533 AViiON:dgux:*:*)
534 # DG/UX returns AViiON for all architectures
535 UNAME_PROCESSOR=`/usr/bin/uname -p`
536 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
537 then
538 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
539 [ "$TARGET_BINARY_INTERFACE"x = x ]
540 then
541 echo m88k-dg-dgux"$UNAME_RELEASE"
542 else
543 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
544 fi
545 else
546 echo i586-dg-dgux"$UNAME_RELEASE"
547 fi
548 exit ;;
549 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
550 echo m88k-dolphin-sysv3
551 exit ;;
552 M88*:*:R3*:*)
553 # Delta 88k system running SVR3
554 echo m88k-motorola-sysv3
555 exit ;;
556 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
557 echo m88k-tektronix-sysv3
558 exit ;;
559 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
560 echo m68k-tektronix-bsd
561 exit ;;
562 *:IRIX*:*:*)
563 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
564 exit ;;
565 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
566 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
567 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
568 i*86:AIX:*:*)
569 echo i386-ibm-aix
570 exit ;;
571 ia64:AIX:*:*)
572 if [ -x /usr/bin/oslevel ] ; then
573 IBM_REV=`/usr/bin/oslevel`
574 else
575 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
576 fi
577 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
578 exit ;;
579 *:AIX:2:3)
580 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
581 eval "$set_cc_for_build"
582 sed 's/^ //' << EOF > "$dummy.c"
583 #include <sys/systemcfg.h>
584
585 main()
586 {
587 if (!__power_pc())
588 exit(1);
589 puts("powerpc-ibm-aix3.2.5");
590 exit(0);
591 }
592 EOF
593 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
594 then
595 echo "$SYSTEM_NAME"
596 else
597 echo rs6000-ibm-aix3.2.5
598 fi
599 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
600 echo rs6000-ibm-aix3.2.4
601 else
602 echo rs6000-ibm-aix3.2
603 fi
604 exit ;;
605 *:AIX:*:[4567])
606 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
607 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
608 IBM_ARCH=rs6000
609 else
610 IBM_ARCH=powerpc
611 fi
612 if [ -x /usr/bin/lslpp ] ; then
613 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
614 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
615 else
616 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
617 fi
618 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
619 exit ;;
620 *:AIX:*:*)
621 echo rs6000-ibm-aix
622 exit ;;
623 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
624 echo romp-ibm-bsd4.4
625 exit ;;
626 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
627 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
628 exit ;; # report: romp-ibm BSD 4.3
629 *:BOSX:*:*)
630 echo rs6000-bull-bosx
631 exit ;;
632 DPX/2?00:B.O.S.:*:*)
633 echo m68k-bull-sysv3
634 exit ;;
635 9000/[34]??:4.3bsd:1.*:*)
636 echo m68k-hp-bsd
637 exit ;;
638 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
639 echo m68k-hp-bsd4.4
640 exit ;;
641 9000/[34678]??:HP-UX:*:*)
642 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
643 case "$UNAME_MACHINE" in
644 9000/31?) HP_ARCH=m68000 ;;
645 9000/[34]??) HP_ARCH=m68k ;;
646 9000/[678][0-9][0-9])
647 if [ -x /usr/bin/getconf ]; then
648 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
649 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
650 case "$sc_cpu_version" in
651 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
652 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
653 532) # CPU_PA_RISC2_0
654 case "$sc_kernel_bits" in
655 32) HP_ARCH=hppa2.0n ;;
656 64) HP_ARCH=hppa2.0w ;;
657 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
658 esac ;;
659 esac
660 fi
661 if [ "$HP_ARCH" = "" ]; then
662 eval "$set_cc_for_build"
663 sed 's/^ //' << EOF > "$dummy.c"
664
665 #define _HPUX_SOURCE
666 #include <stdlib.h>
667 #include <unistd.h>
668
669 int main ()
670 {
671 #if defined(_SC_KERNEL_BITS)
672 long bits = sysconf(_SC_KERNEL_BITS);
673 #endif
674 long cpu = sysconf (_SC_CPU_VERSION);
675
676 switch (cpu)
677 {
678 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
679 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
680 case CPU_PA_RISC2_0:
681 #if defined(_SC_KERNEL_BITS)
682 switch (bits)
683 {
684 case 64: puts ("hppa2.0w"); break;
685 case 32: puts ("hppa2.0n"); break;
686 default: puts ("hppa2.0"); break;
687 } break;
688 #else /* !defined(_SC_KERNEL_BITS) */
689 puts ("hppa2.0"); break;
690 #endif
691 default: puts ("hppa1.0"); break;
692 }
693 exit (0);
694 }
695 EOF
696 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
697 test -z "$HP_ARCH" && HP_ARCH=hppa
698 fi ;;
699 esac
700 if [ "$HP_ARCH" = hppa2.0w ]
701 then
702 eval "$set_cc_for_build"
703
704 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
705 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
706 # generating 64-bit code. GNU and HP use different nomenclature:
707 #
708 # $ CC_FOR_BUILD=cc ./config.guess
709 # => hppa2.0w-hp-hpux11.23
710 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
711 # => hppa64-hp-hpux11.23
712
713 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
714 grep -q __LP64__
715 then
716 HP_ARCH=hppa2.0w
717 else
718 HP_ARCH=hppa64
719 fi
720 fi
721 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
722 exit ;;
723 ia64:HP-UX:*:*)
724 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
725 echo ia64-hp-hpux"$HPUX_REV"
726 exit ;;
727 3050*:HI-UX:*:*)
728 eval "$set_cc_for_build"
729 sed 's/^ //' << EOF > "$dummy.c"
730 #include <unistd.h>
731 int
732 main ()
733 {
734 long cpu = sysconf (_SC_CPU_VERSION);
735 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
736 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
737 results, however. */
738 if (CPU_IS_PA_RISC (cpu))
739 {
740 switch (cpu)
741 {
742 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
743 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
744 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
745 default: puts ("hppa-hitachi-hiuxwe2"); break;
746 }
747 }
748 else if (CPU_IS_HP_MC68K (cpu))
749 puts ("m68k-hitachi-hiuxwe2");
750 else puts ("unknown-hitachi-hiuxwe2");
751 exit (0);
752 }
753 EOF
754 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
755 { echo "$SYSTEM_NAME"; exit; }
756 echo unknown-hitachi-hiuxwe2
757 exit ;;
758 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
759 echo hppa1.1-hp-bsd
760 exit ;;
761 9000/8??:4.3bsd:*:*)
762 echo hppa1.0-hp-bsd
763 exit ;;
764 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
765 echo hppa1.0-hp-mpeix
766 exit ;;
767 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
768 echo hppa1.1-hp-osf
769 exit ;;
770 hp8??:OSF1:*:*)
771 echo hppa1.0-hp-osf
772 exit ;;
773 i*86:OSF1:*:*)
774 if [ -x /usr/sbin/sysversion ] ; then
775 echo "$UNAME_MACHINE"-unknown-osf1mk
776 else
777 echo "$UNAME_MACHINE"-unknown-osf1
778 fi
779 exit ;;
780 parisc*:Lites*:*:*)
781 echo hppa1.1-hp-lites
782 exit ;;
783 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
784 echo c1-convex-bsd
785 exit ;;
786 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
787 if getsysinfo -f scalar_acc
788 then echo c32-convex-bsd
789 else echo c2-convex-bsd
790 fi
791 exit ;;
792 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
793 echo c34-convex-bsd
794 exit ;;
795 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
796 echo c38-convex-bsd
797 exit ;;
798 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
799 echo c4-convex-bsd
800 exit ;;
801 CRAY*Y-MP:*:*:*)
802 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
803 exit ;;
804 CRAY*[A-Z]90:*:*:*)
805 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
806 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
807 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
808 -e 's/\.[^.]*$/.X/'
809 exit ;;
810 CRAY*TS:*:*:*)
811 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
812 exit ;;
813 CRAY*T3E:*:*:*)
814 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
815 exit ;;
816 CRAY*SV1:*:*:*)
817 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
818 exit ;;
819 *:UNICOS/mp:*:*)
820 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
821 exit ;;
822 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
823 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
824 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
825 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
826 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
827 exit ;;
828 5000:UNIX_System_V:4.*:*)
829 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
830 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
831 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
832 exit ;;
833 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
834 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
835 exit ;;
836 sparc*:BSD/OS:*:*)
837 echo sparc-unknown-bsdi"$UNAME_RELEASE"
838 exit ;;
839 *:BSD/OS:*:*)
840 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
841 exit ;;
842 *:FreeBSD:*:*)
843 UNAME_PROCESSOR=`/usr/bin/uname -p`
844 case "$UNAME_PROCESSOR" in
845 amd64)
846 UNAME_PROCESSOR=x86_64 ;;
847 i386)
848 UNAME_PROCESSOR=i586 ;;
849 esac
850 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
851 exit ;;
852 i*:CYGWIN*:*)
853 echo "$UNAME_MACHINE"-pc-cygwin
854 exit ;;
855 *:MINGW64*:*)
856 echo "$UNAME_MACHINE"-pc-mingw64
857 exit ;;
858 *:MINGW*:*)
859 echo "$UNAME_MACHINE"-pc-mingw32
860 exit ;;
861 *:MSYS*:*)
862 echo "$UNAME_MACHINE"-pc-msys
863 exit ;;
864 i*:PW*:*)
865 echo "$UNAME_MACHINE"-pc-pw32
866 exit ;;
867 *:Interix*:*)
868 case "$UNAME_MACHINE" in
869 x86)
870 echo i586-pc-interix"$UNAME_RELEASE"
871 exit ;;
872 authenticamd | genuineintel | EM64T)
873 echo x86_64-unknown-interix"$UNAME_RELEASE"
874 exit ;;
875 IA64)
876 echo ia64-unknown-interix"$UNAME_RELEASE"
877 exit ;;
878 esac ;;
879 i*:UWIN*:*)
880 echo "$UNAME_MACHINE"-pc-uwin
881 exit ;;
882 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
883 echo x86_64-unknown-cygwin
884 exit ;;
885 prep*:SunOS:5.*:*)
886 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
887 exit ;;
888 *:GNU:*:*)
889 # the GNU system
890 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
891 exit ;;
892 *:GNU/*:*:*)
893 # other systems with GNU libc and userland
894 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
895 exit ;;
896 i*86:Minix:*:*)
897 echo "$UNAME_MACHINE"-pc-minix
898 exit ;;
899 aarch64:Linux:*:*)
900 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
901 exit ;;
902 aarch64_be:Linux:*:*)
903 UNAME_MACHINE=aarch64_be
904 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
905 exit ;;
906 alpha:Linux:*:*)
907 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
908 EV5) UNAME_MACHINE=alphaev5 ;;
909 EV56) UNAME_MACHINE=alphaev56 ;;
910 PCA56) UNAME_MACHINE=alphapca56 ;;
911 PCA57) UNAME_MACHINE=alphapca56 ;;
912 EV6) UNAME_MACHINE=alphaev6 ;;
913 EV67) UNAME_MACHINE=alphaev67 ;;
914 EV68*) UNAME_MACHINE=alphaev68 ;;
915 esac
916 objdump --private-headers /bin/sh | grep -q ld.so.1
917 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
918 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
919 exit ;;
920 arc:Linux:*:* | arceb:Linux:*:*)
921 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
922 exit ;;
923 arm*:Linux:*:*)
924 eval "$set_cc_for_build"
925 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
926 | grep -q __ARM_EABI__
927 then
928 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
929 else
930 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
931 | grep -q __ARM_PCS_VFP
932 then
933 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
934 else
935 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
936 fi
937 fi
938 exit ;;
939 avr32*:Linux:*:*)
940 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
941 exit ;;
942 cris:Linux:*:*)
943 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
944 exit ;;
945 crisv32:Linux:*:*)
946 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
947 exit ;;
948 e2k:Linux:*:*)
949 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
950 exit ;;
951 frv:Linux:*:*)
952 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
953 exit ;;
954 hexagon:Linux:*:*)
955 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
956 exit ;;
957 i*86:Linux:*:*)
958 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
959 exit ;;
960 ia64:Linux:*:*)
961 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
962 exit ;;
963 k1om:Linux:*:*)
964 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
965 exit ;;
966 m32r*:Linux:*:*)
967 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
968 exit ;;
969 m68*:Linux:*:*)
970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
971 exit ;;
972 mips:Linux:*:* | mips64:Linux:*:*)
973 eval "$set_cc_for_build"
974 sed 's/^ //' << EOF > "$dummy.c"
975 #undef CPU
976 #undef ${UNAME_MACHINE}
977 #undef ${UNAME_MACHINE}el
978 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
979 CPU=${UNAME_MACHINE}el
980 #else
981 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
982 CPU=${UNAME_MACHINE}
983 #else
984 CPU=
985 #endif
986 #endif
987 EOF
988 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
989 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
990 ;;
991 mips64el:Linux:*:*)
992 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
993 exit ;;
994 openrisc*:Linux:*:*)
995 echo or1k-unknown-linux-"$LIBC"
996 exit ;;
997 or32:Linux:*:* | or1k*:Linux:*:*)
998 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
999 exit ;;
1000 padre:Linux:*:*)
1001 echo sparc-unknown-linux-"$LIBC"
1002 exit ;;
1003 parisc64:Linux:*:* | hppa64:Linux:*:*)
1004 echo hppa64-unknown-linux-"$LIBC"
1005 exit ;;
1006 parisc:Linux:*:* | hppa:Linux:*:*)
1007 # Look for CPU level
1008 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1009 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1010 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1011 *) echo hppa-unknown-linux-"$LIBC" ;;
1012 esac
1013 exit ;;
1014 ppc64:Linux:*:*)
1015 echo powerpc64-unknown-linux-"$LIBC"
1016 exit ;;
1017 ppc:Linux:*:*)
1018 echo powerpc-unknown-linux-"$LIBC"
1019 exit ;;
1020 ppc64le:Linux:*:*)
1021 echo powerpc64le-unknown-linux-"$LIBC"
1022 exit ;;
1023 ppcle:Linux:*:*)
1024 echo powerpcle-unknown-linux-"$LIBC"
1025 exit ;;
1026 riscv32:Linux:*:* | riscv64:Linux:*:*)
1027 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1028 exit ;;
1029 s390:Linux:*:* | s390x:Linux:*:*)
1030 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
1031 exit ;;
1032 sh64*:Linux:*:*)
1033 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1034 exit ;;
1035 sh*:Linux:*:*)
1036 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1037 exit ;;
1038 sparc:Linux:*:* | sparc64:Linux:*:*)
1039 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1040 exit ;;
1041 tile*:Linux:*:*)
1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1043 exit ;;
1044 vax:Linux:*:*)
1045 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
1046 exit ;;
1047 x86_64:Linux:*:*)
1048 if objdump -f /bin/sh | grep -q elf32-x86-64; then
1049 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
1050 else
1051 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1052 fi
1053 exit ;;
1054 xtensa*:Linux:*:*)
1055 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1056 exit ;;
1057 i*86:DYNIX/ptx:4*:*)
1058 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1059 # earlier versions are messed up and put the nodename in both
1060 # sysname and nodename.
1061 echo i386-sequent-sysv4
1062 exit ;;
1063 i*86:UNIX_SV:4.2MP:2.*)
1064 # Unixware is an offshoot of SVR4, but it has its own version
1065 # number series starting with 2...
1066 # I am not positive that other SVR4 systems won't match this,
1067 # I just have to hope. -- rms.
1068 # Use sysv4.2uw... so that sysv4* matches it.
1069 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
1070 exit ;;
1071 i*86:OS/2:*:*)
1072 # If we were able to find `uname', then EMX Unix compatibility
1073 # is probably installed.
1074 echo "$UNAME_MACHINE"-pc-os2-emx
1075 exit ;;
1076 i*86:XTS-300:*:STOP)
1077 echo "$UNAME_MACHINE"-unknown-stop
1078 exit ;;
1079 i*86:atheos:*:*)
1080 echo "$UNAME_MACHINE"-unknown-atheos
1081 exit ;;
1082 i*86:syllable:*:*)
1083 echo "$UNAME_MACHINE"-pc-syllable
1084 exit ;;
1085 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1086 echo i386-unknown-lynxos"$UNAME_RELEASE"
1087 exit ;;
1088 i*86:*DOS:*:*)
1089 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1090 exit ;;
1091 i*86:*:4.*:*)
1092 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
1093 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1094 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
1095 else
1096 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1097 fi
1098 exit ;;
1099 i*86:*:5:[678]*)
1100 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1101 case `/bin/uname -X | grep "^Machine"` in
1102 *486*) UNAME_MACHINE=i486 ;;
1103 *Pentium) UNAME_MACHINE=i586 ;;
1104 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1105 esac
1106 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1107 exit ;;
1108 i*86:*:3.2:*)
1109 if test -f /usr/options/cb.name; then
1110 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1111 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
1112 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1113 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1114 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1115 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1116 && UNAME_MACHINE=i586
1117 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1118 && UNAME_MACHINE=i686
1119 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1120 && UNAME_MACHINE=i686
1121 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
1122 else
1123 echo "$UNAME_MACHINE"-pc-sysv32
1124 fi
1125 exit ;;
1126 pc:*:*:*)
1127 # Left here for compatibility:
1128 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1129 # the processor, so we play safe by assuming i586.
1130 # Note: whatever this is, it MUST be the same as what config.sub
1131 # prints for the "djgpp" host, or else GDB configure will decide that
1132 # this is a cross-build.
1133 echo i586-pc-msdosdjgpp
1134 exit ;;
1135 Intel:Mach:3*:*)
1136 echo i386-pc-mach3
1137 exit ;;
1138 paragon:*:*:*)
1139 echo i860-intel-osf1
1140 exit ;;
1141 i860:*:4.*:*) # i860-SVR4
1142 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1143 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
1144 else # Add other i860-SVR4 vendors below as they are discovered.
1145 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
1146 fi
1147 exit ;;
1148 mini*:CTIX:SYS*5:*)
1149 # "miniframe"
1150 echo m68010-convergent-sysv
1151 exit ;;
1152 mc68k:UNIX:SYSTEM5:3.51m)
1153 echo m68k-convergent-sysv
1154 exit ;;
1155 M680?0:D-NIX:5.3:*)
1156 echo m68k-diab-dnix
1157 exit ;;
1158 M68*:*:R3V[5678]*:*)
1159 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1160 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)
1161 OS_REL=''
1162 test -r /etc/.relid \
1163 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1164 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1165 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1166 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1167 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1168 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1169 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1170 && { echo i486-ncr-sysv4; exit; } ;;
1171 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1172 OS_REL='.3'
1173 test -r /etc/.relid \
1174 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1175 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1176 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1177 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1178 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
1179 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1180 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1181 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1182 echo m68k-unknown-lynxos"$UNAME_RELEASE"
1183 exit ;;
1184 mc68030:UNIX_System_V:4.*:*)
1185 echo m68k-atari-sysv4
1186 exit ;;
1187 TSUNAMI:LynxOS:2.*:*)
1188 echo sparc-unknown-lynxos"$UNAME_RELEASE"
1189 exit ;;
1190 rs6000:LynxOS:2.*:*)
1191 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
1192 exit ;;
1193 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1194 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
1195 exit ;;
1196 SM[BE]S:UNIX_SV:*:*)
1197 echo mips-dde-sysv"$UNAME_RELEASE"
1198 exit ;;
1199 RM*:ReliantUNIX-*:*:*)
1200 echo mips-sni-sysv4
1201 exit ;;
1202 RM*:SINIX-*:*:*)
1203 echo mips-sni-sysv4
1204 exit ;;
1205 *:SINIX-*:*:*)
1206 if uname -p 2>/dev/null >/dev/null ; then
1207 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1208 echo "$UNAME_MACHINE"-sni-sysv4
1209 else
1210 echo ns32k-sni-sysv
1211 fi
1212 exit ;;
1213 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1214 # says <Richard.M.Bartel@ccMail.Census.GOV>
1215 echo i586-unisys-sysv4
1216 exit ;;
1217 *:UNIX_System_V:4*:FTX*)
1218 # From Gerald Hewes <hewes@openmarket.com>.
1219 # How about differentiating between stratus architectures? -djm
1220 echo hppa1.1-stratus-sysv4
1221 exit ;;
1222 *:*:*:FTX*)
1223 # From seanf@swdc.stratus.com.
1224 echo i860-stratus-sysv4
1225 exit ;;
1226 i*86:VOS:*:*)
1227 # From Paul.Green@stratus.com.
1228 echo "$UNAME_MACHINE"-stratus-vos
1229 exit ;;
1230 *:VOS:*:*)
1231 # From Paul.Green@stratus.com.
1232 echo hppa1.1-stratus-vos
1233 exit ;;
1234 mc68*:A/UX:*:*)
1235 echo m68k-apple-aux"$UNAME_RELEASE"
1236 exit ;;
1237 news*:NEWS-OS:6*:*)
1238 echo mips-sony-newsos6
1239 exit ;;
1240 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1241 if [ -d /usr/nec ]; then
1242 echo mips-nec-sysv"$UNAME_RELEASE"
1243 else
1244 echo mips-unknown-sysv"$UNAME_RELEASE"
1245 fi
1246 exit ;;
1247 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1248 echo powerpc-be-beos
1249 exit ;;
1250 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1251 echo powerpc-apple-beos
1252 exit ;;
1253 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1254 echo i586-pc-beos
1255 exit ;;
1256 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1257 echo i586-pc-haiku
1258 exit ;;
1259 x86_64:Haiku:*:*)
1260 echo x86_64-unknown-haiku
1261 exit ;;
1262 SX-4:SUPER-UX:*:*)
1263 echo sx4-nec-superux"$UNAME_RELEASE"
1264 exit ;;
1265 SX-5:SUPER-UX:*:*)
1266 echo sx5-nec-superux"$UNAME_RELEASE"
1267 exit ;;
1268 SX-6:SUPER-UX:*:*)
1269 echo sx6-nec-superux"$UNAME_RELEASE"
1270 exit ;;
1271 SX-7:SUPER-UX:*:*)
1272 echo sx7-nec-superux"$UNAME_RELEASE"
1273 exit ;;
1274 SX-8:SUPER-UX:*:*)
1275 echo sx8-nec-superux"$UNAME_RELEASE"
1276 exit ;;
1277 SX-8R:SUPER-UX:*:*)
1278 echo sx8r-nec-superux"$UNAME_RELEASE"
1279 exit ;;
1280 SX-ACE:SUPER-UX:*:*)
1281 echo sxace-nec-superux"$UNAME_RELEASE"
1282 exit ;;
1283 Power*:Rhapsody:*:*)
1284 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
1285 exit ;;
1286 *:Rhapsody:*:*)
1287 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1288 exit ;;
1289 *:Darwin:*:*)
1290 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1291 eval "$set_cc_for_build"
1292 if test "$UNAME_PROCESSOR" = unknown ; then
1293 UNAME_PROCESSOR=powerpc
1294 fi
1295 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1296 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1297 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1298 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1299 grep IS_64BIT_ARCH >/dev/null
1300 then
1301 case $UNAME_PROCESSOR in
1302 i386) UNAME_PROCESSOR=x86_64 ;;
1303 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1304 esac
1305 fi
1306 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1307 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1308 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1309 grep IS_PPC >/dev/null
1310 then
1311 UNAME_PROCESSOR=powerpc
1312 fi
1313 fi
1314 elif test "$UNAME_PROCESSOR" = i386 ; then
1315 # Avoid executing cc on OS X 10.9, as it ships with a stub
1316 # that puts up a graphical alert prompting to install
1317 # developer tools. Any system running Mac OS X 10.7 or
1318 # later (Darwin 11 and later) is required to have a 64-bit
1319 # processor. This is not true of the ARM version of Darwin
1320 # that Apple uses in portable devices.
1321 UNAME_PROCESSOR=x86_64
1322 fi
1323 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1324 exit ;;
1325 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1326 UNAME_PROCESSOR=`uname -p`
1327 if test "$UNAME_PROCESSOR" = x86; then
1328 UNAME_PROCESSOR=i386
1329 UNAME_MACHINE=pc
1330 fi
1331 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
1332 exit ;;
1333 *:QNX:*:4*)
1334 echo i386-pc-qnx
1335 exit ;;
1336 NEO-*:NONSTOP_KERNEL:*:*)
1337 echo neo-tandem-nsk"$UNAME_RELEASE"
1338 exit ;;
1339 NSE-*:NONSTOP_KERNEL:*:*)
1340 echo nse-tandem-nsk"$UNAME_RELEASE"
1341 exit ;;
1342 NSR-*:NONSTOP_KERNEL:*:*)
1343 echo nsr-tandem-nsk"$UNAME_RELEASE"
1344 exit ;;
1345 NSV-*:NONSTOP_KERNEL:*:*)
1346 echo nsv-tandem-nsk"$UNAME_RELEASE"
1347 exit ;;
1348 NSX-*:NONSTOP_KERNEL:*:*)
1349 echo nsx-tandem-nsk"$UNAME_RELEASE"
1350 exit ;;
1351 *:NonStop-UX:*:*)
1352 echo mips-compaq-nonstopux
1353 exit ;;
1354 BS2000:POSIX*:*:*)
1355 echo bs2000-siemens-sysv
1356 exit ;;
1357 DS/*:UNIX_System_V:*:*)
1358 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
1359 exit ;;
1360 *:Plan9:*:*)
1361 # "uname -m" is not consistent, so use $cputype instead. 386
1362 # is converted to i386 for consistency with other x86
1363 # operating systems.
1364 if test "$cputype" = 386; then
1365 UNAME_MACHINE=i386
1366 else
1367 UNAME_MACHINE="$cputype"
1368 fi
1369 echo "$UNAME_MACHINE"-unknown-plan9
1370 exit ;;
1371 *:TOPS-10:*:*)
1372 echo pdp10-unknown-tops10
1373 exit ;;
1374 *:TENEX:*:*)
1375 echo pdp10-unknown-tenex
1376 exit ;;
1377 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1378 echo pdp10-dec-tops20
1379 exit ;;
1380 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1381 echo pdp10-xkl-tops20
1382 exit ;;
1383 *:TOPS-20:*:*)
1384 echo pdp10-unknown-tops20
1385 exit ;;
1386 *:ITS:*:*)
1387 echo pdp10-unknown-its
1388 exit ;;
1389 SEI:*:*:SEIUX)
1390 echo mips-sei-seiux"$UNAME_RELEASE"
1391 exit ;;
1392 *:DragonFly:*:*)
1393 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
1394 exit ;;
1395 *:*VMS:*:*)
1396 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1397 case "$UNAME_MACHINE" in
1398 A*) echo alpha-dec-vms ; exit ;;
1399 I*) echo ia64-dec-vms ; exit ;;
1400 V*) echo vax-dec-vms ; exit ;;
1401 esac ;;
1402 *:XENIX:*:SysV)
1403 echo i386-pc-xenix
1404 exit ;;
1405 i*86:skyos:*:*)
1406 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
1407 exit ;;
1408 i*86:rdos:*:*)
1409 echo "$UNAME_MACHINE"-pc-rdos
1410 exit ;;
1411 i*86:AROS:*:*)
1412 echo "$UNAME_MACHINE"-pc-aros
1413 exit ;;
1414 x86_64:VMkernel:*:*)
1415 echo "$UNAME_MACHINE"-unknown-esx
1416 exit ;;
1417 amd64:Isilon\ OneFS:*:*)
1418 echo x86_64-unknown-onefs
1419 exit ;;
1420 esac
1421
1422 echo "$0: unable to guess system type" >&2
1423
1424 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1425 mips:Linux | mips64:Linux)
1426 # If we got here on MIPS GNU/Linux, output extra information.
1427 cat >&2 <<EOF
1428
1429 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1430 the system type. Please install a C compiler and try again.
1431 EOF
1432 ;;
1433 esac
1434
1435 cat >&2 <<EOF
1436
1437 This script (version $timestamp), has failed to recognize the
1438 operating system you are using. If your script is old, overwrite *all*
1439 copies of config.guess and config.sub with the latest versions from:
1440
1441 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1442 and
1443 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1444
1445 If $0 has already been updated, send the following data and any
1446 information you think might be pertinent to config-patches@gnu.org to
1447 provide the necessary information to handle your system.
1448
1449 config.guess timestamp = $timestamp
1450
1451 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1452 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1453 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1454 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1455
1456 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1457 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1458
1459 hostinfo = `(hostinfo) 2>/dev/null`
1460 /bin/universe = `(/bin/universe) 2>/dev/null`
1461 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1462 /bin/arch = `(/bin/arch) 2>/dev/null`
1463 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1464 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1465
1466 UNAME_MACHINE = "$UNAME_MACHINE"
1467 UNAME_RELEASE = "$UNAME_RELEASE"
1468 UNAME_SYSTEM = "$UNAME_SYSTEM"
1469 UNAME_VERSION = "$UNAME_VERSION"
1470 EOF
1471
1472 exit 1
1473
1474 # Local variables:
1475 # eval: (add-hook 'write-file-functions 'time-stamp)
1476 # time-stamp-start: "timestamp='"
1477 # time-stamp-format: "%:y-%02m-%02d"
1478 # time-stamp-end: "'"
1479 # End:
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-22'
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"
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 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
113 # Here we must recognize all the valid KERNEL-OS combinations.
114 maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
115 case $maybe_os in
116 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
117 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
118 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
119 kopensolaris*-gnu* | cloudabi*-eabi* | \
120 storm-chaos* | os2-emx* | rtmk-nova*)
121 os=-$maybe_os
122 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
123 ;;
124 android-linux)
125 os=-linux-android
126 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
127 ;;
128 *)
129 basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
130 if [ "$basic_machine" != "$1" ]
131 then os=`echo "$1" | sed 's/.*-/-/'`
132 else os=; fi
133 ;;
134 esac
135
136 ### Let's recognize common machines as not being operating systems so
137 ### that things like config.sub decstation-3100 work. We also
138 ### recognize some manufacturers as not being operating systems, so we
139 ### can provide default operating systems below.
140 case $os in
141 -sun*os*)
142 # Prevent following clause from handling this invalid input.
143 ;;
144 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
145 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
146 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
147 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
148 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
149 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
150 -apple | -axis | -knuth | -cray | -microblaze*)
151 os=
152 basic_machine=$1
153 ;;
154 -bluegene*)
155 os=-cnk
156 ;;
157 -sim | -cisco | -oki | -wec | -winbond)
158 os=
159 basic_machine=$1
160 ;;
161 -scout)
162 ;;
163 -wrs)
164 os=-vxworks
165 basic_machine=$1
166 ;;
167 -chorusos*)
168 os=-chorusos
169 basic_machine=$1
170 ;;
171 -chorusrdb)
172 os=-chorusrdb
173 basic_machine=$1
174 ;;
175 -hiux*)
176 os=-hiuxwe2
177 ;;
178 -sco6)
179 os=-sco5v6
180 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
181 ;;
182 -sco5)
183 os=-sco3.2v5
184 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
185 ;;
186 -sco4)
187 os=-sco3.2v4
188 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
189 ;;
190 -sco3.2.[4-9]*)
191 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
192 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
193 ;;
194 -sco3.2v[4-9]*)
195 # Don't forget version if it is 3.2v4 or newer.
196 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
197 ;;
198 -sco5v6*)
199 # Don't forget version if it is 3.2v4 or newer.
200 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
201 ;;
202 -sco*)
203 os=-sco3.2v2
204 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
205 ;;
206 -udk*)
207 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
208 ;;
209 -isc)
210 os=-isc2.2
211 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
212 ;;
213 -clix*)
214 basic_machine=clipper-intergraph
215 ;;
216 -isc*)
217 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
218 ;;
219 -lynx*178)
220 os=-lynxos178
221 ;;
222 -lynx*5)
223 os=-lynxos5
224 ;;
225 -lynx*)
226 os=-lynxos
227 ;;
228 -ptx*)
229 basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -psos*)
232 os=-psos
233 ;;
234 -mint | -mint[0-9]*)
235 basic_machine=m68k-atari
236 os=-mint
237 ;;
238 esac
239
240 # Decode aliases for certain CPU-COMPANY combinations.
241 case $basic_machine in
242 # Recognize the basic CPU types without company name.
243 # Some are omitted here because they have special meanings below.
244 1750a | 580 \
245 | a29k \
246 | aarch64 | aarch64_be \
247 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
248 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
249 | am33_2.0 \
250 | arc | arceb \
251 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
252 | avr | avr32 \
253 | ba \
254 | be32 | be64 \
255 | bfin \
256 | c4x | c8051 | clipper \
257 | d10v | d30v | dlx | dsp16xx \
258 | e2k | epiphany \
259 | fido | fr30 | frv | ft32 \
260 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
261 | hexagon \
262 | i370 | i860 | i960 | ia16 | ia64 \
263 | ip2k | iq2000 \
264 | k1om \
265 | le32 | le64 \
266 | lm32 \
267 | m32c | m32r | m32rle | m68000 | m68k | m88k \
268 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
269 | mips | mipsbe | mipseb | mipsel | mipsle \
270 | mips16 \
271 | mips64 | mips64el \
272 | mips64octeon | mips64octeonel \
273 | mips64orion | mips64orionel \
274 | mips64r5900 | mips64r5900el \
275 | mips64vr | mips64vrel \
276 | mips64vr4100 | mips64vr4100el \
277 | mips64vr4300 | mips64vr4300el \
278 | mips64vr5000 | mips64vr5000el \
279 | mips64vr5900 | mips64vr5900el \
280 | mipsisa32 | mipsisa32el \
281 | mipsisa32r2 | mipsisa32r2el \
282 | mipsisa32r6 | mipsisa32r6el \
283 | mipsisa64 | mipsisa64el \
284 | mipsisa64r2 | mipsisa64r2el \
285 | mipsisa64r6 | mipsisa64r6el \
286 | mipsisa64sb1 | mipsisa64sb1el \
287 | mipsisa64sr71k | mipsisa64sr71kel \
288 | mipsr5900 | mipsr5900el \
289 | mipstx39 | mipstx39el \
290 | mn10200 | mn10300 \
291 | moxie \
292 | mt \
293 | msp430 \
294 | nds32 | nds32le | nds32be \
295 | nios | nios2 | nios2eb | nios2el \
296 | ns16k | ns32k \
297 | open8 | or1k | or1knd | or32 \
298 | pdp10 | pj | pjl \
299 | powerpc | powerpc64 | powerpc64le | powerpcle \
300 | pru \
301 | pyramid \
302 | riscv32 | riscv64 \
303 | rl78 | rx \
304 | score \
305 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
306 | sh64 | sh64le \
307 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
308 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
309 | spu \
310 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
311 | ubicom32 \
312 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
313 | visium \
314 | wasm32 \
315 | x86 | xc16x | xstormy16 | xtensa \
316 | z8k | z80)
317 basic_machine=$basic_machine-unknown
318 ;;
319 c54x)
320 basic_machine=tic54x-unknown
321 ;;
322 c55x)
323 basic_machine=tic55x-unknown
324 ;;
325 c6x)
326 basic_machine=tic6x-unknown
327 ;;
328 leon|leon[3-9])
329 basic_machine=sparc-$basic_machine
330 ;;
331 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
332 basic_machine=$basic_machine-unknown
333 os=-none
334 ;;
335 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
336 ;;
337 ms1)
338 basic_machine=mt-unknown
339 ;;
340
341 strongarm | thumb | xscale)
342 basic_machine=arm-unknown
343 ;;
344 xgate)
345 basic_machine=$basic_machine-unknown
346 os=-none
347 ;;
348 xscaleeb)
349 basic_machine=armeb-unknown
350 ;;
351
352 xscaleel)
353 basic_machine=armel-unknown
354 ;;
355
356 # We use `pc' rather than `unknown'
357 # because (1) that's what they normally are, and
358 # (2) the word "unknown" tends to confuse beginning users.
359 i*86 | x86_64)
360 basic_machine=$basic_machine-pc
361 ;;
362 # Object if more than one company name word.
363 *-*-*)
364 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
365 exit 1
366 ;;
367 # Recognize the basic CPU types with company name.
368 580-* \
369 | a29k-* \
370 | aarch64-* | aarch64_be-* \
371 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
372 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
373 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
374 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
375 | avr-* | avr32-* \
376 | ba-* \
377 | be32-* | be64-* \
378 | bfin-* | bs2000-* \
379 | c[123]* | c30-* | [cjt]90-* | c4x-* \
380 | c8051-* | clipper-* | craynv-* | cydra-* \
381 | d10v-* | d30v-* | dlx-* \
382 | e2k-* | elxsi-* \
383 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
384 | h8300-* | h8500-* \
385 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
386 | hexagon-* \
387 | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
388 | ip2k-* | iq2000-* \
389 | k1om-* \
390 | le32-* | le64-* \
391 | lm32-* \
392 | m32c-* | m32r-* | m32rle-* \
393 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
394 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
395 | microblaze-* | microblazeel-* \
396 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
397 | mips16-* \
398 | mips64-* | mips64el-* \
399 | mips64octeon-* | mips64octeonel-* \
400 | mips64orion-* | mips64orionel-* \
401 | mips64r5900-* | mips64r5900el-* \
402 | mips64vr-* | mips64vrel-* \
403 | mips64vr4100-* | mips64vr4100el-* \
404 | mips64vr4300-* | mips64vr4300el-* \
405 | mips64vr5000-* | mips64vr5000el-* \
406 | mips64vr5900-* | mips64vr5900el-* \
407 | mipsisa32-* | mipsisa32el-* \
408 | mipsisa32r2-* | mipsisa32r2el-* \
409 | mipsisa32r6-* | mipsisa32r6el-* \
410 | mipsisa64-* | mipsisa64el-* \
411 | mipsisa64r2-* | mipsisa64r2el-* \
412 | mipsisa64r6-* | mipsisa64r6el-* \
413 | mipsisa64sb1-* | mipsisa64sb1el-* \
414 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
415 | mipsr5900-* | mipsr5900el-* \
416 | mipstx39-* | mipstx39el-* \
417 | mmix-* \
418 | mt-* \
419 | msp430-* \
420 | nds32-* | nds32le-* | nds32be-* \
421 | nios-* | nios2-* | nios2eb-* | nios2el-* \
422 | none-* | np1-* | ns16k-* | ns32k-* \
423 | open8-* \
424 | or1k*-* \
425 | orion-* \
426 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
427 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
428 | pru-* \
429 | pyramid-* \
430 | riscv32-* | riscv64-* \
431 | rl78-* | romp-* | rs6000-* | rx-* \
432 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
433 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
434 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
435 | sparclite-* \
436 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
437 | tahoe-* \
438 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
439 | tile*-* \
440 | tron-* \
441 | ubicom32-* \
442 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
443 | vax-* \
444 | visium-* \
445 | wasm32-* \
446 | we32k-* \
447 | x86-* | x86_64-* | xc16x-* | xps100-* \
448 | xstormy16-* | xtensa*-* \
449 | ymp-* \
450 | z8k-* | z80-*)
451 ;;
452 # Recognize the basic CPU types without company name, with glob match.
453 xtensa*)
454 basic_machine=$basic_machine-unknown
455 ;;
456 # Recognize the various machine names and aliases which stand
457 # for a CPU type and a company and sometimes even an OS.
458 386bsd)
459 basic_machine=i386-pc
460 os=-bsd
461 ;;
462 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
463 basic_machine=m68000-att
464 ;;
465 3b*)
466 basic_machine=we32k-att
467 ;;
468 a29khif)
469 basic_machine=a29k-amd
470 os=-udi
471 ;;
472 abacus)
473 basic_machine=abacus-unknown
474 ;;
475 adobe68k)
476 basic_machine=m68010-adobe
477 os=-scout
478 ;;
479 alliant | fx80)
480 basic_machine=fx80-alliant
481 ;;
482 altos | altos3068)
483 basic_machine=m68k-altos
484 ;;
485 am29k)
486 basic_machine=a29k-none
487 os=-bsd
488 ;;
489 amd64)
490 basic_machine=x86_64-pc
491 ;;
492 amd64-*)
493 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
494 ;;
495 amdahl)
496 basic_machine=580-amdahl
497 os=-sysv
498 ;;
499 amiga | amiga-*)
500 basic_machine=m68k-unknown
501 ;;
502 amigaos | amigados)
503 basic_machine=m68k-unknown
504 os=-amigaos
505 ;;
506 amigaunix | amix)
507 basic_machine=m68k-unknown
508 os=-sysv4
509 ;;
510 apollo68)
511 basic_machine=m68k-apollo
512 os=-sysv
513 ;;
514 apollo68bsd)
515 basic_machine=m68k-apollo
516 os=-bsd
517 ;;
518 aros)
519 basic_machine=i386-pc
520 os=-aros
521 ;;
522 asmjs)
523 basic_machine=asmjs-unknown
524 ;;
525 aux)
526 basic_machine=m68k-apple
527 os=-aux
528 ;;
529 balance)
530 basic_machine=ns32k-sequent
531 os=-dynix
532 ;;
533 blackfin)
534 basic_machine=bfin-unknown
535 os=-linux
536 ;;
537 blackfin-*)
538 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
539 os=-linux
540 ;;
541 bluegene*)
542 basic_machine=powerpc-ibm
543 os=-cnk
544 ;;
545 c54x-*)
546 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
547 ;;
548 c55x-*)
549 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
550 ;;
551 c6x-*)
552 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
553 ;;
554 c90)
555 basic_machine=c90-cray
556 os=-unicos
557 ;;
558 cegcc)
559 basic_machine=arm-unknown
560 os=-cegcc
561 ;;
562 convex-c1)
563 basic_machine=c1-convex
564 os=-bsd
565 ;;
566 convex-c2)
567 basic_machine=c2-convex
568 os=-bsd
569 ;;
570 convex-c32)
571 basic_machine=c32-convex
572 os=-bsd
573 ;;
574 convex-c34)
575 basic_machine=c34-convex
576 os=-bsd
577 ;;
578 convex-c38)
579 basic_machine=c38-convex
580 os=-bsd
581 ;;
582 cray | j90)
583 basic_machine=j90-cray
584 os=-unicos
585 ;;
586 craynv)
587 basic_machine=craynv-cray
588 os=-unicosmp
589 ;;
590 cr16 | cr16-*)
591 basic_machine=cr16-unknown
592 os=-elf
593 ;;
594 crds | unos)
595 basic_machine=m68k-crds
596 ;;
597 crisv32 | crisv32-* | etraxfs*)
598 basic_machine=crisv32-axis
599 ;;
600 cris | cris-* | etrax*)
601 basic_machine=cris-axis
602 ;;
603 crx)
604 basic_machine=crx-unknown
605 os=-elf
606 ;;
607 da30 | da30-*)
608 basic_machine=m68k-da30
609 ;;
610 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
611 basic_machine=mips-dec
612 ;;
613 decsystem10* | dec10*)
614 basic_machine=pdp10-dec
615 os=-tops10
616 ;;
617 decsystem20* | dec20*)
618 basic_machine=pdp10-dec
619 os=-tops20
620 ;;
621 delta | 3300 | motorola-3300 | motorola-delta \
622 | 3300-motorola | delta-motorola)
623 basic_machine=m68k-motorola
624 ;;
625 delta88)
626 basic_machine=m88k-motorola
627 os=-sysv3
628 ;;
629 dicos)
630 basic_machine=i686-pc
631 os=-dicos
632 ;;
633 djgpp)
634 basic_machine=i586-pc
635 os=-msdosdjgpp
636 ;;
637 dpx20 | dpx20-*)
638 basic_machine=rs6000-bull
639 os=-bosx
640 ;;
641 dpx2*)
642 basic_machine=m68k-bull
643 os=-sysv3
644 ;;
645 e500v[12])
646 basic_machine=powerpc-unknown
647 os=$os"spe"
648 ;;
649 e500v[12]-*)
650 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
651 os=$os"spe"
652 ;;
653 ebmon29k)
654 basic_machine=a29k-amd
655 os=-ebmon
656 ;;
657 elxsi)
658 basic_machine=elxsi-elxsi
659 os=-bsd
660 ;;
661 encore | umax | mmax)
662 basic_machine=ns32k-encore
663 ;;
664 es1800 | OSE68k | ose68k | ose | OSE)
665 basic_machine=m68k-ericsson
666 os=-ose
667 ;;
668 fx2800)
669 basic_machine=i860-alliant
670 ;;
671 genix)
672 basic_machine=ns32k-ns
673 ;;
674 gmicro)
675 basic_machine=tron-gmicro
676 os=-sysv
677 ;;
678 go32)
679 basic_machine=i386-pc
680 os=-go32
681 ;;
682 h3050r* | hiux*)
683 basic_machine=hppa1.1-hitachi
684 os=-hiuxwe2
685 ;;
686 h8300hms)
687 basic_machine=h8300-hitachi
688 os=-hms
689 ;;
690 h8300xray)
691 basic_machine=h8300-hitachi
692 os=-xray
693 ;;
694 h8500hms)
695 basic_machine=h8500-hitachi
696 os=-hms
697 ;;
698 harris)
699 basic_machine=m88k-harris
700 os=-sysv3
701 ;;
702 hp300-*)
703 basic_machine=m68k-hp
704 ;;
705 hp300bsd)
706 basic_machine=m68k-hp
707 os=-bsd
708 ;;
709 hp300hpux)
710 basic_machine=m68k-hp
711 os=-hpux
712 ;;
713 hp3k9[0-9][0-9] | hp9[0-9][0-9])
714 basic_machine=hppa1.0-hp
715 ;;
716 hp9k2[0-9][0-9] | hp9k31[0-9])
717 basic_machine=m68000-hp
718 ;;
719 hp9k3[2-9][0-9])
720 basic_machine=m68k-hp
721 ;;
722 hp9k6[0-9][0-9] | hp6[0-9][0-9])
723 basic_machine=hppa1.0-hp
724 ;;
725 hp9k7[0-79][0-9] | hp7[0-79][0-9])
726 basic_machine=hppa1.1-hp
727 ;;
728 hp9k78[0-9] | hp78[0-9])
729 # FIXME: really hppa2.0-hp
730 basic_machine=hppa1.1-hp
731 ;;
732 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
733 # FIXME: really hppa2.0-hp
734 basic_machine=hppa1.1-hp
735 ;;
736 hp9k8[0-9][13679] | hp8[0-9][13679])
737 basic_machine=hppa1.1-hp
738 ;;
739 hp9k8[0-9][0-9] | hp8[0-9][0-9])
740 basic_machine=hppa1.0-hp
741 ;;
742 hppaosf)
743 basic_machine=hppa1.1-hp
744 os=-osf
745 ;;
746 hppro)
747 basic_machine=hppa1.1-hp
748 os=-proelf
749 ;;
750 i370-ibm* | ibm*)
751 basic_machine=i370-ibm
752 ;;
753 i*86v32)
754 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
755 os=-sysv32
756 ;;
757 i*86v4*)
758 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
759 os=-sysv4
760 ;;
761 i*86v)
762 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
763 os=-sysv
764 ;;
765 i*86sol2)
766 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
767 os=-solaris2
768 ;;
769 i386mach)
770 basic_machine=i386-mach
771 os=-mach
772 ;;
773 vsta)
774 basic_machine=i386-unknown
775 os=-vsta
776 ;;
777 iris | iris4d)
778 basic_machine=mips-sgi
779 case $os in
780 -irix*)
781 ;;
782 *)
783 os=-irix4
784 ;;
785 esac
786 ;;
787 isi68 | isi)
788 basic_machine=m68k-isi
789 os=-sysv
790 ;;
791 leon-*|leon[3-9]-*)
792 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
793 ;;
794 m68knommu)
795 basic_machine=m68k-unknown
796 os=-linux
797 ;;
798 m68knommu-*)
799 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
800 os=-linux
801 ;;
802 magnum | m3230)
803 basic_machine=mips-mips
804 os=-sysv
805 ;;
806 merlin)
807 basic_machine=ns32k-utek
808 os=-sysv
809 ;;
810 microblaze*)
811 basic_machine=microblaze-xilinx
812 ;;
813 mingw64)
814 basic_machine=x86_64-pc
815 os=-mingw64
816 ;;
817 mingw32)
818 basic_machine=i686-pc
819 os=-mingw32
820 ;;
821 mingw32ce)
822 basic_machine=arm-unknown
823 os=-mingw32ce
824 ;;
825 miniframe)
826 basic_machine=m68000-convergent
827 ;;
828 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
829 basic_machine=m68k-atari
830 os=-mint
831 ;;
832 mips3*-*)
833 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
834 ;;
835 mips3*)
836 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
837 ;;
838 monitor)
839 basic_machine=m68k-rom68k
840 os=-coff
841 ;;
842 morphos)
843 basic_machine=powerpc-unknown
844 os=-morphos
845 ;;
846 moxiebox)
847 basic_machine=moxie-unknown
848 os=-moxiebox
849 ;;
850 msdos)
851 basic_machine=i386-pc
852 os=-msdos
853 ;;
854 ms1-*)
855 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
856 ;;
857 msys)
858 basic_machine=i686-pc
859 os=-msys
860 ;;
861 mvs)
862 basic_machine=i370-ibm
863 os=-mvs
864 ;;
865 nacl)
866 basic_machine=le32-unknown
867 os=-nacl
868 ;;
869 ncr3000)
870 basic_machine=i486-ncr
871 os=-sysv4
872 ;;
873 netbsd386)
874 basic_machine=i386-unknown
875 os=-netbsd
876 ;;
877 netwinder)
878 basic_machine=armv4l-rebel
879 os=-linux
880 ;;
881 news | news700 | news800 | news900)
882 basic_machine=m68k-sony
883 os=-newsos
884 ;;
885 news1000)
886 basic_machine=m68030-sony
887 os=-newsos
888 ;;
889 news-3600 | risc-news)
890 basic_machine=mips-sony
891 os=-newsos
892 ;;
893 necv70)
894 basic_machine=v70-nec
895 os=-sysv
896 ;;
897 next | m*-next)
898 basic_machine=m68k-next
899 case $os in
900 -nextstep* )
901 ;;
902 -ns2*)
903 os=-nextstep2
904 ;;
905 *)
906 os=-nextstep3
907 ;;
908 esac
909 ;;
910 nh3000)
911 basic_machine=m68k-harris
912 os=-cxux
913 ;;
914 nh[45]000)
915 basic_machine=m88k-harris
916 os=-cxux
917 ;;
918 nindy960)
919 basic_machine=i960-intel
920 os=-nindy
921 ;;
922 mon960)
923 basic_machine=i960-intel
924 os=-mon960
925 ;;
926 nonstopux)
927 basic_machine=mips-compaq
928 os=-nonstopux
929 ;;
930 np1)
931 basic_machine=np1-gould
932 ;;
933 neo-tandem)
934 basic_machine=neo-tandem
935 ;;
936 nse-tandem)
937 basic_machine=nse-tandem
938 ;;
939 nsr-tandem)
940 basic_machine=nsr-tandem
941 ;;
942 nsv-tandem)
943 basic_machine=nsv-tandem
944 ;;
945 nsx-tandem)
946 basic_machine=nsx-tandem
947 ;;
948 op50n-* | op60c-*)
949 basic_machine=hppa1.1-oki
950 os=-proelf
951 ;;
952 openrisc | openrisc-*)
953 basic_machine=or32-unknown
954 ;;
955 os400)
956 basic_machine=powerpc-ibm
957 os=-os400
958 ;;
959 OSE68000 | ose68000)
960 basic_machine=m68000-ericsson
961 os=-ose
962 ;;
963 os68k)
964 basic_machine=m68k-none
965 os=-os68k
966 ;;
967 pa-hitachi)
968 basic_machine=hppa1.1-hitachi
969 os=-hiuxwe2
970 ;;
971 paragon)
972 basic_machine=i860-intel
973 os=-osf
974 ;;
975 parisc)
976 basic_machine=hppa-unknown
977 os=-linux
978 ;;
979 parisc-*)
980 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
981 os=-linux
982 ;;
983 pbd)
984 basic_machine=sparc-tti
985 ;;
986 pbb)
987 basic_machine=m68k-tti
988 ;;
989 pc532 | pc532-*)
990 basic_machine=ns32k-pc532
991 ;;
992 pc98)
993 basic_machine=i386-pc
994 ;;
995 pc98-*)
996 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
997 ;;
998 pentium | p5 | k5 | k6 | nexgen | viac3)
999 basic_machine=i586-pc
1000 ;;
1001 pentiumpro | p6 | 6x86 | athlon | athlon_*)
1002 basic_machine=i686-pc
1003 ;;
1004 pentiumii | pentium2 | pentiumiii | pentium3)
1005 basic_machine=i686-pc
1006 ;;
1007 pentium4)
1008 basic_machine=i786-pc
1009 ;;
1010 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1011 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1012 ;;
1013 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1014 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1015 ;;
1016 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1017 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1018 ;;
1019 pentium4-*)
1020 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1021 ;;
1022 pn)
1023 basic_machine=pn-gould
1024 ;;
1025 power) basic_machine=power-ibm
1026 ;;
1027 ppc | ppcbe) basic_machine=powerpc-unknown
1028 ;;
1029 ppc-* | ppcbe-*)
1030 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1031 ;;
1032 ppcle | powerpclittle)
1033 basic_machine=powerpcle-unknown
1034 ;;
1035 ppcle-* | powerpclittle-*)
1036 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1037 ;;
1038 ppc64) basic_machine=powerpc64-unknown
1039 ;;
1040 ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1041 ;;
1042 ppc64le | powerpc64little)
1043 basic_machine=powerpc64le-unknown
1044 ;;
1045 ppc64le-* | powerpc64little-*)
1046 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1047 ;;
1048 ps2)
1049 basic_machine=i386-ibm
1050 ;;
1051 pw32)
1052 basic_machine=i586-unknown
1053 os=-pw32
1054 ;;
1055 rdos | rdos64)
1056 basic_machine=x86_64-pc
1057 os=-rdos
1058 ;;
1059 rdos32)
1060 basic_machine=i386-pc
1061 os=-rdos
1062 ;;
1063 rom68k)
1064 basic_machine=m68k-rom68k
1065 os=-coff
1066 ;;
1067 rm[46]00)
1068 basic_machine=mips-siemens
1069 ;;
1070 rtpc | rtpc-*)
1071 basic_machine=romp-ibm
1072 ;;
1073 s390 | s390-*)
1074 basic_machine=s390-ibm
1075 ;;
1076 s390x | s390x-*)
1077 basic_machine=s390x-ibm
1078 ;;
1079 sa29200)
1080 basic_machine=a29k-amd
1081 os=-udi
1082 ;;
1083 sb1)
1084 basic_machine=mipsisa64sb1-unknown
1085 ;;
1086 sb1el)
1087 basic_machine=mipsisa64sb1el-unknown
1088 ;;
1089 sde)
1090 basic_machine=mipsisa32-sde
1091 os=-elf
1092 ;;
1093 sei)
1094 basic_machine=mips-sei
1095 os=-seiux
1096 ;;
1097 sequent)
1098 basic_machine=i386-sequent
1099 ;;
1100 sh5el)
1101 basic_machine=sh5le-unknown
1102 ;;
1103 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 x64)
1245 basic_machine=x86_64-pc
1246 ;;
1247 xbox)
1248 basic_machine=i686-pc
1249 os=-mingw32
1250 ;;
1251 xps | xps100)
1252 basic_machine=xps100-honeywell
1253 ;;
1254 xscale-* | xscalee[bl]-*)
1255 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
1256 ;;
1257 ymp)
1258 basic_machine=ymp-cray
1259 os=-unicos
1260 ;;
1261 none)
1262 basic_machine=none-none
1263 os=-none
1264 ;;
1265
1266 # Here we handle the default manufacturer of certain CPU types. It is in
1267 # some cases the only manufacturer, in others, it is the most popular.
1268 w89k)
1269 basic_machine=hppa1.1-winbond
1270 ;;
1271 op50n)
1272 basic_machine=hppa1.1-oki
1273 ;;
1274 op60c)
1275 basic_machine=hppa1.1-oki
1276 ;;
1277 romp)
1278 basic_machine=romp-ibm
1279 ;;
1280 mmix)
1281 basic_machine=mmix-knuth
1282 ;;
1283 rs6000)
1284 basic_machine=rs6000-ibm
1285 ;;
1286 vax)
1287 basic_machine=vax-dec
1288 ;;
1289 pdp11)
1290 basic_machine=pdp11-dec
1291 ;;
1292 we32k)
1293 basic_machine=we32k-att
1294 ;;
1295 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1296 basic_machine=sh-unknown
1297 ;;
1298 cydra)
1299 basic_machine=cydra-cydrome
1300 ;;
1301 orion)
1302 basic_machine=orion-highlevel
1303 ;;
1304 orion105)
1305 basic_machine=clipper-highlevel
1306 ;;
1307 mac | mpw | mac-mpw)
1308 basic_machine=m68k-apple
1309 ;;
1310 pmac | pmac-mpw)
1311 basic_machine=powerpc-apple
1312 ;;
1313 *-unknown)
1314 # Make sure to match an already-canonicalized machine name.
1315 ;;
1316 *)
1317 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
1318 exit 1
1319 ;;
1320 esac
1321
1322 # Here we canonicalize certain aliases for manufacturers.
1323 case $basic_machine in
1324 *-digital*)
1325 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
1326 ;;
1327 *-commodore*)
1328 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
1329 ;;
1330 *)
1331 ;;
1332 esac
1333
1334 # Decode manufacturer-specific aliases for certain operating systems.
1335
1336 if [ x"$os" != x"" ]
1337 then
1338 case $os in
1339 # First match some system type aliases that might get confused
1340 # with valid system types.
1341 # -solaris* is a basic system type, with this one exception.
1342 -auroraux)
1343 os=-auroraux
1344 ;;
1345 -solaris1 | -solaris1.*)
1346 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1347 ;;
1348 -solaris)
1349 os=-solaris2
1350 ;;
1351 -unixware*)
1352 os=-sysv4.2uw
1353 ;;
1354 -gnu/linux*)
1355 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1356 ;;
1357 # es1800 is here to avoid being matched by es* (a different OS)
1358 -es1800*)
1359 os=-ose
1360 ;;
1361 # Now accept the basic system types.
1362 # The portable systems comes first.
1363 # Each alternative MUST end in a * to match a version number.
1364 # -sysv* is not here because it comes later, after sysvr4.
1365 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1366 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1367 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1368 | -sym* | -kopensolaris* | -plan9* \
1369 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1370 | -aos* | -aros* | -cloudabi* | -sortix* \
1371 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1372 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1373 | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
1374 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1375 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1376 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1377 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1378 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1379 | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
1380 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1381 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1382 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1383 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1384 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
1385 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1386 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1387 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1388 | -morphos* | -superux* | -rtmk* | -windiss* \
1389 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1390 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1391 | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
1392 | -midnightbsd*)
1393 # Remember, each alternative MUST END IN *, to match a version number.
1394 ;;
1395 -qnx*)
1396 case $basic_machine in
1397 x86-* | i*86-*)
1398 ;;
1399 *)
1400 os=-nto$os
1401 ;;
1402 esac
1403 ;;
1404 -nto-qnx*)
1405 ;;
1406 -nto*)
1407 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1408 ;;
1409 -sim | -xray | -os68k* | -v88r* \
1410 | -windows* | -osx | -abug | -netware* | -os9* \
1411 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1412 ;;
1413 -mac*)
1414 os=`echo "$os" | sed -e 's|mac|macos|'`
1415 ;;
1416 -linux-dietlibc)
1417 os=-linux-dietlibc
1418 ;;
1419 -linux*)
1420 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1421 ;;
1422 -sunos5*)
1423 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1424 ;;
1425 -sunos6*)
1426 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1427 ;;
1428 -opened*)
1429 os=-openedition
1430 ;;
1431 -os400*)
1432 os=-os400
1433 ;;
1434 -wince*)
1435 os=-wince
1436 ;;
1437 -utek*)
1438 os=-bsd
1439 ;;
1440 -dynix*)
1441 os=-bsd
1442 ;;
1443 -acis*)
1444 os=-aos
1445 ;;
1446 -atheos*)
1447 os=-atheos
1448 ;;
1449 -syllable*)
1450 os=-syllable
1451 ;;
1452 -386bsd)
1453 os=-bsd
1454 ;;
1455 -ctix* | -uts*)
1456 os=-sysv
1457 ;;
1458 -nova*)
1459 os=-rtmk-nova
1460 ;;
1461 -ns2)
1462 os=-nextstep2
1463 ;;
1464 -nsk*)
1465 os=-nsk
1466 ;;
1467 # Preserve the version number of sinix5.
1468 -sinix5.*)
1469 os=`echo $os | sed -e 's|sinix|sysv|'`
1470 ;;
1471 -sinix*)
1472 os=-sysv4
1473 ;;
1474 -tpf*)
1475 os=-tpf
1476 ;;
1477 -triton*)
1478 os=-sysv3
1479 ;;
1480 -oss*)
1481 os=-sysv3
1482 ;;
1483 -svr4*)
1484 os=-sysv4
1485 ;;
1486 -svr3)
1487 os=-sysv3
1488 ;;
1489 -sysvr4)
1490 os=-sysv4
1491 ;;
1492 # This must come after -sysvr4.
1493 -sysv*)
1494 ;;
1495 -ose*)
1496 os=-ose
1497 ;;
1498 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1499 os=-mint
1500 ;;
1501 -zvmoe)
1502 os=-zvmoe
1503 ;;
1504 -dicos*)
1505 os=-dicos
1506 ;;
1507 -pikeos*)
1508 # Until real need of OS specific support for
1509 # particular features comes up, bare metal
1510 # configurations are quite functional.
1511 case $basic_machine in
1512 arm*)
1513 os=-eabi
1514 ;;
1515 *)
1516 os=-elf
1517 ;;
1518 esac
1519 ;;
1520 -nacl*)
1521 ;;
1522 -ios)
1523 ;;
1524 -none)
1525 ;;
1526 *)
1527 # Get rid of the `-' at the beginning of $os.
1528 os=`echo $os | sed 's/[^-]*-//'`
1529 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
1530 exit 1
1531 ;;
1532 esac
1533 else
1534
1535 # Here we handle the default operating systems that come with various machines.
1536 # The value should be what the vendor currently ships out the door with their
1537 # machine or put another way, the most popular os provided with the machine.
1538
1539 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1540 # "-sun"), then you have to tell the case statement up towards the top
1541 # that MANUFACTURER isn't an operating system. Otherwise, code above
1542 # will signal an error saying that MANUFACTURER isn't an operating
1543 # system, and we'll never get to this point.
1544
1545 case $basic_machine in
1546 score-*)
1547 os=-elf
1548 ;;
1549 spu-*)
1550 os=-elf
1551 ;;
1552 *-acorn)
1553 os=-riscix1.2
1554 ;;
1555 arm*-rebel)
1556 os=-linux
1557 ;;
1558 arm*-semi)
1559 os=-aout
1560 ;;
1561 c4x-* | tic4x-*)
1562 os=-coff
1563 ;;
1564 c8051-*)
1565 os=-elf
1566 ;;
1567 hexagon-*)
1568 os=-elf
1569 ;;
1570 tic54x-*)
1571 os=-coff
1572 ;;
1573 tic55x-*)
1574 os=-coff
1575 ;;
1576 tic6x-*)
1577 os=-coff
1578 ;;
1579 # This must come before the *-dec entry.
1580 pdp10-*)
1581 os=-tops20
1582 ;;
1583 pdp11-*)
1584 os=-none
1585 ;;
1586 *-dec | vax-*)
1587 os=-ultrix4.2
1588 ;;
1589 m68*-apollo)
1590 os=-domain
1591 ;;
1592 i386-sun)
1593 os=-sunos4.0.2
1594 ;;
1595 m68000-sun)
1596 os=-sunos3
1597 ;;
1598 m68*-cisco)
1599 os=-aout
1600 ;;
1601 mep-*)
1602 os=-elf
1603 ;;
1604 mips*-cisco)
1605 os=-elf
1606 ;;
1607 mips*-*)
1608 os=-elf
1609 ;;
1610 or32-*)
1611 os=-coff
1612 ;;
1613 *-tti) # must be before sparc entry or we get the wrong os.
1614 os=-sysv3
1615 ;;
1616 sparc-* | *-sun)
1617 os=-sunos4.1.1
1618 ;;
1619 pru-*)
1620 os=-elf
1621 ;;
1622 *-be)
1623 os=-beos
1624 ;;
1625 *-ibm)
1626 os=-aix
1627 ;;
1628 *-knuth)
1629 os=-mmixware
1630 ;;
1631 *-wec)
1632 os=-proelf
1633 ;;
1634 *-winbond)
1635 os=-proelf
1636 ;;
1637 *-oki)
1638 os=-proelf
1639 ;;
1640 *-hp)
1641 os=-hpux
1642 ;;
1643 *-hitachi)
1644 os=-hiux
1645 ;;
1646 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1647 os=-sysv
1648 ;;
1649 *-cbm)
1650 os=-amigaos
1651 ;;
1652 *-dg)
1653 os=-dgux
1654 ;;
1655 *-dolphin)
1656 os=-sysv3
1657 ;;
1658 m68k-ccur)
1659 os=-rtu
1660 ;;
1661 m88k-omron*)
1662 os=-luna
1663 ;;
1664 *-next)
1665 os=-nextstep
1666 ;;
1667 *-sequent)
1668 os=-ptx
1669 ;;
1670 *-crds)
1671 os=-unos
1672 ;;
1673 *-ns)
1674 os=-genix
1675 ;;
1676 i370-*)
1677 os=-mvs
1678 ;;
1679 *-gould)
1680 os=-sysv
1681 ;;
1682 *-highlevel)
1683 os=-bsd
1684 ;;
1685 *-encore)
1686 os=-bsd
1687 ;;
1688 *-sgi)
1689 os=-irix
1690 ;;
1691 *-siemens)
1692 os=-sysv4
1693 ;;
1694 *-masscomp)
1695 os=-rtu
1696 ;;
1697 f30[01]-fujitsu | f700-fujitsu)
1698 os=-uxpv
1699 ;;
1700 *-rom68k)
1701 os=-coff
1702 ;;
1703 *-*bug)
1704 os=-coff
1705 ;;
1706 *-apple)
1707 os=-macos
1708 ;;
1709 *-atari*)
1710 os=-mint
1711 ;;
1712 *)
1713 os=-none
1714 ;;
1715 esac
1716 fi
1717
1718 # Here we handle the case where we know the os, and the CPU type, but not the
1719 # manufacturer. We pick the logical manufacturer.
1720 vendor=unknown
1721 case $basic_machine in
1722 *-unknown)
1723 case $os in
1724 -riscix*)
1725 vendor=acorn
1726 ;;
1727 -sunos*)
1728 vendor=sun
1729 ;;
1730 -cnk*|-aix*)
1731 vendor=ibm
1732 ;;
1733 -beos*)
1734 vendor=be
1735 ;;
1736 -hpux*)
1737 vendor=hp
1738 ;;
1739 -mpeix*)
1740 vendor=hp
1741 ;;
1742 -hiux*)
1743 vendor=hitachi
1744 ;;
1745 -unos*)
1746 vendor=crds
1747 ;;
1748 -dgux*)
1749 vendor=dg
1750 ;;
1751 -luna*)
1752 vendor=omron
1753 ;;
1754 -genix*)
1755 vendor=ns
1756 ;;
1757 -mvs* | -opened*)
1758 vendor=ibm
1759 ;;
1760 -os400*)
1761 vendor=ibm
1762 ;;
1763 -ptx*)
1764 vendor=sequent
1765 ;;
1766 -tpf*)
1767 vendor=ibm
1768 ;;
1769 -vxsim* | -vxworks* | -windiss*)
1770 vendor=wrs
1771 ;;
1772 -aux*)
1773 vendor=apple
1774 ;;
1775 -hms*)
1776 vendor=hitachi
1777 ;;
1778 -mpw* | -macos*)
1779 vendor=apple
1780 ;;
1781 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1782 vendor=atari
1783 ;;
1784 -vos*)
1785 vendor=stratus
1786 ;;
1787 esac
1788 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
1789 ;;
1790 esac
1791
1792 echo "$basic_machine$os"
1793 exit
1794
1795 # Local variables:
1796 # eval: (add-hook 'write-file-functions 'time-stamp)
1797 # time-stamp-start: "timestamp='"
1798 # time-stamp-format: "%:y-%02m-%02d"
1799 # time-stamp-end: "'"
1800 # End:
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.71 for LibHTP 0.5.38.
3 #
4 #
5 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
6 # Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 as_nop=:
18 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
19 then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26 else $as_nop
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32 esac
33 fi
34
35
36
37 # Reset variables that may have inherited troublesome values from
38 # the environment.
39
40 # IFS needs to be set, to space, tab, and newline, in precisely that order.
41 # (If _AS_PATH_WALK were called with IFS unset, it would have the
42 # side effect of setting IFS to empty, thus disabling word splitting.)
43 # Quoting is to prevent editors from complaining about space-tab.
44 as_nl='
45 '
46 export as_nl
47 IFS=" "" $as_nl"
48
49 PS1='$ '
50 PS2='> '
51 PS4='+ '
52
53 # Ensure predictable behavior from utilities with locale-dependent output.
54 LC_ALL=C
55 export LC_ALL
56 LANGUAGE=C
57 export LANGUAGE
58
59 # We cannot yet rely on "unset" to work, but we need these variables
60 # to be unset--not just set to an empty or harmless value--now, to
61 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
62 # also avoids known problems related to "unset" and subshell syntax
63 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
64 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
65 do eval test \${$as_var+y} \
66 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67 done
68
69 # Ensure that fds 0, 1, and 2 are open.
70 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
71 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
72 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
73
74 # The user is always right.
75 if ${PATH_SEPARATOR+false} :; 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 # Find who we are. Look in the path if we contain no directory separator.
85 as_myself=
86 case $0 in #((
87 *[\\/]* ) as_myself=$0 ;;
88 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
89 for as_dir in $PATH
90 do
91 IFS=$as_save_IFS
92 case $as_dir in #(((
93 '') as_dir=./ ;;
94 */) ;;
95 *) as_dir=$as_dir/ ;;
96 esac
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 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111 fi
112
113
114 # Use a proper internal environment variable to ensure we don't fall
115 # into an infinite loop, continuously re-executing ourselves.
116 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
117 _as_can_reexec=no; export _as_can_reexec;
118 # We cannot yet assume a decent shell, so we have to provide a
119 # neutralization value for shells without unset; and this also
120 # works around shells that cannot unset nonexistent variables.
121 # Preserve -v and -x to the replacement shell.
122 BASH_ENV=/dev/null
123 ENV=/dev/null
124 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
125 case $- in # ((((
126 *v*x* | *x*v* ) as_opts=-vx ;;
127 *v* ) as_opts=-v ;;
128 *x* ) as_opts=-x ;;
129 * ) as_opts= ;;
130 esac
131 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
132 # Admittedly, this is quite paranoid, since all the known shells bail
133 # out after a failed `exec'.
134 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
135 exit 255
136 fi
137 # We don't want this to propagate to other subprocesses.
138 { _as_can_reexec=; unset _as_can_reexec;}
139 if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="as_nop=:
141 if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
142 then :
143 emulate sh
144 NULLCMD=:
145 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
146 # is contrary to our usage. Disable this feature.
147 alias -g '\${1+\"\$@\"}'='\"\$@\"'
148 setopt NO_GLOB_SUBST
149 else \$as_nop
150 case \`(set -o) 2>/dev/null\` in #(
151 *posix*) :
152 set -o posix ;; #(
153 *) :
154 ;;
155 esac
156 fi
157 "
158 as_required="as_fn_return () { (exit \$1); }
159 as_fn_success () { as_fn_return 0; }
160 as_fn_failure () { as_fn_return 1; }
161 as_fn_ret_success () { return 0; }
162 as_fn_ret_failure () { return 1; }
163
164 exitcode=0
165 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
166 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
167 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
168 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
169 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
170 then :
171
172 else \$as_nop
173 exitcode=1; echo positional parameters were not saved.
174 fi
175 test x\$exitcode = x0 || exit 1
176 blah=\$(echo \$(echo blah))
177 test x\"\$blah\" = xblah || exit 1
178 test -x / || exit 1"
179 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
180 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
181 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
182 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
183
184 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
185 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
186 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
187 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
188 PATH=/empty FPATH=/empty; export PATH FPATH
189 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
190 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
191 test \$(( 1 + 1 )) = 2 || exit 1"
192 if (eval "$as_required") 2>/dev/null
193 then :
194 as_have_required=yes
195 else $as_nop
196 as_have_required=no
197 fi
198 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
199 then :
200
201 else $as_nop
202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
203 as_found=false
204 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
205 do
206 IFS=$as_save_IFS
207 case $as_dir in #(((
208 '') as_dir=./ ;;
209 */) ;;
210 *) as_dir=$as_dir/ ;;
211 esac
212 as_found=:
213 case $as_dir in #(
214 /*)
215 for as_base in sh bash ksh sh5; do
216 # Try only shells that exist, to save several forks.
217 as_shell=$as_dir$as_base
218 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
219 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
220 then :
221 CONFIG_SHELL=$as_shell as_have_required=yes
222 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
223 then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 IFS=$as_save_IFS
232 if $as_found
233 then :
234
235 else $as_nop
236 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
237 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
238 then :
239 CONFIG_SHELL=$SHELL as_have_required=yes
240 fi
241 fi
242
243
244 if test "x$CONFIG_SHELL" != x
245 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 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
264 exit 255
265 fi
266
267 if test x$as_have_required = xno
268 then :
269 printf "%s\n" "$0: This script requires a shell more modern than all"
270 printf "%s\n" "$0: the shells that I found on your system."
271 if test ${ZSH_VERSION+y} ; then
272 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
274 else
275 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
276 $0: including any error possibly output before this
277 $0: message. Then install a modern shell, or manually run
278 $0: the script under such a shell if you do have one."
279 fi
280 exit 1
281 fi
282 fi
283 fi
284 SHELL=${CONFIG_SHELL-/bin/sh}
285 export SHELL
286 # Unset more variables known to interfere with behavior of common tools.
287 CLICOLOR_FORCE= GREP_OPTIONS=
288 unset CLICOLOR_FORCE GREP_OPTIONS
289
290 ## --------------------- ##
291 ## M4sh Shell Functions. ##
292 ## --------------------- ##
293 # as_fn_unset VAR
294 # ---------------
295 # Portably unset VAR.
296 as_fn_unset ()
297 {
298 { eval $1=; unset $1;}
299 }
300 as_unset=as_fn_unset
301
302
303 # as_fn_set_status STATUS
304 # -----------------------
305 # Set $? to STATUS, without forking.
306 as_fn_set_status ()
307 {
308 return $1
309 } # as_fn_set_status
310
311 # as_fn_exit STATUS
312 # -----------------
313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314 as_fn_exit ()
315 {
316 set +e
317 as_fn_set_status $1
318 exit $1
319 } # as_fn_exit
320 # as_fn_nop
321 # ---------
322 # Do nothing but, unlike ":", preserve the value of $?.
323 as_fn_nop ()
324 {
325 return $?
326 }
327 as_nop=as_fn_nop
328
329 # as_fn_mkdir_p
330 # -------------
331 # Create "$as_dir" as a directory, including parents if necessary.
332 as_fn_mkdir_p ()
333 {
334
335 case $as_dir in #(
336 -*) as_dir=./$as_dir;;
337 esac
338 test -d "$as_dir" || eval $as_mkdir_p || {
339 as_dirs=
340 while :; do
341 case $as_dir in #(
342 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
343 *) as_qdir=$as_dir;;
344 esac
345 as_dirs="'$as_qdir' $as_dirs"
346 as_dir=`$as_dirname -- "$as_dir" ||
347 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
348 X"$as_dir" : 'X\(//\)[^/]' \| \
349 X"$as_dir" : 'X\(//\)$' \| \
350 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
351 printf "%s\n" X"$as_dir" |
352 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
353 s//\1/
354 q
355 }
356 /^X\(\/\/\)[^/].*/{
357 s//\1/
358 q
359 }
360 /^X\(\/\/\)$/{
361 s//\1/
362 q
363 }
364 /^X\(\/\).*/{
365 s//\1/
366 q
367 }
368 s/.*/./; q'`
369 test -d "$as_dir" && break
370 done
371 test -z "$as_dirs" || eval "mkdir $as_dirs"
372 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
373
374
375 } # as_fn_mkdir_p
376
377 # as_fn_executable_p FILE
378 # -----------------------
379 # Test if FILE is an executable regular file.
380 as_fn_executable_p ()
381 {
382 test -f "$1" && test -x "$1"
383 } # as_fn_executable_p
384 # as_fn_append VAR VALUE
385 # ----------------------
386 # Append the text in VALUE to the end of the definition contained in VAR. Take
387 # advantage of any shell optimizations that allow amortized linear growth over
388 # repeated appends, instead of the typical quadratic growth present in naive
389 # implementations.
390 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
391 then :
392 eval 'as_fn_append ()
393 {
394 eval $1+=\$2
395 }'
396 else $as_nop
397 as_fn_append ()
398 {
399 eval $1=\$$1\$2
400 }
401 fi # as_fn_append
402
403 # as_fn_arith ARG...
404 # ------------------
405 # Perform arithmetic evaluation on the ARGs, and store the result in the
406 # global $as_val. Take advantage of shells that can avoid forks. The arguments
407 # must be portable across $(()) and expr.
408 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
409 then :
410 eval 'as_fn_arith ()
411 {
412 as_val=$(( $* ))
413 }'
414 else $as_nop
415 as_fn_arith ()
416 {
417 as_val=`expr "$@" || test $? -eq 1`
418 }
419 fi # as_fn_arith
420
421 # as_fn_nop
422 # ---------
423 # Do nothing but, unlike ":", preserve the value of $?.
424 as_fn_nop ()
425 {
426 return $?
427 }
428 as_nop=as_fn_nop
429
430 # as_fn_error STATUS ERROR [LINENO LOG_FD]
431 # ----------------------------------------
432 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
433 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
434 # script with STATUS, using 1 if that was 0.
435 as_fn_error ()
436 {
437 as_status=$1; test $as_status -eq 0 && as_status=1
438 if test "$4"; then
439 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
440 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
441 fi
442 printf "%s\n" "$as_me: error: $2" >&2
443 as_fn_exit $as_status
444 } # as_fn_error
445
446 if expr a : '\(a\)' >/dev/null 2>&1 &&
447 test "X`expr 00001 : '.*\(...\)'`" = X001; then
448 as_expr=expr
449 else
450 as_expr=false
451 fi
452
453 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
454 as_basename=basename
455 else
456 as_basename=false
457 fi
458
459 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
460 as_dirname=dirname
461 else
462 as_dirname=false
463 fi
464
465 as_me=`$as_basename -- "$0" ||
466 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
467 X"$0" : 'X\(//\)$' \| \
468 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
469 printf "%s\n" X/"$0" |
470 sed '/^.*\/\([^/][^/]*\)\/*$/{
471 s//\1/
472 q
473 }
474 /^X\/\(\/\/\)$/{
475 s//\1/
476 q
477 }
478 /^X\/\(\/\).*/{
479 s//\1/
480 q
481 }
482 s/.*/./; q'`
483
484 # Avoid depending upon Character Ranges.
485 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
486 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
487 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
488 as_cr_digits='0123456789'
489 as_cr_alnum=$as_cr_Letters$as_cr_digits
490
491
492 as_lineno_1=$LINENO as_lineno_1a=$LINENO
493 as_lineno_2=$LINENO as_lineno_2a=$LINENO
494 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
495 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
496 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
497 sed -n '
498 p
499 /[$]LINENO/=
500 ' <$as_myself |
501 sed '
502 s/[$]LINENO.*/&-/
503 t lineno
504 b
505 :lineno
506 N
507 :loop
508 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
509 t loop
510 s/-\n.*//
511 ' >$as_me.lineno &&
512 chmod +x "$as_me.lineno" ||
513 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
514
515 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
516 # already done that, so ensure we don't try to do so again and fall
517 # in an infinite loop. This has already happened in practice.
518 _as_can_reexec=no; export _as_can_reexec
519 # Don't try to exec as it changes $[0], causing all sort of problems
520 # (the dirname of $[0] is not the place where we might find the
521 # original and so on. Autoconf is especially sensitive to this).
522 . "./$as_me.lineno"
523 # Exit status is that of the last command.
524 exit
525 }
526
527
528 # Determine whether it's possible to make 'echo' print without a newline.
529 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
530 # for compatibility with existing Makefiles.
531 ECHO_C= ECHO_N= ECHO_T=
532 case `echo -n x` in #(((((
533 -n*)
534 case `echo 'xy\c'` in
535 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
536 xy) ECHO_C='\c';;
537 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
538 ECHO_T=' ';;
539 esac;;
540 *)
541 ECHO_N='-n';;
542 esac
543
544 # For backward compatibility with old third-party macros, we provide
545 # the shell variables $as_echo and $as_echo_n. New code should use
546 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
547 as_echo='printf %s\n'
548 as_echo_n='printf %s'
549
550
551 rm -f conf$$ conf$$.exe conf$$.file
552 if test -d conf$$.dir; then
553 rm -f conf$$.dir/conf$$.file
554 else
555 rm -f conf$$.dir
556 mkdir conf$$.dir 2>/dev/null
557 fi
558 if (echo >conf$$.file) 2>/dev/null; then
559 if ln -s conf$$.file conf$$ 2>/dev/null; then
560 as_ln_s='ln -s'
561 # ... but there are two gotchas:
562 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
563 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
564 # In both cases, we have to default to `cp -pR'.
565 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
566 as_ln_s='cp -pR'
567 elif ln conf$$.file conf$$ 2>/dev/null; then
568 as_ln_s=ln
569 else
570 as_ln_s='cp -pR'
571 fi
572 else
573 as_ln_s='cp -pR'
574 fi
575 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
576 rmdir conf$$.dir 2>/dev/null
577
578 if mkdir -p . 2>/dev/null; then
579 as_mkdir_p='mkdir -p "$as_dir"'
580 else
581 test -d ./-p && rmdir ./-p
582 as_mkdir_p=false
583 fi
584
585 as_test_x='test -x'
586 as_executable_p=as_fn_executable_p
587
588 # Sed expression to map a string onto a valid CPP name.
589 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
590
591 # Sed expression to map a string onto a valid variable name.
592 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
593
594 SHELL=${CONFIG_SHELL-/bin/sh}
595
596
597 test -n "$DJDIR" || exec 7<&0 </dev/null
598 exec 6>&1
599
600 # Name of the host.
601 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
602 # so uname gets run too.
603 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
604
605 #
606 # Initializations.
607 #
608 ac_default_prefix=/usr/local
609 ac_clean_files=
610 ac_config_libobj_dir=.
611 LIBOBJS=
612 cross_compiling=no
613 subdirs=
614 MFLAGS=
615 MAKEFLAGS=
616
617 # Identity of this package.
618 PACKAGE_NAME='LibHTP'
619 PACKAGE_TARNAME='libhtp'
620 PACKAGE_VERSION='0.5.38'
621 PACKAGE_STRING='LibHTP 0.5.38'
622 PACKAGE_BUGREPORT=''
623 PACKAGE_URL=''
624
625 # Factoring default headers for most tests.
626 ac_includes_default="\
627 #include <stddef.h>
628 #ifdef HAVE_STDIO_H
629 # include <stdio.h>
630 #endif
631 #ifdef HAVE_STDLIB_H
632 # include <stdlib.h>
633 #endif
634 #ifdef HAVE_STRING_H
635 # include <string.h>
636 #endif
637 #ifdef HAVE_INTTYPES_H
638 # include <inttypes.h>
639 #endif
640 #ifdef HAVE_STDINT_H
641 # include <stdint.h>
642 #endif
643 #ifdef HAVE_STRINGS_H
644 # include <strings.h>
645 #endif
646 #ifdef HAVE_SYS_TYPES_H
647 # include <sys/types.h>
648 #endif
649 #ifdef HAVE_SYS_STAT_H
650 # include <sys/stat.h>
651 #endif
652 #ifdef HAVE_UNISTD_H
653 # include <unistd.h>
654 #endif"
655
656 ac_header_c_list=
657 ac_default_prefix=/usr/local
658 ac_subst_vars='am__EXEEXT_FALSE
659 am__EXEEXT_TRUE
660 LTLIBOBJS
661 LIBOBJS
662 LCOV
663 DOXYGEN
664 doxygen
665 CYGWIN_FALSE
666 CYGWIN_TRUE
667 LTLIBICONV
668 LIBICONV
669 CPP
670 CXXCPP
671 LT_SYS_LIBRARY_PATH
672 OTOOL64
673 OTOOL
674 LIPO
675 NMEDIT
676 DSYMUTIL
677 MANIFEST_TOOL
678 RANLIB
679 ac_ct_AR
680 AR
681 DLLTOOL
682 OBJDUMP
683 LN_S
684 NM
685 ac_ct_DUMPBIN
686 DUMPBIN
687 LD
688 FGREP
689 EGREP
690 GREP
691 SED
692 host_os
693 host_vendor
694 host_cpu
695 host
696 build_os
697 build_vendor
698 build_cpu
699 build
700 LIBTOOL
701 am__fastdepCXX_FALSE
702 am__fastdepCXX_TRUE
703 CXXDEPMODE
704 ac_ct_CXX
705 CXXFLAGS
706 CXX
707 am__fastdepCC_FALSE
708 am__fastdepCC_TRUE
709 CCDEPMODE
710 am__nodep
711 AMDEPBACKSLASH
712 AMDEP_FALSE
713 AMDEP_TRUE
714 am__include
715 DEPDIR
716 OBJEXT
717 EXEEXT
718 ac_ct_CC
719 CPPFLAGS
720 LDFLAGS
721 CFLAGS
722 CC
723 GENERIC_VERSION
724 GENERIC_RELEASE
725 GENERIC_LIBRARY_NAME
726 GENERIC_LIBRARY_VERSION
727 AM_BACKSLASH
728 AM_DEFAULT_VERBOSITY
729 AM_DEFAULT_V
730 AM_V
731 CSCOPE
732 ETAGS
733 CTAGS
734 am__untar
735 am__tar
736 AMTAR
737 am__leading_dot
738 SET_MAKE
739 AWK
740 mkdir_p
741 MKDIR_P
742 INSTALL_STRIP_PROGRAM
743 STRIP
744 install_sh
745 MAKEINFO
746 AUTOHEADER
747 AUTOMAKE
748 AUTOCONF
749 ACLOCAL
750 VERSION
751 PACKAGE
752 CYGPATH_W
753 am__isrc
754 INSTALL_DATA
755 INSTALL_SCRIPT
756 INSTALL_PROGRAM
757 target_alias
758 host_alias
759 build_alias
760 LIBS
761 ECHO_T
762 ECHO_N
763 ECHO_C
764 DEFS
765 mandir
766 localedir
767 libdir
768 psdir
769 pdfdir
770 dvidir
771 htmldir
772 infodir
773 docdir
774 oldincludedir
775 includedir
776 runstatedir
777 localstatedir
778 sharedstatedir
779 sysconfdir
780 datadir
781 datarootdir
782 libexecdir
783 sbindir
784 bindir
785 program_transform_name
786 prefix
787 exec_prefix
788 PACKAGE_URL
789 PACKAGE_BUGREPORT
790 PACKAGE_STRING
791 PACKAGE_VERSION
792 PACKAGE_TARNAME
793 PACKAGE_NAME
794 PATH_SEPARATOR
795 SHELL
796 am__quote'
797 ac_subst_files=''
798 ac_user_opts='
799 enable_option_checking
800 enable_silent_rules
801 enable_debug
802 enable_devmode
803 enable_gcov
804 enable_dependency_tracking
805 enable_shared
806 enable_static
807 with_pic
808 enable_fast_install
809 with_aix_soname
810 with_gnu_ld
811 with_sysroot
812 enable_libtool_lock
813 enable_rpath
814 with_libiconv_prefix
815 with_doxygen
816 '
817 ac_precious_vars='build_alias
818 host_alias
819 target_alias
820 CC
821 CFLAGS
822 LDFLAGS
823 LIBS
824 CPPFLAGS
825 CXX
826 CXXFLAGS
827 CCC
828 LT_SYS_LIBRARY_PATH
829 CXXCPP
830 CPP'
831
832
833 # Initialize some variables set by options.
834 ac_init_help=
835 ac_init_version=false
836 ac_unrecognized_opts=
837 ac_unrecognized_sep=
838 # The variables have the same names as the options, with
839 # dashes changed to underlines.
840 cache_file=/dev/null
841 exec_prefix=NONE
842 no_create=
843 no_recursion=
844 prefix=NONE
845 program_prefix=NONE
846 program_suffix=NONE
847 program_transform_name=s,x,x,
848 silent=
849 site=
850 srcdir=
851 verbose=
852 x_includes=NONE
853 x_libraries=NONE
854
855 # Installation directory options.
856 # These are left unexpanded so users can "make install exec_prefix=/foo"
857 # and all the variables that are supposed to be based on exec_prefix
858 # by default will actually change.
859 # Use braces instead of parens because sh, perl, etc. also accept them.
860 # (The list follows the same order as the GNU Coding Standards.)
861 bindir='${exec_prefix}/bin'
862 sbindir='${exec_prefix}/sbin'
863 libexecdir='${exec_prefix}/libexec'
864 datarootdir='${prefix}/share'
865 datadir='${datarootdir}'
866 sysconfdir='${prefix}/etc'
867 sharedstatedir='${prefix}/com'
868 localstatedir='${prefix}/var'
869 runstatedir='${localstatedir}/run'
870 includedir='${prefix}/include'
871 oldincludedir='/usr/include'
872 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
873 infodir='${datarootdir}/info'
874 htmldir='${docdir}'
875 dvidir='${docdir}'
876 pdfdir='${docdir}'
877 psdir='${docdir}'
878 libdir='${exec_prefix}/lib'
879 localedir='${datarootdir}/locale'
880 mandir='${datarootdir}/man'
881
882 ac_prev=
883 ac_dashdash=
884 for ac_option
885 do
886 # If the previous option needs an argument, assign it.
887 if test -n "$ac_prev"; then
888 eval $ac_prev=\$ac_option
889 ac_prev=
890 continue
891 fi
892
893 case $ac_option in
894 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
895 *=) ac_optarg= ;;
896 *) ac_optarg=yes ;;
897 esac
898
899 case $ac_dashdash$ac_option in
900 --)
901 ac_dashdash=yes ;;
902
903 -bindir | --bindir | --bindi | --bind | --bin | --bi)
904 ac_prev=bindir ;;
905 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
906 bindir=$ac_optarg ;;
907
908 -build | --build | --buil | --bui | --bu)
909 ac_prev=build_alias ;;
910 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
911 build_alias=$ac_optarg ;;
912
913 -cache-file | --cache-file | --cache-fil | --cache-fi \
914 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
915 ac_prev=cache_file ;;
916 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
917 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
918 cache_file=$ac_optarg ;;
919
920 --config-cache | -C)
921 cache_file=config.cache ;;
922
923 -datadir | --datadir | --datadi | --datad)
924 ac_prev=datadir ;;
925 -datadir=* | --datadir=* | --datadi=* | --datad=*)
926 datadir=$ac_optarg ;;
927
928 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
929 | --dataroo | --dataro | --datar)
930 ac_prev=datarootdir ;;
931 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
932 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
933 datarootdir=$ac_optarg ;;
934
935 -disable-* | --disable-*)
936 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
937 # Reject names that are not valid shell variable names.
938 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
939 as_fn_error $? "invalid feature name: \`$ac_useropt'"
940 ac_useropt_orig=$ac_useropt
941 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
942 case $ac_user_opts in
943 *"
944 "enable_$ac_useropt"
945 "*) ;;
946 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
947 ac_unrecognized_sep=', ';;
948 esac
949 eval enable_$ac_useropt=no ;;
950
951 -docdir | --docdir | --docdi | --doc | --do)
952 ac_prev=docdir ;;
953 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
954 docdir=$ac_optarg ;;
955
956 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
957 ac_prev=dvidir ;;
958 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
959 dvidir=$ac_optarg ;;
960
961 -enable-* | --enable-*)
962 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
963 # Reject names that are not valid shell variable names.
964 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
965 as_fn_error $? "invalid feature name: \`$ac_useropt'"
966 ac_useropt_orig=$ac_useropt
967 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
968 case $ac_user_opts in
969 *"
970 "enable_$ac_useropt"
971 "*) ;;
972 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
973 ac_unrecognized_sep=', ';;
974 esac
975 eval enable_$ac_useropt=\$ac_optarg ;;
976
977 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
978 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
979 | --exec | --exe | --ex)
980 ac_prev=exec_prefix ;;
981 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
982 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
983 | --exec=* | --exe=* | --ex=*)
984 exec_prefix=$ac_optarg ;;
985
986 -gas | --gas | --ga | --g)
987 # Obsolete; use --with-gas.
988 with_gas=yes ;;
989
990 -help | --help | --hel | --he | -h)
991 ac_init_help=long ;;
992 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
993 ac_init_help=recursive ;;
994 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
995 ac_init_help=short ;;
996
997 -host | --host | --hos | --ho)
998 ac_prev=host_alias ;;
999 -host=* | --host=* | --hos=* | --ho=*)
1000 host_alias=$ac_optarg ;;
1001
1002 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1003 ac_prev=htmldir ;;
1004 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1005 | --ht=*)
1006 htmldir=$ac_optarg ;;
1007
1008 -includedir | --includedir | --includedi | --included | --include \
1009 | --includ | --inclu | --incl | --inc)
1010 ac_prev=includedir ;;
1011 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1012 | --includ=* | --inclu=* | --incl=* | --inc=*)
1013 includedir=$ac_optarg ;;
1014
1015 -infodir | --infodir | --infodi | --infod | --info | --inf)
1016 ac_prev=infodir ;;
1017 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1018 infodir=$ac_optarg ;;
1019
1020 -libdir | --libdir | --libdi | --libd)
1021 ac_prev=libdir ;;
1022 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1023 libdir=$ac_optarg ;;
1024
1025 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1026 | --libexe | --libex | --libe)
1027 ac_prev=libexecdir ;;
1028 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1029 | --libexe=* | --libex=* | --libe=*)
1030 libexecdir=$ac_optarg ;;
1031
1032 -localedir | --localedir | --localedi | --localed | --locale)
1033 ac_prev=localedir ;;
1034 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1035 localedir=$ac_optarg ;;
1036
1037 -localstatedir | --localstatedir | --localstatedi | --localstated \
1038 | --localstate | --localstat | --localsta | --localst | --locals)
1039 ac_prev=localstatedir ;;
1040 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1041 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1042 localstatedir=$ac_optarg ;;
1043
1044 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1045 ac_prev=mandir ;;
1046 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1047 mandir=$ac_optarg ;;
1048
1049 -nfp | --nfp | --nf)
1050 # Obsolete; use --without-fp.
1051 with_fp=no ;;
1052
1053 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1054 | --no-cr | --no-c | -n)
1055 no_create=yes ;;
1056
1057 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1058 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1059 no_recursion=yes ;;
1060
1061 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1062 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1063 | --oldin | --oldi | --old | --ol | --o)
1064 ac_prev=oldincludedir ;;
1065 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1066 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1067 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1068 oldincludedir=$ac_optarg ;;
1069
1070 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1071 ac_prev=prefix ;;
1072 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1073 prefix=$ac_optarg ;;
1074
1075 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1076 | --program-pre | --program-pr | --program-p)
1077 ac_prev=program_prefix ;;
1078 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1079 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1080 program_prefix=$ac_optarg ;;
1081
1082 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1083 | --program-suf | --program-su | --program-s)
1084 ac_prev=program_suffix ;;
1085 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1086 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1087 program_suffix=$ac_optarg ;;
1088
1089 -program-transform-name | --program-transform-name \
1090 | --program-transform-nam | --program-transform-na \
1091 | --program-transform-n | --program-transform- \
1092 | --program-transform | --program-transfor \
1093 | --program-transfo | --program-transf \
1094 | --program-trans | --program-tran \
1095 | --progr-tra | --program-tr | --program-t)
1096 ac_prev=program_transform_name ;;
1097 -program-transform-name=* | --program-transform-name=* \
1098 | --program-transform-nam=* | --program-transform-na=* \
1099 | --program-transform-n=* | --program-transform-=* \
1100 | --program-transform=* | --program-transfor=* \
1101 | --program-transfo=* | --program-transf=* \
1102 | --program-trans=* | --program-tran=* \
1103 | --progr-tra=* | --program-tr=* | --program-t=*)
1104 program_transform_name=$ac_optarg ;;
1105
1106 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1107 ac_prev=pdfdir ;;
1108 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1109 pdfdir=$ac_optarg ;;
1110
1111 -psdir | --psdir | --psdi | --psd | --ps)
1112 ac_prev=psdir ;;
1113 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1114 psdir=$ac_optarg ;;
1115
1116 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1117 | -silent | --silent | --silen | --sile | --sil)
1118 silent=yes ;;
1119
1120 -runstatedir | --runstatedir | --runstatedi | --runstated \
1121 | --runstate | --runstat | --runsta | --runst | --runs \
1122 | --run | --ru | --r)
1123 ac_prev=runstatedir ;;
1124 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1125 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1126 | --run=* | --ru=* | --r=*)
1127 runstatedir=$ac_optarg ;;
1128
1129 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1130 ac_prev=sbindir ;;
1131 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1132 | --sbi=* | --sb=*)
1133 sbindir=$ac_optarg ;;
1134
1135 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1136 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1137 | --sharedst | --shareds | --shared | --share | --shar \
1138 | --sha | --sh)
1139 ac_prev=sharedstatedir ;;
1140 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1141 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1142 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1143 | --sha=* | --sh=*)
1144 sharedstatedir=$ac_optarg ;;
1145
1146 -site | --site | --sit)
1147 ac_prev=site ;;
1148 -site=* | --site=* | --sit=*)
1149 site=$ac_optarg ;;
1150
1151 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1152 ac_prev=srcdir ;;
1153 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1154 srcdir=$ac_optarg ;;
1155
1156 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1157 | --syscon | --sysco | --sysc | --sys | --sy)
1158 ac_prev=sysconfdir ;;
1159 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1160 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1161 sysconfdir=$ac_optarg ;;
1162
1163 -target | --target | --targe | --targ | --tar | --ta | --t)
1164 ac_prev=target_alias ;;
1165 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1166 target_alias=$ac_optarg ;;
1167
1168 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1169 verbose=yes ;;
1170
1171 -version | --version | --versio | --versi | --vers | -V)
1172 ac_init_version=: ;;
1173
1174 -with-* | --with-*)
1175 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1176 # Reject names that are not valid shell variable names.
1177 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1178 as_fn_error $? "invalid package name: \`$ac_useropt'"
1179 ac_useropt_orig=$ac_useropt
1180 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1181 case $ac_user_opts in
1182 *"
1183 "with_$ac_useropt"
1184 "*) ;;
1185 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1186 ac_unrecognized_sep=', ';;
1187 esac
1188 eval with_$ac_useropt=\$ac_optarg ;;
1189
1190 -without-* | --without-*)
1191 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1192 # Reject names that are not valid shell variable names.
1193 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194 as_fn_error $? "invalid package name: \`$ac_useropt'"
1195 ac_useropt_orig=$ac_useropt
1196 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1197 case $ac_user_opts in
1198 *"
1199 "with_$ac_useropt"
1200 "*) ;;
1201 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1202 ac_unrecognized_sep=', ';;
1203 esac
1204 eval with_$ac_useropt=no ;;
1205
1206 --x)
1207 # Obsolete; use --with-x.
1208 with_x=yes ;;
1209
1210 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1211 | --x-incl | --x-inc | --x-in | --x-i)
1212 ac_prev=x_includes ;;
1213 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1214 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1215 x_includes=$ac_optarg ;;
1216
1217 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1218 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1219 ac_prev=x_libraries ;;
1220 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1221 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1222 x_libraries=$ac_optarg ;;
1223
1224 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1225 Try \`$0 --help' for more information"
1226 ;;
1227
1228 *=*)
1229 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1230 # Reject names that are not valid shell variable names.
1231 case $ac_envvar in #(
1232 '' | [0-9]* | *[!_$as_cr_alnum]* )
1233 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1234 esac
1235 eval $ac_envvar=\$ac_optarg
1236 export $ac_envvar ;;
1237
1238 *)
1239 # FIXME: should be removed in autoconf 3.0.
1240 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1241 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1242 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1243 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1244 ;;
1245
1246 esac
1247 done
1248
1249 if test -n "$ac_prev"; then
1250 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1251 as_fn_error $? "missing argument to $ac_option"
1252 fi
1253
1254 if test -n "$ac_unrecognized_opts"; then
1255 case $enable_option_checking in
1256 no) ;;
1257 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1258 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1259 esac
1260 fi
1261
1262 # Check all directory arguments for consistency.
1263 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1264 datadir sysconfdir sharedstatedir localstatedir includedir \
1265 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1266 libdir localedir mandir runstatedir
1267 do
1268 eval ac_val=\$$ac_var
1269 # Remove trailing slashes.
1270 case $ac_val in
1271 */ )
1272 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1273 eval $ac_var=\$ac_val;;
1274 esac
1275 # Be sure to have absolute directory names.
1276 case $ac_val in
1277 [\\/$]* | ?:[\\/]* ) continue;;
1278 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1279 esac
1280 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1281 done
1282
1283 # There might be people who depend on the old broken behavior: `$host'
1284 # used to hold the argument of --host etc.
1285 # FIXME: To remove some day.
1286 build=$build_alias
1287 host=$host_alias
1288 target=$target_alias
1289
1290 # FIXME: To remove some day.
1291 if test "x$host_alias" != x; then
1292 if test "x$build_alias" = x; then
1293 cross_compiling=maybe
1294 elif test "x$build_alias" != "x$host_alias"; then
1295 cross_compiling=yes
1296 fi
1297 fi
1298
1299 ac_tool_prefix=
1300 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1301
1302 test "$silent" = yes && exec 6>/dev/null
1303
1304
1305 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1306 ac_ls_di=`ls -di .` &&
1307 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1308 as_fn_error $? "working directory cannot be determined"
1309 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1310 as_fn_error $? "pwd does not report name of working directory"
1311
1312
1313 # Find the source files, if location was not specified.
1314 if test -z "$srcdir"; then
1315 ac_srcdir_defaulted=yes
1316 # Try the directory containing this script, then the parent directory.
1317 ac_confdir=`$as_dirname -- "$as_myself" ||
1318 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1319 X"$as_myself" : 'X\(//\)[^/]' \| \
1320 X"$as_myself" : 'X\(//\)$' \| \
1321 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1322 printf "%s\n" X"$as_myself" |
1323 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1324 s//\1/
1325 q
1326 }
1327 /^X\(\/\/\)[^/].*/{
1328 s//\1/
1329 q
1330 }
1331 /^X\(\/\/\)$/{
1332 s//\1/
1333 q
1334 }
1335 /^X\(\/\).*/{
1336 s//\1/
1337 q
1338 }
1339 s/.*/./; q'`
1340 srcdir=$ac_confdir
1341 if test ! -r "$srcdir/$ac_unique_file"; then
1342 srcdir=..
1343 fi
1344 else
1345 ac_srcdir_defaulted=no
1346 fi
1347 if test ! -r "$srcdir/$ac_unique_file"; then
1348 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1349 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1350 fi
1351 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1352 ac_abs_confdir=`(
1353 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1354 pwd)`
1355 # When building in place, set srcdir=.
1356 if test "$ac_abs_confdir" = "$ac_pwd"; then
1357 srcdir=.
1358 fi
1359 # Remove unnecessary trailing slashes from srcdir.
1360 # Double slashes in file names in object file debugging info
1361 # mess up M-x gdb in Emacs.
1362 case $srcdir in
1363 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1364 esac
1365 for ac_var in $ac_precious_vars; do
1366 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1367 eval ac_env_${ac_var}_value=\$${ac_var}
1368 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1369 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1370 done
1371
1372 #
1373 # Report the --help message.
1374 #
1375 if test "$ac_init_help" = "long"; then
1376 # Omit some internal or obsolete options to make the list less imposing.
1377 # This message is too long to be a string in the A/UX 3.1 sh.
1378 cat <<_ACEOF
1379 \`configure' configures LibHTP 0.5.38 to adapt to many kinds of systems.
1380
1381 Usage: $0 [OPTION]... [VAR=VALUE]...
1382
1383 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1384 VAR=VALUE. See below for descriptions of some of the useful variables.
1385
1386 Defaults for the options are specified in brackets.
1387
1388 Configuration:
1389 -h, --help display this help and exit
1390 --help=short display options specific to this package
1391 --help=recursive display the short help of all the included packages
1392 -V, --version display version information and exit
1393 -q, --quiet, --silent do not print \`checking ...' messages
1394 --cache-file=FILE cache test results in FILE [disabled]
1395 -C, --config-cache alias for \`--cache-file=config.cache'
1396 -n, --no-create do not create output files
1397 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1398
1399 Installation directories:
1400 --prefix=PREFIX install architecture-independent files in PREFIX
1401 [$ac_default_prefix]
1402 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1403 [PREFIX]
1404
1405 By default, \`make install' will install all the files in
1406 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1407 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1408 for instance \`--prefix=\$HOME'.
1409
1410 For better control, use the options below.
1411
1412 Fine tuning of the installation directories:
1413 --bindir=DIR user executables [EPREFIX/bin]
1414 --sbindir=DIR system admin executables [EPREFIX/sbin]
1415 --libexecdir=DIR program executables [EPREFIX/libexec]
1416 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1417 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1418 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1419 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1420 --libdir=DIR object code libraries [EPREFIX/lib]
1421 --includedir=DIR C header files [PREFIX/include]
1422 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1423 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1424 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1425 --infodir=DIR info documentation [DATAROOTDIR/info]
1426 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1427 --mandir=DIR man documentation [DATAROOTDIR/man]
1428 --docdir=DIR documentation root [DATAROOTDIR/doc/libhtp]
1429 --htmldir=DIR html documentation [DOCDIR]
1430 --dvidir=DIR dvi documentation [DOCDIR]
1431 --pdfdir=DIR pdf documentation [DOCDIR]
1432 --psdir=DIR ps documentation [DOCDIR]
1433 _ACEOF
1434
1435 cat <<\_ACEOF
1436
1437 Program names:
1438 --program-prefix=PREFIX prepend PREFIX to installed program names
1439 --program-suffix=SUFFIX append SUFFIX to installed program names
1440 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1441
1442 System types:
1443 --build=BUILD configure for building on BUILD [guessed]
1444 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1445 _ACEOF
1446 fi
1447
1448 if test -n "$ac_init_help"; then
1449 case $ac_init_help in
1450 short | recursive ) echo "Configuration of LibHTP 0.5.38:";;
1451 esac
1452 cat <<\_ACEOF
1453
1454 Optional Features:
1455 --disable-option-checking ignore unrecognized --enable/--with options
1456 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1457 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1458 --enable-silent-rules less verbose build output (undo: "make V=1")
1459 --disable-silent-rules verbose build output (undo: "make V=0")
1460 --enable-debug Enable debug mode
1461 --enable-devmode Enable development mode
1462 --enable-gcov Enable gcov support
1463 --enable-dependency-tracking
1464 do not reject slow dependency extractors
1465 --disable-dependency-tracking
1466 speeds up one-time build
1467 --enable-shared[=PKGS] build shared libraries [default=yes]
1468 --enable-static[=PKGS] build static libraries [default=yes]
1469 --enable-fast-install[=PKGS]
1470 optimize for fast installation [default=yes]
1471 --disable-libtool-lock avoid locking (might break parallel builds)
1472 --disable-rpath do not hardcode runtime library paths
1473
1474 Optional Packages:
1475 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1476 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1477 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1478 both]
1479 --with-aix-soname=aix|svr4|both
1480 shared library versioning (aka "SONAME") variant to
1481 provide on AIX, [default=aix].
1482 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1483 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
1484 compiler's sysroot if not specified).
1485 --with-gnu-ld assume the C compiler uses GNU ld default=no
1486 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1487 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1488 --with-doxygen=PROG doxygen executable
1489
1490 Some influential environment variables:
1491 CC C compiler command
1492 CFLAGS C compiler flags
1493 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1494 nonstandard directory <lib dir>
1495 LIBS libraries to pass to the linker, e.g. -l<library>
1496 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1497 you have headers in a nonstandard directory <include dir>
1498 CXX C++ compiler command
1499 CXXFLAGS C++ compiler flags
1500 LT_SYS_LIBRARY_PATH
1501 User-defined run-time library search path.
1502 CXXCPP C++ preprocessor
1503 CPP C preprocessor
1504
1505 Use these variables to override the choices made by `configure' or to help
1506 it to find libraries and programs with nonstandard names/locations.
1507
1508 Report bugs to the package provider.
1509 _ACEOF
1510 ac_status=$?
1511 fi
1512
1513 if test "$ac_init_help" = "recursive"; then
1514 # If there are subdirs, report their specific --help.
1515 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1516 test -d "$ac_dir" ||
1517 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1518 continue
1519 ac_builddir=.
1520
1521 case "$ac_dir" in
1522 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1523 *)
1524 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1525 # A ".." for each directory in $ac_dir_suffix.
1526 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1527 case $ac_top_builddir_sub in
1528 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1529 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1530 esac ;;
1531 esac
1532 ac_abs_top_builddir=$ac_pwd
1533 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1534 # for backward compatibility:
1535 ac_top_builddir=$ac_top_build_prefix
1536
1537 case $srcdir in
1538 .) # We are building in place.
1539 ac_srcdir=.
1540 ac_top_srcdir=$ac_top_builddir_sub
1541 ac_abs_top_srcdir=$ac_pwd ;;
1542 [\\/]* | ?:[\\/]* ) # Absolute name.
1543 ac_srcdir=$srcdir$ac_dir_suffix;
1544 ac_top_srcdir=$srcdir
1545 ac_abs_top_srcdir=$srcdir ;;
1546 *) # Relative name.
1547 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1548 ac_top_srcdir=$ac_top_build_prefix$srcdir
1549 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1550 esac
1551 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1552
1553 cd "$ac_dir" || { ac_status=$?; continue; }
1554 # Check for configure.gnu first; this name is used for a wrapper for
1555 # Metaconfig's "Configure" on case-insensitive file systems.
1556 if test -f "$ac_srcdir/configure.gnu"; then
1557 echo &&
1558 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1559 elif test -f "$ac_srcdir/configure"; then
1560 echo &&
1561 $SHELL "$ac_srcdir/configure" --help=recursive
1562 else
1563 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1564 fi || ac_status=$?
1565 cd "$ac_pwd" || { ac_status=$?; break; }
1566 done
1567 fi
1568
1569 test -n "$ac_init_help" && exit $ac_status
1570 if $ac_init_version; then
1571 cat <<\_ACEOF
1572 LibHTP configure 0.5.38
1573 generated by GNU Autoconf 2.71
1574
1575 Copyright (C) 2021 Free Software Foundation, Inc.
1576 This configure script is free software; the Free Software Foundation
1577 gives unlimited permission to copy, distribute and modify it.
1578 _ACEOF
1579 exit
1580 fi
1581
1582 ## ------------------------ ##
1583 ## Autoconf initialization. ##
1584 ## ------------------------ ##
1585
1586 # ac_fn_c_try_compile LINENO
1587 # --------------------------
1588 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1589 ac_fn_c_try_compile ()
1590 {
1591 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1592 rm -f conftest.$ac_objext conftest.beam
1593 if { { ac_try="$ac_compile"
1594 case "(($ac_try" in
1595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1596 *) ac_try_echo=$ac_try;;
1597 esac
1598 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1599 printf "%s\n" "$ac_try_echo"; } >&5
1600 (eval "$ac_compile") 2>conftest.err
1601 ac_status=$?
1602 if test -s conftest.err; then
1603 grep -v '^ *+' conftest.err >conftest.er1
1604 cat conftest.er1 >&5
1605 mv -f conftest.er1 conftest.err
1606 fi
1607 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1608 test $ac_status = 0; } && {
1609 test -z "$ac_c_werror_flag" ||
1610 test ! -s conftest.err
1611 } && test -s conftest.$ac_objext
1612 then :
1613 ac_retval=0
1614 else $as_nop
1615 printf "%s\n" "$as_me: failed program was:" >&5
1616 sed 's/^/| /' conftest.$ac_ext >&5
1617
1618 ac_retval=1
1619 fi
1620 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1621 as_fn_set_status $ac_retval
1622
1623 } # ac_fn_c_try_compile
1624
1625 # ac_fn_cxx_try_compile LINENO
1626 # ----------------------------
1627 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1628 ac_fn_cxx_try_compile ()
1629 {
1630 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1631 rm -f conftest.$ac_objext conftest.beam
1632 if { { ac_try="$ac_compile"
1633 case "(($ac_try" in
1634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1635 *) ac_try_echo=$ac_try;;
1636 esac
1637 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1638 printf "%s\n" "$ac_try_echo"; } >&5
1639 (eval "$ac_compile") 2>conftest.err
1640 ac_status=$?
1641 if test -s conftest.err; then
1642 grep -v '^ *+' conftest.err >conftest.er1
1643 cat conftest.er1 >&5
1644 mv -f conftest.er1 conftest.err
1645 fi
1646 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1647 test $ac_status = 0; } && {
1648 test -z "$ac_cxx_werror_flag" ||
1649 test ! -s conftest.err
1650 } && test -s conftest.$ac_objext
1651 then :
1652 ac_retval=0
1653 else $as_nop
1654 printf "%s\n" "$as_me: failed program was:" >&5
1655 sed 's/^/| /' conftest.$ac_ext >&5
1656
1657 ac_retval=1
1658 fi
1659 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1660 as_fn_set_status $ac_retval
1661
1662 } # ac_fn_cxx_try_compile
1663
1664 # ac_fn_c_try_link LINENO
1665 # -----------------------
1666 # Try to link conftest.$ac_ext, and return whether this succeeded.
1667 ac_fn_c_try_link ()
1668 {
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1671 if { { ac_try="$ac_link"
1672 case "(($ac_try" in
1673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1674 *) ac_try_echo=$ac_try;;
1675 esac
1676 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1677 printf "%s\n" "$ac_try_echo"; } >&5
1678 (eval "$ac_link") 2>conftest.err
1679 ac_status=$?
1680 if test -s conftest.err; then
1681 grep -v '^ *+' conftest.err >conftest.er1
1682 cat conftest.er1 >&5
1683 mv -f conftest.er1 conftest.err
1684 fi
1685 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1686 test $ac_status = 0; } && {
1687 test -z "$ac_c_werror_flag" ||
1688 test ! -s conftest.err
1689 } && test -s conftest$ac_exeext && {
1690 test "$cross_compiling" = yes ||
1691 test -x conftest$ac_exeext
1692 }
1693 then :
1694 ac_retval=0
1695 else $as_nop
1696 printf "%s\n" "$as_me: failed program was:" >&5
1697 sed 's/^/| /' conftest.$ac_ext >&5
1698
1699 ac_retval=1
1700 fi
1701 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1702 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1703 # interfere with the next link command; also delete a directory that is
1704 # left behind by Apple's compiler. We do this before executing the actions.
1705 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1706 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1707 as_fn_set_status $ac_retval
1708
1709 } # ac_fn_c_try_link
1710
1711 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1712 # -------------------------------------------------------
1713 # Tests whether HEADER exists and can be compiled using the include files in
1714 # INCLUDES, setting the cache variable VAR accordingly.
1715 ac_fn_c_check_header_compile ()
1716 {
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1719 printf %s "checking for $2... " >&6; }
1720 if eval test \${$3+y}
1721 then :
1722 printf %s "(cached) " >&6
1723 else $as_nop
1724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1725 /* end confdefs.h. */
1726 $4
1727 #include <$2>
1728 _ACEOF
1729 if ac_fn_c_try_compile "$LINENO"
1730 then :
1731 eval "$3=yes"
1732 else $as_nop
1733 eval "$3=no"
1734 fi
1735 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1736 fi
1737 eval ac_res=\$$3
1738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1739 printf "%s\n" "$ac_res" >&6; }
1740 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1741
1742 } # ac_fn_c_check_header_compile
1743
1744 # ac_fn_c_check_func LINENO FUNC VAR
1745 # ----------------------------------
1746 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1747 ac_fn_c_check_func ()
1748 {
1749 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1751 printf %s "checking for $2... " >&6; }
1752 if eval test \${$3+y}
1753 then :
1754 printf %s "(cached) " >&6
1755 else $as_nop
1756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757 /* end confdefs.h. */
1758 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1759 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1760 #define $2 innocuous_$2
1761
1762 /* System header to define __stub macros and hopefully few prototypes,
1763 which can conflict with char $2 (); below. */
1764
1765 #include <limits.h>
1766 #undef $2
1767
1768 /* Override any GCC internal prototype to avoid an error.
1769 Use char because int might match the return type of a GCC
1770 builtin and then its argument prototype would still apply. */
1771 #ifdef __cplusplus
1772 extern "C"
1773 #endif
1774 char $2 ();
1775 /* The GNU C library defines this for functions which it implements
1776 to always fail with ENOSYS. Some functions are actually named
1777 something starting with __ and the normal name is an alias. */
1778 #if defined __stub_$2 || defined __stub___$2
1779 choke me
1780 #endif
1781
1782 int
1783 main (void)
1784 {
1785 return $2 ();
1786 ;
1787 return 0;
1788 }
1789 _ACEOF
1790 if ac_fn_c_try_link "$LINENO"
1791 then :
1792 eval "$3=yes"
1793 else $as_nop
1794 eval "$3=no"
1795 fi
1796 rm -f core conftest.err conftest.$ac_objext conftest.beam \
1797 conftest$ac_exeext conftest.$ac_ext
1798 fi
1799 eval ac_res=\$$3
1800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1801 printf "%s\n" "$ac_res" >&6; }
1802 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803
1804 } # ac_fn_c_check_func
1805
1806 # ac_fn_cxx_try_cpp LINENO
1807 # ------------------------
1808 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1809 ac_fn_cxx_try_cpp ()
1810 {
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 if { { ac_try="$ac_cpp conftest.$ac_ext"
1813 case "(($ac_try" in
1814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1815 *) ac_try_echo=$ac_try;;
1816 esac
1817 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1818 printf "%s\n" "$ac_try_echo"; } >&5
1819 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1820 ac_status=$?
1821 if test -s conftest.err; then
1822 grep -v '^ *+' conftest.err >conftest.er1
1823 cat conftest.er1 >&5
1824 mv -f conftest.er1 conftest.err
1825 fi
1826 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827 test $ac_status = 0; } > conftest.i && {
1828 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
1829 test ! -s conftest.err
1830 }
1831 then :
1832 ac_retval=0
1833 else $as_nop
1834 printf "%s\n" "$as_me: failed program was:" >&5
1835 sed 's/^/| /' conftest.$ac_ext >&5
1836
1837 ac_retval=1
1838 fi
1839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840 as_fn_set_status $ac_retval
1841
1842 } # ac_fn_cxx_try_cpp
1843
1844 # ac_fn_cxx_try_link LINENO
1845 # -------------------------
1846 # Try to link conftest.$ac_ext, and return whether this succeeded.
1847 ac_fn_cxx_try_link ()
1848 {
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1851 if { { ac_try="$ac_link"
1852 case "(($ac_try" in
1853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1854 *) ac_try_echo=$ac_try;;
1855 esac
1856 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1857 printf "%s\n" "$ac_try_echo"; } >&5
1858 (eval "$ac_link") 2>conftest.err
1859 ac_status=$?
1860 if test -s conftest.err; then
1861 grep -v '^ *+' conftest.err >conftest.er1
1862 cat conftest.er1 >&5
1863 mv -f conftest.er1 conftest.err
1864 fi
1865 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } && {
1867 test -z "$ac_cxx_werror_flag" ||
1868 test ! -s conftest.err
1869 } && test -s conftest$ac_exeext && {
1870 test "$cross_compiling" = yes ||
1871 test -x conftest$ac_exeext
1872 }
1873 then :
1874 ac_retval=0
1875 else $as_nop
1876 printf "%s\n" "$as_me: failed program was:" >&5
1877 sed 's/^/| /' conftest.$ac_ext >&5
1878
1879 ac_retval=1
1880 fi
1881 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1882 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1883 # interfere with the next link command; also delete a directory that is
1884 # left behind by Apple's compiler. We do this before executing the actions.
1885 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1887 as_fn_set_status $ac_retval
1888
1889 } # ac_fn_cxx_try_link
1890
1891 # ac_fn_c_try_cpp LINENO
1892 # ----------------------
1893 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1894 ac_fn_c_try_cpp ()
1895 {
1896 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1897 if { { ac_try="$ac_cpp conftest.$ac_ext"
1898 case "(($ac_try" in
1899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900 *) ac_try_echo=$ac_try;;
1901 esac
1902 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903 printf "%s\n" "$ac_try_echo"; } >&5
1904 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1905 ac_status=$?
1906 if test -s conftest.err; then
1907 grep -v '^ *+' conftest.err >conftest.er1
1908 cat conftest.er1 >&5
1909 mv -f conftest.er1 conftest.err
1910 fi
1911 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912 test $ac_status = 0; } > conftest.i && {
1913 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1914 test ! -s conftest.err
1915 }
1916 then :
1917 ac_retval=0
1918 else $as_nop
1919 printf "%s\n" "$as_me: failed program was:" >&5
1920 sed 's/^/| /' conftest.$ac_ext >&5
1921
1922 ac_retval=1
1923 fi
1924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1925 as_fn_set_status $ac_retval
1926
1927 } # ac_fn_c_try_cpp
1928
1929 # ac_fn_c_try_run LINENO
1930 # ----------------------
1931 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1932 # executables *can* be run.
1933 ac_fn_c_try_run ()
1934 {
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 if { { ac_try="$ac_link"
1937 case "(($ac_try" in
1938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1939 *) ac_try_echo=$ac_try;;
1940 esac
1941 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1942 printf "%s\n" "$ac_try_echo"; } >&5
1943 (eval "$ac_link") 2>&5
1944 ac_status=$?
1945 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1946 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1947 { { case "(($ac_try" in
1948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1949 *) ac_try_echo=$ac_try;;
1950 esac
1951 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1952 printf "%s\n" "$ac_try_echo"; } >&5
1953 (eval "$ac_try") 2>&5
1954 ac_status=$?
1955 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1956 test $ac_status = 0; }; }
1957 then :
1958 ac_retval=0
1959 else $as_nop
1960 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1961 printf "%s\n" "$as_me: failed program was:" >&5
1962 sed 's/^/| /' conftest.$ac_ext >&5
1963
1964 ac_retval=$ac_status
1965 fi
1966 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1967 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1968 as_fn_set_status $ac_retval
1969
1970 } # ac_fn_c_try_run
1971 ac_configure_args_raw=
1972 for ac_arg
1973 do
1974 case $ac_arg in
1975 *\'*)
1976 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1977 esac
1978 as_fn_append ac_configure_args_raw " '$ac_arg'"
1979 done
1980
1981 case $ac_configure_args_raw in
1982 *$as_nl*)
1983 ac_safe_unquote= ;;
1984 *)
1985 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
1986 ac_unsafe_a="$ac_unsafe_z#~"
1987 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
1988 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
1989 esac
1990
1991 cat >config.log <<_ACEOF
1992 This file contains any messages produced by compilers while
1993 running configure, to aid debugging if configure makes a mistake.
1994
1995 It was created by LibHTP $as_me 0.5.38, which was
1996 generated by GNU Autoconf 2.71. Invocation command line was
1997
1998 $ $0$ac_configure_args_raw
1999
2000 _ACEOF
2001 exec 5>>config.log
2002 {
2003 cat <<_ASUNAME
2004 ## --------- ##
2005 ## Platform. ##
2006 ## --------- ##
2007
2008 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2009 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2010 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2011 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2012 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2013
2014 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2015 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2016
2017 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2018 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2019 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2020 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2021 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2022 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2023 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2024
2025 _ASUNAME
2026
2027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2028 for as_dir in $PATH
2029 do
2030 IFS=$as_save_IFS
2031 case $as_dir in #(((
2032 '') as_dir=./ ;;
2033 */) ;;
2034 *) as_dir=$as_dir/ ;;
2035 esac
2036 printf "%s\n" "PATH: $as_dir"
2037 done
2038 IFS=$as_save_IFS
2039
2040 } >&5
2041
2042 cat >&5 <<_ACEOF
2043
2044
2045 ## ----------- ##
2046 ## Core tests. ##
2047 ## ----------- ##
2048
2049 _ACEOF
2050
2051
2052 # Keep a trace of the command line.
2053 # Strip out --no-create and --no-recursion so they do not pile up.
2054 # Strip out --silent because we don't want to record it for future runs.
2055 # Also quote any args containing shell meta-characters.
2056 # Make two passes to allow for proper duplicate-argument suppression.
2057 ac_configure_args=
2058 ac_configure_args0=
2059 ac_configure_args1=
2060 ac_must_keep_next=false
2061 for ac_pass in 1 2
2062 do
2063 for ac_arg
2064 do
2065 case $ac_arg in
2066 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2068 | -silent | --silent | --silen | --sile | --sil)
2069 continue ;;
2070 *\'*)
2071 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2072 esac
2073 case $ac_pass in
2074 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2075 2)
2076 as_fn_append ac_configure_args1 " '$ac_arg'"
2077 if test $ac_must_keep_next = true; then
2078 ac_must_keep_next=false # Got value, back to normal.
2079 else
2080 case $ac_arg in
2081 *=* | --config-cache | -C | -disable-* | --disable-* \
2082 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2083 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2084 | -with-* | --with-* | -without-* | --without-* | --x)
2085 case "$ac_configure_args0 " in
2086 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2087 esac
2088 ;;
2089 -* ) ac_must_keep_next=true ;;
2090 esac
2091 fi
2092 as_fn_append ac_configure_args " '$ac_arg'"
2093 ;;
2094 esac
2095 done
2096 done
2097 { ac_configure_args0=; unset ac_configure_args0;}
2098 { ac_configure_args1=; unset ac_configure_args1;}
2099
2100 # When interrupted or exit'd, cleanup temporary files, and complete
2101 # config.log. We remove comments because anyway the quotes in there
2102 # would cause problems or look ugly.
2103 # WARNING: Use '\'' to represent an apostrophe within the trap.
2104 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2105 trap 'exit_status=$?
2106 # Sanitize IFS.
2107 IFS=" "" $as_nl"
2108 # Save into config.log some information that might help in debugging.
2109 {
2110 echo
2111
2112 printf "%s\n" "## ---------------- ##
2113 ## Cache variables. ##
2114 ## ---------------- ##"
2115 echo
2116 # The following way of writing the cache mishandles newlines in values,
2117 (
2118 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2119 eval ac_val=\$$ac_var
2120 case $ac_val in #(
2121 *${as_nl}*)
2122 case $ac_var in #(
2123 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2124 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2125 esac
2126 case $ac_var in #(
2127 _ | IFS | as_nl) ;; #(
2128 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2129 *) { eval $ac_var=; unset $ac_var;} ;;
2130 esac ;;
2131 esac
2132 done
2133 (set) 2>&1 |
2134 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2135 *${as_nl}ac_space=\ *)
2136 sed -n \
2137 "s/'\''/'\''\\\\'\'''\''/g;
2138 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2139 ;; #(
2140 *)
2141 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2142 ;;
2143 esac |
2144 sort
2145 )
2146 echo
2147
2148 printf "%s\n" "## ----------------- ##
2149 ## Output variables. ##
2150 ## ----------------- ##"
2151 echo
2152 for ac_var in $ac_subst_vars
2153 do
2154 eval ac_val=\$$ac_var
2155 case $ac_val in
2156 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2157 esac
2158 printf "%s\n" "$ac_var='\''$ac_val'\''"
2159 done | sort
2160 echo
2161
2162 if test -n "$ac_subst_files"; then
2163 printf "%s\n" "## ------------------- ##
2164 ## File substitutions. ##
2165 ## ------------------- ##"
2166 echo
2167 for ac_var in $ac_subst_files
2168 do
2169 eval ac_val=\$$ac_var
2170 case $ac_val in
2171 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2172 esac
2173 printf "%s\n" "$ac_var='\''$ac_val'\''"
2174 done | sort
2175 echo
2176 fi
2177
2178 if test -s confdefs.h; then
2179 printf "%s\n" "## ----------- ##
2180 ## confdefs.h. ##
2181 ## ----------- ##"
2182 echo
2183 cat confdefs.h
2184 echo
2185 fi
2186 test "$ac_signal" != 0 &&
2187 printf "%s\n" "$as_me: caught signal $ac_signal"
2188 printf "%s\n" "$as_me: exit $exit_status"
2189 } >&5
2190 rm -f core *.core core.conftest.* &&
2191 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2192 exit $exit_status
2193 ' 0
2194 for ac_signal in 1 2 13 15; do
2195 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2196 done
2197 ac_signal=0
2198
2199 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2200 rm -f -r conftest* confdefs.h
2201
2202 printf "%s\n" "/* confdefs.h */" > confdefs.h
2203
2204 # Predefined preprocessor variables.
2205
2206 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2207
2208 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2209
2210 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2211
2212 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2213
2214 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2215
2216 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2217
2218
2219 # Let the site file select an alternate cache file if it wants to.
2220 # Prefer an explicitly selected file to automatically selected ones.
2221 if test -n "$CONFIG_SITE"; then
2222 ac_site_files="$CONFIG_SITE"
2223 elif test "x$prefix" != xNONE; then
2224 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2225 else
2226 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2227 fi
2228
2229 for ac_site_file in $ac_site_files
2230 do
2231 case $ac_site_file in #(
2232 */*) :
2233 ;; #(
2234 *) :
2235 ac_site_file=./$ac_site_file ;;
2236 esac
2237 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2239 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2240 sed 's/^/| /' "$ac_site_file" >&5
2241 . "$ac_site_file" \
2242 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2243 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2244 as_fn_error $? "failed to load site script $ac_site_file
2245 See \`config.log' for more details" "$LINENO" 5; }
2246 fi
2247 done
2248
2249 if test -r "$cache_file"; then
2250 # Some versions of bash will fail to source /dev/null (special files
2251 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2252 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2254 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2255 case $cache_file in
2256 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2257 *) . "./$cache_file";;
2258 esac
2259 fi
2260 else
2261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2262 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2263 >$cache_file
2264 fi
2265
2266 # Test code for whether the C compiler supports C89 (global declarations)
2267 ac_c_conftest_c89_globals='
2268 /* Does the compiler advertise C89 conformance?
2269 Do not test the value of __STDC__, because some compilers set it to 0
2270 while being otherwise adequately conformant. */
2271 #if !defined __STDC__
2272 # error "Compiler does not advertise C89 conformance"
2273 #endif
2274
2275 #include <stddef.h>
2276 #include <stdarg.h>
2277 struct stat;
2278 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2279 struct buf { int x; };
2280 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2281 static char *e (p, i)
2282 char **p;
2283 int i;
2284 {
2285 return p[i];
2286 }
2287 static char *f (char * (*g) (char **, int), char **p, ...)
2288 {
2289 char *s;
2290 va_list v;
2291 va_start (v,p);
2292 s = g (p, va_arg (v,int));
2293 va_end (v);
2294 return s;
2295 }
2296
2297 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2298 function prototypes and stuff, but not \xHH hex character constants.
2299 These do not provoke an error unfortunately, instead are silently treated
2300 as an "x". The following induces an error, until -std is added to get
2301 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2302 array size at least. It is necessary to write \x00 == 0 to get something
2303 that is true only with -std. */
2304 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2305
2306 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2307 inside strings and character constants. */
2308 #define FOO(x) '\''x'\''
2309 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2310
2311 int test (int i, double x);
2312 struct s1 {int (*f) (int a);};
2313 struct s2 {int (*f) (double a);};
2314 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2315 int, int);'
2316
2317 # Test code for whether the C compiler supports C89 (body of main).
2318 ac_c_conftest_c89_main='
2319 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2320 '
2321
2322 # Test code for whether the C compiler supports C99 (global declarations)
2323 ac_c_conftest_c99_globals='
2324 // Does the compiler advertise C99 conformance?
2325 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2326 # error "Compiler does not advertise C99 conformance"
2327 #endif
2328
2329 #include <stdbool.h>
2330 extern int puts (const char *);
2331 extern int printf (const char *, ...);
2332 extern int dprintf (int, const char *, ...);
2333 extern void *malloc (size_t);
2334
2335 // Check varargs macros. These examples are taken from C99 6.10.3.5.
2336 // dprintf is used instead of fprintf to avoid needing to declare
2337 // FILE and stderr.
2338 #define debug(...) dprintf (2, __VA_ARGS__)
2339 #define showlist(...) puts (#__VA_ARGS__)
2340 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2341 static void
2342 test_varargs_macros (void)
2343 {
2344 int x = 1234;
2345 int y = 5678;
2346 debug ("Flag");
2347 debug ("X = %d\n", x);
2348 showlist (The first, second, and third items.);
2349 report (x>y, "x is %d but y is %d", x, y);
2350 }
2351
2352 // Check long long types.
2353 #define BIG64 18446744073709551615ull
2354 #define BIG32 4294967295ul
2355 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2356 #if !BIG_OK
2357 #error "your preprocessor is broken"
2358 #endif
2359 #if BIG_OK
2360 #else
2361 #error "your preprocessor is broken"
2362 #endif
2363 static long long int bignum = -9223372036854775807LL;
2364 static unsigned long long int ubignum = BIG64;
2365
2366 struct incomplete_array
2367 {
2368 int datasize;
2369 double data[];
2370 };
2371
2372 struct named_init {
2373 int number;
2374 const wchar_t *name;
2375 double average;
2376 };
2377
2378 typedef const char *ccp;
2379
2380 static inline int
2381 test_restrict (ccp restrict text)
2382 {
2383 // See if C++-style comments work.
2384 // Iterate through items via the restricted pointer.
2385 // Also check for declarations in for loops.
2386 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2387 continue;
2388 return 0;
2389 }
2390
2391 // Check varargs and va_copy.
2392 static bool
2393 test_varargs (const char *format, ...)
2394 {
2395 va_list args;
2396 va_start (args, format);
2397 va_list args_copy;
2398 va_copy (args_copy, args);
2399
2400 const char *str = "";
2401 int number = 0;
2402 float fnumber = 0;
2403
2404 while (*format)
2405 {
2406 switch (*format++)
2407 {
2408 case '\''s'\'': // string
2409 str = va_arg (args_copy, const char *);
2410 break;
2411 case '\''d'\'': // int
2412 number = va_arg (args_copy, int);
2413 break;
2414 case '\''f'\'': // float
2415 fnumber = va_arg (args_copy, double);
2416 break;
2417 default:
2418 break;
2419 }
2420 }
2421 va_end (args_copy);
2422 va_end (args);
2423
2424 return *str && number && fnumber;
2425 }
2426 '
2427
2428 # Test code for whether the C compiler supports C99 (body of main).
2429 ac_c_conftest_c99_main='
2430 // Check bool.
2431 _Bool success = false;
2432 success |= (argc != 0);
2433
2434 // Check restrict.
2435 if (test_restrict ("String literal") == 0)
2436 success = true;
2437 char *restrict newvar = "Another string";
2438
2439 // Check varargs.
2440 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2441 test_varargs_macros ();
2442
2443 // Check flexible array members.
2444 struct incomplete_array *ia =
2445 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2446 ia->datasize = 10;
2447 for (int i = 0; i < ia->datasize; ++i)
2448 ia->data[i] = i * 1.234;
2449
2450 // Check named initializers.
2451 struct named_init ni = {
2452 .number = 34,
2453 .name = L"Test wide string",
2454 .average = 543.34343,
2455 };
2456
2457 ni.number = 58;
2458
2459 int dynamic_array[ni.number];
2460 dynamic_array[0] = argv[0][0];
2461 dynamic_array[ni.number - 1] = 543;
2462
2463 // work around unused variable warnings
2464 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2465 || dynamic_array[ni.number - 1] != 543);
2466 '
2467
2468 # Test code for whether the C compiler supports C11 (global declarations)
2469 ac_c_conftest_c11_globals='
2470 // Does the compiler advertise C11 conformance?
2471 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2472 # error "Compiler does not advertise C11 conformance"
2473 #endif
2474
2475 // Check _Alignas.
2476 char _Alignas (double) aligned_as_double;
2477 char _Alignas (0) no_special_alignment;
2478 extern char aligned_as_int;
2479 char _Alignas (0) _Alignas (int) aligned_as_int;
2480
2481 // Check _Alignof.
2482 enum
2483 {
2484 int_alignment = _Alignof (int),
2485 int_array_alignment = _Alignof (int[100]),
2486 char_alignment = _Alignof (char)
2487 };
2488 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2489
2490 // Check _Noreturn.
2491 int _Noreturn does_not_return (void) { for (;;) continue; }
2492
2493 // Check _Static_assert.
2494 struct test_static_assert
2495 {
2496 int x;
2497 _Static_assert (sizeof (int) <= sizeof (long int),
2498 "_Static_assert does not work in struct");
2499 long int y;
2500 };
2501
2502 // Check UTF-8 literals.
2503 #define u8 syntax error!
2504 char const utf8_literal[] = u8"happens to be ASCII" "another string";
2505
2506 // Check duplicate typedefs.
2507 typedef long *long_ptr;
2508 typedef long int *long_ptr;
2509 typedef long_ptr long_ptr;
2510
2511 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2512 struct anonymous
2513 {
2514 union {
2515 struct { int i; int j; };
2516 struct { int k; long int l; } w;
2517 };
2518 int m;
2519 } v1;
2520 '
2521
2522 # Test code for whether the C compiler supports C11 (body of main).
2523 ac_c_conftest_c11_main='
2524 _Static_assert ((offsetof (struct anonymous, i)
2525 == offsetof (struct anonymous, w.k)),
2526 "Anonymous union alignment botch");
2527 v1.i = 2;
2528 v1.w.k = 5;
2529 ok |= v1.i != 5;
2530 '
2531
2532 # Test code for whether the C compiler supports C11 (complete).
2533 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2534 ${ac_c_conftest_c99_globals}
2535 ${ac_c_conftest_c11_globals}
2536
2537 int
2538 main (int argc, char **argv)
2539 {
2540 int ok = 0;
2541 ${ac_c_conftest_c89_main}
2542 ${ac_c_conftest_c99_main}
2543 ${ac_c_conftest_c11_main}
2544 return ok;
2545 }
2546 "
2547
2548 # Test code for whether the C compiler supports C99 (complete).
2549 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2550 ${ac_c_conftest_c99_globals}
2551
2552 int
2553 main (int argc, char **argv)
2554 {
2555 int ok = 0;
2556 ${ac_c_conftest_c89_main}
2557 ${ac_c_conftest_c99_main}
2558 return ok;
2559 }
2560 "
2561
2562 # Test code for whether the C compiler supports C89 (complete).
2563 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2564
2565 int
2566 main (int argc, char **argv)
2567 {
2568 int ok = 0;
2569 ${ac_c_conftest_c89_main}
2570 return ok;
2571 }
2572 "
2573
2574 # Test code for whether the C++ compiler supports C++98 (global declarations)
2575 ac_cxx_conftest_cxx98_globals='
2576 // Does the compiler advertise C++98 conformance?
2577 #if !defined __cplusplus || __cplusplus < 199711L
2578 # error "Compiler does not advertise C++98 conformance"
2579 #endif
2580
2581 // These inclusions are to reject old compilers that
2582 // lack the unsuffixed header files.
2583 #include <cstdlib>
2584 #include <exception>
2585
2586 // <cassert> and <cstring> are *not* freestanding headers in C++98.
2587 extern void assert (int);
2588 namespace std {
2589 extern int strcmp (const char *, const char *);
2590 }
2591
2592 // Namespaces, exceptions, and templates were all added after "C++ 2.0".
2593 using std::exception;
2594 using std::strcmp;
2595
2596 namespace {
2597
2598 void test_exception_syntax()
2599 {
2600 try {
2601 throw "test";
2602 } catch (const char *s) {
2603 // Extra parentheses suppress a warning when building autoconf itself,
2604 // due to lint rules shared with more typical C programs.
2605 assert (!(strcmp) (s, "test"));
2606 }
2607 }
2608
2609 template <typename T> struct test_template
2610 {
2611 T const val;
2612 explicit test_template(T t) : val(t) {}
2613 template <typename U> T add(U u) { return static_cast<T>(u) + val; }
2614 };
2615
2616 } // anonymous namespace
2617 '
2618
2619 # Test code for whether the C++ compiler supports C++98 (body of main)
2620 ac_cxx_conftest_cxx98_main='
2621 assert (argc);
2622 assert (! argv[0]);
2623 {
2624 test_exception_syntax ();
2625 test_template<double> tt (2.0);
2626 assert (tt.add (4) == 6.0);
2627 assert (true && !false);
2628 }
2629 '
2630
2631 # Test code for whether the C++ compiler supports C++11 (global declarations)
2632 ac_cxx_conftest_cxx11_globals='
2633 // Does the compiler advertise C++ 2011 conformance?
2634 #if !defined __cplusplus || __cplusplus < 201103L
2635 # error "Compiler does not advertise C++11 conformance"
2636 #endif
2637
2638 namespace cxx11test
2639 {
2640 constexpr int get_val() { return 20; }
2641
2642 struct testinit
2643 {
2644 int i;
2645 double d;
2646 };
2647
2648 class delegate
2649 {
2650 public:
2651 delegate(int n) : n(n) {}
2652 delegate(): delegate(2354) {}
2653
2654 virtual int getval() { return this->n; };
2655 protected:
2656 int n;
2657 };
2658
2659 class overridden : public delegate
2660 {
2661 public:
2662 overridden(int n): delegate(n) {}
2663 virtual int getval() override final { return this->n * 2; }
2664 };
2665
2666 class nocopy
2667 {
2668 public:
2669 nocopy(int i): i(i) {}
2670 nocopy() = default;
2671 nocopy(const nocopy&) = delete;
2672 nocopy & operator=(const nocopy&) = delete;
2673 private:
2674 int i;
2675 };
2676
2677 // for testing lambda expressions
2678 template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
2679 {
2680 return f(v);
2681 }
2682
2683 // for testing variadic templates and trailing return types
2684 template <typename V> auto sum(V first) -> V
2685 {
2686 return first;
2687 }
2688 template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
2689 {
2690 return first + sum(rest...);
2691 }
2692 }
2693 '
2694
2695 # Test code for whether the C++ compiler supports C++11 (body of main)
2696 ac_cxx_conftest_cxx11_main='
2697 {
2698 // Test auto and decltype
2699 auto a1 = 6538;
2700 auto a2 = 48573953.4;
2701 auto a3 = "String literal";
2702
2703 int total = 0;
2704 for (auto i = a3; *i; ++i) { total += *i; }
2705
2706 decltype(a2) a4 = 34895.034;
2707 }
2708 {
2709 // Test constexpr
2710 short sa[cxx11test::get_val()] = { 0 };
2711 }
2712 {
2713 // Test initializer lists
2714 cxx11test::testinit il = { 4323, 435234.23544 };
2715 }
2716 {
2717 // Test range-based for
2718 int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
2719 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
2720 for (auto &x : array) { x += 23; }
2721 }
2722 {
2723 // Test lambda expressions
2724 using cxx11test::eval;
2725 assert (eval ([](int x) { return x*2; }, 21) == 42);
2726 double d = 2.0;
2727 assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
2728 assert (d == 5.0);
2729 assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
2730 assert (d == 5.0);
2731 }
2732 {
2733 // Test use of variadic templates
2734 using cxx11test::sum;
2735 auto a = sum(1);
2736 auto b = sum(1, 2);
2737 auto c = sum(1.0, 2.0, 3.0);
2738 }
2739 {
2740 // Test constructor delegation
2741 cxx11test::delegate d1;
2742 cxx11test::delegate d2();
2743 cxx11test::delegate d3(45);
2744 }
2745 {
2746 // Test override and final
2747 cxx11test::overridden o1(55464);
2748 }
2749 {
2750 // Test nullptr
2751 char *c = nullptr;
2752 }
2753 {
2754 // Test template brackets
2755 test_template<::test_template<int>> v(test_template<int>(12));
2756 }
2757 {
2758 // Unicode literals
2759 char const *utf8 = u8"UTF-8 string \u2500";
2760 char16_t const *utf16 = u"UTF-8 string \u2500";
2761 char32_t const *utf32 = U"UTF-32 string \u2500";
2762 }
2763 '
2764
2765 # Test code for whether the C compiler supports C++11 (complete).
2766 ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
2767 ${ac_cxx_conftest_cxx11_globals}
2768
2769 int
2770 main (int argc, char **argv)
2771 {
2772 int ok = 0;
2773 ${ac_cxx_conftest_cxx98_main}
2774 ${ac_cxx_conftest_cxx11_main}
2775 return ok;
2776 }
2777 "
2778
2779 # Test code for whether the C compiler supports C++98 (complete).
2780 ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
2781 int
2782 main (int argc, char **argv)
2783 {
2784 int ok = 0;
2785 ${ac_cxx_conftest_cxx98_main}
2786 return ok;
2787 }
2788 "
2789
2790 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2791 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2792 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2793 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2794 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2795 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2796 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2797 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2798 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2799
2800 # Auxiliary files required by this configure script.
2801 ac_aux_files="config.rpath config.guess config.sub ltmain.sh compile missing install-sh"
2802
2803 # Locations in which to look for auxiliary files.
2804 ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
2805
2806 # Search for a directory containing all of the required auxiliary files,
2807 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2808 # If we don't find one directory that contains all the files we need,
2809 # we report the set of missing files from the *first* directory in
2810 # $ac_aux_dir_candidates and give up.
2811 ac_missing_aux_files=""
2812 ac_first_candidate=:
2813 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
2814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2815 as_found=false
2816 for as_dir in $ac_aux_dir_candidates
2817 do
2818 IFS=$as_save_IFS
2819 case $as_dir in #(((
2820 '') as_dir=./ ;;
2821 */) ;;
2822 *) as_dir=$as_dir/ ;;
2823 esac
2824 as_found=:
2825
2826 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
2827 ac_aux_dir_found=yes
2828 ac_install_sh=
2829 for ac_aux in $ac_aux_files
2830 do
2831 # As a special case, if "install-sh" is required, that requirement
2832 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
2833 # and $ac_install_sh is set appropriately for whichever one is found.
2834 if test x"$ac_aux" = x"install-sh"
2835 then
2836 if test -f "${as_dir}install-sh"; then
2837 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
2838 ac_install_sh="${as_dir}install-sh -c"
2839 elif test -f "${as_dir}install.sh"; then
2840 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
2841 ac_install_sh="${as_dir}install.sh -c"
2842 elif test -f "${as_dir}shtool"; then
2843 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
2844 ac_install_sh="${as_dir}shtool install -c"
2845 else
2846 ac_aux_dir_found=no
2847 if $ac_first_candidate; then
2848 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
2849 else
2850 break
2851 fi
2852 fi
2853 else
2854 if test -f "${as_dir}${ac_aux}"; then
2855 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
2856 else
2857 ac_aux_dir_found=no
2858 if $ac_first_candidate; then
2859 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
2860 else
2861 break
2862 fi
2863 fi
2864 fi
2865 done
2866 if test "$ac_aux_dir_found" = yes; then
2867 ac_aux_dir="$as_dir"
2868 break
2869 fi
2870 ac_first_candidate=false
2871
2872 as_found=false
2873 done
2874 IFS=$as_save_IFS
2875 if $as_found
2876 then :
2877
2878 else $as_nop
2879 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
2880 fi
2881
2882
2883 # These three variables are undocumented and unsupported,
2884 # and are intended to be withdrawn in a future Autoconf release.
2885 # They can cause serious problems if a builder's source tree is in a directory
2886 # whose full name contains unusual characters.
2887 if test -f "${ac_aux_dir}config.guess"; then
2888 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
2889 fi
2890 if test -f "${ac_aux_dir}config.sub"; then
2891 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
2892 fi
2893 if test -f "$ac_aux_dir/configure"; then
2894 ac_configure="$SHELL ${ac_aux_dir}configure"
2895 fi
2896
2897 # Check that the precious variables saved in the cache have kept the same
2898 # value.
2899 ac_cache_corrupted=false
2900 for ac_var in $ac_precious_vars; do
2901 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2902 eval ac_new_set=\$ac_env_${ac_var}_set
2903 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2904 eval ac_new_val=\$ac_env_${ac_var}_value
2905 case $ac_old_set,$ac_new_set in
2906 set,)
2907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2908 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2909 ac_cache_corrupted=: ;;
2910 ,set)
2911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2912 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2913 ac_cache_corrupted=: ;;
2914 ,);;
2915 *)
2916 if test "x$ac_old_val" != "x$ac_new_val"; then
2917 # differences in whitespace do not lead to failure.
2918 ac_old_val_w=`echo x $ac_old_val`
2919 ac_new_val_w=`echo x $ac_new_val`
2920 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2922 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2923 ac_cache_corrupted=:
2924 else
2925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2926 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2927 eval $ac_var=\$ac_old_val
2928 fi
2929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2930 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2932 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2933 fi;;
2934 esac
2935 # Pass precious variables to config.status.
2936 if test "$ac_new_set" = set; then
2937 case $ac_new_val in
2938 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2939 *) ac_arg=$ac_var=$ac_new_val ;;
2940 esac
2941 case " $ac_configure_args " in
2942 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2943 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2944 esac
2945 fi
2946 done
2947 if $ac_cache_corrupted; then
2948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2949 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2951 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2952 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2953 and start over" "$LINENO" 5
2954 fi
2955 ## -------------------- ##
2956 ## Main body of script. ##
2957 ## -------------------- ##
2958
2959 ac_ext=c
2960 ac_cpp='$CPP $CPPFLAGS'
2961 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2962 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2963 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2964
2965
2966 am__api_version='1.16'
2967
2968
2969
2970 # Find a good install program. We prefer a C program (faster),
2971 # so one script is as good as another. But avoid the broken or
2972 # incompatible versions:
2973 # SysV /etc/install, /usr/sbin/install
2974 # SunOS /usr/etc/install
2975 # IRIX /sbin/install
2976 # AIX /bin/install
2977 # AmigaOS /C/install, which installs bootblocks on floppy discs
2978 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2979 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2980 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2981 # OS/2's system install, which has a completely different semantic
2982 # ./install, which can be erroneously created by make from ./install.sh.
2983 # Reject install programs that cannot install multiple files.
2984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2985 printf %s "checking for a BSD-compatible install... " >&6; }
2986 if test -z "$INSTALL"; then
2987 if test ${ac_cv_path_install+y}
2988 then :
2989 printf %s "(cached) " >&6
2990 else $as_nop
2991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2992 for as_dir in $PATH
2993 do
2994 IFS=$as_save_IFS
2995 case $as_dir in #(((
2996 '') as_dir=./ ;;
2997 */) ;;
2998 *) as_dir=$as_dir/ ;;
2999 esac
3000 # Account for fact that we put trailing slashes in our PATH walk.
3001 case $as_dir in #((
3002 ./ | /[cC]/* | \
3003 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3004 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3005 /usr/ucb/* ) ;;
3006 *)
3007 # OSF1 and SCO ODT 3.0 have their own names for install.
3008 # Don't use installbsd from OSF since it installs stuff as root
3009 # by default.
3010 for ac_prog in ginstall scoinst install; do
3011 for ac_exec_ext in '' $ac_executable_extensions; do
3012 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3013 if test $ac_prog = install &&
3014 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3015 # AIX install. It has an incompatible calling convention.
3016 :
3017 elif test $ac_prog = install &&
3018 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3019 # program-specific install script used by HP pwplus--don't use.
3020 :
3021 else
3022 rm -rf conftest.one conftest.two conftest.dir
3023 echo one > conftest.one
3024 echo two > conftest.two
3025 mkdir conftest.dir
3026 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
3027 test -s conftest.one && test -s conftest.two &&
3028 test -s conftest.dir/conftest.one &&
3029 test -s conftest.dir/conftest.two
3030 then
3031 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3032 break 3
3033 fi
3034 fi
3035 fi
3036 done
3037 done
3038 ;;
3039 esac
3040
3041 done
3042 IFS=$as_save_IFS
3043
3044 rm -rf conftest.one conftest.two conftest.dir
3045
3046 fi
3047 if test ${ac_cv_path_install+y}; then
3048 INSTALL=$ac_cv_path_install
3049 else
3050 # As a last resort, use the slow shell script. Don't cache a
3051 # value for INSTALL within a source directory, because that will
3052 # break other packages using the cache if that directory is
3053 # removed, or if the value is a relative name.
3054 INSTALL=$ac_install_sh
3055 fi
3056 fi
3057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3058 printf "%s\n" "$INSTALL" >&6; }
3059
3060 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3061 # It thinks the first close brace ends the variable substitution.
3062 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3063
3064 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3065
3066 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3067
3068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3069 printf %s "checking whether build environment is sane... " >&6; }
3070 # Reject unsafe characters in $srcdir or the absolute working directory
3071 # name. Accept space and tab only in the latter.
3072 am_lf='
3073 '
3074 case `pwd` in
3075 *[\\\"\#\$\&\'\`$am_lf]*)
3076 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3077 esac
3078 case $srcdir in
3079 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3080 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3081 esac
3082
3083 # Do 'set' in a subshell so we don't clobber the current shell's
3084 # arguments. Must try -L first in case configure is actually a
3085 # symlink; some systems play weird games with the mod time of symlinks
3086 # (eg FreeBSD returns the mod time of the symlink's containing
3087 # directory).
3088 if (
3089 am_has_slept=no
3090 for am_try in 1 2; do
3091 echo "timestamp, slept: $am_has_slept" > conftest.file
3092 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3093 if test "$*" = "X"; then
3094 # -L didn't work.
3095 set X `ls -t "$srcdir/configure" conftest.file`
3096 fi
3097 if test "$*" != "X $srcdir/configure conftest.file" \
3098 && test "$*" != "X conftest.file $srcdir/configure"; then
3099
3100 # If neither matched, then we have a broken ls. This can happen
3101 # if, for instance, CONFIG_SHELL is bash and it inherits a
3102 # broken ls alias from the environment. This has actually
3103 # happened. Such a system could not be considered "sane".
3104 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3105 alias in your environment" "$LINENO" 5
3106 fi
3107 if test "$2" = conftest.file || test $am_try -eq 2; then
3108 break
3109 fi
3110 # Just in case.
3111 sleep 1
3112 am_has_slept=yes
3113 done
3114 test "$2" = conftest.file
3115 )
3116 then
3117 # Ok.
3118 :
3119 else
3120 as_fn_error $? "newly created file is older than distributed files!
3121 Check your system clock" "$LINENO" 5
3122 fi
3123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3124 printf "%s\n" "yes" >&6; }
3125 # If we didn't sleep, we still need to ensure time stamps of config.status and
3126 # generated files are strictly newer.
3127 am_sleep_pid=
3128 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3129 ( sleep 1 ) &
3130 am_sleep_pid=$!
3131 fi
3132
3133 rm -f conftest.file
3134
3135 test "$program_prefix" != NONE &&
3136 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3137 # Use a double $ so make ignores it.
3138 test "$program_suffix" != NONE &&
3139 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3140 # Double any \ or $.
3141 # By default was `s,x,x', remove it if useless.
3142 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3143 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3144
3145
3146 # Expand $ac_aux_dir to an absolute path.
3147 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3148
3149
3150 if test x"${MISSING+set}" != xset; then
3151 MISSING="\${SHELL} '$am_aux_dir/missing'"
3152 fi
3153 # Use eval to expand $SHELL
3154 if eval "$MISSING --is-lightweight"; then
3155 am_missing_run="$MISSING "
3156 else
3157 am_missing_run=
3158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3159 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3160 fi
3161
3162 if test x"${install_sh+set}" != xset; then
3163 case $am_aux_dir in
3164 *\ * | *\ *)
3165 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3166 *)
3167 install_sh="\${SHELL} $am_aux_dir/install-sh"
3168 esac
3169 fi
3170
3171 # Installed binaries are usually stripped using 'strip' when the user
3172 # run "make install-strip". However 'strip' might not be the right
3173 # tool to use in cross-compilation environments, therefore Automake
3174 # will honor the 'STRIP' environment variable to overrule this program.
3175 if test "$cross_compiling" != no; then
3176 if test -n "$ac_tool_prefix"; then
3177 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3178 set dummy ${ac_tool_prefix}strip; ac_word=$2
3179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3180 printf %s "checking for $ac_word... " >&6; }
3181 if test ${ac_cv_prog_STRIP+y}
3182 then :
3183 printf %s "(cached) " >&6
3184 else $as_nop
3185 if test -n "$STRIP"; then
3186 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3187 else
3188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3189 for as_dir in $PATH
3190 do
3191 IFS=$as_save_IFS
3192 case $as_dir in #(((
3193 '') as_dir=./ ;;
3194 */) ;;
3195 *) as_dir=$as_dir/ ;;
3196 esac
3197 for ac_exec_ext in '' $ac_executable_extensions; do
3198 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3199 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3200 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3201 break 2
3202 fi
3203 done
3204 done
3205 IFS=$as_save_IFS
3206
3207 fi
3208 fi
3209 STRIP=$ac_cv_prog_STRIP
3210 if test -n "$STRIP"; then
3211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3212 printf "%s\n" "$STRIP" >&6; }
3213 else
3214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3215 printf "%s\n" "no" >&6; }
3216 fi
3217
3218
3219 fi
3220 if test -z "$ac_cv_prog_STRIP"; then
3221 ac_ct_STRIP=$STRIP
3222 # Extract the first word of "strip", so it can be a program name with args.
3223 set dummy strip; ac_word=$2
3224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3225 printf %s "checking for $ac_word... " >&6; }
3226 if test ${ac_cv_prog_ac_ct_STRIP+y}
3227 then :
3228 printf %s "(cached) " >&6
3229 else $as_nop
3230 if test -n "$ac_ct_STRIP"; then
3231 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3232 else
3233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3234 for as_dir in $PATH
3235 do
3236 IFS=$as_save_IFS
3237 case $as_dir in #(((
3238 '') as_dir=./ ;;
3239 */) ;;
3240 *) as_dir=$as_dir/ ;;
3241 esac
3242 for ac_exec_ext in '' $ac_executable_extensions; do
3243 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3244 ac_cv_prog_ac_ct_STRIP="strip"
3245 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3246 break 2
3247 fi
3248 done
3249 done
3250 IFS=$as_save_IFS
3251
3252 fi
3253 fi
3254 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3255 if test -n "$ac_ct_STRIP"; then
3256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3257 printf "%s\n" "$ac_ct_STRIP" >&6; }
3258 else
3259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3260 printf "%s\n" "no" >&6; }
3261 fi
3262
3263 if test "x$ac_ct_STRIP" = x; then
3264 STRIP=":"
3265 else
3266 case $cross_compiling:$ac_tool_warned in
3267 yes:)
3268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3269 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3270 ac_tool_warned=yes ;;
3271 esac
3272 STRIP=$ac_ct_STRIP
3273 fi
3274 else
3275 STRIP="$ac_cv_prog_STRIP"
3276 fi
3277
3278 fi
3279 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3280
3281
3282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
3283 printf %s "checking for a race-free mkdir -p... " >&6; }
3284 if test -z "$MKDIR_P"; then
3285 if test ${ac_cv_path_mkdir+y}
3286 then :
3287 printf %s "(cached) " >&6
3288 else $as_nop
3289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3290 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3291 do
3292 IFS=$as_save_IFS
3293 case $as_dir in #(((
3294 '') as_dir=./ ;;
3295 */) ;;
3296 *) as_dir=$as_dir/ ;;
3297 esac
3298 for ac_prog in mkdir gmkdir; do
3299 for ac_exec_ext in '' $ac_executable_extensions; do
3300 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3301 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3302 'mkdir ('*'coreutils) '* | \
3303 'BusyBox '* | \
3304 'mkdir (fileutils) '4.1*)
3305 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3306 break 3;;
3307 esac
3308 done
3309 done
3310 done
3311 IFS=$as_save_IFS
3312
3313 fi
3314
3315 test -d ./--version && rmdir ./--version
3316 if test ${ac_cv_path_mkdir+y}; then
3317 MKDIR_P="$ac_cv_path_mkdir -p"
3318 else
3319 # As a last resort, use the slow shell script. Don't cache a
3320 # value for MKDIR_P within a source directory, because that will
3321 # break other packages using the cache if that directory is
3322 # removed, or if the value is a relative name.
3323 MKDIR_P="$ac_install_sh -d"
3324 fi
3325 fi
3326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3327 printf "%s\n" "$MKDIR_P" >&6; }
3328
3329 for ac_prog in gawk mawk nawk awk
3330 do
3331 # Extract the first word of "$ac_prog", so it can be a program name with args.
3332 set dummy $ac_prog; ac_word=$2
3333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3334 printf %s "checking for $ac_word... " >&6; }
3335 if test ${ac_cv_prog_AWK+y}
3336 then :
3337 printf %s "(cached) " >&6
3338 else $as_nop
3339 if test -n "$AWK"; then
3340 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3341 else
3342 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3343 for as_dir in $PATH
3344 do
3345 IFS=$as_save_IFS
3346 case $as_dir in #(((
3347 '') as_dir=./ ;;
3348 */) ;;
3349 *) as_dir=$as_dir/ ;;
3350 esac
3351 for ac_exec_ext in '' $ac_executable_extensions; do
3352 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3353 ac_cv_prog_AWK="$ac_prog"
3354 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3355 break 2
3356 fi
3357 done
3358 done
3359 IFS=$as_save_IFS
3360
3361 fi
3362 fi
3363 AWK=$ac_cv_prog_AWK
3364 if test -n "$AWK"; then
3365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3366 printf "%s\n" "$AWK" >&6; }
3367 else
3368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3369 printf "%s\n" "no" >&6; }
3370 fi
3371
3372
3373 test -n "$AWK" && break
3374 done
3375
3376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3377 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3378 set x ${MAKE-make}
3379 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3380 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3381 then :
3382 printf %s "(cached) " >&6
3383 else $as_nop
3384 cat >conftest.make <<\_ACEOF
3385 SHELL = /bin/sh
3386 all:
3387 @echo '@@@%%%=$(MAKE)=@@@%%%'
3388 _ACEOF
3389 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3390 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3391 *@@@%%%=?*=@@@%%%*)
3392 eval ac_cv_prog_make_${ac_make}_set=yes;;
3393 *)
3394 eval ac_cv_prog_make_${ac_make}_set=no;;
3395 esac
3396 rm -f conftest.make
3397 fi
3398 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3400 printf "%s\n" "yes" >&6; }
3401 SET_MAKE=
3402 else
3403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3404 printf "%s\n" "no" >&6; }
3405 SET_MAKE="MAKE=${MAKE-make}"
3406 fi
3407
3408 rm -rf .tst 2>/dev/null
3409 mkdir .tst 2>/dev/null
3410 if test -d .tst; then
3411 am__leading_dot=.
3412 else
3413 am__leading_dot=_
3414 fi
3415 rmdir .tst 2>/dev/null
3416
3417 # Check whether --enable-silent-rules was given.
3418 if test ${enable_silent_rules+y}
3419 then :
3420 enableval=$enable_silent_rules;
3421 fi
3422
3423 case $enable_silent_rules in # (((
3424 yes) AM_DEFAULT_VERBOSITY=0;;
3425 no) AM_DEFAULT_VERBOSITY=1;;
3426 *) AM_DEFAULT_VERBOSITY=1;;
3427 esac
3428 am_make=${MAKE-make}
3429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3430 printf %s "checking whether $am_make supports nested variables... " >&6; }
3431 if test ${am_cv_make_support_nested_variables+y}
3432 then :
3433 printf %s "(cached) " >&6
3434 else $as_nop
3435 if printf "%s\n" 'TRUE=$(BAR$(V))
3436 BAR0=false
3437 BAR1=true
3438 V=1
3439 am__doit:
3440 @$(TRUE)
3441 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3442 am_cv_make_support_nested_variables=yes
3443 else
3444 am_cv_make_support_nested_variables=no
3445 fi
3446 fi
3447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3448 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3449 if test $am_cv_make_support_nested_variables = yes; then
3450 AM_V='$(V)'
3451 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3452 else
3453 AM_V=$AM_DEFAULT_VERBOSITY
3454 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3455 fi
3456 AM_BACKSLASH='\'
3457
3458 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3459 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3460 # is not polluted with repeated "-I."
3461 am__isrc=' -I$(srcdir)'
3462 # test to see if srcdir already configured
3463 if test -f $srcdir/config.status; then
3464 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3465 fi
3466 fi
3467
3468 # test whether we have cygpath
3469 if test -z "$CYGPATH_W"; then
3470 if (cygpath --version) >/dev/null 2>/dev/null; then
3471 CYGPATH_W='cygpath -w'
3472 else
3473 CYGPATH_W=echo
3474 fi
3475 fi
3476
3477
3478 # Define the identity of the package.
3479 PACKAGE='libhtp'
3480 VERSION='0.5.38'
3481
3482
3483 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
3484
3485
3486 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
3487
3488 # Some tools Automake needs.
3489
3490 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3491
3492
3493 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3494
3495
3496 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3497
3498
3499 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3500
3501
3502 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3503
3504 # For better backward compatibility. To be removed once Automake 1.9.x
3505 # dies out for good. For more background, see:
3506 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3507 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3508 mkdir_p='$(MKDIR_P)'
3509
3510 # We need awk for the "check" target (and possibly the TAP driver). The
3511 # system "awk" is bad on some platforms.
3512 # Always define AMTAR for backward compatibility. Yes, it's still used
3513 # in the wild :-( We should find a proper way to deprecate it ...
3514 AMTAR='$${TAR-tar}'
3515
3516
3517 # We'll loop over all known methods to create a tar archive until one works.
3518 _am_tools='gnutar pax cpio none'
3519
3520 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3521
3522
3523
3524
3525
3526 # Variables for tags utilities; see am/tags.am
3527 if test -z "$CTAGS"; then
3528 CTAGS=ctags
3529 fi
3530
3531 if test -z "$ETAGS"; then
3532 ETAGS=etags
3533 fi
3534
3535 if test -z "$CSCOPE"; then
3536 CSCOPE=cscope
3537 fi
3538
3539
3540
3541 # POSIX will say in a future version that running "rm -f" with no argument
3542 # is OK; and we want to be able to make that assumption in our Makefile
3543 # recipes. So use an aggressive probe to check that the usage we want is
3544 # actually supported "in the wild" to an acceptable degree.
3545 # See automake bug#10828.
3546 # To make any issue more visible, cause the running configure to be aborted
3547 # by default if the 'rm' program in use doesn't match our expectations; the
3548 # user can still override this though.
3549 if rm -f && rm -fr && rm -rf; then : OK; else
3550 cat >&2 <<'END'
3551 Oops!
3552
3553 Your 'rm' program seems unable to run without file operands specified
3554 on the command line, even when the '-f' option is present. This is contrary
3555 to the behaviour of most rm programs out there, and not conforming with
3556 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3557
3558 Please tell bug-automake@gnu.org about your system, including the value
3559 of your $PATH and any error possibly output before this message. This
3560 can help us improve future automake versions.
3561
3562 END
3563 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3564 echo 'Configuration will proceed anyway, since you have set the' >&2
3565 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3566 echo >&2
3567 else
3568 cat >&2 <<'END'
3569 Aborting the configuration process, to ensure you take notice of the issue.
3570
3571 You can download and install GNU coreutils to get an 'rm' implementation
3572 that behaves properly: <https://www.gnu.org/software/coreutils/>.
3573
3574 If you want to complete the configuration process using your problematic
3575 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3576 to "yes", and re-run configure.
3577
3578 END
3579 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3580 fi
3581 fi
3582
3583
3584 ac_config_headers="$ac_config_headers htp_config_auto_gen.h"
3585
3586 ac_config_files="$ac_config_files htp/htp_version.h"
3587
3588
3589
3590
3591 GENERIC_LIBRARY_NAME=htp
3592
3593 # This is _NOT_ the library release version, it's an API version.
3594 GENERIC_LIBRARY_VERSION=2:0:0
3595 # | | |
3596 # +------+ | +---+
3597 # | | |
3598 # current:revision:age
3599 # | | |
3600 # | | +- increment if interfaces have been added
3601 # | | set to zero if interfaces have been removed
3602 # | | or changed
3603 # | +- increment if source code has changed
3604 # | set to zero if current is incremented
3605 # +- increment if interfaces have been added, removed or changed
3606
3607
3608
3609 PACKAGE=$GENERIC_LIBRARY_NAME
3610
3611
3612 GENERIC_VERSION=$PACKAGE_VERSION
3613 GENERIC_RELEASE=$PACKAGE_VERSION
3614
3615
3616
3617 VERSION=$GENERIC_VERSION
3618
3619
3620
3621
3622 # Check whether --enable-debug was given.
3623 if test ${enable_debug+y}
3624 then :
3625 enableval=$enable_debug;
3626 else $as_nop
3627 enable_debug=no
3628 fi
3629
3630 if test "x$enable_debug" = "xyes"; then
3631 CFLAGS="${CFLAGS} -DHTP_DEBUG"
3632 echo "Debug mode enabled"
3633 fi
3634
3635 OLEVEL=2
3636
3637 # Check whether --enable-devmode was given.
3638 if test ${enable_devmode+y}
3639 then :
3640 enableval=$enable_devmode;
3641 else $as_nop
3642 enable_devmode=no
3643 fi
3644
3645 if test "$enable_devmode" = "yes"; then
3646 OLEVEL=0
3647 CFLAGS="${CFLAGS} -Werror -Wfatal-errors"
3648 CPPFLAGS="${CPPFLAGS} -Werror -Wfatal-errors"
3649 echo "Development mode enabled"
3650 fi
3651
3652 # Check whether --enable-gcov was given.
3653 if test ${enable_gcov+y}
3654 then :
3655 enableval=$enable_gcov;
3656 else $as_nop
3657 enable_gcov=no
3658 fi
3659
3660 if test "$enable_gcov" = "yes"; then
3661 OLEVEL=0
3662 CFLAGS="${CFLAGS} --coverage -fprofile-arcs -ftest-coverage"
3663 CPPFLAGS="${CPPFLAGS} --coverage -fprofile-arcs -ftest-coverage"
3664 LDFLAGS="${LDFLAGS} -lgcov --coverage -fprofile-arcs"
3665 echo "gcov support enabled"
3666 fi
3667
3668 CFLAGS="${CFLAGS} -O${OLEVEL}"
3669 CPPFLAGS="${CPPFLAGS} -O${OLEVEL}"
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681 ac_ext=c
3682 ac_cpp='$CPP $CPPFLAGS'
3683 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3684 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3685 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3686 if test -n "$ac_tool_prefix"; then
3687 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3688 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3690 printf %s "checking for $ac_word... " >&6; }
3691 if test ${ac_cv_prog_CC+y}
3692 then :
3693 printf %s "(cached) " >&6
3694 else $as_nop
3695 if test -n "$CC"; then
3696 ac_cv_prog_CC="$CC" # Let the user override the test.
3697 else
3698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3699 for as_dir in $PATH
3700 do
3701 IFS=$as_save_IFS
3702 case $as_dir in #(((
3703 '') as_dir=./ ;;
3704 */) ;;
3705 *) as_dir=$as_dir/ ;;
3706 esac
3707 for ac_exec_ext in '' $ac_executable_extensions; do
3708 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3709 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3710 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3711 break 2
3712 fi
3713 done
3714 done
3715 IFS=$as_save_IFS
3716
3717 fi
3718 fi
3719 CC=$ac_cv_prog_CC
3720 if test -n "$CC"; then
3721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3722 printf "%s\n" "$CC" >&6; }
3723 else
3724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3725 printf "%s\n" "no" >&6; }
3726 fi
3727
3728
3729 fi
3730 if test -z "$ac_cv_prog_CC"; then
3731 ac_ct_CC=$CC
3732 # Extract the first word of "gcc", so it can be a program name with args.
3733 set dummy gcc; ac_word=$2
3734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3735 printf %s "checking for $ac_word... " >&6; }
3736 if test ${ac_cv_prog_ac_ct_CC+y}
3737 then :
3738 printf %s "(cached) " >&6
3739 else $as_nop
3740 if test -n "$ac_ct_CC"; then
3741 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3742 else
3743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3744 for as_dir in $PATH
3745 do
3746 IFS=$as_save_IFS
3747 case $as_dir in #(((
3748 '') as_dir=./ ;;
3749 */) ;;
3750 *) as_dir=$as_dir/ ;;
3751 esac
3752 for ac_exec_ext in '' $ac_executable_extensions; do
3753 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3754 ac_cv_prog_ac_ct_CC="gcc"
3755 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3756 break 2
3757 fi
3758 done
3759 done
3760 IFS=$as_save_IFS
3761
3762 fi
3763 fi
3764 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3765 if test -n "$ac_ct_CC"; then
3766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3767 printf "%s\n" "$ac_ct_CC" >&6; }
3768 else
3769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3770 printf "%s\n" "no" >&6; }
3771 fi
3772
3773 if test "x$ac_ct_CC" = x; then
3774 CC=""
3775 else
3776 case $cross_compiling:$ac_tool_warned in
3777 yes:)
3778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3779 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3780 ac_tool_warned=yes ;;
3781 esac
3782 CC=$ac_ct_CC
3783 fi
3784 else
3785 CC="$ac_cv_prog_CC"
3786 fi
3787
3788 if test -z "$CC"; then
3789 if test -n "$ac_tool_prefix"; then
3790 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3791 set dummy ${ac_tool_prefix}cc; ac_word=$2
3792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3793 printf %s "checking for $ac_word... " >&6; }
3794 if test ${ac_cv_prog_CC+y}
3795 then :
3796 printf %s "(cached) " >&6
3797 else $as_nop
3798 if test -n "$CC"; then
3799 ac_cv_prog_CC="$CC" # Let the user override the test.
3800 else
3801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802 for as_dir in $PATH
3803 do
3804 IFS=$as_save_IFS
3805 case $as_dir in #(((
3806 '') as_dir=./ ;;
3807 */) ;;
3808 *) as_dir=$as_dir/ ;;
3809 esac
3810 for ac_exec_ext in '' $ac_executable_extensions; do
3811 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3812 ac_cv_prog_CC="${ac_tool_prefix}cc"
3813 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3814 break 2
3815 fi
3816 done
3817 done
3818 IFS=$as_save_IFS
3819
3820 fi
3821 fi
3822 CC=$ac_cv_prog_CC
3823 if test -n "$CC"; then
3824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3825 printf "%s\n" "$CC" >&6; }
3826 else
3827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828 printf "%s\n" "no" >&6; }
3829 fi
3830
3831
3832 fi
3833 fi
3834 if test -z "$CC"; then
3835 # Extract the first word of "cc", so it can be a program name with args.
3836 set dummy cc; ac_word=$2
3837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3838 printf %s "checking for $ac_word... " >&6; }
3839 if test ${ac_cv_prog_CC+y}
3840 then :
3841 printf %s "(cached) " >&6
3842 else $as_nop
3843 if test -n "$CC"; then
3844 ac_cv_prog_CC="$CC" # Let the user override the test.
3845 else
3846 ac_prog_rejected=no
3847 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3848 for as_dir in $PATH
3849 do
3850 IFS=$as_save_IFS
3851 case $as_dir in #(((
3852 '') as_dir=./ ;;
3853 */) ;;
3854 *) as_dir=$as_dir/ ;;
3855 esac
3856 for ac_exec_ext in '' $ac_executable_extensions; do
3857 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3858 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3859 ac_prog_rejected=yes
3860 continue
3861 fi
3862 ac_cv_prog_CC="cc"
3863 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3864 break 2
3865 fi
3866 done
3867 done
3868 IFS=$as_save_IFS
3869
3870 if test $ac_prog_rejected = yes; then
3871 # We found a bogon in the path, so make sure we never use it.
3872 set dummy $ac_cv_prog_CC
3873 shift
3874 if test $# != 0; then
3875 # We chose a different compiler from the bogus one.
3876 # However, it has the same basename, so the bogon will be chosen
3877 # first if we set CC to just the basename; use the full file name.
3878 shift
3879 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3880 fi
3881 fi
3882 fi
3883 fi
3884 CC=$ac_cv_prog_CC
3885 if test -n "$CC"; then
3886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3887 printf "%s\n" "$CC" >&6; }
3888 else
3889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3890 printf "%s\n" "no" >&6; }
3891 fi
3892
3893
3894 fi
3895 if test -z "$CC"; then
3896 if test -n "$ac_tool_prefix"; then
3897 for ac_prog in cl.exe
3898 do
3899 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3900 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3902 printf %s "checking for $ac_word... " >&6; }
3903 if test ${ac_cv_prog_CC+y}
3904 then :
3905 printf %s "(cached) " >&6
3906 else $as_nop
3907 if test -n "$CC"; then
3908 ac_cv_prog_CC="$CC" # Let the user override the test.
3909 else
3910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3911 for as_dir in $PATH
3912 do
3913 IFS=$as_save_IFS
3914 case $as_dir in #(((
3915 '') as_dir=./ ;;
3916 */) ;;
3917 *) as_dir=$as_dir/ ;;
3918 esac
3919 for ac_exec_ext in '' $ac_executable_extensions; do
3920 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3921 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3922 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3923 break 2
3924 fi
3925 done
3926 done
3927 IFS=$as_save_IFS
3928
3929 fi
3930 fi
3931 CC=$ac_cv_prog_CC
3932 if test -n "$CC"; then
3933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3934 printf "%s\n" "$CC" >&6; }
3935 else
3936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3937 printf "%s\n" "no" >&6; }
3938 fi
3939
3940
3941 test -n "$CC" && break
3942 done
3943 fi
3944 if test -z "$CC"; then
3945 ac_ct_CC=$CC
3946 for ac_prog in cl.exe
3947 do
3948 # Extract the first word of "$ac_prog", so it can be a program name with args.
3949 set dummy $ac_prog; ac_word=$2
3950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3951 printf %s "checking for $ac_word... " >&6; }
3952 if test ${ac_cv_prog_ac_ct_CC+y}
3953 then :
3954 printf %s "(cached) " >&6
3955 else $as_nop
3956 if test -n "$ac_ct_CC"; then
3957 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3958 else
3959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3960 for as_dir in $PATH
3961 do
3962 IFS=$as_save_IFS
3963 case $as_dir in #(((
3964 '') as_dir=./ ;;
3965 */) ;;
3966 *) as_dir=$as_dir/ ;;
3967 esac
3968 for ac_exec_ext in '' $ac_executable_extensions; do
3969 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3970 ac_cv_prog_ac_ct_CC="$ac_prog"
3971 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3972 break 2
3973 fi
3974 done
3975 done
3976 IFS=$as_save_IFS
3977
3978 fi
3979 fi
3980 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3981 if test -n "$ac_ct_CC"; then
3982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3983 printf "%s\n" "$ac_ct_CC" >&6; }
3984 else
3985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3986 printf "%s\n" "no" >&6; }
3987 fi
3988
3989
3990 test -n "$ac_ct_CC" && break
3991 done
3992
3993 if test "x$ac_ct_CC" = x; then
3994 CC=""
3995 else
3996 case $cross_compiling:$ac_tool_warned in
3997 yes:)
3998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3999 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4000 ac_tool_warned=yes ;;
4001 esac
4002 CC=$ac_ct_CC
4003 fi
4004 fi
4005
4006 fi
4007 if test -z "$CC"; then
4008 if test -n "$ac_tool_prefix"; then
4009 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4010 set dummy ${ac_tool_prefix}clang; ac_word=$2
4011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4012 printf %s "checking for $ac_word... " >&6; }
4013 if test ${ac_cv_prog_CC+y}
4014 then :
4015 printf %s "(cached) " >&6
4016 else $as_nop
4017 if test -n "$CC"; then
4018 ac_cv_prog_CC="$CC" # Let the user override the test.
4019 else
4020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021 for as_dir in $PATH
4022 do
4023 IFS=$as_save_IFS
4024 case $as_dir in #(((
4025 '') as_dir=./ ;;
4026 */) ;;
4027 *) as_dir=$as_dir/ ;;
4028 esac
4029 for ac_exec_ext in '' $ac_executable_extensions; do
4030 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4031 ac_cv_prog_CC="${ac_tool_prefix}clang"
4032 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4033 break 2
4034 fi
4035 done
4036 done
4037 IFS=$as_save_IFS
4038
4039 fi
4040 fi
4041 CC=$ac_cv_prog_CC
4042 if test -n "$CC"; then
4043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4044 printf "%s\n" "$CC" >&6; }
4045 else
4046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4047 printf "%s\n" "no" >&6; }
4048 fi
4049
4050
4051 fi
4052 if test -z "$ac_cv_prog_CC"; then
4053 ac_ct_CC=$CC
4054 # Extract the first word of "clang", so it can be a program name with args.
4055 set dummy clang; ac_word=$2
4056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4057 printf %s "checking for $ac_word... " >&6; }
4058 if test ${ac_cv_prog_ac_ct_CC+y}
4059 then :
4060 printf %s "(cached) " >&6
4061 else $as_nop
4062 if test -n "$ac_ct_CC"; then
4063 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4064 else
4065 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4066 for as_dir in $PATH
4067 do
4068 IFS=$as_save_IFS
4069 case $as_dir in #(((
4070 '') as_dir=./ ;;
4071 */) ;;
4072 *) as_dir=$as_dir/ ;;
4073 esac
4074 for ac_exec_ext in '' $ac_executable_extensions; do
4075 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4076 ac_cv_prog_ac_ct_CC="clang"
4077 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4078 break 2
4079 fi
4080 done
4081 done
4082 IFS=$as_save_IFS
4083
4084 fi
4085 fi
4086 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4087 if test -n "$ac_ct_CC"; then
4088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4089 printf "%s\n" "$ac_ct_CC" >&6; }
4090 else
4091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092 printf "%s\n" "no" >&6; }
4093 fi
4094
4095 if test "x$ac_ct_CC" = x; then
4096 CC=""
4097 else
4098 case $cross_compiling:$ac_tool_warned in
4099 yes:)
4100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4101 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4102 ac_tool_warned=yes ;;
4103 esac
4104 CC=$ac_ct_CC
4105 fi
4106 else
4107 CC="$ac_cv_prog_CC"
4108 fi
4109
4110 fi
4111
4112
4113 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4114 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4115 as_fn_error $? "no acceptable C compiler found in \$PATH
4116 See \`config.log' for more details" "$LINENO" 5; }
4117
4118 # Provide some information about the compiler.
4119 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4120 set X $ac_compile
4121 ac_compiler=$2
4122 for ac_option in --version -v -V -qversion -version; do
4123 { { ac_try="$ac_compiler $ac_option >&5"
4124 case "(($ac_try" in
4125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4126 *) ac_try_echo=$ac_try;;
4127 esac
4128 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4129 printf "%s\n" "$ac_try_echo"; } >&5
4130 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4131 ac_status=$?
4132 if test -s conftest.err; then
4133 sed '10a\
4134 ... rest of stderr output deleted ...
4135 10q' conftest.err >conftest.er1
4136 cat conftest.er1 >&5
4137 fi
4138 rm -f conftest.er1 conftest.err
4139 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4140 test $ac_status = 0; }
4141 done
4142
4143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4144 /* end confdefs.h. */
4145
4146 int
4147 main (void)
4148 {
4149
4150 ;
4151 return 0;
4152 }
4153 _ACEOF
4154 ac_clean_files_save=$ac_clean_files
4155 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4156 # Try to create an executable without -o first, disregard a.out.
4157 # It will help us diagnose broken compilers, and finding out an intuition
4158 # of exeext.
4159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4160 printf %s "checking whether the C compiler works... " >&6; }
4161 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4162
4163 # The possible output files:
4164 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4165
4166 ac_rmfiles=
4167 for ac_file in $ac_files
4168 do
4169 case $ac_file in
4170 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4171 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4172 esac
4173 done
4174 rm -f $ac_rmfiles
4175
4176 if { { ac_try="$ac_link_default"
4177 case "(($ac_try" in
4178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4179 *) ac_try_echo=$ac_try;;
4180 esac
4181 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4182 printf "%s\n" "$ac_try_echo"; } >&5
4183 (eval "$ac_link_default") 2>&5
4184 ac_status=$?
4185 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4186 test $ac_status = 0; }
4187 then :
4188 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4189 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4190 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4191 # so that the user can short-circuit this test for compilers unknown to
4192 # Autoconf.
4193 for ac_file in $ac_files ''
4194 do
4195 test -f "$ac_file" || continue
4196 case $ac_file in
4197 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4198 ;;
4199 [ab].out )
4200 # We found the default executable, but exeext='' is most
4201 # certainly right.
4202 break;;
4203 *.* )
4204 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4205 then :; else
4206 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4207 fi
4208 # We set ac_cv_exeext here because the later test for it is not
4209 # safe: cross compilers may not add the suffix if given an `-o'
4210 # argument, so we may need to know it at that point already.
4211 # Even if this section looks crufty: it has the advantage of
4212 # actually working.
4213 break;;
4214 * )
4215 break;;
4216 esac
4217 done
4218 test "$ac_cv_exeext" = no && ac_cv_exeext=
4219
4220 else $as_nop
4221 ac_file=''
4222 fi
4223 if test -z "$ac_file"
4224 then :
4225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4226 printf "%s\n" "no" >&6; }
4227 printf "%s\n" "$as_me: failed program was:" >&5
4228 sed 's/^/| /' conftest.$ac_ext >&5
4229
4230 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4231 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4232 as_fn_error 77 "C compiler cannot create executables
4233 See \`config.log' for more details" "$LINENO" 5; }
4234 else $as_nop
4235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4236 printf "%s\n" "yes" >&6; }
4237 fi
4238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4239 printf %s "checking for C compiler default output file name... " >&6; }
4240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4241 printf "%s\n" "$ac_file" >&6; }
4242 ac_exeext=$ac_cv_exeext
4243
4244 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4245 ac_clean_files=$ac_clean_files_save
4246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4247 printf %s "checking for suffix of executables... " >&6; }
4248 if { { ac_try="$ac_link"
4249 case "(($ac_try" in
4250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4251 *) ac_try_echo=$ac_try;;
4252 esac
4253 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4254 printf "%s\n" "$ac_try_echo"; } >&5
4255 (eval "$ac_link") 2>&5
4256 ac_status=$?
4257 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4258 test $ac_status = 0; }
4259 then :
4260 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4261 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4262 # work properly (i.e., refer to `conftest.exe'), while it won't with
4263 # `rm'.
4264 for ac_file in conftest.exe conftest conftest.*; do
4265 test -f "$ac_file" || continue
4266 case $ac_file in
4267 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4268 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4269 break;;
4270 * ) break;;
4271 esac
4272 done
4273 else $as_nop
4274 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4275 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4276 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4277 See \`config.log' for more details" "$LINENO" 5; }
4278 fi
4279 rm -f conftest conftest$ac_cv_exeext
4280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4281 printf "%s\n" "$ac_cv_exeext" >&6; }
4282
4283 rm -f conftest.$ac_ext
4284 EXEEXT=$ac_cv_exeext
4285 ac_exeext=$EXEEXT
4286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4287 /* end confdefs.h. */
4288 #include <stdio.h>
4289 int
4290 main (void)
4291 {
4292 FILE *f = fopen ("conftest.out", "w");
4293 return ferror (f) || fclose (f) != 0;
4294
4295 ;
4296 return 0;
4297 }
4298 _ACEOF
4299 ac_clean_files="$ac_clean_files conftest.out"
4300 # Check that the compiler produces executables we can run. If not, either
4301 # the compiler is broken, or we cross compile.
4302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4303 printf %s "checking whether we are cross compiling... " >&6; }
4304 if test "$cross_compiling" != yes; then
4305 { { ac_try="$ac_link"
4306 case "(($ac_try" in
4307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4308 *) ac_try_echo=$ac_try;;
4309 esac
4310 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4311 printf "%s\n" "$ac_try_echo"; } >&5
4312 (eval "$ac_link") 2>&5
4313 ac_status=$?
4314 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4315 test $ac_status = 0; }
4316 if { ac_try='./conftest$ac_cv_exeext'
4317 { { case "(($ac_try" in
4318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4319 *) ac_try_echo=$ac_try;;
4320 esac
4321 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4322 printf "%s\n" "$ac_try_echo"; } >&5
4323 (eval "$ac_try") 2>&5
4324 ac_status=$?
4325 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4326 test $ac_status = 0; }; }; then
4327 cross_compiling=no
4328 else
4329 if test "$cross_compiling" = maybe; then
4330 cross_compiling=yes
4331 else
4332 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4333 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4334 as_fn_error 77 "cannot run C compiled programs.
4335 If you meant to cross compile, use \`--host'.
4336 See \`config.log' for more details" "$LINENO" 5; }
4337 fi
4338 fi
4339 fi
4340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4341 printf "%s\n" "$cross_compiling" >&6; }
4342
4343 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4344 ac_clean_files=$ac_clean_files_save
4345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4346 printf %s "checking for suffix of object files... " >&6; }
4347 if test ${ac_cv_objext+y}
4348 then :
4349 printf %s "(cached) " >&6
4350 else $as_nop
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352 /* end confdefs.h. */
4353
4354 int
4355 main (void)
4356 {
4357
4358 ;
4359 return 0;
4360 }
4361 _ACEOF
4362 rm -f conftest.o conftest.obj
4363 if { { ac_try="$ac_compile"
4364 case "(($ac_try" in
4365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4366 *) ac_try_echo=$ac_try;;
4367 esac
4368 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4369 printf "%s\n" "$ac_try_echo"; } >&5
4370 (eval "$ac_compile") 2>&5
4371 ac_status=$?
4372 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4373 test $ac_status = 0; }
4374 then :
4375 for ac_file in conftest.o conftest.obj conftest.*; do
4376 test -f "$ac_file" || continue;
4377 case $ac_file in
4378 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4379 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4380 break;;
4381 esac
4382 done
4383 else $as_nop
4384 printf "%s\n" "$as_me: failed program was:" >&5
4385 sed 's/^/| /' conftest.$ac_ext >&5
4386
4387 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4388 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4389 as_fn_error $? "cannot compute suffix of object files: cannot compile
4390 See \`config.log' for more details" "$LINENO" 5; }
4391 fi
4392 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4393 fi
4394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4395 printf "%s\n" "$ac_cv_objext" >&6; }
4396 OBJEXT=$ac_cv_objext
4397 ac_objext=$OBJEXT
4398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4399 printf %s "checking whether the compiler supports GNU C... " >&6; }
4400 if test ${ac_cv_c_compiler_gnu+y}
4401 then :
4402 printf %s "(cached) " >&6
4403 else $as_nop
4404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4405 /* end confdefs.h. */
4406
4407 int
4408 main (void)
4409 {
4410 #ifndef __GNUC__
4411 choke me
4412 #endif
4413
4414 ;
4415 return 0;
4416 }
4417 _ACEOF
4418 if ac_fn_c_try_compile "$LINENO"
4419 then :
4420 ac_compiler_gnu=yes
4421 else $as_nop
4422 ac_compiler_gnu=no
4423 fi
4424 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4425 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4426
4427 fi
4428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4429 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4430 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4431
4432 if test $ac_compiler_gnu = yes; then
4433 GCC=yes
4434 else
4435 GCC=
4436 fi
4437 ac_test_CFLAGS=${CFLAGS+y}
4438 ac_save_CFLAGS=$CFLAGS
4439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4440 printf %s "checking whether $CC accepts -g... " >&6; }
4441 if test ${ac_cv_prog_cc_g+y}
4442 then :
4443 printf %s "(cached) " >&6
4444 else $as_nop
4445 ac_save_c_werror_flag=$ac_c_werror_flag
4446 ac_c_werror_flag=yes
4447 ac_cv_prog_cc_g=no
4448 CFLAGS="-g"
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h. */
4451
4452 int
4453 main (void)
4454 {
4455
4456 ;
4457 return 0;
4458 }
4459 _ACEOF
4460 if ac_fn_c_try_compile "$LINENO"
4461 then :
4462 ac_cv_prog_cc_g=yes
4463 else $as_nop
4464 CFLAGS=""
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466 /* end confdefs.h. */
4467
4468 int
4469 main (void)
4470 {
4471
4472 ;
4473 return 0;
4474 }
4475 _ACEOF
4476 if ac_fn_c_try_compile "$LINENO"
4477 then :
4478
4479 else $as_nop
4480 ac_c_werror_flag=$ac_save_c_werror_flag
4481 CFLAGS="-g"
4482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4483 /* end confdefs.h. */
4484
4485 int
4486 main (void)
4487 {
4488
4489 ;
4490 return 0;
4491 }
4492 _ACEOF
4493 if ac_fn_c_try_compile "$LINENO"
4494 then :
4495 ac_cv_prog_cc_g=yes
4496 fi
4497 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4498 fi
4499 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4500 fi
4501 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4502 ac_c_werror_flag=$ac_save_c_werror_flag
4503 fi
4504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4505 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4506 if test $ac_test_CFLAGS; then
4507 CFLAGS=$ac_save_CFLAGS
4508 elif test $ac_cv_prog_cc_g = yes; then
4509 if test "$GCC" = yes; then
4510 CFLAGS="-g -O2"
4511 else
4512 CFLAGS="-g"
4513 fi
4514 else
4515 if test "$GCC" = yes; then
4516 CFLAGS="-O2"
4517 else
4518 CFLAGS=
4519 fi
4520 fi
4521 ac_prog_cc_stdc=no
4522 if test x$ac_prog_cc_stdc = xno
4523 then :
4524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4525 printf %s "checking for $CC option to enable C11 features... " >&6; }
4526 if test ${ac_cv_prog_cc_c11+y}
4527 then :
4528 printf %s "(cached) " >&6
4529 else $as_nop
4530 ac_cv_prog_cc_c11=no
4531 ac_save_CC=$CC
4532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4533 /* end confdefs.h. */
4534 $ac_c_conftest_c11_program
4535 _ACEOF
4536 for ac_arg in '' -std=gnu11
4537 do
4538 CC="$ac_save_CC $ac_arg"
4539 if ac_fn_c_try_compile "$LINENO"
4540 then :
4541 ac_cv_prog_cc_c11=$ac_arg
4542 fi
4543 rm -f core conftest.err conftest.$ac_objext conftest.beam
4544 test "x$ac_cv_prog_cc_c11" != "xno" && break
4545 done
4546 rm -f conftest.$ac_ext
4547 CC=$ac_save_CC
4548 fi
4549
4550 if test "x$ac_cv_prog_cc_c11" = xno
4551 then :
4552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4553 printf "%s\n" "unsupported" >&6; }
4554 else $as_nop
4555 if test "x$ac_cv_prog_cc_c11" = x
4556 then :
4557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4558 printf "%s\n" "none needed" >&6; }
4559 else $as_nop
4560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4561 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4562 CC="$CC $ac_cv_prog_cc_c11"
4563 fi
4564 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4565 ac_prog_cc_stdc=c11
4566 fi
4567 fi
4568 if test x$ac_prog_cc_stdc = xno
4569 then :
4570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4571 printf %s "checking for $CC option to enable C99 features... " >&6; }
4572 if test ${ac_cv_prog_cc_c99+y}
4573 then :
4574 printf %s "(cached) " >&6
4575 else $as_nop
4576 ac_cv_prog_cc_c99=no
4577 ac_save_CC=$CC
4578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4579 /* end confdefs.h. */
4580 $ac_c_conftest_c99_program
4581 _ACEOF
4582 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4583 do
4584 CC="$ac_save_CC $ac_arg"
4585 if ac_fn_c_try_compile "$LINENO"
4586 then :
4587 ac_cv_prog_cc_c99=$ac_arg
4588 fi
4589 rm -f core conftest.err conftest.$ac_objext conftest.beam
4590 test "x$ac_cv_prog_cc_c99" != "xno" && break
4591 done
4592 rm -f conftest.$ac_ext
4593 CC=$ac_save_CC
4594 fi
4595
4596 if test "x$ac_cv_prog_cc_c99" = xno
4597 then :
4598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4599 printf "%s\n" "unsupported" >&6; }
4600 else $as_nop
4601 if test "x$ac_cv_prog_cc_c99" = x
4602 then :
4603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4604 printf "%s\n" "none needed" >&6; }
4605 else $as_nop
4606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4607 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4608 CC="$CC $ac_cv_prog_cc_c99"
4609 fi
4610 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4611 ac_prog_cc_stdc=c99
4612 fi
4613 fi
4614 if test x$ac_prog_cc_stdc = xno
4615 then :
4616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4617 printf %s "checking for $CC option to enable C89 features... " >&6; }
4618 if test ${ac_cv_prog_cc_c89+y}
4619 then :
4620 printf %s "(cached) " >&6
4621 else $as_nop
4622 ac_cv_prog_cc_c89=no
4623 ac_save_CC=$CC
4624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4625 /* end confdefs.h. */
4626 $ac_c_conftest_c89_program
4627 _ACEOF
4628 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4629 do
4630 CC="$ac_save_CC $ac_arg"
4631 if ac_fn_c_try_compile "$LINENO"
4632 then :
4633 ac_cv_prog_cc_c89=$ac_arg
4634 fi
4635 rm -f core conftest.err conftest.$ac_objext conftest.beam
4636 test "x$ac_cv_prog_cc_c89" != "xno" && break
4637 done
4638 rm -f conftest.$ac_ext
4639 CC=$ac_save_CC
4640 fi
4641
4642 if test "x$ac_cv_prog_cc_c89" = xno
4643 then :
4644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4645 printf "%s\n" "unsupported" >&6; }
4646 else $as_nop
4647 if test "x$ac_cv_prog_cc_c89" = x
4648 then :
4649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4650 printf "%s\n" "none needed" >&6; }
4651 else $as_nop
4652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4653 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4654 CC="$CC $ac_cv_prog_cc_c89"
4655 fi
4656 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4657 ac_prog_cc_stdc=c89
4658 fi
4659 fi
4660
4661 ac_ext=c
4662 ac_cpp='$CPP $CPPFLAGS'
4663 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4664 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4665 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4666
4667
4668 ac_ext=c
4669 ac_cpp='$CPP $CPPFLAGS'
4670 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4671 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4672 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4674 printf %s "checking whether $CC understands -c and -o together... " >&6; }
4675 if test ${am_cv_prog_cc_c_o+y}
4676 then :
4677 printf %s "(cached) " >&6
4678 else $as_nop
4679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680 /* end confdefs.h. */
4681
4682 int
4683 main (void)
4684 {
4685
4686 ;
4687 return 0;
4688 }
4689 _ACEOF
4690 # Make sure it works both with $CC and with simple cc.
4691 # Following AC_PROG_CC_C_O, we do the test twice because some
4692 # compilers refuse to overwrite an existing .o file with -o,
4693 # though they will create one.
4694 am_cv_prog_cc_c_o=yes
4695 for am_i in 1 2; do
4696 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4697 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4698 ac_status=$?
4699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4700 (exit $ac_status); } \
4701 && test -f conftest2.$ac_objext; then
4702 : OK
4703 else
4704 am_cv_prog_cc_c_o=no
4705 break
4706 fi
4707 done
4708 rm -f core conftest*
4709 unset am_i
4710 fi
4711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4712 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
4713 if test "$am_cv_prog_cc_c_o" != yes; then
4714 # Losing compiler, so override with the script.
4715 # FIXME: It is wrong to rewrite CC.
4716 # But if we don't then we get into trouble of one sort or another.
4717 # A longer-term fix would be to have automake use am__CC in this case,
4718 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4719 CC="$am_aux_dir/compile $CC"
4720 fi
4721 ac_ext=c
4722 ac_cpp='$CPP $CPPFLAGS'
4723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4726
4727 DEPDIR="${am__leading_dot}deps"
4728
4729 ac_config_commands="$ac_config_commands depfiles"
4730
4731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4732 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
4733 cat > confinc.mk << 'END'
4734 am__doit:
4735 @echo this is the am__doit target >confinc.out
4736 .PHONY: am__doit
4737 END
4738 am__include="#"
4739 am__quote=
4740 # BSD make does it like this.
4741 echo '.include "confinc.mk" # ignored' > confmf.BSD
4742 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
4743 echo 'include confinc.mk # ignored' > confmf.GNU
4744 _am_result=no
4745 for s in GNU BSD; do
4746 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4747 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4748 ac_status=$?
4749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4750 (exit $ac_status); }
4751 case $?:`cat confinc.out 2>/dev/null` in #(
4752 '0:this is the am__doit target') :
4753 case $s in #(
4754 BSD) :
4755 am__include='.include' am__quote='"' ;; #(
4756 *) :
4757 am__include='include' am__quote='' ;;
4758 esac ;; #(
4759 *) :
4760 ;;
4761 esac
4762 if test "$am__include" != "#"; then
4763 _am_result="yes ($s style)"
4764 break
4765 fi
4766 done
4767 rm -f confinc.* confmf.*
4768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4769 printf "%s\n" "${_am_result}" >&6; }
4770
4771 # Check whether --enable-dependency-tracking was given.
4772 if test ${enable_dependency_tracking+y}
4773 then :
4774 enableval=$enable_dependency_tracking;
4775 fi
4776
4777 if test "x$enable_dependency_tracking" != xno; then
4778 am_depcomp="$ac_aux_dir/depcomp"
4779 AMDEPBACKSLASH='\'
4780 am__nodep='_no'
4781 fi
4782 if test "x$enable_dependency_tracking" != xno; then
4783 AMDEP_TRUE=
4784 AMDEP_FALSE='#'
4785 else
4786 AMDEP_TRUE='#'
4787 AMDEP_FALSE=
4788 fi
4789
4790
4791
4792 depcc="$CC" am_compiler_list=
4793
4794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4795 printf %s "checking dependency style of $depcc... " >&6; }
4796 if test ${am_cv_CC_dependencies_compiler_type+y}
4797 then :
4798 printf %s "(cached) " >&6
4799 else $as_nop
4800 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4801 # We make a subdir and do the tests there. Otherwise we can end up
4802 # making bogus files that we don't know about and never remove. For
4803 # instance it was reported that on HP-UX the gcc test will end up
4804 # making a dummy file named 'D' -- because '-MD' means "put the output
4805 # in D".
4806 rm -rf conftest.dir
4807 mkdir conftest.dir
4808 # Copy depcomp to subdir because otherwise we won't find it if we're
4809 # using a relative directory.
4810 cp "$am_depcomp" conftest.dir
4811 cd conftest.dir
4812 # We will build objects and dependencies in a subdirectory because
4813 # it helps to detect inapplicable dependency modes. For instance
4814 # both Tru64's cc and ICC support -MD to output dependencies as a
4815 # side effect of compilation, but ICC will put the dependencies in
4816 # the current directory while Tru64 will put them in the object
4817 # directory.
4818 mkdir sub
4819
4820 am_cv_CC_dependencies_compiler_type=none
4821 if test "$am_compiler_list" = ""; then
4822 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4823 fi
4824 am__universal=false
4825 case " $depcc " in #(
4826 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4827 esac
4828
4829 for depmode in $am_compiler_list; do
4830 # Setup a source with many dependencies, because some compilers
4831 # like to wrap large dependency lists on column 80 (with \), and
4832 # we should not choose a depcomp mode which is confused by this.
4833 #
4834 # We need to recreate these files for each test, as the compiler may
4835 # overwrite some of them when testing with obscure command lines.
4836 # This happens at least with the AIX C compiler.
4837 : > sub/conftest.c
4838 for i in 1 2 3 4 5 6; do
4839 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4840 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4841 # Solaris 10 /bin/sh.
4842 echo '/* dummy */' > sub/conftst$i.h
4843 done
4844 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4845
4846 # We check with '-c' and '-o' for the sake of the "dashmstdout"
4847 # mode. It turns out that the SunPro C++ compiler does not properly
4848 # handle '-M -o', and we need to detect this. Also, some Intel
4849 # versions had trouble with output in subdirs.
4850 am__obj=sub/conftest.${OBJEXT-o}
4851 am__minus_obj="-o $am__obj"
4852 case $depmode in
4853 gcc)
4854 # This depmode causes a compiler race in universal mode.
4855 test "$am__universal" = false || continue
4856 ;;
4857 nosideeffect)
4858 # After this tag, mechanisms are not by side-effect, so they'll
4859 # only be used when explicitly requested.
4860 if test "x$enable_dependency_tracking" = xyes; then
4861 continue
4862 else
4863 break
4864 fi
4865 ;;
4866 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4867 # This compiler won't grok '-c -o', but also, the minuso test has
4868 # not run yet. These depmodes are late enough in the game, and
4869 # so weak that their functioning should not be impacted.
4870 am__obj=conftest.${OBJEXT-o}
4871 am__minus_obj=
4872 ;;
4873 none) break ;;
4874 esac
4875 if depmode=$depmode \
4876 source=sub/conftest.c object=$am__obj \
4877 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4878 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4879 >/dev/null 2>conftest.err &&
4880 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4881 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4882 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4883 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4884 # icc doesn't choke on unknown options, it will just issue warnings
4885 # or remarks (even with -Werror). So we grep stderr for any message
4886 # that says an option was ignored or not supported.
4887 # When given -MP, icc 7.0 and 7.1 complain thusly:
4888 # icc: Command line warning: ignoring option '-M'; no argument required
4889 # The diagnosis changed in icc 8.0:
4890 # icc: Command line remark: option '-MP' not supported
4891 if (grep 'ignoring option' conftest.err ||
4892 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4893 am_cv_CC_dependencies_compiler_type=$depmode
4894 break
4895 fi
4896 fi
4897 done
4898
4899 cd ..
4900 rm -rf conftest.dir
4901 else
4902 am_cv_CC_dependencies_compiler_type=none
4903 fi
4904
4905 fi
4906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4907 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
4908 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4909
4910 if
4911 test "x$enable_dependency_tracking" != xno \
4912 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4913 am__fastdepCC_TRUE=
4914 am__fastdepCC_FALSE='#'
4915 else
4916 am__fastdepCC_TRUE='#'
4917 am__fastdepCC_FALSE=
4918 fi
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928 ac_ext=cpp
4929 ac_cpp='$CXXCPP $CPPFLAGS'
4930 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4931 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4932 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4933 if test -z "$CXX"; then
4934 if test -n "$CCC"; then
4935 CXX=$CCC
4936 else
4937 if test -n "$ac_tool_prefix"; then
4938 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
4939 do
4940 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4941 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943 printf %s "checking for $ac_word... " >&6; }
4944 if test ${ac_cv_prog_CXX+y}
4945 then :
4946 printf %s "(cached) " >&6
4947 else $as_nop
4948 if test -n "$CXX"; then
4949 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4950 else
4951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4952 for as_dir in $PATH
4953 do
4954 IFS=$as_save_IFS
4955 case $as_dir in #(((
4956 '') as_dir=./ ;;
4957 */) ;;
4958 *) as_dir=$as_dir/ ;;
4959 esac
4960 for ac_exec_ext in '' $ac_executable_extensions; do
4961 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4962 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4963 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4964 break 2
4965 fi
4966 done
4967 done
4968 IFS=$as_save_IFS
4969
4970 fi
4971 fi
4972 CXX=$ac_cv_prog_CXX
4973 if test -n "$CXX"; then
4974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4975 printf "%s\n" "$CXX" >&6; }
4976 else
4977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4978 printf "%s\n" "no" >&6; }
4979 fi
4980
4981
4982 test -n "$CXX" && break
4983 done
4984 fi
4985 if test -z "$CXX"; then
4986 ac_ct_CXX=$CXX
4987 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
4988 do
4989 # Extract the first word of "$ac_prog", so it can be a program name with args.
4990 set dummy $ac_prog; ac_word=$2
4991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992 printf %s "checking for $ac_word... " >&6; }
4993 if test ${ac_cv_prog_ac_ct_CXX+y}
4994 then :
4995 printf %s "(cached) " >&6
4996 else $as_nop
4997 if test -n "$ac_ct_CXX"; then
4998 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4999 else
5000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001 for as_dir in $PATH
5002 do
5003 IFS=$as_save_IFS
5004 case $as_dir in #(((
5005 '') as_dir=./ ;;
5006 */) ;;
5007 *) as_dir=$as_dir/ ;;
5008 esac
5009 for ac_exec_ext in '' $ac_executable_extensions; do
5010 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5011 ac_cv_prog_ac_ct_CXX="$ac_prog"
5012 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5013 break 2
5014 fi
5015 done
5016 done
5017 IFS=$as_save_IFS
5018
5019 fi
5020 fi
5021 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5022 if test -n "$ac_ct_CXX"; then
5023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5024 printf "%s\n" "$ac_ct_CXX" >&6; }
5025 else
5026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5027 printf "%s\n" "no" >&6; }
5028 fi
5029
5030
5031 test -n "$ac_ct_CXX" && break
5032 done
5033
5034 if test "x$ac_ct_CXX" = x; then
5035 CXX="g++"
5036 else
5037 case $cross_compiling:$ac_tool_warned in
5038 yes:)
5039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5040 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5041 ac_tool_warned=yes ;;
5042 esac
5043 CXX=$ac_ct_CXX
5044 fi
5045 fi
5046
5047 fi
5048 fi
5049 # Provide some information about the compiler.
5050 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
5051 set X $ac_compile
5052 ac_compiler=$2
5053 for ac_option in --version -v -V -qversion; do
5054 { { ac_try="$ac_compiler $ac_option >&5"
5055 case "(($ac_try" in
5056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5057 *) ac_try_echo=$ac_try;;
5058 esac
5059 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5060 printf "%s\n" "$ac_try_echo"; } >&5
5061 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5062 ac_status=$?
5063 if test -s conftest.err; then
5064 sed '10a\
5065 ... rest of stderr output deleted ...
5066 10q' conftest.err >conftest.er1
5067 cat conftest.er1 >&5
5068 fi
5069 rm -f conftest.er1 conftest.err
5070 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5071 test $ac_status = 0; }
5072 done
5073
5074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
5075 printf %s "checking whether the compiler supports GNU C++... " >&6; }
5076 if test ${ac_cv_cxx_compiler_gnu+y}
5077 then :
5078 printf %s "(cached) " >&6
5079 else $as_nop
5080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5081 /* end confdefs.h. */
5082
5083 int
5084 main (void)
5085 {
5086 #ifndef __GNUC__
5087 choke me
5088 #endif
5089
5090 ;
5091 return 0;
5092 }
5093 _ACEOF
5094 if ac_fn_cxx_try_compile "$LINENO"
5095 then :
5096 ac_compiler_gnu=yes
5097 else $as_nop
5098 ac_compiler_gnu=no
5099 fi
5100 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5101 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
5102
5103 fi
5104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
5105 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
5106 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5107
5108 if test $ac_compiler_gnu = yes; then
5109 GXX=yes
5110 else
5111 GXX=
5112 fi
5113 ac_test_CXXFLAGS=${CXXFLAGS+y}
5114 ac_save_CXXFLAGS=$CXXFLAGS
5115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
5116 printf %s "checking whether $CXX accepts -g... " >&6; }
5117 if test ${ac_cv_prog_cxx_g+y}
5118 then :
5119 printf %s "(cached) " >&6
5120 else $as_nop
5121 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5122 ac_cxx_werror_flag=yes
5123 ac_cv_prog_cxx_g=no
5124 CXXFLAGS="-g"
5125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5126 /* end confdefs.h. */
5127
5128 int
5129 main (void)
5130 {
5131
5132 ;
5133 return 0;
5134 }
5135 _ACEOF
5136 if ac_fn_cxx_try_compile "$LINENO"
5137 then :
5138 ac_cv_prog_cxx_g=yes
5139 else $as_nop
5140 CXXFLAGS=""
5141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5142 /* end confdefs.h. */
5143
5144 int
5145 main (void)
5146 {
5147
5148 ;
5149 return 0;
5150 }
5151 _ACEOF
5152 if ac_fn_cxx_try_compile "$LINENO"
5153 then :
5154
5155 else $as_nop
5156 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5157 CXXFLAGS="-g"
5158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5159 /* end confdefs.h. */
5160
5161 int
5162 main (void)
5163 {
5164
5165 ;
5166 return 0;
5167 }
5168 _ACEOF
5169 if ac_fn_cxx_try_compile "$LINENO"
5170 then :
5171 ac_cv_prog_cxx_g=yes
5172 fi
5173 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5174 fi
5175 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5176 fi
5177 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5178 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5179 fi
5180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
5181 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
5182 if test $ac_test_CXXFLAGS; then
5183 CXXFLAGS=$ac_save_CXXFLAGS
5184 elif test $ac_cv_prog_cxx_g = yes; then
5185 if test "$GXX" = yes; then
5186 CXXFLAGS="-g -O2"
5187 else
5188 CXXFLAGS="-g"
5189 fi
5190 else
5191 if test "$GXX" = yes; then
5192 CXXFLAGS="-O2"
5193 else
5194 CXXFLAGS=
5195 fi
5196 fi
5197 ac_prog_cxx_stdcxx=no
5198 if test x$ac_prog_cxx_stdcxx = xno
5199 then :
5200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
5201 printf %s "checking for $CXX option to enable C++11 features... " >&6; }
5202 if test ${ac_cv_prog_cxx_11+y}
5203 then :
5204 printf %s "(cached) " >&6
5205 else $as_nop
5206 ac_cv_prog_cxx_11=no
5207 ac_save_CXX=$CXX
5208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5209 /* end confdefs.h. */
5210 $ac_cxx_conftest_cxx11_program
5211 _ACEOF
5212 for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
5213 do
5214 CXX="$ac_save_CXX $ac_arg"
5215 if ac_fn_cxx_try_compile "$LINENO"
5216 then :
5217 ac_cv_prog_cxx_cxx11=$ac_arg
5218 fi
5219 rm -f core conftest.err conftest.$ac_objext conftest.beam
5220 test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
5221 done
5222 rm -f conftest.$ac_ext
5223 CXX=$ac_save_CXX
5224 fi
5225
5226 if test "x$ac_cv_prog_cxx_cxx11" = xno
5227 then :
5228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5229 printf "%s\n" "unsupported" >&6; }
5230 else $as_nop
5231 if test "x$ac_cv_prog_cxx_cxx11" = x
5232 then :
5233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5234 printf "%s\n" "none needed" >&6; }
5235 else $as_nop
5236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
5237 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
5238 CXX="$CXX $ac_cv_prog_cxx_cxx11"
5239 fi
5240 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
5241 ac_prog_cxx_stdcxx=cxx11
5242 fi
5243 fi
5244 if test x$ac_prog_cxx_stdcxx = xno
5245 then :
5246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
5247 printf %s "checking for $CXX option to enable C++98 features... " >&6; }
5248 if test ${ac_cv_prog_cxx_98+y}
5249 then :
5250 printf %s "(cached) " >&6
5251 else $as_nop
5252 ac_cv_prog_cxx_98=no
5253 ac_save_CXX=$CXX
5254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5255 /* end confdefs.h. */
5256 $ac_cxx_conftest_cxx98_program
5257 _ACEOF
5258 for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
5259 do
5260 CXX="$ac_save_CXX $ac_arg"
5261 if ac_fn_cxx_try_compile "$LINENO"
5262 then :
5263 ac_cv_prog_cxx_cxx98=$ac_arg
5264 fi
5265 rm -f core conftest.err conftest.$ac_objext conftest.beam
5266 test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
5267 done
5268 rm -f conftest.$ac_ext
5269 CXX=$ac_save_CXX
5270 fi
5271
5272 if test "x$ac_cv_prog_cxx_cxx98" = xno
5273 then :
5274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5275 printf "%s\n" "unsupported" >&6; }
5276 else $as_nop
5277 if test "x$ac_cv_prog_cxx_cxx98" = x
5278 then :
5279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5280 printf "%s\n" "none needed" >&6; }
5281 else $as_nop
5282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
5283 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
5284 CXX="$CXX $ac_cv_prog_cxx_cxx98"
5285 fi
5286 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
5287 ac_prog_cxx_stdcxx=cxx98
5288 fi
5289 fi
5290
5291 ac_ext=c
5292 ac_cpp='$CPP $CPPFLAGS'
5293 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5294 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5295 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5296
5297 depcc="$CXX" am_compiler_list=
5298
5299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5300 printf %s "checking dependency style of $depcc... " >&6; }
5301 if test ${am_cv_CXX_dependencies_compiler_type+y}
5302 then :
5303 printf %s "(cached) " >&6
5304 else $as_nop
5305 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5306 # We make a subdir and do the tests there. Otherwise we can end up
5307 # making bogus files that we don't know about and never remove. For
5308 # instance it was reported that on HP-UX the gcc test will end up
5309 # making a dummy file named 'D' -- because '-MD' means "put the output
5310 # in D".
5311 rm -rf conftest.dir
5312 mkdir conftest.dir
5313 # Copy depcomp to subdir because otherwise we won't find it if we're
5314 # using a relative directory.
5315 cp "$am_depcomp" conftest.dir
5316 cd conftest.dir
5317 # We will build objects and dependencies in a subdirectory because
5318 # it helps to detect inapplicable dependency modes. For instance
5319 # both Tru64's cc and ICC support -MD to output dependencies as a
5320 # side effect of compilation, but ICC will put the dependencies in
5321 # the current directory while Tru64 will put them in the object
5322 # directory.
5323 mkdir sub
5324
5325 am_cv_CXX_dependencies_compiler_type=none
5326 if test "$am_compiler_list" = ""; then
5327 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5328 fi
5329 am__universal=false
5330 case " $depcc " in #(
5331 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5332 esac
5333
5334 for depmode in $am_compiler_list; do
5335 # Setup a source with many dependencies, because some compilers
5336 # like to wrap large dependency lists on column 80 (with \), and
5337 # we should not choose a depcomp mode which is confused by this.
5338 #
5339 # We need to recreate these files for each test, as the compiler may
5340 # overwrite some of them when testing with obscure command lines.
5341 # This happens at least with the AIX C compiler.
5342 : > sub/conftest.c
5343 for i in 1 2 3 4 5 6; do
5344 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5345 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5346 # Solaris 10 /bin/sh.
5347 echo '/* dummy */' > sub/conftst$i.h
5348 done
5349 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5350
5351 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5352 # mode. It turns out that the SunPro C++ compiler does not properly
5353 # handle '-M -o', and we need to detect this. Also, some Intel
5354 # versions had trouble with output in subdirs.
5355 am__obj=sub/conftest.${OBJEXT-o}
5356 am__minus_obj="-o $am__obj"
5357 case $depmode in
5358 gcc)
5359 # This depmode causes a compiler race in universal mode.
5360 test "$am__universal" = false || continue
5361 ;;
5362 nosideeffect)
5363 # After this tag, mechanisms are not by side-effect, so they'll
5364 # only be used when explicitly requested.
5365 if test "x$enable_dependency_tracking" = xyes; then
5366 continue
5367 else
5368 break
5369 fi
5370 ;;
5371 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5372 # This compiler won't grok '-c -o', but also, the minuso test has
5373 # not run yet. These depmodes are late enough in the game, and
5374 # so weak that their functioning should not be impacted.
5375 am__obj=conftest.${OBJEXT-o}
5376 am__minus_obj=
5377 ;;
5378 none) break ;;
5379 esac
5380 if depmode=$depmode \
5381 source=sub/conftest.c object=$am__obj \
5382 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5383 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5384 >/dev/null 2>conftest.err &&
5385 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5386 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5387 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5388 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5389 # icc doesn't choke on unknown options, it will just issue warnings
5390 # or remarks (even with -Werror). So we grep stderr for any message
5391 # that says an option was ignored or not supported.
5392 # When given -MP, icc 7.0 and 7.1 complain thusly:
5393 # icc: Command line warning: ignoring option '-M'; no argument required
5394 # The diagnosis changed in icc 8.0:
5395 # icc: Command line remark: option '-MP' not supported
5396 if (grep 'ignoring option' conftest.err ||
5397 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5398 am_cv_CXX_dependencies_compiler_type=$depmode
5399 break
5400 fi
5401 fi
5402 done
5403
5404 cd ..
5405 rm -rf conftest.dir
5406 else
5407 am_cv_CXX_dependencies_compiler_type=none
5408 fi
5409
5410 fi
5411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
5412 printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
5413 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
5414
5415 if
5416 test "x$enable_dependency_tracking" != xno \
5417 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
5418 am__fastdepCXX_TRUE=
5419 am__fastdepCXX_FALSE='#'
5420 else
5421 am__fastdepCXX_TRUE='#'
5422 am__fastdepCXX_FALSE=
5423 fi
5424
5425
5426 case `pwd` in
5427 *\ * | *\ *)
5428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
5429 printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
5430 esac
5431
5432
5433
5434 macro_version='2.4.6'
5435 macro_revision='2.4.6'
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450 ltmain=$ac_aux_dir/ltmain.sh
5451
5452
5453
5454 # Make sure we can run config.sub.
5455 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
5456 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
5457
5458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5459 printf %s "checking build system type... " >&6; }
5460 if test ${ac_cv_build+y}
5461 then :
5462 printf %s "(cached) " >&6
5463 else $as_nop
5464 ac_build_alias=$build_alias
5465 test "x$ac_build_alias" = x &&
5466 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
5467 test "x$ac_build_alias" = x &&
5468 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5469 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
5470 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
5471
5472 fi
5473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5474 printf "%s\n" "$ac_cv_build" >&6; }
5475 case $ac_cv_build in
5476 *-*-*) ;;
5477 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5478 esac
5479 build=$ac_cv_build
5480 ac_save_IFS=$IFS; IFS='-'
5481 set x $ac_cv_build
5482 shift
5483 build_cpu=$1
5484 build_vendor=$2
5485 shift; shift
5486 # Remember, the first character of IFS is used to create $*,
5487 # except with old shells:
5488 build_os=$*
5489 IFS=$ac_save_IFS
5490 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5491
5492
5493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5494 printf %s "checking host system type... " >&6; }
5495 if test ${ac_cv_host+y}
5496 then :
5497 printf %s "(cached) " >&6
5498 else $as_nop
5499 if test "x$host_alias" = x; then
5500 ac_cv_host=$ac_cv_build
5501 else
5502 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
5503 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
5504 fi
5505
5506 fi
5507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5508 printf "%s\n" "$ac_cv_host" >&6; }
5509 case $ac_cv_host in
5510 *-*-*) ;;
5511 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5512 esac
5513 host=$ac_cv_host
5514 ac_save_IFS=$IFS; IFS='-'
5515 set x $ac_cv_host
5516 shift
5517 host_cpu=$1
5518 host_vendor=$2
5519 shift; shift
5520 # Remember, the first character of IFS is used to create $*,
5521 # except with old shells:
5522 host_os=$*
5523 IFS=$ac_save_IFS
5524 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5525
5526
5527 # Backslashify metacharacters that are still active within
5528 # double-quoted strings.
5529 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
5530
5531 # Same as above, but do not quote variable references.
5532 double_quote_subst='s/\(["`\\]\)/\\\1/g'
5533
5534 # Sed substitution to delay expansion of an escaped shell variable in a
5535 # double_quote_subst'ed string.
5536 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5537
5538 # Sed substitution to delay expansion of an escaped single quote.
5539 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
5540
5541 # Sed substitution to avoid accidental globbing in evaled expressions
5542 no_glob_subst='s/\*/\\\*/g'
5543
5544 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
5545 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
5546 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
5547
5548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
5549 printf %s "checking how to print strings... " >&6; }
5550 # Test print first, because it will be a builtin if present.
5551 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
5552 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
5553 ECHO='print -r --'
5554 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
5555 ECHO='printf %s\n'
5556 else
5557 # Use this function as a fallback that always works.
5558 func_fallback_echo ()
5559 {
5560 eval 'cat <<_LTECHO_EOF
5561 $1
5562 _LTECHO_EOF'
5563 }
5564 ECHO='func_fallback_echo'
5565 fi
5566
5567 # func_echo_all arg...
5568 # Invoke $ECHO with all args, space-separated.
5569 func_echo_all ()
5570 {
5571 $ECHO ""
5572 }
5573
5574 case $ECHO in
5575 printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
5576 printf "%s\n" "printf" >&6; } ;;
5577 print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
5578 printf "%s\n" "print -r" >&6; } ;;
5579 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
5580 printf "%s\n" "cat" >&6; } ;;
5581 esac
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5597 printf %s "checking for a sed that does not truncate output... " >&6; }
5598 if test ${ac_cv_path_SED+y}
5599 then :
5600 printf %s "(cached) " >&6
5601 else $as_nop
5602 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5603 for ac_i in 1 2 3 4 5 6 7; do
5604 ac_script="$ac_script$as_nl$ac_script"
5605 done
5606 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5607 { ac_script=; unset ac_script;}
5608 if test -z "$SED"; then
5609 ac_path_SED_found=false
5610 # Loop through the user's path and test for each of PROGNAME-LIST
5611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5612 for as_dir in $PATH
5613 do
5614 IFS=$as_save_IFS
5615 case $as_dir in #(((
5616 '') as_dir=./ ;;
5617 */) ;;
5618 *) as_dir=$as_dir/ ;;
5619 esac
5620 for ac_prog in sed gsed
5621 do
5622 for ac_exec_ext in '' $ac_executable_extensions; do
5623 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
5624 as_fn_executable_p "$ac_path_SED" || continue
5625 # Check for GNU ac_path_SED and select it if it is found.
5626 # Check for GNU $ac_path_SED
5627 case `"$ac_path_SED" --version 2>&1` in
5628 *GNU*)
5629 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5630 *)
5631 ac_count=0
5632 printf %s 0123456789 >"conftest.in"
5633 while :
5634 do
5635 cat "conftest.in" "conftest.in" >"conftest.tmp"
5636 mv "conftest.tmp" "conftest.in"
5637 cp "conftest.in" "conftest.nl"
5638 printf "%s\n" '' >> "conftest.nl"
5639 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5640 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5641 as_fn_arith $ac_count + 1 && ac_count=$as_val
5642 if test $ac_count -gt ${ac_path_SED_max-0}; then
5643 # Best one so far, save it but keep looking for a better one
5644 ac_cv_path_SED="$ac_path_SED"
5645 ac_path_SED_max=$ac_count
5646 fi
5647 # 10*(2^10) chars as input seems more than enough
5648 test $ac_count -gt 10 && break
5649 done
5650 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5651 esac
5652
5653 $ac_path_SED_found && break 3
5654 done
5655 done
5656 done
5657 IFS=$as_save_IFS
5658 if test -z "$ac_cv_path_SED"; then
5659 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5660 fi
5661 else
5662 ac_cv_path_SED=$SED
5663 fi
5664
5665 fi
5666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5667 printf "%s\n" "$ac_cv_path_SED" >&6; }
5668 SED="$ac_cv_path_SED"
5669 rm -f conftest.sed
5670
5671 test -z "$SED" && SED=sed
5672 Xsed="$SED -e 1s/^X//"
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5685 printf %s "checking for grep that handles long lines and -e... " >&6; }
5686 if test ${ac_cv_path_GREP+y}
5687 then :
5688 printf %s "(cached) " >&6
5689 else $as_nop
5690 if test -z "$GREP"; then
5691 ac_path_GREP_found=false
5692 # Loop through the user's path and test for each of PROGNAME-LIST
5693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5694 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5695 do
5696 IFS=$as_save_IFS
5697 case $as_dir in #(((
5698 '') as_dir=./ ;;
5699 */) ;;
5700 *) as_dir=$as_dir/ ;;
5701 esac
5702 for ac_prog in grep ggrep
5703 do
5704 for ac_exec_ext in '' $ac_executable_extensions; do
5705 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5706 as_fn_executable_p "$ac_path_GREP" || continue
5707 # Check for GNU ac_path_GREP and select it if it is found.
5708 # Check for GNU $ac_path_GREP
5709 case `"$ac_path_GREP" --version 2>&1` in
5710 *GNU*)
5711 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5712 *)
5713 ac_count=0
5714 printf %s 0123456789 >"conftest.in"
5715 while :
5716 do
5717 cat "conftest.in" "conftest.in" >"conftest.tmp"
5718 mv "conftest.tmp" "conftest.in"
5719 cp "conftest.in" "conftest.nl"
5720 printf "%s\n" 'GREP' >> "conftest.nl"
5721 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5722 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5723 as_fn_arith $ac_count + 1 && ac_count=$as_val
5724 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5725 # Best one so far, save it but keep looking for a better one
5726 ac_cv_path_GREP="$ac_path_GREP"
5727 ac_path_GREP_max=$ac_count
5728 fi
5729 # 10*(2^10) chars as input seems more than enough
5730 test $ac_count -gt 10 && break
5731 done
5732 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5733 esac
5734
5735 $ac_path_GREP_found && break 3
5736 done
5737 done
5738 done
5739 IFS=$as_save_IFS
5740 if test -z "$ac_cv_path_GREP"; then
5741 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5742 fi
5743 else
5744 ac_cv_path_GREP=$GREP
5745 fi
5746
5747 fi
5748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5749 printf "%s\n" "$ac_cv_path_GREP" >&6; }
5750 GREP="$ac_cv_path_GREP"
5751
5752
5753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5754 printf %s "checking for egrep... " >&6; }
5755 if test ${ac_cv_path_EGREP+y}
5756 then :
5757 printf %s "(cached) " >&6
5758 else $as_nop
5759 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5760 then ac_cv_path_EGREP="$GREP -E"
5761 else
5762 if test -z "$EGREP"; then
5763 ac_path_EGREP_found=false
5764 # Loop through the user's path and test for each of PROGNAME-LIST
5765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5766 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5767 do
5768 IFS=$as_save_IFS
5769 case $as_dir in #(((
5770 '') as_dir=./ ;;
5771 */) ;;
5772 *) as_dir=$as_dir/ ;;
5773 esac
5774 for ac_prog in egrep
5775 do
5776 for ac_exec_ext in '' $ac_executable_extensions; do
5777 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
5778 as_fn_executable_p "$ac_path_EGREP" || continue
5779 # Check for GNU ac_path_EGREP and select it if it is found.
5780 # Check for GNU $ac_path_EGREP
5781 case `"$ac_path_EGREP" --version 2>&1` in
5782 *GNU*)
5783 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5784 *)
5785 ac_count=0
5786 printf %s 0123456789 >"conftest.in"
5787 while :
5788 do
5789 cat "conftest.in" "conftest.in" >"conftest.tmp"
5790 mv "conftest.tmp" "conftest.in"
5791 cp "conftest.in" "conftest.nl"
5792 printf "%s\n" 'EGREP' >> "conftest.nl"
5793 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5794 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5795 as_fn_arith $ac_count + 1 && ac_count=$as_val
5796 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5797 # Best one so far, save it but keep looking for a better one
5798 ac_cv_path_EGREP="$ac_path_EGREP"
5799 ac_path_EGREP_max=$ac_count
5800 fi
5801 # 10*(2^10) chars as input seems more than enough
5802 test $ac_count -gt 10 && break
5803 done
5804 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5805 esac
5806
5807 $ac_path_EGREP_found && break 3
5808 done
5809 done
5810 done
5811 IFS=$as_save_IFS
5812 if test -z "$ac_cv_path_EGREP"; then
5813 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5814 fi
5815 else
5816 ac_cv_path_EGREP=$EGREP
5817 fi
5818
5819 fi
5820 fi
5821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5822 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
5823 EGREP="$ac_cv_path_EGREP"
5824
5825
5826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5827 printf %s "checking for fgrep... " >&6; }
5828 if test ${ac_cv_path_FGREP+y}
5829 then :
5830 printf %s "(cached) " >&6
5831 else $as_nop
5832 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5833 then ac_cv_path_FGREP="$GREP -F"
5834 else
5835 if test -z "$FGREP"; then
5836 ac_path_FGREP_found=false
5837 # Loop through the user's path and test for each of PROGNAME-LIST
5838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5839 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5840 do
5841 IFS=$as_save_IFS
5842 case $as_dir in #(((
5843 '') as_dir=./ ;;
5844 */) ;;
5845 *) as_dir=$as_dir/ ;;
5846 esac
5847 for ac_prog in fgrep
5848 do
5849 for ac_exec_ext in '' $ac_executable_extensions; do
5850 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
5851 as_fn_executable_p "$ac_path_FGREP" || continue
5852 # Check for GNU ac_path_FGREP and select it if it is found.
5853 # Check for GNU $ac_path_FGREP
5854 case `"$ac_path_FGREP" --version 2>&1` in
5855 *GNU*)
5856 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5857 *)
5858 ac_count=0
5859 printf %s 0123456789 >"conftest.in"
5860 while :
5861 do
5862 cat "conftest.in" "conftest.in" >"conftest.tmp"
5863 mv "conftest.tmp" "conftest.in"
5864 cp "conftest.in" "conftest.nl"
5865 printf "%s\n" 'FGREP' >> "conftest.nl"
5866 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5867 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5868 as_fn_arith $ac_count + 1 && ac_count=$as_val
5869 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5870 # Best one so far, save it but keep looking for a better one
5871 ac_cv_path_FGREP="$ac_path_FGREP"
5872 ac_path_FGREP_max=$ac_count
5873 fi
5874 # 10*(2^10) chars as input seems more than enough
5875 test $ac_count -gt 10 && break
5876 done
5877 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5878 esac
5879
5880 $ac_path_FGREP_found && break 3
5881 done
5882 done
5883 done
5884 IFS=$as_save_IFS
5885 if test -z "$ac_cv_path_FGREP"; then
5886 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5887 fi
5888 else
5889 ac_cv_path_FGREP=$FGREP
5890 fi
5891
5892 fi
5893 fi
5894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
5895 printf "%s\n" "$ac_cv_path_FGREP" >&6; }
5896 FGREP="$ac_cv_path_FGREP"
5897
5898
5899 test -z "$GREP" && GREP=grep
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919 # Check whether --with-gnu-ld was given.
5920 if test ${with_gnu_ld+y}
5921 then :
5922 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
5923 else $as_nop
5924 with_gnu_ld=no
5925 fi
5926
5927 ac_prog=ld
5928 if test yes = "$GCC"; then
5929 # Check if gcc -print-prog-name=ld gives a path.
5930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
5931 printf %s "checking for ld used by $CC... " >&6; }
5932 case $host in
5933 *-*-mingw*)
5934 # gcc leaves a trailing carriage return, which upsets mingw
5935 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5936 *)
5937 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5938 esac
5939 case $ac_prog in
5940 # Accept absolute paths.
5941 [\\/]* | ?:[\\/]*)
5942 re_direlt='/[^/][^/]*/\.\./'
5943 # Canonicalize the pathname of ld
5944 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5945 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5946 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5947 done
5948 test -z "$LD" && LD=$ac_prog
5949 ;;
5950 "")
5951 # If it fails, then pretend we aren't using GCC.
5952 ac_prog=ld
5953 ;;
5954 *)
5955 # If it is relative, then search for the first ld in PATH.
5956 with_gnu_ld=unknown
5957 ;;
5958 esac
5959 elif test yes = "$with_gnu_ld"; then
5960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5961 printf %s "checking for GNU ld... " >&6; }
5962 else
5963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
5964 printf %s "checking for non-GNU ld... " >&6; }
5965 fi
5966 if test ${lt_cv_path_LD+y}
5967 then :
5968 printf %s "(cached) " >&6
5969 else $as_nop
5970 if test -z "$LD"; then
5971 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5972 for ac_dir in $PATH; do
5973 IFS=$lt_save_ifs
5974 test -z "$ac_dir" && ac_dir=.
5975 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5976 lt_cv_path_LD=$ac_dir/$ac_prog
5977 # Check to see if the program is GNU ld. I'd rather use --version,
5978 # but apparently some variants of GNU ld only accept -v.
5979 # Break only if it was the GNU/non-GNU ld that we prefer.
5980 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5981 *GNU* | *'with BFD'*)
5982 test no != "$with_gnu_ld" && break
5983 ;;
5984 *)
5985 test yes != "$with_gnu_ld" && break
5986 ;;
5987 esac
5988 fi
5989 done
5990 IFS=$lt_save_ifs
5991 else
5992 lt_cv_path_LD=$LD # Let the user override the test with a path.
5993 fi
5994 fi
5995
5996 LD=$lt_cv_path_LD
5997 if test -n "$LD"; then
5998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
5999 printf "%s\n" "$LD" >&6; }
6000 else
6001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6002 printf "%s\n" "no" >&6; }
6003 fi
6004 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6006 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
6007 if test ${lt_cv_prog_gnu_ld+y}
6008 then :
6009 printf %s "(cached) " >&6
6010 else $as_nop
6011 # I'd rather use --version here, but apparently some GNU lds only accept -v.
6012 case `$LD -v 2>&1 </dev/null` in
6013 *GNU* | *'with BFD'*)
6014 lt_cv_prog_gnu_ld=yes
6015 ;;
6016 *)
6017 lt_cv_prog_gnu_ld=no
6018 ;;
6019 esac
6020 fi
6021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6022 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
6023 with_gnu_ld=$lt_cv_prog_gnu_ld
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
6034 printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
6035 if test ${lt_cv_path_NM+y}
6036 then :
6037 printf %s "(cached) " >&6
6038 else $as_nop
6039 if test -n "$NM"; then
6040 # Let the user override the test.
6041 lt_cv_path_NM=$NM
6042 else
6043 lt_nm_to_check=${ac_tool_prefix}nm
6044 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
6045 lt_nm_to_check="$lt_nm_to_check nm"
6046 fi
6047 for lt_tmp_nm in $lt_nm_to_check; do
6048 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6049 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
6050 IFS=$lt_save_ifs
6051 test -z "$ac_dir" && ac_dir=.
6052 tmp_nm=$ac_dir/$lt_tmp_nm
6053 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
6054 # Check to see if the nm accepts a BSD-compat flag.
6055 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
6056 # nm: unknown option "B" ignored
6057 # Tru64's nm complains that /dev/null is an invalid object file
6058 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
6059 case $build_os in
6060 mingw*) lt_bad_file=conftest.nm/nofile ;;
6061 *) lt_bad_file=/dev/null ;;
6062 esac
6063 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
6064 *$lt_bad_file* | *'Invalid file or object type'*)
6065 lt_cv_path_NM="$tmp_nm -B"
6066 break 2
6067 ;;
6068 *)
6069 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6070 */dev/null*)
6071 lt_cv_path_NM="$tmp_nm -p"
6072 break 2
6073 ;;
6074 *)
6075 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6076 continue # so that we can try to find one that supports BSD flags
6077 ;;
6078 esac
6079 ;;
6080 esac
6081 fi
6082 done
6083 IFS=$lt_save_ifs
6084 done
6085 : ${lt_cv_path_NM=no}
6086 fi
6087 fi
6088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6089 printf "%s\n" "$lt_cv_path_NM" >&6; }
6090 if test no != "$lt_cv_path_NM"; then
6091 NM=$lt_cv_path_NM
6092 else
6093 # Didn't find any BSD compatible name lister, look for dumpbin.
6094 if test -n "$DUMPBIN"; then :
6095 # Let the user override the test.
6096 else
6097 if test -n "$ac_tool_prefix"; then
6098 for ac_prog in dumpbin "link -dump"
6099 do
6100 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6101 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6103 printf %s "checking for $ac_word... " >&6; }
6104 if test ${ac_cv_prog_DUMPBIN+y}
6105 then :
6106 printf %s "(cached) " >&6
6107 else $as_nop
6108 if test -n "$DUMPBIN"; then
6109 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
6110 else
6111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112 for as_dir in $PATH
6113 do
6114 IFS=$as_save_IFS
6115 case $as_dir in #(((
6116 '') as_dir=./ ;;
6117 */) ;;
6118 *) as_dir=$as_dir/ ;;
6119 esac
6120 for ac_exec_ext in '' $ac_executable_extensions; do
6121 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6122 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
6123 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6124 break 2
6125 fi
6126 done
6127 done
6128 IFS=$as_save_IFS
6129
6130 fi
6131 fi
6132 DUMPBIN=$ac_cv_prog_DUMPBIN
6133 if test -n "$DUMPBIN"; then
6134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
6135 printf "%s\n" "$DUMPBIN" >&6; }
6136 else
6137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138 printf "%s\n" "no" >&6; }
6139 fi
6140
6141
6142 test -n "$DUMPBIN" && break
6143 done
6144 fi
6145 if test -z "$DUMPBIN"; then
6146 ac_ct_DUMPBIN=$DUMPBIN
6147 for ac_prog in dumpbin "link -dump"
6148 do
6149 # Extract the first word of "$ac_prog", so it can be a program name with args.
6150 set dummy $ac_prog; ac_word=$2
6151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6152 printf %s "checking for $ac_word... " >&6; }
6153 if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
6154 then :
6155 printf %s "(cached) " >&6
6156 else $as_nop
6157 if test -n "$ac_ct_DUMPBIN"; then
6158 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
6159 else
6160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6161 for as_dir in $PATH
6162 do
6163 IFS=$as_save_IFS
6164 case $as_dir in #(((
6165 '') as_dir=./ ;;
6166 */) ;;
6167 *) as_dir=$as_dir/ ;;
6168 esac
6169 for ac_exec_ext in '' $ac_executable_extensions; do
6170 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6171 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
6172 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6173 break 2
6174 fi
6175 done
6176 done
6177 IFS=$as_save_IFS
6178
6179 fi
6180 fi
6181 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
6182 if test -n "$ac_ct_DUMPBIN"; then
6183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
6184 printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
6185 else
6186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6187 printf "%s\n" "no" >&6; }
6188 fi
6189
6190
6191 test -n "$ac_ct_DUMPBIN" && break
6192 done
6193
6194 if test "x$ac_ct_DUMPBIN" = x; then
6195 DUMPBIN=":"
6196 else
6197 case $cross_compiling:$ac_tool_warned in
6198 yes:)
6199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6200 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6201 ac_tool_warned=yes ;;
6202 esac
6203 DUMPBIN=$ac_ct_DUMPBIN
6204 fi
6205 fi
6206
6207 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
6208 *COFF*)
6209 DUMPBIN="$DUMPBIN -symbols -headers"
6210 ;;
6211 *)
6212 DUMPBIN=:
6213 ;;
6214 esac
6215 fi
6216
6217 if test : != "$DUMPBIN"; then
6218 NM=$DUMPBIN
6219 fi
6220 fi
6221 test -z "$NM" && NM=nm
6222
6223
6224
6225
6226
6227
6228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
6229 printf %s "checking the name lister ($NM) interface... " >&6; }
6230 if test ${lt_cv_nm_interface+y}
6231 then :
6232 printf %s "(cached) " >&6
6233 else $as_nop
6234 lt_cv_nm_interface="BSD nm"
6235 echo "int some_variable = 0;" > conftest.$ac_ext
6236 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
6237 (eval "$ac_compile" 2>conftest.err)
6238 cat conftest.err >&5
6239 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
6240 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
6241 cat conftest.err >&5
6242 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
6243 cat conftest.out >&5
6244 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
6245 lt_cv_nm_interface="MS dumpbin"
6246 fi
6247 rm -f conftest*
6248 fi
6249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
6250 printf "%s\n" "$lt_cv_nm_interface" >&6; }
6251
6252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6253 printf %s "checking whether ln -s works... " >&6; }
6254 LN_S=$as_ln_s
6255 if test "$LN_S" = "ln -s"; then
6256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6257 printf "%s\n" "yes" >&6; }
6258 else
6259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6260 printf "%s\n" "no, using $LN_S" >&6; }
6261 fi
6262
6263 # find the maximum length of command line arguments
6264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
6265 printf %s "checking the maximum length of command line arguments... " >&6; }
6266 if test ${lt_cv_sys_max_cmd_len+y}
6267 then :
6268 printf %s "(cached) " >&6
6269 else $as_nop
6270 i=0
6271 teststring=ABCD
6272
6273 case $build_os in
6274 msdosdjgpp*)
6275 # On DJGPP, this test can blow up pretty badly due to problems in libc
6276 # (any single argument exceeding 2000 bytes causes a buffer overrun
6277 # during glob expansion). Even if it were fixed, the result of this
6278 # check would be larger than it should be.
6279 lt_cv_sys_max_cmd_len=12288; # 12K is about right
6280 ;;
6281
6282 gnu*)
6283 # Under GNU Hurd, this test is not required because there is
6284 # no limit to the length of command line arguments.
6285 # Libtool will interpret -1 as no limit whatsoever
6286 lt_cv_sys_max_cmd_len=-1;
6287 ;;
6288
6289 cygwin* | mingw* | cegcc*)
6290 # On Win9x/ME, this test blows up -- it succeeds, but takes
6291 # about 5 minutes as the teststring grows exponentially.
6292 # Worse, since 9x/ME are not pre-emptively multitasking,
6293 # you end up with a "frozen" computer, even though with patience
6294 # the test eventually succeeds (with a max line length of 256k).
6295 # Instead, let's just punt: use the minimum linelength reported by
6296 # all of the supported platforms: 8192 (on NT/2K/XP).
6297 lt_cv_sys_max_cmd_len=8192;
6298 ;;
6299
6300 mint*)
6301 # On MiNT this can take a long time and run out of memory.
6302 lt_cv_sys_max_cmd_len=8192;
6303 ;;
6304
6305 amigaos*)
6306 # On AmigaOS with pdksh, this test takes hours, literally.
6307 # So we just punt and use a minimum line length of 8192.
6308 lt_cv_sys_max_cmd_len=8192;
6309 ;;
6310
6311 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
6312 # This has been around since 386BSD, at least. Likely further.
6313 if test -x /sbin/sysctl; then
6314 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6315 elif test -x /usr/sbin/sysctl; then
6316 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6317 else
6318 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
6319 fi
6320 # And add a safety zone
6321 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6322 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6323 ;;
6324
6325 interix*)
6326 # We know the value 262144 and hardcode it with a safety zone (like BSD)
6327 lt_cv_sys_max_cmd_len=196608
6328 ;;
6329
6330 os2*)
6331 # The test takes a long time on OS/2.
6332 lt_cv_sys_max_cmd_len=8192
6333 ;;
6334
6335 osf*)
6336 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6337 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6338 # nice to cause kernel panics so lets avoid the loop below.
6339 # First set a reasonable default.
6340 lt_cv_sys_max_cmd_len=16384
6341 #
6342 if test -x /sbin/sysconfig; then
6343 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6344 *1*) lt_cv_sys_max_cmd_len=-1 ;;
6345 esac
6346 fi
6347 ;;
6348 sco3.2v5*)
6349 lt_cv_sys_max_cmd_len=102400
6350 ;;
6351 sysv5* | sco5v6* | sysv4.2uw2*)
6352 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6353 if test -n "$kargmax"; then
6354 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
6355 else
6356 lt_cv_sys_max_cmd_len=32768
6357 fi
6358 ;;
6359 *)
6360 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
6361 if test -n "$lt_cv_sys_max_cmd_len" && \
6362 test undefined != "$lt_cv_sys_max_cmd_len"; then
6363 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6364 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6365 else
6366 # Make teststring a little bigger before we do anything with it.
6367 # a 1K string should be a reasonable start.
6368 for i in 1 2 3 4 5 6 7 8; do
6369 teststring=$teststring$teststring
6370 done
6371 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6372 # If test is not a shell built-in, we'll probably end up computing a
6373 # maximum length that is only half of the actual maximum length, but
6374 # we can't tell.
6375 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
6376 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
6377 test 17 != "$i" # 1/2 MB should be enough
6378 do
6379 i=`expr $i + 1`
6380 teststring=$teststring$teststring
6381 done
6382 # Only check the string length outside the loop.
6383 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
6384 teststring=
6385 # Add a significant safety factor because C++ compilers can tack on
6386 # massive amounts of additional arguments before passing them to the
6387 # linker. It appears as though 1/2 is a usable value.
6388 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6389 fi
6390 ;;
6391 esac
6392
6393 fi
6394
6395 if test -n "$lt_cv_sys_max_cmd_len"; then
6396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
6397 printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
6398 else
6399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
6400 printf "%s\n" "none" >&6; }
6401 fi
6402 max_cmd_len=$lt_cv_sys_max_cmd_len
6403
6404
6405
6406
6407
6408
6409 : ${CP="cp -f"}
6410 : ${MV="mv -f"}
6411 : ${RM="rm -f"}
6412
6413 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6414 lt_unset=unset
6415 else
6416 lt_unset=false
6417 fi
6418
6419
6420
6421
6422
6423 # test EBCDIC or ASCII
6424 case `echo X|tr X '\101'` in
6425 A) # ASCII based system
6426 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
6427 lt_SP2NL='tr \040 \012'
6428 lt_NL2SP='tr \015\012 \040\040'
6429 ;;
6430 *) # EBCDIC based system
6431 lt_SP2NL='tr \100 \n'
6432 lt_NL2SP='tr \r\n \100\100'
6433 ;;
6434 esac
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
6445 printf %s "checking how to convert $build file names to $host format... " >&6; }
6446 if test ${lt_cv_to_host_file_cmd+y}
6447 then :
6448 printf %s "(cached) " >&6
6449 else $as_nop
6450 case $host in
6451 *-*-mingw* )
6452 case $build in
6453 *-*-mingw* ) # actually msys
6454 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
6455 ;;
6456 *-*-cygwin* )
6457 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
6458 ;;
6459 * ) # otherwise, assume *nix
6460 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
6461 ;;
6462 esac
6463 ;;
6464 *-*-cygwin* )
6465 case $build in
6466 *-*-mingw* ) # actually msys
6467 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
6468 ;;
6469 *-*-cygwin* )
6470 lt_cv_to_host_file_cmd=func_convert_file_noop
6471 ;;
6472 * ) # otherwise, assume *nix
6473 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
6474 ;;
6475 esac
6476 ;;
6477 * ) # unhandled hosts (and "normal" native builds)
6478 lt_cv_to_host_file_cmd=func_convert_file_noop
6479 ;;
6480 esac
6481
6482 fi
6483
6484 to_host_file_cmd=$lt_cv_to_host_file_cmd
6485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
6486 printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
6487
6488
6489
6490
6491
6492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
6493 printf %s "checking how to convert $build file names to toolchain format... " >&6; }
6494 if test ${lt_cv_to_tool_file_cmd+y}
6495 then :
6496 printf %s "(cached) " >&6
6497 else $as_nop
6498 #assume ordinary cross tools, or native build.
6499 lt_cv_to_tool_file_cmd=func_convert_file_noop
6500 case $host in
6501 *-*-mingw* )
6502 case $build in
6503 *-*-mingw* ) # actually msys
6504 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
6505 ;;
6506 esac
6507 ;;
6508 esac
6509
6510 fi
6511
6512 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
6513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
6514 printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
6515
6516
6517
6518
6519
6520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6521 printf %s "checking for $LD option to reload object files... " >&6; }
6522 if test ${lt_cv_ld_reload_flag+y}
6523 then :
6524 printf %s "(cached) " >&6
6525 else $as_nop
6526 lt_cv_ld_reload_flag='-r'
6527 fi
6528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6529 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
6530 reload_flag=$lt_cv_ld_reload_flag
6531 case $reload_flag in
6532 "" | " "*) ;;
6533 *) reload_flag=" $reload_flag" ;;
6534 esac
6535 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6536 case $host_os in
6537 cygwin* | mingw* | pw32* | cegcc*)
6538 if test yes != "$GCC"; then
6539 reload_cmds=false
6540 fi
6541 ;;
6542 darwin*)
6543 if test yes = "$GCC"; then
6544 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
6545 else
6546 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6547 fi
6548 ;;
6549 esac
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559 if test -n "$ac_tool_prefix"; then
6560 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6561 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6563 printf %s "checking for $ac_word... " >&6; }
6564 if test ${ac_cv_prog_OBJDUMP+y}
6565 then :
6566 printf %s "(cached) " >&6
6567 else $as_nop
6568 if test -n "$OBJDUMP"; then
6569 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6570 else
6571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6572 for as_dir in $PATH
6573 do
6574 IFS=$as_save_IFS
6575 case $as_dir in #(((
6576 '') as_dir=./ ;;
6577 */) ;;
6578 *) as_dir=$as_dir/ ;;
6579 esac
6580 for ac_exec_ext in '' $ac_executable_extensions; do
6581 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6582 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6583 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6584 break 2
6585 fi
6586 done
6587 done
6588 IFS=$as_save_IFS
6589
6590 fi
6591 fi
6592 OBJDUMP=$ac_cv_prog_OBJDUMP
6593 if test -n "$OBJDUMP"; then
6594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
6595 printf "%s\n" "$OBJDUMP" >&6; }
6596 else
6597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6598 printf "%s\n" "no" >&6; }
6599 fi
6600
6601
6602 fi
6603 if test -z "$ac_cv_prog_OBJDUMP"; then
6604 ac_ct_OBJDUMP=$OBJDUMP
6605 # Extract the first word of "objdump", so it can be a program name with args.
6606 set dummy objdump; ac_word=$2
6607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6608 printf %s "checking for $ac_word... " >&6; }
6609 if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
6610 then :
6611 printf %s "(cached) " >&6
6612 else $as_nop
6613 if test -n "$ac_ct_OBJDUMP"; then
6614 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6615 else
6616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6617 for as_dir in $PATH
6618 do
6619 IFS=$as_save_IFS
6620 case $as_dir in #(((
6621 '') as_dir=./ ;;
6622 */) ;;
6623 *) as_dir=$as_dir/ ;;
6624 esac
6625 for ac_exec_ext in '' $ac_executable_extensions; do
6626 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6627 ac_cv_prog_ac_ct_OBJDUMP="objdump"
6628 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6629 break 2
6630 fi
6631 done
6632 done
6633 IFS=$as_save_IFS
6634
6635 fi
6636 fi
6637 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6638 if test -n "$ac_ct_OBJDUMP"; then
6639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
6640 printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
6641 else
6642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643 printf "%s\n" "no" >&6; }
6644 fi
6645
6646 if test "x$ac_ct_OBJDUMP" = x; then
6647 OBJDUMP="false"
6648 else
6649 case $cross_compiling:$ac_tool_warned in
6650 yes:)
6651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6652 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6653 ac_tool_warned=yes ;;
6654 esac
6655 OBJDUMP=$ac_ct_OBJDUMP
6656 fi
6657 else
6658 OBJDUMP="$ac_cv_prog_OBJDUMP"
6659 fi
6660
6661 test -z "$OBJDUMP" && OBJDUMP=objdump
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
6672 printf %s "checking how to recognize dependent libraries... " >&6; }
6673 if test ${lt_cv_deplibs_check_method+y}
6674 then :
6675 printf %s "(cached) " >&6
6676 else $as_nop
6677 lt_cv_file_magic_cmd='$MAGIC_CMD'
6678 lt_cv_file_magic_test_file=
6679 lt_cv_deplibs_check_method='unknown'
6680 # Need to set the preceding variable on all platforms that support
6681 # interlibrary dependencies.
6682 # 'none' -- dependencies not supported.
6683 # 'unknown' -- same as none, but documents that we really don't know.
6684 # 'pass_all' -- all dependencies passed with no checks.
6685 # 'test_compile' -- check by making test program.
6686 # 'file_magic [[regex]]' -- check by looking for files in library path
6687 # that responds to the $file_magic_cmd with a given extended regex.
6688 # If you have 'file' or equivalent on your system and you're not sure
6689 # whether 'pass_all' will *always* work, you probably want this one.
6690
6691 case $host_os in
6692 aix[4-9]*)
6693 lt_cv_deplibs_check_method=pass_all
6694 ;;
6695
6696 beos*)
6697 lt_cv_deplibs_check_method=pass_all
6698 ;;
6699
6700 bsdi[45]*)
6701 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6702 lt_cv_file_magic_cmd='/usr/bin/file -L'
6703 lt_cv_file_magic_test_file=/shlib/libc.so
6704 ;;
6705
6706 cygwin*)
6707 # func_win32_libid is a shell function defined in ltmain.sh
6708 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6709 lt_cv_file_magic_cmd='func_win32_libid'
6710 ;;
6711
6712 mingw* | pw32*)
6713 # Base MSYS/MinGW do not provide the 'file' command needed by
6714 # func_win32_libid shell function, so use a weaker test based on 'objdump',
6715 # unless we find 'file', for example because we are cross-compiling.
6716 if ( file / ) >/dev/null 2>&1; then
6717 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6718 lt_cv_file_magic_cmd='func_win32_libid'
6719 else
6720 # Keep this pattern in sync with the one in func_win32_libid.
6721 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
6722 lt_cv_file_magic_cmd='$OBJDUMP -f'
6723 fi
6724 ;;
6725
6726 cegcc*)
6727 # use the weaker test based on 'objdump'. See mingw*.
6728 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6729 lt_cv_file_magic_cmd='$OBJDUMP -f'
6730 ;;
6731
6732 darwin* | rhapsody*)
6733 lt_cv_deplibs_check_method=pass_all
6734 ;;
6735
6736 freebsd* | dragonfly*)
6737 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6738 case $host_cpu in
6739 i*86 )
6740 # Not sure whether the presence of OpenBSD here was a mistake.
6741 # Let's accept both of them until this is cleared up.
6742 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6743 lt_cv_file_magic_cmd=/usr/bin/file
6744 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6745 ;;
6746 esac
6747 else
6748 lt_cv_deplibs_check_method=pass_all
6749 fi
6750 ;;
6751
6752 haiku*)
6753 lt_cv_deplibs_check_method=pass_all
6754 ;;
6755
6756 hpux10.20* | hpux11*)
6757 lt_cv_file_magic_cmd=/usr/bin/file
6758 case $host_cpu in
6759 ia64*)
6760 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6761 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6762 ;;
6763 hppa*64*)
6764 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]'
6765 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6766 ;;
6767 *)
6768 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
6769 lt_cv_file_magic_test_file=/usr/lib/libc.sl
6770 ;;
6771 esac
6772 ;;
6773
6774 interix[3-9]*)
6775 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6776 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
6777 ;;
6778
6779 irix5* | irix6* | nonstopux*)
6780 case $LD in
6781 *-32|*"-32 ") libmagic=32-bit;;
6782 *-n32|*"-n32 ") libmagic=N32;;
6783 *-64|*"-64 ") libmagic=64-bit;;
6784 *) libmagic=never-match;;
6785 esac
6786 lt_cv_deplibs_check_method=pass_all
6787 ;;
6788
6789 # This must be glibc/ELF.
6790 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6791 lt_cv_deplibs_check_method=pass_all
6792 ;;
6793
6794 netbsd* | netbsdelf*-gnu)
6795 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6796 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6797 else
6798 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6799 fi
6800 ;;
6801
6802 newos6*)
6803 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6804 lt_cv_file_magic_cmd=/usr/bin/file
6805 lt_cv_file_magic_test_file=/usr/lib/libnls.so
6806 ;;
6807
6808 *nto* | *qnx*)
6809 lt_cv_deplibs_check_method=pass_all
6810 ;;
6811
6812 openbsd* | bitrig*)
6813 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6814 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6815 else
6816 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6817 fi
6818 ;;
6819
6820 osf3* | osf4* | osf5*)
6821 lt_cv_deplibs_check_method=pass_all
6822 ;;
6823
6824 rdos*)
6825 lt_cv_deplibs_check_method=pass_all
6826 ;;
6827
6828 solaris*)
6829 lt_cv_deplibs_check_method=pass_all
6830 ;;
6831
6832 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6833 lt_cv_deplibs_check_method=pass_all
6834 ;;
6835
6836 sysv4 | sysv4.3*)
6837 case $host_vendor in
6838 motorola)
6839 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]'
6840 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6841 ;;
6842 ncr)
6843 lt_cv_deplibs_check_method=pass_all
6844 ;;
6845 sequent)
6846 lt_cv_file_magic_cmd='/bin/file'
6847 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6848 ;;
6849 sni)
6850 lt_cv_file_magic_cmd='/bin/file'
6851 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6852 lt_cv_file_magic_test_file=/lib/libc.so
6853 ;;
6854 siemens)
6855 lt_cv_deplibs_check_method=pass_all
6856 ;;
6857 pc)
6858 lt_cv_deplibs_check_method=pass_all
6859 ;;
6860 esac
6861 ;;
6862
6863 tpf*)
6864 lt_cv_deplibs_check_method=pass_all
6865 ;;
6866 os2*)
6867 lt_cv_deplibs_check_method=pass_all
6868 ;;
6869 esac
6870
6871 fi
6872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6873 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
6874
6875 file_magic_glob=
6876 want_nocaseglob=no
6877 if test "$build" = "$host"; then
6878 case $host_os in
6879 mingw* | pw32*)
6880 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
6881 want_nocaseglob=yes
6882 else
6883 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
6884 fi
6885 ;;
6886 esac
6887 fi
6888
6889 file_magic_cmd=$lt_cv_file_magic_cmd
6890 deplibs_check_method=$lt_cv_deplibs_check_method
6891 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914 if test -n "$ac_tool_prefix"; then
6915 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6916 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6918 printf %s "checking for $ac_word... " >&6; }
6919 if test ${ac_cv_prog_DLLTOOL+y}
6920 then :
6921 printf %s "(cached) " >&6
6922 else $as_nop
6923 if test -n "$DLLTOOL"; then
6924 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6925 else
6926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6927 for as_dir in $PATH
6928 do
6929 IFS=$as_save_IFS
6930 case $as_dir in #(((
6931 '') as_dir=./ ;;
6932 */) ;;
6933 *) as_dir=$as_dir/ ;;
6934 esac
6935 for ac_exec_ext in '' $ac_executable_extensions; do
6936 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6937 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6938 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6939 break 2
6940 fi
6941 done
6942 done
6943 IFS=$as_save_IFS
6944
6945 fi
6946 fi
6947 DLLTOOL=$ac_cv_prog_DLLTOOL
6948 if test -n "$DLLTOOL"; then
6949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6950 printf "%s\n" "$DLLTOOL" >&6; }
6951 else
6952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6953 printf "%s\n" "no" >&6; }
6954 fi
6955
6956
6957 fi
6958 if test -z "$ac_cv_prog_DLLTOOL"; then
6959 ac_ct_DLLTOOL=$DLLTOOL
6960 # Extract the first word of "dlltool", so it can be a program name with args.
6961 set dummy dlltool; ac_word=$2
6962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6963 printf %s "checking for $ac_word... " >&6; }
6964 if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
6965 then :
6966 printf %s "(cached) " >&6
6967 else $as_nop
6968 if test -n "$ac_ct_DLLTOOL"; then
6969 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6970 else
6971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6972 for as_dir in $PATH
6973 do
6974 IFS=$as_save_IFS
6975 case $as_dir in #(((
6976 '') as_dir=./ ;;
6977 */) ;;
6978 *) as_dir=$as_dir/ ;;
6979 esac
6980 for ac_exec_ext in '' $ac_executable_extensions; do
6981 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6982 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6983 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6984 break 2
6985 fi
6986 done
6987 done
6988 IFS=$as_save_IFS
6989
6990 fi
6991 fi
6992 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6993 if test -n "$ac_ct_DLLTOOL"; then
6994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6995 printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
6996 else
6997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6998 printf "%s\n" "no" >&6; }
6999 fi
7000
7001 if test "x$ac_ct_DLLTOOL" = x; then
7002 DLLTOOL="false"
7003 else
7004 case $cross_compiling:$ac_tool_warned in
7005 yes:)
7006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7007 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7008 ac_tool_warned=yes ;;
7009 esac
7010 DLLTOOL=$ac_ct_DLLTOOL
7011 fi
7012 else
7013 DLLTOOL="$ac_cv_prog_DLLTOOL"
7014 fi
7015
7016 test -z "$DLLTOOL" && DLLTOOL=dlltool
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
7028 printf %s "checking how to associate runtime and link libraries... " >&6; }
7029 if test ${lt_cv_sharedlib_from_linklib_cmd+y}
7030 then :
7031 printf %s "(cached) " >&6
7032 else $as_nop
7033 lt_cv_sharedlib_from_linklib_cmd='unknown'
7034
7035 case $host_os in
7036 cygwin* | mingw* | pw32* | cegcc*)
7037 # two different shell functions defined in ltmain.sh;
7038 # decide which one to use based on capabilities of $DLLTOOL
7039 case `$DLLTOOL --help 2>&1` in
7040 *--identify-strict*)
7041 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
7042 ;;
7043 *)
7044 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
7045 ;;
7046 esac
7047 ;;
7048 *)
7049 # fallback: assume linklib IS sharedlib
7050 lt_cv_sharedlib_from_linklib_cmd=$ECHO
7051 ;;
7052 esac
7053
7054 fi
7055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
7056 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
7057 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
7058 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
7059
7060
7061
7062
7063
7064
7065
7066
7067 if test -n "$ac_tool_prefix"; then
7068 for ac_prog in ar
7069 do
7070 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7071 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7073 printf %s "checking for $ac_word... " >&6; }
7074 if test ${ac_cv_prog_AR+y}
7075 then :
7076 printf %s "(cached) " >&6
7077 else $as_nop
7078 if test -n "$AR"; then
7079 ac_cv_prog_AR="$AR" # Let the user override the test.
7080 else
7081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7082 for as_dir in $PATH
7083 do
7084 IFS=$as_save_IFS
7085 case $as_dir in #(((
7086 '') as_dir=./ ;;
7087 */) ;;
7088 *) as_dir=$as_dir/ ;;
7089 esac
7090 for ac_exec_ext in '' $ac_executable_extensions; do
7091 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7092 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7093 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7094 break 2
7095 fi
7096 done
7097 done
7098 IFS=$as_save_IFS
7099
7100 fi
7101 fi
7102 AR=$ac_cv_prog_AR
7103 if test -n "$AR"; then
7104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7105 printf "%s\n" "$AR" >&6; }
7106 else
7107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7108 printf "%s\n" "no" >&6; }
7109 fi
7110
7111
7112 test -n "$AR" && break
7113 done
7114 fi
7115 if test -z "$AR"; then
7116 ac_ct_AR=$AR
7117 for ac_prog in ar
7118 do
7119 # Extract the first word of "$ac_prog", so it can be a program name with args.
7120 set dummy $ac_prog; ac_word=$2
7121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7122 printf %s "checking for $ac_word... " >&6; }
7123 if test ${ac_cv_prog_ac_ct_AR+y}
7124 then :
7125 printf %s "(cached) " >&6
7126 else $as_nop
7127 if test -n "$ac_ct_AR"; then
7128 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7129 else
7130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7131 for as_dir in $PATH
7132 do
7133 IFS=$as_save_IFS
7134 case $as_dir in #(((
7135 '') as_dir=./ ;;
7136 */) ;;
7137 *) as_dir=$as_dir/ ;;
7138 esac
7139 for ac_exec_ext in '' $ac_executable_extensions; do
7140 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7141 ac_cv_prog_ac_ct_AR="$ac_prog"
7142 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7143 break 2
7144 fi
7145 done
7146 done
7147 IFS=$as_save_IFS
7148
7149 fi
7150 fi
7151 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7152 if test -n "$ac_ct_AR"; then
7153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7154 printf "%s\n" "$ac_ct_AR" >&6; }
7155 else
7156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7157 printf "%s\n" "no" >&6; }
7158 fi
7159
7160
7161 test -n "$ac_ct_AR" && break
7162 done
7163
7164 if test "x$ac_ct_AR" = x; then
7165 AR="false"
7166 else
7167 case $cross_compiling:$ac_tool_warned in
7168 yes:)
7169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7170 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7171 ac_tool_warned=yes ;;
7172 esac
7173 AR=$ac_ct_AR
7174 fi
7175 fi
7176
7177 : ${AR=ar}
7178 : ${AR_FLAGS=cr}
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
7191 printf %s "checking for archiver @FILE support... " >&6; }
7192 if test ${lt_cv_ar_at_file+y}
7193 then :
7194 printf %s "(cached) " >&6
7195 else $as_nop
7196 lt_cv_ar_at_file=no
7197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7198 /* end confdefs.h. */
7199
7200 int
7201 main (void)
7202 {
7203
7204 ;
7205 return 0;
7206 }
7207 _ACEOF
7208 if ac_fn_c_try_compile "$LINENO"
7209 then :
7210 echo conftest.$ac_objext > conftest.lst
7211 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
7212 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
7213 (eval $lt_ar_try) 2>&5
7214 ac_status=$?
7215 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7216 test $ac_status = 0; }
7217 if test 0 -eq "$ac_status"; then
7218 # Ensure the archiver fails upon bogus file names.
7219 rm -f conftest.$ac_objext libconftest.a
7220 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
7221 (eval $lt_ar_try) 2>&5
7222 ac_status=$?
7223 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7224 test $ac_status = 0; }
7225 if test 0 -ne "$ac_status"; then
7226 lt_cv_ar_at_file=@
7227 fi
7228 fi
7229 rm -f conftest.* libconftest.a
7230
7231 fi
7232 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7233
7234 fi
7235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
7236 printf "%s\n" "$lt_cv_ar_at_file" >&6; }
7237
7238 if test no = "$lt_cv_ar_at_file"; then
7239 archiver_list_spec=
7240 else
7241 archiver_list_spec=$lt_cv_ar_at_file
7242 fi
7243
7244
7245
7246
7247
7248
7249
7250 if test -n "$ac_tool_prefix"; then
7251 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7252 set dummy ${ac_tool_prefix}strip; ac_word=$2
7253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7254 printf %s "checking for $ac_word... " >&6; }
7255 if test ${ac_cv_prog_STRIP+y}
7256 then :
7257 printf %s "(cached) " >&6
7258 else $as_nop
7259 if test -n "$STRIP"; then
7260 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7261 else
7262 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7263 for as_dir in $PATH
7264 do
7265 IFS=$as_save_IFS
7266 case $as_dir in #(((
7267 '') as_dir=./ ;;
7268 */) ;;
7269 *) as_dir=$as_dir/ ;;
7270 esac
7271 for ac_exec_ext in '' $ac_executable_extensions; do
7272 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7273 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7274 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7275 break 2
7276 fi
7277 done
7278 done
7279 IFS=$as_save_IFS
7280
7281 fi
7282 fi
7283 STRIP=$ac_cv_prog_STRIP
7284 if test -n "$STRIP"; then
7285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7286 printf "%s\n" "$STRIP" >&6; }
7287 else
7288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7289 printf "%s\n" "no" >&6; }
7290 fi
7291
7292
7293 fi
7294 if test -z "$ac_cv_prog_STRIP"; then
7295 ac_ct_STRIP=$STRIP
7296 # Extract the first word of "strip", so it can be a program name with args.
7297 set dummy strip; ac_word=$2
7298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7299 printf %s "checking for $ac_word... " >&6; }
7300 if test ${ac_cv_prog_ac_ct_STRIP+y}
7301 then :
7302 printf %s "(cached) " >&6
7303 else $as_nop
7304 if test -n "$ac_ct_STRIP"; then
7305 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7306 else
7307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7308 for as_dir in $PATH
7309 do
7310 IFS=$as_save_IFS
7311 case $as_dir in #(((
7312 '') as_dir=./ ;;
7313 */) ;;
7314 *) as_dir=$as_dir/ ;;
7315 esac
7316 for ac_exec_ext in '' $ac_executable_extensions; do
7317 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7318 ac_cv_prog_ac_ct_STRIP="strip"
7319 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7320 break 2
7321 fi
7322 done
7323 done
7324 IFS=$as_save_IFS
7325
7326 fi
7327 fi
7328 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7329 if test -n "$ac_ct_STRIP"; then
7330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7331 printf "%s\n" "$ac_ct_STRIP" >&6; }
7332 else
7333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7334 printf "%s\n" "no" >&6; }
7335 fi
7336
7337 if test "x$ac_ct_STRIP" = x; then
7338 STRIP=":"
7339 else
7340 case $cross_compiling:$ac_tool_warned in
7341 yes:)
7342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7343 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7344 ac_tool_warned=yes ;;
7345 esac
7346 STRIP=$ac_ct_STRIP
7347 fi
7348 else
7349 STRIP="$ac_cv_prog_STRIP"
7350 fi
7351
7352 test -z "$STRIP" && STRIP=:
7353
7354
7355
7356
7357
7358
7359 if test -n "$ac_tool_prefix"; then
7360 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7361 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7363 printf %s "checking for $ac_word... " >&6; }
7364 if test ${ac_cv_prog_RANLIB+y}
7365 then :
7366 printf %s "(cached) " >&6
7367 else $as_nop
7368 if test -n "$RANLIB"; then
7369 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7370 else
7371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7372 for as_dir in $PATH
7373 do
7374 IFS=$as_save_IFS
7375 case $as_dir in #(((
7376 '') as_dir=./ ;;
7377 */) ;;
7378 *) as_dir=$as_dir/ ;;
7379 esac
7380 for ac_exec_ext in '' $ac_executable_extensions; do
7381 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7382 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7383 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7384 break 2
7385 fi
7386 done
7387 done
7388 IFS=$as_save_IFS
7389
7390 fi
7391 fi
7392 RANLIB=$ac_cv_prog_RANLIB
7393 if test -n "$RANLIB"; then
7394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7395 printf "%s\n" "$RANLIB" >&6; }
7396 else
7397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7398 printf "%s\n" "no" >&6; }
7399 fi
7400
7401
7402 fi
7403 if test -z "$ac_cv_prog_RANLIB"; then
7404 ac_ct_RANLIB=$RANLIB
7405 # Extract the first word of "ranlib", so it can be a program name with args.
7406 set dummy ranlib; ac_word=$2
7407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7408 printf %s "checking for $ac_word... " >&6; }
7409 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7410 then :
7411 printf %s "(cached) " >&6
7412 else $as_nop
7413 if test -n "$ac_ct_RANLIB"; then
7414 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7415 else
7416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7417 for as_dir in $PATH
7418 do
7419 IFS=$as_save_IFS
7420 case $as_dir in #(((
7421 '') as_dir=./ ;;
7422 */) ;;
7423 *) as_dir=$as_dir/ ;;
7424 esac
7425 for ac_exec_ext in '' $ac_executable_extensions; do
7426 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7427 ac_cv_prog_ac_ct_RANLIB="ranlib"
7428 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7429 break 2
7430 fi
7431 done
7432 done
7433 IFS=$as_save_IFS
7434
7435 fi
7436 fi
7437 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7438 if test -n "$ac_ct_RANLIB"; then
7439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7440 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7441 else
7442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7443 printf "%s\n" "no" >&6; }
7444 fi
7445
7446 if test "x$ac_ct_RANLIB" = x; then
7447 RANLIB=":"
7448 else
7449 case $cross_compiling:$ac_tool_warned in
7450 yes:)
7451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7452 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7453 ac_tool_warned=yes ;;
7454 esac
7455 RANLIB=$ac_ct_RANLIB
7456 fi
7457 else
7458 RANLIB="$ac_cv_prog_RANLIB"
7459 fi
7460
7461 test -z "$RANLIB" && RANLIB=:
7462
7463
7464
7465
7466
7467
7468 # Determine commands to create old-style static archives.
7469 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
7470 old_postinstall_cmds='chmod 644 $oldlib'
7471 old_postuninstall_cmds=
7472
7473 if test -n "$RANLIB"; then
7474 case $host_os in
7475 bitrig* | openbsd*)
7476 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
7477 ;;
7478 *)
7479 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
7480 ;;
7481 esac
7482 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
7483 fi
7484
7485 case $host_os in
7486 darwin*)
7487 lock_old_archive_extraction=yes ;;
7488 *)
7489 lock_old_archive_extraction=no ;;
7490 esac
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530 # If no C compiler was specified, use CC.
7531 LTCC=${LTCC-"$CC"}
7532
7533 # If no C compiler flags were specified, use CFLAGS.
7534 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7535
7536 # Allow CC to be a program name with arguments.
7537 compiler=$CC
7538
7539
7540 # Check for command to grab the raw symbol name followed by C symbol from nm.
7541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7542 printf %s "checking command to parse $NM output from $compiler object... " >&6; }
7543 if test ${lt_cv_sys_global_symbol_pipe+y}
7544 then :
7545 printf %s "(cached) " >&6
7546 else $as_nop
7547
7548 # These are sane defaults that work on at least a few old systems.
7549 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
7550
7551 # Character class describing NM global symbol codes.
7552 symcode='[BCDEGRST]'
7553
7554 # Regexp to match symbols that can be accessed directly from C.
7555 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7556
7557 # Define system-specific variables.
7558 case $host_os in
7559 aix*)
7560 symcode='[BCDT]'
7561 ;;
7562 cygwin* | mingw* | pw32* | cegcc*)
7563 symcode='[ABCDGISTW]'
7564 ;;
7565 hpux*)
7566 if test ia64 = "$host_cpu"; then
7567 symcode='[ABCDEGRST]'
7568 fi
7569 ;;
7570 irix* | nonstopux*)
7571 symcode='[BCDEGRST]'
7572 ;;
7573 osf*)
7574 symcode='[BCDEGQRST]'
7575 ;;
7576 solaris*)
7577 symcode='[BDRT]'
7578 ;;
7579 sco3.2v5*)
7580 symcode='[DT]'
7581 ;;
7582 sysv4.2uw2*)
7583 symcode='[DT]'
7584 ;;
7585 sysv5* | sco5v6* | unixware* | OpenUNIX*)
7586 symcode='[ABDT]'
7587 ;;
7588 sysv4)
7589 symcode='[DFNSTU]'
7590 ;;
7591 esac
7592
7593 # If we're using GNU nm, then use its standard symbol codes.
7594 case `$NM -V 2>&1` in
7595 *GNU* | *'with BFD'*)
7596 symcode='[ABCDGIRSTW]' ;;
7597 esac
7598
7599 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7600 # Gets list of data symbols to import.
7601 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
7602 # Adjust the below global symbol transforms to fixup imported variables.
7603 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
7604 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
7605 lt_c_name_lib_hook="\
7606 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
7607 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
7608 else
7609 # Disable hooks by default.
7610 lt_cv_sys_global_symbol_to_import=
7611 lt_cdecl_hook=
7612 lt_c_name_hook=
7613 lt_c_name_lib_hook=
7614 fi
7615
7616 # Transform an extracted symbol line into a proper C declaration.
7617 # Some systems (esp. on ia64) link data and code symbols differently,
7618 # so use this general approach.
7619 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
7620 $lt_cdecl_hook\
7621 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
7622 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
7623
7624 # Transform an extracted symbol line into symbol name and symbol address
7625 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
7626 $lt_c_name_hook\
7627 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
7628 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
7629
7630 # Transform an extracted symbol line into symbol name with lib prefix and
7631 # symbol address.
7632 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
7633 $lt_c_name_lib_hook\
7634 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
7635 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
7636 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
7637
7638 # Handle CRLF in mingw tool chain
7639 opt_cr=
7640 case $build_os in
7641 mingw*)
7642 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7643 ;;
7644 esac
7645
7646 # Try without a prefix underscore, then with it.
7647 for ac_symprfx in "" "_"; do
7648
7649 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7650 symxfrm="\\1 $ac_symprfx\\2 \\2"
7651
7652 # Write the raw and C identifiers.
7653 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7654 # Fake it for dumpbin and say T for any non-static function,
7655 # D for any global variable and I for any imported variable.
7656 # Also find C++ and __fastcall symbols from MSVC++,
7657 # which start with @ or ?.
7658 lt_cv_sys_global_symbol_pipe="$AWK '"\
7659 " {last_section=section; section=\$ 3};"\
7660 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
7661 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7662 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
7663 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
7664 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
7665 " \$ 0!~/External *\|/{next};"\
7666 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7667 " {if(hide[section]) next};"\
7668 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
7669 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
7670 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
7671 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
7672 " ' prfx=^$ac_symprfx"
7673 else
7674 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7675 fi
7676 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
7677
7678 # Check to see that the pipe works correctly.
7679 pipe_works=no
7680
7681 rm -f conftest*
7682 cat > conftest.$ac_ext <<_LT_EOF
7683 #ifdef __cplusplus
7684 extern "C" {
7685 #endif
7686 char nm_test_var;
7687 void nm_test_func(void);
7688 void nm_test_func(void){}
7689 #ifdef __cplusplus
7690 }
7691 #endif
7692 int main(){nm_test_var='a';nm_test_func();return(0);}
7693 _LT_EOF
7694
7695 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7696 (eval $ac_compile) 2>&5
7697 ac_status=$?
7698 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7699 test $ac_status = 0; }; then
7700 # Now try to grab the symbols.
7701 nlist=conftest.nm
7702 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
7703 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
7704 # Try sorting and uniquifying the output.
7705 if sort "$nlist" | uniq > "$nlist"T; then
7706 mv -f "$nlist"T "$nlist"
7707 else
7708 rm -f "$nlist"T
7709 fi
7710
7711 # Make sure that we snagged all the symbols we need.
7712 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7713 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7714 cat <<_LT_EOF > conftest.$ac_ext
7715 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
7716 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
7717 /* DATA imports from DLLs on WIN32 can't be const, because runtime
7718 relocations are performed -- see ld's documentation on pseudo-relocs. */
7719 # define LT_DLSYM_CONST
7720 #elif defined __osf__
7721 /* This system does not cope well with relocations in const data. */
7722 # define LT_DLSYM_CONST
7723 #else
7724 # define LT_DLSYM_CONST const
7725 #endif
7726
7727 #ifdef __cplusplus
7728 extern "C" {
7729 #endif
7730
7731 _LT_EOF
7732 # Now generate the symbol file.
7733 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7734
7735 cat <<_LT_EOF >> conftest.$ac_ext
7736
7737 /* The mapping between symbol names and symbols. */
7738 LT_DLSYM_CONST struct {
7739 const char *name;
7740 void *address;
7741 }
7742 lt__PROGRAM__LTX_preloaded_symbols[] =
7743 {
7744 { "@PROGRAM@", (void *) 0 },
7745 _LT_EOF
7746 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7747 cat <<\_LT_EOF >> conftest.$ac_ext
7748 {0, (void *) 0}
7749 };
7750
7751 /* This works around a problem in FreeBSD linker */
7752 #ifdef FREEBSD_WORKAROUND
7753 static const void *lt_preloaded_setup() {
7754 return lt__PROGRAM__LTX_preloaded_symbols;
7755 }
7756 #endif
7757
7758 #ifdef __cplusplus
7759 }
7760 #endif
7761 _LT_EOF
7762 # Now try linking the two files.
7763 mv conftest.$ac_objext conftstm.$ac_objext
7764 lt_globsym_save_LIBS=$LIBS
7765 lt_globsym_save_CFLAGS=$CFLAGS
7766 LIBS=conftstm.$ac_objext
7767 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7768 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7769 (eval $ac_link) 2>&5
7770 ac_status=$?
7771 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7772 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7773 pipe_works=yes
7774 fi
7775 LIBS=$lt_globsym_save_LIBS
7776 CFLAGS=$lt_globsym_save_CFLAGS
7777 else
7778 echo "cannot find nm_test_func in $nlist" >&5
7779 fi
7780 else
7781 echo "cannot find nm_test_var in $nlist" >&5
7782 fi
7783 else
7784 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7785 fi
7786 else
7787 echo "$progname: failed program was:" >&5
7788 cat conftest.$ac_ext >&5
7789 fi
7790 rm -rf conftest* conftst*
7791
7792 # Do not use the global_symbol_pipe unless it works.
7793 if test yes = "$pipe_works"; then
7794 break
7795 else
7796 lt_cv_sys_global_symbol_pipe=
7797 fi
7798 done
7799
7800 fi
7801
7802 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7803 lt_cv_sys_global_symbol_to_cdecl=
7804 fi
7805 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7807 printf "%s\n" "failed" >&6; }
7808 else
7809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7810 printf "%s\n" "ok" >&6; }
7811 fi
7812
7813 # Response file support.
7814 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7815 nm_file_list_spec='@'
7816 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
7817 nm_file_list_spec='@'
7818 fi
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
7857 printf %s "checking for sysroot... " >&6; }
7858
7859 # Check whether --with-sysroot was given.
7860 if test ${with_sysroot+y}
7861 then :
7862 withval=$with_sysroot;
7863 else $as_nop
7864 with_sysroot=no
7865 fi
7866
7867
7868 lt_sysroot=
7869 case $with_sysroot in #(
7870 yes)
7871 if test yes = "$GCC"; then
7872 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
7873 fi
7874 ;; #(
7875 /*)
7876 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
7877 ;; #(
7878 no|'')
7879 ;; #(
7880 *)
7881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
7882 printf "%s\n" "$with_sysroot" >&6; }
7883 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
7884 ;;
7885 esac
7886
7887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
7888 printf "%s\n" "${lt_sysroot:-no}" >&6; }
7889
7890
7891
7892
7893
7894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
7895 printf %s "checking for a working dd... " >&6; }
7896 if test ${ac_cv_path_lt_DD+y}
7897 then :
7898 printf %s "(cached) " >&6
7899 else $as_nop
7900 printf 0123456789abcdef0123456789abcdef >conftest.i
7901 cat conftest.i conftest.i >conftest2.i
7902 : ${lt_DD:=$DD}
7903 if test -z "$lt_DD"; then
7904 ac_path_lt_DD_found=false
7905 # Loop through the user's path and test for each of PROGNAME-LIST
7906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7907 for as_dir in $PATH
7908 do
7909 IFS=$as_save_IFS
7910 case $as_dir in #(((
7911 '') as_dir=./ ;;
7912 */) ;;
7913 *) as_dir=$as_dir/ ;;
7914 esac
7915 for ac_prog in dd
7916 do
7917 for ac_exec_ext in '' $ac_executable_extensions; do
7918 ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
7919 as_fn_executable_p "$ac_path_lt_DD" || continue
7920 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7921 cmp -s conftest.i conftest.out \
7922 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
7923 fi
7924 $ac_path_lt_DD_found && break 3
7925 done
7926 done
7927 done
7928 IFS=$as_save_IFS
7929 if test -z "$ac_cv_path_lt_DD"; then
7930 :
7931 fi
7932 else
7933 ac_cv_path_lt_DD=$lt_DD
7934 fi
7935
7936 rm -f conftest.i conftest2.i conftest.out
7937 fi
7938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
7939 printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
7940
7941
7942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
7943 printf %s "checking how to truncate binary pipes... " >&6; }
7944 if test ${lt_cv_truncate_bin+y}
7945 then :
7946 printf %s "(cached) " >&6
7947 else $as_nop
7948 printf 0123456789abcdef0123456789abcdef >conftest.i
7949 cat conftest.i conftest.i >conftest2.i
7950 lt_cv_truncate_bin=
7951 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7952 cmp -s conftest.i conftest.out \
7953 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
7954 fi
7955 rm -f conftest.i conftest2.i conftest.out
7956 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
7957 fi
7958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
7959 printf "%s\n" "$lt_cv_truncate_bin" >&6; }
7960
7961
7962
7963
7964
7965
7966
7967 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
7968 func_cc_basename ()
7969 {
7970 for cc_temp in $*""; do
7971 case $cc_temp in
7972 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7973 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7974 \-*) ;;
7975 *) break;;
7976 esac
7977 done
7978 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
7979 }
7980
7981 # Check whether --enable-libtool-lock was given.
7982 if test ${enable_libtool_lock+y}
7983 then :
7984 enableval=$enable_libtool_lock;
7985 fi
7986
7987 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
7988
7989 # Some flags need to be propagated to the compiler or linker for good
7990 # libtool support.
7991 case $host in
7992 ia64-*-hpux*)
7993 # Find out what ABI is being produced by ac_compile, and set mode
7994 # options accordingly.
7995 echo 'int i;' > conftest.$ac_ext
7996 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7997 (eval $ac_compile) 2>&5
7998 ac_status=$?
7999 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8000 test $ac_status = 0; }; then
8001 case `/usr/bin/file conftest.$ac_objext` in
8002 *ELF-32*)
8003 HPUX_IA64_MODE=32
8004 ;;
8005 *ELF-64*)
8006 HPUX_IA64_MODE=64
8007 ;;
8008 esac
8009 fi
8010 rm -rf conftest*
8011 ;;
8012 *-*-irix6*)
8013 # Find out what ABI is being produced by ac_compile, and set linker
8014 # options accordingly.
8015 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
8016 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8017 (eval $ac_compile) 2>&5
8018 ac_status=$?
8019 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8020 test $ac_status = 0; }; then
8021 if test yes = "$lt_cv_prog_gnu_ld"; then
8022 case `/usr/bin/file conftest.$ac_objext` in
8023 *32-bit*)
8024 LD="${LD-ld} -melf32bsmip"
8025 ;;
8026 *N32*)
8027 LD="${LD-ld} -melf32bmipn32"
8028 ;;
8029 *64-bit*)
8030 LD="${LD-ld} -melf64bmip"
8031 ;;
8032 esac
8033 else
8034 case `/usr/bin/file conftest.$ac_objext` in
8035 *32-bit*)
8036 LD="${LD-ld} -32"
8037 ;;
8038 *N32*)
8039 LD="${LD-ld} -n32"
8040 ;;
8041 *64-bit*)
8042 LD="${LD-ld} -64"
8043 ;;
8044 esac
8045 fi
8046 fi
8047 rm -rf conftest*
8048 ;;
8049
8050 mips64*-*linux*)
8051 # Find out what ABI is being produced by ac_compile, and set linker
8052 # options accordingly.
8053 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
8054 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8055 (eval $ac_compile) 2>&5
8056 ac_status=$?
8057 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8058 test $ac_status = 0; }; then
8059 emul=elf
8060 case `/usr/bin/file conftest.$ac_objext` in
8061 *32-bit*)
8062 emul="${emul}32"
8063 ;;
8064 *64-bit*)
8065 emul="${emul}64"
8066 ;;
8067 esac
8068 case `/usr/bin/file conftest.$ac_objext` in
8069 *MSB*)
8070 emul="${emul}btsmip"
8071 ;;
8072 *LSB*)
8073 emul="${emul}ltsmip"
8074 ;;
8075 esac
8076 case `/usr/bin/file conftest.$ac_objext` in
8077 *N32*)
8078 emul="${emul}n32"
8079 ;;
8080 esac
8081 LD="${LD-ld} -m $emul"
8082 fi
8083 rm -rf conftest*
8084 ;;
8085
8086 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
8087 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
8088 # Find out what ABI is being produced by ac_compile, and set linker
8089 # options accordingly. Note that the listed cases only cover the
8090 # situations where additional linker options are needed (such as when
8091 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
8092 # vice versa); the common cases where no linker options are needed do
8093 # not appear in the list.
8094 echo 'int i;' > conftest.$ac_ext
8095 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8096 (eval $ac_compile) 2>&5
8097 ac_status=$?
8098 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8099 test $ac_status = 0; }; then
8100 case `/usr/bin/file conftest.o` in
8101 *32-bit*)
8102 case $host in
8103 x86_64-*kfreebsd*-gnu)
8104 LD="${LD-ld} -m elf_i386_fbsd"
8105 ;;
8106 x86_64-*linux*)
8107 case `/usr/bin/file conftest.o` in
8108 *x86-64*)
8109 LD="${LD-ld} -m elf32_x86_64"
8110 ;;
8111 *)
8112 LD="${LD-ld} -m elf_i386"
8113 ;;
8114 esac
8115 ;;
8116 powerpc64le-*linux*)
8117 LD="${LD-ld} -m elf32lppclinux"
8118 ;;
8119 powerpc64-*linux*)
8120 LD="${LD-ld} -m elf32ppclinux"
8121 ;;
8122 s390x-*linux*)
8123 LD="${LD-ld} -m elf_s390"
8124 ;;
8125 sparc64-*linux*)
8126 LD="${LD-ld} -m elf32_sparc"
8127 ;;
8128 esac
8129 ;;
8130 *64-bit*)
8131 case $host in
8132 x86_64-*kfreebsd*-gnu)
8133 LD="${LD-ld} -m elf_x86_64_fbsd"
8134 ;;
8135 x86_64-*linux*)
8136 LD="${LD-ld} -m elf_x86_64"
8137 ;;
8138 powerpcle-*linux*)
8139 LD="${LD-ld} -m elf64lppc"
8140 ;;
8141 powerpc-*linux*)
8142 LD="${LD-ld} -m elf64ppc"
8143 ;;
8144 s390*-*linux*|s390*-*tpf*)
8145 LD="${LD-ld} -m elf64_s390"
8146 ;;
8147 sparc*-*linux*)
8148 LD="${LD-ld} -m elf64_sparc"
8149 ;;
8150 esac
8151 ;;
8152 esac
8153 fi
8154 rm -rf conftest*
8155 ;;
8156
8157 *-*-sco3.2v5*)
8158 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
8159 SAVE_CFLAGS=$CFLAGS
8160 CFLAGS="$CFLAGS -belf"
8161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
8162 printf %s "checking whether the C compiler needs -belf... " >&6; }
8163 if test ${lt_cv_cc_needs_belf+y}
8164 then :
8165 printf %s "(cached) " >&6
8166 else $as_nop
8167 ac_ext=c
8168 ac_cpp='$CPP $CPPFLAGS'
8169 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8170 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8171 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8172
8173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8174 /* end confdefs.h. */
8175
8176 int
8177 main (void)
8178 {
8179
8180 ;
8181 return 0;
8182 }
8183 _ACEOF
8184 if ac_fn_c_try_link "$LINENO"
8185 then :
8186 lt_cv_cc_needs_belf=yes
8187 else $as_nop
8188 lt_cv_cc_needs_belf=no
8189 fi
8190 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8191 conftest$ac_exeext conftest.$ac_ext
8192 ac_ext=c
8193 ac_cpp='$CPP $CPPFLAGS'
8194 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8195 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8196 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8197
8198 fi
8199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
8200 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
8201 if test yes != "$lt_cv_cc_needs_belf"; then
8202 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
8203 CFLAGS=$SAVE_CFLAGS
8204 fi
8205 ;;
8206 *-*solaris*)
8207 # Find out what ABI is being produced by ac_compile, and set linker
8208 # options accordingly.
8209 echo 'int i;' > conftest.$ac_ext
8210 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8211 (eval $ac_compile) 2>&5
8212 ac_status=$?
8213 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8214 test $ac_status = 0; }; then
8215 case `/usr/bin/file conftest.o` in
8216 *64-bit*)
8217 case $lt_cv_prog_gnu_ld in
8218 yes*)
8219 case $host in
8220 i?86-*-solaris*|x86_64-*-solaris*)
8221 LD="${LD-ld} -m elf_x86_64"
8222 ;;
8223 sparc*-*-solaris*)
8224 LD="${LD-ld} -m elf64_sparc"
8225 ;;
8226 esac
8227 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
8228 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
8229 LD=${LD-ld}_sol2
8230 fi
8231 ;;
8232 *)
8233 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
8234 LD="${LD-ld} -64"
8235 fi
8236 ;;
8237 esac
8238 ;;
8239 esac
8240 fi
8241 rm -rf conftest*
8242 ;;
8243 esac
8244
8245 need_locks=$enable_libtool_lock
8246
8247 if test -n "$ac_tool_prefix"; then
8248 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
8249 set dummy ${ac_tool_prefix}mt; ac_word=$2
8250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251 printf %s "checking for $ac_word... " >&6; }
8252 if test ${ac_cv_prog_MANIFEST_TOOL+y}
8253 then :
8254 printf %s "(cached) " >&6
8255 else $as_nop
8256 if test -n "$MANIFEST_TOOL"; then
8257 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
8258 else
8259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8260 for as_dir in $PATH
8261 do
8262 IFS=$as_save_IFS
8263 case $as_dir in #(((
8264 '') as_dir=./ ;;
8265 */) ;;
8266 *) as_dir=$as_dir/ ;;
8267 esac
8268 for ac_exec_ext in '' $ac_executable_extensions; do
8269 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8270 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
8271 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8272 break 2
8273 fi
8274 done
8275 done
8276 IFS=$as_save_IFS
8277
8278 fi
8279 fi
8280 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
8281 if test -n "$MANIFEST_TOOL"; then
8282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
8283 printf "%s\n" "$MANIFEST_TOOL" >&6; }
8284 else
8285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8286 printf "%s\n" "no" >&6; }
8287 fi
8288
8289
8290 fi
8291 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
8292 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
8293 # Extract the first word of "mt", so it can be a program name with args.
8294 set dummy mt; ac_word=$2
8295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8296 printf %s "checking for $ac_word... " >&6; }
8297 if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
8298 then :
8299 printf %s "(cached) " >&6
8300 else $as_nop
8301 if test -n "$ac_ct_MANIFEST_TOOL"; then
8302 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
8303 else
8304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305 for as_dir in $PATH
8306 do
8307 IFS=$as_save_IFS
8308 case $as_dir in #(((
8309 '') as_dir=./ ;;
8310 */) ;;
8311 *) as_dir=$as_dir/ ;;
8312 esac
8313 for ac_exec_ext in '' $ac_executable_extensions; do
8314 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8315 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
8316 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8317 break 2
8318 fi
8319 done
8320 done
8321 IFS=$as_save_IFS
8322
8323 fi
8324 fi
8325 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
8326 if test -n "$ac_ct_MANIFEST_TOOL"; then
8327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
8328 printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
8329 else
8330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8331 printf "%s\n" "no" >&6; }
8332 fi
8333
8334 if test "x$ac_ct_MANIFEST_TOOL" = x; then
8335 MANIFEST_TOOL=":"
8336 else
8337 case $cross_compiling:$ac_tool_warned in
8338 yes:)
8339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8340 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8341 ac_tool_warned=yes ;;
8342 esac
8343 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
8344 fi
8345 else
8346 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
8347 fi
8348
8349 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
8350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
8351 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
8352 if test ${lt_cv_path_mainfest_tool+y}
8353 then :
8354 printf %s "(cached) " >&6
8355 else $as_nop
8356 lt_cv_path_mainfest_tool=no
8357 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
8358 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
8359 cat conftest.err >&5
8360 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
8361 lt_cv_path_mainfest_tool=yes
8362 fi
8363 rm -f conftest*
8364 fi
8365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
8366 printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
8367 if test yes != "$lt_cv_path_mainfest_tool"; then
8368 MANIFEST_TOOL=:
8369 fi
8370
8371
8372
8373
8374
8375
8376 case $host_os in
8377 rhapsody* | darwin*)
8378 if test -n "$ac_tool_prefix"; then
8379 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
8380 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
8381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8382 printf %s "checking for $ac_word... " >&6; }
8383 if test ${ac_cv_prog_DSYMUTIL+y}
8384 then :
8385 printf %s "(cached) " >&6
8386 else $as_nop
8387 if test -n "$DSYMUTIL"; then
8388 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
8389 else
8390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8391 for as_dir in $PATH
8392 do
8393 IFS=$as_save_IFS
8394 case $as_dir in #(((
8395 '') as_dir=./ ;;
8396 */) ;;
8397 *) as_dir=$as_dir/ ;;
8398 esac
8399 for ac_exec_ext in '' $ac_executable_extensions; do
8400 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8401 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
8402 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8403 break 2
8404 fi
8405 done
8406 done
8407 IFS=$as_save_IFS
8408
8409 fi
8410 fi
8411 DSYMUTIL=$ac_cv_prog_DSYMUTIL
8412 if test -n "$DSYMUTIL"; then
8413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
8414 printf "%s\n" "$DSYMUTIL" >&6; }
8415 else
8416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8417 printf "%s\n" "no" >&6; }
8418 fi
8419
8420
8421 fi
8422 if test -z "$ac_cv_prog_DSYMUTIL"; then
8423 ac_ct_DSYMUTIL=$DSYMUTIL
8424 # Extract the first word of "dsymutil", so it can be a program name with args.
8425 set dummy dsymutil; ac_word=$2
8426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8427 printf %s "checking for $ac_word... " >&6; }
8428 if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
8429 then :
8430 printf %s "(cached) " >&6
8431 else $as_nop
8432 if test -n "$ac_ct_DSYMUTIL"; then
8433 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
8434 else
8435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8436 for as_dir in $PATH
8437 do
8438 IFS=$as_save_IFS
8439 case $as_dir in #(((
8440 '') as_dir=./ ;;
8441 */) ;;
8442 *) as_dir=$as_dir/ ;;
8443 esac
8444 for ac_exec_ext in '' $ac_executable_extensions; do
8445 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8446 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
8447 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8448 break 2
8449 fi
8450 done
8451 done
8452 IFS=$as_save_IFS
8453
8454 fi
8455 fi
8456 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
8457 if test -n "$ac_ct_DSYMUTIL"; then
8458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
8459 printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
8460 else
8461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462 printf "%s\n" "no" >&6; }
8463 fi
8464
8465 if test "x$ac_ct_DSYMUTIL" = x; then
8466 DSYMUTIL=":"
8467 else
8468 case $cross_compiling:$ac_tool_warned in
8469 yes:)
8470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8471 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8472 ac_tool_warned=yes ;;
8473 esac
8474 DSYMUTIL=$ac_ct_DSYMUTIL
8475 fi
8476 else
8477 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
8478 fi
8479
8480 if test -n "$ac_tool_prefix"; then
8481 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
8482 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
8483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8484 printf %s "checking for $ac_word... " >&6; }
8485 if test ${ac_cv_prog_NMEDIT+y}
8486 then :
8487 printf %s "(cached) " >&6
8488 else $as_nop
8489 if test -n "$NMEDIT"; then
8490 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
8491 else
8492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8493 for as_dir in $PATH
8494 do
8495 IFS=$as_save_IFS
8496 case $as_dir in #(((
8497 '') as_dir=./ ;;
8498 */) ;;
8499 *) as_dir=$as_dir/ ;;
8500 esac
8501 for ac_exec_ext in '' $ac_executable_extensions; do
8502 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8503 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
8504 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8505 break 2
8506 fi
8507 done
8508 done
8509 IFS=$as_save_IFS
8510
8511 fi
8512 fi
8513 NMEDIT=$ac_cv_prog_NMEDIT
8514 if test -n "$NMEDIT"; then
8515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
8516 printf "%s\n" "$NMEDIT" >&6; }
8517 else
8518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519 printf "%s\n" "no" >&6; }
8520 fi
8521
8522
8523 fi
8524 if test -z "$ac_cv_prog_NMEDIT"; then
8525 ac_ct_NMEDIT=$NMEDIT
8526 # Extract the first word of "nmedit", so it can be a program name with args.
8527 set dummy nmedit; ac_word=$2
8528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8529 printf %s "checking for $ac_word... " >&6; }
8530 if test ${ac_cv_prog_ac_ct_NMEDIT+y}
8531 then :
8532 printf %s "(cached) " >&6
8533 else $as_nop
8534 if test -n "$ac_ct_NMEDIT"; then
8535 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
8536 else
8537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8538 for as_dir in $PATH
8539 do
8540 IFS=$as_save_IFS
8541 case $as_dir in #(((
8542 '') as_dir=./ ;;
8543 */) ;;
8544 *) as_dir=$as_dir/ ;;
8545 esac
8546 for ac_exec_ext in '' $ac_executable_extensions; do
8547 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8548 ac_cv_prog_ac_ct_NMEDIT="nmedit"
8549 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8550 break 2
8551 fi
8552 done
8553 done
8554 IFS=$as_save_IFS
8555
8556 fi
8557 fi
8558 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
8559 if test -n "$ac_ct_NMEDIT"; then
8560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
8561 printf "%s\n" "$ac_ct_NMEDIT" >&6; }
8562 else
8563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8564 printf "%s\n" "no" >&6; }
8565 fi
8566
8567 if test "x$ac_ct_NMEDIT" = x; then
8568 NMEDIT=":"
8569 else
8570 case $cross_compiling:$ac_tool_warned in
8571 yes:)
8572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8573 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8574 ac_tool_warned=yes ;;
8575 esac
8576 NMEDIT=$ac_ct_NMEDIT
8577 fi
8578 else
8579 NMEDIT="$ac_cv_prog_NMEDIT"
8580 fi
8581
8582 if test -n "$ac_tool_prefix"; then
8583 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
8584 set dummy ${ac_tool_prefix}lipo; ac_word=$2
8585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8586 printf %s "checking for $ac_word... " >&6; }
8587 if test ${ac_cv_prog_LIPO+y}
8588 then :
8589 printf %s "(cached) " >&6
8590 else $as_nop
8591 if test -n "$LIPO"; then
8592 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
8593 else
8594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8595 for as_dir in $PATH
8596 do
8597 IFS=$as_save_IFS
8598 case $as_dir in #(((
8599 '') as_dir=./ ;;
8600 */) ;;
8601 *) as_dir=$as_dir/ ;;
8602 esac
8603 for ac_exec_ext in '' $ac_executable_extensions; do
8604 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8605 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
8606 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8607 break 2
8608 fi
8609 done
8610 done
8611 IFS=$as_save_IFS
8612
8613 fi
8614 fi
8615 LIPO=$ac_cv_prog_LIPO
8616 if test -n "$LIPO"; then
8617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
8618 printf "%s\n" "$LIPO" >&6; }
8619 else
8620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8621 printf "%s\n" "no" >&6; }
8622 fi
8623
8624
8625 fi
8626 if test -z "$ac_cv_prog_LIPO"; then
8627 ac_ct_LIPO=$LIPO
8628 # Extract the first word of "lipo", so it can be a program name with args.
8629 set dummy lipo; ac_word=$2
8630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8631 printf %s "checking for $ac_word... " >&6; }
8632 if test ${ac_cv_prog_ac_ct_LIPO+y}
8633 then :
8634 printf %s "(cached) " >&6
8635 else $as_nop
8636 if test -n "$ac_ct_LIPO"; then
8637 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
8638 else
8639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8640 for as_dir in $PATH
8641 do
8642 IFS=$as_save_IFS
8643 case $as_dir in #(((
8644 '') as_dir=./ ;;
8645 */) ;;
8646 *) as_dir=$as_dir/ ;;
8647 esac
8648 for ac_exec_ext in '' $ac_executable_extensions; do
8649 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8650 ac_cv_prog_ac_ct_LIPO="lipo"
8651 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8652 break 2
8653 fi
8654 done
8655 done
8656 IFS=$as_save_IFS
8657
8658 fi
8659 fi
8660 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
8661 if test -n "$ac_ct_LIPO"; then
8662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
8663 printf "%s\n" "$ac_ct_LIPO" >&6; }
8664 else
8665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8666 printf "%s\n" "no" >&6; }
8667 fi
8668
8669 if test "x$ac_ct_LIPO" = x; then
8670 LIPO=":"
8671 else
8672 case $cross_compiling:$ac_tool_warned in
8673 yes:)
8674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8675 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8676 ac_tool_warned=yes ;;
8677 esac
8678 LIPO=$ac_ct_LIPO
8679 fi
8680 else
8681 LIPO="$ac_cv_prog_LIPO"
8682 fi
8683
8684 if test -n "$ac_tool_prefix"; then
8685 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
8686 set dummy ${ac_tool_prefix}otool; ac_word=$2
8687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8688 printf %s "checking for $ac_word... " >&6; }
8689 if test ${ac_cv_prog_OTOOL+y}
8690 then :
8691 printf %s "(cached) " >&6
8692 else $as_nop
8693 if test -n "$OTOOL"; then
8694 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
8695 else
8696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8697 for as_dir in $PATH
8698 do
8699 IFS=$as_save_IFS
8700 case $as_dir in #(((
8701 '') as_dir=./ ;;
8702 */) ;;
8703 *) as_dir=$as_dir/ ;;
8704 esac
8705 for ac_exec_ext in '' $ac_executable_extensions; do
8706 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8707 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
8708 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8709 break 2
8710 fi
8711 done
8712 done
8713 IFS=$as_save_IFS
8714
8715 fi
8716 fi
8717 OTOOL=$ac_cv_prog_OTOOL
8718 if test -n "$OTOOL"; then
8719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
8720 printf "%s\n" "$OTOOL" >&6; }
8721 else
8722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723 printf "%s\n" "no" >&6; }
8724 fi
8725
8726
8727 fi
8728 if test -z "$ac_cv_prog_OTOOL"; then
8729 ac_ct_OTOOL=$OTOOL
8730 # Extract the first word of "otool", so it can be a program name with args.
8731 set dummy otool; ac_word=$2
8732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8733 printf %s "checking for $ac_word... " >&6; }
8734 if test ${ac_cv_prog_ac_ct_OTOOL+y}
8735 then :
8736 printf %s "(cached) " >&6
8737 else $as_nop
8738 if test -n "$ac_ct_OTOOL"; then
8739 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
8740 else
8741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8742 for as_dir in $PATH
8743 do
8744 IFS=$as_save_IFS
8745 case $as_dir in #(((
8746 '') as_dir=./ ;;
8747 */) ;;
8748 *) as_dir=$as_dir/ ;;
8749 esac
8750 for ac_exec_ext in '' $ac_executable_extensions; do
8751 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8752 ac_cv_prog_ac_ct_OTOOL="otool"
8753 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8754 break 2
8755 fi
8756 done
8757 done
8758 IFS=$as_save_IFS
8759
8760 fi
8761 fi
8762 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
8763 if test -n "$ac_ct_OTOOL"; then
8764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
8765 printf "%s\n" "$ac_ct_OTOOL" >&6; }
8766 else
8767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8768 printf "%s\n" "no" >&6; }
8769 fi
8770
8771 if test "x$ac_ct_OTOOL" = x; then
8772 OTOOL=":"
8773 else
8774 case $cross_compiling:$ac_tool_warned in
8775 yes:)
8776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8777 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8778 ac_tool_warned=yes ;;
8779 esac
8780 OTOOL=$ac_ct_OTOOL
8781 fi
8782 else
8783 OTOOL="$ac_cv_prog_OTOOL"
8784 fi
8785
8786 if test -n "$ac_tool_prefix"; then
8787 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
8788 set dummy ${ac_tool_prefix}otool64; ac_word=$2
8789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8790 printf %s "checking for $ac_word... " >&6; }
8791 if test ${ac_cv_prog_OTOOL64+y}
8792 then :
8793 printf %s "(cached) " >&6
8794 else $as_nop
8795 if test -n "$OTOOL64"; then
8796 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
8797 else
8798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8799 for as_dir in $PATH
8800 do
8801 IFS=$as_save_IFS
8802 case $as_dir in #(((
8803 '') as_dir=./ ;;
8804 */) ;;
8805 *) as_dir=$as_dir/ ;;
8806 esac
8807 for ac_exec_ext in '' $ac_executable_extensions; do
8808 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8809 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
8810 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8811 break 2
8812 fi
8813 done
8814 done
8815 IFS=$as_save_IFS
8816
8817 fi
8818 fi
8819 OTOOL64=$ac_cv_prog_OTOOL64
8820 if test -n "$OTOOL64"; then
8821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
8822 printf "%s\n" "$OTOOL64" >&6; }
8823 else
8824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8825 printf "%s\n" "no" >&6; }
8826 fi
8827
8828
8829 fi
8830 if test -z "$ac_cv_prog_OTOOL64"; then
8831 ac_ct_OTOOL64=$OTOOL64
8832 # Extract the first word of "otool64", so it can be a program name with args.
8833 set dummy otool64; ac_word=$2
8834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8835 printf %s "checking for $ac_word... " >&6; }
8836 if test ${ac_cv_prog_ac_ct_OTOOL64+y}
8837 then :
8838 printf %s "(cached) " >&6
8839 else $as_nop
8840 if test -n "$ac_ct_OTOOL64"; then
8841 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
8842 else
8843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8844 for as_dir in $PATH
8845 do
8846 IFS=$as_save_IFS
8847 case $as_dir in #(((
8848 '') as_dir=./ ;;
8849 */) ;;
8850 *) as_dir=$as_dir/ ;;
8851 esac
8852 for ac_exec_ext in '' $ac_executable_extensions; do
8853 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8854 ac_cv_prog_ac_ct_OTOOL64="otool64"
8855 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8856 break 2
8857 fi
8858 done
8859 done
8860 IFS=$as_save_IFS
8861
8862 fi
8863 fi
8864 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
8865 if test -n "$ac_ct_OTOOL64"; then
8866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
8867 printf "%s\n" "$ac_ct_OTOOL64" >&6; }
8868 else
8869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870 printf "%s\n" "no" >&6; }
8871 fi
8872
8873 if test "x$ac_ct_OTOOL64" = x; then
8874 OTOOL64=":"
8875 else
8876 case $cross_compiling:$ac_tool_warned in
8877 yes:)
8878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8879 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8880 ac_tool_warned=yes ;;
8881 esac
8882 OTOOL64=$ac_ct_OTOOL64
8883 fi
8884 else
8885 OTOOL64="$ac_cv_prog_OTOOL64"
8886 fi
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
8915 printf %s "checking for -single_module linker flag... " >&6; }
8916 if test ${lt_cv_apple_cc_single_mod+y}
8917 then :
8918 printf %s "(cached) " >&6
8919 else $as_nop
8920 lt_cv_apple_cc_single_mod=no
8921 if test -z "$LT_MULTI_MODULE"; then
8922 # By default we will add the -single_module flag. You can override
8923 # by either setting the environment variable LT_MULTI_MODULE
8924 # non-empty at configure time, or by adding -multi_module to the
8925 # link flags.
8926 rm -rf libconftest.dylib*
8927 echo "int foo(void){return 1;}" > conftest.c
8928 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8929 -dynamiclib -Wl,-single_module conftest.c" >&5
8930 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8931 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
8932 _lt_result=$?
8933 # If there is a non-empty error log, and "single_module"
8934 # appears in it, assume the flag caused a linker warning
8935 if test -s conftest.err && $GREP single_module conftest.err; then
8936 cat conftest.err >&5
8937 # Otherwise, if the output was created with a 0 exit code from
8938 # the compiler, it worked.
8939 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
8940 lt_cv_apple_cc_single_mod=yes
8941 else
8942 cat conftest.err >&5
8943 fi
8944 rm -rf libconftest.dylib*
8945 rm -f conftest.*
8946 fi
8947 fi
8948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
8949 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
8950
8951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
8952 printf %s "checking for -exported_symbols_list linker flag... " >&6; }
8953 if test ${lt_cv_ld_exported_symbols_list+y}
8954 then :
8955 printf %s "(cached) " >&6
8956 else $as_nop
8957 lt_cv_ld_exported_symbols_list=no
8958 save_LDFLAGS=$LDFLAGS
8959 echo "_main" > conftest.sym
8960 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
8961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8962 /* end confdefs.h. */
8963
8964 int
8965 main (void)
8966 {
8967
8968 ;
8969 return 0;
8970 }
8971 _ACEOF
8972 if ac_fn_c_try_link "$LINENO"
8973 then :
8974 lt_cv_ld_exported_symbols_list=yes
8975 else $as_nop
8976 lt_cv_ld_exported_symbols_list=no
8977 fi
8978 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8979 conftest$ac_exeext conftest.$ac_ext
8980 LDFLAGS=$save_LDFLAGS
8981
8982 fi
8983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
8984 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
8985
8986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
8987 printf %s "checking for -force_load linker flag... " >&6; }
8988 if test ${lt_cv_ld_force_load+y}
8989 then :
8990 printf %s "(cached) " >&6
8991 else $as_nop
8992 lt_cv_ld_force_load=no
8993 cat > conftest.c << _LT_EOF
8994 int forced_loaded() { return 2;}
8995 _LT_EOF
8996 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
8997 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
8998 echo "$AR cr libconftest.a conftest.o" >&5
8999 $AR cr libconftest.a conftest.o 2>&5
9000 echo "$RANLIB libconftest.a" >&5
9001 $RANLIB libconftest.a 2>&5
9002 cat > conftest.c << _LT_EOF
9003 int main() { return 0;}
9004 _LT_EOF
9005 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
9006 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
9007 _lt_result=$?
9008 if test -s conftest.err && $GREP force_load conftest.err; then
9009 cat conftest.err >&5
9010 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
9011 lt_cv_ld_force_load=yes
9012 else
9013 cat conftest.err >&5
9014 fi
9015 rm -f conftest.err libconftest.a conftest conftest.c
9016 rm -rf conftest.dSYM
9017
9018 fi
9019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
9020 printf "%s\n" "$lt_cv_ld_force_load" >&6; }
9021 case $host_os in
9022 rhapsody* | darwin1.[012])
9023 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
9024 darwin1.*)
9025 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
9026 darwin*) # darwin 5.x on
9027 # if running on 10.5 or later, the deployment target defaults
9028 # to the OS version, if on x86, and 10.4, the deployment
9029 # target defaults to 10.4. Don't you love it?
9030 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
9031 10.0,*86*-darwin8*|10.0,*-darwin[912]*)
9032 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
9033 10.[012][,.]*)
9034 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
9035 10.*|11.*)
9036 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
9037 esac
9038 ;;
9039 esac
9040 if test yes = "$lt_cv_apple_cc_single_mod"; then
9041 _lt_dar_single_mod='$single_module'
9042 fi
9043 if test yes = "$lt_cv_ld_exported_symbols_list"; then
9044 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
9045 else
9046 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
9047 fi
9048 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
9049 _lt_dsymutil='~$DSYMUTIL $lib || :'
9050 else
9051 _lt_dsymutil=
9052 fi
9053 ;;
9054 esac
9055
9056 # func_munge_path_list VARIABLE PATH
9057 # -----------------------------------
9058 # VARIABLE is name of variable containing _space_ separated list of
9059 # directories to be munged by the contents of PATH, which is string
9060 # having a format:
9061 # "DIR[:DIR]:"
9062 # string "DIR[ DIR]" will be prepended to VARIABLE
9063 # ":DIR[:DIR]"
9064 # string "DIR[ DIR]" will be appended to VARIABLE
9065 # "DIRP[:DIRP]::[DIRA:]DIRA"
9066 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
9067 # "DIRA[ DIRA]" will be appended to VARIABLE
9068 # "DIR[:DIR]"
9069 # VARIABLE will be replaced by "DIR[ DIR]"
9070 func_munge_path_list ()
9071 {
9072 case x$2 in
9073 x)
9074 ;;
9075 *:)
9076 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
9077 ;;
9078 x:*)
9079 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
9080 ;;
9081 *::*)
9082 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
9083 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
9084 ;;
9085 *)
9086 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
9087 ;;
9088 esac
9089 }
9090
9091 ac_header= ac_cache=
9092 for ac_item in $ac_header_c_list
9093 do
9094 if test $ac_cache; then
9095 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
9096 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
9097 printf "%s\n" "#define $ac_item 1" >> confdefs.h
9098 fi
9099 ac_header= ac_cache=
9100 elif test $ac_header; then
9101 ac_cache=$ac_item
9102 else
9103 ac_header=$ac_item
9104 fi
9105 done
9106
9107
9108
9109
9110
9111
9112
9113
9114 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
9115 then :
9116
9117 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
9118
9119 fi
9120 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
9121 "
9122 if test "x$ac_cv_header_dlfcn_h" = xyes
9123 then :
9124 printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
9125
9126 fi
9127
9128
9129
9130
9131 func_stripname_cnf ()
9132 {
9133 case $2 in
9134 .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
9135 *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
9136 esac
9137 } # func_stripname_cnf
9138
9139
9140
9141
9142
9143 # Set options
9144
9145
9146
9147 enable_dlopen=no
9148
9149
9150 enable_win32_dll=no
9151
9152
9153 # Check whether --enable-shared was given.
9154 if test ${enable_shared+y}
9155 then :
9156 enableval=$enable_shared; p=${PACKAGE-default}
9157 case $enableval in
9158 yes) enable_shared=yes ;;
9159 no) enable_shared=no ;;
9160 *)
9161 enable_shared=no
9162 # Look at the argument we got. We use all the common list separators.
9163 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9164 for pkg in $enableval; do
9165 IFS=$lt_save_ifs
9166 if test "X$pkg" = "X$p"; then
9167 enable_shared=yes
9168 fi
9169 done
9170 IFS=$lt_save_ifs
9171 ;;
9172 esac
9173 else $as_nop
9174 enable_shared=yes
9175 fi
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185 # Check whether --enable-static was given.
9186 if test ${enable_static+y}
9187 then :
9188 enableval=$enable_static; p=${PACKAGE-default}
9189 case $enableval in
9190 yes) enable_static=yes ;;
9191 no) enable_static=no ;;
9192 *)
9193 enable_static=no
9194 # Look at the argument we got. We use all the common list separators.
9195 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9196 for pkg in $enableval; do
9197 IFS=$lt_save_ifs
9198 if test "X$pkg" = "X$p"; then
9199 enable_static=yes
9200 fi
9201 done
9202 IFS=$lt_save_ifs
9203 ;;
9204 esac
9205 else $as_nop
9206 enable_static=yes
9207 fi
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218 # Check whether --with-pic was given.
9219 if test ${with_pic+y}
9220 then :
9221 withval=$with_pic; lt_p=${PACKAGE-default}
9222 case $withval in
9223 yes|no) pic_mode=$withval ;;
9224 *)
9225 pic_mode=default
9226 # Look at the argument we got. We use all the common list separators.
9227 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9228 for lt_pkg in $withval; do
9229 IFS=$lt_save_ifs
9230 if test "X$lt_pkg" = "X$lt_p"; then
9231 pic_mode=yes
9232 fi
9233 done
9234 IFS=$lt_save_ifs
9235 ;;
9236 esac
9237 else $as_nop
9238 pic_mode=default
9239 fi
9240
9241
9242
9243
9244
9245
9246
9247
9248 # Check whether --enable-fast-install was given.
9249 if test ${enable_fast_install+y}
9250 then :
9251 enableval=$enable_fast_install; p=${PACKAGE-default}
9252 case $enableval in
9253 yes) enable_fast_install=yes ;;
9254 no) enable_fast_install=no ;;
9255 *)
9256 enable_fast_install=no
9257 # Look at the argument we got. We use all the common list separators.
9258 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9259 for pkg in $enableval; do
9260 IFS=$lt_save_ifs
9261 if test "X$pkg" = "X$p"; then
9262 enable_fast_install=yes
9263 fi
9264 done
9265 IFS=$lt_save_ifs
9266 ;;
9267 esac
9268 else $as_nop
9269 enable_fast_install=yes
9270 fi
9271
9272
9273
9274
9275
9276
9277
9278
9279 shared_archive_member_spec=
9280 case $host,$enable_shared in
9281 power*-*-aix[5-9]*,yes)
9282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
9283 printf %s "checking which variant of shared library versioning to provide... " >&6; }
9284
9285 # Check whether --with-aix-soname was given.
9286 if test ${with_aix_soname+y}
9287 then :
9288 withval=$with_aix_soname; case $withval in
9289 aix|svr4|both)
9290 ;;
9291 *)
9292 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
9293 ;;
9294 esac
9295 lt_cv_with_aix_soname=$with_aix_soname
9296 else $as_nop
9297 if test ${lt_cv_with_aix_soname+y}
9298 then :
9299 printf %s "(cached) " >&6
9300 else $as_nop
9301 lt_cv_with_aix_soname=aix
9302 fi
9303
9304 with_aix_soname=$lt_cv_with_aix_soname
9305 fi
9306
9307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
9308 printf "%s\n" "$with_aix_soname" >&6; }
9309 if test aix != "$with_aix_soname"; then
9310 # For the AIX way of multilib, we name the shared archive member
9311 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
9312 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
9313 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
9314 # the AIX toolchain works better with OBJECT_MODE set (default 32).
9315 if test 64 = "${OBJECT_MODE-32}"; then
9316 shared_archive_member_spec=shr_64
9317 else
9318 shared_archive_member_spec=shr
9319 fi
9320 fi
9321 ;;
9322 *)
9323 with_aix_soname=aix
9324 ;;
9325 esac
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336 # This can be used to rebuild libtool when needed
9337 LIBTOOL_DEPS=$ltmain
9338
9339 # Always use our own libtool.
9340 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371 test -z "$LN_S" && LN_S="ln -s"
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386 if test -n "${ZSH_VERSION+set}"; then
9387 setopt NO_GLOB_SUBST
9388 fi
9389
9390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
9391 printf %s "checking for objdir... " >&6; }
9392 if test ${lt_cv_objdir+y}
9393 then :
9394 printf %s "(cached) " >&6
9395 else $as_nop
9396 rm -f .libs 2>/dev/null
9397 mkdir .libs 2>/dev/null
9398 if test -d .libs; then
9399 lt_cv_objdir=.libs
9400 else
9401 # MS-DOS does not allow filenames that begin with a dot.
9402 lt_cv_objdir=_libs
9403 fi
9404 rmdir .libs 2>/dev/null
9405 fi
9406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
9407 printf "%s\n" "$lt_cv_objdir" >&6; }
9408 objdir=$lt_cv_objdir
9409
9410
9411
9412
9413
9414 printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
9415
9416
9417
9418
9419 case $host_os in
9420 aix3*)
9421 # AIX sometimes has problems with the GCC collect2 program. For some
9422 # reason, if we set the COLLECT_NAMES environment variable, the problems
9423 # vanish in a puff of smoke.
9424 if test set != "${COLLECT_NAMES+set}"; then
9425 COLLECT_NAMES=
9426 export COLLECT_NAMES
9427 fi
9428 ;;
9429 esac
9430
9431 # Global variables:
9432 ofile=libtool
9433 can_build_shared=yes
9434
9435 # All known linkers require a '.a' archive for static linking (except MSVC,
9436 # which needs '.lib').
9437 libext=a
9438
9439 with_gnu_ld=$lt_cv_prog_gnu_ld
9440
9441 old_CC=$CC
9442 old_CFLAGS=$CFLAGS
9443
9444 # Set sane defaults for various variables
9445 test -z "$CC" && CC=cc
9446 test -z "$LTCC" && LTCC=$CC
9447 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
9448 test -z "$LD" && LD=ld
9449 test -z "$ac_objext" && ac_objext=o
9450
9451 func_cc_basename $compiler
9452 cc_basename=$func_cc_basename_result
9453
9454
9455 # Only perform the check for file, if the check method requires it
9456 test -z "$MAGIC_CMD" && MAGIC_CMD=file
9457 case $deplibs_check_method in
9458 file_magic*)
9459 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
9460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
9461 printf %s "checking for ${ac_tool_prefix}file... " >&6; }
9462 if test ${lt_cv_path_MAGIC_CMD+y}
9463 then :
9464 printf %s "(cached) " >&6
9465 else $as_nop
9466 case $MAGIC_CMD in
9467 [\\/*] | ?:[\\/]*)
9468 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
9469 ;;
9470 *)
9471 lt_save_MAGIC_CMD=$MAGIC_CMD
9472 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
9473 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
9474 for ac_dir in $ac_dummy; do
9475 IFS=$lt_save_ifs
9476 test -z "$ac_dir" && ac_dir=.
9477 if test -f "$ac_dir/${ac_tool_prefix}file"; then
9478 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
9479 if test -n "$file_magic_test_file"; then
9480 case $deplibs_check_method in
9481 "file_magic "*)
9482 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
9483 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
9484 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
9485 $EGREP "$file_magic_regex" > /dev/null; then
9486 :
9487 else
9488 cat <<_LT_EOF 1>&2
9489
9490 *** Warning: the command libtool uses to detect shared libraries,
9491 *** $file_magic_cmd, produces output that libtool cannot recognize.
9492 *** The result is that libtool may fail to recognize shared libraries
9493 *** as such. This will affect the creation of libtool libraries that
9494 *** depend on shared libraries, but programs linked with such libtool
9495 *** libraries will work regardless of this problem. Nevertheless, you
9496 *** may want to report the problem to your system manager and/or to
9497 *** bug-libtool@gnu.org
9498
9499 _LT_EOF
9500 fi ;;
9501 esac
9502 fi
9503 break
9504 fi
9505 done
9506 IFS=$lt_save_ifs
9507 MAGIC_CMD=$lt_save_MAGIC_CMD
9508 ;;
9509 esac
9510 fi
9511
9512 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
9513 if test -n "$MAGIC_CMD"; then
9514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
9515 printf "%s\n" "$MAGIC_CMD" >&6; }
9516 else
9517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9518 printf "%s\n" "no" >&6; }
9519 fi
9520
9521
9522
9523
9524
9525 if test -z "$lt_cv_path_MAGIC_CMD"; then
9526 if test -n "$ac_tool_prefix"; then
9527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
9528 printf %s "checking for file... " >&6; }
9529 if test ${lt_cv_path_MAGIC_CMD+y}
9530 then :
9531 printf %s "(cached) " >&6
9532 else $as_nop
9533 case $MAGIC_CMD in
9534 [\\/*] | ?:[\\/]*)
9535 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
9536 ;;
9537 *)
9538 lt_save_MAGIC_CMD=$MAGIC_CMD
9539 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
9540 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
9541 for ac_dir in $ac_dummy; do
9542 IFS=$lt_save_ifs
9543 test -z "$ac_dir" && ac_dir=.
9544 if test -f "$ac_dir/file"; then
9545 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
9546 if test -n "$file_magic_test_file"; then
9547 case $deplibs_check_method in
9548 "file_magic "*)
9549 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
9550 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
9551 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
9552 $EGREP "$file_magic_regex" > /dev/null; then
9553 :
9554 else
9555 cat <<_LT_EOF 1>&2
9556
9557 *** Warning: the command libtool uses to detect shared libraries,
9558 *** $file_magic_cmd, produces output that libtool cannot recognize.
9559 *** The result is that libtool may fail to recognize shared libraries
9560 *** as such. This will affect the creation of libtool libraries that
9561 *** depend on shared libraries, but programs linked with such libtool
9562 *** libraries will work regardless of this problem. Nevertheless, you
9563 *** may want to report the problem to your system manager and/or to
9564 *** bug-libtool@gnu.org
9565
9566 _LT_EOF
9567 fi ;;
9568 esac
9569 fi
9570 break
9571 fi
9572 done
9573 IFS=$lt_save_ifs
9574 MAGIC_CMD=$lt_save_MAGIC_CMD
9575 ;;
9576 esac
9577 fi
9578
9579 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
9580 if test -n "$MAGIC_CMD"; then
9581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
9582 printf "%s\n" "$MAGIC_CMD" >&6; }
9583 else
9584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9585 printf "%s\n" "no" >&6; }
9586 fi
9587
9588
9589 else
9590 MAGIC_CMD=:
9591 fi
9592 fi
9593
9594 fi
9595 ;;
9596 esac
9597
9598 # Use C for the default configuration in the libtool script
9599
9600 lt_save_CC=$CC
9601 ac_ext=c
9602 ac_cpp='$CPP $CPPFLAGS'
9603 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9604 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9605 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9606
9607
9608 # Source file extension for C test sources.
9609 ac_ext=c
9610
9611 # Object file extension for compiled C test sources.
9612 objext=o
9613 objext=$objext
9614
9615 # Code to be used in simple compile tests
9616 lt_simple_compile_test_code="int some_variable = 0;"
9617
9618 # Code to be used in simple link tests
9619 lt_simple_link_test_code='int main(){return(0);}'
9620
9621
9622
9623
9624
9625
9626
9627 # If no C compiler was specified, use CC.
9628 LTCC=${LTCC-"$CC"}
9629
9630 # If no C compiler flags were specified, use CFLAGS.
9631 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9632
9633 # Allow CC to be a program name with arguments.
9634 compiler=$CC
9635
9636 # Save the default compiler, since it gets overwritten when the other
9637 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
9638 compiler_DEFAULT=$CC
9639
9640 # save warnings/boilerplate of simple test code
9641 ac_outfile=conftest.$ac_objext
9642 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
9643 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9644 _lt_compiler_boilerplate=`cat conftest.err`
9645 $RM conftest*
9646
9647 ac_outfile=conftest.$ac_objext
9648 echo "$lt_simple_link_test_code" >conftest.$ac_ext
9649 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9650 _lt_linker_boilerplate=`cat conftest.err`
9651 $RM -r conftest*
9652
9653
9654 ## CAVEAT EMPTOR:
9655 ## There is no encapsulation within the following macros, do not change
9656 ## the running order or otherwise move them around unless you know exactly
9657 ## what you are doing...
9658 if test -n "$compiler"; then
9659
9660 lt_prog_compiler_no_builtin_flag=
9661
9662 if test yes = "$GCC"; then
9663 case $cc_basename in
9664 nvcc*)
9665 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
9666 *)
9667 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
9668 esac
9669
9670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
9671 printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
9672 if test ${lt_cv_prog_compiler_rtti_exceptions+y}
9673 then :
9674 printf %s "(cached) " >&6
9675 else $as_nop
9676 lt_cv_prog_compiler_rtti_exceptions=no
9677 ac_outfile=conftest.$ac_objext
9678 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9679 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
9680 # Insert the option either (1) after the last *FLAGS variable, or
9681 # (2) before a word containing "conftest.", or (3) at the end.
9682 # Note that $ac_compile itself does not contain backslashes and begins
9683 # with a dollar sign (not a hyphen), so the echo should work correctly.
9684 # The option is referenced via a variable to avoid confusing sed.
9685 lt_compile=`echo "$ac_compile" | $SED \
9686 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9687 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9688 -e 's:$: $lt_compiler_flag:'`
9689 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9690 (eval "$lt_compile" 2>conftest.err)
9691 ac_status=$?
9692 cat conftest.err >&5
9693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9694 if (exit $ac_status) && test -s "$ac_outfile"; then
9695 # The compiler can only warn and ignore the option if not recognized
9696 # So say no if there are warnings other than the usual output.
9697 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
9698 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9699 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
9700 lt_cv_prog_compiler_rtti_exceptions=yes
9701 fi
9702 fi
9703 $RM conftest*
9704
9705 fi
9706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
9707 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
9708
9709 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
9710 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
9711 else
9712 :
9713 fi
9714
9715 fi
9716
9717
9718
9719
9720
9721
9722 lt_prog_compiler_wl=
9723 lt_prog_compiler_pic=
9724 lt_prog_compiler_static=
9725
9726
9727 if test yes = "$GCC"; then
9728 lt_prog_compiler_wl='-Wl,'
9729 lt_prog_compiler_static='-static'
9730
9731 case $host_os in
9732 aix*)
9733 # All AIX code is PIC.
9734 if test ia64 = "$host_cpu"; then
9735 # AIX 5 now supports IA64 processor
9736 lt_prog_compiler_static='-Bstatic'
9737 fi
9738 lt_prog_compiler_pic='-fPIC'
9739 ;;
9740
9741 amigaos*)
9742 case $host_cpu in
9743 powerpc)
9744 # see comment about AmigaOS4 .so support
9745 lt_prog_compiler_pic='-fPIC'
9746 ;;
9747 m68k)
9748 # FIXME: we need at least 68020 code to build shared libraries, but
9749 # adding the '-m68020' flag to GCC prevents building anything better,
9750 # like '-m68040'.
9751 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
9752 ;;
9753 esac
9754 ;;
9755
9756 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9757 # PIC is the default for these OSes.
9758 ;;
9759
9760 mingw* | cygwin* | pw32* | os2* | cegcc*)
9761 # This hack is so that the source file can tell whether it is being
9762 # built for inclusion in a dll (and should export symbols for example).
9763 # Although the cygwin gcc ignores -fPIC, still need this for old-style
9764 # (--disable-auto-import) libraries
9765 lt_prog_compiler_pic='-DDLL_EXPORT'
9766 case $host_os in
9767 os2*)
9768 lt_prog_compiler_static='$wl-static'
9769 ;;
9770 esac
9771 ;;
9772
9773 darwin* | rhapsody*)
9774 # PIC is the default on this platform
9775 # Common symbols not allowed in MH_DYLIB files
9776 lt_prog_compiler_pic='-fno-common'
9777 ;;
9778
9779 haiku*)
9780 # PIC is the default for Haiku.
9781 # The "-static" flag exists, but is broken.
9782 lt_prog_compiler_static=
9783 ;;
9784
9785 hpux*)
9786 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
9787 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
9788 # sets the default TLS model and affects inlining.
9789 case $host_cpu in
9790 hppa*64*)
9791 # +Z the default
9792 ;;
9793 *)
9794 lt_prog_compiler_pic='-fPIC'
9795 ;;
9796 esac
9797 ;;
9798
9799 interix[3-9]*)
9800 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
9801 # Instead, we relocate shared libraries at runtime.
9802 ;;
9803
9804 msdosdjgpp*)
9805 # Just because we use GCC doesn't mean we suddenly get shared libraries
9806 # on systems that don't support them.
9807 lt_prog_compiler_can_build_shared=no
9808 enable_shared=no
9809 ;;
9810
9811 *nto* | *qnx*)
9812 # QNX uses GNU C++, but need to define -shared option too, otherwise
9813 # it will coredump.
9814 lt_prog_compiler_pic='-fPIC -shared'
9815 ;;
9816
9817 sysv4*MP*)
9818 if test -d /usr/nec; then
9819 lt_prog_compiler_pic=-Kconform_pic
9820 fi
9821 ;;
9822
9823 *)
9824 lt_prog_compiler_pic='-fPIC'
9825 ;;
9826 esac
9827
9828 case $cc_basename in
9829 nvcc*) # Cuda Compiler Driver 2.2
9830 lt_prog_compiler_wl='-Xlinker '
9831 if test -n "$lt_prog_compiler_pic"; then
9832 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
9833 fi
9834 ;;
9835 esac
9836 else
9837 # PORTME Check for flag to pass linker flags through the system compiler.
9838 case $host_os in
9839 aix*)
9840 lt_prog_compiler_wl='-Wl,'
9841 if test ia64 = "$host_cpu"; then
9842 # AIX 5 now supports IA64 processor
9843 lt_prog_compiler_static='-Bstatic'
9844 else
9845 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
9846 fi
9847 ;;
9848
9849 darwin* | rhapsody*)
9850 # PIC is the default on this platform
9851 # Common symbols not allowed in MH_DYLIB files
9852 lt_prog_compiler_pic='-fno-common'
9853 case $cc_basename in
9854 nagfor*)
9855 # NAG Fortran compiler
9856 lt_prog_compiler_wl='-Wl,-Wl,,'
9857 lt_prog_compiler_pic='-PIC'
9858 lt_prog_compiler_static='-Bstatic'
9859 ;;
9860 esac
9861 ;;
9862
9863 mingw* | cygwin* | pw32* | os2* | cegcc*)
9864 # This hack is so that the source file can tell whether it is being
9865 # built for inclusion in a dll (and should export symbols for example).
9866 lt_prog_compiler_pic='-DDLL_EXPORT'
9867 case $host_os in
9868 os2*)
9869 lt_prog_compiler_static='$wl-static'
9870 ;;
9871 esac
9872 ;;
9873
9874 hpux9* | hpux10* | hpux11*)
9875 lt_prog_compiler_wl='-Wl,'
9876 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
9877 # not for PA HP-UX.
9878 case $host_cpu in
9879 hppa*64*|ia64*)
9880 # +Z the default
9881 ;;
9882 *)
9883 lt_prog_compiler_pic='+Z'
9884 ;;
9885 esac
9886 # Is there a better lt_prog_compiler_static that works with the bundled CC?
9887 lt_prog_compiler_static='$wl-a ${wl}archive'
9888 ;;
9889
9890 irix5* | irix6* | nonstopux*)
9891 lt_prog_compiler_wl='-Wl,'
9892 # PIC (with -KPIC) is the default.
9893 lt_prog_compiler_static='-non_shared'
9894 ;;
9895
9896 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9897 case $cc_basename in
9898 # old Intel for x86_64, which still supported -KPIC.
9899 ecc*)
9900 lt_prog_compiler_wl='-Wl,'
9901 lt_prog_compiler_pic='-KPIC'
9902 lt_prog_compiler_static='-static'
9903 ;;
9904 # flang / f18. f95 an alias for gfortran or flang on Debian
9905 flang* | f18* | f95*)
9906 lt_prog_compiler_wl='-Wl,'
9907 lt_prog_compiler_pic='-fPIC'
9908 lt_prog_compiler_static='-static'
9909 ;;
9910 # icc used to be incompatible with GCC.
9911 # ICC 10 doesn't accept -KPIC any more.
9912 icc* | ifort*)
9913 lt_prog_compiler_wl='-Wl,'
9914 lt_prog_compiler_pic='-fPIC'
9915 lt_prog_compiler_static='-static'
9916 ;;
9917 # Lahey Fortran 8.1.
9918 lf95*)
9919 lt_prog_compiler_wl='-Wl,'
9920 lt_prog_compiler_pic='--shared'
9921 lt_prog_compiler_static='--static'
9922 ;;
9923 nagfor*)
9924 # NAG Fortran compiler
9925 lt_prog_compiler_wl='-Wl,-Wl,,'
9926 lt_prog_compiler_pic='-PIC'
9927 lt_prog_compiler_static='-Bstatic'
9928 ;;
9929 tcc*)
9930 # Fabrice Bellard et al's Tiny C Compiler
9931 lt_prog_compiler_wl='-Wl,'
9932 lt_prog_compiler_pic='-fPIC'
9933 lt_prog_compiler_static='-static'
9934 ;;
9935 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
9936 # Portland Group compilers (*not* the Pentium gcc compiler,
9937 # which looks to be a dead project)
9938 lt_prog_compiler_wl='-Wl,'
9939 lt_prog_compiler_pic='-fpic'
9940 lt_prog_compiler_static='-Bstatic'
9941 ;;
9942 ccc*)
9943 lt_prog_compiler_wl='-Wl,'
9944 # All Alpha code is PIC.
9945 lt_prog_compiler_static='-non_shared'
9946 ;;
9947 xl* | bgxl* | bgf* | mpixl*)
9948 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
9949 lt_prog_compiler_wl='-Wl,'
9950 lt_prog_compiler_pic='-qpic'
9951 lt_prog_compiler_static='-qstaticlink'
9952 ;;
9953 *)
9954 case `$CC -V 2>&1 | sed 5q` in
9955 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
9956 # Sun Fortran 8.3 passes all unrecognized flags to the linker
9957 lt_prog_compiler_pic='-KPIC'
9958 lt_prog_compiler_static='-Bstatic'
9959 lt_prog_compiler_wl=''
9960 ;;
9961 *Sun\ F* | *Sun*Fortran*)
9962 lt_prog_compiler_pic='-KPIC'
9963 lt_prog_compiler_static='-Bstatic'
9964 lt_prog_compiler_wl='-Qoption ld '
9965 ;;
9966 *Sun\ C*)
9967 # Sun C 5.9
9968 lt_prog_compiler_pic='-KPIC'
9969 lt_prog_compiler_static='-Bstatic'
9970 lt_prog_compiler_wl='-Wl,'
9971 ;;
9972 *Intel*\ [CF]*Compiler*)
9973 lt_prog_compiler_wl='-Wl,'
9974 lt_prog_compiler_pic='-fPIC'
9975 lt_prog_compiler_static='-static'
9976 ;;
9977 *Portland\ Group*)
9978 lt_prog_compiler_wl='-Wl,'
9979 lt_prog_compiler_pic='-fpic'
9980 lt_prog_compiler_static='-Bstatic'
9981 ;;
9982 esac
9983 ;;
9984 esac
9985 ;;
9986
9987 newsos6)
9988 lt_prog_compiler_pic='-KPIC'
9989 lt_prog_compiler_static='-Bstatic'
9990 ;;
9991
9992 *nto* | *qnx*)
9993 # QNX uses GNU C++, but need to define -shared option too, otherwise
9994 # it will coredump.
9995 lt_prog_compiler_pic='-fPIC -shared'
9996 ;;
9997
9998 osf3* | osf4* | osf5*)
9999 lt_prog_compiler_wl='-Wl,'
10000 # All OSF/1 code is PIC.
10001 lt_prog_compiler_static='-non_shared'
10002 ;;
10003
10004 rdos*)
10005 lt_prog_compiler_static='-non_shared'
10006 ;;
10007
10008 solaris*)
10009 lt_prog_compiler_pic='-KPIC'
10010 lt_prog_compiler_static='-Bstatic'
10011 case $cc_basename in
10012 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
10013 lt_prog_compiler_wl='-Qoption ld ';;
10014 *)
10015 lt_prog_compiler_wl='-Wl,';;
10016 esac
10017 ;;
10018
10019 sunos4*)
10020 lt_prog_compiler_wl='-Qoption ld '
10021 lt_prog_compiler_pic='-PIC'
10022 lt_prog_compiler_static='-Bstatic'
10023 ;;
10024
10025 sysv4 | sysv4.2uw2* | sysv4.3*)
10026 lt_prog_compiler_wl='-Wl,'
10027 lt_prog_compiler_pic='-KPIC'
10028 lt_prog_compiler_static='-Bstatic'
10029 ;;
10030
10031 sysv4*MP*)
10032 if test -d /usr/nec; then
10033 lt_prog_compiler_pic='-Kconform_pic'
10034 lt_prog_compiler_static='-Bstatic'
10035 fi
10036 ;;
10037
10038 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
10039 lt_prog_compiler_wl='-Wl,'
10040 lt_prog_compiler_pic='-KPIC'
10041 lt_prog_compiler_static='-Bstatic'
10042 ;;
10043
10044 unicos*)
10045 lt_prog_compiler_wl='-Wl,'
10046 lt_prog_compiler_can_build_shared=no
10047 ;;
10048
10049 uts4*)
10050 lt_prog_compiler_pic='-pic'
10051 lt_prog_compiler_static='-Bstatic'
10052 ;;
10053
10054 *)
10055 lt_prog_compiler_can_build_shared=no
10056 ;;
10057 esac
10058 fi
10059
10060 case $host_os in
10061 # For platforms that do not support PIC, -DPIC is meaningless:
10062 *djgpp*)
10063 lt_prog_compiler_pic=
10064 ;;
10065 *)
10066 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
10067 ;;
10068 esac
10069
10070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
10071 printf %s "checking for $compiler option to produce PIC... " >&6; }
10072 if test ${lt_cv_prog_compiler_pic+y}
10073 then :
10074 printf %s "(cached) " >&6
10075 else $as_nop
10076 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
10077 fi
10078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
10079 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
10080 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
10081
10082 #
10083 # Check to make sure the PIC flag actually works.
10084 #
10085 if test -n "$lt_prog_compiler_pic"; then
10086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
10087 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
10088 if test ${lt_cv_prog_compiler_pic_works+y}
10089 then :
10090 printf %s "(cached) " >&6
10091 else $as_nop
10092 lt_cv_prog_compiler_pic_works=no
10093 ac_outfile=conftest.$ac_objext
10094 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10095 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
10096 # Insert the option either (1) after the last *FLAGS variable, or
10097 # (2) before a word containing "conftest.", or (3) at the end.
10098 # Note that $ac_compile itself does not contain backslashes and begins
10099 # with a dollar sign (not a hyphen), so the echo should work correctly.
10100 # The option is referenced via a variable to avoid confusing sed.
10101 lt_compile=`echo "$ac_compile" | $SED \
10102 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10103 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10104 -e 's:$: $lt_compiler_flag:'`
10105 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10106 (eval "$lt_compile" 2>conftest.err)
10107 ac_status=$?
10108 cat conftest.err >&5
10109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10110 if (exit $ac_status) && test -s "$ac_outfile"; then
10111 # The compiler can only warn and ignore the option if not recognized
10112 # So say no if there are warnings other than the usual output.
10113 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10114 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10115 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10116 lt_cv_prog_compiler_pic_works=yes
10117 fi
10118 fi
10119 $RM conftest*
10120
10121 fi
10122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
10123 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
10124
10125 if test yes = "$lt_cv_prog_compiler_pic_works"; then
10126 case $lt_prog_compiler_pic in
10127 "" | " "*) ;;
10128 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
10129 esac
10130 else
10131 lt_prog_compiler_pic=
10132 lt_prog_compiler_can_build_shared=no
10133 fi
10134
10135 fi
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147 #
10148 # Check to make sure the static flag actually works.
10149 #
10150 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
10151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
10152 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
10153 if test ${lt_cv_prog_compiler_static_works+y}
10154 then :
10155 printf %s "(cached) " >&6
10156 else $as_nop
10157 lt_cv_prog_compiler_static_works=no
10158 save_LDFLAGS=$LDFLAGS
10159 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
10160 echo "$lt_simple_link_test_code" > conftest.$ac_ext
10161 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
10162 # The linker can only warn and ignore the option if not recognized
10163 # So say no if there are warnings
10164 if test -s conftest.err; then
10165 # Append any errors to the config.log.
10166 cat conftest.err 1>&5
10167 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
10168 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10169 if diff conftest.exp conftest.er2 >/dev/null; then
10170 lt_cv_prog_compiler_static_works=yes
10171 fi
10172 else
10173 lt_cv_prog_compiler_static_works=yes
10174 fi
10175 fi
10176 $RM -r conftest*
10177 LDFLAGS=$save_LDFLAGS
10178
10179 fi
10180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
10181 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
10182
10183 if test yes = "$lt_cv_prog_compiler_static_works"; then
10184 :
10185 else
10186 lt_prog_compiler_static=
10187 fi
10188
10189
10190
10191
10192
10193
10194
10195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10196 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10197 if test ${lt_cv_prog_compiler_c_o+y}
10198 then :
10199 printf %s "(cached) " >&6
10200 else $as_nop
10201 lt_cv_prog_compiler_c_o=no
10202 $RM -r conftest 2>/dev/null
10203 mkdir conftest
10204 cd conftest
10205 mkdir out
10206 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10207
10208 lt_compiler_flag="-o out/conftest2.$ac_objext"
10209 # Insert the option either (1) after the last *FLAGS variable, or
10210 # (2) before a word containing "conftest.", or (3) at the end.
10211 # Note that $ac_compile itself does not contain backslashes and begins
10212 # with a dollar sign (not a hyphen), so the echo should work correctly.
10213 lt_compile=`echo "$ac_compile" | $SED \
10214 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10215 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10216 -e 's:$: $lt_compiler_flag:'`
10217 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10218 (eval "$lt_compile" 2>out/conftest.err)
10219 ac_status=$?
10220 cat out/conftest.err >&5
10221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10222 if (exit $ac_status) && test -s out/conftest2.$ac_objext
10223 then
10224 # The compiler can only warn and ignore the option if not recognized
10225 # So say no if there are warnings
10226 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10227 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10228 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10229 lt_cv_prog_compiler_c_o=yes
10230 fi
10231 fi
10232 chmod u+w . 2>&5
10233 $RM conftest*
10234 # SGI C++ compiler will create directory out/ii_files/ for
10235 # template instantiation
10236 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10237 $RM out/* && rmdir out
10238 cd ..
10239 $RM -r conftest
10240 $RM conftest*
10241
10242 fi
10243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10244 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
10245
10246
10247
10248
10249
10250
10251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10252 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10253 if test ${lt_cv_prog_compiler_c_o+y}
10254 then :
10255 printf %s "(cached) " >&6
10256 else $as_nop
10257 lt_cv_prog_compiler_c_o=no
10258 $RM -r conftest 2>/dev/null
10259 mkdir conftest
10260 cd conftest
10261 mkdir out
10262 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10263
10264 lt_compiler_flag="-o out/conftest2.$ac_objext"
10265 # Insert the option either (1) after the last *FLAGS variable, or
10266 # (2) before a word containing "conftest.", or (3) at the end.
10267 # Note that $ac_compile itself does not contain backslashes and begins
10268 # with a dollar sign (not a hyphen), so the echo should work correctly.
10269 lt_compile=`echo "$ac_compile" | $SED \
10270 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10271 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10272 -e 's:$: $lt_compiler_flag:'`
10273 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10274 (eval "$lt_compile" 2>out/conftest.err)
10275 ac_status=$?
10276 cat out/conftest.err >&5
10277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10278 if (exit $ac_status) && test -s out/conftest2.$ac_objext
10279 then
10280 # The compiler can only warn and ignore the option if not recognized
10281 # So say no if there are warnings
10282 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10283 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10284 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10285 lt_cv_prog_compiler_c_o=yes
10286 fi
10287 fi
10288 chmod u+w . 2>&5
10289 $RM conftest*
10290 # SGI C++ compiler will create directory out/ii_files/ for
10291 # template instantiation
10292 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10293 $RM out/* && rmdir out
10294 cd ..
10295 $RM -r conftest
10296 $RM conftest*
10297
10298 fi
10299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10300 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
10301
10302
10303
10304
10305 hard_links=nottested
10306 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
10307 # do not overwrite the value of need_locks provided by the user
10308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
10309 printf %s "checking if we can lock with hard links... " >&6; }
10310 hard_links=yes
10311 $RM conftest*
10312 ln conftest.a conftest.b 2>/dev/null && hard_links=no
10313 touch conftest.a
10314 ln conftest.a conftest.b 2>&5 || hard_links=no
10315 ln conftest.a conftest.b 2>/dev/null && hard_links=no
10316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
10317 printf "%s\n" "$hard_links" >&6; }
10318 if test no = "$hard_links"; then
10319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
10320 printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
10321 need_locks=warn
10322 fi
10323 else
10324 need_locks=no
10325 fi
10326
10327
10328
10329
10330
10331
10332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
10333 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
10334
10335 runpath_var=
10336 allow_undefined_flag=
10337 always_export_symbols=no
10338 archive_cmds=
10339 archive_expsym_cmds=
10340 compiler_needs_object=no
10341 enable_shared_with_static_runtimes=no
10342 export_dynamic_flag_spec=
10343 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10344 hardcode_automatic=no
10345 hardcode_direct=no
10346 hardcode_direct_absolute=no
10347 hardcode_libdir_flag_spec=
10348 hardcode_libdir_separator=
10349 hardcode_minus_L=no
10350 hardcode_shlibpath_var=unsupported
10351 inherit_rpath=no
10352 link_all_deplibs=unknown
10353 module_cmds=
10354 module_expsym_cmds=
10355 old_archive_from_new_cmds=
10356 old_archive_from_expsyms_cmds=
10357 thread_safe_flag_spec=
10358 whole_archive_flag_spec=
10359 # include_expsyms should be a list of space-separated symbols to be *always*
10360 # included in the symbol list
10361 include_expsyms=
10362 # exclude_expsyms can be an extended regexp of symbols to exclude
10363 # it will be wrapped by ' (' and ')$', so one must not match beginning or
10364 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
10365 # as well as any symbol that contains 'd'.
10366 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
10367 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10368 # platforms (ab)use it in PIC code, but their linkers get confused if
10369 # the symbol is explicitly referenced. Since portable code cannot
10370 # rely on this symbol name, it's probably fine to never include it in
10371 # preloaded symbol tables.
10372 # Exclude shared library initialization/finalization symbols.
10373 extract_expsyms_cmds=
10374
10375 case $host_os in
10376 cygwin* | mingw* | pw32* | cegcc*)
10377 # FIXME: the MSVC++ port hasn't been tested in a loooong time
10378 # When not using gcc, we currently assume that we are using
10379 # Microsoft Visual C++.
10380 if test yes != "$GCC"; then
10381 with_gnu_ld=no
10382 fi
10383 ;;
10384 interix*)
10385 # we just hope/assume this is gcc and not c89 (= MSVC++)
10386 with_gnu_ld=yes
10387 ;;
10388 openbsd* | bitrig*)
10389 with_gnu_ld=no
10390 ;;
10391 linux* | k*bsd*-gnu | gnu*)
10392 link_all_deplibs=no
10393 ;;
10394 esac
10395
10396 ld_shlibs=yes
10397
10398 # On some targets, GNU ld is compatible enough with the native linker
10399 # that we're better off using the native interface for both.
10400 lt_use_gnu_ld_interface=no
10401 if test yes = "$with_gnu_ld"; then
10402 case $host_os in
10403 aix*)
10404 # The AIX port of GNU ld has always aspired to compatibility
10405 # with the native linker. However, as the warning in the GNU ld
10406 # block says, versions before 2.19.5* couldn't really create working
10407 # shared libraries, regardless of the interface used.
10408 case `$LD -v 2>&1` in
10409 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
10410 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
10411 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
10412 *)
10413 lt_use_gnu_ld_interface=yes
10414 ;;
10415 esac
10416 ;;
10417 *)
10418 lt_use_gnu_ld_interface=yes
10419 ;;
10420 esac
10421 fi
10422
10423 if test yes = "$lt_use_gnu_ld_interface"; then
10424 # If archive_cmds runs LD, not CC, wlarc should be empty
10425 wlarc='$wl'
10426
10427 # Set some defaults for GNU ld with shared library support. These
10428 # are reset later if shared libraries are not supported. Putting them
10429 # here allows them to be overridden if necessary.
10430 runpath_var=LD_RUN_PATH
10431 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10432 export_dynamic_flag_spec='$wl--export-dynamic'
10433 # ancient GNU ld didn't support --whole-archive et. al.
10434 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
10435 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
10436 else
10437 whole_archive_flag_spec=
10438 fi
10439 supports_anon_versioning=no
10440 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
10441 *GNU\ gold*) supports_anon_versioning=yes ;;
10442 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
10443 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
10444 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
10445 *\ 2.11.*) ;; # other 2.11 versions
10446 *) supports_anon_versioning=yes ;;
10447 esac
10448
10449 # See if GNU ld supports shared libraries.
10450 case $host_os in
10451 aix[3-9]*)
10452 # On AIX/PPC, the GNU linker is very broken
10453 if test ia64 != "$host_cpu"; then
10454 ld_shlibs=no
10455 cat <<_LT_EOF 1>&2
10456
10457 *** Warning: the GNU linker, at least up to release 2.19, is reported
10458 *** to be unable to reliably create shared libraries on AIX.
10459 *** Therefore, libtool is disabling shared libraries support. If you
10460 *** really care for shared libraries, you may want to install binutils
10461 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
10462 *** You will then need to restart the configuration process.
10463
10464 _LT_EOF
10465 fi
10466 ;;
10467
10468 amigaos*)
10469 case $host_cpu in
10470 powerpc)
10471 # see comment about AmigaOS4 .so support
10472 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10473 archive_expsym_cmds=''
10474 ;;
10475 m68k)
10476 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)'
10477 hardcode_libdir_flag_spec='-L$libdir'
10478 hardcode_minus_L=yes
10479 ;;
10480 esac
10481 ;;
10482
10483 beos*)
10484 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10485 allow_undefined_flag=unsupported
10486 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10487 # support --undefined. This deserves some investigation. FIXME
10488 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10489 else
10490 ld_shlibs=no
10491 fi
10492 ;;
10493
10494 cygwin* | mingw* | pw32* | cegcc*)
10495 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
10496 # as there is no search path for DLLs.
10497 hardcode_libdir_flag_spec='-L$libdir'
10498 export_dynamic_flag_spec='$wl--export-all-symbols'
10499 allow_undefined_flag=unsupported
10500 always_export_symbols=no
10501 enable_shared_with_static_runtimes=yes
10502 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'
10503 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
10504
10505 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
10506 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10507 # If the export-symbols file already is a .def file, use it as
10508 # is; otherwise, prepend EXPORTS...
10509 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
10510 cp $export_symbols $output_objdir/$soname.def;
10511 else
10512 echo EXPORTS > $output_objdir/$soname.def;
10513 cat $export_symbols >> $output_objdir/$soname.def;
10514 fi~
10515 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10516 else
10517 ld_shlibs=no
10518 fi
10519 ;;
10520
10521 haiku*)
10522 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10523 link_all_deplibs=yes
10524 ;;
10525
10526 os2*)
10527 hardcode_libdir_flag_spec='-L$libdir'
10528 hardcode_minus_L=yes
10529 allow_undefined_flag=unsupported
10530 shrext_cmds=.dll
10531 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10532 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10533 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10534 $ECHO EXPORTS >> $output_objdir/$libname.def~
10535 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
10536 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10537 emximp -o $lib $output_objdir/$libname.def'
10538 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10539 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10540 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10541 $ECHO EXPORTS >> $output_objdir/$libname.def~
10542 prefix_cmds="$SED"~
10543 if test EXPORTS = "`$SED 1q $export_symbols`"; then
10544 prefix_cmds="$prefix_cmds -e 1d";
10545 fi~
10546 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
10547 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
10548 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10549 emximp -o $lib $output_objdir/$libname.def'
10550 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
10551 enable_shared_with_static_runtimes=yes
10552 ;;
10553
10554 interix[3-9]*)
10555 hardcode_direct=no
10556 hardcode_shlibpath_var=no
10557 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
10558 export_dynamic_flag_spec='$wl-E'
10559 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
10560 # Instead, shared libraries are loaded at an image base (0x10000000 by
10561 # default) and relocated if they conflict, which is a slow very memory
10562 # consuming and fragmenting process. To avoid this, we pick a random,
10563 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
10564 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
10565 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
10566 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'
10567 ;;
10568
10569 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
10570 tmp_diet=no
10571 if test linux-dietlibc = "$host_os"; then
10572 case $cc_basename in
10573 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
10574 esac
10575 fi
10576 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
10577 && test no = "$tmp_diet"
10578 then
10579 tmp_addflag=' $pic_flag'
10580 tmp_sharedflag='-shared'
10581 case $cc_basename,$host_cpu in
10582 pgcc*) # Portland Group C compiler
10583 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'
10584 tmp_addflag=' $pic_flag'
10585 ;;
10586 pgf77* | pgf90* | pgf95* | pgfortran*)
10587 # Portland Group f77 and f90 compilers
10588 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'
10589 tmp_addflag=' $pic_flag -Mnomain' ;;
10590 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
10591 tmp_addflag=' -i_dynamic' ;;
10592 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
10593 tmp_addflag=' -i_dynamic -nofor_main' ;;
10594 ifc* | ifort*) # Intel Fortran compiler
10595 tmp_addflag=' -nofor_main' ;;
10596 lf95*) # Lahey Fortran 8.1
10597 whole_archive_flag_spec=
10598 tmp_sharedflag='--shared' ;;
10599 nagfor*) # NAGFOR 5.3
10600 tmp_sharedflag='-Wl,-shared' ;;
10601 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
10602 tmp_sharedflag='-qmkshrobj'
10603 tmp_addflag= ;;
10604 nvcc*) # Cuda Compiler Driver 2.2
10605 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'
10606 compiler_needs_object=yes
10607 ;;
10608 esac
10609 case `$CC -V 2>&1 | sed 5q` in
10610 *Sun\ C*) # Sun C 5.9
10611 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'
10612 compiler_needs_object=yes
10613 tmp_sharedflag='-G' ;;
10614 *Sun\ F*) # Sun Fortran 8.3
10615 tmp_sharedflag='-G' ;;
10616 esac
10617 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10618
10619 if test yes = "$supports_anon_versioning"; then
10620 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10621 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10622 echo "local: *; };" >> $output_objdir/$libname.ver~
10623 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
10624 fi
10625
10626 case $cc_basename in
10627 tcc*)
10628 export_dynamic_flag_spec='-rdynamic'
10629 ;;
10630 xlf* | bgf* | bgxlf* | mpixlf*)
10631 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
10632 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
10633 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10634 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
10635 if test yes = "$supports_anon_versioning"; then
10636 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10637 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10638 echo "local: *; };" >> $output_objdir/$libname.ver~
10639 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
10640 fi
10641 ;;
10642 esac
10643 else
10644 ld_shlibs=no
10645 fi
10646 ;;
10647
10648 netbsd* | netbsdelf*-gnu)
10649 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10650 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10651 wlarc=
10652 else
10653 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10654 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10655 fi
10656 ;;
10657
10658 solaris*)
10659 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
10660 ld_shlibs=no
10661 cat <<_LT_EOF 1>&2
10662
10663 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
10664 *** create shared libraries on Solaris systems. Therefore, libtool
10665 *** is disabling shared libraries support. We urge you to upgrade GNU
10666 *** binutils to release 2.9.1 or newer. Another option is to modify
10667 *** your PATH or compiler configuration so that the native linker is
10668 *** used, and then restart.
10669
10670 _LT_EOF
10671 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10672 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10673 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10674 else
10675 ld_shlibs=no
10676 fi
10677 ;;
10678
10679 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
10680 case `$LD -v 2>&1` in
10681 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
10682 ld_shlibs=no
10683 cat <<_LT_EOF 1>&2
10684
10685 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
10686 *** reliably create shared libraries on SCO systems. Therefore, libtool
10687 *** is disabling shared libraries support. We urge you to upgrade GNU
10688 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
10689 *** your PATH or compiler configuration so that the native linker is
10690 *** used, and then restart.
10691
10692 _LT_EOF
10693 ;;
10694 *)
10695 # For security reasons, it is highly recommended that you always
10696 # use absolute paths for naming shared libraries, and exclude the
10697 # DT_RUNPATH tag from executables and libraries. But doing so
10698 # requires that you compile everything twice, which is a pain.
10699 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10700 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10701 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10702 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10703 else
10704 ld_shlibs=no
10705 fi
10706 ;;
10707 esac
10708 ;;
10709
10710 sunos4*)
10711 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10712 wlarc=
10713 hardcode_direct=yes
10714 hardcode_shlibpath_var=no
10715 ;;
10716
10717 *)
10718 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10719 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10720 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10721 else
10722 ld_shlibs=no
10723 fi
10724 ;;
10725 esac
10726
10727 if test no = "$ld_shlibs"; then
10728 runpath_var=
10729 hardcode_libdir_flag_spec=
10730 export_dynamic_flag_spec=
10731 whole_archive_flag_spec=
10732 fi
10733 else
10734 # PORTME fill in a description of your system's linker (not GNU ld)
10735 case $host_os in
10736 aix3*)
10737 allow_undefined_flag=unsupported
10738 always_export_symbols=yes
10739 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'
10740 # Note: this linker hardcodes the directories in LIBPATH if there
10741 # are no directories specified by -L.
10742 hardcode_minus_L=yes
10743 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
10744 # Neither direct hardcoding nor static linking is supported with a
10745 # broken collect2.
10746 hardcode_direct=unsupported
10747 fi
10748 ;;
10749
10750 aix[4-9]*)
10751 if test ia64 = "$host_cpu"; then
10752 # On IA64, the linker does run time linking by default, so we don't
10753 # have to do anything special.
10754 aix_use_runtimelinking=no
10755 exp_sym_flag='-Bexport'
10756 no_entry_flag=
10757 else
10758 # If we're using GNU nm, then we don't want the "-C" option.
10759 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
10760 # Without the "-l" option, or with the "-B" option, AIX nm treats
10761 # weak defined symbols like other global defined symbols, whereas
10762 # GNU nm marks them as "W".
10763 # While the 'weak' keyword is ignored in the Export File, we need
10764 # it in the Import File for the 'aix-soname' feature, so we have
10765 # to replace the "-B" option with "-P" for AIX nm.
10766 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
10767 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'
10768 else
10769 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'
10770 fi
10771 aix_use_runtimelinking=no
10772
10773 # Test if we are trying to use run time linking or normal
10774 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
10775 # have runtime linking enabled, and use it for executables.
10776 # For shared libraries, we enable/disable runtime linking
10777 # depending on the kind of the shared library created -
10778 # when "with_aix_soname,aix_use_runtimelinking" is:
10779 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
10780 # "aix,yes" lib.so shared, rtl:yes, for executables
10781 # lib.a static archive
10782 # "both,no" lib.so.V(shr.o) shared, rtl:yes
10783 # lib.a(lib.so.V) shared, rtl:no, for executables
10784 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
10785 # lib.a(lib.so.V) shared, rtl:no
10786 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
10787 # lib.a static archive
10788 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
10789 for ld_flag in $LDFLAGS; do
10790 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
10791 aix_use_runtimelinking=yes
10792 break
10793 fi
10794 done
10795 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
10796 # With aix-soname=svr4, we create the lib.so.V shared archives only,
10797 # so we don't have lib.a shared libs to link our executables.
10798 # We have to force runtime linking in this case.
10799 aix_use_runtimelinking=yes
10800 LDFLAGS="$LDFLAGS -Wl,-brtl"
10801 fi
10802 ;;
10803 esac
10804
10805 exp_sym_flag='-bexport'
10806 no_entry_flag='-bnoentry'
10807 fi
10808
10809 # When large executables or shared objects are built, AIX ld can
10810 # have problems creating the table of contents. If linking a library
10811 # or program results in "error TOC overflow" add -mminimal-toc to
10812 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10813 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10814
10815 archive_cmds=''
10816 hardcode_direct=yes
10817 hardcode_direct_absolute=yes
10818 hardcode_libdir_separator=':'
10819 link_all_deplibs=yes
10820 file_list_spec='$wl-f,'
10821 case $with_aix_soname,$aix_use_runtimelinking in
10822 aix,*) ;; # traditional, no import file
10823 svr4,* | *,yes) # use import file
10824 # The Import File defines what to hardcode.
10825 hardcode_direct=no
10826 hardcode_direct_absolute=no
10827 ;;
10828 esac
10829
10830 if test yes = "$GCC"; then
10831 case $host_os in aix4.[012]|aix4.[012].*)
10832 # We only want to do this on AIX 4.2 and lower, the check
10833 # below for broken collect2 doesn't work under 4.3+
10834 collect2name=`$CC -print-prog-name=collect2`
10835 if test -f "$collect2name" &&
10836 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
10837 then
10838 # We have reworked collect2
10839 :
10840 else
10841 # We have old collect2
10842 hardcode_direct=unsupported
10843 # It fails to find uninstalled libraries when the uninstalled
10844 # path is not listed in the libpath. Setting hardcode_minus_L
10845 # to unsupported forces relinking
10846 hardcode_minus_L=yes
10847 hardcode_libdir_flag_spec='-L$libdir'
10848 hardcode_libdir_separator=
10849 fi
10850 ;;
10851 esac
10852 shared_flag='-shared'
10853 if test yes = "$aix_use_runtimelinking"; then
10854 shared_flag="$shared_flag "'$wl-G'
10855 fi
10856 # Need to ensure runtime linking is disabled for the traditional
10857 # shared library, or the linker may eventually find shared libraries
10858 # /with/ Import File - we do not want to mix them.
10859 shared_flag_aix='-shared'
10860 shared_flag_svr4='-shared $wl-G'
10861 else
10862 # not using gcc
10863 if test ia64 = "$host_cpu"; then
10864 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10865 # chokes on -Wl,-G. The following line is correct:
10866 shared_flag='-G'
10867 else
10868 if test yes = "$aix_use_runtimelinking"; then
10869 shared_flag='$wl-G'
10870 else
10871 shared_flag='$wl-bM:SRE'
10872 fi
10873 shared_flag_aix='$wl-bM:SRE'
10874 shared_flag_svr4='$wl-G'
10875 fi
10876 fi
10877
10878 export_dynamic_flag_spec='$wl-bexpall'
10879 # It seems that -bexpall does not export symbols beginning with
10880 # underscore (_), so it is better to generate a list of symbols to export.
10881 always_export_symbols=yes
10882 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
10883 # Warning - without using the other runtime loading flags (-brtl),
10884 # -berok will link without error, but may produce a broken library.
10885 allow_undefined_flag='-berok'
10886 # Determine the default libpath from the value encoded in an
10887 # empty executable.
10888 if test set = "${lt_cv_aix_libpath+set}"; then
10889 aix_libpath=$lt_cv_aix_libpath
10890 else
10891 if test ${lt_cv_aix_libpath_+y}
10892 then :
10893 printf %s "(cached) " >&6
10894 else $as_nop
10895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10896 /* end confdefs.h. */
10897
10898 int
10899 main (void)
10900 {
10901
10902 ;
10903 return 0;
10904 }
10905 _ACEOF
10906 if ac_fn_c_try_link "$LINENO"
10907 then :
10908
10909 lt_aix_libpath_sed='
10910 /Import File Strings/,/^$/ {
10911 /^0/ {
10912 s/^0 *\([^ ]*\) *$/\1/
10913 p
10914 }
10915 }'
10916 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10917 # Check for a 64-bit object if we didn't find anything.
10918 if test -z "$lt_cv_aix_libpath_"; then
10919 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10920 fi
10921 fi
10922 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10923 conftest$ac_exeext conftest.$ac_ext
10924 if test -z "$lt_cv_aix_libpath_"; then
10925 lt_cv_aix_libpath_=/usr/lib:/lib
10926 fi
10927
10928 fi
10929
10930 aix_libpath=$lt_cv_aix_libpath_
10931 fi
10932
10933 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
10934 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
10935 else
10936 if test ia64 = "$host_cpu"; then
10937 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
10938 allow_undefined_flag="-z nodefs"
10939 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"
10940 else
10941 # Determine the default libpath from the value encoded in an
10942 # empty executable.
10943 if test set = "${lt_cv_aix_libpath+set}"; then
10944 aix_libpath=$lt_cv_aix_libpath
10945 else
10946 if test ${lt_cv_aix_libpath_+y}
10947 then :
10948 printf %s "(cached) " >&6
10949 else $as_nop
10950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10951 /* end confdefs.h. */
10952
10953 int
10954 main (void)
10955 {
10956
10957 ;
10958 return 0;
10959 }
10960 _ACEOF
10961 if ac_fn_c_try_link "$LINENO"
10962 then :
10963
10964 lt_aix_libpath_sed='
10965 /Import File Strings/,/^$/ {
10966 /^0/ {
10967 s/^0 *\([^ ]*\) *$/\1/
10968 p
10969 }
10970 }'
10971 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10972 # Check for a 64-bit object if we didn't find anything.
10973 if test -z "$lt_cv_aix_libpath_"; then
10974 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10975 fi
10976 fi
10977 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10978 conftest$ac_exeext conftest.$ac_ext
10979 if test -z "$lt_cv_aix_libpath_"; then
10980 lt_cv_aix_libpath_=/usr/lib:/lib
10981 fi
10982
10983 fi
10984
10985 aix_libpath=$lt_cv_aix_libpath_
10986 fi
10987
10988 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
10989 # Warning - without using the other run time loading flags,
10990 # -berok will link without error, but may produce a broken library.
10991 no_undefined_flag=' $wl-bernotok'
10992 allow_undefined_flag=' $wl-berok'
10993 if test yes = "$with_gnu_ld"; then
10994 # We only use this code for GNU lds that support --whole-archive.
10995 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
10996 else
10997 # Exported symbols can be pulled into shared objects from archives
10998 whole_archive_flag_spec='$convenience'
10999 fi
11000 archive_cmds_need_lc=yes
11001 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
11002 # -brtl affects multiple linker settings, -berok does not and is overridden later
11003 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
11004 if test svr4 != "$with_aix_soname"; then
11005 # This is similar to how AIX traditionally builds its shared libraries.
11006 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'
11007 fi
11008 if test aix != "$with_aix_soname"; then
11009 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'
11010 else
11011 # used by -dlpreopen to get the symbols
11012 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
11013 fi
11014 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
11015 fi
11016 fi
11017 ;;
11018
11019 amigaos*)
11020 case $host_cpu in
11021 powerpc)
11022 # see comment about AmigaOS4 .so support
11023 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11024 archive_expsym_cmds=''
11025 ;;
11026 m68k)
11027 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)'
11028 hardcode_libdir_flag_spec='-L$libdir'
11029 hardcode_minus_L=yes
11030 ;;
11031 esac
11032 ;;
11033
11034 bsdi[45]*)
11035 export_dynamic_flag_spec=-rdynamic
11036 ;;
11037
11038 cygwin* | mingw* | pw32* | cegcc*)
11039 # When not using gcc, we currently assume that we are using
11040 # Microsoft Visual C++.
11041 # hardcode_libdir_flag_spec is actually meaningless, as there is
11042 # no search path for DLLs.
11043 case $cc_basename in
11044 cl*)
11045 # Native MSVC
11046 hardcode_libdir_flag_spec=' '
11047 allow_undefined_flag=unsupported
11048 always_export_symbols=yes
11049 file_list_spec='@'
11050 # Tell ltmain to make .lib files, not .a files.
11051 libext=lib
11052 # Tell ltmain to make .dll files, not .so files.
11053 shrext_cmds=.dll
11054 # FIXME: Setting linknames here is a bad hack.
11055 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
11056 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
11057 cp "$export_symbols" "$output_objdir/$soname.def";
11058 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
11059 else
11060 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
11061 fi~
11062 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
11063 linknames='
11064 # The linker will not automatically build a static lib if we build a DLL.
11065 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
11066 enable_shared_with_static_runtimes=yes
11067 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
11068 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
11069 # Don't use ranlib
11070 old_postinstall_cmds='chmod 644 $oldlib'
11071 postlink_cmds='lt_outputfile="@OUTPUT@"~
11072 lt_tool_outputfile="@TOOL_OUTPUT@"~
11073 case $lt_outputfile in
11074 *.exe|*.EXE) ;;
11075 *)
11076 lt_outputfile=$lt_outputfile.exe
11077 lt_tool_outputfile=$lt_tool_outputfile.exe
11078 ;;
11079 esac~
11080 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
11081 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
11082 $RM "$lt_outputfile.manifest";
11083 fi'
11084 ;;
11085 *)
11086 # Assume MSVC wrapper
11087 hardcode_libdir_flag_spec=' '
11088 allow_undefined_flag=unsupported
11089 # Tell ltmain to make .lib files, not .a files.
11090 libext=lib
11091 # Tell ltmain to make .dll files, not .so files.
11092 shrext_cmds=.dll
11093 # FIXME: Setting linknames here is a bad hack.
11094 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
11095 # The linker will automatically build a .lib file if we build a DLL.
11096 old_archive_from_new_cmds='true'
11097 # FIXME: Should let the user specify the lib program.
11098 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
11099 enable_shared_with_static_runtimes=yes
11100 ;;
11101 esac
11102 ;;
11103
11104 darwin* | rhapsody*)
11105
11106
11107 archive_cmds_need_lc=no
11108 hardcode_direct=no
11109 hardcode_automatic=yes
11110 hardcode_shlibpath_var=unsupported
11111 if test yes = "$lt_cv_ld_force_load"; then
11112 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\"`'
11113
11114 else
11115 whole_archive_flag_spec=''
11116 fi
11117 link_all_deplibs=yes
11118 allow_undefined_flag=$_lt_dar_allow_undefined
11119 case $cc_basename in
11120 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11121 *) _lt_dar_can_shared=$GCC ;;
11122 esac
11123 if test yes = "$_lt_dar_can_shared"; then
11124 output_verbose_link_cmd=func_echo_all
11125 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
11126 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11127 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"
11128 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"
11129
11130 else
11131 ld_shlibs=no
11132 fi
11133
11134 ;;
11135
11136 dgux*)
11137 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11138 hardcode_libdir_flag_spec='-L$libdir'
11139 hardcode_shlibpath_var=no
11140 ;;
11141
11142 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11143 # support. Future versions do this automatically, but an explicit c++rt0.o
11144 # does not break anything, and helps significantly (at the cost of a little
11145 # extra space).
11146 freebsd2.2*)
11147 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11148 hardcode_libdir_flag_spec='-R$libdir'
11149 hardcode_direct=yes
11150 hardcode_shlibpath_var=no
11151 ;;
11152
11153 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11154 freebsd2.*)
11155 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11156 hardcode_direct=yes
11157 hardcode_minus_L=yes
11158 hardcode_shlibpath_var=no
11159 ;;
11160
11161 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11162 freebsd* | dragonfly*)
11163 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11164 hardcode_libdir_flag_spec='-R$libdir'
11165 hardcode_direct=yes
11166 hardcode_shlibpath_var=no
11167 ;;
11168
11169 hpux9*)
11170 if test yes = "$GCC"; then
11171 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'
11172 else
11173 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'
11174 fi
11175 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
11176 hardcode_libdir_separator=:
11177 hardcode_direct=yes
11178
11179 # hardcode_minus_L: Not really in the search PATH,
11180 # but as the default location of the library.
11181 hardcode_minus_L=yes
11182 export_dynamic_flag_spec='$wl-E'
11183 ;;
11184
11185 hpux10*)
11186 if test yes,no = "$GCC,$with_gnu_ld"; then
11187 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11188 else
11189 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11190 fi
11191 if test no = "$with_gnu_ld"; then
11192 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
11193 hardcode_libdir_separator=:
11194 hardcode_direct=yes
11195 hardcode_direct_absolute=yes
11196 export_dynamic_flag_spec='$wl-E'
11197 # hardcode_minus_L: Not really in the search PATH,
11198 # but as the default location of the library.
11199 hardcode_minus_L=yes
11200 fi
11201 ;;
11202
11203 hpux11*)
11204 if test yes,no = "$GCC,$with_gnu_ld"; then
11205 case $host_cpu in
11206 hppa*64*)
11207 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
11208 ;;
11209 ia64*)
11210 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11211 ;;
11212 *)
11213 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11214 ;;
11215 esac
11216 else
11217 case $host_cpu in
11218 hppa*64*)
11219 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
11220 ;;
11221 ia64*)
11222 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11223 ;;
11224 *)
11225
11226 # Older versions of the 11.00 compiler do not understand -b yet
11227 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
11228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
11229 printf %s "checking if $CC understands -b... " >&6; }
11230 if test ${lt_cv_prog_compiler__b+y}
11231 then :
11232 printf %s "(cached) " >&6
11233 else $as_nop
11234 lt_cv_prog_compiler__b=no
11235 save_LDFLAGS=$LDFLAGS
11236 LDFLAGS="$LDFLAGS -b"
11237 echo "$lt_simple_link_test_code" > conftest.$ac_ext
11238 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11239 # The linker can only warn and ignore the option if not recognized
11240 # So say no if there are warnings
11241 if test -s conftest.err; then
11242 # Append any errors to the config.log.
11243 cat conftest.err 1>&5
11244 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11245 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11246 if diff conftest.exp conftest.er2 >/dev/null; then
11247 lt_cv_prog_compiler__b=yes
11248 fi
11249 else
11250 lt_cv_prog_compiler__b=yes
11251 fi
11252 fi
11253 $RM -r conftest*
11254 LDFLAGS=$save_LDFLAGS
11255
11256 fi
11257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
11258 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
11259
11260 if test yes = "$lt_cv_prog_compiler__b"; then
11261 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11262 else
11263 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11264 fi
11265
11266 ;;
11267 esac
11268 fi
11269 if test no = "$with_gnu_ld"; then
11270 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
11271 hardcode_libdir_separator=:
11272
11273 case $host_cpu in
11274 hppa*64*|ia64*)
11275 hardcode_direct=no
11276 hardcode_shlibpath_var=no
11277 ;;
11278 *)
11279 hardcode_direct=yes
11280 hardcode_direct_absolute=yes
11281 export_dynamic_flag_spec='$wl-E'
11282
11283 # hardcode_minus_L: Not really in the search PATH,
11284 # but as the default location of the library.
11285 hardcode_minus_L=yes
11286 ;;
11287 esac
11288 fi
11289 ;;
11290
11291 irix5* | irix6* | nonstopux*)
11292 if test yes = "$GCC"; then
11293 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'
11294 # Try to use the -exported_symbol ld option, if it does not
11295 # work, assume that -exports_file does not work either and
11296 # implicitly export all symbols.
11297 # This should be the same for all languages, so no per-tag cache variable.
11298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
11299 printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
11300 if test ${lt_cv_irix_exported_symbol+y}
11301 then :
11302 printf %s "(cached) " >&6
11303 else $as_nop
11304 save_LDFLAGS=$LDFLAGS
11305 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
11306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11307 /* end confdefs.h. */
11308 int foo (void) { return 0; }
11309 _ACEOF
11310 if ac_fn_c_try_link "$LINENO"
11311 then :
11312 lt_cv_irix_exported_symbol=yes
11313 else $as_nop
11314 lt_cv_irix_exported_symbol=no
11315 fi
11316 rm -f core conftest.err conftest.$ac_objext conftest.beam \
11317 conftest$ac_exeext conftest.$ac_ext
11318 LDFLAGS=$save_LDFLAGS
11319 fi
11320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
11321 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
11322 if test yes = "$lt_cv_irix_exported_symbol"; then
11323 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'
11324 fi
11325 link_all_deplibs=no
11326 else
11327 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'
11328 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'
11329 fi
11330 archive_cmds_need_lc='no'
11331 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11332 hardcode_libdir_separator=:
11333 inherit_rpath=yes
11334 link_all_deplibs=yes
11335 ;;
11336
11337 linux*)
11338 case $cc_basename in
11339 tcc*)
11340 # Fabrice Bellard et al's Tiny C Compiler
11341 ld_shlibs=yes
11342 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11343 ;;
11344 esac
11345 ;;
11346
11347 netbsd* | netbsdelf*-gnu)
11348 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11349 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
11350 else
11351 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
11352 fi
11353 hardcode_libdir_flag_spec='-R$libdir'
11354 hardcode_direct=yes
11355 hardcode_shlibpath_var=no
11356 ;;
11357
11358 newsos6)
11359 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11360 hardcode_direct=yes
11361 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11362 hardcode_libdir_separator=:
11363 hardcode_shlibpath_var=no
11364 ;;
11365
11366 *nto* | *qnx*)
11367 ;;
11368
11369 openbsd* | bitrig*)
11370 if test -f /usr/libexec/ld.so; then
11371 hardcode_direct=yes
11372 hardcode_shlibpath_var=no
11373 hardcode_direct_absolute=yes
11374 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
11375 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11376 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
11377 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11378 export_dynamic_flag_spec='$wl-E'
11379 else
11380 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11381 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11382 fi
11383 else
11384 ld_shlibs=no
11385 fi
11386 ;;
11387
11388 os2*)
11389 hardcode_libdir_flag_spec='-L$libdir'
11390 hardcode_minus_L=yes
11391 allow_undefined_flag=unsupported
11392 shrext_cmds=.dll
11393 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11394 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11395 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11396 $ECHO EXPORTS >> $output_objdir/$libname.def~
11397 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11398 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11399 emximp -o $lib $output_objdir/$libname.def'
11400 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11401 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11402 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11403 $ECHO EXPORTS >> $output_objdir/$libname.def~
11404 prefix_cmds="$SED"~
11405 if test EXPORTS = "`$SED 1q $export_symbols`"; then
11406 prefix_cmds="$prefix_cmds -e 1d";
11407 fi~
11408 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11409 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11410 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11411 emximp -o $lib $output_objdir/$libname.def'
11412 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11413 enable_shared_with_static_runtimes=yes
11414 ;;
11415
11416 osf3*)
11417 if test yes = "$GCC"; then
11418 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
11419 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'
11420 else
11421 allow_undefined_flag=' -expect_unresolved \*'
11422 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'
11423 fi
11424 archive_cmds_need_lc='no'
11425 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11426 hardcode_libdir_separator=:
11427 ;;
11428
11429 osf4* | osf5*) # as osf3* with the addition of -msym flag
11430 if test yes = "$GCC"; then
11431 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
11432 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'
11433 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11434 else
11435 allow_undefined_flag=' -expect_unresolved \*'
11436 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'
11437 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~
11438 $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'
11439
11440 # Both c and cxx compiler support -rpath directly
11441 hardcode_libdir_flag_spec='-rpath $libdir'
11442 fi
11443 archive_cmds_need_lc='no'
11444 hardcode_libdir_separator=:
11445 ;;
11446
11447 solaris*)
11448 no_undefined_flag=' -z defs'
11449 if test yes = "$GCC"; then
11450 wlarc='$wl'
11451 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
11452 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11453 $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'
11454 else
11455 case `$CC -V 2>&1` in
11456 *"Compilers 5.0"*)
11457 wlarc=''
11458 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
11459 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11460 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
11461 ;;
11462 *)
11463 wlarc='$wl'
11464 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
11465 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11466 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
11467 ;;
11468 esac
11469 fi
11470 hardcode_libdir_flag_spec='-R$libdir'
11471 hardcode_shlibpath_var=no
11472 case $host_os in
11473 solaris2.[0-5] | solaris2.[0-5].*) ;;
11474 *)
11475 # The compiler driver will combine and reorder linker options,
11476 # but understands '-z linker_flag'. GCC discards it without '$wl',
11477 # but is careful enough not to reorder.
11478 # Supported since Solaris 2.6 (maybe 2.5.1?)
11479 if test yes = "$GCC"; then
11480 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
11481 else
11482 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
11483 fi
11484 ;;
11485 esac
11486 link_all_deplibs=yes
11487 ;;
11488
11489 sunos4*)
11490 if test sequent = "$host_vendor"; then
11491 # Use $CC to link under sequent, because it throws in some extra .o
11492 # files that make .init and .fini sections work.
11493 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
11494 else
11495 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11496 fi
11497 hardcode_libdir_flag_spec='-L$libdir'
11498 hardcode_direct=yes
11499 hardcode_minus_L=yes
11500 hardcode_shlibpath_var=no
11501 ;;
11502
11503 sysv4)
11504 case $host_vendor in
11505 sni)
11506 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11507 hardcode_direct=yes # is this really true???
11508 ;;
11509 siemens)
11510 ## LD is ld it makes a PLAMLIB
11511 ## CC just makes a GrossModule.
11512 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11513 reload_cmds='$CC -r -o $output$reload_objs'
11514 hardcode_direct=no
11515 ;;
11516 motorola)
11517 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11518 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
11519 ;;
11520 esac
11521 runpath_var='LD_RUN_PATH'
11522 hardcode_shlibpath_var=no
11523 ;;
11524
11525 sysv4.3*)
11526 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11527 hardcode_shlibpath_var=no
11528 export_dynamic_flag_spec='-Bexport'
11529 ;;
11530
11531 sysv4*MP*)
11532 if test -d /usr/nec; then
11533 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11534 hardcode_shlibpath_var=no
11535 runpath_var=LD_RUN_PATH
11536 hardcode_runpath_var=yes
11537 ld_shlibs=yes
11538 fi
11539 ;;
11540
11541 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
11542 no_undefined_flag='$wl-z,text'
11543 archive_cmds_need_lc=no
11544 hardcode_shlibpath_var=no
11545 runpath_var='LD_RUN_PATH'
11546
11547 if test yes = "$GCC"; then
11548 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11549 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11550 else
11551 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11552 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11553 fi
11554 ;;
11555
11556 sysv5* | sco3.2v5* | sco5v6*)
11557 # Note: We CANNOT use -z defs as we might desire, because we do not
11558 # link with -lc, and that would cause any symbols used from libc to
11559 # always be unresolved, which means just about no library would
11560 # ever link correctly. If we're not using GNU ld we use -z text
11561 # though, which does catch some bad symbols but isn't as heavy-handed
11562 # as -z defs.
11563 no_undefined_flag='$wl-z,text'
11564 allow_undefined_flag='$wl-z,nodefs'
11565 archive_cmds_need_lc=no
11566 hardcode_shlibpath_var=no
11567 hardcode_libdir_flag_spec='$wl-R,$libdir'
11568 hardcode_libdir_separator=':'
11569 link_all_deplibs=yes
11570 export_dynamic_flag_spec='$wl-Bexport'
11571 runpath_var='LD_RUN_PATH'
11572
11573 if test yes = "$GCC"; then
11574 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11575 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11576 else
11577 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11578 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11579 fi
11580 ;;
11581
11582 uts4*)
11583 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11584 hardcode_libdir_flag_spec='-L$libdir'
11585 hardcode_shlibpath_var=no
11586 ;;
11587
11588 *)
11589 ld_shlibs=no
11590 ;;
11591 esac
11592
11593 if test sni = "$host_vendor"; then
11594 case $host in
11595 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
11596 export_dynamic_flag_spec='$wl-Blargedynsym'
11597 ;;
11598 esac
11599 fi
11600 fi
11601
11602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
11603 printf "%s\n" "$ld_shlibs" >&6; }
11604 test no = "$ld_shlibs" && can_build_shared=no
11605
11606 with_gnu_ld=$with_gnu_ld
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622 #
11623 # Do we need to explicitly link libc?
11624 #
11625 case "x$archive_cmds_need_lc" in
11626 x|xyes)
11627 # Assume -lc should be added
11628 archive_cmds_need_lc=yes
11629
11630 if test yes,yes = "$GCC,$enable_shared"; then
11631 case $archive_cmds in
11632 *'~'*)
11633 # FIXME: we may have to deal with multi-command sequences.
11634 ;;
11635 '$CC '*)
11636 # Test whether the compiler implicitly links with -lc since on some
11637 # systems, -lgcc has to come before -lc. If gcc already passes -lc
11638 # to ld, don't add -lc before -lgcc.
11639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
11640 printf %s "checking whether -lc should be explicitly linked in... " >&6; }
11641 if test ${lt_cv_archive_cmds_need_lc+y}
11642 then :
11643 printf %s "(cached) " >&6
11644 else $as_nop
11645 $RM conftest*
11646 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11647
11648 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11649 (eval $ac_compile) 2>&5
11650 ac_status=$?
11651 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11652 test $ac_status = 0; } 2>conftest.err; then
11653 soname=conftest
11654 lib=conftest
11655 libobjs=conftest.$ac_objext
11656 deplibs=
11657 wl=$lt_prog_compiler_wl
11658 pic_flag=$lt_prog_compiler_pic
11659 compiler_flags=-v
11660 linker_flags=-v
11661 verstring=
11662 output_objdir=.
11663 libname=conftest
11664 lt_save_allow_undefined_flag=$allow_undefined_flag
11665 allow_undefined_flag=
11666 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
11667 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
11668 ac_status=$?
11669 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11670 test $ac_status = 0; }
11671 then
11672 lt_cv_archive_cmds_need_lc=no
11673 else
11674 lt_cv_archive_cmds_need_lc=yes
11675 fi
11676 allow_undefined_flag=$lt_save_allow_undefined_flag
11677 else
11678 cat conftest.err 1>&5
11679 fi
11680 $RM conftest*
11681
11682 fi
11683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
11684 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
11685 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
11686 ;;
11687 esac
11688 fi
11689 ;;
11690 esac
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
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
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
11844 printf %s "checking dynamic linker characteristics... " >&6; }
11845
11846 if test yes = "$GCC"; then
11847 case $host_os in
11848 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
11849 *) lt_awk_arg='/^libraries:/' ;;
11850 esac
11851 case $host_os in
11852 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
11853 *) lt_sed_strip_eq='s|=/|/|g' ;;
11854 esac
11855 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
11856 case $lt_search_path_spec in
11857 *\;*)
11858 # if the path contains ";" then we assume it to be the separator
11859 # otherwise default to the standard path separator (i.e. ":") - it is
11860 # assumed that no part of a normal pathname contains ";" but that should
11861 # okay in the real world where ";" in dirpaths is itself problematic.
11862 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
11863 ;;
11864 *)
11865 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
11866 ;;
11867 esac
11868 # Ok, now we have the path, separated by spaces, we can step through it
11869 # and add multilib dir if necessary...
11870 lt_tmp_lt_search_path_spec=
11871 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
11872 # ...but if some path component already ends with the multilib dir we assume
11873 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
11874 case "$lt_multi_os_dir; $lt_search_path_spec " in
11875 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
11876 lt_multi_os_dir=
11877 ;;
11878 esac
11879 for lt_sys_path in $lt_search_path_spec; do
11880 if test -d "$lt_sys_path$lt_multi_os_dir"; then
11881 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
11882 elif test -n "$lt_multi_os_dir"; then
11883 test -d "$lt_sys_path" && \
11884 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
11885 fi
11886 done
11887 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
11888 BEGIN {RS = " "; FS = "/|\n";} {
11889 lt_foo = "";
11890 lt_count = 0;
11891 for (lt_i = NF; lt_i > 0; lt_i--) {
11892 if ($lt_i != "" && $lt_i != ".") {
11893 if ($lt_i == "..") {
11894 lt_count++;
11895 } else {
11896 if (lt_count == 0) {
11897 lt_foo = "/" $lt_i lt_foo;
11898 } else {
11899 lt_count--;
11900 }
11901 }
11902 }
11903 }
11904 if (lt_foo != "") { lt_freq[lt_foo]++; }
11905 if (lt_freq[lt_foo] == 1) { print lt_foo; }
11906 }'`
11907 # AWK program above erroneously prepends '/' to C:/dos/paths
11908 # for these hosts.
11909 case $host_os in
11910 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
11911 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
11912 esac
11913 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
11914 else
11915 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
11916 fi
11917 library_names_spec=
11918 libname_spec='lib$name'
11919 soname_spec=
11920 shrext_cmds=.so
11921 postinstall_cmds=
11922 postuninstall_cmds=
11923 finish_cmds=
11924 finish_eval=
11925 shlibpath_var=
11926 shlibpath_overrides_runpath=unknown
11927 version_type=none
11928 dynamic_linker="$host_os ld.so"
11929 sys_lib_dlsearch_path_spec="/lib /usr/lib"
11930 need_lib_prefix=unknown
11931 hardcode_into_libs=no
11932
11933 # when you set need_version to no, make sure it does not cause -set_version
11934 # flags to be left without arguments
11935 need_version=unknown
11936
11937
11938
11939 case $host_os in
11940 aix3*)
11941 version_type=linux # correct to gnu/linux during the next big refactor
11942 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
11943 shlibpath_var=LIBPATH
11944
11945 # AIX 3 has no versioning support, so we append a major version to the name.
11946 soname_spec='$libname$release$shared_ext$major'
11947 ;;
11948
11949 aix[4-9]*)
11950 version_type=linux # correct to gnu/linux during the next big refactor
11951 need_lib_prefix=no
11952 need_version=no
11953 hardcode_into_libs=yes
11954 if test ia64 = "$host_cpu"; then
11955 # AIX 5 supports IA64
11956 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
11957 shlibpath_var=LD_LIBRARY_PATH
11958 else
11959 # With GCC up to 2.95.x, collect2 would create an import file
11960 # for dependence libraries. The import file would start with
11961 # the line '#! .'. This would cause the generated library to
11962 # depend on '.', always an invalid library. This was fixed in
11963 # development snapshots of GCC prior to 3.0.
11964 case $host_os in
11965 aix4 | aix4.[01] | aix4.[01].*)
11966 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
11967 echo ' yes '
11968 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
11969 :
11970 else
11971 can_build_shared=no
11972 fi
11973 ;;
11974 esac
11975 # Using Import Files as archive members, it is possible to support
11976 # filename-based versioning of shared library archives on AIX. While
11977 # this would work for both with and without runtime linking, it will
11978 # prevent static linking of such archives. So we do filename-based
11979 # shared library versioning with .so extension only, which is used
11980 # when both runtime linking and shared linking is enabled.
11981 # Unfortunately, runtime linking may impact performance, so we do
11982 # not want this to be the default eventually. Also, we use the
11983 # versioned .so libs for executables only if there is the -brtl
11984 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
11985 # To allow for filename-based versioning support, we need to create
11986 # libNAME.so.V as an archive file, containing:
11987 # *) an Import File, referring to the versioned filename of the
11988 # archive as well as the shared archive member, telling the
11989 # bitwidth (32 or 64) of that shared object, and providing the
11990 # list of exported symbols of that shared object, eventually
11991 # decorated with the 'weak' keyword
11992 # *) the shared object with the F_LOADONLY flag set, to really avoid
11993 # it being seen by the linker.
11994 # At run time we better use the real file rather than another symlink,
11995 # but for link time we create the symlink libNAME.so -> libNAME.so.V
11996
11997 case $with_aix_soname,$aix_use_runtimelinking in
11998 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
11999 # soname into executable. Probably we can add versioning support to
12000 # collect2, so additional links can be useful in future.
12001 aix,yes) # traditional libtool
12002 dynamic_linker='AIX unversionable lib.so'
12003 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12004 # instead of lib<name>.a to let people know that these are not
12005 # typical AIX shared libraries.
12006 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12007 ;;
12008 aix,no) # traditional AIX only
12009 dynamic_linker='AIX lib.a(lib.so.V)'
12010 # We preserve .a as extension for shared libraries through AIX4.2
12011 # and later when we are not doing run time linking.
12012 library_names_spec='$libname$release.a $libname.a'
12013 soname_spec='$libname$release$shared_ext$major'
12014 ;;
12015 svr4,*) # full svr4 only
12016 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
12017 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12018 # We do not specify a path in Import Files, so LIBPATH fires.
12019 shlibpath_overrides_runpath=yes
12020 ;;
12021 *,yes) # both, prefer svr4
12022 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
12023 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12024 # unpreferred sharedlib libNAME.a needs extra handling
12025 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"'
12026 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"'
12027 # We do not specify a path in Import Files, so LIBPATH fires.
12028 shlibpath_overrides_runpath=yes
12029 ;;
12030 *,no) # both, prefer aix
12031 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
12032 library_names_spec='$libname$release.a $libname.a'
12033 soname_spec='$libname$release$shared_ext$major'
12034 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
12035 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)'
12036 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"'
12037 ;;
12038 esac
12039 shlibpath_var=LIBPATH
12040 fi
12041 ;;
12042
12043 amigaos*)
12044 case $host_cpu in
12045 powerpc)
12046 # Since July 2007 AmigaOS4 officially supports .so libraries.
12047 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
12048 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12049 ;;
12050 m68k)
12051 library_names_spec='$libname.ixlibrary $libname.a'
12052 # Create ${libname}_ixlibrary.a entries in /sys/libs.
12053 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'
12054 ;;
12055 esac
12056 ;;
12057
12058 beos*)
12059 library_names_spec='$libname$shared_ext'
12060 dynamic_linker="$host_os ld.so"
12061 shlibpath_var=LIBRARY_PATH
12062 ;;
12063
12064 bsdi[45]*)
12065 version_type=linux # correct to gnu/linux during the next big refactor
12066 need_version=no
12067 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12068 soname_spec='$libname$release$shared_ext$major'
12069 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12070 shlibpath_var=LD_LIBRARY_PATH
12071 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12072 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12073 # the default ld.so.conf also contains /usr/contrib/lib and
12074 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12075 # libtool to hard-code these into programs
12076 ;;
12077
12078 cygwin* | mingw* | pw32* | cegcc*)
12079 version_type=windows
12080 shrext_cmds=.dll
12081 need_version=no
12082 need_lib_prefix=no
12083
12084 case $GCC,$cc_basename in
12085 yes,*)
12086 # gcc
12087 library_names_spec='$libname.dll.a'
12088 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12089 postinstall_cmds='base_file=`basename \$file`~
12090 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
12091 dldir=$destdir/`dirname \$dlpath`~
12092 test -d \$dldir || mkdir -p \$dldir~
12093 $install_prog $dir/$dlname \$dldir/$dlname~
12094 chmod a+x \$dldir/$dlname~
12095 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
12096 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
12097 fi'
12098 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12099 dlpath=$dir/\$dldll~
12100 $RM \$dlpath'
12101 shlibpath_overrides_runpath=yes
12102
12103 case $host_os in
12104 cygwin*)
12105 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12106 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12107
12108 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
12109 ;;
12110 mingw* | cegcc*)
12111 # MinGW DLLs use traditional 'lib' prefix
12112 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12113 ;;
12114 pw32*)
12115 # pw32 DLLs use 'pw' prefix rather than 'lib'
12116 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12117 ;;
12118 esac
12119 dynamic_linker='Win32 ld.exe'
12120 ;;
12121
12122 *,cl*)
12123 # Native MSVC
12124 libname_spec='$name'
12125 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12126 library_names_spec='$libname.dll.lib'
12127
12128 case $build_os in
12129 mingw*)
12130 sys_lib_search_path_spec=
12131 lt_save_ifs=$IFS
12132 IFS=';'
12133 for lt_path in $LIB
12134 do
12135 IFS=$lt_save_ifs
12136 # Let DOS variable expansion print the short 8.3 style file name.
12137 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
12138 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
12139 done
12140 IFS=$lt_save_ifs
12141 # Convert to MSYS style.
12142 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
12143 ;;
12144 cygwin*)
12145 # Convert to unix form, then to dos form, then back to unix form
12146 # but this time dos style (no spaces!) so that the unix form looks
12147 # like /cygdrive/c/PROGRA~1:/cygdr...
12148 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
12149 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
12150 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12151 ;;
12152 *)
12153 sys_lib_search_path_spec=$LIB
12154 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
12155 # It is most probably a Windows format PATH.
12156 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12157 else
12158 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12159 fi
12160 # FIXME: find the short name or the path components, as spaces are
12161 # common. (e.g. "Program Files" -> "PROGRA~1")
12162 ;;
12163 esac
12164
12165 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12166 postinstall_cmds='base_file=`basename \$file`~
12167 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
12168 dldir=$destdir/`dirname \$dlpath`~
12169 test -d \$dldir || mkdir -p \$dldir~
12170 $install_prog $dir/$dlname \$dldir/$dlname'
12171 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12172 dlpath=$dir/\$dldll~
12173 $RM \$dlpath'
12174 shlibpath_overrides_runpath=yes
12175 dynamic_linker='Win32 link.exe'
12176 ;;
12177
12178 *)
12179 # Assume MSVC wrapper
12180 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
12181 dynamic_linker='Win32 ld.exe'
12182 ;;
12183 esac
12184 # FIXME: first we should search . and the directory the executable is in
12185 shlibpath_var=PATH
12186 ;;
12187
12188 darwin* | rhapsody*)
12189 dynamic_linker="$host_os dyld"
12190 version_type=darwin
12191 need_lib_prefix=no
12192 need_version=no
12193 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
12194 soname_spec='$libname$release$major$shared_ext'
12195 shlibpath_overrides_runpath=yes
12196 shlibpath_var=DYLD_LIBRARY_PATH
12197 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12198
12199 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
12200 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
12201 ;;
12202
12203 dgux*)
12204 version_type=linux # correct to gnu/linux during the next big refactor
12205 need_lib_prefix=no
12206 need_version=no
12207 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12208 soname_spec='$libname$release$shared_ext$major'
12209 shlibpath_var=LD_LIBRARY_PATH
12210 ;;
12211
12212 freebsd* | dragonfly*)
12213 # DragonFly does not have aout. When/if they implement a new
12214 # versioning mechanism, adjust this.
12215 if test -x /usr/bin/objformat; then
12216 objformat=`/usr/bin/objformat`
12217 else
12218 case $host_os in
12219 freebsd[23].*) objformat=aout ;;
12220 *) objformat=elf ;;
12221 esac
12222 fi
12223 version_type=freebsd-$objformat
12224 case $version_type in
12225 freebsd-elf*)
12226 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12227 soname_spec='$libname$release$shared_ext$major'
12228 need_version=no
12229 need_lib_prefix=no
12230 ;;
12231 freebsd-*)
12232 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12233 need_version=yes
12234 ;;
12235 esac
12236 shlibpath_var=LD_LIBRARY_PATH
12237 case $host_os in
12238 freebsd2.*)
12239 shlibpath_overrides_runpath=yes
12240 ;;
12241 freebsd3.[01]* | freebsdelf3.[01]*)
12242 shlibpath_overrides_runpath=yes
12243 hardcode_into_libs=yes
12244 ;;
12245 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
12246 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
12247 shlibpath_overrides_runpath=no
12248 hardcode_into_libs=yes
12249 ;;
12250 *) # from 4.6 on, and DragonFly
12251 shlibpath_overrides_runpath=yes
12252 hardcode_into_libs=yes
12253 ;;
12254 esac
12255 ;;
12256
12257 haiku*)
12258 version_type=linux # correct to gnu/linux during the next big refactor
12259 need_lib_prefix=no
12260 need_version=no
12261 dynamic_linker="$host_os runtime_loader"
12262 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12263 soname_spec='$libname$release$shared_ext$major'
12264 shlibpath_var=LIBRARY_PATH
12265 shlibpath_overrides_runpath=no
12266 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
12267 hardcode_into_libs=yes
12268 ;;
12269
12270 hpux9* | hpux10* | hpux11*)
12271 # Give a soname corresponding to the major version so that dld.sl refuses to
12272 # link against other versions.
12273 version_type=sunos
12274 need_lib_prefix=no
12275 need_version=no
12276 case $host_cpu in
12277 ia64*)
12278 shrext_cmds='.so'
12279 hardcode_into_libs=yes
12280 dynamic_linker="$host_os dld.so"
12281 shlibpath_var=LD_LIBRARY_PATH
12282 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12283 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12284 soname_spec='$libname$release$shared_ext$major'
12285 if test 32 = "$HPUX_IA64_MODE"; then
12286 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
12287 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
12288 else
12289 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12290 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
12291 fi
12292 ;;
12293 hppa*64*)
12294 shrext_cmds='.sl'
12295 hardcode_into_libs=yes
12296 dynamic_linker="$host_os dld.sl"
12297 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
12298 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12299 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12300 soname_spec='$libname$release$shared_ext$major'
12301 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
12302 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12303 ;;
12304 *)
12305 shrext_cmds='.sl'
12306 dynamic_linker="$host_os dld.sl"
12307 shlibpath_var=SHLIB_PATH
12308 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12309 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12310 soname_spec='$libname$release$shared_ext$major'
12311 ;;
12312 esac
12313 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
12314 postinstall_cmds='chmod 555 $lib'
12315 # or fails outright, so override atomically:
12316 install_override_mode=555
12317 ;;
12318
12319 interix[3-9]*)
12320 version_type=linux # correct to gnu/linux during the next big refactor
12321 need_lib_prefix=no
12322 need_version=no
12323 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12324 soname_spec='$libname$release$shared_ext$major'
12325 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
12326 shlibpath_var=LD_LIBRARY_PATH
12327 shlibpath_overrides_runpath=no
12328 hardcode_into_libs=yes
12329 ;;
12330
12331 irix5* | irix6* | nonstopux*)
12332 case $host_os in
12333 nonstopux*) version_type=nonstopux ;;
12334 *)
12335 if test yes = "$lt_cv_prog_gnu_ld"; then
12336 version_type=linux # correct to gnu/linux during the next big refactor
12337 else
12338 version_type=irix
12339 fi ;;
12340 esac
12341 need_lib_prefix=no
12342 need_version=no
12343 soname_spec='$libname$release$shared_ext$major'
12344 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
12345 case $host_os in
12346 irix5* | nonstopux*)
12347 libsuff= shlibsuff=
12348 ;;
12349 *)
12350 case $LD in # libtool.m4 will add one of these switches to LD
12351 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
12352 libsuff= shlibsuff= libmagic=32-bit;;
12353 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
12354 libsuff=32 shlibsuff=N32 libmagic=N32;;
12355 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
12356 libsuff=64 shlibsuff=64 libmagic=64-bit;;
12357 *) libsuff= shlibsuff= libmagic=never-match;;
12358 esac
12359 ;;
12360 esac
12361 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
12362 shlibpath_overrides_runpath=no
12363 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
12364 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
12365 hardcode_into_libs=yes
12366 ;;
12367
12368 # No shared lib support for Linux oldld, aout, or coff.
12369 linux*oldld* | linux*aout* | linux*coff*)
12370 dynamic_linker=no
12371 ;;
12372
12373 linux*android*)
12374 version_type=none # Android doesn't support versioned libraries.
12375 need_lib_prefix=no
12376 need_version=no
12377 library_names_spec='$libname$release$shared_ext'
12378 soname_spec='$libname$release$shared_ext'
12379 finish_cmds=
12380 shlibpath_var=LD_LIBRARY_PATH
12381 shlibpath_overrides_runpath=yes
12382
12383 # This implies no fast_install, which is unacceptable.
12384 # Some rework will be needed to allow for fast_install
12385 # before this can be enabled.
12386 hardcode_into_libs=yes
12387
12388 dynamic_linker='Android linker'
12389 # Don't embed -rpath directories since the linker doesn't support them.
12390 hardcode_libdir_flag_spec='-L$libdir'
12391 ;;
12392
12393 # This must be glibc/ELF.
12394 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12395 version_type=linux # correct to gnu/linux during the next big refactor
12396 need_lib_prefix=no
12397 need_version=no
12398 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12399 soname_spec='$libname$release$shared_ext$major'
12400 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12401 shlibpath_var=LD_LIBRARY_PATH
12402 shlibpath_overrides_runpath=no
12403
12404 # Some binutils ld are patched to set DT_RUNPATH
12405 if test ${lt_cv_shlibpath_overrides_runpath+y}
12406 then :
12407 printf %s "(cached) " >&6
12408 else $as_nop
12409 lt_cv_shlibpath_overrides_runpath=no
12410 save_LDFLAGS=$LDFLAGS
12411 save_libdir=$libdir
12412 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
12413 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
12414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12415 /* end confdefs.h. */
12416
12417 int
12418 main (void)
12419 {
12420
12421 ;
12422 return 0;
12423 }
12424 _ACEOF
12425 if ac_fn_c_try_link "$LINENO"
12426 then :
12427 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
12428 then :
12429 lt_cv_shlibpath_overrides_runpath=yes
12430 fi
12431 fi
12432 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12433 conftest$ac_exeext conftest.$ac_ext
12434 LDFLAGS=$save_LDFLAGS
12435 libdir=$save_libdir
12436
12437 fi
12438
12439 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
12440
12441 # This implies no fast_install, which is unacceptable.
12442 # Some rework will be needed to allow for fast_install
12443 # before this can be enabled.
12444 hardcode_into_libs=yes
12445
12446 # Ideally, we could use ldconfig to report *all* directores which are
12447 # searched for libraries, however this is still not possible. Aside from not
12448 # being certain /sbin/ldconfig is available, command
12449 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
12450 # even though it is searched at run-time. Try to do the best guess by
12451 # appending ld.so.conf contents (and includes) to the search path.
12452 if test -f /etc/ld.so.conf; then
12453 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' ' '`
12454 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
12455 fi
12456
12457 # We used to test for /lib/ld.so.1 and disable shared libraries on
12458 # powerpc, because MkLinux only supported shared libraries with the
12459 # GNU dynamic linker. Since this was broken with cross compilers,
12460 # most powerpc-linux boxes support dynamic linking these days and
12461 # people can always --disable-shared, the test was removed, and we
12462 # assume the GNU/Linux dynamic linker is in use.
12463 dynamic_linker='GNU/Linux ld.so'
12464 ;;
12465
12466 netbsdelf*-gnu)
12467 version_type=linux
12468 need_lib_prefix=no
12469 need_version=no
12470 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12471 soname_spec='${libname}${release}${shared_ext}$major'
12472 shlibpath_var=LD_LIBRARY_PATH
12473 shlibpath_overrides_runpath=no
12474 hardcode_into_libs=yes
12475 dynamic_linker='NetBSD ld.elf_so'
12476 ;;
12477
12478 netbsd*)
12479 version_type=sunos
12480 need_lib_prefix=no
12481 need_version=no
12482 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12483 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12484 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12485 dynamic_linker='NetBSD (a.out) ld.so'
12486 else
12487 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12488 soname_spec='$libname$release$shared_ext$major'
12489 dynamic_linker='NetBSD ld.elf_so'
12490 fi
12491 shlibpath_var=LD_LIBRARY_PATH
12492 shlibpath_overrides_runpath=yes
12493 hardcode_into_libs=yes
12494 ;;
12495
12496 newsos6)
12497 version_type=linux # correct to gnu/linux during the next big refactor
12498 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12499 shlibpath_var=LD_LIBRARY_PATH
12500 shlibpath_overrides_runpath=yes
12501 ;;
12502
12503 *nto* | *qnx*)
12504 version_type=qnx
12505 need_lib_prefix=no
12506 need_version=no
12507 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12508 soname_spec='$libname$release$shared_ext$major'
12509 shlibpath_var=LD_LIBRARY_PATH
12510 shlibpath_overrides_runpath=no
12511 hardcode_into_libs=yes
12512 dynamic_linker='ldqnx.so'
12513 ;;
12514
12515 openbsd* | bitrig*)
12516 version_type=sunos
12517 sys_lib_dlsearch_path_spec=/usr/lib
12518 need_lib_prefix=no
12519 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12520 need_version=no
12521 else
12522 need_version=yes
12523 fi
12524 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12525 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12526 shlibpath_var=LD_LIBRARY_PATH
12527 shlibpath_overrides_runpath=yes
12528 ;;
12529
12530 os2*)
12531 libname_spec='$name'
12532 version_type=windows
12533 shrext_cmds=.dll
12534 need_version=no
12535 need_lib_prefix=no
12536 # OS/2 can only load a DLL with a base name of 8 characters or less.
12537 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
12538 v=$($ECHO $release$versuffix | tr -d .-);
12539 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
12540 $ECHO $n$v`$shared_ext'
12541 library_names_spec='${libname}_dll.$libext'
12542 dynamic_linker='OS/2 ld.exe'
12543 shlibpath_var=BEGINLIBPATH
12544 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12545 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12546 postinstall_cmds='base_file=`basename \$file`~
12547 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
12548 dldir=$destdir/`dirname \$dlpath`~
12549 test -d \$dldir || mkdir -p \$dldir~
12550 $install_prog $dir/$dlname \$dldir/$dlname~
12551 chmod a+x \$dldir/$dlname~
12552 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
12553 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
12554 fi'
12555 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
12556 dlpath=$dir/\$dldll~
12557 $RM \$dlpath'
12558 ;;
12559
12560 osf3* | osf4* | osf5*)
12561 version_type=osf
12562 need_lib_prefix=no
12563 need_version=no
12564 soname_spec='$libname$release$shared_ext$major'
12565 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12566 shlibpath_var=LD_LIBRARY_PATH
12567 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12568 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12569 ;;
12570
12571 rdos*)
12572 dynamic_linker=no
12573 ;;
12574
12575 solaris*)
12576 version_type=linux # correct to gnu/linux during the next big refactor
12577 need_lib_prefix=no
12578 need_version=no
12579 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12580 soname_spec='$libname$release$shared_ext$major'
12581 shlibpath_var=LD_LIBRARY_PATH
12582 shlibpath_overrides_runpath=yes
12583 hardcode_into_libs=yes
12584 # ldd complains unless libraries are executable
12585 postinstall_cmds='chmod +x $lib'
12586 ;;
12587
12588 sunos4*)
12589 version_type=sunos
12590 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12591 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
12592 shlibpath_var=LD_LIBRARY_PATH
12593 shlibpath_overrides_runpath=yes
12594 if test yes = "$with_gnu_ld"; then
12595 need_lib_prefix=no
12596 fi
12597 need_version=yes
12598 ;;
12599
12600 sysv4 | sysv4.3*)
12601 version_type=linux # correct to gnu/linux during the next big refactor
12602 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12603 soname_spec='$libname$release$shared_ext$major'
12604 shlibpath_var=LD_LIBRARY_PATH
12605 case $host_vendor in
12606 sni)
12607 shlibpath_overrides_runpath=no
12608 need_lib_prefix=no
12609 runpath_var=LD_RUN_PATH
12610 ;;
12611 siemens)
12612 need_lib_prefix=no
12613 ;;
12614 motorola)
12615 need_lib_prefix=no
12616 need_version=no
12617 shlibpath_overrides_runpath=no
12618 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
12619 ;;
12620 esac
12621 ;;
12622
12623 sysv4*MP*)
12624 if test -d /usr/nec; then
12625 version_type=linux # correct to gnu/linux during the next big refactor
12626 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
12627 soname_spec='$libname$shared_ext.$major'
12628 shlibpath_var=LD_LIBRARY_PATH
12629 fi
12630 ;;
12631
12632 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12633 version_type=sco
12634 need_lib_prefix=no
12635 need_version=no
12636 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
12637 soname_spec='$libname$release$shared_ext$major'
12638 shlibpath_var=LD_LIBRARY_PATH
12639 shlibpath_overrides_runpath=yes
12640 hardcode_into_libs=yes
12641 if test yes = "$with_gnu_ld"; then
12642 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
12643 else
12644 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
12645 case $host_os in
12646 sco3.2v5*)
12647 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
12648 ;;
12649 esac
12650 fi
12651 sys_lib_dlsearch_path_spec='/usr/lib'
12652 ;;
12653
12654 tpf*)
12655 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
12656 version_type=linux # correct to gnu/linux during the next big refactor
12657 need_lib_prefix=no
12658 need_version=no
12659 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12660 shlibpath_var=LD_LIBRARY_PATH
12661 shlibpath_overrides_runpath=no
12662 hardcode_into_libs=yes
12663 ;;
12664
12665 uts4*)
12666 version_type=linux # correct to gnu/linux during the next big refactor
12667 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12668 soname_spec='$libname$release$shared_ext$major'
12669 shlibpath_var=LD_LIBRARY_PATH
12670 ;;
12671
12672 *)
12673 dynamic_linker=no
12674 ;;
12675 esac
12676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
12677 printf "%s\n" "$dynamic_linker" >&6; }
12678 test no = "$dynamic_linker" && can_build_shared=no
12679
12680 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
12681 if test yes = "$GCC"; then
12682 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
12683 fi
12684
12685 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
12686 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
12687 fi
12688
12689 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
12690 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
12691 fi
12692
12693 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
12694 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
12695
12696 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
12697 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
12698
12699 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
12700 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
12799 printf %s "checking how to hardcode library paths into programs... " >&6; }
12800 hardcode_action=
12801 if test -n "$hardcode_libdir_flag_spec" ||
12802 test -n "$runpath_var" ||
12803 test yes = "$hardcode_automatic"; then
12804
12805 # We can hardcode non-existent directories.
12806 if test no != "$hardcode_direct" &&
12807 # If the only mechanism to avoid hardcoding is shlibpath_var, we
12808 # have to relink, otherwise we might link with an installed library
12809 # when we should be linking with a yet-to-be-installed one
12810 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
12811 test no != "$hardcode_minus_L"; then
12812 # Linking always hardcodes the temporary library directory.
12813 hardcode_action=relink
12814 else
12815 # We can link without hardcoding, and we can hardcode nonexisting dirs.
12816 hardcode_action=immediate
12817 fi
12818 else
12819 # We cannot hardcode anything, or else we can only hardcode existing
12820 # directories.
12821 hardcode_action=unsupported
12822 fi
12823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
12824 printf "%s\n" "$hardcode_action" >&6; }
12825
12826 if test relink = "$hardcode_action" ||
12827 test yes = "$inherit_rpath"; then
12828 # Fast installation is not supported
12829 enable_fast_install=no
12830 elif test yes = "$shlibpath_overrides_runpath" ||
12831 test no = "$enable_shared"; then
12832 # Fast installation is not necessary
12833 enable_fast_install=needless
12834 fi
12835
12836
12837
12838
12839
12840
12841 if test yes != "$enable_dlopen"; then
12842 enable_dlopen=unknown
12843 enable_dlopen_self=unknown
12844 enable_dlopen_self_static=unknown
12845 else
12846 lt_cv_dlopen=no
12847 lt_cv_dlopen_libs=
12848
12849 case $host_os in
12850 beos*)
12851 lt_cv_dlopen=load_add_on
12852 lt_cv_dlopen_libs=
12853 lt_cv_dlopen_self=yes
12854 ;;
12855
12856 mingw* | pw32* | cegcc*)
12857 lt_cv_dlopen=LoadLibrary
12858 lt_cv_dlopen_libs=
12859 ;;
12860
12861 cygwin*)
12862 lt_cv_dlopen=dlopen
12863 lt_cv_dlopen_libs=
12864 ;;
12865
12866 darwin*)
12867 # if libdl is installed we need to link against it
12868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12869 printf %s "checking for dlopen in -ldl... " >&6; }
12870 if test ${ac_cv_lib_dl_dlopen+y}
12871 then :
12872 printf %s "(cached) " >&6
12873 else $as_nop
12874 ac_check_lib_save_LIBS=$LIBS
12875 LIBS="-ldl $LIBS"
12876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12877 /* end confdefs.h. */
12878
12879 /* Override any GCC internal prototype to avoid an error.
12880 Use char because int might match the return type of a GCC
12881 builtin and then its argument prototype would still apply. */
12882 char dlopen ();
12883 int
12884 main (void)
12885 {
12886 return dlopen ();
12887 ;
12888 return 0;
12889 }
12890 _ACEOF
12891 if ac_fn_c_try_link "$LINENO"
12892 then :
12893 ac_cv_lib_dl_dlopen=yes
12894 else $as_nop
12895 ac_cv_lib_dl_dlopen=no
12896 fi
12897 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12898 conftest$ac_exeext conftest.$ac_ext
12899 LIBS=$ac_check_lib_save_LIBS
12900 fi
12901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12902 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
12903 if test "x$ac_cv_lib_dl_dlopen" = xyes
12904 then :
12905 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
12906 else $as_nop
12907
12908 lt_cv_dlopen=dyld
12909 lt_cv_dlopen_libs=
12910 lt_cv_dlopen_self=yes
12911
12912 fi
12913
12914 ;;
12915
12916 tpf*)
12917 # Don't try to run any link tests for TPF. We know it's impossible
12918 # because TPF is a cross-compiler, and we know how we open DSOs.
12919 lt_cv_dlopen=dlopen
12920 lt_cv_dlopen_libs=
12921 lt_cv_dlopen_self=no
12922 ;;
12923
12924 *)
12925 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
12926 if test "x$ac_cv_func_shl_load" = xyes
12927 then :
12928 lt_cv_dlopen=shl_load
12929 else $as_nop
12930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
12931 printf %s "checking for shl_load in -ldld... " >&6; }
12932 if test ${ac_cv_lib_dld_shl_load+y}
12933 then :
12934 printf %s "(cached) " >&6
12935 else $as_nop
12936 ac_check_lib_save_LIBS=$LIBS
12937 LIBS="-ldld $LIBS"
12938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12939 /* end confdefs.h. */
12940
12941 /* Override any GCC internal prototype to avoid an error.
12942 Use char because int might match the return type of a GCC
12943 builtin and then its argument prototype would still apply. */
12944 char shl_load ();
12945 int
12946 main (void)
12947 {
12948 return shl_load ();
12949 ;
12950 return 0;
12951 }
12952 _ACEOF
12953 if ac_fn_c_try_link "$LINENO"
12954 then :
12955 ac_cv_lib_dld_shl_load=yes
12956 else $as_nop
12957 ac_cv_lib_dld_shl_load=no
12958 fi
12959 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12960 conftest$ac_exeext conftest.$ac_ext
12961 LIBS=$ac_check_lib_save_LIBS
12962 fi
12963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
12964 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
12965 if test "x$ac_cv_lib_dld_shl_load" = xyes
12966 then :
12967 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
12968 else $as_nop
12969 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
12970 if test "x$ac_cv_func_dlopen" = xyes
12971 then :
12972 lt_cv_dlopen=dlopen
12973 else $as_nop
12974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12975 printf %s "checking for dlopen in -ldl... " >&6; }
12976 if test ${ac_cv_lib_dl_dlopen+y}
12977 then :
12978 printf %s "(cached) " >&6
12979 else $as_nop
12980 ac_check_lib_save_LIBS=$LIBS
12981 LIBS="-ldl $LIBS"
12982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983 /* end confdefs.h. */
12984
12985 /* Override any GCC internal prototype to avoid an error.
12986 Use char because int might match the return type of a GCC
12987 builtin and then its argument prototype would still apply. */
12988 char dlopen ();
12989 int
12990 main (void)
12991 {
12992 return dlopen ();
12993 ;
12994 return 0;
12995 }
12996 _ACEOF
12997 if ac_fn_c_try_link "$LINENO"
12998 then :
12999 ac_cv_lib_dl_dlopen=yes
13000 else $as_nop
13001 ac_cv_lib_dl_dlopen=no
13002 fi
13003 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13004 conftest$ac_exeext conftest.$ac_ext
13005 LIBS=$ac_check_lib_save_LIBS
13006 fi
13007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13008 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
13009 if test "x$ac_cv_lib_dl_dlopen" = xyes
13010 then :
13011 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13012 else $as_nop
13013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
13014 printf %s "checking for dlopen in -lsvld... " >&6; }
13015 if test ${ac_cv_lib_svld_dlopen+y}
13016 then :
13017 printf %s "(cached) " >&6
13018 else $as_nop
13019 ac_check_lib_save_LIBS=$LIBS
13020 LIBS="-lsvld $LIBS"
13021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13022 /* end confdefs.h. */
13023
13024 /* Override any GCC internal prototype to avoid an error.
13025 Use char because int might match the return type of a GCC
13026 builtin and then its argument prototype would still apply. */
13027 char dlopen ();
13028 int
13029 main (void)
13030 {
13031 return dlopen ();
13032 ;
13033 return 0;
13034 }
13035 _ACEOF
13036 if ac_fn_c_try_link "$LINENO"
13037 then :
13038 ac_cv_lib_svld_dlopen=yes
13039 else $as_nop
13040 ac_cv_lib_svld_dlopen=no
13041 fi
13042 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13043 conftest$ac_exeext conftest.$ac_ext
13044 LIBS=$ac_check_lib_save_LIBS
13045 fi
13046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
13047 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
13048 if test "x$ac_cv_lib_svld_dlopen" = xyes
13049 then :
13050 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
13051 else $as_nop
13052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
13053 printf %s "checking for dld_link in -ldld... " >&6; }
13054 if test ${ac_cv_lib_dld_dld_link+y}
13055 then :
13056 printf %s "(cached) " >&6
13057 else $as_nop
13058 ac_check_lib_save_LIBS=$LIBS
13059 LIBS="-ldld $LIBS"
13060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13061 /* end confdefs.h. */
13062
13063 /* Override any GCC internal prototype to avoid an error.
13064 Use char because int might match the return type of a GCC
13065 builtin and then its argument prototype would still apply. */
13066 char dld_link ();
13067 int
13068 main (void)
13069 {
13070 return dld_link ();
13071 ;
13072 return 0;
13073 }
13074 _ACEOF
13075 if ac_fn_c_try_link "$LINENO"
13076 then :
13077 ac_cv_lib_dld_dld_link=yes
13078 else $as_nop
13079 ac_cv_lib_dld_dld_link=no
13080 fi
13081 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13082 conftest$ac_exeext conftest.$ac_ext
13083 LIBS=$ac_check_lib_save_LIBS
13084 fi
13085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
13086 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
13087 if test "x$ac_cv_lib_dld_dld_link" = xyes
13088 then :
13089 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
13090 fi
13091
13092
13093 fi
13094
13095
13096 fi
13097
13098
13099 fi
13100
13101
13102 fi
13103
13104
13105 fi
13106
13107 ;;
13108 esac
13109
13110 if test no = "$lt_cv_dlopen"; then
13111 enable_dlopen=no
13112 else
13113 enable_dlopen=yes
13114 fi
13115
13116 case $lt_cv_dlopen in
13117 dlopen)
13118 save_CPPFLAGS=$CPPFLAGS
13119 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13120
13121 save_LDFLAGS=$LDFLAGS
13122 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
13123
13124 save_LIBS=$LIBS
13125 LIBS="$lt_cv_dlopen_libs $LIBS"
13126
13127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
13128 printf %s "checking whether a program can dlopen itself... " >&6; }
13129 if test ${lt_cv_dlopen_self+y}
13130 then :
13131 printf %s "(cached) " >&6
13132 else $as_nop
13133 if test yes = "$cross_compiling"; then :
13134 lt_cv_dlopen_self=cross
13135 else
13136 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13137 lt_status=$lt_dlunknown
13138 cat > conftest.$ac_ext <<_LT_EOF
13139 #line $LINENO "configure"
13140 #include "confdefs.h"
13141
13142 #if HAVE_DLFCN_H
13143 #include <dlfcn.h>
13144 #endif
13145
13146 #include <stdio.h>
13147
13148 #ifdef RTLD_GLOBAL
13149 # define LT_DLGLOBAL RTLD_GLOBAL
13150 #else
13151 # ifdef DL_GLOBAL
13152 # define LT_DLGLOBAL DL_GLOBAL
13153 # else
13154 # define LT_DLGLOBAL 0
13155 # endif
13156 #endif
13157
13158 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13159 find out it does not work in some platform. */
13160 #ifndef LT_DLLAZY_OR_NOW
13161 # ifdef RTLD_LAZY
13162 # define LT_DLLAZY_OR_NOW RTLD_LAZY
13163 # else
13164 # ifdef DL_LAZY
13165 # define LT_DLLAZY_OR_NOW DL_LAZY
13166 # else
13167 # ifdef RTLD_NOW
13168 # define LT_DLLAZY_OR_NOW RTLD_NOW
13169 # else
13170 # ifdef DL_NOW
13171 # define LT_DLLAZY_OR_NOW DL_NOW
13172 # else
13173 # define LT_DLLAZY_OR_NOW 0
13174 # endif
13175 # endif
13176 # endif
13177 # endif
13178 #endif
13179
13180 /* When -fvisibility=hidden is used, assume the code has been annotated
13181 correspondingly for the symbols needed. */
13182 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13183 int fnord () __attribute__((visibility("default")));
13184 #endif
13185
13186 int fnord () { return 42; }
13187 int main ()
13188 {
13189 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13190 int status = $lt_dlunknown;
13191
13192 if (self)
13193 {
13194 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
13195 else
13196 {
13197 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
13198 else puts (dlerror ());
13199 }
13200 /* dlclose (self); */
13201 }
13202 else
13203 puts (dlerror ());
13204
13205 return status;
13206 }
13207 _LT_EOF
13208 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13209 (eval $ac_link) 2>&5
13210 ac_status=$?
13211 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13212 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
13213 (./conftest; exit; ) >&5 2>/dev/null
13214 lt_status=$?
13215 case x$lt_status in
13216 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
13217 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
13218 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
13219 esac
13220 else :
13221 # compilation failed
13222 lt_cv_dlopen_self=no
13223 fi
13224 fi
13225 rm -fr conftest*
13226
13227
13228 fi
13229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
13230 printf "%s\n" "$lt_cv_dlopen_self" >&6; }
13231
13232 if test yes = "$lt_cv_dlopen_self"; then
13233 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
13234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
13235 printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
13236 if test ${lt_cv_dlopen_self_static+y}
13237 then :
13238 printf %s "(cached) " >&6
13239 else $as_nop
13240 if test yes = "$cross_compiling"; then :
13241 lt_cv_dlopen_self_static=cross
13242 else
13243 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13244 lt_status=$lt_dlunknown
13245 cat > conftest.$ac_ext <<_LT_EOF
13246 #line $LINENO "configure"
13247 #include "confdefs.h"
13248
13249 #if HAVE_DLFCN_H
13250 #include <dlfcn.h>
13251 #endif
13252
13253 #include <stdio.h>
13254
13255 #ifdef RTLD_GLOBAL
13256 # define LT_DLGLOBAL RTLD_GLOBAL
13257 #else
13258 # ifdef DL_GLOBAL
13259 # define LT_DLGLOBAL DL_GLOBAL
13260 # else
13261 # define LT_DLGLOBAL 0
13262 # endif
13263 #endif
13264
13265 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13266 find out it does not work in some platform. */
13267 #ifndef LT_DLLAZY_OR_NOW
13268 # ifdef RTLD_LAZY
13269 # define LT_DLLAZY_OR_NOW RTLD_LAZY
13270 # else
13271 # ifdef DL_LAZY
13272 # define LT_DLLAZY_OR_NOW DL_LAZY
13273 # else
13274 # ifdef RTLD_NOW
13275 # define LT_DLLAZY_OR_NOW RTLD_NOW
13276 # else
13277 # ifdef DL_NOW
13278 # define LT_DLLAZY_OR_NOW DL_NOW
13279 # else
13280 # define LT_DLLAZY_OR_NOW 0
13281 # endif
13282 # endif
13283 # endif
13284 # endif
13285 #endif
13286
13287 /* When -fvisibility=hidden is used, assume the code has been annotated
13288 correspondingly for the symbols needed. */
13289 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13290 int fnord () __attribute__((visibility("default")));
13291 #endif
13292
13293 int fnord () { return 42; }
13294 int main ()
13295 {
13296 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13297 int status = $lt_dlunknown;
13298
13299 if (self)
13300 {
13301 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
13302 else
13303 {
13304 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
13305 else puts (dlerror ());
13306 }
13307 /* dlclose (self); */
13308 }
13309 else
13310 puts (dlerror ());
13311
13312 return status;
13313 }
13314 _LT_EOF
13315 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13316 (eval $ac_link) 2>&5
13317 ac_status=$?
13318 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13319 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
13320 (./conftest; exit; ) >&5 2>/dev/null
13321 lt_status=$?
13322 case x$lt_status in
13323 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
13324 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
13325 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
13326 esac
13327 else :
13328 # compilation failed
13329 lt_cv_dlopen_self_static=no
13330 fi
13331 fi
13332 rm -fr conftest*
13333
13334
13335 fi
13336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
13337 printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
13338 fi
13339
13340 CPPFLAGS=$save_CPPFLAGS
13341 LDFLAGS=$save_LDFLAGS
13342 LIBS=$save_LIBS
13343 ;;
13344 esac
13345
13346 case $lt_cv_dlopen_self in
13347 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
13348 *) enable_dlopen_self=unknown ;;
13349 esac
13350
13351 case $lt_cv_dlopen_self_static in
13352 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
13353 *) enable_dlopen_self_static=unknown ;;
13354 esac
13355 fi
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373 striplib=
13374 old_striplib=
13375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
13376 printf %s "checking whether stripping libraries is possible... " >&6; }
13377 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
13378 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
13379 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
13380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13381 printf "%s\n" "yes" >&6; }
13382 else
13383 # FIXME - insert some real tests, host_os isn't really good enough
13384 case $host_os in
13385 darwin*)
13386 if test -n "$STRIP"; then
13387 striplib="$STRIP -x"
13388 old_striplib="$STRIP -S"
13389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13390 printf "%s\n" "yes" >&6; }
13391 else
13392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13393 printf "%s\n" "no" >&6; }
13394 fi
13395 ;;
13396 *)
13397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13398 printf "%s\n" "no" >&6; }
13399 ;;
13400 esac
13401 fi
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414 # Report what library types will actually be built
13415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
13416 printf %s "checking if libtool supports shared libraries... " >&6; }
13417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
13418 printf "%s\n" "$can_build_shared" >&6; }
13419
13420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
13421 printf %s "checking whether to build shared libraries... " >&6; }
13422 test no = "$can_build_shared" && enable_shared=no
13423
13424 # On AIX, shared libraries and static libraries use the same namespace, and
13425 # are all built from PIC.
13426 case $host_os in
13427 aix3*)
13428 test yes = "$enable_shared" && enable_static=no
13429 if test -n "$RANLIB"; then
13430 archive_cmds="$archive_cmds~\$RANLIB \$lib"
13431 postinstall_cmds='$RANLIB $lib'
13432 fi
13433 ;;
13434
13435 aix[4-9]*)
13436 if test ia64 != "$host_cpu"; then
13437 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
13438 yes,aix,yes) ;; # shared object as lib.so file only
13439 yes,svr4,*) ;; # shared object as lib.so archive member only
13440 yes,*) enable_static=no ;; # shared object in lib.a archive as well
13441 esac
13442 fi
13443 ;;
13444 esac
13445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
13446 printf "%s\n" "$enable_shared" >&6; }
13447
13448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
13449 printf %s "checking whether to build static libraries... " >&6; }
13450 # Make sure either enable_shared or enable_static is yes.
13451 test yes = "$enable_shared" || enable_static=yes
13452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
13453 printf "%s\n" "$enable_static" >&6; }
13454
13455
13456
13457
13458 fi
13459 ac_ext=c
13460 ac_cpp='$CPP $CPPFLAGS'
13461 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13462 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13463 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13464
13465 CC=$lt_save_CC
13466
13467 if test -n "$CXX" && ( test no != "$CXX" &&
13468 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
13469 (test g++ != "$CXX"))); then
13470 ac_ext=cpp
13471 ac_cpp='$CXXCPP $CPPFLAGS'
13472 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13473 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13474 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
13476 printf %s "checking how to run the C++ preprocessor... " >&6; }
13477 if test -z "$CXXCPP"; then
13478 if test ${ac_cv_prog_CXXCPP+y}
13479 then :
13480 printf %s "(cached) " >&6
13481 else $as_nop
13482 # Double quotes because $CXX needs to be expanded
13483 for CXXCPP in "$CXX -E" cpp /lib/cpp
13484 do
13485 ac_preproc_ok=false
13486 for ac_cxx_preproc_warn_flag in '' yes
13487 do
13488 # Use a header file that comes with gcc, so configuring glibc
13489 # with a fresh cross-compiler works.
13490 # On the NeXT, cc -E runs the code through the compiler's parser,
13491 # not just through cpp. "Syntax error" is here to catch this case.
13492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13493 /* end confdefs.h. */
13494 #include <limits.h>
13495 Syntax error
13496 _ACEOF
13497 if ac_fn_cxx_try_cpp "$LINENO"
13498 then :
13499
13500 else $as_nop
13501 # Broken: fails on valid input.
13502 continue
13503 fi
13504 rm -f conftest.err conftest.i conftest.$ac_ext
13505
13506 # OK, works on sane cases. Now check whether nonexistent headers
13507 # can be detected and how.
13508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13509 /* end confdefs.h. */
13510 #include <ac_nonexistent.h>
13511 _ACEOF
13512 if ac_fn_cxx_try_cpp "$LINENO"
13513 then :
13514 # Broken: success on invalid input.
13515 continue
13516 else $as_nop
13517 # Passes both tests.
13518 ac_preproc_ok=:
13519 break
13520 fi
13521 rm -f conftest.err conftest.i conftest.$ac_ext
13522
13523 done
13524 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13525 rm -f conftest.i conftest.err conftest.$ac_ext
13526 if $ac_preproc_ok
13527 then :
13528 break
13529 fi
13530
13531 done
13532 ac_cv_prog_CXXCPP=$CXXCPP
13533
13534 fi
13535 CXXCPP=$ac_cv_prog_CXXCPP
13536 else
13537 ac_cv_prog_CXXCPP=$CXXCPP
13538 fi
13539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
13540 printf "%s\n" "$CXXCPP" >&6; }
13541 ac_preproc_ok=false
13542 for ac_cxx_preproc_warn_flag in '' yes
13543 do
13544 # Use a header file that comes with gcc, so configuring glibc
13545 # with a fresh cross-compiler works.
13546 # On the NeXT, cc -E runs the code through the compiler's parser,
13547 # not just through cpp. "Syntax error" is here to catch this case.
13548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13549 /* end confdefs.h. */
13550 #include <limits.h>
13551 Syntax error
13552 _ACEOF
13553 if ac_fn_cxx_try_cpp "$LINENO"
13554 then :
13555
13556 else $as_nop
13557 # Broken: fails on valid input.
13558 continue
13559 fi
13560 rm -f conftest.err conftest.i conftest.$ac_ext
13561
13562 # OK, works on sane cases. Now check whether nonexistent headers
13563 # can be detected and how.
13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13565 /* end confdefs.h. */
13566 #include <ac_nonexistent.h>
13567 _ACEOF
13568 if ac_fn_cxx_try_cpp "$LINENO"
13569 then :
13570 # Broken: success on invalid input.
13571 continue
13572 else $as_nop
13573 # Passes both tests.
13574 ac_preproc_ok=:
13575 break
13576 fi
13577 rm -f conftest.err conftest.i conftest.$ac_ext
13578
13579 done
13580 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13581 rm -f conftest.i conftest.err conftest.$ac_ext
13582 if $ac_preproc_ok
13583 then :
13584
13585 else $as_nop
13586 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13587 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13588 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
13589 See \`config.log' for more details" "$LINENO" 5; }
13590 fi
13591
13592 ac_ext=c
13593 ac_cpp='$CPP $CPPFLAGS'
13594 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13595 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13596 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13597
13598 else
13599 _lt_caught_CXX_error=yes
13600 fi
13601
13602 ac_ext=cpp
13603 ac_cpp='$CXXCPP $CPPFLAGS'
13604 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13605 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13606 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13607
13608 archive_cmds_need_lc_CXX=no
13609 allow_undefined_flag_CXX=
13610 always_export_symbols_CXX=no
13611 archive_expsym_cmds_CXX=
13612 compiler_needs_object_CXX=no
13613 export_dynamic_flag_spec_CXX=
13614 hardcode_direct_CXX=no
13615 hardcode_direct_absolute_CXX=no
13616 hardcode_libdir_flag_spec_CXX=
13617 hardcode_libdir_separator_CXX=
13618 hardcode_minus_L_CXX=no
13619 hardcode_shlibpath_var_CXX=unsupported
13620 hardcode_automatic_CXX=no
13621 inherit_rpath_CXX=no
13622 module_cmds_CXX=
13623 module_expsym_cmds_CXX=
13624 link_all_deplibs_CXX=unknown
13625 old_archive_cmds_CXX=$old_archive_cmds
13626 reload_flag_CXX=$reload_flag
13627 reload_cmds_CXX=$reload_cmds
13628 no_undefined_flag_CXX=
13629 whole_archive_flag_spec_CXX=
13630 enable_shared_with_static_runtimes_CXX=no
13631
13632 # Source file extension for C++ test sources.
13633 ac_ext=cpp
13634
13635 # Object file extension for compiled C++ test sources.
13636 objext=o
13637 objext_CXX=$objext
13638
13639 # No sense in running all these tests if we already determined that
13640 # the CXX compiler isn't working. Some variables (like enable_shared)
13641 # are currently assumed to apply to all compilers on this platform,
13642 # and will be corrupted by setting them based on a non-working compiler.
13643 if test yes != "$_lt_caught_CXX_error"; then
13644 # Code to be used in simple compile tests
13645 lt_simple_compile_test_code="int some_variable = 0;"
13646
13647 # Code to be used in simple link tests
13648 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
13649
13650 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
13651
13652
13653
13654
13655
13656
13657 # If no C compiler was specified, use CC.
13658 LTCC=${LTCC-"$CC"}
13659
13660 # If no C compiler flags were specified, use CFLAGS.
13661 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
13662
13663 # Allow CC to be a program name with arguments.
13664 compiler=$CC
13665
13666
13667 # save warnings/boilerplate of simple test code
13668 ac_outfile=conftest.$ac_objext
13669 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
13670 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13671 _lt_compiler_boilerplate=`cat conftest.err`
13672 $RM conftest*
13673
13674 ac_outfile=conftest.$ac_objext
13675 echo "$lt_simple_link_test_code" >conftest.$ac_ext
13676 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13677 _lt_linker_boilerplate=`cat conftest.err`
13678 $RM -r conftest*
13679
13680
13681 # Allow CC to be a program name with arguments.
13682 lt_save_CC=$CC
13683 lt_save_CFLAGS=$CFLAGS
13684 lt_save_LD=$LD
13685 lt_save_GCC=$GCC
13686 GCC=$GXX
13687 lt_save_with_gnu_ld=$with_gnu_ld
13688 lt_save_path_LD=$lt_cv_path_LD
13689 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
13690 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
13691 else
13692 $as_unset lt_cv_prog_gnu_ld
13693 fi
13694 if test -n "${lt_cv_path_LDCXX+set}"; then
13695 lt_cv_path_LD=$lt_cv_path_LDCXX
13696 else
13697 $as_unset lt_cv_path_LD
13698 fi
13699 test -z "${LDCXX+set}" || LD=$LDCXX
13700 CC=${CXX-"c++"}
13701 CFLAGS=$CXXFLAGS
13702 compiler=$CC
13703 compiler_CXX=$CC
13704 func_cc_basename $compiler
13705 cc_basename=$func_cc_basename_result
13706
13707
13708 if test -n "$compiler"; then
13709 # We don't want -fno-exception when compiling C++ code, so set the
13710 # no_builtin_flag separately
13711 if test yes = "$GXX"; then
13712 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
13713 else
13714 lt_prog_compiler_no_builtin_flag_CXX=
13715 fi
13716
13717 if test yes = "$GXX"; then
13718 # Set up default GNU C++ configuration
13719
13720
13721
13722 # Check whether --with-gnu-ld was given.
13723 if test ${with_gnu_ld+y}
13724 then :
13725 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
13726 else $as_nop
13727 with_gnu_ld=no
13728 fi
13729
13730 ac_prog=ld
13731 if test yes = "$GCC"; then
13732 # Check if gcc -print-prog-name=ld gives a path.
13733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13734 printf %s "checking for ld used by $CC... " >&6; }
13735 case $host in
13736 *-*-mingw*)
13737 # gcc leaves a trailing carriage return, which upsets mingw
13738 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13739 *)
13740 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13741 esac
13742 case $ac_prog in
13743 # Accept absolute paths.
13744 [\\/]* | ?:[\\/]*)
13745 re_direlt='/[^/][^/]*/\.\./'
13746 # Canonicalize the pathname of ld
13747 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
13748 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
13749 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
13750 done
13751 test -z "$LD" && LD=$ac_prog
13752 ;;
13753 "")
13754 # If it fails, then pretend we aren't using GCC.
13755 ac_prog=ld
13756 ;;
13757 *)
13758 # If it is relative, then search for the first ld in PATH.
13759 with_gnu_ld=unknown
13760 ;;
13761 esac
13762 elif test yes = "$with_gnu_ld"; then
13763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13764 printf %s "checking for GNU ld... " >&6; }
13765 else
13766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13767 printf %s "checking for non-GNU ld... " >&6; }
13768 fi
13769 if test ${lt_cv_path_LD+y}
13770 then :
13771 printf %s "(cached) " >&6
13772 else $as_nop
13773 if test -z "$LD"; then
13774 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
13775 for ac_dir in $PATH; do
13776 IFS=$lt_save_ifs
13777 test -z "$ac_dir" && ac_dir=.
13778 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13779 lt_cv_path_LD=$ac_dir/$ac_prog
13780 # Check to see if the program is GNU ld. I'd rather use --version,
13781 # but apparently some variants of GNU ld only accept -v.
13782 # Break only if it was the GNU/non-GNU ld that we prefer.
13783 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
13784 *GNU* | *'with BFD'*)
13785 test no != "$with_gnu_ld" && break
13786 ;;
13787 *)
13788 test yes != "$with_gnu_ld" && break
13789 ;;
13790 esac
13791 fi
13792 done
13793 IFS=$lt_save_ifs
13794 else
13795 lt_cv_path_LD=$LD # Let the user override the test with a path.
13796 fi
13797 fi
13798
13799 LD=$lt_cv_path_LD
13800 if test -n "$LD"; then
13801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13802 printf "%s\n" "$LD" >&6; }
13803 else
13804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13805 printf "%s\n" "no" >&6; }
13806 fi
13807 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13809 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
13810 if test ${lt_cv_prog_gnu_ld+y}
13811 then :
13812 printf %s "(cached) " >&6
13813 else $as_nop
13814 # I'd rather use --version here, but apparently some GNU lds only accept -v.
13815 case `$LD -v 2>&1 </dev/null` in
13816 *GNU* | *'with BFD'*)
13817 lt_cv_prog_gnu_ld=yes
13818 ;;
13819 *)
13820 lt_cv_prog_gnu_ld=no
13821 ;;
13822 esac
13823 fi
13824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
13825 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
13826 with_gnu_ld=$lt_cv_prog_gnu_ld
13827
13828
13829
13830
13831
13832
13833
13834 # Check if GNU C++ uses GNU ld as the underlying linker, since the
13835 # archiving commands below assume that GNU ld is being used.
13836 if test yes = "$with_gnu_ld"; then
13837 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13838 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'
13839
13840 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
13841 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
13842
13843 # If archive_cmds runs LD, not CC, wlarc should be empty
13844 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
13845 # investigate it a little bit more. (MM)
13846 wlarc='$wl'
13847
13848 # ancient GNU ld didn't support --whole-archive et. al.
13849 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
13850 $GREP 'no-whole-archive' > /dev/null; then
13851 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
13852 else
13853 whole_archive_flag_spec_CXX=
13854 fi
13855 else
13856 with_gnu_ld=no
13857 wlarc=
13858
13859 # A generic and very simple default shared library creation
13860 # command for GNU C++ for the case where it uses the native
13861 # linker, instead of GNU ld. If possible, this setting should
13862 # overridden to take advantage of the native linker features on
13863 # the platform it is being used on.
13864 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
13865 fi
13866
13867 # Commands to make compiler produce verbose output that lists
13868 # what "hidden" libraries, object files and flags are used when
13869 # linking a shared library.
13870 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
13871
13872 else
13873 GXX=no
13874 with_gnu_ld=no
13875 wlarc=
13876 fi
13877
13878 # PORTME: fill in a description of your system's C++ link characteristics
13879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
13880 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
13881 ld_shlibs_CXX=yes
13882 case $host_os in
13883 aix3*)
13884 # FIXME: insert proper C++ library support
13885 ld_shlibs_CXX=no
13886 ;;
13887 aix[4-9]*)
13888 if test ia64 = "$host_cpu"; then
13889 # On IA64, the linker does run time linking by default, so we don't
13890 # have to do anything special.
13891 aix_use_runtimelinking=no
13892 exp_sym_flag='-Bexport'
13893 no_entry_flag=
13894 else
13895 aix_use_runtimelinking=no
13896
13897 # Test if we are trying to use run time linking or normal
13898 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
13899 # have runtime linking enabled, and use it for executables.
13900 # For shared libraries, we enable/disable runtime linking
13901 # depending on the kind of the shared library created -
13902 # when "with_aix_soname,aix_use_runtimelinking" is:
13903 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
13904 # "aix,yes" lib.so shared, rtl:yes, for executables
13905 # lib.a static archive
13906 # "both,no" lib.so.V(shr.o) shared, rtl:yes
13907 # lib.a(lib.so.V) shared, rtl:no, for executables
13908 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
13909 # lib.a(lib.so.V) shared, rtl:no
13910 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
13911 # lib.a static archive
13912 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
13913 for ld_flag in $LDFLAGS; do
13914 case $ld_flag in
13915 *-brtl*)
13916 aix_use_runtimelinking=yes
13917 break
13918 ;;
13919 esac
13920 done
13921 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13922 # With aix-soname=svr4, we create the lib.so.V shared archives only,
13923 # so we don't have lib.a shared libs to link our executables.
13924 # We have to force runtime linking in this case.
13925 aix_use_runtimelinking=yes
13926 LDFLAGS="$LDFLAGS -Wl,-brtl"
13927 fi
13928 ;;
13929 esac
13930
13931 exp_sym_flag='-bexport'
13932 no_entry_flag='-bnoentry'
13933 fi
13934
13935 # When large executables or shared objects are built, AIX ld can
13936 # have problems creating the table of contents. If linking a library
13937 # or program results in "error TOC overflow" add -mminimal-toc to
13938 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
13939 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13940
13941 archive_cmds_CXX=''
13942 hardcode_direct_CXX=yes
13943 hardcode_direct_absolute_CXX=yes
13944 hardcode_libdir_separator_CXX=':'
13945 link_all_deplibs_CXX=yes
13946 file_list_spec_CXX='$wl-f,'
13947 case $with_aix_soname,$aix_use_runtimelinking in
13948 aix,*) ;; # no import file
13949 svr4,* | *,yes) # use import file
13950 # The Import File defines what to hardcode.
13951 hardcode_direct_CXX=no
13952 hardcode_direct_absolute_CXX=no
13953 ;;
13954 esac
13955
13956 if test yes = "$GXX"; then
13957 case $host_os in aix4.[012]|aix4.[012].*)
13958 # We only want to do this on AIX 4.2 and lower, the check
13959 # below for broken collect2 doesn't work under 4.3+
13960 collect2name=`$CC -print-prog-name=collect2`
13961 if test -f "$collect2name" &&
13962 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13963 then
13964 # We have reworked collect2
13965 :
13966 else
13967 # We have old collect2
13968 hardcode_direct_CXX=unsupported
13969 # It fails to find uninstalled libraries when the uninstalled
13970 # path is not listed in the libpath. Setting hardcode_minus_L
13971 # to unsupported forces relinking
13972 hardcode_minus_L_CXX=yes
13973 hardcode_libdir_flag_spec_CXX='-L$libdir'
13974 hardcode_libdir_separator_CXX=
13975 fi
13976 esac
13977 shared_flag='-shared'
13978 if test yes = "$aix_use_runtimelinking"; then
13979 shared_flag=$shared_flag' $wl-G'
13980 fi
13981 # Need to ensure runtime linking is disabled for the traditional
13982 # shared library, or the linker may eventually find shared libraries
13983 # /with/ Import File - we do not want to mix them.
13984 shared_flag_aix='-shared'
13985 shared_flag_svr4='-shared $wl-G'
13986 else
13987 # not using gcc
13988 if test ia64 = "$host_cpu"; then
13989 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13990 # chokes on -Wl,-G. The following line is correct:
13991 shared_flag='-G'
13992 else
13993 if test yes = "$aix_use_runtimelinking"; then
13994 shared_flag='$wl-G'
13995 else
13996 shared_flag='$wl-bM:SRE'
13997 fi
13998 shared_flag_aix='$wl-bM:SRE'
13999 shared_flag_svr4='$wl-G'
14000 fi
14001 fi
14002
14003 export_dynamic_flag_spec_CXX='$wl-bexpall'
14004 # It seems that -bexpall does not export symbols beginning with
14005 # underscore (_), so it is better to generate a list of symbols to
14006 # export.
14007 always_export_symbols_CXX=yes
14008 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
14009 # Warning - without using the other runtime loading flags (-brtl),
14010 # -berok will link without error, but may produce a broken library.
14011 # The "-G" linker flag allows undefined symbols.
14012 no_undefined_flag_CXX='-bernotok'
14013 # Determine the default libpath from the value encoded in an empty
14014 # executable.
14015 if test set = "${lt_cv_aix_libpath+set}"; then
14016 aix_libpath=$lt_cv_aix_libpath
14017 else
14018 if test ${lt_cv_aix_libpath__CXX+y}
14019 then :
14020 printf %s "(cached) " >&6
14021 else $as_nop
14022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023 /* end confdefs.h. */
14024
14025 int
14026 main (void)
14027 {
14028
14029 ;
14030 return 0;
14031 }
14032 _ACEOF
14033 if ac_fn_cxx_try_link "$LINENO"
14034 then :
14035
14036 lt_aix_libpath_sed='
14037 /Import File Strings/,/^$/ {
14038 /^0/ {
14039 s/^0 *\([^ ]*\) *$/\1/
14040 p
14041 }
14042 }'
14043 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14044 # Check for a 64-bit object if we didn't find anything.
14045 if test -z "$lt_cv_aix_libpath__CXX"; then
14046 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14047 fi
14048 fi
14049 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14050 conftest$ac_exeext conftest.$ac_ext
14051 if test -z "$lt_cv_aix_libpath__CXX"; then
14052 lt_cv_aix_libpath__CXX=/usr/lib:/lib
14053 fi
14054
14055 fi
14056
14057 aix_libpath=$lt_cv_aix_libpath__CXX
14058 fi
14059
14060 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
14061
14062 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
14063 else
14064 if test ia64 = "$host_cpu"; then
14065 hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
14066 allow_undefined_flag_CXX="-z nodefs"
14067 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"
14068 else
14069 # Determine the default libpath from the value encoded in an
14070 # empty executable.
14071 if test set = "${lt_cv_aix_libpath+set}"; then
14072 aix_libpath=$lt_cv_aix_libpath
14073 else
14074 if test ${lt_cv_aix_libpath__CXX+y}
14075 then :
14076 printf %s "(cached) " >&6
14077 else $as_nop
14078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14079 /* end confdefs.h. */
14080
14081 int
14082 main (void)
14083 {
14084
14085 ;
14086 return 0;
14087 }
14088 _ACEOF
14089 if ac_fn_cxx_try_link "$LINENO"
14090 then :
14091
14092 lt_aix_libpath_sed='
14093 /Import File Strings/,/^$/ {
14094 /^0/ {
14095 s/^0 *\([^ ]*\) *$/\1/
14096 p
14097 }
14098 }'
14099 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14100 # Check for a 64-bit object if we didn't find anything.
14101 if test -z "$lt_cv_aix_libpath__CXX"; then
14102 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14103 fi
14104 fi
14105 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14106 conftest$ac_exeext conftest.$ac_ext
14107 if test -z "$lt_cv_aix_libpath__CXX"; then
14108 lt_cv_aix_libpath__CXX=/usr/lib:/lib
14109 fi
14110
14111 fi
14112
14113 aix_libpath=$lt_cv_aix_libpath__CXX
14114 fi
14115
14116 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
14117 # Warning - without using the other run time loading flags,
14118 # -berok will link without error, but may produce a broken library.
14119 no_undefined_flag_CXX=' $wl-bernotok'
14120 allow_undefined_flag_CXX=' $wl-berok'
14121 if test yes = "$with_gnu_ld"; then
14122 # We only use this code for GNU lds that support --whole-archive.
14123 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
14124 else
14125 # Exported symbols can be pulled into shared objects from archives
14126 whole_archive_flag_spec_CXX='$convenience'
14127 fi
14128 archive_cmds_need_lc_CXX=yes
14129 archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
14130 # -brtl affects multiple linker settings, -berok does not and is overridden later
14131 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
14132 if test svr4 != "$with_aix_soname"; then
14133 # This is similar to how AIX traditionally builds its shared
14134 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
14135 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'
14136 fi
14137 if test aix != "$with_aix_soname"; then
14138 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'
14139 else
14140 # used by -dlpreopen to get the symbols
14141 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
14142 fi
14143 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
14144 fi
14145 fi
14146 ;;
14147
14148 beos*)
14149 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14150 allow_undefined_flag_CXX=unsupported
14151 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
14152 # support --undefined. This deserves some investigation. FIXME
14153 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14154 else
14155 ld_shlibs_CXX=no
14156 fi
14157 ;;
14158
14159 chorus*)
14160 case $cc_basename in
14161 *)
14162 # FIXME: insert proper C++ library support
14163 ld_shlibs_CXX=no
14164 ;;
14165 esac
14166 ;;
14167
14168 cygwin* | mingw* | pw32* | cegcc*)
14169 case $GXX,$cc_basename in
14170 ,cl* | no,cl*)
14171 # Native MSVC
14172 # hardcode_libdir_flag_spec is actually meaningless, as there is
14173 # no search path for DLLs.
14174 hardcode_libdir_flag_spec_CXX=' '
14175 allow_undefined_flag_CXX=unsupported
14176 always_export_symbols_CXX=yes
14177 file_list_spec_CXX='@'
14178 # Tell ltmain to make .lib files, not .a files.
14179 libext=lib
14180 # Tell ltmain to make .dll files, not .so files.
14181 shrext_cmds=.dll
14182 # FIXME: Setting linknames here is a bad hack.
14183 archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
14184 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
14185 cp "$export_symbols" "$output_objdir/$soname.def";
14186 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
14187 else
14188 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
14189 fi~
14190 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
14191 linknames='
14192 # The linker will not automatically build a static lib if we build a DLL.
14193 # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
14194 enable_shared_with_static_runtimes_CXX=yes
14195 # Don't use ranlib
14196 old_postinstall_cmds_CXX='chmod 644 $oldlib'
14197 postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
14198 lt_tool_outputfile="@TOOL_OUTPUT@"~
14199 case $lt_outputfile in
14200 *.exe|*.EXE) ;;
14201 *)
14202 lt_outputfile=$lt_outputfile.exe
14203 lt_tool_outputfile=$lt_tool_outputfile.exe
14204 ;;
14205 esac~
14206 func_to_tool_file "$lt_outputfile"~
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 # g++
14214 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
14215 # as there is no search path for DLLs.
14216 hardcode_libdir_flag_spec_CXX='-L$libdir'
14217 export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
14218 allow_undefined_flag_CXX=unsupported
14219 always_export_symbols_CXX=no
14220 enable_shared_with_static_runtimes_CXX=yes
14221
14222 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
14223 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'
14224 # If the export-symbols file already is a .def file, use it as
14225 # is; otherwise, prepend EXPORTS...
14226 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
14227 cp $export_symbols $output_objdir/$soname.def;
14228 else
14229 echo EXPORTS > $output_objdir/$soname.def;
14230 cat $export_symbols >> $output_objdir/$soname.def;
14231 fi~
14232 $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'
14233 else
14234 ld_shlibs_CXX=no
14235 fi
14236 ;;
14237 esac
14238 ;;
14239 darwin* | rhapsody*)
14240
14241
14242 archive_cmds_need_lc_CXX=no
14243 hardcode_direct_CXX=no
14244 hardcode_automatic_CXX=yes
14245 hardcode_shlibpath_var_CXX=unsupported
14246 if test yes = "$lt_cv_ld_force_load"; then
14247 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\"`'
14248
14249 else
14250 whole_archive_flag_spec_CXX=''
14251 fi
14252 link_all_deplibs_CXX=yes
14253 allow_undefined_flag_CXX=$_lt_dar_allow_undefined
14254 case $cc_basename in
14255 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
14256 *) _lt_dar_can_shared=$GCC ;;
14257 esac
14258 if test yes = "$_lt_dar_can_shared"; then
14259 output_verbose_link_cmd=func_echo_all
14260 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"
14261 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
14262 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"
14263 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"
14264 if test yes != "$lt_cv_apple_cc_single_mod"; then
14265 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"
14266 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"
14267 fi
14268
14269 else
14270 ld_shlibs_CXX=no
14271 fi
14272
14273 ;;
14274
14275 os2*)
14276 hardcode_libdir_flag_spec_CXX='-L$libdir'
14277 hardcode_minus_L_CXX=yes
14278 allow_undefined_flag_CXX=unsupported
14279 shrext_cmds=.dll
14280 archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14281 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14282 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14283 $ECHO EXPORTS >> $output_objdir/$libname.def~
14284 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
14285 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14286 emximp -o $lib $output_objdir/$libname.def'
14287 archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14288 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14289 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14290 $ECHO EXPORTS >> $output_objdir/$libname.def~
14291 prefix_cmds="$SED"~
14292 if test EXPORTS = "`$SED 1q $export_symbols`"; then
14293 prefix_cmds="$prefix_cmds -e 1d";
14294 fi~
14295 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
14296 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
14297 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14298 emximp -o $lib $output_objdir/$libname.def'
14299 old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
14300 enable_shared_with_static_runtimes_CXX=yes
14301 ;;
14302
14303 dgux*)
14304 case $cc_basename in
14305 ec++*)
14306 # FIXME: insert proper C++ library support
14307 ld_shlibs_CXX=no
14308 ;;
14309 ghcx*)
14310 # Green Hills C++ Compiler
14311 # FIXME: insert proper C++ library support
14312 ld_shlibs_CXX=no
14313 ;;
14314 *)
14315 # FIXME: insert proper C++ library support
14316 ld_shlibs_CXX=no
14317 ;;
14318 esac
14319 ;;
14320
14321 freebsd2.*)
14322 # C++ shared libraries reported to be fairly broken before
14323 # switch to ELF
14324 ld_shlibs_CXX=no
14325 ;;
14326
14327 freebsd-elf*)
14328 archive_cmds_need_lc_CXX=no
14329 ;;
14330
14331 freebsd* | dragonfly*)
14332 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
14333 # conventions
14334 ld_shlibs_CXX=yes
14335 ;;
14336
14337 haiku*)
14338 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14339 link_all_deplibs_CXX=yes
14340 ;;
14341
14342 hpux9*)
14343 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
14344 hardcode_libdir_separator_CXX=:
14345 export_dynamic_flag_spec_CXX='$wl-E'
14346 hardcode_direct_CXX=yes
14347 hardcode_minus_L_CXX=yes # Not in the search PATH,
14348 # but as the default
14349 # location of the library.
14350
14351 case $cc_basename in
14352 CC*)
14353 # FIXME: insert proper C++ library support
14354 ld_shlibs_CXX=no
14355 ;;
14356 aCC*)
14357 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'
14358 # Commands to make compiler produce verbose output that lists
14359 # what "hidden" libraries, object files and flags are used when
14360 # linking a shared library.
14361 #
14362 # There doesn't appear to be a way to prevent this compiler from
14363 # explicitly linking system object files so we need to strip them
14364 # from the output so that they don't get included in the library
14365 # dependencies.
14366 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"'
14367 ;;
14368 *)
14369 if test yes = "$GXX"; then
14370 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'
14371 else
14372 # FIXME: insert proper C++ library support
14373 ld_shlibs_CXX=no
14374 fi
14375 ;;
14376 esac
14377 ;;
14378
14379 hpux10*|hpux11*)
14380 if test no = "$with_gnu_ld"; then
14381 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
14382 hardcode_libdir_separator_CXX=:
14383
14384 case $host_cpu in
14385 hppa*64*|ia64*)
14386 ;;
14387 *)
14388 export_dynamic_flag_spec_CXX='$wl-E'
14389 ;;
14390 esac
14391 fi
14392 case $host_cpu in
14393 hppa*64*|ia64*)
14394 hardcode_direct_CXX=no
14395 hardcode_shlibpath_var_CXX=no
14396 ;;
14397 *)
14398 hardcode_direct_CXX=yes
14399 hardcode_direct_absolute_CXX=yes
14400 hardcode_minus_L_CXX=yes # Not in the search PATH,
14401 # but as the default
14402 # location of the library.
14403 ;;
14404 esac
14405
14406 case $cc_basename in
14407 CC*)
14408 # FIXME: insert proper C++ library support
14409 ld_shlibs_CXX=no
14410 ;;
14411 aCC*)
14412 case $host_cpu in
14413 hppa*64*)
14414 archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14415 ;;
14416 ia64*)
14417 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14418 ;;
14419 *)
14420 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14421 ;;
14422 esac
14423 # Commands to make compiler produce verbose output that lists
14424 # what "hidden" libraries, object files and flags are used when
14425 # linking a shared library.
14426 #
14427 # There doesn't appear to be a way to prevent this compiler from
14428 # explicitly linking system object files so we need to strip them
14429 # from the output so that they don't get included in the library
14430 # dependencies.
14431 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"'
14432 ;;
14433 *)
14434 if test yes = "$GXX"; then
14435 if test no = "$with_gnu_ld"; then
14436 case $host_cpu in
14437 hppa*64*)
14438 archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14439 ;;
14440 ia64*)
14441 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14442 ;;
14443 *)
14444 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'
14445 ;;
14446 esac
14447 fi
14448 else
14449 # FIXME: insert proper C++ library support
14450 ld_shlibs_CXX=no
14451 fi
14452 ;;
14453 esac
14454 ;;
14455
14456 interix[3-9]*)
14457 hardcode_direct_CXX=no
14458 hardcode_shlibpath_var_CXX=no
14459 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14460 export_dynamic_flag_spec_CXX='$wl-E'
14461 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14462 # Instead, shared libraries are loaded at an image base (0x10000000 by
14463 # default) and relocated if they conflict, which is a slow very memory
14464 # consuming and fragmenting process. To avoid this, we pick a random,
14465 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14466 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
14467 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'
14468 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'
14469 ;;
14470 irix5* | irix6*)
14471 case $cc_basename in
14472 CC*)
14473 # SGI C++
14474 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'
14475
14476 # Archives containing C++ object files must be created using
14477 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
14478 # necessary to make sure instantiated templates are included
14479 # in the archive.
14480 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
14481 ;;
14482 *)
14483 if test yes = "$GXX"; then
14484 if test no = "$with_gnu_ld"; then
14485 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'
14486 else
14487 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'
14488 fi
14489 fi
14490 link_all_deplibs_CXX=yes
14491 ;;
14492 esac
14493 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14494 hardcode_libdir_separator_CXX=:
14495 inherit_rpath_CXX=yes
14496 ;;
14497
14498 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14499 case $cc_basename in
14500 KCC*)
14501 # Kuck and Associates, Inc. (KAI) C++ Compiler
14502
14503 # KCC will only create a shared library if the output file
14504 # ends with ".so" (or ".sl" for HP-UX), so rename the library
14505 # to its proper name (with version) after linking.
14506 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'
14507 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'
14508 # Commands to make compiler produce verbose output that lists
14509 # what "hidden" libraries, object files and flags are used when
14510 # linking a shared library.
14511 #
14512 # There doesn't appear to be a way to prevent this compiler from
14513 # explicitly linking system object files so we need to strip them
14514 # from the output so that they don't get included in the library
14515 # dependencies.
14516 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"'
14517
14518 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14519 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
14520
14521 # Archives containing C++ object files must be created using
14522 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
14523 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
14524 ;;
14525 icpc* | ecpc* )
14526 # Intel C++
14527 with_gnu_ld=yes
14528 # version 8.0 and above of icpc choke on multiply defined symbols
14529 # if we add $predep_objects and $postdep_objects, however 7.1 and
14530 # earlier do not add the objects themselves.
14531 case `$CC -V 2>&1` in
14532 *"Version 7."*)
14533 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
14534 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'
14535 ;;
14536 *) # Version 8.0 or newer
14537 tmp_idyn=
14538 case $host_cpu in
14539 ia64*) tmp_idyn=' -i_dynamic';;
14540 esac
14541 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14542 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'
14543 ;;
14544 esac
14545 archive_cmds_need_lc_CXX=no
14546 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14547 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
14548 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
14549 ;;
14550 pgCC* | pgcpp*)
14551 # Portland Group C++ compiler
14552 case `$CC -V` in
14553 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
14554 prelink_cmds_CXX='tpldir=Template.dir~
14555 rm -rf $tpldir~
14556 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
14557 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
14558 old_archive_cmds_CXX='tpldir=Template.dir~
14559 rm -rf $tpldir~
14560 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
14561 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
14562 $RANLIB $oldlib'
14563 archive_cmds_CXX='tpldir=Template.dir~
14564 rm -rf $tpldir~
14565 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
14566 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
14567 archive_expsym_cmds_CXX='tpldir=Template.dir~
14568 rm -rf $tpldir~
14569 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
14570 $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'
14571 ;;
14572 *) # Version 6 and above use weak symbols
14573 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
14574 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'
14575 ;;
14576 esac
14577
14578 hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
14579 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
14580 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'
14581 ;;
14582 cxx*)
14583 # Compaq C++
14584 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
14585 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'
14586
14587 runpath_var=LD_RUN_PATH
14588 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
14589 hardcode_libdir_separator_CXX=:
14590
14591 # Commands to make compiler produce verbose output that lists
14592 # what "hidden" libraries, object files and flags are used when
14593 # linking a shared library.
14594 #
14595 # There doesn't appear to be a way to prevent this compiler from
14596 # explicitly linking system object files so we need to strip them
14597 # from the output so that they don't get included in the library
14598 # dependencies.
14599 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'
14600 ;;
14601 xl* | mpixl* | bgxl*)
14602 # IBM XL 8.0 on PPC, with GNU ld
14603 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14604 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
14605 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14606 if test yes = "$supports_anon_versioning"; then
14607 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
14608 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14609 echo "local: *; };" >> $output_objdir/$libname.ver~
14610 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
14611 fi
14612 ;;
14613 *)
14614 case `$CC -V 2>&1 | sed 5q` in
14615 *Sun\ C*)
14616 # Sun C++ 5.9
14617 no_undefined_flag_CXX=' -zdefs'
14618 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14619 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'
14620 hardcode_libdir_flag_spec_CXX='-R$libdir'
14621 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'
14622 compiler_needs_object_CXX=yes
14623
14624 # Not sure whether something based on
14625 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
14626 # would be better.
14627 output_verbose_link_cmd='func_echo_all'
14628
14629 # Archives containing C++ object files must be created using
14630 # "CC -xar", where "CC" is the Sun C++ compiler. This is
14631 # necessary to make sure instantiated templates are included
14632 # in the archive.
14633 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
14634 ;;
14635 esac
14636 ;;
14637 esac
14638 ;;
14639
14640 lynxos*)
14641 # FIXME: insert proper C++ library support
14642 ld_shlibs_CXX=no
14643 ;;
14644
14645 m88k*)
14646 # FIXME: insert proper C++ library support
14647 ld_shlibs_CXX=no
14648 ;;
14649
14650 mvs*)
14651 case $cc_basename in
14652 cxx*)
14653 # FIXME: insert proper C++ library support
14654 ld_shlibs_CXX=no
14655 ;;
14656 *)
14657 # FIXME: insert proper C++ library support
14658 ld_shlibs_CXX=no
14659 ;;
14660 esac
14661 ;;
14662
14663 netbsd*)
14664 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14665 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
14666 wlarc=
14667 hardcode_libdir_flag_spec_CXX='-R$libdir'
14668 hardcode_direct_CXX=yes
14669 hardcode_shlibpath_var_CXX=no
14670 fi
14671 # Workaround some broken pre-1.5 toolchains
14672 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
14673 ;;
14674
14675 *nto* | *qnx*)
14676 ld_shlibs_CXX=yes
14677 ;;
14678
14679 openbsd* | bitrig*)
14680 if test -f /usr/libexec/ld.so; then
14681 hardcode_direct_CXX=yes
14682 hardcode_shlibpath_var_CXX=no
14683 hardcode_direct_absolute_CXX=yes
14684 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
14685 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14686 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
14687 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
14688 export_dynamic_flag_spec_CXX='$wl-E'
14689 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
14690 fi
14691 output_verbose_link_cmd=func_echo_all
14692 else
14693 ld_shlibs_CXX=no
14694 fi
14695 ;;
14696
14697 osf3* | osf4* | osf5*)
14698 case $cc_basename in
14699 KCC*)
14700 # Kuck and Associates, Inc. (KAI) C++ Compiler
14701
14702 # KCC will only create a shared library if the output file
14703 # ends with ".so" (or ".sl" for HP-UX), so rename the library
14704 # to its proper name (with version) after linking.
14705 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'
14706
14707 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14708 hardcode_libdir_separator_CXX=:
14709
14710 # Archives containing C++ object files must be created using
14711 # the KAI C++ compiler.
14712 case $host in
14713 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
14714 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
14715 esac
14716 ;;
14717 RCC*)
14718 # Rational C++ 2.4.1
14719 # FIXME: insert proper C++ library support
14720 ld_shlibs_CXX=no
14721 ;;
14722 cxx*)
14723 case $host in
14724 osf3*)
14725 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
14726 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'
14727 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14728 ;;
14729 *)
14730 allow_undefined_flag_CXX=' -expect_unresolved \*'
14731 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'
14732 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
14733 echo "-hidden">> $lib.exp~
14734 $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~
14735 $RM $lib.exp'
14736 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
14737 ;;
14738 esac
14739
14740 hardcode_libdir_separator_CXX=:
14741
14742 # Commands to make compiler produce verbose output that lists
14743 # what "hidden" libraries, object files and flags are used when
14744 # linking a shared library.
14745 #
14746 # There doesn't appear to be a way to prevent this compiler from
14747 # explicitly linking system object files so we need to strip them
14748 # from the output so that they don't get included in the library
14749 # dependencies.
14750 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"'
14751 ;;
14752 *)
14753 if test yes,no = "$GXX,$with_gnu_ld"; then
14754 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
14755 case $host in
14756 osf3*)
14757 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'
14758 ;;
14759 *)
14760 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'
14761 ;;
14762 esac
14763
14764 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14765 hardcode_libdir_separator_CXX=:
14766
14767 # Commands to make compiler produce verbose output that lists
14768 # what "hidden" libraries, object files and flags are used when
14769 # linking a shared library.
14770 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
14771
14772 else
14773 # FIXME: insert proper C++ library support
14774 ld_shlibs_CXX=no
14775 fi
14776 ;;
14777 esac
14778 ;;
14779
14780 psos*)
14781 # FIXME: insert proper C++ library support
14782 ld_shlibs_CXX=no
14783 ;;
14784
14785 sunos4*)
14786 case $cc_basename in
14787 CC*)
14788 # Sun C++ 4.x
14789 # FIXME: insert proper C++ library support
14790 ld_shlibs_CXX=no
14791 ;;
14792 lcc*)
14793 # Lucid
14794 # FIXME: insert proper C++ library support
14795 ld_shlibs_CXX=no
14796 ;;
14797 *)
14798 # FIXME: insert proper C++ library support
14799 ld_shlibs_CXX=no
14800 ;;
14801 esac
14802 ;;
14803
14804 solaris*)
14805 case $cc_basename in
14806 CC* | sunCC*)
14807 # Sun C++ 4.2, 5.x and Centerline C++
14808 archive_cmds_need_lc_CXX=yes
14809 no_undefined_flag_CXX=' -zdefs'
14810 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14811 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14812 $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'
14813
14814 hardcode_libdir_flag_spec_CXX='-R$libdir'
14815 hardcode_shlibpath_var_CXX=no
14816 case $host_os in
14817 solaris2.[0-5] | solaris2.[0-5].*) ;;
14818 *)
14819 # The compiler driver will combine and reorder linker options,
14820 # but understands '-z linker_flag'.
14821 # Supported since Solaris 2.6 (maybe 2.5.1?)
14822 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
14823 ;;
14824 esac
14825 link_all_deplibs_CXX=yes
14826
14827 output_verbose_link_cmd='func_echo_all'
14828
14829 # Archives containing C++ object files must be created using
14830 # "CC -xar", where "CC" is the Sun C++ compiler. This is
14831 # necessary to make sure instantiated templates are included
14832 # in the archive.
14833 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
14834 ;;
14835 gcx*)
14836 # Green Hills C++ Compiler
14837 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
14838
14839 # The C++ compiler must be used to create the archive.
14840 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
14841 ;;
14842 *)
14843 # GNU C++ compiler with Solaris linker
14844 if test yes,no = "$GXX,$with_gnu_ld"; then
14845 no_undefined_flag_CXX=' $wl-z ${wl}defs'
14846 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
14847 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
14848 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14849 $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'
14850
14851 # Commands to make compiler produce verbose output that lists
14852 # what "hidden" libraries, object files and flags are used when
14853 # linking a shared library.
14854 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
14855 else
14856 # g++ 2.7 appears to require '-G' NOT '-shared' on this
14857 # platform.
14858 archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
14859 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14860 $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'
14861
14862 # Commands to make compiler produce verbose output that lists
14863 # what "hidden" libraries, object files and flags are used when
14864 # linking a shared library.
14865 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
14866 fi
14867
14868 hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
14869 case $host_os in
14870 solaris2.[0-5] | solaris2.[0-5].*) ;;
14871 *)
14872 whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
14873 ;;
14874 esac
14875 fi
14876 ;;
14877 esac
14878 ;;
14879
14880 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
14881 no_undefined_flag_CXX='$wl-z,text'
14882 archive_cmds_need_lc_CXX=no
14883 hardcode_shlibpath_var_CXX=no
14884 runpath_var='LD_RUN_PATH'
14885
14886 case $cc_basename in
14887 CC*)
14888 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14889 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14890 ;;
14891 *)
14892 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14893 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14894 ;;
14895 esac
14896 ;;
14897
14898 sysv5* | sco3.2v5* | sco5v6*)
14899 # Note: We CANNOT use -z defs as we might desire, because we do not
14900 # link with -lc, and that would cause any symbols used from libc to
14901 # always be unresolved, which means just about no library would
14902 # ever link correctly. If we're not using GNU ld we use -z text
14903 # though, which does catch some bad symbols but isn't as heavy-handed
14904 # as -z defs.
14905 no_undefined_flag_CXX='$wl-z,text'
14906 allow_undefined_flag_CXX='$wl-z,nodefs'
14907 archive_cmds_need_lc_CXX=no
14908 hardcode_shlibpath_var_CXX=no
14909 hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
14910 hardcode_libdir_separator_CXX=':'
14911 link_all_deplibs_CXX=yes
14912 export_dynamic_flag_spec_CXX='$wl-Bexport'
14913 runpath_var='LD_RUN_PATH'
14914
14915 case $cc_basename in
14916 CC*)
14917 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14918 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14919 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
14920 '"$old_archive_cmds_CXX"
14921 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
14922 '"$reload_cmds_CXX"
14923 ;;
14924 *)
14925 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14926 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14927 ;;
14928 esac
14929 ;;
14930
14931 tandem*)
14932 case $cc_basename in
14933 NCC*)
14934 # NonStop-UX NCC 3.20
14935 # FIXME: insert proper C++ library support
14936 ld_shlibs_CXX=no
14937 ;;
14938 *)
14939 # FIXME: insert proper C++ library support
14940 ld_shlibs_CXX=no
14941 ;;
14942 esac
14943 ;;
14944
14945 vxworks*)
14946 # FIXME: insert proper C++ library support
14947 ld_shlibs_CXX=no
14948 ;;
14949
14950 *)
14951 # FIXME: insert proper C++ library support
14952 ld_shlibs_CXX=no
14953 ;;
14954 esac
14955
14956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
14957 printf "%s\n" "$ld_shlibs_CXX" >&6; }
14958 test no = "$ld_shlibs_CXX" && can_build_shared=no
14959
14960 GCC_CXX=$GXX
14961 LD_CXX=$LD
14962
14963 ## CAVEAT EMPTOR:
14964 ## There is no encapsulation within the following macros, do not change
14965 ## the running order or otherwise move them around unless you know exactly
14966 ## what you are doing...
14967 # Dependencies to place before and after the object being linked:
14968 predep_objects_CXX=
14969 postdep_objects_CXX=
14970 predeps_CXX=
14971 postdeps_CXX=
14972 compiler_lib_search_path_CXX=
14973
14974 cat > conftest.$ac_ext <<_LT_EOF
14975 class Foo
14976 {
14977 public:
14978 Foo (void) { a = 0; }
14979 private:
14980 int a;
14981 };
14982 _LT_EOF
14983
14984
14985 _lt_libdeps_save_CFLAGS=$CFLAGS
14986 case "$CC $CFLAGS " in #(
14987 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
14988 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
14989 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
14990 esac
14991
14992 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14993 (eval $ac_compile) 2>&5
14994 ac_status=$?
14995 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14996 test $ac_status = 0; }; then
14997 # Parse the compiler output and extract the necessary
14998 # objects, libraries and library flags.
14999
15000 # Sentinel used to keep track of whether or not we are before
15001 # the conftest object file.
15002 pre_test_object_deps_done=no
15003
15004 for p in `eval "$output_verbose_link_cmd"`; do
15005 case $prev$p in
15006
15007 -L* | -R* | -l*)
15008 # Some compilers place space between "-{L,R}" and the path.
15009 # Remove the space.
15010 if test x-L = "$p" ||
15011 test x-R = "$p"; then
15012 prev=$p
15013 continue
15014 fi
15015
15016 # Expand the sysroot to ease extracting the directories later.
15017 if test -z "$prev"; then
15018 case $p in
15019 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
15020 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
15021 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
15022 esac
15023 fi
15024 case $p in
15025 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
15026 esac
15027 if test no = "$pre_test_object_deps_done"; then
15028 case $prev in
15029 -L | -R)
15030 # Internal compiler library paths should come after those
15031 # provided the user. The postdeps already come after the
15032 # user supplied libs so there is no need to process them.
15033 if test -z "$compiler_lib_search_path_CXX"; then
15034 compiler_lib_search_path_CXX=$prev$p
15035 else
15036 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
15037 fi
15038 ;;
15039 # The "-l" case would never come before the object being
15040 # linked, so don't bother handling this case.
15041 esac
15042 else
15043 if test -z "$postdeps_CXX"; then
15044 postdeps_CXX=$prev$p
15045 else
15046 postdeps_CXX="${postdeps_CXX} $prev$p"
15047 fi
15048 fi
15049 prev=
15050 ;;
15051
15052 *.lto.$objext) ;; # Ignore GCC LTO objects
15053 *.$objext)
15054 # This assumes that the test object file only shows up
15055 # once in the compiler output.
15056 if test "$p" = "conftest.$objext"; then
15057 pre_test_object_deps_done=yes
15058 continue
15059 fi
15060
15061 if test no = "$pre_test_object_deps_done"; then
15062 if test -z "$predep_objects_CXX"; then
15063 predep_objects_CXX=$p
15064 else
15065 predep_objects_CXX="$predep_objects_CXX $p"
15066 fi
15067 else
15068 if test -z "$postdep_objects_CXX"; then
15069 postdep_objects_CXX=$p
15070 else
15071 postdep_objects_CXX="$postdep_objects_CXX $p"
15072 fi
15073 fi
15074 ;;
15075
15076 *) ;; # Ignore the rest.
15077
15078 esac
15079 done
15080
15081 # Clean up.
15082 rm -f a.out a.exe
15083 else
15084 echo "libtool.m4: error: problem compiling CXX test program"
15085 fi
15086
15087 $RM -f confest.$objext
15088 CFLAGS=$_lt_libdeps_save_CFLAGS
15089
15090 # PORTME: override above test on systems where it is broken
15091 case $host_os in
15092 interix[3-9]*)
15093 # Interix 3.5 installs completely hosed .la files for C++, so rather than
15094 # hack all around it, let's just trust "g++" to DTRT.
15095 predep_objects_CXX=
15096 postdep_objects_CXX=
15097 postdeps_CXX=
15098 ;;
15099 esac
15100
15101
15102 case " $postdeps_CXX " in
15103 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
15104 esac
15105 compiler_lib_search_dirs_CXX=
15106 if test -n "${compiler_lib_search_path_CXX}"; then
15107 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
15108 fi
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140 lt_prog_compiler_wl_CXX=
15141 lt_prog_compiler_pic_CXX=
15142 lt_prog_compiler_static_CXX=
15143
15144
15145 # C++ specific cases for pic, static, wl, etc.
15146 if test yes = "$GXX"; then
15147 lt_prog_compiler_wl_CXX='-Wl,'
15148 lt_prog_compiler_static_CXX='-static'
15149
15150 case $host_os in
15151 aix*)
15152 # All AIX code is PIC.
15153 if test ia64 = "$host_cpu"; then
15154 # AIX 5 now supports IA64 processor
15155 lt_prog_compiler_static_CXX='-Bstatic'
15156 fi
15157 lt_prog_compiler_pic_CXX='-fPIC'
15158 ;;
15159
15160 amigaos*)
15161 case $host_cpu in
15162 powerpc)
15163 # see comment about AmigaOS4 .so support
15164 lt_prog_compiler_pic_CXX='-fPIC'
15165 ;;
15166 m68k)
15167 # FIXME: we need at least 68020 code to build shared libraries, but
15168 # adding the '-m68020' flag to GCC prevents building anything better,
15169 # like '-m68040'.
15170 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
15171 ;;
15172 esac
15173 ;;
15174
15175 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
15176 # PIC is the default for these OSes.
15177 ;;
15178 mingw* | cygwin* | os2* | pw32* | cegcc*)
15179 # This hack is so that the source file can tell whether it is being
15180 # built for inclusion in a dll (and should export symbols for example).
15181 # Although the cygwin gcc ignores -fPIC, still need this for old-style
15182 # (--disable-auto-import) libraries
15183 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
15184 case $host_os in
15185 os2*)
15186 lt_prog_compiler_static_CXX='$wl-static'
15187 ;;
15188 esac
15189 ;;
15190 darwin* | rhapsody*)
15191 # PIC is the default on this platform
15192 # Common symbols not allowed in MH_DYLIB files
15193 lt_prog_compiler_pic_CXX='-fno-common'
15194 ;;
15195 *djgpp*)
15196 # DJGPP does not support shared libraries at all
15197 lt_prog_compiler_pic_CXX=
15198 ;;
15199 haiku*)
15200 # PIC is the default for Haiku.
15201 # The "-static" flag exists, but is broken.
15202 lt_prog_compiler_static_CXX=
15203 ;;
15204 interix[3-9]*)
15205 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
15206 # Instead, we relocate shared libraries at runtime.
15207 ;;
15208 sysv4*MP*)
15209 if test -d /usr/nec; then
15210 lt_prog_compiler_pic_CXX=-Kconform_pic
15211 fi
15212 ;;
15213 hpux*)
15214 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
15215 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
15216 # sets the default TLS model and affects inlining.
15217 case $host_cpu in
15218 hppa*64*)
15219 ;;
15220 *)
15221 lt_prog_compiler_pic_CXX='-fPIC'
15222 ;;
15223 esac
15224 ;;
15225 *qnx* | *nto*)
15226 # QNX uses GNU C++, but need to define -shared option too, otherwise
15227 # it will coredump.
15228 lt_prog_compiler_pic_CXX='-fPIC -shared'
15229 ;;
15230 *)
15231 lt_prog_compiler_pic_CXX='-fPIC'
15232 ;;
15233 esac
15234 else
15235 case $host_os in
15236 aix[4-9]*)
15237 # All AIX code is PIC.
15238 if test ia64 = "$host_cpu"; then
15239 # AIX 5 now supports IA64 processor
15240 lt_prog_compiler_static_CXX='-Bstatic'
15241 else
15242 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
15243 fi
15244 ;;
15245 chorus*)
15246 case $cc_basename in
15247 cxch68*)
15248 # Green Hills C++ Compiler
15249 # _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"
15250 ;;
15251 esac
15252 ;;
15253 mingw* | cygwin* | os2* | pw32* | cegcc*)
15254 # This hack is so that the source file can tell whether it is being
15255 # built for inclusion in a dll (and should export symbols for example).
15256 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
15257 ;;
15258 dgux*)
15259 case $cc_basename in
15260 ec++*)
15261 lt_prog_compiler_pic_CXX='-KPIC'
15262 ;;
15263 ghcx*)
15264 # Green Hills C++ Compiler
15265 lt_prog_compiler_pic_CXX='-pic'
15266 ;;
15267 *)
15268 ;;
15269 esac
15270 ;;
15271 freebsd* | dragonfly*)
15272 # FreeBSD uses GNU C++
15273 ;;
15274 hpux9* | hpux10* | hpux11*)
15275 case $cc_basename in
15276 CC*)
15277 lt_prog_compiler_wl_CXX='-Wl,'
15278 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
15279 if test ia64 != "$host_cpu"; then
15280 lt_prog_compiler_pic_CXX='+Z'
15281 fi
15282 ;;
15283 aCC*)
15284 lt_prog_compiler_wl_CXX='-Wl,'
15285 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
15286 case $host_cpu in
15287 hppa*64*|ia64*)
15288 # +Z the default
15289 ;;
15290 *)
15291 lt_prog_compiler_pic_CXX='+Z'
15292 ;;
15293 esac
15294 ;;
15295 *)
15296 ;;
15297 esac
15298 ;;
15299 interix*)
15300 # This is c89, which is MS Visual C++ (no shared libs)
15301 # Anyone wants to do a port?
15302 ;;
15303 irix5* | irix6* | nonstopux*)
15304 case $cc_basename in
15305 CC*)
15306 lt_prog_compiler_wl_CXX='-Wl,'
15307 lt_prog_compiler_static_CXX='-non_shared'
15308 # CC pic flag -KPIC is the default.
15309 ;;
15310 *)
15311 ;;
15312 esac
15313 ;;
15314 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15315 case $cc_basename in
15316 KCC*)
15317 # KAI C++ Compiler
15318 lt_prog_compiler_wl_CXX='--backend -Wl,'
15319 lt_prog_compiler_pic_CXX='-fPIC'
15320 ;;
15321 ecpc* )
15322 # old Intel C++ for x86_64, which still supported -KPIC.
15323 lt_prog_compiler_wl_CXX='-Wl,'
15324 lt_prog_compiler_pic_CXX='-KPIC'
15325 lt_prog_compiler_static_CXX='-static'
15326 ;;
15327 icpc* )
15328 # Intel C++, used to be incompatible with GCC.
15329 # ICC 10 doesn't accept -KPIC any more.
15330 lt_prog_compiler_wl_CXX='-Wl,'
15331 lt_prog_compiler_pic_CXX='-fPIC'
15332 lt_prog_compiler_static_CXX='-static'
15333 ;;
15334 pgCC* | pgcpp*)
15335 # Portland Group C++ compiler
15336 lt_prog_compiler_wl_CXX='-Wl,'
15337 lt_prog_compiler_pic_CXX='-fpic'
15338 lt_prog_compiler_static_CXX='-Bstatic'
15339 ;;
15340 cxx*)
15341 # Compaq C++
15342 # Make sure the PIC flag is empty. It appears that all Alpha
15343 # Linux and Compaq Tru64 Unix objects are PIC.
15344 lt_prog_compiler_pic_CXX=
15345 lt_prog_compiler_static_CXX='-non_shared'
15346 ;;
15347 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
15348 # IBM XL 8.0, 9.0 on PPC and BlueGene
15349 lt_prog_compiler_wl_CXX='-Wl,'
15350 lt_prog_compiler_pic_CXX='-qpic'
15351 lt_prog_compiler_static_CXX='-qstaticlink'
15352 ;;
15353 *)
15354 case `$CC -V 2>&1 | sed 5q` in
15355 *Sun\ C*)
15356 # Sun C++ 5.9
15357 lt_prog_compiler_pic_CXX='-KPIC'
15358 lt_prog_compiler_static_CXX='-Bstatic'
15359 lt_prog_compiler_wl_CXX='-Qoption ld '
15360 ;;
15361 esac
15362 ;;
15363 esac
15364 ;;
15365 lynxos*)
15366 ;;
15367 m88k*)
15368 ;;
15369 mvs*)
15370 case $cc_basename in
15371 cxx*)
15372 lt_prog_compiler_pic_CXX='-W c,exportall'
15373 ;;
15374 *)
15375 ;;
15376 esac
15377 ;;
15378 netbsd* | netbsdelf*-gnu)
15379 ;;
15380 *qnx* | *nto*)
15381 # QNX uses GNU C++, but need to define -shared option too, otherwise
15382 # it will coredump.
15383 lt_prog_compiler_pic_CXX='-fPIC -shared'
15384 ;;
15385 osf3* | osf4* | osf5*)
15386 case $cc_basename in
15387 KCC*)
15388 lt_prog_compiler_wl_CXX='--backend -Wl,'
15389 ;;
15390 RCC*)
15391 # Rational C++ 2.4.1
15392 lt_prog_compiler_pic_CXX='-pic'
15393 ;;
15394 cxx*)
15395 # Digital/Compaq C++
15396 lt_prog_compiler_wl_CXX='-Wl,'
15397 # Make sure the PIC flag is empty. It appears that all Alpha
15398 # Linux and Compaq Tru64 Unix objects are PIC.
15399 lt_prog_compiler_pic_CXX=
15400 lt_prog_compiler_static_CXX='-non_shared'
15401 ;;
15402 *)
15403 ;;
15404 esac
15405 ;;
15406 psos*)
15407 ;;
15408 solaris*)
15409 case $cc_basename in
15410 CC* | sunCC*)
15411 # Sun C++ 4.2, 5.x and Centerline C++
15412 lt_prog_compiler_pic_CXX='-KPIC'
15413 lt_prog_compiler_static_CXX='-Bstatic'
15414 lt_prog_compiler_wl_CXX='-Qoption ld '
15415 ;;
15416 gcx*)
15417 # Green Hills C++ Compiler
15418 lt_prog_compiler_pic_CXX='-PIC'
15419 ;;
15420 *)
15421 ;;
15422 esac
15423 ;;
15424 sunos4*)
15425 case $cc_basename in
15426 CC*)
15427 # Sun C++ 4.x
15428 lt_prog_compiler_pic_CXX='-pic'
15429 lt_prog_compiler_static_CXX='-Bstatic'
15430 ;;
15431 lcc*)
15432 # Lucid
15433 lt_prog_compiler_pic_CXX='-pic'
15434 ;;
15435 *)
15436 ;;
15437 esac
15438 ;;
15439 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
15440 case $cc_basename in
15441 CC*)
15442 lt_prog_compiler_wl_CXX='-Wl,'
15443 lt_prog_compiler_pic_CXX='-KPIC'
15444 lt_prog_compiler_static_CXX='-Bstatic'
15445 ;;
15446 esac
15447 ;;
15448 tandem*)
15449 case $cc_basename in
15450 NCC*)
15451 # NonStop-UX NCC 3.20
15452 lt_prog_compiler_pic_CXX='-KPIC'
15453 ;;
15454 *)
15455 ;;
15456 esac
15457 ;;
15458 vxworks*)
15459 ;;
15460 *)
15461 lt_prog_compiler_can_build_shared_CXX=no
15462 ;;
15463 esac
15464 fi
15465
15466 case $host_os in
15467 # For platforms that do not support PIC, -DPIC is meaningless:
15468 *djgpp*)
15469 lt_prog_compiler_pic_CXX=
15470 ;;
15471 *)
15472 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
15473 ;;
15474 esac
15475
15476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
15477 printf %s "checking for $compiler option to produce PIC... " >&6; }
15478 if test ${lt_cv_prog_compiler_pic_CXX+y}
15479 then :
15480 printf %s "(cached) " >&6
15481 else $as_nop
15482 lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
15483 fi
15484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
15485 printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; }
15486 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
15487
15488 #
15489 # Check to make sure the PIC flag actually works.
15490 #
15491 if test -n "$lt_prog_compiler_pic_CXX"; then
15492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
15493 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
15494 if test ${lt_cv_prog_compiler_pic_works_CXX+y}
15495 then :
15496 printf %s "(cached) " >&6
15497 else $as_nop
15498 lt_cv_prog_compiler_pic_works_CXX=no
15499 ac_outfile=conftest.$ac_objext
15500 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15501 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
15502 # Insert the option either (1) after the last *FLAGS variable, or
15503 # (2) before a word containing "conftest.", or (3) at the end.
15504 # Note that $ac_compile itself does not contain backslashes and begins
15505 # with a dollar sign (not a hyphen), so the echo should work correctly.
15506 # The option is referenced via a variable to avoid confusing sed.
15507 lt_compile=`echo "$ac_compile" | $SED \
15508 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15509 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15510 -e 's:$: $lt_compiler_flag:'`
15511 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15512 (eval "$lt_compile" 2>conftest.err)
15513 ac_status=$?
15514 cat conftest.err >&5
15515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15516 if (exit $ac_status) && test -s "$ac_outfile"; then
15517 # The compiler can only warn and ignore the option if not recognized
15518 # So say no if there are warnings other than the usual output.
15519 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
15520 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15521 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
15522 lt_cv_prog_compiler_pic_works_CXX=yes
15523 fi
15524 fi
15525 $RM conftest*
15526
15527 fi
15528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
15529 printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
15530
15531 if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
15532 case $lt_prog_compiler_pic_CXX in
15533 "" | " "*) ;;
15534 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
15535 esac
15536 else
15537 lt_prog_compiler_pic_CXX=
15538 lt_prog_compiler_can_build_shared_CXX=no
15539 fi
15540
15541 fi
15542
15543
15544
15545
15546
15547 #
15548 # Check to make sure the static flag actually works.
15549 #
15550 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
15551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
15552 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
15553 if test ${lt_cv_prog_compiler_static_works_CXX+y}
15554 then :
15555 printf %s "(cached) " >&6
15556 else $as_nop
15557 lt_cv_prog_compiler_static_works_CXX=no
15558 save_LDFLAGS=$LDFLAGS
15559 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
15560 echo "$lt_simple_link_test_code" > conftest.$ac_ext
15561 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15562 # The linker can only warn and ignore the option if not recognized
15563 # So say no if there are warnings
15564 if test -s conftest.err; then
15565 # Append any errors to the config.log.
15566 cat conftest.err 1>&5
15567 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
15568 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15569 if diff conftest.exp conftest.er2 >/dev/null; then
15570 lt_cv_prog_compiler_static_works_CXX=yes
15571 fi
15572 else
15573 lt_cv_prog_compiler_static_works_CXX=yes
15574 fi
15575 fi
15576 $RM -r conftest*
15577 LDFLAGS=$save_LDFLAGS
15578
15579 fi
15580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
15581 printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; }
15582
15583 if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
15584 :
15585 else
15586 lt_prog_compiler_static_CXX=
15587 fi
15588
15589
15590
15591
15592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
15593 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
15594 if test ${lt_cv_prog_compiler_c_o_CXX+y}
15595 then :
15596 printf %s "(cached) " >&6
15597 else $as_nop
15598 lt_cv_prog_compiler_c_o_CXX=no
15599 $RM -r conftest 2>/dev/null
15600 mkdir conftest
15601 cd conftest
15602 mkdir out
15603 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15604
15605 lt_compiler_flag="-o out/conftest2.$ac_objext"
15606 # Insert the option either (1) after the last *FLAGS variable, or
15607 # (2) before a word containing "conftest.", or (3) at the end.
15608 # Note that $ac_compile itself does not contain backslashes and begins
15609 # with a dollar sign (not a hyphen), so the echo should work correctly.
15610 lt_compile=`echo "$ac_compile" | $SED \
15611 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15612 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15613 -e 's:$: $lt_compiler_flag:'`
15614 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15615 (eval "$lt_compile" 2>out/conftest.err)
15616 ac_status=$?
15617 cat out/conftest.err >&5
15618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15619 if (exit $ac_status) && test -s out/conftest2.$ac_objext
15620 then
15621 # The compiler can only warn and ignore the option if not recognized
15622 # So say no if there are warnings
15623 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
15624 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
15625 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
15626 lt_cv_prog_compiler_c_o_CXX=yes
15627 fi
15628 fi
15629 chmod u+w . 2>&5
15630 $RM conftest*
15631 # SGI C++ compiler will create directory out/ii_files/ for
15632 # template instantiation
15633 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
15634 $RM out/* && rmdir out
15635 cd ..
15636 $RM -r conftest
15637 $RM conftest*
15638
15639 fi
15640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
15641 printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; }
15642
15643
15644
15645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
15646 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
15647 if test ${lt_cv_prog_compiler_c_o_CXX+y}
15648 then :
15649 printf %s "(cached) " >&6
15650 else $as_nop
15651 lt_cv_prog_compiler_c_o_CXX=no
15652 $RM -r conftest 2>/dev/null
15653 mkdir conftest
15654 cd conftest
15655 mkdir out
15656 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15657
15658 lt_compiler_flag="-o out/conftest2.$ac_objext"
15659 # Insert the option either (1) after the last *FLAGS variable, or
15660 # (2) before a word containing "conftest.", or (3) at the end.
15661 # Note that $ac_compile itself does not contain backslashes and begins
15662 # with a dollar sign (not a hyphen), so the echo should work correctly.
15663 lt_compile=`echo "$ac_compile" | $SED \
15664 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15665 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15666 -e 's:$: $lt_compiler_flag:'`
15667 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15668 (eval "$lt_compile" 2>out/conftest.err)
15669 ac_status=$?
15670 cat out/conftest.err >&5
15671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15672 if (exit $ac_status) && test -s out/conftest2.$ac_objext
15673 then
15674 # The compiler can only warn and ignore the option if not recognized
15675 # So say no if there are warnings
15676 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
15677 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
15678 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
15679 lt_cv_prog_compiler_c_o_CXX=yes
15680 fi
15681 fi
15682 chmod u+w . 2>&5
15683 $RM conftest*
15684 # SGI C++ compiler will create directory out/ii_files/ for
15685 # template instantiation
15686 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
15687 $RM out/* && rmdir out
15688 cd ..
15689 $RM -r conftest
15690 $RM conftest*
15691
15692 fi
15693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
15694 printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; }
15695
15696
15697
15698
15699 hard_links=nottested
15700 if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
15701 # do not overwrite the value of need_locks provided by the user
15702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
15703 printf %s "checking if we can lock with hard links... " >&6; }
15704 hard_links=yes
15705 $RM conftest*
15706 ln conftest.a conftest.b 2>/dev/null && hard_links=no
15707 touch conftest.a
15708 ln conftest.a conftest.b 2>&5 || hard_links=no
15709 ln conftest.a conftest.b 2>/dev/null && hard_links=no
15710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
15711 printf "%s\n" "$hard_links" >&6; }
15712 if test no = "$hard_links"; then
15713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
15714 printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
15715 need_locks=warn
15716 fi
15717 else
15718 need_locks=no
15719 fi
15720
15721
15722
15723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
15724 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
15725
15726 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
15727 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
15728 case $host_os in
15729 aix[4-9]*)
15730 # If we're using GNU nm, then we don't want the "-C" option.
15731 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
15732 # Without the "-l" option, or with the "-B" option, AIX nm treats
15733 # weak defined symbols like other global defined symbols, whereas
15734 # GNU nm marks them as "W".
15735 # While the 'weak' keyword is ignored in the Export File, we need
15736 # it in the Import File for the 'aix-soname' feature, so we have
15737 # to replace the "-B" option with "-P" for AIX nm.
15738 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
15739 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'
15740 else
15741 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'
15742 fi
15743 ;;
15744 pw32*)
15745 export_symbols_cmds_CXX=$ltdll_cmds
15746 ;;
15747 cygwin* | mingw* | cegcc*)
15748 case $cc_basename in
15749 cl*)
15750 exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
15751 ;;
15752 *)
15753 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'
15754 exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
15755 ;;
15756 esac
15757 ;;
15758 linux* | k*bsd*-gnu | gnu*)
15759 link_all_deplibs_CXX=no
15760 ;;
15761 *)
15762 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
15763 ;;
15764 esac
15765
15766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
15767 printf "%s\n" "$ld_shlibs_CXX" >&6; }
15768 test no = "$ld_shlibs_CXX" && can_build_shared=no
15769
15770 with_gnu_ld_CXX=$with_gnu_ld
15771
15772
15773
15774
15775
15776
15777 #
15778 # Do we need to explicitly link libc?
15779 #
15780 case "x$archive_cmds_need_lc_CXX" in
15781 x|xyes)
15782 # Assume -lc should be added
15783 archive_cmds_need_lc_CXX=yes
15784
15785 if test yes,yes = "$GCC,$enable_shared"; then
15786 case $archive_cmds_CXX in
15787 *'~'*)
15788 # FIXME: we may have to deal with multi-command sequences.
15789 ;;
15790 '$CC '*)
15791 # Test whether the compiler implicitly links with -lc since on some
15792 # systems, -lgcc has to come before -lc. If gcc already passes -lc
15793 # to ld, don't add -lc before -lgcc.
15794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
15795 printf %s "checking whether -lc should be explicitly linked in... " >&6; }
15796 if test ${lt_cv_archive_cmds_need_lc_CXX+y}
15797 then :
15798 printf %s "(cached) " >&6
15799 else $as_nop
15800 $RM conftest*
15801 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15802
15803 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
15804 (eval $ac_compile) 2>&5
15805 ac_status=$?
15806 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15807 test $ac_status = 0; } 2>conftest.err; then
15808 soname=conftest
15809 lib=conftest
15810 libobjs=conftest.$ac_objext
15811 deplibs=
15812 wl=$lt_prog_compiler_wl_CXX
15813 pic_flag=$lt_prog_compiler_pic_CXX
15814 compiler_flags=-v
15815 linker_flags=-v
15816 verstring=
15817 output_objdir=.
15818 libname=conftest
15819 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
15820 allow_undefined_flag_CXX=
15821 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
15822 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
15823 ac_status=$?
15824 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15825 test $ac_status = 0; }
15826 then
15827 lt_cv_archive_cmds_need_lc_CXX=no
15828 else
15829 lt_cv_archive_cmds_need_lc_CXX=yes
15830 fi
15831 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
15832 else
15833 cat conftest.err 1>&5
15834 fi
15835 $RM conftest*
15836
15837 fi
15838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
15839 printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
15840 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
15841 ;;
15842 esac
15843 fi
15844 ;;
15845 esac
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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
15909 printf %s "checking dynamic linker characteristics... " >&6; }
15910
15911 library_names_spec=
15912 libname_spec='lib$name'
15913 soname_spec=
15914 shrext_cmds=.so
15915 postinstall_cmds=
15916 postuninstall_cmds=
15917 finish_cmds=
15918 finish_eval=
15919 shlibpath_var=
15920 shlibpath_overrides_runpath=unknown
15921 version_type=none
15922 dynamic_linker="$host_os ld.so"
15923 sys_lib_dlsearch_path_spec="/lib /usr/lib"
15924 need_lib_prefix=unknown
15925 hardcode_into_libs=no
15926
15927 # when you set need_version to no, make sure it does not cause -set_version
15928 # flags to be left without arguments
15929 need_version=unknown
15930
15931
15932
15933 case $host_os in
15934 aix3*)
15935 version_type=linux # correct to gnu/linux during the next big refactor
15936 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
15937 shlibpath_var=LIBPATH
15938
15939 # AIX 3 has no versioning support, so we append a major version to the name.
15940 soname_spec='$libname$release$shared_ext$major'
15941 ;;
15942
15943 aix[4-9]*)
15944 version_type=linux # correct to gnu/linux during the next big refactor
15945 need_lib_prefix=no
15946 need_version=no
15947 hardcode_into_libs=yes
15948 if test ia64 = "$host_cpu"; then
15949 # AIX 5 supports IA64
15950 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
15951 shlibpath_var=LD_LIBRARY_PATH
15952 else
15953 # With GCC up to 2.95.x, collect2 would create an import file
15954 # for dependence libraries. The import file would start with
15955 # the line '#! .'. This would cause the generated library to
15956 # depend on '.', always an invalid library. This was fixed in
15957 # development snapshots of GCC prior to 3.0.
15958 case $host_os in
15959 aix4 | aix4.[01] | aix4.[01].*)
15960 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
15961 echo ' yes '
15962 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
15963 :
15964 else
15965 can_build_shared=no
15966 fi
15967 ;;
15968 esac
15969 # Using Import Files as archive members, it is possible to support
15970 # filename-based versioning of shared library archives on AIX. While
15971 # this would work for both with and without runtime linking, it will
15972 # prevent static linking of such archives. So we do filename-based
15973 # shared library versioning with .so extension only, which is used
15974 # when both runtime linking and shared linking is enabled.
15975 # Unfortunately, runtime linking may impact performance, so we do
15976 # not want this to be the default eventually. Also, we use the
15977 # versioned .so libs for executables only if there is the -brtl
15978 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
15979 # To allow for filename-based versioning support, we need to create
15980 # libNAME.so.V as an archive file, containing:
15981 # *) an Import File, referring to the versioned filename of the
15982 # archive as well as the shared archive member, telling the
15983 # bitwidth (32 or 64) of that shared object, and providing the
15984 # list of exported symbols of that shared object, eventually
15985 # decorated with the 'weak' keyword
15986 # *) the shared object with the F_LOADONLY flag set, to really avoid
15987 # it being seen by the linker.
15988 # At run time we better use the real file rather than another symlink,
15989 # but for link time we create the symlink libNAME.so -> libNAME.so.V
15990
15991 case $with_aix_soname,$aix_use_runtimelinking in
15992 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
15993 # soname into executable. Probably we can add versioning support to
15994 # collect2, so additional links can be useful in future.
15995 aix,yes) # traditional libtool
15996 dynamic_linker='AIX unversionable lib.so'
15997 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
15998 # instead of lib<name>.a to let people know that these are not
15999 # typical AIX shared libraries.
16000 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16001 ;;
16002 aix,no) # traditional AIX only
16003 dynamic_linker='AIX lib.a(lib.so.V)'
16004 # We preserve .a as extension for shared libraries through AIX4.2
16005 # and later when we are not doing run time linking.
16006 library_names_spec='$libname$release.a $libname.a'
16007 soname_spec='$libname$release$shared_ext$major'
16008 ;;
16009 svr4,*) # full svr4 only
16010 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
16011 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
16012 # We do not specify a path in Import Files, so LIBPATH fires.
16013 shlibpath_overrides_runpath=yes
16014 ;;
16015 *,yes) # both, prefer svr4
16016 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
16017 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
16018 # unpreferred sharedlib libNAME.a needs extra handling
16019 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"'
16020 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"'
16021 # We do not specify a path in Import Files, so LIBPATH fires.
16022 shlibpath_overrides_runpath=yes
16023 ;;
16024 *,no) # both, prefer aix
16025 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
16026 library_names_spec='$libname$release.a $libname.a'
16027 soname_spec='$libname$release$shared_ext$major'
16028 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
16029 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)'
16030 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"'
16031 ;;
16032 esac
16033 shlibpath_var=LIBPATH
16034 fi
16035 ;;
16036
16037 amigaos*)
16038 case $host_cpu in
16039 powerpc)
16040 # Since July 2007 AmigaOS4 officially supports .so libraries.
16041 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
16042 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16043 ;;
16044 m68k)
16045 library_names_spec='$libname.ixlibrary $libname.a'
16046 # Create ${libname}_ixlibrary.a entries in /sys/libs.
16047 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'
16048 ;;
16049 esac
16050 ;;
16051
16052 beos*)
16053 library_names_spec='$libname$shared_ext'
16054 dynamic_linker="$host_os ld.so"
16055 shlibpath_var=LIBRARY_PATH
16056 ;;
16057
16058 bsdi[45]*)
16059 version_type=linux # correct to gnu/linux during the next big refactor
16060 need_version=no
16061 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16062 soname_spec='$libname$release$shared_ext$major'
16063 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
16064 shlibpath_var=LD_LIBRARY_PATH
16065 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
16066 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
16067 # the default ld.so.conf also contains /usr/contrib/lib and
16068 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
16069 # libtool to hard-code these into programs
16070 ;;
16071
16072 cygwin* | mingw* | pw32* | cegcc*)
16073 version_type=windows
16074 shrext_cmds=.dll
16075 need_version=no
16076 need_lib_prefix=no
16077
16078 case $GCC,$cc_basename in
16079 yes,*)
16080 # gcc
16081 library_names_spec='$libname.dll.a'
16082 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16083 postinstall_cmds='base_file=`basename \$file`~
16084 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
16085 dldir=$destdir/`dirname \$dlpath`~
16086 test -d \$dldir || mkdir -p \$dldir~
16087 $install_prog $dir/$dlname \$dldir/$dlname~
16088 chmod a+x \$dldir/$dlname~
16089 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16090 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16091 fi'
16092 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16093 dlpath=$dir/\$dldll~
16094 $RM \$dlpath'
16095 shlibpath_overrides_runpath=yes
16096
16097 case $host_os in
16098 cygwin*)
16099 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
16100 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16101
16102 ;;
16103 mingw* | cegcc*)
16104 # MinGW DLLs use traditional 'lib' prefix
16105 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16106 ;;
16107 pw32*)
16108 # pw32 DLLs use 'pw' prefix rather than 'lib'
16109 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16110 ;;
16111 esac
16112 dynamic_linker='Win32 ld.exe'
16113 ;;
16114
16115 *,cl*)
16116 # Native MSVC
16117 libname_spec='$name'
16118 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16119 library_names_spec='$libname.dll.lib'
16120
16121 case $build_os in
16122 mingw*)
16123 sys_lib_search_path_spec=
16124 lt_save_ifs=$IFS
16125 IFS=';'
16126 for lt_path in $LIB
16127 do
16128 IFS=$lt_save_ifs
16129 # Let DOS variable expansion print the short 8.3 style file name.
16130 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
16131 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
16132 done
16133 IFS=$lt_save_ifs
16134 # Convert to MSYS style.
16135 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
16136 ;;
16137 cygwin*)
16138 # Convert to unix form, then to dos form, then back to unix form
16139 # but this time dos style (no spaces!) so that the unix form looks
16140 # like /cygdrive/c/PROGRA~1:/cygdr...
16141 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
16142 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
16143 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16144 ;;
16145 *)
16146 sys_lib_search_path_spec=$LIB
16147 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
16148 # It is most probably a Windows format PATH.
16149 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
16150 else
16151 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16152 fi
16153 # FIXME: find the short name or the path components, as spaces are
16154 # common. (e.g. "Program Files" -> "PROGRA~1")
16155 ;;
16156 esac
16157
16158 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16159 postinstall_cmds='base_file=`basename \$file`~
16160 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
16161 dldir=$destdir/`dirname \$dlpath`~
16162 test -d \$dldir || mkdir -p \$dldir~
16163 $install_prog $dir/$dlname \$dldir/$dlname'
16164 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16165 dlpath=$dir/\$dldll~
16166 $RM \$dlpath'
16167 shlibpath_overrides_runpath=yes
16168 dynamic_linker='Win32 link.exe'
16169 ;;
16170
16171 *)
16172 # Assume MSVC wrapper
16173 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
16174 dynamic_linker='Win32 ld.exe'
16175 ;;
16176 esac
16177 # FIXME: first we should search . and the directory the executable is in
16178 shlibpath_var=PATH
16179 ;;
16180
16181 darwin* | rhapsody*)
16182 dynamic_linker="$host_os dyld"
16183 version_type=darwin
16184 need_lib_prefix=no
16185 need_version=no
16186 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
16187 soname_spec='$libname$release$major$shared_ext'
16188 shlibpath_overrides_runpath=yes
16189 shlibpath_var=DYLD_LIBRARY_PATH
16190 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
16191
16192 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
16193 ;;
16194
16195 dgux*)
16196 version_type=linux # correct to gnu/linux during the next big refactor
16197 need_lib_prefix=no
16198 need_version=no
16199 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16200 soname_spec='$libname$release$shared_ext$major'
16201 shlibpath_var=LD_LIBRARY_PATH
16202 ;;
16203
16204 freebsd* | dragonfly*)
16205 # DragonFly does not have aout. When/if they implement a new
16206 # versioning mechanism, adjust this.
16207 if test -x /usr/bin/objformat; then
16208 objformat=`/usr/bin/objformat`
16209 else
16210 case $host_os in
16211 freebsd[23].*) objformat=aout ;;
16212 *) objformat=elf ;;
16213 esac
16214 fi
16215 version_type=freebsd-$objformat
16216 case $version_type in
16217 freebsd-elf*)
16218 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16219 soname_spec='$libname$release$shared_ext$major'
16220 need_version=no
16221 need_lib_prefix=no
16222 ;;
16223 freebsd-*)
16224 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16225 need_version=yes
16226 ;;
16227 esac
16228 shlibpath_var=LD_LIBRARY_PATH
16229 case $host_os in
16230 freebsd2.*)
16231 shlibpath_overrides_runpath=yes
16232 ;;
16233 freebsd3.[01]* | freebsdelf3.[01]*)
16234 shlibpath_overrides_runpath=yes
16235 hardcode_into_libs=yes
16236 ;;
16237 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
16238 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
16239 shlibpath_overrides_runpath=no
16240 hardcode_into_libs=yes
16241 ;;
16242 *) # from 4.6 on, and DragonFly
16243 shlibpath_overrides_runpath=yes
16244 hardcode_into_libs=yes
16245 ;;
16246 esac
16247 ;;
16248
16249 haiku*)
16250 version_type=linux # correct to gnu/linux during the next big refactor
16251 need_lib_prefix=no
16252 need_version=no
16253 dynamic_linker="$host_os runtime_loader"
16254 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16255 soname_spec='$libname$release$shared_ext$major'
16256 shlibpath_var=LIBRARY_PATH
16257 shlibpath_overrides_runpath=no
16258 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
16259 hardcode_into_libs=yes
16260 ;;
16261
16262 hpux9* | hpux10* | hpux11*)
16263 # Give a soname corresponding to the major version so that dld.sl refuses to
16264 # link against other versions.
16265 version_type=sunos
16266 need_lib_prefix=no
16267 need_version=no
16268 case $host_cpu in
16269 ia64*)
16270 shrext_cmds='.so'
16271 hardcode_into_libs=yes
16272 dynamic_linker="$host_os dld.so"
16273 shlibpath_var=LD_LIBRARY_PATH
16274 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16275 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16276 soname_spec='$libname$release$shared_ext$major'
16277 if test 32 = "$HPUX_IA64_MODE"; then
16278 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
16279 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
16280 else
16281 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
16282 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
16283 fi
16284 ;;
16285 hppa*64*)
16286 shrext_cmds='.sl'
16287 hardcode_into_libs=yes
16288 dynamic_linker="$host_os dld.sl"
16289 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
16290 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16291 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16292 soname_spec='$libname$release$shared_ext$major'
16293 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
16294 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16295 ;;
16296 *)
16297 shrext_cmds='.sl'
16298 dynamic_linker="$host_os dld.sl"
16299 shlibpath_var=SHLIB_PATH
16300 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
16301 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16302 soname_spec='$libname$release$shared_ext$major'
16303 ;;
16304 esac
16305 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
16306 postinstall_cmds='chmod 555 $lib'
16307 # or fails outright, so override atomically:
16308 install_override_mode=555
16309 ;;
16310
16311 interix[3-9]*)
16312 version_type=linux # correct to gnu/linux during the next big refactor
16313 need_lib_prefix=no
16314 need_version=no
16315 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16316 soname_spec='$libname$release$shared_ext$major'
16317 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
16318 shlibpath_var=LD_LIBRARY_PATH
16319 shlibpath_overrides_runpath=no
16320 hardcode_into_libs=yes
16321 ;;
16322
16323 irix5* | irix6* | nonstopux*)
16324 case $host_os in
16325 nonstopux*) version_type=nonstopux ;;
16326 *)
16327 if test yes = "$lt_cv_prog_gnu_ld"; then
16328 version_type=linux # correct to gnu/linux during the next big refactor
16329 else
16330 version_type=irix
16331 fi ;;
16332 esac
16333 need_lib_prefix=no
16334 need_version=no
16335 soname_spec='$libname$release$shared_ext$major'
16336 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
16337 case $host_os in
16338 irix5* | nonstopux*)
16339 libsuff= shlibsuff=
16340 ;;
16341 *)
16342 case $LD in # libtool.m4 will add one of these switches to LD
16343 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
16344 libsuff= shlibsuff= libmagic=32-bit;;
16345 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
16346 libsuff=32 shlibsuff=N32 libmagic=N32;;
16347 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
16348 libsuff=64 shlibsuff=64 libmagic=64-bit;;
16349 *) libsuff= shlibsuff= libmagic=never-match;;
16350 esac
16351 ;;
16352 esac
16353 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
16354 shlibpath_overrides_runpath=no
16355 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
16356 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
16357 hardcode_into_libs=yes
16358 ;;
16359
16360 # No shared lib support for Linux oldld, aout, or coff.
16361 linux*oldld* | linux*aout* | linux*coff*)
16362 dynamic_linker=no
16363 ;;
16364
16365 linux*android*)
16366 version_type=none # Android doesn't support versioned libraries.
16367 need_lib_prefix=no
16368 need_version=no
16369 library_names_spec='$libname$release$shared_ext'
16370 soname_spec='$libname$release$shared_ext'
16371 finish_cmds=
16372 shlibpath_var=LD_LIBRARY_PATH
16373 shlibpath_overrides_runpath=yes
16374
16375 # This implies no fast_install, which is unacceptable.
16376 # Some rework will be needed to allow for fast_install
16377 # before this can be enabled.
16378 hardcode_into_libs=yes
16379
16380 dynamic_linker='Android linker'
16381 # Don't embed -rpath directories since the linker doesn't support them.
16382 hardcode_libdir_flag_spec_CXX='-L$libdir'
16383 ;;
16384
16385 # This must be glibc/ELF.
16386 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
16387 version_type=linux # correct to gnu/linux during the next big refactor
16388 need_lib_prefix=no
16389 need_version=no
16390 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16391 soname_spec='$libname$release$shared_ext$major'
16392 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
16393 shlibpath_var=LD_LIBRARY_PATH
16394 shlibpath_overrides_runpath=no
16395
16396 # Some binutils ld are patched to set DT_RUNPATH
16397 if test ${lt_cv_shlibpath_overrides_runpath+y}
16398 then :
16399 printf %s "(cached) " >&6
16400 else $as_nop
16401 lt_cv_shlibpath_overrides_runpath=no
16402 save_LDFLAGS=$LDFLAGS
16403 save_libdir=$libdir
16404 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
16405 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
16406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16407 /* end confdefs.h. */
16408
16409 int
16410 main (void)
16411 {
16412
16413 ;
16414 return 0;
16415 }
16416 _ACEOF
16417 if ac_fn_cxx_try_link "$LINENO"
16418 then :
16419 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
16420 then :
16421 lt_cv_shlibpath_overrides_runpath=yes
16422 fi
16423 fi
16424 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16425 conftest$ac_exeext conftest.$ac_ext
16426 LDFLAGS=$save_LDFLAGS
16427 libdir=$save_libdir
16428
16429 fi
16430
16431 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
16432
16433 # This implies no fast_install, which is unacceptable.
16434 # Some rework will be needed to allow for fast_install
16435 # before this can be enabled.
16436 hardcode_into_libs=yes
16437
16438 # Ideally, we could use ldconfig to report *all* directores which are
16439 # searched for libraries, however this is still not possible. Aside from not
16440 # being certain /sbin/ldconfig is available, command
16441 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
16442 # even though it is searched at run-time. Try to do the best guess by
16443 # appending ld.so.conf contents (and includes) to the search path.
16444 if test -f /etc/ld.so.conf; then
16445 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' ' '`
16446 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
16447 fi
16448
16449 # We used to test for /lib/ld.so.1 and disable shared libraries on
16450 # powerpc, because MkLinux only supported shared libraries with the
16451 # GNU dynamic linker. Since this was broken with cross compilers,
16452 # most powerpc-linux boxes support dynamic linking these days and
16453 # people can always --disable-shared, the test was removed, and we
16454 # assume the GNU/Linux dynamic linker is in use.
16455 dynamic_linker='GNU/Linux ld.so'
16456 ;;
16457
16458 netbsdelf*-gnu)
16459 version_type=linux
16460 need_lib_prefix=no
16461 need_version=no
16462 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16463 soname_spec='${libname}${release}${shared_ext}$major'
16464 shlibpath_var=LD_LIBRARY_PATH
16465 shlibpath_overrides_runpath=no
16466 hardcode_into_libs=yes
16467 dynamic_linker='NetBSD ld.elf_so'
16468 ;;
16469
16470 netbsd*)
16471 version_type=sunos
16472 need_lib_prefix=no
16473 need_version=no
16474 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
16475 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16476 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16477 dynamic_linker='NetBSD (a.out) ld.so'
16478 else
16479 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16480 soname_spec='$libname$release$shared_ext$major'
16481 dynamic_linker='NetBSD ld.elf_so'
16482 fi
16483 shlibpath_var=LD_LIBRARY_PATH
16484 shlibpath_overrides_runpath=yes
16485 hardcode_into_libs=yes
16486 ;;
16487
16488 newsos6)
16489 version_type=linux # correct to gnu/linux during the next big refactor
16490 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16491 shlibpath_var=LD_LIBRARY_PATH
16492 shlibpath_overrides_runpath=yes
16493 ;;
16494
16495 *nto* | *qnx*)
16496 version_type=qnx
16497 need_lib_prefix=no
16498 need_version=no
16499 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16500 soname_spec='$libname$release$shared_ext$major'
16501 shlibpath_var=LD_LIBRARY_PATH
16502 shlibpath_overrides_runpath=no
16503 hardcode_into_libs=yes
16504 dynamic_linker='ldqnx.so'
16505 ;;
16506
16507 openbsd* | bitrig*)
16508 version_type=sunos
16509 sys_lib_dlsearch_path_spec=/usr/lib
16510 need_lib_prefix=no
16511 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
16512 need_version=no
16513 else
16514 need_version=yes
16515 fi
16516 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16517 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16518 shlibpath_var=LD_LIBRARY_PATH
16519 shlibpath_overrides_runpath=yes
16520 ;;
16521
16522 os2*)
16523 libname_spec='$name'
16524 version_type=windows
16525 shrext_cmds=.dll
16526 need_version=no
16527 need_lib_prefix=no
16528 # OS/2 can only load a DLL with a base name of 8 characters or less.
16529 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
16530 v=$($ECHO $release$versuffix | tr -d .-);
16531 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
16532 $ECHO $n$v`$shared_ext'
16533 library_names_spec='${libname}_dll.$libext'
16534 dynamic_linker='OS/2 ld.exe'
16535 shlibpath_var=BEGINLIBPATH
16536 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
16537 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16538 postinstall_cmds='base_file=`basename \$file`~
16539 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
16540 dldir=$destdir/`dirname \$dlpath`~
16541 test -d \$dldir || mkdir -p \$dldir~
16542 $install_prog $dir/$dlname \$dldir/$dlname~
16543 chmod a+x \$dldir/$dlname~
16544 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16545 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16546 fi'
16547 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
16548 dlpath=$dir/\$dldll~
16549 $RM \$dlpath'
16550 ;;
16551
16552 osf3* | osf4* | osf5*)
16553 version_type=osf
16554 need_lib_prefix=no
16555 need_version=no
16556 soname_spec='$libname$release$shared_ext$major'
16557 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16558 shlibpath_var=LD_LIBRARY_PATH
16559 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16560 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16561 ;;
16562
16563 rdos*)
16564 dynamic_linker=no
16565 ;;
16566
16567 solaris*)
16568 version_type=linux # correct to gnu/linux during the next big refactor
16569 need_lib_prefix=no
16570 need_version=no
16571 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16572 soname_spec='$libname$release$shared_ext$major'
16573 shlibpath_var=LD_LIBRARY_PATH
16574 shlibpath_overrides_runpath=yes
16575 hardcode_into_libs=yes
16576 # ldd complains unless libraries are executable
16577 postinstall_cmds='chmod +x $lib'
16578 ;;
16579
16580 sunos4*)
16581 version_type=sunos
16582 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16583 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16584 shlibpath_var=LD_LIBRARY_PATH
16585 shlibpath_overrides_runpath=yes
16586 if test yes = "$with_gnu_ld"; then
16587 need_lib_prefix=no
16588 fi
16589 need_version=yes
16590 ;;
16591
16592 sysv4 | sysv4.3*)
16593 version_type=linux # correct to gnu/linux during the next big refactor
16594 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16595 soname_spec='$libname$release$shared_ext$major'
16596 shlibpath_var=LD_LIBRARY_PATH
16597 case $host_vendor in
16598 sni)
16599 shlibpath_overrides_runpath=no
16600 need_lib_prefix=no
16601 runpath_var=LD_RUN_PATH
16602 ;;
16603 siemens)
16604 need_lib_prefix=no
16605 ;;
16606 motorola)
16607 need_lib_prefix=no
16608 need_version=no
16609 shlibpath_overrides_runpath=no
16610 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
16611 ;;
16612 esac
16613 ;;
16614
16615 sysv4*MP*)
16616 if test -d /usr/nec; then
16617 version_type=linux # correct to gnu/linux during the next big refactor
16618 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
16619 soname_spec='$libname$shared_ext.$major'
16620 shlibpath_var=LD_LIBRARY_PATH
16621 fi
16622 ;;
16623
16624 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16625 version_type=sco
16626 need_lib_prefix=no
16627 need_version=no
16628 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
16629 soname_spec='$libname$release$shared_ext$major'
16630 shlibpath_var=LD_LIBRARY_PATH
16631 shlibpath_overrides_runpath=yes
16632 hardcode_into_libs=yes
16633 if test yes = "$with_gnu_ld"; then
16634 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
16635 else
16636 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
16637 case $host_os in
16638 sco3.2v5*)
16639 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
16640 ;;
16641 esac
16642 fi
16643 sys_lib_dlsearch_path_spec='/usr/lib'
16644 ;;
16645
16646 tpf*)
16647 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
16648 version_type=linux # correct to gnu/linux during the next big refactor
16649 need_lib_prefix=no
16650 need_version=no
16651 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16652 shlibpath_var=LD_LIBRARY_PATH
16653 shlibpath_overrides_runpath=no
16654 hardcode_into_libs=yes
16655 ;;
16656
16657 uts4*)
16658 version_type=linux # correct to gnu/linux during the next big refactor
16659 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16660 soname_spec='$libname$release$shared_ext$major'
16661 shlibpath_var=LD_LIBRARY_PATH
16662 ;;
16663
16664 *)
16665 dynamic_linker=no
16666 ;;
16667 esac
16668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
16669 printf "%s\n" "$dynamic_linker" >&6; }
16670 test no = "$dynamic_linker" && can_build_shared=no
16671
16672 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
16673 if test yes = "$GCC"; then
16674 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
16675 fi
16676
16677 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
16678 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
16679 fi
16680
16681 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
16682 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
16683 fi
16684
16685 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
16686 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
16687
16688 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
16689 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
16690
16691 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
16692 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
16734 printf %s "checking how to hardcode library paths into programs... " >&6; }
16735 hardcode_action_CXX=
16736 if test -n "$hardcode_libdir_flag_spec_CXX" ||
16737 test -n "$runpath_var_CXX" ||
16738 test yes = "$hardcode_automatic_CXX"; then
16739
16740 # We can hardcode non-existent directories.
16741 if test no != "$hardcode_direct_CXX" &&
16742 # If the only mechanism to avoid hardcoding is shlibpath_var, we
16743 # have to relink, otherwise we might link with an installed library
16744 # when we should be linking with a yet-to-be-installed one
16745 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
16746 test no != "$hardcode_minus_L_CXX"; then
16747 # Linking always hardcodes the temporary library directory.
16748 hardcode_action_CXX=relink
16749 else
16750 # We can link without hardcoding, and we can hardcode nonexisting dirs.
16751 hardcode_action_CXX=immediate
16752 fi
16753 else
16754 # We cannot hardcode anything, or else we can only hardcode existing
16755 # directories.
16756 hardcode_action_CXX=unsupported
16757 fi
16758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
16759 printf "%s\n" "$hardcode_action_CXX" >&6; }
16760
16761 if test relink = "$hardcode_action_CXX" ||
16762 test yes = "$inherit_rpath_CXX"; then
16763 # Fast installation is not supported
16764 enable_fast_install=no
16765 elif test yes = "$shlibpath_overrides_runpath" ||
16766 test no = "$enable_shared"; then
16767 # Fast installation is not necessary
16768 enable_fast_install=needless
16769 fi
16770
16771
16772
16773
16774
16775
16776
16777 fi # test -n "$compiler"
16778
16779 CC=$lt_save_CC
16780 CFLAGS=$lt_save_CFLAGS
16781 LDCXX=$LD
16782 LD=$lt_save_LD
16783 GCC=$lt_save_GCC
16784 with_gnu_ld=$lt_save_with_gnu_ld
16785 lt_cv_path_LDCXX=$lt_cv_path_LD
16786 lt_cv_path_LD=$lt_save_path_LD
16787 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
16788 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
16789 fi # test yes != "$_lt_caught_CXX_error"
16790
16791 ac_ext=c
16792 ac_cpp='$CPP $CPPFLAGS'
16793 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16794 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16795 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811 ac_config_commands="$ac_config_commands libtool"
16812
16813
16814
16815
16816 # Only expand once:
16817
16818
16819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
16820 printf %s "checking whether build environment is sane... " >&6; }
16821 # Reject unsafe characters in $srcdir or the absolute working directory
16822 # name. Accept space and tab only in the latter.
16823 am_lf='
16824 '
16825 case `pwd` in
16826 *[\\\"\#\$\&\'\`$am_lf]*)
16827 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
16828 esac
16829 case $srcdir in
16830 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
16831 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
16832 esac
16833
16834 # Do 'set' in a subshell so we don't clobber the current shell's
16835 # arguments. Must try -L first in case configure is actually a
16836 # symlink; some systems play weird games with the mod time of symlinks
16837 # (eg FreeBSD returns the mod time of the symlink's containing
16838 # directory).
16839 if (
16840 am_has_slept=no
16841 for am_try in 1 2; do
16842 echo "timestamp, slept: $am_has_slept" > conftest.file
16843 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
16844 if test "$*" = "X"; then
16845 # -L didn't work.
16846 set X `ls -t "$srcdir/configure" conftest.file`
16847 fi
16848 if test "$*" != "X $srcdir/configure conftest.file" \
16849 && test "$*" != "X conftest.file $srcdir/configure"; then
16850
16851 # If neither matched, then we have a broken ls. This can happen
16852 # if, for instance, CONFIG_SHELL is bash and it inherits a
16853 # broken ls alias from the environment. This has actually
16854 # happened. Such a system could not be considered "sane".
16855 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
16856 alias in your environment" "$LINENO" 5
16857 fi
16858 if test "$2" = conftest.file || test $am_try -eq 2; then
16859 break
16860 fi
16861 # Just in case.
16862 sleep 1
16863 am_has_slept=yes
16864 done
16865 test "$2" = conftest.file
16866 )
16867 then
16868 # Ok.
16869 :
16870 else
16871 as_fn_error $? "newly created file is older than distributed files!
16872 Check your system clock" "$LINENO" 5
16873 fi
16874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16875 printf "%s\n" "yes" >&6; }
16876 # If we didn't sleep, we still need to ensure time stamps of config.status and
16877 # generated files are strictly newer.
16878 am_sleep_pid=
16879 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
16880 ( sleep 1 ) &
16881 am_sleep_pid=$!
16882 fi
16883
16884 rm -f conftest.file
16885
16886
16887 # Checks for library functions
16888 #AC_CHECK_FUNCS([strlcpy strlcat])
16889 OCFLAGS=$CFLAGS
16890 CFLAGS=""
16891 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16892 if test "x$ac_cv_func_strlcpy" = xyes
16893 then :
16894 printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
16895
16896 fi
16897 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16898 if test "x$ac_cv_func_strlcat" = xyes
16899 then :
16900 printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
16901
16902 fi
16903
16904 CFLAGS=$OCFLAGS
16905
16906 ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
16907 if test "x$ac_cv_header_zlib_h" = xyes
16908 then :
16909
16910 else $as_nop
16911 as_fn_error $? "zlib.h not found ..." "$LINENO" 5
16912 fi
16913
16914 ZLIB=""
16915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
16916 printf %s "checking for inflate in -lz... " >&6; }
16917 if test ${ac_cv_lib_z_inflate+y}
16918 then :
16919 printf %s "(cached) " >&6
16920 else $as_nop
16921 ac_check_lib_save_LIBS=$LIBS
16922 LIBS="-lz $LIBS"
16923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16924 /* end confdefs.h. */
16925
16926 /* Override any GCC internal prototype to avoid an error.
16927 Use char because int might match the return type of a GCC
16928 builtin and then its argument prototype would still apply. */
16929 char inflate ();
16930 int
16931 main (void)
16932 {
16933 return inflate ();
16934 ;
16935 return 0;
16936 }
16937 _ACEOF
16938 if ac_fn_c_try_link "$LINENO"
16939 then :
16940 ac_cv_lib_z_inflate=yes
16941 else $as_nop
16942 ac_cv_lib_z_inflate=no
16943 fi
16944 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16945 conftest$ac_exeext conftest.$ac_ext
16946 LIBS=$ac_check_lib_save_LIBS
16947 fi
16948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
16949 printf "%s\n" "$ac_cv_lib_z_inflate" >&6; }
16950 if test "x$ac_cv_lib_z_inflate" = xyes
16951 then :
16952 printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
16953
16954 LIBS="-lz $LIBS"
16955
16956 else $as_nop
16957 ZLIB="no"
16958 fi
16959
16960 if test "$ZLIB" = "no"; then
16961 echo
16962 echo " ERROR! zlib library not found"
16963 echo
16964 exit 1
16965 fi
16966
16967 # Determine the OS
16968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OS" >&5
16969 printf %s "checking OS... " >&6; }
16970 OS=`uname -s`
16971 case "$OS" in
16972 MINGW*)
16973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: MinGW" >&5
16974 printf "%s\n" "MinGW" >&6; }
16975 OS_WINDOWS="true"
16976 NO_STACK_PROTECTOR="true"
16977 ;;
16978 MSYS*)
16979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: MSYS" >&5
16980 printf "%s\n" "MSYS" >&6; }
16981 OS_WINDOWS="true"
16982 NO_STACK_PROTECTOR="true"
16983 ;;
16984 CYGWIN*)
16985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Cygwin" >&5
16986 printf "%s\n" "Cygwin" >&6; }
16987 OS_CYGWIN="true"
16988 NO_STACK_PROTECTOR="true"
16989 ;;
16990 FreeBSD*)
16991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FreeBSD" >&5
16992 printf "%s\n" "FreeBSD" >&6; }
16993 OS_FREEBSD="true"
16994 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
16995 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
16996 ;;
16997 OpenBSD*)
16998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenBSD" >&5
16999 printf "%s\n" "OpenBSD" >&6; }
17000 OS_OPENBSD="true"
17001 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
17002 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
17003 ;;
17004 Linux*)
17005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Linux" >&5
17006 printf "%s\n" "Linux" >&6; }
17007 OS_LINUX="true"
17008 ;;
17009 *)
17010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17011 printf "%s\n" "no" >&6; }
17012 ;;
17013 esac
17014 #We need to call the iconv macro after OS detection for FreeBSD to work properly
17015 # iconv.m4 serial 11 (gettext-0.18.1)
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025 # lib-ld.m4 serial 4 (gettext-0.18)
17026
17027
17028
17029
17030
17031
17032 # lib-link.m4 serial 21 (gettext-0.18)
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051 # lib-prefix.m4 serial 7 (gettext-0.18)
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065 if test "X$prefix" = "XNONE"; then
17066 acl_final_prefix="$ac_default_prefix"
17067 else
17068 acl_final_prefix="$prefix"
17069 fi
17070 if test "X$exec_prefix" = "XNONE"; then
17071 acl_final_exec_prefix='${prefix}'
17072 else
17073 acl_final_exec_prefix="$exec_prefix"
17074 fi
17075 acl_save_prefix="$prefix"
17076 prefix="$acl_final_prefix"
17077 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
17078 prefix="$acl_save_prefix"
17079
17080
17081 # Check whether --with-gnu-ld was given.
17082 if test ${with_gnu_ld+y}
17083 then :
17084 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
17085 else $as_nop
17086 with_gnu_ld=no
17087 fi
17088
17089 # Prepare PATH_SEPARATOR.
17090 # The user is always right.
17091 if test "${PATH_SEPARATOR+set}" != set; then
17092 echo "#! /bin/sh" >conf$$.sh
17093 echo "exit 0" >>conf$$.sh
17094 chmod +x conf$$.sh
17095 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
17096 PATH_SEPARATOR=';'
17097 else
17098 PATH_SEPARATOR=:
17099 fi
17100 rm -f conf$$.sh
17101 fi
17102 ac_prog=ld
17103 if test "$GCC" = yes; then
17104 # Check if gcc -print-prog-name=ld gives a path.
17105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
17106 printf %s "checking for ld used by GCC... " >&6; }
17107 case $host in
17108 *-*-mingw*)
17109 # gcc leaves a trailing carriage return which upsets mingw
17110 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17111 *)
17112 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
17113 esac
17114 case $ac_prog in
17115 # Accept absolute paths.
17116 [\\/]* | [A-Za-z]:[\\/]*)
17117 re_direlt='/[^/][^/]*/\.\./'
17118 # Canonicalize the path of ld
17119 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
17120 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
17121 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
17122 done
17123 test -z "$LD" && LD="$ac_prog"
17124 ;;
17125 "")
17126 # If it fails, then pretend we aren't using GCC.
17127 ac_prog=ld
17128 ;;
17129 *)
17130 # If it is relative, then search for the first ld in PATH.
17131 with_gnu_ld=unknown
17132 ;;
17133 esac
17134 elif test "$with_gnu_ld" = yes; then
17135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17136 printf %s "checking for GNU ld... " >&6; }
17137 else
17138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17139 printf %s "checking for non-GNU ld... " >&6; }
17140 fi
17141 if test ${acl_cv_path_LD+y}
17142 then :
17143 printf %s "(cached) " >&6
17144 else $as_nop
17145 if test -z "$LD"; then
17146 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
17147 for ac_dir in $PATH; do
17148 test -z "$ac_dir" && ac_dir=.
17149 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17150 acl_cv_path_LD="$ac_dir/$ac_prog"
17151 # Check to see if the program is GNU ld. I'd rather use --version,
17152 # but apparently some GNU ld's only accept -v.
17153 # Break only if it was the GNU/non-GNU ld that we prefer.
17154 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
17155 *GNU* | *'with BFD'*)
17156 test "$with_gnu_ld" != no && break ;;
17157 *)
17158 test "$with_gnu_ld" != yes && break ;;
17159 esac
17160 fi
17161 done
17162 IFS="$ac_save_ifs"
17163 else
17164 acl_cv_path_LD="$LD" # Let the user override the test with a path.
17165 fi
17166 fi
17167
17168 LD="$acl_cv_path_LD"
17169 if test -n "$LD"; then
17170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17171 printf "%s\n" "$LD" >&6; }
17172 else
17173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17174 printf "%s\n" "no" >&6; }
17175 fi
17176 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
17177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17178 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
17179 if test ${acl_cv_prog_gnu_ld+y}
17180 then :
17181 printf %s "(cached) " >&6
17182 else $as_nop
17183 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
17184 case `$LD -v 2>&1 </dev/null` in
17185 *GNU* | *'with BFD'*)
17186 acl_cv_prog_gnu_ld=yes ;;
17187 *)
17188 acl_cv_prog_gnu_ld=no ;;
17189 esac
17190 fi
17191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
17192 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
17193 with_gnu_ld=$acl_cv_prog_gnu_ld
17194
17195
17196
17197
17198
17199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
17200 printf %s "checking for shared library run path origin... " >&6; }
17201 if test ${acl_cv_rpath+y}
17202 then :
17203 printf %s "(cached) " >&6
17204 else $as_nop
17205
17206 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
17207 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
17208 . ./conftest.sh
17209 rm -f ./conftest.sh
17210 acl_cv_rpath=done
17211
17212 fi
17213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
17214 printf "%s\n" "$acl_cv_rpath" >&6; }
17215 wl="$acl_cv_wl"
17216 acl_libext="$acl_cv_libext"
17217 acl_shlibext="$acl_cv_shlibext"
17218 acl_libname_spec="$acl_cv_libname_spec"
17219 acl_library_names_spec="$acl_cv_library_names_spec"
17220 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
17221 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
17222 acl_hardcode_direct="$acl_cv_hardcode_direct"
17223 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
17224 # Check whether --enable-rpath was given.
17225 if test ${enable_rpath+y}
17226 then :
17227 enableval=$enable_rpath; :
17228 else $as_nop
17229 enable_rpath=yes
17230 fi
17231
17232
17233 ac_ext=c
17234 ac_cpp='$CPP $CPPFLAGS'
17235 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17236 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17237 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
17239 printf %s "checking how to run the C preprocessor... " >&6; }
17240 # On Suns, sometimes $CPP names a directory.
17241 if test -n "$CPP" && test -d "$CPP"; then
17242 CPP=
17243 fi
17244 if test -z "$CPP"; then
17245 if test ${ac_cv_prog_CPP+y}
17246 then :
17247 printf %s "(cached) " >&6
17248 else $as_nop
17249 # Double quotes because $CC needs to be expanded
17250 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
17251 do
17252 ac_preproc_ok=false
17253 for ac_c_preproc_warn_flag in '' yes
17254 do
17255 # Use a header file that comes with gcc, so configuring glibc
17256 # with a fresh cross-compiler works.
17257 # On the NeXT, cc -E runs the code through the compiler's parser,
17258 # not just through cpp. "Syntax error" is here to catch this case.
17259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17260 /* end confdefs.h. */
17261 #include <limits.h>
17262 Syntax error
17263 _ACEOF
17264 if ac_fn_c_try_cpp "$LINENO"
17265 then :
17266
17267 else $as_nop
17268 # Broken: fails on valid input.
17269 continue
17270 fi
17271 rm -f conftest.err conftest.i conftest.$ac_ext
17272
17273 # OK, works on sane cases. Now check whether nonexistent headers
17274 # can be detected and how.
17275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17276 /* end confdefs.h. */
17277 #include <ac_nonexistent.h>
17278 _ACEOF
17279 if ac_fn_c_try_cpp "$LINENO"
17280 then :
17281 # Broken: success on invalid input.
17282 continue
17283 else $as_nop
17284 # Passes both tests.
17285 ac_preproc_ok=:
17286 break
17287 fi
17288 rm -f conftest.err conftest.i conftest.$ac_ext
17289
17290 done
17291 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17292 rm -f conftest.i conftest.err conftest.$ac_ext
17293 if $ac_preproc_ok
17294 then :
17295 break
17296 fi
17297
17298 done
17299 ac_cv_prog_CPP=$CPP
17300
17301 fi
17302 CPP=$ac_cv_prog_CPP
17303 else
17304 ac_cv_prog_CPP=$CPP
17305 fi
17306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
17307 printf "%s\n" "$CPP" >&6; }
17308 ac_preproc_ok=false
17309 for ac_c_preproc_warn_flag in '' yes
17310 do
17311 # Use a header file that comes with gcc, so configuring glibc
17312 # with a fresh cross-compiler works.
17313 # On the NeXT, cc -E runs the code through the compiler's parser,
17314 # not just through cpp. "Syntax error" is here to catch this case.
17315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17316 /* end confdefs.h. */
17317 #include <limits.h>
17318 Syntax error
17319 _ACEOF
17320 if ac_fn_c_try_cpp "$LINENO"
17321 then :
17322
17323 else $as_nop
17324 # Broken: fails on valid input.
17325 continue
17326 fi
17327 rm -f conftest.err conftest.i conftest.$ac_ext
17328
17329 # OK, works on sane cases. Now check whether nonexistent headers
17330 # can be detected and how.
17331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17332 /* end confdefs.h. */
17333 #include <ac_nonexistent.h>
17334 _ACEOF
17335 if ac_fn_c_try_cpp "$LINENO"
17336 then :
17337 # Broken: success on invalid input.
17338 continue
17339 else $as_nop
17340 # Passes both tests.
17341 ac_preproc_ok=:
17342 break
17343 fi
17344 rm -f conftest.err conftest.i conftest.$ac_ext
17345
17346 done
17347 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17348 rm -f conftest.i conftest.err conftest.$ac_ext
17349 if $ac_preproc_ok
17350 then :
17351
17352 else $as_nop
17353 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17354 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17355 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
17356 See \`config.log' for more details" "$LINENO" 5; }
17357 fi
17358
17359 ac_ext=c
17360 ac_cpp='$CPP $CPPFLAGS'
17361 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17362 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17363 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17364
17365
17366
17367
17368 acl_libdirstem=lib
17369 acl_libdirstem2=
17370 case "$host_os" in
17371 solaris*)
17372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
17373 printf %s "checking for 64-bit host... " >&6; }
17374 if test ${gl_cv_solaris_64bit+y}
17375 then :
17376 printf %s "(cached) " >&6
17377 else $as_nop
17378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17379 /* end confdefs.h. */
17380
17381 #ifdef _LP64
17382 sixtyfour bits
17383 #endif
17384
17385 _ACEOF
17386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17387 $EGREP "sixtyfour bits" >/dev/null 2>&1
17388 then :
17389 gl_cv_solaris_64bit=yes
17390 else $as_nop
17391 gl_cv_solaris_64bit=no
17392 fi
17393 rm -rf conftest*
17394
17395
17396 fi
17397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
17398 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
17399 if test $gl_cv_solaris_64bit = yes; then
17400 acl_libdirstem=lib/64
17401 case "$host_cpu" in
17402 sparc*) acl_libdirstem2=lib/sparcv9 ;;
17403 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
17404 esac
17405 fi
17406 ;;
17407 *)
17408 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
17409 if test -n "$searchpath"; then
17410 acl_save_IFS="${IFS= }"; IFS=":"
17411 for searchdir in $searchpath; do
17412 if test -d "$searchdir"; then
17413 case "$searchdir" in
17414 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
17415 */../ | */.. )
17416 # Better ignore directories of this form. They are misleading.
17417 ;;
17418 *) searchdir=`cd "$searchdir" && pwd`
17419 case "$searchdir" in
17420 */lib64 ) acl_libdirstem=lib64 ;;
17421 esac ;;
17422 esac
17423 fi
17424 done
17425 IFS="$acl_save_IFS"
17426 fi
17427 ;;
17428 esac
17429 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442 use_additional=yes
17443
17444 acl_save_prefix="$prefix"
17445 prefix="$acl_final_prefix"
17446 acl_save_exec_prefix="$exec_prefix"
17447 exec_prefix="$acl_final_exec_prefix"
17448
17449 eval additional_includedir=\"$includedir\"
17450 eval additional_libdir=\"$libdir\"
17451
17452 exec_prefix="$acl_save_exec_prefix"
17453 prefix="$acl_save_prefix"
17454
17455
17456 # Check whether --with-libiconv-prefix was given.
17457 if test ${with_libiconv_prefix+y}
17458 then :
17459 withval=$with_libiconv_prefix;
17460 if test "X$withval" = "Xno"; then
17461 use_additional=no
17462 else
17463 if test "X$withval" = "X"; then
17464
17465 acl_save_prefix="$prefix"
17466 prefix="$acl_final_prefix"
17467 acl_save_exec_prefix="$exec_prefix"
17468 exec_prefix="$acl_final_exec_prefix"
17469
17470 eval additional_includedir=\"$includedir\"
17471 eval additional_libdir=\"$libdir\"
17472
17473 exec_prefix="$acl_save_exec_prefix"
17474 prefix="$acl_save_prefix"
17475
17476 else
17477 additional_includedir="$withval/include"
17478 additional_libdir="$withval/$acl_libdirstem"
17479 if test "$acl_libdirstem2" != "$acl_libdirstem" \
17480 && ! test -d "$withval/$acl_libdirstem"; then
17481 additional_libdir="$withval/$acl_libdirstem2"
17482 fi
17483 fi
17484 fi
17485
17486 fi
17487
17488 LIBICONV=
17489 LTLIBICONV=
17490 INCICONV=
17491 LIBICONV_PREFIX=
17492 HAVE_LIBICONV=
17493 rpathdirs=
17494 ltrpathdirs=
17495 names_already_handled=
17496 names_next_round='iconv '
17497 while test -n "$names_next_round"; do
17498 names_this_round="$names_next_round"
17499 names_next_round=
17500 for name in $names_this_round; do
17501 already_handled=
17502 for n in $names_already_handled; do
17503 if test "$n" = "$name"; then
17504 already_handled=yes
17505 break
17506 fi
17507 done
17508 if test -z "$already_handled"; then
17509 names_already_handled="$names_already_handled $name"
17510 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17511 eval value=\"\$HAVE_LIB$uppername\"
17512 if test -n "$value"; then
17513 if test "$value" = yes; then
17514 eval value=\"\$LIB$uppername\"
17515 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
17516 eval value=\"\$LTLIB$uppername\"
17517 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
17518 else
17519 :
17520 fi
17521 else
17522 found_dir=
17523 found_la=
17524 found_so=
17525 found_a=
17526 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
17527 if test -n "$acl_shlibext"; then
17528 shrext=".$acl_shlibext" # typically: shrext=.so
17529 else
17530 shrext=
17531 fi
17532 if test $use_additional = yes; then
17533 dir="$additional_libdir"
17534 if test -n "$acl_shlibext"; then
17535 if test -f "$dir/$libname$shrext"; then
17536 found_dir="$dir"
17537 found_so="$dir/$libname$shrext"
17538 else
17539 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17540 ver=`(cd "$dir" && \
17541 for f in "$libname$shrext".*; do echo "$f"; done \
17542 | sed -e "s,^$libname$shrext\\\\.,," \
17543 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17544 | sed 1q ) 2>/dev/null`
17545 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
17546 found_dir="$dir"
17547 found_so="$dir/$libname$shrext.$ver"
17548 fi
17549 else
17550 eval library_names=\"$acl_library_names_spec\"
17551 for f in $library_names; do
17552 if test -f "$dir/$f"; then
17553 found_dir="$dir"
17554 found_so="$dir/$f"
17555 break
17556 fi
17557 done
17558 fi
17559 fi
17560 fi
17561 if test "X$found_dir" = "X"; then
17562 if test -f "$dir/$libname.$acl_libext"; then
17563 found_dir="$dir"
17564 found_a="$dir/$libname.$acl_libext"
17565 fi
17566 fi
17567 if test "X$found_dir" != "X"; then
17568 if test -f "$dir/$libname.la"; then
17569 found_la="$dir/$libname.la"
17570 fi
17571 fi
17572 fi
17573 if test "X$found_dir" = "X"; then
17574 for x in $LDFLAGS $LTLIBICONV; do
17575
17576 acl_save_prefix="$prefix"
17577 prefix="$acl_final_prefix"
17578 acl_save_exec_prefix="$exec_prefix"
17579 exec_prefix="$acl_final_exec_prefix"
17580 eval x=\"$x\"
17581 exec_prefix="$acl_save_exec_prefix"
17582 prefix="$acl_save_prefix"
17583
17584 case "$x" in
17585 -L*)
17586 dir=`echo "X$x" | sed -e 's/^X-L//'`
17587 if test -n "$acl_shlibext"; then
17588 if test -f "$dir/$libname$shrext"; then
17589 found_dir="$dir"
17590 found_so="$dir/$libname$shrext"
17591 else
17592 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17593 ver=`(cd "$dir" && \
17594 for f in "$libname$shrext".*; do echo "$f"; done \
17595 | sed -e "s,^$libname$shrext\\\\.,," \
17596 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17597 | sed 1q ) 2>/dev/null`
17598 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
17599 found_dir="$dir"
17600 found_so="$dir/$libname$shrext.$ver"
17601 fi
17602 else
17603 eval library_names=\"$acl_library_names_spec\"
17604 for f in $library_names; do
17605 if test -f "$dir/$f"; then
17606 found_dir="$dir"
17607 found_so="$dir/$f"
17608 break
17609 fi
17610 done
17611 fi
17612 fi
17613 fi
17614 if test "X$found_dir" = "X"; then
17615 if test -f "$dir/$libname.$acl_libext"; then
17616 found_dir="$dir"
17617 found_a="$dir/$libname.$acl_libext"
17618 fi
17619 fi
17620 if test "X$found_dir" != "X"; then
17621 if test -f "$dir/$libname.la"; then
17622 found_la="$dir/$libname.la"
17623 fi
17624 fi
17625 ;;
17626 esac
17627 if test "X$found_dir" != "X"; then
17628 break
17629 fi
17630 done
17631 fi
17632 if test "X$found_dir" != "X"; then
17633 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
17634 if test "X$found_so" != "X"; then
17635 if test "$enable_rpath" = no \
17636 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
17637 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
17638 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17639 else
17640 haveit=
17641 for x in $ltrpathdirs; do
17642 if test "X$x" = "X$found_dir"; then
17643 haveit=yes
17644 break
17645 fi
17646 done
17647 if test -z "$haveit"; then
17648 ltrpathdirs="$ltrpathdirs $found_dir"
17649 fi
17650 if test "$acl_hardcode_direct" = yes; then
17651 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17652 else
17653 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
17654 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17655 haveit=
17656 for x in $rpathdirs; do
17657 if test "X$x" = "X$found_dir"; then
17658 haveit=yes
17659 break
17660 fi
17661 done
17662 if test -z "$haveit"; then
17663 rpathdirs="$rpathdirs $found_dir"
17664 fi
17665 else
17666 haveit=
17667 for x in $LDFLAGS $LIBICONV; do
17668
17669 acl_save_prefix="$prefix"
17670 prefix="$acl_final_prefix"
17671 acl_save_exec_prefix="$exec_prefix"
17672 exec_prefix="$acl_final_exec_prefix"
17673 eval x=\"$x\"
17674 exec_prefix="$acl_save_exec_prefix"
17675 prefix="$acl_save_prefix"
17676
17677 if test "X$x" = "X-L$found_dir"; then
17678 haveit=yes
17679 break
17680 fi
17681 done
17682 if test -z "$haveit"; then
17683 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
17684 fi
17685 if test "$acl_hardcode_minus_L" != no; then
17686 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17687 else
17688 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
17689 fi
17690 fi
17691 fi
17692 fi
17693 else
17694 if test "X$found_a" != "X"; then
17695 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
17696 else
17697 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
17698 fi
17699 fi
17700 additional_includedir=
17701 case "$found_dir" in
17702 */$acl_libdirstem | */$acl_libdirstem/)
17703 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
17704 if test "$name" = 'iconv'; then
17705 LIBICONV_PREFIX="$basedir"
17706 fi
17707 additional_includedir="$basedir/include"
17708 ;;
17709 */$acl_libdirstem2 | */$acl_libdirstem2/)
17710 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
17711 if test "$name" = 'iconv'; then
17712 LIBICONV_PREFIX="$basedir"
17713 fi
17714 additional_includedir="$basedir/include"
17715 ;;
17716 esac
17717 if test "X$additional_includedir" != "X"; then
17718 if test "X$additional_includedir" != "X/usr/include"; then
17719 haveit=
17720 if test "X$additional_includedir" = "X/usr/local/include"; then
17721 if test -n "$GCC"; then
17722 case $host_os in
17723 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17724 esac
17725 fi
17726 fi
17727 if test -z "$haveit"; then
17728 for x in $CPPFLAGS $INCICONV; do
17729
17730 acl_save_prefix="$prefix"
17731 prefix="$acl_final_prefix"
17732 acl_save_exec_prefix="$exec_prefix"
17733 exec_prefix="$acl_final_exec_prefix"
17734 eval x=\"$x\"
17735 exec_prefix="$acl_save_exec_prefix"
17736 prefix="$acl_save_prefix"
17737
17738 if test "X$x" = "X-I$additional_includedir"; then
17739 haveit=yes
17740 break
17741 fi
17742 done
17743 if test -z "$haveit"; then
17744 if test -d "$additional_includedir"; then
17745 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
17746 fi
17747 fi
17748 fi
17749 fi
17750 fi
17751 if test -n "$found_la"; then
17752 save_libdir="$libdir"
17753 case "$found_la" in
17754 */* | *\\*) . "$found_la" ;;
17755 *) . "./$found_la" ;;
17756 esac
17757 libdir="$save_libdir"
17758 for dep in $dependency_libs; do
17759 case "$dep" in
17760 -L*)
17761 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17762 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
17763 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
17764 haveit=
17765 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
17766 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
17767 if test -n "$GCC"; then
17768 case $host_os in
17769 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17770 esac
17771 fi
17772 fi
17773 if test -z "$haveit"; then
17774 haveit=
17775 for x in $LDFLAGS $LIBICONV; do
17776
17777 acl_save_prefix="$prefix"
17778 prefix="$acl_final_prefix"
17779 acl_save_exec_prefix="$exec_prefix"
17780 exec_prefix="$acl_final_exec_prefix"
17781 eval x=\"$x\"
17782 exec_prefix="$acl_save_exec_prefix"
17783 prefix="$acl_save_prefix"
17784
17785 if test "X$x" = "X-L$additional_libdir"; then
17786 haveit=yes
17787 break
17788 fi
17789 done
17790 if test -z "$haveit"; then
17791 if test -d "$additional_libdir"; then
17792 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
17793 fi
17794 fi
17795 haveit=
17796 for x in $LDFLAGS $LTLIBICONV; do
17797
17798 acl_save_prefix="$prefix"
17799 prefix="$acl_final_prefix"
17800 acl_save_exec_prefix="$exec_prefix"
17801 exec_prefix="$acl_final_exec_prefix"
17802 eval x=\"$x\"
17803 exec_prefix="$acl_save_exec_prefix"
17804 prefix="$acl_save_prefix"
17805
17806 if test "X$x" = "X-L$additional_libdir"; then
17807 haveit=yes
17808 break
17809 fi
17810 done
17811 if test -z "$haveit"; then
17812 if test -d "$additional_libdir"; then
17813 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
17814 fi
17815 fi
17816 fi
17817 fi
17818 ;;
17819 -R*)
17820 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17821 if test "$enable_rpath" != no; then
17822 haveit=
17823 for x in $rpathdirs; do
17824 if test "X$x" = "X$dir"; then
17825 haveit=yes
17826 break
17827 fi
17828 done
17829 if test -z "$haveit"; then
17830 rpathdirs="$rpathdirs $dir"
17831 fi
17832 haveit=
17833 for x in $ltrpathdirs; do
17834 if test "X$x" = "X$dir"; then
17835 haveit=yes
17836 break
17837 fi
17838 done
17839 if test -z "$haveit"; then
17840 ltrpathdirs="$ltrpathdirs $dir"
17841 fi
17842 fi
17843 ;;
17844 -l*)
17845 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17846 ;;
17847 *.la)
17848 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17849 ;;
17850 *)
17851 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
17852 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
17853 ;;
17854 esac
17855 done
17856 fi
17857 else
17858 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
17859 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
17860 fi
17861 fi
17862 fi
17863 done
17864 done
17865 if test "X$rpathdirs" != "X"; then
17866 if test -n "$acl_hardcode_libdir_separator"; then
17867 alldirs=
17868 for found_dir in $rpathdirs; do
17869 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
17870 done
17871 acl_save_libdir="$libdir"
17872 libdir="$alldirs"
17873 eval flag=\"$acl_hardcode_libdir_flag_spec\"
17874 libdir="$acl_save_libdir"
17875 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
17876 else
17877 for found_dir in $rpathdirs; do
17878 acl_save_libdir="$libdir"
17879 libdir="$found_dir"
17880 eval flag=\"$acl_hardcode_libdir_flag_spec\"
17881 libdir="$acl_save_libdir"
17882 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
17883 done
17884 fi
17885 fi
17886 if test "X$ltrpathdirs" != "X"; then
17887 for found_dir in $ltrpathdirs; do
17888 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
17889 done
17890 fi
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903 am_save_CPPFLAGS="$CPPFLAGS"
17904
17905 for element in $INCICONV; do
17906 haveit=
17907 for x in $CPPFLAGS; do
17908
17909 acl_save_prefix="$prefix"
17910 prefix="$acl_final_prefix"
17911 acl_save_exec_prefix="$exec_prefix"
17912 exec_prefix="$acl_final_exec_prefix"
17913 eval x=\"$x\"
17914 exec_prefix="$acl_save_exec_prefix"
17915 prefix="$acl_save_prefix"
17916
17917 if test "X$x" = "X$element"; then
17918 haveit=yes
17919 break
17920 fi
17921 done
17922 if test -z "$haveit"; then
17923 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17924 fi
17925 done
17926
17927
17928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
17929 printf %s "checking for iconv... " >&6; }
17930 if test ${am_cv_func_iconv+y}
17931 then :
17932 printf %s "(cached) " >&6
17933 else $as_nop
17934
17935 am_cv_func_iconv="no, consider installing GNU libiconv"
17936 am_cv_lib_iconv=no
17937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17938 /* end confdefs.h. */
17939 #include <stdlib.h>
17940 #include <iconv.h>
17941 int
17942 main (void)
17943 {
17944 iconv_t cd = iconv_open("","");
17945 iconv(cd,NULL,NULL,NULL,NULL);
17946 iconv_close(cd);
17947 ;
17948 return 0;
17949 }
17950 _ACEOF
17951 if ac_fn_c_try_link "$LINENO"
17952 then :
17953 am_cv_func_iconv=yes
17954 fi
17955 rm -f core conftest.err conftest.$ac_objext conftest.beam \
17956 conftest$ac_exeext conftest.$ac_ext
17957 if test "$am_cv_func_iconv" != yes; then
17958 am_save_LIBS="$LIBS"
17959 LIBS="$LIBS $LIBICONV"
17960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17961 /* end confdefs.h. */
17962 #include <stdlib.h>
17963 #include <iconv.h>
17964 int
17965 main (void)
17966 {
17967 iconv_t cd = iconv_open("","");
17968 iconv(cd,NULL,NULL,NULL,NULL);
17969 iconv_close(cd);
17970 ;
17971 return 0;
17972 }
17973 _ACEOF
17974 if ac_fn_c_try_link "$LINENO"
17975 then :
17976 am_cv_lib_iconv=yes
17977 am_cv_func_iconv=yes
17978 fi
17979 rm -f core conftest.err conftest.$ac_objext conftest.beam \
17980 conftest$ac_exeext conftest.$ac_ext
17981 LIBS="$am_save_LIBS"
17982 fi
17983
17984 fi
17985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
17986 printf "%s\n" "$am_cv_func_iconv" >&6; }
17987 if test "$am_cv_func_iconv" = yes; then
17988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
17989 printf %s "checking for working iconv... " >&6; }
17990 if test ${am_cv_func_iconv_works+y}
17991 then :
17992 printf %s "(cached) " >&6
17993 else $as_nop
17994
17995 am_save_LIBS="$LIBS"
17996 if test $am_cv_lib_iconv = yes; then
17997 LIBS="$LIBS $LIBICONV"
17998 fi
17999 if test "$cross_compiling" = yes
18000 then :
18001 case "$host_os" in
18002 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
18003 *) am_cv_func_iconv_works="guessing yes" ;;
18004 esac
18005 else $as_nop
18006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18007 /* end confdefs.h. */
18008
18009 #include <iconv.h>
18010 #include <string.h>
18011 int main ()
18012 {
18013 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
18014 returns. */
18015 {
18016 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
18017 if (cd_utf8_to_88591 != (iconv_t)(-1))
18018 {
18019 static const char input[] = "\342\202\254"; /* EURO SIGN */
18020 char buf[10];
18021 const char *inptr = input;
18022 size_t inbytesleft = strlen (input);
18023 char *outptr = buf;
18024 size_t outbytesleft = sizeof (buf);
18025 size_t res = iconv (cd_utf8_to_88591,
18026 (char **) &inptr, &inbytesleft,
18027 &outptr, &outbytesleft);
18028 if (res == 0)
18029 return 1;
18030 }
18031 }
18032 /* Test against Solaris 10 bug: Failures are not distinguishable from
18033 successful returns. */
18034 {
18035 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
18036 if (cd_ascii_to_88591 != (iconv_t)(-1))
18037 {
18038 static const char input[] = "\263";
18039 char buf[10];
18040 const char *inptr = input;
18041 size_t inbytesleft = strlen (input);
18042 char *outptr = buf;
18043 size_t outbytesleft = sizeof (buf);
18044 size_t res = iconv (cd_ascii_to_88591,
18045 (char **) &inptr, &inbytesleft,
18046 &outptr, &outbytesleft);
18047 if (res == 0)
18048 return 1;
18049 }
18050 }
18051 #if 0 /* This bug could be worked around by the caller. */
18052 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
18053 {
18054 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
18055 if (cd_88591_to_utf8 != (iconv_t)(-1))
18056 {
18057 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
18058 char buf[50];
18059 const char *inptr = input;
18060 size_t inbytesleft = strlen (input);
18061 char *outptr = buf;
18062 size_t outbytesleft = sizeof (buf);
18063 size_t res = iconv (cd_88591_to_utf8,
18064 (char **) &inptr, &inbytesleft,
18065 &outptr, &outbytesleft);
18066 if ((int)res > 0)
18067 return 1;
18068 }
18069 }
18070 #endif
18071 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
18072 provided. */
18073 if (/* Try standardized names. */
18074 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
18075 /* Try IRIX, OSF/1 names. */
18076 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
18077 /* Try AIX names. */
18078 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
18079 /* Try HP-UX names. */
18080 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
18081 return 1;
18082 return 0;
18083 }
18084 _ACEOF
18085 if ac_fn_c_try_run "$LINENO"
18086 then :
18087 am_cv_func_iconv_works=yes
18088 else $as_nop
18089 am_cv_func_iconv_works=no
18090 fi
18091 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18092 conftest.$ac_objext conftest.beam conftest.$ac_ext
18093 fi
18094
18095 LIBS="$am_save_LIBS"
18096
18097 fi
18098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
18099 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
18100 case "$am_cv_func_iconv_works" in
18101 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
18102 *) am_func_iconv=yes ;;
18103 esac
18104 else
18105 am_func_iconv=no am_cv_lib_iconv=no
18106 fi
18107 if test "$am_func_iconv" = yes; then
18108
18109 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
18110
18111 fi
18112 if test "$am_cv_lib_iconv" = yes; then
18113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
18114 printf %s "checking how to link with libiconv... " >&6; }
18115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
18116 printf "%s\n" "$LIBICONV" >&6; }
18117 else
18118 CPPFLAGS="$am_save_CPPFLAGS"
18119 LIBICONV=
18120 LTLIBICONV=
18121 fi
18122
18123
18124
18125 if test "$am_cv_func_iconv" = yes; then
18126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
18127 printf %s "checking for iconv declaration... " >&6; }
18128 if test ${am_cv_proto_iconv+y}
18129 then :
18130 printf %s "(cached) " >&6
18131 else $as_nop
18132
18133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18134 /* end confdefs.h. */
18135
18136 #include <stdlib.h>
18137 #include <iconv.h>
18138 extern
18139 #ifdef __cplusplus
18140 "C"
18141 #endif
18142 #if defined(__STDC__) || defined(__cplusplus)
18143 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
18144 #else
18145 size_t iconv();
18146 #endif
18147
18148 int
18149 main (void)
18150 {
18151
18152 ;
18153 return 0;
18154 }
18155 _ACEOF
18156 if ac_fn_c_try_compile "$LINENO"
18157 then :
18158 am_cv_proto_iconv_arg1=""
18159 else $as_nop
18160 am_cv_proto_iconv_arg1="const"
18161 fi
18162 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18163 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
18164 fi
18165
18166 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
18167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
18168 $am_cv_proto_iconv" >&5
18169 printf "%s\n" "
18170 $am_cv_proto_iconv" >&6; }
18171
18172 printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h
18173
18174 fi
18175
18176 if test x${OS_CYGWIN} = xtrue; then
18177 CYGWIN_TRUE=
18178 CYGWIN_FALSE='#'
18179 else
18180 CYGWIN_TRUE='#'
18181 CYGWIN_FALSE=
18182 fi
18183
18184
18185 # iconvctl is not standard, it is defined only in GNU libiconv
18186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconvctl" >&5
18187 printf %s "checking for iconvctl... " >&6; }
18188 TMPLIBS="${LIBS}"
18189 LIBS="${LIBS} ${LIBICONV}"
18190
18191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18192 /* end confdefs.h. */
18193 #include <stdlib.h>
18194 #include <iconv.h>
18195 int
18196 main (void)
18197 {
18198 int iconv_param = 0;
18199 iconv_t cd = iconv_open("","");
18200 iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, &iconv_param);
18201 iconv_close(cd);
18202 ;
18203 return 0;
18204 }
18205 _ACEOF
18206 if ac_fn_c_try_link "$LINENO"
18207 then :
18208 ac_cv_func_iconvctl=yes
18209 fi
18210 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18211 conftest$ac_exeext conftest.$ac_ext
18212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_iconvctl" >&5
18213 printf "%s\n" "$ac_cv_func_iconvctl" >&6; }
18214 if test "$ac_cv_func_iconvctl" == yes; then
18215
18216 printf "%s\n" "#define HAVE_ICONVCTL 1" >>confdefs.h
18217
18218 fi
18219 LIBS="${TMPLIBS}"
18220
18221
18222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc support of -Wstrict-overflow=1" >&5
18223 printf %s "checking for gcc support of -Wstrict-overflow=1... " >&6; }
18224 TMPCFLAGS="${CFLAGS}"
18225 CFLAGS="${CFLAGS} -Wstrict-overflow=1"
18226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18227 /* end confdefs.h. */
18228
18229 int
18230 main (void)
18231 {
18232
18233 ;
18234 return 0;
18235 }
18236 _ACEOF
18237 if ac_fn_c_try_compile "$LINENO"
18238 then :
18239 gcc_have_strict_overflow=yes
18240 else $as_nop
18241 gcc_have_strict_overflow=no
18242 fi
18243 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_have_strict_overflow" >&5
18245 printf "%s\n" "$gcc_have_strict_overflow" >&6; }
18246 if test "$gcc_have_strict_overflow" != "yes"; then
18247 CFLAGS="${TMPCFLAGS}"
18248 fi
18249
18250 if test "$NO_STACK_PROTECTOR" != "true"; then
18251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc support of stack smashing protection" >&5
18252 printf %s "checking for gcc support of stack smashing protection... " >&6; }
18253 TMPCFLAGS="${CFLAGS}"
18254 CFLAGS="${CFLAGS} -fstack-protector"
18255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18256 /* end confdefs.h. */
18257
18258 int
18259 main (void)
18260 {
18261
18262 ;
18263 return 0;
18264 }
18265 _ACEOF
18266 if ac_fn_c_try_compile "$LINENO"
18267 then :
18268 gcc_have_fstack_protector=yes
18269 else $as_nop
18270 gcc_have_fstack_protector=no
18271 fi
18272 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_have_fstack_protector" >&5
18274 printf "%s\n" "$gcc_have_fstack_protector" >&6; }
18275 if test "$gcc_have_fstack_protector" != "yes"; then
18276 CFLAGS="${TMPCFLAGS}"
18277 fi
18278 fi
18279
18280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc support of FORTIFY_SOURCE" >&5
18281 printf %s "checking for gcc support of FORTIFY_SOURCE... " >&6; }
18282 TMPCFLAGS="${CFLAGS}"
18283 CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=2"
18284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18285 /* end confdefs.h. */
18286
18287 int
18288 main (void)
18289 {
18290
18291 ;
18292 return 0;
18293 }
18294 _ACEOF
18295 if ac_fn_c_try_compile "$LINENO"
18296 then :
18297 gcc_have_fortify_source=yes
18298 else $as_nop
18299 gcc_have_fortify_source=no
18300 fi
18301 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_have_fortify_source" >&5
18303 printf "%s\n" "$gcc_have_fortify_source" >&6; }
18304 if test "$gcc_have_fortify_source" != "yes"; then
18305 CFLAGS="${TMPCFLAGS}"
18306 fi
18307
18308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc support of -Wformat -Wformat-security" >&5
18309 printf %s "checking for gcc support of -Wformat -Wformat-security... " >&6; }
18310 TMPCFLAGS="${CFLAGS}"
18311 CFLAGS="${CFLAGS} -Wformat -Wformat-security"
18312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18313 /* end confdefs.h. */
18314
18315 int
18316 main (void)
18317 {
18318
18319 ;
18320 return 0;
18321 }
18322 _ACEOF
18323 if ac_fn_c_try_compile "$LINENO"
18324 then :
18325 gcc_have_format_security=yes
18326 else $as_nop
18327 gcc_have_format_security=no
18328 fi
18329 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_have_format_security" >&5
18331 printf "%s\n" "$gcc_have_format_security" >&6; }
18332 if test "$gcc_have_format_security" != "yes"; then
18333 CFLAGS="${TMPCFLAGS}"
18334 fi
18335
18336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc support of -fPIC" >&5
18337 printf %s "checking for gcc support of -fPIC... " >&6; }
18338 TMPCFLAGS="${CFLAGS}"
18339 CFLAGS="${CFLAGS} -fPIC"
18340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18341 /* end confdefs.h. */
18342
18343 int
18344 main (void)
18345 {
18346
18347 ;
18348 return 0;
18349 }
18350 _ACEOF
18351 if ac_fn_c_try_compile "$LINENO"
18352 then :
18353 gcc_have_fpic=yes
18354 else $as_nop
18355 gcc_have_fpic=no
18356 fi
18357 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_have_fpic" >&5
18359 printf "%s\n" "$gcc_have_fpic" >&6; }
18360 if test "$gcc_have_fpic" != "yes"; then
18361 CFLAGS="${TMPCFLAGS}"
18362 fi
18363
18364
18365 # Check whether --with-doxygen was given.
18366 if test ${with_doxygen+y}
18367 then :
18368 withval=$with_doxygen; doxygen="$withval"
18369 else $as_nop
18370 doxygen=no
18371 fi
18372
18373
18374 if test "$doxygen" != "no"; then
18375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using doxygen: $doxygen" >&5
18376 printf "%s\n" "$as_me: Using doxygen: $doxygen" >&6;}
18377 else
18378 for ac_prog in doxygen
18379 do
18380 # Extract the first word of "$ac_prog", so it can be a program name with args.
18381 set dummy $ac_prog; ac_word=$2
18382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18383 printf %s "checking for $ac_word... " >&6; }
18384 if test ${ac_cv_path_doxygen+y}
18385 then :
18386 printf %s "(cached) " >&6
18387 else $as_nop
18388 case $doxygen in
18389 [\\/]* | ?:[\\/]*)
18390 ac_cv_path_doxygen="$doxygen" # Let the user override the test with a path.
18391 ;;
18392 *)
18393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18394 for as_dir in $PATH
18395 do
18396 IFS=$as_save_IFS
18397 case $as_dir in #(((
18398 '') as_dir=./ ;;
18399 */) ;;
18400 *) as_dir=$as_dir/ ;;
18401 esac
18402 for ac_exec_ext in '' $ac_executable_extensions; do
18403 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18404 ac_cv_path_doxygen="$as_dir$ac_word$ac_exec_ext"
18405 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18406 break 2
18407 fi
18408 done
18409 done
18410 IFS=$as_save_IFS
18411
18412 ;;
18413 esac
18414 fi
18415 doxygen=$ac_cv_path_doxygen
18416 if test -n "$doxygen"; then
18417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
18418 printf "%s\n" "$doxygen" >&6; }
18419 else
18420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18421 printf "%s\n" "no" >&6; }
18422 fi
18423
18424
18425 test -n "$doxygen" && break
18426 done
18427
18428 fi
18429
18430 DOXYGEN=$doxygen
18431
18432
18433 # Extract the first word of "lcov", so it can be a program name with args.
18434 set dummy lcov; ac_word=$2
18435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18436 printf %s "checking for $ac_word... " >&6; }
18437 if test ${ac_cv_path_LCOV+y}
18438 then :
18439 printf %s "(cached) " >&6
18440 else $as_nop
18441 case $LCOV in
18442 [\\/]* | ?:[\\/]*)
18443 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
18444 ;;
18445 *)
18446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18447 for as_dir in $PATH
18448 do
18449 IFS=$as_save_IFS
18450 case $as_dir in #(((
18451 '') as_dir=./ ;;
18452 */) ;;
18453 *) as_dir=$as_dir/ ;;
18454 esac
18455 for ac_exec_ext in '' $ac_executable_extensions; do
18456 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18457 ac_cv_path_LCOV="$as_dir$ac_word$ac_exec_ext"
18458 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18459 break 2
18460 fi
18461 done
18462 done
18463 IFS=$as_save_IFS
18464
18465 test -z "$ac_cv_path_LCOV" && ac_cv_path_LCOV="no"
18466 ;;
18467 esac
18468 fi
18469 LCOV=$ac_cv_path_LCOV
18470 if test -n "$LCOV"; then
18471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
18472 printf "%s\n" "$LCOV" >&6; }
18473 else
18474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18475 printf "%s\n" "no" >&6; }
18476 fi
18477
18478
18479
18480
18481
18482
18483
18484 ac_config_files="$ac_config_files Makefile htp.pc htp/Makefile htp/lzma/Makefile test/Makefile docs/Makefile"
18485
18486 cat >confcache <<\_ACEOF
18487 # This file is a shell script that caches the results of configure
18488 # tests run on this system so they can be shared between configure
18489 # scripts and configure runs, see configure's option --config-cache.
18490 # It is not useful on other systems. If it contains results you don't
18491 # want to keep, you may remove or edit it.
18492 #
18493 # config.status only pays attention to the cache file if you give it
18494 # the --recheck option to rerun configure.
18495 #
18496 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18497 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18498 # following values.
18499
18500 _ACEOF
18501
18502 # The following way of writing the cache mishandles newlines in values,
18503 # but we know of no workaround that is simple, portable, and efficient.
18504 # So, we kill variables containing newlines.
18505 # Ultrix sh set writes to stderr and can't be redirected directly,
18506 # and sets the high bit in the cache file unless we assign to the vars.
18507 (
18508 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18509 eval ac_val=\$$ac_var
18510 case $ac_val in #(
18511 *${as_nl}*)
18512 case $ac_var in #(
18513 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18514 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18515 esac
18516 case $ac_var in #(
18517 _ | IFS | as_nl) ;; #(
18518 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18519 *) { eval $ac_var=; unset $ac_var;} ;;
18520 esac ;;
18521 esac
18522 done
18523
18524 (set) 2>&1 |
18525 case $as_nl`(ac_space=' '; set) 2>&1` in #(
18526 *${as_nl}ac_space=\ *)
18527 # `set' does not quote correctly, so add quotes: double-quote
18528 # substitution turns \\\\ into \\, and sed turns \\ into \.
18529 sed -n \
18530 "s/'/'\\\\''/g;
18531 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18532 ;; #(
18533 *)
18534 # `set' quotes correctly as required by POSIX, so do not add quotes.
18535 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18536 ;;
18537 esac |
18538 sort
18539 ) |
18540 sed '
18541 /^ac_cv_env_/b end
18542 t clear
18543 :clear
18544 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
18545 t end
18546 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18547 :end' >>confcache
18548 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18549 if test -w "$cache_file"; then
18550 if test "x$cache_file" != "x/dev/null"; then
18551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18552 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
18553 if test ! -f "$cache_file" || test -h "$cache_file"; then
18554 cat confcache >"$cache_file"
18555 else
18556 case $cache_file in #(
18557 */* | ?:*)
18558 mv -f confcache "$cache_file"$$ &&
18559 mv -f "$cache_file"$$ "$cache_file" ;; #(
18560 *)
18561 mv -f confcache "$cache_file" ;;
18562 esac
18563 fi
18564 fi
18565 else
18566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18567 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
18568 fi
18569 fi
18570 rm -f confcache
18571
18572 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18573 # Let make expand exec_prefix.
18574 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18575
18576 DEFS=-DHAVE_CONFIG_H
18577
18578 ac_libobjs=
18579 ac_ltlibobjs=
18580 U=
18581 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18582 # 1. Remove the extension, and $U if already installed.
18583 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18584 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
18585 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18586 # will be set to the directory where LIBOBJS objects are built.
18587 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18588 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18589 done
18590 LIBOBJS=$ac_libobjs
18591
18592 LTLIBOBJS=$ac_ltlibobjs
18593
18594
18595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
18596 printf %s "checking that generated files are newer than configure... " >&6; }
18597 if test -n "$am_sleep_pid"; then
18598 # Hide warnings about reused PIDs.
18599 wait $am_sleep_pid 2>/dev/null
18600 fi
18601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
18602 printf "%s\n" "done" >&6; }
18603 if test -n "$EXEEXT"; then
18604 am__EXEEXT_TRUE=
18605 am__EXEEXT_FALSE='#'
18606 else
18607 am__EXEEXT_TRUE='#'
18608 am__EXEEXT_FALSE=
18609 fi
18610
18611 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
18612 as_fn_error $? "conditional \"AMDEP\" was never defined.
18613 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18614 fi
18615 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
18616 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
18617 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18618 fi
18619 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
18620 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
18621 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18622 fi
18623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
18624 printf %s "checking that generated files are newer than configure... " >&6; }
18625 if test -n "$am_sleep_pid"; then
18626 # Hide warnings about reused PIDs.
18627 wait $am_sleep_pid 2>/dev/null
18628 fi
18629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
18630 printf "%s\n" "done" >&6; }
18631 if test -z "${CYGWIN_TRUE}" && test -z "${CYGWIN_FALSE}"; then
18632 as_fn_error $? "conditional \"CYGWIN\" was never defined.
18633 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18634 fi
18635
18636 : "${CONFIG_STATUS=./config.status}"
18637 ac_write_fail=0
18638 ac_clean_files_save=$ac_clean_files
18639 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18641 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
18642 as_write_fail=0
18643 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18644 #! $SHELL
18645 # Generated by $as_me.
18646 # Run this file to recreate the current configuration.
18647 # Compiler output produced by configure, useful for debugging
18648 # configure, is in config.log if it exists.
18649
18650 debug=false
18651 ac_cs_recheck=false
18652 ac_cs_silent=false
18653
18654 SHELL=\${CONFIG_SHELL-$SHELL}
18655 export SHELL
18656 _ASEOF
18657 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18658 ## -------------------- ##
18659 ## M4sh Initialization. ##
18660 ## -------------------- ##
18661
18662 # Be more Bourne compatible
18663 DUALCASE=1; export DUALCASE # for MKS sh
18664 as_nop=:
18665 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
18666 then :
18667 emulate sh
18668 NULLCMD=:
18669 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18670 # is contrary to our usage. Disable this feature.
18671 alias -g '${1+"$@"}'='"$@"'
18672 setopt NO_GLOB_SUBST
18673 else $as_nop
18674 case `(set -o) 2>/dev/null` in #(
18675 *posix*) :
18676 set -o posix ;; #(
18677 *) :
18678 ;;
18679 esac
18680 fi
18681
18682
18683
18684 # Reset variables that may have inherited troublesome values from
18685 # the environment.
18686
18687 # IFS needs to be set, to space, tab, and newline, in precisely that order.
18688 # (If _AS_PATH_WALK were called with IFS unset, it would have the
18689 # side effect of setting IFS to empty, thus disabling word splitting.)
18690 # Quoting is to prevent editors from complaining about space-tab.
18691 as_nl='
18692 '
18693 export as_nl
18694 IFS=" "" $as_nl"
18695
18696 PS1='$ '
18697 PS2='> '
18698 PS4='+ '
18699
18700 # Ensure predictable behavior from utilities with locale-dependent output.
18701 LC_ALL=C
18702 export LC_ALL
18703 LANGUAGE=C
18704 export LANGUAGE
18705
18706 # We cannot yet rely on "unset" to work, but we need these variables
18707 # to be unset--not just set to an empty or harmless value--now, to
18708 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
18709 # also avoids known problems related to "unset" and subshell syntax
18710 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
18711 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
18712 do eval test \${$as_var+y} \
18713 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18714 done
18715
18716 # Ensure that fds 0, 1, and 2 are open.
18717 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
18718 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
18719 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
18720
18721 # The user is always right.
18722 if ${PATH_SEPARATOR+false} :; then
18723 PATH_SEPARATOR=:
18724 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18725 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18726 PATH_SEPARATOR=';'
18727 }
18728 fi
18729
18730
18731 # Find who we are. Look in the path if we contain no directory separator.
18732 as_myself=
18733 case $0 in #((
18734 *[\\/]* ) as_myself=$0 ;;
18735 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18736 for as_dir in $PATH
18737 do
18738 IFS=$as_save_IFS
18739 case $as_dir in #(((
18740 '') as_dir=./ ;;
18741 */) ;;
18742 *) as_dir=$as_dir/ ;;
18743 esac
18744 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
18745 done
18746 IFS=$as_save_IFS
18747
18748 ;;
18749 esac
18750 # We did not find ourselves, most probably we were run as `sh COMMAND'
18751 # in which case we are not to be found in the path.
18752 if test "x$as_myself" = x; then
18753 as_myself=$0
18754 fi
18755 if test ! -f "$as_myself"; then
18756 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18757 exit 1
18758 fi
18759
18760
18761
18762 # as_fn_error STATUS ERROR [LINENO LOG_FD]
18763 # ----------------------------------------
18764 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18765 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18766 # script with STATUS, using 1 if that was 0.
18767 as_fn_error ()
18768 {
18769 as_status=$1; test $as_status -eq 0 && as_status=1
18770 if test "$4"; then
18771 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18772 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
18773 fi
18774 printf "%s\n" "$as_me: error: $2" >&2
18775 as_fn_exit $as_status
18776 } # as_fn_error
18777
18778
18779
18780 # as_fn_set_status STATUS
18781 # -----------------------
18782 # Set $? to STATUS, without forking.
18783 as_fn_set_status ()
18784 {
18785 return $1
18786 } # as_fn_set_status
18787
18788 # as_fn_exit STATUS
18789 # -----------------
18790 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18791 as_fn_exit ()
18792 {
18793 set +e
18794 as_fn_set_status $1
18795 exit $1
18796 } # as_fn_exit
18797
18798 # as_fn_unset VAR
18799 # ---------------
18800 # Portably unset VAR.
18801 as_fn_unset ()
18802 {
18803 { eval $1=; unset $1;}
18804 }
18805 as_unset=as_fn_unset
18806
18807 # as_fn_append VAR VALUE
18808 # ----------------------
18809 # Append the text in VALUE to the end of the definition contained in VAR. Take
18810 # advantage of any shell optimizations that allow amortized linear growth over
18811 # repeated appends, instead of the typical quadratic growth present in naive
18812 # implementations.
18813 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
18814 then :
18815 eval 'as_fn_append ()
18816 {
18817 eval $1+=\$2
18818 }'
18819 else $as_nop
18820 as_fn_append ()
18821 {
18822 eval $1=\$$1\$2
18823 }
18824 fi # as_fn_append
18825
18826 # as_fn_arith ARG...
18827 # ------------------
18828 # Perform arithmetic evaluation on the ARGs, and store the result in the
18829 # global $as_val. Take advantage of shells that can avoid forks. The arguments
18830 # must be portable across $(()) and expr.
18831 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
18832 then :
18833 eval 'as_fn_arith ()
18834 {
18835 as_val=$(( $* ))
18836 }'
18837 else $as_nop
18838 as_fn_arith ()
18839 {
18840 as_val=`expr "$@" || test $? -eq 1`
18841 }
18842 fi # as_fn_arith
18843
18844
18845 if expr a : '\(a\)' >/dev/null 2>&1 &&
18846 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18847 as_expr=expr
18848 else
18849 as_expr=false
18850 fi
18851
18852 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18853 as_basename=basename
18854 else
18855 as_basename=false
18856 fi
18857
18858 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18859 as_dirname=dirname
18860 else
18861 as_dirname=false
18862 fi
18863
18864 as_me=`$as_basename -- "$0" ||
18865 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18866 X"$0" : 'X\(//\)$' \| \
18867 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18868 printf "%s\n" X/"$0" |
18869 sed '/^.*\/\([^/][^/]*\)\/*$/{
18870 s//\1/
18871 q
18872 }
18873 /^X\/\(\/\/\)$/{
18874 s//\1/
18875 q
18876 }
18877 /^X\/\(\/\).*/{
18878 s//\1/
18879 q
18880 }
18881 s/.*/./; q'`
18882
18883 # Avoid depending upon Character Ranges.
18884 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18885 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18886 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18887 as_cr_digits='0123456789'
18888 as_cr_alnum=$as_cr_Letters$as_cr_digits
18889
18890
18891 # Determine whether it's possible to make 'echo' print without a newline.
18892 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
18893 # for compatibility with existing Makefiles.
18894 ECHO_C= ECHO_N= ECHO_T=
18895 case `echo -n x` in #(((((
18896 -n*)
18897 case `echo 'xy\c'` in
18898 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18899 xy) ECHO_C='\c';;
18900 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18901 ECHO_T=' ';;
18902 esac;;
18903 *)
18904 ECHO_N='-n';;
18905 esac
18906
18907 # For backward compatibility with old third-party macros, we provide
18908 # the shell variables $as_echo and $as_echo_n. New code should use
18909 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
18910 as_echo='printf %s\n'
18911 as_echo_n='printf %s'
18912
18913 rm -f conf$$ conf$$.exe conf$$.file
18914 if test -d conf$$.dir; then
18915 rm -f conf$$.dir/conf$$.file
18916 else
18917 rm -f conf$$.dir
18918 mkdir conf$$.dir 2>/dev/null
18919 fi
18920 if (echo >conf$$.file) 2>/dev/null; then
18921 if ln -s conf$$.file conf$$ 2>/dev/null; then
18922 as_ln_s='ln -s'
18923 # ... but there are two gotchas:
18924 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18925 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18926 # In both cases, we have to default to `cp -pR'.
18927 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18928 as_ln_s='cp -pR'
18929 elif ln conf$$.file conf$$ 2>/dev/null; then
18930 as_ln_s=ln
18931 else
18932 as_ln_s='cp -pR'
18933 fi
18934 else
18935 as_ln_s='cp -pR'
18936 fi
18937 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18938 rmdir conf$$.dir 2>/dev/null
18939
18940
18941 # as_fn_mkdir_p
18942 # -------------
18943 # Create "$as_dir" as a directory, including parents if necessary.
18944 as_fn_mkdir_p ()
18945 {
18946
18947 case $as_dir in #(
18948 -*) as_dir=./$as_dir;;
18949 esac
18950 test -d "$as_dir" || eval $as_mkdir_p || {
18951 as_dirs=
18952 while :; do
18953 case $as_dir in #(
18954 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18955 *) as_qdir=$as_dir;;
18956 esac
18957 as_dirs="'$as_qdir' $as_dirs"
18958 as_dir=`$as_dirname -- "$as_dir" ||
18959 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18960 X"$as_dir" : 'X\(//\)[^/]' \| \
18961 X"$as_dir" : 'X\(//\)$' \| \
18962 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18963 printf "%s\n" X"$as_dir" |
18964 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18965 s//\1/
18966 q
18967 }
18968 /^X\(\/\/\)[^/].*/{
18969 s//\1/
18970 q
18971 }
18972 /^X\(\/\/\)$/{
18973 s//\1/
18974 q
18975 }
18976 /^X\(\/\).*/{
18977 s//\1/
18978 q
18979 }
18980 s/.*/./; q'`
18981 test -d "$as_dir" && break
18982 done
18983 test -z "$as_dirs" || eval "mkdir $as_dirs"
18984 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
18985
18986
18987 } # as_fn_mkdir_p
18988 if mkdir -p . 2>/dev/null; then
18989 as_mkdir_p='mkdir -p "$as_dir"'
18990 else
18991 test -d ./-p && rmdir ./-p
18992 as_mkdir_p=false
18993 fi
18994
18995
18996 # as_fn_executable_p FILE
18997 # -----------------------
18998 # Test if FILE is an executable regular file.
18999 as_fn_executable_p ()
19000 {
19001 test -f "$1" && test -x "$1"
19002 } # as_fn_executable_p
19003 as_test_x='test -x'
19004 as_executable_p=as_fn_executable_p
19005
19006 # Sed expression to map a string onto a valid CPP name.
19007 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19008
19009 # Sed expression to map a string onto a valid variable name.
19010 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19011
19012
19013 exec 6>&1
19014 ## ----------------------------------- ##
19015 ## Main body of $CONFIG_STATUS script. ##
19016 ## ----------------------------------- ##
19017 _ASEOF
19018 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19019
19020 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19021 # Save the log message, to keep $0 and so on meaningful, and to
19022 # report actual input values of CONFIG_FILES etc. instead of their
19023 # values after options handling.
19024 ac_log="
19025 This file was extended by LibHTP $as_me 0.5.38, which was
19026 generated by GNU Autoconf 2.71. Invocation command line was
19027
19028 CONFIG_FILES = $CONFIG_FILES
19029 CONFIG_HEADERS = $CONFIG_HEADERS
19030 CONFIG_LINKS = $CONFIG_LINKS
19031 CONFIG_COMMANDS = $CONFIG_COMMANDS
19032 $ $0 $@
19033
19034 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19035 "
19036
19037 _ACEOF
19038
19039 case $ac_config_files in *"
19040 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19041 esac
19042
19043 case $ac_config_headers in *"
19044 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19045 esac
19046
19047
19048 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19049 # Files that config.status was made for.
19050 config_files="$ac_config_files"
19051 config_headers="$ac_config_headers"
19052 config_commands="$ac_config_commands"
19053
19054 _ACEOF
19055
19056 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19057 ac_cs_usage="\
19058 \`$as_me' instantiates files and other configuration actions
19059 from templates according to the current configuration. Unless the files
19060 and actions are specified as TAGs, all are instantiated by default.
19061
19062 Usage: $0 [OPTION]... [TAG]...
19063
19064 -h, --help print this help, then exit
19065 -V, --version print version number and configuration settings, then exit
19066 --config print configuration, then exit
19067 -q, --quiet, --silent
19068 do not print progress messages
19069 -d, --debug don't remove temporary files
19070 --recheck update $as_me by reconfiguring in the same conditions
19071 --file=FILE[:TEMPLATE]
19072 instantiate the configuration file FILE
19073 --header=FILE[:TEMPLATE]
19074 instantiate the configuration header FILE
19075
19076 Configuration files:
19077 $config_files
19078
19079 Configuration headers:
19080 $config_headers
19081
19082 Configuration commands:
19083 $config_commands
19084
19085 Report bugs to the package provider."
19086
19087 _ACEOF
19088 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
19089 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
19090 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19091 ac_cs_config='$ac_cs_config_escaped'
19092 ac_cs_version="\\
19093 LibHTP config.status 0.5.38
19094 configured by $0, generated by GNU Autoconf 2.71,
19095 with options \\"\$ac_cs_config\\"
19096
19097 Copyright (C) 2021 Free Software Foundation, Inc.
19098 This config.status script is free software; the Free Software Foundation
19099 gives unlimited permission to copy, distribute and modify it."
19100
19101 ac_pwd='$ac_pwd'
19102 srcdir='$srcdir'
19103 INSTALL='$INSTALL'
19104 MKDIR_P='$MKDIR_P'
19105 AWK='$AWK'
19106 test -n "\$AWK" || AWK=awk
19107 _ACEOF
19108
19109 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19110 # The default lists apply if the user does not specify any file.
19111 ac_need_defaults=:
19112 while test $# != 0
19113 do
19114 case $1 in
19115 --*=?*)
19116 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19117 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19118 ac_shift=:
19119 ;;
19120 --*=)
19121 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19122 ac_optarg=
19123 ac_shift=:
19124 ;;
19125 *)
19126 ac_option=$1
19127 ac_optarg=$2
19128 ac_shift=shift
19129 ;;
19130 esac
19131
19132 case $ac_option in
19133 # Handling of the options.
19134 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19135 ac_cs_recheck=: ;;
19136 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19137 printf "%s\n" "$ac_cs_version"; exit ;;
19138 --config | --confi | --conf | --con | --co | --c )
19139 printf "%s\n" "$ac_cs_config"; exit ;;
19140 --debug | --debu | --deb | --de | --d | -d )
19141 debug=: ;;
19142 --file | --fil | --fi | --f )
19143 $ac_shift
19144 case $ac_optarg in
19145 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19146 '') as_fn_error $? "missing file argument" ;;
19147 esac
19148 as_fn_append CONFIG_FILES " '$ac_optarg'"
19149 ac_need_defaults=false;;
19150 --header | --heade | --head | --hea )
19151 $ac_shift
19152 case $ac_optarg in
19153 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19154 esac
19155 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19156 ac_need_defaults=false;;
19157 --he | --h)
19158 # Conflict between --help and --header
19159 as_fn_error $? "ambiguous option: \`$1'
19160 Try \`$0 --help' for more information.";;
19161 --help | --hel | -h )
19162 printf "%s\n" "$ac_cs_usage"; exit ;;
19163 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19164 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19165 ac_cs_silent=: ;;
19166
19167 # This is an error.
19168 -*) as_fn_error $? "unrecognized option: \`$1'
19169 Try \`$0 --help' for more information." ;;
19170
19171 *) as_fn_append ac_config_targets " $1"
19172 ac_need_defaults=false ;;
19173
19174 esac
19175 shift
19176 done
19177
19178 ac_configure_extra_args=
19179
19180 if $ac_cs_silent; then
19181 exec 6>/dev/null
19182 ac_configure_extra_args="$ac_configure_extra_args --silent"
19183 fi
19184
19185 _ACEOF
19186 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19187 if \$ac_cs_recheck; then
19188 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19189 shift
19190 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
19191 CONFIG_SHELL='$SHELL'
19192 export CONFIG_SHELL
19193 exec "\$@"
19194 fi
19195
19196 _ACEOF
19197 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19198 exec 5>>config.log
19199 {
19200 echo
19201 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19202 ## Running $as_me. ##
19203 _ASBOX
19204 printf "%s\n" "$ac_log"
19205 } >&5
19206
19207 _ACEOF
19208 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19209 #
19210 # INIT-COMMANDS
19211 #
19212 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
19213
19214
19215 # The HP-UX ksh and POSIX shell print the target directory to stdout
19216 # if CDPATH is set.
19217 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19218
19219 sed_quote_subst='$sed_quote_subst'
19220 double_quote_subst='$double_quote_subst'
19221 delay_variable_subst='$delay_variable_subst'
19222 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
19223 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
19224 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
19225 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
19226 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
19227 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
19228 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
19229 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
19230 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
19231 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
19232 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
19233 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
19234 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
19235 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
19236 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
19237 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
19238 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
19239 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
19240 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
19241 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
19242 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
19243 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
19244 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
19245 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
19246 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
19247 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
19248 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
19249 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
19250 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
19251 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
19252 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
19253 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
19254 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
19255 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
19256 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
19257 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
19258 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
19259 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
19260 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
19261 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
19262 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
19263 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
19264 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
19265 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
19266 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
19267 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
19268 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
19269 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
19270 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
19271 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
19272 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
19273 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
19274 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
19275 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
19276 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
19277 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
19278 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
19279 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
19280 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"`'
19281 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
19282 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
19283 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
19284 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
19285 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
19286 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
19287 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
19288 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
19289 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
19290 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
19291 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
19292 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
19293 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
19294 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
19295 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
19296 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
19297 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
19298 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
19299 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
19300 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
19301 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
19302 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
19303 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
19304 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
19305 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
19306 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
19307 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
19308 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
19309 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
19310 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
19311 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
19312 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
19313 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
19314 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
19315 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
19316 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
19317 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
19318 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
19319 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
19320 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
19321 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
19322 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
19323 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
19324 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
19325 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
19326 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
19327 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
19328 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
19329 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
19330 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
19331 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
19332 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
19333 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
19334 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
19335 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
19336 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
19337 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
19338 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
19339 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
19340 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
19341 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
19342 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
19343 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
19344 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
19345 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
19346 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
19347 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
19348 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
19349 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
19350 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
19351 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
19352 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
19353 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
19354 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
19355 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
19356 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
19357 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
19358 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
19359 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
19360 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
19361 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
19362 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
19363 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
19364 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
19365 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19366 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19367 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
19368 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
19369 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
19370 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
19371 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
19372 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
19373 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
19374 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
19375 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
19376 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
19377 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
19378 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
19379 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19380 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19381 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19382 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19383 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19384 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19385 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
19386 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
19387 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
19388 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
19389 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
19390 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
19391 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
19392 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
19393 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
19394 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
19395 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
19396 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
19397 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
19398 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19399 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
19400 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
19401 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19402 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19403 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
19404 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
19405 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
19406 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
19407 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
19408 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
19409 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
19410 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
19411
19412 LTCC='$LTCC'
19413 LTCFLAGS='$LTCFLAGS'
19414 compiler='$compiler_DEFAULT'
19415
19416 # A function that is used when there is no print builtin or printf.
19417 func_fallback_echo ()
19418 {
19419 eval 'cat <<_LTECHO_EOF
19420 \$1
19421 _LTECHO_EOF'
19422 }
19423
19424 # Quote evaled strings.
19425 for var in SHELL \
19426 ECHO \
19427 PATH_SEPARATOR \
19428 SED \
19429 GREP \
19430 EGREP \
19431 FGREP \
19432 LD \
19433 NM \
19434 LN_S \
19435 lt_SP2NL \
19436 lt_NL2SP \
19437 reload_flag \
19438 OBJDUMP \
19439 deplibs_check_method \
19440 file_magic_cmd \
19441 file_magic_glob \
19442 want_nocaseglob \
19443 DLLTOOL \
19444 sharedlib_from_linklib_cmd \
19445 AR \
19446 AR_FLAGS \
19447 archiver_list_spec \
19448 STRIP \
19449 RANLIB \
19450 CC \
19451 CFLAGS \
19452 compiler \
19453 lt_cv_sys_global_symbol_pipe \
19454 lt_cv_sys_global_symbol_to_cdecl \
19455 lt_cv_sys_global_symbol_to_import \
19456 lt_cv_sys_global_symbol_to_c_name_address \
19457 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
19458 lt_cv_nm_interface \
19459 nm_file_list_spec \
19460 lt_cv_truncate_bin \
19461 lt_prog_compiler_no_builtin_flag \
19462 lt_prog_compiler_pic \
19463 lt_prog_compiler_wl \
19464 lt_prog_compiler_static \
19465 lt_cv_prog_compiler_c_o \
19466 need_locks \
19467 MANIFEST_TOOL \
19468 DSYMUTIL \
19469 NMEDIT \
19470 LIPO \
19471 OTOOL \
19472 OTOOL64 \
19473 shrext_cmds \
19474 export_dynamic_flag_spec \
19475 whole_archive_flag_spec \
19476 compiler_needs_object \
19477 with_gnu_ld \
19478 allow_undefined_flag \
19479 no_undefined_flag \
19480 hardcode_libdir_flag_spec \
19481 hardcode_libdir_separator \
19482 exclude_expsyms \
19483 include_expsyms \
19484 file_list_spec \
19485 variables_saved_for_relink \
19486 libname_spec \
19487 library_names_spec \
19488 soname_spec \
19489 install_override_mode \
19490 finish_eval \
19491 old_striplib \
19492 striplib \
19493 compiler_lib_search_dirs \
19494 predep_objects \
19495 postdep_objects \
19496 predeps \
19497 postdeps \
19498 compiler_lib_search_path \
19499 LD_CXX \
19500 reload_flag_CXX \
19501 compiler_CXX \
19502 lt_prog_compiler_no_builtin_flag_CXX \
19503 lt_prog_compiler_pic_CXX \
19504 lt_prog_compiler_wl_CXX \
19505 lt_prog_compiler_static_CXX \
19506 lt_cv_prog_compiler_c_o_CXX \
19507 export_dynamic_flag_spec_CXX \
19508 whole_archive_flag_spec_CXX \
19509 compiler_needs_object_CXX \
19510 with_gnu_ld_CXX \
19511 allow_undefined_flag_CXX \
19512 no_undefined_flag_CXX \
19513 hardcode_libdir_flag_spec_CXX \
19514 hardcode_libdir_separator_CXX \
19515 exclude_expsyms_CXX \
19516 include_expsyms_CXX \
19517 file_list_spec_CXX \
19518 compiler_lib_search_dirs_CXX \
19519 predep_objects_CXX \
19520 postdep_objects_CXX \
19521 predeps_CXX \
19522 postdeps_CXX \
19523 compiler_lib_search_path_CXX; do
19524 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
19525 *[\\\\\\\`\\"\\\$]*)
19526 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
19527 ;;
19528 *)
19529 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
19530 ;;
19531 esac
19532 done
19533
19534 # Double-quote double-evaled strings.
19535 for var in reload_cmds \
19536 old_postinstall_cmds \
19537 old_postuninstall_cmds \
19538 old_archive_cmds \
19539 extract_expsyms_cmds \
19540 old_archive_from_new_cmds \
19541 old_archive_from_expsyms_cmds \
19542 archive_cmds \
19543 archive_expsym_cmds \
19544 module_cmds \
19545 module_expsym_cmds \
19546 export_symbols_cmds \
19547 prelink_cmds \
19548 postlink_cmds \
19549 postinstall_cmds \
19550 postuninstall_cmds \
19551 finish_cmds \
19552 sys_lib_search_path_spec \
19553 configure_time_dlsearch_path \
19554 configure_time_lt_sys_library_path \
19555 reload_cmds_CXX \
19556 old_archive_cmds_CXX \
19557 old_archive_from_new_cmds_CXX \
19558 old_archive_from_expsyms_cmds_CXX \
19559 archive_cmds_CXX \
19560 archive_expsym_cmds_CXX \
19561 module_cmds_CXX \
19562 module_expsym_cmds_CXX \
19563 export_symbols_cmds_CXX \
19564 prelink_cmds_CXX \
19565 postlink_cmds_CXX; do
19566 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
19567 *[\\\\\\\`\\"\\\$]*)
19568 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
19569 ;;
19570 *)
19571 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
19572 ;;
19573 esac
19574 done
19575
19576 ac_aux_dir='$ac_aux_dir'
19577
19578 # See if we are running on zsh, and set the options that allow our
19579 # commands through without removal of \ escapes INIT.
19580 if test -n "\${ZSH_VERSION+set}"; then
19581 setopt NO_GLOB_SUBST
19582 fi
19583
19584
19585 PACKAGE='$PACKAGE'
19586 VERSION='$VERSION'
19587 RM='$RM'
19588 ofile='$ofile'
19589
19590
19591
19592
19593
19594
19595 _ACEOF
19596
19597 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19598
19599 # Handling of arguments.
19600 for ac_config_target in $ac_config_targets
19601 do
19602 case $ac_config_target in
19603 "htp_config_auto_gen.h") CONFIG_HEADERS="$CONFIG_HEADERS htp_config_auto_gen.h" ;;
19604 "htp/htp_version.h") CONFIG_FILES="$CONFIG_FILES htp/htp_version.h" ;;
19605 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
19606 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
19607 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19608 "htp.pc") CONFIG_FILES="$CONFIG_FILES htp.pc" ;;
19609 "htp/Makefile") CONFIG_FILES="$CONFIG_FILES htp/Makefile" ;;
19610 "htp/lzma/Makefile") CONFIG_FILES="$CONFIG_FILES htp/lzma/Makefile" ;;
19611 "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
19612 "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
19613
19614 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19615 esac
19616 done
19617
19618
19619 # If the user did not use the arguments to specify the items to instantiate,
19620 # then the envvar interface is used. Set only those that are not.
19621 # We use the long form for the default assignment because of an extremely
19622 # bizarre bug on SunOS 4.1.3.
19623 if $ac_need_defaults; then
19624 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
19625 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
19626 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
19627 fi
19628
19629 # Have a temporary directory for convenience. Make it in the build tree
19630 # simply because there is no reason against having it here, and in addition,
19631 # creating and moving files from /tmp can sometimes cause problems.
19632 # Hook for its removal unless debugging.
19633 # Note that there is a small window in which the directory will not be cleaned:
19634 # after its creation but before its name has been assigned to `$tmp'.
19635 $debug ||
19636 {
19637 tmp= ac_tmp=
19638 trap 'exit_status=$?
19639 : "${ac_tmp:=$tmp}"
19640 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19641 ' 0
19642 trap 'as_fn_exit 1' 1 2 13 15
19643 }
19644 # Create a (secure) tmp directory for tmp files.
19645
19646 {
19647 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19648 test -d "$tmp"
19649 } ||
19650 {
19651 tmp=./conf$$-$RANDOM
19652 (umask 077 && mkdir "$tmp")
19653 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19654 ac_tmp=$tmp
19655
19656 # Set up the scripts for CONFIG_FILES section.
19657 # No need to generate them if there are no CONFIG_FILES.
19658 # This happens for instance with `./config.status config.h'.
19659 if test -n "$CONFIG_FILES"; then
19660
19661
19662 ac_cr=`echo X | tr X '\015'`
19663 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19664 # But we know of no other shell where ac_cr would be empty at this
19665 # point, so we can use a bashism as a fallback.
19666 if test "x$ac_cr" = x; then
19667 eval ac_cr=\$\'\\r\'
19668 fi
19669 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19670 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19671 ac_cs_awk_cr='\\r'
19672 else
19673 ac_cs_awk_cr=$ac_cr
19674 fi
19675
19676 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19677 _ACEOF
19678
19679
19680 {
19681 echo "cat >conf$$subs.awk <<_ACEOF" &&
19682 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19683 echo "_ACEOF"
19684 } >conf$$subs.sh ||
19685 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19686 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19687 ac_delim='%!_!# '
19688 for ac_last_try in false false false false false :; do
19689 . ./conf$$subs.sh ||
19690 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19691
19692 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19693 if test $ac_delim_n = $ac_delim_num; then
19694 break
19695 elif $ac_last_try; then
19696 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19697 else
19698 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19699 fi
19700 done
19701 rm -f conf$$subs.sh
19702
19703 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19704 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19705 _ACEOF
19706 sed -n '
19707 h
19708 s/^/S["/; s/!.*/"]=/
19709 p
19710 g
19711 s/^[^!]*!//
19712 :repl
19713 t repl
19714 s/'"$ac_delim"'$//
19715 t delim
19716 :nl
19717 h
19718 s/\(.\{148\}\)..*/\1/
19719 t more1
19720 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19721 p
19722 n
19723 b repl
19724 :more1
19725 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19726 p
19727 g
19728 s/.\{148\}//
19729 t nl
19730 :delim
19731 h
19732 s/\(.\{148\}\)..*/\1/
19733 t more2
19734 s/["\\]/\\&/g; s/^/"/; s/$/"/
19735 p
19736 b
19737 :more2
19738 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19739 p
19740 g
19741 s/.\{148\}//
19742 t delim
19743 ' <conf$$subs.awk | sed '
19744 /^[^""]/{
19745 N
19746 s/\n//
19747 }
19748 ' >>$CONFIG_STATUS || ac_write_fail=1
19749 rm -f conf$$subs.awk
19750 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19751 _ACAWK
19752 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19753 for (key in S) S_is_set[key] = 1
19754 FS = ""
19755
19756 }
19757 {
19758 line = $ 0
19759 nfields = split(line, field, "@")
19760 substed = 0
19761 len = length(field[1])
19762 for (i = 2; i < nfields; i++) {
19763 key = field[i]
19764 keylen = length(key)
19765 if (S_is_set[key]) {
19766 value = S[key]
19767 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19768 len += length(value) + length(field[++i])
19769 substed = 1
19770 } else
19771 len += 1 + keylen
19772 }
19773
19774 print line
19775 }
19776
19777 _ACAWK
19778 _ACEOF
19779 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19780 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19781 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19782 else
19783 cat
19784 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19785 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19786 _ACEOF
19787
19788 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19789 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19790 # trailing colons and then remove the whole line if VPATH becomes empty
19791 # (actually we leave an empty line to preserve line numbers).
19792 if test "x$srcdir" = x.; then
19793 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19794 h
19795 s///
19796 s/^/:/
19797 s/[ ]*$/:/
19798 s/:\$(srcdir):/:/g
19799 s/:\${srcdir}:/:/g
19800 s/:@srcdir@:/:/g
19801 s/^:*//
19802 s/:*$//
19803 x
19804 s/\(=[ ]*\).*/\1/
19805 G
19806 s/\n//
19807 s/^[^=]*=[ ]*$//
19808 }'
19809 fi
19810
19811 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19812 fi # test -n "$CONFIG_FILES"
19813
19814 # Set up the scripts for CONFIG_HEADERS section.
19815 # No need to generate them if there are no CONFIG_HEADERS.
19816 # This happens for instance with `./config.status Makefile'.
19817 if test -n "$CONFIG_HEADERS"; then
19818 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19819 BEGIN {
19820 _ACEOF
19821
19822 # Transform confdefs.h into an awk script `defines.awk', embedded as
19823 # here-document in config.status, that substitutes the proper values into
19824 # config.h.in to produce config.h.
19825
19826 # Create a delimiter string that does not exist in confdefs.h, to ease
19827 # handling of long lines.
19828 ac_delim='%!_!# '
19829 for ac_last_try in false false :; do
19830 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19831 if test -z "$ac_tt"; then
19832 break
19833 elif $ac_last_try; then
19834 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19835 else
19836 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19837 fi
19838 done
19839
19840 # For the awk script, D is an array of macro values keyed by name,
19841 # likewise P contains macro parameters if any. Preserve backslash
19842 # newline sequences.
19843
19844 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19845 sed -n '
19846 s/.\{148\}/&'"$ac_delim"'/g
19847 t rset
19848 :rset
19849 s/^[ ]*#[ ]*define[ ][ ]*/ /
19850 t def
19851 d
19852 :def
19853 s/\\$//
19854 t bsnl
19855 s/["\\]/\\&/g
19856 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19857 D["\1"]=" \3"/p
19858 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19859 d
19860 :bsnl
19861 s/["\\]/\\&/g
19862 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19863 D["\1"]=" \3\\\\\\n"\\/p
19864 t cont
19865 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19866 t cont
19867 d
19868 :cont
19869 n
19870 s/.\{148\}/&'"$ac_delim"'/g
19871 t clear
19872 :clear
19873 s/\\$//
19874 t bsnlc
19875 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19876 d
19877 :bsnlc
19878 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19879 b cont
19880 ' <confdefs.h | sed '
19881 s/'"$ac_delim"'/"\\\
19882 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19883
19884 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19885 for (key in D) D_is_set[key] = 1
19886 FS = ""
19887 }
19888 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19889 line = \$ 0
19890 split(line, arg, " ")
19891 if (arg[1] == "#") {
19892 defundef = arg[2]
19893 mac1 = arg[3]
19894 } else {
19895 defundef = substr(arg[1], 2)
19896 mac1 = arg[2]
19897 }
19898 split(mac1, mac2, "(") #)
19899 macro = mac2[1]
19900 prefix = substr(line, 1, index(line, defundef) - 1)
19901 if (D_is_set[macro]) {
19902 # Preserve the white space surrounding the "#".
19903 print prefix "define", macro P[macro] D[macro]
19904 next
19905 } else {
19906 # Replace #undef with comments. This is necessary, for example,
19907 # in the case of _POSIX_SOURCE, which is predefined and required
19908 # on some systems where configure will not decide to define it.
19909 if (defundef == "undef") {
19910 print "/*", prefix defundef, macro, "*/"
19911 next
19912 }
19913 }
19914 }
19915 { print }
19916 _ACAWK
19917 _ACEOF
19918 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19919 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19920 fi # test -n "$CONFIG_HEADERS"
19921
19922
19923 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
19924 shift
19925 for ac_tag
19926 do
19927 case $ac_tag in
19928 :[FHLC]) ac_mode=$ac_tag; continue;;
19929 esac
19930 case $ac_mode$ac_tag in
19931 :[FHL]*:*);;
19932 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19933 :[FH]-) ac_tag=-:-;;
19934 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19935 esac
19936 ac_save_IFS=$IFS
19937 IFS=:
19938 set x $ac_tag
19939 IFS=$ac_save_IFS
19940 shift
19941 ac_file=$1
19942 shift
19943
19944 case $ac_mode in
19945 :L) ac_source=$1;;
19946 :[FH])
19947 ac_file_inputs=
19948 for ac_f
19949 do
19950 case $ac_f in
19951 -) ac_f="$ac_tmp/stdin";;
19952 *) # Look for the file first in the build tree, then in the source tree
19953 # (if the path is not absolute). The absolute path cannot be DOS-style,
19954 # because $ac_f cannot contain `:'.
19955 test -f "$ac_f" ||
19956 case $ac_f in
19957 [\\/$]*) false;;
19958 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19959 esac ||
19960 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19961 esac
19962 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19963 as_fn_append ac_file_inputs " '$ac_f'"
19964 done
19965
19966 # Let's still pretend it is `configure' which instantiates (i.e., don't
19967 # use $as_me), people would be surprised to read:
19968 # /* config.h. Generated by config.status. */
19969 configure_input='Generated from '`
19970 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19971 `' by configure.'
19972 if test x"$ac_file" != x-; then
19973 configure_input="$ac_file. $configure_input"
19974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19975 printf "%s\n" "$as_me: creating $ac_file" >&6;}
19976 fi
19977 # Neutralize special characters interpreted by sed in replacement strings.
19978 case $configure_input in #(
19979 *\&* | *\|* | *\\* )
19980 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
19981 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19982 *) ac_sed_conf_input=$configure_input;;
19983 esac
19984
19985 case $ac_tag in
19986 *:-:* | *:-) cat >"$ac_tmp/stdin" \
19987 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
19988 esac
19989 ;;
19990 esac
19991
19992 ac_dir=`$as_dirname -- "$ac_file" ||
19993 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19994 X"$ac_file" : 'X\(//\)[^/]' \| \
19995 X"$ac_file" : 'X\(//\)$' \| \
19996 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19997 printf "%s\n" X"$ac_file" |
19998 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19999 s//\1/
20000 q
20001 }
20002 /^X\(\/\/\)[^/].*/{
20003 s//\1/
20004 q
20005 }
20006 /^X\(\/\/\)$/{
20007 s//\1/
20008 q
20009 }
20010 /^X\(\/\).*/{
20011 s//\1/
20012 q
20013 }
20014 s/.*/./; q'`
20015 as_dir="$ac_dir"; as_fn_mkdir_p
20016 ac_builddir=.
20017
20018 case "$ac_dir" in
20019 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20020 *)
20021 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
20022 # A ".." for each directory in $ac_dir_suffix.
20023 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20024 case $ac_top_builddir_sub in
20025 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20026 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20027 esac ;;
20028 esac
20029 ac_abs_top_builddir=$ac_pwd
20030 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20031 # for backward compatibility:
20032 ac_top_builddir=$ac_top_build_prefix
20033
20034 case $srcdir in
20035 .) # We are building in place.
20036 ac_srcdir=.
20037 ac_top_srcdir=$ac_top_builddir_sub
20038 ac_abs_top_srcdir=$ac_pwd ;;
20039 [\\/]* | ?:[\\/]* ) # Absolute name.
20040 ac_srcdir=$srcdir$ac_dir_suffix;
20041 ac_top_srcdir=$srcdir
20042 ac_abs_top_srcdir=$srcdir ;;
20043 *) # Relative name.
20044 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20045 ac_top_srcdir=$ac_top_build_prefix$srcdir
20046 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20047 esac
20048 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20049
20050
20051 case $ac_mode in
20052 :F)
20053 #
20054 # CONFIG_FILE
20055 #
20056
20057 case $INSTALL in
20058 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20059 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20060 esac
20061 ac_MKDIR_P=$MKDIR_P
20062 case $MKDIR_P in
20063 [\\/$]* | ?:[\\/]* ) ;;
20064 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20065 esac
20066 _ACEOF
20067
20068 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20069 # If the template does not know about datarootdir, expand it.
20070 # FIXME: This hack should be removed a few years after 2.60.
20071 ac_datarootdir_hack=; ac_datarootdir_seen=
20072 ac_sed_dataroot='
20073 /datarootdir/ {
20074 p
20075 q
20076 }
20077 /@datadir@/p
20078 /@docdir@/p
20079 /@infodir@/p
20080 /@localedir@/p
20081 /@mandir@/p'
20082 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20083 *datarootdir*) ac_datarootdir_seen=yes;;
20084 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20086 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20087 _ACEOF
20088 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20089 ac_datarootdir_hack='
20090 s&@datadir@&$datadir&g
20091 s&@docdir@&$docdir&g
20092 s&@infodir@&$infodir&g
20093 s&@localedir@&$localedir&g
20094 s&@mandir@&$mandir&g
20095 s&\\\${datarootdir}&$datarootdir&g' ;;
20096 esac
20097 _ACEOF
20098
20099 # Neutralize VPATH when `$srcdir' = `.'.
20100 # Shell code in configure.ac might set extrasub.
20101 # FIXME: do we really want to maintain this feature?
20102 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20103 ac_sed_extra="$ac_vpsub
20104 $extrasub
20105 _ACEOF
20106 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20107 :t
20108 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20109 s|@configure_input@|$ac_sed_conf_input|;t t
20110 s&@top_builddir@&$ac_top_builddir_sub&;t t
20111 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20112 s&@srcdir@&$ac_srcdir&;t t
20113 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20114 s&@top_srcdir@&$ac_top_srcdir&;t t
20115 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20116 s&@builddir@&$ac_builddir&;t t
20117 s&@abs_builddir@&$ac_abs_builddir&;t t
20118 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20119 s&@INSTALL@&$ac_INSTALL&;t t
20120 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20121 $ac_datarootdir_hack
20122 "
20123 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20124 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20125
20126 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20127 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20128 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20129 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20131 which seems to be undefined. Please make sure it is defined" >&5
20132 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20133 which seems to be undefined. Please make sure it is defined" >&2;}
20134
20135 rm -f "$ac_tmp/stdin"
20136 case $ac_file in
20137 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20138 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20139 esac \
20140 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20141 ;;
20142 :H)
20143 #
20144 # CONFIG_HEADER
20145 #
20146 if test x"$ac_file" != x-; then
20147 {
20148 printf "%s\n" "/* $configure_input */" >&1 \
20149 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20150 } >"$ac_tmp/config.h" \
20151 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20152 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20154 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
20155 else
20156 rm -f "$ac_file"
20157 mv "$ac_tmp/config.h" "$ac_file" \
20158 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20159 fi
20160 else
20161 printf "%s\n" "/* $configure_input */" >&1 \
20162 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20163 || as_fn_error $? "could not create -" "$LINENO" 5
20164 fi
20165 # Compute "$ac_file"'s index in $config_headers.
20166 _am_arg="$ac_file"
20167 _am_stamp_count=1
20168 for _am_header in $config_headers :; do
20169 case $_am_header in
20170 $_am_arg | $_am_arg:* )
20171 break ;;
20172 * )
20173 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
20174 esac
20175 done
20176 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
20177 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20178 X"$_am_arg" : 'X\(//\)[^/]' \| \
20179 X"$_am_arg" : 'X\(//\)$' \| \
20180 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
20181 printf "%s\n" X"$_am_arg" |
20182 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20183 s//\1/
20184 q
20185 }
20186 /^X\(\/\/\)[^/].*/{
20187 s//\1/
20188 q
20189 }
20190 /^X\(\/\/\)$/{
20191 s//\1/
20192 q
20193 }
20194 /^X\(\/\).*/{
20195 s//\1/
20196 q
20197 }
20198 s/.*/./; q'`/stamp-h$_am_stamp_count
20199 ;;
20200
20201 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20202 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
20203 ;;
20204 esac
20205
20206
20207 case $ac_file$ac_mode in
20208 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
20209 # Older Autoconf quotes --file arguments for eval, but not when files
20210 # are listed without --file. Let's play safe and only enable the eval
20211 # if we detect the quoting.
20212 # TODO: see whether this extra hack can be removed once we start
20213 # requiring Autoconf 2.70 or later.
20214 case $CONFIG_FILES in #(
20215 *\'*) :
20216 eval set x "$CONFIG_FILES" ;; #(
20217 *) :
20218 set x $CONFIG_FILES ;; #(
20219 *) :
20220 ;;
20221 esac
20222 shift
20223 # Used to flag and report bootstrapping failures.
20224 am_rc=0
20225 for am_mf
20226 do
20227 # Strip MF so we end up with the name of the file.
20228 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
20229 # Check whether this is an Automake generated Makefile which includes
20230 # dependency-tracking related rules and includes.
20231 # Grep'ing the whole file directly is not great: AIX grep has a line
20232 # limit of 2048, but all sed's we know have understand at least 4000.
20233 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
20234 || continue
20235 am_dirpart=`$as_dirname -- "$am_mf" ||
20236 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20237 X"$am_mf" : 'X\(//\)[^/]' \| \
20238 X"$am_mf" : 'X\(//\)$' \| \
20239 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
20240 printf "%s\n" X"$am_mf" |
20241 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20242 s//\1/
20243 q
20244 }
20245 /^X\(\/\/\)[^/].*/{
20246 s//\1/
20247 q
20248 }
20249 /^X\(\/\/\)$/{
20250 s//\1/
20251 q
20252 }
20253 /^X\(\/\).*/{
20254 s//\1/
20255 q
20256 }
20257 s/.*/./; q'`
20258 am_filepart=`$as_basename -- "$am_mf" ||
20259 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
20260 X"$am_mf" : 'X\(//\)$' \| \
20261 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
20262 printf "%s\n" X/"$am_mf" |
20263 sed '/^.*\/\([^/][^/]*\)\/*$/{
20264 s//\1/
20265 q
20266 }
20267 /^X\/\(\/\/\)$/{
20268 s//\1/
20269 q
20270 }
20271 /^X\/\(\/\).*/{
20272 s//\1/
20273 q
20274 }
20275 s/.*/./; q'`
20276 { echo "$as_me:$LINENO: cd "$am_dirpart" \
20277 && sed -e '/# am--include-marker/d' "$am_filepart" \
20278 | $MAKE -f - am--depfiles" >&5
20279 (cd "$am_dirpart" \
20280 && sed -e '/# am--include-marker/d' "$am_filepart" \
20281 | $MAKE -f - am--depfiles) >&5 2>&5
20282 ac_status=$?
20283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20284 (exit $ac_status); } || am_rc=$?
20285 done
20286 if test $am_rc -ne 0; then
20287 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20288 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
20289 as_fn_error $? "Something went wrong bootstrapping makefile fragments
20290 for automatic dependency tracking. If GNU make was not used, consider
20291 re-running the configure script with MAKE=\"gmake\" (or whatever is
20292 necessary). You can also try re-running configure with the
20293 '--disable-dependency-tracking' option to at least be able to build
20294 the package (albeit without support for automatic dependency tracking).
20295 See \`config.log' for more details" "$LINENO" 5; }
20296 fi
20297 { am_dirpart=; unset am_dirpart;}
20298 { am_filepart=; unset am_filepart;}
20299 { am_mf=; unset am_mf;}
20300 { am_rc=; unset am_rc;}
20301 rm -f conftest-deps.mk
20302 }
20303 ;;
20304 "libtool":C)
20305
20306 # See if we are running on zsh, and set the options that allow our
20307 # commands through without removal of \ escapes.
20308 if test -n "${ZSH_VERSION+set}"; then
20309 setopt NO_GLOB_SUBST
20310 fi
20311
20312 cfgfile=${ofile}T
20313 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
20314 $RM "$cfgfile"
20315
20316 cat <<_LT_EOF >> "$cfgfile"
20317 #! $SHELL
20318 # Generated automatically by $as_me ($PACKAGE) $VERSION
20319 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
20320
20321 # Provide generalized library-building support services.
20322 # Written by Gordon Matzigkeit, 1996
20323
20324 # Copyright (C) 2014 Free Software Foundation, Inc.
20325 # This is free software; see the source for copying conditions. There is NO
20326 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20327
20328 # GNU Libtool is free software; you can redistribute it and/or modify
20329 # it under the terms of the GNU General Public License as published by
20330 # the Free Software Foundation; either version 2 of of the License, or
20331 # (at your option) any later version.
20332 #
20333 # As a special exception to the GNU General Public License, if you
20334 # distribute this file as part of a program or library that is built
20335 # using GNU Libtool, you may include this file under the same
20336 # distribution terms that you use for the rest of that program.
20337 #
20338 # GNU Libtool is distributed in the hope that it will be useful, but
20339 # WITHOUT ANY WARRANTY; without even the implied warranty of
20340 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20341 # GNU General Public License for more details.
20342 #
20343 # You should have received a copy of the GNU General Public License
20344 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20345
20346
20347 # The names of the tagged configurations supported by this script.
20348 available_tags='CXX '
20349
20350 # Configured defaults for sys_lib_dlsearch_path munging.
20351 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
20352
20353 # ### BEGIN LIBTOOL CONFIG
20354
20355 # Which release of libtool.m4 was used?
20356 macro_version=$macro_version
20357 macro_revision=$macro_revision
20358
20359 # Whether or not to build shared libraries.
20360 build_libtool_libs=$enable_shared
20361
20362 # Whether or not to build static libraries.
20363 build_old_libs=$enable_static
20364
20365 # What type of objects to build.
20366 pic_mode=$pic_mode
20367
20368 # Whether or not to optimize for fast installation.
20369 fast_install=$enable_fast_install
20370
20371 # Shared archive member basename,for filename based shared library versioning on AIX.
20372 shared_archive_member_spec=$shared_archive_member_spec
20373
20374 # Shell to use when invoking shell scripts.
20375 SHELL=$lt_SHELL
20376
20377 # An echo program that protects backslashes.
20378 ECHO=$lt_ECHO
20379
20380 # The PATH separator for the build system.
20381 PATH_SEPARATOR=$lt_PATH_SEPARATOR
20382
20383 # The host system.
20384 host_alias=$host_alias
20385 host=$host
20386 host_os=$host_os
20387
20388 # The build system.
20389 build_alias=$build_alias
20390 build=$build
20391 build_os=$build_os
20392
20393 # A sed program that does not truncate output.
20394 SED=$lt_SED
20395
20396 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
20397 Xsed="\$SED -e 1s/^X//"
20398
20399 # A grep program that handles long lines.
20400 GREP=$lt_GREP
20401
20402 # An ERE matcher.
20403 EGREP=$lt_EGREP
20404
20405 # A literal string matcher.
20406 FGREP=$lt_FGREP
20407
20408 # A BSD- or MS-compatible name lister.
20409 NM=$lt_NM
20410
20411 # Whether we need soft or hard links.
20412 LN_S=$lt_LN_S
20413
20414 # What is the maximum length of a command?
20415 max_cmd_len=$max_cmd_len
20416
20417 # Object file suffix (normally "o").
20418 objext=$ac_objext
20419
20420 # Executable file suffix (normally "").
20421 exeext=$exeext
20422
20423 # whether the shell understands "unset".
20424 lt_unset=$lt_unset
20425
20426 # turn spaces into newlines.
20427 SP2NL=$lt_lt_SP2NL
20428
20429 # turn newlines into spaces.
20430 NL2SP=$lt_lt_NL2SP
20431
20432 # convert \$build file names to \$host format.
20433 to_host_file_cmd=$lt_cv_to_host_file_cmd
20434
20435 # convert \$build files to toolchain format.
20436 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
20437
20438 # An object symbol dumper.
20439 OBJDUMP=$lt_OBJDUMP
20440
20441 # Method to check whether dependent libraries are shared objects.
20442 deplibs_check_method=$lt_deplibs_check_method
20443
20444 # Command to use when deplibs_check_method = "file_magic".
20445 file_magic_cmd=$lt_file_magic_cmd
20446
20447 # How to find potential files when deplibs_check_method = "file_magic".
20448 file_magic_glob=$lt_file_magic_glob
20449
20450 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
20451 want_nocaseglob=$lt_want_nocaseglob
20452
20453 # DLL creation program.
20454 DLLTOOL=$lt_DLLTOOL
20455
20456 # Command to associate shared and link libraries.
20457 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
20458
20459 # The archiver.
20460 AR=$lt_AR
20461
20462 # Flags to create an archive.
20463 AR_FLAGS=$lt_AR_FLAGS
20464
20465 # How to feed a file listing to the archiver.
20466 archiver_list_spec=$lt_archiver_list_spec
20467
20468 # A symbol stripping program.
20469 STRIP=$lt_STRIP
20470
20471 # Commands used to install an old-style archive.
20472 RANLIB=$lt_RANLIB
20473 old_postinstall_cmds=$lt_old_postinstall_cmds
20474 old_postuninstall_cmds=$lt_old_postuninstall_cmds
20475
20476 # Whether to use a lock for old archive extraction.
20477 lock_old_archive_extraction=$lock_old_archive_extraction
20478
20479 # A C compiler.
20480 LTCC=$lt_CC
20481
20482 # LTCC compiler flags.
20483 LTCFLAGS=$lt_CFLAGS
20484
20485 # Take the output of nm and produce a listing of raw symbols and C names.
20486 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
20487
20488 # Transform the output of nm in a proper C declaration.
20489 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
20490
20491 # Transform the output of nm into a list of symbols to manually relocate.
20492 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
20493
20494 # Transform the output of nm in a C name address pair.
20495 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
20496
20497 # Transform the output of nm in a C name address pair when lib prefix is needed.
20498 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
20499
20500 # The name lister interface.
20501 nm_interface=$lt_lt_cv_nm_interface
20502
20503 # Specify filename containing input files for \$NM.
20504 nm_file_list_spec=$lt_nm_file_list_spec
20505
20506 # The root where to search for dependent libraries,and where our libraries should be installed.
20507 lt_sysroot=$lt_sysroot
20508
20509 # Command to truncate a binary pipe.
20510 lt_truncate_bin=$lt_lt_cv_truncate_bin
20511
20512 # The name of the directory that contains temporary libtool files.
20513 objdir=$objdir
20514
20515 # Used to examine libraries when file_magic_cmd begins with "file".
20516 MAGIC_CMD=$MAGIC_CMD
20517
20518 # Must we lock files when doing compilation?
20519 need_locks=$lt_need_locks
20520
20521 # Manifest tool.
20522 MANIFEST_TOOL=$lt_MANIFEST_TOOL
20523
20524 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
20525 DSYMUTIL=$lt_DSYMUTIL
20526
20527 # Tool to change global to local symbols on Mac OS X.
20528 NMEDIT=$lt_NMEDIT
20529
20530 # Tool to manipulate fat objects and archives on Mac OS X.
20531 LIPO=$lt_LIPO
20532
20533 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
20534 OTOOL=$lt_OTOOL
20535
20536 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
20537 OTOOL64=$lt_OTOOL64
20538
20539 # Old archive suffix (normally "a").
20540 libext=$libext
20541
20542 # Shared library suffix (normally ".so").
20543 shrext_cmds=$lt_shrext_cmds
20544
20545 # The commands to extract the exported symbol list from a shared archive.
20546 extract_expsyms_cmds=$lt_extract_expsyms_cmds
20547
20548 # Variables whose values should be saved in libtool wrapper scripts and
20549 # restored at link time.
20550 variables_saved_for_relink=$lt_variables_saved_for_relink
20551
20552 # Do we need the "lib" prefix for modules?
20553 need_lib_prefix=$need_lib_prefix
20554
20555 # Do we need a version for libraries?
20556 need_version=$need_version
20557
20558 # Library versioning type.
20559 version_type=$version_type
20560
20561 # Shared library runtime path variable.
20562 runpath_var=$runpath_var
20563
20564 # Shared library path variable.
20565 shlibpath_var=$shlibpath_var
20566
20567 # Is shlibpath searched before the hard-coded library search path?
20568 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
20569
20570 # Format of library name prefix.
20571 libname_spec=$lt_libname_spec
20572
20573 # List of archive names. First name is the real one, the rest are links.
20574 # The last name is the one that the linker finds with -lNAME
20575 library_names_spec=$lt_library_names_spec
20576
20577 # The coded name of the library, if different from the real name.
20578 soname_spec=$lt_soname_spec
20579
20580 # Permission mode override for installation of shared libraries.
20581 install_override_mode=$lt_install_override_mode
20582
20583 # Command to use after installation of a shared archive.
20584 postinstall_cmds=$lt_postinstall_cmds
20585
20586 # Command to use after uninstallation of a shared archive.
20587 postuninstall_cmds=$lt_postuninstall_cmds
20588
20589 # Commands used to finish a libtool library installation in a directory.
20590 finish_cmds=$lt_finish_cmds
20591
20592 # As "finish_cmds", except a single script fragment to be evaled but
20593 # not shown.
20594 finish_eval=$lt_finish_eval
20595
20596 # Whether we should hardcode library paths into libraries.
20597 hardcode_into_libs=$hardcode_into_libs
20598
20599 # Compile-time system search path for libraries.
20600 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
20601
20602 # Detected run-time system search path for libraries.
20603 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
20604
20605 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
20606 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
20607
20608 # Whether dlopen is supported.
20609 dlopen_support=$enable_dlopen
20610
20611 # Whether dlopen of programs is supported.
20612 dlopen_self=$enable_dlopen_self
20613
20614 # Whether dlopen of statically linked programs is supported.
20615 dlopen_self_static=$enable_dlopen_self_static
20616
20617 # Commands to strip libraries.
20618 old_striplib=$lt_old_striplib
20619 striplib=$lt_striplib
20620
20621
20622 # The linker used to build libraries.
20623 LD=$lt_LD
20624
20625 # How to create reloadable object files.
20626 reload_flag=$lt_reload_flag
20627 reload_cmds=$lt_reload_cmds
20628
20629 # Commands used to build an old-style archive.
20630 old_archive_cmds=$lt_old_archive_cmds
20631
20632 # A language specific compiler.
20633 CC=$lt_compiler
20634
20635 # Is the compiler the GNU compiler?
20636 with_gcc=$GCC
20637
20638 # Compiler flag to turn off builtin functions.
20639 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
20640
20641 # Additional compiler flags for building library objects.
20642 pic_flag=$lt_lt_prog_compiler_pic
20643
20644 # How to pass a linker flag through the compiler.
20645 wl=$lt_lt_prog_compiler_wl
20646
20647 # Compiler flag to prevent dynamic linking.
20648 link_static_flag=$lt_lt_prog_compiler_static
20649
20650 # Does compiler simultaneously support -c and -o options?
20651 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
20652
20653 # Whether or not to add -lc for building shared libraries.
20654 build_libtool_need_lc=$archive_cmds_need_lc
20655
20656 # Whether or not to disallow shared libs when runtime libs are static.
20657 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
20658
20659 # Compiler flag to allow reflexive dlopens.
20660 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
20661
20662 # Compiler flag to generate shared objects directly from archives.
20663 whole_archive_flag_spec=$lt_whole_archive_flag_spec
20664
20665 # Whether the compiler copes with passing no objects directly.
20666 compiler_needs_object=$lt_compiler_needs_object
20667
20668 # Create an old-style archive from a shared archive.
20669 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
20670
20671 # Create a temporary old-style archive to link instead of a shared archive.
20672 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
20673
20674 # Commands used to build a shared archive.
20675 archive_cmds=$lt_archive_cmds
20676 archive_expsym_cmds=$lt_archive_expsym_cmds
20677
20678 # Commands used to build a loadable module if different from building
20679 # a shared archive.
20680 module_cmds=$lt_module_cmds
20681 module_expsym_cmds=$lt_module_expsym_cmds
20682
20683 # Whether we are building with GNU ld or not.
20684 with_gnu_ld=$lt_with_gnu_ld
20685
20686 # Flag that allows shared libraries with undefined symbols to be built.
20687 allow_undefined_flag=$lt_allow_undefined_flag
20688
20689 # Flag that enforces no undefined symbols.
20690 no_undefined_flag=$lt_no_undefined_flag
20691
20692 # Flag to hardcode \$libdir into a binary during linking.
20693 # This must work even if \$libdir does not exist
20694 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
20695
20696 # Whether we need a single "-rpath" flag with a separated argument.
20697 hardcode_libdir_separator=$lt_hardcode_libdir_separator
20698
20699 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
20700 # DIR into the resulting binary.
20701 hardcode_direct=$hardcode_direct
20702
20703 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
20704 # DIR into the resulting binary and the resulting library dependency is
20705 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
20706 # library is relocated.
20707 hardcode_direct_absolute=$hardcode_direct_absolute
20708
20709 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
20710 # into the resulting binary.
20711 hardcode_minus_L=$hardcode_minus_L
20712
20713 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
20714 # into the resulting binary.
20715 hardcode_shlibpath_var=$hardcode_shlibpath_var
20716
20717 # Set to "yes" if building a shared library automatically hardcodes DIR
20718 # into the library and all subsequent libraries and executables linked
20719 # against it.
20720 hardcode_automatic=$hardcode_automatic
20721
20722 # Set to yes if linker adds runtime paths of dependent libraries
20723 # to runtime path list.
20724 inherit_rpath=$inherit_rpath
20725
20726 # Whether libtool must link a program against all its dependency libraries.
20727 link_all_deplibs=$link_all_deplibs
20728
20729 # Set to "yes" if exported symbols are required.
20730 always_export_symbols=$always_export_symbols
20731
20732 # The commands to list exported symbols.
20733 export_symbols_cmds=$lt_export_symbols_cmds
20734
20735 # Symbols that should not be listed in the preloaded symbols.
20736 exclude_expsyms=$lt_exclude_expsyms
20737
20738 # Symbols that must always be exported.
20739 include_expsyms=$lt_include_expsyms
20740
20741 # Commands necessary for linking programs (against libraries) with templates.
20742 prelink_cmds=$lt_prelink_cmds
20743
20744 # Commands necessary for finishing linking programs.
20745 postlink_cmds=$lt_postlink_cmds
20746
20747 # Specify filename containing input files.
20748 file_list_spec=$lt_file_list_spec
20749
20750 # How to hardcode a shared library path into an executable.
20751 hardcode_action=$hardcode_action
20752
20753 # The directories searched by this compiler when creating a shared library.
20754 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
20755
20756 # Dependencies to place before and after the objects being linked to
20757 # create a shared library.
20758 predep_objects=$lt_predep_objects
20759 postdep_objects=$lt_postdep_objects
20760 predeps=$lt_predeps
20761 postdeps=$lt_postdeps
20762
20763 # The library search path used internally by the compiler when linking
20764 # a shared library.
20765 compiler_lib_search_path=$lt_compiler_lib_search_path
20766
20767 # ### END LIBTOOL CONFIG
20768
20769 _LT_EOF
20770
20771 cat <<'_LT_EOF' >> "$cfgfile"
20772
20773 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
20774
20775 # func_munge_path_list VARIABLE PATH
20776 # -----------------------------------
20777 # VARIABLE is name of variable containing _space_ separated list of
20778 # directories to be munged by the contents of PATH, which is string
20779 # having a format:
20780 # "DIR[:DIR]:"
20781 # string "DIR[ DIR]" will be prepended to VARIABLE
20782 # ":DIR[:DIR]"
20783 # string "DIR[ DIR]" will be appended to VARIABLE
20784 # "DIRP[:DIRP]::[DIRA:]DIRA"
20785 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
20786 # "DIRA[ DIRA]" will be appended to VARIABLE
20787 # "DIR[:DIR]"
20788 # VARIABLE will be replaced by "DIR[ DIR]"
20789 func_munge_path_list ()
20790 {
20791 case x$2 in
20792 x)
20793 ;;
20794 *:)
20795 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
20796 ;;
20797 x:*)
20798 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
20799 ;;
20800 *::*)
20801 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
20802 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
20803 ;;
20804 *)
20805 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
20806 ;;
20807 esac
20808 }
20809
20810
20811 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
20812 func_cc_basename ()
20813 {
20814 for cc_temp in $*""; do
20815 case $cc_temp in
20816 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
20817 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
20818 \-*) ;;
20819 *) break;;
20820 esac
20821 done
20822 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
20823 }
20824
20825
20826 # ### END FUNCTIONS SHARED WITH CONFIGURE
20827
20828 _LT_EOF
20829
20830 case $host_os in
20831 aix3*)
20832 cat <<\_LT_EOF >> "$cfgfile"
20833 # AIX sometimes has problems with the GCC collect2 program. For some
20834 # reason, if we set the COLLECT_NAMES environment variable, the problems
20835 # vanish in a puff of smoke.
20836 if test set != "${COLLECT_NAMES+set}"; then
20837 COLLECT_NAMES=
20838 export COLLECT_NAMES
20839 fi
20840 _LT_EOF
20841 ;;
20842 esac
20843
20844
20845
20846 ltmain=$ac_aux_dir/ltmain.sh
20847
20848
20849 # We use sed instead of cat because bash on DJGPP gets confused if
20850 # if finds mixed CR/LF and LF-only lines. Since sed operates in
20851 # text mode, it properly converts lines to CR/LF. This bash problem
20852 # is reportedly fixed, but why not run on old versions too?
20853 sed '$q' "$ltmain" >> "$cfgfile" \
20854 || (rm -f "$cfgfile"; exit 1)
20855
20856 mv -f "$cfgfile" "$ofile" ||
20857 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
20858 chmod +x "$ofile"
20859
20860
20861 cat <<_LT_EOF >> "$ofile"
20862
20863 # ### BEGIN LIBTOOL TAG CONFIG: CXX
20864
20865 # The linker used to build libraries.
20866 LD=$lt_LD_CXX
20867
20868 # How to create reloadable object files.
20869 reload_flag=$lt_reload_flag_CXX
20870 reload_cmds=$lt_reload_cmds_CXX
20871
20872 # Commands used to build an old-style archive.
20873 old_archive_cmds=$lt_old_archive_cmds_CXX
20874
20875 # A language specific compiler.
20876 CC=$lt_compiler_CXX
20877
20878 # Is the compiler the GNU compiler?
20879 with_gcc=$GCC_CXX
20880
20881 # Compiler flag to turn off builtin functions.
20882 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
20883
20884 # Additional compiler flags for building library objects.
20885 pic_flag=$lt_lt_prog_compiler_pic_CXX
20886
20887 # How to pass a linker flag through the compiler.
20888 wl=$lt_lt_prog_compiler_wl_CXX
20889
20890 # Compiler flag to prevent dynamic linking.
20891 link_static_flag=$lt_lt_prog_compiler_static_CXX
20892
20893 # Does compiler simultaneously support -c and -o options?
20894 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
20895
20896 # Whether or not to add -lc for building shared libraries.
20897 build_libtool_need_lc=$archive_cmds_need_lc_CXX
20898
20899 # Whether or not to disallow shared libs when runtime libs are static.
20900 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
20901
20902 # Compiler flag to allow reflexive dlopens.
20903 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
20904
20905 # Compiler flag to generate shared objects directly from archives.
20906 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
20907
20908 # Whether the compiler copes with passing no objects directly.
20909 compiler_needs_object=$lt_compiler_needs_object_CXX
20910
20911 # Create an old-style archive from a shared archive.
20912 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
20913
20914 # Create a temporary old-style archive to link instead of a shared archive.
20915 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
20916
20917 # Commands used to build a shared archive.
20918 archive_cmds=$lt_archive_cmds_CXX
20919 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
20920
20921 # Commands used to build a loadable module if different from building
20922 # a shared archive.
20923 module_cmds=$lt_module_cmds_CXX
20924 module_expsym_cmds=$lt_module_expsym_cmds_CXX
20925
20926 # Whether we are building with GNU ld or not.
20927 with_gnu_ld=$lt_with_gnu_ld_CXX
20928
20929 # Flag that allows shared libraries with undefined symbols to be built.
20930 allow_undefined_flag=$lt_allow_undefined_flag_CXX
20931
20932 # Flag that enforces no undefined symbols.
20933 no_undefined_flag=$lt_no_undefined_flag_CXX
20934
20935 # Flag to hardcode \$libdir into a binary during linking.
20936 # This must work even if \$libdir does not exist
20937 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
20938
20939 # Whether we need a single "-rpath" flag with a separated argument.
20940 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
20941
20942 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
20943 # DIR into the resulting binary.
20944 hardcode_direct=$hardcode_direct_CXX
20945
20946 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
20947 # DIR into the resulting binary and the resulting library dependency is
20948 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
20949 # library is relocated.
20950 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
20951
20952 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
20953 # into the resulting binary.
20954 hardcode_minus_L=$hardcode_minus_L_CXX
20955
20956 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
20957 # into the resulting binary.
20958 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
20959
20960 # Set to "yes" if building a shared library automatically hardcodes DIR
20961 # into the library and all subsequent libraries and executables linked
20962 # against it.
20963 hardcode_automatic=$hardcode_automatic_CXX
20964
20965 # Set to yes if linker adds runtime paths of dependent libraries
20966 # to runtime path list.
20967 inherit_rpath=$inherit_rpath_CXX
20968
20969 # Whether libtool must link a program against all its dependency libraries.
20970 link_all_deplibs=$link_all_deplibs_CXX
20971
20972 # Set to "yes" if exported symbols are required.
20973 always_export_symbols=$always_export_symbols_CXX
20974
20975 # The commands to list exported symbols.
20976 export_symbols_cmds=$lt_export_symbols_cmds_CXX
20977
20978 # Symbols that should not be listed in the preloaded symbols.
20979 exclude_expsyms=$lt_exclude_expsyms_CXX
20980
20981 # Symbols that must always be exported.
20982 include_expsyms=$lt_include_expsyms_CXX
20983
20984 # Commands necessary for linking programs (against libraries) with templates.
20985 prelink_cmds=$lt_prelink_cmds_CXX
20986
20987 # Commands necessary for finishing linking programs.
20988 postlink_cmds=$lt_postlink_cmds_CXX
20989
20990 # Specify filename containing input files.
20991 file_list_spec=$lt_file_list_spec_CXX
20992
20993 # How to hardcode a shared library path into an executable.
20994 hardcode_action=$hardcode_action_CXX
20995
20996 # The directories searched by this compiler when creating a shared library.
20997 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
20998
20999 # Dependencies to place before and after the objects being linked to
21000 # create a shared library.
21001 predep_objects=$lt_predep_objects_CXX
21002 postdep_objects=$lt_postdep_objects_CXX
21003 predeps=$lt_predeps_CXX
21004 postdeps=$lt_postdeps_CXX
21005
21006 # The library search path used internally by the compiler when linking
21007 # a shared library.
21008 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
21009
21010 # ### END LIBTOOL TAG CONFIG: CXX
21011 _LT_EOF
21012
21013 ;;
21014
21015 esac
21016 done # for ac_tag
21017
21018
21019 as_fn_exit 0
21020 _ACEOF
21021 ac_clean_files=$ac_clean_files_save
21022
21023 test $ac_write_fail = 0 ||
21024 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21025
21026
21027 # configure is writing to config.log, and then calls config.status.
21028 # config.status does its own redirection, appending to config.log.
21029 # Unfortunately, on DOS this fails, as config.log is still kept open
21030 # by configure, so config.status won't be able to write to it; its
21031 # output is simply discarded. So we exec the FD to /dev/null,
21032 # effectively closing config.log, so it can be properly (re)opened and
21033 # appended to by config.status. When coming back to configure, we
21034 # need to make the FD available again.
21035 if test "$no_create" != yes; then
21036 ac_cs_success=:
21037 ac_config_status_args=
21038 test "$silent" = yes &&
21039 ac_config_status_args="$ac_config_status_args --quiet"
21040 exec 5>/dev/null
21041 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21042 exec 5>>config.log
21043 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21044 # would make configure fail if this is the last instruction.
21045 $ac_cs_success || as_fn_exit 1
21046 fi
21047 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21049 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21050 fi
21051
21052
0 libhtp (1:0.5.38+git20211019.1.6764f68-1) UNRELEASED; urgency=low
1
2 * New upstream snapshot.
3
4 -- Debian Janitor <janitor@jelmer.uk> Fri, 12 Nov 2021 08:36:23 -0000
5
06 libhtp (1:0.5.38-1) unstable; urgency=medium
17
28 * Upload to unstable post-release.
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-2021 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 # Makefile.in generated by automake 1.16.5 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2021 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 pkglibexecdir = $(libexecdir)/@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 = docs
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
92 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
93 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
94 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
95 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
96 $(top_srcdir)/configure.ac
97 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
98 $(ACLOCAL_M4)
99 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
100 mkinstalldirs = $(install_sh) -d
101 CONFIG_HEADER = $(top_builddir)/htp_config_auto_gen.h
102 CONFIG_CLEAN_FILES =
103 CONFIG_CLEAN_VPATH_FILES =
104 AM_V_P = $(am__v_P_@AM_V@)
105 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
106 am__v_P_0 = false
107 am__v_P_1 = :
108 AM_V_GEN = $(am__v_GEN_@AM_V@)
109 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
110 am__v_GEN_0 = @echo " GEN " $@;
111 am__v_GEN_1 =
112 AM_V_at = $(am__v_at_@AM_V@)
113 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
114 am__v_at_0 = @
115 am__v_at_1 =
116 SOURCES =
117 DIST_SOURCES =
118 am__can_run_installinfo = \
119 case $$AM_UPDATE_INFO_DIR in \
120 n|no|NO) false;; \
121 *) (install-info --version) >/dev/null 2>&1;; \
122 esac
123 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
124 am__DIST_COMMON = $(srcdir)/Makefile.in
125 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
126 ACLOCAL = @ACLOCAL@
127 AMTAR = @AMTAR@
128 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
129 AR = @AR@
130 AUTOCONF = @AUTOCONF@
131 AUTOHEADER = @AUTOHEADER@
132 AUTOMAKE = @AUTOMAKE@
133 AWK = @AWK@
134 CC = @CC@
135 CCDEPMODE = @CCDEPMODE@
136 CFLAGS = @CFLAGS@
137 CPP = @CPP@
138 CPPFLAGS = @CPPFLAGS@
139 CSCOPE = @CSCOPE@
140 CTAGS = @CTAGS@
141 CXX = @CXX@
142 CXXCPP = @CXXCPP@
143 CXXDEPMODE = @CXXDEPMODE@
144 CXXFLAGS = @CXXFLAGS@
145 CYGPATH_W = @CYGPATH_W@
146 DEFS = @DEFS@
147 DEPDIR = @DEPDIR@
148 DLLTOOL = @DLLTOOL@
149 DOXYGEN = @DOXYGEN@
150 DSYMUTIL = @DSYMUTIL@
151 DUMPBIN = @DUMPBIN@
152 ECHO_C = @ECHO_C@
153 ECHO_N = @ECHO_N@
154 ECHO_T = @ECHO_T@
155 EGREP = @EGREP@
156 ETAGS = @ETAGS@
157 EXEEXT = @EXEEXT@
158 FGREP = @FGREP@
159 GENERIC_LIBRARY_NAME = @GENERIC_LIBRARY_NAME@
160 GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@
161 GENERIC_RELEASE = @GENERIC_RELEASE@
162 GENERIC_VERSION = @GENERIC_VERSION@
163 GREP = @GREP@
164 INSTALL = @INSTALL@
165 INSTALL_DATA = @INSTALL_DATA@
166 INSTALL_PROGRAM = @INSTALL_PROGRAM@
167 INSTALL_SCRIPT = @INSTALL_SCRIPT@
168 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
169 LCOV = @LCOV@
170 LD = @LD@
171 LDFLAGS = @LDFLAGS@
172 LIBICONV = @LIBICONV@
173 LIBOBJS = @LIBOBJS@
174 LIBS = @LIBS@
175 LIBTOOL = @LIBTOOL@
176 LIPO = @LIPO@
177 LN_S = @LN_S@
178 LTLIBICONV = @LTLIBICONV@
179 LTLIBOBJS = @LTLIBOBJS@
180 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
181 MAKEINFO = @MAKEINFO@
182 MANIFEST_TOOL = @MANIFEST_TOOL@
183 MKDIR_P = @MKDIR_P@
184 NM = @NM@
185 NMEDIT = @NMEDIT@
186 OBJDUMP = @OBJDUMP@
187 OBJEXT = @OBJEXT@
188 OTOOL = @OTOOL@
189 OTOOL64 = @OTOOL64@
190 PACKAGE = @PACKAGE@
191 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
192 PACKAGE_NAME = @PACKAGE_NAME@
193 PACKAGE_STRING = @PACKAGE_STRING@
194 PACKAGE_TARNAME = @PACKAGE_TARNAME@
195 PACKAGE_URL = @PACKAGE_URL@
196 PACKAGE_VERSION = @PACKAGE_VERSION@
197 PATH_SEPARATOR = @PATH_SEPARATOR@
198 RANLIB = @RANLIB@
199 SED = @SED@
200 SET_MAKE = @SET_MAKE@
201 SHELL = @SHELL@
202 STRIP = @STRIP@
203 VERSION = @VERSION@
204 abs_builddir = @abs_builddir@
205 abs_srcdir = @abs_srcdir@
206 abs_top_builddir = @abs_top_builddir@
207 abs_top_srcdir = @abs_top_srcdir@
208 ac_ct_AR = @ac_ct_AR@
209 ac_ct_CC = @ac_ct_CC@
210 ac_ct_CXX = @ac_ct_CXX@
211 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
212 am__include = @am__include@
213 am__leading_dot = @am__leading_dot@
214 am__quote = @am__quote@
215 am__tar = @am__tar@
216 am__untar = @am__untar@
217 bindir = @bindir@
218 build = @build@
219 build_alias = @build_alias@
220 build_cpu = @build_cpu@
221 build_os = @build_os@
222 build_vendor = @build_vendor@
223 builddir = @builddir@
224 datadir = @datadir@
225 datarootdir = @datarootdir@
226 docdir = @docdir@
227 doxygen = @doxygen@
228 dvidir = @dvidir@
229 exec_prefix = @exec_prefix@
230 host = @host@
231 host_alias = @host_alias@
232 host_cpu = @host_cpu@
233 host_os = @host_os@
234 host_vendor = @host_vendor@
235 htmldir = @htmldir@
236 includedir = @includedir@
237 infodir = @infodir@
238 install_sh = @install_sh@
239 libdir = @libdir@
240 libexecdir = @libexecdir@
241 localedir = @localedir@
242 localstatedir = @localstatedir@
243 mandir = @mandir@
244 mkdir_p = @mkdir_p@
245 oldincludedir = @oldincludedir@
246 pdfdir = @pdfdir@
247 prefix = @prefix@
248 program_transform_name = @program_transform_name@
249 psdir = @psdir@
250 runstatedir = @runstatedir@
251 sbindir = @sbindir@
252 sharedstatedir = @sharedstatedir@
253 srcdir = @srcdir@
254 sysconfdir = @sysconfdir@
255 target_alias = @target_alias@
256 top_build_prefix = @top_build_prefix@
257 top_builddir = @top_builddir@
258 top_srcdir = @top_srcdir@
259 CLEANFILES = *.pdf
260 all: all-am
261
262 .SUFFIXES:
263 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
264 @for dep in $?; do \
265 case '$(am__configure_deps)' in \
266 *$$dep*) \
267 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
268 && { if test -f $@; then exit 0; else break; fi; }; \
269 exit 1;; \
270 esac; \
271 done; \
272 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \
273 $(am__cd) $(top_srcdir) && \
274 $(AUTOMAKE) --gnu docs/Makefile
275 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
276 @case '$?' in \
277 *config.status*) \
278 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
279 *) \
280 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
281 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
282 esac;
283
284 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
285 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
286
287 $(top_srcdir)/configure: $(am__configure_deps)
288 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
289 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
290 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
291 $(am__aclocal_m4_deps):
292
293 mostlyclean-libtool:
294 -rm -f *.lo
295
296 clean-libtool:
297 -rm -rf .libs _libs
298 tags TAGS:
299
300 ctags CTAGS:
301
302 cscope cscopelist:
303
304 distdir: $(BUILT_SOURCES)
305 $(MAKE) $(AM_MAKEFLAGS) distdir-am
306
307 distdir-am: $(DISTFILES)
308 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
309 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
310 list='$(DISTFILES)'; \
311 dist_files=`for file in $$list; do echo $$file; done | \
312 sed -e "s|^$$srcdirstrip/||;t" \
313 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
314 case $$dist_files in \
315 */*) $(MKDIR_P) `echo "$$dist_files" | \
316 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
317 sort -u` ;; \
318 esac; \
319 for file in $$dist_files; do \
320 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
321 if test -d $$d/$$file; then \
322 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
323 if test -d "$(distdir)/$$file"; then \
324 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
325 fi; \
326 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
327 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
328 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
329 fi; \
330 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
331 else \
332 test -f "$(distdir)/$$file" \
333 || cp -p $$d/$$file "$(distdir)/$$file" \
334 || exit 1; \
335 fi; \
336 done
337 check-am: all-am
338 check: check-am
339 all-am: Makefile
340 installdirs:
341 install: install-am
342 install-exec: install-exec-am
343 install-data: install-data-am
344 uninstall: uninstall-am
345
346 install-am: all-am
347 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
348
349 installcheck: installcheck-am
350 install-strip:
351 if test -z '$(STRIP)'; then \
352 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
353 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
354 install; \
355 else \
356 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
357 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
358 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
359 fi
360 mostlyclean-generic:
361
362 clean-generic:
363 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
364
365 distclean-generic:
366 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
367 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
368
369 maintainer-clean-generic:
370 @echo "This command is intended for maintainers to use"
371 @echo "it deletes files that may require special tools to rebuild."
372 clean: clean-am
373
374 clean-am: clean-generic clean-libtool clean-local mostlyclean-am
375
376 distclean: distclean-am
377 -rm -f Makefile
378 distclean-am: clean-am distclean-generic
379
380 dvi: dvi-am
381
382 dvi-am:
383
384 html: html-am
385
386 html-am:
387
388 info: info-am
389
390 info-am:
391
392 install-data-am:
393
394 install-dvi: install-dvi-am
395
396 install-dvi-am:
397
398 install-exec-am:
399
400 install-html: install-html-am
401
402 install-html-am:
403
404 install-info: install-info-am
405
406 install-info-am:
407
408 install-man:
409
410 install-pdf: install-pdf-am
411
412 install-pdf-am:
413
414 install-ps: install-ps-am
415
416 install-ps-am:
417
418 installcheck-am:
419
420 maintainer-clean: maintainer-clean-am
421 -rm -f Makefile
422 maintainer-clean-am: distclean-am maintainer-clean-generic
423
424 mostlyclean: mostlyclean-am
425
426 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
427
428 pdf: pdf-am
429
430 pdf-am:
431
432 ps: ps-am
433
434 ps-am:
435
436 uninstall-am:
437
438 .MAKE: install-am install-strip
439
440 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
441 clean-local cscopelist-am ctags-am distclean distclean-generic \
442 distclean-libtool distdir dvi dvi-am html html-am info info-am \
443 install install-am install-data install-data-am install-dvi \
444 install-dvi-am install-exec install-exec-am install-html \
445 install-html-am install-info install-info-am install-man \
446 install-pdf install-pdf-am install-ps install-ps-am \
447 install-strip installcheck installcheck-am installdirs \
448 maintainer-clean maintainer-clean-generic mostlyclean \
449 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
450 tags-am uninstall uninstall-am
451
452 .PRECIOUS: Makefile
453
454
455 clean-local:
456 rm -rf doxygen
457
458 doxygen: doxygen.conf $(DOXYGEN_DEPS)
459 @if test -n "$(DOXYGEN)"; then \
460 $(DOXYGEN) $<; \
461 else \
462 echo "You need doxygen installed to build the docs."; \
463 fi;
464
465 doxygen-pdf: doxygen doxygen.pdf
466
467 doxygen.pdf: doxygen
468 (cd doxygen/latex && make refman.pdf) && cp doxygen/latex/refman.pdf doxygen.pdf
469
470 .PHONY: doxygen-pdf
471
472 # Tell versions [3.59,3.63) of GNU make to not export all variables.
473 # Otherwise a system limit (for SysV at least) may be exceeded.
474 .NOEXPORT:
+0
-161
examples/mod_libhtp/mod_libhtp.c less more
0 /***************************************************************************
1 * Copyright (c) 2009-2010 Open Information Security Foundation
2 * Copyright (c) 2010-2013 Qualys, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15
16 * - Neither the name of the Qualys, Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ***************************************************************************/
32
33 #include "httpd.h"
34 #include "http_config.h"
35 #include "http_protocol.h"
36 #include "ap_config.h"
37
38 #include "htp.h"
39 #include "htp_transaction.h"
40
41 module AP_MODULE_DECLARE_DATA libhtp_module;
42
43 // XXX Handle all allocation failures
44
45 static int convert_method_number(int method_number) {
46 // We can cheat here because LibHTP reuses Apache's
47 // method identifiers. But we really shouldn't.
48 if ((method_number >= 0)&&(method_number <= 26)) {
49 return method_number;
50 }
51
52 // TODO Decouple this functions from Apache's internals.
53
54 return HTP_M_UNKNOWN;
55 }
56
57 static int convert_protocol_number(int protocol_number) {
58 // In Apache, 1.1 is stored as 1001. In LibHTP,
59 // the same protocol number is stored as 101.
60 return (protocol_number / 1000) * 100 + (protocol_number % 1000);
61 }
62
63 static apr_status_t transaction_cleanup(htp_tx_t *tx) {
64 htp_tx_destroy(tx);
65 return APR_SUCCESS;
66 }
67
68 static int libhtp_post_read_request(request_rec *r) {
69 htp_connp_t *connp = ap_get_module_config(r->connection->conn_config, &libhtp_module);
70 if (connp == NULL) return DECLINED;
71
72 // Create a new LibHTP transaction
73 htp_tx_t *tx = htp_connp_tx_create(connp);
74 if (tx == NULL) return DECLINED;
75
76 // Request begins
77 htp_tx_state_request_start(tx);
78
79 // Populate request line
80 htp_tx_req_set_method_c(tx, r->method, HTP_ALLOC_REUSE);
81 htp_tx_req_set_method_number(tx, convert_method_number(r->method_number));
82 htp_tx_req_set_uri_c(tx, r->uri, HTP_ALLOC_REUSE);
83 htp_tx_req_set_query_string_c(tx, r->args, HTP_ALLOC_REUSE);
84 htp_tx_req_set_protocol_c(tx, r->protocol, HTP_ALLOC_REUSE);
85 htp_tx_req_set_protocol_number(tx, convert_protocol_number(r->proto_num));
86 htp_tx_req_set_protocol_0_9(tx, r->assbackwards);
87
88 // Request line available
89 htp_tx_state_request_line(tx);
90
91 // Populate request headers
92 size_t i;
93 const apr_array_header_t *arr = apr_table_elts(r->headers_in);
94 const apr_table_entry_t *te = (apr_table_entry_t *) arr->elts;
95 for (i = 0; i < arr->nelts; i++) {
96 htp_tx_req_set_header_c(tx, te[i].key, te[i].val, HTP_ALLOC_REUSE);
97 }
98
99 // Request headers available
100 htp_tx_state_request_headers(tx);
101
102 // Attach LibHTP's transaction to Apache's request
103 ap_set_module_config(r->request_config, &libhtp_module, tx);
104 apr_pool_cleanup_register(r->pool, (void *)tx,
105 (apr_status_t (*)(void *))transaction_cleanup, apr_pool_cleanup_null);
106
107 return DECLINED;
108 }
109
110 static apr_status_t connection_cleanup(htp_connp_t *connp) {
111 htp_config_destroy(connp->cfg);
112 htp_connp_destroy(connp);
113
114 return APR_SUCCESS;
115 }
116
117 static int libhtp_pre_connection(conn_rec *c, void *csd) {
118 // Configuration; normally you'd read the configuration from
119 // a file, or some other type of storage, but, because this is
120 // just an example, we have it hard-coded.
121 htp_cfg_t *cfg = htp_config_create();
122 if (cfg == NULL) return OK;
123 htp_config_set_server_personality(cfg, HTP_SERVER_APACHE_2_2);
124 htp_config_register_urlencoded_parser(cfg);
125 htp_config_register_multipart_parser(cfg);
126
127 // Connection parser
128 htp_connp_t *connp = htp_connp_create(cfg);
129 if (connp == NULL) {
130 htp_config_destroy(cfg);
131 free(connp);
132 return OK;
133 }
134
135 // Open connection
136 htp_connp_open(connp, c->remote_ip, /* XXX remote port */ 0, c->local_ip, /* XXX local port */0, NULL);
137
138 ap_set_module_config(c->conn_config, &libhtp_module, connp);
139 apr_pool_cleanup_register(c->pool, (void *)connp,
140 (apr_status_t (*)(void *))connection_cleanup, apr_pool_cleanup_null);
141
142 return OK;
143 }
144
145 static void libhtp_register_hooks(apr_pool_t *p) {
146 ap_hook_pre_connection(libhtp_pre_connection, NULL, NULL, APR_HOOK_MIDDLE);
147 ap_hook_post_read_request(libhtp_post_read_request, NULL, NULL, APR_HOOK_MIDDLE);
148 }
149
150 /* Dispatch list for API hooks */
151 module AP_MODULE_DECLARE_DATA libhtp_module = {
152 STANDARD20_MODULE_STUFF,
153 NULL, /* create per-dir config structures */
154 NULL, /* merge per-dir config structures */
155 NULL, /* create per-server config structures */
156 NULL, /* merge per-server config structures */
157 NULL, /* table of config file commands */
158 libhtp_register_hooks /* register hooks */
159 };
160
+0
-569
extras/htptest.c less more
0 /***************************************************************************
1 * Copyright (c) 2009-2010 Open Information Security Foundation
2 * Copyright (c) 2010-2013 Qualys, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15
16 * - Neither the name of the Qualys, Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ***************************************************************************/
32
33 /**
34 * @file
35 * @author Ivan Ristic <ivanr@webkreator.com>
36 */
37
38 /*
39 * This program is a simple example of how to use LibHTP to parse a HTTP
40 * connection stream. It uses libnids for TCP reassembly and LibHTP for
41 * HTTP parsing.
42 *
43 * This program is only meant as an demonstration; it is not suitable
44 * to be used in production. Furthermore, libnids itself was unreliable
45 * in my tests.
46 *
47 * Compile with:
48 *
49 * $ gcc htptest.c -lhtp -lz -lnids -o htptest
50 *
51 */
52
53 #include <errno.h>
54 #include <stdlib.h>
55 #include <stdio.h>
56 #include <sys/types.h>
57 #include <sys/socket.h>
58 #include <netinet/in.h>
59 #include <netinet/in_systm.h>
60 #include <arpa/inet.h>
61 #include <string.h>
62 #include <stdio.h>
63 #include "nids.h"
64
65 #include <sys/types.h>
66 #include <sys/stat.h>
67 #include <fcntl.h>
68
69 #include <htp/htp.h>
70 #include <htp/htp_list.h>
71 #include <htp/htp_table.h>
72
73 #define DIRECTION_CLIENT 1
74 #define DIRECTION_SERVER 2
75
76 typedef struct chunk_t chunk_t;
77 typedef struct stream_data stream_data;
78
79 /** Data chunk structure */
80 struct chunk_t {
81 char *data;
82 size_t len;
83 int direction;
84 size_t consumed;
85 };
86
87 /** Per-stream data structure */
88 struct stream_data {
89 int id;
90 htp_connp_t *connp;
91 int direction;
92 int fd;
93 int chunk_counter;
94 int log_level;
95 int req_count;
96 htp_list_t *chunks;
97 htp_list_t *inbound_chunks;
98 htp_list_t *outbound_chunks;
99 };
100
101 /** LibHTP parser configuration */
102 htp_cfg_t *cfg;
103
104 /** Connection counter */
105 int counter = 1000;
106
107 /**
108 * Free stream data.
109 *
110 * @param[in] sd
111 */
112 void free_stream_data(stream_data *sd) {
113 if (sd == NULL) return;
114
115 // Free stream chunks, if any
116 if (sd->chunks != NULL) {
117 for (int i = 0, n = htp_list_size(sd->chunks); i < n; i++) {
118 chunk_t *chunk = htp_list_get(sd->chunks, i);
119 free(chunk->data);
120 free(chunk);
121 }
122
123 htp_list_destroy(sd->chunks);
124 sd->chunked = NULL;
125 }
126
127 // Free inbound chunks, if any
128 if (sd->inbound_chunks != NULL) {
129 for (int i = 0, n = htp_list_size(sd->inbound_chunks); i < n; i++) {
130 chunk_t *chunk = htp_list_get(sd->inbound_chunkds, i);
131 free(chunk->data);
132 free(chunk);
133 }
134
135 htp_list_destroy(sd->inbound_chunks);
136 sd->inbound_chunks = NULL;
137 }
138
139 // Free outbound chunks, if any
140 if (sd->outbound_chunks != NULL) {
141 for (int i = 0, n = htp_list_size(sd->outbound_chunks); i < n; i++) {
142 chunk_t *chunk = htp_list_get(sd->outbound_chunkds, i);
143 free(chunk->data);
144 free(chunk);
145 }
146
147 htp_list_destroy(sd->outbound_chunks);
148 sd->outbound_chunks = NULL;
149 }
150
151 // Close the stream file, if we have it open
152 if (sd->fd != -1) {
153 close(sd->fd);
154 }
155
156 free(sd);
157 }
158
159 /**
160 * Process as much buffered inbound and outbound data as possible
161 * (in that order)
162 *
163 * @param[in] sd
164 */
165 void process_stored_stream_data(stream_data *sd) {
166 int loop = 0;
167
168 do {
169 // Reset loop
170 loop = 0;
171
172 // Send as much inbound data as possible
173 while((sd->connp->in_status == HTP_STREAM_DATA)&&(htp_list_size(sd->inbound_chunks) > 0)) {
174 chunk_t *chunk = (chunk_t *)htp_list_get(sd->inbound_chunks, 0);
175
176 int rc = htp_connp_req_data(sd->connp, 0, chunk->data + chunk->consumed, chunk->len - chunk->consumed);
177 if (rc == HTP_STREAM_DATA) {
178 // The entire chunk was consumed
179 htp_list_shift(sd->inbound_chunks);
180 free(chunk->data);
181 free(chunk);
182 } else {
183 // Partial consumption
184 chunk->consumed = htp_connp_req_data_consumed(sd->connp);
185 }
186 }
187
188 // Send as much outbound data as possible
189 while((sd->connp->out_status == HTP_STREAM_DATA)&&(htp_list_size(sd->outbound_chunks) > 0)) {
190 chunk_t *chunk = (chunk_t *)htp_list_get(sd->outbound_chunks, 0);
191
192 int rc = htp_connp_res_data(sd->connp, 0, chunk->data + chunk->consumed, chunk->len - chunk->consumed);
193 if (rc == HTP_STREAM_DATA) {
194 // The entire chunk was consumed
195 htp_list_shift(sd->outbound_chunks);
196 free(chunk->data);
197 free(chunk);
198 } else {
199 // Partial consumption
200 chunk->consumed = htp_connp_res_data_consumed(sd->connp);
201 }
202
203 // Whenever we send some outbound data to the parser,
204 // we need to go back and try to send inbound data
205 // if we have it.
206 loop = 1;
207 }
208 } while(loop);
209 }
210
211 /**
212 * Process a chunk of the connection stream.
213 *
214 * @param[in] sd
215 * @param[in] direction
216 * @param[in] hlf
217 */
218 void process_stream_data(stream_data *sd, int direction, struct half_stream *hlf) {
219 chunk_t *chunk = NULL;
220 int rc;
221
222 //printf("#DATA direction %d bytes %d\n", sd->direction, hlf->count_new);
223
224 if (sd->direction == direction) {
225 // Inbound data
226
227 switch(sd->connp->in_status) {
228 case HTP_STREAM_NEW :
229 case HTP_STREAM_DATA :
230 // Send data to parser
231
232 rc = htp_connp_req_data(sd->connp, 0, hlf->data, hlf->count_new);
233 if (rc == HTP_STREAM_DATA_OTHER) {
234 // Encountered inbound parsing block
235
236 // Store partial chunk for later
237 chunk = calloc(1, sizeof(chunk_t));
238 // TODO
239 chunk->len = hlf->count_new - htp_connp_req_data_consumed(sd->connp);
240 chunk->data = malloc(chunk->len);
241 // TODO
242 memcpy(chunk->data, hlf->data + htp_connp_req_data_consumed(sd->connp), chunk->len);
243 htp_list_add(sd->inbound_chunks, chunk);
244 } else
245 if (rc != HTP_STREAM_DATA) {
246 // Inbound parsing error
247 sd->log_level = 0;
248 fprintf(stderr, "[#%d] Inbound parsing error: %d\n", sd->id, rc);
249 // TODO Write connection to disk
250 }
251 break;
252
253 case HTP_STREAM_ERROR :
254 // Do nothing
255 break;
256
257 case HTP_STREAM_DATA_OTHER :
258 // Store data for later
259 chunk = calloc(1, sizeof(chunk_t));
260 // TODO
261 chunk->len = hlf->count_new;
262 chunk->data = malloc(chunk->len);
263 // TODO
264 memcpy(chunk->data, hlf->data, chunk->len);
265 htp_list_add(sd->inbound_chunks, chunk);
266 break;
267 }
268 } else {
269 // Outbound data
270 switch(sd->connp->out_status) {
271 case HTP_STREAM_NEW :
272 case HTP_STREAM_DATA :
273 // Send data to parser
274
275 rc = htp_connp_res_data(sd->connp, 0, hlf->data, hlf->count_new);
276 if (rc == HTP_STREAM_DATA_OTHER) {
277 // Encountered outbound parsing block
278
279 // Store partial chunk for later
280 chunk = calloc(1, sizeof(chunk_t));
281 // TODO
282 chunk->len = hlf->count_new - htp_connp_res_data_consumed(sd->connp);
283 chunk->data = malloc(chunk->len);
284 // TODO
285 memcpy(chunk->data, hlf->data + htp_connp_res_data_consumed(sd->connp), chunk->len);
286 htp_list_add(sd->outbound_chunks, chunk);
287 } else
288 if (rc != HTP_STREAM_DATA) {
289 // Outbound parsing error
290 sd->log_level = 0;
291 fprintf(stderr, "[#%d] Outbound parsing error: %d\n", sd->id, rc);
292 }
293 break;
294
295 case HTP_STREAM_ERROR :
296 // Do nothing
297 break;
298
299 case HTP_STREAM_DATA_OTHER :
300 // Store data for later
301 chunk = calloc(1, sizeof(chunk_t));
302 // TODO
303 chunk->len = hlf->count_new;
304 chunk->data = malloc(chunk->len);
305 // TODO
306 memcpy(chunk->data, hlf->data, chunk->len);
307 htp_list_add(sd->outbound_chunks, chunk);
308 break;
309 }
310 }
311
312 // Process as much stored data as possible
313 process_stored_stream_data(sd);
314 }
315
316 /**
317 * Called by libnids whenever it has an event we have to handle.
318 *
319 * @param[in] tcp
320 * @param[in] user_data
321 */
322 void tcp_callback (struct tcp_stream *tcp, void **user_data) {
323 stream_data *sd = *user_data;
324
325 // New connection
326 if (tcp->nids_state == NIDS_JUST_EST) {
327 tcp->client.collect++;
328 tcp->server.collect++;
329 tcp->server.collect_urg++;
330 tcp->client.collect_urg++;
331
332 // Allocate custom per-stream data
333 sd = calloc(1, sizeof(stream_data));
334 sd->id = counter++;
335 sd->direction = -1;
336 sd->fd = -1;
337 sd->log_level = -1;
338 sd->chunks = htp_list_array_create(16);
339 sd->inbound_chunks = htp_list_array_create(16);
340 sd->outbound_chunks = htp_list_array_create(16);
341 sd->req_count = 1;
342
343 // Init LibHTP parser
344 sd->connp = htp_connp_create(cfg);
345 if (sd->connp == NULL) {
346 fprintf(stderr, "Failed to create LibHTP parser instance.\n");
347 exit(1);
348 }
349
350 // Associate TCP stream information with the HTTP connection parser
351 htp_connp_set_user_data(sd->connp, sd);
352
353 // Associate TCP stream information with the libnids structures
354 *user_data = sd;
355
356 return;
357 }
358
359 // Connection close
360 if (tcp->nids_state == NIDS_CLOSE) {
361 if (sd == NULL) return;
362
363 // Destroy parser
364 htp_connp_destroy_all(sd->connp);
365
366 // Free custom per-stream data
367 free_stream_data(sd);
368
369 return;
370 }
371
372 // Connection close (RST)
373 if (tcp->nids_state == NIDS_RESET) {
374 if (sd == NULL) return;
375
376 // Destroy parser
377 htp_connp_destroy_all(sd->connp);
378
379 // Free custom per-stream data
380 free_stream_data(sd);
381
382 return;
383 }
384
385 if (tcp->nids_state == NIDS_DATA) {
386 struct half_stream *hlf;
387 int direction;
388
389 if (tcp->client.count_new) {
390 hlf = &tcp->client;
391 direction = DIRECTION_SERVER;
392 } else {
393 hlf = &tcp->server;
394 direction = DIRECTION_CLIENT;
395 }
396
397 if (sd == NULL) return;
398
399 if (sd->direction == -1) {
400 sd->direction = direction;
401 }
402
403 // Write data to disk or store for later
404 if (sd->fd == -1) {
405 // Store data, as we may need it later
406 chunk_t *chunk = calloc(1, sizeof(chunk_t));
407 // TODO
408 chunk->direction = direction;
409 chunk->data = malloc(hlf->count_new);
410 // TODO
411 chunk->len = hlf->count_new;
412 memcpy(chunk->data, hlf->data, chunk->len);
413
414 htp_list_add(sd->chunks, chunk);
415 } else {
416 // No need to store, write directly to file
417
418 if (sd->chunk_counter != 0) {
419 write(sd->fd, "\r\n", 2);
420 }
421
422 if (sd->direction == direction) {
423 write(sd->fd, ">>>\r\n", 5);
424 } else {
425 write(sd->fd, "<<<\r\n", 5);
426 }
427
428 write(sd->fd, hlf->data, hlf->count_new);
429
430 sd->chunk_counter++;
431 }
432
433 // Process data
434 process_stream_data(sd, direction, hlf);
435
436 return;
437 }
438 }
439
440 /**
441 * Invoked at the end of every transaction.
442 *
443 * @param[in] connp
444 */
445 int callback_response(htp_connp_t *connp) {
446 stream_data *sd = (stream_data *)htp_connp_get_user_data(connp);
447
448 char *x = bstr_util_strdup_to_c(connp->out_tx->request_line);
449 fprintf(stdout, "[#%d/%d] %s\n", sd->id, sd->req_count, x);
450 free(x);
451
452 sd->req_count++;
453 }
454
455 /**
456 * Invoked every time LibHTP wants to log.
457 *
458 * @param[in] log
459 */
460 int callback_log(htp_log_t *log) {
461 stream_data *sd = (stream_data *)htp_connp_get_user_data(log->connp);
462
463 if ((sd->log_level == -1)||(sd->log_level > log->level)) {
464 sd->log_level = log->level;
465 }
466
467 if (log->code != 0) {
468 fprintf(stderr, "[#%d/%d][%d][code %d][file %s][line %d] %s\n", sd->id, sd->req_count,
469 log->level, log->code, log->file, log->line, log->msg);
470 } else {
471 fprintf(stderr, "[#%d/%d][%d][file %s][line %d] %s\n", sd->id, sd->req_count,
472 log->level, log->file, log->line, log->msg);
473 }
474
475 // If this is the first time a log message was generated for this connection,
476 // start writing the entire thing to a file on disk.
477 if (sd->fd == -1) {
478 char filename[256];
479
480 // TODO Use IP addresses and ports in filename
481 snprintf(filename, 255, "conn-%d.t", sd->id);
482
483 sd->fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, S_IRUSR | S_IWUSR);
484 if (sd->fd == -1) {
485 fprintf(stderr, "Failed to create file %s: %s\n", filename, strerror(errno));
486 exit(1);
487 }
488
489 // Write to disk the data we have in memory
490 for (int i = 0, n = htp_list_size(sd->chunks); i < n; i++) {
491 chunk_t *chunk = htp_list_get(sd->chunks, i);
492
493 if (sd->chunk_counter != 0) {
494 write(sd->fd, "\r\n", 2);
495 }
496
497 if (sd->direction == chunk->direction) {
498 write(sd->fd, ">>>\r\n", 5);
499 } else {
500 write(sd->fd, "<<<\r\n", 5);
501 }
502
503 write(sd->fd, chunk->data, chunk->len);
504
505 sd->chunk_counter++;
506 }
507 }
508 }
509
510 /**
511 * Prints usage.
512 */
513 void print_usage() {
514 fprintf(stdout, "Usage: htpMon [-r file] [\"expression\"]\n");
515 }
516
517 /**
518 * Main entry point for this program.
519 *
520 * @param[in] argc
521 * @param[in] argv
522 */
523 int main(int argc, char *argv[]) {
524 // Check parameters
525 if ((argc < 2)||(argc > 4)) {
526 print_usage();
527 return 1;
528 }
529
530 // Configure libnids
531 if (argc > 2) {
532 if (strcmp(argv[1], "-r") != 0) {
533 print_usage();
534 return 1;
535 }
536
537 nids_params.filename = argv[2];
538
539 if (argc == 4) {
540 nids_params.pcap_filter = argv[3];
541 }
542 } else {
543 nids_params.pcap_filter = argv[1];
544 }
545
546 // Initialize libnids
547 if (!nids_init()) {
548 fprintf(stderr, "libnids initialization failed: %s\n", nids_errbuf);
549 return 1;
550 }
551
552 // Create LibHTP configuration
553 cfg = htp_config_create();
554 htp_config_set_server_personality(cfg, HTP_SERVER_APACHE_2_2);
555
556 htp_config_register_response_complete(cfg, callback_response);
557 htp_config_register_log(cfg, callback_log);
558
559 // Run libnids
560 nids_register_tcp(tcp_callback);
561 nids_run();
562
563 // Destroy LibHTP configuration
564 htp_config_destroy(cfg);
565
566 return 0;
567 }
568
+0
-1008
extras/ruby/HTP.c less more
0 /***************************************************************************
1 * Copyright (c) 2009-2010 Open Information Security Foundation
2 * Copyright (c) 2010-2013 Qualys, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15
16 * - Neither the name of the Qualys, Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ***************************************************************************/
32
33 /**
34 * @author Christopher Alfeld <calfeld@qualys.com>
35 */
36
37 #include <ruby.h>
38 #include <htp/htp.h>
39
40 /* Status
41 * Complete: Tx, Header, HeaderLine, URI, all numeric constants.
42 * Incomplete: Cfg, Connp
43 * Missing completely: file, file_data, log, tx_data (probably not needed)
44 */
45
46 // Debug
47 #ifdef RBHTP_DBEUG
48 #include <stdio.h>
49 #define P( value ) { VALUE inspect = rb_funcall( value, rb_intern( "inspect" ), 0 ); printf("%s\n",StringValueCStr(inspect)); }
50 #else
51 #define P( value )
52 #endif
53
54 static VALUE mHTP;
55 static VALUE cCfg;
56 static VALUE cConnp;
57 static VALUE cTx;
58 static VALUE cHeader;
59 static VALUE cHeaderLine;
60 static VALUE cURI;
61 static VALUE cFile;
62 static VALUE cConn;
63
64 #define BSTR_TO_RSTR( B ) ( rb_str_new( bstr_ptr( B ), bstr_len( B ) ) )
65
66 // Accessor Helpers
67 #define RBHTP_R_INT( T, N ) \
68 VALUE rbhtp_ ## T ## _ ## N( VALUE self ) \
69 { \
70 htp_ ## T ## _t* x = NULL; \
71 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
72 return INT2FIX( x->N ); \
73 }
74
75 #define RBHTP_R_TV( T, N ) \
76 VALUE rbhtp_ ## T ## _ ## N( VALUE self ) \
77 { \
78 htp_ ## T ## _t* x = NULL; \
79 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
80 return rb_time_new( x->N.tv_sec, x->N.tv_usec ); \
81 }
82
83 #define RBHTP_R_CSTR( T, N ) \
84 VALUE rbhtp_ ## T ## _ ## N( VALUE self ) \
85 { \
86 htp_ ## T ## _t* x = NULL; \
87 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
88 if ( x->N == NULL ) return Qnil; \
89 return rb_str_new2( x->N ); \
90 }
91
92 #define RBHTP_W_INT( T, N ) \
93 VALUE rbhtp_## T ##_ ## N ## _set( VALUE self, VALUE v ) \
94 { \
95 Check_Type( v, T_FIXNUM ); \
96 htp_ ## T ## _t* x = NULL; \
97 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
98 x->N = FIX2INT( v ); \
99 return Qnil; \
100 }
101
102 #define RBHTP_RW_INT( T, N ) \
103 RBHTP_R_INT( T, N ) \
104 RBHTP_W_INT( T, N )
105
106 #define RBHTP_R_BOOL( T, N ) \
107 VALUE rbhtp_ ## T ## _ ## N( VALUE self ) \
108 { \
109 htp_ ## T ## _t* x = NULL; \
110 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
111 return x->N == 1 ? Qtrue : Qfalse; \
112 }
113
114 #define RBHTP_R_STRING( T, N ) \
115 VALUE rbhtp_ ## T ## _ ## N( VALUE self ) \
116 { \
117 htp_ ## T ## _t* x = NULL; \
118 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
119 if ( x->N == NULL ) \
120 return Qnil; \
121 return BSTR_TO_RSTR( x->N ); \
122 }
123
124 #define RBHTP_R_HTP( T, N, H ) \
125 VALUE rbhtp_ ## T ## _ ## N( VALUE self ) \
126 { \
127 htp_ ## T ## _t* x = NULL; \
128 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
129 if ( x->N == NULL ) \
130 return Qnil; \
131 return rb_funcall( H, rb_intern( "new" ), 1, \
132 Data_Wrap_Struct( rb_cObject, 0, 0, x->N ) ); \
133 }
134
135 #define RBHTP_R_URI( T, N ) RBHTP_R_HTP( T, N, cURI )
136
137 static VALUE rbhtp_r_string_table( htp_table_t* table )
138 {
139 if ( table == NULL ) return Qnil;
140
141 bstr *k, *v;
142 VALUE r = rb_ary_new();
143 for (int i = 0, n = htp_table_size(table); i < n; i++) {
144 v = htp_table_get_index(table, i, &k);
145 rb_ary_push( r, rb_ary_new3( 2,
146 BSTR_TO_RSTR( *k ), BSTR_TO_RSTR( *v ) ) );
147 }
148 return r;
149 }
150
151 #define RBHTP_R_STRING_TABLE( T, N ) \
152 VALUE rbhtp_ ## T ## _ ## N( VALUE self ) \
153 { \
154 htp_ ## T ## _t* x = NULL; \
155 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
156 return rbhtp_r_string_table( x->N ); \
157 }
158
159 // We don't push the keys as they are duplicated in the header.
160 static VALUE rbhtp_r_header_table( htp_table_t* table )
161 {
162 if ( table == NULL ) return Qnil;
163 htp_header_t* v;
164 VALUE r = rb_ary_new();
165
166 for (int i = 0, n = htp_table_size(table); i < n; i++) {
167 v = htp_table_get_index(table, i, NULL);
168 rb_ary_push( r,
169 rb_funcall( cHeader, rb_intern( "new" ), 1,
170 Data_Wrap_Struct( rb_cObject, 0, 0, v ) ) );
171 }
172
173 return r;
174 }
175
176 #define RBHTP_R_HEADER_TABLE( T, N ) \
177 VALUE rbhtp_ ## T ## _ ## N( VALUE self ) \
178 { \
179 htp_ ## T ## _t* x = NULL; \
180 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
181 return rbhtp_r_header_table( x->N ); \
182 }
183
184 static VALUE rbhtp_r_header_line_list( htp_list_t* list )
185 {
186 if ( list == NULL ) return Qnil;
187 VALUE r = rb_ary_new();
188 for (int i = 0, n = htp_list_size(list); i < n; i++) {
189 htp_header_line_t *v = htp_list_get(list, i);
190
191 rb_ary_push( r,
192 rb_funcall( cHeaderLine, rb_intern( "new" ), 1,
193 Data_Wrap_Struct( rb_cObject, 0, 0, v ) ) );
194 }
195 return r;
196 }
197
198 #define RBHTP_R_HEADER_LINE_LIST( T, N ) \
199 VALUE rbhtp_ ## T ## _ ## N( VALUE self ) \
200 { \
201 htp_ ## T ## _t* x = NULL; \
202 Data_Get_Struct( rb_iv_get( self, "@" #T ), htp_ ## T ## _t, x ); \
203 return rbhtp_r_header_line_list( x->N ); \
204 }
205
206 // This function is only needed when we malloc the URI ourselves.
207 void rbhtp_free_uri( void* p )
208 {
209 htp_uri_t* uri = (htp_uri_t*)p;
210 free( uri );
211 }
212
213 //---- HTP ---
214 VALUE rbhtp_get_version( VALUE self )
215 {
216 return rb_str_new2( htp_get_version() );
217 }
218
219 // We return a HTP::URI and throw an exception on error.
220 VALUE rbhtp_parse_uri( VALUE self, VALUE input )
221 {
222 Check_Type( input, T_STRING );
223 bstr* input_b = bstr_dup_mem( RSTRING_PTR( input ), RSTRING_LEN( input ) );
224 htp_uri_t* uri = NULL; // htp_parse_uri will alloc.
225
226 int result = htp_parse_uri( input_b, &uri );
227 if ( result != HTP_OK ) {
228 bstr_free( input_b );
229 free( uri );
230 rb_raise( rb_eRuntimeError, "HTP error in htp_parse_uri: %d", result );
231 return Qnil; // Ignored?
232 }
233
234 bstr_free( input_b ); // Okay, as htp_parse_uri dups the data it needs.
235
236 return rb_funcall( cURI, rb_intern( "new" ), 1,
237 Data_Wrap_Struct( rb_cObject, 0, rbhtp_free_uri, uri )
238 );
239 }
240
241 //---- Cfg ----
242
243 // Terminate list with "".
244 static char* const rbhtp_config_pvars[] = {
245 "@request_proc",
246 "@request_proc",
247 "@transaction_start",
248 "@request_line",
249 "@request_headers",
250 "@request_trailer",
251 "@response_line",
252 "@response_headers",
253 "@response_trailers",
254 ""
255 };
256
257 void rbhtp_config_free( void* p )
258 {
259 htp_cfg_t* cfg = (htp_cfg_t*)p;
260 htp_config_destroy( cfg );
261 }
262
263 VALUE rbhtp_config_initialize( VALUE self )
264 {
265 char* const* v = &rbhtp_config_pvars[0];
266 while ( *v[0] != '\0' ) {
267 rb_iv_set( self, *v, Qnil );
268 ++v;
269 }
270
271 htp_cfg_t* cfg = htp_config_create();
272
273 rb_iv_set( self, "@cfg",
274 Data_Wrap_Struct( rb_cObject, 0, rbhtp_config_free, cfg )
275 );
276
277 return Qnil;
278 }
279
280 VALUE rbhtp_config_copy( VALUE self )
281 {
282 // We create one too many copies here.
283 VALUE new_config = rb_funcall( cCfg, rb_intern( "new" ), 0 );
284 htp_cfg_t* cfg = NULL;
285 Data_Get_Struct( rb_iv_get( self, "@cfg" ), htp_cfg_t, cfg );
286
287 // Note that the existing new_config @cfg will be garbage collected as a
288 // result of this set.
289
290 rb_iv_set( new_config, "@cfg",
291 Data_Wrap_Struct( rb_cObject, 0, rbhtp_config_free,
292 htp_config_copy( cfg ) ) );
293
294 // Now copy over all our callbacks.
295 char* const* v = &rbhtp_config_pvars[0];
296 while ( *v[0] != '\0' ) {
297 rb_iv_set( new_config, *v, rb_iv_get( self, *v ) );
298 ++v;
299 }
300
301 return new_config;
302 }
303
304 VALUE rbhtp_config_set_server_personality( VALUE self, VALUE personality )
305 {
306 Check_Type( personality, T_FIXNUM );
307
308 htp_cfg_t* cfg = NULL;
309 Data_Get_Struct( rb_iv_get( self, "@cfg" ), htp_cfg_t, cfg );
310
311 return INT2FIX(
312 htp_config_set_server_personality( cfg, FIX2INT( personality ) )
313 );
314 }
315
316 VALUE rbhtp_config_register_urlencoded_parser( VALUE self )
317 {
318 htp_cfg_t* cfg = NULL;
319 Data_Get_Struct( rb_iv_get( self, "@cfg" ), htp_cfg_t, cfg );
320
321 htp_config_register_urlencoded_parser( cfg );
322
323 return Qnil;
324 }
325
326 #define RBHTP_CALLBACK_SUB( N ) \
327 VALUE rbhtp_config_register_ ## N( VALUE self ) \
328 { \
329 if ( ! rb_block_given_p() ) { \
330 rb_raise( rb_eArgError, "A block is required." ); \
331 return Qnil; \
332 } \
333 VALUE proc = rb_iv_get( self, "@" #N "_proc" ); \
334 if ( proc == Qnil ) { \
335 htp_cfg_t* cfg = NULL; \
336 Data_Get_Struct( rb_iv_get( self, "@cfg" ), htp_cfg_t, cfg ); \
337 htp_config_register_## N( cfg, rbhtp_config_callback_ ## N ); \
338 } \
339 rb_iv_set( self, "@" #N "_proc", rb_block_proc() ); \
340 return self; \
341 }
342
343 #define RBHTP_CONNP_CALLBACK( N ) \
344 int rbhtp_config_callback_ ## N( htp_connp_t* connp ) \
345 { \
346 VALUE userdata = (VALUE)htp_connp_get_user_data( connp ); \
347 VALUE config = rb_iv_get( userdata, "@cfg" ); \
348 VALUE proc = rb_iv_get( config, "@" #N "_proc" ); \
349 if ( proc != Qnil ) { \
350 return INT2FIX( \
351 rb_funcall( proc, rb_intern( "call" ), 1, userdata ) \
352 ); \
353 } \
354 return 1; \
355 } \
356 RBHTP_CALLBACK_SUB( N )
357
358 // Tx data is a tx and a data block. For *_body_data callbacks we pass
359 // in the tx as first argument and the data as a string as the second argument.
360 #define RBHTP_TXDATA_CALLBACK( N ) \
361 int rbhtp_config_callback_ ##N( htp_tx_data_t* txdata ) \
362 { \
363 htp_connp_t* connp = txdata->tx->connp; \
364 VALUE userdata = (VALUE)htp_connp_get_user_data( connp ); \
365 VALUE config = rb_iv_get( userdata, "@cfg" ); \
366 VALUE proc = rb_iv_get( config, "@" #N "_proc" ); \
367 if ( proc != Qnil ) { \
368 VALUE data = Qnil; \
369 if ( txdata->data ) \
370 data = rb_str_new( (char*)txdata->data, txdata->len ); \
371 return INT2FIX( \
372 rb_funcall( proc, rb_intern( "call" ), 2, \
373 rb_funcall( cTx, rb_intern( "new" ), 3, \
374 Data_Wrap_Struct( rb_cObject, 0, 0, txdata->tx ), \
375 config, \
376 userdata \
377 ), \
378 data \
379 ) \
380 ); \
381 } \
382 return 1; \
383 } \
384 RBHTP_CALLBACK_SUB( N )
385
386
387 RBHTP_CONNP_CALLBACK( request )
388 RBHTP_CONNP_CALLBACK( response )
389 RBHTP_CONNP_CALLBACK( transaction_start )
390 RBHTP_CONNP_CALLBACK( request_line )
391 RBHTP_CONNP_CALLBACK( request_headers )
392 RBHTP_CONNP_CALLBACK( request_trailer )
393 RBHTP_CONNP_CALLBACK( response_line )
394 RBHTP_CONNP_CALLBACK( response_headers )
395 RBHTP_CONNP_CALLBACK( response_trailer )
396
397 RBHTP_TXDATA_CALLBACK( request_body_data )
398 RBHTP_TXDATA_CALLBACK( response_body_data )
399
400 RBHTP_R_INT( cfg, spersonality )
401 RBHTP_RW_INT( cfg, parse_request_cookies )
402
403 // File data is a tx, file information, and file data. The callback thus
404 // takes those three as arguments.
405 int rbhtp_config_callback_request_file_data( htp_file_data_t* filedata )
406 {
407 htp_connp_t* connp = filedata->tx->connp;
408 VALUE userdata = (VALUE)htp_connp_get_user_data( connp );
409 VALUE config = rb_iv_get( userdata, "@cfg" );
410 VALUE proc = rb_iv_get( config, "@request_file_data_proc" );
411 if ( proc != Qnil ) {
412 VALUE data = Qnil;
413 if ( filedata->data )
414 data = rb_str_new( (char*)filedata->data, filedata->len );
415 return INT2FIX(
416 rb_funcall( proc, rb_intern( "call" ), 2,
417 rb_funcall( cTx, rb_intern( "new" ), 1,
418 Data_Wrap_Struct( rb_cObject, 0, 0, filedata->tx )
419 ),
420 rb_funcall( cFile, rb_intern( "new" ), 1,
421 Data_Wrap_Struct( rb_cObject, 0, 0, filedata->file )
422 ),
423 data
424 )
425 );
426 }
427 return 1;
428 }
429 RBHTP_CALLBACK_SUB( request_file_data )
430
431 //---- Connp ----
432
433 void rbhtp_connp_free( void* p )
434 {
435 htp_connp_t* connp = (htp_connp_t*)p;
436 if ( connp )
437 htp_connp_destroy_all( connp );
438 }
439
440 VALUE rbhtp_connp_initialize( VALUE self, VALUE config )
441 {
442 rb_iv_set( self, "@cfg", config );
443
444 htp_cfg_t* cfg = NULL;
445 Data_Get_Struct( rb_iv_get( config, "@cfg" ), htp_cfg_t, cfg );
446
447 htp_connp_t* connp = htp_connp_create( cfg );
448 htp_connp_set_user_data( connp, (void*)self );
449 rb_iv_set( self, "@connp",
450 Data_Wrap_Struct( rb_cObject, 0, rbhtp_connp_free, connp )
451 );
452
453 return Qnil;
454 }
455
456 VALUE rbhtp_connp_req_data( VALUE self, VALUE timestamp, VALUE data )
457 {
458 if ( strncmp( "Time", rb_class2name( CLASS_OF( timestamp ) ), 4 ) != 0 ) {
459 rb_raise( rb_eTypeError, "First argument must be a Time." );
460 return Qnil;
461 }
462
463 StringValue( data ); // try to make data a string.
464 Check_Type( data, T_STRING );
465
466 size_t len = RSTRING_LEN( data );
467 char* data_c = RSTRING_PTR( data );
468
469 htp_time_t timestamp_c;
470 timestamp_c.tv_sec =
471 FIX2INT( rb_funcall( timestamp, rb_intern( "tv_sec" ), 0 ) );
472 timestamp_c.tv_usec =
473 FIX2INT( rb_funcall( timestamp, rb_intern( "tv_usec" ), 0 ) );
474
475 VALUE connp_r = rb_iv_get( self, "@connp" );
476 htp_connp_t* connp = NULL;
477 Data_Get_Struct( connp_r, htp_connp_t, connp );
478
479 int result =
480 htp_connp_req_data( connp, &timestamp_c, (unsigned char*)data_c, len );
481
482 return INT2FIX( result );
483 }
484
485 VALUE rbhtp_connp_in_tx( VALUE self )
486 {
487 VALUE connp_r = rb_iv_get( self, "@connp" );
488 VALUE config = rb_iv_get( self, "@cfg" );
489 htp_connp_t* connp = NULL;
490 Data_Get_Struct( connp_r, htp_connp_t, connp );
491
492 if ( connp->in_tx == NULL )
493 return Qnil;
494
495 return rb_funcall( cTx, rb_intern( "new" ), 3,
496 Data_Wrap_Struct( rb_cObject, 0, 0, connp->in_tx ),
497 config,
498 self
499 );
500 }
501
502 VALUE rbhtp_connp_conn( VALUE self )
503 {
504 htp_connp_t* connp = NULL;
505 Data_Get_Struct( rb_iv_get( self, "@connp" ), htp_connp_t, connp );
506 if ( connp->conn == NULL )
507 return Qnil;
508 return rb_funcall( cConn, rb_intern( "new" ), 2,
509 Data_Wrap_Struct( rb_cObject, 0, 0, connp->conn ),
510 self
511 );
512 }
513
514 // Unlike Connp and Cfg, these are just wrapper. The lifetime of the
515 // underlying objects are bound to the Connp.
516
517 //---- Header ----
518 VALUE rbhtp_header_initialize( VALUE self, VALUE raw_header )
519 {
520 rb_iv_set( self, "@header", raw_header );
521 return Qnil;
522 }
523
524 RBHTP_R_STRING( header, name );
525 RBHTP_R_STRING( header, value );
526 RBHTP_R_INT( header, flags );
527
528 // ---- Header Line ----
529 VALUE rbhtp_header_line_initialize( VALUE self, VALUE raw_header_line )
530 {
531 rb_iv_set( self, "@header_line", raw_header_line );
532 return Qnil;
533 }
534
535 VALUE rbhtp_header_line_header( VALUE self )
536 {
537 htp_header_line_t* hline = NULL;
538 Data_Get_Struct( rb_iv_get( self, "@header_line" ), htp_header_line_t, hline );
539
540 if ( hline->header == NULL )
541 return Qnil;
542
543 return rb_funcall( cHeader, rb_intern( "new" ), 1,
544 Data_Wrap_Struct( rb_cObject, 0, 0, hline->header )
545 );
546 }
547
548 RBHTP_R_STRING( header_line, line );
549 RBHTP_R_INT( header_line, name_offset );
550 RBHTP_R_INT( header_line, name_len );
551 RBHTP_R_INT( header_line, value_offset );
552 RBHTP_R_INT( header_line, value_len );
553 RBHTP_R_INT( header_line, has_nulls );
554 RBHTP_R_INT( header_line, first_nul_offset );
555 RBHTP_R_INT( header_line, flags );
556
557 // ---- URI ----
558 VALUE rbhtp_uri_initialize( VALUE self, VALUE raw_uri )
559 {
560 rb_iv_set( self, "@uri", raw_uri );
561 return Qnil;
562 }
563
564 RBHTP_R_STRING( uri, scheme );
565 RBHTP_R_STRING( uri, username );
566 RBHTP_R_STRING( uri, password );
567 RBHTP_R_STRING( uri, hostname );
568 RBHTP_R_STRING( uri, port );
569 RBHTP_R_INT( uri, port_number );
570 RBHTP_R_STRING( uri, path );
571 RBHTP_R_STRING( uri, query );
572 RBHTP_R_STRING( uri, fragment );
573
574 //---- Tx ----
575
576 VALUE rbhtp_tx_initialize(
577 VALUE self,
578 VALUE raw_txn,
579 VALUE cfg,
580 VALUE connp )
581 {
582 rb_iv_set( self, "@tx", raw_txn );
583 rb_iv_set( self, "@cfg", cfg );
584 rb_iv_set( self, "@connp", connp );
585
586 return Qnil;
587 }
588
589 RBHTP_R_INT( tx, request_ignored_lines )
590 RBHTP_R_INT( tx, request_line_nul )
591 RBHTP_R_INT( tx, request_line_nul_offset )
592 RBHTP_R_INT( tx, request_method_number )
593 RBHTP_R_INT( tx, request_protocol_number )
594 RBHTP_R_INT( tx, protocol_is_simple )
595 RBHTP_R_INT( tx, request_message_len )
596 RBHTP_R_INT( tx, request_entity_len )
597 RBHTP_R_INT( tx, request_nonfiledata_len )
598 RBHTP_R_INT( tx, request_filedata_len )
599 RBHTP_R_INT( tx, request_header_lines_no_trailers )
600 RBHTP_R_INT( tx, request_headers_raw_lines )
601 RBHTP_R_INT( tx, request_transfer_coding )
602 RBHTP_R_INT( tx, request_content_encoding )
603 RBHTP_R_INT( tx, request_params_query_reused )
604 RBHTP_R_INT( tx, request_params_body_reused )
605 RBHTP_R_INT( tx, request_auth_type )
606 RBHTP_R_INT( tx, response_ignored_lines )
607 RBHTP_R_INT( tx, response_protocol_number )
608 RBHTP_R_INT( tx, response_status_number )
609 RBHTP_R_INT( tx, response_status_expected_number )
610 RBHTP_R_INT( tx, seen_100continue )
611 RBHTP_R_INT( tx, response_message_len )
612 RBHTP_R_INT( tx, response_entity_len )
613 RBHTP_R_INT( tx, response_transfer_coding )
614 RBHTP_R_INT( tx, response_content_encoding )
615 RBHTP_R_INT( tx, flags )
616 RBHTP_R_INT( tx, progress )
617
618 RBHTP_R_STRING( tx, request_method )
619 RBHTP_R_STRING( tx, request_line )
620 RBHTP_R_STRING( tx, request_uri )
621 RBHTP_R_STRING( tx, request_uri_normalized )
622 RBHTP_R_STRING( tx, request_protocol )
623 RBHTP_R_STRING( tx, request_headers_raw )
624 RBHTP_R_STRING( tx, request_headers_sep )
625 RBHTP_R_STRING( tx, request_content_type )
626 RBHTP_R_STRING( tx, request_auth_username )
627 RBHTP_R_STRING( tx, request_auth_password )
628 RBHTP_R_STRING( tx, response_line )
629 RBHTP_R_STRING( tx, response_protocol )
630 RBHTP_R_STRING( tx, response_status )
631 RBHTP_R_STRING( tx, response_message )
632 RBHTP_R_STRING( tx, response_headers_sep )
633
634 RBHTP_R_STRING_TABLE( tx, request_params_query )
635 RBHTP_R_STRING_TABLE( tx, request_params_body )
636 RBHTP_R_STRING_TABLE( tx, request_cookies )
637 RBHTP_R_HEADER_TABLE( tx, request_headers )
638 RBHTP_R_HEADER_TABLE( tx, response_headers )
639
640 RBHTP_R_HEADER_LINE_LIST( tx, request_header_lines );
641 RBHTP_R_HEADER_LINE_LIST( tx, response_header_lines );
642
643 RBHTP_R_URI( tx, parsed_uri )
644 RBHTP_R_URI( tx, parsed_uri_incomplete )
645
646 VALUE rbhtp_tx_conn( VALUE self )
647 {
648 htp_tx_t* tx = NULL;
649 Data_Get_Struct( rb_iv_get( self, "@tx" ), htp_tx_t, tx );
650 if ( tx->conn == NULL )
651 return Qnil;
652 return rb_funcall( cConn, rb_intern( "new" ), 2,
653 Data_Wrap_Struct( rb_cObject, 0, 0, tx->conn ),
654 rb_iv_get( self, "@connp" )
655 );
656 }
657
658 // ---- File ----
659 VALUE rbhtp_file_initialize( VALUE self, VALUE raw_file )
660 {
661 rb_iv_set( self, "@file", raw_file );
662 return Qnil;
663 }
664
665 RBHTP_R_INT( file, source )
666 RBHTP_R_STRING( file, filename )
667 RBHTP_R_INT( file, len )
668 RBHTP_R_CSTR( file, tmpname )
669 RBHTP_R_INT( file, fd )
670
671 // ---- Conn ----
672 VALUE rbhtp_conn_initialize( VALUE self, VALUE raw_conn, VALUE connp )
673 {
674 rb_iv_set( self, "@conn", raw_conn );
675 rb_iv_set( self, "@connp", connp );
676 return Qnil;
677 }
678
679 RBHTP_R_CSTR( conn, remote_addr )
680 RBHTP_R_INT( conn, remote_port )
681 RBHTP_R_CSTR( conn, local_addr )
682 RBHTP_R_INT( conn, local_port )
683 RBHTP_R_INT( conn, flags )
684 RBHTP_R_INT( conn, in_data_counter )
685 RBHTP_R_INT( conn, out_data_counter )
686 RBHTP_R_INT( conn, in_packet_counter )
687 RBHTP_R_INT( conn, out_packet_counter )
688 RBHTP_R_TV( conn, open_timestamp )
689 RBHTP_R_TV( conn, close_timestamp )
690
691 VALUE rbhtp_conn_transactions( VALUE self )
692 {
693 htp_conn_t* conn = NULL;
694 Data_Get_Struct( rb_iv_get( self, "@conn" ), htp_conn_t, conn );
695
696 if ( conn->transactions == NULL ) return Qnil;
697
698 VALUE connp = rb_iv_get( self, "@connp" );
699 VALUE cfg = rb_iv_get( connp, "@cfg" );
700
701 VALUE r = rb_ary_new();
702
703 for (int i = 0, n = htp_list_size(conn->transactions); i < n; i++) {
704 htp_tx_t *v = htp_list_get(conn->transactions, i);
705
706 rb_ary_push( r,
707 rb_funcall( cTx, rb_intern( "new" ), 3,
708 Data_Wrap_Struct( rb_cObject, 0, 0, v ),
709 cfg,
710 connp
711 )
712 );
713 }
714 return r;
715 }
716
717 //---- Init ----
718 void Init_htp( void )
719 {
720 mHTP = rb_define_module( "HTP" );
721
722 rb_define_singleton_method( mHTP, "get_version", rbhtp_get_version, 0 );
723 rb_define_singleton_method( mHTP, "parse_uri", rbhtp_parse_uri, 1 );
724
725 // All numeric constants from htp.h.
726 rb_define_const( mHTP, "HTP_ERROR", INT2FIX( HTP_ERROR ) );
727 rb_define_const( mHTP, "HTP_OK", INT2FIX( HTP_OK ) );
728 rb_define_const( mHTP, "HTP_DATA", INT2FIX( HTP_DATA ) );
729 rb_define_const( mHTP, "HTP_DATA_OTHER", INT2FIX( HTP_DATA_OTHER ) );
730 rb_define_const( mHTP, "HTP_DECLINED", INT2FIX( HTP_DECLINED ) );
731 rb_define_const( mHTP, "PROTOCOL_UNKNOWN", INT2FIX( HTP_PROTOCOL_UNKNOWN ) );
732 rb_define_const( mHTP, "HTTP_0_9", INT2FIX( HTP_PROTOCOL_0_9 ) );
733 rb_define_const( mHTP, "HTTP_1_0", INT2FIX( HTP_PROTOCOL_1_0 ) );
734 rb_define_const( mHTP, "HTTP_1_1", INT2FIX( HTP_PROTOCOL_1_1 ) );
735 rb_define_const( mHTP, "HTP_LOG_ERROR", INT2FIX( HTP_LOG_ERROR ) );
736 rb_define_const( mHTP, "HTP_LOG_WARNING", INT2FIX( HTP_LOG_WARNING ) );
737 rb_define_const( mHTP, "HTP_LOG_NOTICE", INT2FIX( HTP_LOG_NOTICE ) );
738 rb_define_const( mHTP, "HTP_LOG_INFO", INT2FIX( HTP_LOG_INFO ) );
739 rb_define_const( mHTP, "HTP_LOG_DEBUG", INT2FIX( HTP_LOG_DEBUG ) );
740 rb_define_const( mHTP, "HTP_LOG_DEBUG2", INT2FIX( HTP_LOG_DEBUG2 ) );
741 rb_define_const( mHTP, "HTP_HEADER_MISSING_COLON", INT2FIX( HTP_HEADER_MISSING_COLON ) );
742 rb_define_const( mHTP, "HTP_HEADER_INVALID_NAME", INT2FIX( HTP_HEADER_INVALID_NAME ) );
743 rb_define_const( mHTP, "HTP_HEADER_LWS_AFTER_FIELD_NAME", INT2FIX( HTP_HEADER_LWS_AFTER_FIELD_NAME ) );
744 rb_define_const( mHTP, "HTP_LINE_TOO_LONG_HARD", INT2FIX( HTP_LINE_TOO_LONG_HARD ) );
745 rb_define_const( mHTP, "HTP_LINE_TOO_LONG_SOFT", INT2FIX( HTP_LINE_TOO_LONG_SOFT ) );
746 rb_define_const( mHTP, "HTP_HEADER_LIMIT_HARD", INT2FIX( HTP_HEADER_LIMIT_HARD ) );
747 rb_define_const( mHTP, "HTP_HEADER_LIMIT_SOFT", INT2FIX( HTP_HEADER_LIMIT_SOFT ) );
748 rb_define_const( mHTP, "HTP_VALID_STATUS_MIN", INT2FIX( HTP_VALID_STATUS_MIN ) );
749 rb_define_const( mHTP, "HTP_VALID_STATUS_MAX", INT2FIX( HTP_VALID_STATUS_MAX ) );
750 rb_define_const( mHTP, "M_UNKNOWN", INT2FIX( M_UNKNOWN ) );
751 rb_define_const( mHTP, "M_GET", INT2FIX( M_GET ) );
752 rb_define_const( mHTP, "M_PUT", INT2FIX( M_PUT ) );
753 rb_define_const( mHTP, "M_POST", INT2FIX( M_POST ) );
754 rb_define_const( mHTP, "M_DELETE", INT2FIX( M_DELETE ) );
755 rb_define_const( mHTP, "M_CONNECT", INT2FIX( M_CONNECT ) );
756 rb_define_const( mHTP, "M_OPTIONS", INT2FIX( M_OPTIONS ) );
757 rb_define_const( mHTP, "M_TRACE", INT2FIX( M_TRACE ) );
758 rb_define_const( mHTP, "M_PATCH", INT2FIX( M_PATCH ) );
759 rb_define_const( mHTP, "M_PROPFIND", INT2FIX( M_PROPFIND ) );
760 rb_define_const( mHTP, "M_PROPPATCH", INT2FIX( M_PROPPATCH ) );
761 rb_define_const( mHTP, "M_MKCOL", INT2FIX( M_MKCOL ) );
762 rb_define_const( mHTP, "M_COPY", INT2FIX( M_COPY ) );
763 rb_define_const( mHTP, "M_MOVE", INT2FIX( M_MOVE ) );
764 rb_define_const( mHTP, "M_LOCK", INT2FIX( M_LOCK ) );
765 rb_define_const( mHTP, "M_UNLOCK", INT2FIX( M_UNLOCK ) );
766 rb_define_const( mHTP, "M_VERSION_CONTROL", INT2FIX( M_VERSION_CONTROL ) );
767 rb_define_const( mHTP, "M_CHECKOUT", INT2FIX( M_CHECKOUT ) );
768 rb_define_const( mHTP, "M_UNCHECKOUT", INT2FIX( M_UNCHECKOUT ) );
769 rb_define_const( mHTP, "M_CHECKIN", INT2FIX( M_CHECKIN ) );
770 rb_define_const( mHTP, "M_UPDATE", INT2FIX( M_UPDATE ) );
771 rb_define_const( mHTP, "M_LABEL", INT2FIX( M_LABEL ) );
772 rb_define_const( mHTP, "M_REPORT", INT2FIX( M_REPORT ) );
773 rb_define_const( mHTP, "M_MKWORKSPACE", INT2FIX( M_MKWORKSPACE ) );
774 rb_define_const( mHTP, "M_MKACTIVITY", INT2FIX( M_MKACTIVITY ) );
775 rb_define_const( mHTP, "M_BASELINE_CONTROL", INT2FIX( M_BASELINE_CONTROL ) );
776 rb_define_const( mHTP, "M_MERGE", INT2FIX( M_MERGE ) );
777 rb_define_const( mHTP, "M_INVALID", INT2FIX( M_INVALID ) );
778 rb_define_const( mHTP, "M_HEAD", INT2FIX( HTP_M_HEAD ) );
779 rb_define_const( mHTP, "HTP_FIELD_UNPARSEABLE", INT2FIX( HTP_FIELD_UNPARSEABLE ) );
780 rb_define_const( mHTP, "HTP_FIELD_INVALID", INT2FIX( HTP_FIELD_INVALID ) );
781 rb_define_const( mHTP, "HTP_FIELD_FOLDED", INT2FIX( HTP_FIELD_FOLDED ) );
782 rb_define_const( mHTP, "HTP_FIELD_REPEATED", INT2FIX( HTP_FIELD_REPEATED ) );
783 rb_define_const( mHTP, "HTP_FIELD_LONG", INT2FIX( HTP_FIELD_LONG ) );
784 rb_define_const( mHTP, "HTP_FIELD_NUL_BYTE", INT2FIX( HTP_FIELD_RAW_NUL ) );
785 rb_define_const( mHTP, "HTP_REQUEST_SMUGGLING", INT2FIX( HTP_REQUEST_SMUGGLING ) );
786 rb_define_const( mHTP, "HTP_INVALID_FOLDING", INT2FIX( HTP_INVALID_FOLDING ) );
787 rb_define_const( mHTP, "HTP_INVALID_CHUNKING", INT2FIX( HTP_REQUEST_INVALID_T_E ) );
788 rb_define_const( mHTP, "HTP_MULTI_PACKET_HEAD", INT2FIX( HTP_MULTI_PACKET_HEAD ) );
789 rb_define_const( mHTP, "HTP_HOST_MISSING", INT2FIX( HTP_HOST_MISSING ) );
790 rb_define_const( mHTP, "HTP_AMBIGUOUS_HOST", INT2FIX( HTP_HOST_AMBIGUOUS ) );
791 rb_define_const( mHTP, "HTP_PATH_ENCODED_NUL", INT2FIX( HTP_PATH_ENCODED_NUL ) );
792 rb_define_const( mHTP, "HTP_PATH_INVALID_ENCODING", INT2FIX( HTP_PATH_INVALID_ENCODING ) );
793 rb_define_const( mHTP, "HTP_PATH_INVALID", INT2FIX( HTP_PATH_INVALID ) );
794 rb_define_const( mHTP, "HTP_PATH_OVERLONG_U", INT2FIX( HTP_PATH_OVERLONG_U ) );
795 rb_define_const( mHTP, "HTP_PATH_ENCODED_SEPARATOR", INT2FIX( HTP_PATH_ENCODED_SEPARATOR ) );
796 rb_define_const( mHTP, "HTP_PATH_UTF8_VALID", INT2FIX( HTP_PATH_UTF8_VALID ) );
797 rb_define_const( mHTP, "HTP_PATH_UTF8_INVALID", INT2FIX( HTP_PATH_UTF8_INVALID ) );
798 rb_define_const( mHTP, "HTP_PATH_UTF8_OVERLONG", INT2FIX( HTP_PATH_UTF8_OVERLONG ) );
799 rb_define_const( mHTP, "HTP_PATH_FULLWIDTH_EVASION", INT2FIX( HTP_PATH_HALF_FULL_RANGE ) );
800 rb_define_const( mHTP, "HTP_STATUS_LINE_INVALID", INT2FIX( HTP_STATUS_LINE_INVALID ) );
801 rb_define_const( mHTP, "PIPELINED_CONNECTION", INT2FIX( HTP_CONN_PIPELINED ) );
802 rb_define_const( mHTP, "HTP_SERVER_MINIMAL", INT2FIX( HTP_SERVER_MINIMAL ) );
803 rb_define_const( mHTP, "HTP_SERVER_GENERIC", INT2FIX( HTP_SERVER_GENERIC ) );
804 rb_define_const( mHTP, "HTP_SERVER_IDS", INT2FIX( HTP_SERVER_IDS ) );
805 rb_define_const( mHTP, "HTP_SERVER_IIS_4_0", INT2FIX( HTP_SERVER_IIS_4_0 ) );
806 rb_define_const( mHTP, "HTP_SERVER_IIS_5_0", INT2FIX( HTP_SERVER_IIS_5_0 ) );
807 rb_define_const( mHTP, "HTP_SERVER_IIS_5_1", INT2FIX( HTP_SERVER_IIS_5_1 ) );
808 rb_define_const( mHTP, "HTP_SERVER_IIS_6_0", INT2FIX( HTP_SERVER_IIS_6_0 ) );
809 rb_define_const( mHTP, "HTP_SERVER_IIS_7_0", INT2FIX( HTP_SERVER_IIS_7_0 ) );
810 rb_define_const( mHTP, "HTP_SERVER_IIS_7_5", INT2FIX( HTP_SERVER_IIS_7_5 ) );
811 rb_define_const( mHTP, "HTP_SERVER_TOMCAT_6_0", INT2FIX( HTP_SERVER_TOMCAT_6_0 ) );
812 rb_define_const( mHTP, "HTP_SERVER_APACHE", INT2FIX( HTP_SERVER_APACHE ) );
813 rb_define_const( mHTP, "HTP_SERVER_APACHE_2_2", INT2FIX( HTP_SERVER_APACHE_2_2 ) );
814 rb_define_const( mHTP, "NONE", INT2FIX( HTP_AUTH_NONE ) );
815 rb_define_const( mHTP, "IDENTITY", INT2FIX( HTP_CODING_IDENTITY ) );
816 rb_define_const( mHTP, "CHUNKED", INT2FIX( HTP_CODING_CHUNKED ) );
817 rb_define_const( mHTP, "TX_PROGRESS_NEW", INT2FIX( HTP_REQUEST_NOT_STARTED ) );
818 rb_define_const( mHTP, "TX_PROGRESS_REQ_LINE", INT2FIX( HTP_REQUEST_LINE ) );
819 rb_define_const( mHTP, "TX_PROGRESS_REQ_HEADERS", INT2FIX( HTP_REQUEST_HEADERS ) );
820 rb_define_const( mHTP, "TX_PROGRESS_REQ_BODY", INT2FIX( HTP_REQUEST_BODY ) );
821 rb_define_const( mHTP, "TX_PROGRESS_REQ_TRAILER", INT2FIX( HTP_REQUEST_TRAILER ) );
822 rb_define_const( mHTP, "RESPONSE_WAIT", INT2FIX( HTP_REQUEST_COMPLETE ) );
823 rb_define_const( mHTP, "TX_PROGRESS_RES_LINE", INT2FIX( HTP_RESPONSE_LINE ) );
824 rb_define_const( mHTP, "RESPONSE_HEADERS", INT2FIX( HTP_RESPONSE_HEADERS ) );
825 rb_define_const( mHTP, "RESPONSE_BODY", INT2FIX( HTP_RESPONSE_BODY ) );
826 rb_define_const( mHTP, "TX_PROGRESS_RES_TRAILER", INT2FIX( HTP_RESPONSE_TRAILER ) );
827 rb_define_const( mHTP, "TX_PROGRESS_COMPLETE", INT2FIX( HTP_RESPONSE_COMPLETE ) );
828 rb_define_const( mHTP, "HTP_STREAM_NEW", INT2FIX( HTP_STREAM_NEW ) );
829 rb_define_const( mHTP, "HTP_STREAM_OPEN", INT2FIX( HTP_STREAM_OPEN ) );
830 rb_define_const( mHTP, "HTP_STREAM_CLOSED", INT2FIX( HTP_STREAM_CLOSED ) );
831 rb_define_const( mHTP, "HTP_STREAM_ERROR", INT2FIX( HTP_STREAM_ERROR ) );
832 rb_define_const( mHTP, "HTP_STREAM_TUNNEL", INT2FIX( HTP_STREAM_TUNNEL ) );
833 rb_define_const( mHTP, "HTP_STREAM_DATA_OTHER", INT2FIX( HTP_STREAM_DATA_OTHER ) );
834 rb_define_const( mHTP, "HTP_STREAM_DATA", INT2FIX( HTP_STREAM_DATA ) );
835 rb_define_const( mHTP, "URL_DECODER_PRESERVE_PERCENT", INT2FIX( HTP_URL_DECODE_PRESERVE_PERCENT ) );
836 rb_define_const( mHTP, "URL_DECODER_REMOVE_PERCENT", INT2FIX( HTP_URL_DECODE_REMOVE_PERCENT ) );
837 rb_define_const( mHTP, "URL_DECODER_DECODE_INVALID", INT2FIX( HTP_URL_DECODE_PROCESS_INVALID ) );
838 rb_define_const( mHTP, "URL_DECODER_STATUS_400", INT2FIX( HTP_URL_DECODE_STATUS_400 ) );
839 rb_define_const( mHTP, "NO", INT2FIX( NO ) );
840 rb_define_const( mHTP, "BESTFIT", INT2FIX( BESTFIT ) );
841 rb_define_const( mHTP, "YES", INT2FIX( YES ) );
842 rb_define_const( mHTP, "TERMINATE", INT2FIX( TERMINATE ) );
843 rb_define_const( mHTP, "STATUS_400", INT2FIX( STATUS_400 ) );
844 rb_define_const( mHTP, "STATUS_404", INT2FIX( STATUS_404 ) );
845 rb_define_const( mHTP, "HTP_AUTH_NONE", INT2FIX( HTP_AUTH_NONE ) );
846 rb_define_const( mHTP, "HTP_AUTH_BASIC", INT2FIX( HTP_AUTH_BASIC ) );
847 rb_define_const( mHTP, "HTP_AUTH_DIGEST", INT2FIX( HTP_AUTH_DIGEST ) );
848 rb_define_const( mHTP, "HTP_AUTH_UNKNOWN", INT2FIX( HTP_AUTH_UNRECOGNIZED ) );
849 rb_define_const( mHTP, "HTP_FILE_MULTIPART", INT2FIX( HTP_FILE_MULTIPART ) );
850 rb_define_const( mHTP, "HTP_FILE_PUT", INT2FIX( HTP_FILE_PUT ) );
851 rb_define_const( mHTP, "CFG_NOT_SHARED", INT2FIX( CFG_NOT_SHARED ) );
852 rb_define_const( mHTP, "CFG_SHARED", INT2FIX( CFG_SHARED ) );
853
854 cCfg = rb_define_class_under( mHTP, "Cfg", rb_cObject );
855 rb_define_method( cCfg, "initialize", rbhtp_config_initialize, 0 );
856 rb_define_method( cCfg, "copy", rbhtp_config_copy, 0 );
857
858 rb_define_method( cCfg, "register_response", rbhtp_config_register_response, 0 );
859 rb_define_method( cCfg, "register_request", rbhtp_config_register_request, 0 );
860 rb_define_method( cCfg, "register_transaction_start", rbhtp_config_register_transaction_start, 0 );
861 rb_define_method( cCfg, "register_request_line", rbhtp_config_register_request_line, 0 );
862 rb_define_method( cCfg, "register_request_headers", rbhtp_config_register_request_headers, 0 );
863 rb_define_method( cCfg, "register_request_trailer", rbhtp_config_register_request_trailer, 0 );
864 rb_define_method( cCfg, "register_response_line", rbhtp_config_register_response_line, 0 );
865 rb_define_method( cCfg, "register_response_headers", rbhtp_config_register_response_headers, 0 );
866 rb_define_method( cCfg, "register_response_trailer", rbhtp_config_register_response_trailer, 0 );
867
868 rb_define_method( cCfg, "register_urlencoded_parser", rbhtp_config_register_urlencoded_parser, 0 );
869 rb_define_method( cCfg, "register_request_body_data", rbhtp_config_register_request_body_data, 0 );
870 rb_define_method( cCfg, "register_response_body_data", rbhtp_config_register_request_body_data, 0 );
871 rb_define_method( cCfg, "register_request_file_data", rbhtp_config_register_request_file_data, 0 );
872
873 // server_personality= and server_personality are defined in htp_ruby.rb
874 rb_define_method( cCfg, "set_server_personality", rbhtp_config_set_server_personality, 1 );
875 rb_define_method( cCfg, "spersonality", rbhtp_cfg_spersonality, 0 );
876
877 rb_define_method( cCfg, "parse_request_cookies", rbhtp_cfg_parse_request_cookies, 0 );
878 rb_define_method( cCfg, "parse_request_cookies=", rbhtp_cfg_parse_request_cookies_set, 1 );
879 // TODO: Much more to add.
880
881 cConnp = rb_define_class_under( mHTP, "Connp", rb_cObject );
882 rb_define_method( cConnp, "initialize", rbhtp_connp_initialize, 1 );
883 rb_define_method( cConnp, "req_data", rbhtp_connp_req_data, 2 );
884 rb_define_method( cConnp, "in_tx", rbhtp_connp_in_tx, 0 );
885 rb_define_method( cConnp, "conn", rbhtp_connp_conn, 0 );
886 // TODO: Much more to Add.
887
888 cHeader = rb_define_class_under( mHTP, "Header", rb_cObject );
889 rb_define_method( cHeader, "initialize", rbhtp_header_initialize, 1 );
890 rb_define_method( cHeader, "name", rbhtp_header_name, 0 );
891 rb_define_method( cHeader, "value", rbhtp_header_value, 0 );
892 rb_define_method( cHeader, "flags", rbhtp_header_flags, 0 );
893
894 cHeaderLine = rb_define_class_under( mHTP, "HeaderLine", rb_cObject );
895 rb_define_method( cHeaderLine, "initialize", rbhtp_header_line_initialize, 1 );
896 rb_define_method( cHeaderLine, "header", rbhtp_header_line_header, 0 );
897 rb_define_method( cHeaderLine, "line", rbhtp_header_line_line, 0 );
898 rb_define_method( cHeaderLine, "name_offset", rbhtp_header_line_name_offset, 0 );
899 rb_define_method( cHeaderLine, "name_len", rbhtp_header_line_name_len, 0 );
900 rb_define_method( cHeaderLine, "value_offset", rbhtp_header_line_value_offset, 0 );
901 rb_define_method( cHeaderLine, "value_len", rbhtp_header_line_value_len, 0 );
902 rb_define_method( cHeaderLine, "has_nulls", rbhtp_header_line_has_nulls, 0 );
903 rb_define_method( cHeaderLine, "first_nul_offset", rbhtp_header_line_first_nul_offset, 0 );
904 rb_define_method( cHeaderLine, "flags", rbhtp_header_line_flags, 0 );
905
906 cURI = rb_define_class_under( mHTP, "URI", rb_cObject );
907 rb_define_method( cURI, "initialize", rbhtp_uri_initialize, 1 );
908
909 rb_define_method( cURI, "scheme", rbhtp_uri_scheme, 0 );
910 rb_define_method( cURI, "username", rbhtp_uri_username, 0 );
911 rb_define_method( cURI, "password", rbhtp_uri_password, 0 );
912 rb_define_method( cURI, "hostname", rbhtp_uri_hostname, 0 );
913 rb_define_method( cURI, "port", rbhtp_uri_port, 0 );
914 rb_define_method( cURI, "port_number", rbhtp_uri_port_number, 0 );
915 rb_define_method( cURI, "path", rbhtp_uri_path, 0 );
916 rb_define_method( cURI, "query", rbhtp_uri_query, 0 );
917 rb_define_method( cURI, "fragment", rbhtp_uri_fragment, 0 );
918
919 cTx = rb_define_class_under( mHTP, "Tx", rb_cObject );
920 rb_define_method( cTx, "initialize", rbhtp_tx_initialize, 3 );
921
922 rb_define_method( cTx, "request_ignored_lines", rbhtp_tx_request_ignored_lines, 0 );
923 rb_define_method( cTx, "request_line_nul", rbhtp_tx_request_line_nul, 0 );
924 rb_define_method( cTx, "request_line_nul_offset", rbhtp_tx_request_line_nul_offset, 0 );
925 rb_define_method( cTx, "request_method_number", rbhtp_tx_request_method_number, 0 );
926 rb_define_method( cTx, "request_line", rbhtp_tx_request_line, 0 );
927 rb_define_method( cTx, "request_method", rbhtp_tx_request_method, 0 );
928 rb_define_method( cTx, "request_uri", rbhtp_tx_request_uri, 0 );
929 rb_define_method( cTx, "request_uri_normalized", rbhtp_tx_request_uri_normalized, 0 );
930 rb_define_method( cTx, "request_protocol", rbhtp_tx_request_protocol, 0 );
931 rb_define_method( cTx, "request_headers_raw", rbhtp_tx_request_headers_raw, 0 );
932 rb_define_method( cTx, "request_headers_sep", rbhtp_tx_request_headers_sep, 0 );
933 rb_define_method( cTx, "request_content_type", rbhtp_tx_request_content_type, 0 );
934 rb_define_method( cTx, "request_auth_username", rbhtp_tx_request_auth_username, 0 );
935 rb_define_method( cTx, "request_auth_password", rbhtp_tx_request_auth_password, 0 );
936 rb_define_method( cTx, "response_line", rbhtp_tx_response_line, 0 );
937 rb_define_method( cTx, "response_protocol", rbhtp_tx_response_protocol, 0 );
938 rb_define_method( cTx, "response_status", rbhtp_tx_response_status, 0 );
939 rb_define_method( cTx, "response_message", rbhtp_tx_response_message, 0 );
940 rb_define_method( cTx, "response_headers_sep", rbhtp_tx_response_headers_sep, 0 );
941 rb_define_method( cTx, "request_protocol_number", rbhtp_tx_request_protocol_number, 0 );
942 rb_define_method( cTx, "protocol_is_simple", rbhtp_tx_protocol_is_simple, 0 );
943 rb_define_method( cTx, "request_message_len", rbhtp_tx_request_message_len, 0 );
944 rb_define_method( cTx, "request_entity_len", rbhtp_tx_request_entity_len, 0 );
945 rb_define_method( cTx, "request_nonfiledata_len", rbhtp_tx_request_nonfiledata_len, 0 );
946 rb_define_method( cTx, "request_filedata_len", rbhtp_tx_request_filedata_len, 0 );
947 rb_define_method( cTx, "request_header_lines_no_trailers", rbhtp_tx_request_header_lines_no_trailers, 0 );
948 rb_define_method( cTx, "request_headers_raw_lines", rbhtp_tx_request_headers_raw_lines, 0 );
949 rb_define_method( cTx, "request_transfer_coding", rbhtp_tx_request_transfer_coding, 0 );
950 rb_define_method( cTx, "request_content_encoding", rbhtp_tx_request_content_encoding, 0 );
951 rb_define_method( cTx, "request_params_query_reused", rbhtp_tx_request_params_query_reused, 0 );
952 rb_define_method( cTx, "request_params_body_reused", rbhtp_tx_request_params_body_reused, 0 );
953 rb_define_method( cTx, "request_auth_type", rbhtp_tx_request_auth_type, 0 );
954 rb_define_method( cTx, "response_ignored_lines", rbhtp_tx_response_ignored_lines, 0 );
955 rb_define_method( cTx, "response_protocol_number", rbhtp_tx_response_protocol_number, 0 );
956 rb_define_method( cTx, "response_status_number", rbhtp_tx_response_status_number, 0 );
957 rb_define_method( cTx, "response_status_expected_number", rbhtp_tx_response_status_expected_number, 0 );
958 rb_define_method( cTx, "seen_100continue", rbhtp_tx_seen_100continue, 0 );
959 rb_define_method( cTx, "response_message_len", rbhtp_tx_response_message_len, 0 );
960 rb_define_method( cTx, "response_entity_len", rbhtp_tx_response_entity_len, 0 );
961 rb_define_method( cTx, "response_transfer_coding", rbhtp_tx_response_transfer_coding, 0 );
962 rb_define_method( cTx, "response_content_encoding", rbhtp_tx_response_content_encoding, 0 );
963 rb_define_method( cTx, "flags", rbhtp_tx_flags, 0 );
964 rb_define_method( cTx, "progress", rbhtp_tx_progress, 0 );
965
966 rb_define_method( cTx, "request_params_query", rbhtp_tx_request_params_query, 0 );
967 rb_define_method( cTx, "request_params_body", rbhtp_tx_request_params_body, 0 );
968 rb_define_method( cTx, "request_cookies", rbhtp_tx_request_cookies, 0 );
969 rb_define_method( cTx, "request_headers", rbhtp_tx_request_headers, 0 );
970 rb_define_method( cTx, "response_headers", rbhtp_tx_response_headers, 0 );
971
972 rb_define_method( cTx, "request_header_lines", rbhtp_tx_request_header_lines, 0 );
973 rb_define_method( cTx, "response_header_lines", rbhtp_tx_response_header_lines, 0 );
974
975 rb_define_method( cTx, "parsed_uri", rbhtp_tx_parsed_uri, 0 );
976 rb_define_method( cTx, "parsed_uri_incomplete", rbhtp_tx_parsed_uri_incomplete, 0 );
977
978 rb_define_method( cTx, "conn", rbhtp_tx_conn, 0 );
979
980 cFile = rb_define_class_under( mHTP, "File", rb_cObject );
981 rb_define_method( cFile, "initialize", rbhtp_file_initialize, 1 );
982
983 rb_define_method( cFile, "source", rbhtp_file_source, 0 );
984 rb_define_method( cFile, "filename", rbhtp_file_filename, 0 );
985 rb_define_method( cFile, "len", rbhtp_file_len, 0 );
986 rb_define_method( cFile, "tmpname", rbhtp_file_tmpname, 0 );
987 rb_define_method( cFile, "fd", rbhtp_file_fd, 0 );
988
989 cConn = rb_define_class_under( mHTP, "Conn", rb_cObject );
990 rb_define_method( cConn, "initialize", rbhtp_conn_initialize, 2 );
991
992 rb_define_method( cConn, "remote_addr", rbhtp_conn_remote_addr, 0 );
993 rb_define_method( cConn, "remote_port", rbhtp_conn_remote_port, 0 );
994 rb_define_method( cConn, "local_addr", rbhtp_conn_local_addr, 0 );
995 rb_define_method( cConn, "local_port", rbhtp_conn_local_port, 0 );
996 rb_define_method( cConn, "flags", rbhtp_conn_flags, 0 );
997 rb_define_method( cConn, "in_data_counter", rbhtp_conn_in_data_counter, 0 );
998 rb_define_method( cConn, "out_data_counter", rbhtp_conn_out_data_counter, 0 );
999 rb_define_method( cConn, "in_packet_counter", rbhtp_conn_in_packet_counter, 0 );
1000 rb_define_method( cConn, "out_packet_counter", rbhtp_conn_out_packet_counter, 0 );
1001 rb_define_method( cConn, "transactions", rbhtp_conn_transactions, 0 );
1002 rb_define_method( cConn, "open_timestamp", rbhtp_conn_open_timestamp, 0 );
1003 rb_define_method( cConn, "close_timestamp", rbhtp_conn_close_timestamp, 0 );
1004
1005 // Load ruby code.
1006 rb_require( "htp_ruby" );
1007 }
+0
-58
extras/ruby/README less more
0 = Introduction =
1
2 Here are ruby bindings for libHTP. This project was intended for rapid
3 prototyping (and as an exercise for learning libHTP) and is not intended for
4 production use.
5
6 The library provides a partial interface to libHTP which, where it exists,
7 closely matches the C interface. The main classes are HTP::Cfg and
8 HTP::Connp which correspond to htp_config_t and htp_connp, respectively.
9 Functions that begin htp_config_ and htp_connp_ are methods of HTP::Cfg and
10 HTP::Connp respectively.
11
12 All callbacks are taken as blocks. E.g.,
13
14 config.register_request do |connp|
15 ...
16 end
17
18 See example.rb.
19
20 libHTP constants (#defines) exist as constants in HTP.
21
22 In addition, classes exist for the other HTP structures: HTP::Tx, HTP::URI,
23 HTP::Header, HTP::HeaderLine, etc. These classes provide read accessors for
24 the various fields. In addition, some additional methods are provided for more
25 Rubyish style, e.g., Header#invalid?. See htp_ruby.rb for a complete list of
26 API additions.
27
28 HTP::Cfg and HTP::Connp lifetimes are managed by the usual Ruby cycle,
29 i.e., garbage collected when no longer references. All other classes are bound
30 to the lifetimes of either of those classes. So, make sure you keep your
31 config and connection parser around as long as you need any of the data from
32 them or copy your data out into non-HTP classes.
33
34 If performance is a concern, you should not be using Ruby or these bindings.
35 That being said, some small effort has been made to avoid binding performance
36 penalties for data you don't use. For example, if you never look at
37 Tx#request_headers, that data will not be converted into Rubyspace. A side
38 effect of this behavior, is that return values should be cached. E.g.,
39 Tx#request_cookies generates an array of cookies every time it is called, so
40 consider caching the return value if you need to access it multiple times.
41
42
43 = Missing =
44
45 * Cfg and Connp are only minimally implemented.
46 * Conn#messages is missing.
47 * Logging is completely missing.
48 * Connp, and Cfg lack meaningful to_s or inspect.
49 * Bool support. As per C-interface, 0 and 1 are used instead of false and
50 true. Should add ...? accessors which latter values.
51 * Automated unit tests.
52 * API doc.
53 * libHTP version detection.
54 * Iterator parsing interface: Takes iterator of chunks and handles the various
55 parsing return codes. This allows the user to provide chunks as possible
56 via an iterator and have the parser just-work.
57
+0
-116
extras/ruby/example.rb less more
0 #!/usr/bin/env ruby
1
2 # Copyright (c) 2009-2010 Open Information Security Foundation
3 # Copyright (c) 2010-2013 Qualys, Inc.
4 # All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are
8 # met:
9 #
10 # - Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12
13 # - Redistributions in binary form must reproduce the above copyright
14 # notice, this list of conditions and the following disclaimer in the
15 # documentation and/or other materials provided with the distribution.
16
17 # - Neither the name of the Qualys, Inc. nor the names of its
18 # contributors may be used to endorse or promote products derived from
19 # this software without specific prior written permission.
20 #
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
33 $:.unshift( File.dirname( __FILE__ ) )
34
35 require 'htp'
36
37 # parse_uri example.
38 uri = HTP::parse_uri( "http://host.com/hello/world" )
39 puts uri
40
41 puts "----"
42
43 # Config and Connp example.
44 cfg = HTP::Cfg.new
45
46 cfg.server_personality = :apache
47 cfg.register_urlencoded_parser
48 # Comment out this line and notice that cookies vanish from output.
49 cfg.parse_request_cookies = 1
50
51 cfg.register_request do |connp|
52 tx = connp.in_tx
53
54 puts "Parsed URI: "
55 puts " " + tx.parsed_uri
56
57 if tx.request_headers
58 puts "Request Headers: "
59 tx.request_headers.each {|h| puts " " + h}
60 end
61
62 if tx.request_cookies
63 puts "Request Cookies: "
64 tx.request_cookies.each {|k,v| puts " #{k} = #{v}"}
65 end
66
67 if tx.request_params_query
68 puts "Request Params Query: "
69 tx.request_params_query.each {|k,v| puts " #{k} = #{v}"}
70 end
71
72 if tx.request_params_body
73 puts "Request Body Query: "
74 tx.request_params_body.each {|k,v| puts " #{k} = #{v}"}
75 end
76
77 0
78 end
79
80 cfg.register_request_body_data do |tx,data|
81 puts "Body Data: #{data}"
82
83 0
84 end
85
86 cfg.register_request_file_data do |tx,fileinfo,data|
87 puts "File Data for #{fileinfo}: #{data}"
88
89 0
90 end
91
92 connp = HTP::Connp.new( cfg )
93 input = DATA.read
94
95 connp.req_data( Time.now, input )
96
97 # Non-Callback Interface.
98 puts "----"
99
100 connp.conn.transactions.each do |tx|
101 # Might be an empty transaction.
102 next if ! tx.request_line
103 puts tx
104 end
105
106 __END__
107 POST http://user@password:host/%61/b/c?foo=bar#hi HTTP/1.1
108 User-Agent: Mozilla
109 Cookie: foo=bar
110 Content-Type: text/plain
111 Content-Length: 9
112
113 Body Text
114
115
+0
-6
extras/ruby/extconf.rb less more
0 require 'mkmf'
1
2 dir_config( 'htp' )
3 have_library( 'htp', 'htp_connp_create' ) || abort( "Can't find HTP library." )
4 have_header( 'htp/htp.h' ) || abort( "Can't find htp.h" )
5 create_makefile( 'htp' )
+0
-12
extras/ruby/htp.gemspec less more
0 Gem::Specification.new do |s|
1 s.name = "htp"
2 s.version = "0.1"
3
4 s.authors = ["Chrustopher Alfeld"]
5 s.description = "Ruby Bindings for libHTP."
6 s.email = "calfeld@qualys.com"
7 s.files = ["htp_ruby.rb", "HTP.c", "extconf.rb", "example.rb"]
8 s.extensions = ["extconf.rb"]
9 s.summary = "libHTP Ruby bindings."
10 s.require_path = '.'
11 end
+0
-247
extras/ruby/htp_ruby.rb less more
0 # Copyright (c) 2009-2010 Open Information Security Foundation
1 # Copyright (c) 2010-2013 Qualys, Inc.
2 # All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met:
7 #
8 # - Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10
11 # - Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
14
15 # - Neither the name of the Qualys, Inc. nor the names of its
16 # contributors may be used to endorse or promote products derived from
17 # this software without specific prior written permission.
18 #
19 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 # Author: Christopher Alfeld <calfeld@qualys.com>
32
33 module HTP
34 # TODO: Lots to do. Good inspect for all classes would be a good start.
35 # As would an easier parsing interface that takes care of the return codes.
36
37 class Cfg
38 # Object.dup will just create a Config that points to the same underlying
39 # htp_cfg_t. By using #copy which maps to htp_config_copy, we can do
40 # the expected dup behavior.
41 alias :dup :copy
42
43 SERVER_PERSONALITY_ASSOC = [
44 [ :minimal, HTP_SERVER_MINIMAL ],
45 [ :generic, HTP_SERVER_GENERIC ],
46 [ :ids, HTP_SERVER_IDS ],
47 [ :iis_4_0, HTP_SERVER_IIS_4_0 ],
48 [ :iis_5_0, HTP_SERVER_IIS_5_0 ],
49 [ :iis_5_1, HTP_SERVER_IIS_5_1 ],
50 [ :iis_6_0, HTP_SERVER_IIS_6_0 ],
51 [ :iis_7_0, HTP_SERVER_IIS_7_0 ],
52 [ :iis_7_5, HTP_SERVER_IIS_7_5 ],
53 [ :tomcat_6_0, HTP_SERVER_TOMCAT_6_0 ],
54 [ :apache, HTP_SERVER_APACHE ],
55 [ :apache_2_2, HTP_SERVER_APACHE_2_2 ]
56 ].freeze
57
58 def server_personality
59 personality_id = spersonality
60 personality = SERVER_PERSONALITY_ASSOC.rassoc( personality_id )[0]
61 personality.nil? ? personality_id : personality
62 end
63 def server_personality=( personality )
64 if personality.is_a?( String )
65 personality = personality.to_sym
66 end
67 if personality.is_a?( Symbol )
68 personality_id = SERVER_PERSONALITY_ASSOC.assoc( personality )[1]
69 if personality_id.nil?
70 raise TypeError.new( "Unknown personality: #{personality}" )
71 end
72 personality = personality_id
73 end
74 if ! personality.is_a?( Fixnum )
75 raise TypeError.new( "Can't understand personality." )
76 end
77 set_server_personality( personality )
78 end
79 end
80
81 class Connp
82 attr_reader :cfg
83 end
84
85 class Header
86 def invalid?
87 flags & HTP_FIELD_INVALID != 0
88 end
89
90 def folded?
91 flags & HTP_FIELD_FOLDED != 0
92 end
93
94 def repeated?
95 flags & HTP_FIELD_REPEATED != 0
96 end
97
98 def to_s
99 r = "#{name}: #{value}"
100 r += " <INVALID>" if invalid?
101 r += " <FOLDER>" if folded?
102 r += " <REPEATED>" if repeated?
103 r
104 end
105
106 alias :inspect :to_s
107 alias :to_str :to_s
108 end
109
110 class HeaderLine
111 def invalid?
112 flags & HTP_FIELD_INVALID != 0
113 end
114
115 def long?
116 flags & HTP_FIELD_LONG != 0
117 end
118
119 def nul_byte?
120 flags & HTP_FIELD_NUL_BYTE != 0
121 end
122
123 def to_s
124 line
125 end
126
127 alias :inspect :to_s
128 alias :to_str :to_s
129 end
130
131 class URI
132 def to_s
133 if hostname
134 "http://" +
135 ( username ? username : '' ) +
136 ( password ? ":#{password}" : '' ) +
137 ( hostname && ( username || password ) ? '@' : '' ) +
138 ( hostname ? "#{hostname}:#{port}" : '' )
139 else
140 ''
141 end +
142 ( path ? path : '' ) +
143 ( query ? "?#{query}" : '' ) +
144 ( fragment ? "##{fragment}" : '' )
145 end
146
147 alias :inspect :to_s
148 alias :to_str :to_s
149 end
150
151 class Tx
152 attr_reader :connp
153 attr_reader :cfg
154
155 # Here we cache a variety of values that are built on demand.
156 [
157 :request_params_query,
158 :request_params_body,
159 :request_cookies,
160 :request_headers,
161 :response_headers,
162 :request_header_lines,
163 :response_header_lines
164 ].each do |name|
165 raw_name = ( "_" + name.to_s ).to_sym
166 alias_method( raw_name, name )
167 private( raw_name )
168 remove_method( name )
169 define_method name do
170 @cache ||= {}
171 @cache[name] ||= send( raw_name )
172 end
173 end
174
175 def invalid_chunking?
176 flags & HTP_INVALID_CHUNKING != 0
177 end
178
179 def invalid_folding?
180 flags & HTP_INVALID_FOLDING != 0
181 end
182
183 def request_smuggling?
184 flags & HTP_REQUEST_SMUGGLING != 0
185 end
186
187 def multi_packet_header?
188 flags & HTP_MULTI_PACKET_HEAD != 0
189 end
190
191 def field_unparseable?
192 flags & HTP_FIELD_UNPARSABLE != 0
193 end
194
195 def request_params_as_hash
196 if ! @request_params
197 @request_params = Hash.new {|h,k| h[k] = []}
198 [ request_params_query, request_params_body ].compact.each do |result|
199 result.each do |k,v|
200 @request_params[k] << v
201 end
202 end
203 end
204 @request_params
205 end
206
207 def request_cookies_as_hash
208 if ! @request_cookies
209 @request_cookies = Hash.new {|h,k| h[k] = []}
210 result = request_cookies
211 if result
212 result.each do |k,v|
213 @request_cookies[k] << v
214 end
215 end
216 end
217 @request_cookies
218 end
219
220 alias :to_s :request_line
221 alias :to_str :to_s
222 alias :inspect :to_s
223 end
224
225 class File
226 alias :to_s :filename
227 alias :inspect :to_s
228 alias :to_str :to_s
229 end
230
231 class Conn
232 attr_reader :connp
233
234 def pipelined_connection?
235 flags & PIPELINED_CONNECTION
236 end
237
238 def to_s
239 ( local_addr || "???" ) + ":#{local_port} -> " +
240 ( remote_addr || "???" ) + ":#{remote_port}"
241 end
242
243 alias :to_str :to_s
244 alias :inspect :to_s
245 end
246 end
0 # Makefile.in generated by automake 1.16.5 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2021 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 pkglibexecdir = $(libexecdir)/@PACKAGE@
77 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
78 install_sh_DATA = $(install_sh) -c -m 644
79 install_sh_PROGRAM = $(install_sh) -c
80 install_sh_SCRIPT = $(install_sh) -c
81 INSTALL_HEADER = $(INSTALL_DATA)
82 transform = $(program_transform_name)
83 NORMAL_INSTALL = :
84 PRE_INSTALL = :
85 POST_INSTALL = :
86 NORMAL_UNINSTALL = :
87 PRE_UNINSTALL = :
88 POST_UNINSTALL = :
89 build_triplet = @build@
90 host_triplet = @host@
91 @CYGWIN_TRUE@am__append_1 = $(LIBICONV)
92 @CYGWIN_TRUE@am__append_2 = -no-undefined
93 subdir = htp
94 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
95 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
96 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
97 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
98 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
99 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
100 $(top_srcdir)/configure.ac
101 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
102 $(ACLOCAL_M4)
103 DIST_COMMON = $(srcdir)/Makefile.am $(library_include_HEADERS) \
104 $(am__DIST_COMMON)
105 mkinstalldirs = $(install_sh) -d
106 CONFIG_HEADER = $(top_builddir)/htp_config_auto_gen.h
107 CONFIG_CLEAN_FILES = htp_version.h
108 CONFIG_CLEAN_VPATH_FILES =
109 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
110 am__vpath_adj = case $$p in \
111 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
112 *) f=$$p;; \
113 esac;
114 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
115 am__install_max = 40
116 am__nobase_strip_setup = \
117 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
118 am__nobase_strip = \
119 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
120 am__nobase_list = $(am__nobase_strip_setup); \
121 for p in $$list; do echo "$$p $$p"; done | \
122 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
123 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
124 if (++n[$$2] == $(am__install_max)) \
125 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
126 END { for (dir in files) print dir, files[dir] }'
127 am__base_list = \
128 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
129 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
130 am__uninstall_files_from_dir = { \
131 test -z "$$files" \
132 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
133 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
134 $(am__cd) "$$dir" && rm -f $$files; }; \
135 }
136 am__installdirs = "$(DESTDIR)$(libdir)" \
137 "$(DESTDIR)$(library_includedir)"
138 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
139 libhtp_c_la_LIBADD =
140 am__objects_1 =
141 am__objects_2 = bstr.lo bstr_builder.lo htp_base64.lo htp_config.lo \
142 htp_connection.lo htp_connection_parser.lo \
143 htp_content_handlers.lo htp_cookies.lo htp_decompressors.lo \
144 htp_hooks.lo htp_list.lo htp_multipart.lo htp_parsers.lo \
145 htp_php.lo htp_request.lo htp_request_apache_2_2.lo \
146 htp_request_generic.lo htp_request_parsers.lo htp_response.lo \
147 htp_response_generic.lo htp_table.lo htp_transaction.lo \
148 htp_transcoder.lo htp_urlencoded.lo htp_util.lo \
149 htp_utf8_decoder.lo strlcpy.lo strlcat.lo
150 am_libhtp_c_la_OBJECTS = $(am__objects_1) $(am__objects_1) \
151 $(am__objects_2)
152 libhtp_c_la_OBJECTS = $(am_libhtp_c_la_OBJECTS)
153 AM_V_lt = $(am__v_lt_@AM_V@)
154 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
155 am__v_lt_0 = --silent
156 am__v_lt_1 =
157 am__DEPENDENCIES_1 =
158 @CYGWIN_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
159 libhtp_la_DEPENDENCIES = libhtp-c.la lzma/liblzma-c.la \
160 $(am__DEPENDENCIES_2)
161 am_libhtp_la_OBJECTS =
162 libhtp_la_OBJECTS = $(am_libhtp_la_OBJECTS)
163 libhtp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
164 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
165 $(libhtp_la_LDFLAGS) $(LDFLAGS) -o $@
166 AM_V_P = $(am__v_P_@AM_V@)
167 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
168 am__v_P_0 = false
169 am__v_P_1 = :
170 AM_V_GEN = $(am__v_GEN_@AM_V@)
171 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
172 am__v_GEN_0 = @echo " GEN " $@;
173 am__v_GEN_1 =
174 AM_V_at = $(am__v_at_@AM_V@)
175 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
176 am__v_at_0 = @
177 am__v_at_1 =
178 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
179 depcomp = $(SHELL) $(top_srcdir)/depcomp
180 am__maybe_remake_depfiles = depfiles
181 am__depfiles_remade = ./$(DEPDIR)/bstr.Plo \
182 ./$(DEPDIR)/bstr_builder.Plo ./$(DEPDIR)/htp_base64.Plo \
183 ./$(DEPDIR)/htp_config.Plo ./$(DEPDIR)/htp_connection.Plo \
184 ./$(DEPDIR)/htp_connection_parser.Plo \
185 ./$(DEPDIR)/htp_content_handlers.Plo \
186 ./$(DEPDIR)/htp_cookies.Plo ./$(DEPDIR)/htp_decompressors.Plo \
187 ./$(DEPDIR)/htp_hooks.Plo ./$(DEPDIR)/htp_list.Plo \
188 ./$(DEPDIR)/htp_multipart.Plo ./$(DEPDIR)/htp_parsers.Plo \
189 ./$(DEPDIR)/htp_php.Plo ./$(DEPDIR)/htp_request.Plo \
190 ./$(DEPDIR)/htp_request_apache_2_2.Plo \
191 ./$(DEPDIR)/htp_request_generic.Plo \
192 ./$(DEPDIR)/htp_request_parsers.Plo \
193 ./$(DEPDIR)/htp_response.Plo \
194 ./$(DEPDIR)/htp_response_generic.Plo ./$(DEPDIR)/htp_table.Plo \
195 ./$(DEPDIR)/htp_transaction.Plo ./$(DEPDIR)/htp_transcoder.Plo \
196 ./$(DEPDIR)/htp_urlencoded.Plo \
197 ./$(DEPDIR)/htp_utf8_decoder.Plo ./$(DEPDIR)/htp_util.Plo \
198 ./$(DEPDIR)/strlcat.Plo ./$(DEPDIR)/strlcpy.Plo
199 am__mv = mv -f
200 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
201 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
202 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
203 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
204 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
205 $(AM_CFLAGS) $(CFLAGS)
206 AM_V_CC = $(am__v_CC_@AM_V@)
207 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
208 am__v_CC_0 = @echo " CC " $@;
209 am__v_CC_1 =
210 CCLD = $(CC)
211 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
212 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
213 $(AM_LDFLAGS) $(LDFLAGS) -o $@
214 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
215 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
216 am__v_CCLD_0 = @echo " CCLD " $@;
217 am__v_CCLD_1 =
218 SOURCES = $(libhtp_c_la_SOURCES) $(libhtp_la_SOURCES)
219 DIST_SOURCES = $(libhtp_c_la_SOURCES) $(libhtp_la_SOURCES)
220 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
221 ctags-recursive dvi-recursive html-recursive info-recursive \
222 install-data-recursive install-dvi-recursive \
223 install-exec-recursive install-html-recursive \
224 install-info-recursive install-pdf-recursive \
225 install-ps-recursive install-recursive installcheck-recursive \
226 installdirs-recursive pdf-recursive ps-recursive \
227 tags-recursive uninstall-recursive
228 am__can_run_installinfo = \
229 case $$AM_UPDATE_INFO_DIR in \
230 n|no|NO) false;; \
231 *) (install-info --version) >/dev/null 2>&1;; \
232 esac
233 HEADERS = $(library_include_HEADERS)
234 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
235 distclean-recursive maintainer-clean-recursive
236 am__recursive_targets = \
237 $(RECURSIVE_TARGETS) \
238 $(RECURSIVE_CLEAN_TARGETS) \
239 $(am__extra_recursive_targets)
240 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
241 distdir distdir-am
242 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
243 # Read a list of newline-separated strings from the standard input,
244 # and print each of them once, without duplicates. Input order is
245 # *not* preserved.
246 am__uniquify_input = $(AWK) '\
247 BEGIN { nonempty = 0; } \
248 { items[$$0] = 1; nonempty = 1; } \
249 END { if (nonempty) { for (i in items) print i; }; } \
250 '
251 # Make sure the list of sources is unique. This is necessary because,
252 # e.g., the same source file might be shared among _SOURCES variables
253 # for different programs/libraries.
254 am__define_uniq_tagged_files = \
255 list='$(am__tagged_files)'; \
256 unique=`for i in $$list; do \
257 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
258 done | $(am__uniquify_input)`
259 DIST_SUBDIRS = $(SUBDIRS)
260 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/htp_version.h.in \
261 $(top_srcdir)/depcomp
262 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
263 am__relativize = \
264 dir0=`pwd`; \
265 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
266 sed_rest='s,^[^/]*/*,,'; \
267 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
268 sed_butlast='s,/*[^/]*$$,,'; \
269 while test -n "$$dir1"; do \
270 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
271 if test "$$first" != "."; then \
272 if test "$$first" = ".."; then \
273 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
274 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
275 else \
276 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
277 if test "$$first2" = "$$first"; then \
278 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
279 else \
280 dir2="../$$dir2"; \
281 fi; \
282 dir0="$$dir0"/"$$first"; \
283 fi; \
284 fi; \
285 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
286 done; \
287 reldir="$$dir2"
288 ACLOCAL = @ACLOCAL@
289 AMTAR = @AMTAR@
290 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
291 AR = @AR@
292 AUTOCONF = @AUTOCONF@
293 AUTOHEADER = @AUTOHEADER@
294 AUTOMAKE = @AUTOMAKE@
295 AWK = @AWK@
296 CC = @CC@
297 CCDEPMODE = @CCDEPMODE@
298 CFLAGS = @CFLAGS@
299 CPP = @CPP@
300 CPPFLAGS = @CPPFLAGS@
301 CSCOPE = @CSCOPE@
302 CTAGS = @CTAGS@
303 CXX = @CXX@
304 CXXCPP = @CXXCPP@
305 CXXDEPMODE = @CXXDEPMODE@
306 CXXFLAGS = @CXXFLAGS@
307 CYGPATH_W = @CYGPATH_W@
308 DEFS = @DEFS@
309 DEPDIR = @DEPDIR@
310 DLLTOOL = @DLLTOOL@
311 DOXYGEN = @DOXYGEN@
312 DSYMUTIL = @DSYMUTIL@
313 DUMPBIN = @DUMPBIN@
314 ECHO_C = @ECHO_C@
315 ECHO_N = @ECHO_N@
316 ECHO_T = @ECHO_T@
317 EGREP = @EGREP@
318 ETAGS = @ETAGS@
319 EXEEXT = @EXEEXT@
320 FGREP = @FGREP@
321 GENERIC_LIBRARY_NAME = @GENERIC_LIBRARY_NAME@
322 GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@
323 GENERIC_RELEASE = @GENERIC_RELEASE@
324 GENERIC_VERSION = @GENERIC_VERSION@
325 GREP = @GREP@
326 INSTALL = @INSTALL@
327 INSTALL_DATA = @INSTALL_DATA@
328 INSTALL_PROGRAM = @INSTALL_PROGRAM@
329 INSTALL_SCRIPT = @INSTALL_SCRIPT@
330 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
331 LCOV = @LCOV@
332 LD = @LD@
333 LDFLAGS = @LDFLAGS@
334 LIBICONV = @LIBICONV@
335 LIBOBJS = @LIBOBJS@
336 LIBS = @LIBS@
337 LIBTOOL = @LIBTOOL@
338 LIPO = @LIPO@
339 LN_S = @LN_S@
340 LTLIBICONV = @LTLIBICONV@
341 LTLIBOBJS = @LTLIBOBJS@
342 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
343 MAKEINFO = @MAKEINFO@
344 MANIFEST_TOOL = @MANIFEST_TOOL@
345 MKDIR_P = @MKDIR_P@
346 NM = @NM@
347 NMEDIT = @NMEDIT@
348 OBJDUMP = @OBJDUMP@
349 OBJEXT = @OBJEXT@
350 OTOOL = @OTOOL@
351 OTOOL64 = @OTOOL64@
352 PACKAGE = @PACKAGE@
353 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
354 PACKAGE_NAME = @PACKAGE_NAME@
355 PACKAGE_STRING = @PACKAGE_STRING@
356 PACKAGE_TARNAME = @PACKAGE_TARNAME@
357 PACKAGE_URL = @PACKAGE_URL@
358 PACKAGE_VERSION = @PACKAGE_VERSION@
359 PATH_SEPARATOR = @PATH_SEPARATOR@
360 RANLIB = @RANLIB@
361 SED = @SED@
362 SET_MAKE = @SET_MAKE@
363 SHELL = @SHELL@
364 STRIP = @STRIP@
365 VERSION = @VERSION@
366 abs_builddir = @abs_builddir@
367 abs_srcdir = @abs_srcdir@
368 abs_top_builddir = @abs_top_builddir@
369 abs_top_srcdir = @abs_top_srcdir@
370 ac_ct_AR = @ac_ct_AR@
371 ac_ct_CC = @ac_ct_CC@
372 ac_ct_CXX = @ac_ct_CXX@
373 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
374 am__include = @am__include@
375 am__leading_dot = @am__leading_dot@
376 am__quote = @am__quote@
377 am__tar = @am__tar@
378 am__untar = @am__untar@
379 bindir = @bindir@
380 build = @build@
381 build_alias = @build_alias@
382 build_cpu = @build_cpu@
383 build_os = @build_os@
384 build_vendor = @build_vendor@
385 builddir = @builddir@
386 datadir = @datadir@
387 datarootdir = @datarootdir@
388 docdir = @docdir@
389 doxygen = @doxygen@
390 dvidir = @dvidir@
391 exec_prefix = @exec_prefix@
392 host = @host@
393 host_alias = @host_alias@
394 host_cpu = @host_cpu@
395 host_os = @host_os@
396 host_vendor = @host_vendor@
397 htmldir = @htmldir@
398 includedir = @includedir@
399 infodir = @infodir@
400 install_sh = @install_sh@
401 libdir = @libdir@
402 libexecdir = @libexecdir@
403 localedir = @localedir@
404 localstatedir = @localstatedir@
405 mandir = @mandir@
406 mkdir_p = @mkdir_p@
407 oldincludedir = @oldincludedir@
408 pdfdir = @pdfdir@
409 prefix = @prefix@
410 program_transform_name = @program_transform_name@
411 psdir = @psdir@
412 runstatedir = @runstatedir@
413 sbindir = @sbindir@
414 sharedstatedir = @sharedstatedir@
415 srcdir = @srcdir@
416 sysconfdir = @sysconfdir@
417 target_alias = @target_alias@
418 top_build_prefix = @top_build_prefix@
419 top_builddir = @top_builddir@
420 top_srcdir = @top_srcdir@
421 SUBDIRS = lzma
422 h_sources = bstr.h bstr_builder.h htp.h htp_base64.h htp_config.h htp_connection_parser.h \
423 htp_core.h htp_decompressors.h htp_hooks.h htp_list.h \
424 htp_multipart.h htp_table.h htp_transaction.h \
425 htp_urlencoded.h htp_utf8_decoder.h htp_version.h
426
427 h_sources_private = htp_config_private.h htp_connection_private.h htp_connection_parser_private.h htp_list_private.h \
428 htp_multipart_private.h htp_private.h htp_table_private.h htp_config_auto.h
429
430 c_sources = bstr.c bstr_builder.c htp_base64.c htp_config.c htp_connection.c htp_connection_parser.c \
431 htp_content_handlers.c htp_cookies.c htp_decompressors.c htp_hooks.c htp_list.c htp_multipart.c htp_parsers.c \
432 htp_php.c htp_request.c htp_request_apache_2_2.c htp_request_generic.c htp_request_parsers.c htp_response.c \
433 htp_response_generic.c htp_table.c htp_transaction.c htp_transcoder.c htp_urlencoded.c htp_util.c htp_utf8_decoder.c \
434 strlcpy.c strlcat.c
435
436 library_includedir = $(includedir)/$(GENERIC_LIBRARY_NAME)
437 library_include_HEADERS = $(h_sources)
438 AM_CFLAGS = -I$(top_srcdir) -I$(top_builddir)/htp -D_GNU_SOURCE -g -Wall -Wextra -std=gnu99 -pedantic \
439 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith \
440 -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter
441
442 noinst_LTLIBRARIES = libhtp-c.la
443 libhtp_c_la_SOURCES = $(h_sources) $(h_sources_private) $(c_sources)
444 lib_LTLIBRARIES = libhtp.la
445 libhtp_la_SOURCES =
446 libhtp_la_LIBADD = libhtp-c.la lzma/liblzma-c.la $(am__append_1)
447 libhtp_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION) \
448 $(am__append_2)
449 all: all-recursive
450
451 .SUFFIXES:
452 .SUFFIXES: .c .lo .o .obj
453 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
454 @for dep in $?; do \
455 case '$(am__configure_deps)' in \
456 *$$dep*) \
457 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
458 && { if test -f $@; then exit 0; else break; fi; }; \
459 exit 1;; \
460 esac; \
461 done; \
462 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu htp/Makefile'; \
463 $(am__cd) $(top_srcdir) && \
464 $(AUTOMAKE) --gnu htp/Makefile
465 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
466 @case '$?' in \
467 *config.status*) \
468 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
469 *) \
470 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
471 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
472 esac;
473
474 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
475 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
476
477 $(top_srcdir)/configure: $(am__configure_deps)
478 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
479 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
480 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
481 $(am__aclocal_m4_deps):
482 htp_version.h: $(top_builddir)/config.status $(srcdir)/htp_version.h.in
483 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
484
485 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
486 @$(NORMAL_INSTALL)
487 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
488 list2=; for p in $$list; do \
489 if test -f $$p; then \
490 list2="$$list2 $$p"; \
491 else :; fi; \
492 done; \
493 test -z "$$list2" || { \
494 echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
495 $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
496 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
497 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
498 }
499
500 uninstall-libLTLIBRARIES:
501 @$(NORMAL_UNINSTALL)
502 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
503 for p in $$list; do \
504 $(am__strip_dir) \
505 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
506 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
507 done
508
509 clean-libLTLIBRARIES:
510 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
511 @list='$(lib_LTLIBRARIES)'; \
512 locs=`for p in $$list; do echo $$p; done | \
513 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
514 sort -u`; \
515 test -z "$$locs" || { \
516 echo rm -f $${locs}; \
517 rm -f $${locs}; \
518 }
519
520 clean-noinstLTLIBRARIES:
521 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
522 @list='$(noinst_LTLIBRARIES)'; \
523 locs=`for p in $$list; do echo $$p; done | \
524 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
525 sort -u`; \
526 test -z "$$locs" || { \
527 echo rm -f $${locs}; \
528 rm -f $${locs}; \
529 }
530
531 libhtp-c.la: $(libhtp_c_la_OBJECTS) $(libhtp_c_la_DEPENDENCIES) $(EXTRA_libhtp_c_la_DEPENDENCIES)
532 $(AM_V_CCLD)$(LINK) $(libhtp_c_la_OBJECTS) $(libhtp_c_la_LIBADD) $(LIBS)
533
534 libhtp.la: $(libhtp_la_OBJECTS) $(libhtp_la_DEPENDENCIES) $(EXTRA_libhtp_la_DEPENDENCIES)
535 $(AM_V_CCLD)$(libhtp_la_LINK) -rpath $(libdir) $(libhtp_la_OBJECTS) $(libhtp_la_LIBADD) $(LIBS)
536
537 mostlyclean-compile:
538 -rm -f *.$(OBJEXT)
539
540 distclean-compile:
541 -rm -f *.tab.c
542
543 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bstr.Plo@am__quote@ # am--include-marker
544 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bstr_builder.Plo@am__quote@ # am--include-marker
545 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_base64.Plo@am__quote@ # am--include-marker
546 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_config.Plo@am__quote@ # am--include-marker
547 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_connection.Plo@am__quote@ # am--include-marker
548 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_connection_parser.Plo@am__quote@ # am--include-marker
549 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_content_handlers.Plo@am__quote@ # am--include-marker
550 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_cookies.Plo@am__quote@ # am--include-marker
551 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_decompressors.Plo@am__quote@ # am--include-marker
552 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_hooks.Plo@am__quote@ # am--include-marker
553 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_list.Plo@am__quote@ # am--include-marker
554 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_multipart.Plo@am__quote@ # am--include-marker
555 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_parsers.Plo@am__quote@ # am--include-marker
556 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_php.Plo@am__quote@ # am--include-marker
557 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_request.Plo@am__quote@ # am--include-marker
558 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_request_apache_2_2.Plo@am__quote@ # am--include-marker
559 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_request_generic.Plo@am__quote@ # am--include-marker
560 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_request_parsers.Plo@am__quote@ # am--include-marker
561 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_response.Plo@am__quote@ # am--include-marker
562 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_response_generic.Plo@am__quote@ # am--include-marker
563 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_table.Plo@am__quote@ # am--include-marker
564 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_transaction.Plo@am__quote@ # am--include-marker
565 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_transcoder.Plo@am__quote@ # am--include-marker
566 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_urlencoded.Plo@am__quote@ # am--include-marker
567 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_utf8_decoder.Plo@am__quote@ # am--include-marker
568 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htp_util.Plo@am__quote@ # am--include-marker
569 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcat.Plo@am__quote@ # am--include-marker
570 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@ # am--include-marker
571
572 $(am__depfiles_remade):
573 @$(MKDIR_P) $(@D)
574 @echo '# dummy' >$@-t && $(am__mv) $@-t $@
575
576 am--depfiles: $(am__depfiles_remade)
577
578 .c.o:
579 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
580 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
581 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
582 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
583 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
584
585 .c.obj:
586 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
587 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
588 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
589 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
590 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
591
592 .c.lo:
593 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
594 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
595 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
596 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
597 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
598
599 mostlyclean-libtool:
600 -rm -f *.lo
601
602 clean-libtool:
603 -rm -rf .libs _libs
604 install-library_includeHEADERS: $(library_include_HEADERS)
605 @$(NORMAL_INSTALL)
606 @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \
607 if test -n "$$list"; then \
608 echo " $(MKDIR_P) '$(DESTDIR)$(library_includedir)'"; \
609 $(MKDIR_P) "$(DESTDIR)$(library_includedir)" || exit 1; \
610 fi; \
611 for p in $$list; do \
612 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
613 echo "$$d$$p"; \
614 done | $(am__base_list) | \
615 while read files; do \
616 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \
617 $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \
618 done
619
620 uninstall-library_includeHEADERS:
621 @$(NORMAL_UNINSTALL)
622 @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \
623 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
624 dir='$(DESTDIR)$(library_includedir)'; $(am__uninstall_files_from_dir)
625
626 # This directory's subdirectories are mostly independent; you can cd
627 # into them and run 'make' without going through this Makefile.
628 # To change the values of 'make' variables: instead of editing Makefiles,
629 # (1) if the variable is set in 'config.status', edit 'config.status'
630 # (which will cause the Makefiles to be regenerated when you run 'make');
631 # (2) otherwise, pass the desired values on the 'make' command line.
632 $(am__recursive_targets):
633 @fail=; \
634 if $(am__make_keepgoing); then \
635 failcom='fail=yes'; \
636 else \
637 failcom='exit 1'; \
638 fi; \
639 dot_seen=no; \
640 target=`echo $@ | sed s/-recursive//`; \
641 case "$@" in \
642 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
643 *) list='$(SUBDIRS)' ;; \
644 esac; \
645 for subdir in $$list; do \
646 echo "Making $$target in $$subdir"; \
647 if test "$$subdir" = "."; then \
648 dot_seen=yes; \
649 local_target="$$target-am"; \
650 else \
651 local_target="$$target"; \
652 fi; \
653 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
654 || eval $$failcom; \
655 done; \
656 if test "$$dot_seen" = "no"; then \
657 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
658 fi; test -z "$$fail"
659
660 ID: $(am__tagged_files)
661 $(am__define_uniq_tagged_files); mkid -fID $$unique
662 tags: tags-recursive
663 TAGS: tags
664
665 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
666 set x; \
667 here=`pwd`; \
668 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
669 include_option=--etags-include; \
670 empty_fix=.; \
671 else \
672 include_option=--include; \
673 empty_fix=; \
674 fi; \
675 list='$(SUBDIRS)'; for subdir in $$list; do \
676 if test "$$subdir" = .; then :; else \
677 test ! -f $$subdir/TAGS || \
678 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
679 fi; \
680 done; \
681 $(am__define_uniq_tagged_files); \
682 shift; \
683 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
684 test -n "$$unique" || unique=$$empty_fix; \
685 if test $$# -gt 0; then \
686 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
687 "$$@" $$unique; \
688 else \
689 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
690 $$unique; \
691 fi; \
692 fi
693 ctags: ctags-recursive
694
695 CTAGS: ctags
696 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
697 $(am__define_uniq_tagged_files); \
698 test -z "$(CTAGS_ARGS)$$unique" \
699 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
700 $$unique
701
702 GTAGS:
703 here=`$(am__cd) $(top_builddir) && pwd` \
704 && $(am__cd) $(top_srcdir) \
705 && gtags -i $(GTAGS_ARGS) "$$here"
706 cscopelist: cscopelist-recursive
707
708 cscopelist-am: $(am__tagged_files)
709 list='$(am__tagged_files)'; \
710 case "$(srcdir)" in \
711 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
712 *) sdir=$(subdir)/$(srcdir) ;; \
713 esac; \
714 for i in $$list; do \
715 if test -f "$$i"; then \
716 echo "$(subdir)/$$i"; \
717 else \
718 echo "$$sdir/$$i"; \
719 fi; \
720 done >> $(top_builddir)/cscope.files
721
722 distclean-tags:
723 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
724 distdir: $(BUILT_SOURCES)
725 $(MAKE) $(AM_MAKEFLAGS) distdir-am
726
727 distdir-am: $(DISTFILES)
728 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
729 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
730 list='$(DISTFILES)'; \
731 dist_files=`for file in $$list; do echo $$file; done | \
732 sed -e "s|^$$srcdirstrip/||;t" \
733 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
734 case $$dist_files in \
735 */*) $(MKDIR_P) `echo "$$dist_files" | \
736 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
737 sort -u` ;; \
738 esac; \
739 for file in $$dist_files; do \
740 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
741 if test -d $$d/$$file; then \
742 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
743 if test -d "$(distdir)/$$file"; then \
744 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
745 fi; \
746 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
747 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
748 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
749 fi; \
750 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
751 else \
752 test -f "$(distdir)/$$file" \
753 || cp -p $$d/$$file "$(distdir)/$$file" \
754 || exit 1; \
755 fi; \
756 done
757 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
758 if test "$$subdir" = .; then :; else \
759 $(am__make_dryrun) \
760 || test -d "$(distdir)/$$subdir" \
761 || $(MKDIR_P) "$(distdir)/$$subdir" \
762 || exit 1; \
763 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
764 $(am__relativize); \
765 new_distdir=$$reldir; \
766 dir1=$$subdir; dir2="$(top_distdir)"; \
767 $(am__relativize); \
768 new_top_distdir=$$reldir; \
769 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
770 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
771 ($(am__cd) $$subdir && \
772 $(MAKE) $(AM_MAKEFLAGS) \
773 top_distdir="$$new_top_distdir" \
774 distdir="$$new_distdir" \
775 am__remove_distdir=: \
776 am__skip_length_check=: \
777 am__skip_mode_fix=: \
778 distdir) \
779 || exit 1; \
780 fi; \
781 done
782 check-am: all-am
783 check: check-recursive
784 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
785 installdirs: installdirs-recursive
786 installdirs-am:
787 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \
788 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
789 done
790 install: install-recursive
791 install-exec: install-exec-recursive
792 install-data: install-data-recursive
793 uninstall: uninstall-recursive
794
795 install-am: all-am
796 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
797
798 installcheck: installcheck-recursive
799 install-strip:
800 if test -z '$(STRIP)'; then \
801 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
802 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
803 install; \
804 else \
805 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
806 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
807 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
808 fi
809 mostlyclean-generic:
810
811 clean-generic:
812
813 distclean-generic:
814 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
815 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
816
817 maintainer-clean-generic:
818 @echo "This command is intended for maintainers to use"
819 @echo "it deletes files that may require special tools to rebuild."
820 clean: clean-recursive
821
822 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
823 clean-noinstLTLIBRARIES mostlyclean-am
824
825 distclean: distclean-recursive
826 -rm -f ./$(DEPDIR)/bstr.Plo
827 -rm -f ./$(DEPDIR)/bstr_builder.Plo
828 -rm -f ./$(DEPDIR)/htp_base64.Plo
829 -rm -f ./$(DEPDIR)/htp_config.Plo
830 -rm -f ./$(DEPDIR)/htp_connection.Plo
831 -rm -f ./$(DEPDIR)/htp_connection_parser.Plo
832 -rm -f ./$(DEPDIR)/htp_content_handlers.Plo
833 -rm -f ./$(DEPDIR)/htp_cookies.Plo
834 -rm -f ./$(DEPDIR)/htp_decompressors.Plo
835 -rm -f ./$(DEPDIR)/htp_hooks.Plo
836 -rm -f ./$(DEPDIR)/htp_list.Plo
837 -rm -f ./$(DEPDIR)/htp_multipart.Plo
838 -rm -f ./$(DEPDIR)/htp_parsers.Plo
839 -rm -f ./$(DEPDIR)/htp_php.Plo
840 -rm -f ./$(DEPDIR)/htp_request.Plo
841 -rm -f ./$(DEPDIR)/htp_request_apache_2_2.Plo
842 -rm -f ./$(DEPDIR)/htp_request_generic.Plo
843 -rm -f ./$(DEPDIR)/htp_request_parsers.Plo
844 -rm -f ./$(DEPDIR)/htp_response.Plo
845 -rm -f ./$(DEPDIR)/htp_response_generic.Plo
846 -rm -f ./$(DEPDIR)/htp_table.Plo
847 -rm -f ./$(DEPDIR)/htp_transaction.Plo
848 -rm -f ./$(DEPDIR)/htp_transcoder.Plo
849 -rm -f ./$(DEPDIR)/htp_urlencoded.Plo
850 -rm -f ./$(DEPDIR)/htp_utf8_decoder.Plo
851 -rm -f ./$(DEPDIR)/htp_util.Plo
852 -rm -f ./$(DEPDIR)/strlcat.Plo
853 -rm -f ./$(DEPDIR)/strlcpy.Plo
854 -rm -f Makefile
855 distclean-am: clean-am distclean-compile distclean-generic \
856 distclean-tags
857
858 dvi: dvi-recursive
859
860 dvi-am:
861
862 html: html-recursive
863
864 html-am:
865
866 info: info-recursive
867
868 info-am:
869
870 install-data-am: install-library_includeHEADERS
871
872 install-dvi: install-dvi-recursive
873
874 install-dvi-am:
875
876 install-exec-am: install-libLTLIBRARIES
877
878 install-html: install-html-recursive
879
880 install-html-am:
881
882 install-info: install-info-recursive
883
884 install-info-am:
885
886 install-man:
887
888 install-pdf: install-pdf-recursive
889
890 install-pdf-am:
891
892 install-ps: install-ps-recursive
893
894 install-ps-am:
895
896 installcheck-am:
897
898 maintainer-clean: maintainer-clean-recursive
899 -rm -f ./$(DEPDIR)/bstr.Plo
900 -rm -f ./$(DEPDIR)/bstr_builder.Plo
901 -rm -f ./$(DEPDIR)/htp_base64.Plo
902 -rm -f ./$(DEPDIR)/htp_config.Plo
903 -rm -f ./$(DEPDIR)/htp_connection.Plo
904 -rm -f ./$(DEPDIR)/htp_connection_parser.Plo
905 -rm -f ./$(DEPDIR)/htp_content_handlers.Plo
906 -rm -f ./$(DEPDIR)/htp_cookies.Plo
907 -rm -f ./$(DEPDIR)/htp_decompressors.Plo
908 -rm -f ./$(DEPDIR)/htp_hooks.Plo
909 -rm -f ./$(DEPDIR)/htp_list.Plo
910 -rm -f ./$(DEPDIR)/htp_multipart.Plo
911 -rm -f ./$(DEPDIR)/htp_parsers.Plo
912 -rm -f ./$(DEPDIR)/htp_php.Plo
913 -rm -f ./$(DEPDIR)/htp_request.Plo
914 -rm -f ./$(DEPDIR)/htp_request_apache_2_2.Plo
915 -rm -f ./$(DEPDIR)/htp_request_generic.Plo
916 -rm -f ./$(DEPDIR)/htp_request_parsers.Plo
917 -rm -f ./$(DEPDIR)/htp_response.Plo
918 -rm -f ./$(DEPDIR)/htp_response_generic.Plo
919 -rm -f ./$(DEPDIR)/htp_table.Plo
920 -rm -f ./$(DEPDIR)/htp_transaction.Plo
921 -rm -f ./$(DEPDIR)/htp_transcoder.Plo
922 -rm -f ./$(DEPDIR)/htp_urlencoded.Plo
923 -rm -f ./$(DEPDIR)/htp_utf8_decoder.Plo
924 -rm -f ./$(DEPDIR)/htp_util.Plo
925 -rm -f ./$(DEPDIR)/strlcat.Plo
926 -rm -f ./$(DEPDIR)/strlcpy.Plo
927 -rm -f Makefile
928 maintainer-clean-am: distclean-am maintainer-clean-generic
929
930 mostlyclean: mostlyclean-recursive
931
932 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
933 mostlyclean-libtool
934
935 pdf: pdf-recursive
936
937 pdf-am:
938
939 ps: ps-recursive
940
941 ps-am:
942
943 uninstall-am: uninstall-libLTLIBRARIES \
944 uninstall-library_includeHEADERS
945
946 .MAKE: $(am__recursive_targets) install-am install-strip
947
948 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
949 am--depfiles check check-am clean clean-generic \
950 clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
951 cscopelist-am ctags ctags-am distclean distclean-compile \
952 distclean-generic distclean-libtool distclean-tags distdir dvi \
953 dvi-am html html-am info info-am install install-am \
954 install-data install-data-am install-dvi install-dvi-am \
955 install-exec install-exec-am install-html install-html-am \
956 install-info install-info-am install-libLTLIBRARIES \
957 install-library_includeHEADERS install-man install-pdf \
958 install-pdf-am install-ps install-ps-am install-strip \
959 installcheck installcheck-am installdirs installdirs-am \
960 maintainer-clean maintainer-clean-generic mostlyclean \
961 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
962 pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
963 uninstall-libLTLIBRARIES uninstall-library_includeHEADERS
964
965 .PRECIOUS: Makefile
966
967
968 # Tell versions [3.59,3.63) of GNU make to not export all variables.
969 # Otherwise a system limit (for SysV at least) may be exceeded.
970 .NOEXPORT:
3636 */
3737
3838 #include "htp_config_auto.h"
39
40 //inet_pton
41 #if _WIN32
42 #include <ws2tcpip.h>
43 #else // mac, linux, freebsd
44 #include <sys/types.h>
45 #include <sys/socket.h>
46 #include <netinet/in.h>
47 #include <arpa/inet.h>
48 #endif
3949
4050 #include "htp_private.h"
4151
218228 * @return 0 or 1
219229 */
220230 int htp_is_line_empty(unsigned char *data, size_t len) {
221 if ((len == 1) ||
231 if (((len == 1) && ((data[0] == CR) || (data[0] == LF))) ||
222232 ((len == 2) && (data[0] == CR) && (data[1] == LF))) {
223233 return 1;
224234 }
24412451
24422452 if ((len == 0) || (len > 255)) return 0;
24432453
2454 if (data[0] == '[') {
2455 // only ipv6 possible
2456 if (len < 2 || len - 2 >= INET6_ADDRSTRLEN) {
2457 return 0;
2458 }
2459 char dst[sizeof(struct in6_addr)];
2460 char str[INET6_ADDRSTRLEN];
2461 memcpy(str, data+1, len-2);
2462 str[len-2] = 0;
2463 return inet_pton(AF_INET6, str, dst);
2464 }
24442465 while (pos < len) {
24452466 // Validate label characters.
24462467 startpos = pos;
0 /***************************************************************************
1 * Copyright (c) 2009-2010 Open Information Security Foundation
2 * Copyright (c) 2010-2013 Qualys, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15
16 * - Neither the name of the Qualys, Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ***************************************************************************/
32
33 /**
34 * @file
35 * @author Ivan Ristic <ivanr@webkreator.com>
36 */
37
38 #ifndef HTP_VERSION_H
39 #define HTP_VERSION_H
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 #define HTP_VERSION_STRING "0.5.38"
46 #define HTP_VERSION_STRING_FULL "LibHTP v" HTP_VERSION_STRING
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif /* HTP_VERSION_H */
0 # Makefile.in generated by automake 1.16.5 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2021 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 pkglibexecdir = $(libexecdir)/@PACKAGE@
77 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
78 install_sh_DATA = $(install_sh) -c -m 644
79 install_sh_PROGRAM = $(install_sh) -c
80 install_sh_SCRIPT = $(install_sh) -c
81 INSTALL_HEADER = $(INSTALL_DATA)
82 transform = $(program_transform_name)
83 NORMAL_INSTALL = :
84 PRE_INSTALL = :
85 POST_INSTALL = :
86 NORMAL_UNINSTALL = :
87 PRE_UNINSTALL = :
88 POST_UNINSTALL = :
89 build_triplet = @build@
90 host_triplet = @host@
91 subdir = htp/lzma
92 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
93 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
94 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
95 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
96 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
97 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
98 $(top_srcdir)/configure.ac
99 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
100 $(ACLOCAL_M4)
101 DIST_COMMON = $(srcdir)/Makefile.am $(library_include_HEADERS) \
102 $(am__DIST_COMMON)
103 mkinstalldirs = $(install_sh) -d
104 CONFIG_HEADER = $(top_builddir)/htp_config_auto_gen.h
105 CONFIG_CLEAN_FILES =
106 CONFIG_CLEAN_VPATH_FILES =
107 LTLIBRARIES = $(noinst_LTLIBRARIES)
108 liblzma_c_la_LIBADD =
109 am__objects_1 =
110 am__objects_2 = LzFind.lo LzmaDec.lo
111 am_liblzma_c_la_OBJECTS = $(am__objects_1) $(am__objects_1) \
112 $(am__objects_2)
113 liblzma_c_la_OBJECTS = $(am_liblzma_c_la_OBJECTS)
114 AM_V_lt = $(am__v_lt_@AM_V@)
115 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
116 am__v_lt_0 = --silent
117 am__v_lt_1 =
118 AM_V_P = $(am__v_P_@AM_V@)
119 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
120 am__v_P_0 = false
121 am__v_P_1 = :
122 AM_V_GEN = $(am__v_GEN_@AM_V@)
123 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
124 am__v_GEN_0 = @echo " GEN " $@;
125 am__v_GEN_1 =
126 AM_V_at = $(am__v_at_@AM_V@)
127 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
128 am__v_at_0 = @
129 am__v_at_1 =
130 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
131 depcomp = $(SHELL) $(top_srcdir)/depcomp
132 am__maybe_remake_depfiles = depfiles
133 am__depfiles_remade = ./$(DEPDIR)/LzFind.Plo ./$(DEPDIR)/LzmaDec.Plo
134 am__mv = mv -f
135 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
136 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
137 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
138 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
139 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
140 $(AM_CFLAGS) $(CFLAGS)
141 AM_V_CC = $(am__v_CC_@AM_V@)
142 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
143 am__v_CC_0 = @echo " CC " $@;
144 am__v_CC_1 =
145 CCLD = $(CC)
146 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
147 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
148 $(AM_LDFLAGS) $(LDFLAGS) -o $@
149 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
150 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
151 am__v_CCLD_0 = @echo " CCLD " $@;
152 am__v_CCLD_1 =
153 SOURCES = $(liblzma_c_la_SOURCES)
154 DIST_SOURCES = $(liblzma_c_la_SOURCES)
155 am__can_run_installinfo = \
156 case $$AM_UPDATE_INFO_DIR in \
157 n|no|NO) false;; \
158 *) (install-info --version) >/dev/null 2>&1;; \
159 esac
160 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
161 am__vpath_adj = case $$p in \
162 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
163 *) f=$$p;; \
164 esac;
165 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
166 am__install_max = 40
167 am__nobase_strip_setup = \
168 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
169 am__nobase_strip = \
170 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
171 am__nobase_list = $(am__nobase_strip_setup); \
172 for p in $$list; do echo "$$p $$p"; done | \
173 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
174 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
175 if (++n[$$2] == $(am__install_max)) \
176 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
177 END { for (dir in files) print dir, files[dir] }'
178 am__base_list = \
179 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
180 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
181 am__uninstall_files_from_dir = { \
182 test -z "$$files" \
183 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
184 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
185 $(am__cd) "$$dir" && rm -f $$files; }; \
186 }
187 am__installdirs = "$(DESTDIR)$(library_includedir)"
188 HEADERS = $(library_include_HEADERS)
189 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
190 # Read a list of newline-separated strings from the standard input,
191 # and print each of them once, without duplicates. Input order is
192 # *not* preserved.
193 am__uniquify_input = $(AWK) '\
194 BEGIN { nonempty = 0; } \
195 { items[$$0] = 1; nonempty = 1; } \
196 END { if (nonempty) { for (i in items) print i; }; } \
197 '
198 # Make sure the list of sources is unique. This is necessary because,
199 # e.g., the same source file might be shared among _SOURCES variables
200 # for different programs/libraries.
201 am__define_uniq_tagged_files = \
202 list='$(am__tagged_files)'; \
203 unique=`for i in $$list; do \
204 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
205 done | $(am__uniquify_input)`
206 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
207 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
208 ACLOCAL = @ACLOCAL@
209 AMTAR = @AMTAR@
210 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
211 AR = @AR@
212 AUTOCONF = @AUTOCONF@
213 AUTOHEADER = @AUTOHEADER@
214 AUTOMAKE = @AUTOMAKE@
215 AWK = @AWK@
216 CC = @CC@
217 CCDEPMODE = @CCDEPMODE@
218 CFLAGS = @CFLAGS@
219 CPP = @CPP@
220 CPPFLAGS = @CPPFLAGS@
221 CSCOPE = @CSCOPE@
222 CTAGS = @CTAGS@
223 CXX = @CXX@
224 CXXCPP = @CXXCPP@
225 CXXDEPMODE = @CXXDEPMODE@
226 CXXFLAGS = @CXXFLAGS@
227 CYGPATH_W = @CYGPATH_W@
228 DEFS = @DEFS@
229 DEPDIR = @DEPDIR@
230 DLLTOOL = @DLLTOOL@
231 DOXYGEN = @DOXYGEN@
232 DSYMUTIL = @DSYMUTIL@
233 DUMPBIN = @DUMPBIN@
234 ECHO_C = @ECHO_C@
235 ECHO_N = @ECHO_N@
236 ECHO_T = @ECHO_T@
237 EGREP = @EGREP@
238 ETAGS = @ETAGS@
239 EXEEXT = @EXEEXT@
240 FGREP = @FGREP@
241 GENERIC_LIBRARY_NAME = @GENERIC_LIBRARY_NAME@
242 GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@
243 GENERIC_RELEASE = @GENERIC_RELEASE@
244 GENERIC_VERSION = @GENERIC_VERSION@
245 GREP = @GREP@
246 INSTALL = @INSTALL@
247 INSTALL_DATA = @INSTALL_DATA@
248 INSTALL_PROGRAM = @INSTALL_PROGRAM@
249 INSTALL_SCRIPT = @INSTALL_SCRIPT@
250 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
251 LCOV = @LCOV@
252 LD = @LD@
253 LDFLAGS = @LDFLAGS@
254 LIBICONV = @LIBICONV@
255 LIBOBJS = @LIBOBJS@
256 LIBS = @LIBS@
257 LIBTOOL = @LIBTOOL@
258 LIPO = @LIPO@
259 LN_S = @LN_S@
260 LTLIBICONV = @LTLIBICONV@
261 LTLIBOBJS = @LTLIBOBJS@
262 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
263 MAKEINFO = @MAKEINFO@
264 MANIFEST_TOOL = @MANIFEST_TOOL@
265 MKDIR_P = @MKDIR_P@
266 NM = @NM@
267 NMEDIT = @NMEDIT@
268 OBJDUMP = @OBJDUMP@
269 OBJEXT = @OBJEXT@
270 OTOOL = @OTOOL@
271 OTOOL64 = @OTOOL64@
272 PACKAGE = @PACKAGE@
273 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
274 PACKAGE_NAME = @PACKAGE_NAME@
275 PACKAGE_STRING = @PACKAGE_STRING@
276 PACKAGE_TARNAME = @PACKAGE_TARNAME@
277 PACKAGE_URL = @PACKAGE_URL@
278 PACKAGE_VERSION = @PACKAGE_VERSION@
279 PATH_SEPARATOR = @PATH_SEPARATOR@
280 RANLIB = @RANLIB@
281 SED = @SED@
282 SET_MAKE = @SET_MAKE@
283 SHELL = @SHELL@
284 STRIP = @STRIP@
285 VERSION = @VERSION@
286 abs_builddir = @abs_builddir@
287 abs_srcdir = @abs_srcdir@
288 abs_top_builddir = @abs_top_builddir@
289 abs_top_srcdir = @abs_top_srcdir@
290 ac_ct_AR = @ac_ct_AR@
291 ac_ct_CC = @ac_ct_CC@
292 ac_ct_CXX = @ac_ct_CXX@
293 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
294 am__include = @am__include@
295 am__leading_dot = @am__leading_dot@
296 am__quote = @am__quote@
297 am__tar = @am__tar@
298 am__untar = @am__untar@
299 bindir = @bindir@
300 build = @build@
301 build_alias = @build_alias@
302 build_cpu = @build_cpu@
303 build_os = @build_os@
304 build_vendor = @build_vendor@
305 builddir = @builddir@
306 datadir = @datadir@
307 datarootdir = @datarootdir@
308 docdir = @docdir@
309 doxygen = @doxygen@
310 dvidir = @dvidir@
311 exec_prefix = @exec_prefix@
312 host = @host@
313 host_alias = @host_alias@
314 host_cpu = @host_cpu@
315 host_os = @host_os@
316 host_vendor = @host_vendor@
317 htmldir = @htmldir@
318 includedir = @includedir@
319 infodir = @infodir@
320 install_sh = @install_sh@
321 libdir = @libdir@
322 libexecdir = @libexecdir@
323 localedir = @localedir@
324 localstatedir = @localstatedir@
325 mandir = @mandir@
326 mkdir_p = @mkdir_p@
327 oldincludedir = @oldincludedir@
328 pdfdir = @pdfdir@
329 prefix = @prefix@
330 program_transform_name = @program_transform_name@
331 psdir = @psdir@
332 runstatedir = @runstatedir@
333 sbindir = @sbindir@
334 sharedstatedir = @sharedstatedir@
335 srcdir = @srcdir@
336 sysconfdir = @sysconfdir@
337 target_alias = @target_alias@
338 top_build_prefix = @top_build_prefix@
339 top_builddir = @top_builddir@
340 top_srcdir = @top_srcdir@
341 h_sources = LzmaDec.h 7zTypes.h
342 h_sources_private = LzFind.h LzHash.h Compiler.h Precomp.h
343 c_sources = LzFind.c LzmaDec.c
344 AM_CFLAGS = -I$(top_srcdir) -D_GNU_SOURCE -g -Wall -Wextra -std=gnu99 -pedantic \
345 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith \
346 -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter
347
348 library_includedir = $(includedir)/$(GENERIC_LIBRARY_NAME)/lzma
349 library_include_HEADERS = $(h_sources)
350 noinst_LTLIBRARIES = liblzma-c.la
351 liblzma_c_la_SOURCES = $(h_sources) $(h_sources_private) $(c_sources)
352 all: all-am
353
354 .SUFFIXES:
355 .SUFFIXES: .c .lo .o .obj
356 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
357 @for dep in $?; do \
358 case '$(am__configure_deps)' in \
359 *$$dep*) \
360 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
361 && { if test -f $@; then exit 0; else break; fi; }; \
362 exit 1;; \
363 esac; \
364 done; \
365 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu htp/lzma/Makefile'; \
366 $(am__cd) $(top_srcdir) && \
367 $(AUTOMAKE) --gnu htp/lzma/Makefile
368 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
369 @case '$?' in \
370 *config.status*) \
371 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
372 *) \
373 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
374 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
375 esac;
376
377 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
378 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
379
380 $(top_srcdir)/configure: $(am__configure_deps)
381 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
382 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
383 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
384 $(am__aclocal_m4_deps):
385
386 clean-noinstLTLIBRARIES:
387 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
388 @list='$(noinst_LTLIBRARIES)'; \
389 locs=`for p in $$list; do echo $$p; done | \
390 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
391 sort -u`; \
392 test -z "$$locs" || { \
393 echo rm -f $${locs}; \
394 rm -f $${locs}; \
395 }
396
397 liblzma-c.la: $(liblzma_c_la_OBJECTS) $(liblzma_c_la_DEPENDENCIES) $(EXTRA_liblzma_c_la_DEPENDENCIES)
398 $(AM_V_CCLD)$(LINK) $(liblzma_c_la_OBJECTS) $(liblzma_c_la_LIBADD) $(LIBS)
399
400 mostlyclean-compile:
401 -rm -f *.$(OBJEXT)
402
403 distclean-compile:
404 -rm -f *.tab.c
405
406 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LzFind.Plo@am__quote@ # am--include-marker
407 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LzmaDec.Plo@am__quote@ # am--include-marker
408
409 $(am__depfiles_remade):
410 @$(MKDIR_P) $(@D)
411 @echo '# dummy' >$@-t && $(am__mv) $@-t $@
412
413 am--depfiles: $(am__depfiles_remade)
414
415 .c.o:
416 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
417 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
418 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
419 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
420 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
421
422 .c.obj:
423 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
424 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
425 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
426 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
427 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
428
429 .c.lo:
430 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
431 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
432 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
433 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
434 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
435
436 mostlyclean-libtool:
437 -rm -f *.lo
438
439 clean-libtool:
440 -rm -rf .libs _libs
441 install-library_includeHEADERS: $(library_include_HEADERS)
442 @$(NORMAL_INSTALL)
443 @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \
444 if test -n "$$list"; then \
445 echo " $(MKDIR_P) '$(DESTDIR)$(library_includedir)'"; \
446 $(MKDIR_P) "$(DESTDIR)$(library_includedir)" || exit 1; \
447 fi; \
448 for p in $$list; do \
449 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
450 echo "$$d$$p"; \
451 done | $(am__base_list) | \
452 while read files; do \
453 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \
454 $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \
455 done
456
457 uninstall-library_includeHEADERS:
458 @$(NORMAL_UNINSTALL)
459 @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \
460 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
461 dir='$(DESTDIR)$(library_includedir)'; $(am__uninstall_files_from_dir)
462
463 ID: $(am__tagged_files)
464 $(am__define_uniq_tagged_files); mkid -fID $$unique
465 tags: tags-am
466 TAGS: tags
467
468 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
469 set x; \
470 here=`pwd`; \
471 $(am__define_uniq_tagged_files); \
472 shift; \
473 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
474 test -n "$$unique" || unique=$$empty_fix; \
475 if test $$# -gt 0; then \
476 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
477 "$$@" $$unique; \
478 else \
479 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
480 $$unique; \
481 fi; \
482 fi
483 ctags: ctags-am
484
485 CTAGS: ctags
486 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
487 $(am__define_uniq_tagged_files); \
488 test -z "$(CTAGS_ARGS)$$unique" \
489 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
490 $$unique
491
492 GTAGS:
493 here=`$(am__cd) $(top_builddir) && pwd` \
494 && $(am__cd) $(top_srcdir) \
495 && gtags -i $(GTAGS_ARGS) "$$here"
496 cscopelist: cscopelist-am
497
498 cscopelist-am: $(am__tagged_files)
499 list='$(am__tagged_files)'; \
500 case "$(srcdir)" in \
501 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
502 *) sdir=$(subdir)/$(srcdir) ;; \
503 esac; \
504 for i in $$list; do \
505 if test -f "$$i"; then \
506 echo "$(subdir)/$$i"; \
507 else \
508 echo "$$sdir/$$i"; \
509 fi; \
510 done >> $(top_builddir)/cscope.files
511
512 distclean-tags:
513 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
514 distdir: $(BUILT_SOURCES)
515 $(MAKE) $(AM_MAKEFLAGS) distdir-am
516
517 distdir-am: $(DISTFILES)
518 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
519 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
520 list='$(DISTFILES)'; \
521 dist_files=`for file in $$list; do echo $$file; done | \
522 sed -e "s|^$$srcdirstrip/||;t" \
523 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
524 case $$dist_files in \
525 */*) $(MKDIR_P) `echo "$$dist_files" | \
526 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
527 sort -u` ;; \
528 esac; \
529 for file in $$dist_files; do \
530 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
531 if test -d $$d/$$file; then \
532 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
533 if test -d "$(distdir)/$$file"; then \
534 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
535 fi; \
536 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
537 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
538 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
539 fi; \
540 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
541 else \
542 test -f "$(distdir)/$$file" \
543 || cp -p $$d/$$file "$(distdir)/$$file" \
544 || exit 1; \
545 fi; \
546 done
547 check-am: all-am
548 check: check-am
549 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
550 installdirs:
551 for dir in "$(DESTDIR)$(library_includedir)"; do \
552 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
553 done
554 install: install-am
555 install-exec: install-exec-am
556 install-data: install-data-am
557 uninstall: uninstall-am
558
559 install-am: all-am
560 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
561
562 installcheck: installcheck-am
563 install-strip:
564 if test -z '$(STRIP)'; then \
565 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
566 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
567 install; \
568 else \
569 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
570 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
571 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
572 fi
573 mostlyclean-generic:
574
575 clean-generic:
576
577 distclean-generic:
578 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
579 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
580
581 maintainer-clean-generic:
582 @echo "This command is intended for maintainers to use"
583 @echo "it deletes files that may require special tools to rebuild."
584 clean: clean-am
585
586 clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
587 mostlyclean-am
588
589 distclean: distclean-am
590 -rm -f ./$(DEPDIR)/LzFind.Plo
591 -rm -f ./$(DEPDIR)/LzmaDec.Plo
592 -rm -f Makefile
593 distclean-am: clean-am distclean-compile distclean-generic \
594 distclean-tags
595
596 dvi: dvi-am
597
598 dvi-am:
599
600 html: html-am
601
602 html-am:
603
604 info: info-am
605
606 info-am:
607
608 install-data-am: install-library_includeHEADERS
609
610 install-dvi: install-dvi-am
611
612 install-dvi-am:
613
614 install-exec-am:
615
616 install-html: install-html-am
617
618 install-html-am:
619
620 install-info: install-info-am
621
622 install-info-am:
623
624 install-man:
625
626 install-pdf: install-pdf-am
627
628 install-pdf-am:
629
630 install-ps: install-ps-am
631
632 install-ps-am:
633
634 installcheck-am:
635
636 maintainer-clean: maintainer-clean-am
637 -rm -f ./$(DEPDIR)/LzFind.Plo
638 -rm -f ./$(DEPDIR)/LzmaDec.Plo
639 -rm -f Makefile
640 maintainer-clean-am: distclean-am maintainer-clean-generic
641
642 mostlyclean: mostlyclean-am
643
644 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
645 mostlyclean-libtool
646
647 pdf: pdf-am
648
649 pdf-am:
650
651 ps: ps-am
652
653 ps-am:
654
655 uninstall-am: uninstall-library_includeHEADERS
656
657 .MAKE: install-am install-strip
658
659 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
660 clean-generic clean-libtool clean-noinstLTLIBRARIES \
661 cscopelist-am ctags ctags-am distclean distclean-compile \
662 distclean-generic distclean-libtool distclean-tags distdir dvi \
663 dvi-am html html-am info info-am install install-am \
664 install-data install-data-am install-dvi install-dvi-am \
665 install-exec install-exec-am install-html install-html-am \
666 install-info install-info-am install-library_includeHEADERS \
667 install-man install-pdf install-pdf-am install-ps \
668 install-ps-am install-strip installcheck installcheck-am \
669 installdirs maintainer-clean maintainer-clean-generic \
670 mostlyclean mostlyclean-compile mostlyclean-generic \
671 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
672 uninstall-am uninstall-library_includeHEADERS
673
674 .PRECIOUS: Makefile
675
676
677 # Tell versions [3.59,3.63) of GNU make to not export all variables.
678 # Otherwise a system limit (for SysV at least) may be exceeded.
679 .NOEXPORT:
0 /* htp_config_auto_gen.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define to 1 if you have the <dlfcn.h> header file. */
3 #undef HAVE_DLFCN_H
4
5 /* Define if you have the iconv() function and it works. */
6 #undef HAVE_ICONV
7
8 /* "Define to 1 if you have the `iconvctl' function." */
9 #undef HAVE_ICONVCTL
10
11 /* Define to 1 if you have the <inttypes.h> header file. */
12 #undef HAVE_INTTYPES_H
13
14 /* Define to 1 if you have the `z' library (-lz). */
15 #undef HAVE_LIBZ
16
17 /* Define to 1 if you have the <stdint.h> header file. */
18 #undef HAVE_STDINT_H
19
20 /* Define to 1 if you have the <stdio.h> header file. */
21 #undef HAVE_STDIO_H
22
23 /* Define to 1 if you have the <stdlib.h> header file. */
24 #undef HAVE_STDLIB_H
25
26 /* Define to 1 if you have the <strings.h> header file. */
27 #undef HAVE_STRINGS_H
28
29 /* Define to 1 if you have the <string.h> header file. */
30 #undef HAVE_STRING_H
31
32 /* Define to 1 if you have the `strlcat' function. */
33 #undef HAVE_STRLCAT
34
35 /* Define to 1 if you have the `strlcpy' function. */
36 #undef HAVE_STRLCPY
37
38 /* Define to 1 if you have the <sys/stat.h> header file. */
39 #undef HAVE_SYS_STAT_H
40
41 /* Define to 1 if you have the <sys/types.h> header file. */
42 #undef HAVE_SYS_TYPES_H
43
44 /* Define to 1 if you have the <unistd.h> header file. */
45 #undef HAVE_UNISTD_H
46
47 /* Define as const if the declaration of iconv() needs const. */
48 #undef ICONV_CONST
49
50 /* Define to the sub-directory where libtool stores uninstalled libraries. */
51 #undef LT_OBJDIR
52
53 /* Name of package */
54 #undef PACKAGE
55
56 /* Define to the address where bug reports for this package should be sent. */
57 #undef PACKAGE_BUGREPORT
58
59 /* Define to the full name of this package. */
60 #undef PACKAGE_NAME
61
62 /* Define to the full name and version of this package. */
63 #undef PACKAGE_STRING
64
65 /* Define to the one symbol short name of this package. */
66 #undef PACKAGE_TARNAME
67
68 /* Define to the home page for this package. */
69 #undef PACKAGE_URL
70
71 /* Define to the version of this package. */
72 #undef PACKAGE_VERSION
73
74 /* Define to 1 if all of the C90 standard headers exist (not just the ones
75 required in a freestanding environment). This macro is provided for
76 backward compatibility; new code need not use it. */
77 #undef STDC_HEADERS
78
79 /* Version number of package */
80 #undef VERSION
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2020-11-14.01; # 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 # Create dirs (including intermediate dirs) using mode 755.
72 # This is like GNU 'install' as of coreutils 8.32 (2020).
73 mkdir_umask=22
74
75 backupsuffix=
76 chgrpcmd=
77 chmodcmd=$chmodprog
78 chowncmd=
79 mvcmd=$mvprog
80 rmcmd="$rmprog -f"
81 stripcmd=
82
83 src=
84 dst=
85 dir_arg=
86 dst_arg=
87
88 copy_on_change=false
89 is_target_a_directory=possibly
90
91 usage="\
92 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
93 or: $0 [OPTION]... SRCFILES... DIRECTORY
94 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
95 or: $0 [OPTION]... -d DIRECTORIES...
96
97 In the 1st form, copy SRCFILE to DSTFILE.
98 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
99 In the 4th, create DIRECTORIES.
100
101 Options:
102 --help display this help and exit.
103 --version display version info and exit.
104
105 -c (ignored)
106 -C install only if different (preserve data modification time)
107 -d create directories instead of installing files.
108 -g GROUP $chgrpprog installed files to GROUP.
109 -m MODE $chmodprog installed files to MODE.
110 -o USER $chownprog installed files to USER.
111 -p pass -p to $cpprog.
112 -s $stripprog installed files.
113 -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
114 -t DIRECTORY install into DIRECTORY.
115 -T report an error if DSTFILE is a directory.
116
117 Environment variables override the default commands:
118 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
119 RMPROG STRIPPROG
120
121 By default, rm is invoked with -f; when overridden with RMPROG,
122 it's up to you to specify -f if you want it.
123
124 If -S is not specified, no backups are attempted.
125
126 Email bug reports to bug-automake@gnu.org.
127 Automake home page: https://www.gnu.org/software/automake/
128 "
129
130 while test $# -ne 0; do
131 case $1 in
132 -c) ;;
133
134 -C) copy_on_change=true;;
135
136 -d) dir_arg=true;;
137
138 -g) chgrpcmd="$chgrpprog $2"
139 shift;;
140
141 --help) echo "$usage"; exit $?;;
142
143 -m) mode=$2
144 case $mode in
145 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
146 echo "$0: invalid mode: $mode" >&2
147 exit 1;;
148 esac
149 shift;;
150
151 -o) chowncmd="$chownprog $2"
152 shift;;
153
154 -p) cpprog="$cpprog -p";;
155
156 -s) stripcmd=$stripprog;;
157
158 -S) backupsuffix="$2"
159 shift;;
160
161 -t)
162 is_target_a_directory=always
163 dst_arg=$2
164 # Protect names problematic for 'test' and other utilities.
165 case $dst_arg in
166 -* | [=\(\)!]) dst_arg=./$dst_arg;;
167 esac
168 shift;;
169
170 -T) is_target_a_directory=never;;
171
172 --version) echo "$0 $scriptversion"; exit $?;;
173
174 --) shift
175 break;;
176
177 -*) echo "$0: invalid option: $1" >&2
178 exit 1;;
179
180 *) break;;
181 esac
182 shift
183 done
184
185 # We allow the use of options -d and -T together, by making -d
186 # take the precedence; this is for compatibility with GNU install.
187
188 if test -n "$dir_arg"; then
189 if test -n "$dst_arg"; then
190 echo "$0: target directory not allowed when installing a directory." >&2
191 exit 1
192 fi
193 fi
194
195 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
196 # When -d is used, all remaining arguments are directories to create.
197 # When -t is used, the destination is already specified.
198 # Otherwise, the last argument is the destination. Remove it from $@.
199 for arg
200 do
201 if test -n "$dst_arg"; then
202 # $@ is not empty: it contains at least $arg.
203 set fnord "$@" "$dst_arg"
204 shift # fnord
205 fi
206 shift # arg
207 dst_arg=$arg
208 # Protect names problematic for 'test' and other utilities.
209 case $dst_arg in
210 -* | [=\(\)!]) dst_arg=./$dst_arg;;
211 esac
212 done
213 fi
214
215 if test $# -eq 0; then
216 if test -z "$dir_arg"; then
217 echo "$0: no input file specified." >&2
218 exit 1
219 fi
220 # It's OK to call 'install-sh -d' without argument.
221 # This can happen when creating conditional directories.
222 exit 0
223 fi
224
225 if test -z "$dir_arg"; then
226 if test $# -gt 1 || test "$is_target_a_directory" = always; then
227 if test ! -d "$dst_arg"; then
228 echo "$0: $dst_arg: Is not a directory." >&2
229 exit 1
230 fi
231 fi
232 fi
233
234 if test -z "$dir_arg"; then
235 do_exit='(exit $ret); exit $ret'
236 trap "ret=129; $do_exit" 1
237 trap "ret=130; $do_exit" 2
238 trap "ret=141; $do_exit" 13
239 trap "ret=143; $do_exit" 15
240
241 # Set umask so as not to create temps with too-generous modes.
242 # However, 'strip' requires both read and write access to temps.
243 case $mode in
244 # Optimize common cases.
245 *644) cp_umask=133;;
246 *755) cp_umask=22;;
247
248 *[0-7])
249 if test -z "$stripcmd"; then
250 u_plus_rw=
251 else
252 u_plus_rw='% 200'
253 fi
254 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
255 *)
256 if test -z "$stripcmd"; then
257 u_plus_rw=
258 else
259 u_plus_rw=,u+rw
260 fi
261 cp_umask=$mode$u_plus_rw;;
262 esac
263 fi
264
265 for src
266 do
267 # Protect names problematic for 'test' and other utilities.
268 case $src in
269 -* | [=\(\)!]) src=./$src;;
270 esac
271
272 if test -n "$dir_arg"; then
273 dst=$src
274 dstdir=$dst
275 test -d "$dstdir"
276 dstdir_status=$?
277 # Don't chown directories that already exist.
278 if test $dstdir_status = 0; then
279 chowncmd=""
280 fi
281 else
282
283 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
284 # might cause directories to be created, which would be especially bad
285 # if $src (and thus $dsttmp) contains '*'.
286 if test ! -f "$src" && test ! -d "$src"; then
287 echo "$0: $src does not exist." >&2
288 exit 1
289 fi
290
291 if test -z "$dst_arg"; then
292 echo "$0: no destination specified." >&2
293 exit 1
294 fi
295 dst=$dst_arg
296
297 # If destination is a directory, append the input filename.
298 if test -d "$dst"; then
299 if test "$is_target_a_directory" = never; then
300 echo "$0: $dst_arg: Is a directory" >&2
301 exit 1
302 fi
303 dstdir=$dst
304 dstbase=`basename "$src"`
305 case $dst in
306 */) dst=$dst$dstbase;;
307 *) dst=$dst/$dstbase;;
308 esac
309 dstdir_status=0
310 else
311 dstdir=`dirname "$dst"`
312 test -d "$dstdir"
313 dstdir_status=$?
314 fi
315 fi
316
317 case $dstdir in
318 */) dstdirslash=$dstdir;;
319 *) dstdirslash=$dstdir/;;
320 esac
321
322 obsolete_mkdir_used=false
323
324 if test $dstdir_status != 0; then
325 case $posix_mkdir in
326 '')
327 # With -d, create the new directory with the user-specified mode.
328 # Otherwise, rely on $mkdir_umask.
329 if test -n "$dir_arg"; then
330 mkdir_mode=-m$mode
331 else
332 mkdir_mode=
333 fi
334
335 posix_mkdir=false
336 # The $RANDOM variable is not portable (e.g., dash). Use it
337 # here however when possible just to lower collision chance.
338 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
339
340 trap '
341 ret=$?
342 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
343 exit $ret
344 ' 0
345
346 # Because "mkdir -p" follows existing symlinks and we likely work
347 # directly in world-writeable /tmp, make sure that the '$tmpdir'
348 # directory is successfully created first before we actually test
349 # 'mkdir -p'.
350 if (umask $mkdir_umask &&
351 $mkdirprog $mkdir_mode "$tmpdir" &&
352 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
353 then
354 if test -z "$dir_arg" || {
355 # Check for POSIX incompatibilities with -m.
356 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
357 # other-writable bit of parent directory when it shouldn't.
358 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
359 test_tmpdir="$tmpdir/a"
360 ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
361 case $ls_ld_tmpdir in
362 d????-?r-*) different_mode=700;;
363 d????-?--*) different_mode=755;;
364 *) false;;
365 esac &&
366 $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
367 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
368 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
369 }
370 }
371 then posix_mkdir=:
372 fi
373 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
374 else
375 # Remove any dirs left behind by ancient mkdir implementations.
376 rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
377 fi
378 trap '' 0;;
379 esac
380
381 if
382 $posix_mkdir && (
383 umask $mkdir_umask &&
384 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
385 )
386 then :
387 else
388
389 # mkdir does not conform to POSIX,
390 # or it failed possibly due to a race condition. Create the
391 # directory the slow way, step by step, checking for races as we go.
392
393 case $dstdir in
394 /*) prefix='/';;
395 [-=\(\)!]*) prefix='./';;
396 *) prefix='';;
397 esac
398
399 oIFS=$IFS
400 IFS=/
401 set -f
402 set fnord $dstdir
403 shift
404 set +f
405 IFS=$oIFS
406
407 prefixes=
408
409 for d
410 do
411 test X"$d" = X && continue
412
413 prefix=$prefix$d
414 if test -d "$prefix"; then
415 prefixes=
416 else
417 if $posix_mkdir; then
418 (umask $mkdir_umask &&
419 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
420 # Don't fail if two instances are running concurrently.
421 test -d "$prefix" || exit 1
422 else
423 case $prefix in
424 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
425 *) qprefix=$prefix;;
426 esac
427 prefixes="$prefixes '$qprefix'"
428 fi
429 fi
430 prefix=$prefix/
431 done
432
433 if test -n "$prefixes"; then
434 # Don't fail if two instances are running concurrently.
435 (umask $mkdir_umask &&
436 eval "\$doit_exec \$mkdirprog $prefixes") ||
437 test -d "$dstdir" || exit 1
438 obsolete_mkdir_used=true
439 fi
440 fi
441 fi
442
443 if test -n "$dir_arg"; then
444 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
445 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
446 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
447 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
448 else
449
450 # Make a couple of temp file names in the proper directory.
451 dsttmp=${dstdirslash}_inst.$$_
452 rmtmp=${dstdirslash}_rm.$$_
453
454 # Trap to clean up those temp files at exit.
455 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
456
457 # Copy the file name to the temp name.
458 (umask $cp_umask &&
459 { test -z "$stripcmd" || {
460 # Create $dsttmp read-write so that cp doesn't create it read-only,
461 # which would cause strip to fail.
462 if test -z "$doit"; then
463 : >"$dsttmp" # No need to fork-exec 'touch'.
464 else
465 $doit touch "$dsttmp"
466 fi
467 }
468 } &&
469 $doit_exec $cpprog "$src" "$dsttmp") &&
470
471 # and set any options; do chmod last to preserve setuid bits.
472 #
473 # If any of these fail, we abort the whole thing. If we want to
474 # ignore errors from any of these, just make sure not to ignore
475 # errors from the above "$doit $cpprog $src $dsttmp" command.
476 #
477 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
478 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
479 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
480 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
481
482 # If -C, don't bother to copy if it wouldn't change the file.
483 if $copy_on_change &&
484 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
485 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
486 set -f &&
487 set X $old && old=:$2:$4:$5:$6 &&
488 set X $new && new=:$2:$4:$5:$6 &&
489 set +f &&
490 test "$old" = "$new" &&
491 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
492 then
493 rm -f "$dsttmp"
494 else
495 # If $backupsuffix is set, and the file being installed
496 # already exists, attempt a backup. Don't worry if it fails,
497 # e.g., if mv doesn't support -f.
498 if test -n "$backupsuffix" && test -f "$dst"; then
499 $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
500 fi
501
502 # Rename the file to the real destination.
503 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
504
505 # The rename failed, perhaps because mv can't rename something else
506 # to itself, or perhaps because mv is so ancient that it does not
507 # support -f.
508 {
509 # Now remove or move aside any old file at destination location.
510 # We try this two ways since rm can't unlink itself on some
511 # systems and the destination file might be busy for other
512 # reasons. In this case, the final cleanup might fail but the new
513 # file should still install successfully.
514 {
515 test ! -f "$dst" ||
516 $doit $rmcmd "$dst" 2>/dev/null ||
517 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
518 { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
519 } ||
520 { echo "$0: cannot unlink or rename $dst" >&2
521 (exit 1); exit 1
522 }
523 } &&
524
525 # Now rename the file to the real destination.
526 $doit $mvcmd "$dsttmp" "$dst"
527 }
528 fi || exit 1
529
530 trap '' 0
531 fi
532 done
533
534 # Local variables:
535 # eval: (add-hook 'before-save-hook 'time-stamp)
536 # time-stamp-start: "scriptversion="
537 # time-stamp-format: "%:y-%02m-%02d.%02H"
538 # time-stamp-time-zone: "UTC0"
539 # time-stamp-end: "; # UTC"
540 # 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-15"
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='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=2015-10-07.11; # 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 _G_rc_run_hooks=false
1533
1534 case " $hookable_fns " in
1535 *" $1 "*) ;;
1536 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
1537 esac
1538
1539 eval _G_hook_fns=\$$1_hooks; shift
1540
1541 for _G_hook in $_G_hook_fns; do
1542 if eval $_G_hook '"$@"'; then
1543 # store returned options list back into positional
1544 # parameters for next 'cmd' execution.
1545 eval _G_hook_result=\$${_G_hook}_result
1546 eval set dummy "$_G_hook_result"; shift
1547 _G_rc_run_hooks=:
1548 fi
1549 done
1550
1551 $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
1552 }
1553
1554
1555
1556 ## --------------- ##
1557 ## Option parsing. ##
1558 ## --------------- ##
1559
1560 # In order to add your own option parsing hooks, you must accept the
1561 # full positional parameter list in your hook function, you may remove/edit
1562 # any options that you action, and then pass back the remaining unprocessed
1563 # options in '<hooked_function_name>_result', escaped suitably for
1564 # 'eval'. In this case you also must return $EXIT_SUCCESS to let the
1565 # hook's caller know that it should pay attention to
1566 # '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
1567 # arguments are left untouched by the hook and therefore caller will ignore the
1568 # result variable.
1569 #
1570 # Like this:
1571 #
1572 # my_options_prep ()
1573 # {
1574 # $debug_cmd
1575 #
1576 # # Extend the existing usage message.
1577 # usage_message=$usage_message'
1578 # -s, --silent don'\''t print informational messages
1579 # '
1580 # # No change in '$@' (ignored completely by this hook). There is
1581 # # no need to do the equivalent (but slower) action:
1582 # # func_quote_for_eval ${1+"$@"}
1583 # # my_options_prep_result=$func_quote_for_eval_result
1584 # false
1585 # }
1586 # func_add_hook func_options_prep my_options_prep
1587 #
1588 #
1589 # my_silent_option ()
1590 # {
1591 # $debug_cmd
1592 #
1593 # args_changed=false
1594 #
1595 # # Note that for efficiency, we parse as many options as we can
1596 # # recognise in a loop before passing the remainder back to the
1597 # # caller on the first unrecognised argument we encounter.
1598 # while test $# -gt 0; do
1599 # opt=$1; shift
1600 # case $opt in
1601 # --silent|-s) opt_silent=:
1602 # args_changed=:
1603 # ;;
1604 # # Separate non-argument short options:
1605 # -s*) func_split_short_opt "$_G_opt"
1606 # set dummy "$func_split_short_opt_name" \
1607 # "-$func_split_short_opt_arg" ${1+"$@"}
1608 # shift
1609 # args_changed=:
1610 # ;;
1611 # *) # Make sure the first unrecognised option "$_G_opt"
1612 # # is added back to "$@", we could need that later
1613 # # if $args_changed is true.
1614 # set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1615 # esac
1616 # done
1617 #
1618 # if $args_changed; then
1619 # func_quote_for_eval ${1+"$@"}
1620 # my_silent_option_result=$func_quote_for_eval_result
1621 # fi
1622 #
1623 # $args_changed
1624 # }
1625 # func_add_hook func_parse_options my_silent_option
1626 #
1627 #
1628 # my_option_validation ()
1629 # {
1630 # $debug_cmd
1631 #
1632 # $opt_silent && $opt_verbose && func_fatal_help "\
1633 # '--silent' and '--verbose' options are mutually exclusive."
1634 #
1635 # false
1636 # }
1637 # func_add_hook func_validate_options my_option_validation
1638 #
1639 # You'll also need to manually amend $usage_message to reflect the extra
1640 # options you parse. It's preferable to append if you can, so that
1641 # multiple option parsing hooks can be added safely.
1642
1643
1644 # func_options_finish [ARG]...
1645 # ----------------------------
1646 # Finishing the option parse loop (call 'func_options' hooks ATM).
1647 func_options_finish ()
1648 {
1649 $debug_cmd
1650
1651 _G_func_options_finish_exit=false
1652 if func_run_hooks func_options ${1+"$@"}; then
1653 func_options_finish_result=$func_run_hooks_result
1654 _G_func_options_finish_exit=:
1655 fi
1656
1657 $_G_func_options_finish_exit
1658 }
1659
1660
1661 # func_options [ARG]...
1662 # ---------------------
1663 # All the functions called inside func_options are hookable. See the
1664 # individual implementations for details.
1665 func_hookable func_options
1666 func_options ()
1667 {
1668 $debug_cmd
1669
1670 _G_rc_options=false
1671
1672 for my_func in options_prep parse_options validate_options options_finish
1673 do
1674 if eval func_$my_func '${1+"$@"}'; then
1675 eval _G_res_var='$'"func_${my_func}_result"
1676 eval set dummy "$_G_res_var" ; shift
1677 _G_rc_options=:
1678 fi
1679 done
1680
1681 # Save modified positional parameters for caller. As a top-level
1682 # options-parser function we always need to set the 'func_options_result'
1683 # variable (regardless the $_G_rc_options value).
1684 if $_G_rc_options; then
1685 func_options_result=$_G_res_var
1686 else
1687 func_quote_for_eval ${1+"$@"}
1688 func_options_result=$func_quote_for_eval_result
1689 fi
1690
1691 $_G_rc_options
1692 }
1693
1694
1695 # func_options_prep [ARG]...
1696 # --------------------------
1697 # All initialisations required before starting the option parse loop.
1698 # Note that when calling hook functions, we pass through the list of
1699 # positional parameters. If a hook function modifies that list, and
1700 # needs to propagate that back to rest of this script, then the complete
1701 # modified list must be put in 'func_run_hooks_result' before
1702 # returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
1703 func_hookable func_options_prep
1704 func_options_prep ()
1705 {
1706 $debug_cmd
1707
1708 # Option defaults:
1709 opt_verbose=false
1710 opt_warning_types=
1711
1712 _G_rc_options_prep=false
1713 if func_run_hooks func_options_prep ${1+"$@"}; then
1714 _G_rc_options_prep=:
1715 # save modified positional parameters for caller
1716 func_options_prep_result=$func_run_hooks_result
1717 fi
1718
1719 $_G_rc_options_prep
1720 }
1721
1722
1723 # func_parse_options [ARG]...
1724 # ---------------------------
1725 # The main option parsing loop.
1726 func_hookable func_parse_options
1727 func_parse_options ()
1728 {
1729 $debug_cmd
1730
1731 func_parse_options_result=
1732
1733 _G_rc_parse_options=false
1734 # this just eases exit handling
1735 while test $# -gt 0; do
1736 # Defer to hook functions for initial option parsing, so they
1737 # get priority in the event of reusing an option name.
1738 if func_run_hooks func_parse_options ${1+"$@"}; then
1739 eval set dummy "$func_run_hooks_result"; shift
1740 _G_rc_parse_options=:
1741 fi
1742
1743 # Break out of the loop if we already parsed every option.
1744 test $# -gt 0 || break
1745
1746 _G_match_parse_options=:
1747 _G_opt=$1
1748 shift
1749 case $_G_opt in
1750 --debug|-x) debug_cmd='set -x'
1751 func_echo "enabling shell trace mode"
1752 $debug_cmd
1753 ;;
1754
1755 --no-warnings|--no-warning|--no-warn)
1756 set dummy --warnings none ${1+"$@"}
1757 shift
1758 ;;
1759
1760 --warnings|--warning|-W)
1761 if test $# = 0 && func_missing_arg $_G_opt; then
1762 _G_rc_parse_options=:
1763 break
1764 fi
1765 case " $warning_categories $1" in
1766 *" $1 "*)
1767 # trailing space prevents matching last $1 above
1768 func_append_uniq opt_warning_types " $1"
1769 ;;
1770 *all)
1771 opt_warning_types=$warning_categories
1772 ;;
1773 *none)
1774 opt_warning_types=none
1775 warning_func=:
1776 ;;
1777 *error)
1778 opt_warning_types=$warning_categories
1779 warning_func=func_fatal_error
1780 ;;
1781 *)
1782 func_fatal_error \
1783 "unsupported warning category: '$1'"
1784 ;;
1785 esac
1786 shift
1787 ;;
1788
1789 --verbose|-v) opt_verbose=: ;;
1790 --version) func_version ;;
1791 -\?|-h) func_usage ;;
1792 --help) func_help ;;
1793
1794 # Separate optargs to long options (plugins may need this):
1795 --*=*) func_split_equals "$_G_opt"
1796 set dummy "$func_split_equals_lhs" \
1797 "$func_split_equals_rhs" ${1+"$@"}
1798 shift
1799 ;;
1800
1801 # Separate optargs to short options:
1802 -W*)
1803 func_split_short_opt "$_G_opt"
1804 set dummy "$func_split_short_opt_name" \
1805 "$func_split_short_opt_arg" ${1+"$@"}
1806 shift
1807 ;;
1808
1809 # Separate non-argument short options:
1810 -\?*|-h*|-v*|-x*)
1811 func_split_short_opt "$_G_opt"
1812 set dummy "$func_split_short_opt_name" \
1813 "-$func_split_short_opt_arg" ${1+"$@"}
1814 shift
1815 ;;
1816
1817 --) _G_rc_parse_options=: ; break ;;
1818 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1819 *) set dummy "$_G_opt" ${1+"$@"}; shift
1820 _G_match_parse_options=false
1821 break
1822 ;;
1823 esac
1824
1825 $_G_match_parse_options && _G_rc_parse_options=:
1826 done
1827
1828
1829 if $_G_rc_parse_options; then
1830 # save modified positional parameters for caller
1831 func_quote_for_eval ${1+"$@"}
1832 func_parse_options_result=$func_quote_for_eval_result
1833 fi
1834
1835 $_G_rc_parse_options
1836 }
1837
1838
1839 # func_validate_options [ARG]...
1840 # ------------------------------
1841 # Perform any sanity checks on option settings and/or unconsumed
1842 # arguments.
1843 func_hookable func_validate_options
1844 func_validate_options ()
1845 {
1846 $debug_cmd
1847
1848 _G_rc_validate_options=false
1849
1850 # Display all warnings if -W was not given.
1851 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
1852
1853 if func_run_hooks func_validate_options ${1+"$@"}; then
1854 # save modified positional parameters for caller
1855 func_validate_options_result=$func_run_hooks_result
1856 _G_rc_validate_options=:
1857 fi
1858
1859 # Bail if the options were screwed!
1860 $exit_cmd $EXIT_FAILURE
1861
1862 $_G_rc_validate_options
1863 }
1864
1865
1866
1867 ## ----------------- ##
1868 ## Helper functions. ##
1869 ## ----------------- ##
1870
1871 # This section contains the helper functions used by the rest of the
1872 # hookable option parser framework in ascii-betical order.
1873
1874
1875 # func_fatal_help ARG...
1876 # ----------------------
1877 # Echo program name prefixed message to standard error, followed by
1878 # a help hint, and exit.
1879 func_fatal_help ()
1880 {
1881 $debug_cmd
1882
1883 eval \$ECHO \""Usage: $usage"\"
1884 eval \$ECHO \""$fatal_help"\"
1885 func_error ${1+"$@"}
1886 exit $EXIT_FAILURE
1887 }
1888
1889
1890 # func_help
1891 # ---------
1892 # Echo long help message to standard output and exit.
1893 func_help ()
1894 {
1895 $debug_cmd
1896
1897 func_usage_message
1898 $ECHO "$long_help_message"
1899 exit 0
1900 }
1901
1902
1903 # func_missing_arg ARGNAME
1904 # ------------------------
1905 # Echo program name prefixed message to standard error and set global
1906 # exit_cmd.
1907 func_missing_arg ()
1908 {
1909 $debug_cmd
1910
1911 func_error "Missing argument for '$1'."
1912 exit_cmd=exit
1913 }
1914
1915
1916 # func_split_equals STRING
1917 # ------------------------
1918 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1919 # splitting STRING at the '=' sign.
1920 test -z "$_G_HAVE_XSI_OPS" \
1921 && (eval 'x=a/b/c;
1922 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
1923 && _G_HAVE_XSI_OPS=yes
1924
1925 if test yes = "$_G_HAVE_XSI_OPS"
1926 then
1927 # This is an XSI compatible shell, allowing a faster implementation...
1928 eval 'func_split_equals ()
1929 {
1930 $debug_cmd
1931
1932 func_split_equals_lhs=${1%%=*}
1933 func_split_equals_rhs=${1#*=}
1934 test "x$func_split_equals_lhs" = "x$1" \
1935 && func_split_equals_rhs=
1936 }'
1937 else
1938 # ...otherwise fall back to using expr, which is often a shell builtin.
1939 func_split_equals ()
1940 {
1941 $debug_cmd
1942
1943 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
1944 func_split_equals_rhs=
1945 test "x$func_split_equals_lhs" = "x$1" \
1946 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
1947 }
1948 fi #func_split_equals
1949
1950
1951 # func_split_short_opt SHORTOPT
1952 # -----------------------------
1953 # Set func_split_short_opt_name and func_split_short_opt_arg shell
1954 # variables after splitting SHORTOPT after the 2nd character.
1955 if test yes = "$_G_HAVE_XSI_OPS"
1956 then
1957 # This is an XSI compatible shell, allowing a faster implementation...
1958 eval 'func_split_short_opt ()
1959 {
1960 $debug_cmd
1961
1962 func_split_short_opt_arg=${1#??}
1963 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
1964 }'
1965 else
1966 # ...otherwise fall back to using expr, which is often a shell builtin.
1967 func_split_short_opt ()
1968 {
1969 $debug_cmd
1970
1971 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
1972 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
1973 }
1974 fi #func_split_short_opt
1975
1976
1977 # func_usage
1978 # ----------
1979 # Echo short help message to standard output and exit.
1980 func_usage ()
1981 {
1982 $debug_cmd
1983
1984 func_usage_message
1985 $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
1986 exit 0
1987 }
1988
1989
1990 # func_usage_message
1991 # ------------------
1992 # Echo short help message to standard output.
1993 func_usage_message ()
1994 {
1995 $debug_cmd
1996
1997 eval \$ECHO \""Usage: $usage"\"
1998 echo
1999 $SED -n 's|^# ||
2000 /^Written by/{
2001 x;p;x
2002 }
2003 h
2004 /^Written by/q' < "$progpath"
2005 echo
2006 eval \$ECHO \""$usage_message"\"
2007 }
2008
2009
2010 # func_version
2011 # ------------
2012 # Echo version message to standard output and exit.
2013 func_version ()
2014 {
2015 $debug_cmd
2016
2017 printf '%s\n' "$progname $scriptversion"
2018 $SED -n '
2019 /(C)/!b go
2020 :more
2021 /\./!{
2022 N
2023 s|\n# | |
2024 b more
2025 }
2026 :go
2027 /^# Written by /,/# warranty; / {
2028 s|^# ||
2029 s|^# *$||
2030 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
2031 p
2032 }
2033 /^# Written by / {
2034 s|^# ||
2035 p
2036 }
2037 /^warranty; /q' < "$progpath"
2038
2039 exit $?
2040 }
2041
2042
2043 # Local variables:
2044 # mode: shell-script
2045 # sh-indentation: 2
2046 # eval: (add-hook 'before-save-hook 'time-stamp)
2047 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
2048 # time-stamp-time-zone: "UTC"
2049 # End:
2050
2051 # Set a version string.
2052 scriptversion='(GNU libtool) 2.4.6'
2053
2054
2055 # func_echo ARG...
2056 # ----------------
2057 # Libtool also displays the current mode in messages, so override
2058 # funclib.sh func_echo with this custom definition.
2059 func_echo ()
2060 {
2061 $debug_cmd
2062
2063 _G_message=$*
2064
2065 func_echo_IFS=$IFS
2066 IFS=$nl
2067 for _G_line in $_G_message; do
2068 IFS=$func_echo_IFS
2069 $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
2070 done
2071 IFS=$func_echo_IFS
2072 }
2073
2074
2075 # func_warning ARG...
2076 # -------------------
2077 # Libtool warnings are not categorized, so override funclib.sh
2078 # func_warning with this simpler definition.
2079 func_warning ()
2080 {
2081 $debug_cmd
2082
2083 $warning_func ${1+"$@"}
2084 }
2085
2086
2087 ## ---------------- ##
2088 ## Options parsing. ##
2089 ## ---------------- ##
2090
2091 # Hook in the functions to make sure our own options are parsed during
2092 # the option parsing loop.
2093
2094 usage='$progpath [OPTION]... [MODE-ARG]...'
2095
2096 # Short help message in response to '-h'.
2097 usage_message="Options:
2098 --config show all configuration variables
2099 --debug enable verbose shell tracing
2100 -n, --dry-run display commands without modifying any files
2101 --features display basic configuration information and exit
2102 --mode=MODE use operation mode MODE
2103 --no-warnings equivalent to '-Wnone'
2104 --preserve-dup-deps don't remove duplicate dependency libraries
2105 --quiet, --silent don't print informational messages
2106 --tag=TAG use configuration variables from tag TAG
2107 -v, --verbose print more informational messages than default
2108 --version print version information
2109 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
2110 -h, --help, --help-all print short, long, or detailed help message
2111 "
2112
2113 # Additional text appended to 'usage_message' in response to '--help'.
2114 func_help ()
2115 {
2116 $debug_cmd
2117
2118 func_usage_message
2119 $ECHO "$long_help_message
2120
2121 MODE must be one of the following:
2122
2123 clean remove files from the build directory
2124 compile compile a source file into a libtool object
2125 execute automatically set library path, then run a program
2126 finish complete the installation of libtool libraries
2127 install install libraries or executables
2128 link create a library or an executable
2129 uninstall remove libraries from an installed directory
2130
2131 MODE-ARGS vary depending on the MODE. When passed as first option,
2132 '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
2133 Try '$progname --help --mode=MODE' for a more detailed description of MODE.
2134
2135 When reporting a bug, please describe a test case to reproduce it and
2136 include the following information:
2137
2138 host-triplet: $host
2139 shell: $SHELL
2140 compiler: $LTCC
2141 compiler flags: $LTCFLAGS
2142 linker: $LD (gnu? $with_gnu_ld)
2143 version: $progname $scriptversion Debian-2.4.6-15
2144 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
2145 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
2146
2147 Report bugs to <bug-libtool@gnu.org>.
2148 GNU libtool home page: <http://www.gnu.org/s/libtool/>.
2149 General help using GNU software: <http://www.gnu.org/gethelp/>."
2150 exit 0
2151 }
2152
2153
2154 # func_lo2o OBJECT-NAME
2155 # ---------------------
2156 # Transform OBJECT-NAME from a '.lo' suffix to the platform specific
2157 # object suffix.
2158
2159 lo2o=s/\\.lo\$/.$objext/
2160 o2lo=s/\\.$objext\$/.lo/
2161
2162 if test yes = "$_G_HAVE_XSI_OPS"; then
2163 eval 'func_lo2o ()
2164 {
2165 case $1 in
2166 *.lo) func_lo2o_result=${1%.lo}.$objext ;;
2167 * ) func_lo2o_result=$1 ;;
2168 esac
2169 }'
2170
2171 # func_xform LIBOBJ-OR-SOURCE
2172 # ---------------------------
2173 # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
2174 # suffix to a '.lo' libtool-object suffix.
2175 eval 'func_xform ()
2176 {
2177 func_xform_result=${1%.*}.lo
2178 }'
2179 else
2180 # ...otherwise fall back to using sed.
2181 func_lo2o ()
2182 {
2183 func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
2184 }
2185
2186 func_xform ()
2187 {
2188 func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
2189 }
2190 fi
2191
2192
2193 # func_fatal_configuration ARG...
2194 # -------------------------------
2195 # Echo program name prefixed message to standard error, followed by
2196 # a configuration failure hint, and exit.
2197 func_fatal_configuration ()
2198 {
2199 func__fatal_error ${1+"$@"} \
2200 "See the $PACKAGE documentation for more information." \
2201 "Fatal configuration error."
2202 }
2203
2204
2205 # func_config
2206 # -----------
2207 # Display the configuration for all the tags in this script.
2208 func_config ()
2209 {
2210 re_begincf='^# ### BEGIN LIBTOOL'
2211 re_endcf='^# ### END LIBTOOL'
2212
2213 # Default configuration.
2214 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
2215
2216 # Now print the configurations for the tags.
2217 for tagname in $taglist; do
2218 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
2219 done
2220
2221 exit $?
2222 }
2223
2224
2225 # func_features
2226 # -------------
2227 # Display the features supported by this script.
2228 func_features ()
2229 {
2230 echo "host: $host"
2231 if test yes = "$build_libtool_libs"; then
2232 echo "enable shared libraries"
2233 else
2234 echo "disable shared libraries"
2235 fi
2236 if test yes = "$build_old_libs"; then
2237 echo "enable static libraries"
2238 else
2239 echo "disable static libraries"
2240 fi
2241
2242 exit $?
2243 }
2244
2245
2246 # func_enable_tag TAGNAME
2247 # -----------------------
2248 # Verify that TAGNAME is valid, and either flag an error and exit, or
2249 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
2250 # variable here.
2251 func_enable_tag ()
2252 {
2253 # Global variable:
2254 tagname=$1
2255
2256 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
2257 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
2258 sed_extractcf=/$re_begincf/,/$re_endcf/p
2259
2260 # Validate tagname.
2261 case $tagname in
2262 *[!-_A-Za-z0-9,/]*)
2263 func_fatal_error "invalid tag name: $tagname"
2264 ;;
2265 esac
2266
2267 # Don't test for the "default" C tag, as we know it's
2268 # there but not specially marked.
2269 case $tagname in
2270 CC) ;;
2271 *)
2272 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
2273 taglist="$taglist $tagname"
2274
2275 # Evaluate the configuration. Be careful to quote the path
2276 # and the sed script, to avoid splitting on whitespace, but
2277 # also don't use non-portable quotes within backquotes within
2278 # quotes we have to do it in 2 steps:
2279 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
2280 eval "$extractedcf"
2281 else
2282 func_error "ignoring unknown tag $tagname"
2283 fi
2284 ;;
2285 esac
2286 }
2287
2288
2289 # func_check_version_match
2290 # ------------------------
2291 # Ensure that we are using m4 macros, and libtool script from the same
2292 # release of libtool.
2293 func_check_version_match ()
2294 {
2295 if test "$package_revision" != "$macro_revision"; then
2296 if test "$VERSION" != "$macro_version"; then
2297 if test -z "$macro_version"; then
2298 cat >&2 <<_LT_EOF
2299 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2300 $progname: definition of this LT_INIT comes from an older release.
2301 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2302 $progname: and run autoconf again.
2303 _LT_EOF
2304 else
2305 cat >&2 <<_LT_EOF
2306 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2307 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
2308 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2309 $progname: and run autoconf again.
2310 _LT_EOF
2311 fi
2312 else
2313 cat >&2 <<_LT_EOF
2314 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
2315 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
2316 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
2317 $progname: of $PACKAGE $VERSION and run autoconf again.
2318 _LT_EOF
2319 fi
2320
2321 exit $EXIT_MISMATCH
2322 fi
2323 }
2324
2325
2326 # libtool_options_prep [ARG]...
2327 # -----------------------------
2328 # Preparation for options parsed by libtool.
2329 libtool_options_prep ()
2330 {
2331 $debug_mode
2332
2333 # Option defaults:
2334 opt_config=false
2335 opt_dlopen=
2336 opt_dry_run=false
2337 opt_help=false
2338 opt_mode=
2339 opt_preserve_dup_deps=false
2340 opt_quiet=false
2341
2342 nonopt=
2343 preserve_args=
2344
2345 _G_rc_lt_options_prep=:
2346
2347 # Shorthand for --mode=foo, only valid as the first argument
2348 case $1 in
2349 clean|clea|cle|cl)
2350 shift; set dummy --mode clean ${1+"$@"}; shift
2351 ;;
2352 compile|compil|compi|comp|com|co|c)
2353 shift; set dummy --mode compile ${1+"$@"}; shift
2354 ;;
2355 execute|execut|execu|exec|exe|ex|e)
2356 shift; set dummy --mode execute ${1+"$@"}; shift
2357 ;;
2358 finish|finis|fini|fin|fi|f)
2359 shift; set dummy --mode finish ${1+"$@"}; shift
2360 ;;
2361 install|instal|insta|inst|ins|in|i)
2362 shift; set dummy --mode install ${1+"$@"}; shift
2363 ;;
2364 link|lin|li|l)
2365 shift; set dummy --mode link ${1+"$@"}; shift
2366 ;;
2367 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2368 shift; set dummy --mode uninstall ${1+"$@"}; shift
2369 ;;
2370 *)
2371 _G_rc_lt_options_prep=false
2372 ;;
2373 esac
2374
2375 if $_G_rc_lt_options_prep; then
2376 # Pass back the list of options.
2377 func_quote_for_eval ${1+"$@"}
2378 libtool_options_prep_result=$func_quote_for_eval_result
2379 fi
2380
2381 $_G_rc_lt_options_prep
2382 }
2383 func_add_hook func_options_prep libtool_options_prep
2384
2385
2386 # libtool_parse_options [ARG]...
2387 # ---------------------------------
2388 # Provide handling for libtool specific options.
2389 libtool_parse_options ()
2390 {
2391 $debug_cmd
2392
2393 _G_rc_lt_parse_options=false
2394
2395 # Perform our own loop to consume as many options as possible in
2396 # each iteration.
2397 while test $# -gt 0; do
2398 _G_match_lt_parse_options=:
2399 _G_opt=$1
2400 shift
2401 case $_G_opt in
2402 --dry-run|--dryrun|-n)
2403 opt_dry_run=:
2404 ;;
2405
2406 --config) func_config ;;
2407
2408 --dlopen|-dlopen)
2409 opt_dlopen="${opt_dlopen+$opt_dlopen
2410 }$1"
2411 shift
2412 ;;
2413
2414 --preserve-dup-deps)
2415 opt_preserve_dup_deps=: ;;
2416
2417 --features) func_features ;;
2418
2419 --finish) set dummy --mode finish ${1+"$@"}; shift ;;
2420
2421 --help) opt_help=: ;;
2422
2423 --help-all) opt_help=': help-all' ;;
2424
2425 --mode) test $# = 0 && func_missing_arg $_G_opt && break
2426 opt_mode=$1
2427 case $1 in
2428 # Valid mode arguments:
2429 clean|compile|execute|finish|install|link|relink|uninstall) ;;
2430
2431 # Catch anything else as an error
2432 *) func_error "invalid argument for $_G_opt"
2433 exit_cmd=exit
2434 break
2435 ;;
2436 esac
2437 shift
2438 ;;
2439
2440 --no-silent|--no-quiet)
2441 opt_quiet=false
2442 func_append preserve_args " $_G_opt"
2443 ;;
2444
2445 --no-warnings|--no-warning|--no-warn)
2446 opt_warning=false
2447 func_append preserve_args " $_G_opt"
2448 ;;
2449
2450 --no-verbose)
2451 opt_verbose=false
2452 func_append preserve_args " $_G_opt"
2453 ;;
2454
2455 --silent|--quiet)
2456 opt_quiet=:
2457 opt_verbose=false
2458 func_append preserve_args " $_G_opt"
2459 ;;
2460
2461 --tag) test $# = 0 && func_missing_arg $_G_opt && break
2462 opt_tag=$1
2463 func_append preserve_args " $_G_opt $1"
2464 func_enable_tag "$1"
2465 shift
2466 ;;
2467
2468 --verbose|-v) opt_quiet=false
2469 opt_verbose=:
2470 func_append preserve_args " $_G_opt"
2471 ;;
2472
2473 # An option not handled by this hook function:
2474 *) set dummy "$_G_opt" ${1+"$@"} ; shift
2475 _G_match_lt_parse_options=false
2476 break
2477 ;;
2478 esac
2479 $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
2480 done
2481
2482 if $_G_rc_lt_parse_options; then
2483 # save modified positional parameters for caller
2484 func_quote_for_eval ${1+"$@"}
2485 libtool_parse_options_result=$func_quote_for_eval_result
2486 fi
2487
2488 $_G_rc_lt_parse_options
2489 }
2490 func_add_hook func_parse_options libtool_parse_options
2491
2492
2493
2494 # libtool_validate_options [ARG]...
2495 # ---------------------------------
2496 # Perform any sanity checks on option settings and/or unconsumed
2497 # arguments.
2498 libtool_validate_options ()
2499 {
2500 # save first non-option argument
2501 if test 0 -lt $#; then
2502 nonopt=$1
2503 shift
2504 fi
2505
2506 # preserve --debug
2507 test : = "$debug_cmd" || func_append preserve_args " --debug"
2508
2509 case $host in
2510 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
2511 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
2512 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
2513 # don't eliminate duplications in $postdeps and $predeps
2514 opt_duplicate_compiler_generated_deps=:
2515 ;;
2516 *)
2517 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
2518 ;;
2519 esac
2520
2521 $opt_help || {
2522 # Sanity checks first:
2523 func_check_version_match
2524
2525 test yes != "$build_libtool_libs" \
2526 && test yes != "$build_old_libs" \
2527 && func_fatal_configuration "not configured to build any kind of library"
2528
2529 # Darwin sucks
2530 eval std_shrext=\"$shrext_cmds\"
2531
2532 # Only execute mode is allowed to have -dlopen flags.
2533 if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
2534 func_error "unrecognized option '-dlopen'"
2535 $ECHO "$help" 1>&2
2536 exit $EXIT_FAILURE
2537 fi
2538
2539 # Change the help message to a mode-specific one.
2540 generic_help=$help
2541 help="Try '$progname --help --mode=$opt_mode' for more information."
2542 }
2543
2544 # Pass back the unparsed argument list
2545 func_quote_for_eval ${1+"$@"}
2546 libtool_validate_options_result=$func_quote_for_eval_result
2547 }
2548 func_add_hook func_validate_options libtool_validate_options
2549
2550
2551 # Process options as early as possible so that --help and --version
2552 # can return quickly.
2553 func_options ${1+"$@"}
2554 eval set dummy "$func_options_result"; shift
2555
2556
2557
2558 ## ----------- ##
2559 ## Main. ##
2560 ## ----------- ##
2561
2562 magic='%%%MAGIC variable%%%'
2563 magic_exe='%%%MAGIC EXE variable%%%'
2564
2565 # Global variables.
2566 extracted_archives=
2567 extracted_serial=0
2568
2569 # If this variable is set in any of the actions, the command in it
2570 # will be execed at the end. This prevents here-documents from being
2571 # left over by shells.
2572 exec_cmd=
2573
2574
2575 # A function that is used when there is no print builtin or printf.
2576 func_fallback_echo ()
2577 {
2578 eval 'cat <<_LTECHO_EOF
2579 $1
2580 _LTECHO_EOF'
2581 }
2582
2583 # func_generated_by_libtool
2584 # True iff stdin has been generated by Libtool. This function is only
2585 # a basic sanity check; it will hardly flush out determined imposters.
2586 func_generated_by_libtool_p ()
2587 {
2588 $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
2589 }
2590
2591 # func_lalib_p file
2592 # True iff FILE is a libtool '.la' library or '.lo' object file.
2593 # This function is only a basic sanity check; it will hardly flush out
2594 # determined imposters.
2595 func_lalib_p ()
2596 {
2597 test -f "$1" &&
2598 $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
2599 }
2600
2601 # func_lalib_unsafe_p file
2602 # True iff FILE is a libtool '.la' library or '.lo' object file.
2603 # This function implements the same check as func_lalib_p without
2604 # resorting to external programs. To this end, it redirects stdin and
2605 # closes it afterwards, without saving the original file descriptor.
2606 # As a safety measure, use it only where a negative result would be
2607 # fatal anyway. Works if 'file' does not exist.
2608 func_lalib_unsafe_p ()
2609 {
2610 lalib_p=no
2611 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
2612 for lalib_p_l in 1 2 3 4
2613 do
2614 read lalib_p_line
2615 case $lalib_p_line in
2616 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
2617 esac
2618 done
2619 exec 0<&5 5<&-
2620 fi
2621 test yes = "$lalib_p"
2622 }
2623
2624 # func_ltwrapper_script_p file
2625 # True iff FILE is a libtool wrapper script
2626 # This function is only a basic sanity check; it will hardly flush out
2627 # determined imposters.
2628 func_ltwrapper_script_p ()
2629 {
2630 test -f "$1" &&
2631 $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
2632 }
2633
2634 # func_ltwrapper_executable_p file
2635 # True iff FILE is a libtool wrapper executable
2636 # This function is only a basic sanity check; it will hardly flush out
2637 # determined imposters.
2638 func_ltwrapper_executable_p ()
2639 {
2640 func_ltwrapper_exec_suffix=
2641 case $1 in
2642 *.exe) ;;
2643 *) func_ltwrapper_exec_suffix=.exe ;;
2644 esac
2645 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
2646 }
2647
2648 # func_ltwrapper_scriptname file
2649 # Assumes file is an ltwrapper_executable
2650 # uses $file to determine the appropriate filename for a
2651 # temporary ltwrapper_script.
2652 func_ltwrapper_scriptname ()
2653 {
2654 func_dirname_and_basename "$1" "" "."
2655 func_stripname '' '.exe' "$func_basename_result"
2656 func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
2657 }
2658
2659 # func_ltwrapper_p file
2660 # True iff FILE is a libtool wrapper script or wrapper executable
2661 # This function is only a basic sanity check; it will hardly flush out
2662 # determined imposters.
2663 func_ltwrapper_p ()
2664 {
2665 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
2666 }
2667
2668
2669 # func_execute_cmds commands fail_cmd
2670 # Execute tilde-delimited COMMANDS.
2671 # If FAIL_CMD is given, eval that upon failure.
2672 # FAIL_CMD may read-access the current command in variable CMD!
2673 func_execute_cmds ()
2674 {
2675 $debug_cmd
2676
2677 save_ifs=$IFS; IFS='~'
2678 for cmd in $1; do
2679 IFS=$sp$nl
2680 eval cmd=\"$cmd\"
2681 IFS=$save_ifs
2682 func_show_eval "$cmd" "${2-:}"
2683 done
2684 IFS=$save_ifs
2685 }
2686
2687
2688 # func_source file
2689 # Source FILE, adding directory component if necessary.
2690 # Note that it is not necessary on cygwin/mingw to append a dot to
2691 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
2692 # behavior happens only for exec(3), not for open(2)! Also, sourcing
2693 # 'FILE.' does not work on cygwin managed mounts.
2694 func_source ()
2695 {
2696 $debug_cmd
2697
2698 case $1 in
2699 */* | *\\*) . "$1" ;;
2700 *) . "./$1" ;;
2701 esac
2702 }
2703
2704
2705 # func_resolve_sysroot PATH
2706 # Replace a leading = in PATH with a sysroot. Store the result into
2707 # func_resolve_sysroot_result
2708 func_resolve_sysroot ()
2709 {
2710 func_resolve_sysroot_result=$1
2711 case $func_resolve_sysroot_result in
2712 =*)
2713 func_stripname '=' '' "$func_resolve_sysroot_result"
2714 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
2715 ;;
2716 esac
2717 }
2718
2719 # func_replace_sysroot PATH
2720 # If PATH begins with the sysroot, replace it with = and
2721 # store the result into func_replace_sysroot_result.
2722 func_replace_sysroot ()
2723 {
2724 case $lt_sysroot:$1 in
2725 ?*:"$lt_sysroot"*)
2726 func_stripname "$lt_sysroot" '' "$1"
2727 func_replace_sysroot_result='='$func_stripname_result
2728 ;;
2729 *)
2730 # Including no sysroot.
2731 func_replace_sysroot_result=$1
2732 ;;
2733 esac
2734 }
2735
2736 # func_infer_tag arg
2737 # Infer tagged configuration to use if any are available and
2738 # if one wasn't chosen via the "--tag" command line option.
2739 # Only attempt this if the compiler in the base compile
2740 # command doesn't match the default compiler.
2741 # arg is usually of the form 'gcc ...'
2742 func_infer_tag ()
2743 {
2744 $debug_cmd
2745
2746 if test -n "$available_tags" && test -z "$tagname"; then
2747 CC_quoted=
2748 for arg in $CC; do
2749 func_append_quoted CC_quoted "$arg"
2750 done
2751 CC_expanded=`func_echo_all $CC`
2752 CC_quoted_expanded=`func_echo_all $CC_quoted`
2753 case $@ in
2754 # Blanks in the command may have been stripped by the calling shell,
2755 # but not from the CC environment variable when configure was run.
2756 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2757 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
2758 # Blanks at the start of $base_compile will cause this to fail
2759 # if we don't check for them as well.
2760 *)
2761 for z in $available_tags; do
2762 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
2763 # Evaluate the configuration.
2764 eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
2765 CC_quoted=
2766 for arg in $CC; do
2767 # Double-quote args containing other shell metacharacters.
2768 func_append_quoted CC_quoted "$arg"
2769 done
2770 CC_expanded=`func_echo_all $CC`
2771 CC_quoted_expanded=`func_echo_all $CC_quoted`
2772 case "$@ " in
2773 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2774 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
2775 # The compiler in the base compile command matches
2776 # the one in the tagged configuration.
2777 # Assume this is the tagged configuration we want.
2778 tagname=$z
2779 break
2780 ;;
2781 esac
2782 fi
2783 done
2784 # If $tagname still isn't set, then no tagged configuration
2785 # was found and let the user know that the "--tag" command
2786 # line option must be used.
2787 if test -z "$tagname"; then
2788 func_echo "unable to infer tagged configuration"
2789 func_fatal_error "specify a tag with '--tag'"
2790 # else
2791 # func_verbose "using $tagname tagged configuration"
2792 fi
2793 ;;
2794 esac
2795 fi
2796 }
2797
2798
2799
2800 # func_write_libtool_object output_name pic_name nonpic_name
2801 # Create a libtool object file (analogous to a ".la" file),
2802 # but don't create it if we're doing a dry run.
2803 func_write_libtool_object ()
2804 {
2805 write_libobj=$1
2806 if test yes = "$build_libtool_libs"; then
2807 write_lobj=\'$2\'
2808 else
2809 write_lobj=none
2810 fi
2811
2812 if test yes = "$build_old_libs"; then
2813 write_oldobj=\'$3\'
2814 else
2815 write_oldobj=none
2816 fi
2817
2818 $opt_dry_run || {
2819 cat >${write_libobj}T <<EOF
2820 # $write_libobj - a libtool object file
2821 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
2822 #
2823 # Please DO NOT delete this file!
2824 # It is necessary for linking the library.
2825
2826 # Name of the PIC object.
2827 pic_object=$write_lobj
2828
2829 # Name of the non-PIC object
2830 non_pic_object=$write_oldobj
2831
2832 EOF
2833 $MV "${write_libobj}T" "$write_libobj"
2834 }
2835 }
2836
2837
2838 ##################################################
2839 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
2840 ##################################################
2841
2842 # func_convert_core_file_wine_to_w32 ARG
2843 # Helper function used by file name conversion functions when $build is *nix,
2844 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
2845 # correctly configured wine environment available, with the winepath program
2846 # in $build's $PATH.
2847 #
2848 # ARG is the $build file name to be converted to w32 format.
2849 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
2850 # be empty on error (or when ARG is empty)
2851 func_convert_core_file_wine_to_w32 ()
2852 {
2853 $debug_cmd
2854
2855 func_convert_core_file_wine_to_w32_result=$1
2856 if test -n "$1"; then
2857 # Unfortunately, winepath does not exit with a non-zero error code, so we
2858 # are forced to check the contents of stdout. On the other hand, if the
2859 # command is not found, the shell will set an exit code of 127 and print
2860 # *an error message* to stdout. So we must check for both error code of
2861 # zero AND non-empty stdout, which explains the odd construction:
2862 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
2863 if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
2864 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
2865 $SED -e "$sed_naive_backslashify"`
2866 else
2867 func_convert_core_file_wine_to_w32_result=
2868 fi
2869 fi
2870 }
2871 # end: func_convert_core_file_wine_to_w32
2872
2873
2874 # func_convert_core_path_wine_to_w32 ARG
2875 # Helper function used by path conversion functions when $build is *nix, and
2876 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
2877 # configured wine environment available, with the winepath program in $build's
2878 # $PATH. Assumes ARG has no leading or trailing path separator characters.
2879 #
2880 # ARG is path to be converted from $build format to win32.
2881 # Result is available in $func_convert_core_path_wine_to_w32_result.
2882 # Unconvertible file (directory) names in ARG are skipped; if no directory names
2883 # are convertible, then the result may be empty.
2884 func_convert_core_path_wine_to_w32 ()
2885 {
2886 $debug_cmd
2887
2888 # unfortunately, winepath doesn't convert paths, only file names
2889 func_convert_core_path_wine_to_w32_result=
2890 if test -n "$1"; then
2891 oldIFS=$IFS
2892 IFS=:
2893 for func_convert_core_path_wine_to_w32_f in $1; do
2894 IFS=$oldIFS
2895 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
2896 if test -n "$func_convert_core_file_wine_to_w32_result"; then
2897 if test -z "$func_convert_core_path_wine_to_w32_result"; then
2898 func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
2899 else
2900 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
2901 fi
2902 fi
2903 done
2904 IFS=$oldIFS
2905 fi
2906 }
2907 # end: func_convert_core_path_wine_to_w32
2908
2909
2910 # func_cygpath ARGS...
2911 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
2912 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
2913 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
2914 # (2), returns the Cygwin file name or path in func_cygpath_result (input
2915 # file name or path is assumed to be in w32 format, as previously converted
2916 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
2917 # or path in func_cygpath_result (input file name or path is assumed to be in
2918 # Cygwin format). Returns an empty string on error.
2919 #
2920 # ARGS are passed to cygpath, with the last one being the file name or path to
2921 # be converted.
2922 #
2923 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
2924 # environment variable; do not put it in $PATH.
2925 func_cygpath ()
2926 {
2927 $debug_cmd
2928
2929 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
2930 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
2931 if test "$?" -ne 0; then
2932 # on failure, ensure result is empty
2933 func_cygpath_result=
2934 fi
2935 else
2936 func_cygpath_result=
2937 func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
2938 fi
2939 }
2940 #end: func_cygpath
2941
2942
2943 # func_convert_core_msys_to_w32 ARG
2944 # Convert file name or path ARG from MSYS format to w32 format. Return
2945 # result in func_convert_core_msys_to_w32_result.
2946 func_convert_core_msys_to_w32 ()
2947 {
2948 $debug_cmd
2949
2950 # awkward: cmd appends spaces to result
2951 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
2952 $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
2953 }
2954 #end: func_convert_core_msys_to_w32
2955
2956
2957 # func_convert_file_check ARG1 ARG2
2958 # Verify that ARG1 (a file name in $build format) was converted to $host
2959 # format in ARG2. Otherwise, emit an error message, but continue (resetting
2960 # func_to_host_file_result to ARG1).
2961 func_convert_file_check ()
2962 {
2963 $debug_cmd
2964
2965 if test -z "$2" && test -n "$1"; then
2966 func_error "Could not determine host file name corresponding to"
2967 func_error " '$1'"
2968 func_error "Continuing, but uninstalled executables may not work."
2969 # Fallback:
2970 func_to_host_file_result=$1
2971 fi
2972 }
2973 # end func_convert_file_check
2974
2975
2976 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
2977 # Verify that FROM_PATH (a path in $build format) was converted to $host
2978 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
2979 # func_to_host_file_result to a simplistic fallback value (see below).
2980 func_convert_path_check ()
2981 {
2982 $debug_cmd
2983
2984 if test -z "$4" && test -n "$3"; then
2985 func_error "Could not determine the host path corresponding to"
2986 func_error " '$3'"
2987 func_error "Continuing, but uninstalled executables may not work."
2988 # Fallback. This is a deliberately simplistic "conversion" and
2989 # should not be "improved". See libtool.info.
2990 if test "x$1" != "x$2"; then
2991 lt_replace_pathsep_chars="s|$1|$2|g"
2992 func_to_host_path_result=`echo "$3" |
2993 $SED -e "$lt_replace_pathsep_chars"`
2994 else
2995 func_to_host_path_result=$3
2996 fi
2997 fi
2998 }
2999 # end func_convert_path_check
3000
3001
3002 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
3003 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
3004 # and appending REPL if ORIG matches BACKPAT.
3005 func_convert_path_front_back_pathsep ()
3006 {
3007 $debug_cmd
3008
3009 case $4 in
3010 $1 ) func_to_host_path_result=$3$func_to_host_path_result
3011 ;;
3012 esac
3013 case $4 in
3014 $2 ) func_append func_to_host_path_result "$3"
3015 ;;
3016 esac
3017 }
3018 # end func_convert_path_front_back_pathsep
3019
3020
3021 ##################################################
3022 # $build to $host FILE NAME CONVERSION FUNCTIONS #
3023 ##################################################
3024 # invoked via '$to_host_file_cmd ARG'
3025 #
3026 # In each case, ARG is the path to be converted from $build to $host format.
3027 # Result will be available in $func_to_host_file_result.
3028
3029
3030 # func_to_host_file ARG
3031 # Converts the file name ARG from $build format to $host format. Return result
3032 # in func_to_host_file_result.
3033 func_to_host_file ()
3034 {
3035 $debug_cmd
3036
3037 $to_host_file_cmd "$1"
3038 }
3039 # end func_to_host_file
3040
3041
3042 # func_to_tool_file ARG LAZY
3043 # converts the file name ARG from $build format to toolchain format. Return
3044 # result in func_to_tool_file_result. If the conversion in use is listed
3045 # in (the comma separated) LAZY, no conversion takes place.
3046 func_to_tool_file ()
3047 {
3048 $debug_cmd
3049
3050 case ,$2, in
3051 *,"$to_tool_file_cmd",*)
3052 func_to_tool_file_result=$1
3053 ;;
3054 *)
3055 $to_tool_file_cmd "$1"
3056 func_to_tool_file_result=$func_to_host_file_result
3057 ;;
3058 esac
3059 }
3060 # end func_to_tool_file
3061
3062
3063 # func_convert_file_noop ARG
3064 # Copy ARG to func_to_host_file_result.
3065 func_convert_file_noop ()
3066 {
3067 func_to_host_file_result=$1
3068 }
3069 # end func_convert_file_noop
3070
3071
3072 # func_convert_file_msys_to_w32 ARG
3073 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
3074 # conversion to w32 is not available inside the cwrapper. Returns result in
3075 # func_to_host_file_result.
3076 func_convert_file_msys_to_w32 ()
3077 {
3078 $debug_cmd
3079
3080 func_to_host_file_result=$1
3081 if test -n "$1"; then
3082 func_convert_core_msys_to_w32 "$1"
3083 func_to_host_file_result=$func_convert_core_msys_to_w32_result
3084 fi
3085 func_convert_file_check "$1" "$func_to_host_file_result"
3086 }
3087 # end func_convert_file_msys_to_w32
3088
3089
3090 # func_convert_file_cygwin_to_w32 ARG
3091 # Convert file name ARG from Cygwin to w32 format. Returns result in
3092 # func_to_host_file_result.
3093 func_convert_file_cygwin_to_w32 ()
3094 {
3095 $debug_cmd
3096
3097 func_to_host_file_result=$1
3098 if test -n "$1"; then
3099 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
3100 # LT_CYGPATH in this case.
3101 func_to_host_file_result=`cygpath -m "$1"`
3102 fi
3103 func_convert_file_check "$1" "$func_to_host_file_result"
3104 }
3105 # end func_convert_file_cygwin_to_w32
3106
3107
3108 # func_convert_file_nix_to_w32 ARG
3109 # Convert file name ARG from *nix to w32 format. Requires a wine environment
3110 # and a working winepath. Returns result in func_to_host_file_result.
3111 func_convert_file_nix_to_w32 ()
3112 {
3113 $debug_cmd
3114
3115 func_to_host_file_result=$1
3116 if test -n "$1"; then
3117 func_convert_core_file_wine_to_w32 "$1"
3118 func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
3119 fi
3120 func_convert_file_check "$1" "$func_to_host_file_result"
3121 }
3122 # end func_convert_file_nix_to_w32
3123
3124
3125 # func_convert_file_msys_to_cygwin ARG
3126 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3127 # Returns result in func_to_host_file_result.
3128 func_convert_file_msys_to_cygwin ()
3129 {
3130 $debug_cmd
3131
3132 func_to_host_file_result=$1
3133 if test -n "$1"; then
3134 func_convert_core_msys_to_w32 "$1"
3135 func_cygpath -u "$func_convert_core_msys_to_w32_result"
3136 func_to_host_file_result=$func_cygpath_result
3137 fi
3138 func_convert_file_check "$1" "$func_to_host_file_result"
3139 }
3140 # end func_convert_file_msys_to_cygwin
3141
3142
3143 # func_convert_file_nix_to_cygwin ARG
3144 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
3145 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
3146 # in func_to_host_file_result.
3147 func_convert_file_nix_to_cygwin ()
3148 {
3149 $debug_cmd
3150
3151 func_to_host_file_result=$1
3152 if test -n "$1"; then
3153 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
3154 func_convert_core_file_wine_to_w32 "$1"
3155 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
3156 func_to_host_file_result=$func_cygpath_result
3157 fi
3158 func_convert_file_check "$1" "$func_to_host_file_result"
3159 }
3160 # end func_convert_file_nix_to_cygwin
3161
3162
3163 #############################################
3164 # $build to $host PATH CONVERSION FUNCTIONS #
3165 #############################################
3166 # invoked via '$to_host_path_cmd ARG'
3167 #
3168 # In each case, ARG is the path to be converted from $build to $host format.
3169 # The result will be available in $func_to_host_path_result.
3170 #
3171 # Path separators are also converted from $build format to $host format. If
3172 # ARG begins or ends with a path separator character, it is preserved (but
3173 # converted to $host format) on output.
3174 #
3175 # All path conversion functions are named using the following convention:
3176 # file name conversion function : func_convert_file_X_to_Y ()
3177 # path conversion function : func_convert_path_X_to_Y ()
3178 # where, for any given $build/$host combination the 'X_to_Y' value is the
3179 # same. If conversion functions are added for new $build/$host combinations,
3180 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
3181 # will break.
3182
3183
3184 # func_init_to_host_path_cmd
3185 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
3186 # appropriate value, based on the value of $to_host_file_cmd.
3187 to_host_path_cmd=
3188 func_init_to_host_path_cmd ()
3189 {
3190 $debug_cmd
3191
3192 if test -z "$to_host_path_cmd"; then
3193 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
3194 to_host_path_cmd=func_convert_path_$func_stripname_result
3195 fi
3196 }
3197
3198
3199 # func_to_host_path ARG
3200 # Converts the path ARG from $build format to $host format. Return result
3201 # in func_to_host_path_result.
3202 func_to_host_path ()
3203 {
3204 $debug_cmd
3205
3206 func_init_to_host_path_cmd
3207 $to_host_path_cmd "$1"
3208 }
3209 # end func_to_host_path
3210
3211
3212 # func_convert_path_noop ARG
3213 # Copy ARG to func_to_host_path_result.
3214 func_convert_path_noop ()
3215 {
3216 func_to_host_path_result=$1
3217 }
3218 # end func_convert_path_noop
3219
3220
3221 # func_convert_path_msys_to_w32 ARG
3222 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
3223 # conversion to w32 is not available inside the cwrapper. Returns result in
3224 # func_to_host_path_result.
3225 func_convert_path_msys_to_w32 ()
3226 {
3227 $debug_cmd
3228
3229 func_to_host_path_result=$1
3230 if test -n "$1"; then
3231 # Remove leading and trailing path separator characters from ARG. MSYS
3232 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
3233 # and winepath ignores them completely.
3234 func_stripname : : "$1"
3235 func_to_host_path_tmp1=$func_stripname_result
3236 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3237 func_to_host_path_result=$func_convert_core_msys_to_w32_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_msys_to_w32
3244
3245
3246 # func_convert_path_cygwin_to_w32 ARG
3247 # Convert path ARG from Cygwin to w32 format. Returns result in
3248 # func_to_host_file_result.
3249 func_convert_path_cygwin_to_w32 ()
3250 {
3251 $debug_cmd
3252
3253 func_to_host_path_result=$1
3254 if test -n "$1"; then
3255 # See func_convert_path_msys_to_w32:
3256 func_stripname : : "$1"
3257 func_to_host_path_tmp1=$func_stripname_result
3258 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
3259 func_convert_path_check : ";" \
3260 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3261 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3262 fi
3263 }
3264 # end func_convert_path_cygwin_to_w32
3265
3266
3267 # func_convert_path_nix_to_w32 ARG
3268 # Convert path ARG from *nix to w32 format. Requires a wine environment and
3269 # a working winepath. Returns result in func_to_host_file_result.
3270 func_convert_path_nix_to_w32 ()
3271 {
3272 $debug_cmd
3273
3274 func_to_host_path_result=$1
3275 if test -n "$1"; then
3276 # See func_convert_path_msys_to_w32:
3277 func_stripname : : "$1"
3278 func_to_host_path_tmp1=$func_stripname_result
3279 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3280 func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
3281 func_convert_path_check : ";" \
3282 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3283 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3284 fi
3285 }
3286 # end func_convert_path_nix_to_w32
3287
3288
3289 # func_convert_path_msys_to_cygwin ARG
3290 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3291 # Returns result in func_to_host_file_result.
3292 func_convert_path_msys_to_cygwin ()
3293 {
3294 $debug_cmd
3295
3296 func_to_host_path_result=$1
3297 if test -n "$1"; then
3298 # See func_convert_path_msys_to_w32:
3299 func_stripname : : "$1"
3300 func_to_host_path_tmp1=$func_stripname_result
3301 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3302 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
3303 func_to_host_path_result=$func_cygpath_result
3304 func_convert_path_check : : \
3305 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3306 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3307 fi
3308 }
3309 # end func_convert_path_msys_to_cygwin
3310
3311
3312 # func_convert_path_nix_to_cygwin ARG
3313 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
3314 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
3315 # func_to_host_file_result.
3316 func_convert_path_nix_to_cygwin ()
3317 {
3318 $debug_cmd
3319
3320 func_to_host_path_result=$1
3321 if test -n "$1"; then
3322 # Remove leading and trailing path separator characters from
3323 # ARG. msys behavior is inconsistent here, cygpath turns them
3324 # into '.;' and ';.', and winepath ignores them completely.
3325 func_stripname : : "$1"
3326 func_to_host_path_tmp1=$func_stripname_result
3327 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3328 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
3329 func_to_host_path_result=$func_cygpath_result
3330 func_convert_path_check : : \
3331 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3332 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3333 fi
3334 }
3335 # end func_convert_path_nix_to_cygwin
3336
3337
3338 # func_dll_def_p FILE
3339 # True iff FILE is a Windows DLL '.def' file.
3340 # Keep in sync with _LT_DLL_DEF_P in libtool.m4
3341 func_dll_def_p ()
3342 {
3343 $debug_cmd
3344
3345 func_dll_def_p_tmp=`$SED -n \
3346 -e 's/^[ ]*//' \
3347 -e '/^\(;.*\)*$/d' \
3348 -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
3349 -e q \
3350 "$1"`
3351 test DEF = "$func_dll_def_p_tmp"
3352 }
3353
3354
3355 # func_mode_compile arg...
3356 func_mode_compile ()
3357 {
3358 $debug_cmd
3359
3360 # Get the compilation command and the source file.
3361 base_compile=
3362 srcfile=$nonopt # always keep a non-empty value in "srcfile"
3363 suppress_opt=yes
3364 suppress_output=
3365 arg_mode=normal
3366 libobj=
3367 later=
3368 pie_flag=
3369
3370 for arg
3371 do
3372 case $arg_mode in
3373 arg )
3374 # do not "continue". Instead, add this to base_compile
3375 lastarg=$arg
3376 arg_mode=normal
3377 ;;
3378
3379 target )
3380 libobj=$arg
3381 arg_mode=normal
3382 continue
3383 ;;
3384
3385 normal )
3386 # Accept any command-line options.
3387 case $arg in
3388 -o)
3389 test -n "$libobj" && \
3390 func_fatal_error "you cannot specify '-o' more than once"
3391 arg_mode=target
3392 continue
3393 ;;
3394
3395 -pie | -fpie | -fPIE)
3396 func_append pie_flag " $arg"
3397 continue
3398 ;;
3399
3400 -shared | -static | -prefer-pic | -prefer-non-pic)
3401 func_append later " $arg"
3402 continue
3403 ;;
3404
3405 -no-suppress)
3406 suppress_opt=no
3407 continue
3408 ;;
3409
3410 -Xcompiler)
3411 arg_mode=arg # the next one goes into the "base_compile" arg list
3412 continue # The current "srcfile" will either be retained or
3413 ;; # replaced later. I would guess that would be a bug.
3414
3415 -Wc,*)
3416 func_stripname '-Wc,' '' "$arg"
3417 args=$func_stripname_result
3418 lastarg=
3419 save_ifs=$IFS; IFS=,
3420 for arg in $args; do
3421 IFS=$save_ifs
3422 func_append_quoted lastarg "$arg"
3423 done
3424 IFS=$save_ifs
3425 func_stripname ' ' '' "$lastarg"
3426 lastarg=$func_stripname_result
3427
3428 # Add the arguments to base_compile.
3429 func_append base_compile " $lastarg"
3430 continue
3431 ;;
3432
3433 *)
3434 # Accept the current argument as the source file.
3435 # The previous "srcfile" becomes the current argument.
3436 #
3437 lastarg=$srcfile
3438 srcfile=$arg
3439 ;;
3440 esac # case $arg
3441 ;;
3442 esac # case $arg_mode
3443
3444 # Aesthetically quote the previous argument.
3445 func_append_quoted base_compile "$lastarg"
3446 done # for arg
3447
3448 case $arg_mode in
3449 arg)
3450 func_fatal_error "you must specify an argument for -Xcompile"
3451 ;;
3452 target)
3453 func_fatal_error "you must specify a target with '-o'"
3454 ;;
3455 *)
3456 # Get the name of the library object.
3457 test -z "$libobj" && {
3458 func_basename "$srcfile"
3459 libobj=$func_basename_result
3460 }
3461 ;;
3462 esac
3463
3464 # Recognize several different file suffixes.
3465 # If the user specifies -o file.o, it is replaced with file.lo
3466 case $libobj in
3467 *.[cCFSifmso] | \
3468 *.ada | *.adb | *.ads | *.asm | \
3469 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
3470 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
3471 func_xform "$libobj"
3472 libobj=$func_xform_result
3473 ;;
3474 esac
3475
3476 case $libobj in
3477 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
3478 *)
3479 func_fatal_error "cannot determine name of library object from '$libobj'"
3480 ;;
3481 esac
3482
3483 func_infer_tag $base_compile
3484
3485 for arg in $later; do
3486 case $arg in
3487 -shared)
3488 test yes = "$build_libtool_libs" \
3489 || func_fatal_configuration "cannot build a shared library"
3490 build_old_libs=no
3491 continue
3492 ;;
3493
3494 -static)
3495 build_libtool_libs=no
3496 build_old_libs=yes
3497 continue
3498 ;;
3499
3500 -prefer-pic)
3501 pic_mode=yes
3502 continue
3503 ;;
3504
3505 -prefer-non-pic)
3506 pic_mode=no
3507 continue
3508 ;;
3509 esac
3510 done
3511
3512 func_quote_for_eval "$libobj"
3513 test "X$libobj" != "X$func_quote_for_eval_result" \
3514 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
3515 && func_warning "libobj name '$libobj' may not contain shell special characters."
3516 func_dirname_and_basename "$obj" "/" ""
3517 objname=$func_basename_result
3518 xdir=$func_dirname_result
3519 lobj=$xdir$objdir/$objname
3520
3521 test -z "$base_compile" && \
3522 func_fatal_help "you must specify a compilation command"
3523
3524 # Delete any leftover library objects.
3525 if test yes = "$build_old_libs"; then
3526 removelist="$obj $lobj $libobj ${libobj}T"
3527 else
3528 removelist="$lobj $libobj ${libobj}T"
3529 fi
3530
3531 # On Cygwin there's no "real" PIC flag so we must build both object types
3532 case $host_os in
3533 cygwin* | mingw* | pw32* | os2* | cegcc*)
3534 pic_mode=default
3535 ;;
3536 esac
3537 if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
3538 # non-PIC code in shared libraries is not supported
3539 pic_mode=default
3540 fi
3541
3542 # Calculate the filename of the output object if compiler does
3543 # not support -o with -c
3544 if test no = "$compiler_c_o"; then
3545 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
3546 lockfile=$output_obj.lock
3547 else
3548 output_obj=
3549 need_locks=no
3550 lockfile=
3551 fi
3552
3553 # Lock this critical section if it is needed
3554 # We use this script file to make the link, it avoids creating a new file
3555 if test yes = "$need_locks"; then
3556 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3557 func_echo "Waiting for $lockfile to be removed"
3558 sleep 2
3559 done
3560 elif test warn = "$need_locks"; then
3561 if test -f "$lockfile"; then
3562 $ECHO "\
3563 *** ERROR, $lockfile exists and contains:
3564 `cat $lockfile 2>/dev/null`
3565
3566 This indicates that another process is trying to use the same
3567 temporary object file, and libtool could not work around it because
3568 your compiler does not support '-c' and '-o' together. If you
3569 repeat this compilation, it may succeed, by chance, but you had better
3570 avoid parallel builds (make -j) in this platform, or get a better
3571 compiler."
3572
3573 $opt_dry_run || $RM $removelist
3574 exit $EXIT_FAILURE
3575 fi
3576 func_append removelist " $output_obj"
3577 $ECHO "$srcfile" > "$lockfile"
3578 fi
3579
3580 $opt_dry_run || $RM $removelist
3581 func_append removelist " $lockfile"
3582 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
3583
3584 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
3585 srcfile=$func_to_tool_file_result
3586 func_quote_for_eval "$srcfile"
3587 qsrcfile=$func_quote_for_eval_result
3588
3589 # Only build a PIC object if we are building libtool libraries.
3590 if test yes = "$build_libtool_libs"; then
3591 # Without this assignment, base_compile gets emptied.
3592 fbsd_hideous_sh_bug=$base_compile
3593
3594 if test no != "$pic_mode"; then
3595 command="$base_compile $qsrcfile $pic_flag"
3596 else
3597 # Don't build PIC code
3598 command="$base_compile $qsrcfile"
3599 fi
3600
3601 func_mkdir_p "$xdir$objdir"
3602
3603 if test -z "$output_obj"; then
3604 # Place PIC objects in $objdir
3605 func_append command " -o $lobj"
3606 fi
3607
3608 func_show_eval_locale "$command" \
3609 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
3610
3611 if test warn = "$need_locks" &&
3612 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
3613 $ECHO "\
3614 *** ERROR, $lockfile contains:
3615 `cat $lockfile 2>/dev/null`
3616
3617 but it should contain:
3618 $srcfile
3619
3620 This indicates that another process is trying to use the same
3621 temporary object file, and libtool could not work around it because
3622 your compiler does not support '-c' and '-o' together. If you
3623 repeat this compilation, it may succeed, by chance, but you had better
3624 avoid parallel builds (make -j) in this platform, or get a better
3625 compiler."
3626
3627 $opt_dry_run || $RM $removelist
3628 exit $EXIT_FAILURE
3629 fi
3630
3631 # Just move the object if needed, then go on to compile the next one
3632 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
3633 func_show_eval '$MV "$output_obj" "$lobj"' \
3634 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
3635 fi
3636
3637 # Allow error messages only from the first compilation.
3638 if test yes = "$suppress_opt"; then
3639 suppress_output=' >/dev/null 2>&1'
3640 fi
3641 fi
3642
3643 # Only build a position-dependent object if we build old libraries.
3644 if test yes = "$build_old_libs"; then
3645 if test yes != "$pic_mode"; then
3646 # Don't build PIC code
3647 command="$base_compile $qsrcfile$pie_flag"
3648 else
3649 command="$base_compile $qsrcfile $pic_flag"
3650 fi
3651 if test yes = "$compiler_c_o"; then
3652 func_append command " -o $obj"
3653 fi
3654
3655 # Suppress compiler output if we already did a PIC compilation.
3656 func_append command "$suppress_output"
3657 func_show_eval_locale "$command" \
3658 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
3659
3660 if test warn = "$need_locks" &&
3661 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
3662 $ECHO "\
3663 *** ERROR, $lockfile contains:
3664 `cat $lockfile 2>/dev/null`
3665
3666 but it should contain:
3667 $srcfile
3668
3669 This indicates that another process is trying to use the same
3670 temporary object file, and libtool could not work around it because
3671 your compiler does not support '-c' and '-o' together. If you
3672 repeat this compilation, it may succeed, by chance, but you had better
3673 avoid parallel builds (make -j) in this platform, or get a better
3674 compiler."
3675
3676 $opt_dry_run || $RM $removelist
3677 exit $EXIT_FAILURE
3678 fi
3679
3680 # Just move the object if needed
3681 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
3682 func_show_eval '$MV "$output_obj" "$obj"' \
3683 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
3684 fi
3685 fi
3686
3687 $opt_dry_run || {
3688 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
3689
3690 # Unlock the critical section if it was locked
3691 if test no != "$need_locks"; then
3692 removelist=$lockfile
3693 $RM "$lockfile"
3694 fi
3695 }
3696
3697 exit $EXIT_SUCCESS
3698 }
3699
3700 $opt_help || {
3701 test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
3702 }
3703
3704 func_mode_help ()
3705 {
3706 # We need to display help for each of the modes.
3707 case $opt_mode in
3708 "")
3709 # Generic help is extracted from the usage comments
3710 # at the start of this file.
3711 func_help
3712 ;;
3713
3714 clean)
3715 $ECHO \
3716 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
3717
3718 Remove files from the build directory.
3719
3720 RM is the name of the program to use to delete files associated with each FILE
3721 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
3722 to RM.
3723
3724 If FILE is a libtool library, object or program, all the files associated
3725 with it are deleted. Otherwise, only FILE itself is deleted using RM."
3726 ;;
3727
3728 compile)
3729 $ECHO \
3730 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
3731
3732 Compile a source file into a libtool library object.
3733
3734 This mode accepts the following additional options:
3735
3736 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3737 -no-suppress do not suppress compiler output for multiple passes
3738 -prefer-pic try to build PIC objects only
3739 -prefer-non-pic try to build non-PIC objects only
3740 -shared do not build a '.o' file suitable for static linking
3741 -static only build a '.o' file suitable for static linking
3742 -Wc,FLAG pass FLAG directly to the compiler
3743
3744 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
3745 from the given SOURCEFILE.
3746
3747 The output file name is determined by removing the directory component from
3748 SOURCEFILE, then substituting the C source code suffix '.c' with the
3749 library object suffix, '.lo'."
3750 ;;
3751
3752 execute)
3753 $ECHO \
3754 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
3755
3756 Automatically set library path, then run a program.
3757
3758 This mode accepts the following additional options:
3759
3760 -dlopen FILE add the directory containing FILE to the library path
3761
3762 This mode sets the library path environment variable according to '-dlopen'
3763 flags.
3764
3765 If any of the ARGS are libtool executable wrappers, then they are translated
3766 into their corresponding uninstalled binary, and any of their required library
3767 directories are added to the library path.
3768
3769 Then, COMMAND is executed, with ARGS as arguments."
3770 ;;
3771
3772 finish)
3773 $ECHO \
3774 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
3775
3776 Complete the installation of libtool libraries.
3777
3778 Each LIBDIR is a directory that contains libtool libraries.
3779
3780 The commands that this mode executes may require superuser privileges. Use
3781 the '--dry-run' option if you just want to see what would be executed."
3782 ;;
3783
3784 install)
3785 $ECHO \
3786 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
3787
3788 Install executables or libraries.
3789
3790 INSTALL-COMMAND is the installation command. The first component should be
3791 either the 'install' or 'cp' program.
3792
3793 The following components of INSTALL-COMMAND are treated specially:
3794
3795 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
3796
3797 The rest of the components are interpreted as arguments to that command (only
3798 BSD-compatible install options are recognized)."
3799 ;;
3800
3801 link)
3802 $ECHO \
3803 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
3804
3805 Link object files or libraries together to form another library, or to
3806 create an executable program.
3807
3808 LINK-COMMAND is a command using the C compiler that you would use to create
3809 a program from several object files.
3810
3811 The following components of LINK-COMMAND are treated specially:
3812
3813 -all-static do not do any dynamic linking at all
3814 -avoid-version do not add a version suffix if possible
3815 -bindir BINDIR specify path to binaries directory (for systems where
3816 libraries must be found in the PATH setting at runtime)
3817 -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
3818 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
3819 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
3820 -export-symbols SYMFILE
3821 try to export only the symbols listed in SYMFILE
3822 -export-symbols-regex REGEX
3823 try to export only the symbols matching REGEX
3824 -LLIBDIR search LIBDIR for required installed libraries
3825 -lNAME OUTPUT-FILE requires the installed library libNAME
3826 -module build a library that can dlopened
3827 -no-fast-install disable the fast-install mode
3828 -no-install link a not-installable executable
3829 -no-undefined declare that a library does not refer to external symbols
3830 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
3831 -objectlist FILE use a list of object files found in FILE to specify objects
3832 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
3833 -precious-files-regex REGEX
3834 don't remove output files matching REGEX
3835 -release RELEASE specify package release information
3836 -rpath LIBDIR the created library will eventually be installed in LIBDIR
3837 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
3838 -shared only do dynamic linking of libtool libraries
3839 -shrext SUFFIX override the standard shared library file extension
3840 -static do not do any dynamic linking of uninstalled libtool libraries
3841 -static-libtool-libs
3842 do not do any dynamic linking of libtool libraries
3843 -version-info CURRENT[:REVISION[:AGE]]
3844 specify library version info [each variable defaults to 0]
3845 -weak LIBNAME declare that the target provides the LIBNAME interface
3846 -Wc,FLAG
3847 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
3848 -Wl,FLAG
3849 -Xlinker FLAG pass linker-specific FLAG directly to the linker
3850 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
3851
3852 All other options (arguments beginning with '-') are ignored.
3853
3854 Every other argument is treated as a filename. Files ending in '.la' are
3855 treated as uninstalled libtool libraries, other files are standard or library
3856 object files.
3857
3858 If the OUTPUT-FILE ends in '.la', then a libtool library is created,
3859 only library objects ('.lo' files) may be specified, and '-rpath' is
3860 required, except when creating a convenience library.
3861
3862 If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
3863 using 'ar' and 'ranlib', or on Windows using 'lib'.
3864
3865 If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
3866 is created, otherwise an executable program is created."
3867 ;;
3868
3869 uninstall)
3870 $ECHO \
3871 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
3872
3873 Remove libraries from an installation directory.
3874
3875 RM is the name of the program to use to delete files associated with each FILE
3876 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
3877 to RM.
3878
3879 If FILE is a libtool library, all the files associated with it are deleted.
3880 Otherwise, only FILE itself is deleted using RM."
3881 ;;
3882
3883 *)
3884 func_fatal_help "invalid operation mode '$opt_mode'"
3885 ;;
3886 esac
3887
3888 echo
3889 $ECHO "Try '$progname --help' for more information about other modes."
3890 }
3891
3892 # Now that we've collected a possible --mode arg, show help if necessary
3893 if $opt_help; then
3894 if test : = "$opt_help"; then
3895 func_mode_help
3896 else
3897 {
3898 func_help noexit
3899 for opt_mode in compile link execute install finish uninstall clean; do
3900 func_mode_help
3901 done
3902 } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
3903 {
3904 func_help noexit
3905 for opt_mode in compile link execute install finish uninstall clean; do
3906 echo
3907 func_mode_help
3908 done
3909 } |
3910 $SED '1d
3911 /^When reporting/,/^Report/{
3912 H
3913 d
3914 }
3915 $x
3916 /information about other modes/d
3917 /more detailed .*MODE/d
3918 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
3919 fi
3920 exit $?
3921 fi
3922
3923
3924 # func_mode_execute arg...
3925 func_mode_execute ()
3926 {
3927 $debug_cmd
3928
3929 # The first argument is the command name.
3930 cmd=$nonopt
3931 test -z "$cmd" && \
3932 func_fatal_help "you must specify a COMMAND"
3933
3934 # Handle -dlopen flags immediately.
3935 for file in $opt_dlopen; do
3936 test -f "$file" \
3937 || func_fatal_help "'$file' is not a file"
3938
3939 dir=
3940 case $file in
3941 *.la)
3942 func_resolve_sysroot "$file"
3943 file=$func_resolve_sysroot_result
3944
3945 # Check to see that this really is a libtool archive.
3946 func_lalib_unsafe_p "$file" \
3947 || func_fatal_help "'$lib' is not a valid libtool archive"
3948
3949 # Read the libtool library.
3950 dlname=
3951 library_names=
3952 func_source "$file"
3953
3954 # Skip this library if it cannot be dlopened.
3955 if test -z "$dlname"; then
3956 # Warn if it was a shared library.
3957 test -n "$library_names" && \
3958 func_warning "'$file' was not linked with '-export-dynamic'"
3959 continue
3960 fi
3961
3962 func_dirname "$file" "" "."
3963 dir=$func_dirname_result
3964
3965 if test -f "$dir/$objdir/$dlname"; then
3966 func_append dir "/$objdir"
3967 else
3968 if test ! -f "$dir/$dlname"; then
3969 func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
3970 fi
3971 fi
3972 ;;
3973
3974 *.lo)
3975 # Just add the directory containing the .lo file.
3976 func_dirname "$file" "" "."
3977 dir=$func_dirname_result
3978 ;;
3979
3980 *)
3981 func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
3982 continue
3983 ;;
3984 esac
3985
3986 # Get the absolute pathname.
3987 absdir=`cd "$dir" && pwd`
3988 test -n "$absdir" && dir=$absdir
3989
3990 # Now add the directory to shlibpath_var.
3991 if eval "test -z \"\$$shlibpath_var\""; then
3992 eval "$shlibpath_var=\"\$dir\""
3993 else
3994 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
3995 fi
3996 done
3997
3998 # This variable tells wrapper scripts just to set shlibpath_var
3999 # rather than running their programs.
4000 libtool_execute_magic=$magic
4001
4002 # Check if any of the arguments is a wrapper script.
4003 args=
4004 for file
4005 do
4006 case $file in
4007 -* | *.la | *.lo ) ;;
4008 *)
4009 # Do a test to see if this is really a libtool program.
4010 if func_ltwrapper_script_p "$file"; then
4011 func_source "$file"
4012 # Transform arg to wrapped name.
4013 file=$progdir/$program
4014 elif func_ltwrapper_executable_p "$file"; then
4015 func_ltwrapper_scriptname "$file"
4016 func_source "$func_ltwrapper_scriptname_result"
4017 # Transform arg to wrapped name.
4018 file=$progdir/$program
4019 fi
4020 ;;
4021 esac
4022 # Quote arguments (to preserve shell metacharacters).
4023 func_append_quoted args "$file"
4024 done
4025
4026 if $opt_dry_run; then
4027 # Display what would be done.
4028 if test -n "$shlibpath_var"; then
4029 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
4030 echo "export $shlibpath_var"
4031 fi
4032 $ECHO "$cmd$args"
4033 exit $EXIT_SUCCESS
4034 else
4035 if test -n "$shlibpath_var"; then
4036 # Export the shlibpath_var.
4037 eval "export $shlibpath_var"
4038 fi
4039
4040 # Restore saved environment variables
4041 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
4042 do
4043 eval "if test \"\${save_$lt_var+set}\" = set; then
4044 $lt_var=\$save_$lt_var; export $lt_var
4045 else
4046 $lt_unset $lt_var
4047 fi"
4048 done
4049
4050 # Now prepare to actually exec the command.
4051 exec_cmd=\$cmd$args
4052 fi
4053 }
4054
4055 test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
4056
4057
4058 # func_mode_finish arg...
4059 func_mode_finish ()
4060 {
4061 $debug_cmd
4062
4063 libs=
4064 libdirs=
4065 admincmds=
4066
4067 for opt in "$nonopt" ${1+"$@"}
4068 do
4069 if test -d "$opt"; then
4070 func_append libdirs " $opt"
4071
4072 elif test -f "$opt"; then
4073 if func_lalib_unsafe_p "$opt"; then
4074 func_append libs " $opt"
4075 else
4076 func_warning "'$opt' is not a valid libtool archive"
4077 fi
4078
4079 else
4080 func_fatal_error "invalid argument '$opt'"
4081 fi
4082 done
4083
4084 if test -n "$libs"; then
4085 if test -n "$lt_sysroot"; then
4086 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
4087 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
4088 else
4089 sysroot_cmd=
4090 fi
4091
4092 # Remove sysroot references
4093 if $opt_dry_run; then
4094 for lib in $libs; do
4095 echo "removing references to $lt_sysroot and '=' prefixes from $lib"
4096 done
4097 else
4098 tmpdir=`func_mktempdir`
4099 for lib in $libs; do
4100 $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
4101 > $tmpdir/tmp-la
4102 mv -f $tmpdir/tmp-la $lib
4103 done
4104 ${RM}r "$tmpdir"
4105 fi
4106 fi
4107
4108 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4109 for libdir in $libdirs; do
4110 if test -n "$finish_cmds"; then
4111 # Do each command in the finish commands.
4112 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
4113 '"$cmd"'"'
4114 fi
4115 if test -n "$finish_eval"; then
4116 # Do the single finish_eval.
4117 eval cmds=\"$finish_eval\"
4118 $opt_dry_run || eval "$cmds" || func_append admincmds "
4119 $cmds"
4120 fi
4121 done
4122 fi
4123
4124 # Exit here if they wanted silent mode.
4125 $opt_quiet && exit $EXIT_SUCCESS
4126
4127 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4128 echo "----------------------------------------------------------------------"
4129 echo "Libraries have been installed in:"
4130 for libdir in $libdirs; do
4131 $ECHO " $libdir"
4132 done
4133 echo
4134 echo "If you ever happen to want to link against installed libraries"
4135 echo "in a given directory, LIBDIR, you must either use libtool, and"
4136 echo "specify the full pathname of the library, or use the '-LLIBDIR'"
4137 echo "flag during linking and do at least one of the following:"
4138 if test -n "$shlibpath_var"; then
4139 echo " - add LIBDIR to the '$shlibpath_var' environment variable"
4140 echo " during execution"
4141 fi
4142 if test -n "$runpath_var"; then
4143 echo " - add LIBDIR to the '$runpath_var' environment variable"
4144 echo " during linking"
4145 fi
4146 if test -n "$hardcode_libdir_flag_spec"; then
4147 libdir=LIBDIR
4148 eval flag=\"$hardcode_libdir_flag_spec\"
4149
4150 $ECHO " - use the '$flag' linker flag"
4151 fi
4152 if test -n "$admincmds"; then
4153 $ECHO " - have your system administrator run these commands:$admincmds"
4154 fi
4155 if test -f /etc/ld.so.conf; then
4156 echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
4157 fi
4158 echo
4159
4160 echo "See any operating system documentation about shared libraries for"
4161 case $host in
4162 solaris2.[6789]|solaris2.1[0-9])
4163 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
4164 echo "pages."
4165 ;;
4166 *)
4167 echo "more information, such as the ld(1) and ld.so(8) manual pages."
4168 ;;
4169 esac
4170 echo "----------------------------------------------------------------------"
4171 fi
4172 exit $EXIT_SUCCESS
4173 }
4174
4175 test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
4176
4177
4178 # func_mode_install arg...
4179 func_mode_install ()
4180 {
4181 $debug_cmd
4182
4183 # There may be an optional sh(1) argument at the beginning of
4184 # install_prog (especially on Windows NT).
4185 if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
4186 # Allow the use of GNU shtool's install command.
4187 case $nonopt in *shtool*) :;; *) false;; esac
4188 then
4189 # Aesthetically quote it.
4190 func_quote_for_eval "$nonopt"
4191 install_prog="$func_quote_for_eval_result "
4192 arg=$1
4193 shift
4194 else
4195 install_prog=
4196 arg=$nonopt
4197 fi
4198
4199 # The real first argument should be the name of the installation program.
4200 # Aesthetically quote it.
4201 func_quote_for_eval "$arg"
4202 func_append install_prog "$func_quote_for_eval_result"
4203 install_shared_prog=$install_prog
4204 case " $install_prog " in
4205 *[\\\ /]cp\ *) install_cp=: ;;
4206 *) install_cp=false ;;
4207 esac
4208
4209 # We need to accept at least all the BSD install flags.
4210 dest=
4211 files=
4212 opts=
4213 prev=
4214 install_type=
4215 isdir=false
4216 stripme=
4217 no_mode=:
4218 for arg
4219 do
4220 arg2=
4221 if test -n "$dest"; then
4222 func_append files " $dest"
4223 dest=$arg
4224 continue
4225 fi
4226
4227 case $arg in
4228 -d) isdir=: ;;
4229 -f)
4230 if $install_cp; then :; else
4231 prev=$arg
4232 fi
4233 ;;
4234 -g | -m | -o)
4235 prev=$arg
4236 ;;
4237 -s)
4238 stripme=" -s"
4239 continue
4240 ;;
4241 -*)
4242 ;;
4243 *)
4244 # If the previous option needed an argument, then skip it.
4245 if test -n "$prev"; then
4246 if test X-m = "X$prev" && test -n "$install_override_mode"; then
4247 arg2=$install_override_mode
4248 no_mode=false
4249 fi
4250 prev=
4251 else
4252 dest=$arg
4253 continue
4254 fi
4255 ;;
4256 esac
4257
4258 # Aesthetically quote the argument.
4259 func_quote_for_eval "$arg"
4260 func_append install_prog " $func_quote_for_eval_result"
4261 if test -n "$arg2"; then
4262 func_quote_for_eval "$arg2"
4263 fi
4264 func_append install_shared_prog " $func_quote_for_eval_result"
4265 done
4266
4267 test -z "$install_prog" && \
4268 func_fatal_help "you must specify an install program"
4269
4270 test -n "$prev" && \
4271 func_fatal_help "the '$prev' option requires an argument"
4272
4273 if test -n "$install_override_mode" && $no_mode; then
4274 if $install_cp; then :; else
4275 func_quote_for_eval "$install_override_mode"
4276 func_append install_shared_prog " -m $func_quote_for_eval_result"
4277 fi
4278 fi
4279
4280 if test -z "$files"; then
4281 if test -z "$dest"; then
4282 func_fatal_help "no file or destination specified"
4283 else
4284 func_fatal_help "you must specify a destination"
4285 fi
4286 fi
4287
4288 # Strip any trailing slash from the destination.
4289 func_stripname '' '/' "$dest"
4290 dest=$func_stripname_result
4291
4292 # Check to see that the destination is a directory.
4293 test -d "$dest" && isdir=:
4294 if $isdir; then
4295 destdir=$dest
4296 destname=
4297 else
4298 func_dirname_and_basename "$dest" "" "."
4299 destdir=$func_dirname_result
4300 destname=$func_basename_result
4301
4302 # Not a directory, so check to see that there is only one file specified.
4303 set dummy $files; shift
4304 test "$#" -gt 1 && \
4305 func_fatal_help "'$dest' is not a directory"
4306 fi
4307 case $destdir in
4308 [\\/]* | [A-Za-z]:[\\/]*) ;;
4309 *)
4310 for file in $files; do
4311 case $file in
4312 *.lo) ;;
4313 *)
4314 func_fatal_help "'$destdir' must be an absolute directory name"
4315 ;;
4316 esac
4317 done
4318 ;;
4319 esac
4320
4321 # This variable tells wrapper scripts just to set variables rather
4322 # than running their programs.
4323 libtool_install_magic=$magic
4324
4325 staticlibs=
4326 future_libdirs=
4327 current_libdirs=
4328 for file in $files; do
4329
4330 # Do each installation.
4331 case $file in
4332 *.$libext)
4333 # Do the static libraries later.
4334 func_append staticlibs " $file"
4335 ;;
4336
4337 *.la)
4338 func_resolve_sysroot "$file"
4339 file=$func_resolve_sysroot_result
4340
4341 # Check to see that this really is a libtool archive.
4342 func_lalib_unsafe_p "$file" \
4343 || func_fatal_help "'$file' is not a valid libtool archive"
4344
4345 library_names=
4346 old_library=
4347 relink_command=
4348 func_source "$file"
4349
4350 # Add the libdir to current_libdirs if it is the destination.
4351 if test "X$destdir" = "X$libdir"; then
4352 case "$current_libdirs " in
4353 *" $libdir "*) ;;
4354 *) func_append current_libdirs " $libdir" ;;
4355 esac
4356 else
4357 # Note the libdir as a future libdir.
4358 case "$future_libdirs " in
4359 *" $libdir "*) ;;
4360 *) func_append future_libdirs " $libdir" ;;
4361 esac
4362 fi
4363
4364 func_dirname "$file" "/" ""
4365 dir=$func_dirname_result
4366 func_append dir "$objdir"
4367
4368 if test -n "$relink_command"; then
4369 # Determine the prefix the user has applied to our future dir.
4370 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
4371
4372 # Don't allow the user to place us outside of our expected
4373 # location b/c this prevents finding dependent libraries that
4374 # are installed to the same prefix.
4375 # At present, this check doesn't affect windows .dll's that
4376 # are installed into $libdir/../bin (currently, that works fine)
4377 # but it's something to keep an eye on.
4378 test "$inst_prefix_dir" = "$destdir" && \
4379 func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
4380
4381 if test -n "$inst_prefix_dir"; then
4382 # Stick the inst_prefix_dir data into the link command.
4383 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
4384 else
4385 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
4386 fi
4387
4388 func_warning "relinking '$file'"
4389 func_show_eval "$relink_command" \
4390 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
4391 fi
4392
4393 # See the names of the shared library.
4394 set dummy $library_names; shift
4395 if test -n "$1"; then
4396 realname=$1
4397 shift
4398
4399 srcname=$realname
4400 test -n "$relink_command" && srcname=${realname}T
4401
4402 # Install the shared library and build the symlinks.
4403 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
4404 'exit $?'
4405 tstripme=$stripme
4406 case $host_os in
4407 cygwin* | mingw* | pw32* | cegcc*)
4408 case $realname in
4409 *.dll.a)
4410 tstripme=
4411 ;;
4412 esac
4413 ;;
4414 os2*)
4415 case $realname in
4416 *_dll.a)
4417 tstripme=
4418 ;;
4419 esac
4420 ;;
4421 esac
4422 if test -n "$tstripme" && test -n "$striplib"; then
4423 func_show_eval "$striplib $destdir/$realname" 'exit $?'
4424 fi
4425
4426 if test "$#" -gt 0; then
4427 # Delete the old symlinks, and create new ones.
4428 # Try 'ln -sf' first, because the 'ln' binary might depend on
4429 # the symlink we replace! Solaris /bin/ln does not understand -f,
4430 # so we also need to try rm && ln -s.
4431 for linkname
4432 do
4433 test "$linkname" != "$realname" \
4434 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
4435 done
4436 fi
4437
4438 # Do each command in the postinstall commands.
4439 lib=$destdir/$realname
4440 func_execute_cmds "$postinstall_cmds" 'exit $?'
4441 fi
4442
4443 # Install the pseudo-library for information purposes.
4444 func_basename "$file"
4445 name=$func_basename_result
4446 instname=$dir/${name}i
4447 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
4448
4449 # Maybe install the static library, too.
4450 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
4451 ;;
4452
4453 *.lo)
4454 # Install (i.e. copy) a libtool object.
4455
4456 # Figure out destination file name, if it wasn't already specified.
4457 if test -n "$destname"; then
4458 destfile=$destdir/$destname
4459 else
4460 func_basename "$file"
4461 destfile=$func_basename_result
4462 destfile=$destdir/$destfile
4463 fi
4464
4465 # Deduce the name of the destination old-style object file.
4466 case $destfile in
4467 *.lo)
4468 func_lo2o "$destfile"
4469 staticdest=$func_lo2o_result
4470 ;;
4471 *.$objext)
4472 staticdest=$destfile
4473 destfile=
4474 ;;
4475 *)
4476 func_fatal_help "cannot copy a libtool object to '$destfile'"
4477 ;;
4478 esac
4479
4480 # Install the libtool object if requested.
4481 test -n "$destfile" && \
4482 func_show_eval "$install_prog $file $destfile" 'exit $?'
4483
4484 # Install the old object if enabled.
4485 if test yes = "$build_old_libs"; then
4486 # Deduce the name of the old-style object file.
4487 func_lo2o "$file"
4488 staticobj=$func_lo2o_result
4489 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
4490 fi
4491 exit $EXIT_SUCCESS
4492 ;;
4493
4494 *)
4495 # Figure out destination file name, if it wasn't already specified.
4496 if test -n "$destname"; then
4497 destfile=$destdir/$destname
4498 else
4499 func_basename "$file"
4500 destfile=$func_basename_result
4501 destfile=$destdir/$destfile
4502 fi
4503
4504 # If the file is missing, and there is a .exe on the end, strip it
4505 # because it is most likely a libtool script we actually want to
4506 # install
4507 stripped_ext=
4508 case $file in
4509 *.exe)
4510 if test ! -f "$file"; then
4511 func_stripname '' '.exe' "$file"
4512 file=$func_stripname_result
4513 stripped_ext=.exe
4514 fi
4515 ;;
4516 esac
4517
4518 # Do a test to see if this is really a libtool program.
4519 case $host in
4520 *cygwin* | *mingw*)
4521 if func_ltwrapper_executable_p "$file"; then
4522 func_ltwrapper_scriptname "$file"
4523 wrapper=$func_ltwrapper_scriptname_result
4524 else
4525 func_stripname '' '.exe' "$file"
4526 wrapper=$func_stripname_result
4527 fi
4528 ;;
4529 *)
4530 wrapper=$file
4531 ;;
4532 esac
4533 if func_ltwrapper_script_p "$wrapper"; then
4534 notinst_deplibs=
4535 relink_command=
4536
4537 func_source "$wrapper"
4538
4539 # Check the variables that should have been set.
4540 test -z "$generated_by_libtool_version" && \
4541 func_fatal_error "invalid libtool wrapper script '$wrapper'"
4542
4543 finalize=:
4544 for lib in $notinst_deplibs; do
4545 # Check to see that each library is installed.
4546 libdir=
4547 if test -f "$lib"; then
4548 func_source "$lib"
4549 fi
4550 libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
4551 if test -n "$libdir" && test ! -f "$libfile"; then
4552 func_warning "'$lib' has not been installed in '$libdir'"
4553 finalize=false
4554 fi
4555 done
4556
4557 relink_command=
4558 func_source "$wrapper"
4559
4560 outputname=
4561 if test no = "$fast_install" && test -n "$relink_command"; then
4562 $opt_dry_run || {
4563 if $finalize; then
4564 tmpdir=`func_mktempdir`
4565 func_basename "$file$stripped_ext"
4566 file=$func_basename_result
4567 outputname=$tmpdir/$file
4568 # Replace the output file specification.
4569 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
4570
4571 $opt_quiet || {
4572 func_quote_for_expand "$relink_command"
4573 eval "func_echo $func_quote_for_expand_result"
4574 }
4575 if eval "$relink_command"; then :
4576 else
4577 func_error "error: relink '$file' with the above command before installing it"
4578 $opt_dry_run || ${RM}r "$tmpdir"
4579 continue
4580 fi
4581 file=$outputname
4582 else
4583 func_warning "cannot relink '$file'"
4584 fi
4585 }
4586 else
4587 # Install the binary that we compiled earlier.
4588 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
4589 fi
4590 fi
4591
4592 # remove .exe since cygwin /usr/bin/install will append another
4593 # one anyway
4594 case $install_prog,$host in
4595 */usr/bin/install*,*cygwin*)
4596 case $file:$destfile in
4597 *.exe:*.exe)
4598 # this is ok
4599 ;;
4600 *.exe:*)
4601 destfile=$destfile.exe
4602 ;;
4603 *:*.exe)
4604 func_stripname '' '.exe' "$destfile"
4605 destfile=$func_stripname_result
4606 ;;
4607 esac
4608 ;;
4609 esac
4610 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
4611 $opt_dry_run || if test -n "$outputname"; then
4612 ${RM}r "$tmpdir"
4613 fi
4614 ;;
4615 esac
4616 done
4617
4618 for file in $staticlibs; do
4619 func_basename "$file"
4620 name=$func_basename_result
4621
4622 # Set up the ranlib parameters.
4623 oldlib=$destdir/$name
4624 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
4625 tool_oldlib=$func_to_tool_file_result
4626
4627 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
4628
4629 if test -n "$stripme" && test -n "$old_striplib"; then
4630 func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
4631 fi
4632
4633 # Do each command in the postinstall commands.
4634 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
4635 done
4636
4637 test -n "$future_libdirs" && \
4638 func_warning "remember to run '$progname --finish$future_libdirs'"
4639
4640 if test -n "$current_libdirs"; then
4641 # Maybe just do a dry run.
4642 $opt_dry_run && current_libdirs=" -n$current_libdirs"
4643 exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
4644 else
4645 exit $EXIT_SUCCESS
4646 fi
4647 }
4648
4649 test install = "$opt_mode" && func_mode_install ${1+"$@"}
4650
4651
4652 # func_generate_dlsyms outputname originator pic_p
4653 # Extract symbols from dlprefiles and create ${outputname}S.o with
4654 # a dlpreopen symbol table.
4655 func_generate_dlsyms ()
4656 {
4657 $debug_cmd
4658
4659 my_outputname=$1
4660 my_originator=$2
4661 my_pic_p=${3-false}
4662 my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
4663 my_dlsyms=
4664
4665 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
4666 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4667 my_dlsyms=${my_outputname}S.c
4668 else
4669 func_error "not configured to extract global symbols from dlpreopened files"
4670 fi
4671 fi
4672
4673 if test -n "$my_dlsyms"; then
4674 case $my_dlsyms in
4675 "") ;;
4676 *.c)
4677 # Discover the nlist of each of the dlfiles.
4678 nlist=$output_objdir/$my_outputname.nm
4679
4680 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
4681
4682 # Parse the name list into a source file.
4683 func_verbose "creating $output_objdir/$my_dlsyms"
4684
4685 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
4686 /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
4687 /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
4688
4689 #ifdef __cplusplus
4690 extern \"C\" {
4691 #endif
4692
4693 #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
4694 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
4695 #endif
4696
4697 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4698 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4699 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4700 relocations are performed -- see ld's documentation on pseudo-relocs. */
4701 # define LT_DLSYM_CONST
4702 #elif defined __osf__
4703 /* This system does not cope well with relocations in const data. */
4704 # define LT_DLSYM_CONST
4705 #else
4706 # define LT_DLSYM_CONST const
4707 #endif
4708
4709 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
4710
4711 /* External symbol declarations for the compiler. */\
4712 "
4713
4714 if test yes = "$dlself"; then
4715 func_verbose "generating symbol list for '$output'"
4716
4717 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
4718
4719 # Add our own program objects to the symbol list.
4720 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
4721 for progfile in $progfiles; do
4722 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
4723 func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
4724 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
4725 done
4726
4727 if test -n "$exclude_expsyms"; then
4728 $opt_dry_run || {
4729 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4730 eval '$MV "$nlist"T "$nlist"'
4731 }
4732 fi
4733
4734 if test -n "$export_symbols_regex"; then
4735 $opt_dry_run || {
4736 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4737 eval '$MV "$nlist"T "$nlist"'
4738 }
4739 fi
4740
4741 # Prepare the list of exported symbols
4742 if test -z "$export_symbols"; then
4743 export_symbols=$output_objdir/$outputname.exp
4744 $opt_dry_run || {
4745 $RM $export_symbols
4746 eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4747 case $host in
4748 *cygwin* | *mingw* | *cegcc* )
4749 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4750 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4751 ;;
4752 esac
4753 }
4754 else
4755 $opt_dry_run || {
4756 eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4757 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4758 eval '$MV "$nlist"T "$nlist"'
4759 case $host in
4760 *cygwin* | *mingw* | *cegcc* )
4761 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4762 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4763 ;;
4764 esac
4765 }
4766 fi
4767 fi
4768
4769 for dlprefile in $dlprefiles; do
4770 func_verbose "extracting global C symbols from '$dlprefile'"
4771 func_basename "$dlprefile"
4772 name=$func_basename_result
4773 case $host in
4774 *cygwin* | *mingw* | *cegcc* )
4775 # if an import library, we need to obtain dlname
4776 if func_win32_import_lib_p "$dlprefile"; then
4777 func_tr_sh "$dlprefile"
4778 eval "curr_lafile=\$libfile_$func_tr_sh_result"
4779 dlprefile_dlbasename=
4780 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
4781 # Use subshell, to avoid clobbering current variable values
4782 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
4783 if test -n "$dlprefile_dlname"; then
4784 func_basename "$dlprefile_dlname"
4785 dlprefile_dlbasename=$func_basename_result
4786 else
4787 # no lafile. user explicitly requested -dlpreopen <import library>.
4788 $sharedlib_from_linklib_cmd "$dlprefile"
4789 dlprefile_dlbasename=$sharedlib_from_linklib_result
4790 fi
4791 fi
4792 $opt_dry_run || {
4793 if test -n "$dlprefile_dlbasename"; then
4794 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
4795 else
4796 func_warning "Could not compute DLL name from $name"
4797 eval '$ECHO ": $name " >> "$nlist"'
4798 fi
4799 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4800 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
4801 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
4802 }
4803 else # not an import lib
4804 $opt_dry_run || {
4805 eval '$ECHO ": $name " >> "$nlist"'
4806 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4807 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
4808 }
4809 fi
4810 ;;
4811 *)
4812 $opt_dry_run || {
4813 eval '$ECHO ": $name " >> "$nlist"'
4814 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4815 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
4816 }
4817 ;;
4818 esac
4819 done
4820
4821 $opt_dry_run || {
4822 # Make sure we have at least an empty file.
4823 test -f "$nlist" || : > "$nlist"
4824
4825 if test -n "$exclude_expsyms"; then
4826 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4827 $MV "$nlist"T "$nlist"
4828 fi
4829
4830 # Try sorting and uniquifying the output.
4831 if $GREP -v "^: " < "$nlist" |
4832 if sort -k 3 </dev/null >/dev/null 2>&1; then
4833 sort -k 3
4834 else
4835 sort +2
4836 fi |
4837 uniq > "$nlist"S; then
4838 :
4839 else
4840 $GREP -v "^: " < "$nlist" > "$nlist"S
4841 fi
4842
4843 if test -f "$nlist"S; then
4844 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
4845 else
4846 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
4847 fi
4848
4849 func_show_eval '$RM "${nlist}I"'
4850 if test -n "$global_symbol_to_import"; then
4851 eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
4852 fi
4853
4854 echo >> "$output_objdir/$my_dlsyms" "\
4855
4856 /* The mapping between symbol names and symbols. */
4857 typedef struct {
4858 const char *name;
4859 void *address;
4860 } lt_dlsymlist;
4861 extern LT_DLSYM_CONST lt_dlsymlist
4862 lt_${my_prefix}_LTX_preloaded_symbols[];\
4863 "
4864
4865 if test -s "$nlist"I; then
4866 echo >> "$output_objdir/$my_dlsyms" "\
4867 static void lt_syminit(void)
4868 {
4869 LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
4870 for (; symbol->name; ++symbol)
4871 {"
4872 $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
4873 echo >> "$output_objdir/$my_dlsyms" "\
4874 }
4875 }"
4876 fi
4877 echo >> "$output_objdir/$my_dlsyms" "\
4878 LT_DLSYM_CONST lt_dlsymlist
4879 lt_${my_prefix}_LTX_preloaded_symbols[] =
4880 { {\"$my_originator\", (void *) 0},"
4881
4882 if test -s "$nlist"I; then
4883 echo >> "$output_objdir/$my_dlsyms" "\
4884 {\"@INIT@\", (void *) &lt_syminit},"
4885 fi
4886
4887 case $need_lib_prefix in
4888 no)
4889 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
4890 ;;
4891 *)
4892 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
4893 ;;
4894 esac
4895 echo >> "$output_objdir/$my_dlsyms" "\
4896 {0, (void *) 0}
4897 };
4898
4899 /* This works around a problem in FreeBSD linker */
4900 #ifdef FREEBSD_WORKAROUND
4901 static const void *lt_preloaded_setup() {
4902 return lt_${my_prefix}_LTX_preloaded_symbols;
4903 }
4904 #endif
4905
4906 #ifdef __cplusplus
4907 }
4908 #endif\
4909 "
4910 } # !$opt_dry_run
4911
4912 pic_flag_for_symtable=
4913 case "$compile_command " in
4914 *" -static "*) ;;
4915 *)
4916 case $host in
4917 # compiling the symbol table file with pic_flag works around
4918 # a FreeBSD bug that causes programs to crash when -lm is
4919 # linked before any other PIC object. But we must not use
4920 # pic_flag when linking with -static. The problem exists in
4921 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4922 *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4923 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
4924 *-*-hpux*)
4925 pic_flag_for_symtable=" $pic_flag" ;;
4926 *)
4927 $my_pic_p && pic_flag_for_symtable=" $pic_flag"
4928 ;;
4929 esac
4930 ;;
4931 esac
4932 symtab_cflags=
4933 for arg in $LTCFLAGS; do
4934 case $arg in
4935 -pie | -fpie | -fPIE) ;;
4936 *) func_append symtab_cflags " $arg" ;;
4937 esac
4938 done
4939
4940 # Now compile the dynamic symbol file.
4941 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
4942
4943 # Clean up the generated files.
4944 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
4945
4946 # Transform the symbol file into the correct name.
4947 symfileobj=$output_objdir/${my_outputname}S.$objext
4948 case $host in
4949 *cygwin* | *mingw* | *cegcc* )
4950 if test -f "$output_objdir/$my_outputname.def"; then
4951 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
4952 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
4953 else
4954 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4955 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4956 fi
4957 ;;
4958 *)
4959 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4960 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4961 ;;
4962 esac
4963 ;;
4964 *)
4965 func_fatal_error "unknown suffix for '$my_dlsyms'"
4966 ;;
4967 esac
4968 else
4969 # We keep going just in case the user didn't refer to
4970 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4971 # really was required.
4972
4973 # Nullify the symbol file.
4974 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
4975 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
4976 fi
4977 }
4978
4979 # func_cygming_gnu_implib_p ARG
4980 # This predicate returns with zero status (TRUE) if
4981 # ARG is a GNU/binutils-style import library. Returns
4982 # with nonzero status (FALSE) otherwise.
4983 func_cygming_gnu_implib_p ()
4984 {
4985 $debug_cmd
4986
4987 func_to_tool_file "$1" func_convert_file_msys_to_w32
4988 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)$'`
4989 test -n "$func_cygming_gnu_implib_tmp"
4990 }
4991
4992 # func_cygming_ms_implib_p ARG
4993 # This predicate returns with zero status (TRUE) if
4994 # ARG is an MS-style import library. Returns
4995 # with nonzero status (FALSE) otherwise.
4996 func_cygming_ms_implib_p ()
4997 {
4998 $debug_cmd
4999
5000 func_to_tool_file "$1" func_convert_file_msys_to_w32
5001 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
5002 test -n "$func_cygming_ms_implib_tmp"
5003 }
5004
5005 # func_win32_libid arg
5006 # return the library type of file 'arg'
5007 #
5008 # Need a lot of goo to handle *both* DLLs and import libs
5009 # Has to be a shell function in order to 'eat' the argument
5010 # that is supplied when $file_magic_command is called.
5011 # Despite the name, also deal with 64 bit binaries.
5012 func_win32_libid ()
5013 {
5014 $debug_cmd
5015
5016 win32_libid_type=unknown
5017 win32_fileres=`file -L $1 2>/dev/null`
5018 case $win32_fileres in
5019 *ar\ archive\ import\ library*) # definitely import
5020 win32_libid_type="x86 archive import"
5021 ;;
5022 *ar\ archive*) # could be an import, or static
5023 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
5024 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
5025 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
5026 case $nm_interface in
5027 "MS dumpbin")
5028 if func_cygming_ms_implib_p "$1" ||
5029 func_cygming_gnu_implib_p "$1"
5030 then
5031 win32_nmres=import
5032 else
5033 win32_nmres=
5034 fi
5035 ;;
5036 *)
5037 func_to_tool_file "$1" func_convert_file_msys_to_w32
5038 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
5039 $SED -n -e '
5040 1,100{
5041 / I /{
5042 s|.*|import|
5043 p
5044 q
5045 }
5046 }'`
5047 ;;
5048 esac
5049 case $win32_nmres in
5050 import*) win32_libid_type="x86 archive import";;
5051 *) win32_libid_type="x86 archive static";;
5052 esac
5053 fi
5054 ;;
5055 *DLL*)
5056 win32_libid_type="x86 DLL"
5057 ;;
5058 *executable*) # but shell scripts are "executable" too...
5059 case $win32_fileres in
5060 *MS\ Windows\ PE\ Intel*)
5061 win32_libid_type="x86 DLL"
5062 ;;
5063 esac
5064 ;;
5065 esac
5066 $ECHO "$win32_libid_type"
5067 }
5068
5069 # func_cygming_dll_for_implib ARG
5070 #
5071 # Platform-specific function to extract the
5072 # name of the DLL associated with the specified
5073 # import library ARG.
5074 # Invoked by eval'ing the libtool variable
5075 # $sharedlib_from_linklib_cmd
5076 # Result is available in the variable
5077 # $sharedlib_from_linklib_result
5078 func_cygming_dll_for_implib ()
5079 {
5080 $debug_cmd
5081
5082 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
5083 }
5084
5085 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
5086 #
5087 # The is the core of a fallback implementation of a
5088 # platform-specific function to extract the name of the
5089 # DLL associated with the specified import library LIBNAME.
5090 #
5091 # SECTION_NAME is either .idata$6 or .idata$7, depending
5092 # on the platform and compiler that created the implib.
5093 #
5094 # Echos the name of the DLL associated with the
5095 # specified import library.
5096 func_cygming_dll_for_implib_fallback_core ()
5097 {
5098 $debug_cmd
5099
5100 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
5101 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
5102 $SED '/^Contents of section '"$match_literal"':/{
5103 # Place marker at beginning of archive member dllname section
5104 s/.*/====MARK====/
5105 p
5106 d
5107 }
5108 # These lines can sometimes be longer than 43 characters, but
5109 # are always uninteresting
5110 /:[ ]*file format pe[i]\{,1\}-/d
5111 /^In archive [^:]*:/d
5112 # Ensure marker is printed
5113 /^====MARK====/p
5114 # Remove all lines with less than 43 characters
5115 /^.\{43\}/!d
5116 # From remaining lines, remove first 43 characters
5117 s/^.\{43\}//' |
5118 $SED -n '
5119 # Join marker and all lines until next marker into a single line
5120 /^====MARK====/ b para
5121 H
5122 $ b para
5123 b
5124 :para
5125 x
5126 s/\n//g
5127 # Remove the marker
5128 s/^====MARK====//
5129 # Remove trailing dots and whitespace
5130 s/[\. \t]*$//
5131 # Print
5132 /./p' |
5133 # we now have a list, one entry per line, of the stringified
5134 # contents of the appropriate section of all members of the
5135 # archive that possess that section. Heuristic: eliminate
5136 # all those that have a first or second character that is
5137 # a '.' (that is, objdump's representation of an unprintable
5138 # character.) This should work for all archives with less than
5139 # 0x302f exports -- but will fail for DLLs whose name actually
5140 # begins with a literal '.' or a single character followed by
5141 # a '.'.
5142 #
5143 # Of those that remain, print the first one.
5144 $SED -e '/^\./d;/^.\./d;q'
5145 }
5146
5147 # func_cygming_dll_for_implib_fallback ARG
5148 # Platform-specific function to extract the
5149 # name of the DLL associated with the specified
5150 # import library ARG.
5151 #
5152 # This fallback implementation is for use when $DLLTOOL
5153 # does not support the --identify-strict option.
5154 # Invoked by eval'ing the libtool variable
5155 # $sharedlib_from_linklib_cmd
5156 # Result is available in the variable
5157 # $sharedlib_from_linklib_result
5158 func_cygming_dll_for_implib_fallback ()
5159 {
5160 $debug_cmd
5161
5162 if func_cygming_gnu_implib_p "$1"; then
5163 # binutils import library
5164 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
5165 elif func_cygming_ms_implib_p "$1"; then
5166 # ms-generated import library
5167 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
5168 else
5169 # unknown
5170 sharedlib_from_linklib_result=
5171 fi
5172 }
5173
5174
5175 # func_extract_an_archive dir oldlib
5176 func_extract_an_archive ()
5177 {
5178 $debug_cmd
5179
5180 f_ex_an_ar_dir=$1; shift
5181 f_ex_an_ar_oldlib=$1
5182 if test yes = "$lock_old_archive_extraction"; then
5183 lockfile=$f_ex_an_ar_oldlib.lock
5184 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
5185 func_echo "Waiting for $lockfile to be removed"
5186 sleep 2
5187 done
5188 fi
5189 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
5190 'stat=$?; rm -f "$lockfile"; exit $stat'
5191 if test yes = "$lock_old_archive_extraction"; then
5192 $opt_dry_run || rm -f "$lockfile"
5193 fi
5194 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
5195 :
5196 else
5197 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
5198 fi
5199 }
5200
5201
5202 # func_extract_archives gentop oldlib ...
5203 func_extract_archives ()
5204 {
5205 $debug_cmd
5206
5207 my_gentop=$1; shift
5208 my_oldlibs=${1+"$@"}
5209 my_oldobjs=
5210 my_xlib=
5211 my_xabs=
5212 my_xdir=
5213
5214 for my_xlib in $my_oldlibs; do
5215 # Extract the objects.
5216 case $my_xlib in
5217 [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
5218 *) my_xabs=`pwd`"/$my_xlib" ;;
5219 esac
5220 func_basename "$my_xlib"
5221 my_xlib=$func_basename_result
5222 my_xlib_u=$my_xlib
5223 while :; do
5224 case " $extracted_archives " in
5225 *" $my_xlib_u "*)
5226 func_arith $extracted_serial + 1
5227 extracted_serial=$func_arith_result
5228 my_xlib_u=lt$extracted_serial-$my_xlib ;;
5229 *) break ;;
5230 esac
5231 done
5232 extracted_archives="$extracted_archives $my_xlib_u"
5233 my_xdir=$my_gentop/$my_xlib_u
5234
5235 func_mkdir_p "$my_xdir"
5236
5237 case $host in
5238 *-darwin*)
5239 func_verbose "Extracting $my_xabs"
5240 # Do not bother doing anything if just a dry run
5241 $opt_dry_run || {
5242 darwin_orig_dir=`pwd`
5243 cd $my_xdir || exit $?
5244 darwin_archive=$my_xabs
5245 darwin_curdir=`pwd`
5246 func_basename "$darwin_archive"
5247 darwin_base_archive=$func_basename_result
5248 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
5249 if test -n "$darwin_arches"; then
5250 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
5251 darwin_arch=
5252 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
5253 for darwin_arch in $darwin_arches; do
5254 func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
5255 $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
5256 cd "unfat-$$/$darwin_base_archive-$darwin_arch"
5257 func_extract_an_archive "`pwd`" "$darwin_base_archive"
5258 cd "$darwin_curdir"
5259 $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
5260 done # $darwin_arches
5261 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
5262 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
5263 darwin_file=
5264 darwin_files=
5265 for darwin_file in $darwin_filelist; do
5266 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
5267 $LIPO -create -output "$darwin_file" $darwin_files
5268 done # $darwin_filelist
5269 $RM -rf unfat-$$
5270 cd "$darwin_orig_dir"
5271 else
5272 cd $darwin_orig_dir
5273 func_extract_an_archive "$my_xdir" "$my_xabs"
5274 fi # $darwin_arches
5275 } # !$opt_dry_run
5276 ;;
5277 *)
5278 func_extract_an_archive "$my_xdir" "$my_xabs"
5279 ;;
5280 esac
5281 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
5282 done
5283
5284 func_extract_archives_result=$my_oldobjs
5285 }
5286
5287
5288 # func_emit_wrapper [arg=no]
5289 #
5290 # Emit a libtool wrapper script on stdout.
5291 # Don't directly open a file because we may want to
5292 # incorporate the script contents within a cygwin/mingw
5293 # wrapper executable. Must ONLY be called from within
5294 # func_mode_link because it depends on a number of variables
5295 # set therein.
5296 #
5297 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
5298 # variable will take. If 'yes', then the emitted script
5299 # will assume that the directory where it is stored is
5300 # the $objdir directory. This is a cygwin/mingw-specific
5301 # behavior.
5302 func_emit_wrapper ()
5303 {
5304 func_emit_wrapper_arg1=${1-no}
5305
5306 $ECHO "\
5307 #! $SHELL
5308
5309 # $output - temporary wrapper script for $objdir/$outputname
5310 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
5311 #
5312 # The $output program cannot be directly executed until all the libtool
5313 # libraries that it depends on are installed.
5314 #
5315 # This wrapper script should never be moved out of the build directory.
5316 # If it is, it will not operate correctly.
5317
5318 # Sed substitution that helps us do robust quoting. It backslashifies
5319 # metacharacters that are still active within double-quoted strings.
5320 sed_quote_subst='$sed_quote_subst'
5321
5322 # Be Bourne compatible
5323 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5324 emulate sh
5325 NULLCMD=:
5326 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5327 # is contrary to our usage. Disable this feature.
5328 alias -g '\${1+\"\$@\"}'='\"\$@\"'
5329 setopt NO_GLOB_SUBST
5330 else
5331 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5332 fi
5333 BIN_SH=xpg4; export BIN_SH # for Tru64
5334 DUALCASE=1; export DUALCASE # for MKS sh
5335
5336 # The HP-UX ksh and POSIX shell print the target directory to stdout
5337 # if CDPATH is set.
5338 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5339
5340 relink_command=\"$relink_command\"
5341
5342 # This environment variable determines our operation mode.
5343 if test \"\$libtool_install_magic\" = \"$magic\"; then
5344 # install mode needs the following variables:
5345 generated_by_libtool_version='$macro_version'
5346 notinst_deplibs='$notinst_deplibs'
5347 else
5348 # When we are sourced in execute mode, \$file and \$ECHO are already set.
5349 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5350 file=\"\$0\""
5351
5352 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
5353 $ECHO "\
5354
5355 # A function that is used when there is no print builtin or printf.
5356 func_fallback_echo ()
5357 {
5358 eval 'cat <<_LTECHO_EOF
5359 \$1
5360 _LTECHO_EOF'
5361 }
5362 ECHO=\"$qECHO\"
5363 fi
5364
5365 # Very basic option parsing. These options are (a) specific to
5366 # the libtool wrapper, (b) are identical between the wrapper
5367 # /script/ and the wrapper /executable/ that is used only on
5368 # windows platforms, and (c) all begin with the string "--lt-"
5369 # (application programs are unlikely to have options that match
5370 # this pattern).
5371 #
5372 # There are only two supported options: --lt-debug and
5373 # --lt-dump-script. There is, deliberately, no --lt-help.
5374 #
5375 # The first argument to this parsing function should be the
5376 # script's $0 value, followed by "$@".
5377 lt_option_debug=
5378 func_parse_lt_options ()
5379 {
5380 lt_script_arg0=\$0
5381 shift
5382 for lt_opt
5383 do
5384 case \"\$lt_opt\" in
5385 --lt-debug) lt_option_debug=1 ;;
5386 --lt-dump-script)
5387 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
5388 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
5389 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
5390 cat \"\$lt_dump_D/\$lt_dump_F\"
5391 exit 0
5392 ;;
5393 --lt-*)
5394 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
5395 exit 1
5396 ;;
5397 esac
5398 done
5399
5400 # Print the debug banner immediately:
5401 if test -n \"\$lt_option_debug\"; then
5402 echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
5403 fi
5404 }
5405
5406 # Used when --lt-debug. Prints its arguments to stdout
5407 # (redirection is the responsibility of the caller)
5408 func_lt_dump_args ()
5409 {
5410 lt_dump_args_N=1;
5411 for lt_arg
5412 do
5413 \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
5414 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
5415 done
5416 }
5417
5418 # Core function for launching the target application
5419 func_exec_program_core ()
5420 {
5421 "
5422 case $host in
5423 # Backslashes separate directories on plain windows
5424 *-*-mingw | *-*-os2* | *-cegcc*)
5425 $ECHO "\
5426 if test -n \"\$lt_option_debug\"; then
5427 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
5428 func_lt_dump_args \${1+\"\$@\"} 1>&2
5429 fi
5430 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5431 "
5432 ;;
5433
5434 *)
5435 $ECHO "\
5436 if test -n \"\$lt_option_debug\"; then
5437 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
5438 func_lt_dump_args \${1+\"\$@\"} 1>&2
5439 fi
5440 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5441 "
5442 ;;
5443 esac
5444 $ECHO "\
5445 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
5446 exit 1
5447 }
5448
5449 # A function to encapsulate launching the target application
5450 # Strips options in the --lt-* namespace from \$@ and
5451 # launches target application with the remaining arguments.
5452 func_exec_program ()
5453 {
5454 case \" \$* \" in
5455 *\\ --lt-*)
5456 for lt_wr_arg
5457 do
5458 case \$lt_wr_arg in
5459 --lt-*) ;;
5460 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
5461 esac
5462 shift
5463 done ;;
5464 esac
5465 func_exec_program_core \${1+\"\$@\"}
5466 }
5467
5468 # Parse options
5469 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
5470
5471 # Find the directory that this script lives in.
5472 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
5473 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5474
5475 # Follow symbolic links until we get to the real thisdir.
5476 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
5477 while test -n \"\$file\"; do
5478 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
5479
5480 # If there was a directory component, then change thisdir.
5481 if test \"x\$destdir\" != \"x\$file\"; then
5482 case \"\$destdir\" in
5483 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5484 *) thisdir=\"\$thisdir/\$destdir\" ;;
5485 esac
5486 fi
5487
5488 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
5489 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
5490 done
5491
5492 # Usually 'no', except on cygwin/mingw when embedded into
5493 # the cwrapper.
5494 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
5495 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
5496 # special case for '.'
5497 if test \"\$thisdir\" = \".\"; then
5498 thisdir=\`pwd\`
5499 fi
5500 # remove .libs from thisdir
5501 case \"\$thisdir\" in
5502 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
5503 $objdir ) thisdir=. ;;
5504 esac
5505 fi
5506
5507 # Try to get the absolute directory name.
5508 absdir=\`cd \"\$thisdir\" && pwd\`
5509 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5510 "
5511
5512 if test yes = "$fast_install"; then
5513 $ECHO "\
5514 program=lt-'$outputname'$exeext
5515 progdir=\"\$thisdir/$objdir\"
5516
5517 if test ! -f \"\$progdir/\$program\" ||
5518 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
5519 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5520
5521 file=\"\$\$-\$program\"
5522
5523 if test ! -d \"\$progdir\"; then
5524 $MKDIR \"\$progdir\"
5525 else
5526 $RM \"\$progdir/\$file\"
5527 fi"
5528
5529 $ECHO "\
5530
5531 # relink executable if necessary
5532 if test -n \"\$relink_command\"; then
5533 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5534 else
5535 \$ECHO \"\$relink_command_output\" >&2
5536 $RM \"\$progdir/\$file\"
5537 exit 1
5538 fi
5539 fi
5540
5541 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5542 { $RM \"\$progdir/\$program\";
5543 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5544 $RM \"\$progdir/\$file\"
5545 fi"
5546 else
5547 $ECHO "\
5548 program='$outputname'
5549 progdir=\"\$thisdir/$objdir\"
5550 "
5551 fi
5552
5553 $ECHO "\
5554
5555 if test -f \"\$progdir/\$program\"; then"
5556
5557 # fixup the dll searchpath if we need to.
5558 #
5559 # Fix the DLL searchpath if we need to. Do this before prepending
5560 # to shlibpath, because on Windows, both are PATH and uninstalled
5561 # libraries must come first.
5562 if test -n "$dllsearchpath"; then
5563 $ECHO "\
5564 # Add the dll search path components to the executable PATH
5565 PATH=$dllsearchpath:\$PATH
5566 "
5567 fi
5568
5569 # Export our shlibpath_var if we have one.
5570 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5571 $ECHO "\
5572 # Add our own library path to $shlibpath_var
5573 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5574
5575 # Some systems cannot cope with colon-terminated $shlibpath_var
5576 # The second colon is a workaround for a bug in BeOS R4 sed
5577 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
5578
5579 export $shlibpath_var
5580 "
5581 fi
5582
5583 $ECHO "\
5584 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5585 # Run the actual program with our arguments.
5586 func_exec_program \${1+\"\$@\"}
5587 fi
5588 else
5589 # The program doesn't exist.
5590 \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
5591 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
5592 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
5593 exit 1
5594 fi
5595 fi\
5596 "
5597 }
5598
5599
5600 # func_emit_cwrapperexe_src
5601 # emit the source code for a wrapper executable on stdout
5602 # Must ONLY be called from within func_mode_link because
5603 # it depends on a number of variable set therein.
5604 func_emit_cwrapperexe_src ()
5605 {
5606 cat <<EOF
5607
5608 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5609 Generated by $PROGRAM (GNU $PACKAGE) $VERSION
5610
5611 The $output program cannot be directly executed until all the libtool
5612 libraries that it depends on are installed.
5613
5614 This wrapper executable should never be moved out of the build directory.
5615 If it is, it will not operate correctly.
5616 */
5617 EOF
5618 cat <<"EOF"
5619 #ifdef _MSC_VER
5620 # define _CRT_SECURE_NO_DEPRECATE 1
5621 #endif
5622 #include <stdio.h>
5623 #include <stdlib.h>
5624 #ifdef _MSC_VER
5625 # include <direct.h>
5626 # include <process.h>
5627 # include <io.h>
5628 #else
5629 # include <unistd.h>
5630 # include <stdint.h>
5631 # ifdef __CYGWIN__
5632 # include <io.h>
5633 # endif
5634 #endif
5635 #include <malloc.h>
5636 #include <stdarg.h>
5637 #include <assert.h>
5638 #include <string.h>
5639 #include <ctype.h>
5640 #include <errno.h>
5641 #include <fcntl.h>
5642 #include <sys/stat.h>
5643
5644 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
5645
5646 /* declarations of non-ANSI functions */
5647 #if defined __MINGW32__
5648 # ifdef __STRICT_ANSI__
5649 int _putenv (const char *);
5650 # endif
5651 #elif defined __CYGWIN__
5652 # ifdef __STRICT_ANSI__
5653 char *realpath (const char *, char *);
5654 int putenv (char *);
5655 int setenv (const char *, const char *, int);
5656 # endif
5657 /* #elif defined other_platform || defined ... */
5658 #endif
5659
5660 /* portability defines, excluding path handling macros */
5661 #if defined _MSC_VER
5662 # define setmode _setmode
5663 # define stat _stat
5664 # define chmod _chmod
5665 # define getcwd _getcwd
5666 # define putenv _putenv
5667 # define S_IXUSR _S_IEXEC
5668 #elif defined __MINGW32__
5669 # define setmode _setmode
5670 # define stat _stat
5671 # define chmod _chmod
5672 # define getcwd _getcwd
5673 # define putenv _putenv
5674 #elif defined __CYGWIN__
5675 # define HAVE_SETENV
5676 # define FOPEN_WB "wb"
5677 /* #elif defined other platforms ... */
5678 #endif
5679
5680 #if defined PATH_MAX
5681 # define LT_PATHMAX PATH_MAX
5682 #elif defined MAXPATHLEN
5683 # define LT_PATHMAX MAXPATHLEN
5684 #else
5685 # define LT_PATHMAX 1024
5686 #endif
5687
5688 #ifndef S_IXOTH
5689 # define S_IXOTH 0
5690 #endif
5691 #ifndef S_IXGRP
5692 # define S_IXGRP 0
5693 #endif
5694
5695 /* path handling portability macros */
5696 #ifndef DIR_SEPARATOR
5697 # define DIR_SEPARATOR '/'
5698 # define PATH_SEPARATOR ':'
5699 #endif
5700
5701 #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
5702 defined __OS2__
5703 # define HAVE_DOS_BASED_FILE_SYSTEM
5704 # define FOPEN_WB "wb"
5705 # ifndef DIR_SEPARATOR_2
5706 # define DIR_SEPARATOR_2 '\\'
5707 # endif
5708 # ifndef PATH_SEPARATOR_2
5709 # define PATH_SEPARATOR_2 ';'
5710 # endif
5711 #endif
5712
5713 #ifndef DIR_SEPARATOR_2
5714 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5715 #else /* DIR_SEPARATOR_2 */
5716 # define IS_DIR_SEPARATOR(ch) \
5717 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5718 #endif /* DIR_SEPARATOR_2 */
5719
5720 #ifndef PATH_SEPARATOR_2
5721 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5722 #else /* PATH_SEPARATOR_2 */
5723 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5724 #endif /* PATH_SEPARATOR_2 */
5725
5726 #ifndef FOPEN_WB
5727 # define FOPEN_WB "w"
5728 #endif
5729 #ifndef _O_BINARY
5730 # define _O_BINARY 0
5731 #endif
5732
5733 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5734 #define XFREE(stale) do { \
5735 if (stale) { free (stale); stale = 0; } \
5736 } while (0)
5737
5738 #if defined LT_DEBUGWRAPPER
5739 static int lt_debug = 1;
5740 #else
5741 static int lt_debug = 0;
5742 #endif
5743
5744 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
5745
5746 void *xmalloc (size_t num);
5747 char *xstrdup (const char *string);
5748 const char *base_name (const char *name);
5749 char *find_executable (const char *wrapper);
5750 char *chase_symlinks (const char *pathspec);
5751 int make_executable (const char *path);
5752 int check_executable (const char *path);
5753 char *strendzap (char *str, const char *pat);
5754 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
5755 void lt_fatal (const char *file, int line, const char *message, ...);
5756 static const char *nonnull (const char *s);
5757 static const char *nonempty (const char *s);
5758 void lt_setenv (const char *name, const char *value);
5759 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
5760 void lt_update_exe_path (const char *name, const char *value);
5761 void lt_update_lib_path (const char *name, const char *value);
5762 char **prepare_spawn (char **argv);
5763 void lt_dump_script (FILE *f);
5764 EOF
5765
5766 cat <<EOF
5767 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
5768 # define externally_visible volatile
5769 #else
5770 # define externally_visible __attribute__((externally_visible)) volatile
5771 #endif
5772 externally_visible const char * MAGIC_EXE = "$magic_exe";
5773 const char * LIB_PATH_VARNAME = "$shlibpath_var";
5774 EOF
5775
5776 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5777 func_to_host_path "$temp_rpath"
5778 cat <<EOF
5779 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
5780 EOF
5781 else
5782 cat <<"EOF"
5783 const char * LIB_PATH_VALUE = "";
5784 EOF
5785 fi
5786
5787 if test -n "$dllsearchpath"; then
5788 func_to_host_path "$dllsearchpath:"
5789 cat <<EOF
5790 const char * EXE_PATH_VARNAME = "PATH";
5791 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
5792 EOF
5793 else
5794 cat <<"EOF"
5795 const char * EXE_PATH_VARNAME = "";
5796 const char * EXE_PATH_VALUE = "";
5797 EOF
5798 fi
5799
5800 if test yes = "$fast_install"; then
5801 cat <<EOF
5802 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
5803 EOF
5804 else
5805 cat <<EOF
5806 const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
5807 EOF
5808 fi
5809
5810
5811 cat <<"EOF"
5812
5813 #define LTWRAPPER_OPTION_PREFIX "--lt-"
5814
5815 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
5816 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
5817 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
5818
5819 int
5820 main (int argc, char *argv[])
5821 {
5822 char **newargz;
5823 int newargc;
5824 char *tmp_pathspec;
5825 char *actual_cwrapper_path;
5826 char *actual_cwrapper_name;
5827 char *target_name;
5828 char *lt_argv_zero;
5829 int rval = 127;
5830
5831 int i;
5832
5833 program_name = (char *) xstrdup (base_name (argv[0]));
5834 newargz = XMALLOC (char *, (size_t) argc + 1);
5835
5836 /* very simple arg parsing; don't want to rely on getopt
5837 * also, copy all non cwrapper options to newargz, except
5838 * argz[0], which is handled differently
5839 */
5840 newargc=0;
5841 for (i = 1; i < argc; i++)
5842 {
5843 if (STREQ (argv[i], dumpscript_opt))
5844 {
5845 EOF
5846 case $host in
5847 *mingw* | *cygwin* )
5848 # make stdout use "unix" line endings
5849 echo " setmode(1,_O_BINARY);"
5850 ;;
5851 esac
5852
5853 cat <<"EOF"
5854 lt_dump_script (stdout);
5855 return 0;
5856 }
5857 if (STREQ (argv[i], debug_opt))
5858 {
5859 lt_debug = 1;
5860 continue;
5861 }
5862 if (STREQ (argv[i], ltwrapper_option_prefix))
5863 {
5864 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
5865 namespace, but it is not one of the ones we know about and
5866 have already dealt with, above (inluding dump-script), then
5867 report an error. Otherwise, targets might begin to believe
5868 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
5869 namespace. The first time any user complains about this, we'll
5870 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
5871 or a configure.ac-settable value.
5872 */
5873 lt_fatal (__FILE__, __LINE__,
5874 "unrecognized %s option: '%s'",
5875 ltwrapper_option_prefix, argv[i]);
5876 }
5877 /* otherwise ... */
5878 newargz[++newargc] = xstrdup (argv[i]);
5879 }
5880 newargz[++newargc] = NULL;
5881
5882 EOF
5883 cat <<EOF
5884 /* The GNU banner must be the first non-error debug message */
5885 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
5886 EOF
5887 cat <<"EOF"
5888 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
5889 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
5890
5891 tmp_pathspec = find_executable (argv[0]);
5892 if (tmp_pathspec == NULL)
5893 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
5894 lt_debugprintf (__FILE__, __LINE__,
5895 "(main) found exe (before symlink chase) at: %s\n",
5896 tmp_pathspec);
5897
5898 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
5899 lt_debugprintf (__FILE__, __LINE__,
5900 "(main) found exe (after symlink chase) at: %s\n",
5901 actual_cwrapper_path);
5902 XFREE (tmp_pathspec);
5903
5904 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
5905 strendzap (actual_cwrapper_path, actual_cwrapper_name);
5906
5907 /* wrapper name transforms */
5908 strendzap (actual_cwrapper_name, ".exe");
5909 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
5910 XFREE (actual_cwrapper_name);
5911 actual_cwrapper_name = tmp_pathspec;
5912 tmp_pathspec = 0;
5913
5914 /* target_name transforms -- use actual target program name; might have lt- prefix */
5915 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
5916 strendzap (target_name, ".exe");
5917 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
5918 XFREE (target_name);
5919 target_name = tmp_pathspec;
5920 tmp_pathspec = 0;
5921
5922 lt_debugprintf (__FILE__, __LINE__,
5923 "(main) libtool target name: %s\n",
5924 target_name);
5925 EOF
5926
5927 cat <<EOF
5928 newargz[0] =
5929 XMALLOC (char, (strlen (actual_cwrapper_path) +
5930 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
5931 strcpy (newargz[0], actual_cwrapper_path);
5932 strcat (newargz[0], "$objdir");
5933 strcat (newargz[0], "/");
5934 EOF
5935
5936 cat <<"EOF"
5937 /* stop here, and copy so we don't have to do this twice */
5938 tmp_pathspec = xstrdup (newargz[0]);
5939
5940 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
5941 strcat (newargz[0], actual_cwrapper_name);
5942
5943 /* DO want the lt- prefix here if it exists, so use target_name */
5944 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
5945 XFREE (tmp_pathspec);
5946 tmp_pathspec = NULL;
5947 EOF
5948
5949 case $host_os in
5950 mingw*)
5951 cat <<"EOF"
5952 {
5953 char* p;
5954 while ((p = strchr (newargz[0], '\\')) != NULL)
5955 {
5956 *p = '/';
5957 }
5958 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
5959 {
5960 *p = '/';
5961 }
5962 }
5963 EOF
5964 ;;
5965 esac
5966
5967 cat <<"EOF"
5968 XFREE (target_name);
5969 XFREE (actual_cwrapper_path);
5970 XFREE (actual_cwrapper_name);
5971
5972 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
5973 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
5974 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
5975 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
5976 because on Windows, both *_VARNAMEs are PATH but uninstalled
5977 libraries must come first. */
5978 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
5979 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
5980
5981 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
5982 nonnull (lt_argv_zero));
5983 for (i = 0; i < newargc; i++)
5984 {
5985 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
5986 i, nonnull (newargz[i]));
5987 }
5988
5989 EOF
5990
5991 case $host_os in
5992 mingw*)
5993 cat <<"EOF"
5994 /* execv doesn't actually work on mingw as expected on unix */
5995 newargz = prepare_spawn (newargz);
5996 rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
5997 if (rval == -1)
5998 {
5999 /* failed to start process */
6000 lt_debugprintf (__FILE__, __LINE__,
6001 "(main) failed to launch target \"%s\": %s\n",
6002 lt_argv_zero, nonnull (strerror (errno)));
6003 return 127;
6004 }
6005 return rval;
6006 EOF
6007 ;;
6008 *)
6009 cat <<"EOF"
6010 execv (lt_argv_zero, newargz);
6011 return rval; /* =127, but avoids unused variable warning */
6012 EOF
6013 ;;
6014 esac
6015
6016 cat <<"EOF"
6017 }
6018
6019 void *
6020 xmalloc (size_t num)
6021 {
6022 void *p = (void *) malloc (num);
6023 if (!p)
6024 lt_fatal (__FILE__, __LINE__, "memory exhausted");
6025
6026 return p;
6027 }
6028
6029 char *
6030 xstrdup (const char *string)
6031 {
6032 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
6033 string) : NULL;
6034 }
6035
6036 const char *
6037 base_name (const char *name)
6038 {
6039 const char *base;
6040
6041 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6042 /* Skip over the disk name in MSDOS pathnames. */
6043 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
6044 name += 2;
6045 #endif
6046
6047 for (base = name; *name; name++)
6048 if (IS_DIR_SEPARATOR (*name))
6049 base = name + 1;
6050 return base;
6051 }
6052
6053 int
6054 check_executable (const char *path)
6055 {
6056 struct stat st;
6057
6058 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
6059 nonempty (path));
6060 if ((!path) || (!*path))
6061 return 0;
6062
6063 if ((stat (path, &st) >= 0)
6064 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
6065 return 1;
6066 else
6067 return 0;
6068 }
6069
6070 int
6071 make_executable (const char *path)
6072 {
6073 int rval = 0;
6074 struct stat st;
6075
6076 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
6077 nonempty (path));
6078 if ((!path) || (!*path))
6079 return 0;
6080
6081 if (stat (path, &st) >= 0)
6082 {
6083 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
6084 }
6085 return rval;
6086 }
6087
6088 /* Searches for the full path of the wrapper. Returns
6089 newly allocated full path name if found, NULL otherwise
6090 Does not chase symlinks, even on platforms that support them.
6091 */
6092 char *
6093 find_executable (const char *wrapper)
6094 {
6095 int has_slash = 0;
6096 const char *p;
6097 const char *p_next;
6098 /* static buffer for getcwd */
6099 char tmp[LT_PATHMAX + 1];
6100 size_t tmp_len;
6101 char *concat_name;
6102
6103 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
6104 nonempty (wrapper));
6105
6106 if ((wrapper == NULL) || (*wrapper == '\0'))
6107 return NULL;
6108
6109 /* Absolute path? */
6110 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6111 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
6112 {
6113 concat_name = xstrdup (wrapper);
6114 if (check_executable (concat_name))
6115 return concat_name;
6116 XFREE (concat_name);
6117 }
6118 else
6119 {
6120 #endif
6121 if (IS_DIR_SEPARATOR (wrapper[0]))
6122 {
6123 concat_name = xstrdup (wrapper);
6124 if (check_executable (concat_name))
6125 return concat_name;
6126 XFREE (concat_name);
6127 }
6128 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6129 }
6130 #endif
6131
6132 for (p = wrapper; *p; p++)
6133 if (*p == '/')
6134 {
6135 has_slash = 1;
6136 break;
6137 }
6138 if (!has_slash)
6139 {
6140 /* no slashes; search PATH */
6141 const char *path = getenv ("PATH");
6142 if (path != NULL)
6143 {
6144 for (p = path; *p; p = p_next)
6145 {
6146 const char *q;
6147 size_t p_len;
6148 for (q = p; *q; q++)
6149 if (IS_PATH_SEPARATOR (*q))
6150 break;
6151 p_len = (size_t) (q - p);
6152 p_next = (*q == '\0' ? q : q + 1);
6153 if (p_len == 0)
6154 {
6155 /* empty path: current directory */
6156 if (getcwd (tmp, LT_PATHMAX) == NULL)
6157 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
6158 nonnull (strerror (errno)));
6159 tmp_len = strlen (tmp);
6160 concat_name =
6161 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
6162 memcpy (concat_name, tmp, tmp_len);
6163 concat_name[tmp_len] = '/';
6164 strcpy (concat_name + tmp_len + 1, wrapper);
6165 }
6166 else
6167 {
6168 concat_name =
6169 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
6170 memcpy (concat_name, p, p_len);
6171 concat_name[p_len] = '/';
6172 strcpy (concat_name + p_len + 1, wrapper);
6173 }
6174 if (check_executable (concat_name))
6175 return concat_name;
6176 XFREE (concat_name);
6177 }
6178 }
6179 /* not found in PATH; assume curdir */
6180 }
6181 /* Relative path | not found in path: prepend cwd */
6182 if (getcwd (tmp, LT_PATHMAX) == NULL)
6183 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
6184 nonnull (strerror (errno)));
6185 tmp_len = strlen (tmp);
6186 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
6187 memcpy (concat_name, tmp, tmp_len);
6188 concat_name[tmp_len] = '/';
6189 strcpy (concat_name + tmp_len + 1, wrapper);
6190
6191 if (check_executable (concat_name))
6192 return concat_name;
6193 XFREE (concat_name);
6194 return NULL;
6195 }
6196
6197 char *
6198 chase_symlinks (const char *pathspec)
6199 {
6200 #ifndef S_ISLNK
6201 return xstrdup (pathspec);
6202 #else
6203 char buf[LT_PATHMAX];
6204 struct stat s;
6205 char *tmp_pathspec = xstrdup (pathspec);
6206 char *p;
6207 int has_symlinks = 0;
6208 while (strlen (tmp_pathspec) && !has_symlinks)
6209 {
6210 lt_debugprintf (__FILE__, __LINE__,
6211 "checking path component for symlinks: %s\n",
6212 tmp_pathspec);
6213 if (lstat (tmp_pathspec, &s) == 0)
6214 {
6215 if (S_ISLNK (s.st_mode) != 0)
6216 {
6217 has_symlinks = 1;
6218 break;
6219 }
6220
6221 /* search backwards for last DIR_SEPARATOR */
6222 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
6223 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
6224 p--;
6225 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
6226 {
6227 /* no more DIR_SEPARATORS left */
6228 break;
6229 }
6230 *p = '\0';
6231 }
6232 else
6233 {
6234 lt_fatal (__FILE__, __LINE__,
6235 "error accessing file \"%s\": %s",
6236 tmp_pathspec, nonnull (strerror (errno)));
6237 }
6238 }
6239 XFREE (tmp_pathspec);
6240
6241 if (!has_symlinks)
6242 {
6243 return xstrdup (pathspec);
6244 }
6245
6246 tmp_pathspec = realpath (pathspec, buf);
6247 if (tmp_pathspec == 0)
6248 {
6249 lt_fatal (__FILE__, __LINE__,
6250 "could not follow symlinks for %s", pathspec);
6251 }
6252 return xstrdup (tmp_pathspec);
6253 #endif
6254 }
6255
6256 char *
6257 strendzap (char *str, const char *pat)
6258 {
6259 size_t len, patlen;
6260
6261 assert (str != NULL);
6262 assert (pat != NULL);
6263
6264 len = strlen (str);
6265 patlen = strlen (pat);
6266
6267 if (patlen <= len)
6268 {
6269 str += len - patlen;
6270 if (STREQ (str, pat))
6271 *str = '\0';
6272 }
6273 return str;
6274 }
6275
6276 void
6277 lt_debugprintf (const char *file, int line, const char *fmt, ...)
6278 {
6279 va_list args;
6280 if (lt_debug)
6281 {
6282 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
6283 va_start (args, fmt);
6284 (void) vfprintf (stderr, fmt, args);
6285 va_end (args);
6286 }
6287 }
6288
6289 static void
6290 lt_error_core (int exit_status, const char *file,
6291 int line, const char *mode,
6292 const char *message, va_list ap)
6293 {
6294 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
6295 vfprintf (stderr, message, ap);
6296 fprintf (stderr, ".\n");
6297
6298 if (exit_status >= 0)
6299 exit (exit_status);
6300 }
6301
6302 void
6303 lt_fatal (const char *file, int line, const char *message, ...)
6304 {
6305 va_list ap;
6306 va_start (ap, message);
6307 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
6308 va_end (ap);
6309 }
6310
6311 static const char *
6312 nonnull (const char *s)
6313 {
6314 return s ? s : "(null)";
6315 }
6316
6317 static const char *
6318 nonempty (const char *s)
6319 {
6320 return (s && !*s) ? "(empty)" : nonnull (s);
6321 }
6322
6323 void
6324 lt_setenv (const char *name, const char *value)
6325 {
6326 lt_debugprintf (__FILE__, __LINE__,
6327 "(lt_setenv) setting '%s' to '%s'\n",
6328 nonnull (name), nonnull (value));
6329 {
6330 #ifdef HAVE_SETENV
6331 /* always make a copy, for consistency with !HAVE_SETENV */
6332 char *str = xstrdup (value);
6333 setenv (name, str, 1);
6334 #else
6335 size_t len = strlen (name) + 1 + strlen (value) + 1;
6336 char *str = XMALLOC (char, len);
6337 sprintf (str, "%s=%s", name, value);
6338 if (putenv (str) != EXIT_SUCCESS)
6339 {
6340 XFREE (str);
6341 }
6342 #endif
6343 }
6344 }
6345
6346 char *
6347 lt_extend_str (const char *orig_value, const char *add, int to_end)
6348 {
6349 char *new_value;
6350 if (orig_value && *orig_value)
6351 {
6352 size_t orig_value_len = strlen (orig_value);
6353 size_t add_len = strlen (add);
6354 new_value = XMALLOC (char, add_len + orig_value_len + 1);
6355 if (to_end)
6356 {
6357 strcpy (new_value, orig_value);
6358 strcpy (new_value + orig_value_len, add);
6359 }
6360 else
6361 {
6362 strcpy (new_value, add);
6363 strcpy (new_value + add_len, orig_value);
6364 }
6365 }
6366 else
6367 {
6368 new_value = xstrdup (add);
6369 }
6370 return new_value;
6371 }
6372
6373 void
6374 lt_update_exe_path (const char *name, const char *value)
6375 {
6376 lt_debugprintf (__FILE__, __LINE__,
6377 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
6378 nonnull (name), nonnull (value));
6379
6380 if (name && *name && value && *value)
6381 {
6382 char *new_value = lt_extend_str (getenv (name), value, 0);
6383 /* some systems can't cope with a ':'-terminated path #' */
6384 size_t len = strlen (new_value);
6385 while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
6386 {
6387 new_value[--len] = '\0';
6388 }
6389 lt_setenv (name, new_value);
6390 XFREE (new_value);
6391 }
6392 }
6393
6394 void
6395 lt_update_lib_path (const char *name, const char *value)
6396 {
6397 lt_debugprintf (__FILE__, __LINE__,
6398 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
6399 nonnull (name), nonnull (value));
6400
6401 if (name && *name && value && *value)
6402 {
6403 char *new_value = lt_extend_str (getenv (name), value, 0);
6404 lt_setenv (name, new_value);
6405 XFREE (new_value);
6406 }
6407 }
6408
6409 EOF
6410 case $host_os in
6411 mingw*)
6412 cat <<"EOF"
6413
6414 /* Prepares an argument vector before calling spawn().
6415 Note that spawn() does not by itself call the command interpreter
6416 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
6417 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
6418 GetVersionEx(&v);
6419 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
6420 }) ? "cmd.exe" : "command.com").
6421 Instead it simply concatenates the arguments, separated by ' ', and calls
6422 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
6423 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
6424 special way:
6425 - Space and tab are interpreted as delimiters. They are not treated as
6426 delimiters if they are surrounded by double quotes: "...".
6427 - Unescaped double quotes are removed from the input. Their only effect is
6428 that within double quotes, space and tab are treated like normal
6429 characters.
6430 - Backslashes not followed by double quotes are not special.
6431 - But 2*n+1 backslashes followed by a double quote become
6432 n backslashes followed by a double quote (n >= 0):
6433 \" -> "
6434 \\\" -> \"
6435 \\\\\" -> \\"
6436 */
6437 #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"
6438 #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"
6439 char **
6440 prepare_spawn (char **argv)
6441 {
6442 size_t argc;
6443 char **new_argv;
6444 size_t i;
6445
6446 /* Count number of arguments. */
6447 for (argc = 0; argv[argc] != NULL; argc++)
6448 ;
6449
6450 /* Allocate new argument vector. */
6451 new_argv = XMALLOC (char *, argc + 1);
6452
6453 /* Put quoted arguments into the new argument vector. */
6454 for (i = 0; i < argc; i++)
6455 {
6456 const char *string = argv[i];
6457
6458 if (string[0] == '\0')
6459 new_argv[i] = xstrdup ("\"\"");
6460 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
6461 {
6462 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
6463 size_t length;
6464 unsigned int backslashes;
6465 const char *s;
6466 char *quoted_string;
6467 char *p;
6468
6469 length = 0;
6470 backslashes = 0;
6471 if (quote_around)
6472 length++;
6473 for (s = string; *s != '\0'; s++)
6474 {
6475 char c = *s;
6476 if (c == '"')
6477 length += backslashes + 1;
6478 length++;
6479 if (c == '\\')
6480 backslashes++;
6481 else
6482 backslashes = 0;
6483 }
6484 if (quote_around)
6485 length += backslashes + 1;
6486
6487 quoted_string = XMALLOC (char, length + 1);
6488
6489 p = quoted_string;
6490 backslashes = 0;
6491 if (quote_around)
6492 *p++ = '"';
6493 for (s = string; *s != '\0'; s++)
6494 {
6495 char c = *s;
6496 if (c == '"')
6497 {
6498 unsigned int j;
6499 for (j = backslashes + 1; j > 0; j--)
6500 *p++ = '\\';
6501 }
6502 *p++ = c;
6503 if (c == '\\')
6504 backslashes++;
6505 else
6506 backslashes = 0;
6507 }
6508 if (quote_around)
6509 {
6510 unsigned int j;
6511 for (j = backslashes; j > 0; j--)
6512 *p++ = '\\';
6513 *p++ = '"';
6514 }
6515 *p = '\0';
6516
6517 new_argv[i] = quoted_string;
6518 }
6519 else
6520 new_argv[i] = (char *) string;
6521 }
6522 new_argv[argc] = NULL;
6523
6524 return new_argv;
6525 }
6526 EOF
6527 ;;
6528 esac
6529
6530 cat <<"EOF"
6531 void lt_dump_script (FILE* f)
6532 {
6533 EOF
6534 func_emit_wrapper yes |
6535 $SED -n -e '
6536 s/^\(.\{79\}\)\(..*\)/\1\
6537 \2/
6538 h
6539 s/\([\\"]\)/\\\1/g
6540 s/$/\\n/
6541 s/\([^\n]*\).*/ fputs ("\1", f);/p
6542 g
6543 D'
6544 cat <<"EOF"
6545 }
6546 EOF
6547 }
6548 # end: func_emit_cwrapperexe_src
6549
6550 # func_win32_import_lib_p ARG
6551 # True if ARG is an import lib, as indicated by $file_magic_cmd
6552 func_win32_import_lib_p ()
6553 {
6554 $debug_cmd
6555
6556 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
6557 *import*) : ;;
6558 *) false ;;
6559 esac
6560 }
6561
6562 # func_suncc_cstd_abi
6563 # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
6564 # Several compiler flags select an ABI that is incompatible with the
6565 # Cstd library. Avoid specifying it if any are in CXXFLAGS.
6566 func_suncc_cstd_abi ()
6567 {
6568 $debug_cmd
6569
6570 case " $compile_command " in
6571 *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
6572 suncc_use_cstd_abi=no
6573 ;;
6574 *)
6575 suncc_use_cstd_abi=yes
6576 ;;
6577 esac
6578 }
6579
6580 # func_mode_link arg...
6581 func_mode_link ()
6582 {
6583 $debug_cmd
6584
6585 case $host in
6586 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
6587 # It is impossible to link a dll without this setting, and
6588 # we shouldn't force the makefile maintainer to figure out
6589 # what system we are compiling for in order to pass an extra
6590 # flag for every libtool invocation.
6591 # allow_undefined=no
6592
6593 # FIXME: Unfortunately, there are problems with the above when trying
6594 # to make a dll that has undefined symbols, in which case not
6595 # even a static library is built. For now, we need to specify
6596 # -no-undefined on the libtool link line when we can be certain
6597 # that all symbols are satisfied, otherwise we get a static library.
6598 allow_undefined=yes
6599 ;;
6600 *)
6601 allow_undefined=yes
6602 ;;
6603 esac
6604 libtool_args=$nonopt
6605 base_compile="$nonopt $@"
6606 compile_command=$nonopt
6607 finalize_command=$nonopt
6608
6609 compile_rpath=
6610 finalize_rpath=
6611 compile_shlibpath=
6612 finalize_shlibpath=
6613 convenience=
6614 old_convenience=
6615 deplibs=
6616 old_deplibs=
6617 compiler_flags=
6618 linker_flags=
6619 dllsearchpath=
6620 lib_search_path=`pwd`
6621 inst_prefix_dir=
6622 new_inherited_linker_flags=
6623
6624 avoid_version=no
6625 bindir=
6626 dlfiles=
6627 dlprefiles=
6628 dlself=no
6629 export_dynamic=no
6630 export_symbols=
6631 export_symbols_regex=
6632 generated=
6633 libobjs=
6634 ltlibs=
6635 module=no
6636 no_install=no
6637 objs=
6638 os2dllname=
6639 non_pic_objects=
6640 precious_files_regex=
6641 prefer_static_libs=no
6642 preload=false
6643 prev=
6644 prevarg=
6645 release=
6646 rpath=
6647 xrpath=
6648 perm_rpath=
6649 temp_rpath=
6650 thread_safe=no
6651 vinfo=
6652 vinfo_number=no
6653 weak_libs=
6654 single_module=$wl-single_module
6655 func_infer_tag $base_compile
6656
6657 # We need to know -static, to get the right output filenames.
6658 for arg
6659 do
6660 case $arg in
6661 -shared)
6662 test yes != "$build_libtool_libs" \
6663 && func_fatal_configuration "cannot build a shared library"
6664 build_old_libs=no
6665 break
6666 ;;
6667 -all-static | -static | -static-libtool-libs)
6668 case $arg in
6669 -all-static)
6670 if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
6671 func_warning "complete static linking is impossible in this configuration"
6672 fi
6673 if test -n "$link_static_flag"; then
6674 dlopen_self=$dlopen_self_static
6675 fi
6676 prefer_static_libs=yes
6677 ;;
6678 -static)
6679 if test -z "$pic_flag" && test -n "$link_static_flag"; then
6680 dlopen_self=$dlopen_self_static
6681 fi
6682 prefer_static_libs=built
6683 ;;
6684 -static-libtool-libs)
6685 if test -z "$pic_flag" && test -n "$link_static_flag"; then
6686 dlopen_self=$dlopen_self_static
6687 fi
6688 prefer_static_libs=yes
6689 ;;
6690 esac
6691 build_libtool_libs=no
6692 build_old_libs=yes
6693 break
6694 ;;
6695 esac
6696 done
6697
6698 # See if our shared archives depend on static archives.
6699 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
6700
6701 # Go through the arguments, transforming them on the way.
6702 while test "$#" -gt 0; do
6703 arg=$1
6704 shift
6705 func_quote_for_eval "$arg"
6706 qarg=$func_quote_for_eval_unquoted_result
6707 func_append libtool_args " $func_quote_for_eval_result"
6708
6709 # If the previous option needs an argument, assign it.
6710 if test -n "$prev"; then
6711 case $prev in
6712 output)
6713 func_append compile_command " @OUTPUT@"
6714 func_append finalize_command " @OUTPUT@"
6715 ;;
6716 esac
6717
6718 case $prev in
6719 bindir)
6720 bindir=$arg
6721 prev=
6722 continue
6723 ;;
6724 dlfiles|dlprefiles)
6725 $preload || {
6726 # Add the symbol object into the linking commands.
6727 func_append compile_command " @SYMFILE@"
6728 func_append finalize_command " @SYMFILE@"
6729 preload=:
6730 }
6731 case $arg in
6732 *.la | *.lo) ;; # We handle these cases below.
6733 force)
6734 if test no = "$dlself"; then
6735 dlself=needless
6736 export_dynamic=yes
6737 fi
6738 prev=
6739 continue
6740 ;;
6741 self)
6742 if test dlprefiles = "$prev"; then
6743 dlself=yes
6744 elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
6745 dlself=yes
6746 else
6747 dlself=needless
6748 export_dynamic=yes
6749 fi
6750 prev=
6751 continue
6752 ;;
6753 *)
6754 if test dlfiles = "$prev"; then
6755 func_append dlfiles " $arg"
6756 else
6757 func_append dlprefiles " $arg"
6758 fi
6759 prev=
6760 continue
6761 ;;
6762 esac
6763 ;;
6764 expsyms)
6765 export_symbols=$arg
6766 test -f "$arg" \
6767 || func_fatal_error "symbol file '$arg' does not exist"
6768 prev=
6769 continue
6770 ;;
6771 expsyms_regex)
6772 export_symbols_regex=$arg
6773 prev=
6774 continue
6775 ;;
6776 framework)
6777 case $host in
6778 *-*-darwin*)
6779 case "$deplibs " in
6780 *" $qarg.ltframework "*) ;;
6781 *) func_append deplibs " $qarg.ltframework" # this is fixed later
6782 ;;
6783 esac
6784 ;;
6785 esac
6786 prev=
6787 continue
6788 ;;
6789 inst_prefix)
6790 inst_prefix_dir=$arg
6791 prev=
6792 continue
6793 ;;
6794 mllvm)
6795 # Clang does not use LLVM to link, so we can simply discard any
6796 # '-mllvm $arg' options when doing the link step.
6797 prev=
6798 continue
6799 ;;
6800 objectlist)
6801 if test -f "$arg"; then
6802 save_arg=$arg
6803 moreargs=
6804 for fil in `cat "$save_arg"`
6805 do
6806 # func_append moreargs " $fil"
6807 arg=$fil
6808 # A libtool-controlled object.
6809
6810 # Check to see that this really is a libtool object.
6811 if func_lalib_unsafe_p "$arg"; then
6812 pic_object=
6813 non_pic_object=
6814
6815 # Read the .lo file
6816 func_source "$arg"
6817
6818 if test -z "$pic_object" ||
6819 test -z "$non_pic_object" ||
6820 test none = "$pic_object" &&
6821 test none = "$non_pic_object"; then
6822 func_fatal_error "cannot find name of object for '$arg'"
6823 fi
6824
6825 # Extract subdirectory from the argument.
6826 func_dirname "$arg" "/" ""
6827 xdir=$func_dirname_result
6828
6829 if test none != "$pic_object"; then
6830 # Prepend the subdirectory the object is found in.
6831 pic_object=$xdir$pic_object
6832
6833 if test dlfiles = "$prev"; then
6834 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
6835 func_append dlfiles " $pic_object"
6836 prev=
6837 continue
6838 else
6839 # If libtool objects are unsupported, then we need to preload.
6840 prev=dlprefiles
6841 fi
6842 fi
6843
6844 # CHECK ME: I think I busted this. -Ossama
6845 if test dlprefiles = "$prev"; then
6846 # Preload the old-style object.
6847 func_append dlprefiles " $pic_object"
6848 prev=
6849 fi
6850
6851 # A PIC object.
6852 func_append libobjs " $pic_object"
6853 arg=$pic_object
6854 fi
6855
6856 # Non-PIC object.
6857 if test none != "$non_pic_object"; then
6858 # Prepend the subdirectory the object is found in.
6859 non_pic_object=$xdir$non_pic_object
6860
6861 # A standard non-PIC object
6862 func_append non_pic_objects " $non_pic_object"
6863 if test -z "$pic_object" || test none = "$pic_object"; then
6864 arg=$non_pic_object
6865 fi
6866 else
6867 # If the PIC object exists, use it instead.
6868 # $xdir was prepended to $pic_object above.
6869 non_pic_object=$pic_object
6870 func_append non_pic_objects " $non_pic_object"
6871 fi
6872 else
6873 # Only an error if not doing a dry-run.
6874 if $opt_dry_run; then
6875 # Extract subdirectory from the argument.
6876 func_dirname "$arg" "/" ""
6877 xdir=$func_dirname_result
6878
6879 func_lo2o "$arg"
6880 pic_object=$xdir$objdir/$func_lo2o_result
6881 non_pic_object=$xdir$func_lo2o_result
6882 func_append libobjs " $pic_object"
6883 func_append non_pic_objects " $non_pic_object"
6884 else
6885 func_fatal_error "'$arg' is not a valid libtool object"
6886 fi
6887 fi
6888 done
6889 else
6890 func_fatal_error "link input file '$arg' does not exist"
6891 fi
6892 arg=$save_arg
6893 prev=
6894 continue
6895 ;;
6896 os2dllname)
6897 os2dllname=$arg
6898 prev=
6899 continue
6900 ;;
6901 precious_regex)
6902 precious_files_regex=$arg
6903 prev=
6904 continue
6905 ;;
6906 release)
6907 release=-$arg
6908 prev=
6909 continue
6910 ;;
6911 rpath | xrpath)
6912 # We need an absolute path.
6913 case $arg in
6914 [\\/]* | [A-Za-z]:[\\/]*) ;;
6915 *)
6916 func_fatal_error "only absolute run-paths are allowed"
6917 ;;
6918 esac
6919 if test rpath = "$prev"; then
6920 case "$rpath " in
6921 *" $arg "*) ;;
6922 *) func_append rpath " $arg" ;;
6923 esac
6924 else
6925 case "$xrpath " in
6926 *" $arg "*) ;;
6927 *) func_append xrpath " $arg" ;;
6928 esac
6929 fi
6930 prev=
6931 continue
6932 ;;
6933 shrext)
6934 shrext_cmds=$arg
6935 prev=
6936 continue
6937 ;;
6938 weak)
6939 func_append weak_libs " $arg"
6940 prev=
6941 continue
6942 ;;
6943 xcclinker)
6944 func_append linker_flags " $qarg"
6945 func_append compiler_flags " $qarg"
6946 prev=
6947 func_append compile_command " $qarg"
6948 func_append finalize_command " $qarg"
6949 continue
6950 ;;
6951 xcompiler)
6952 func_append compiler_flags " $qarg"
6953 prev=
6954 func_append compile_command " $qarg"
6955 func_append finalize_command " $qarg"
6956 continue
6957 ;;
6958 xlinker)
6959 func_append linker_flags " $qarg"
6960 func_append compiler_flags " $wl$qarg"
6961 prev=
6962 func_append compile_command " $wl$qarg"
6963 func_append finalize_command " $wl$qarg"
6964 continue
6965 ;;
6966 *)
6967 eval "$prev=\"\$arg\""
6968 prev=
6969 continue
6970 ;;
6971 esac
6972 fi # test -n "$prev"
6973
6974 prevarg=$arg
6975
6976 case $arg in
6977 -all-static)
6978 if test -n "$link_static_flag"; then
6979 # See comment for -static flag below, for more details.
6980 func_append compile_command " $link_static_flag"
6981 func_append finalize_command " $link_static_flag"
6982 fi
6983 continue
6984 ;;
6985
6986 -allow-undefined)
6987 # FIXME: remove this flag sometime in the future.
6988 func_fatal_error "'-allow-undefined' must not be used because it is the default"
6989 ;;
6990
6991 -avoid-version)
6992 avoid_version=yes
6993 continue
6994 ;;
6995
6996 -bindir)
6997 prev=bindir
6998 continue
6999 ;;
7000
7001 -dlopen)
7002 prev=dlfiles
7003 continue
7004 ;;
7005
7006 -dlpreopen)
7007 prev=dlprefiles
7008 continue
7009 ;;
7010
7011 -export-dynamic)
7012 export_dynamic=yes
7013 continue
7014 ;;
7015
7016 -export-symbols | -export-symbols-regex)
7017 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
7018 func_fatal_error "more than one -exported-symbols argument is not allowed"
7019 fi
7020 if test X-export-symbols = "X$arg"; then
7021 prev=expsyms
7022 else
7023 prev=expsyms_regex
7024 fi
7025 continue
7026 ;;
7027
7028 -framework)
7029 prev=framework
7030 continue
7031 ;;
7032
7033 -inst-prefix-dir)
7034 prev=inst_prefix
7035 continue
7036 ;;
7037
7038 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
7039 # so, if we see these flags be careful not to treat them like -L
7040 -L[A-Z][A-Z]*:*)
7041 case $with_gcc/$host in
7042 no/*-*-irix* | /*-*-irix*)
7043 func_append compile_command " $arg"
7044 func_append finalize_command " $arg"
7045 ;;
7046 esac
7047 continue
7048 ;;
7049
7050 -L*)
7051 func_stripname "-L" '' "$arg"
7052 if test -z "$func_stripname_result"; then
7053 if test "$#" -gt 0; then
7054 func_fatal_error "require no space between '-L' and '$1'"
7055 else
7056 func_fatal_error "need path for '-L' option"
7057 fi
7058 fi
7059 func_resolve_sysroot "$func_stripname_result"
7060 dir=$func_resolve_sysroot_result
7061 # We need an absolute path.
7062 case $dir in
7063 [\\/]* | [A-Za-z]:[\\/]*) ;;
7064 *)
7065 absdir=`cd "$dir" && pwd`
7066 test -z "$absdir" && \
7067 func_fatal_error "cannot determine absolute directory name of '$dir'"
7068 dir=$absdir
7069 ;;
7070 esac
7071 case "$deplibs " in
7072 *" -L$dir "* | *" $arg "*)
7073 # Will only happen for absolute or sysroot arguments
7074 ;;
7075 *)
7076 # Preserve sysroot, but never include relative directories
7077 case $dir in
7078 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
7079 *) func_append deplibs " -L$dir" ;;
7080 esac
7081 func_append lib_search_path " $dir"
7082 ;;
7083 esac
7084 case $host in
7085 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
7086 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
7087 case :$dllsearchpath: in
7088 *":$dir:"*) ;;
7089 ::) dllsearchpath=$dir;;
7090 *) func_append dllsearchpath ":$dir";;
7091 esac
7092 case :$dllsearchpath: in
7093 *":$testbindir:"*) ;;
7094 ::) dllsearchpath=$testbindir;;
7095 *) func_append dllsearchpath ":$testbindir";;
7096 esac
7097 ;;
7098 esac
7099 continue
7100 ;;
7101
7102 -l*)
7103 if test X-lc = "X$arg" || test X-lm = "X$arg"; then
7104 case $host in
7105 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
7106 # These systems don't actually have a C or math library (as such)
7107 continue
7108 ;;
7109 *-*-os2*)
7110 # These systems don't actually have a C library (as such)
7111 test X-lc = "X$arg" && continue
7112 ;;
7113 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7114 # Do not include libc due to us having libc/libc_r.
7115 test X-lc = "X$arg" && continue
7116 ;;
7117 *-*-rhapsody* | *-*-darwin1.[012])
7118 # Rhapsody C and math libraries are in the System framework
7119 func_append deplibs " System.ltframework"
7120 continue
7121 ;;
7122 *-*-sco3.2v5* | *-*-sco5v6*)
7123 # Causes problems with __ctype
7124 test X-lc = "X$arg" && continue
7125 ;;
7126 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
7127 # Compiler inserts libc in the correct place for threads to work
7128 test X-lc = "X$arg" && continue
7129 ;;
7130 esac
7131 elif test X-lc_r = "X$arg"; then
7132 case $host in
7133 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7134 # Do not include libc_r directly, use -pthread flag.
7135 continue
7136 ;;
7137 esac
7138 fi
7139 func_append deplibs " $arg"
7140 continue
7141 ;;
7142
7143 -mllvm)
7144 prev=mllvm
7145 continue
7146 ;;
7147
7148 -module)
7149 module=yes
7150 continue
7151 ;;
7152
7153 # Tru64 UNIX uses -model [arg] to determine the layout of C++
7154 # classes, name mangling, and exception handling.
7155 # Darwin uses the -arch flag to determine output architecture.
7156 -model|-arch|-isysroot|--sysroot)
7157 func_append compiler_flags " $arg"
7158 func_append compile_command " $arg"
7159 func_append finalize_command " $arg"
7160 prev=xcompiler
7161 continue
7162 ;;
7163
7164 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7165 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7166 func_append compiler_flags " $arg"
7167 func_append compile_command " $arg"
7168 func_append finalize_command " $arg"
7169 case "$new_inherited_linker_flags " in
7170 *" $arg "*) ;;
7171 * ) func_append new_inherited_linker_flags " $arg" ;;
7172 esac
7173 continue
7174 ;;
7175
7176 -multi_module)
7177 single_module=$wl-multi_module
7178 continue
7179 ;;
7180
7181 -no-fast-install)
7182 fast_install=no
7183 continue
7184 ;;
7185
7186 -no-install)
7187 case $host in
7188 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
7189 # The PATH hackery in wrapper scripts is required on Windows
7190 # and Darwin in order for the loader to find any dlls it needs.
7191 func_warning "'-no-install' is ignored for $host"
7192 func_warning "assuming '-no-fast-install' instead"
7193 fast_install=no
7194 ;;
7195 *) no_install=yes ;;
7196 esac
7197 continue
7198 ;;
7199
7200 -no-undefined)
7201 allow_undefined=no
7202 continue
7203 ;;
7204
7205 -objectlist)
7206 prev=objectlist
7207 continue
7208 ;;
7209
7210 -os2dllname)
7211 prev=os2dllname
7212 continue
7213 ;;
7214
7215 -o) prev=output ;;
7216
7217 -precious-files-regex)
7218 prev=precious_regex
7219 continue
7220 ;;
7221
7222 -release)
7223 prev=release
7224 continue
7225 ;;
7226
7227 -rpath)
7228 prev=rpath
7229 continue
7230 ;;
7231
7232 -R)
7233 prev=xrpath
7234 continue
7235 ;;
7236
7237 -R*)
7238 func_stripname '-R' '' "$arg"
7239 dir=$func_stripname_result
7240 # We need an absolute path.
7241 case $dir in
7242 [\\/]* | [A-Za-z]:[\\/]*) ;;
7243 =*)
7244 func_stripname '=' '' "$dir"
7245 dir=$lt_sysroot$func_stripname_result
7246 ;;
7247 *)
7248 func_fatal_error "only absolute run-paths are allowed"
7249 ;;
7250 esac
7251 case "$xrpath " in
7252 *" $dir "*) ;;
7253 *) func_append xrpath " $dir" ;;
7254 esac
7255 continue
7256 ;;
7257
7258 -shared)
7259 # The effects of -shared are defined in a previous loop.
7260 continue
7261 ;;
7262
7263 -shrext)
7264 prev=shrext
7265 continue
7266 ;;
7267
7268 -static | -static-libtool-libs)
7269 # The effects of -static are defined in a previous loop.
7270 # We used to do the same as -all-static on platforms that
7271 # didn't have a PIC flag, but the assumption that the effects
7272 # would be equivalent was wrong. It would break on at least
7273 # Digital Unix and AIX.
7274 continue
7275 ;;
7276
7277 -thread-safe)
7278 thread_safe=yes
7279 continue
7280 ;;
7281
7282 -version-info)
7283 prev=vinfo
7284 continue
7285 ;;
7286
7287 -version-number)
7288 prev=vinfo
7289 vinfo_number=yes
7290 continue
7291 ;;
7292
7293 -weak)
7294 prev=weak
7295 continue
7296 ;;
7297
7298 -Wc,*)
7299 func_stripname '-Wc,' '' "$arg"
7300 args=$func_stripname_result
7301 arg=
7302 save_ifs=$IFS; IFS=,
7303 for flag in $args; do
7304 IFS=$save_ifs
7305 func_quote_for_eval "$flag"
7306 func_append arg " $func_quote_for_eval_result"
7307 func_append compiler_flags " $func_quote_for_eval_result"
7308 done
7309 IFS=$save_ifs
7310 func_stripname ' ' '' "$arg"
7311 arg=$func_stripname_result
7312 ;;
7313
7314 -Wl,*)
7315 func_stripname '-Wl,' '' "$arg"
7316 args=$func_stripname_result
7317 arg=
7318 save_ifs=$IFS; IFS=,
7319 for flag in $args; do
7320 IFS=$save_ifs
7321 func_quote_for_eval "$flag"
7322 func_append arg " $wl$func_quote_for_eval_result"
7323 func_append compiler_flags " $wl$func_quote_for_eval_result"
7324 func_append linker_flags " $func_quote_for_eval_result"
7325 done
7326 IFS=$save_ifs
7327 func_stripname ' ' '' "$arg"
7328 arg=$func_stripname_result
7329 ;;
7330
7331 -Xcompiler)
7332 prev=xcompiler
7333 continue
7334 ;;
7335
7336 -Xlinker)
7337 prev=xlinker
7338 continue
7339 ;;
7340
7341 -XCClinker)
7342 prev=xcclinker
7343 continue
7344 ;;
7345
7346 # -msg_* for osf cc
7347 -msg_*)
7348 func_quote_for_eval "$arg"
7349 arg=$func_quote_for_eval_result
7350 ;;
7351
7352 # Flags to be passed through unchanged, with rationale:
7353 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
7354 # -r[0-9][0-9]* specify processor for the SGI compiler
7355 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
7356 # +DA*, +DD* enable 64-bit mode for the HP compiler
7357 # -q* compiler args for the IBM compiler
7358 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
7359 # -F/path path to uninstalled frameworks, gcc on darwin
7360 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
7361 # -fstack-protector* stack protector flags for GCC
7362 # @file GCC response files
7363 # -tp=* Portland pgcc target processor selection
7364 # --sysroot=* for sysroot support
7365 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7366 # -specs=* GCC specs files
7367 # -stdlib=* select c++ std lib with clang
7368 # -fsanitize=* Clang/GCC memory and address sanitizer
7369 # -fuse-ld=* Linker select flags for GCC
7370 # -static-* direct GCC to link specific libraries statically
7371 # -fcilkplus Cilk Plus language extension features for C/C++
7372 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
7373 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
7374 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7375 -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
7376 func_quote_for_eval "$arg"
7377 arg=$func_quote_for_eval_result
7378 func_append compile_command " $arg"
7379 func_append finalize_command " $arg"
7380 func_append compiler_flags " $arg"
7381 continue
7382 ;;
7383
7384 -Z*)
7385 if test os2 = "`expr $host : '.*\(os2\)'`"; then
7386 # OS/2 uses -Zxxx to specify OS/2-specific options
7387 compiler_flags="$compiler_flags $arg"
7388 func_append compile_command " $arg"
7389 func_append finalize_command " $arg"
7390 case $arg in
7391 -Zlinker | -Zstack)
7392 prev=xcompiler
7393 ;;
7394 esac
7395 continue
7396 else
7397 # Otherwise treat like 'Some other compiler flag' below
7398 func_quote_for_eval "$arg"
7399 arg=$func_quote_for_eval_result
7400 fi
7401 ;;
7402
7403 # Some other compiler flag.
7404 -* | +*)
7405 func_quote_for_eval "$arg"
7406 arg=$func_quote_for_eval_result
7407 ;;
7408
7409 *.$objext)
7410 # A standard object.
7411 func_append objs " $arg"
7412 ;;
7413
7414 *.lo)
7415 # A libtool-controlled object.
7416
7417 # Check to see that this really is a libtool object.
7418 if func_lalib_unsafe_p "$arg"; then
7419 pic_object=
7420 non_pic_object=
7421
7422 # Read the .lo file
7423 func_source "$arg"
7424
7425 if test -z "$pic_object" ||
7426 test -z "$non_pic_object" ||
7427 test none = "$pic_object" &&
7428 test none = "$non_pic_object"; then
7429 func_fatal_error "cannot find name of object for '$arg'"
7430 fi
7431
7432 # Extract subdirectory from the argument.
7433 func_dirname "$arg" "/" ""
7434 xdir=$func_dirname_result
7435
7436 test none = "$pic_object" || {
7437 # Prepend the subdirectory the object is found in.
7438 pic_object=$xdir$pic_object
7439
7440 if test dlfiles = "$prev"; then
7441 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
7442 func_append dlfiles " $pic_object"
7443 prev=
7444 continue
7445 else
7446 # If libtool objects are unsupported, then we need to preload.
7447 prev=dlprefiles
7448 fi
7449 fi
7450
7451 # CHECK ME: I think I busted this. -Ossama
7452 if test dlprefiles = "$prev"; then
7453 # Preload the old-style object.
7454 func_append dlprefiles " $pic_object"
7455 prev=
7456 fi
7457
7458 # A PIC object.
7459 func_append libobjs " $pic_object"
7460 arg=$pic_object
7461 }
7462
7463 # Non-PIC object.
7464 if test none != "$non_pic_object"; then
7465 # Prepend the subdirectory the object is found in.
7466 non_pic_object=$xdir$non_pic_object
7467
7468 # A standard non-PIC object
7469 func_append non_pic_objects " $non_pic_object"
7470 if test -z "$pic_object" || test none = "$pic_object"; then
7471 arg=$non_pic_object
7472 fi
7473 else
7474 # If the PIC object exists, use it instead.
7475 # $xdir was prepended to $pic_object above.
7476 non_pic_object=$pic_object
7477 func_append non_pic_objects " $non_pic_object"
7478 fi
7479 else
7480 # Only an error if not doing a dry-run.
7481 if $opt_dry_run; then
7482 # Extract subdirectory from the argument.
7483 func_dirname "$arg" "/" ""
7484 xdir=$func_dirname_result
7485
7486 func_lo2o "$arg"
7487 pic_object=$xdir$objdir/$func_lo2o_result
7488 non_pic_object=$xdir$func_lo2o_result
7489 func_append libobjs " $pic_object"
7490 func_append non_pic_objects " $non_pic_object"
7491 else
7492 func_fatal_error "'$arg' is not a valid libtool object"
7493 fi
7494 fi
7495 ;;
7496
7497 *.$libext)
7498 # An archive.
7499 func_append deplibs " $arg"
7500 func_append old_deplibs " $arg"
7501 continue
7502 ;;
7503
7504 *.la)
7505 # A libtool-controlled library.
7506
7507 func_resolve_sysroot "$arg"
7508 if test dlfiles = "$prev"; then
7509 # This library was specified with -dlopen.
7510 func_append dlfiles " $func_resolve_sysroot_result"
7511 prev=
7512 elif test dlprefiles = "$prev"; then
7513 # The library was specified with -dlpreopen.
7514 func_append dlprefiles " $func_resolve_sysroot_result"
7515 prev=
7516 else
7517 func_append deplibs " $func_resolve_sysroot_result"
7518 fi
7519 continue
7520 ;;
7521
7522 # Some other compiler argument.
7523 *)
7524 # Unknown arguments in both finalize_command and compile_command need
7525 # to be aesthetically quoted because they are evaled later.
7526 func_quote_for_eval "$arg"
7527 arg=$func_quote_for_eval_result
7528 ;;
7529 esac # arg
7530
7531 # Now actually substitute the argument into the commands.
7532 if test -n "$arg"; then
7533 func_append compile_command " $arg"
7534 func_append finalize_command " $arg"
7535 fi
7536 done # argument parsing loop
7537
7538 test -n "$prev" && \
7539 func_fatal_help "the '$prevarg' option requires an argument"
7540
7541 if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
7542 eval arg=\"$export_dynamic_flag_spec\"
7543 func_append compile_command " $arg"
7544 func_append finalize_command " $arg"
7545 fi
7546
7547 oldlibs=
7548 # calculate the name of the file, without its directory
7549 func_basename "$output"
7550 outputname=$func_basename_result
7551 libobjs_save=$libobjs
7552
7553 if test -n "$shlibpath_var"; then
7554 # get the directories listed in $shlibpath_var
7555 eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
7556 else
7557 shlib_search_path=
7558 fi
7559 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
7560 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
7561
7562 # Definition is injected by LT_CONFIG during libtool generation.
7563 func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
7564
7565 func_dirname "$output" "/" ""
7566 output_objdir=$func_dirname_result$objdir
7567 func_to_tool_file "$output_objdir/"
7568 tool_output_objdir=$func_to_tool_file_result
7569 # Create the object directory.
7570 func_mkdir_p "$output_objdir"
7571
7572 # Determine the type of output
7573 case $output in
7574 "")
7575 func_fatal_help "you must specify an output file"
7576 ;;
7577 *.$libext) linkmode=oldlib ;;
7578 *.lo | *.$objext) linkmode=obj ;;
7579 *.la) linkmode=lib ;;
7580 *) linkmode=prog ;; # Anything else should be a program.
7581 esac
7582
7583 specialdeplibs=
7584
7585 libs=
7586 # Find all interdependent deplibs by searching for libraries
7587 # that are linked more than once (e.g. -la -lb -la)
7588 for deplib in $deplibs; do
7589 if $opt_preserve_dup_deps; then
7590 case "$libs " in
7591 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7592 esac
7593 fi
7594 func_append libs " $deplib"
7595 done
7596
7597 if test lib = "$linkmode"; then
7598 libs="$predeps $libs $compiler_lib_search_path $postdeps"
7599
7600 # Compute libraries that are listed more than once in $predeps
7601 # $postdeps and mark them as special (i.e., whose duplicates are
7602 # not to be eliminated).
7603 pre_post_deps=
7604 if $opt_duplicate_compiler_generated_deps; then
7605 for pre_post_dep in $predeps $postdeps; do
7606 case "$pre_post_deps " in
7607 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
7608 esac
7609 func_append pre_post_deps " $pre_post_dep"
7610 done
7611 fi
7612 pre_post_deps=
7613 fi
7614
7615 deplibs=
7616 newdependency_libs=
7617 newlib_search_path=
7618 need_relink=no # whether we're linking any uninstalled libtool libraries
7619 notinst_deplibs= # not-installed libtool libraries
7620 notinst_path= # paths that contain not-installed libtool libraries
7621
7622 case $linkmode in
7623 lib)
7624 passes="conv dlpreopen link"
7625 for file in $dlfiles $dlprefiles; do
7626 case $file in
7627 *.la) ;;
7628 *)
7629 func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
7630 ;;
7631 esac
7632 done
7633 ;;
7634 prog)
7635 compile_deplibs=
7636 finalize_deplibs=
7637 alldeplibs=false
7638 newdlfiles=
7639 newdlprefiles=
7640 passes="conv scan dlopen dlpreopen link"
7641 ;;
7642 *) passes="conv"
7643 ;;
7644 esac
7645
7646 for pass in $passes; do
7647 # The preopen pass in lib mode reverses $deplibs; put it back here
7648 # so that -L comes before libs that need it for instance...
7649 if test lib,link = "$linkmode,$pass"; then
7650 ## FIXME: Find the place where the list is rebuilt in the wrong
7651 ## order, and fix it there properly
7652 tmp_deplibs=
7653 for deplib in $deplibs; do
7654 tmp_deplibs="$deplib $tmp_deplibs"
7655 done
7656 deplibs=$tmp_deplibs
7657 fi
7658
7659 if test lib,link = "$linkmode,$pass" ||
7660 test prog,scan = "$linkmode,$pass"; then
7661 libs=$deplibs
7662 deplibs=
7663 fi
7664 if test prog = "$linkmode"; then
7665 case $pass in
7666 dlopen) libs=$dlfiles ;;
7667 dlpreopen) libs=$dlprefiles ;;
7668 link)
7669 libs="$deplibs %DEPLIBS%"
7670 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
7671 ;;
7672 esac
7673 fi
7674 if test lib,dlpreopen = "$linkmode,$pass"; then
7675 # Collect and forward deplibs of preopened libtool libs
7676 for lib in $dlprefiles; do
7677 # Ignore non-libtool-libs
7678 dependency_libs=
7679 func_resolve_sysroot "$lib"
7680 case $lib in
7681 *.la) func_source "$func_resolve_sysroot_result" ;;
7682 esac
7683
7684 # Collect preopened libtool deplibs, except any this library
7685 # has declared as weak libs
7686 for deplib in $dependency_libs; do
7687 func_basename "$deplib"
7688 deplib_base=$func_basename_result
7689 case " $weak_libs " in
7690 *" $deplib_base "*) ;;
7691 *) func_append deplibs " $deplib" ;;
7692 esac
7693 done
7694 done
7695 libs=$dlprefiles
7696 fi
7697 if test dlopen = "$pass"; then
7698 # Collect dlpreopened libraries
7699 save_deplibs=$deplibs
7700 deplibs=
7701 fi
7702
7703 for deplib in $libs; do
7704 lib=
7705 found=false
7706 case $deplib in
7707 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7708 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7709 if test prog,link = "$linkmode,$pass"; then
7710 compile_deplibs="$deplib $compile_deplibs"
7711 finalize_deplibs="$deplib $finalize_deplibs"
7712 else
7713 func_append compiler_flags " $deplib"
7714 if test lib = "$linkmode"; then
7715 case "$new_inherited_linker_flags " in
7716 *" $deplib "*) ;;
7717 * ) func_append new_inherited_linker_flags " $deplib" ;;
7718 esac
7719 fi
7720 fi
7721 continue
7722 ;;
7723 -l*)
7724 if test lib != "$linkmode" && test prog != "$linkmode"; then
7725 func_warning "'-l' is ignored for archives/objects"
7726 continue
7727 fi
7728 func_stripname '-l' '' "$deplib"
7729 name=$func_stripname_result
7730 if test lib = "$linkmode"; then
7731 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
7732 else
7733 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
7734 fi
7735 for searchdir in $searchdirs; do
7736 for search_ext in .la $std_shrext .so .a; do
7737 # Search the libtool library
7738 lib=$searchdir/lib$name$search_ext
7739 if test -f "$lib"; then
7740 if test .la = "$search_ext"; then
7741 found=:
7742 else
7743 found=false
7744 fi
7745 break 2
7746 fi
7747 done
7748 done
7749 if $found; then
7750 # deplib is a libtool library
7751 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
7752 # We need to do some special things here, and not later.
7753 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
7754 case " $predeps $postdeps " in
7755 *" $deplib "*)
7756 if func_lalib_p "$lib"; then
7757 library_names=
7758 old_library=
7759 func_source "$lib"
7760 for l in $old_library $library_names; do
7761 ll=$l
7762 done
7763 if test "X$ll" = "X$old_library"; then # only static version available
7764 found=false
7765 func_dirname "$lib" "" "."
7766 ladir=$func_dirname_result
7767 lib=$ladir/$old_library
7768 if test prog,link = "$linkmode,$pass"; then
7769 compile_deplibs="$deplib $compile_deplibs"
7770 finalize_deplibs="$deplib $finalize_deplibs"
7771 else
7772 deplibs="$deplib $deplibs"
7773 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7774 fi
7775 continue
7776 fi
7777 fi
7778 ;;
7779 *) ;;
7780 esac
7781 fi
7782 else
7783 # deplib doesn't seem to be a libtool library
7784 if test prog,link = "$linkmode,$pass"; then
7785 compile_deplibs="$deplib $compile_deplibs"
7786 finalize_deplibs="$deplib $finalize_deplibs"
7787 else
7788 deplibs="$deplib $deplibs"
7789 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7790 fi
7791 continue
7792 fi
7793 ;; # -l
7794 *.ltframework)
7795 if test prog,link = "$linkmode,$pass"; then
7796 compile_deplibs="$deplib $compile_deplibs"
7797 finalize_deplibs="$deplib $finalize_deplibs"
7798 else
7799 deplibs="$deplib $deplibs"
7800 if test lib = "$linkmode"; then
7801 case "$new_inherited_linker_flags " in
7802 *" $deplib "*) ;;
7803 * ) func_append new_inherited_linker_flags " $deplib" ;;
7804 esac
7805 fi
7806 fi
7807 continue
7808 ;;
7809 -L*)
7810 case $linkmode in
7811 lib)
7812 deplibs="$deplib $deplibs"
7813 test conv = "$pass" && continue
7814 newdependency_libs="$deplib $newdependency_libs"
7815 func_stripname '-L' '' "$deplib"
7816 func_resolve_sysroot "$func_stripname_result"
7817 func_append newlib_search_path " $func_resolve_sysroot_result"
7818 ;;
7819 prog)
7820 if test conv = "$pass"; then
7821 deplibs="$deplib $deplibs"
7822 continue
7823 fi
7824 if test scan = "$pass"; then
7825 deplibs="$deplib $deplibs"
7826 else
7827 compile_deplibs="$deplib $compile_deplibs"
7828 finalize_deplibs="$deplib $finalize_deplibs"
7829 fi
7830 func_stripname '-L' '' "$deplib"
7831 func_resolve_sysroot "$func_stripname_result"
7832 func_append newlib_search_path " $func_resolve_sysroot_result"
7833 ;;
7834 *)
7835 func_warning "'-L' is ignored for archives/objects"
7836 ;;
7837 esac # linkmode
7838 continue
7839 ;; # -L
7840 -R*)
7841 if test link = "$pass"; then
7842 func_stripname '-R' '' "$deplib"
7843 func_resolve_sysroot "$func_stripname_result"
7844 dir=$func_resolve_sysroot_result
7845 # Make sure the xrpath contains only unique directories.
7846 case "$xrpath " in
7847 *" $dir "*) ;;
7848 *) func_append xrpath " $dir" ;;
7849 esac
7850 fi
7851 deplibs="$deplib $deplibs"
7852 continue
7853 ;;
7854 *.la)
7855 func_resolve_sysroot "$deplib"
7856 lib=$func_resolve_sysroot_result
7857 ;;
7858 *.$libext)
7859 if test conv = "$pass"; then
7860 deplibs="$deplib $deplibs"
7861 continue
7862 fi
7863 case $linkmode in
7864 lib)
7865 # Linking convenience modules into shared libraries is allowed,
7866 # but linking other static libraries is non-portable.
7867 case " $dlpreconveniencelibs " in
7868 *" $deplib "*) ;;
7869 *)
7870 valid_a_lib=false
7871 case $deplibs_check_method in
7872 match_pattern*)
7873 set dummy $deplibs_check_method; shift
7874 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7875 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
7876 | $EGREP "$match_pattern_regex" > /dev/null; then
7877 valid_a_lib=:
7878 fi
7879 ;;
7880 pass_all)
7881 valid_a_lib=:
7882 ;;
7883 esac
7884 if $valid_a_lib; then
7885 echo
7886 $ECHO "*** Warning: Linking the shared library $output against the"
7887 $ECHO "*** static library $deplib is not portable!"
7888 deplibs="$deplib $deplibs"
7889 else
7890 echo
7891 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
7892 echo "*** I have the capability to make that library automatically link in when"
7893 echo "*** you link to this library. But I can only do this if you have a"
7894 echo "*** shared version of the library, which you do not appear to have"
7895 echo "*** because the file extensions .$libext of this argument makes me believe"
7896 echo "*** that it is just a static archive that I should not use here."
7897 fi
7898 ;;
7899 esac
7900 continue
7901 ;;
7902 prog)
7903 if test link != "$pass"; then
7904 deplibs="$deplib $deplibs"
7905 else
7906 compile_deplibs="$deplib $compile_deplibs"
7907 finalize_deplibs="$deplib $finalize_deplibs"
7908 fi
7909 continue
7910 ;;
7911 esac # linkmode
7912 ;; # *.$libext
7913 *.lo | *.$objext)
7914 if test conv = "$pass"; then
7915 deplibs="$deplib $deplibs"
7916 elif test prog = "$linkmode"; then
7917 if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
7918 # If there is no dlopen support or we're linking statically,
7919 # we need to preload.
7920 func_append newdlprefiles " $deplib"
7921 compile_deplibs="$deplib $compile_deplibs"
7922 finalize_deplibs="$deplib $finalize_deplibs"
7923 else
7924 func_append newdlfiles " $deplib"
7925 fi
7926 fi
7927 continue
7928 ;;
7929 %DEPLIBS%)
7930 alldeplibs=:
7931 continue
7932 ;;
7933 esac # case $deplib
7934
7935 $found || test -f "$lib" \
7936 || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
7937
7938 # Check to see that this really is a libtool archive.
7939 func_lalib_unsafe_p "$lib" \
7940 || func_fatal_error "'$lib' is not a valid libtool archive"
7941
7942 func_dirname "$lib" "" "."
7943 ladir=$func_dirname_result
7944
7945 dlname=
7946 dlopen=
7947 dlpreopen=
7948 libdir=
7949 library_names=
7950 old_library=
7951 inherited_linker_flags=
7952 # If the library was installed with an old release of libtool,
7953 # it will not redefine variables installed, or shouldnotlink
7954 installed=yes
7955 shouldnotlink=no
7956 avoidtemprpath=
7957
7958
7959 # Read the .la file
7960 func_source "$lib"
7961
7962 # Convert "-framework foo" to "foo.ltframework"
7963 if test -n "$inherited_linker_flags"; then
7964 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
7965 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
7966 case " $new_inherited_linker_flags " in
7967 *" $tmp_inherited_linker_flag "*) ;;
7968 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
7969 esac
7970 done
7971 fi
7972 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7973 if test lib,link = "$linkmode,$pass" ||
7974 test prog,scan = "$linkmode,$pass" ||
7975 { test prog != "$linkmode" && test lib != "$linkmode"; }; then
7976 test -n "$dlopen" && func_append dlfiles " $dlopen"
7977 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
7978 fi
7979
7980 if test conv = "$pass"; then
7981 # Only check for convenience libraries
7982 deplibs="$lib $deplibs"
7983 if test -z "$libdir"; then
7984 if test -z "$old_library"; then
7985 func_fatal_error "cannot find name of link library for '$lib'"
7986 fi
7987 # It is a libtool convenience library, so add in its objects.
7988 func_append convenience " $ladir/$objdir/$old_library"
7989 func_append old_convenience " $ladir/$objdir/$old_library"
7990 tmp_libs=
7991 for deplib in $dependency_libs; do
7992 deplibs="$deplib $deplibs"
7993 if $opt_preserve_dup_deps; then
7994 case "$tmp_libs " in
7995 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7996 esac
7997 fi
7998 func_append tmp_libs " $deplib"
7999 done
8000 elif test prog != "$linkmode" && test lib != "$linkmode"; then
8001 func_fatal_error "'$lib' is not a convenience library"
8002 fi
8003 continue
8004 fi # $pass = conv
8005
8006
8007 # Get the name of the library we link against.
8008 linklib=
8009 if test -n "$old_library" &&
8010 { test yes = "$prefer_static_libs" ||
8011 test built,no = "$prefer_static_libs,$installed"; }; then
8012 linklib=$old_library
8013 else
8014 for l in $old_library $library_names; do
8015 linklib=$l
8016 done
8017 fi
8018 if test -z "$linklib"; then
8019 func_fatal_error "cannot find name of link library for '$lib'"
8020 fi
8021
8022 # This library was specified with -dlopen.
8023 if test dlopen = "$pass"; then
8024 test -z "$libdir" \
8025 && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
8026 if test -z "$dlname" ||
8027 test yes != "$dlopen_support" ||
8028 test no = "$build_libtool_libs"
8029 then
8030 # If there is no dlname, no dlopen support or we're linking
8031 # statically, we need to preload. We also need to preload any
8032 # dependent libraries so libltdl's deplib preloader doesn't
8033 # bomb out in the load deplibs phase.
8034 func_append dlprefiles " $lib $dependency_libs"
8035 else
8036 func_append newdlfiles " $lib"
8037 fi
8038 continue
8039 fi # $pass = dlopen
8040
8041 # We need an absolute path.
8042 case $ladir in
8043 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
8044 *)
8045 abs_ladir=`cd "$ladir" && pwd`
8046 if test -z "$abs_ladir"; then
8047 func_warning "cannot determine absolute directory name of '$ladir'"
8048 func_warning "passing it literally to the linker, although it might fail"
8049 abs_ladir=$ladir
8050 fi
8051 ;;
8052 esac
8053 func_basename "$lib"
8054 laname=$func_basename_result
8055
8056 # Find the relevant object directory and library name.
8057 if test yes = "$installed"; then
8058 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
8059 func_warning "library '$lib' was moved."
8060 dir=$ladir
8061 absdir=$abs_ladir
8062 libdir=$abs_ladir
8063 else
8064 dir=$lt_sysroot$libdir
8065 absdir=$lt_sysroot$libdir
8066 fi
8067 test yes = "$hardcode_automatic" && avoidtemprpath=yes
8068 else
8069 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
8070 dir=$ladir
8071 absdir=$abs_ladir
8072 # Remove this search path later
8073 func_append notinst_path " $abs_ladir"
8074 else
8075 dir=$ladir/$objdir
8076 absdir=$abs_ladir/$objdir
8077 # Remove this search path later
8078 func_append notinst_path " $abs_ladir"
8079 fi
8080 fi # $installed = yes
8081 func_stripname 'lib' '.la' "$laname"
8082 name=$func_stripname_result
8083
8084 # This library was specified with -dlpreopen.
8085 if test dlpreopen = "$pass"; then
8086 if test -z "$libdir" && test prog = "$linkmode"; then
8087 func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
8088 fi
8089 case $host in
8090 # special handling for platforms with PE-DLLs.
8091 *cygwin* | *mingw* | *cegcc* )
8092 # Linker will automatically link against shared library if both
8093 # static and shared are present. Therefore, ensure we extract
8094 # symbols from the import library if a shared library is present
8095 # (otherwise, the dlopen module name will be incorrect). We do
8096 # this by putting the import library name into $newdlprefiles.
8097 # We recover the dlopen module name by 'saving' the la file
8098 # name in a special purpose variable, and (later) extracting the
8099 # dlname from the la file.
8100 if test -n "$dlname"; then
8101 func_tr_sh "$dir/$linklib"
8102 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
8103 func_append newdlprefiles " $dir/$linklib"
8104 else
8105 func_append newdlprefiles " $dir/$old_library"
8106 # Keep a list of preopened convenience libraries to check
8107 # that they are being used correctly in the link pass.
8108 test -z "$libdir" && \
8109 func_append dlpreconveniencelibs " $dir/$old_library"
8110 fi
8111 ;;
8112 * )
8113 # Prefer using a static library (so that no silly _DYNAMIC symbols
8114 # are required to link).
8115 if test -n "$old_library"; then
8116 func_append newdlprefiles " $dir/$old_library"
8117 # Keep a list of preopened convenience libraries to check
8118 # that they are being used correctly in the link pass.
8119 test -z "$libdir" && \
8120 func_append dlpreconveniencelibs " $dir/$old_library"
8121 # Otherwise, use the dlname, so that lt_dlopen finds it.
8122 elif test -n "$dlname"; then
8123 func_append newdlprefiles " $dir/$dlname"
8124 else
8125 func_append newdlprefiles " $dir/$linklib"
8126 fi
8127 ;;
8128 esac
8129 fi # $pass = dlpreopen
8130
8131 if test -z "$libdir"; then
8132 # Link the convenience library
8133 if test lib = "$linkmode"; then
8134 deplibs="$dir/$old_library $deplibs"
8135 elif test prog,link = "$linkmode,$pass"; then
8136 compile_deplibs="$dir/$old_library $compile_deplibs"
8137 finalize_deplibs="$dir/$old_library $finalize_deplibs"
8138 else
8139 deplibs="$lib $deplibs" # used for prog,scan pass
8140 fi
8141 continue
8142 fi
8143
8144
8145 if test prog = "$linkmode" && test link != "$pass"; then
8146 func_append newlib_search_path " $ladir"
8147 deplibs="$lib $deplibs"
8148
8149 linkalldeplibs=false
8150 if test no != "$link_all_deplibs" || test -z "$library_names" ||
8151 test no = "$build_libtool_libs"; then
8152 linkalldeplibs=:
8153 fi
8154
8155 tmp_libs=
8156 for deplib in $dependency_libs; do
8157 case $deplib in
8158 -L*) func_stripname '-L' '' "$deplib"
8159 func_resolve_sysroot "$func_stripname_result"
8160 func_append newlib_search_path " $func_resolve_sysroot_result"
8161 ;;
8162 esac
8163 # Need to link against all dependency_libs?
8164 if $linkalldeplibs; then
8165 deplibs="$deplib $deplibs"
8166 else
8167 # Need to hardcode shared library paths
8168 # or/and link against static libraries
8169 newdependency_libs="$deplib $newdependency_libs"
8170 fi
8171 if $opt_preserve_dup_deps; then
8172 case "$tmp_libs " in
8173 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
8174 esac
8175 fi
8176 func_append tmp_libs " $deplib"
8177 done # for deplib
8178 continue
8179 fi # $linkmode = prog...
8180
8181 if test prog,link = "$linkmode,$pass"; then
8182 if test -n "$library_names" &&
8183 { { test no = "$prefer_static_libs" ||
8184 test built,yes = "$prefer_static_libs,$installed"; } ||
8185 test -z "$old_library"; }; then
8186 # We need to hardcode the library path
8187 if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
8188 # Make sure the rpath contains only unique directories.
8189 case $temp_rpath: in
8190 *"$absdir:"*) ;;
8191 *) func_append temp_rpath "$absdir:" ;;
8192 esac
8193 fi
8194
8195 # Hardcode the library path.
8196 # Skip directories that are in the system default run-time
8197 # search path.
8198 case " $sys_lib_dlsearch_path " in
8199 *" $absdir "*) ;;
8200 *)
8201 case "$compile_rpath " in
8202 *" $absdir "*) ;;
8203 *) func_append compile_rpath " $absdir" ;;
8204 esac
8205 ;;
8206 esac
8207 case " $sys_lib_dlsearch_path " in
8208 *" $libdir "*) ;;
8209 *)
8210 case "$finalize_rpath " in
8211 *" $libdir "*) ;;
8212 *) func_append finalize_rpath " $libdir" ;;
8213 esac
8214 ;;
8215 esac
8216 fi # $linkmode,$pass = prog,link...
8217
8218 if $alldeplibs &&
8219 { test pass_all = "$deplibs_check_method" ||
8220 { test yes = "$build_libtool_libs" &&
8221 test -n "$library_names"; }; }; then
8222 # We only need to search for static libraries
8223 continue
8224 fi
8225 fi
8226
8227 link_static=no # Whether the deplib will be linked statically
8228 use_static_libs=$prefer_static_libs
8229 if test built = "$use_static_libs" && test yes = "$installed"; then
8230 use_static_libs=no
8231 fi
8232 if test -n "$library_names" &&
8233 { test no = "$use_static_libs" || test -z "$old_library"; }; then
8234 case $host in
8235 *cygwin* | *mingw* | *cegcc* | *os2*)
8236 # No point in relinking DLLs because paths are not encoded
8237 func_append notinst_deplibs " $lib"
8238 need_relink=no
8239 ;;
8240 *)
8241 if test no = "$installed"; then
8242 func_append notinst_deplibs " $lib"
8243 need_relink=yes
8244 fi
8245 ;;
8246 esac
8247 # This is a shared library
8248
8249 # Warn about portability, can't link against -module's on some
8250 # systems (darwin). Don't bleat about dlopened modules though!
8251 dlopenmodule=
8252 for dlpremoduletest in $dlprefiles; do
8253 if test "X$dlpremoduletest" = "X$lib"; then
8254 dlopenmodule=$dlpremoduletest
8255 break
8256 fi
8257 done
8258 if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
8259 echo
8260 if test prog = "$linkmode"; then
8261 $ECHO "*** Warning: Linking the executable $output against the loadable module"
8262 else
8263 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
8264 fi
8265 $ECHO "*** $linklib is not portable!"
8266 fi
8267 if test lib = "$linkmode" &&
8268 test yes = "$hardcode_into_libs"; then
8269 # Hardcode the library path.
8270 # Skip directories that are in the system default run-time
8271 # search path.
8272 case " $sys_lib_dlsearch_path " in
8273 *" $absdir "*) ;;
8274 *)
8275 case "$compile_rpath " in
8276 *" $absdir "*) ;;
8277 *) func_append compile_rpath " $absdir" ;;
8278 esac
8279 ;;
8280 esac
8281 case " $sys_lib_dlsearch_path " in
8282 *" $libdir "*) ;;
8283 *)
8284 case "$finalize_rpath " in
8285 *" $libdir "*) ;;
8286 *) func_append finalize_rpath " $libdir" ;;
8287 esac
8288 ;;
8289 esac
8290 fi
8291
8292 if test -n "$old_archive_from_expsyms_cmds"; then
8293 # figure out the soname
8294 set dummy $library_names
8295 shift
8296 realname=$1
8297 shift
8298 libname=`eval "\\$ECHO \"$libname_spec\""`
8299 # use dlname if we got it. it's perfectly good, no?
8300 if test -n "$dlname"; then
8301 soname=$dlname
8302 elif test -n "$soname_spec"; then
8303 # bleh windows
8304 case $host in
8305 *cygwin* | mingw* | *cegcc* | *os2*)
8306 func_arith $current - $age
8307 major=$func_arith_result
8308 versuffix=-$major
8309 ;;
8310 esac
8311 eval soname=\"$soname_spec\"
8312 else
8313 soname=$realname
8314 fi
8315
8316 # Make a new name for the extract_expsyms_cmds to use
8317 soroot=$soname
8318 func_basename "$soroot"
8319 soname=$func_basename_result
8320 func_stripname 'lib' '.dll' "$soname"
8321 newlib=libimp-$func_stripname_result.a
8322
8323 # If the library has no export list, then create one now
8324 if test -f "$output_objdir/$soname-def"; then :
8325 else
8326 func_verbose "extracting exported symbol list from '$soname'"
8327 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
8328 fi
8329
8330 # Create $newlib
8331 if test -f "$output_objdir/$newlib"; then :; else
8332 func_verbose "generating import library for '$soname'"
8333 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
8334 fi
8335 # make sure the library variables are pointing to the new library
8336 dir=$output_objdir
8337 linklib=$newlib
8338 fi # test -n "$old_archive_from_expsyms_cmds"
8339
8340 if test prog = "$linkmode" || test relink != "$opt_mode"; then
8341 add_shlibpath=
8342 add_dir=
8343 add=
8344 lib_linked=yes
8345 case $hardcode_action in
8346 immediate | unsupported)
8347 if test no = "$hardcode_direct"; then
8348 add=$dir/$linklib
8349 case $host in
8350 *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
8351 *-*-sysv4*uw2*) add_dir=-L$dir ;;
8352 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
8353 *-*-unixware7*) add_dir=-L$dir ;;
8354 *-*-darwin* )
8355 # if the lib is a (non-dlopened) module then we cannot
8356 # link against it, someone is ignoring the earlier warnings
8357 if /usr/bin/file -L $add 2> /dev/null |
8358 $GREP ": [^:]* bundle" >/dev/null; then
8359 if test "X$dlopenmodule" != "X$lib"; then
8360 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
8361 if test -z "$old_library"; then
8362 echo
8363 echo "*** And there doesn't seem to be a static archive available"
8364 echo "*** The link will probably fail, sorry"
8365 else
8366 add=$dir/$old_library
8367 fi
8368 elif test -n "$old_library"; then
8369 add=$dir/$old_library
8370 fi
8371 fi
8372 esac
8373 elif test no = "$hardcode_minus_L"; then
8374 case $host in
8375 *-*-sunos*) add_shlibpath=$dir ;;
8376 esac
8377 add_dir=-L$dir
8378 add=-l$name
8379 elif test no = "$hardcode_shlibpath_var"; then
8380 add_shlibpath=$dir
8381 add=-l$name
8382 else
8383 lib_linked=no
8384 fi
8385 ;;
8386 relink)
8387 if test yes = "$hardcode_direct" &&
8388 test no = "$hardcode_direct_absolute"; then
8389 add=$dir/$linklib
8390 elif test yes = "$hardcode_minus_L"; then
8391 add_dir=-L$absdir
8392 # Try looking first in the location we're being installed to.
8393 if test -n "$inst_prefix_dir"; then
8394 case $libdir in
8395 [\\/]*)
8396 func_append add_dir " -L$inst_prefix_dir$libdir"
8397 ;;
8398 esac
8399 fi
8400 add=-l$name
8401 elif test yes = "$hardcode_shlibpath_var"; then
8402 add_shlibpath=$dir
8403 add=-l$name
8404 else
8405 lib_linked=no
8406 fi
8407 ;;
8408 *) lib_linked=no ;;
8409 esac
8410
8411 if test yes != "$lib_linked"; then
8412 func_fatal_configuration "unsupported hardcode properties"
8413 fi
8414
8415 if test -n "$add_shlibpath"; then
8416 case :$compile_shlibpath: in
8417 *":$add_shlibpath:"*) ;;
8418 *) func_append compile_shlibpath "$add_shlibpath:" ;;
8419 esac
8420 fi
8421 if test prog = "$linkmode"; then
8422 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
8423 test -n "$add" && compile_deplibs="$add $compile_deplibs"
8424 else
8425 test -n "$add_dir" && deplibs="$add_dir $deplibs"
8426 test -n "$add" && deplibs="$add $deplibs"
8427 if test yes != "$hardcode_direct" &&
8428 test yes != "$hardcode_minus_L" &&
8429 test yes = "$hardcode_shlibpath_var"; then
8430 case :$finalize_shlibpath: in
8431 *":$libdir:"*) ;;
8432 *) func_append finalize_shlibpath "$libdir:" ;;
8433 esac
8434 fi
8435 fi
8436 fi
8437
8438 if test prog = "$linkmode" || test relink = "$opt_mode"; then
8439 add_shlibpath=
8440 add_dir=
8441 add=
8442 # Finalize command for both is simple: just hardcode it.
8443 if test yes = "$hardcode_direct" &&
8444 test no = "$hardcode_direct_absolute"; then
8445 add=$libdir/$linklib
8446 elif test yes = "$hardcode_minus_L"; then
8447 add_dir=-L$libdir
8448 add=-l$name
8449 elif test yes = "$hardcode_shlibpath_var"; then
8450 case :$finalize_shlibpath: in
8451 *":$libdir:"*) ;;
8452 *) func_append finalize_shlibpath "$libdir:" ;;
8453 esac
8454 add=-l$name
8455 elif test yes = "$hardcode_automatic"; then
8456 if test -n "$inst_prefix_dir" &&
8457 test -f "$inst_prefix_dir$libdir/$linklib"; then
8458 add=$inst_prefix_dir$libdir/$linklib
8459 else
8460 add=$libdir/$linklib
8461 fi
8462 else
8463 # We cannot seem to hardcode it, guess we'll fake it.
8464 add_dir=-L$libdir
8465 # Try looking first in the location we're being installed to.
8466 if test -n "$inst_prefix_dir"; then
8467 case $libdir in
8468 [\\/]*)
8469 func_append add_dir " -L$inst_prefix_dir$libdir"
8470 ;;
8471 esac
8472 fi
8473 add=-l$name
8474 fi
8475
8476 if test prog = "$linkmode"; then
8477 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
8478 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
8479 else
8480 test -n "$add_dir" && deplibs="$add_dir $deplibs"
8481 test -n "$add" && deplibs="$add $deplibs"
8482 fi
8483 fi
8484 elif test prog = "$linkmode"; then
8485 # Here we assume that one of hardcode_direct or hardcode_minus_L
8486 # is not unsupported. This is valid on all known static and
8487 # shared platforms.
8488 if test unsupported != "$hardcode_direct"; then
8489 test -n "$old_library" && linklib=$old_library
8490 compile_deplibs="$dir/$linklib $compile_deplibs"
8491 finalize_deplibs="$dir/$linklib $finalize_deplibs"
8492 else
8493 compile_deplibs="-l$name -L$dir $compile_deplibs"
8494 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
8495 fi
8496 elif test yes = "$build_libtool_libs"; then
8497 # Not a shared library
8498 if test pass_all != "$deplibs_check_method"; then
8499 # We're trying link a shared library against a static one
8500 # but the system doesn't support it.
8501
8502 # Just print a warning and add the library to dependency_libs so
8503 # that the program can be linked against the static library.
8504 echo
8505 $ECHO "*** Warning: This system cannot link to static lib archive $lib."
8506 echo "*** I have the capability to make that library automatically link in when"
8507 echo "*** you link to this library. But I can only do this if you have a"
8508 echo "*** shared version of the library, which you do not appear to have."
8509 if test yes = "$module"; then
8510 echo "*** But as you try to build a module library, libtool will still create "
8511 echo "*** a static module, that should work as long as the dlopening application"
8512 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
8513 if test -z "$global_symbol_pipe"; then
8514 echo
8515 echo "*** However, this would only work if libtool was able to extract symbol"
8516 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
8517 echo "*** not find such a program. So, this module is probably useless."
8518 echo "*** 'nm' from GNU binutils and a full rebuild may help."
8519 fi
8520 if test no = "$build_old_libs"; then
8521 build_libtool_libs=module
8522 build_old_libs=yes
8523 else
8524 build_libtool_libs=no
8525 fi
8526 fi
8527 else
8528 deplibs="$dir/$old_library $deplibs"
8529 link_static=yes
8530 fi
8531 fi # link shared/static library?
8532
8533 if test lib = "$linkmode"; then
8534 if test -n "$dependency_libs" &&
8535 { test yes != "$hardcode_into_libs" ||
8536 test yes = "$build_old_libs" ||
8537 test yes = "$link_static"; }; then
8538 # Extract -R from dependency_libs
8539 temp_deplibs=
8540 for libdir in $dependency_libs; do
8541 case $libdir in
8542 -R*) func_stripname '-R' '' "$libdir"
8543 temp_xrpath=$func_stripname_result
8544 case " $xrpath " in
8545 *" $temp_xrpath "*) ;;
8546 *) func_append xrpath " $temp_xrpath";;
8547 esac;;
8548 *) func_append temp_deplibs " $libdir";;
8549 esac
8550 done
8551 dependency_libs=$temp_deplibs
8552 fi
8553
8554 func_append newlib_search_path " $absdir"
8555 # Link against this library
8556 test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
8557 # ... and its dependency_libs
8558 tmp_libs=
8559 for deplib in $dependency_libs; do
8560 newdependency_libs="$deplib $newdependency_libs"
8561 case $deplib in
8562 -L*) func_stripname '-L' '' "$deplib"
8563 func_resolve_sysroot "$func_stripname_result";;
8564 *) func_resolve_sysroot "$deplib" ;;
8565 esac
8566 if $opt_preserve_dup_deps; then
8567 case "$tmp_libs " in
8568 *" $func_resolve_sysroot_result "*)
8569 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
8570 esac
8571 fi
8572 func_append tmp_libs " $func_resolve_sysroot_result"
8573 done
8574
8575 if test no != "$link_all_deplibs"; then
8576 # Add the search paths of all dependency libraries
8577 for deplib in $dependency_libs; do
8578 path=
8579 case $deplib in
8580 -L*) path=$deplib ;;
8581 *.la)
8582 func_resolve_sysroot "$deplib"
8583 deplib=$func_resolve_sysroot_result
8584 func_dirname "$deplib" "" "."
8585 dir=$func_dirname_result
8586 # We need an absolute path.
8587 case $dir in
8588 [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
8589 *)
8590 absdir=`cd "$dir" && pwd`
8591 if test -z "$absdir"; then
8592 func_warning "cannot determine absolute directory name of '$dir'"
8593 absdir=$dir
8594 fi
8595 ;;
8596 esac
8597 if $GREP "^installed=no" $deplib > /dev/null; then
8598 case $host in
8599 *-*-darwin*)
8600 depdepl=
8601 eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
8602 if test -n "$deplibrary_names"; then
8603 for tmp in $deplibrary_names; do
8604 depdepl=$tmp
8605 done
8606 if test -f "$absdir/$objdir/$depdepl"; then
8607 depdepl=$absdir/$objdir/$depdepl
8608 darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8609 if test -z "$darwin_install_name"; then
8610 darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8611 fi
8612 func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
8613 func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
8614 path=
8615 fi
8616 fi
8617 ;;
8618 *)
8619 path=-L$absdir/$objdir
8620 ;;
8621 esac
8622 else
8623 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8624 test -z "$libdir" && \
8625 func_fatal_error "'$deplib' is not a valid libtool archive"
8626 test "$absdir" != "$libdir" && \
8627 func_warning "'$deplib' seems to be moved"
8628
8629 path=-L$absdir
8630 fi
8631 ;;
8632 esac
8633 case " $deplibs " in
8634 *" $path "*) ;;
8635 *) deplibs="$path $deplibs" ;;
8636 esac
8637 done
8638 fi # link_all_deplibs != no
8639 fi # linkmode = lib
8640 done # for deplib in $libs
8641 if test link = "$pass"; then
8642 if test prog = "$linkmode"; then
8643 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
8644 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
8645 else
8646 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8647 fi
8648 fi
8649 dependency_libs=$newdependency_libs
8650 if test dlpreopen = "$pass"; then
8651 # Link the dlpreopened libraries before other libraries
8652 for deplib in $save_deplibs; do
8653 deplibs="$deplib $deplibs"
8654 done
8655 fi
8656 if test dlopen != "$pass"; then
8657 test conv = "$pass" || {
8658 # Make sure lib_search_path contains only unique directories.
8659 lib_search_path=
8660 for dir in $newlib_search_path; do
8661 case "$lib_search_path " in
8662 *" $dir "*) ;;
8663 *) func_append lib_search_path " $dir" ;;
8664 esac
8665 done
8666 newlib_search_path=
8667 }
8668
8669 if test prog,link = "$linkmode,$pass"; then
8670 vars="compile_deplibs finalize_deplibs"
8671 else
8672 vars=deplibs
8673 fi
8674 for var in $vars dependency_libs; do
8675 # Add libraries to $var in reverse order
8676 eval tmp_libs=\"\$$var\"
8677 new_libs=
8678 for deplib in $tmp_libs; do
8679 # FIXME: Pedantically, this is the right thing to do, so
8680 # that some nasty dependency loop isn't accidentally
8681 # broken:
8682 #new_libs="$deplib $new_libs"
8683 # Pragmatically, this seems to cause very few problems in
8684 # practice:
8685 case $deplib in
8686 -L*) new_libs="$deplib $new_libs" ;;
8687 -R*) ;;
8688 *)
8689 # And here is the reason: when a library appears more
8690 # than once as an explicit dependence of a library, or
8691 # is implicitly linked in more than once by the
8692 # compiler, it is considered special, and multiple
8693 # occurrences thereof are not removed. Compare this
8694 # with having the same library being listed as a
8695 # dependency of multiple other libraries: in this case,
8696 # we know (pedantically, we assume) the library does not
8697 # need to be listed more than once, so we keep only the
8698 # last copy. This is not always right, but it is rare
8699 # enough that we require users that really mean to play
8700 # such unportable linking tricks to link the library
8701 # using -Wl,-lname, so that libtool does not consider it
8702 # for duplicate removal.
8703 case " $specialdeplibs " in
8704 *" $deplib "*) new_libs="$deplib $new_libs" ;;
8705 *)
8706 case " $new_libs " in
8707 *" $deplib "*) ;;
8708 *) new_libs="$deplib $new_libs" ;;
8709 esac
8710 ;;
8711 esac
8712 ;;
8713 esac
8714 done
8715 tmp_libs=
8716 for deplib in $new_libs; do
8717 case $deplib in
8718 -L*)
8719 case " $tmp_libs " in
8720 *" $deplib "*) ;;
8721 *) func_append tmp_libs " $deplib" ;;
8722 esac
8723 ;;
8724 *) func_append tmp_libs " $deplib" ;;
8725 esac
8726 done
8727 eval $var=\"$tmp_libs\"
8728 done # for var
8729 fi
8730
8731 # Add Sun CC postdeps if required:
8732 test CXX = "$tagname" && {
8733 case $host_os in
8734 linux*)
8735 case `$CC -V 2>&1 | sed 5q` in
8736 *Sun\ C*) # Sun C++ 5.9
8737 func_suncc_cstd_abi
8738
8739 if test no != "$suncc_use_cstd_abi"; then
8740 func_append postdeps ' -library=Cstd -library=Crun'
8741 fi
8742 ;;
8743 esac
8744 ;;
8745
8746 solaris*)
8747 func_cc_basename "$CC"
8748 case $func_cc_basename_result in
8749 CC* | sunCC*)
8750 func_suncc_cstd_abi
8751
8752 if test no != "$suncc_use_cstd_abi"; then
8753 func_append postdeps ' -library=Cstd -library=Crun'
8754 fi
8755 ;;
8756 esac
8757 ;;
8758 esac
8759 }
8760
8761 # Last step: remove runtime libs from dependency_libs
8762 # (they stay in deplibs)
8763 tmp_libs=
8764 for i in $dependency_libs; do
8765 case " $predeps $postdeps $compiler_lib_search_path " in
8766 *" $i "*)
8767 i=
8768 ;;
8769 esac
8770 if test -n "$i"; then
8771 func_append tmp_libs " $i"
8772 fi
8773 done
8774 dependency_libs=$tmp_libs
8775 done # for pass
8776 if test prog = "$linkmode"; then
8777 dlfiles=$newdlfiles
8778 fi
8779 if test prog = "$linkmode" || test lib = "$linkmode"; then
8780 dlprefiles=$newdlprefiles
8781 fi
8782
8783 case $linkmode in
8784 oldlib)
8785 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
8786 func_warning "'-dlopen' is ignored for archives"
8787 fi
8788
8789 case " $deplibs" in
8790 *\ -l* | *\ -L*)
8791 func_warning "'-l' and '-L' are ignored for archives" ;;
8792 esac
8793
8794 test -n "$rpath" && \
8795 func_warning "'-rpath' is ignored for archives"
8796
8797 test -n "$xrpath" && \
8798 func_warning "'-R' is ignored for archives"
8799
8800 test -n "$vinfo" && \
8801 func_warning "'-version-info/-version-number' is ignored for archives"
8802
8803 test -n "$release" && \
8804 func_warning "'-release' is ignored for archives"
8805
8806 test -n "$export_symbols$export_symbols_regex" && \
8807 func_warning "'-export-symbols' is ignored for archives"
8808
8809 # Now set the variables for building old libraries.
8810 build_libtool_libs=no
8811 oldlibs=$output
8812 func_append objs "$old_deplibs"
8813 ;;
8814
8815 lib)
8816 # Make sure we only generate libraries of the form 'libNAME.la'.
8817 case $outputname in
8818 lib*)
8819 func_stripname 'lib' '.la' "$outputname"
8820 name=$func_stripname_result
8821 eval shared_ext=\"$shrext_cmds\"
8822 eval libname=\"$libname_spec\"
8823 ;;
8824 *)
8825 test no = "$module" \
8826 && func_fatal_help "libtool library '$output' must begin with 'lib'"
8827
8828 if test no != "$need_lib_prefix"; then
8829 # Add the "lib" prefix for modules if required
8830 func_stripname '' '.la' "$outputname"
8831 name=$func_stripname_result
8832 eval shared_ext=\"$shrext_cmds\"
8833 eval libname=\"$libname_spec\"
8834 else
8835 func_stripname '' '.la' "$outputname"
8836 libname=$func_stripname_result
8837 fi
8838 ;;
8839 esac
8840
8841 if test -n "$objs"; then
8842 if test pass_all != "$deplibs_check_method"; then
8843 func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
8844 else
8845 echo
8846 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
8847 $ECHO "*** objects $objs is not portable!"
8848 func_append libobjs " $objs"
8849 fi
8850 fi
8851
8852 test no = "$dlself" \
8853 || func_warning "'-dlopen self' is ignored for libtool libraries"
8854
8855 set dummy $rpath
8856 shift
8857 test 1 -lt "$#" \
8858 && func_warning "ignoring multiple '-rpath's for a libtool library"
8859
8860 install_libdir=$1
8861
8862 oldlibs=
8863 if test -z "$rpath"; then
8864 if test yes = "$build_libtool_libs"; then
8865 # Building a libtool convenience library.
8866 # Some compilers have problems with a '.al' extension so
8867 # convenience libraries should have the same extension an
8868 # archive normally would.
8869 oldlibs="$output_objdir/$libname.$libext $oldlibs"
8870 build_libtool_libs=convenience
8871 build_old_libs=yes
8872 fi
8873
8874 test -n "$vinfo" && \
8875 func_warning "'-version-info/-version-number' is ignored for convenience libraries"
8876
8877 test -n "$release" && \
8878 func_warning "'-release' is ignored for convenience libraries"
8879 else
8880
8881 # Parse the version information argument.
8882 save_ifs=$IFS; IFS=:
8883 set dummy $vinfo 0 0 0
8884 shift
8885 IFS=$save_ifs
8886
8887 test -n "$7" && \
8888 func_fatal_help "too many parameters to '-version-info'"
8889
8890 # convert absolute version numbers to libtool ages
8891 # this retains compatibility with .la files and attempts
8892 # to make the code below a bit more comprehensible
8893
8894 case $vinfo_number in
8895 yes)
8896 number_major=$1
8897 number_minor=$2
8898 number_revision=$3
8899 #
8900 # There are really only two kinds -- those that
8901 # use the current revision as the major version
8902 # and those that subtract age and use age as
8903 # a minor version. But, then there is irix
8904 # that has an extra 1 added just for fun
8905 #
8906 case $version_type in
8907 # correct linux to gnu/linux during the next big refactor
8908 darwin|freebsd-elf|linux|osf|windows|none)
8909 func_arith $number_major + $number_minor
8910 current=$func_arith_result
8911 age=$number_minor
8912 revision=$number_revision
8913 ;;
8914 freebsd-aout|qnx|sunos)
8915 current=$number_major
8916 revision=$number_minor
8917 age=0
8918 ;;
8919 irix|nonstopux)
8920 func_arith $number_major + $number_minor
8921 current=$func_arith_result
8922 age=$number_minor
8923 revision=$number_minor
8924 lt_irix_increment=no
8925 ;;
8926 *)
8927 func_fatal_configuration "$modename: unknown library version type '$version_type'"
8928 ;;
8929 esac
8930 ;;
8931 no)
8932 current=$1
8933 revision=$2
8934 age=$3
8935 ;;
8936 esac
8937
8938 # Check that each of the things are valid numbers.
8939 case $current in
8940 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]) ;;
8941 *)
8942 func_error "CURRENT '$current' must be a nonnegative integer"
8943 func_fatal_error "'$vinfo' is not valid version information"
8944 ;;
8945 esac
8946
8947 case $revision in
8948 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]) ;;
8949 *)
8950 func_error "REVISION '$revision' must be a nonnegative integer"
8951 func_fatal_error "'$vinfo' is not valid version information"
8952 ;;
8953 esac
8954
8955 case $age in
8956 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]) ;;
8957 *)
8958 func_error "AGE '$age' must be a nonnegative integer"
8959 func_fatal_error "'$vinfo' is not valid version information"
8960 ;;
8961 esac
8962
8963 if test "$age" -gt "$current"; then
8964 func_error "AGE '$age' is greater than the current interface number '$current'"
8965 func_fatal_error "'$vinfo' is not valid version information"
8966 fi
8967
8968 # Calculate the version variables.
8969 major=
8970 versuffix=
8971 verstring=
8972 case $version_type in
8973 none) ;;
8974
8975 darwin)
8976 # Like Linux, but with the current version available in
8977 # verstring for coding it into the library header
8978 func_arith $current - $age
8979 major=.$func_arith_result
8980 versuffix=$major.$age.$revision
8981 # Darwin ld doesn't like 0 for these options...
8982 func_arith $current + 1
8983 minor_current=$func_arith_result
8984 xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8985 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8986 # On Darwin other compilers
8987 case $CC in
8988 nagfor*)
8989 verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8990 ;;
8991 *)
8992 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8993 ;;
8994 esac
8995 ;;
8996
8997 freebsd-aout)
8998 major=.$current
8999 versuffix=.$current.$revision
9000 ;;
9001
9002 freebsd-elf)
9003 func_arith $current - $age
9004 major=.$func_arith_result
9005 versuffix=$major.$age.$revision
9006 ;;
9007
9008 irix | nonstopux)
9009 if test no = "$lt_irix_increment"; then
9010 func_arith $current - $age
9011 else
9012 func_arith $current - $age + 1
9013 fi
9014 major=$func_arith_result
9015
9016 case $version_type in
9017 nonstopux) verstring_prefix=nonstopux ;;
9018 *) verstring_prefix=sgi ;;
9019 esac
9020 verstring=$verstring_prefix$major.$revision
9021
9022 # Add in all the interfaces that we are compatible with.
9023 loop=$revision
9024 while test 0 -ne "$loop"; do
9025 func_arith $revision - $loop
9026 iface=$func_arith_result
9027 func_arith $loop - 1
9028 loop=$func_arith_result
9029 verstring=$verstring_prefix$major.$iface:$verstring
9030 done
9031
9032 # Before this point, $major must not contain '.'.
9033 major=.$major
9034 versuffix=$major.$revision
9035 ;;
9036
9037 linux) # correct to gnu/linux during the next big refactor
9038 func_arith $current - $age
9039 major=.$func_arith_result
9040 versuffix=$major.$age.$revision
9041 ;;
9042
9043 osf)
9044 func_arith $current - $age
9045 major=.$func_arith_result
9046 versuffix=.$current.$age.$revision
9047 verstring=$current.$age.$revision
9048
9049 # Add in all the interfaces that we are compatible with.
9050 loop=$age
9051 while test 0 -ne "$loop"; do
9052 func_arith $current - $loop
9053 iface=$func_arith_result
9054 func_arith $loop - 1
9055 loop=$func_arith_result
9056 verstring=$verstring:$iface.0
9057 done
9058
9059 # Make executables depend on our current version.
9060 func_append verstring ":$current.0"
9061 ;;
9062
9063 qnx)
9064 major=.$current
9065 versuffix=.$current
9066 ;;
9067
9068 sco)
9069 major=.$current
9070 versuffix=.$current
9071 ;;
9072
9073 sunos)
9074 major=.$current
9075 versuffix=.$current.$revision
9076 ;;
9077
9078 windows)
9079 # Use '-' rather than '.', since we only want one
9080 # extension on DOS 8.3 file systems.
9081 func_arith $current - $age
9082 major=$func_arith_result
9083 versuffix=-$major
9084 ;;
9085
9086 *)
9087 func_fatal_configuration "unknown library version type '$version_type'"
9088 ;;
9089 esac
9090
9091 # Clear the version info if we defaulted, and they specified a release.
9092 if test -z "$vinfo" && test -n "$release"; then
9093 major=
9094 case $version_type in
9095 darwin)
9096 # we can't check for "0.0" in archive_cmds due to quoting
9097 # problems, so we reset it completely
9098 verstring=
9099 ;;
9100 *)
9101 verstring=0.0
9102 ;;
9103 esac
9104 if test no = "$need_version"; then
9105 versuffix=
9106 else
9107 versuffix=.0.0
9108 fi
9109 fi
9110
9111 # Remove version info from name if versioning should be avoided
9112 if test yes,no = "$avoid_version,$need_version"; then
9113 major=
9114 versuffix=
9115 verstring=
9116 fi
9117
9118 # Check to see if the archive will have undefined symbols.
9119 if test yes = "$allow_undefined"; then
9120 if test unsupported = "$allow_undefined_flag"; then
9121 if test yes = "$build_old_libs"; then
9122 func_warning "undefined symbols not allowed in $host shared libraries; building static only"
9123 build_libtool_libs=no
9124 else
9125 func_fatal_error "can't build $host shared library unless -no-undefined is specified"
9126 fi
9127 fi
9128 else
9129 # Don't allow undefined symbols.
9130 allow_undefined_flag=$no_undefined_flag
9131 fi
9132
9133 fi
9134
9135 func_generate_dlsyms "$libname" "$libname" :
9136 func_append libobjs " $symfileobj"
9137 test " " = "$libobjs" && libobjs=
9138
9139 if test relink != "$opt_mode"; then
9140 # Remove our outputs, but don't remove object files since they
9141 # may have been created when compiling PIC objects.
9142 removelist=
9143 tempremovelist=`$ECHO "$output_objdir/*"`
9144 for p in $tempremovelist; do
9145 case $p in
9146 *.$objext | *.gcno)
9147 ;;
9148 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
9149 if test -n "$precious_files_regex"; then
9150 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
9151 then
9152 continue
9153 fi
9154 fi
9155 func_append removelist " $p"
9156 ;;
9157 *) ;;
9158 esac
9159 done
9160 test -n "$removelist" && \
9161 func_show_eval "${RM}r \$removelist"
9162 fi
9163
9164 # Now set the variables for building old libraries.
9165 if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
9166 func_append oldlibs " $output_objdir/$libname.$libext"
9167
9168 # Transform .lo files to .o files.
9169 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
9170 fi
9171
9172 # Eliminate all temporary directories.
9173 #for path in $notinst_path; do
9174 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
9175 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
9176 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
9177 #done
9178
9179 if test -n "$xrpath"; then
9180 # If the user specified any rpath flags, then add them.
9181 temp_xrpath=
9182 for libdir in $xrpath; do
9183 func_replace_sysroot "$libdir"
9184 func_append temp_xrpath " -R$func_replace_sysroot_result"
9185 case "$finalize_rpath " in
9186 *" $libdir "*) ;;
9187 *) func_append finalize_rpath " $libdir" ;;
9188 esac
9189 done
9190 if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
9191 dependency_libs="$temp_xrpath $dependency_libs"
9192 fi
9193 fi
9194
9195 # Make sure dlfiles contains only unique files that won't be dlpreopened
9196 old_dlfiles=$dlfiles
9197 dlfiles=
9198 for lib in $old_dlfiles; do
9199 case " $dlprefiles $dlfiles " in
9200 *" $lib "*) ;;
9201 *) func_append dlfiles " $lib" ;;
9202 esac
9203 done
9204
9205 # Make sure dlprefiles contains only unique files
9206 old_dlprefiles=$dlprefiles
9207 dlprefiles=
9208 for lib in $old_dlprefiles; do
9209 case "$dlprefiles " in
9210 *" $lib "*) ;;
9211 *) func_append dlprefiles " $lib" ;;
9212 esac
9213 done
9214
9215 if test yes = "$build_libtool_libs"; then
9216 if test -n "$rpath"; then
9217 case $host in
9218 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
9219 # these systems don't actually have a c library (as such)!
9220 ;;
9221 *-*-rhapsody* | *-*-darwin1.[012])
9222 # Rhapsody C library is in the System framework
9223 func_append deplibs " System.ltframework"
9224 ;;
9225 *-*-netbsd*)
9226 # Don't link with libc until the a.out ld.so is fixed.
9227 ;;
9228 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
9229 # Do not include libc due to us having libc/libc_r.
9230 ;;
9231 *-*-sco3.2v5* | *-*-sco5v6*)
9232 # Causes problems with __ctype
9233 ;;
9234 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
9235 # Compiler inserts libc in the correct place for threads to work
9236 ;;
9237 *)
9238 # Add libc to deplibs on all other systems if necessary.
9239 if test yes = "$build_libtool_need_lc"; then
9240 func_append deplibs " -lc"
9241 fi
9242 ;;
9243 esac
9244 fi
9245
9246 # Transform deplibs into only deplibs that can be linked in shared.
9247 name_save=$name
9248 libname_save=$libname
9249 release_save=$release
9250 versuffix_save=$versuffix
9251 major_save=$major
9252 # I'm not sure if I'm treating the release correctly. I think
9253 # release should show up in the -l (ie -lgmp5) so we don't want to
9254 # add it in twice. Is that correct?
9255 release=
9256 versuffix=
9257 major=
9258 newdeplibs=
9259 droppeddeps=no
9260 case $deplibs_check_method in
9261 pass_all)
9262 # Don't check for shared/static. Everything works.
9263 # This might be a little naive. We might want to check
9264 # whether the library exists or not. But this is on
9265 # osf3 & osf4 and I'm not really sure... Just
9266 # implementing what was already the behavior.
9267 newdeplibs=$deplibs
9268 ;;
9269 test_compile)
9270 # This code stresses the "libraries are programs" paradigm to its
9271 # limits. Maybe even breaks it. We compile a program, linking it
9272 # against the deplibs as a proxy for the library. Then we can check
9273 # whether they linked in statically or dynamically with ldd.
9274 $opt_dry_run || $RM conftest.c
9275 cat > conftest.c <<EOF
9276 int main() { return 0; }
9277 EOF
9278 $opt_dry_run || $RM conftest
9279 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
9280 ldd_output=`ldd conftest`
9281 for i in $deplibs; do
9282 case $i in
9283 -l*)
9284 func_stripname -l '' "$i"
9285 name=$func_stripname_result
9286 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9287 case " $predeps $postdeps " in
9288 *" $i "*)
9289 func_append newdeplibs " $i"
9290 i=
9291 ;;
9292 esac
9293 fi
9294 if test -n "$i"; then
9295 libname=`eval "\\$ECHO \"$libname_spec\""`
9296 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9297 set dummy $deplib_matches; shift
9298 deplib_match=$1
9299 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9300 func_append newdeplibs " $i"
9301 else
9302 droppeddeps=yes
9303 echo
9304 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9305 echo "*** I have the capability to make that library automatically link in when"
9306 echo "*** you link to this library. But I can only do this if you have a"
9307 echo "*** shared version of the library, which I believe you do not have"
9308 echo "*** because a test_compile did reveal that the linker did not use it for"
9309 echo "*** its dynamic dependency list that programs get resolved with at runtime."
9310 fi
9311 fi
9312 ;;
9313 *)
9314 func_append newdeplibs " $i"
9315 ;;
9316 esac
9317 done
9318 else
9319 # Error occurred in the first compile. Let's try to salvage
9320 # the situation: Compile a separate program for each library.
9321 for i in $deplibs; do
9322 case $i in
9323 -l*)
9324 func_stripname -l '' "$i"
9325 name=$func_stripname_result
9326 $opt_dry_run || $RM conftest
9327 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
9328 ldd_output=`ldd conftest`
9329 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9330 case " $predeps $postdeps " in
9331 *" $i "*)
9332 func_append newdeplibs " $i"
9333 i=
9334 ;;
9335 esac
9336 fi
9337 if test -n "$i"; then
9338 libname=`eval "\\$ECHO \"$libname_spec\""`
9339 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9340 set dummy $deplib_matches; shift
9341 deplib_match=$1
9342 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9343 func_append newdeplibs " $i"
9344 else
9345 droppeddeps=yes
9346 echo
9347 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9348 echo "*** I have the capability to make that library automatically link in when"
9349 echo "*** you link to this library. But I can only do this if you have a"
9350 echo "*** shared version of the library, which you do not appear to have"
9351 echo "*** because a test_compile did reveal that the linker did not use this one"
9352 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
9353 fi
9354 fi
9355 else
9356 droppeddeps=yes
9357 echo
9358 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
9359 echo "*** make it link in! You will probably need to install it or some"
9360 echo "*** library that it depends on before this library will be fully"
9361 echo "*** functional. Installing it before continuing would be even better."
9362 fi
9363 ;;
9364 *)
9365 func_append newdeplibs " $i"
9366 ;;
9367 esac
9368 done
9369 fi
9370 ;;
9371 file_magic*)
9372 set dummy $deplibs_check_method; shift
9373 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
9374 for a_deplib in $deplibs; do
9375 case $a_deplib in
9376 -l*)
9377 func_stripname -l '' "$a_deplib"
9378 name=$func_stripname_result
9379 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9380 case " $predeps $postdeps " in
9381 *" $a_deplib "*)
9382 func_append newdeplibs " $a_deplib"
9383 a_deplib=
9384 ;;
9385 esac
9386 fi
9387 if test -n "$a_deplib"; then
9388 libname=`eval "\\$ECHO \"$libname_spec\""`
9389 if test -n "$file_magic_glob"; then
9390 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
9391 else
9392 libnameglob=$libname
9393 fi
9394 test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
9395 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9396 if test yes = "$want_nocaseglob"; then
9397 shopt -s nocaseglob
9398 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
9399 $nocaseglob
9400 else
9401 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
9402 fi
9403 for potent_lib in $potential_libs; do
9404 # Follow soft links.
9405 if ls -lLd "$potent_lib" 2>/dev/null |
9406 $GREP " -> " >/dev/null; then
9407 continue
9408 fi
9409 # The statement above tries to avoid entering an
9410 # endless loop below, in case of cyclic links.
9411 # We might still enter an endless loop, since a link
9412 # loop can be closed while we follow links,
9413 # but so what?
9414 potlib=$potent_lib
9415 while test -h "$potlib" 2>/dev/null; do
9416 potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
9417 case $potliblink in
9418 [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
9419 *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
9420 esac
9421 done
9422 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
9423 $SED -e 10q |
9424 $EGREP "$file_magic_regex" > /dev/null; then
9425 func_append newdeplibs " $a_deplib"
9426 a_deplib=
9427 break 2
9428 fi
9429 done
9430 done
9431 fi
9432 if test -n "$a_deplib"; then
9433 droppeddeps=yes
9434 echo
9435 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9436 echo "*** I have the capability to make that library automatically link in when"
9437 echo "*** you link to this library. But I can only do this if you have a"
9438 echo "*** shared version of the library, which you do not appear to have"
9439 echo "*** because I did check the linker path looking for a file starting"
9440 if test -z "$potlib"; then
9441 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
9442 else
9443 $ECHO "*** with $libname and none of the candidates passed a file format test"
9444 $ECHO "*** using a file magic. Last file checked: $potlib"
9445 fi
9446 fi
9447 ;;
9448 *)
9449 # Add a -L argument.
9450 func_append newdeplibs " $a_deplib"
9451 ;;
9452 esac
9453 done # Gone through all deplibs.
9454 ;;
9455 match_pattern*)
9456 set dummy $deplibs_check_method; shift
9457 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
9458 for a_deplib in $deplibs; do
9459 case $a_deplib in
9460 -l*)
9461 func_stripname -l '' "$a_deplib"
9462 name=$func_stripname_result
9463 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9464 case " $predeps $postdeps " in
9465 *" $a_deplib "*)
9466 func_append newdeplibs " $a_deplib"
9467 a_deplib=
9468 ;;
9469 esac
9470 fi
9471 if test -n "$a_deplib"; then
9472 libname=`eval "\\$ECHO \"$libname_spec\""`
9473 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9474 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
9475 for potent_lib in $potential_libs; do
9476 potlib=$potent_lib # see symlink-check above in file_magic test
9477 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
9478 $EGREP "$match_pattern_regex" > /dev/null; then
9479 func_append newdeplibs " $a_deplib"
9480 a_deplib=
9481 break 2
9482 fi
9483 done
9484 done
9485 fi
9486 if test -n "$a_deplib"; then
9487 droppeddeps=yes
9488 echo
9489 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9490 echo "*** I have the capability to make that library automatically link in when"
9491 echo "*** you link to this library. But I can only do this if you have a"
9492 echo "*** shared version of the library, which you do not appear to have"
9493 echo "*** because I did check the linker path looking for a file starting"
9494 if test -z "$potlib"; then
9495 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
9496 else
9497 $ECHO "*** with $libname and none of the candidates passed a file format test"
9498 $ECHO "*** using a regex pattern. Last file checked: $potlib"
9499 fi
9500 fi
9501 ;;
9502 *)
9503 # Add a -L argument.
9504 func_append newdeplibs " $a_deplib"
9505 ;;
9506 esac
9507 done # Gone through all deplibs.
9508 ;;
9509 none | unknown | *)
9510 newdeplibs=
9511 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
9512 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9513 for i in $predeps $postdeps; do
9514 # can't use Xsed below, because $i might contain '/'
9515 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
9516 done
9517 fi
9518 case $tmp_deplibs in
9519 *[!\ \ ]*)
9520 echo
9521 if test none = "$deplibs_check_method"; then
9522 echo "*** Warning: inter-library dependencies are not supported in this platform."
9523 else
9524 echo "*** Warning: inter-library dependencies are not known to be supported."
9525 fi
9526 echo "*** All declared inter-library dependencies are being dropped."
9527 droppeddeps=yes
9528 ;;
9529 esac
9530 ;;
9531 esac
9532 versuffix=$versuffix_save
9533 major=$major_save
9534 release=$release_save
9535 libname=$libname_save
9536 name=$name_save
9537
9538 case $host in
9539 *-*-rhapsody* | *-*-darwin1.[012])
9540 # On Rhapsody replace the C library with the System framework
9541 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
9542 ;;
9543 esac
9544
9545 if test yes = "$droppeddeps"; then
9546 if test yes = "$module"; then
9547 echo
9548 echo "*** Warning: libtool could not satisfy all declared inter-library"
9549 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
9550 echo "*** a static module, that should work as long as the dlopening"
9551 echo "*** application is linked with the -dlopen flag."
9552 if test -z "$global_symbol_pipe"; then
9553 echo
9554 echo "*** However, this would only work if libtool was able to extract symbol"
9555 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
9556 echo "*** not find such a program. So, this module is probably useless."
9557 echo "*** 'nm' from GNU binutils and a full rebuild may help."
9558 fi
9559 if test no = "$build_old_libs"; then
9560 oldlibs=$output_objdir/$libname.$libext
9561 build_libtool_libs=module
9562 build_old_libs=yes
9563 else
9564 build_libtool_libs=no
9565 fi
9566 else
9567 echo "*** The inter-library dependencies that have been dropped here will be"
9568 echo "*** automatically added whenever a program is linked with this library"
9569 echo "*** or is declared to -dlopen it."
9570
9571 if test no = "$allow_undefined"; then
9572 echo
9573 echo "*** Since this library must not contain undefined symbols,"
9574 echo "*** because either the platform does not support them or"
9575 echo "*** it was explicitly requested with -no-undefined,"
9576 echo "*** libtool will only create a static version of it."
9577 if test no = "$build_old_libs"; then
9578 oldlibs=$output_objdir/$libname.$libext
9579 build_libtool_libs=module
9580 build_old_libs=yes
9581 else
9582 build_libtool_libs=no
9583 fi
9584 fi
9585 fi
9586 fi
9587 # Done checking deplibs!
9588 deplibs=$newdeplibs
9589 fi
9590 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
9591 case $host in
9592 *-*-darwin*)
9593 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9594 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9595 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9596 ;;
9597 esac
9598
9599 # move library search paths that coincide with paths to not yet
9600 # installed libraries to the beginning of the library search list
9601 new_libs=
9602 for path in $notinst_path; do
9603 case " $new_libs " in
9604 *" -L$path/$objdir "*) ;;
9605 *)
9606 case " $deplibs " in
9607 *" -L$path/$objdir "*)
9608 func_append new_libs " -L$path/$objdir" ;;
9609 esac
9610 ;;
9611 esac
9612 done
9613 for deplib in $deplibs; do
9614 case $deplib in
9615 -L*)
9616 case " $new_libs " in
9617 *" $deplib "*) ;;
9618 *) func_append new_libs " $deplib" ;;
9619 esac
9620 ;;
9621 *) func_append new_libs " $deplib" ;;
9622 esac
9623 done
9624 deplibs=$new_libs
9625
9626 # All the library-specific variables (install_libdir is set above).
9627 library_names=
9628 old_library=
9629 dlname=
9630
9631 # Test again, we may have decided not to build it any more
9632 if test yes = "$build_libtool_libs"; then
9633 # Remove $wl instances when linking with ld.
9634 # FIXME: should test the right _cmds variable.
9635 case $archive_cmds in
9636 *\$LD\ *) wl= ;;
9637 esac
9638 if test yes = "$hardcode_into_libs"; then
9639 # Hardcode the library paths
9640 hardcode_libdirs=
9641 dep_rpath=
9642 rpath=$finalize_rpath
9643 test relink = "$opt_mode" || rpath=$compile_rpath$rpath
9644 for libdir in $rpath; do
9645 if test -n "$hardcode_libdir_flag_spec"; then
9646 if test -n "$hardcode_libdir_separator"; then
9647 func_replace_sysroot "$libdir"
9648 libdir=$func_replace_sysroot_result
9649 if test -z "$hardcode_libdirs"; then
9650 hardcode_libdirs=$libdir
9651 else
9652 # Just accumulate the unique libdirs.
9653 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
9654 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
9655 ;;
9656 *)
9657 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
9658 ;;
9659 esac
9660 fi
9661 else
9662 eval flag=\"$hardcode_libdir_flag_spec\"
9663 func_append dep_rpath " $flag"
9664 fi
9665 elif test -n "$runpath_var"; then
9666 case "$perm_rpath " in
9667 *" $libdir "*) ;;
9668 *) func_append perm_rpath " $libdir" ;;
9669 esac
9670 fi
9671 done
9672 # Substitute the hardcoded libdirs into the rpath.
9673 if test -n "$hardcode_libdir_separator" &&
9674 test -n "$hardcode_libdirs"; then
9675 libdir=$hardcode_libdirs
9676 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
9677 fi
9678 if test -n "$runpath_var" && test -n "$perm_rpath"; then
9679 # We should set the runpath_var.
9680 rpath=
9681 for dir in $perm_rpath; do
9682 func_append rpath "$dir:"
9683 done
9684 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
9685 fi
9686 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
9687 fi
9688
9689 shlibpath=$finalize_shlibpath
9690 test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
9691 if test -n "$shlibpath"; then
9692 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
9693 fi
9694
9695 # Get the real and link names of the library.
9696 eval shared_ext=\"$shrext_cmds\"
9697 eval library_names=\"$library_names_spec\"
9698 set dummy $library_names
9699 shift
9700 realname=$1
9701 shift
9702
9703 if test -n "$soname_spec"; then
9704 eval soname=\"$soname_spec\"
9705 else
9706 soname=$realname
9707 fi
9708 if test -z "$dlname"; then
9709 dlname=$soname
9710 fi
9711
9712 lib=$output_objdir/$realname
9713 linknames=
9714 for link
9715 do
9716 func_append linknames " $link"
9717 done
9718
9719 # Use standard objects if they are pic
9720 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
9721 test "X$libobjs" = "X " && libobjs=
9722
9723 delfiles=
9724 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9725 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
9726 export_symbols=$output_objdir/$libname.uexp
9727 func_append delfiles " $export_symbols"
9728 fi
9729
9730 orig_export_symbols=
9731 case $host_os in
9732 cygwin* | mingw* | cegcc*)
9733 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
9734 # exporting using user supplied symfile
9735 func_dll_def_p "$export_symbols" || {
9736 # and it's NOT already a .def file. Must figure out
9737 # which of the given symbols are data symbols and tag
9738 # them as such. So, trigger use of export_symbols_cmds.
9739 # export_symbols gets reassigned inside the "prepare
9740 # the list of exported symbols" if statement, so the
9741 # include_expsyms logic still works.
9742 orig_export_symbols=$export_symbols
9743 export_symbols=
9744 always_export_symbols=yes
9745 }
9746 fi
9747 ;;
9748 esac
9749
9750 # Prepare the list of exported symbols
9751 if test -z "$export_symbols"; then
9752 if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
9753 func_verbose "generating symbol list for '$libname.la'"
9754 export_symbols=$output_objdir/$libname.exp
9755 $opt_dry_run || $RM $export_symbols
9756 cmds=$export_symbols_cmds
9757 save_ifs=$IFS; IFS='~'
9758 for cmd1 in $cmds; do
9759 IFS=$save_ifs
9760 # Take the normal branch if the nm_file_list_spec branch
9761 # doesn't work or if tool conversion is not needed.
9762 case $nm_file_list_spec~$to_tool_file_cmd in
9763 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
9764 try_normal_branch=yes
9765 eval cmd=\"$cmd1\"
9766 func_len " $cmd"
9767 len=$func_len_result
9768 ;;
9769 *)
9770 try_normal_branch=no
9771 ;;
9772 esac
9773 if test yes = "$try_normal_branch" \
9774 && { test "$len" -lt "$max_cmd_len" \
9775 || test "$max_cmd_len" -le -1; }
9776 then
9777 func_show_eval "$cmd" 'exit $?'
9778 skipped_export=false
9779 elif test -n "$nm_file_list_spec"; then
9780 func_basename "$output"
9781 output_la=$func_basename_result
9782 save_libobjs=$libobjs
9783 save_output=$output
9784 output=$output_objdir/$output_la.nm
9785 func_to_tool_file "$output"
9786 libobjs=$nm_file_list_spec$func_to_tool_file_result
9787 func_append delfiles " $output"
9788 func_verbose "creating $NM input file list: $output"
9789 for obj in $save_libobjs; do
9790 func_to_tool_file "$obj"
9791 $ECHO "$func_to_tool_file_result"
9792 done > "$output"
9793 eval cmd=\"$cmd1\"
9794 func_show_eval "$cmd" 'exit $?'
9795 output=$save_output
9796 libobjs=$save_libobjs
9797 skipped_export=false
9798 else
9799 # The command line is too long to execute in one step.
9800 func_verbose "using reloadable object file for export list..."
9801 skipped_export=:
9802 # Break out early, otherwise skipped_export may be
9803 # set to false by a later but shorter cmd.
9804 break
9805 fi
9806 done
9807 IFS=$save_ifs
9808 if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
9809 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
9810 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
9811 fi
9812 fi
9813 fi
9814
9815 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9816 tmp_export_symbols=$export_symbols
9817 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
9818 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
9819 fi
9820
9821 if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
9822 # The given exports_symbols file has to be filtered, so filter it.
9823 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
9824 # FIXME: $output_objdir/$libname.filter potentially contains lots of
9825 # 's' commands, which not all seds can handle. GNU sed should be fine
9826 # though. Also, the filter scales superlinearly with the number of
9827 # global variables. join(1) would be nice here, but unfortunately
9828 # isn't a blessed tool.
9829 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
9830 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
9831 export_symbols=$output_objdir/$libname.def
9832 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
9833 fi
9834
9835 tmp_deplibs=
9836 for test_deplib in $deplibs; do
9837 case " $convenience " in
9838 *" $test_deplib "*) ;;
9839 *)
9840 func_append tmp_deplibs " $test_deplib"
9841 ;;
9842 esac
9843 done
9844 deplibs=$tmp_deplibs
9845
9846 if test -n "$convenience"; then
9847 if test -n "$whole_archive_flag_spec" &&
9848 test yes = "$compiler_needs_object" &&
9849 test -z "$libobjs"; then
9850 # extract the archives, so we have objects to list.
9851 # TODO: could optimize this to just extract one archive.
9852 whole_archive_flag_spec=
9853 fi
9854 if test -n "$whole_archive_flag_spec"; then
9855 save_libobjs=$libobjs
9856 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
9857 test "X$libobjs" = "X " && libobjs=
9858 else
9859 gentop=$output_objdir/${outputname}x
9860 func_append generated " $gentop"
9861
9862 func_extract_archives $gentop $convenience
9863 func_append libobjs " $func_extract_archives_result"
9864 test "X$libobjs" = "X " && libobjs=
9865 fi
9866 fi
9867
9868 if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
9869 eval flag=\"$thread_safe_flag_spec\"
9870 func_append linker_flags " $flag"
9871 fi
9872
9873 # Make a backup of the uninstalled library when relinking
9874 if test relink = "$opt_mode"; then
9875 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
9876 fi
9877
9878 # Do each of the archive commands.
9879 if test yes = "$module" && test -n "$module_cmds"; then
9880 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
9881 eval test_cmds=\"$module_expsym_cmds\"
9882 cmds=$module_expsym_cmds
9883 else
9884 eval test_cmds=\"$module_cmds\"
9885 cmds=$module_cmds
9886 fi
9887 else
9888 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
9889 eval test_cmds=\"$archive_expsym_cmds\"
9890 cmds=$archive_expsym_cmds
9891 else
9892 eval test_cmds=\"$archive_cmds\"
9893 cmds=$archive_cmds
9894 fi
9895 fi
9896
9897 if test : != "$skipped_export" &&
9898 func_len " $test_cmds" &&
9899 len=$func_len_result &&
9900 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9901 :
9902 else
9903 # The command line is too long to link in one step, link piecewise
9904 # or, if using GNU ld and skipped_export is not :, use a linker
9905 # script.
9906
9907 # Save the value of $output and $libobjs because we want to
9908 # use them later. If we have whole_archive_flag_spec, we
9909 # want to use save_libobjs as it was before
9910 # whole_archive_flag_spec was expanded, because we can't
9911 # assume the linker understands whole_archive_flag_spec.
9912 # This may have to be revisited, in case too many
9913 # convenience libraries get linked in and end up exceeding
9914 # the spec.
9915 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
9916 save_libobjs=$libobjs
9917 fi
9918 save_output=$output
9919 func_basename "$output"
9920 output_la=$func_basename_result
9921
9922 # Clear the reloadable object creation command queue and
9923 # initialize k to one.
9924 test_cmds=
9925 concat_cmds=
9926 objlist=
9927 last_robj=
9928 k=1
9929
9930 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
9931 output=$output_objdir/$output_la.lnkscript
9932 func_verbose "creating GNU ld script: $output"
9933 echo 'INPUT (' > $output
9934 for obj in $save_libobjs
9935 do
9936 func_to_tool_file "$obj"
9937 $ECHO "$func_to_tool_file_result" >> $output
9938 done
9939 echo ')' >> $output
9940 func_append delfiles " $output"
9941 func_to_tool_file "$output"
9942 output=$func_to_tool_file_result
9943 elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
9944 output=$output_objdir/$output_la.lnk
9945 func_verbose "creating linker input file list: $output"
9946 : > $output
9947 set x $save_libobjs
9948 shift
9949 firstobj=
9950 if test yes = "$compiler_needs_object"; then
9951 firstobj="$1 "
9952 shift
9953 fi
9954 for obj
9955 do
9956 func_to_tool_file "$obj"
9957 $ECHO "$func_to_tool_file_result" >> $output
9958 done
9959 func_append delfiles " $output"
9960 func_to_tool_file "$output"
9961 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
9962 else
9963 if test -n "$save_libobjs"; then
9964 func_verbose "creating reloadable object files..."
9965 output=$output_objdir/$output_la-$k.$objext
9966 eval test_cmds=\"$reload_cmds\"
9967 func_len " $test_cmds"
9968 len0=$func_len_result
9969 len=$len0
9970
9971 # Loop over the list of objects to be linked.
9972 for obj in $save_libobjs
9973 do
9974 func_len " $obj"
9975 func_arith $len + $func_len_result
9976 len=$func_arith_result
9977 if test -z "$objlist" ||
9978 test "$len" -lt "$max_cmd_len"; then
9979 func_append objlist " $obj"
9980 else
9981 # The command $test_cmds is almost too long, add a
9982 # command to the queue.
9983 if test 1 -eq "$k"; then
9984 # The first file doesn't have a previous command to add.
9985 reload_objs=$objlist
9986 eval concat_cmds=\"$reload_cmds\"
9987 else
9988 # All subsequent reloadable object files will link in
9989 # the last one created.
9990 reload_objs="$objlist $last_robj"
9991 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
9992 fi
9993 last_robj=$output_objdir/$output_la-$k.$objext
9994 func_arith $k + 1
9995 k=$func_arith_result
9996 output=$output_objdir/$output_la-$k.$objext
9997 objlist=" $obj"
9998 func_len " $last_robj"
9999 func_arith $len0 + $func_len_result
10000 len=$func_arith_result
10001 fi
10002 done
10003 # Handle the remaining objects by creating one last
10004 # reloadable object file. All subsequent reloadable object
10005 # files will link in the last one created.
10006 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
10007 reload_objs="$objlist $last_robj"
10008 eval concat_cmds=\"\$concat_cmds$reload_cmds\"
10009 if test -n "$last_robj"; then
10010 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
10011 fi
10012 func_append delfiles " $output"
10013
10014 else
10015 output=
10016 fi
10017
10018 ${skipped_export-false} && {
10019 func_verbose "generating symbol list for '$libname.la'"
10020 export_symbols=$output_objdir/$libname.exp
10021 $opt_dry_run || $RM $export_symbols
10022 libobjs=$output
10023 # Append the command to create the export file.
10024 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
10025 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
10026 if test -n "$last_robj"; then
10027 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
10028 fi
10029 }
10030
10031 test -n "$save_libobjs" &&
10032 func_verbose "creating a temporary reloadable object file: $output"
10033
10034 # Loop through the commands generated above and execute them.
10035 save_ifs=$IFS; IFS='~'
10036 for cmd in $concat_cmds; do
10037 IFS=$save_ifs
10038 $opt_quiet || {
10039 func_quote_for_expand "$cmd"
10040 eval "func_echo $func_quote_for_expand_result"
10041 }
10042 $opt_dry_run || eval "$cmd" || {
10043 lt_exit=$?
10044
10045 # Restore the uninstalled library and exit
10046 if test relink = "$opt_mode"; then
10047 ( cd "$output_objdir" && \
10048 $RM "${realname}T" && \
10049 $MV "${realname}U" "$realname" )
10050 fi
10051
10052 exit $lt_exit
10053 }
10054 done
10055 IFS=$save_ifs
10056
10057 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
10058 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
10059 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
10060 fi
10061 fi
10062
10063 ${skipped_export-false} && {
10064 if test -n "$export_symbols" && test -n "$include_expsyms"; then
10065 tmp_export_symbols=$export_symbols
10066 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
10067 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
10068 fi
10069
10070 if test -n "$orig_export_symbols"; then
10071 # The given exports_symbols file has to be filtered, so filter it.
10072 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
10073 # FIXME: $output_objdir/$libname.filter potentially contains lots of
10074 # 's' commands, which not all seds can handle. GNU sed should be fine
10075 # though. Also, the filter scales superlinearly with the number of
10076 # global variables. join(1) would be nice here, but unfortunately
10077 # isn't a blessed tool.
10078 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
10079 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
10080 export_symbols=$output_objdir/$libname.def
10081 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
10082 fi
10083 }
10084
10085 libobjs=$output
10086 # Restore the value of output.
10087 output=$save_output
10088
10089 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
10090 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
10091 test "X$libobjs" = "X " && libobjs=
10092 fi
10093 # Expand the library linking commands again to reset the
10094 # value of $libobjs for piecewise linking.
10095
10096 # Do each of the archive commands.
10097 if test yes = "$module" && test -n "$module_cmds"; then
10098 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
10099 cmds=$module_expsym_cmds
10100 else
10101 cmds=$module_cmds
10102 fi
10103 else
10104 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
10105 cmds=$archive_expsym_cmds
10106 else
10107 cmds=$archive_cmds
10108 fi
10109 fi
10110 fi
10111
10112 if test -n "$delfiles"; then
10113 # Append the command to remove temporary files to $cmds.
10114 eval cmds=\"\$cmds~\$RM $delfiles\"
10115 fi
10116
10117 # Add any objects from preloaded convenience libraries
10118 if test -n "$dlprefiles"; then
10119 gentop=$output_objdir/${outputname}x
10120 func_append generated " $gentop"
10121
10122 func_extract_archives $gentop $dlprefiles
10123 func_append libobjs " $func_extract_archives_result"
10124 test "X$libobjs" = "X " && libobjs=
10125 fi
10126
10127 save_ifs=$IFS; IFS='~'
10128 for cmd in $cmds; do
10129 IFS=$sp$nl
10130 eval cmd=\"$cmd\"
10131 IFS=$save_ifs
10132 $opt_quiet || {
10133 func_quote_for_expand "$cmd"
10134 eval "func_echo $func_quote_for_expand_result"
10135 }
10136 $opt_dry_run || eval "$cmd" || {
10137 lt_exit=$?
10138
10139 # Restore the uninstalled library and exit
10140 if test relink = "$opt_mode"; then
10141 ( cd "$output_objdir" && \
10142 $RM "${realname}T" && \
10143 $MV "${realname}U" "$realname" )
10144 fi
10145
10146 exit $lt_exit
10147 }
10148 done
10149 IFS=$save_ifs
10150
10151 # Restore the uninstalled library and exit
10152 if test relink = "$opt_mode"; then
10153 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
10154
10155 if test -n "$convenience"; then
10156 if test -z "$whole_archive_flag_spec"; then
10157 func_show_eval '${RM}r "$gentop"'
10158 fi
10159 fi
10160
10161 exit $EXIT_SUCCESS
10162 fi
10163
10164 # Create links to the real library.
10165 for linkname in $linknames; do
10166 if test "$realname" != "$linkname"; then
10167 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
10168 fi
10169 done
10170
10171 # If -module or -export-dynamic was specified, set the dlname.
10172 if test yes = "$module" || test yes = "$export_dynamic"; then
10173 # On all known operating systems, these are identical.
10174 dlname=$soname
10175 fi
10176 fi
10177 ;;
10178
10179 obj)
10180 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
10181 func_warning "'-dlopen' is ignored for objects"
10182 fi
10183
10184 case " $deplibs" in
10185 *\ -l* | *\ -L*)
10186 func_warning "'-l' and '-L' are ignored for objects" ;;
10187 esac
10188
10189 test -n "$rpath" && \
10190 func_warning "'-rpath' is ignored for objects"
10191
10192 test -n "$xrpath" && \
10193 func_warning "'-R' is ignored for objects"
10194
10195 test -n "$vinfo" && \
10196 func_warning "'-version-info' is ignored for objects"
10197
10198 test -n "$release" && \
10199 func_warning "'-release' is ignored for objects"
10200
10201 case $output in
10202 *.lo)
10203 test -n "$objs$old_deplibs" && \
10204 func_fatal_error "cannot build library object '$output' from non-libtool objects"
10205
10206 libobj=$output
10207 func_lo2o "$libobj"
10208 obj=$func_lo2o_result
10209 ;;
10210 *)
10211 libobj=
10212 obj=$output
10213 ;;
10214 esac
10215
10216 # Delete the old objects.
10217 $opt_dry_run || $RM $obj $libobj
10218
10219 # Objects from convenience libraries. This assumes
10220 # single-version convenience libraries. Whenever we create
10221 # different ones for PIC/non-PIC, this we'll have to duplicate
10222 # the extraction.
10223 reload_conv_objs=
10224 gentop=
10225 # if reload_cmds runs $LD directly, get rid of -Wl from
10226 # whole_archive_flag_spec and hope we can get by with turning comma
10227 # into space.
10228 case $reload_cmds in
10229 *\$LD[\ \$]*) wl= ;;
10230 esac
10231 if test -n "$convenience"; then
10232 if test -n "$whole_archive_flag_spec"; then
10233 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
10234 test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
10235 reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
10236 else
10237 gentop=$output_objdir/${obj}x
10238 func_append generated " $gentop"
10239
10240 func_extract_archives $gentop $convenience
10241 reload_conv_objs="$reload_objs $func_extract_archives_result"
10242 fi
10243 fi
10244
10245 # If we're not building shared, we need to use non_pic_objs
10246 test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
10247
10248 # Create the old-style object.
10249 reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
10250
10251 output=$obj
10252 func_execute_cmds "$reload_cmds" 'exit $?'
10253
10254 # Exit if we aren't doing a library object file.
10255 if test -z "$libobj"; then
10256 if test -n "$gentop"; then
10257 func_show_eval '${RM}r "$gentop"'
10258 fi
10259
10260 exit $EXIT_SUCCESS
10261 fi
10262
10263 test yes = "$build_libtool_libs" || {
10264 if test -n "$gentop"; then
10265 func_show_eval '${RM}r "$gentop"'
10266 fi
10267
10268 # Create an invalid libtool object if no PIC, so that we don't
10269 # accidentally link it into a program.
10270 # $show "echo timestamp > $libobj"
10271 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
10272 exit $EXIT_SUCCESS
10273 }
10274
10275 if test -n "$pic_flag" || test default != "$pic_mode"; then
10276 # Only do commands if we really have different PIC objects.
10277 reload_objs="$libobjs $reload_conv_objs"
10278 output=$libobj
10279 func_execute_cmds "$reload_cmds" 'exit $?'
10280 fi
10281
10282 if test -n "$gentop"; then
10283 func_show_eval '${RM}r "$gentop"'
10284 fi
10285
10286 exit $EXIT_SUCCESS
10287 ;;
10288
10289 prog)
10290 case $host in
10291 *cygwin*) func_stripname '' '.exe' "$output"
10292 output=$func_stripname_result.exe;;
10293 esac
10294 test -n "$vinfo" && \
10295 func_warning "'-version-info' is ignored for programs"
10296
10297 test -n "$release" && \
10298 func_warning "'-release' is ignored for programs"
10299
10300 $preload \
10301 && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
10302 && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
10303
10304 case $host in
10305 *-*-rhapsody* | *-*-darwin1.[012])
10306 # On Rhapsody replace the C library is the System framework
10307 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
10308 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
10309 ;;
10310 esac
10311
10312 case $host in
10313 *-*-darwin*)
10314 # Don't allow lazy linking, it breaks C++ global constructors
10315 # But is supposedly fixed on 10.4 or later (yay!).
10316 if test CXX = "$tagname"; then
10317 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
10318 10.[0123])
10319 func_append compile_command " $wl-bind_at_load"
10320 func_append finalize_command " $wl-bind_at_load"
10321 ;;
10322 esac
10323 fi
10324 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
10325 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
10326 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
10327 ;;
10328 esac
10329
10330
10331 # move library search paths that coincide with paths to not yet
10332 # installed libraries to the beginning of the library search list
10333 new_libs=
10334 for path in $notinst_path; do
10335 case " $new_libs " in
10336 *" -L$path/$objdir "*) ;;
10337 *)
10338 case " $compile_deplibs " in
10339 *" -L$path/$objdir "*)
10340 func_append new_libs " -L$path/$objdir" ;;
10341 esac
10342 ;;
10343 esac
10344 done
10345 for deplib in $compile_deplibs; do
10346 case $deplib in
10347 -L*)
10348 case " $new_libs " in
10349 *" $deplib "*) ;;
10350 *) func_append new_libs " $deplib" ;;
10351 esac
10352 ;;
10353 *) func_append new_libs " $deplib" ;;
10354 esac
10355 done
10356 compile_deplibs=$new_libs
10357
10358
10359 func_append compile_command " $compile_deplibs"
10360 func_append finalize_command " $finalize_deplibs"
10361
10362 if test -n "$rpath$xrpath"; then
10363 # If the user specified any rpath flags, then add them.
10364 for libdir in $rpath $xrpath; do
10365 # This is the magic to use -rpath.
10366 case "$finalize_rpath " in
10367 *" $libdir "*) ;;
10368 *) func_append finalize_rpath " $libdir" ;;
10369 esac
10370 done
10371 fi
10372
10373 # Now hardcode the library paths
10374 rpath=
10375 hardcode_libdirs=
10376 for libdir in $compile_rpath $finalize_rpath; do
10377 if test -n "$hardcode_libdir_flag_spec"; then
10378 if test -n "$hardcode_libdir_separator"; then
10379 if test -z "$hardcode_libdirs"; then
10380 hardcode_libdirs=$libdir
10381 else
10382 # Just accumulate the unique libdirs.
10383 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
10384 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
10385 ;;
10386 *)
10387 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
10388 ;;
10389 esac
10390 fi
10391 else
10392 eval flag=\"$hardcode_libdir_flag_spec\"
10393 func_append rpath " $flag"
10394 fi
10395 elif test -n "$runpath_var"; then
10396 case "$perm_rpath " in
10397 *" $libdir "*) ;;
10398 *) func_append perm_rpath " $libdir" ;;
10399 esac
10400 fi
10401 case $host in
10402 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
10403 testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
10404 case :$dllsearchpath: in
10405 *":$libdir:"*) ;;
10406 ::) dllsearchpath=$libdir;;
10407 *) func_append dllsearchpath ":$libdir";;
10408 esac
10409 case :$dllsearchpath: in
10410 *":$testbindir:"*) ;;
10411 ::) dllsearchpath=$testbindir;;
10412 *) func_append dllsearchpath ":$testbindir";;
10413 esac
10414 ;;
10415 esac
10416 done
10417 # Substitute the hardcoded libdirs into the rpath.
10418 if test -n "$hardcode_libdir_separator" &&
10419 test -n "$hardcode_libdirs"; then
10420 libdir=$hardcode_libdirs
10421 eval rpath=\" $hardcode_libdir_flag_spec\"
10422 fi
10423 compile_rpath=$rpath
10424
10425 rpath=
10426 hardcode_libdirs=
10427 for libdir in $finalize_rpath; do
10428 if test -n "$hardcode_libdir_flag_spec"; then
10429 if test -n "$hardcode_libdir_separator"; then
10430 if test -z "$hardcode_libdirs"; then
10431 hardcode_libdirs=$libdir
10432 else
10433 # Just accumulate the unique libdirs.
10434 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
10435 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
10436 ;;
10437 *)
10438 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
10439 ;;
10440 esac
10441 fi
10442 else
10443 eval flag=\"$hardcode_libdir_flag_spec\"
10444 func_append rpath " $flag"
10445 fi
10446 elif test -n "$runpath_var"; then
10447 case "$finalize_perm_rpath " in
10448 *" $libdir "*) ;;
10449 *) func_append finalize_perm_rpath " $libdir" ;;
10450 esac
10451 fi
10452 done
10453 # Substitute the hardcoded libdirs into the rpath.
10454 if test -n "$hardcode_libdir_separator" &&
10455 test -n "$hardcode_libdirs"; then
10456 libdir=$hardcode_libdirs
10457 eval rpath=\" $hardcode_libdir_flag_spec\"
10458 fi
10459 finalize_rpath=$rpath
10460
10461 if test -n "$libobjs" && test yes = "$build_old_libs"; then
10462 # Transform all the library objects into standard objects.
10463 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
10464 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
10465 fi
10466
10467 func_generate_dlsyms "$outputname" "@PROGRAM@" false
10468
10469 # template prelinking step
10470 if test -n "$prelink_cmds"; then
10471 func_execute_cmds "$prelink_cmds" 'exit $?'
10472 fi
10473
10474 wrappers_required=:
10475 case $host in
10476 *cegcc* | *mingw32ce*)
10477 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
10478 wrappers_required=false
10479 ;;
10480 *cygwin* | *mingw* )
10481 test yes = "$build_libtool_libs" || wrappers_required=false
10482 ;;
10483 *)
10484 if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
10485 wrappers_required=false
10486 fi
10487 ;;
10488 esac
10489 $wrappers_required || {
10490 # Replace the output file specification.
10491 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
10492 link_command=$compile_command$compile_rpath
10493
10494 # We have no uninstalled library dependencies, so finalize right now.
10495 exit_status=0
10496 func_show_eval "$link_command" 'exit_status=$?'
10497
10498 if test -n "$postlink_cmds"; then
10499 func_to_tool_file "$output"
10500 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10501 func_execute_cmds "$postlink_cmds" 'exit $?'
10502 fi
10503
10504 # Delete the generated files.
10505 if test -f "$output_objdir/${outputname}S.$objext"; then
10506 func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
10507 fi
10508
10509 exit $exit_status
10510 }
10511
10512 if test -n "$compile_shlibpath$finalize_shlibpath"; then
10513 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
10514 fi
10515 if test -n "$finalize_shlibpath"; then
10516 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
10517 fi
10518
10519 compile_var=
10520 finalize_var=
10521 if test -n "$runpath_var"; then
10522 if test -n "$perm_rpath"; then
10523 # We should set the runpath_var.
10524 rpath=
10525 for dir in $perm_rpath; do
10526 func_append rpath "$dir:"
10527 done
10528 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
10529 fi
10530 if test -n "$finalize_perm_rpath"; then
10531 # We should set the runpath_var.
10532 rpath=
10533 for dir in $finalize_perm_rpath; do
10534 func_append rpath "$dir:"
10535 done
10536 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
10537 fi
10538 fi
10539
10540 if test yes = "$no_install"; then
10541 # We don't need to create a wrapper script.
10542 link_command=$compile_var$compile_command$compile_rpath
10543 # Replace the output file specification.
10544 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
10545 # Delete the old output file.
10546 $opt_dry_run || $RM $output
10547 # Link the executable and exit
10548 func_show_eval "$link_command" 'exit $?'
10549
10550 if test -n "$postlink_cmds"; then
10551 func_to_tool_file "$output"
10552 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10553 func_execute_cmds "$postlink_cmds" 'exit $?'
10554 fi
10555
10556 exit $EXIT_SUCCESS
10557 fi
10558
10559 case $hardcode_action,$fast_install in
10560 relink,*)
10561 # Fast installation is not supported
10562 link_command=$compile_var$compile_command$compile_rpath
10563 relink_command=$finalize_var$finalize_command$finalize_rpath
10564
10565 func_warning "this platform does not like uninstalled shared libraries"
10566 func_warning "'$output' will be relinked during installation"
10567 ;;
10568 *,yes)
10569 link_command=$finalize_var$compile_command$finalize_rpath
10570 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
10571 ;;
10572 *,no)
10573 link_command=$compile_var$compile_command$compile_rpath
10574 relink_command=$finalize_var$finalize_command$finalize_rpath
10575 ;;
10576 *,needless)
10577 link_command=$finalize_var$compile_command$finalize_rpath
10578 relink_command=
10579 ;;
10580 esac
10581
10582 # Replace the output file specification.
10583 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
10584
10585 # Delete the old output files.
10586 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
10587
10588 func_show_eval "$link_command" 'exit $?'
10589
10590 if test -n "$postlink_cmds"; then
10591 func_to_tool_file "$output_objdir/$outputname"
10592 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'`
10593 func_execute_cmds "$postlink_cmds" 'exit $?'
10594 fi
10595
10596 # Now create the wrapper script.
10597 func_verbose "creating $output"
10598
10599 # Quote the relink command for shipping.
10600 if test -n "$relink_command"; then
10601 # Preserve any variables that may affect compiler behavior
10602 for var in $variables_saved_for_relink; do
10603 if eval test -z \"\${$var+set}\"; then
10604 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
10605 elif eval var_value=\$$var; test -z "$var_value"; then
10606 relink_command="$var=; export $var; $relink_command"
10607 else
10608 func_quote_for_eval "$var_value"
10609 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10610 fi
10611 done
10612 relink_command="(cd `pwd`; $relink_command)"
10613 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10614 fi
10615
10616 # Only actually do things if not in dry run mode.
10617 $opt_dry_run || {
10618 # win32 will think the script is a binary if it has
10619 # a .exe suffix, so we strip it off here.
10620 case $output in
10621 *.exe) func_stripname '' '.exe' "$output"
10622 output=$func_stripname_result ;;
10623 esac
10624 # test for cygwin because mv fails w/o .exe extensions
10625 case $host in
10626 *cygwin*)
10627 exeext=.exe
10628 func_stripname '' '.exe' "$outputname"
10629 outputname=$func_stripname_result ;;
10630 *) exeext= ;;
10631 esac
10632 case $host in
10633 *cygwin* | *mingw* )
10634 func_dirname_and_basename "$output" "" "."
10635 output_name=$func_basename_result
10636 output_path=$func_dirname_result
10637 cwrappersource=$output_path/$objdir/lt-$output_name.c
10638 cwrapper=$output_path/$output_name.exe
10639 $RM $cwrappersource $cwrapper
10640 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
10641
10642 func_emit_cwrapperexe_src > $cwrappersource
10643
10644 # The wrapper executable is built using the $host compiler,
10645 # because it contains $host paths and files. If cross-
10646 # compiling, it, like the target executable, must be
10647 # executed on the $host or under an emulation environment.
10648 $opt_dry_run || {
10649 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
10650 $STRIP $cwrapper
10651 }
10652
10653 # Now, create the wrapper script for func_source use:
10654 func_ltwrapper_scriptname $cwrapper
10655 $RM $func_ltwrapper_scriptname_result
10656 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
10657 $opt_dry_run || {
10658 # note: this script will not be executed, so do not chmod.
10659 if test "x$build" = "x$host"; then
10660 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
10661 else
10662 func_emit_wrapper no > $func_ltwrapper_scriptname_result
10663 fi
10664 }
10665 ;;
10666 * )
10667 $RM $output
10668 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
10669
10670 func_emit_wrapper no > $output
10671 chmod +x $output
10672 ;;
10673 esac
10674 }
10675 exit $EXIT_SUCCESS
10676 ;;
10677 esac
10678
10679 # See if we need to build an old-fashioned archive.
10680 for oldlib in $oldlibs; do
10681
10682 case $build_libtool_libs in
10683 convenience)
10684 oldobjs="$libobjs_save $symfileobj"
10685 addlibs=$convenience
10686 build_libtool_libs=no
10687 ;;
10688 module)
10689 oldobjs=$libobjs_save
10690 addlibs=$old_convenience
10691 build_libtool_libs=no
10692 ;;
10693 *)
10694 oldobjs="$old_deplibs $non_pic_objects"
10695 $preload && test -f "$symfileobj" \
10696 && func_append oldobjs " $symfileobj"
10697 addlibs=$old_convenience
10698 ;;
10699 esac
10700
10701 if test -n "$addlibs"; then
10702 gentop=$output_objdir/${outputname}x
10703 func_append generated " $gentop"
10704
10705 func_extract_archives $gentop $addlibs
10706 func_append oldobjs " $func_extract_archives_result"
10707 fi
10708
10709 # Do each command in the archive commands.
10710 if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
10711 cmds=$old_archive_from_new_cmds
10712 else
10713
10714 # Add any objects from preloaded convenience libraries
10715 if test -n "$dlprefiles"; then
10716 gentop=$output_objdir/${outputname}x
10717 func_append generated " $gentop"
10718
10719 func_extract_archives $gentop $dlprefiles
10720 func_append oldobjs " $func_extract_archives_result"
10721 fi
10722
10723 # POSIX demands no paths to be encoded in archives. We have
10724 # to avoid creating archives with duplicate basenames if we
10725 # might have to extract them afterwards, e.g., when creating a
10726 # static archive out of a convenience library, or when linking
10727 # the entirety of a libtool archive into another (currently
10728 # not supported by libtool).
10729 if (for obj in $oldobjs
10730 do
10731 func_basename "$obj"
10732 $ECHO "$func_basename_result"
10733 done | sort | sort -uc >/dev/null 2>&1); then
10734 :
10735 else
10736 echo "copying selected object files to avoid basename conflicts..."
10737 gentop=$output_objdir/${outputname}x
10738 func_append generated " $gentop"
10739 func_mkdir_p "$gentop"
10740 save_oldobjs=$oldobjs
10741 oldobjs=
10742 counter=1
10743 for obj in $save_oldobjs
10744 do
10745 func_basename "$obj"
10746 objbase=$func_basename_result
10747 case " $oldobjs " in
10748 " ") oldobjs=$obj ;;
10749 *[\ /]"$objbase "*)
10750 while :; do
10751 # Make sure we don't pick an alternate name that also
10752 # overlaps.
10753 newobj=lt$counter-$objbase
10754 func_arith $counter + 1
10755 counter=$func_arith_result
10756 case " $oldobjs " in
10757 *[\ /]"$newobj "*) ;;
10758 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
10759 esac
10760 done
10761 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
10762 func_append oldobjs " $gentop/$newobj"
10763 ;;
10764 *) func_append oldobjs " $obj" ;;
10765 esac
10766 done
10767 fi
10768 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
10769 tool_oldlib=$func_to_tool_file_result
10770 eval cmds=\"$old_archive_cmds\"
10771
10772 func_len " $cmds"
10773 len=$func_len_result
10774 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
10775 cmds=$old_archive_cmds
10776 elif test -n "$archiver_list_spec"; then
10777 func_verbose "using command file archive linking..."
10778 for obj in $oldobjs
10779 do
10780 func_to_tool_file "$obj"
10781 $ECHO "$func_to_tool_file_result"
10782 done > $output_objdir/$libname.libcmd
10783 func_to_tool_file "$output_objdir/$libname.libcmd"
10784 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
10785 cmds=$old_archive_cmds
10786 else
10787 # the command line is too long to link in one step, link in parts
10788 func_verbose "using piecewise archive linking..."
10789 save_RANLIB=$RANLIB
10790 RANLIB=:
10791 objlist=
10792 concat_cmds=
10793 save_oldobjs=$oldobjs
10794 oldobjs=
10795 # Is there a better way of finding the last object in the list?
10796 for obj in $save_oldobjs
10797 do
10798 last_oldobj=$obj
10799 done
10800 eval test_cmds=\"$old_archive_cmds\"
10801 func_len " $test_cmds"
10802 len0=$func_len_result
10803 len=$len0
10804 for obj in $save_oldobjs
10805 do
10806 func_len " $obj"
10807 func_arith $len + $func_len_result
10808 len=$func_arith_result
10809 func_append objlist " $obj"
10810 if test "$len" -lt "$max_cmd_len"; then
10811 :
10812 else
10813 # the above command should be used before it gets too long
10814 oldobjs=$objlist
10815 if test "$obj" = "$last_oldobj"; then
10816 RANLIB=$save_RANLIB
10817 fi
10818 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
10819 eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
10820 objlist=
10821 len=$len0
10822 fi
10823 done
10824 RANLIB=$save_RANLIB
10825 oldobjs=$objlist
10826 if test -z "$oldobjs"; then
10827 eval cmds=\"\$concat_cmds\"
10828 else
10829 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
10830 fi
10831 fi
10832 fi
10833 func_execute_cmds "$cmds" 'exit $?'
10834 done
10835
10836 test -n "$generated" && \
10837 func_show_eval "${RM}r$generated"
10838
10839 # Now create the libtool archive.
10840 case $output in
10841 *.la)
10842 old_library=
10843 test yes = "$build_old_libs" && old_library=$libname.$libext
10844 func_verbose "creating $output"
10845
10846 # Preserve any variables that may affect compiler behavior
10847 for var in $variables_saved_for_relink; do
10848 if eval test -z \"\${$var+set}\"; then
10849 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
10850 elif eval var_value=\$$var; test -z "$var_value"; then
10851 relink_command="$var=; export $var; $relink_command"
10852 else
10853 func_quote_for_eval "$var_value"
10854 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10855 fi
10856 done
10857 # Quote the link command for shipping.
10858 relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10859 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10860 if test yes = "$hardcode_automatic"; then
10861 relink_command=
10862 fi
10863
10864 # Only create the output if not a dry run.
10865 $opt_dry_run || {
10866 for installed in no yes; do
10867 if test yes = "$installed"; then
10868 if test -z "$install_libdir"; then
10869 break
10870 fi
10871 output=$output_objdir/${outputname}i
10872 # Replace all uninstalled libtool libraries with the installed ones
10873 newdependency_libs=
10874 for deplib in $dependency_libs; do
10875 case $deplib in
10876 *.la)
10877 func_basename "$deplib"
10878 name=$func_basename_result
10879 func_resolve_sysroot "$deplib"
10880 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
10881 test -z "$libdir" && \
10882 func_fatal_error "'$deplib' is not a valid libtool archive"
10883 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
10884 ;;
10885 -L*)
10886 func_stripname -L '' "$deplib"
10887 func_replace_sysroot "$func_stripname_result"
10888 func_append newdependency_libs " -L$func_replace_sysroot_result"
10889 ;;
10890 -R*)
10891 func_stripname -R '' "$deplib"
10892 func_replace_sysroot "$func_stripname_result"
10893 func_append newdependency_libs " -R$func_replace_sysroot_result"
10894 ;;
10895 *) func_append newdependency_libs " $deplib" ;;
10896 esac
10897 done
10898 dependency_libs=$newdependency_libs
10899 newdlfiles=
10900
10901 for lib in $dlfiles; do
10902 case $lib in
10903 *.la)
10904 func_basename "$lib"
10905 name=$func_basename_result
10906 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10907 test -z "$libdir" && \
10908 func_fatal_error "'$lib' is not a valid libtool archive"
10909 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
10910 ;;
10911 *) func_append newdlfiles " $lib" ;;
10912 esac
10913 done
10914 dlfiles=$newdlfiles
10915 newdlprefiles=
10916 for lib in $dlprefiles; do
10917 case $lib in
10918 *.la)
10919 # Only pass preopened files to the pseudo-archive (for
10920 # eventual linking with the app. that links it) if we
10921 # didn't already link the preopened objects directly into
10922 # the library:
10923 func_basename "$lib"
10924 name=$func_basename_result
10925 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10926 test -z "$libdir" && \
10927 func_fatal_error "'$lib' is not a valid libtool archive"
10928 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
10929 ;;
10930 esac
10931 done
10932 dlprefiles=$newdlprefiles
10933 else
10934 newdlfiles=
10935 for lib in $dlfiles; do
10936 case $lib in
10937 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
10938 *) abs=`pwd`"/$lib" ;;
10939 esac
10940 func_append newdlfiles " $abs"
10941 done
10942 dlfiles=$newdlfiles
10943 newdlprefiles=
10944 for lib in $dlprefiles; do
10945 case $lib in
10946 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
10947 *) abs=`pwd`"/$lib" ;;
10948 esac
10949 func_append newdlprefiles " $abs"
10950 done
10951 dlprefiles=$newdlprefiles
10952 fi
10953 $RM $output
10954 # place dlname in correct position for cygwin
10955 # In fact, it would be nice if we could use this code for all target
10956 # systems that can't hard-code library paths into their executables
10957 # and that have no shared library path variable independent of PATH,
10958 # but it turns out we can't easily determine that from inspecting
10959 # libtool variables, so we have to hard-code the OSs to which it
10960 # applies here; at the moment, that means platforms that use the PE
10961 # object format with DLL files. See the long comment at the top of
10962 # tests/bindir.at for full details.
10963 tdlname=$dlname
10964 case $host,$output,$installed,$module,$dlname in
10965 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
10966 # If a -bindir argument was supplied, place the dll there.
10967 if test -n "$bindir"; then
10968 func_relative_path "$install_libdir" "$bindir"
10969 tdlname=$func_relative_path_result/$dlname
10970 else
10971 # Otherwise fall back on heuristic.
10972 tdlname=../bin/$dlname
10973 fi
10974 ;;
10975 esac
10976 $ECHO > $output "\
10977 # $outputname - a libtool library file
10978 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
10979 #
10980 # Please DO NOT delete this file!
10981 # It is necessary for linking the library.
10982
10983 # The name that we can dlopen(3).
10984 dlname='$tdlname'
10985
10986 # Names of this library.
10987 library_names='$library_names'
10988
10989 # The name of the static archive.
10990 old_library='$old_library'
10991
10992 # Linker flags that cannot go in dependency_libs.
10993 inherited_linker_flags='$new_inherited_linker_flags'
10994
10995 # Libraries that this one depends upon.
10996 dependency_libs='$dependency_libs'
10997
10998 # Names of additional weak libraries provided by this library
10999 weak_library_names='$weak_libs'
11000
11001 # Version information for $libname.
11002 current=$current
11003 age=$age
11004 revision=$revision
11005
11006 # Is this an already installed library?
11007 installed=$installed
11008
11009 # Should we warn about portability when linking against -modules?
11010 shouldnotlink=$module
11011
11012 # Files to dlopen/dlpreopen
11013 dlopen='$dlfiles'
11014 dlpreopen='$dlprefiles'
11015
11016 # Directory that this library needs to be installed in:
11017 libdir='$install_libdir'"
11018 if test no,yes = "$installed,$need_relink"; then
11019 $ECHO >> $output "\
11020 relink_command=\"$relink_command\""
11021 fi
11022 done
11023 }
11024
11025 # Do a symbolic link so that the libtool archive can be found in
11026 # LD_LIBRARY_PATH before the program is installed.
11027 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
11028 ;;
11029 esac
11030 exit $EXIT_SUCCESS
11031 }
11032
11033 if test link = "$opt_mode" || test relink = "$opt_mode"; then
11034 func_mode_link ${1+"$@"}
11035 fi
11036
11037
11038 # func_mode_uninstall arg...
11039 func_mode_uninstall ()
11040 {
11041 $debug_cmd
11042
11043 RM=$nonopt
11044 files=
11045 rmforce=false
11046 exit_status=0
11047
11048 # This variable tells wrapper scripts just to set variables rather
11049 # than running their programs.
11050 libtool_install_magic=$magic
11051
11052 for arg
11053 do
11054 case $arg in
11055 -f) func_append RM " $arg"; rmforce=: ;;
11056 -*) func_append RM " $arg" ;;
11057 *) func_append files " $arg" ;;
11058 esac
11059 done
11060
11061 test -z "$RM" && \
11062 func_fatal_help "you must specify an RM program"
11063
11064 rmdirs=
11065
11066 for file in $files; do
11067 func_dirname "$file" "" "."
11068 dir=$func_dirname_result
11069 if test . = "$dir"; then
11070 odir=$objdir
11071 else
11072 odir=$dir/$objdir
11073 fi
11074 func_basename "$file"
11075 name=$func_basename_result
11076 test uninstall = "$opt_mode" && odir=$dir
11077
11078 # Remember odir for removal later, being careful to avoid duplicates
11079 if test clean = "$opt_mode"; then
11080 case " $rmdirs " in
11081 *" $odir "*) ;;
11082 *) func_append rmdirs " $odir" ;;
11083 esac
11084 fi
11085
11086 # Don't error if the file doesn't exist and rm -f was used.
11087 if { test -L "$file"; } >/dev/null 2>&1 ||
11088 { test -h "$file"; } >/dev/null 2>&1 ||
11089 test -f "$file"; then
11090 :
11091 elif test -d "$file"; then
11092 exit_status=1
11093 continue
11094 elif $rmforce; then
11095 continue
11096 fi
11097
11098 rmfiles=$file
11099
11100 case $name in
11101 *.la)
11102 # Possibly a libtool archive, so verify it.
11103 if func_lalib_p "$file"; then
11104 func_source $dir/$name
11105
11106 # Delete the libtool libraries and symlinks.
11107 for n in $library_names; do
11108 func_append rmfiles " $odir/$n"
11109 done
11110 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
11111
11112 case $opt_mode in
11113 clean)
11114 case " $library_names " in
11115 *" $dlname "*) ;;
11116 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
11117 esac
11118 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
11119 ;;
11120 uninstall)
11121 if test -n "$library_names"; then
11122 # Do each command in the postuninstall commands.
11123 func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
11124 fi
11125
11126 if test -n "$old_library"; then
11127 # Do each command in the old_postuninstall commands.
11128 func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
11129 fi
11130 # FIXME: should reinstall the best remaining shared library.
11131 ;;
11132 esac
11133 fi
11134 ;;
11135
11136 *.lo)
11137 # Possibly a libtool object, so verify it.
11138 if func_lalib_p "$file"; then
11139
11140 # Read the .lo file
11141 func_source $dir/$name
11142
11143 # Add PIC object to the list of files to remove.
11144 if test -n "$pic_object" && test none != "$pic_object"; then
11145 func_append rmfiles " $dir/$pic_object"
11146 fi
11147
11148 # Add non-PIC object to the list of files to remove.
11149 if test -n "$non_pic_object" && test none != "$non_pic_object"; then
11150 func_append rmfiles " $dir/$non_pic_object"
11151 fi
11152 fi
11153 ;;
11154
11155 *)
11156 if test clean = "$opt_mode"; then
11157 noexename=$name
11158 case $file in
11159 *.exe)
11160 func_stripname '' '.exe' "$file"
11161 file=$func_stripname_result
11162 func_stripname '' '.exe' "$name"
11163 noexename=$func_stripname_result
11164 # $file with .exe has already been added to rmfiles,
11165 # add $file without .exe
11166 func_append rmfiles " $file"
11167 ;;
11168 esac
11169 # Do a test to see if this is a libtool program.
11170 if func_ltwrapper_p "$file"; then
11171 if func_ltwrapper_executable_p "$file"; then
11172 func_ltwrapper_scriptname "$file"
11173 relink_command=
11174 func_source $func_ltwrapper_scriptname_result
11175 func_append rmfiles " $func_ltwrapper_scriptname_result"
11176 else
11177 relink_command=
11178 func_source $dir/$noexename
11179 fi
11180
11181 # note $name still contains .exe if it was in $file originally
11182 # as does the version of $file that was added into $rmfiles
11183 func_append rmfiles " $odir/$name $odir/${name}S.$objext"
11184 if test yes = "$fast_install" && test -n "$relink_command"; then
11185 func_append rmfiles " $odir/lt-$name"
11186 fi
11187 if test "X$noexename" != "X$name"; then
11188 func_append rmfiles " $odir/lt-$noexename.c"
11189 fi
11190 fi
11191 fi
11192 ;;
11193 esac
11194 func_show_eval "$RM $rmfiles" 'exit_status=1'
11195 done
11196
11197 # Try to remove the $objdir's in the directories where we deleted files
11198 for dir in $rmdirs; do
11199 if test -d "$dir"; then
11200 func_show_eval "rmdir $dir >/dev/null 2>&1"
11201 fi
11202 done
11203
11204 exit $exit_status
11205 }
11206
11207 if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
11208 func_mode_uninstall ${1+"$@"}
11209 fi
11210
11211 test -z "$opt_mode" && {
11212 help=$generic_help
11213 func_fatal_help "you must specify a MODE"
11214 }
11215
11216 test -z "$exec_cmd" && \
11217 func_fatal_help "invalid operation mode '$opt_mode'"
11218
11219 if test -n "$exec_cmd"; then
11220 eval exec "$exec_cmd"
11221 exit $EXIT_FAILURE
11222 fi
11223
11224 exit $exit_status
11225
11226
11227 # The TAGs below are defined such that we never get into a situation
11228 # where we disable both kinds of libraries. Given conflicting
11229 # choices, we go for a static library, that is the most portable,
11230 # since we can't tell whether shared libraries were disabled because
11231 # the user asked for that or because the platform doesn't support
11232 # them. This is particularly important on AIX, because we don't
11233 # support having both static and shared libraries enabled at the same
11234 # time on that platform, so we default to a shared-only configuration.
11235 # If a disable-shared tag is given, we'll fallback to a static-only
11236 # configuration. But we'll never go from static-only to shared-only.
11237
11238 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
11239 build_libtool_libs=no
11240 build_old_libs=yes
11241 # ### END LIBTOOL TAG CONFIG: disable-shared
11242
11243 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
11244 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
11245 # ### END LIBTOOL TAG CONFIG: disable-static
11246
11247 # Local Variables:
11248 # mode:shell-script
11249 # sh-indentation:2
11250 # End:
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 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
731
732 # Provide generalized library-building support services.
733 # Written by Gordon Matzigkeit, 1996
734
735 _LT_COPYING
736 _LT_LIBTOOL_TAGS
737
738 # Configured defaults for sys_lib_dlsearch_path munging.
739 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
740
741 # ### BEGIN LIBTOOL CONFIG
742 _LT_LIBTOOL_CONFIG_VARS
743 _LT_LIBTOOL_TAG_VARS
744 # ### END LIBTOOL CONFIG
745
746 _LT_EOF
747
748 cat <<'_LT_EOF' >> "$cfgfile"
749
750 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
751
752 _LT_PREPARE_MUNGE_PATH_LIST
753 _LT_PREPARE_CC_BASENAME
754
755 # ### END FUNCTIONS SHARED WITH CONFIGURE
756
757 _LT_EOF
758
759 case $host_os in
760 aix3*)
761 cat <<\_LT_EOF >> "$cfgfile"
762 # AIX sometimes has problems with the GCC collect2 program. For some
763 # reason, if we set the COLLECT_NAMES environment variable, the problems
764 # vanish in a puff of smoke.
765 if test set != "${COLLECT_NAMES+set}"; then
766 COLLECT_NAMES=
767 export COLLECT_NAMES
768 fi
769 _LT_EOF
770 ;;
771 esac
772
773 _LT_PROG_LTMAIN
774
775 # We use sed instead of cat because bash on DJGPP gets confused if
776 # if finds mixed CR/LF and LF-only lines. Since sed operates in
777 # text mode, it properly converts lines to CR/LF. This bash problem
778 # is reportedly fixed, but why not run on old versions too?
779 sed '$q' "$ltmain" >> "$cfgfile" \
780 || (rm -f "$cfgfile"; exit 1)
781
782 mv -f "$cfgfile" "$ofile" ||
783 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
784 chmod +x "$ofile"
785 ],
786 [cat <<_LT_EOF >> "$ofile"
787
788 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
789 dnl in a comment (ie after a #).
790 # ### BEGIN LIBTOOL TAG CONFIG: $1
791 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
792 # ### END LIBTOOL TAG CONFIG: $1
793 _LT_EOF
794 ])dnl /m4_if
795 ],
796 [m4_if([$1], [], [
797 PACKAGE='$PACKAGE'
798 VERSION='$VERSION'
799 RM='$RM'
800 ofile='$ofile'], [])
801 ])dnl /_LT_CONFIG_SAVE_COMMANDS
802 ])# _LT_CONFIG
803
804
805 # LT_SUPPORTED_TAG(TAG)
806 # ---------------------
807 # Trace this macro to discover what tags are supported by the libtool
808 # --tag option, using:
809 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
810 AC_DEFUN([LT_SUPPORTED_TAG], [])
811
812
813 # C support is built-in for now
814 m4_define([_LT_LANG_C_enabled], [])
815 m4_define([_LT_TAGS], [])
816
817
818 # LT_LANG(LANG)
819 # -------------
820 # Enable libtool support for the given language if not already enabled.
821 AC_DEFUN([LT_LANG],
822 [AC_BEFORE([$0], [LT_OUTPUT])dnl
823 m4_case([$1],
824 [C], [_LT_LANG(C)],
825 [C++], [_LT_LANG(CXX)],
826 [Go], [_LT_LANG(GO)],
827 [Java], [_LT_LANG(GCJ)],
828 [Fortran 77], [_LT_LANG(F77)],
829 [Fortran], [_LT_LANG(FC)],
830 [Windows Resource], [_LT_LANG(RC)],
831 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
832 [_LT_LANG($1)],
833 [m4_fatal([$0: unsupported language: "$1"])])])dnl
834 ])# LT_LANG
835
836
837 # _LT_LANG(LANGNAME)
838 # ------------------
839 m4_defun([_LT_LANG],
840 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
841 [LT_SUPPORTED_TAG([$1])dnl
842 m4_append([_LT_TAGS], [$1 ])dnl
843 m4_define([_LT_LANG_]$1[_enabled], [])dnl
844 _LT_LANG_$1_CONFIG($1)])dnl
845 ])# _LT_LANG
846
847
848 m4_ifndef([AC_PROG_GO], [
849 ############################################################
850 # NOTE: This macro has been submitted for inclusion into #
851 # GNU Autoconf as AC_PROG_GO. When it is available in #
852 # a released version of Autoconf we should remove this #
853 # macro and use it instead. #
854 ############################################################
855 m4_defun([AC_PROG_GO],
856 [AC_LANG_PUSH(Go)dnl
857 AC_ARG_VAR([GOC], [Go compiler command])dnl
858 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
859 _AC_ARG_VAR_LDFLAGS()dnl
860 AC_CHECK_TOOL(GOC, gccgo)
861 if test -z "$GOC"; then
862 if test -n "$ac_tool_prefix"; then
863 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
864 fi
865 fi
866 if test -z "$GOC"; then
867 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
868 fi
869 ])#m4_defun
870 ])#m4_ifndef
871
872
873 # _LT_LANG_DEFAULT_CONFIG
874 # -----------------------
875 m4_defun([_LT_LANG_DEFAULT_CONFIG],
876 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
877 [LT_LANG(CXX)],
878 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
879
880 AC_PROVIDE_IFELSE([AC_PROG_F77],
881 [LT_LANG(F77)],
882 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
883
884 AC_PROVIDE_IFELSE([AC_PROG_FC],
885 [LT_LANG(FC)],
886 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
887
888 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
889 dnl pulling things in needlessly.
890 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
891 [LT_LANG(GCJ)],
892 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
893 [LT_LANG(GCJ)],
894 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
895 [LT_LANG(GCJ)],
896 [m4_ifdef([AC_PROG_GCJ],
897 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
898 m4_ifdef([A][M_PROG_GCJ],
899 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
900 m4_ifdef([LT_PROG_GCJ],
901 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
902
903 AC_PROVIDE_IFELSE([AC_PROG_GO],
904 [LT_LANG(GO)],
905 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
906
907 AC_PROVIDE_IFELSE([LT_PROG_RC],
908 [LT_LANG(RC)],
909 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
910 ])# _LT_LANG_DEFAULT_CONFIG
911
912 # Obsolete macros:
913 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
914 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
915 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
916 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
917 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
918 dnl aclocal-1.4 backwards compatibility:
919 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
920 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
921 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
922 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
923 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
924
925
926 # _LT_TAG_COMPILER
927 # ----------------
928 m4_defun([_LT_TAG_COMPILER],
929 [AC_REQUIRE([AC_PROG_CC])dnl
930
931 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
932 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
933 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
934 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
935
936 # If no C compiler was specified, use CC.
937 LTCC=${LTCC-"$CC"}
938
939 # If no C compiler flags were specified, use CFLAGS.
940 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
941
942 # Allow CC to be a program name with arguments.
943 compiler=$CC
944 ])# _LT_TAG_COMPILER
945
946
947 # _LT_COMPILER_BOILERPLATE
948 # ------------------------
949 # Check for compiler boilerplate output or warnings with
950 # the simple compiler test code.
951 m4_defun([_LT_COMPILER_BOILERPLATE],
952 [m4_require([_LT_DECL_SED])dnl
953 ac_outfile=conftest.$ac_objext
954 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
955 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
956 _lt_compiler_boilerplate=`cat conftest.err`
957 $RM conftest*
958 ])# _LT_COMPILER_BOILERPLATE
959
960
961 # _LT_LINKER_BOILERPLATE
962 # ----------------------
963 # Check for linker boilerplate output or warnings with
964 # the simple link test code.
965 m4_defun([_LT_LINKER_BOILERPLATE],
966 [m4_require([_LT_DECL_SED])dnl
967 ac_outfile=conftest.$ac_objext
968 echo "$lt_simple_link_test_code" >conftest.$ac_ext
969 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
970 _lt_linker_boilerplate=`cat conftest.err`
971 $RM -r conftest*
972 ])# _LT_LINKER_BOILERPLATE
973
974 # _LT_REQUIRED_DARWIN_CHECKS
975 # -------------------------
976 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
977 case $host_os in
978 rhapsody* | darwin*)
979 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
980 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
981 AC_CHECK_TOOL([LIPO], [lipo], [:])
982 AC_CHECK_TOOL([OTOOL], [otool], [:])
983 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
984 _LT_DECL([], [DSYMUTIL], [1],
985 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
986 _LT_DECL([], [NMEDIT], [1],
987 [Tool to change global to local symbols on Mac OS X])
988 _LT_DECL([], [LIPO], [1],
989 [Tool to manipulate fat objects and archives on Mac OS X])
990 _LT_DECL([], [OTOOL], [1],
991 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
992 _LT_DECL([], [OTOOL64], [1],
993 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
994
995 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
996 [lt_cv_apple_cc_single_mod=no
997 if test -z "$LT_MULTI_MODULE"; then
998 # By default we will add the -single_module flag. You can override
999 # by either setting the environment variable LT_MULTI_MODULE
1000 # non-empty at configure time, or by adding -multi_module to the
1001 # link flags.
1002 rm -rf libconftest.dylib*
1003 echo "int foo(void){return 1;}" > conftest.c
1004 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1005 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1006 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1007 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1008 _lt_result=$?
1009 # If there is a non-empty error log, and "single_module"
1010 # appears in it, assume the flag caused a linker warning
1011 if test -s conftest.err && $GREP single_module conftest.err; then
1012 cat conftest.err >&AS_MESSAGE_LOG_FD
1013 # Otherwise, if the output was created with a 0 exit code from
1014 # the compiler, it worked.
1015 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1016 lt_cv_apple_cc_single_mod=yes
1017 else
1018 cat conftest.err >&AS_MESSAGE_LOG_FD
1019 fi
1020 rm -rf libconftest.dylib*
1021 rm -f conftest.*
1022 fi])
1023
1024 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1025 [lt_cv_ld_exported_symbols_list],
1026 [lt_cv_ld_exported_symbols_list=no
1027 save_LDFLAGS=$LDFLAGS
1028 echo "_main" > conftest.sym
1029 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1030 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1031 [lt_cv_ld_exported_symbols_list=yes],
1032 [lt_cv_ld_exported_symbols_list=no])
1033 LDFLAGS=$save_LDFLAGS
1034 ])
1035
1036 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1037 [lt_cv_ld_force_load=no
1038 cat > conftest.c << _LT_EOF
1039 int forced_loaded() { return 2;}
1040 _LT_EOF
1041 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1042 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1043 echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1044 $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1045 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1046 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1047 cat > conftest.c << _LT_EOF
1048 int main() { return 0;}
1049 _LT_EOF
1050 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1051 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1052 _lt_result=$?
1053 if test -s conftest.err && $GREP force_load conftest.err; then
1054 cat conftest.err >&AS_MESSAGE_LOG_FD
1055 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1056 lt_cv_ld_force_load=yes
1057 else
1058 cat conftest.err >&AS_MESSAGE_LOG_FD
1059 fi
1060 rm -f conftest.err libconftest.a conftest conftest.c
1061 rm -rf conftest.dSYM
1062 ])
1063 case $host_os in
1064 rhapsody* | darwin1.[[012]])
1065 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1066 darwin1.*)
1067 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1068 darwin*) # darwin 5.x on
1069 # if running on 10.5 or later, the deployment target defaults
1070 # to the OS version, if on x86, and 10.4, the deployment
1071 # target defaults to 10.4. Don't you love it?
1072 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1073 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
1074 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1075 10.[[012]][[,.]]*)
1076 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1077 10.*|11.*)
1078 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1079 esac
1080 ;;
1081 esac
1082 if test yes = "$lt_cv_apple_cc_single_mod"; then
1083 _lt_dar_single_mod='$single_module'
1084 fi
1085 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1086 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1087 else
1088 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1089 fi
1090 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1091 _lt_dsymutil='~$DSYMUTIL $lib || :'
1092 else
1093 _lt_dsymutil=
1094 fi
1095 ;;
1096 esac
1097 ])
1098
1099
1100 # _LT_DARWIN_LINKER_FEATURES([TAG])
1101 # ---------------------------------
1102 # Checks for linker and compiler features on darwin
1103 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1104 [
1105 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1106 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1107 _LT_TAGVAR(hardcode_direct, $1)=no
1108 _LT_TAGVAR(hardcode_automatic, $1)=yes
1109 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1110 if test yes = "$lt_cv_ld_force_load"; then
1111 _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\"`'
1112 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1113 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1114 else
1115 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1116 fi
1117 _LT_TAGVAR(link_all_deplibs, $1)=yes
1118 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1119 case $cc_basename in
1120 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1121 *) _lt_dar_can_shared=$GCC ;;
1122 esac
1123 if test yes = "$_lt_dar_can_shared"; then
1124 output_verbose_link_cmd=func_echo_all
1125 _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"
1126 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1127 _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"
1128 _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"
1129 m4_if([$1], [CXX],
1130 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1131 _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"
1132 _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"
1133 fi
1134 ],[])
1135 else
1136 _LT_TAGVAR(ld_shlibs, $1)=no
1137 fi
1138 ])
1139
1140 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1141 # ----------------------------------
1142 # Links a minimal program and checks the executable
1143 # for the system default hardcoded library path. In most cases,
1144 # this is /usr/lib:/lib, but when the MPI compilers are used
1145 # the location of the communication and MPI libs are included too.
1146 # If we don't find anything, use the default library path according
1147 # to the aix ld manual.
1148 # Store the results from the different compilers for each TAGNAME.
1149 # Allow to override them for all tags through lt_cv_aix_libpath.
1150 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1151 [m4_require([_LT_DECL_SED])dnl
1152 if test set = "${lt_cv_aix_libpath+set}"; then
1153 aix_libpath=$lt_cv_aix_libpath
1154 else
1155 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1156 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1157 lt_aix_libpath_sed='[
1158 /Import File Strings/,/^$/ {
1159 /^0/ {
1160 s/^0 *\([^ ]*\) *$/\1/
1161 p
1162 }
1163 }]'
1164 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1165 # Check for a 64-bit object if we didn't find anything.
1166 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1167 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1168 fi],[])
1169 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1170 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1171 fi
1172 ])
1173 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1174 fi
1175 ])# _LT_SYS_MODULE_PATH_AIX
1176
1177
1178 # _LT_SHELL_INIT(ARG)
1179 # -------------------
1180 m4_define([_LT_SHELL_INIT],
1181 [m4_divert_text([M4SH-INIT], [$1
1182 ])])# _LT_SHELL_INIT
1183
1184
1185
1186 # _LT_PROG_ECHO_BACKSLASH
1187 # -----------------------
1188 # Find how we can fake an echo command that does not interpret backslash.
1189 # In particular, with Autoconf 2.60 or later we add some code to the start
1190 # of the generated configure script that will find a shell with a builtin
1191 # printf (that we can use as an echo command).
1192 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1193 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1194 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1196
1197 AC_MSG_CHECKING([how to print strings])
1198 # Test print first, because it will be a builtin if present.
1199 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1200 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1201 ECHO='print -r --'
1202 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1203 ECHO='printf %s\n'
1204 else
1205 # Use this function as a fallback that always works.
1206 func_fallback_echo ()
1207 {
1208 eval 'cat <<_LTECHO_EOF
1209 $[]1
1210 _LTECHO_EOF'
1211 }
1212 ECHO='func_fallback_echo'
1213 fi
1214
1215 # func_echo_all arg...
1216 # Invoke $ECHO with all args, space-separated.
1217 func_echo_all ()
1218 {
1219 $ECHO "$*"
1220 }
1221
1222 case $ECHO in
1223 printf*) AC_MSG_RESULT([printf]) ;;
1224 print*) AC_MSG_RESULT([print -r]) ;;
1225 *) AC_MSG_RESULT([cat]) ;;
1226 esac
1227
1228 m4_ifdef([_AS_DETECT_SUGGESTED],
1229 [_AS_DETECT_SUGGESTED([
1230 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1231 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1232 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1233 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1234 PATH=/empty FPATH=/empty; export PATH FPATH
1235 test "X`printf %s $ECHO`" = "X$ECHO" \
1236 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1237
1238 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1239 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1240 ])# _LT_PROG_ECHO_BACKSLASH
1241
1242
1243 # _LT_WITH_SYSROOT
1244 # ----------------
1245 AC_DEFUN([_LT_WITH_SYSROOT],
1246 [AC_MSG_CHECKING([for sysroot])
1247 AC_ARG_WITH([sysroot],
1248 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1249 [Search for dependent libraries within DIR (or the compiler's sysroot
1250 if not specified).])],
1251 [], [with_sysroot=no])
1252
1253 dnl lt_sysroot will always be passed unquoted. We quote it here
1254 dnl in case the user passed a directory name.
1255 lt_sysroot=
1256 case $with_sysroot in #(
1257 yes)
1258 if test yes = "$GCC"; then
1259 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1260 fi
1261 ;; #(
1262 /*)
1263 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1264 ;; #(
1265 no|'')
1266 ;; #(
1267 *)
1268 AC_MSG_RESULT([$with_sysroot])
1269 AC_MSG_ERROR([The sysroot must be an absolute path.])
1270 ;;
1271 esac
1272
1273 AC_MSG_RESULT([${lt_sysroot:-no}])
1274 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1275 [dependent libraries, and where our libraries should be installed.])])
1276
1277 # _LT_ENABLE_LOCK
1278 # ---------------
1279 m4_defun([_LT_ENABLE_LOCK],
1280 [AC_ARG_ENABLE([libtool-lock],
1281 [AS_HELP_STRING([--disable-libtool-lock],
1282 [avoid locking (might break parallel builds)])])
1283 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1284
1285 # Some flags need to be propagated to the compiler or linker for good
1286 # libtool support.
1287 case $host in
1288 ia64-*-hpux*)
1289 # Find out what ABI is being produced by ac_compile, and set mode
1290 # options accordingly.
1291 echo 'int i;' > conftest.$ac_ext
1292 if AC_TRY_EVAL(ac_compile); then
1293 case `/usr/bin/file conftest.$ac_objext` in
1294 *ELF-32*)
1295 HPUX_IA64_MODE=32
1296 ;;
1297 *ELF-64*)
1298 HPUX_IA64_MODE=64
1299 ;;
1300 esac
1301 fi
1302 rm -rf conftest*
1303 ;;
1304 *-*-irix6*)
1305 # Find out what ABI is being produced by ac_compile, and set linker
1306 # options accordingly.
1307 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1308 if AC_TRY_EVAL(ac_compile); then
1309 if test yes = "$lt_cv_prog_gnu_ld"; then
1310 case `/usr/bin/file conftest.$ac_objext` in
1311 *32-bit*)
1312 LD="${LD-ld} -melf32bsmip"
1313 ;;
1314 *N32*)
1315 LD="${LD-ld} -melf32bmipn32"
1316 ;;
1317 *64-bit*)
1318 LD="${LD-ld} -melf64bmip"
1319 ;;
1320 esac
1321 else
1322 case `/usr/bin/file conftest.$ac_objext` in
1323 *32-bit*)
1324 LD="${LD-ld} -32"
1325 ;;
1326 *N32*)
1327 LD="${LD-ld} -n32"
1328 ;;
1329 *64-bit*)
1330 LD="${LD-ld} -64"
1331 ;;
1332 esac
1333 fi
1334 fi
1335 rm -rf conftest*
1336 ;;
1337
1338 mips64*-*linux*)
1339 # Find out what ABI is being produced by ac_compile, and set linker
1340 # options accordingly.
1341 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1342 if AC_TRY_EVAL(ac_compile); then
1343 emul=elf
1344 case `/usr/bin/file conftest.$ac_objext` in
1345 *32-bit*)
1346 emul="${emul}32"
1347 ;;
1348 *64-bit*)
1349 emul="${emul}64"
1350 ;;
1351 esac
1352 case `/usr/bin/file conftest.$ac_objext` in
1353 *MSB*)
1354 emul="${emul}btsmip"
1355 ;;
1356 *LSB*)
1357 emul="${emul}ltsmip"
1358 ;;
1359 esac
1360 case `/usr/bin/file conftest.$ac_objext` in
1361 *N32*)
1362 emul="${emul}n32"
1363 ;;
1364 esac
1365 LD="${LD-ld} -m $emul"
1366 fi
1367 rm -rf conftest*
1368 ;;
1369
1370 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1371 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1372 # Find out what ABI is being produced by ac_compile, and set linker
1373 # options accordingly. Note that the listed cases only cover the
1374 # situations where additional linker options are needed (such as when
1375 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1376 # vice versa); the common cases where no linker options are needed do
1377 # not appear in the list.
1378 echo 'int i;' > conftest.$ac_ext
1379 if AC_TRY_EVAL(ac_compile); then
1380 case `/usr/bin/file conftest.o` in
1381 *32-bit*)
1382 case $host in
1383 x86_64-*kfreebsd*-gnu)
1384 LD="${LD-ld} -m elf_i386_fbsd"
1385 ;;
1386 x86_64-*linux*)
1387 case `/usr/bin/file conftest.o` in
1388 *x86-64*)
1389 LD="${LD-ld} -m elf32_x86_64"
1390 ;;
1391 *)
1392 LD="${LD-ld} -m elf_i386"
1393 ;;
1394 esac
1395 ;;
1396 powerpc64le-*linux*)
1397 LD="${LD-ld} -m elf32lppclinux"
1398 ;;
1399 powerpc64-*linux*)
1400 LD="${LD-ld} -m elf32ppclinux"
1401 ;;
1402 s390x-*linux*)
1403 LD="${LD-ld} -m elf_s390"
1404 ;;
1405 sparc64-*linux*)
1406 LD="${LD-ld} -m elf32_sparc"
1407 ;;
1408 esac
1409 ;;
1410 *64-bit*)
1411 case $host in
1412 x86_64-*kfreebsd*-gnu)
1413 LD="${LD-ld} -m elf_x86_64_fbsd"
1414 ;;
1415 x86_64-*linux*)
1416 LD="${LD-ld} -m elf_x86_64"
1417 ;;
1418 powerpcle-*linux*)
1419 LD="${LD-ld} -m elf64lppc"
1420 ;;
1421 powerpc-*linux*)
1422 LD="${LD-ld} -m elf64ppc"
1423 ;;
1424 s390*-*linux*|s390*-*tpf*)
1425 LD="${LD-ld} -m elf64_s390"
1426 ;;
1427 sparc*-*linux*)
1428 LD="${LD-ld} -m elf64_sparc"
1429 ;;
1430 esac
1431 ;;
1432 esac
1433 fi
1434 rm -rf conftest*
1435 ;;
1436
1437 *-*-sco3.2v5*)
1438 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1439 SAVE_CFLAGS=$CFLAGS
1440 CFLAGS="$CFLAGS -belf"
1441 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1442 [AC_LANG_PUSH(C)
1443 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1444 AC_LANG_POP])
1445 if test yes != "$lt_cv_cc_needs_belf"; then
1446 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1447 CFLAGS=$SAVE_CFLAGS
1448 fi
1449 ;;
1450 *-*solaris*)
1451 # Find out what ABI is being produced by ac_compile, and set linker
1452 # options accordingly.
1453 echo 'int i;' > conftest.$ac_ext
1454 if AC_TRY_EVAL(ac_compile); then
1455 case `/usr/bin/file conftest.o` in
1456 *64-bit*)
1457 case $lt_cv_prog_gnu_ld in
1458 yes*)
1459 case $host in
1460 i?86-*-solaris*|x86_64-*-solaris*)
1461 LD="${LD-ld} -m elf_x86_64"
1462 ;;
1463 sparc*-*-solaris*)
1464 LD="${LD-ld} -m elf64_sparc"
1465 ;;
1466 esac
1467 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1468 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1469 LD=${LD-ld}_sol2
1470 fi
1471 ;;
1472 *)
1473 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1474 LD="${LD-ld} -64"
1475 fi
1476 ;;
1477 esac
1478 ;;
1479 esac
1480 fi
1481 rm -rf conftest*
1482 ;;
1483 esac
1484
1485 need_locks=$enable_libtool_lock
1486 ])# _LT_ENABLE_LOCK
1487
1488
1489 # _LT_PROG_AR
1490 # -----------
1491 m4_defun([_LT_PROG_AR],
1492 [AC_CHECK_TOOLS(AR, [ar], false)
1493 : ${AR=ar}
1494 : ${AR_FLAGS=cr}
1495 _LT_DECL([], [AR], [1], [The archiver])
1496 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1497
1498 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1499 [lt_cv_ar_at_file=no
1500 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1501 [echo conftest.$ac_objext > conftest.lst
1502 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1503 AC_TRY_EVAL([lt_ar_try])
1504 if test 0 -eq "$ac_status"; then
1505 # Ensure the archiver fails upon bogus file names.
1506 rm -f conftest.$ac_objext libconftest.a
1507 AC_TRY_EVAL([lt_ar_try])
1508 if test 0 -ne "$ac_status"; then
1509 lt_cv_ar_at_file=@
1510 fi
1511 fi
1512 rm -f conftest.* libconftest.a
1513 ])
1514 ])
1515
1516 if test no = "$lt_cv_ar_at_file"; then
1517 archiver_list_spec=
1518 else
1519 archiver_list_spec=$lt_cv_ar_at_file
1520 fi
1521 _LT_DECL([], [archiver_list_spec], [1],
1522 [How to feed a file listing to the archiver])
1523 ])# _LT_PROG_AR
1524
1525
1526 # _LT_CMD_OLD_ARCHIVE
1527 # -------------------
1528 m4_defun([_LT_CMD_OLD_ARCHIVE],
1529 [_LT_PROG_AR
1530
1531 AC_CHECK_TOOL(STRIP, strip, :)
1532 test -z "$STRIP" && STRIP=:
1533 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1534
1535 AC_CHECK_TOOL(RANLIB, ranlib, :)
1536 test -z "$RANLIB" && RANLIB=:
1537 _LT_DECL([], [RANLIB], [1],
1538 [Commands used to install an old-style archive])
1539
1540 # Determine commands to create old-style static archives.
1541 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1542 old_postinstall_cmds='chmod 644 $oldlib'
1543 old_postuninstall_cmds=
1544
1545 if test -n "$RANLIB"; then
1546 case $host_os in
1547 bitrig* | openbsd*)
1548 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1549 ;;
1550 *)
1551 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1552 ;;
1553 esac
1554 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1555 fi
1556
1557 case $host_os in
1558 darwin*)
1559 lock_old_archive_extraction=yes ;;
1560 *)
1561 lock_old_archive_extraction=no ;;
1562 esac
1563 _LT_DECL([], [old_postinstall_cmds], [2])
1564 _LT_DECL([], [old_postuninstall_cmds], [2])
1565 _LT_TAGDECL([], [old_archive_cmds], [2],
1566 [Commands used to build an old-style archive])
1567 _LT_DECL([], [lock_old_archive_extraction], [0],
1568 [Whether to use a lock for old archive extraction])
1569 ])# _LT_CMD_OLD_ARCHIVE
1570
1571
1572 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1573 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1574 # ----------------------------------------------------------------
1575 # Check whether the given compiler option works
1576 AC_DEFUN([_LT_COMPILER_OPTION],
1577 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1578 m4_require([_LT_DECL_SED])dnl
1579 AC_CACHE_CHECK([$1], [$2],
1580 [$2=no
1581 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1582 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1583 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1584 # Insert the option either (1) after the last *FLAGS variable, or
1585 # (2) before a word containing "conftest.", or (3) at the end.
1586 # Note that $ac_compile itself does not contain backslashes and begins
1587 # with a dollar sign (not a hyphen), so the echo should work correctly.
1588 # The option is referenced via a variable to avoid confusing sed.
1589 lt_compile=`echo "$ac_compile" | $SED \
1590 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1591 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1592 -e 's:$: $lt_compiler_flag:'`
1593 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1594 (eval "$lt_compile" 2>conftest.err)
1595 ac_status=$?
1596 cat conftest.err >&AS_MESSAGE_LOG_FD
1597 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1598 if (exit $ac_status) && test -s "$ac_outfile"; then
1599 # The compiler can only warn and ignore the option if not recognized
1600 # So say no if there are warnings other than the usual output.
1601 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1602 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1603 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1604 $2=yes
1605 fi
1606 fi
1607 $RM conftest*
1608 ])
1609
1610 if test yes = "[$]$2"; then
1611 m4_if([$5], , :, [$5])
1612 else
1613 m4_if([$6], , :, [$6])
1614 fi
1615 ])# _LT_COMPILER_OPTION
1616
1617 # Old name:
1618 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1619 dnl aclocal-1.4 backwards compatibility:
1620 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1621
1622
1623 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1624 # [ACTION-SUCCESS], [ACTION-FAILURE])
1625 # ----------------------------------------------------
1626 # Check whether the given linker option works
1627 AC_DEFUN([_LT_LINKER_OPTION],
1628 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1629 m4_require([_LT_DECL_SED])dnl
1630 AC_CACHE_CHECK([$1], [$2],
1631 [$2=no
1632 save_LDFLAGS=$LDFLAGS
1633 LDFLAGS="$LDFLAGS $3"
1634 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1635 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1636 # The linker can only warn and ignore the option if not recognized
1637 # So say no if there are warnings
1638 if test -s conftest.err; then
1639 # Append any errors to the config.log.
1640 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1641 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1642 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1643 if diff conftest.exp conftest.er2 >/dev/null; then
1644 $2=yes
1645 fi
1646 else
1647 $2=yes
1648 fi
1649 fi
1650 $RM -r conftest*
1651 LDFLAGS=$save_LDFLAGS
1652 ])
1653
1654 if test yes = "[$]$2"; then
1655 m4_if([$4], , :, [$4])
1656 else
1657 m4_if([$5], , :, [$5])
1658 fi
1659 ])# _LT_LINKER_OPTION
1660
1661 # Old name:
1662 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1663 dnl aclocal-1.4 backwards compatibility:
1664 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1665
1666
1667 # LT_CMD_MAX_LEN
1668 #---------------
1669 AC_DEFUN([LT_CMD_MAX_LEN],
1670 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1671 # find the maximum length of command line arguments
1672 AC_MSG_CHECKING([the maximum length of command line arguments])
1673 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1674 i=0
1675 teststring=ABCD
1676
1677 case $build_os in
1678 msdosdjgpp*)
1679 # On DJGPP, this test can blow up pretty badly due to problems in libc
1680 # (any single argument exceeding 2000 bytes causes a buffer overrun
1681 # during glob expansion). Even if it were fixed, the result of this
1682 # check would be larger than it should be.
1683 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1684 ;;
1685
1686 gnu*)
1687 # Under GNU Hurd, this test is not required because there is
1688 # no limit to the length of command line arguments.
1689 # Libtool will interpret -1 as no limit whatsoever
1690 lt_cv_sys_max_cmd_len=-1;
1691 ;;
1692
1693 cygwin* | mingw* | cegcc*)
1694 # On Win9x/ME, this test blows up -- it succeeds, but takes
1695 # about 5 minutes as the teststring grows exponentially.
1696 # Worse, since 9x/ME are not pre-emptively multitasking,
1697 # you end up with a "frozen" computer, even though with patience
1698 # the test eventually succeeds (with a max line length of 256k).
1699 # Instead, let's just punt: use the minimum linelength reported by
1700 # all of the supported platforms: 8192 (on NT/2K/XP).
1701 lt_cv_sys_max_cmd_len=8192;
1702 ;;
1703
1704 mint*)
1705 # On MiNT this can take a long time and run out of memory.
1706 lt_cv_sys_max_cmd_len=8192;
1707 ;;
1708
1709 amigaos*)
1710 # On AmigaOS with pdksh, this test takes hours, literally.
1711 # So we just punt and use a minimum line length of 8192.
1712 lt_cv_sys_max_cmd_len=8192;
1713 ;;
1714
1715 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1716 # This has been around since 386BSD, at least. Likely further.
1717 if test -x /sbin/sysctl; then
1718 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1719 elif test -x /usr/sbin/sysctl; then
1720 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1721 else
1722 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1723 fi
1724 # And add a safety zone
1725 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1727 ;;
1728
1729 interix*)
1730 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1731 lt_cv_sys_max_cmd_len=196608
1732 ;;
1733
1734 os2*)
1735 # The test takes a long time on OS/2.
1736 lt_cv_sys_max_cmd_len=8192
1737 ;;
1738
1739 osf*)
1740 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1741 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1742 # nice to cause kernel panics so lets avoid the loop below.
1743 # First set a reasonable default.
1744 lt_cv_sys_max_cmd_len=16384
1745 #
1746 if test -x /sbin/sysconfig; then
1747 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1748 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1749 esac
1750 fi
1751 ;;
1752 sco3.2v5*)
1753 lt_cv_sys_max_cmd_len=102400
1754 ;;
1755 sysv5* | sco5v6* | sysv4.2uw2*)
1756 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1757 if test -n "$kargmax"; then
1758 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1759 else
1760 lt_cv_sys_max_cmd_len=32768
1761 fi
1762 ;;
1763 *)
1764 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1765 if test -n "$lt_cv_sys_max_cmd_len" && \
1766 test undefined != "$lt_cv_sys_max_cmd_len"; then
1767 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1769 else
1770 # Make teststring a little bigger before we do anything with it.
1771 # a 1K string should be a reasonable start.
1772 for i in 1 2 3 4 5 6 7 8; do
1773 teststring=$teststring$teststring
1774 done
1775 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1776 # If test is not a shell built-in, we'll probably end up computing a
1777 # maximum length that is only half of the actual maximum length, but
1778 # we can't tell.
1779 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1780 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1781 test 17 != "$i" # 1/2 MB should be enough
1782 do
1783 i=`expr $i + 1`
1784 teststring=$teststring$teststring
1785 done
1786 # Only check the string length outside the loop.
1787 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1788 teststring=
1789 # Add a significant safety factor because C++ compilers can tack on
1790 # massive amounts of additional arguments before passing them to the
1791 # linker. It appears as though 1/2 is a usable value.
1792 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1793 fi
1794 ;;
1795 esac
1796 ])
1797 if test -n "$lt_cv_sys_max_cmd_len"; then
1798 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1799 else
1800 AC_MSG_RESULT(none)
1801 fi
1802 max_cmd_len=$lt_cv_sys_max_cmd_len
1803 _LT_DECL([], [max_cmd_len], [0],
1804 [What is the maximum length of a command?])
1805 ])# LT_CMD_MAX_LEN
1806
1807 # Old name:
1808 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1809 dnl aclocal-1.4 backwards compatibility:
1810 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1811
1812
1813 # _LT_HEADER_DLFCN
1814 # ----------------
1815 m4_defun([_LT_HEADER_DLFCN],
1816 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1817 ])# _LT_HEADER_DLFCN
1818
1819
1820 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1821 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1822 # ----------------------------------------------------------------
1823 m4_defun([_LT_TRY_DLOPEN_SELF],
1824 [m4_require([_LT_HEADER_DLFCN])dnl
1825 if test yes = "$cross_compiling"; then :
1826 [$4]
1827 else
1828 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1829 lt_status=$lt_dlunknown
1830 cat > conftest.$ac_ext <<_LT_EOF
1831 [#line $LINENO "configure"
1832 #include "confdefs.h"
1833
1834 #if HAVE_DLFCN_H
1835 #include <dlfcn.h>
1836 #endif
1837
1838 #include <stdio.h>
1839
1840 #ifdef RTLD_GLOBAL
1841 # define LT_DLGLOBAL RTLD_GLOBAL
1842 #else
1843 # ifdef DL_GLOBAL
1844 # define LT_DLGLOBAL DL_GLOBAL
1845 # else
1846 # define LT_DLGLOBAL 0
1847 # endif
1848 #endif
1849
1850 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1851 find out it does not work in some platform. */
1852 #ifndef LT_DLLAZY_OR_NOW
1853 # ifdef RTLD_LAZY
1854 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1855 # else
1856 # ifdef DL_LAZY
1857 # define LT_DLLAZY_OR_NOW DL_LAZY
1858 # else
1859 # ifdef RTLD_NOW
1860 # define LT_DLLAZY_OR_NOW RTLD_NOW
1861 # else
1862 # ifdef DL_NOW
1863 # define LT_DLLAZY_OR_NOW DL_NOW
1864 # else
1865 # define LT_DLLAZY_OR_NOW 0
1866 # endif
1867 # endif
1868 # endif
1869 # endif
1870 #endif
1871
1872 /* When -fvisibility=hidden is used, assume the code has been annotated
1873 correspondingly for the symbols needed. */
1874 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1875 int fnord () __attribute__((visibility("default")));
1876 #endif
1877
1878 int fnord () { return 42; }
1879 int main ()
1880 {
1881 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1882 int status = $lt_dlunknown;
1883
1884 if (self)
1885 {
1886 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1887 else
1888 {
1889 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1890 else puts (dlerror ());
1891 }
1892 /* dlclose (self); */
1893 }
1894 else
1895 puts (dlerror ());
1896
1897 return status;
1898 }]
1899 _LT_EOF
1900 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1901 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1902 lt_status=$?
1903 case x$lt_status in
1904 x$lt_dlno_uscore) $1 ;;
1905 x$lt_dlneed_uscore) $2 ;;
1906 x$lt_dlunknown|x*) $3 ;;
1907 esac
1908 else :
1909 # compilation failed
1910 $3
1911 fi
1912 fi
1913 rm -fr conftest*
1914 ])# _LT_TRY_DLOPEN_SELF
1915
1916
1917 # LT_SYS_DLOPEN_SELF
1918 # ------------------
1919 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1920 [m4_require([_LT_HEADER_DLFCN])dnl
1921 if test yes != "$enable_dlopen"; then
1922 enable_dlopen=unknown
1923 enable_dlopen_self=unknown
1924 enable_dlopen_self_static=unknown
1925 else
1926 lt_cv_dlopen=no
1927 lt_cv_dlopen_libs=
1928
1929 case $host_os in
1930 beos*)
1931 lt_cv_dlopen=load_add_on
1932 lt_cv_dlopen_libs=
1933 lt_cv_dlopen_self=yes
1934 ;;
1935
1936 mingw* | pw32* | cegcc*)
1937 lt_cv_dlopen=LoadLibrary
1938 lt_cv_dlopen_libs=
1939 ;;
1940
1941 cygwin*)
1942 lt_cv_dlopen=dlopen
1943 lt_cv_dlopen_libs=
1944 ;;
1945
1946 darwin*)
1947 # if libdl is installed we need to link against it
1948 AC_CHECK_LIB([dl], [dlopen],
1949 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1950 lt_cv_dlopen=dyld
1951 lt_cv_dlopen_libs=
1952 lt_cv_dlopen_self=yes
1953 ])
1954 ;;
1955
1956 tpf*)
1957 # Don't try to run any link tests for TPF. We know it's impossible
1958 # because TPF is a cross-compiler, and we know how we open DSOs.
1959 lt_cv_dlopen=dlopen
1960 lt_cv_dlopen_libs=
1961 lt_cv_dlopen_self=no
1962 ;;
1963
1964 *)
1965 AC_CHECK_FUNC([shl_load],
1966 [lt_cv_dlopen=shl_load],
1967 [AC_CHECK_LIB([dld], [shl_load],
1968 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1969 [AC_CHECK_FUNC([dlopen],
1970 [lt_cv_dlopen=dlopen],
1971 [AC_CHECK_LIB([dl], [dlopen],
1972 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1973 [AC_CHECK_LIB([svld], [dlopen],
1974 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1975 [AC_CHECK_LIB([dld], [dld_link],
1976 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1977 ])
1978 ])
1979 ])
1980 ])
1981 ])
1982 ;;
1983 esac
1984
1985 if test no = "$lt_cv_dlopen"; then
1986 enable_dlopen=no
1987 else
1988 enable_dlopen=yes
1989 fi
1990
1991 case $lt_cv_dlopen in
1992 dlopen)
1993 save_CPPFLAGS=$CPPFLAGS
1994 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1995
1996 save_LDFLAGS=$LDFLAGS
1997 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1998
1999 save_LIBS=$LIBS
2000 LIBS="$lt_cv_dlopen_libs $LIBS"
2001
2002 AC_CACHE_CHECK([whether a program can dlopen itself],
2003 lt_cv_dlopen_self, [dnl
2004 _LT_TRY_DLOPEN_SELF(
2005 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2006 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2007 ])
2008
2009 if test yes = "$lt_cv_dlopen_self"; then
2010 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2011 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2012 lt_cv_dlopen_self_static, [dnl
2013 _LT_TRY_DLOPEN_SELF(
2014 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2015 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2016 ])
2017 fi
2018
2019 CPPFLAGS=$save_CPPFLAGS
2020 LDFLAGS=$save_LDFLAGS
2021 LIBS=$save_LIBS
2022 ;;
2023 esac
2024
2025 case $lt_cv_dlopen_self in
2026 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2027 *) enable_dlopen_self=unknown ;;
2028 esac
2029
2030 case $lt_cv_dlopen_self_static in
2031 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2032 *) enable_dlopen_self_static=unknown ;;
2033 esac
2034 fi
2035 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2036 [Whether dlopen is supported])
2037 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2038 [Whether dlopen of programs is supported])
2039 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2040 [Whether dlopen of statically linked programs is supported])
2041 ])# LT_SYS_DLOPEN_SELF
2042
2043 # Old name:
2044 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2045 dnl aclocal-1.4 backwards compatibility:
2046 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2047
2048
2049 # _LT_COMPILER_C_O([TAGNAME])
2050 # ---------------------------
2051 # Check to see if options -c and -o are simultaneously supported by compiler.
2052 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2053 m4_defun([_LT_COMPILER_C_O],
2054 [m4_require([_LT_DECL_SED])dnl
2055 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2056 m4_require([_LT_TAG_COMPILER])dnl
2057 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2058 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2059 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2060 $RM -r conftest 2>/dev/null
2061 mkdir conftest
2062 cd conftest
2063 mkdir out
2064 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2065
2066 lt_compiler_flag="-o out/conftest2.$ac_objext"
2067 # Insert the option either (1) after the last *FLAGS variable, or
2068 # (2) before a word containing "conftest.", or (3) at the end.
2069 # Note that $ac_compile itself does not contain backslashes and begins
2070 # with a dollar sign (not a hyphen), so the echo should work correctly.
2071 lt_compile=`echo "$ac_compile" | $SED \
2072 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2073 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2074 -e 's:$: $lt_compiler_flag:'`
2075 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2076 (eval "$lt_compile" 2>out/conftest.err)
2077 ac_status=$?
2078 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2080 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2081 then
2082 # The compiler can only warn and ignore the option if not recognized
2083 # So say no if there are warnings
2084 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2085 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2086 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2087 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2088 fi
2089 fi
2090 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2091 $RM conftest*
2092 # SGI C++ compiler will create directory out/ii_files/ for
2093 # template instantiation
2094 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2095 $RM out/* && rmdir out
2096 cd ..
2097 $RM -r conftest
2098 $RM conftest*
2099 ])
2100 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2101 [Does compiler simultaneously support -c and -o options?])
2102 ])# _LT_COMPILER_C_O
2103
2104
2105 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2106 # ----------------------------------
2107 # Check to see if we can do hard links to lock some files if needed
2108 m4_defun([_LT_COMPILER_FILE_LOCKS],
2109 [m4_require([_LT_ENABLE_LOCK])dnl
2110 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2111 _LT_COMPILER_C_O([$1])
2112
2113 hard_links=nottested
2114 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2115 # do not overwrite the value of need_locks provided by the user
2116 AC_MSG_CHECKING([if we can lock with hard links])
2117 hard_links=yes
2118 $RM conftest*
2119 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2120 touch conftest.a
2121 ln conftest.a conftest.b 2>&5 || hard_links=no
2122 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2123 AC_MSG_RESULT([$hard_links])
2124 if test no = "$hard_links"; then
2125 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2126 need_locks=warn
2127 fi
2128 else
2129 need_locks=no
2130 fi
2131 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2132 ])# _LT_COMPILER_FILE_LOCKS
2133
2134
2135 # _LT_CHECK_OBJDIR
2136 # ----------------
2137 m4_defun([_LT_CHECK_OBJDIR],
2138 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2139 [rm -f .libs 2>/dev/null
2140 mkdir .libs 2>/dev/null
2141 if test -d .libs; then
2142 lt_cv_objdir=.libs
2143 else
2144 # MS-DOS does not allow filenames that begin with a dot.
2145 lt_cv_objdir=_libs
2146 fi
2147 rmdir .libs 2>/dev/null])
2148 objdir=$lt_cv_objdir
2149 _LT_DECL([], [objdir], [0],
2150 [The name of the directory that contains temporary libtool files])dnl
2151 m4_pattern_allow([LT_OBJDIR])dnl
2152 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2153 [Define to the sub-directory where libtool stores uninstalled libraries.])
2154 ])# _LT_CHECK_OBJDIR
2155
2156
2157 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2158 # --------------------------------------
2159 # Check hardcoding attributes.
2160 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2161 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2162 _LT_TAGVAR(hardcode_action, $1)=
2163 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2164 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2165 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2166
2167 # We can hardcode non-existent directories.
2168 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2169 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2170 # have to relink, otherwise we might link with an installed library
2171 # when we should be linking with a yet-to-be-installed one
2172 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2173 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2174 # Linking always hardcodes the temporary library directory.
2175 _LT_TAGVAR(hardcode_action, $1)=relink
2176 else
2177 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2178 _LT_TAGVAR(hardcode_action, $1)=immediate
2179 fi
2180 else
2181 # We cannot hardcode anything, or else we can only hardcode existing
2182 # directories.
2183 _LT_TAGVAR(hardcode_action, $1)=unsupported
2184 fi
2185 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2186
2187 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2188 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2189 # Fast installation is not supported
2190 enable_fast_install=no
2191 elif test yes = "$shlibpath_overrides_runpath" ||
2192 test no = "$enable_shared"; then
2193 # Fast installation is not necessary
2194 enable_fast_install=needless
2195 fi
2196 _LT_TAGDECL([], [hardcode_action], [0],
2197 [How to hardcode a shared library path into an executable])
2198 ])# _LT_LINKER_HARDCODE_LIBPATH
2199
2200
2201 # _LT_CMD_STRIPLIB
2202 # ----------------
2203 m4_defun([_LT_CMD_STRIPLIB],
2204 [m4_require([_LT_DECL_EGREP])
2205 striplib=
2206 old_striplib=
2207 AC_MSG_CHECKING([whether stripping libraries is possible])
2208 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2209 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2210 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2211 AC_MSG_RESULT([yes])
2212 else
2213 # FIXME - insert some real tests, host_os isn't really good enough
2214 case $host_os in
2215 darwin*)
2216 if test -n "$STRIP"; then
2217 striplib="$STRIP -x"
2218 old_striplib="$STRIP -S"
2219 AC_MSG_RESULT([yes])
2220 else
2221 AC_MSG_RESULT([no])
2222 fi
2223 ;;
2224 *)
2225 AC_MSG_RESULT([no])
2226 ;;
2227 esac
2228 fi
2229 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2230 _LT_DECL([], [striplib], [1])
2231 ])# _LT_CMD_STRIPLIB
2232
2233
2234 # _LT_PREPARE_MUNGE_PATH_LIST
2235 # ---------------------------
2236 # Make sure func_munge_path_list() is defined correctly.
2237 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2238 [[# func_munge_path_list VARIABLE PATH
2239 # -----------------------------------
2240 # VARIABLE is name of variable containing _space_ separated list of
2241 # directories to be munged by the contents of PATH, which is string
2242 # having a format:
2243 # "DIR[:DIR]:"
2244 # string "DIR[ DIR]" will be prepended to VARIABLE
2245 # ":DIR[:DIR]"
2246 # string "DIR[ DIR]" will be appended to VARIABLE
2247 # "DIRP[:DIRP]::[DIRA:]DIRA"
2248 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2249 # "DIRA[ DIRA]" will be appended to VARIABLE
2250 # "DIR[:DIR]"
2251 # VARIABLE will be replaced by "DIR[ DIR]"
2252 func_munge_path_list ()
2253 {
2254 case x@S|@2 in
2255 x)
2256 ;;
2257 *:)
2258 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2259 ;;
2260 x:*)
2261 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2262 ;;
2263 *::*)
2264 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2265 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2266 ;;
2267 *)
2268 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2269 ;;
2270 esac
2271 }
2272 ]])# _LT_PREPARE_PATH_LIST
2273
2274
2275 # _LT_SYS_DYNAMIC_LINKER([TAG])
2276 # -----------------------------
2277 # PORTME Fill in your ld.so characteristics
2278 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2279 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2280 m4_require([_LT_DECL_EGREP])dnl
2281 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2282 m4_require([_LT_DECL_OBJDUMP])dnl
2283 m4_require([_LT_DECL_SED])dnl
2284 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2285 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2286 AC_MSG_CHECKING([dynamic linker characteristics])
2287 m4_if([$1],
2288 [], [
2289 if test yes = "$GCC"; then
2290 case $host_os in
2291 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2292 *) lt_awk_arg='/^libraries:/' ;;
2293 esac
2294 case $host_os in
2295 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2296 *) lt_sed_strip_eq='s|=/|/|g' ;;
2297 esac
2298 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2299 case $lt_search_path_spec in
2300 *\;*)
2301 # if the path contains ";" then we assume it to be the separator
2302 # otherwise default to the standard path separator (i.e. ":") - it is
2303 # assumed that no part of a normal pathname contains ";" but that should
2304 # okay in the real world where ";" in dirpaths is itself problematic.
2305 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2306 ;;
2307 *)
2308 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2309 ;;
2310 esac
2311 # Ok, now we have the path, separated by spaces, we can step through it
2312 # and add multilib dir if necessary...
2313 lt_tmp_lt_search_path_spec=
2314 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2315 # ...but if some path component already ends with the multilib dir we assume
2316 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2317 case "$lt_multi_os_dir; $lt_search_path_spec " in
2318 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2319 lt_multi_os_dir=
2320 ;;
2321 esac
2322 for lt_sys_path in $lt_search_path_spec; do
2323 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2324 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2325 elif test -n "$lt_multi_os_dir"; then
2326 test -d "$lt_sys_path" && \
2327 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2328 fi
2329 done
2330 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2331 BEGIN {RS = " "; FS = "/|\n";} {
2332 lt_foo = "";
2333 lt_count = 0;
2334 for (lt_i = NF; lt_i > 0; lt_i--) {
2335 if ($lt_i != "" && $lt_i != ".") {
2336 if ($lt_i == "..") {
2337 lt_count++;
2338 } else {
2339 if (lt_count == 0) {
2340 lt_foo = "/" $lt_i lt_foo;
2341 } else {
2342 lt_count--;
2343 }
2344 }
2345 }
2346 }
2347 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2348 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2349 }'`
2350 # AWK program above erroneously prepends '/' to C:/dos/paths
2351 # for these hosts.
2352 case $host_os in
2353 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2354 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2355 esac
2356 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2357 else
2358 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2359 fi])
2360 library_names_spec=
2361 libname_spec='lib$name'
2362 soname_spec=
2363 shrext_cmds=.so
2364 postinstall_cmds=
2365 postuninstall_cmds=
2366 finish_cmds=
2367 finish_eval=
2368 shlibpath_var=
2369 shlibpath_overrides_runpath=unknown
2370 version_type=none
2371 dynamic_linker="$host_os ld.so"
2372 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2373 need_lib_prefix=unknown
2374 hardcode_into_libs=no
2375
2376 # when you set need_version to no, make sure it does not cause -set_version
2377 # flags to be left without arguments
2378 need_version=unknown
2379
2380 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2381 [User-defined run-time library search path.])
2382
2383 case $host_os in
2384 aix3*)
2385 version_type=linux # correct to gnu/linux during the next big refactor
2386 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2387 shlibpath_var=LIBPATH
2388
2389 # AIX 3 has no versioning support, so we append a major version to the name.
2390 soname_spec='$libname$release$shared_ext$major'
2391 ;;
2392
2393 aix[[4-9]]*)
2394 version_type=linux # correct to gnu/linux during the next big refactor
2395 need_lib_prefix=no
2396 need_version=no
2397 hardcode_into_libs=yes
2398 if test ia64 = "$host_cpu"; then
2399 # AIX 5 supports IA64
2400 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2401 shlibpath_var=LD_LIBRARY_PATH
2402 else
2403 # With GCC up to 2.95.x, collect2 would create an import file
2404 # for dependence libraries. The import file would start with
2405 # the line '#! .'. This would cause the generated library to
2406 # depend on '.', always an invalid library. This was fixed in
2407 # development snapshots of GCC prior to 3.0.
2408 case $host_os in
2409 aix4 | aix4.[[01]] | aix4.[[01]].*)
2410 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2411 echo ' yes '
2412 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2413 :
2414 else
2415 can_build_shared=no
2416 fi
2417 ;;
2418 esac
2419 # Using Import Files as archive members, it is possible to support
2420 # filename-based versioning of shared library archives on AIX. While
2421 # this would work for both with and without runtime linking, it will
2422 # prevent static linking of such archives. So we do filename-based
2423 # shared library versioning with .so extension only, which is used
2424 # when both runtime linking and shared linking is enabled.
2425 # Unfortunately, runtime linking may impact performance, so we do
2426 # not want this to be the default eventually. Also, we use the
2427 # versioned .so libs for executables only if there is the -brtl
2428 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2429 # To allow for filename-based versioning support, we need to create
2430 # libNAME.so.V as an archive file, containing:
2431 # *) an Import File, referring to the versioned filename of the
2432 # archive as well as the shared archive member, telling the
2433 # bitwidth (32 or 64) of that shared object, and providing the
2434 # list of exported symbols of that shared object, eventually
2435 # decorated with the 'weak' keyword
2436 # *) the shared object with the F_LOADONLY flag set, to really avoid
2437 # it being seen by the linker.
2438 # At run time we better use the real file rather than another symlink,
2439 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2440
2441 case $with_aix_soname,$aix_use_runtimelinking in
2442 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2443 # soname into executable. Probably we can add versioning support to
2444 # collect2, so additional links can be useful in future.
2445 aix,yes) # traditional libtool
2446 dynamic_linker='AIX unversionable lib.so'
2447 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2448 # instead of lib<name>.a to let people know that these are not
2449 # typical AIX shared libraries.
2450 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2451 ;;
2452 aix,no) # traditional AIX only
2453 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2454 # We preserve .a as extension for shared libraries through AIX4.2
2455 # and later when we are not doing run time linking.
2456 library_names_spec='$libname$release.a $libname.a'
2457 soname_spec='$libname$release$shared_ext$major'
2458 ;;
2459 svr4,*) # full svr4 only
2460 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2461 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2462 # We do not specify a path in Import Files, so LIBPATH fires.
2463 shlibpath_overrides_runpath=yes
2464 ;;
2465 *,yes) # both, prefer svr4
2466 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2467 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2468 # unpreferred sharedlib libNAME.a needs extra handling
2469 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"'
2470 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"'
2471 # We do not specify a path in Import Files, so LIBPATH fires.
2472 shlibpath_overrides_runpath=yes
2473 ;;
2474 *,no) # both, prefer aix
2475 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2476 library_names_spec='$libname$release.a $libname.a'
2477 soname_spec='$libname$release$shared_ext$major'
2478 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2479 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)'
2480 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"'
2481 ;;
2482 esac
2483 shlibpath_var=LIBPATH
2484 fi
2485 ;;
2486
2487 amigaos*)
2488 case $host_cpu in
2489 powerpc)
2490 # Since July 2007 AmigaOS4 officially supports .so libraries.
2491 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2492 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2493 ;;
2494 m68k)
2495 library_names_spec='$libname.ixlibrary $libname.a'
2496 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2497 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'
2498 ;;
2499 esac
2500 ;;
2501
2502 beos*)
2503 library_names_spec='$libname$shared_ext'
2504 dynamic_linker="$host_os ld.so"
2505 shlibpath_var=LIBRARY_PATH
2506 ;;
2507
2508 bsdi[[45]]*)
2509 version_type=linux # correct to gnu/linux during the next big refactor
2510 need_version=no
2511 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2512 soname_spec='$libname$release$shared_ext$major'
2513 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2514 shlibpath_var=LD_LIBRARY_PATH
2515 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2516 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2517 # the default ld.so.conf also contains /usr/contrib/lib and
2518 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2519 # libtool to hard-code these into programs
2520 ;;
2521
2522 cygwin* | mingw* | pw32* | cegcc*)
2523 version_type=windows
2524 shrext_cmds=.dll
2525 need_version=no
2526 need_lib_prefix=no
2527
2528 case $GCC,$cc_basename in
2529 yes,*)
2530 # gcc
2531 library_names_spec='$libname.dll.a'
2532 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2533 postinstall_cmds='base_file=`basename \$file`~
2534 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2535 dldir=$destdir/`dirname \$dlpath`~
2536 test -d \$dldir || mkdir -p \$dldir~
2537 $install_prog $dir/$dlname \$dldir/$dlname~
2538 chmod a+x \$dldir/$dlname~
2539 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2540 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2541 fi'
2542 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2543 dlpath=$dir/\$dldll~
2544 $RM \$dlpath'
2545 shlibpath_overrides_runpath=yes
2546
2547 case $host_os in
2548 cygwin*)
2549 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2550 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2551 m4_if([$1], [],[
2552 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2553 ;;
2554 mingw* | cegcc*)
2555 # MinGW DLLs use traditional 'lib' prefix
2556 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2557 ;;
2558 pw32*)
2559 # pw32 DLLs use 'pw' prefix rather than 'lib'
2560 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2561 ;;
2562 esac
2563 dynamic_linker='Win32 ld.exe'
2564 ;;
2565
2566 *,cl*)
2567 # Native MSVC
2568 libname_spec='$name'
2569 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2570 library_names_spec='$libname.dll.lib'
2571
2572 case $build_os in
2573 mingw*)
2574 sys_lib_search_path_spec=
2575 lt_save_ifs=$IFS
2576 IFS=';'
2577 for lt_path in $LIB
2578 do
2579 IFS=$lt_save_ifs
2580 # Let DOS variable expansion print the short 8.3 style file name.
2581 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2582 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2583 done
2584 IFS=$lt_save_ifs
2585 # Convert to MSYS style.
2586 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2587 ;;
2588 cygwin*)
2589 # Convert to unix form, then to dos form, then back to unix form
2590 # but this time dos style (no spaces!) so that the unix form looks
2591 # like /cygdrive/c/PROGRA~1:/cygdr...
2592 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2593 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2594 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2595 ;;
2596 *)
2597 sys_lib_search_path_spec=$LIB
2598 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2599 # It is most probably a Windows format PATH.
2600 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2601 else
2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2603 fi
2604 # FIXME: find the short name or the path components, as spaces are
2605 # common. (e.g. "Program Files" -> "PROGRA~1")
2606 ;;
2607 esac
2608
2609 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2610 postinstall_cmds='base_file=`basename \$file`~
2611 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2612 dldir=$destdir/`dirname \$dlpath`~
2613 test -d \$dldir || mkdir -p \$dldir~
2614 $install_prog $dir/$dlname \$dldir/$dlname'
2615 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2616 dlpath=$dir/\$dldll~
2617 $RM \$dlpath'
2618 shlibpath_overrides_runpath=yes
2619 dynamic_linker='Win32 link.exe'
2620 ;;
2621
2622 *)
2623 # Assume MSVC wrapper
2624 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2625 dynamic_linker='Win32 ld.exe'
2626 ;;
2627 esac
2628 # FIXME: first we should search . and the directory the executable is in
2629 shlibpath_var=PATH
2630 ;;
2631
2632 darwin* | rhapsody*)
2633 dynamic_linker="$host_os dyld"
2634 version_type=darwin
2635 need_lib_prefix=no
2636 need_version=no
2637 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2638 soname_spec='$libname$release$major$shared_ext'
2639 shlibpath_overrides_runpath=yes
2640 shlibpath_var=DYLD_LIBRARY_PATH
2641 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2642 m4_if([$1], [],[
2643 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2644 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2645 ;;
2646
2647 dgux*)
2648 version_type=linux # correct to gnu/linux during the next big refactor
2649 need_lib_prefix=no
2650 need_version=no
2651 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2652 soname_spec='$libname$release$shared_ext$major'
2653 shlibpath_var=LD_LIBRARY_PATH
2654 ;;
2655
2656 freebsd* | dragonfly*)
2657 # DragonFly does not have aout. When/if they implement a new
2658 # versioning mechanism, adjust this.
2659 if test -x /usr/bin/objformat; then
2660 objformat=`/usr/bin/objformat`
2661 else
2662 case $host_os in
2663 freebsd[[23]].*) objformat=aout ;;
2664 *) objformat=elf ;;
2665 esac
2666 fi
2667 version_type=freebsd-$objformat
2668 case $version_type in
2669 freebsd-elf*)
2670 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2671 soname_spec='$libname$release$shared_ext$major'
2672 need_version=no
2673 need_lib_prefix=no
2674 ;;
2675 freebsd-*)
2676 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2677 need_version=yes
2678 ;;
2679 esac
2680 shlibpath_var=LD_LIBRARY_PATH
2681 case $host_os in
2682 freebsd2.*)
2683 shlibpath_overrides_runpath=yes
2684 ;;
2685 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2686 shlibpath_overrides_runpath=yes
2687 hardcode_into_libs=yes
2688 ;;
2689 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2690 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2691 shlibpath_overrides_runpath=no
2692 hardcode_into_libs=yes
2693 ;;
2694 *) # from 4.6 on, and DragonFly
2695 shlibpath_overrides_runpath=yes
2696 hardcode_into_libs=yes
2697 ;;
2698 esac
2699 ;;
2700
2701 haiku*)
2702 version_type=linux # correct to gnu/linux during the next big refactor
2703 need_lib_prefix=no
2704 need_version=no
2705 dynamic_linker="$host_os runtime_loader"
2706 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2707 soname_spec='$libname$release$shared_ext$major'
2708 shlibpath_var=LIBRARY_PATH
2709 shlibpath_overrides_runpath=no
2710 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2711 hardcode_into_libs=yes
2712 ;;
2713
2714 hpux9* | hpux10* | hpux11*)
2715 # Give a soname corresponding to the major version so that dld.sl refuses to
2716 # link against other versions.
2717 version_type=sunos
2718 need_lib_prefix=no
2719 need_version=no
2720 case $host_cpu in
2721 ia64*)
2722 shrext_cmds='.so'
2723 hardcode_into_libs=yes
2724 dynamic_linker="$host_os dld.so"
2725 shlibpath_var=LD_LIBRARY_PATH
2726 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2727 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2728 soname_spec='$libname$release$shared_ext$major'
2729 if test 32 = "$HPUX_IA64_MODE"; then
2730 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2731 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2732 else
2733 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2734 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2735 fi
2736 ;;
2737 hppa*64*)
2738 shrext_cmds='.sl'
2739 hardcode_into_libs=yes
2740 dynamic_linker="$host_os dld.sl"
2741 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2742 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2743 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2744 soname_spec='$libname$release$shared_ext$major'
2745 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2746 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2747 ;;
2748 *)
2749 shrext_cmds='.sl'
2750 dynamic_linker="$host_os dld.sl"
2751 shlibpath_var=SHLIB_PATH
2752 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2753 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2754 soname_spec='$libname$release$shared_ext$major'
2755 ;;
2756 esac
2757 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2758 postinstall_cmds='chmod 555 $lib'
2759 # or fails outright, so override atomically:
2760 install_override_mode=555
2761 ;;
2762
2763 interix[[3-9]]*)
2764 version_type=linux # correct to gnu/linux during the next big refactor
2765 need_lib_prefix=no
2766 need_version=no
2767 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2768 soname_spec='$libname$release$shared_ext$major'
2769 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2770 shlibpath_var=LD_LIBRARY_PATH
2771 shlibpath_overrides_runpath=no
2772 hardcode_into_libs=yes
2773 ;;
2774
2775 irix5* | irix6* | nonstopux*)
2776 case $host_os in
2777 nonstopux*) version_type=nonstopux ;;
2778 *)
2779 if test yes = "$lt_cv_prog_gnu_ld"; then
2780 version_type=linux # correct to gnu/linux during the next big refactor
2781 else
2782 version_type=irix
2783 fi ;;
2784 esac
2785 need_lib_prefix=no
2786 need_version=no
2787 soname_spec='$libname$release$shared_ext$major'
2788 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2789 case $host_os in
2790 irix5* | nonstopux*)
2791 libsuff= shlibsuff=
2792 ;;
2793 *)
2794 case $LD in # libtool.m4 will add one of these switches to LD
2795 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2796 libsuff= shlibsuff= libmagic=32-bit;;
2797 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2798 libsuff=32 shlibsuff=N32 libmagic=N32;;
2799 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2800 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2801 *) libsuff= shlibsuff= libmagic=never-match;;
2802 esac
2803 ;;
2804 esac
2805 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2806 shlibpath_overrides_runpath=no
2807 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2808 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2809 hardcode_into_libs=yes
2810 ;;
2811
2812 # No shared lib support for Linux oldld, aout, or coff.
2813 linux*oldld* | linux*aout* | linux*coff*)
2814 dynamic_linker=no
2815 ;;
2816
2817 linux*android*)
2818 version_type=none # Android doesn't support versioned libraries.
2819 need_lib_prefix=no
2820 need_version=no
2821 library_names_spec='$libname$release$shared_ext'
2822 soname_spec='$libname$release$shared_ext'
2823 finish_cmds=
2824 shlibpath_var=LD_LIBRARY_PATH
2825 shlibpath_overrides_runpath=yes
2826
2827 # This implies no fast_install, which is unacceptable.
2828 # Some rework will be needed to allow for fast_install
2829 # before this can be enabled.
2830 hardcode_into_libs=yes
2831
2832 dynamic_linker='Android linker'
2833 # Don't embed -rpath directories since the linker doesn't support them.
2834 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2835 ;;
2836
2837 # This must be glibc/ELF.
2838 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2839 version_type=linux # correct to gnu/linux during the next big refactor
2840 need_lib_prefix=no
2841 need_version=no
2842 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2843 soname_spec='$libname$release$shared_ext$major'
2844 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2845 shlibpath_var=LD_LIBRARY_PATH
2846 shlibpath_overrides_runpath=no
2847
2848 # Some binutils ld are patched to set DT_RUNPATH
2849 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2850 [lt_cv_shlibpath_overrides_runpath=no
2851 save_LDFLAGS=$LDFLAGS
2852 save_libdir=$libdir
2853 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2854 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2855 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2856 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2857 [lt_cv_shlibpath_overrides_runpath=yes])])
2858 LDFLAGS=$save_LDFLAGS
2859 libdir=$save_libdir
2860 ])
2861 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2862
2863 # This implies no fast_install, which is unacceptable.
2864 # Some rework will be needed to allow for fast_install
2865 # before this can be enabled.
2866 hardcode_into_libs=yes
2867
2868 # Ideally, we could use ldconfig to report *all* directores which are
2869 # searched for libraries, however this is still not possible. Aside from not
2870 # being certain /sbin/ldconfig is available, command
2871 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2872 # even though it is searched at run-time. Try to do the best guess by
2873 # appending ld.so.conf contents (and includes) to the search path.
2874 if test -f /etc/ld.so.conf; then
2875 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' ' '`
2876 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2877 fi
2878
2879 # We used to test for /lib/ld.so.1 and disable shared libraries on
2880 # powerpc, because MkLinux only supported shared libraries with the
2881 # GNU dynamic linker. Since this was broken with cross compilers,
2882 # most powerpc-linux boxes support dynamic linking these days and
2883 # people can always --disable-shared, the test was removed, and we
2884 # assume the GNU/Linux dynamic linker is in use.
2885 dynamic_linker='GNU/Linux ld.so'
2886 ;;
2887
2888 netbsdelf*-gnu)
2889 version_type=linux
2890 need_lib_prefix=no
2891 need_version=no
2892 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2893 soname_spec='${libname}${release}${shared_ext}$major'
2894 shlibpath_var=LD_LIBRARY_PATH
2895 shlibpath_overrides_runpath=no
2896 hardcode_into_libs=yes
2897 dynamic_linker='NetBSD ld.elf_so'
2898 ;;
2899
2900 netbsd*)
2901 version_type=sunos
2902 need_lib_prefix=no
2903 need_version=no
2904 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2905 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2906 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2907 dynamic_linker='NetBSD (a.out) ld.so'
2908 else
2909 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2910 soname_spec='$libname$release$shared_ext$major'
2911 dynamic_linker='NetBSD ld.elf_so'
2912 fi
2913 shlibpath_var=LD_LIBRARY_PATH
2914 shlibpath_overrides_runpath=yes
2915 hardcode_into_libs=yes
2916 ;;
2917
2918 newsos6)
2919 version_type=linux # correct to gnu/linux during the next big refactor
2920 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2921 shlibpath_var=LD_LIBRARY_PATH
2922 shlibpath_overrides_runpath=yes
2923 ;;
2924
2925 *nto* | *qnx*)
2926 version_type=qnx
2927 need_lib_prefix=no
2928 need_version=no
2929 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2930 soname_spec='$libname$release$shared_ext$major'
2931 shlibpath_var=LD_LIBRARY_PATH
2932 shlibpath_overrides_runpath=no
2933 hardcode_into_libs=yes
2934 dynamic_linker='ldqnx.so'
2935 ;;
2936
2937 openbsd* | bitrig*)
2938 version_type=sunos
2939 sys_lib_dlsearch_path_spec=/usr/lib
2940 need_lib_prefix=no
2941 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2942 need_version=no
2943 else
2944 need_version=yes
2945 fi
2946 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2947 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2948 shlibpath_var=LD_LIBRARY_PATH
2949 shlibpath_overrides_runpath=yes
2950 ;;
2951
2952 os2*)
2953 libname_spec='$name'
2954 version_type=windows
2955 shrext_cmds=.dll
2956 need_version=no
2957 need_lib_prefix=no
2958 # OS/2 can only load a DLL with a base name of 8 characters or less.
2959 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2960 v=$($ECHO $release$versuffix | tr -d .-);
2961 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2962 $ECHO $n$v`$shared_ext'
2963 library_names_spec='${libname}_dll.$libext'
2964 dynamic_linker='OS/2 ld.exe'
2965 shlibpath_var=BEGINLIBPATH
2966 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2967 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2968 postinstall_cmds='base_file=`basename \$file`~
2969 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2970 dldir=$destdir/`dirname \$dlpath`~
2971 test -d \$dldir || mkdir -p \$dldir~
2972 $install_prog $dir/$dlname \$dldir/$dlname~
2973 chmod a+x \$dldir/$dlname~
2974 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2975 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2976 fi'
2977 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2978 dlpath=$dir/\$dldll~
2979 $RM \$dlpath'
2980 ;;
2981
2982 osf3* | osf4* | osf5*)
2983 version_type=osf
2984 need_lib_prefix=no
2985 need_version=no
2986 soname_spec='$libname$release$shared_ext$major'
2987 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2988 shlibpath_var=LD_LIBRARY_PATH
2989 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2990 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2991 ;;
2992
2993 rdos*)
2994 dynamic_linker=no
2995 ;;
2996
2997 solaris*)
2998 version_type=linux # correct to gnu/linux during the next big refactor
2999 need_lib_prefix=no
3000 need_version=no
3001 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3002 soname_spec='$libname$release$shared_ext$major'
3003 shlibpath_var=LD_LIBRARY_PATH
3004 shlibpath_overrides_runpath=yes
3005 hardcode_into_libs=yes
3006 # ldd complains unless libraries are executable
3007 postinstall_cmds='chmod +x $lib'
3008 ;;
3009
3010 sunos4*)
3011 version_type=sunos
3012 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3013 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3014 shlibpath_var=LD_LIBRARY_PATH
3015 shlibpath_overrides_runpath=yes
3016 if test yes = "$with_gnu_ld"; then
3017 need_lib_prefix=no
3018 fi
3019 need_version=yes
3020 ;;
3021
3022 sysv4 | sysv4.3*)
3023 version_type=linux # correct to gnu/linux during the next big refactor
3024 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3025 soname_spec='$libname$release$shared_ext$major'
3026 shlibpath_var=LD_LIBRARY_PATH
3027 case $host_vendor in
3028 sni)
3029 shlibpath_overrides_runpath=no
3030 need_lib_prefix=no
3031 runpath_var=LD_RUN_PATH
3032 ;;
3033 siemens)
3034 need_lib_prefix=no
3035 ;;
3036 motorola)
3037 need_lib_prefix=no
3038 need_version=no
3039 shlibpath_overrides_runpath=no
3040 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3041 ;;
3042 esac
3043 ;;
3044
3045 sysv4*MP*)
3046 if test -d /usr/nec; then
3047 version_type=linux # correct to gnu/linux during the next big refactor
3048 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3049 soname_spec='$libname$shared_ext.$major'
3050 shlibpath_var=LD_LIBRARY_PATH
3051 fi
3052 ;;
3053
3054 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3055 version_type=sco
3056 need_lib_prefix=no
3057 need_version=no
3058 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3059 soname_spec='$libname$release$shared_ext$major'
3060 shlibpath_var=LD_LIBRARY_PATH
3061 shlibpath_overrides_runpath=yes
3062 hardcode_into_libs=yes
3063 if test yes = "$with_gnu_ld"; then
3064 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3065 else
3066 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3067 case $host_os in
3068 sco3.2v5*)
3069 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3070 ;;
3071 esac
3072 fi
3073 sys_lib_dlsearch_path_spec='/usr/lib'
3074 ;;
3075
3076 tpf*)
3077 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3078 version_type=linux # correct to gnu/linux during the next big refactor
3079 need_lib_prefix=no
3080 need_version=no
3081 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3082 shlibpath_var=LD_LIBRARY_PATH
3083 shlibpath_overrides_runpath=no
3084 hardcode_into_libs=yes
3085 ;;
3086
3087 uts4*)
3088 version_type=linux # correct to gnu/linux during the next big refactor
3089 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3090 soname_spec='$libname$release$shared_ext$major'
3091 shlibpath_var=LD_LIBRARY_PATH
3092 ;;
3093
3094 *)
3095 dynamic_linker=no
3096 ;;
3097 esac
3098 AC_MSG_RESULT([$dynamic_linker])
3099 test no = "$dynamic_linker" && can_build_shared=no
3100
3101 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3102 if test yes = "$GCC"; then
3103 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3104 fi
3105
3106 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3107 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3108 fi
3109
3110 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3111 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3112 fi
3113
3114 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3115 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3116
3117 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3118 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3119
3120 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3121 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3122
3123 _LT_DECL([], [variables_saved_for_relink], [1],
3124 [Variables whose values should be saved in libtool wrapper scripts and
3125 restored at link time])
3126 _LT_DECL([], [need_lib_prefix], [0],
3127 [Do we need the "lib" prefix for modules?])
3128 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3129 _LT_DECL([], [version_type], [0], [Library versioning type])
3130 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3131 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3132 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3133 [Is shlibpath searched before the hard-coded library search path?])
3134 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3135 _LT_DECL([], [library_names_spec], [1],
3136 [[List of archive names. First name is the real one, the rest are links.
3137 The last name is the one that the linker finds with -lNAME]])
3138 _LT_DECL([], [soname_spec], [1],
3139 [[The coded name of the library, if different from the real name]])
3140 _LT_DECL([], [install_override_mode], [1],
3141 [Permission mode override for installation of shared libraries])
3142 _LT_DECL([], [postinstall_cmds], [2],
3143 [Command to use after installation of a shared archive])
3144 _LT_DECL([], [postuninstall_cmds], [2],
3145 [Command to use after uninstallation of a shared archive])
3146 _LT_DECL([], [finish_cmds], [2],
3147 [Commands used to finish a libtool library installation in a directory])
3148 _LT_DECL([], [finish_eval], [1],
3149 [[As "finish_cmds", except a single script fragment to be evaled but
3150 not shown]])
3151 _LT_DECL([], [hardcode_into_libs], [0],
3152 [Whether we should hardcode library paths into libraries])
3153 _LT_DECL([], [sys_lib_search_path_spec], [2],
3154 [Compile-time system search path for libraries])
3155 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3156 [Detected run-time system search path for libraries])
3157 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3158 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3159 ])# _LT_SYS_DYNAMIC_LINKER
3160
3161
3162 # _LT_PATH_TOOL_PREFIX(TOOL)
3163 # --------------------------
3164 # find a file program that can recognize shared library
3165 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3166 [m4_require([_LT_DECL_EGREP])dnl
3167 AC_MSG_CHECKING([for $1])
3168 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3169 [case $MAGIC_CMD in
3170 [[\\/*] | ?:[\\/]*])
3171 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3172 ;;
3173 *)
3174 lt_save_MAGIC_CMD=$MAGIC_CMD
3175 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3176 dnl $ac_dummy forces splitting on constant user-supplied paths.
3177 dnl POSIX.2 word splitting is done only on the output of word expansions,
3178 dnl not every word. This closes a longstanding sh security hole.
3179 ac_dummy="m4_if([$2], , $PATH, [$2])"
3180 for ac_dir in $ac_dummy; do
3181 IFS=$lt_save_ifs
3182 test -z "$ac_dir" && ac_dir=.
3183 if test -f "$ac_dir/$1"; then
3184 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3185 if test -n "$file_magic_test_file"; then
3186 case $deplibs_check_method in
3187 "file_magic "*)
3188 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3189 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3190 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3191 $EGREP "$file_magic_regex" > /dev/null; then
3192 :
3193 else
3194 cat <<_LT_EOF 1>&2
3195
3196 *** Warning: the command libtool uses to detect shared libraries,
3197 *** $file_magic_cmd, produces output that libtool cannot recognize.
3198 *** The result is that libtool may fail to recognize shared libraries
3199 *** as such. This will affect the creation of libtool libraries that
3200 *** depend on shared libraries, but programs linked with such libtool
3201 *** libraries will work regardless of this problem. Nevertheless, you
3202 *** may want to report the problem to your system manager and/or to
3203 *** bug-libtool@gnu.org
3204
3205 _LT_EOF
3206 fi ;;
3207 esac
3208 fi
3209 break
3210 fi
3211 done
3212 IFS=$lt_save_ifs
3213 MAGIC_CMD=$lt_save_MAGIC_CMD
3214 ;;
3215 esac])
3216 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3217 if test -n "$MAGIC_CMD"; then
3218 AC_MSG_RESULT($MAGIC_CMD)
3219 else
3220 AC_MSG_RESULT(no)
3221 fi
3222 _LT_DECL([], [MAGIC_CMD], [0],
3223 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3224 ])# _LT_PATH_TOOL_PREFIX
3225
3226 # Old name:
3227 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3228 dnl aclocal-1.4 backwards compatibility:
3229 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3230
3231
3232 # _LT_PATH_MAGIC
3233 # --------------
3234 # find a file program that can recognize a shared library
3235 m4_defun([_LT_PATH_MAGIC],
3236 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3237 if test -z "$lt_cv_path_MAGIC_CMD"; then
3238 if test -n "$ac_tool_prefix"; then
3239 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3240 else
3241 MAGIC_CMD=:
3242 fi
3243 fi
3244 ])# _LT_PATH_MAGIC
3245
3246
3247 # LT_PATH_LD
3248 # ----------
3249 # find the pathname to the GNU or non-GNU linker
3250 AC_DEFUN([LT_PATH_LD],
3251 [AC_REQUIRE([AC_PROG_CC])dnl
3252 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3253 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3254 m4_require([_LT_DECL_SED])dnl
3255 m4_require([_LT_DECL_EGREP])dnl
3256 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3257
3258 AC_ARG_WITH([gnu-ld],
3259 [AS_HELP_STRING([--with-gnu-ld],
3260 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3261 [test no = "$withval" || with_gnu_ld=yes],
3262 [with_gnu_ld=no])dnl
3263
3264 ac_prog=ld
3265 if test yes = "$GCC"; then
3266 # Check if gcc -print-prog-name=ld gives a path.
3267 AC_MSG_CHECKING([for ld used by $CC])
3268 case $host in
3269 *-*-mingw*)
3270 # gcc leaves a trailing carriage return, which upsets mingw
3271 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3272 *)
3273 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3274 esac
3275 case $ac_prog in
3276 # Accept absolute paths.
3277 [[\\/]]* | ?:[[\\/]]*)
3278 re_direlt='/[[^/]][[^/]]*/\.\./'
3279 # Canonicalize the pathname of ld
3280 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3281 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3282 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3283 done
3284 test -z "$LD" && LD=$ac_prog
3285 ;;
3286 "")
3287 # If it fails, then pretend we aren't using GCC.
3288 ac_prog=ld
3289 ;;
3290 *)
3291 # If it is relative, then search for the first ld in PATH.
3292 with_gnu_ld=unknown
3293 ;;
3294 esac
3295 elif test yes = "$with_gnu_ld"; then
3296 AC_MSG_CHECKING([for GNU ld])
3297 else
3298 AC_MSG_CHECKING([for non-GNU ld])
3299 fi
3300 AC_CACHE_VAL(lt_cv_path_LD,
3301 [if test -z "$LD"; then
3302 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3303 for ac_dir in $PATH; do
3304 IFS=$lt_save_ifs
3305 test -z "$ac_dir" && ac_dir=.
3306 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3307 lt_cv_path_LD=$ac_dir/$ac_prog
3308 # Check to see if the program is GNU ld. I'd rather use --version,
3309 # but apparently some variants of GNU ld only accept -v.
3310 # Break only if it was the GNU/non-GNU ld that we prefer.
3311 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3312 *GNU* | *'with BFD'*)
3313 test no != "$with_gnu_ld" && break
3314 ;;
3315 *)
3316 test yes != "$with_gnu_ld" && break
3317 ;;
3318 esac
3319 fi
3320 done
3321 IFS=$lt_save_ifs
3322 else
3323 lt_cv_path_LD=$LD # Let the user override the test with a path.
3324 fi])
3325 LD=$lt_cv_path_LD
3326 if test -n "$LD"; then
3327 AC_MSG_RESULT($LD)
3328 else
3329 AC_MSG_RESULT(no)
3330 fi
3331 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3332 _LT_PATH_LD_GNU
3333 AC_SUBST([LD])
3334
3335 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3336 ])# LT_PATH_LD
3337
3338 # Old names:
3339 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3340 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3341 dnl aclocal-1.4 backwards compatibility:
3342 dnl AC_DEFUN([AM_PROG_LD], [])
3343 dnl AC_DEFUN([AC_PROG_LD], [])
3344
3345
3346 # _LT_PATH_LD_GNU
3347 #- --------------
3348 m4_defun([_LT_PATH_LD_GNU],
3349 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3350 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3351 case `$LD -v 2>&1 </dev/null` in
3352 *GNU* | *'with BFD'*)
3353 lt_cv_prog_gnu_ld=yes
3354 ;;
3355 *)
3356 lt_cv_prog_gnu_ld=no
3357 ;;
3358 esac])
3359 with_gnu_ld=$lt_cv_prog_gnu_ld
3360 ])# _LT_PATH_LD_GNU
3361
3362
3363 # _LT_CMD_RELOAD
3364 # --------------
3365 # find reload flag for linker
3366 # -- PORTME Some linkers may need a different reload flag.
3367 m4_defun([_LT_CMD_RELOAD],
3368 [AC_CACHE_CHECK([for $LD option to reload object files],
3369 lt_cv_ld_reload_flag,
3370 [lt_cv_ld_reload_flag='-r'])
3371 reload_flag=$lt_cv_ld_reload_flag
3372 case $reload_flag in
3373 "" | " "*) ;;
3374 *) reload_flag=" $reload_flag" ;;
3375 esac
3376 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3377 case $host_os in
3378 cygwin* | mingw* | pw32* | cegcc*)
3379 if test yes != "$GCC"; then
3380 reload_cmds=false
3381 fi
3382 ;;
3383 darwin*)
3384 if test yes = "$GCC"; then
3385 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3386 else
3387 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3388 fi
3389 ;;
3390 esac
3391 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3392 _LT_TAGDECL([], [reload_cmds], [2])dnl
3393 ])# _LT_CMD_RELOAD
3394
3395
3396 # _LT_PATH_DD
3397 # -----------
3398 # find a working dd
3399 m4_defun([_LT_PATH_DD],
3400 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3401 [printf 0123456789abcdef0123456789abcdef >conftest.i
3402 cat conftest.i conftest.i >conftest2.i
3403 : ${lt_DD:=$DD}
3404 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3405 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3406 cmp -s conftest.i conftest.out \
3407 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3408 fi])
3409 rm -f conftest.i conftest2.i conftest.out])
3410 ])# _LT_PATH_DD
3411
3412
3413 # _LT_CMD_TRUNCATE
3414 # ----------------
3415 # find command to truncate a binary pipe
3416 m4_defun([_LT_CMD_TRUNCATE],
3417 [m4_require([_LT_PATH_DD])
3418 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3419 [printf 0123456789abcdef0123456789abcdef >conftest.i
3420 cat conftest.i conftest.i >conftest2.i
3421 lt_cv_truncate_bin=
3422 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3423 cmp -s conftest.i conftest.out \
3424 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3425 fi
3426 rm -f conftest.i conftest2.i conftest.out
3427 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3428 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3429 [Command to truncate a binary pipe])
3430 ])# _LT_CMD_TRUNCATE
3431
3432
3433 # _LT_CHECK_MAGIC_METHOD
3434 # ----------------------
3435 # how to check for library dependencies
3436 # -- PORTME fill in with the dynamic library characteristics
3437 m4_defun([_LT_CHECK_MAGIC_METHOD],
3438 [m4_require([_LT_DECL_EGREP])
3439 m4_require([_LT_DECL_OBJDUMP])
3440 AC_CACHE_CHECK([how to recognize dependent libraries],
3441 lt_cv_deplibs_check_method,
3442 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3443 lt_cv_file_magic_test_file=
3444 lt_cv_deplibs_check_method='unknown'
3445 # Need to set the preceding variable on all platforms that support
3446 # interlibrary dependencies.
3447 # 'none' -- dependencies not supported.
3448 # 'unknown' -- same as none, but documents that we really don't know.
3449 # 'pass_all' -- all dependencies passed with no checks.
3450 # 'test_compile' -- check by making test program.
3451 # 'file_magic [[regex]]' -- check by looking for files in library path
3452 # that responds to the $file_magic_cmd with a given extended regex.
3453 # If you have 'file' or equivalent on your system and you're not sure
3454 # whether 'pass_all' will *always* work, you probably want this one.
3455
3456 case $host_os in
3457 aix[[4-9]]*)
3458 lt_cv_deplibs_check_method=pass_all
3459 ;;
3460
3461 beos*)
3462 lt_cv_deplibs_check_method=pass_all
3463 ;;
3464
3465 bsdi[[45]]*)
3466 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3467 lt_cv_file_magic_cmd='/usr/bin/file -L'
3468 lt_cv_file_magic_test_file=/shlib/libc.so
3469 ;;
3470
3471 cygwin*)
3472 # func_win32_libid is a shell function defined in ltmain.sh
3473 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3474 lt_cv_file_magic_cmd='func_win32_libid'
3475 ;;
3476
3477 mingw* | pw32*)
3478 # Base MSYS/MinGW do not provide the 'file' command needed by
3479 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3480 # unless we find 'file', for example because we are cross-compiling.
3481 if ( file / ) >/dev/null 2>&1; then
3482 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3483 lt_cv_file_magic_cmd='func_win32_libid'
3484 else
3485 # Keep this pattern in sync with the one in func_win32_libid.
3486 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3487 lt_cv_file_magic_cmd='$OBJDUMP -f'
3488 fi
3489 ;;
3490
3491 cegcc*)
3492 # use the weaker test based on 'objdump'. See mingw*.
3493 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3494 lt_cv_file_magic_cmd='$OBJDUMP -f'
3495 ;;
3496
3497 darwin* | rhapsody*)
3498 lt_cv_deplibs_check_method=pass_all
3499 ;;
3500
3501 freebsd* | dragonfly*)
3502 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3503 case $host_cpu in
3504 i*86 )
3505 # Not sure whether the presence of OpenBSD here was a mistake.
3506 # Let's accept both of them until this is cleared up.
3507 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3508 lt_cv_file_magic_cmd=/usr/bin/file
3509 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3510 ;;
3511 esac
3512 else
3513 lt_cv_deplibs_check_method=pass_all
3514 fi
3515 ;;
3516
3517 haiku*)
3518 lt_cv_deplibs_check_method=pass_all
3519 ;;
3520
3521 hpux10.20* | hpux11*)
3522 lt_cv_file_magic_cmd=/usr/bin/file
3523 case $host_cpu in
3524 ia64*)
3525 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3526 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3527 ;;
3528 hppa*64*)
3529 [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]']
3530 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3531 ;;
3532 *)
3533 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3534 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3535 ;;
3536 esac
3537 ;;
3538
3539 interix[[3-9]]*)
3540 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3541 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3542 ;;
3543
3544 irix5* | irix6* | nonstopux*)
3545 case $LD in
3546 *-32|*"-32 ") libmagic=32-bit;;
3547 *-n32|*"-n32 ") libmagic=N32;;
3548 *-64|*"-64 ") libmagic=64-bit;;
3549 *) libmagic=never-match;;
3550 esac
3551 lt_cv_deplibs_check_method=pass_all
3552 ;;
3553
3554 # This must be glibc/ELF.
3555 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3556 lt_cv_deplibs_check_method=pass_all
3557 ;;
3558
3559 netbsd* | netbsdelf*-gnu)
3560 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3561 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3562 else
3563 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3564 fi
3565 ;;
3566
3567 newos6*)
3568 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3569 lt_cv_file_magic_cmd=/usr/bin/file
3570 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3571 ;;
3572
3573 *nto* | *qnx*)
3574 lt_cv_deplibs_check_method=pass_all
3575 ;;
3576
3577 openbsd* | bitrig*)
3578 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3579 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3580 else
3581 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3582 fi
3583 ;;
3584
3585 osf3* | osf4* | osf5*)
3586 lt_cv_deplibs_check_method=pass_all
3587 ;;
3588
3589 rdos*)
3590 lt_cv_deplibs_check_method=pass_all
3591 ;;
3592
3593 solaris*)
3594 lt_cv_deplibs_check_method=pass_all
3595 ;;
3596
3597 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3598 lt_cv_deplibs_check_method=pass_all
3599 ;;
3600
3601 sysv4 | sysv4.3*)
3602 case $host_vendor in
3603 motorola)
3604 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]]'
3605 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3606 ;;
3607 ncr)
3608 lt_cv_deplibs_check_method=pass_all
3609 ;;
3610 sequent)
3611 lt_cv_file_magic_cmd='/bin/file'
3612 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3613 ;;
3614 sni)
3615 lt_cv_file_magic_cmd='/bin/file'
3616 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3617 lt_cv_file_magic_test_file=/lib/libc.so
3618 ;;
3619 siemens)
3620 lt_cv_deplibs_check_method=pass_all
3621 ;;
3622 pc)
3623 lt_cv_deplibs_check_method=pass_all
3624 ;;
3625 esac
3626 ;;
3627
3628 tpf*)
3629 lt_cv_deplibs_check_method=pass_all
3630 ;;
3631 os2*)
3632 lt_cv_deplibs_check_method=pass_all
3633 ;;
3634 esac
3635 ])
3636
3637 file_magic_glob=
3638 want_nocaseglob=no
3639 if test "$build" = "$host"; then
3640 case $host_os in
3641 mingw* | pw32*)
3642 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3643 want_nocaseglob=yes
3644 else
3645 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3646 fi
3647 ;;
3648 esac
3649 fi
3650
3651 file_magic_cmd=$lt_cv_file_magic_cmd
3652 deplibs_check_method=$lt_cv_deplibs_check_method
3653 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3654
3655 _LT_DECL([], [deplibs_check_method], [1],
3656 [Method to check whether dependent libraries are shared objects])
3657 _LT_DECL([], [file_magic_cmd], [1],
3658 [Command to use when deplibs_check_method = "file_magic"])
3659 _LT_DECL([], [file_magic_glob], [1],
3660 [How to find potential files when deplibs_check_method = "file_magic"])
3661 _LT_DECL([], [want_nocaseglob], [1],
3662 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3663 ])# _LT_CHECK_MAGIC_METHOD
3664
3665
3666 # LT_PATH_NM
3667 # ----------
3668 # find the pathname to a BSD- or MS-compatible name lister
3669 AC_DEFUN([LT_PATH_NM],
3670 [AC_REQUIRE([AC_PROG_CC])dnl
3671 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3672 [if test -n "$NM"; then
3673 # Let the user override the test.
3674 lt_cv_path_NM=$NM
3675 else
3676 lt_nm_to_check=${ac_tool_prefix}nm
3677 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3678 lt_nm_to_check="$lt_nm_to_check nm"
3679 fi
3680 for lt_tmp_nm in $lt_nm_to_check; do
3681 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3682 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3683 IFS=$lt_save_ifs
3684 test -z "$ac_dir" && ac_dir=.
3685 tmp_nm=$ac_dir/$lt_tmp_nm
3686 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3687 # Check to see if the nm accepts a BSD-compat flag.
3688 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3689 # nm: unknown option "B" ignored
3690 # Tru64's nm complains that /dev/null is an invalid object file
3691 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3692 case $build_os in
3693 mingw*) lt_bad_file=conftest.nm/nofile ;;
3694 *) lt_bad_file=/dev/null ;;
3695 esac
3696 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3697 *$lt_bad_file* | *'Invalid file or object type'*)
3698 lt_cv_path_NM="$tmp_nm -B"
3699 break 2
3700 ;;
3701 *)
3702 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3703 */dev/null*)
3704 lt_cv_path_NM="$tmp_nm -p"
3705 break 2
3706 ;;
3707 *)
3708 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3709 continue # so that we can try to find one that supports BSD flags
3710 ;;
3711 esac
3712 ;;
3713 esac
3714 fi
3715 done
3716 IFS=$lt_save_ifs
3717 done
3718 : ${lt_cv_path_NM=no}
3719 fi])
3720 if test no != "$lt_cv_path_NM"; then
3721 NM=$lt_cv_path_NM
3722 else
3723 # Didn't find any BSD compatible name lister, look for dumpbin.
3724 if test -n "$DUMPBIN"; then :
3725 # Let the user override the test.
3726 else
3727 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3728 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3729 *COFF*)
3730 DUMPBIN="$DUMPBIN -symbols -headers"
3731 ;;
3732 *)
3733 DUMPBIN=:
3734 ;;
3735 esac
3736 fi
3737 AC_SUBST([DUMPBIN])
3738 if test : != "$DUMPBIN"; then
3739 NM=$DUMPBIN
3740 fi
3741 fi
3742 test -z "$NM" && NM=nm
3743 AC_SUBST([NM])
3744 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3745
3746 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3747 [lt_cv_nm_interface="BSD nm"
3748 echo "int some_variable = 0;" > conftest.$ac_ext
3749 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3750 (eval "$ac_compile" 2>conftest.err)
3751 cat conftest.err >&AS_MESSAGE_LOG_FD
3752 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3753 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3754 cat conftest.err >&AS_MESSAGE_LOG_FD
3755 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3756 cat conftest.out >&AS_MESSAGE_LOG_FD
3757 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3758 lt_cv_nm_interface="MS dumpbin"
3759 fi
3760 rm -f conftest*])
3761 ])# LT_PATH_NM
3762
3763 # Old names:
3764 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3765 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3766 dnl aclocal-1.4 backwards compatibility:
3767 dnl AC_DEFUN([AM_PROG_NM], [])
3768 dnl AC_DEFUN([AC_PROG_NM], [])
3769
3770 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3771 # --------------------------------
3772 # how to determine the name of the shared library
3773 # associated with a specific link library.
3774 # -- PORTME fill in with the dynamic library characteristics
3775 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3776 [m4_require([_LT_DECL_EGREP])
3777 m4_require([_LT_DECL_OBJDUMP])
3778 m4_require([_LT_DECL_DLLTOOL])
3779 AC_CACHE_CHECK([how to associate runtime and link libraries],
3780 lt_cv_sharedlib_from_linklib_cmd,
3781 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3782
3783 case $host_os in
3784 cygwin* | mingw* | pw32* | cegcc*)
3785 # two different shell functions defined in ltmain.sh;
3786 # decide which one to use based on capabilities of $DLLTOOL
3787 case `$DLLTOOL --help 2>&1` in
3788 *--identify-strict*)
3789 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3790 ;;
3791 *)
3792 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3793 ;;
3794 esac
3795 ;;
3796 *)
3797 # fallback: assume linklib IS sharedlib
3798 lt_cv_sharedlib_from_linklib_cmd=$ECHO
3799 ;;
3800 esac
3801 ])
3802 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3803 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3804
3805 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3806 [Command to associate shared and link libraries])
3807 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3808
3809
3810 # _LT_PATH_MANIFEST_TOOL
3811 # ----------------------
3812 # locate the manifest tool
3813 m4_defun([_LT_PATH_MANIFEST_TOOL],
3814 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3815 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3816 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3817 [lt_cv_path_mainfest_tool=no
3818 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3819 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3820 cat conftest.err >&AS_MESSAGE_LOG_FD
3821 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3822 lt_cv_path_mainfest_tool=yes
3823 fi
3824 rm -f conftest*])
3825 if test yes != "$lt_cv_path_mainfest_tool"; then
3826 MANIFEST_TOOL=:
3827 fi
3828 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3829 ])# _LT_PATH_MANIFEST_TOOL
3830
3831
3832 # _LT_DLL_DEF_P([FILE])
3833 # ---------------------
3834 # True iff FILE is a Windows DLL '.def' file.
3835 # Keep in sync with func_dll_def_p in the libtool script
3836 AC_DEFUN([_LT_DLL_DEF_P],
3837 [dnl
3838 test DEF = "`$SED -n dnl
3839 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3840 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3841 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3842 -e q dnl Only consider the first "real" line
3843 $1`" dnl
3844 ])# _LT_DLL_DEF_P
3845
3846
3847 # LT_LIB_M
3848 # --------
3849 # check for math library
3850 AC_DEFUN([LT_LIB_M],
3851 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3852 LIBM=
3853 case $host in
3854 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3855 # These system don't have libm, or don't need it
3856 ;;
3857 *-ncr-sysv4.3*)
3858 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3859 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3860 ;;
3861 *)
3862 AC_CHECK_LIB(m, cos, LIBM=-lm)
3863 ;;
3864 esac
3865 AC_SUBST([LIBM])
3866 ])# LT_LIB_M
3867
3868 # Old name:
3869 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3870 dnl aclocal-1.4 backwards compatibility:
3871 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3872
3873
3874 # _LT_COMPILER_NO_RTTI([TAGNAME])
3875 # -------------------------------
3876 m4_defun([_LT_COMPILER_NO_RTTI],
3877 [m4_require([_LT_TAG_COMPILER])dnl
3878
3879 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3880
3881 if test yes = "$GCC"; then
3882 case $cc_basename in
3883 nvcc*)
3884 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3885 *)
3886 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3887 esac
3888
3889 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3890 lt_cv_prog_compiler_rtti_exceptions,
3891 [-fno-rtti -fno-exceptions], [],
3892 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3893 fi
3894 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3895 [Compiler flag to turn off builtin functions])
3896 ])# _LT_COMPILER_NO_RTTI
3897
3898
3899 # _LT_CMD_GLOBAL_SYMBOLS
3900 # ----------------------
3901 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3902 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3903 AC_REQUIRE([AC_PROG_CC])dnl
3904 AC_REQUIRE([AC_PROG_AWK])dnl
3905 AC_REQUIRE([LT_PATH_NM])dnl
3906 AC_REQUIRE([LT_PATH_LD])dnl
3907 m4_require([_LT_DECL_SED])dnl
3908 m4_require([_LT_DECL_EGREP])dnl
3909 m4_require([_LT_TAG_COMPILER])dnl
3910
3911 # Check for command to grab the raw symbol name followed by C symbol from nm.
3912 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3913 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3914 [
3915 # These are sane defaults that work on at least a few old systems.
3916 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3917
3918 # Character class describing NM global symbol codes.
3919 symcode='[[BCDEGRST]]'
3920
3921 # Regexp to match symbols that can be accessed directly from C.
3922 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3923
3924 # Define system-specific variables.
3925 case $host_os in
3926 aix*)
3927 symcode='[[BCDT]]'
3928 ;;
3929 cygwin* | mingw* | pw32* | cegcc*)
3930 symcode='[[ABCDGISTW]]'
3931 ;;
3932 hpux*)
3933 if test ia64 = "$host_cpu"; then
3934 symcode='[[ABCDEGRST]]'
3935 fi
3936 ;;
3937 irix* | nonstopux*)
3938 symcode='[[BCDEGRST]]'
3939 ;;
3940 osf*)
3941 symcode='[[BCDEGQRST]]'
3942 ;;
3943 solaris*)
3944 symcode='[[BDRT]]'
3945 ;;
3946 sco3.2v5*)
3947 symcode='[[DT]]'
3948 ;;
3949 sysv4.2uw2*)
3950 symcode='[[DT]]'
3951 ;;
3952 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3953 symcode='[[ABDT]]'
3954 ;;
3955 sysv4)
3956 symcode='[[DFNSTU]]'
3957 ;;
3958 esac
3959
3960 # If we're using GNU nm, then use its standard symbol codes.
3961 case `$NM -V 2>&1` in
3962 *GNU* | *'with BFD'*)
3963 symcode='[[ABCDGIRSTW]]' ;;
3964 esac
3965
3966 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3967 # Gets list of data symbols to import.
3968 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3969 # Adjust the below global symbol transforms to fixup imported variables.
3970 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3971 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3972 lt_c_name_lib_hook="\
3973 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3974 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3975 else
3976 # Disable hooks by default.
3977 lt_cv_sys_global_symbol_to_import=
3978 lt_cdecl_hook=
3979 lt_c_name_hook=
3980 lt_c_name_lib_hook=
3981 fi
3982
3983 # Transform an extracted symbol line into a proper C declaration.
3984 # Some systems (esp. on ia64) link data and code symbols differently,
3985 # so use this general approach.
3986 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3987 $lt_cdecl_hook\
3988 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3989 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
3990
3991 # Transform an extracted symbol line into symbol name and symbol address
3992 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3993 $lt_c_name_hook\
3994 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3995 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
3996
3997 # Transform an extracted symbol line into symbol name with lib prefix and
3998 # symbol address.
3999 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4000 $lt_c_name_lib_hook\
4001 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4002 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4003 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
4004
4005 # Handle CRLF in mingw tool chain
4006 opt_cr=
4007 case $build_os in
4008 mingw*)
4009 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4010 ;;
4011 esac
4012
4013 # Try without a prefix underscore, then with it.
4014 for ac_symprfx in "" "_"; do
4015
4016 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4017 symxfrm="\\1 $ac_symprfx\\2 \\2"
4018
4019 # Write the raw and C identifiers.
4020 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4021 # Fake it for dumpbin and say T for any non-static function,
4022 # D for any global variable and I for any imported variable.
4023 # Also find C++ and __fastcall symbols from MSVC++,
4024 # which start with @ or ?.
4025 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4026 " {last_section=section; section=\$ 3};"\
4027 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4028 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4029 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4030 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4031 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4032 " \$ 0!~/External *\|/{next};"\
4033 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4034 " {if(hide[section]) next};"\
4035 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4036 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4037 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4038 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4039 " ' prfx=^$ac_symprfx]"
4040 else
4041 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4042 fi
4043 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4044
4045 # Check to see that the pipe works correctly.
4046 pipe_works=no
4047
4048 rm -f conftest*
4049 cat > conftest.$ac_ext <<_LT_EOF
4050 #ifdef __cplusplus
4051 extern "C" {
4052 #endif
4053 char nm_test_var;
4054 void nm_test_func(void);
4055 void nm_test_func(void){}
4056 #ifdef __cplusplus
4057 }
4058 #endif
4059 int main(){nm_test_var='a';nm_test_func();return(0);}
4060 _LT_EOF
4061
4062 if AC_TRY_EVAL(ac_compile); then
4063 # Now try to grab the symbols.
4064 nlist=conftest.nm
4065 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
4066 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && 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 # flang / f18. f95 an alias for gfortran or flang on Debian
4707 flang* | f18* | f95*)
4708 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4709 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4710 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4711 ;;
4712 # icc used to be incompatible with GCC.
4713 # ICC 10 doesn't accept -KPIC any more.
4714 icc* | ifort*)
4715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4716 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4717 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4718 ;;
4719 # Lahey Fortran 8.1.
4720 lf95*)
4721 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4723 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4724 ;;
4725 nagfor*)
4726 # NAG Fortran compiler
4727 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4730 ;;
4731 tcc*)
4732 # Fabrice Bellard et al's Tiny C Compiler
4733 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4734 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4735 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4736 ;;
4737 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4738 # Portland Group compilers (*not* the Pentium gcc compiler,
4739 # which looks to be a dead project)
4740 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4741 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4742 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4743 ;;
4744 ccc*)
4745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4746 # All Alpha code is PIC.
4747 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4748 ;;
4749 xl* | bgxl* | bgf* | mpixl*)
4750 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4751 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4752 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4753 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4754 ;;
4755 *)
4756 case `$CC -V 2>&1 | sed 5q` in
4757 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4758 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4759 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4760 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4761 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4762 ;;
4763 *Sun\ F* | *Sun*Fortran*)
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)='-Qoption ld '
4767 ;;
4768 *Sun\ C*)
4769 # Sun C 5.9
4770 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4771 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4772 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4773 ;;
4774 *Intel*\ [[CF]]*Compiler*)
4775 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4776 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4777 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4778 ;;
4779 *Portland\ Group*)
4780 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4781 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4782 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4783 ;;
4784 esac
4785 ;;
4786 esac
4787 ;;
4788
4789 newsos6)
4790 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4791 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4792 ;;
4793
4794 *nto* | *qnx*)
4795 # QNX uses GNU C++, but need to define -shared option too, otherwise
4796 # it will coredump.
4797 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4798 ;;
4799
4800 osf3* | osf4* | osf5*)
4801 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4802 # All OSF/1 code is PIC.
4803 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4804 ;;
4805
4806 rdos*)
4807 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4808 ;;
4809
4810 solaris*)
4811 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4812 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4813 case $cc_basename in
4814 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4815 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4816 *)
4817 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4818 esac
4819 ;;
4820
4821 sunos4*)
4822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4823 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4825 ;;
4826
4827 sysv4 | sysv4.2uw2* | sysv4.3*)
4828 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4831 ;;
4832
4833 sysv4*MP*)
4834 if test -d /usr/nec; then
4835 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4836 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4837 fi
4838 ;;
4839
4840 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4842 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4843 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4844 ;;
4845
4846 unicos*)
4847 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4848 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4849 ;;
4850
4851 uts4*)
4852 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4853 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4854 ;;
4855
4856 *)
4857 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4858 ;;
4859 esac
4860 fi
4861 ])
4862 case $host_os in
4863 # For platforms that do not support PIC, -DPIC is meaningless:
4864 *djgpp*)
4865 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4866 ;;
4867 *)
4868 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4869 ;;
4870 esac
4871
4872 AC_CACHE_CHECK([for $compiler option to produce PIC],
4873 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4874 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4875 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4876
4877 #
4878 # Check to make sure the PIC flag actually works.
4879 #
4880 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4881 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4882 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4883 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4884 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4885 "" | " "*) ;;
4886 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4887 esac],
4888 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4889 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4890 fi
4891 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4892 [Additional compiler flags for building library objects])
4893
4894 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4895 [How to pass a linker flag through the compiler])
4896 #
4897 # Check to make sure the static flag actually works.
4898 #
4899 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4900 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4901 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4902 $lt_tmp_static_flag,
4903 [],
4904 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4905 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4906 [Compiler flag to prevent dynamic linking])
4907 ])# _LT_COMPILER_PIC
4908
4909
4910 # _LT_LINKER_SHLIBS([TAGNAME])
4911 # ----------------------------
4912 # See if the linker supports building shared libraries.
4913 m4_defun([_LT_LINKER_SHLIBS],
4914 [AC_REQUIRE([LT_PATH_LD])dnl
4915 AC_REQUIRE([LT_PATH_NM])dnl
4916 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4917 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4918 m4_require([_LT_DECL_EGREP])dnl
4919 m4_require([_LT_DECL_SED])dnl
4920 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4921 m4_require([_LT_TAG_COMPILER])dnl
4922 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4923 m4_if([$1], [CXX], [
4924 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4925 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4926 case $host_os in
4927 aix[[4-9]]*)
4928 # If we're using GNU nm, then we don't want the "-C" option.
4929 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4930 # Without the "-l" option, or with the "-B" option, AIX nm treats
4931 # weak defined symbols like other global defined symbols, whereas
4932 # GNU nm marks them as "W".
4933 # While the 'weak' keyword is ignored in the Export File, we need
4934 # it in the Import File for the 'aix-soname' feature, so we have
4935 # to replace the "-B" option with "-P" for AIX nm.
4936 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4937 _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'
4938 else
4939 _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'
4940 fi
4941 ;;
4942 pw32*)
4943 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4944 ;;
4945 cygwin* | mingw* | cegcc*)
4946 case $cc_basename in
4947 cl*)
4948 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4949 ;;
4950 *)
4951 _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'
4952 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4953 ;;
4954 esac
4955 ;;
4956 linux* | k*bsd*-gnu | gnu*)
4957 _LT_TAGVAR(link_all_deplibs, $1)=no
4958 ;;
4959 *)
4960 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4961 ;;
4962 esac
4963 ], [
4964 runpath_var=
4965 _LT_TAGVAR(allow_undefined_flag, $1)=
4966 _LT_TAGVAR(always_export_symbols, $1)=no
4967 _LT_TAGVAR(archive_cmds, $1)=
4968 _LT_TAGVAR(archive_expsym_cmds, $1)=
4969 _LT_TAGVAR(compiler_needs_object, $1)=no
4970 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4971 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4972 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4973 _LT_TAGVAR(hardcode_automatic, $1)=no
4974 _LT_TAGVAR(hardcode_direct, $1)=no
4975 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4976 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4977 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4978 _LT_TAGVAR(hardcode_minus_L, $1)=no
4979 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4980 _LT_TAGVAR(inherit_rpath, $1)=no
4981 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4982 _LT_TAGVAR(module_cmds, $1)=
4983 _LT_TAGVAR(module_expsym_cmds, $1)=
4984 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4985 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4986 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4987 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4988 # include_expsyms should be a list of space-separated symbols to be *always*
4989 # included in the symbol list
4990 _LT_TAGVAR(include_expsyms, $1)=
4991 # exclude_expsyms can be an extended regexp of symbols to exclude
4992 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4993 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4994 # as well as any symbol that contains 'd'.
4995 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4996 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4997 # platforms (ab)use it in PIC code, but their linkers get confused if
4998 # the symbol is explicitly referenced. Since portable code cannot
4999 # rely on this symbol name, it's probably fine to never include it in
5000 # preloaded symbol tables.
5001 # Exclude shared library initialization/finalization symbols.
5002 dnl Note also adjust exclude_expsyms for C++ above.
5003 extract_expsyms_cmds=
5004
5005 case $host_os in
5006 cygwin* | mingw* | pw32* | cegcc*)
5007 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5008 # When not using gcc, we currently assume that we are using
5009 # Microsoft Visual C++.
5010 if test yes != "$GCC"; then
5011 with_gnu_ld=no
5012 fi
5013 ;;
5014 interix*)
5015 # we just hope/assume this is gcc and not c89 (= MSVC++)
5016 with_gnu_ld=yes
5017 ;;
5018 openbsd* | bitrig*)
5019 with_gnu_ld=no
5020 ;;
5021 linux* | k*bsd*-gnu | gnu*)
5022 _LT_TAGVAR(link_all_deplibs, $1)=no
5023 ;;
5024 esac
5025
5026 _LT_TAGVAR(ld_shlibs, $1)=yes
5027
5028 # On some targets, GNU ld is compatible enough with the native linker
5029 # that we're better off using the native interface for both.
5030 lt_use_gnu_ld_interface=no
5031 if test yes = "$with_gnu_ld"; then
5032 case $host_os in
5033 aix*)
5034 # The AIX port of GNU ld has always aspired to compatibility
5035 # with the native linker. However, as the warning in the GNU ld
5036 # block says, versions before 2.19.5* couldn't really create working
5037 # shared libraries, regardless of the interface used.
5038 case `$LD -v 2>&1` in
5039 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5040 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5041 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5042 *)
5043 lt_use_gnu_ld_interface=yes
5044 ;;
5045 esac
5046 ;;
5047 *)
5048 lt_use_gnu_ld_interface=yes
5049 ;;
5050 esac
5051 fi
5052
5053 if test yes = "$lt_use_gnu_ld_interface"; then
5054 # If archive_cmds runs LD, not CC, wlarc should be empty
5055 wlarc='$wl'
5056
5057 # Set some defaults for GNU ld with shared library support. These
5058 # are reset later if shared libraries are not supported. Putting them
5059 # here allows them to be overridden if necessary.
5060 runpath_var=LD_RUN_PATH
5061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5062 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5063 # ancient GNU ld didn't support --whole-archive et. al.
5064 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5065 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5066 else
5067 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5068 fi
5069 supports_anon_versioning=no
5070 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5071 *GNU\ gold*) supports_anon_versioning=yes ;;
5072 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5073 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5074 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5075 *\ 2.11.*) ;; # other 2.11 versions
5076 *) supports_anon_versioning=yes ;;
5077 esac
5078
5079 # See if GNU ld supports shared libraries.
5080 case $host_os in
5081 aix[[3-9]]*)
5082 # On AIX/PPC, the GNU linker is very broken
5083 if test ia64 != "$host_cpu"; then
5084 _LT_TAGVAR(ld_shlibs, $1)=no
5085 cat <<_LT_EOF 1>&2
5086
5087 *** Warning: the GNU linker, at least up to release 2.19, is reported
5088 *** to be unable to reliably create shared libraries on AIX.
5089 *** Therefore, libtool is disabling shared libraries support. If you
5090 *** really care for shared libraries, you may want to install binutils
5091 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5092 *** You will then need to restart the configuration process.
5093
5094 _LT_EOF
5095 fi
5096 ;;
5097
5098 amigaos*)
5099 case $host_cpu in
5100 powerpc)
5101 # see comment about AmigaOS4 .so support
5102 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5103 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5104 ;;
5105 m68k)
5106 _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)'
5107 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5108 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5109 ;;
5110 esac
5111 ;;
5112
5113 beos*)
5114 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5115 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5116 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5117 # support --undefined. This deserves some investigation. FIXME
5118 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5119 else
5120 _LT_TAGVAR(ld_shlibs, $1)=no
5121 fi
5122 ;;
5123
5124 cygwin* | mingw* | pw32* | cegcc*)
5125 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5126 # as there is no search path for DLLs.
5127 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5128 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5129 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5130 _LT_TAGVAR(always_export_symbols, $1)=no
5131 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5132 _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'
5133 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5134
5135 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5136 _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'
5137 # If the export-symbols file already is a .def file, use it as
5138 # is; otherwise, prepend EXPORTS...
5139 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5140 cp $export_symbols $output_objdir/$soname.def;
5141 else
5142 echo EXPORTS > $output_objdir/$soname.def;
5143 cat $export_symbols >> $output_objdir/$soname.def;
5144 fi~
5145 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5146 else
5147 _LT_TAGVAR(ld_shlibs, $1)=no
5148 fi
5149 ;;
5150
5151 haiku*)
5152 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5153 _LT_TAGVAR(link_all_deplibs, $1)=yes
5154 ;;
5155
5156 os2*)
5157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5158 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5159 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5160 shrext_cmds=.dll
5161 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5162 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5163 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5164 $ECHO EXPORTS >> $output_objdir/$libname.def~
5165 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5166 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5167 emximp -o $lib $output_objdir/$libname.def'
5168 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5169 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5170 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5171 $ECHO EXPORTS >> $output_objdir/$libname.def~
5172 prefix_cmds="$SED"~
5173 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5174 prefix_cmds="$prefix_cmds -e 1d";
5175 fi~
5176 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5177 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5178 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5179 emximp -o $lib $output_objdir/$libname.def'
5180 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5181 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5182 ;;
5183
5184 interix[[3-9]]*)
5185 _LT_TAGVAR(hardcode_direct, $1)=no
5186 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5187 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5188 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5189 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5190 # Instead, shared libraries are loaded at an image base (0x10000000 by
5191 # default) and relocated if they conflict, which is a slow very memory
5192 # consuming and fragmenting process. To avoid this, we pick a random,
5193 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5194 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5195 _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'
5196 _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'
5197 ;;
5198
5199 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5200 tmp_diet=no
5201 if test linux-dietlibc = "$host_os"; then
5202 case $cc_basename in
5203 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5204 esac
5205 fi
5206 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5207 && test no = "$tmp_diet"
5208 then
5209 tmp_addflag=' $pic_flag'
5210 tmp_sharedflag='-shared'
5211 case $cc_basename,$host_cpu in
5212 pgcc*) # Portland Group C compiler
5213 _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'
5214 tmp_addflag=' $pic_flag'
5215 ;;
5216 pgf77* | pgf90* | pgf95* | pgfortran*)
5217 # Portland Group f77 and f90 compilers
5218 _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'
5219 tmp_addflag=' $pic_flag -Mnomain' ;;
5220 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5221 tmp_addflag=' -i_dynamic' ;;
5222 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5223 tmp_addflag=' -i_dynamic -nofor_main' ;;
5224 ifc* | ifort*) # Intel Fortran compiler
5225 tmp_addflag=' -nofor_main' ;;
5226 lf95*) # Lahey Fortran 8.1
5227 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5228 tmp_sharedflag='--shared' ;;
5229 nagfor*) # NAGFOR 5.3
5230 tmp_sharedflag='-Wl,-shared' ;;
5231 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5232 tmp_sharedflag='-qmkshrobj'
5233 tmp_addflag= ;;
5234 nvcc*) # Cuda Compiler Driver 2.2
5235 _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'
5236 _LT_TAGVAR(compiler_needs_object, $1)=yes
5237 ;;
5238 esac
5239 case `$CC -V 2>&1 | sed 5q` in
5240 *Sun\ C*) # Sun C 5.9
5241 _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'
5242 _LT_TAGVAR(compiler_needs_object, $1)=yes
5243 tmp_sharedflag='-G' ;;
5244 *Sun\ F*) # Sun Fortran 8.3
5245 tmp_sharedflag='-G' ;;
5246 esac
5247 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5248
5249 if test yes = "$supports_anon_versioning"; then
5250 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5251 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5252 echo "local: *; };" >> $output_objdir/$libname.ver~
5253 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5254 fi
5255
5256 case $cc_basename in
5257 tcc*)
5258 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5259 ;;
5260 xlf* | bgf* | bgxlf* | mpixlf*)
5261 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5262 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5263 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5264 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5265 if test yes = "$supports_anon_versioning"; then
5266 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5267 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5268 echo "local: *; };" >> $output_objdir/$libname.ver~
5269 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5270 fi
5271 ;;
5272 esac
5273 else
5274 _LT_TAGVAR(ld_shlibs, $1)=no
5275 fi
5276 ;;
5277
5278 netbsd* | netbsdelf*-gnu)
5279 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5280 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5281 wlarc=
5282 else
5283 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5284 _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'
5285 fi
5286 ;;
5287
5288 solaris*)
5289 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5290 _LT_TAGVAR(ld_shlibs, $1)=no
5291 cat <<_LT_EOF 1>&2
5292
5293 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5294 *** create shared libraries on Solaris systems. Therefore, libtool
5295 *** is disabling shared libraries support. We urge you to upgrade GNU
5296 *** binutils to release 2.9.1 or newer. Another option is to modify
5297 *** your PATH or compiler configuration so that the native linker is
5298 *** used, and then restart.
5299
5300 _LT_EOF
5301 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5302 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5303 _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'
5304 else
5305 _LT_TAGVAR(ld_shlibs, $1)=no
5306 fi
5307 ;;
5308
5309 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5310 case `$LD -v 2>&1` in
5311 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5312 _LT_TAGVAR(ld_shlibs, $1)=no
5313 cat <<_LT_EOF 1>&2
5314
5315 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5316 *** reliably create shared libraries on SCO systems. Therefore, libtool
5317 *** is disabling shared libraries support. We urge you to upgrade GNU
5318 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5319 *** your PATH or compiler configuration so that the native linker is
5320 *** used, and then restart.
5321
5322 _LT_EOF
5323 ;;
5324 *)
5325 # For security reasons, it is highly recommended that you always
5326 # use absolute paths for naming shared libraries, and exclude the
5327 # DT_RUNPATH tag from executables and libraries. But doing so
5328 # requires that you compile everything twice, which is a pain.
5329 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5330 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5331 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5332 _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'
5333 else
5334 _LT_TAGVAR(ld_shlibs, $1)=no
5335 fi
5336 ;;
5337 esac
5338 ;;
5339
5340 sunos4*)
5341 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5342 wlarc=
5343 _LT_TAGVAR(hardcode_direct, $1)=yes
5344 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5345 ;;
5346
5347 *)
5348 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5349 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5350 _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'
5351 else
5352 _LT_TAGVAR(ld_shlibs, $1)=no
5353 fi
5354 ;;
5355 esac
5356
5357 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5358 runpath_var=
5359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5360 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5361 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5362 fi
5363 else
5364 # PORTME fill in a description of your system's linker (not GNU ld)
5365 case $host_os in
5366 aix3*)
5367 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5368 _LT_TAGVAR(always_export_symbols, $1)=yes
5369 _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'
5370 # Note: this linker hardcodes the directories in LIBPATH if there
5371 # are no directories specified by -L.
5372 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5373 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5374 # Neither direct hardcoding nor static linking is supported with a
5375 # broken collect2.
5376 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5377 fi
5378 ;;
5379
5380 aix[[4-9]]*)
5381 if test ia64 = "$host_cpu"; then
5382 # On IA64, the linker does run time linking by default, so we don't
5383 # have to do anything special.
5384 aix_use_runtimelinking=no
5385 exp_sym_flag='-Bexport'
5386 no_entry_flag=
5387 else
5388 # If we're using GNU nm, then we don't want the "-C" option.
5389 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5390 # Without the "-l" option, or with the "-B" option, AIX nm treats
5391 # weak defined symbols like other global defined symbols, whereas
5392 # GNU nm marks them as "W".
5393 # While the 'weak' keyword is ignored in the Export File, we need
5394 # it in the Import File for the 'aix-soname' feature, so we have
5395 # to replace the "-B" option with "-P" for AIX nm.
5396 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5397 _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'
5398 else
5399 _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'
5400 fi
5401 aix_use_runtimelinking=no
5402
5403 # Test if we are trying to use run time linking or normal
5404 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5405 # have runtime linking enabled, and use it for executables.
5406 # For shared libraries, we enable/disable runtime linking
5407 # depending on the kind of the shared library created -
5408 # when "with_aix_soname,aix_use_runtimelinking" is:
5409 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5410 # "aix,yes" lib.so shared, rtl:yes, for executables
5411 # lib.a static archive
5412 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5413 # lib.a(lib.so.V) shared, rtl:no, for executables
5414 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5415 # lib.a(lib.so.V) shared, rtl:no
5416 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5417 # lib.a static archive
5418 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5419 for ld_flag in $LDFLAGS; do
5420 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5421 aix_use_runtimelinking=yes
5422 break
5423 fi
5424 done
5425 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5426 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5427 # so we don't have lib.a shared libs to link our executables.
5428 # We have to force runtime linking in this case.
5429 aix_use_runtimelinking=yes
5430 LDFLAGS="$LDFLAGS -Wl,-brtl"
5431 fi
5432 ;;
5433 esac
5434
5435 exp_sym_flag='-bexport'
5436 no_entry_flag='-bnoentry'
5437 fi
5438
5439 # When large executables or shared objects are built, AIX ld can
5440 # have problems creating the table of contents. If linking a library
5441 # or program results in "error TOC overflow" add -mminimal-toc to
5442 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5443 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5444
5445 _LT_TAGVAR(archive_cmds, $1)=''
5446 _LT_TAGVAR(hardcode_direct, $1)=yes
5447 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5448 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5449 _LT_TAGVAR(link_all_deplibs, $1)=yes
5450 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5451 case $with_aix_soname,$aix_use_runtimelinking in
5452 aix,*) ;; # traditional, no import file
5453 svr4,* | *,yes) # use import file
5454 # The Import File defines what to hardcode.
5455 _LT_TAGVAR(hardcode_direct, $1)=no
5456 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5457 ;;
5458 esac
5459
5460 if test yes = "$GCC"; then
5461 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5462 # We only want to do this on AIX 4.2 and lower, the check
5463 # below for broken collect2 doesn't work under 4.3+
5464 collect2name=`$CC -print-prog-name=collect2`
5465 if test -f "$collect2name" &&
5466 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5467 then
5468 # We have reworked collect2
5469 :
5470 else
5471 # We have old collect2
5472 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5473 # It fails to find uninstalled libraries when the uninstalled
5474 # path is not listed in the libpath. Setting hardcode_minus_L
5475 # to unsupported forces relinking
5476 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5477 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5478 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5479 fi
5480 ;;
5481 esac
5482 shared_flag='-shared'
5483 if test yes = "$aix_use_runtimelinking"; then
5484 shared_flag="$shared_flag "'$wl-G'
5485 fi
5486 # Need to ensure runtime linking is disabled for the traditional
5487 # shared library, or the linker may eventually find shared libraries
5488 # /with/ Import File - we do not want to mix them.
5489 shared_flag_aix='-shared'
5490 shared_flag_svr4='-shared $wl-G'
5491 else
5492 # not using gcc
5493 if test ia64 = "$host_cpu"; then
5494 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5495 # chokes on -Wl,-G. The following line is correct:
5496 shared_flag='-G'
5497 else
5498 if test yes = "$aix_use_runtimelinking"; then
5499 shared_flag='$wl-G'
5500 else
5501 shared_flag='$wl-bM:SRE'
5502 fi
5503 shared_flag_aix='$wl-bM:SRE'
5504 shared_flag_svr4='$wl-G'
5505 fi
5506 fi
5507
5508 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5509 # It seems that -bexpall does not export symbols beginning with
5510 # underscore (_), so it is better to generate a list of symbols to export.
5511 _LT_TAGVAR(always_export_symbols, $1)=yes
5512 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5513 # Warning - without using the other runtime loading flags (-brtl),
5514 # -berok will link without error, but may produce a broken library.
5515 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5516 # Determine the default libpath from the value encoded in an
5517 # empty executable.
5518 _LT_SYS_MODULE_PATH_AIX([$1])
5519 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5520 _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
5521 else
5522 if test ia64 = "$host_cpu"; then
5523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5524 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5525 _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"
5526 else
5527 # Determine the default libpath from the value encoded in an
5528 # empty executable.
5529 _LT_SYS_MODULE_PATH_AIX([$1])
5530 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5531 # Warning - without using the other run time loading flags,
5532 # -berok will link without error, but may produce a broken library.
5533 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5534 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5535 if test yes = "$with_gnu_ld"; then
5536 # We only use this code for GNU lds that support --whole-archive.
5537 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5538 else
5539 # Exported symbols can be pulled into shared objects from archives
5540 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5541 fi
5542 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5543 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5544 # -brtl affects multiple linker settings, -berok does not and is overridden later
5545 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5546 if test svr4 != "$with_aix_soname"; then
5547 # This is similar to how AIX traditionally builds its shared libraries.
5548 _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'
5549 fi
5550 if test aix != "$with_aix_soname"; then
5551 _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'
5552 else
5553 # used by -dlpreopen to get the symbols
5554 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5555 fi
5556 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5557 fi
5558 fi
5559 ;;
5560
5561 amigaos*)
5562 case $host_cpu in
5563 powerpc)
5564 # see comment about AmigaOS4 .so support
5565 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5566 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5567 ;;
5568 m68k)
5569 _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)'
5570 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5571 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5572 ;;
5573 esac
5574 ;;
5575
5576 bsdi[[45]]*)
5577 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5578 ;;
5579
5580 cygwin* | mingw* | pw32* | cegcc*)
5581 # When not using gcc, we currently assume that we are using
5582 # Microsoft Visual C++.
5583 # hardcode_libdir_flag_spec is actually meaningless, as there is
5584 # no search path for DLLs.
5585 case $cc_basename in
5586 cl*)
5587 # Native MSVC
5588 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5589 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5590 _LT_TAGVAR(always_export_symbols, $1)=yes
5591 _LT_TAGVAR(file_list_spec, $1)='@'
5592 # Tell ltmain to make .lib files, not .a files.
5593 libext=lib
5594 # Tell ltmain to make .dll files, not .so files.
5595 shrext_cmds=.dll
5596 # FIXME: Setting linknames here is a bad hack.
5597 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5598 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5599 cp "$export_symbols" "$output_objdir/$soname.def";
5600 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5601 else
5602 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5603 fi~
5604 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5605 linknames='
5606 # The linker will not automatically build a static lib if we build a DLL.
5607 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5608 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5609 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5610 _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'
5611 # Don't use ranlib
5612 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5613 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5614 lt_tool_outputfile="@TOOL_OUTPUT@"~
5615 case $lt_outputfile in
5616 *.exe|*.EXE) ;;
5617 *)
5618 lt_outputfile=$lt_outputfile.exe
5619 lt_tool_outputfile=$lt_tool_outputfile.exe
5620 ;;
5621 esac~
5622 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5623 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5624 $RM "$lt_outputfile.manifest";
5625 fi'
5626 ;;
5627 *)
5628 # Assume MSVC wrapper
5629 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5630 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5631 # Tell ltmain to make .lib files, not .a files.
5632 libext=lib
5633 # Tell ltmain to make .dll files, not .so files.
5634 shrext_cmds=.dll
5635 # FIXME: Setting linknames here is a bad hack.
5636 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5637 # The linker will automatically build a .lib file if we build a DLL.
5638 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5639 # FIXME: Should let the user specify the lib program.
5640 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5641 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5642 ;;
5643 esac
5644 ;;
5645
5646 darwin* | rhapsody*)
5647 _LT_DARWIN_LINKER_FEATURES($1)
5648 ;;
5649
5650 dgux*)
5651 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5653 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5654 ;;
5655
5656 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5657 # support. Future versions do this automatically, but an explicit c++rt0.o
5658 # does not break anything, and helps significantly (at the cost of a little
5659 # extra space).
5660 freebsd2.2*)
5661 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5662 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5663 _LT_TAGVAR(hardcode_direct, $1)=yes
5664 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5665 ;;
5666
5667 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5668 freebsd2.*)
5669 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5670 _LT_TAGVAR(hardcode_direct, $1)=yes
5671 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5672 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5673 ;;
5674
5675 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5676 freebsd* | dragonfly*)
5677 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5678 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5679 _LT_TAGVAR(hardcode_direct, $1)=yes
5680 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5681 ;;
5682
5683 hpux9*)
5684 if test yes = "$GCC"; then
5685 _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'
5686 else
5687 _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'
5688 fi
5689 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5690 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5691 _LT_TAGVAR(hardcode_direct, $1)=yes
5692
5693 # hardcode_minus_L: Not really in the search PATH,
5694 # but as the default location of the library.
5695 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5696 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5697 ;;
5698
5699 hpux10*)
5700 if test yes,no = "$GCC,$with_gnu_ld"; then
5701 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5702 else
5703 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5704 fi
5705 if test no = "$with_gnu_ld"; then
5706 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5707 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5708 _LT_TAGVAR(hardcode_direct, $1)=yes
5709 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5710 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5711 # hardcode_minus_L: Not really in the search PATH,
5712 # but as the default location of the library.
5713 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5714 fi
5715 ;;
5716
5717 hpux11*)
5718 if test yes,no = "$GCC,$with_gnu_ld"; then
5719 case $host_cpu in
5720 hppa*64*)
5721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5722 ;;
5723 ia64*)
5724 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5725 ;;
5726 *)
5727 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5728 ;;
5729 esac
5730 else
5731 case $host_cpu in
5732 hppa*64*)
5733 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5734 ;;
5735 ia64*)
5736 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5737 ;;
5738 *)
5739 m4_if($1, [], [
5740 # Older versions of the 11.00 compiler do not understand -b yet
5741 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5742 _LT_LINKER_OPTION([if $CC understands -b],
5743 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5744 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5745 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5746 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5747 ;;
5748 esac
5749 fi
5750 if test no = "$with_gnu_ld"; then
5751 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5752 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5753
5754 case $host_cpu in
5755 hppa*64*|ia64*)
5756 _LT_TAGVAR(hardcode_direct, $1)=no
5757 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5758 ;;
5759 *)
5760 _LT_TAGVAR(hardcode_direct, $1)=yes
5761 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5762 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5763
5764 # hardcode_minus_L: Not really in the search PATH,
5765 # but as the default location of the library.
5766 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5767 ;;
5768 esac
5769 fi
5770 ;;
5771
5772 irix5* | irix6* | nonstopux*)
5773 if test yes = "$GCC"; then
5774 _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'
5775 # Try to use the -exported_symbol ld option, if it does not
5776 # work, assume that -exports_file does not work either and
5777 # implicitly export all symbols.
5778 # This should be the same for all languages, so no per-tag cache variable.
5779 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5780 [lt_cv_irix_exported_symbol],
5781 [save_LDFLAGS=$LDFLAGS
5782 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5783 AC_LINK_IFELSE(
5784 [AC_LANG_SOURCE(
5785 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5786 [C++], [[int foo (void) { return 0; }]],
5787 [Fortran 77], [[
5788 subroutine foo
5789 end]],
5790 [Fortran], [[
5791 subroutine foo
5792 end]])])],
5793 [lt_cv_irix_exported_symbol=yes],
5794 [lt_cv_irix_exported_symbol=no])
5795 LDFLAGS=$save_LDFLAGS])
5796 if test yes = "$lt_cv_irix_exported_symbol"; then
5797 _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'
5798 fi
5799 _LT_TAGVAR(link_all_deplibs, $1)=no
5800 else
5801 _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'
5802 _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'
5803 fi
5804 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5805 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5806 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5807 _LT_TAGVAR(inherit_rpath, $1)=yes
5808 _LT_TAGVAR(link_all_deplibs, $1)=yes
5809 ;;
5810
5811 linux*)
5812 case $cc_basename in
5813 tcc*)
5814 # Fabrice Bellard et al's Tiny C Compiler
5815 _LT_TAGVAR(ld_shlibs, $1)=yes
5816 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5817 ;;
5818 esac
5819 ;;
5820
5821 netbsd* | netbsdelf*-gnu)
5822 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5823 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5824 else
5825 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5826 fi
5827 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5828 _LT_TAGVAR(hardcode_direct, $1)=yes
5829 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5830 ;;
5831
5832 newsos6)
5833 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5834 _LT_TAGVAR(hardcode_direct, $1)=yes
5835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5836 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5837 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5838 ;;
5839
5840 *nto* | *qnx*)
5841 ;;
5842
5843 openbsd* | bitrig*)
5844 if test -f /usr/libexec/ld.so; then
5845 _LT_TAGVAR(hardcode_direct, $1)=yes
5846 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5847 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5848 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5849 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5850 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5851 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5852 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5853 else
5854 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5855 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5856 fi
5857 else
5858 _LT_TAGVAR(ld_shlibs, $1)=no
5859 fi
5860 ;;
5861
5862 os2*)
5863 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5864 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5865 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5866 shrext_cmds=.dll
5867 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5868 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5869 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5870 $ECHO EXPORTS >> $output_objdir/$libname.def~
5871 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5872 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5873 emximp -o $lib $output_objdir/$libname.def'
5874 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5875 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5876 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5877 $ECHO EXPORTS >> $output_objdir/$libname.def~
5878 prefix_cmds="$SED"~
5879 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5880 prefix_cmds="$prefix_cmds -e 1d";
5881 fi~
5882 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5883 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5884 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5885 emximp -o $lib $output_objdir/$libname.def'
5886 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5887 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5888 ;;
5889
5890 osf3*)
5891 if test yes = "$GCC"; then
5892 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5893 _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'
5894 else
5895 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5896 _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'
5897 fi
5898 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5899 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5900 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5901 ;;
5902
5903 osf4* | osf5*) # as osf3* with the addition of -msym flag
5904 if test yes = "$GCC"; then
5905 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5906 _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'
5907 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5908 else
5909 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5910 _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'
5911 _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~
5912 $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'
5913
5914 # Both c and cxx compiler support -rpath directly
5915 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5916 fi
5917 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5918 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5919 ;;
5920
5921 solaris*)
5922 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5923 if test yes = "$GCC"; then
5924 wlarc='$wl'
5925 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5926 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5927 $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'
5928 else
5929 case `$CC -V 2>&1` in
5930 *"Compilers 5.0"*)
5931 wlarc=''
5932 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_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 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5935 ;;
5936 *)
5937 wlarc='$wl'
5938 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5939 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5940 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5941 ;;
5942 esac
5943 fi
5944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5945 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5946 case $host_os in
5947 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5948 *)
5949 # The compiler driver will combine and reorder linker options,
5950 # but understands '-z linker_flag'. GCC discards it without '$wl',
5951 # but is careful enough not to reorder.
5952 # Supported since Solaris 2.6 (maybe 2.5.1?)
5953 if test yes = "$GCC"; then
5954 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5955 else
5956 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5957 fi
5958 ;;
5959 esac
5960 _LT_TAGVAR(link_all_deplibs, $1)=yes
5961 ;;
5962
5963 sunos4*)
5964 if test sequent = "$host_vendor"; then
5965 # Use $CC to link under sequent, because it throws in some extra .o
5966 # files that make .init and .fini sections work.
5967 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5968 else
5969 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5970 fi
5971 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5972 _LT_TAGVAR(hardcode_direct, $1)=yes
5973 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5974 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5975 ;;
5976
5977 sysv4)
5978 case $host_vendor in
5979 sni)
5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5981 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5982 ;;
5983 siemens)
5984 ## LD is ld it makes a PLAMLIB
5985 ## CC just makes a GrossModule.
5986 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5987 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5988 _LT_TAGVAR(hardcode_direct, $1)=no
5989 ;;
5990 motorola)
5991 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5992 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5993 ;;
5994 esac
5995 runpath_var='LD_RUN_PATH'
5996 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5997 ;;
5998
5999 sysv4.3*)
6000 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6001 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6002 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6003 ;;
6004
6005 sysv4*MP*)
6006 if test -d /usr/nec; then
6007 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6008 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6009 runpath_var=LD_RUN_PATH
6010 hardcode_runpath_var=yes
6011 _LT_TAGVAR(ld_shlibs, $1)=yes
6012 fi
6013 ;;
6014
6015 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6016 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6017 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6018 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6019 runpath_var='LD_RUN_PATH'
6020
6021 if test yes = "$GCC"; then
6022 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6023 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6024 else
6025 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6026 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6027 fi
6028 ;;
6029
6030 sysv5* | sco3.2v5* | sco5v6*)
6031 # Note: We CANNOT use -z defs as we might desire, because we do not
6032 # link with -lc, and that would cause any symbols used from libc to
6033 # always be unresolved, which means just about no library would
6034 # ever link correctly. If we're not using GNU ld we use -z text
6035 # though, which does catch some bad symbols but isn't as heavy-handed
6036 # as -z defs.
6037 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6038 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6039 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6040 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6042 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6043 _LT_TAGVAR(link_all_deplibs, $1)=yes
6044 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6045 runpath_var='LD_RUN_PATH'
6046
6047 if test yes = "$GCC"; then
6048 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6049 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6050 else
6051 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6052 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6053 fi
6054 ;;
6055
6056 uts4*)
6057 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6058 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6059 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6060 ;;
6061
6062 *)
6063 _LT_TAGVAR(ld_shlibs, $1)=no
6064 ;;
6065 esac
6066
6067 if test sni = "$host_vendor"; then
6068 case $host in
6069 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6070 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6071 ;;
6072 esac
6073 fi
6074 fi
6075 ])
6076 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6077 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6078
6079 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6080
6081 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6082 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6083 _LT_DECL([], [extract_expsyms_cmds], [2],
6084 [The commands to extract the exported symbol list from a shared archive])
6085
6086 #
6087 # Do we need to explicitly link libc?
6088 #
6089 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6090 x|xyes)
6091 # Assume -lc should be added
6092 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6093
6094 if test yes,yes = "$GCC,$enable_shared"; then
6095 case $_LT_TAGVAR(archive_cmds, $1) in
6096 *'~'*)
6097 # FIXME: we may have to deal with multi-command sequences.
6098 ;;
6099 '$CC '*)
6100 # Test whether the compiler implicitly links with -lc since on some
6101 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6102 # to ld, don't add -lc before -lgcc.
6103 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6104 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6105 [$RM conftest*
6106 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6107
6108 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6109 soname=conftest
6110 lib=conftest
6111 libobjs=conftest.$ac_objext
6112 deplibs=
6113 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6114 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6115 compiler_flags=-v
6116 linker_flags=-v
6117 verstring=
6118 output_objdir=.
6119 libname=conftest
6120 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6121 _LT_TAGVAR(allow_undefined_flag, $1)=
6122 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6123 then
6124 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6125 else
6126 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6127 fi
6128 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6129 else
6130 cat conftest.err 1>&5
6131 fi
6132 $RM conftest*
6133 ])
6134 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6135 ;;
6136 esac
6137 fi
6138 ;;
6139 esac
6140
6141 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6142 [Whether or not to add -lc for building shared libraries])
6143 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6144 [enable_shared_with_static_runtimes], [0],
6145 [Whether or not to disallow shared libs when runtime libs are static])
6146 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6147 [Compiler flag to allow reflexive dlopens])
6148 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6149 [Compiler flag to generate shared objects directly from archives])
6150 _LT_TAGDECL([], [compiler_needs_object], [1],
6151 [Whether the compiler copes with passing no objects directly])
6152 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6153 [Create an old-style archive from a shared archive])
6154 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6155 [Create a temporary old-style archive to link instead of a shared archive])
6156 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6157 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6158 _LT_TAGDECL([], [module_cmds], [2],
6159 [Commands used to build a loadable module if different from building
6160 a shared archive.])
6161 _LT_TAGDECL([], [module_expsym_cmds], [2])
6162 _LT_TAGDECL([], [with_gnu_ld], [1],
6163 [Whether we are building with GNU ld or not])
6164 _LT_TAGDECL([], [allow_undefined_flag], [1],
6165 [Flag that allows shared libraries with undefined symbols to be built])
6166 _LT_TAGDECL([], [no_undefined_flag], [1],
6167 [Flag that enforces no undefined symbols])
6168 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6169 [Flag to hardcode $libdir into a binary during linking.
6170 This must work even if $libdir does not exist])
6171 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6172 [Whether we need a single "-rpath" flag with a separated argument])
6173 _LT_TAGDECL([], [hardcode_direct], [0],
6174 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6175 DIR into the resulting binary])
6176 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6177 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6178 DIR into the resulting binary and the resulting library dependency is
6179 "absolute", i.e impossible to change by setting $shlibpath_var if the
6180 library is relocated])
6181 _LT_TAGDECL([], [hardcode_minus_L], [0],
6182 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6183 into the resulting binary])
6184 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6185 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6186 into the resulting binary])
6187 _LT_TAGDECL([], [hardcode_automatic], [0],
6188 [Set to "yes" if building a shared library automatically hardcodes DIR
6189 into the library and all subsequent libraries and executables linked
6190 against it])
6191 _LT_TAGDECL([], [inherit_rpath], [0],
6192 [Set to yes if linker adds runtime paths of dependent libraries
6193 to runtime path list])
6194 _LT_TAGDECL([], [link_all_deplibs], [0],
6195 [Whether libtool must link a program against all its dependency libraries])
6196 _LT_TAGDECL([], [always_export_symbols], [0],
6197 [Set to "yes" if exported symbols are required])
6198 _LT_TAGDECL([], [export_symbols_cmds], [2],
6199 [The commands to list exported symbols])
6200 _LT_TAGDECL([], [exclude_expsyms], [1],
6201 [Symbols that should not be listed in the preloaded symbols])
6202 _LT_TAGDECL([], [include_expsyms], [1],
6203 [Symbols that must always be exported])
6204 _LT_TAGDECL([], [prelink_cmds], [2],
6205 [Commands necessary for linking programs (against libraries) with templates])
6206 _LT_TAGDECL([], [postlink_cmds], [2],
6207 [Commands necessary for finishing linking programs])
6208 _LT_TAGDECL([], [file_list_spec], [1],
6209 [Specify filename containing input files])
6210 dnl FIXME: Not yet implemented
6211 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6212 dnl [Compiler flag to generate thread safe objects])
6213 ])# _LT_LINKER_SHLIBS
6214
6215
6216 # _LT_LANG_C_CONFIG([TAG])
6217 # ------------------------
6218 # Ensure that the configuration variables for a C compiler are suitably
6219 # defined. These variables are subsequently used by _LT_CONFIG to write
6220 # the compiler configuration to 'libtool'.
6221 m4_defun([_LT_LANG_C_CONFIG],
6222 [m4_require([_LT_DECL_EGREP])dnl
6223 lt_save_CC=$CC
6224 AC_LANG_PUSH(C)
6225
6226 # Source file extension for C test sources.
6227 ac_ext=c
6228
6229 # Object file extension for compiled C test sources.
6230 objext=o
6231 _LT_TAGVAR(objext, $1)=$objext
6232
6233 # Code to be used in simple compile tests
6234 lt_simple_compile_test_code="int some_variable = 0;"
6235
6236 # Code to be used in simple link tests
6237 lt_simple_link_test_code='int main(){return(0);}'
6238
6239 _LT_TAG_COMPILER
6240 # Save the default compiler, since it gets overwritten when the other
6241 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6242 compiler_DEFAULT=$CC
6243
6244 # save warnings/boilerplate of simple test code
6245 _LT_COMPILER_BOILERPLATE
6246 _LT_LINKER_BOILERPLATE
6247
6248 ## CAVEAT EMPTOR:
6249 ## There is no encapsulation within the following macros, do not change
6250 ## the running order or otherwise move them around unless you know exactly
6251 ## what you are doing...
6252 if test -n "$compiler"; then
6253 _LT_COMPILER_NO_RTTI($1)
6254 _LT_COMPILER_PIC($1)
6255 _LT_COMPILER_C_O($1)
6256 _LT_COMPILER_FILE_LOCKS($1)
6257 _LT_LINKER_SHLIBS($1)
6258 _LT_SYS_DYNAMIC_LINKER($1)
6259 _LT_LINKER_HARDCODE_LIBPATH($1)
6260 LT_SYS_DLOPEN_SELF
6261 _LT_CMD_STRIPLIB
6262
6263 # Report what library types will actually be built
6264 AC_MSG_CHECKING([if libtool supports shared libraries])
6265 AC_MSG_RESULT([$can_build_shared])
6266
6267 AC_MSG_CHECKING([whether to build shared libraries])
6268 test no = "$can_build_shared" && enable_shared=no
6269
6270 # On AIX, shared libraries and static libraries use the same namespace, and
6271 # are all built from PIC.
6272 case $host_os in
6273 aix3*)
6274 test yes = "$enable_shared" && enable_static=no
6275 if test -n "$RANLIB"; then
6276 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6277 postinstall_cmds='$RANLIB $lib'
6278 fi
6279 ;;
6280
6281 aix[[4-9]]*)
6282 if test ia64 != "$host_cpu"; then
6283 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6284 yes,aix,yes) ;; # shared object as lib.so file only
6285 yes,svr4,*) ;; # shared object as lib.so archive member only
6286 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6287 esac
6288 fi
6289 ;;
6290 esac
6291 AC_MSG_RESULT([$enable_shared])
6292
6293 AC_MSG_CHECKING([whether to build static libraries])
6294 # Make sure either enable_shared or enable_static is yes.
6295 test yes = "$enable_shared" || enable_static=yes
6296 AC_MSG_RESULT([$enable_static])
6297
6298 _LT_CONFIG($1)
6299 fi
6300 AC_LANG_POP
6301 CC=$lt_save_CC
6302 ])# _LT_LANG_C_CONFIG
6303
6304
6305 # _LT_LANG_CXX_CONFIG([TAG])
6306 # --------------------------
6307 # Ensure that the configuration variables for a C++ compiler are suitably
6308 # defined. These variables are subsequently used by _LT_CONFIG to write
6309 # the compiler configuration to 'libtool'.
6310 m4_defun([_LT_LANG_CXX_CONFIG],
6311 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6312 m4_require([_LT_DECL_EGREP])dnl
6313 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6314 if test -n "$CXX" && ( test no != "$CXX" &&
6315 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6316 (test g++ != "$CXX"))); then
6317 AC_PROG_CXXCPP
6318 else
6319 _lt_caught_CXX_error=yes
6320 fi
6321
6322 AC_LANG_PUSH(C++)
6323 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6324 _LT_TAGVAR(allow_undefined_flag, $1)=
6325 _LT_TAGVAR(always_export_symbols, $1)=no
6326 _LT_TAGVAR(archive_expsym_cmds, $1)=
6327 _LT_TAGVAR(compiler_needs_object, $1)=no
6328 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6329 _LT_TAGVAR(hardcode_direct, $1)=no
6330 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6331 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6332 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6333 _LT_TAGVAR(hardcode_minus_L, $1)=no
6334 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6335 _LT_TAGVAR(hardcode_automatic, $1)=no
6336 _LT_TAGVAR(inherit_rpath, $1)=no
6337 _LT_TAGVAR(module_cmds, $1)=
6338 _LT_TAGVAR(module_expsym_cmds, $1)=
6339 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6340 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6341 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6342 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6343 _LT_TAGVAR(no_undefined_flag, $1)=
6344 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6345 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6346
6347 # Source file extension for C++ test sources.
6348 ac_ext=cpp
6349
6350 # Object file extension for compiled C++ test sources.
6351 objext=o
6352 _LT_TAGVAR(objext, $1)=$objext
6353
6354 # No sense in running all these tests if we already determined that
6355 # the CXX compiler isn't working. Some variables (like enable_shared)
6356 # are currently assumed to apply to all compilers on this platform,
6357 # and will be corrupted by setting them based on a non-working compiler.
6358 if test yes != "$_lt_caught_CXX_error"; then
6359 # Code to be used in simple compile tests
6360 lt_simple_compile_test_code="int some_variable = 0;"
6361
6362 # Code to be used in simple link tests
6363 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6364
6365 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6366 _LT_TAG_COMPILER
6367
6368 # save warnings/boilerplate of simple test code
6369 _LT_COMPILER_BOILERPLATE
6370 _LT_LINKER_BOILERPLATE
6371
6372 # Allow CC to be a program name with arguments.
6373 lt_save_CC=$CC
6374 lt_save_CFLAGS=$CFLAGS
6375 lt_save_LD=$LD
6376 lt_save_GCC=$GCC
6377 GCC=$GXX
6378 lt_save_with_gnu_ld=$with_gnu_ld
6379 lt_save_path_LD=$lt_cv_path_LD
6380 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6381 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6382 else
6383 $as_unset lt_cv_prog_gnu_ld
6384 fi
6385 if test -n "${lt_cv_path_LDCXX+set}"; then
6386 lt_cv_path_LD=$lt_cv_path_LDCXX
6387 else
6388 $as_unset lt_cv_path_LD
6389 fi
6390 test -z "${LDCXX+set}" || LD=$LDCXX
6391 CC=${CXX-"c++"}
6392 CFLAGS=$CXXFLAGS
6393 compiler=$CC
6394 _LT_TAGVAR(compiler, $1)=$CC
6395 _LT_CC_BASENAME([$compiler])
6396
6397 if test -n "$compiler"; then
6398 # We don't want -fno-exception when compiling C++ code, so set the
6399 # no_builtin_flag separately
6400 if test yes = "$GXX"; then
6401 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6402 else
6403 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6404 fi
6405
6406 if test yes = "$GXX"; then
6407 # Set up default GNU C++ configuration
6408
6409 LT_PATH_LD
6410
6411 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6412 # archiving commands below assume that GNU ld is being used.
6413 if test yes = "$with_gnu_ld"; then
6414 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6415 _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'
6416
6417 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6418 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6419
6420 # If archive_cmds runs LD, not CC, wlarc should be empty
6421 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6422 # investigate it a little bit more. (MM)
6423 wlarc='$wl'
6424
6425 # ancient GNU ld didn't support --whole-archive et. al.
6426 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6427 $GREP 'no-whole-archive' > /dev/null; then
6428 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6429 else
6430 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6431 fi
6432 else
6433 with_gnu_ld=no
6434 wlarc=
6435
6436 # A generic and very simple default shared library creation
6437 # command for GNU C++ for the case where it uses the native
6438 # linker, instead of GNU ld. If possible, this setting should
6439 # overridden to take advantage of the native linker features on
6440 # the platform it is being used on.
6441 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6442 fi
6443
6444 # Commands to make compiler produce verbose output that lists
6445 # what "hidden" libraries, object files and flags are used when
6446 # linking a shared library.
6447 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
6448
6449 else
6450 GXX=no
6451 with_gnu_ld=no
6452 wlarc=
6453 fi
6454
6455 # PORTME: fill in a description of your system's C++ link characteristics
6456 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6457 _LT_TAGVAR(ld_shlibs, $1)=yes
6458 case $host_os in
6459 aix3*)
6460 # FIXME: insert proper C++ library support
6461 _LT_TAGVAR(ld_shlibs, $1)=no
6462 ;;
6463 aix[[4-9]]*)
6464 if test ia64 = "$host_cpu"; then
6465 # On IA64, the linker does run time linking by default, so we don't
6466 # have to do anything special.
6467 aix_use_runtimelinking=no
6468 exp_sym_flag='-Bexport'
6469 no_entry_flag=
6470 else
6471 aix_use_runtimelinking=no
6472
6473 # Test if we are trying to use run time linking or normal
6474 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6475 # have runtime linking enabled, and use it for executables.
6476 # For shared libraries, we enable/disable runtime linking
6477 # depending on the kind of the shared library created -
6478 # when "with_aix_soname,aix_use_runtimelinking" is:
6479 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6480 # "aix,yes" lib.so shared, rtl:yes, for executables
6481 # lib.a static archive
6482 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6483 # lib.a(lib.so.V) shared, rtl:no, for executables
6484 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6485 # lib.a(lib.so.V) shared, rtl:no
6486 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6487 # lib.a static archive
6488 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6489 for ld_flag in $LDFLAGS; do
6490 case $ld_flag in
6491 *-brtl*)
6492 aix_use_runtimelinking=yes
6493 break
6494 ;;
6495 esac
6496 done
6497 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6498 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6499 # so we don't have lib.a shared libs to link our executables.
6500 # We have to force runtime linking in this case.
6501 aix_use_runtimelinking=yes
6502 LDFLAGS="$LDFLAGS -Wl,-brtl"
6503 fi
6504 ;;
6505 esac
6506
6507 exp_sym_flag='-bexport'
6508 no_entry_flag='-bnoentry'
6509 fi
6510
6511 # When large executables or shared objects are built, AIX ld can
6512 # have problems creating the table of contents. If linking a library
6513 # or program results in "error TOC overflow" add -mminimal-toc to
6514 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6515 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6516
6517 _LT_TAGVAR(archive_cmds, $1)=''
6518 _LT_TAGVAR(hardcode_direct, $1)=yes
6519 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6520 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6521 _LT_TAGVAR(link_all_deplibs, $1)=yes
6522 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6523 case $with_aix_soname,$aix_use_runtimelinking in
6524 aix,*) ;; # no import file
6525 svr4,* | *,yes) # use import file
6526 # The Import File defines what to hardcode.
6527 _LT_TAGVAR(hardcode_direct, $1)=no
6528 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6529 ;;
6530 esac
6531
6532 if test yes = "$GXX"; then
6533 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6534 # We only want to do this on AIX 4.2 and lower, the check
6535 # below for broken collect2 doesn't work under 4.3+
6536 collect2name=`$CC -print-prog-name=collect2`
6537 if test -f "$collect2name" &&
6538 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6539 then
6540 # We have reworked collect2
6541 :
6542 else
6543 # We have old collect2
6544 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6545 # It fails to find uninstalled libraries when the uninstalled
6546 # path is not listed in the libpath. Setting hardcode_minus_L
6547 # to unsupported forces relinking
6548 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6549 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6550 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6551 fi
6552 esac
6553 shared_flag='-shared'
6554 if test yes = "$aix_use_runtimelinking"; then
6555 shared_flag=$shared_flag' $wl-G'
6556 fi
6557 # Need to ensure runtime linking is disabled for the traditional
6558 # shared library, or the linker may eventually find shared libraries
6559 # /with/ Import File - we do not want to mix them.
6560 shared_flag_aix='-shared'
6561 shared_flag_svr4='-shared $wl-G'
6562 else
6563 # not using gcc
6564 if test ia64 = "$host_cpu"; then
6565 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6566 # chokes on -Wl,-G. The following line is correct:
6567 shared_flag='-G'
6568 else
6569 if test yes = "$aix_use_runtimelinking"; then
6570 shared_flag='$wl-G'
6571 else
6572 shared_flag='$wl-bM:SRE'
6573 fi
6574 shared_flag_aix='$wl-bM:SRE'
6575 shared_flag_svr4='$wl-G'
6576 fi
6577 fi
6578
6579 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6580 # It seems that -bexpall does not export symbols beginning with
6581 # underscore (_), so it is better to generate a list of symbols to
6582 # export.
6583 _LT_TAGVAR(always_export_symbols, $1)=yes
6584 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6585 # Warning - without using the other runtime loading flags (-brtl),
6586 # -berok will link without error, but may produce a broken library.
6587 # The "-G" linker flag allows undefined symbols.
6588 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6589 # Determine the default libpath from the value encoded in an empty
6590 # executable.
6591 _LT_SYS_MODULE_PATH_AIX([$1])
6592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6593
6594 _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
6595 else
6596 if test ia64 = "$host_cpu"; then
6597 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6598 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6599 _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"
6600 else
6601 # Determine the default libpath from the value encoded in an
6602 # empty executable.
6603 _LT_SYS_MODULE_PATH_AIX([$1])
6604 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6605 # Warning - without using the other run time loading flags,
6606 # -berok will link without error, but may produce a broken library.
6607 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6608 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6609 if test yes = "$with_gnu_ld"; then
6610 # We only use this code for GNU lds that support --whole-archive.
6611 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6612 else
6613 # Exported symbols can be pulled into shared objects from archives
6614 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6615 fi
6616 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6617 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6618 # -brtl affects multiple linker settings, -berok does not and is overridden later
6619 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6620 if test svr4 != "$with_aix_soname"; then
6621 # This is similar to how AIX traditionally builds its shared
6622 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6623 _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'
6624 fi
6625 if test aix != "$with_aix_soname"; then
6626 _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'
6627 else
6628 # used by -dlpreopen to get the symbols
6629 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6630 fi
6631 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6632 fi
6633 fi
6634 ;;
6635
6636 beos*)
6637 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6638 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6639 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6640 # support --undefined. This deserves some investigation. FIXME
6641 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6642 else
6643 _LT_TAGVAR(ld_shlibs, $1)=no
6644 fi
6645 ;;
6646
6647 chorus*)
6648 case $cc_basename in
6649 *)
6650 # FIXME: insert proper C++ library support
6651 _LT_TAGVAR(ld_shlibs, $1)=no
6652 ;;
6653 esac
6654 ;;
6655
6656 cygwin* | mingw* | pw32* | cegcc*)
6657 case $GXX,$cc_basename in
6658 ,cl* | no,cl*)
6659 # Native MSVC
6660 # hardcode_libdir_flag_spec is actually meaningless, as there is
6661 # no search path for DLLs.
6662 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6663 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6664 _LT_TAGVAR(always_export_symbols, $1)=yes
6665 _LT_TAGVAR(file_list_spec, $1)='@'
6666 # Tell ltmain to make .lib files, not .a files.
6667 libext=lib
6668 # Tell ltmain to make .dll files, not .so files.
6669 shrext_cmds=.dll
6670 # FIXME: Setting linknames here is a bad hack.
6671 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6672 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6673 cp "$export_symbols" "$output_objdir/$soname.def";
6674 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6675 else
6676 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6677 fi~
6678 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6679 linknames='
6680 # The linker will not automatically build a static lib if we build a DLL.
6681 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6682 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6683 # Don't use ranlib
6684 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6685 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6686 lt_tool_outputfile="@TOOL_OUTPUT@"~
6687 case $lt_outputfile in
6688 *.exe|*.EXE) ;;
6689 *)
6690 lt_outputfile=$lt_outputfile.exe
6691 lt_tool_outputfile=$lt_tool_outputfile.exe
6692 ;;
6693 esac~
6694 func_to_tool_file "$lt_outputfile"~
6695 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6696 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6697 $RM "$lt_outputfile.manifest";
6698 fi'
6699 ;;
6700 *)
6701 # g++
6702 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6703 # as there is no search path for DLLs.
6704 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6705 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6706 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6707 _LT_TAGVAR(always_export_symbols, $1)=no
6708 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6709
6710 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6711 _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'
6712 # If the export-symbols file already is a .def file, use it as
6713 # is; otherwise, prepend EXPORTS...
6714 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6715 cp $export_symbols $output_objdir/$soname.def;
6716 else
6717 echo EXPORTS > $output_objdir/$soname.def;
6718 cat $export_symbols >> $output_objdir/$soname.def;
6719 fi~
6720 $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'
6721 else
6722 _LT_TAGVAR(ld_shlibs, $1)=no
6723 fi
6724 ;;
6725 esac
6726 ;;
6727 darwin* | rhapsody*)
6728 _LT_DARWIN_LINKER_FEATURES($1)
6729 ;;
6730
6731 os2*)
6732 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6733 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6734 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6735 shrext_cmds=.dll
6736 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6737 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6738 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6739 $ECHO EXPORTS >> $output_objdir/$libname.def~
6740 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6741 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6742 emximp -o $lib $output_objdir/$libname.def'
6743 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6744 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6745 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6746 $ECHO EXPORTS >> $output_objdir/$libname.def~
6747 prefix_cmds="$SED"~
6748 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6749 prefix_cmds="$prefix_cmds -e 1d";
6750 fi~
6751 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6752 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6753 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6754 emximp -o $lib $output_objdir/$libname.def'
6755 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6756 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6757 ;;
6758
6759 dgux*)
6760 case $cc_basename in
6761 ec++*)
6762 # FIXME: insert proper C++ library support
6763 _LT_TAGVAR(ld_shlibs, $1)=no
6764 ;;
6765 ghcx*)
6766 # Green Hills C++ Compiler
6767 # FIXME: insert proper C++ library support
6768 _LT_TAGVAR(ld_shlibs, $1)=no
6769 ;;
6770 *)
6771 # FIXME: insert proper C++ library support
6772 _LT_TAGVAR(ld_shlibs, $1)=no
6773 ;;
6774 esac
6775 ;;
6776
6777 freebsd2.*)
6778 # C++ shared libraries reported to be fairly broken before
6779 # switch to ELF
6780 _LT_TAGVAR(ld_shlibs, $1)=no
6781 ;;
6782
6783 freebsd-elf*)
6784 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6785 ;;
6786
6787 freebsd* | dragonfly*)
6788 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6789 # conventions
6790 _LT_TAGVAR(ld_shlibs, $1)=yes
6791 ;;
6792
6793 haiku*)
6794 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6795 _LT_TAGVAR(link_all_deplibs, $1)=yes
6796 ;;
6797
6798 hpux9*)
6799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6800 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6801 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6802 _LT_TAGVAR(hardcode_direct, $1)=yes
6803 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6804 # but as the default
6805 # location of the library.
6806
6807 case $cc_basename in
6808 CC*)
6809 # FIXME: insert proper C++ library support
6810 _LT_TAGVAR(ld_shlibs, $1)=no
6811 ;;
6812 aCC*)
6813 _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'
6814 # Commands to make compiler produce verbose output that lists
6815 # what "hidden" libraries, object files and flags are used when
6816 # linking a shared library.
6817 #
6818 # There doesn't appear to be a way to prevent this compiler from
6819 # explicitly linking system object files so we need to strip them
6820 # from the output so that they don't get included in the library
6821 # dependencies.
6822 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"'
6823 ;;
6824 *)
6825 if test yes = "$GXX"; then
6826 _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'
6827 else
6828 # FIXME: insert proper C++ library support
6829 _LT_TAGVAR(ld_shlibs, $1)=no
6830 fi
6831 ;;
6832 esac
6833 ;;
6834
6835 hpux10*|hpux11*)
6836 if test no = "$with_gnu_ld"; then
6837 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6838 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6839
6840 case $host_cpu in
6841 hppa*64*|ia64*)
6842 ;;
6843 *)
6844 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6845 ;;
6846 esac
6847 fi
6848 case $host_cpu in
6849 hppa*64*|ia64*)
6850 _LT_TAGVAR(hardcode_direct, $1)=no
6851 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6852 ;;
6853 *)
6854 _LT_TAGVAR(hardcode_direct, $1)=yes
6855 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6856 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6857 # but as the default
6858 # location of the library.
6859 ;;
6860 esac
6861
6862 case $cc_basename in
6863 CC*)
6864 # FIXME: insert proper C++ library support
6865 _LT_TAGVAR(ld_shlibs, $1)=no
6866 ;;
6867 aCC*)
6868 case $host_cpu in
6869 hppa*64*)
6870 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6871 ;;
6872 ia64*)
6873 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6874 ;;
6875 *)
6876 _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'
6877 ;;
6878 esac
6879 # Commands to make compiler produce verbose output that lists
6880 # what "hidden" libraries, object files and flags are used when
6881 # linking a shared library.
6882 #
6883 # There doesn't appear to be a way to prevent this compiler from
6884 # explicitly linking system object files so we need to strip them
6885 # from the output so that they don't get included in the library
6886 # dependencies.
6887 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"'
6888 ;;
6889 *)
6890 if test yes = "$GXX"; then
6891 if test no = "$with_gnu_ld"; then
6892 case $host_cpu in
6893 hppa*64*)
6894 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6895 ;;
6896 ia64*)
6897 _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'
6898 ;;
6899 *)
6900 _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'
6901 ;;
6902 esac
6903 fi
6904 else
6905 # FIXME: insert proper C++ library support
6906 _LT_TAGVAR(ld_shlibs, $1)=no
6907 fi
6908 ;;
6909 esac
6910 ;;
6911
6912 interix[[3-9]]*)
6913 _LT_TAGVAR(hardcode_direct, $1)=no
6914 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6915 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6916 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6917 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6918 # Instead, shared libraries are loaded at an image base (0x10000000 by
6919 # default) and relocated if they conflict, which is a slow very memory
6920 # consuming and fragmenting process. To avoid this, we pick a random,
6921 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6922 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6923 _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'
6924 _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'
6925 ;;
6926 irix5* | irix6*)
6927 case $cc_basename in
6928 CC*)
6929 # SGI C++
6930 _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'
6931
6932 # Archives containing C++ object files must be created using
6933 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6934 # necessary to make sure instantiated templates are included
6935 # in the archive.
6936 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6937 ;;
6938 *)
6939 if test yes = "$GXX"; then
6940 if test no = "$with_gnu_ld"; then
6941 _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'
6942 else
6943 _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'
6944 fi
6945 fi
6946 _LT_TAGVAR(link_all_deplibs, $1)=yes
6947 ;;
6948 esac
6949 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6950 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6951 _LT_TAGVAR(inherit_rpath, $1)=yes
6952 ;;
6953
6954 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6955 case $cc_basename in
6956 KCC*)
6957 # Kuck and Associates, Inc. (KAI) C++ Compiler
6958
6959 # KCC will only create a shared library if the output file
6960 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6961 # to its proper name (with version) after linking.
6962 _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'
6963 _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'
6964 # Commands to make compiler produce verbose output that lists
6965 # what "hidden" libraries, object files and flags are used when
6966 # linking a shared library.
6967 #
6968 # There doesn't appear to be a way to prevent this compiler from
6969 # explicitly linking system object files so we need to strip them
6970 # from the output so that they don't get included in the library
6971 # dependencies.
6972 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"'
6973
6974 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6975 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6976
6977 # Archives containing C++ object files must be created using
6978 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6979 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6980 ;;
6981 icpc* | ecpc* )
6982 # Intel C++
6983 with_gnu_ld=yes
6984 # version 8.0 and above of icpc choke on multiply defined symbols
6985 # if we add $predep_objects and $postdep_objects, however 7.1 and
6986 # earlier do not add the objects themselves.
6987 case `$CC -V 2>&1` in
6988 *"Version 7."*)
6989 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6990 _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'
6991 ;;
6992 *) # Version 8.0 or newer
6993 tmp_idyn=
6994 case $host_cpu in
6995 ia64*) tmp_idyn=' -i_dynamic';;
6996 esac
6997 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6998 _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'
6999 ;;
7000 esac
7001 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7002 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7003 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7004 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7005 ;;
7006 pgCC* | pgcpp*)
7007 # Portland Group C++ compiler
7008 case `$CC -V` in
7009 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7010 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7011 rm -rf $tpldir~
7012 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7013 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7014 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7015 rm -rf $tpldir~
7016 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7017 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7018 $RANLIB $oldlib'
7019 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7020 rm -rf $tpldir~
7021 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7022 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7023 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7024 rm -rf $tpldir~
7025 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7026 $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'
7027 ;;
7028 *) # Version 6 and above use weak symbols
7029 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7030 _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'
7031 ;;
7032 esac
7033
7034 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7035 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7036 _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'
7037 ;;
7038 cxx*)
7039 # Compaq C++
7040 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7041 _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'
7042
7043 runpath_var=LD_RUN_PATH
7044 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7045 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7046
7047 # Commands to make compiler produce verbose output that lists
7048 # what "hidden" libraries, object files and flags are used when
7049 # linking a shared library.
7050 #
7051 # There doesn't appear to be a way to prevent this compiler from
7052 # explicitly linking system object files so we need to strip them
7053 # from the output so that they don't get included in the library
7054 # dependencies.
7055 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'
7056 ;;
7057 xl* | mpixl* | bgxl*)
7058 # IBM XL 8.0 on PPC, with GNU ld
7059 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7060 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7061 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7062 if test yes = "$supports_anon_versioning"; then
7063 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7064 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7065 echo "local: *; };" >> $output_objdir/$libname.ver~
7066 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7067 fi
7068 ;;
7069 *)
7070 case `$CC -V 2>&1 | sed 5q` in
7071 *Sun\ C*)
7072 # Sun C++ 5.9
7073 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7074 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7075 _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'
7076 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7077 _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'
7078 _LT_TAGVAR(compiler_needs_object, $1)=yes
7079
7080 # Not sure whether something based on
7081 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7082 # would be better.
7083 output_verbose_link_cmd='func_echo_all'
7084
7085 # Archives containing C++ object files must be created using
7086 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7087 # necessary to make sure instantiated templates are included
7088 # in the archive.
7089 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7090 ;;
7091 esac
7092 ;;
7093 esac
7094 ;;
7095
7096 lynxos*)
7097 # FIXME: insert proper C++ library support
7098 _LT_TAGVAR(ld_shlibs, $1)=no
7099 ;;
7100
7101 m88k*)
7102 # FIXME: insert proper C++ library support
7103 _LT_TAGVAR(ld_shlibs, $1)=no
7104 ;;
7105
7106 mvs*)
7107 case $cc_basename in
7108 cxx*)
7109 # FIXME: insert proper C++ library support
7110 _LT_TAGVAR(ld_shlibs, $1)=no
7111 ;;
7112 *)
7113 # FIXME: insert proper C++ library support
7114 _LT_TAGVAR(ld_shlibs, $1)=no
7115 ;;
7116 esac
7117 ;;
7118
7119 netbsd*)
7120 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7121 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7122 wlarc=
7123 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7124 _LT_TAGVAR(hardcode_direct, $1)=yes
7125 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7126 fi
7127 # Workaround some broken pre-1.5 toolchains
7128 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7129 ;;
7130
7131 *nto* | *qnx*)
7132 _LT_TAGVAR(ld_shlibs, $1)=yes
7133 ;;
7134
7135 openbsd* | bitrig*)
7136 if test -f /usr/libexec/ld.so; then
7137 _LT_TAGVAR(hardcode_direct, $1)=yes
7138 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7139 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7140 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7141 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7142 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7143 _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'
7144 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7145 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7146 fi
7147 output_verbose_link_cmd=func_echo_all
7148 else
7149 _LT_TAGVAR(ld_shlibs, $1)=no
7150 fi
7151 ;;
7152
7153 osf3* | osf4* | osf5*)
7154 case $cc_basename in
7155 KCC*)
7156 # Kuck and Associates, Inc. (KAI) C++ Compiler
7157
7158 # KCC will only create a shared library if the output file
7159 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7160 # to its proper name (with version) after linking.
7161 _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'
7162
7163 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7164 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7165
7166 # Archives containing C++ object files must be created using
7167 # the KAI C++ compiler.
7168 case $host in
7169 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7170 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7171 esac
7172 ;;
7173 RCC*)
7174 # Rational C++ 2.4.1
7175 # FIXME: insert proper C++ library support
7176 _LT_TAGVAR(ld_shlibs, $1)=no
7177 ;;
7178 cxx*)
7179 case $host in
7180 osf3*)
7181 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7182 _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'
7183 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7184 ;;
7185 *)
7186 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7187 _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'
7188 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7189 echo "-hidden">> $lib.exp~
7190 $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~
7191 $RM $lib.exp'
7192 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7193 ;;
7194 esac
7195
7196 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7197
7198 # Commands to make compiler produce verbose output that lists
7199 # what "hidden" libraries, object files and flags are used when
7200 # linking a shared library.
7201 #
7202 # There doesn't appear to be a way to prevent this compiler from
7203 # explicitly linking system object files so we need to strip them
7204 # from the output so that they don't get included in the library
7205 # dependencies.
7206 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"'
7207 ;;
7208 *)
7209 if test yes,no = "$GXX,$with_gnu_ld"; then
7210 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7211 case $host in
7212 osf3*)
7213 _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'
7214 ;;
7215 *)
7216 _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'
7217 ;;
7218 esac
7219
7220 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7221 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7222
7223 # Commands to make compiler produce verbose output that lists
7224 # what "hidden" libraries, object files and flags are used when
7225 # linking a shared library.
7226 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7227
7228 else
7229 # FIXME: insert proper C++ library support
7230 _LT_TAGVAR(ld_shlibs, $1)=no
7231 fi
7232 ;;
7233 esac
7234 ;;
7235
7236 psos*)
7237 # FIXME: insert proper C++ library support
7238 _LT_TAGVAR(ld_shlibs, $1)=no
7239 ;;
7240
7241 sunos4*)
7242 case $cc_basename in
7243 CC*)
7244 # Sun C++ 4.x
7245 # FIXME: insert proper C++ library support
7246 _LT_TAGVAR(ld_shlibs, $1)=no
7247 ;;
7248 lcc*)
7249 # Lucid
7250 # FIXME: insert proper C++ library support
7251 _LT_TAGVAR(ld_shlibs, $1)=no
7252 ;;
7253 *)
7254 # FIXME: insert proper C++ library support
7255 _LT_TAGVAR(ld_shlibs, $1)=no
7256 ;;
7257 esac
7258 ;;
7259
7260 solaris*)
7261 case $cc_basename in
7262 CC* | sunCC*)
7263 # Sun C++ 4.2, 5.x and Centerline C++
7264 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7265 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7266 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7267 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7268 $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'
7269
7270 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7271 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7272 case $host_os in
7273 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7274 *)
7275 # The compiler driver will combine and reorder linker options,
7276 # but understands '-z linker_flag'.
7277 # Supported since Solaris 2.6 (maybe 2.5.1?)
7278 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7279 ;;
7280 esac
7281 _LT_TAGVAR(link_all_deplibs, $1)=yes
7282
7283 output_verbose_link_cmd='func_echo_all'
7284
7285 # Archives containing C++ object files must be created using
7286 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7287 # necessary to make sure instantiated templates are included
7288 # in the archive.
7289 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7290 ;;
7291 gcx*)
7292 # Green Hills C++ Compiler
7293 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7294
7295 # The C++ compiler must be used to create the archive.
7296 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7297 ;;
7298 *)
7299 # GNU C++ compiler with Solaris linker
7300 if test yes,no = "$GXX,$with_gnu_ld"; then
7301 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7302 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7303 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7304 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7305 $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'
7306
7307 # Commands to make compiler produce verbose output that lists
7308 # what "hidden" libraries, object files and flags are used when
7309 # linking a shared library.
7310 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7311 else
7312 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7313 # platform.
7314 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7315 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7316 $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'
7317
7318 # Commands to make compiler produce verbose output that lists
7319 # what "hidden" libraries, object files and flags are used when
7320 # linking a shared library.
7321 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7322 fi
7323
7324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7325 case $host_os in
7326 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7327 *)
7328 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7329 ;;
7330 esac
7331 fi
7332 ;;
7333 esac
7334 ;;
7335
7336 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7337 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7338 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7339 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7340 runpath_var='LD_RUN_PATH'
7341
7342 case $cc_basename in
7343 CC*)
7344 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7345 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7346 ;;
7347 *)
7348 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7349 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7350 ;;
7351 esac
7352 ;;
7353
7354 sysv5* | sco3.2v5* | sco5v6*)
7355 # Note: We CANNOT use -z defs as we might desire, because we do not
7356 # link with -lc, and that would cause any symbols used from libc to
7357 # always be unresolved, which means just about no library would
7358 # ever link correctly. If we're not using GNU ld we use -z text
7359 # though, which does catch some bad symbols but isn't as heavy-handed
7360 # as -z defs.
7361 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7362 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7363 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7364 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7365 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7366 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7367 _LT_TAGVAR(link_all_deplibs, $1)=yes
7368 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7369 runpath_var='LD_RUN_PATH'
7370
7371 case $cc_basename in
7372 CC*)
7373 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7374 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7375 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7376 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7377 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7378 '"$_LT_TAGVAR(reload_cmds, $1)"
7379 ;;
7380 *)
7381 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7382 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7383 ;;
7384 esac
7385 ;;
7386
7387 tandem*)
7388 case $cc_basename in
7389 NCC*)
7390 # NonStop-UX NCC 3.20
7391 # FIXME: insert proper C++ library support
7392 _LT_TAGVAR(ld_shlibs, $1)=no
7393 ;;
7394 *)
7395 # FIXME: insert proper C++ library support
7396 _LT_TAGVAR(ld_shlibs, $1)=no
7397 ;;
7398 esac
7399 ;;
7400
7401 vxworks*)
7402 # FIXME: insert proper C++ library support
7403 _LT_TAGVAR(ld_shlibs, $1)=no
7404 ;;
7405
7406 *)
7407 # FIXME: insert proper C++ library support
7408 _LT_TAGVAR(ld_shlibs, $1)=no
7409 ;;
7410 esac
7411
7412 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7413 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7414
7415 _LT_TAGVAR(GCC, $1)=$GXX
7416 _LT_TAGVAR(LD, $1)=$LD
7417
7418 ## CAVEAT EMPTOR:
7419 ## There is no encapsulation within the following macros, do not change
7420 ## the running order or otherwise move them around unless you know exactly
7421 ## what you are doing...
7422 _LT_SYS_HIDDEN_LIBDEPS($1)
7423 _LT_COMPILER_PIC($1)
7424 _LT_COMPILER_C_O($1)
7425 _LT_COMPILER_FILE_LOCKS($1)
7426 _LT_LINKER_SHLIBS($1)
7427 _LT_SYS_DYNAMIC_LINKER($1)
7428 _LT_LINKER_HARDCODE_LIBPATH($1)
7429
7430 _LT_CONFIG($1)
7431 fi # test -n "$compiler"
7432
7433 CC=$lt_save_CC
7434 CFLAGS=$lt_save_CFLAGS
7435 LDCXX=$LD
7436 LD=$lt_save_LD
7437 GCC=$lt_save_GCC
7438 with_gnu_ld=$lt_save_with_gnu_ld
7439 lt_cv_path_LDCXX=$lt_cv_path_LD
7440 lt_cv_path_LD=$lt_save_path_LD
7441 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7442 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7443 fi # test yes != "$_lt_caught_CXX_error"
7444
7445 AC_LANG_POP
7446 ])# _LT_LANG_CXX_CONFIG
7447
7448
7449 # _LT_FUNC_STRIPNAME_CNF
7450 # ----------------------
7451 # func_stripname_cnf prefix suffix name
7452 # strip PREFIX and SUFFIX off of NAME.
7453 # PREFIX and SUFFIX must not contain globbing or regex special
7454 # characters, hashes, percent signs, but SUFFIX may contain a leading
7455 # dot (in which case that matches only a dot).
7456 #
7457 # This function is identical to the (non-XSI) version of func_stripname,
7458 # except this one can be used by m4 code that may be executed by configure,
7459 # rather than the libtool script.
7460 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7461 AC_REQUIRE([_LT_DECL_SED])
7462 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7463 func_stripname_cnf ()
7464 {
7465 case @S|@2 in
7466 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7467 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7468 esac
7469 } # func_stripname_cnf
7470 ])# _LT_FUNC_STRIPNAME_CNF
7471
7472
7473 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7474 # ---------------------------------
7475 # Figure out "hidden" library dependencies from verbose
7476 # compiler output when linking a shared library.
7477 # Parse the compiler output and extract the necessary
7478 # objects, libraries and library flags.
7479 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7480 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7481 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7482 # Dependencies to place before and after the object being linked:
7483 _LT_TAGVAR(predep_objects, $1)=
7484 _LT_TAGVAR(postdep_objects, $1)=
7485 _LT_TAGVAR(predeps, $1)=
7486 _LT_TAGVAR(postdeps, $1)=
7487 _LT_TAGVAR(compiler_lib_search_path, $1)=
7488
7489 dnl we can't use the lt_simple_compile_test_code here,
7490 dnl because it contains code intended for an executable,
7491 dnl not a library. It's possible we should let each
7492 dnl tag define a new lt_????_link_test_code variable,
7493 dnl but it's only used here...
7494 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7495 int a;
7496 void foo (void) { a = 0; }
7497 _LT_EOF
7498 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7499 class Foo
7500 {
7501 public:
7502 Foo (void) { a = 0; }
7503 private:
7504 int a;
7505 };
7506 _LT_EOF
7507 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7508 subroutine foo
7509 implicit none
7510 integer*4 a
7511 a=0
7512 return
7513 end
7514 _LT_EOF
7515 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7516 subroutine foo
7517 implicit none
7518 integer a
7519 a=0
7520 return
7521 end
7522 _LT_EOF
7523 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7524 public class foo {
7525 private int a;
7526 public void bar (void) {
7527 a = 0;
7528 }
7529 };
7530 _LT_EOF
7531 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7532 package foo
7533 func foo() {
7534 }
7535 _LT_EOF
7536 ])
7537
7538 _lt_libdeps_save_CFLAGS=$CFLAGS
7539 case "$CC $CFLAGS " in #(
7540 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7541 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7542 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7543 esac
7544
7545 dnl Parse the compiler output and extract the necessary
7546 dnl objects, libraries and library flags.
7547 if AC_TRY_EVAL(ac_compile); then
7548 # Parse the compiler output and extract the necessary
7549 # objects, libraries and library flags.
7550
7551 # Sentinel used to keep track of whether or not we are before
7552 # the conftest object file.
7553 pre_test_object_deps_done=no
7554
7555 for p in `eval "$output_verbose_link_cmd"`; do
7556 case $prev$p in
7557
7558 -L* | -R* | -l*)
7559 # Some compilers place space between "-{L,R}" and the path.
7560 # Remove the space.
7561 if test x-L = "$p" ||
7562 test x-R = "$p"; then
7563 prev=$p
7564 continue
7565 fi
7566
7567 # Expand the sysroot to ease extracting the directories later.
7568 if test -z "$prev"; then
7569 case $p in
7570 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7571 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7572 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7573 esac
7574 fi
7575 case $p in
7576 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7577 esac
7578 if test no = "$pre_test_object_deps_done"; then
7579 case $prev in
7580 -L | -R)
7581 # Internal compiler library paths should come after those
7582 # provided the user. The postdeps already come after the
7583 # user supplied libs so there is no need to process them.
7584 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7585 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7586 else
7587 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7588 fi
7589 ;;
7590 # The "-l" case would never come before the object being
7591 # linked, so don't bother handling this case.
7592 esac
7593 else
7594 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7595 _LT_TAGVAR(postdeps, $1)=$prev$p
7596 else
7597 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7598 fi
7599 fi
7600 prev=
7601 ;;
7602
7603 *.lto.$objext) ;; # Ignore GCC LTO objects
7604 *.$objext)
7605 # This assumes that the test object file only shows up
7606 # once in the compiler output.
7607 if test "$p" = "conftest.$objext"; then
7608 pre_test_object_deps_done=yes
7609 continue
7610 fi
7611
7612 if test no = "$pre_test_object_deps_done"; then
7613 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7614 _LT_TAGVAR(predep_objects, $1)=$p
7615 else
7616 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7617 fi
7618 else
7619 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7620 _LT_TAGVAR(postdep_objects, $1)=$p
7621 else
7622 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7623 fi
7624 fi
7625 ;;
7626
7627 *) ;; # Ignore the rest.
7628
7629 esac
7630 done
7631
7632 # Clean up.
7633 rm -f a.out a.exe
7634 else
7635 echo "libtool.m4: error: problem compiling $1 test program"
7636 fi
7637
7638 $RM -f confest.$objext
7639 CFLAGS=$_lt_libdeps_save_CFLAGS
7640
7641 # PORTME: override above test on systems where it is broken
7642 m4_if([$1], [CXX],
7643 [case $host_os in
7644 interix[[3-9]]*)
7645 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7646 # hack all around it, let's just trust "g++" to DTRT.
7647 _LT_TAGVAR(predep_objects,$1)=
7648 _LT_TAGVAR(postdep_objects,$1)=
7649 _LT_TAGVAR(postdeps,$1)=
7650 ;;
7651 esac
7652 ])
7653
7654 case " $_LT_TAGVAR(postdeps, $1) " in
7655 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7656 esac
7657 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7658 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7659 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7660 fi
7661 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7662 [The directories searched by this compiler when creating a shared library])
7663 _LT_TAGDECL([], [predep_objects], [1],
7664 [Dependencies to place before and after the objects being linked to
7665 create a shared library])
7666 _LT_TAGDECL([], [postdep_objects], [1])
7667 _LT_TAGDECL([], [predeps], [1])
7668 _LT_TAGDECL([], [postdeps], [1])
7669 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7670 [The library search path used internally by the compiler when linking
7671 a shared library])
7672 ])# _LT_SYS_HIDDEN_LIBDEPS
7673
7674
7675 # _LT_LANG_F77_CONFIG([TAG])
7676 # --------------------------
7677 # Ensure that the configuration variables for a Fortran 77 compiler are
7678 # suitably defined. These variables are subsequently used by _LT_CONFIG
7679 # to write the compiler configuration to 'libtool'.
7680 m4_defun([_LT_LANG_F77_CONFIG],
7681 [AC_LANG_PUSH(Fortran 77)
7682 if test -z "$F77" || test no = "$F77"; then
7683 _lt_disable_F77=yes
7684 fi
7685
7686 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7687 _LT_TAGVAR(allow_undefined_flag, $1)=
7688 _LT_TAGVAR(always_export_symbols, $1)=no
7689 _LT_TAGVAR(archive_expsym_cmds, $1)=
7690 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7691 _LT_TAGVAR(hardcode_direct, $1)=no
7692 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7693 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7694 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7695 _LT_TAGVAR(hardcode_minus_L, $1)=no
7696 _LT_TAGVAR(hardcode_automatic, $1)=no
7697 _LT_TAGVAR(inherit_rpath, $1)=no
7698 _LT_TAGVAR(module_cmds, $1)=
7699 _LT_TAGVAR(module_expsym_cmds, $1)=
7700 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7701 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7702 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7703 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7704 _LT_TAGVAR(no_undefined_flag, $1)=
7705 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7706 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7707
7708 # Source file extension for f77 test sources.
7709 ac_ext=f
7710
7711 # Object file extension for compiled f77 test sources.
7712 objext=o
7713 _LT_TAGVAR(objext, $1)=$objext
7714
7715 # No sense in running all these tests if we already determined that
7716 # the F77 compiler isn't working. Some variables (like enable_shared)
7717 # are currently assumed to apply to all compilers on this platform,
7718 # and will be corrupted by setting them based on a non-working compiler.
7719 if test yes != "$_lt_disable_F77"; then
7720 # Code to be used in simple compile tests
7721 lt_simple_compile_test_code="\
7722 subroutine t
7723 return
7724 end
7725 "
7726
7727 # Code to be used in simple link tests
7728 lt_simple_link_test_code="\
7729 program t
7730 end
7731 "
7732
7733 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7734 _LT_TAG_COMPILER
7735
7736 # save warnings/boilerplate of simple test code
7737 _LT_COMPILER_BOILERPLATE
7738 _LT_LINKER_BOILERPLATE
7739
7740 # Allow CC to be a program name with arguments.
7741 lt_save_CC=$CC
7742 lt_save_GCC=$GCC
7743 lt_save_CFLAGS=$CFLAGS
7744 CC=${F77-"f77"}
7745 CFLAGS=$FFLAGS
7746 compiler=$CC
7747 _LT_TAGVAR(compiler, $1)=$CC
7748 _LT_CC_BASENAME([$compiler])
7749 GCC=$G77
7750 if test -n "$compiler"; then
7751 AC_MSG_CHECKING([if libtool supports shared libraries])
7752 AC_MSG_RESULT([$can_build_shared])
7753
7754 AC_MSG_CHECKING([whether to build shared libraries])
7755 test no = "$can_build_shared" && enable_shared=no
7756
7757 # On AIX, shared libraries and static libraries use the same namespace, and
7758 # are all built from PIC.
7759 case $host_os in
7760 aix3*)
7761 test yes = "$enable_shared" && enable_static=no
7762 if test -n "$RANLIB"; then
7763 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7764 postinstall_cmds='$RANLIB $lib'
7765 fi
7766 ;;
7767 aix[[4-9]]*)
7768 if test ia64 != "$host_cpu"; then
7769 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7770 yes,aix,yes) ;; # shared object as lib.so file only
7771 yes,svr4,*) ;; # shared object as lib.so archive member only
7772 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7773 esac
7774 fi
7775 ;;
7776 esac
7777 AC_MSG_RESULT([$enable_shared])
7778
7779 AC_MSG_CHECKING([whether to build static libraries])
7780 # Make sure either enable_shared or enable_static is yes.
7781 test yes = "$enable_shared" || enable_static=yes
7782 AC_MSG_RESULT([$enable_static])
7783
7784 _LT_TAGVAR(GCC, $1)=$G77
7785 _LT_TAGVAR(LD, $1)=$LD
7786
7787 ## CAVEAT EMPTOR:
7788 ## There is no encapsulation within the following macros, do not change
7789 ## the running order or otherwise move them around unless you know exactly
7790 ## what you are doing...
7791 _LT_COMPILER_PIC($1)
7792 _LT_COMPILER_C_O($1)
7793 _LT_COMPILER_FILE_LOCKS($1)
7794 _LT_LINKER_SHLIBS($1)
7795 _LT_SYS_DYNAMIC_LINKER($1)
7796 _LT_LINKER_HARDCODE_LIBPATH($1)
7797
7798 _LT_CONFIG($1)
7799 fi # test -n "$compiler"
7800
7801 GCC=$lt_save_GCC
7802 CC=$lt_save_CC
7803 CFLAGS=$lt_save_CFLAGS
7804 fi # test yes != "$_lt_disable_F77"
7805
7806 AC_LANG_POP
7807 ])# _LT_LANG_F77_CONFIG
7808
7809
7810 # _LT_LANG_FC_CONFIG([TAG])
7811 # -------------------------
7812 # Ensure that the configuration variables for a Fortran compiler are
7813 # suitably defined. These variables are subsequently used by _LT_CONFIG
7814 # to write the compiler configuration to 'libtool'.
7815 m4_defun([_LT_LANG_FC_CONFIG],
7816 [AC_LANG_PUSH(Fortran)
7817
7818 if test -z "$FC" || test no = "$FC"; then
7819 _lt_disable_FC=yes
7820 fi
7821
7822 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7823 _LT_TAGVAR(allow_undefined_flag, $1)=
7824 _LT_TAGVAR(always_export_symbols, $1)=no
7825 _LT_TAGVAR(archive_expsym_cmds, $1)=
7826 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7827 _LT_TAGVAR(hardcode_direct, $1)=no
7828 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7830 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7831 _LT_TAGVAR(hardcode_minus_L, $1)=no
7832 _LT_TAGVAR(hardcode_automatic, $1)=no
7833 _LT_TAGVAR(inherit_rpath, $1)=no
7834 _LT_TAGVAR(module_cmds, $1)=
7835 _LT_TAGVAR(module_expsym_cmds, $1)=
7836 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7837 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7838 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7839 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7840 _LT_TAGVAR(no_undefined_flag, $1)=
7841 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7842 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7843
7844 # Source file extension for fc test sources.
7845 ac_ext=${ac_fc_srcext-f}
7846
7847 # Object file extension for compiled fc test sources.
7848 objext=o
7849 _LT_TAGVAR(objext, $1)=$objext
7850
7851 # No sense in running all these tests if we already determined that
7852 # the FC compiler isn't working. Some variables (like enable_shared)
7853 # are currently assumed to apply to all compilers on this platform,
7854 # and will be corrupted by setting them based on a non-working compiler.
7855 if test yes != "$_lt_disable_FC"; then
7856 # Code to be used in simple compile tests
7857 lt_simple_compile_test_code="\
7858 subroutine t
7859 return
7860 end
7861 "
7862
7863 # Code to be used in simple link tests
7864 lt_simple_link_test_code="\
7865 program t
7866 end
7867 "
7868
7869 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7870 _LT_TAG_COMPILER
7871
7872 # save warnings/boilerplate of simple test code
7873 _LT_COMPILER_BOILERPLATE
7874 _LT_LINKER_BOILERPLATE
7875
7876 # Allow CC to be a program name with arguments.
7877 lt_save_CC=$CC
7878 lt_save_GCC=$GCC
7879 lt_save_CFLAGS=$CFLAGS
7880 CC=${FC-"f95"}
7881 CFLAGS=$FCFLAGS
7882 compiler=$CC
7883 GCC=$ac_cv_fc_compiler_gnu
7884
7885 _LT_TAGVAR(compiler, $1)=$CC
7886 _LT_CC_BASENAME([$compiler])
7887
7888 if test -n "$compiler"; then
7889 AC_MSG_CHECKING([if libtool supports shared libraries])
7890 AC_MSG_RESULT([$can_build_shared])
7891
7892 AC_MSG_CHECKING([whether to build shared libraries])
7893 test no = "$can_build_shared" && enable_shared=no
7894
7895 # On AIX, shared libraries and static libraries use the same namespace, and
7896 # are all built from PIC.
7897 case $host_os in
7898 aix3*)
7899 test yes = "$enable_shared" && enable_static=no
7900 if test -n "$RANLIB"; then
7901 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7902 postinstall_cmds='$RANLIB $lib'
7903 fi
7904 ;;
7905 aix[[4-9]]*)
7906 if test ia64 != "$host_cpu"; then
7907 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7908 yes,aix,yes) ;; # shared object as lib.so file only
7909 yes,svr4,*) ;; # shared object as lib.so archive member only
7910 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7911 esac
7912 fi
7913 ;;
7914 esac
7915 AC_MSG_RESULT([$enable_shared])
7916
7917 AC_MSG_CHECKING([whether to build static libraries])
7918 # Make sure either enable_shared or enable_static is yes.
7919 test yes = "$enable_shared" || enable_static=yes
7920 AC_MSG_RESULT([$enable_static])
7921
7922 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7923 _LT_TAGVAR(LD, $1)=$LD
7924
7925 ## CAVEAT EMPTOR:
7926 ## There is no encapsulation within the following macros, do not change
7927 ## the running order or otherwise move them around unless you know exactly
7928 ## what you are doing...
7929 _LT_SYS_HIDDEN_LIBDEPS($1)
7930 _LT_COMPILER_PIC($1)
7931 _LT_COMPILER_C_O($1)
7932 _LT_COMPILER_FILE_LOCKS($1)
7933 _LT_LINKER_SHLIBS($1)
7934 _LT_SYS_DYNAMIC_LINKER($1)
7935 _LT_LINKER_HARDCODE_LIBPATH($1)
7936
7937 _LT_CONFIG($1)
7938 fi # test -n "$compiler"
7939
7940 GCC=$lt_save_GCC
7941 CC=$lt_save_CC
7942 CFLAGS=$lt_save_CFLAGS
7943 fi # test yes != "$_lt_disable_FC"
7944
7945 AC_LANG_POP
7946 ])# _LT_LANG_FC_CONFIG
7947
7948
7949 # _LT_LANG_GCJ_CONFIG([TAG])
7950 # --------------------------
7951 # Ensure that the configuration variables for the GNU Java Compiler compiler
7952 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7953 # to write the compiler configuration to 'libtool'.
7954 m4_defun([_LT_LANG_GCJ_CONFIG],
7955 [AC_REQUIRE([LT_PROG_GCJ])dnl
7956 AC_LANG_SAVE
7957
7958 # Source file extension for Java test sources.
7959 ac_ext=java
7960
7961 # Object file extension for compiled Java test sources.
7962 objext=o
7963 _LT_TAGVAR(objext, $1)=$objext
7964
7965 # Code to be used in simple compile tests
7966 lt_simple_compile_test_code="class foo {}"
7967
7968 # Code to be used in simple link tests
7969 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7970
7971 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7972 _LT_TAG_COMPILER
7973
7974 # save warnings/boilerplate of simple test code
7975 _LT_COMPILER_BOILERPLATE
7976 _LT_LINKER_BOILERPLATE
7977
7978 # Allow CC to be a program name with arguments.
7979 lt_save_CC=$CC
7980 lt_save_CFLAGS=$CFLAGS
7981 lt_save_GCC=$GCC
7982 GCC=yes
7983 CC=${GCJ-"gcj"}
7984 CFLAGS=$GCJFLAGS
7985 compiler=$CC
7986 _LT_TAGVAR(compiler, $1)=$CC
7987 _LT_TAGVAR(LD, $1)=$LD
7988 _LT_CC_BASENAME([$compiler])
7989
7990 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7991 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7992
7993 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7994 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7995 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7996
7997 ## CAVEAT EMPTOR:
7998 ## There is no encapsulation within the following macros, do not change
7999 ## the running order or otherwise move them around unless you know exactly
8000 ## what you are doing...
8001 if test -n "$compiler"; then
8002 _LT_COMPILER_NO_RTTI($1)
8003 _LT_COMPILER_PIC($1)
8004 _LT_COMPILER_C_O($1)
8005 _LT_COMPILER_FILE_LOCKS($1)
8006 _LT_LINKER_SHLIBS($1)
8007 _LT_LINKER_HARDCODE_LIBPATH($1)
8008
8009 _LT_CONFIG($1)
8010 fi
8011
8012 AC_LANG_RESTORE
8013
8014 GCC=$lt_save_GCC
8015 CC=$lt_save_CC
8016 CFLAGS=$lt_save_CFLAGS
8017 ])# _LT_LANG_GCJ_CONFIG
8018
8019
8020 # _LT_LANG_GO_CONFIG([TAG])
8021 # --------------------------
8022 # Ensure that the configuration variables for the GNU Go compiler
8023 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8024 # to write the compiler configuration to 'libtool'.
8025 m4_defun([_LT_LANG_GO_CONFIG],
8026 [AC_REQUIRE([LT_PROG_GO])dnl
8027 AC_LANG_SAVE
8028
8029 # Source file extension for Go test sources.
8030 ac_ext=go
8031
8032 # Object file extension for compiled Go test sources.
8033 objext=o
8034 _LT_TAGVAR(objext, $1)=$objext
8035
8036 # Code to be used in simple compile tests
8037 lt_simple_compile_test_code="package main; func main() { }"
8038
8039 # Code to be used in simple link tests
8040 lt_simple_link_test_code='package main; func main() { }'
8041
8042 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8043 _LT_TAG_COMPILER
8044
8045 # save warnings/boilerplate of simple test code
8046 _LT_COMPILER_BOILERPLATE
8047 _LT_LINKER_BOILERPLATE
8048
8049 # Allow CC to be a program name with arguments.
8050 lt_save_CC=$CC
8051 lt_save_CFLAGS=$CFLAGS
8052 lt_save_GCC=$GCC
8053 GCC=yes
8054 CC=${GOC-"gccgo"}
8055 CFLAGS=$GOFLAGS
8056 compiler=$CC
8057 _LT_TAGVAR(compiler, $1)=$CC
8058 _LT_TAGVAR(LD, $1)=$LD
8059 _LT_CC_BASENAME([$compiler])
8060
8061 # Go did not exist at the time GCC didn't implicitly link libc in.
8062 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8063
8064 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8065 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8066 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8067
8068 ## CAVEAT EMPTOR:
8069 ## There is no encapsulation within the following macros, do not change
8070 ## the running order or otherwise move them around unless you know exactly
8071 ## what you are doing...
8072 if test -n "$compiler"; then
8073 _LT_COMPILER_NO_RTTI($1)
8074 _LT_COMPILER_PIC($1)
8075 _LT_COMPILER_C_O($1)
8076 _LT_COMPILER_FILE_LOCKS($1)
8077 _LT_LINKER_SHLIBS($1)
8078 _LT_LINKER_HARDCODE_LIBPATH($1)
8079
8080 _LT_CONFIG($1)
8081 fi
8082
8083 AC_LANG_RESTORE
8084
8085 GCC=$lt_save_GCC
8086 CC=$lt_save_CC
8087 CFLAGS=$lt_save_CFLAGS
8088 ])# _LT_LANG_GO_CONFIG
8089
8090
8091 # _LT_LANG_RC_CONFIG([TAG])
8092 # -------------------------
8093 # Ensure that the configuration variables for the Windows resource compiler
8094 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8095 # to write the compiler configuration to 'libtool'.
8096 m4_defun([_LT_LANG_RC_CONFIG],
8097 [AC_REQUIRE([LT_PROG_RC])dnl
8098 AC_LANG_SAVE
8099
8100 # Source file extension for RC test sources.
8101 ac_ext=rc
8102
8103 # Object file extension for compiled RC test sources.
8104 objext=o
8105 _LT_TAGVAR(objext, $1)=$objext
8106
8107 # Code to be used in simple compile tests
8108 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8109
8110 # Code to be used in simple link tests
8111 lt_simple_link_test_code=$lt_simple_compile_test_code
8112
8113 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8114 _LT_TAG_COMPILER
8115
8116 # save warnings/boilerplate of simple test code
8117 _LT_COMPILER_BOILERPLATE
8118 _LT_LINKER_BOILERPLATE
8119
8120 # Allow CC to be a program name with arguments.
8121 lt_save_CC=$CC
8122 lt_save_CFLAGS=$CFLAGS
8123 lt_save_GCC=$GCC
8124 GCC=
8125 CC=${RC-"windres"}
8126 CFLAGS=
8127 compiler=$CC
8128 _LT_TAGVAR(compiler, $1)=$CC
8129 _LT_CC_BASENAME([$compiler])
8130 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8131
8132 if test -n "$compiler"; then
8133 :
8134 _LT_CONFIG($1)
8135 fi
8136
8137 GCC=$lt_save_GCC
8138 AC_LANG_RESTORE
8139 CC=$lt_save_CC
8140 CFLAGS=$lt_save_CFLAGS
8141 ])# _LT_LANG_RC_CONFIG
8142
8143
8144 # LT_PROG_GCJ
8145 # -----------
8146 AC_DEFUN([LT_PROG_GCJ],
8147 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8148 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8149 [AC_CHECK_TOOL(GCJ, gcj,)
8150 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8151 AC_SUBST(GCJFLAGS)])])[]dnl
8152 ])
8153
8154 # Old name:
8155 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8156 dnl aclocal-1.4 backwards compatibility:
8157 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8158
8159
8160 # LT_PROG_GO
8161 # ----------
8162 AC_DEFUN([LT_PROG_GO],
8163 [AC_CHECK_TOOL(GOC, gccgo,)
8164 ])
8165
8166
8167 # LT_PROG_RC
8168 # ----------
8169 AC_DEFUN([LT_PROG_RC],
8170 [AC_CHECK_TOOL(RC, windres,)
8171 ])
8172
8173 # Old name:
8174 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8175 dnl aclocal-1.4 backwards compatibility:
8176 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8177
8178
8179 # _LT_DECL_EGREP
8180 # --------------
8181 # If we don't have a new enough Autoconf to choose the best grep
8182 # available, choose the one first in the user's PATH.
8183 m4_defun([_LT_DECL_EGREP],
8184 [AC_REQUIRE([AC_PROG_EGREP])dnl
8185 AC_REQUIRE([AC_PROG_FGREP])dnl
8186 test -z "$GREP" && GREP=grep
8187 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8188 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8189 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8190 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8191 AC_SUBST([GREP])
8192 ])
8193
8194
8195 # _LT_DECL_OBJDUMP
8196 # --------------
8197 # If we don't have a new enough Autoconf to choose the best objdump
8198 # available, choose the one first in the user's PATH.
8199 m4_defun([_LT_DECL_OBJDUMP],
8200 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8201 test -z "$OBJDUMP" && OBJDUMP=objdump
8202 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8203 AC_SUBST([OBJDUMP])
8204 ])
8205
8206 # _LT_DECL_DLLTOOL
8207 # ----------------
8208 # Ensure DLLTOOL variable is set.
8209 m4_defun([_LT_DECL_DLLTOOL],
8210 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8211 test -z "$DLLTOOL" && DLLTOOL=dlltool
8212 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8213 AC_SUBST([DLLTOOL])
8214 ])
8215
8216 # _LT_DECL_SED
8217 # ------------
8218 # Check for a fully-functional sed program, that truncates
8219 # as few characters as possible. Prefer GNU sed if found.
8220 m4_defun([_LT_DECL_SED],
8221 [AC_PROG_SED
8222 test -z "$SED" && SED=sed
8223 Xsed="$SED -e 1s/^X//"
8224 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8225 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8226 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8227 ])# _LT_DECL_SED
8228
8229 m4_ifndef([AC_PROG_SED], [
8230 ############################################################
8231 # NOTE: This macro has been submitted for inclusion into #
8232 # GNU Autoconf as AC_PROG_SED. When it is available in #
8233 # a released version of Autoconf we should remove this #
8234 # macro and use it instead. #
8235 ############################################################
8236
8237 m4_defun([AC_PROG_SED],
8238 [AC_MSG_CHECKING([for a sed that does not truncate output])
8239 AC_CACHE_VAL(lt_cv_path_SED,
8240 [# Loop through the user's path and test for sed and gsed.
8241 # Then use that list of sed's as ones to test for truncation.
8242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8243 for as_dir in $PATH
8244 do
8245 IFS=$as_save_IFS
8246 test -z "$as_dir" && as_dir=.
8247 for lt_ac_prog in sed gsed; do
8248 for ac_exec_ext in '' $ac_executable_extensions; do
8249 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8250 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8251 fi
8252 done
8253 done
8254 done
8255 IFS=$as_save_IFS
8256 lt_ac_max=0
8257 lt_ac_count=0
8258 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8259 # along with /bin/sed that truncates output.
8260 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8261 test ! -f "$lt_ac_sed" && continue
8262 cat /dev/null > conftest.in
8263 lt_ac_count=0
8264 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8265 # Check for GNU sed and select it if it is found.
8266 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8267 lt_cv_path_SED=$lt_ac_sed
8268 break
8269 fi
8270 while true; do
8271 cat conftest.in conftest.in >conftest.tmp
8272 mv conftest.tmp conftest.in
8273 cp conftest.in conftest.nl
8274 echo >>conftest.nl
8275 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8276 cmp -s conftest.out conftest.nl || break
8277 # 10000 chars as input seems more than enough
8278 test 10 -lt "$lt_ac_count" && break
8279 lt_ac_count=`expr $lt_ac_count + 1`
8280 if test "$lt_ac_count" -gt "$lt_ac_max"; then
8281 lt_ac_max=$lt_ac_count
8282 lt_cv_path_SED=$lt_ac_sed
8283 fi
8284 done
8285 done
8286 ])
8287 SED=$lt_cv_path_SED
8288 AC_SUBST([SED])
8289 AC_MSG_RESULT([$SED])
8290 ])#AC_PROG_SED
8291 ])#m4_ifndef
8292
8293 # Old name:
8294 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8295 dnl aclocal-1.4 backwards compatibility:
8296 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8297
8298
8299 # _LT_CHECK_SHELL_FEATURES
8300 # ------------------------
8301 # Find out whether the shell is Bourne or XSI compatible,
8302 # or has some other useful features.
8303 m4_defun([_LT_CHECK_SHELL_FEATURES],
8304 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8305 lt_unset=unset
8306 else
8307 lt_unset=false
8308 fi
8309 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8310
8311 # test EBCDIC or ASCII
8312 case `echo X|tr X '\101'` in
8313 A) # ASCII based system
8314 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8315 lt_SP2NL='tr \040 \012'
8316 lt_NL2SP='tr \015\012 \040\040'
8317 ;;
8318 *) # EBCDIC based system
8319 lt_SP2NL='tr \100 \n'
8320 lt_NL2SP='tr \r\n \100\100'
8321 ;;
8322 esac
8323 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8324 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8325 ])# _LT_CHECK_SHELL_FEATURES
8326
8327
8328 # _LT_PATH_CONVERSION_FUNCTIONS
8329 # -----------------------------
8330 # Determine what file name conversion functions should be used by
8331 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8332 # for certain cross-compile configurations and native mingw.
8333 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8334 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8335 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8336 AC_MSG_CHECKING([how to convert $build file names to $host format])
8337 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8338 [case $host in
8339 *-*-mingw* )
8340 case $build in
8341 *-*-mingw* ) # actually msys
8342 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8343 ;;
8344 *-*-cygwin* )
8345 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8346 ;;
8347 * ) # otherwise, assume *nix
8348 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8349 ;;
8350 esac
8351 ;;
8352 *-*-cygwin* )
8353 case $build in
8354 *-*-mingw* ) # actually msys
8355 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8356 ;;
8357 *-*-cygwin* )
8358 lt_cv_to_host_file_cmd=func_convert_file_noop
8359 ;;
8360 * ) # otherwise, assume *nix
8361 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8362 ;;
8363 esac
8364 ;;
8365 * ) # unhandled hosts (and "normal" native builds)
8366 lt_cv_to_host_file_cmd=func_convert_file_noop
8367 ;;
8368 esac
8369 ])
8370 to_host_file_cmd=$lt_cv_to_host_file_cmd
8371 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8372 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8373 [0], [convert $build file names to $host format])dnl
8374
8375 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8376 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8377 [#assume ordinary cross tools, or native build.
8378 lt_cv_to_tool_file_cmd=func_convert_file_noop
8379 case $host in
8380 *-*-mingw* )
8381 case $build in
8382 *-*-mingw* ) # actually msys
8383 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8384 ;;
8385 esac
8386 ;;
8387 esac
8388 ])
8389 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8390 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8391 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8392 [0], [convert $build files to toolchain format])dnl
8393 ])# _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 #! /bin/sh
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1996-2021 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 <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 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=https://www.perl.org/
104 flex_URL=https://github.com/westes/flex
105 gnu_software_URL=https://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 'before-save-hook 'time-stamp)
210 # time-stamp-start: "scriptversion="
211 # time-stamp-format: "%:y-%02m-%02d.%02H"
212 # time-stamp-time-zone: "UTC0"
213 # time-stamp-end: "; # UTC"
214 # End:
0 # Makefile.in generated by automake 1.16.5 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2021 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 pkglibexecdir = $(libexecdir)/@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 check_PROGRAMS = test_all$(EXEEXT) test_fuzz$(EXEEXT)
90 TESTS = test_all$(EXEEXT)
91 subdir = test
92 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
93 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
94 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
95 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
96 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
97 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
98 $(top_srcdir)/configure.ac
99 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
100 $(ACLOCAL_M4)
101 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
102 mkinstalldirs = $(install_sh) -d
103 CONFIG_HEADER = $(top_builddir)/htp_config_auto_gen.h
104 CONFIG_CLEAN_FILES =
105 CONFIG_CLEAN_VPATH_FILES =
106 ARFLAGS = cru
107 AM_V_AR = $(am__v_AR_@AM_V@)
108 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
109 am__v_AR_0 = @echo " AR " $@;
110 am__v_AR_1 =
111 libgtest_a_AR = $(AR) $(ARFLAGS)
112 libgtest_a_LIBADD =
113 am__dirstamp = $(am__leading_dot)dirstamp
114 am_libgtest_a_OBJECTS = gtest/gtest-all.$(OBJEXT) \
115 gtest/gtest_main.$(OBJEXT)
116 libgtest_a_OBJECTS = $(am_libgtest_a_OBJECTS)
117 am_test_all_OBJECTS = test_bstr.$(OBJEXT) test_gunzip.$(OBJEXT) \
118 test_hybrid.$(OBJEXT) test_main.$(OBJEXT) \
119 test_multipart.$(OBJEXT) test.$(OBJEXT) test_utils.$(OBJEXT) \
120 test_bench.$(OBJEXT)
121 test_all_OBJECTS = $(am_test_all_OBJECTS)
122 am__DEPENDENCIES_1 = $(top_builddir)/htp/libhtp.la
123 test_all_DEPENDENCIES = libgtest.a $(am__DEPENDENCIES_1)
124 AM_V_lt = $(am__v_lt_@AM_V@)
125 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
126 am__v_lt_0 = --silent
127 am__v_lt_1 =
128 am_test_fuzz_OBJECTS = fuzz/onefile.$(OBJEXT) fuzz/fuzz_htp.$(OBJEXT) \
129 test.$(OBJEXT)
130 test_fuzz_OBJECTS = $(am_test_fuzz_OBJECTS)
131 test_fuzz_DEPENDENCIES = $(am__DEPENDENCIES_1)
132 AM_V_P = $(am__v_P_@AM_V@)
133 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
134 am__v_P_0 = false
135 am__v_P_1 = :
136 AM_V_GEN = $(am__v_GEN_@AM_V@)
137 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
138 am__v_GEN_0 = @echo " GEN " $@;
139 am__v_GEN_1 =
140 AM_V_at = $(am__v_at_@AM_V@)
141 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
142 am__v_at_0 = @
143 am__v_at_1 =
144 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
145 depcomp = $(SHELL) $(top_srcdir)/depcomp
146 am__maybe_remake_depfiles = depfiles
147 am__depfiles_remade = ./$(DEPDIR)/test.Po ./$(DEPDIR)/test_bench.Po \
148 ./$(DEPDIR)/test_bstr.Po ./$(DEPDIR)/test_gunzip.Po \
149 ./$(DEPDIR)/test_hybrid.Po ./$(DEPDIR)/test_main.Po \
150 ./$(DEPDIR)/test_multipart.Po ./$(DEPDIR)/test_utils.Po \
151 fuzz/$(DEPDIR)/fuzz_htp.Po fuzz/$(DEPDIR)/onefile.Po \
152 gtest/$(DEPDIR)/gtest-all.Po gtest/$(DEPDIR)/gtest_main.Po
153 am__mv = mv -f
154 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
155 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
156 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
157 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
158 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
159 $(AM_CFLAGS) $(CFLAGS)
160 AM_V_CC = $(am__v_CC_@AM_V@)
161 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
162 am__v_CC_0 = @echo " CC " $@;
163 am__v_CC_1 =
164 CCLD = $(CC)
165 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
166 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
167 $(AM_LDFLAGS) $(LDFLAGS) -o $@
168 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
169 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
170 am__v_CCLD_0 = @echo " CCLD " $@;
171 am__v_CCLD_1 =
172 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
173 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
174 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
175 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
176 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
177 $(AM_CXXFLAGS) $(CXXFLAGS)
178 AM_V_CXX = $(am__v_CXX_@AM_V@)
179 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
180 am__v_CXX_0 = @echo " CXX " $@;
181 am__v_CXX_1 =
182 CXXLD = $(CXX)
183 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
184 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
185 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
186 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
187 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
188 am__v_CXXLD_0 = @echo " CXXLD " $@;
189 am__v_CXXLD_1 =
190 SOURCES = $(libgtest_a_SOURCES) $(test_all_SOURCES) \
191 $(test_fuzz_SOURCES)
192 DIST_SOURCES = $(libgtest_a_SOURCES) $(test_all_SOURCES) \
193 $(test_fuzz_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 am__tty_colors_dummy = \
217 mgn= red= grn= lgn= blu= brg= std=; \
218 am__color_tests=no
219 am__tty_colors = { \
220 $(am__tty_colors_dummy); \
221 if test "X$(AM_COLOR_TESTS)" = Xno; then \
222 am__color_tests=no; \
223 elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
224 am__color_tests=yes; \
225 elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
226 am__color_tests=yes; \
227 fi; \
228 if test $$am__color_tests = yes; then \
229 red=''; \
230 grn=''; \
231 lgn=''; \
232 blu=''; \
233 mgn=''; \
234 brg=''; \
235 std=''; \
236 fi; \
237 }
238 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
239 am__vpath_adj = case $$p in \
240 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
241 *) f=$$p;; \
242 esac;
243 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
244 am__install_max = 40
245 am__nobase_strip_setup = \
246 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
247 am__nobase_strip = \
248 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
249 am__nobase_list = $(am__nobase_strip_setup); \
250 for p in $$list; do echo "$$p $$p"; done | \
251 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
252 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
253 if (++n[$$2] == $(am__install_max)) \
254 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
255 END { for (dir in files) print dir, files[dir] }'
256 am__base_list = \
257 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
258 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
259 am__uninstall_files_from_dir = { \
260 test -z "$$files" \
261 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
262 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
263 $(am__cd) "$$dir" && rm -f $$files; }; \
264 }
265 am__recheck_rx = ^[ ]*:recheck:[ ]*
266 am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
267 am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
268 # A command that, given a newline-separated list of test names on the
269 # standard input, print the name of the tests that are to be re-run
270 # upon "make recheck".
271 am__list_recheck_tests = $(AWK) '{ \
272 recheck = 1; \
273 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
274 { \
275 if (rc < 0) \
276 { \
277 if ((getline line2 < ($$0 ".log")) < 0) \
278 recheck = 0; \
279 break; \
280 } \
281 else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
282 { \
283 recheck = 0; \
284 break; \
285 } \
286 else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
287 { \
288 break; \
289 } \
290 }; \
291 if (recheck) \
292 print $$0; \
293 close ($$0 ".trs"); \
294 close ($$0 ".log"); \
295 }'
296 # A command that, given a newline-separated list of test names on the
297 # standard input, create the global log from their .trs and .log files.
298 am__create_global_log = $(AWK) ' \
299 function fatal(msg) \
300 { \
301 print "fatal: making $@: " msg | "cat >&2"; \
302 exit 1; \
303 } \
304 function rst_section(header) \
305 { \
306 print header; \
307 len = length(header); \
308 for (i = 1; i <= len; i = i + 1) \
309 printf "="; \
310 printf "\n\n"; \
311 } \
312 { \
313 copy_in_global_log = 1; \
314 global_test_result = "RUN"; \
315 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
316 { \
317 if (rc < 0) \
318 fatal("failed to read from " $$0 ".trs"); \
319 if (line ~ /$(am__global_test_result_rx)/) \
320 { \
321 sub("$(am__global_test_result_rx)", "", line); \
322 sub("[ ]*$$", "", line); \
323 global_test_result = line; \
324 } \
325 else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
326 copy_in_global_log = 0; \
327 }; \
328 if (copy_in_global_log) \
329 { \
330 rst_section(global_test_result ": " $$0); \
331 while ((rc = (getline line < ($$0 ".log"))) != 0) \
332 { \
333 if (rc < 0) \
334 fatal("failed to read from " $$0 ".log"); \
335 print line; \
336 }; \
337 printf "\n"; \
338 }; \
339 close ($$0 ".trs"); \
340 close ($$0 ".log"); \
341 }'
342 # Restructured Text title.
343 am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
344 # Solaris 10 'make', and several other traditional 'make' implementations,
345 # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
346 # by disabling -e (using the XSI extension "set +e") if it's set.
347 am__sh_e_setup = case $$- in *e*) set +e;; esac
348 # Default flags passed to test drivers.
349 am__common_driver_flags = \
350 --color-tests "$$am__color_tests" \
351 --enable-hard-errors "$$am__enable_hard_errors" \
352 --expect-failure "$$am__expect_failure"
353 # To be inserted before the command running the test. Creates the
354 # directory for the log if needed. Stores in $dir the directory
355 # containing $f, in $tst the test, in $log the log. Executes the
356 # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
357 # passes TESTS_ENVIRONMENT. Set up options for the wrapper that
358 # will run the test scripts (or their associated LOG_COMPILER, if
359 # thy have one).
360 am__check_pre = \
361 $(am__sh_e_setup); \
362 $(am__vpath_adj_setup) $(am__vpath_adj) \
363 $(am__tty_colors); \
364 srcdir=$(srcdir); export srcdir; \
365 case "$@" in \
366 */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
367 *) am__odir=.;; \
368 esac; \
369 test "x$$am__odir" = x"." || test -d "$$am__odir" \
370 || $(MKDIR_P) "$$am__odir" || exit $$?; \
371 if test -f "./$$f"; then dir=./; \
372 elif test -f "$$f"; then dir=; \
373 else dir="$(srcdir)/"; fi; \
374 tst=$$dir$$f; log='$@'; \
375 if test -n '$(DISABLE_HARD_ERRORS)'; then \
376 am__enable_hard_errors=no; \
377 else \
378 am__enable_hard_errors=yes; \
379 fi; \
380 case " $(XFAIL_TESTS) " in \
381 *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
382 am__expect_failure=yes;; \
383 *) \
384 am__expect_failure=no;; \
385 esac; \
386 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
387 # A shell command to get the names of the tests scripts with any registered
388 # extension removed (i.e., equivalently, the names of the test logs, with
389 # the '.log' extension removed). The result is saved in the shell variable
390 # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
391 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
392 # since that might cause problem with VPATH rewrites for suffix-less tests.
393 # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
394 am__set_TESTS_bases = \
395 bases='$(TEST_LOGS)'; \
396 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
397 bases=`echo $$bases`
398 AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
399 RECHECK_LOGS = $(TEST_LOGS)
400 AM_RECURSIVE_TARGETS = check recheck
401 TEST_SUITE_LOG = test-suite.log
402 TEST_EXTENSIONS = @EXEEXT@ .test
403 LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
404 LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
405 am__set_b = \
406 case '$@' in \
407 */*) \
408 case '$*' in \
409 */*) b='$*';; \
410 *) b=`echo '$@' | sed 's/\.log$$//'`; \
411 esac;; \
412 *) \
413 b='$*';; \
414 esac
415 am__test_logs1 = $(TESTS:=.log)
416 am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
417 TEST_LOGS = $(am__test_logs2:.test.log=.log)
418 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
419 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
420 $(TEST_LOG_FLAGS)
421 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
422 $(top_srcdir)/test-driver
423 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
424 ACLOCAL = @ACLOCAL@
425 AMTAR = @AMTAR@
426 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
427 AR = @AR@
428 AUTOCONF = @AUTOCONF@
429 AUTOHEADER = @AUTOHEADER@
430 AUTOMAKE = @AUTOMAKE@
431 AWK = @AWK@
432 CC = @CC@
433 CCDEPMODE = @CCDEPMODE@
434 CFLAGS = @CFLAGS@
435 CPP = @CPP@
436 CPPFLAGS = @CPPFLAGS@
437 CSCOPE = @CSCOPE@
438 CTAGS = @CTAGS@
439 CXX = @CXX@
440 CXXCPP = @CXXCPP@
441 CXXDEPMODE = @CXXDEPMODE@
442 CXXFLAGS = @CXXFLAGS@
443 CYGPATH_W = @CYGPATH_W@
444 DEFS = @DEFS@
445 DEPDIR = @DEPDIR@
446 DLLTOOL = @DLLTOOL@
447 DOXYGEN = @DOXYGEN@
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 ETAGS = @ETAGS@
455 EXEEXT = @EXEEXT@
456 FGREP = @FGREP@
457 GENERIC_LIBRARY_NAME = @GENERIC_LIBRARY_NAME@
458 GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@
459 GENERIC_RELEASE = @GENERIC_RELEASE@
460 GENERIC_VERSION = @GENERIC_VERSION@
461 GREP = @GREP@
462 INSTALL = @INSTALL@
463 INSTALL_DATA = @INSTALL_DATA@
464 INSTALL_PROGRAM = @INSTALL_PROGRAM@
465 INSTALL_SCRIPT = @INSTALL_SCRIPT@
466 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
467 LCOV = @LCOV@
468 LD = @LD@
469 LDFLAGS = @LDFLAGS@
470 LIBICONV = @LIBICONV@
471 LIBOBJS = @LIBOBJS@
472 LIBS = @LIBS@
473 LIBTOOL = @LIBTOOL@
474 LIPO = @LIPO@
475 LN_S = @LN_S@
476 LTLIBICONV = @LTLIBICONV@
477 LTLIBOBJS = @LTLIBOBJS@
478 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
479 MAKEINFO = @MAKEINFO@
480 MANIFEST_TOOL = @MANIFEST_TOOL@
481 MKDIR_P = @MKDIR_P@
482 NM = @NM@
483 NMEDIT = @NMEDIT@
484 OBJDUMP = @OBJDUMP@
485 OBJEXT = @OBJEXT@
486 OTOOL = @OTOOL@
487 OTOOL64 = @OTOOL64@
488 PACKAGE = @PACKAGE@
489 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
490 PACKAGE_NAME = @PACKAGE_NAME@
491 PACKAGE_STRING = @PACKAGE_STRING@
492 PACKAGE_TARNAME = @PACKAGE_TARNAME@
493 PACKAGE_URL = @PACKAGE_URL@
494 PACKAGE_VERSION = @PACKAGE_VERSION@
495 PATH_SEPARATOR = @PATH_SEPARATOR@
496 RANLIB = @RANLIB@
497 SED = @SED@
498 SET_MAKE = @SET_MAKE@
499 SHELL = @SHELL@
500 STRIP = @STRIP@
501 VERSION = @VERSION@
502 abs_builddir = @abs_builddir@
503 abs_srcdir = @abs_srcdir@
504 abs_top_builddir = @abs_top_builddir@
505 abs_top_srcdir = @abs_top_srcdir@
506 ac_ct_AR = @ac_ct_AR@
507 ac_ct_CC = @ac_ct_CC@
508 ac_ct_CXX = @ac_ct_CXX@
509 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
510 am__include = @am__include@
511 am__leading_dot = @am__leading_dot@
512 am__quote = @am__quote@
513 am__tar = @am__tar@
514 am__untar = @am__untar@
515 bindir = @bindir@
516 build = @build@
517 build_alias = @build_alias@
518 build_cpu = @build_cpu@
519 build_os = @build_os@
520 build_vendor = @build_vendor@
521 builddir = @builddir@
522 datadir = @datadir@
523 datarootdir = @datarootdir@
524 docdir = @docdir@
525 doxygen = @doxygen@
526 dvidir = @dvidir@
527 exec_prefix = @exec_prefix@
528 host = @host@
529 host_alias = @host_alias@
530 host_cpu = @host_cpu@
531 host_os = @host_os@
532 host_vendor = @host_vendor@
533 htmldir = @htmldir@
534 includedir = @includedir@
535 infodir = @infodir@
536 install_sh = @install_sh@
537 libdir = @libdir@
538 libexecdir = @libexecdir@
539 localedir = @localedir@
540 localstatedir = @localstatedir@
541 mandir = @mandir@
542 mkdir_p = @mkdir_p@
543 oldincludedir = @oldincludedir@
544 pdfdir = @pdfdir@
545 prefix = @prefix@
546 program_transform_name = @program_transform_name@
547 psdir = @psdir@
548 runstatedir = @runstatedir@
549 sbindir = @sbindir@
550 sharedstatedir = @sharedstatedir@
551 srcdir = @srcdir@
552 sysconfdir = @sysconfdir@
553 target_alias = @target_alias@
554 top_build_prefix = @top_build_prefix@
555 top_builddir = @top_builddir@
556 top_srcdir = @top_srcdir@
557 LDADD = $(top_builddir)/htp/libhtp.la -lz @LIBICONV@
558 AM_CFLAGS = -D_GNU_SOURCE -g -Wall -Wextra -std=gnu99 -pedantic \
559 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith \
560 -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter
561
562 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)/htp -Wno-write-strings -DGTEST_USE_OWN_TR1_TUPLE=1 \
563 -D_GNU_SOURCE -g -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare
564
565 AUTOMAKE_OPTIONS = subdir-objects
566 EXTRA_DIST = files
567 check_LIBRARIES = libgtest.a
568 test_all_SOURCES = test_bstr.cpp test_gunzip.cpp test_hybrid.cpp test_main.cpp test_multipart.cpp test.c test.h test_utils.cpp test_bench.cpp
569 test_all_LDADD = libgtest.a -lpthread $(LDADD)
570 test_fuzz_SOURCES = fuzz/onefile.c fuzz/fuzz_htp.c fuzz/fuzz_htp.h test.c
571 test_fuzz_LDADD = $(LDADD)
572 libgtest_a_SOURCES = gtest/gtest-all.cc gtest/gtest_main.cc gtest/gtest.h
573 TESTS_ENVIRONMENT = srcdir=$(srcdir)/files
574 all: all-am
575
576 .SUFFIXES:
577 .SUFFIXES: .c .cc .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
578 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
579 @for dep in $?; do \
580 case '$(am__configure_deps)' in \
581 *$$dep*) \
582 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
583 && { if test -f $@; then exit 0; else break; fi; }; \
584 exit 1;; \
585 esac; \
586 done; \
587 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
588 $(am__cd) $(top_srcdir) && \
589 $(AUTOMAKE) --gnu test/Makefile
590 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
591 @case '$?' in \
592 *config.status*) \
593 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
594 *) \
595 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
596 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
597 esac;
598
599 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
600 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
601
602 $(top_srcdir)/configure: $(am__configure_deps)
603 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
604 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
605 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
606 $(am__aclocal_m4_deps):
607
608 clean-checkPROGRAMS:
609 @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
610 echo " rm -f" $$list; \
611 rm -f $$list || exit $$?; \
612 test -n "$(EXEEXT)" || exit 0; \
613 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
614 echo " rm -f" $$list; \
615 rm -f $$list
616
617 clean-checkLIBRARIES:
618 -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES)
619 gtest/$(am__dirstamp):
620 @$(MKDIR_P) gtest
621 @: > gtest/$(am__dirstamp)
622 gtest/$(DEPDIR)/$(am__dirstamp):
623 @$(MKDIR_P) gtest/$(DEPDIR)
624 @: > gtest/$(DEPDIR)/$(am__dirstamp)
625 gtest/gtest-all.$(OBJEXT): gtest/$(am__dirstamp) \
626 gtest/$(DEPDIR)/$(am__dirstamp)
627 gtest/gtest_main.$(OBJEXT): gtest/$(am__dirstamp) \
628 gtest/$(DEPDIR)/$(am__dirstamp)
629
630 libgtest.a: $(libgtest_a_OBJECTS) $(libgtest_a_DEPENDENCIES) $(EXTRA_libgtest_a_DEPENDENCIES)
631 $(AM_V_at)-rm -f libgtest.a
632 $(AM_V_AR)$(libgtest_a_AR) libgtest.a $(libgtest_a_OBJECTS) $(libgtest_a_LIBADD)
633 $(AM_V_at)$(RANLIB) libgtest.a
634
635 test_all$(EXEEXT): $(test_all_OBJECTS) $(test_all_DEPENDENCIES) $(EXTRA_test_all_DEPENDENCIES)
636 @rm -f test_all$(EXEEXT)
637 $(AM_V_CXXLD)$(CXXLINK) $(test_all_OBJECTS) $(test_all_LDADD) $(LIBS)
638 fuzz/$(am__dirstamp):
639 @$(MKDIR_P) fuzz
640 @: > fuzz/$(am__dirstamp)
641 fuzz/$(DEPDIR)/$(am__dirstamp):
642 @$(MKDIR_P) fuzz/$(DEPDIR)
643 @: > fuzz/$(DEPDIR)/$(am__dirstamp)
644 fuzz/onefile.$(OBJEXT): fuzz/$(am__dirstamp) \
645 fuzz/$(DEPDIR)/$(am__dirstamp)
646 fuzz/fuzz_htp.$(OBJEXT): fuzz/$(am__dirstamp) \
647 fuzz/$(DEPDIR)/$(am__dirstamp)
648
649 test_fuzz$(EXEEXT): $(test_fuzz_OBJECTS) $(test_fuzz_DEPENDENCIES) $(EXTRA_test_fuzz_DEPENDENCIES)
650 @rm -f test_fuzz$(EXEEXT)
651 $(AM_V_CCLD)$(LINK) $(test_fuzz_OBJECTS) $(test_fuzz_LDADD) $(LIBS)
652
653 mostlyclean-compile:
654 -rm -f *.$(OBJEXT)
655 -rm -f fuzz/*.$(OBJEXT)
656 -rm -f gtest/*.$(OBJEXT)
657
658 distclean-compile:
659 -rm -f *.tab.c
660
661 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ # am--include-marker
662 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bench.Po@am__quote@ # am--include-marker
663 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bstr.Po@am__quote@ # am--include-marker
664 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gunzip.Po@am__quote@ # am--include-marker
665 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hybrid.Po@am__quote@ # am--include-marker
666 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_main.Po@am__quote@ # am--include-marker
667 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_multipart.Po@am__quote@ # am--include-marker
668 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_utils.Po@am__quote@ # am--include-marker
669 @AMDEP_TRUE@@am__include@ @am__quote@fuzz/$(DEPDIR)/fuzz_htp.Po@am__quote@ # am--include-marker
670 @AMDEP_TRUE@@am__include@ @am__quote@fuzz/$(DEPDIR)/onefile.Po@am__quote@ # am--include-marker
671 @AMDEP_TRUE@@am__include@ @am__quote@gtest/$(DEPDIR)/gtest-all.Po@am__quote@ # am--include-marker
672 @AMDEP_TRUE@@am__include@ @am__quote@gtest/$(DEPDIR)/gtest_main.Po@am__quote@ # am--include-marker
673
674 $(am__depfiles_remade):
675 @$(MKDIR_P) $(@D)
676 @echo '# dummy' >$@-t && $(am__mv) $@-t $@
677
678 am--depfiles: $(am__depfiles_remade)
679
680 .c.o:
681 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
682 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
683 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
684 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
685 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
686 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
687
688 .c.obj:
689 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
690 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
691 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
692 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
693 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
694 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
695
696 .c.lo:
697 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
698 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
699 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
700 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
701 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
702 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
703
704 .cc.o:
705 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
706 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
707 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
708 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
709 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
710 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
711
712 .cc.obj:
713 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
714 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
715 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
716 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
717 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
718 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
719
720 .cc.lo:
721 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
722 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
723 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
724 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
725 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
726 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
727
728 .cpp.o:
729 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
730 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
731 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
732 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
733 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
734 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
735
736 .cpp.obj:
737 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
738 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
739 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
740 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
741 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
742 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
743
744 .cpp.lo:
745 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
746 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
747 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
748 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
749 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
750 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
751
752 mostlyclean-libtool:
753 -rm -f *.lo
754
755 clean-libtool:
756 -rm -rf .libs _libs
757
758 ID: $(am__tagged_files)
759 $(am__define_uniq_tagged_files); mkid -fID $$unique
760 tags: tags-am
761 TAGS: tags
762
763 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
764 set x; \
765 here=`pwd`; \
766 $(am__define_uniq_tagged_files); \
767 shift; \
768 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
769 test -n "$$unique" || unique=$$empty_fix; \
770 if test $$# -gt 0; then \
771 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
772 "$$@" $$unique; \
773 else \
774 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
775 $$unique; \
776 fi; \
777 fi
778 ctags: ctags-am
779
780 CTAGS: ctags
781 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
782 $(am__define_uniq_tagged_files); \
783 test -z "$(CTAGS_ARGS)$$unique" \
784 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
785 $$unique
786
787 GTAGS:
788 here=`$(am__cd) $(top_builddir) && pwd` \
789 && $(am__cd) $(top_srcdir) \
790 && gtags -i $(GTAGS_ARGS) "$$here"
791 cscopelist: cscopelist-am
792
793 cscopelist-am: $(am__tagged_files)
794 list='$(am__tagged_files)'; \
795 case "$(srcdir)" in \
796 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
797 *) sdir=$(subdir)/$(srcdir) ;; \
798 esac; \
799 for i in $$list; do \
800 if test -f "$$i"; then \
801 echo "$(subdir)/$$i"; \
802 else \
803 echo "$$sdir/$$i"; \
804 fi; \
805 done >> $(top_builddir)/cscope.files
806
807 distclean-tags:
808 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
809
810 # Recover from deleted '.trs' file; this should ensure that
811 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
812 # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
813 # to avoid problems with "make -n".
814 .log.trs:
815 rm -f $< $@
816 $(MAKE) $(AM_MAKEFLAGS) $<
817
818 # Leading 'am--fnord' is there to ensure the list of targets does not
819 # expand to empty, as could happen e.g. with make check TESTS=''.
820 am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
821 am--force-recheck:
822 @:
823
824 $(TEST_SUITE_LOG): $(TEST_LOGS)
825 @$(am__set_TESTS_bases); \
826 am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
827 redo_bases=`for i in $$bases; do \
828 am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
829 done`; \
830 if test -n "$$redo_bases"; then \
831 redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
832 redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
833 if $(am__make_dryrun); then :; else \
834 rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
835 fi; \
836 fi; \
837 if test -n "$$am__remaking_logs"; then \
838 echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
839 "recursion detected" >&2; \
840 elif test -n "$$redo_logs"; then \
841 am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
842 fi; \
843 if $(am__make_dryrun); then :; else \
844 st=0; \
845 errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
846 for i in $$redo_bases; do \
847 test -f $$i.trs && test -r $$i.trs \
848 || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
849 test -f $$i.log && test -r $$i.log \
850 || { echo "$$errmsg $$i.log" >&2; st=1; }; \
851 done; \
852 test $$st -eq 0 || exit 1; \
853 fi
854 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
855 ws='[ ]'; \
856 results=`for b in $$bases; do echo $$b.trs; done`; \
857 test -n "$$results" || results=/dev/null; \
858 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
859 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
860 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
861 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
862 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
863 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
864 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
865 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
866 success=true; \
867 else \
868 success=false; \
869 fi; \
870 br='==================='; br=$$br$$br$$br$$br; \
871 result_count () \
872 { \
873 if test x"$$1" = x"--maybe-color"; then \
874 maybe_colorize=yes; \
875 elif test x"$$1" = x"--no-color"; then \
876 maybe_colorize=no; \
877 else \
878 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
879 fi; \
880 shift; \
881 desc=$$1 count=$$2; \
882 if test $$maybe_colorize = yes && test $$count -gt 0; then \
883 color_start=$$3 color_end=$$std; \
884 else \
885 color_start= color_end=; \
886 fi; \
887 echo "$${color_start}# $$desc $$count$${color_end}"; \
888 }; \
889 create_testsuite_report () \
890 { \
891 result_count $$1 "TOTAL:" $$all "$$brg"; \
892 result_count $$1 "PASS: " $$pass "$$grn"; \
893 result_count $$1 "SKIP: " $$skip "$$blu"; \
894 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
895 result_count $$1 "FAIL: " $$fail "$$red"; \
896 result_count $$1 "XPASS:" $$xpass "$$red"; \
897 result_count $$1 "ERROR:" $$error "$$mgn"; \
898 }; \
899 { \
900 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
901 $(am__rst_title); \
902 create_testsuite_report --no-color; \
903 echo; \
904 echo ".. contents:: :depth: 2"; \
905 echo; \
906 for b in $$bases; do echo $$b; done \
907 | $(am__create_global_log); \
908 } >$(TEST_SUITE_LOG).tmp || exit 1; \
909 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
910 if $$success; then \
911 col="$$grn"; \
912 else \
913 col="$$red"; \
914 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
915 fi; \
916 echo "$${col}$$br$${std}"; \
917 echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
918 echo "$${col}$$br$${std}"; \
919 create_testsuite_report --maybe-color; \
920 echo "$$col$$br$$std"; \
921 if $$success; then :; else \
922 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
923 if test -n "$(PACKAGE_BUGREPORT)"; then \
924 echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
925 fi; \
926 echo "$$col$$br$$std"; \
927 fi; \
928 $$success || exit 1
929
930 check-TESTS: $(check_PROGRAMS) $(check_LIBRARIES)
931 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
932 @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
933 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
934 @set +e; $(am__set_TESTS_bases); \
935 log_list=`for i in $$bases; do echo $$i.log; done`; \
936 trs_list=`for i in $$bases; do echo $$i.trs; done`; \
937 log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
938 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
939 exit $$?;
940 recheck: all $(check_PROGRAMS) $(check_LIBRARIES)
941 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
942 @set +e; $(am__set_TESTS_bases); \
943 bases=`for i in $$bases; do echo $$i; done \
944 | $(am__list_recheck_tests)` || exit 1; \
945 log_list=`for i in $$bases; do echo $$i.log; done`; \
946 log_list=`echo $$log_list`; \
947 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
948 am__force_recheck=am--force-recheck \
949 TEST_LOGS="$$log_list"; \
950 exit $$?
951 test_all.log: test_all$(EXEEXT)
952 @p='test_all$(EXEEXT)'; \
953 b='test_all'; \
954 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
955 --log-file $$b.log --trs-file $$b.trs \
956 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
957 "$$tst" $(AM_TESTS_FD_REDIRECT)
958 .test.log:
959 @p='$<'; \
960 $(am__set_b); \
961 $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
962 --log-file $$b.log --trs-file $$b.trs \
963 $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
964 "$$tst" $(AM_TESTS_FD_REDIRECT)
965 @am__EXEEXT_TRUE@.test$(EXEEXT).log:
966 @am__EXEEXT_TRUE@ @p='$<'; \
967 @am__EXEEXT_TRUE@ $(am__set_b); \
968 @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
969 @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
970 @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
971 @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
972 distdir: $(BUILT_SOURCES)
973 $(MAKE) $(AM_MAKEFLAGS) distdir-am
974
975 distdir-am: $(DISTFILES)
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 check-am: all-am
1006 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_LIBRARIES)
1007 $(MAKE) $(AM_MAKEFLAGS) check-TESTS
1008 check: check-am
1009 all-am: Makefile
1010 installdirs:
1011 install: install-am
1012 install-exec: install-exec-am
1013 install-data: install-data-am
1014 uninstall: uninstall-am
1015
1016 install-am: all-am
1017 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1018
1019 installcheck: installcheck-am
1020 install-strip:
1021 if test -z '$(STRIP)'; then \
1022 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1023 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1024 install; \
1025 else \
1026 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1027 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1028 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
1029 fi
1030 mostlyclean-generic:
1031 -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
1032 -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
1033 -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
1034
1035 clean-generic:
1036
1037 distclean-generic:
1038 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1039 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1040 -rm -f fuzz/$(DEPDIR)/$(am__dirstamp)
1041 -rm -f fuzz/$(am__dirstamp)
1042 -rm -f gtest/$(DEPDIR)/$(am__dirstamp)
1043 -rm -f gtest/$(am__dirstamp)
1044
1045 maintainer-clean-generic:
1046 @echo "This command is intended for maintainers to use"
1047 @echo "it deletes files that may require special tools to rebuild."
1048 clean: clean-am
1049
1050 clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
1051 clean-libtool mostlyclean-am
1052
1053 distclean: distclean-am
1054 -rm -f ./$(DEPDIR)/test.Po
1055 -rm -f ./$(DEPDIR)/test_bench.Po
1056 -rm -f ./$(DEPDIR)/test_bstr.Po
1057 -rm -f ./$(DEPDIR)/test_gunzip.Po
1058 -rm -f ./$(DEPDIR)/test_hybrid.Po
1059 -rm -f ./$(DEPDIR)/test_main.Po
1060 -rm -f ./$(DEPDIR)/test_multipart.Po
1061 -rm -f ./$(DEPDIR)/test_utils.Po
1062 -rm -f fuzz/$(DEPDIR)/fuzz_htp.Po
1063 -rm -f fuzz/$(DEPDIR)/onefile.Po
1064 -rm -f gtest/$(DEPDIR)/gtest-all.Po
1065 -rm -f gtest/$(DEPDIR)/gtest_main.Po
1066 -rm -f Makefile
1067 distclean-am: clean-am distclean-compile distclean-generic \
1068 distclean-tags
1069
1070 dvi: dvi-am
1071
1072 dvi-am:
1073
1074 html: html-am
1075
1076 html-am:
1077
1078 info: info-am
1079
1080 info-am:
1081
1082 install-data-am:
1083
1084 install-dvi: install-dvi-am
1085
1086 install-dvi-am:
1087
1088 install-exec-am:
1089
1090 install-html: install-html-am
1091
1092 install-html-am:
1093
1094 install-info: install-info-am
1095
1096 install-info-am:
1097
1098 install-man:
1099
1100 install-pdf: install-pdf-am
1101
1102 install-pdf-am:
1103
1104 install-ps: install-ps-am
1105
1106 install-ps-am:
1107
1108 installcheck-am:
1109
1110 maintainer-clean: maintainer-clean-am
1111 -rm -f ./$(DEPDIR)/test.Po
1112 -rm -f ./$(DEPDIR)/test_bench.Po
1113 -rm -f ./$(DEPDIR)/test_bstr.Po
1114 -rm -f ./$(DEPDIR)/test_gunzip.Po
1115 -rm -f ./$(DEPDIR)/test_hybrid.Po
1116 -rm -f ./$(DEPDIR)/test_main.Po
1117 -rm -f ./$(DEPDIR)/test_multipart.Po
1118 -rm -f ./$(DEPDIR)/test_utils.Po
1119 -rm -f fuzz/$(DEPDIR)/fuzz_htp.Po
1120 -rm -f fuzz/$(DEPDIR)/onefile.Po
1121 -rm -f gtest/$(DEPDIR)/gtest-all.Po
1122 -rm -f gtest/$(DEPDIR)/gtest_main.Po
1123 -rm -f Makefile
1124 maintainer-clean-am: distclean-am maintainer-clean-generic
1125
1126 mostlyclean: mostlyclean-am
1127
1128 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1129 mostlyclean-libtool
1130
1131 pdf: pdf-am
1132
1133 pdf-am:
1134
1135 ps: ps-am
1136
1137 ps-am:
1138
1139 uninstall-am:
1140
1141 .MAKE: check-am install-am install-strip
1142
1143 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
1144 check-am clean clean-checkLIBRARIES clean-checkPROGRAMS \
1145 clean-generic clean-libtool cscopelist-am ctags ctags-am \
1146 distclean distclean-compile distclean-generic \
1147 distclean-libtool distclean-tags distdir dvi dvi-am html \
1148 html-am info info-am install install-am install-data \
1149 install-data-am install-dvi install-dvi-am install-exec \
1150 install-exec-am install-html install-html-am install-info \
1151 install-info-am install-man install-pdf install-pdf-am \
1152 install-ps install-ps-am install-strip installcheck \
1153 installcheck-am installdirs maintainer-clean \
1154 maintainer-clean-generic mostlyclean mostlyclean-compile \
1155 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
1156 recheck tags tags-am uninstall uninstall-am
1157
1158 .PRECIOUS: Makefile
1159
1160
1161 test: check
1162 @echo
1163
1164 test-compile-only: all-am
1165 $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES)
1166 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
1167
1168 check-compile-only: all-am
1169 $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES)
1170 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
1171
1172 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1173 # Otherwise a system limit (for SysV at least) may be exceeded.
1174 .NOEXPORT:
182182 if (test_next_chunk(&test) <= 0) {
183183 break;
184184 }
185 if (test.chunk_len == 0) {
186 continue;
187 }
185188 if (test.chunk_direction == CLIENT) {
186189 if (in_data_other) {
187190 break;
+0
-802
test/main.c less more
0 /***************************************************************************
1 * Copyright (c) 2009-2010 Open Information Security Foundation
2 * Copyright (c) 2010-2013 Qualys, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15
16 * - Neither the name of the Qualys, Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ***************************************************************************/
32
33 /**
34 * @file
35 * @author Ivan Ristic <ivanr@webkreator.com>
36 */
37
38 #include <dirent.h>
39 #include <stdio.h>
40 #include <stdlib.h>
41 #include <sys/time.h>
42 #include <sys/types.h>
43 #include <unistd.h>
44 #include <time.h>
45
46 #include "../htp/bstr.h"
47 #include "../htp/htp.h"
48 #include "test.h"
49
50 char *home = NULL;
51
52 int callback_transaction_start(htp_connp_t *connp) {
53 printf("-- Callback: transaction_start\n");
54 }
55
56 int callback_request_line(htp_connp_t *connp) {
57 printf("-- Callback: request_line\n");
58 }
59
60 int callback_request_headers(htp_connp_t *connp) {
61 printf("-- Callback: request_headers\n");
62 bstr *raw = htp_tx_get_request_headers_raw(connp->in_tx);
63 fprint_raw_data(stdout, "REQUEST HEADERS RAW 1", bstr_ptr(raw), bstr_len(raw));
64 }
65
66 int callback_request_body_data(htp_tx_data_t *d) {
67 /*
68 if (d->data != NULL) {
69 printf("-- Callback: request_body_data\n");
70 fprint_raw_data(stdout, __FUNCTION__, d->data, d->len);
71 } else {
72 printf("-- Callback: request_body_data (LAST)\n");
73 }
74 */
75 }
76
77 int callback_request_trailer(htp_connp_t *connp) {
78 printf("-- Callback: request_trailer\n");
79 }
80
81 int callback_request(htp_connp_t *connp) {
82 printf("-- Callback: request\n");
83 }
84
85 int callback_response_line(htp_connp_t *connp) {
86 printf("-- Callback: response_line\n");
87 }
88
89 int callback_response_headers(htp_connp_t *connp) {
90 printf("-- Callback: response_headers\n");
91 }
92
93 int callback_response_body_data(htp_tx_data_t *d) {
94 if (d->data != NULL) {
95 printf("-- Callback: response_body_data\n");
96 fprint_raw_data(stdout, __FUNCTION__, d->data, d->len);
97 } else {
98 printf("-- Callback: response_body_data (LAST)\n");
99 }
100 }
101
102 int callback_request_file_data(htp_file_data_t *file_data) {
103 if (file_data->data != NULL) {
104 printf("-- Callback: request_file_data\n");
105 fprint_raw_data(stdout, __FUNCTION__, file_data->data, file_data->len);
106 } else {
107 printf("-- Callback: request_file_data (LAST)\n");
108 }
109 }
110
111 int callback_response_trailer(htp_connp_t *connp) {
112 printf("-- Callback: response_trailer\n");
113 }
114
115 int callback_response(htp_connp_t *connp) {
116 printf("-- Callback: response\n");
117 }
118
119 int callback_response_destroy(htp_connp_t *connp) {
120 htp_tx_destroy(connp->out_tx);
121 printf("-- Destroyed transaction\n");
122 }
123
124 int callback_log(htp_log_t *log) {
125 htp_print_log(stdout, log);
126 }
127
128 static void print_tx(htp_connp_t *connp, htp_tx_t *tx) {
129 char *request_line = bstr_util_strdup_to_c(tx->request_line);
130 htp_header_t *h_user_agent = htp_table_get_c(tx->request_headers, "user-agent");
131 htp_header_t *h_referer = htp_table_get_c(tx->request_headers, "referer");
132 char *referer, *user_agent;
133 char buf[256];
134
135 time_t t = time(NULL);
136 struct tm *tmp = localtime(&t);
137
138 strftime(buf, 255, "%d/%b/%Y:%T %z", tmp);
139
140 if (h_user_agent == NULL) user_agent = strdup("-");
141 else {
142 user_agent = bstr_util_strdup_to_c(h_user_agent->value);
143 }
144
145 if (h_referer == NULL) referer = strdup("-");
146 else {
147 referer = bstr_util_strdup_to_c(h_referer->value);
148 }
149
150 printf("%s - - [%s] \"%s\" %i %zu \"%s\" \"%s\"\n", connp->conn->client_addr, buf,
151 request_line, tx->response_status_number, tx->response_message_len,
152 referer, user_agent);
153
154 free(referer);
155 free(user_agent);
156 free(request_line);
157 }
158
159 static int run_directory(char *dirname, htp_cfg_t *cfg) {
160 struct dirent *entry;
161 char buf[1025];
162 DIR *d = opendir(dirname);
163 htp_connp_t *connp;
164
165 if (d == NULL) {
166 printf("Failed to open directory: %s\n", dirname);
167 return -1;
168 }
169
170 while ((entry = readdir(d)) != NULL) {
171 if (strncmp(entry->d_name, "stream", 6) == 0) {
172 int rc = test_run(dirname, entry->d_name, cfg, &connp);
173
174 if (rc < 0) {
175 if (connp != NULL) {
176 htp_log_t *last_error = htp_connp_get_last_error(connp);
177 if (last_error != NULL) {
178 printf(" -- failed: %s\n", last_error->msg);
179 } else {
180 printf(" -- failed: ERROR NOT AVAILABLE\n");
181 }
182
183 return 0;
184 } else {
185 return -1;
186 }
187 } else {
188 printf(" -- %zu transaction(s)\n", htp_list_size(connp->conn->transactions));
189
190 for (int i = 0, n = htp_list_size(connp->conn->transactions); i < n; i++) {
191 htp_tx_t *tx = htp_list_get(connp->conn->transactions, i);
192
193 printf(" ");
194 print_tx(connp, tx);
195 }
196
197 printf("\n");
198
199 htp_connp_destroy_all(connp);
200 }
201 }
202 }
203
204 closedir(d);
205
206 return 1;
207 }
208
209 int main_dir(int argc, char** argv) {
210 //int main(int argc, char** argv) {
211 htp_cfg_t *cfg = htp_config_create();
212 htp_config_register_log(cfg, callback_log);
213 htp_config_register_response_complete(cfg, callback_response_destroy);
214
215 run_directory("C:\\http_traces\\run1", cfg);
216 //run_directory("/home/ivanr/work/traces/run3/", cfg);
217
218 htp_config_destroy(cfg);
219 }
220
221 #define RUN_TEST(X, Y) \
222 {\
223 tests++; \
224 printf("---------------------------------\n"); \
225 printf("Test: " #X "\n"); \
226 int rc = X(Y); \
227 if (rc < 0) { \
228 printf(" Failed with %i\n", rc); \
229 failures++; \
230 } \
231 printf("\n"); \
232 }
233
234 /**
235 * Dummy entry point.
236 */
237 int main(int argc, char** argv) {
238 return EXIT_SUCCESS;
239 }
240
241 int main_path_decoding_tests(int argc, char** argv) {
242 htp_cfg_t *cfg = htp_config_create();
243 htp_connp_t *connp = htp_connp_create(cfg);
244 htp_tx_t *tx = htp_tx_create(connp);
245 char *str;
246 bstr *path = NULL;
247
248 //
249 path = bstr_dup_c("/One\\two///ThRee%2ffive%5csix/se%xxven");
250 cfg->path_case_insensitive = 1;
251
252 str = bstr_util_strdup_to_c(path);
253 printf("Before: %s\n", str);
254 free(str);
255 htp_decode_path_inplace(cfg, tx, path);
256 str = bstr_util_strdup_to_c(path);
257 printf("After: %s\n\n", str);
258 free(str);
259 bstr_free(path);
260
261 //
262 path = bstr_dup_c("/One\\two///ThRee%2ffive%5csix/se%xxven");
263 cfg->path_case_insensitive = 1;
264 cfg->path_compress_separators = 1;
265
266 str = bstr_util_strdup_to_c(path);
267 printf("Before: %s\n", str);
268 free(str);
269 htp_decode_path_inplace(cfg, tx, path);
270 str = bstr_util_strdup_to_c(path);
271 printf("After: %s\n\n", str);
272 free(str);
273 bstr_free(path);
274
275 //
276 path = bstr_dup_c("/One\\two///ThRee%2ffive%5csix/se%xxven");
277 cfg->path_case_insensitive = 1;
278 cfg->path_compress_separators = 1;
279 cfg->path_backslash_separators = 1;
280
281 str = bstr_util_strdup_to_c(path);
282 printf("Before: %s\n", str);
283 free(str);
284 htp_decode_path_inplace(cfg, tx, path);
285 str = bstr_util_strdup_to_c(path);
286 printf("After: %s\n\n", str);
287 free(str);
288 bstr_free(path);
289
290 //
291 path = bstr_dup_c("/One\\two///ThRee%2ffive%5csix/se%xxven");
292 cfg->path_case_insensitive = 1;
293 cfg->path_compress_separators = 1;
294 cfg->path_backslash_separators = 1;
295 cfg->path_encoded_separators_decode = 1;
296
297 str = bstr_util_strdup_to_c(path);
298 printf("Before: %s\n", str);
299 free(str);
300 htp_decode_path_inplace(cfg, tx, path);
301 str = bstr_util_strdup_to_c(path);
302 printf("After: %s\n\n", str);
303 free(str);
304 bstr_free(path);
305
306 //
307 path = bstr_dup_c("/One\\two///ThRee%2ffive%5csix/se%xxven");
308 cfg->path_case_insensitive = 1;
309 cfg->path_compress_separators = 1;
310 cfg->path_backslash_separators = 1;
311 cfg->path_encoded_separators_decode = 1;
312 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_REMOVE_PERCENT;
313
314 str = bstr_util_strdup_to_c(path);
315 printf("Before: %s\n", str);
316 free(str);
317 htp_decode_path_inplace(cfg, tx, path);
318 str = bstr_util_strdup_to_c(path);
319 printf("After: %s\n\n", str);
320 free(str);
321 bstr_free(path);
322
323 //
324 path = bstr_dup_c("/One\\two///ThRee%2ffive%5csix/se%xxven/%u0074");
325 cfg->path_case_insensitive = 1;
326 cfg->path_compress_separators = 1;
327 cfg->path_backslash_separators = 1;
328 cfg->path_encoded_separators_decode = 1;
329 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PROCESS_INVALID;
330
331 str = bstr_util_strdup_to_c(path);
332 printf("Before: %s\n", str);
333 free(str);
334 htp_decode_path_inplace(cfg, tx, path);
335 str = bstr_util_strdup_to_c(path);
336 printf("After: %s\n\n", str);
337 free(str);
338 bstr_free(path);
339
340 //
341 path = bstr_dup_c("/One\\two///ThRee%2ffive%5csix/se%xxven/%u0074%u0100");
342 cfg->path_case_insensitive = 1;
343 cfg->path_compress_separators = 1;
344 cfg->path_backslash_separators = 1;
345 cfg->path_encoded_separators_decode = 1;
346 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
347 cfg->path_u_encoding_decode = 1;
348
349 str = bstr_util_strdup_to_c(path);
350 printf("Before: %s\n", str);
351 free(str);
352 htp_decode_path_inplace(cfg, tx, path);
353 str = bstr_util_strdup_to_c(path);
354 printf("After: %s\n\n", str);
355 free(str);
356 bstr_free(path);
357 }
358
359 void encode_utf8_2(uint8_t *data, uint32_t i) {
360 i = i & 0x7ff;
361 data[0] = 0xc0 + (i >> 6);
362 data[1] = 0x80 + (i & 0x3f);
363 }
364
365 void encode_utf8_3(uint8_t *data, uint32_t i) {
366 i = i & 0xffff;
367 data[0] = 0xe0 + (i >> 12);
368 data[1] = 0x80 + ((i >> 6) & 0x3f);
369 data[2] = 0x80 + (i & 0x3f);
370 }
371
372 void encode_utf8_4(uint8_t *data, uint32_t i) {
373 i = i & 0x10ffff;
374 data[0] = 0xf0 + (i >> 18);
375 data[1] = 0x80 + ((i >> 12) & 0x3f);
376 data[2] = 0x80 + ((i >> 6) & 0x3f);
377 data[3] = 0x80 + (i & 0x3f);
378 }
379
380 int main_utf8_decoder_tests(int argc, char** argv) {
381 htp_cfg_t *cfg = htp_config_create();
382 htp_connp_t *connp = htp_connp_create(cfg);
383 htp_tx_t *tx = htp_tx_create(connp);
384
385 bstr *path = NULL;
386
387 path = bstr_dup_c("//////////");
388 uint8_t *data = bstr_ptr(path);
389
390 int i = 0;
391
392 for (i = 0; i < 0x80; i++) {
393 memset(data, 0x2f, 10);
394 tx->flags = 0;
395 encode_utf8_2(data, i);
396 htp_utf8_validate_path(tx, path);
397 if (tx->flags != HTP_PATH_UTF8_OVERLONG) {
398 printf("#2 i %i data %x %x flags %x\n", i, (uint8_t) data[0], (uint8_t) data[1], tx->flags);
399 }
400 }
401
402 for (i = 0; i < 0x800; i++) {
403 memset(data, 0x2f, 10);
404 tx->flags = 0;
405 encode_utf8_3(data, i);
406 htp_utf8_validate_path(tx, path);
407 if (tx->flags != HTP_PATH_UTF8_OVERLONG) {
408 printf("#3 i %x data %x %x %x flags %x\n", i, (uint8_t) data[0], (uint8_t) data[1], (uint8_t) data[2], tx->flags);
409 }
410 }
411
412 for (i = 0; i < 0x10000; i++) {
413 memset(data, 0x2f, 10);
414 tx->flags = 0;
415 encode_utf8_4(data, i);
416 htp_utf8_validate_path(tx, path);
417 if ((i >= 0xff00) && (i <= 0xffff)) {
418 if (tx->flags != (HTP_PATH_UTF8_OVERLONG | HTP_PATH_HALF_FULL_RANGE)) {
419 printf("#4 i %x data %x %x %x %x flags %x\n", i, (uint8_t) data[0], (uint8_t) data[1], (uint8_t) data[2], (uint8_t) data[3], tx->flags);
420 }
421 } else {
422 if (tx->flags != HTP_PATH_UTF8_OVERLONG) {
423 printf("#4 i %x data %x %x %x %x flags %x\n", i, (uint8_t) data[0], (uint8_t) data[1], (uint8_t) data[2], (uint8_t) data[3], tx->flags);
424 }
425 }
426 }
427
428 bstr_free(&path);
429 }
430
431 #define PATH_DECODE_TEST_BEFORE(NAME) \
432 test_name = NAME; \
433 tests++; \
434 expected_status = 0; \
435 expected_flags = -1; \
436 success = 0; \
437 cfg = htp_config_create(); \
438 connp = htp_connp_create(cfg); \
439 tx = htp_tx_create(connp);
440
441 #define PATH_DECODE_TEST_AFTER() \
442 htp_decode_path_inplace(cfg, tx, input); \
443 htp_utf8_decode_path_inplace(cfg, tx, input); \
444 if (bstr_cmp(input, expected) == 0) success = 1; \
445 printf("[%2i] %s: %s\n", tests, (success == 1 ? "SUCCESS" : "FAILURE"), test_name); \
446 if ((success == 0)||((expected_status != 0)&&(expected_status != tx->response_status_expected_number))) { \
447 char *s1 = bstr_util_strdup_to_c(input); \
448 char *s2 = bstr_util_strdup_to_c(expected); \
449 printf(" Output: [%s]\n", s1); \
450 printf(" Expected: [%s]\n", s2); \
451 if (expected_status != 0) { \
452 printf(" Expected status %i; got %i\n", expected_status, tx->response_status_expected_number); \
453 } \
454 if (expected_flags != -1) { \
455 printf(" Expected flags 0x%x; got 0x%x\n", expected_flags, tx->flags); \
456 } \
457 free(s2); \
458 free(s1); \
459 failures++; \
460 } \
461 htp_tx_destroy(tx); \
462 htp_config_destroy(cfg); \
463 bstr_free(&expected); \
464 bstr_free(&input);
465
466 int main_path_tests(int argc, char** argv) {
467 htp_cfg_t *cfg = NULL;
468 htp_connp_t *connp = NULL;
469 htp_tx_t *tx = NULL;
470 bstr *input = NULL;
471 bstr *expected = NULL;
472 int success = 0;
473 int tests = 0;
474 int failures = 0;
475 int expected_status = 0;
476 int expected_flags = 0;
477 char *test_name = NULL;
478
479 PATH_DECODE_TEST_BEFORE("URL-decoding");
480 input = bstr_dup_c("/%64est");
481 expected = bstr_dup_c("/dest");
482 PATH_DECODE_TEST_AFTER();
483
484 PATH_DECODE_TEST_BEFORE("Invalid URL-encoded, preserve %");
485 input = bstr_dup_c("/%xxest");
486 expected = bstr_dup_c("/%xxest");
487 expected_flags = HTP_PATH_INVALID_ENCODING;
488 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
489 PATH_DECODE_TEST_AFTER();
490
491 PATH_DECODE_TEST_BEFORE("Invalid URL-encoded, remove %");
492 input = bstr_dup_c("/%xxest");
493 expected = bstr_dup_c("/xxest");
494 expected_flags = HTP_PATH_INVALID_ENCODING;
495 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_REMOVE_PERCENT;
496 PATH_DECODE_TEST_AFTER();
497
498 PATH_DECODE_TEST_BEFORE("Invalid URL-encoded (end of string, test 1), preserve %");
499 input = bstr_dup_c("/test/%2");
500 expected = bstr_dup_c("/test/%2");
501 expected_flags = HTP_PATH_INVALID_ENCODING;
502 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
503 PATH_DECODE_TEST_AFTER();
504
505 PATH_DECODE_TEST_BEFORE("Invalid URL-encoded (end of string, test 2), preserve %");
506 input = bstr_dup_c("/test/%");
507 expected = bstr_dup_c("/test/%");
508 expected_flags = HTP_PATH_INVALID_ENCODING;
509 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
510 PATH_DECODE_TEST_AFTER();
511
512 PATH_DECODE_TEST_BEFORE("Invalid URL-encoded, preserve % and 400");
513 input = bstr_dup_c("/%xxest");
514 expected = bstr_dup_c("/%xxest");
515 expected_status = 400;
516 expected_flags = HTP_PATH_INVALID_ENCODING;
517 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
518 cfg->path_invalid_encoding_unwanted = HTP_UNWANTED_400;
519 PATH_DECODE_TEST_AFTER();
520
521 PATH_DECODE_TEST_BEFORE("%u decoding (expected not to decode; 400)");
522 input = bstr_dup_c("/%u0064");
523 expected = bstr_dup_c("/%u0064");
524 expected_flags = HTP_PATH_INVALID_ENCODING;
525 expected_status = 400;
526 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
527 cfg->path_invalid_encoding_unwanted = HTP_UNWANTED_400;
528 PATH_DECODE_TEST_AFTER();
529
530 PATH_DECODE_TEST_BEFORE("%u decoding (decode; 400)");
531 input = bstr_dup_c("/%u0064");
532 expected = bstr_dup_c("/d");
533 expected_status = 400;
534 expected_flags = HTP_PATH_OVERLONG_U;
535 cfg->path_u_encoding_unwanted = HTP_UNWANTED_400;
536 PATH_DECODE_TEST_AFTER();
537
538 PATH_DECODE_TEST_BEFORE("%u decoding (also overlong)");
539 input = bstr_dup_c("/%u0064");
540 expected = bstr_dup_c("/d");
541 expected_flags = HTP_PATH_OVERLONG_U;
542 cfg->path_u_encoding_decode = 1;
543 PATH_DECODE_TEST_AFTER();
544
545 PATH_DECODE_TEST_BEFORE("Invalid %u decoding, leave; preserve percent");
546 input = bstr_dup_c("/%uXXXX---");
547 expected = bstr_dup_c("/%uXXXX---");
548 expected_flags = HTP_PATH_INVALID_ENCODING;
549 cfg->path_u_encoding_decode = 1;
550 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
551 PATH_DECODE_TEST_AFTER();
552
553 PATH_DECODE_TEST_BEFORE("Invalid %u decoding, decode invalid; preserve percent");
554 input = bstr_dup_c("/%uXXXX---");
555 expected = bstr_dup_c("/?---");
556 expected_flags = HTP_PATH_INVALID_ENCODING;
557 cfg->path_u_encoding_decode = 1;
558 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PROCESS_INVALID;
559 PATH_DECODE_TEST_AFTER();
560
561 PATH_DECODE_TEST_BEFORE("Invalid %u decoding, decode invalid; preserve percent; 400");
562 input = bstr_dup_c("/%uXXXX---");
563 expected = bstr_dup_c("/?---");
564 expected_flags = HTP_PATH_INVALID_ENCODING;
565 expected_status = 400;
566 cfg->path_u_encoding_decode = 1;
567 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
568 cfg->path_invalid_encoding_unwanted = HTP_UNWANTED_400;
569 PATH_DECODE_TEST_AFTER();
570
571 PATH_DECODE_TEST_BEFORE("Invalid %u decoding (not enough data 1), preserve percent");
572 input = bstr_dup_c("/%u123");
573 expected = bstr_dup_c("/%u123");
574 expected_flags = HTP_PATH_INVALID_ENCODING;
575 cfg->path_u_encoding_decode = 1;
576 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
577 PATH_DECODE_TEST_AFTER();
578
579 PATH_DECODE_TEST_BEFORE("Invalid %u decoding (not enough data 2), preserve percent");
580 input = bstr_dup_c("/%u12");
581 expected = bstr_dup_c("/%u12");
582 expected_flags = HTP_PATH_INVALID_ENCODING;
583 cfg->path_u_encoding_decode = 1;
584 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
585 PATH_DECODE_TEST_AFTER();
586
587 PATH_DECODE_TEST_BEFORE("Invalid %u decoding (not enough data 3), preserve percent");
588 input = bstr_dup_c("/%u1");
589 expected = bstr_dup_c("/%u1");
590 expected_flags = HTP_PATH_INVALID_ENCODING;
591 cfg->path_u_encoding_decode = 1;
592 cfg->path_invalid_encoding_handling = HTP_URL_DECODE_PRESERVE_PERCENT;
593 PATH_DECODE_TEST_AFTER();
594
595 PATH_DECODE_TEST_BEFORE("%u decoding, best-fit mapping");
596 input = bstr_dup_c("/%u0107");
597 expected = bstr_dup_c("/c");
598 cfg->path_u_encoding_decode = 1;
599 PATH_DECODE_TEST_AFTER();
600
601 PATH_DECODE_TEST_BEFORE("%u decoding, 404 to UCS-2 characters");
602 input = bstr_dup_c("/%u0107");
603 expected = bstr_dup_c("/c");
604 expected_status = 404;
605 cfg->path_u_encoding_decode = 1;
606 cfg->path_unicode_unwanted = HTP_UNWANTED_404;
607 PATH_DECODE_TEST_AFTER();
608
609 PATH_DECODE_TEST_BEFORE("Forward slash (URL-encoded), not expect to decode");
610 input = bstr_dup_c("/one%2ftwo");
611 expected = bstr_dup_c("/one%2ftwo");
612 PATH_DECODE_TEST_AFTER();
613
614 PATH_DECODE_TEST_BEFORE("Forward slash (URL-encoded), expect to decode");
615 input = bstr_dup_c("/one%2ftwo");
616 expected = bstr_dup_c("/one/two");
617 cfg->path_encoded_separators_decode = 1;
618 PATH_DECODE_TEST_AFTER();
619
620 PATH_DECODE_TEST_BEFORE("Forward slash (URL-encoded), expect not do decode and 404");
621 input = bstr_dup_c("/one%2ftwo");
622 expected = bstr_dup_c("/one%2ftwo");
623 expected_status = 404;
624 cfg->path_encoded_separators_decode = 0;
625 cfg->path_encoded_separators_unwanted = HTP_UNWANTED_404;
626 PATH_DECODE_TEST_AFTER();
627
628 PATH_DECODE_TEST_BEFORE("Forward slash (%u-encoded), expect to decode");
629 input = bstr_dup_c("/one%u002ftwo");
630 expected = bstr_dup_c("/one/two");
631 cfg->path_encoded_separators_decode = 1;
632 cfg->path_u_encoding_decode = 1;
633 PATH_DECODE_TEST_AFTER();
634
635 PATH_DECODE_TEST_BEFORE("Forward slash (%u-encoded, fullwidth), expect to decode");
636 input = bstr_dup_c("/one%uff0ftwo");
637 expected = bstr_dup_c("/one/two");
638 cfg->path_encoded_separators_decode = 1;
639 cfg->path_u_encoding_decode = 1;
640 PATH_DECODE_TEST_AFTER();
641
642 PATH_DECODE_TEST_BEFORE("Backslash (URL-encoded), not a separator; expect to decode");
643 input = bstr_dup_c("/one%5ctwo");
644 expected = bstr_dup_c("/one\\two");
645 cfg->path_encoded_separators_decode = 1;
646 PATH_DECODE_TEST_AFTER();
647
648 PATH_DECODE_TEST_BEFORE("Backslash (URL-encoded), as path segment separator");
649 input = bstr_dup_c("/one%5ctwo");
650 expected = bstr_dup_c("/one/two");
651 cfg->path_encoded_separators_decode = 1;
652 cfg->path_backslash_separators = 1;
653 PATH_DECODE_TEST_AFTER();
654
655 PATH_DECODE_TEST_BEFORE("Backslash (not encoded), as path segment separator");
656 input = bstr_dup_c("/one\\two");
657 expected = bstr_dup_c("/one/two");
658 cfg->path_backslash_separators = 1;
659 PATH_DECODE_TEST_AFTER();
660
661 PATH_DECODE_TEST_BEFORE("Backslash (%u-encoded), as path segment separator");
662 input = bstr_dup_c("/one%u005ctwo");
663 expected = bstr_dup_c("/one/two");
664 cfg->path_encoded_separators_decode = 1;
665 cfg->path_backslash_separators = 1;
666 cfg->path_u_encoding_decode = 1;
667 PATH_DECODE_TEST_AFTER();
668
669 PATH_DECODE_TEST_BEFORE("Backslash (%u-encoded, fullwidth), as path segment separator");
670 input = bstr_dup_c("/one%uff3ctwo");
671 expected = bstr_dup_c("/one/two");
672 cfg->path_encoded_separators_decode = 1;
673 cfg->path_backslash_separators = 1;
674 cfg->path_u_encoding_decode = 1;
675 PATH_DECODE_TEST_AFTER();
676
677 PATH_DECODE_TEST_BEFORE("Invalid UTF-8 encoding, encoded");
678 input = bstr_dup_c("/%f7test");
679 expected = bstr_dup_c("/\xf7test");
680 PATH_DECODE_TEST_AFTER();
681
682 PATH_DECODE_TEST_BEFORE("Invalid UTF-8 encoding, encoded (400)");
683 input = bstr_dup_c("/%f7test");
684 expected = bstr_dup_c("/\xf7test");
685 expected_status = 400;
686 expected_flags = HTP_PATH_UTF8_INVALID;
687 cfg->path_utf8_invalid_unwanted = HTP_UNWANTED_400;
688 PATH_DECODE_TEST_AFTER();
689
690 PATH_DECODE_TEST_BEFORE("NUL byte (raw) in path; leave");
691 input = bstr_dup_mem("/test\0text", 10);
692 expected = bstr_dup_mem("/test\0text", 10);
693 PATH_DECODE_TEST_AFTER();
694
695 PATH_DECODE_TEST_BEFORE("NUL byte (raw) in path; terminate path");
696 input = bstr_dup_mem("/test\0text", 10);
697 expected = bstr_dup_c("/test");
698 cfg->path_nul_raw_terminates = 1;
699 PATH_DECODE_TEST_AFTER();
700
701 PATH_DECODE_TEST_BEFORE("NUL byte (raw) in path; 400");
702 input = bstr_dup_mem("/test\0text", 10);
703 expected = bstr_dup_mem("/test\0text", 10);
704 cfg->path_nul_raw_unwanted = HTP_UNWANTED_400;
705 PATH_DECODE_TEST_AFTER();
706
707 PATH_DECODE_TEST_BEFORE("NUL byte (URL-encoded) in path; leave");
708 input = bstr_dup_c("/test%00text");
709 expected = bstr_dup_mem("/test\0text", 10);
710 PATH_DECODE_TEST_AFTER();
711
712 PATH_DECODE_TEST_BEFORE("NUL byte (URL-encoded) in path; terminate path");
713 input = bstr_dup_c("/test%00text");
714 expected = bstr_dup_c("/test");
715 cfg->path_nul_encoded_terminates = 1;
716 PATH_DECODE_TEST_AFTER();
717
718 PATH_DECODE_TEST_BEFORE("NUL byte (URL-encoded) in path; 400");
719 input = bstr_dup_c("/test%00text");
720 expected = bstr_dup_mem("/test\0text", 10);
721 cfg->path_nul_encoded_unwanted = HTP_UNWANTED_404;
722 expected_status = 400;
723 PATH_DECODE_TEST_AFTER();
724
725 PATH_DECODE_TEST_BEFORE("NUL byte (URL-encoded) in path; 404");
726 input = bstr_dup_c("/test%00text");
727 expected = bstr_dup_mem("/test\0text", 10);
728 cfg->path_nul_encoded_unwanted = HTP_UNWANTED_404;
729 expected_status = 404;
730 PATH_DECODE_TEST_AFTER();
731
732 PATH_DECODE_TEST_BEFORE("NUL byte (%u-encoded) in path; terminate path");
733 input = bstr_dup_c("/test%00text");
734 expected = bstr_dup_c("/test");
735 cfg->path_nul_encoded_terminates = 1;
736 cfg->path_u_encoding_decode = 1;
737 PATH_DECODE_TEST_AFTER();
738
739 PATH_DECODE_TEST_BEFORE("NUL byte (%u-encoded) in path; 400");
740 input = bstr_dup_c("/test%00text");
741 expected = bstr_dup_mem("/test\0text", 10);
742 cfg->path_nul_encoded_unwanted = HTP_UNWANTED_404;
743 cfg->path_u_encoding_decode = 1;
744 expected_status = 400;
745 PATH_DECODE_TEST_AFTER();
746
747 PATH_DECODE_TEST_BEFORE("NUL byte (%u-encoded) in path; 404");
748 input = bstr_dup_c("/test%00text");
749 expected = bstr_dup_mem("/test\0text", 10);
750 cfg->path_nul_encoded_unwanted = HTP_UNWANTED_404;
751 cfg->path_u_encoding_decode = 1;
752 expected_status = 404;
753 PATH_DECODE_TEST_AFTER();
754
755 PATH_DECODE_TEST_BEFORE("Control char in path, encoded (no effect)");
756 input = bstr_dup_c("/%01test");
757 expected = bstr_dup_c("/\x01test");
758 cfg->path_control_chars_unwanted = HTP_UNWANTED_IGNORE;
759 PATH_DECODE_TEST_AFTER();
760
761 PATH_DECODE_TEST_BEFORE("Control char in path, raw (no effect)");
762 input = bstr_dup_c("/\x01test");
763 expected = bstr_dup_c("/\x01test");
764 cfg->path_control_chars_unwanted = HTP_UNWANTED_IGNORE;
765 PATH_DECODE_TEST_AFTER();
766
767 PATH_DECODE_TEST_BEFORE("Control char in path, encoded (400)");
768 input = bstr_dup_c("/%01test");
769 expected = bstr_dup_c("/\x01test");
770 expected_status = 400;
771 cfg->path_control_chars_unwanted = HTP_UNWANTED_400;
772 PATH_DECODE_TEST_AFTER();
773
774 PATH_DECODE_TEST_BEFORE("Control char in path, raw (400)");
775 input = bstr_dup_c("/\x01test");
776 expected = bstr_dup_c("/\x01test");
777 expected_status = 400;
778 cfg->path_control_chars_unwanted = HTP_UNWANTED_400;
779 PATH_DECODE_TEST_AFTER();
780
781 PATH_DECODE_TEST_BEFORE("UTF-8; overlong 2-byte sequence");
782 input = bstr_dup_c("/%c1%b4est");
783 expected = bstr_dup_c("/test");
784 expected_flags = HTP_PATH_UTF8_OVERLONG;
785 PATH_DECODE_TEST_AFTER();
786
787 PATH_DECODE_TEST_BEFORE("UTF-8; overlong 3-byte sequence");
788 input = bstr_dup_c("/%e0%81%b4est");
789 expected = bstr_dup_c("/test");
790 expected_flags = HTP_PATH_UTF8_OVERLONG;
791 PATH_DECODE_TEST_AFTER();
792
793 PATH_DECODE_TEST_BEFORE("UTF-8; overlong 4-byte sequence");
794 input = bstr_dup_c("/%f0%80%81%b4est");
795 expected = bstr_dup_c("/test");
796 expected_flags = HTP_PATH_UTF8_OVERLONG;
797 PATH_DECODE_TEST_AFTER();
798
799 printf("\n");
800 printf("Total tests: %i, %i failure(s).\n", tests, failures);
801 }
+0
-17
test/pcaptohtp.py less more
0 import sys
1 import binascii
2
3 # Transforms a pcap into a test file for libhtp
4 # tshark -Tfields -e tcp.dstport -e tcp.payload -r input.pcap > input.txt
5 # python pcaptohtp.py input.txt > input.t
6
7 f = open(sys.argv[1])
8 for l in f.readlines():
9 portAndPl=l.split()
10 if len(portAndPl) == 2:
11 # determine request or response based on port
12 if portAndPl[0] == "80":
13 print(">>>")
14 else:
15 print("<<<")
16 print(binascii.unhexlify(portAndPl[1].replace(":","")))
+0
-351
test/test-tcpick.c less more
0 /***************************************************************************
1 * Copyright (c) 2009-2010 Open Information Security Foundation
2 * Copyright (c) 2010-2013 Qualys, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15
16 * - Neither the name of the Qualys, Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ***************************************************************************/
32
33 /**
34 * @file
35 * @author Ivan Ristic <ivanr@webkreator.com>
36 */
37
38 #include <ctype.h>
39 #include <dirent.h>
40 #include <sys/time.h>
41 #include <sys/types.h>
42 #include <time.h>
43
44 #include "../htp/htp.h"
45
46 #define CLIENT 1
47 #define SERVER 2
48
49 static int parse_filename(const char *filename, char **remote_addr, char **local_addr) {
50 char *copy = strdup(filename);
51 char *p, *saveptr;
52
53 char *start = copy;
54 char *q = strrchr(copy, '/');
55 if (q != NULL) start = q;
56
57 q = strrchr(start, '\\');
58 if (q != NULL) start = q;
59
60 int count = 0;
61 p = strtok_r(start, "_", &saveptr);
62 while (p != NULL) {
63 count++;
64 // printf("%i %s\n", count, p);
65
66 switch (count) {
67 case 3:
68 *remote_addr = strdup(p);
69 break;
70 case 4:
71 *local_addr = strdup(p);
72 break;
73 }
74
75 p = strtok_r(NULL, "_", &saveptr);
76 }
77
78 free(copy);
79
80 return 0;
81 }
82
83 static int parse_chunk_info(char *buf, size_t *response_offset, size_t *response_len) {
84 char *p = buf;
85 size_t lastlen;
86
87 while ((*p != ']') && (p != '\0')) p++;
88 if (*p == '\0') return -1;
89 p++;
90
91 while (isspace(*p)) p++;
92
93 *response_offset = bstr_util_mem_to_pint(p, strlen(p), 10, &lastlen);
94
95 p += lastlen;
96
97 while ((*p != '(') && (p != '\0')) p++;
98 if (*p == '\0') return -1;
99 p++;
100
101 *response_len = bstr_util_mem_to_pint(p, strlen(p), 10, &lastlen);
102
103 return 1;
104 }
105
106 static int tcpick_run_file(const char *filename, htp_cfg_t *cfg, htp_connp_t **connp) {
107 struct timeval tv;
108 char buf[1025];
109 int first = -1, current = -1;
110 char *remote_addr, *local_addr;
111
112 char *request_last_chunk = NULL;
113 char *response_last_chunk = NULL;
114 size_t request_offset, request_len;
115 size_t request_last_offset = 0, request_last_len = 0;
116 size_t response_offset, response_len;
117 size_t response_last_offset = 0, response_last_len = 0;
118
119 if (parse_filename(filename, &remote_addr, &local_addr) < 0) {
120 printf("Failed to parse filename: %s\n", filename);
121 return -1;
122 }
123
124 FILE *f = fopen(filename, "rb");
125 if (f == NULL) {
126 printf("Unable to open file: %s\n", filename);
127 return -1;
128 }
129
130 gettimeofday(&tv, NULL);
131
132 // Create parser
133 *connp = htp_connp_create(cfg);
134
135 // Find all chunks and feed them to the parser
136 while (fgets(buf, 1024, f) != NULL) {
137 // Ignore empty lines
138 if (buf[0] == LF) {
139 continue;
140 }
141
142 if (strncmp(buf, "[server", 7) == 0) {
143 current = SERVER;
144 } else {
145 current = CLIENT;
146 }
147
148 if (first == -1) {
149 first = current;
150
151 if (first == SERVER) {
152 htp_connp_open(*connp, local_addr, 80, remote_addr, 80, &tv);
153 } else {
154 htp_connp_open(*connp, remote_addr, 80, local_addr, 80, &tv);
155 }
156 }
157
158 int len = 0;
159
160 if (first == current) {
161 if (parse_chunk_info(buf, &request_offset, &request_len) < 0) {
162 printf("Invalid line: %s", buf);
163 fclose(f);
164 htp_connp_destroy_all(*connp);
165 *connp = NULL;
166 return -1;
167 }
168
169 len = request_len;
170
171 // printf("# Request offset %i len %i\n", request_offset, request_len);
172 } else {
173 if (parse_chunk_info(buf, &response_offset, &response_len) < 0) {
174 printf("Invalid line: %s", buf);
175 fclose(f);
176 htp_connp_destroy_all(*connp);
177 *connp = NULL;
178 return -1;
179 }
180
181 len = response_len;
182
183 // printf("# Response offset %i len %i\n", response_offset, response_len);
184 }
185
186 // printf("Len: %i\n", len);
187
188 if (len <= 0) {
189 printf("Invalid length: %i\n", len);
190 fclose(f);
191 htp_connp_destroy_all(*connp);
192 *connp = NULL;
193 return -1;
194 }
195
196 char *data = malloc(len);
197 if (data == NULL) {
198 printf("Failed to allocate %i bytes\n", len);
199 fclose(f);
200 htp_connp_destroy_all(*connp);
201 *connp = NULL;
202 return -1;
203 }
204
205 int read = fread(data, 1, len, f);
206 if (read != len) {
207 // printf("Failed to read %i bytes (got %i)\n", len, read);
208 fclose(f);
209 htp_connp_destroy_all(*connp);
210 *connp = NULL;
211 return -1;
212 }
213
214 if (first == current) {
215 if ((request_last_chunk == NULL) || (request_len != request_last_len) || (memcmp(data, request_last_chunk, request_len) != 0)) {
216 // printf("# Parse request data: %i byte(s)\n", len);
217 if (htp_connp_req_data(*connp, &tv, data, len) == HTP_ERROR) {
218 fclose(f);
219 return -1;
220 }
221 }
222
223 request_last_offset = request_offset;
224 request_last_len = request_len;
225 if (request_last_chunk != NULL) {
226 free(request_last_chunk);
227 }
228 request_last_chunk = data;
229 } else {
230 if ((response_last_chunk == NULL) || (response_len != response_last_len) || (memcmp(data, response_last_chunk, response_len) != 0)) {
231 // printf("# Parse response data: %i byte(s)\n", len);
232 if (htp_connp_res_data(*connp, &tv, data, len) == HTP_ERROR) {
233 fclose(f);
234 return -1;
235 }
236 }
237
238 response_last_offset = response_offset;
239 response_last_len = response_len;
240 if (response_last_chunk != NULL) {
241 free(response_last_chunk);
242 }
243 response_last_chunk = data;
244 }
245 }
246
247 fclose(f);
248
249 htp_connp_close(*connp, &tv);
250
251 return 1;
252 }
253
254 static void print_tx(htp_connp_t *connp, htp_tx_t *tx) {
255 char *request_line = bstr_util_strdup_to_c(tx->request_line);
256 htp_header_t *h_user_agent = htp_table_get_c(tx->request_headers, "user-agent");
257 htp_header_t *h_referer = htp_table_get_c(tx->request_headers, "referer");
258 char *referer, *user_agent;
259 char buf[256];
260
261 time_t t = time(NULL);
262 struct tm *tmp = localtime(&t);
263
264 strftime(buf, 255, "%d/%b/%Y:%T %z", tmp);
265
266 if (h_user_agent == NULL) user_agent = strdup("-");
267 else {
268 user_agent = bstr_util_strdup_to_c(h_user_agent->value);
269 }
270
271 if (h_referer == NULL) referer = strdup("-");
272 else {
273 referer = bstr_util_strdup_to_c(h_referer->value);
274 }
275
276 printf("%s - - [%s] \"%s\" %i %zu \"%s\" \"%s\"\n", connp->conn->client_addr, buf,
277 request_line, tx->response_status_number, tx->response_message_len,
278 referer, user_agent);
279
280 free(referer);
281 free(user_agent);
282 free(request_line);
283 }
284
285 static int run_file(char *filename, htp_cfg_t *cfg) {
286 htp_connp_t *connp;
287
288 fprintf(stdout, "Running file %s", filename);
289
290 int rc = tcpick_run_file(filename, cfg, &connp);
291 if (rc < 0) {
292 if (connp != NULL) {
293 htp_log_t *last_error = htp_connp_get_last_error(connp);
294 if (last_error != NULL) {
295 printf(" -- failed: %s\n", last_error->msg);
296 } else {
297 printf(" -- failed: ERROR NOT AVAILABLE\n");
298 }
299
300 return 0;
301 } else {
302 return -1;
303 }
304 } else {
305 printf(" -- %zu transaction(s)\n", htp_list_size(connp->conn->transactions));
306
307 for (int i = 0, n = htp_list_size(connp->conn->transactions); i < n; i++) {
308 htp_tx_t *tx = htp_list_get(connp->conn->transactions, i);
309
310 printf(" ");
311 print_tx(connp, tx);
312 }
313
314 printf("\n");
315
316 htp_connp_destroy_all(connp);
317
318 return 1;
319 }
320 }
321
322 static int run_directory(char *dirname, htp_cfg_t *cfg) {
323 struct dirent *entry;
324 char buf[1025];
325 DIR *d = opendir(dirname);
326
327 if (d == NULL) {
328 printf("Failed to open directory: %s\n", dirname);
329 return -1;
330 }
331
332 while ((entry = readdir(d)) != NULL) {
333 if (strncmp(entry->d_name, "tcpick", 6) == 0) {
334 strncpy(buf, dirname, 1024);
335 strncat(buf, "/", 1024 - strlen(buf));
336 strncat(buf, entry->d_name, 1024 - strlen(buf));
337
338 // fprintf(stderr, "Filename: %s\n", buf);
339 run_file(buf, cfg);
340 //if (run_file(buf, cfg) <= 0) {
341 // closedir(d);
342 // return 0;
343 //}
344 }
345 }
346
347 closedir(d);
348
349 return 1;
350 }
169169 }
170170
171171 test->chunk = NULL;
172 int isgap = 0;
172173
173174 while (test->pos < test->len) {
174175 // Do we need to start another chunk?
180181 return -1;
181182 }
182183
184 if (test->buf[test->pos + 1] != test->buf[test->pos + 2]) {
185 isgap = 1;
186 } else {
187 isgap = 0;
188 }
183189 // Move over the boundary
184190 test->pos += 4;
185191 if (test->pos >= test->len) {
186192 return 0;
187193 }
188 if (test->buf[test->pos] == '\n') test->pos++;
194 if (test->buf[test->pos-1] == '\r') test->pos++;
189195 if (test->pos >= test->len) {
190196 return 0;
191197 }
193199 // Start new chunk
194200 test->chunk = test->buf + test->pos;
195201 test->chunk_offset = test->pos;
202 // if it is empty (boundary already), continue to next chunk
203 if (test_is_boundary(test, test->pos) > 0) {
204 test->chunk = NULL;
205 continue;
206 }
196207 }
197208
198209 // Are we at the end of a line?
207218 if ((test->chunk_len > 0) && (test->chunk[test->chunk_len - 1] == '\r')) {
208219 test->chunk_len--;
209220 }
210 if (test->buf[test->pos + 1] != test->buf[test->pos + 2]) {
211 // test gap
212 test->chunk = NULL;
213 }
214221
215222 // Position at the next boundary line
216223 test->pos++;
217224 if (test->pos >= test->len) {
218225 return 0;
219226 }
227 if (isgap) {
228 test->chunk = NULL;
229 }
220230
221231 return 1;
222232 }
228238
229239 if (test->chunk != NULL) {
230240 test->chunk_len = test->pos - test->chunk_offset;
241 if (isgap) {
242 test->chunk = NULL;
243 }
231244 return 1;
232245 }
233246
+0
-9
test/valgrind less more
0 #!/bin/sh
1 # --gen-suppressions=all \
2 exec valgrind \
3 --suppressions=valgrind.supp \
4 --leak-check=full \
5 --show-reachable=yes \
6 --dsymutil=yes \
7 "$@"
8
+0
-155
test/valgrind.supp less more
0 {
1 gtest_1
2 Memcheck:Leak
3 fun:malloc
4 fun:__smakebuf
5 fun:__swsetup
6 fun:__sfvwrite
7 fun:fwrite
8 fun:_ZSt15__ostream_writeIcSt11char_traitsIcEEvRSt13basic_ostreamIT_T0_EPKS3_l
9 fun:_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
10 fun:main
11 }
12 {
13 gtest_2
14 Memcheck:Leak
15 fun:malloc
16 fun:_Znwm
17 fun:_Znam
18 fun:_ZN7testing4TestC2Ev
19 fun:_ZN7testing8internal15TestFactoryImplI26ConnectionParsing_Get_TestE10CreateTestEv
20 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc
21 fun:_ZN7testing8TestInfo3RunEv
22 fun:_ZN7testing8TestCase3RunEv
23 fun:_ZN7testing8internal12UnitTestImpl11RunAllTestsEv
24 fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
25 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
26 fun:_ZN7testing8UnitTest3RunEv
27 }
28 {
29 gtest_3
30 Memcheck:Leak
31 fun:malloc
32 fun:_Znwm
33 fun:_Znam
34 fun:_ZN7testing4TestC2Ev
35 fun:_ZN7testing8internal15TestFactoryImplI26ConnectionParsing_Get_TestE10CreateTestEv
36 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc
37 fun:_ZN7testing8TestInfo3RunEv
38 fun:_ZN7testing8TestCase3RunEv
39 fun:_ZN7testing8internal12UnitTestImpl11RunAllTestsEv
40 fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
41 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
42 fun:_ZN7testing8UnitTest3RunEv
43 }
44 {
45 gtest_4
46 Memcheck:Leak
47 fun:malloc
48 fun:_Znwm
49 fun:_Znam
50 fun:_ZN7testing4TestC2Ev
51 fun:_ZN7testing8internal15TestFactoryImplI26ConnectionParsing_Get_TestE10CreateTestEv
52 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc
53 fun:_ZN7testing8TestInfo3RunEv
54 fun:_ZN7testing8TestCase3RunEv
55 fun:_ZN7testing8internal12UnitTestImpl11RunAllTestsEv
56 fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
57 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
58 fun:_ZN7testing8UnitTest3RunEv
59 }
60 {
61 gtest_5
62 Memcheck:Leak
63 fun:malloc
64 fun:_Znwm
65 fun:_Znam
66 fun:_ZN7testing4TestC2Ev
67 fun:_ZN7testing8internal15TestFactoryImplI26ConnectionParsing_Get_TestE10CreateTestEv
68 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc
69 fun:_ZN7testing8TestInfo3RunEv
70 fun:_ZN7testing8TestCase3RunEv
71 fun:_ZN7testing8internal12UnitTestImpl11RunAllTestsEv
72 fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
73 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
74 fun:_ZN7testing8UnitTest3RunEv
75 }
76 {
77 gtest_6
78 Memcheck:Leak
79 fun:malloc
80 fun:_Znwm
81 fun:_Znam
82 fun:_ZN7testing4TestC2Ev
83 fun:_ZN7testing8internal15TestFactoryImplI26ConnectionParsing_Get_TestE10CreateTestEv
84 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc
85 fun:_ZN7testing8TestInfo3RunEv
86 fun:_ZN7testing8TestCase3RunEv
87 fun:_ZN7testing8internal12UnitTestImpl11RunAllTestsEv
88 fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
89 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
90 fun:_ZN7testing8UnitTest3RunEv
91 }
92 {
93 gtest_7
94 Memcheck:Leak
95 fun:malloc
96 fun:_Znwm
97 fun:_Znam
98 fun:_ZN7testing4TestC2Ev
99 fun:_ZN7testing8internal15TestFactoryImplI26ConnectionParsing_Get_TestE10CreateTestEv
100 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc
101 fun:_ZN7testing8TestInfo3RunEv
102 fun:_ZN7testing8TestCase3RunEv
103 fun:_ZN7testing8internal12UnitTestImpl11RunAllTestsEv
104 fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
105 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
106 fun:_ZN7testing8UnitTest3RunEv
107 }
108 {
109 gtest_8
110 Memcheck:Leak
111 fun:malloc
112 fun:_Znwm
113 fun:_ZN7testing8internal15TestFactoryImplI26ConnectionParsing_Get_TestE10CreateTestEv
114 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc
115 fun:_ZN7testing8TestInfo3RunEv
116 fun:_ZN7testing8TestCase3RunEv
117 fun:_ZN7testing8internal12UnitTestImpl11RunAllTestsEv
118 fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
119 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
120 fun:_ZN7testing8UnitTest3RunEv
121 fun:main
122 }
123 {
124 gtest_9
125 Memcheck:Leak
126 fun:malloc
127 fun:_Znwm
128 fun:_ZN7testing4TestC2Ev
129 fun:_ZN7testing8internal15TestFactoryImplI26ConnectionParsing_Get_TestE10CreateTestEv
130 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc
131 fun:_ZN7testing8TestInfo3RunEv
132 fun:_ZN7testing8TestCase3RunEv
133 fun:_ZN7testing8internal12UnitTestImpl11RunAllTestsEv
134 fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
135 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc
136 fun:_ZN7testing8UnitTest3RunEv
137 fun:main
138 }
139 {
140 fprintf
141 Memcheck:Leak
142 fun:malloc
143 fun:__smakebuf
144 fun:__swsetup
145 fun:__vfprintf
146 fun:vfprintf_l
147 fun:fprintf
148 fun:fprint_raw_data_ex
149 fun:_ZN27ConnectionParsing_Util_Test8TestBodyEv
150 fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc
151 fun:_ZN7testing4Test3RunEv
152 fun:_ZN7testing8TestInfo3RunEv
153 fun:_ZN7testing8TestCase3RunEv
154 }
0 #! /bin/sh
1 # test-driver - basic testsuite driver script.
2
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 2011-2021 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 # 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
49 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
50 See the GNU Automake documentation for information.
51 END
52 }
53
54 test_name= # Used for reporting.
55 log_file= # Where to save the output of the test script.
56 trs_file= # Where to save the metadata of the test run.
57 expect_failure=no
58 color_tests=no
59 enable_hard_errors=yes
60 while test $# -gt 0; do
61 case $1 in
62 --help) print_usage; exit $?;;
63 --version) echo "test-driver $scriptversion"; exit $?;;
64 --test-name) test_name=$2; shift;;
65 --log-file) log_file=$2; shift;;
66 --trs-file) trs_file=$2; shift;;
67 --color-tests) color_tests=$2; shift;;
68 --expect-failure) expect_failure=$2; shift;;
69 --enable-hard-errors) enable_hard_errors=$2; shift;;
70 --) shift; break;;
71 -*) usage_error "invalid option: '$1'";;
72 *) break;;
73 esac
74 shift
75 done
76
77 missing_opts=
78 test x"$test_name" = x && missing_opts="$missing_opts --test-name"
79 test x"$log_file" = x && missing_opts="$missing_opts --log-file"
80 test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
81 if test x"$missing_opts" != x; then
82 usage_error "the following mandatory options are missing:$missing_opts"
83 fi
84
85 if test $# -eq 0; then
86 usage_error "missing argument"
87 fi
88
89 if test $color_tests = yes; then
90 # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
91 red='' # Red.
92 grn='' # Green.
93 lgn='' # Light green.
94 blu='' # Blue.
95 mgn='' # Magenta.
96 std='' # No color.
97 else
98 red= grn= lgn= blu= mgn= std=
99 fi
100
101 do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
102 trap "st=129; $do_exit" 1
103 trap "st=130; $do_exit" 2
104 trap "st=141; $do_exit" 13
105 trap "st=143; $do_exit" 15
106
107 # Test script is run here. We create the file first, then append to it,
108 # to ameliorate tests themselves also writing to the log file. Our tests
109 # don't, but others can (automake bug#35762).
110 : >"$log_file"
111 "$@" >>"$log_file" 2>&1
112 estatus=$?
113
114 if test $enable_hard_errors = no && test $estatus -eq 99; then
115 tweaked_estatus=1
116 else
117 tweaked_estatus=$estatus
118 fi
119
120 case $tweaked_estatus:$expect_failure in
121 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
122 0:*) col=$grn res=PASS recheck=no gcopy=no;;
123 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
124 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
125 *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
126 *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
127 esac
128
129 # Report the test outcome and exit status in the logs, so that one can
130 # know whether the test passed or failed simply by looking at the '.log'
131 # file, without the need of also peaking into the corresponding '.trs'
132 # file (automake bug#11814).
133 echo "$res $test_name (exit status: $estatus)" >>"$log_file"
134
135 # Report outcome to console.
136 echo "${col}${res}${std}: $test_name"
137
138 # Register the test result, and other relevant metadata.
139 echo ":test-result: $res" > $trs_file
140 echo ":global-test-result: $res" >> $trs_file
141 echo ":recheck: $recheck" >> $trs_file
142 echo ":copy-in-global-log: $gcopy" >> $trs_file
143
144 # Local Variables:
145 # mode: shell-script
146 # sh-indentation: 2
147 # eval: (add-hook 'before-save-hook 'time-stamp)
148 # time-stamp-start: "scriptversion="
149 # time-stamp-format: "%:y-%02m-%02d.%02H"
150 # time-stamp-time-zone: "UTC0"
151 # time-stamp-end: "; # UTC"
152 # End: