1 | # aclocal.m4 generated automatically by aclocal 1.5 |
---|
2 | |
---|
3 | # Copyright 1996, 1997, 1998, 1999, 2000, 2001 |
---|
4 | # Free Software Foundation, Inc. |
---|
5 | # This file is free software; the Free Software Foundation |
---|
6 | # gives unlimited permission to copy and/or distribute it, |
---|
7 | # with or without modifications, as long as this notice is preserved. |
---|
8 | |
---|
9 | # This program is distributed in the hope that it will be useful, |
---|
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
12 | # PARTICULAR PURPOSE. |
---|
13 | |
---|
14 | # Do all the work for Automake. This macro actually does too much -- |
---|
15 | # some checks are only needed if your package does certain things. |
---|
16 | # But this isn't really a big deal. |
---|
17 | |
---|
18 | # serial 5 |
---|
19 | |
---|
20 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
---|
21 | # written in clear, in which case automake, when reading aclocal.m4, |
---|
22 | # will think it sees a *use*, and therefore will trigger all it's |
---|
23 | # C support machinery. Also note that it means that autoscan, seeing |
---|
24 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
---|
25 | |
---|
26 | |
---|
27 | # We require 2.13 because we rely on SHELL being computed by configure. |
---|
28 | AC_PREREQ([2.13]) |
---|
29 | |
---|
30 | # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) |
---|
31 | # ----------------------------------------------------------- |
---|
32 | # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED. |
---|
33 | # The purpose of this macro is to provide the user with a means to |
---|
34 | # check macros which are provided without letting her know how the |
---|
35 | # information is coded. |
---|
36 | # If this macro is not defined by Autoconf, define it here. |
---|
37 | ifdef([AC_PROVIDE_IFELSE], |
---|
38 | [], |
---|
39 | [define([AC_PROVIDE_IFELSE], |
---|
40 | [ifdef([AC_PROVIDE_$1], |
---|
41 | [$2], [$3])])]) |
---|
42 | |
---|
43 | |
---|
44 | # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE]) |
---|
45 | # ---------------------------------------------- |
---|
46 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
47 | [AC_REQUIRE([AC_PROG_INSTALL])dnl |
---|
48 | # test to see if srcdir already configured |
---|
49 | if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" && |
---|
50 | test -f $srcdir/config.status; then |
---|
51 | AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first]) |
---|
52 | fi |
---|
53 | |
---|
54 | # Define the identity of the package. |
---|
55 | PACKAGE=$1 |
---|
56 | AC_SUBST(PACKAGE)dnl |
---|
57 | VERSION=$2 |
---|
58 | AC_SUBST(VERSION)dnl |
---|
59 | ifelse([$3],, |
---|
60 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
61 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) |
---|
62 | |
---|
63 | # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow |
---|
64 | # the ones we care about. |
---|
65 | ifdef([m4_pattern_allow], |
---|
66 | [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl |
---|
67 | |
---|
68 | # Autoconf 2.50 always computes EXEEXT. However we need to be |
---|
69 | # compatible with 2.13, for now. So we always define EXEEXT, but we |
---|
70 | # don't compute it. |
---|
71 | AC_SUBST(EXEEXT) |
---|
72 | # Similar for OBJEXT -- only we only use OBJEXT if the user actually |
---|
73 | # requests that it be used. This is a bit dumb. |
---|
74 | : ${OBJEXT=o} |
---|
75 | AC_SUBST(OBJEXT) |
---|
76 | |
---|
77 | # Some tools Automake needs. |
---|
78 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
---|
79 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
---|
80 | AM_MISSING_PROG(ACLOCAL, aclocal) |
---|
81 | AM_MISSING_PROG(AUTOCONF, autoconf) |
---|
82 | AM_MISSING_PROG(AUTOMAKE, automake) |
---|
83 | AM_MISSING_PROG(AUTOHEADER, autoheader) |
---|
84 | AM_MISSING_PROG(MAKEINFO, makeinfo) |
---|
85 | AM_MISSING_PROG(AMTAR, tar) |
---|
86 | AM_PROG_INSTALL_SH |
---|
87 | AM_PROG_INSTALL_STRIP |
---|
88 | # We need awk for the "check" target. The system "awk" is bad on |
---|
89 | # some platforms. |
---|
90 | AC_REQUIRE([AC_PROG_AWK])dnl |
---|
91 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
---|
92 | AC_REQUIRE([AM_DEP_TRACK])dnl |
---|
93 | AC_REQUIRE([AM_SET_DEPDIR])dnl |
---|
94 | AC_PROVIDE_IFELSE([AC_PROG_][CC], |
---|
95 | [_AM_DEPENDENCIES(CC)], |
---|
96 | [define([AC_PROG_][CC], |
---|
97 | defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl |
---|
98 | AC_PROVIDE_IFELSE([AC_PROG_][CXX], |
---|
99 | [_AM_DEPENDENCIES(CXX)], |
---|
100 | [define([AC_PROG_][CXX], |
---|
101 | defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
---|
102 | ]) |
---|
103 | |
---|
104 | # |
---|
105 | # Check to make sure that the build environment is sane. |
---|
106 | # |
---|
107 | |
---|
108 | # serial 3 |
---|
109 | |
---|
110 | # AM_SANITY_CHECK |
---|
111 | # --------------- |
---|
112 | AC_DEFUN([AM_SANITY_CHECK], |
---|
113 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
114 | # Just in case |
---|
115 | sleep 1 |
---|
116 | echo timestamp > conftest.file |
---|
117 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
118 | # arguments. Must try -L first in case configure is actually a |
---|
119 | # symlink; some systems play weird games with the mod time of symlinks |
---|
120 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
121 | # directory). |
---|
122 | if ( |
---|
123 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` |
---|
124 | if test "$[*]" = "X"; then |
---|
125 | # -L didn't work. |
---|
126 | set X `ls -t $srcdir/configure conftest.file` |
---|
127 | fi |
---|
128 | rm -f conftest.file |
---|
129 | if test "$[*]" != "X $srcdir/configure conftest.file" \ |
---|
130 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
---|
131 | |
---|
132 | # If neither matched, then we have a broken ls. This can happen |
---|
133 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
134 | # broken ls alias from the environment. This has actually |
---|
135 | # happened. Such a system could not be considered "sane". |
---|
136 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
137 | alias in your environment]) |
---|
138 | fi |
---|
139 | |
---|
140 | test "$[2]" = conftest.file |
---|
141 | ) |
---|
142 | then |
---|
143 | # Ok. |
---|
144 | : |
---|
145 | else |
---|
146 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
147 | Check your system clock]) |
---|
148 | fi |
---|
149 | AC_MSG_RESULT(yes)]) |
---|
150 | |
---|
151 | |
---|
152 | # serial 2 |
---|
153 | |
---|
154 | # AM_MISSING_PROG(NAME, PROGRAM) |
---|
155 | # ------------------------------ |
---|
156 | AC_DEFUN([AM_MISSING_PROG], |
---|
157 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) |
---|
158 | $1=${$1-"${am_missing_run}$2"} |
---|
159 | AC_SUBST($1)]) |
---|
160 | |
---|
161 | |
---|
162 | # AM_MISSING_HAS_RUN |
---|
163 | # ------------------ |
---|
164 | # Define MISSING if not defined so far and test if it supports --run. |
---|
165 | # If it does, set am_missing_run to use it, otherwise, to nothing. |
---|
166 | AC_DEFUN([AM_MISSING_HAS_RUN], |
---|
167 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
---|
168 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" |
---|
169 | # Use eval to expand $SHELL |
---|
170 | if eval "$MISSING --run true"; then |
---|
171 | am_missing_run="$MISSING --run " |
---|
172 | else |
---|
173 | am_missing_run= |
---|
174 | am_backtick='`' |
---|
175 | AC_MSG_WARN([${am_backtick}missing' script is too old or missing]) |
---|
176 | fi |
---|
177 | ]) |
---|
178 | |
---|
179 | # AM_AUX_DIR_EXPAND |
---|
180 | |
---|
181 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
---|
182 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
---|
183 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
---|
184 | # |
---|
185 | # Of course, Automake must honor this variable whenever it calls a |
---|
186 | # tool from the auxiliary directory. The problem is that $srcdir (and |
---|
187 | # therefore $ac_aux_dir as well) can be either absolute or relative, |
---|
188 | # depending on how configure is run. This is pretty annoying, since |
---|
189 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top |
---|
190 | # source directory, any form will work fine, but in subdirectories a |
---|
191 | # relative path needs to be adjusted first. |
---|
192 | # |
---|
193 | # $ac_aux_dir/missing |
---|
194 | # fails when called from a subdirectory if $ac_aux_dir is relative |
---|
195 | # $top_srcdir/$ac_aux_dir/missing |
---|
196 | # fails if $ac_aux_dir is absolute, |
---|
197 | # fails when called from a subdirectory in a VPATH build with |
---|
198 | # a relative $ac_aux_dir |
---|
199 | # |
---|
200 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
---|
201 | # are both prefixed by $srcdir. In an in-source build this is usually |
---|
202 | # harmless because $srcdir is `.', but things will broke when you |
---|
203 | # start a VPATH build or use an absolute $srcdir. |
---|
204 | # |
---|
205 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
---|
206 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
---|
207 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
---|
208 | # and then we would define $MISSING as |
---|
209 | # MISSING="\${SHELL} $am_aux_dir/missing" |
---|
210 | # This will work as long as MISSING is not called from configure, because |
---|
211 | # unfortunately $(top_srcdir) has no meaning in configure. |
---|
212 | # However there are other variables, like CC, which are often used in |
---|
213 | # configure, and could therefore not use this "fixed" $ac_aux_dir. |
---|
214 | # |
---|
215 | # Another solution, used here, is to always expand $ac_aux_dir to an |
---|
216 | # absolute PATH. The drawback is that using absolute paths prevent a |
---|
217 | # configured tree to be moved without reconfiguration. |
---|
218 | |
---|
219 | AC_DEFUN([AM_AUX_DIR_EXPAND], [ |
---|
220 | # expand $ac_aux_dir to an absolute path |
---|
221 | am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd` |
---|
222 | ]) |
---|
223 | |
---|
224 | # AM_PROG_INSTALL_SH |
---|
225 | # ------------------ |
---|
226 | # Define $install_sh. |
---|
227 | AC_DEFUN([AM_PROG_INSTALL_SH], |
---|
228 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
---|
229 | install_sh=${install_sh-"$am_aux_dir/install-sh"} |
---|
230 | AC_SUBST(install_sh)]) |
---|
231 | |
---|
232 | # One issue with vendor `install' (even GNU) is that you can't |
---|
233 | # specify the program used to strip binaries. This is especially |
---|
234 | # annoying in cross-compiling environments, where the build's strip |
---|
235 | # is unlikely to handle the host's binaries. |
---|
236 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
---|
237 | # always use install-sh in `make install-strip', and initialize |
---|
238 | # STRIPPROG with the value of the STRIP variable (set by the user). |
---|
239 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
---|
240 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
---|
241 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" |
---|
242 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
---|
243 | |
---|
244 | # serial 4 -*- Autoconf -*- |
---|
245 | |
---|
246 | |
---|
247 | |
---|
248 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
---|
249 | # written in clear, in which case automake, when reading aclocal.m4, |
---|
250 | # will think it sees a *use*, and therefore will trigger all it's |
---|
251 | # C support machinery. Also note that it means that autoscan, seeing |
---|
252 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
---|
253 | |
---|
254 | |
---|
255 | |
---|
256 | # _AM_DEPENDENCIES(NAME) |
---|
257 | # --------------------- |
---|
258 | # See how the compiler implements dependency checking. |
---|
259 | # NAME is "CC", "CXX" or "OBJC". |
---|
260 | # We try a few techniques and use that to set a single cache variable. |
---|
261 | # |
---|
262 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
---|
263 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
---|
264 | # dependency, and given that the user is not expected to run this macro, |
---|
265 | # just rely on AC_PROG_CC. |
---|
266 | AC_DEFUN([_AM_DEPENDENCIES], |
---|
267 | [AC_REQUIRE([AM_SET_DEPDIR])dnl |
---|
268 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
---|
269 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
---|
270 | AC_REQUIRE([AM_DEP_TRACK])dnl |
---|
271 | |
---|
272 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
---|
273 | [$1], CXX, [depcc="$CXX" am_compiler_list=], |
---|
274 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'] |
---|
275 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
---|
276 | [depcc="$$1" am_compiler_list=]) |
---|
277 | |
---|
278 | AC_CACHE_CHECK([dependency style of $depcc], |
---|
279 | [am_cv_$1_dependencies_compiler_type], |
---|
280 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
---|
281 | # We make a subdir and do the tests there. Otherwise we can end up |
---|
282 | # making bogus files that we don't know about and never remove. For |
---|
283 | # instance it was reported that on HP-UX the gcc test will end up |
---|
284 | # making a dummy file named `D' -- because `-MD' means `put the output |
---|
285 | # in D'. |
---|
286 | mkdir conftest.dir |
---|
287 | # Copy depcomp to subdir because otherwise we won't find it if we're |
---|
288 | # using a relative directory. |
---|
289 | cp "$am_depcomp" conftest.dir |
---|
290 | cd conftest.dir |
---|
291 | |
---|
292 | am_cv_$1_dependencies_compiler_type=none |
---|
293 | if test "$am_compiler_list" = ""; then |
---|
294 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
---|
295 | fi |
---|
296 | for depmode in $am_compiler_list; do |
---|
297 | # We need to recreate these files for each test, as the compiler may |
---|
298 | # overwrite some of them when testing with obscure command lines. |
---|
299 | # This happens at least with the AIX C compiler. |
---|
300 | echo '#include "conftest.h"' > conftest.c |
---|
301 | echo 'int i;' > conftest.h |
---|
302 | echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf |
---|
303 | |
---|
304 | case $depmode in |
---|
305 | nosideeffect) |
---|
306 | # after this tag, mechanisms are not by side-effect, so they'll |
---|
307 | # only be used when explicitly requested |
---|
308 | if test "x$enable_dependency_tracking" = xyes; then |
---|
309 | continue |
---|
310 | else |
---|
311 | break |
---|
312 | fi |
---|
313 | ;; |
---|
314 | none) break ;; |
---|
315 | esac |
---|
316 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
---|
317 | # mode. It turns out that the SunPro C++ compiler does not properly |
---|
318 | # handle `-M -o', and we need to detect this. |
---|
319 | if depmode=$depmode \ |
---|
320 | source=conftest.c object=conftest.o \ |
---|
321 | depfile=conftest.Po tmpdepfile=conftest.TPo \ |
---|
322 | $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && |
---|
323 | grep conftest.h conftest.Po > /dev/null 2>&1 && |
---|
324 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
---|
325 | am_cv_$1_dependencies_compiler_type=$depmode |
---|
326 | break |
---|
327 | fi |
---|
328 | done |
---|
329 | |
---|
330 | cd .. |
---|
331 | rm -rf conftest.dir |
---|
332 | else |
---|
333 | am_cv_$1_dependencies_compiler_type=none |
---|
334 | fi |
---|
335 | ]) |
---|
336 | $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type" |
---|
337 | AC_SUBST([$1DEPMODE]) |
---|
338 | ]) |
---|
339 | |
---|
340 | |
---|
341 | # AM_SET_DEPDIR |
---|
342 | # ------------- |
---|
343 | # Choose a directory name for dependency files. |
---|
344 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES |
---|
345 | AC_DEFUN([AM_SET_DEPDIR], |
---|
346 | [rm -f .deps 2>/dev/null |
---|
347 | mkdir .deps 2>/dev/null |
---|
348 | if test -d .deps; then |
---|
349 | DEPDIR=.deps |
---|
350 | else |
---|
351 | # MS-DOS does not allow filenames that begin with a dot. |
---|
352 | DEPDIR=_deps |
---|
353 | fi |
---|
354 | rmdir .deps 2>/dev/null |
---|
355 | AC_SUBST(DEPDIR) |
---|
356 | ]) |
---|
357 | |
---|
358 | |
---|
359 | # AM_DEP_TRACK |
---|
360 | # ------------ |
---|
361 | AC_DEFUN([AM_DEP_TRACK], |
---|
362 | [AC_ARG_ENABLE(dependency-tracking, |
---|
363 | [ --disable-dependency-tracking Speeds up one-time builds |
---|
364 | --enable-dependency-tracking Do not reject slow dependency extractors]) |
---|
365 | if test "x$enable_dependency_tracking" != xno; then |
---|
366 | am_depcomp="$ac_aux_dir/depcomp" |
---|
367 | AMDEPBACKSLASH='\' |
---|
368 | fi |
---|
369 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
---|
370 | pushdef([subst], defn([AC_SUBST])) |
---|
371 | subst(AMDEPBACKSLASH) |
---|
372 | popdef([subst]) |
---|
373 | ]) |
---|
374 | |
---|
375 | # Generate code to set up dependency tracking. |
---|
376 | # This macro should only be invoked once -- use via AC_REQUIRE. |
---|
377 | # Usage: |
---|
378 | # AM_OUTPUT_DEPENDENCY_COMMANDS |
---|
379 | |
---|
380 | # |
---|
381 | # This code is only required when automatic dependency tracking |
---|
382 | # is enabled. FIXME. This creates each `.P' file that we will |
---|
383 | # need in order to bootstrap the dependency handling code. |
---|
384 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[ |
---|
385 | AC_OUTPUT_COMMANDS([ |
---|
386 | test x"$AMDEP_TRUE" != x"" || |
---|
387 | for mf in $CONFIG_FILES; do |
---|
388 | case "$mf" in |
---|
389 | Makefile) dirpart=.;; |
---|
390 | */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; |
---|
391 | *) continue;; |
---|
392 | esac |
---|
393 | grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue |
---|
394 | # Extract the definition of DEP_FILES from the Makefile without |
---|
395 | # running `make'. |
---|
396 | DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` |
---|
397 | test -z "$DEPDIR" && continue |
---|
398 | # When using ansi2knr, U may be empty or an underscore; expand it |
---|
399 | U=`sed -n -e '/^U = / s///p' < "$mf"` |
---|
400 | test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" |
---|
401 | # We invoke sed twice because it is the simplest approach to |
---|
402 | # changing $(DEPDIR) to its actual value in the expansion. |
---|
403 | for file in `sed -n -e ' |
---|
404 | /^DEP_FILES = .*\\\\$/ { |
---|
405 | s/^DEP_FILES = // |
---|
406 | :loop |
---|
407 | s/\\\\$// |
---|
408 | p |
---|
409 | n |
---|
410 | /\\\\$/ b loop |
---|
411 | p |
---|
412 | } |
---|
413 | /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ |
---|
414 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
---|
415 | # Make sure the directory exists. |
---|
416 | test -f "$dirpart/$file" && continue |
---|
417 | fdir=`echo "$file" | sed -e 's|/[^/]*$||'` |
---|
418 | $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1 |
---|
419 | # echo "creating $dirpart/$file" |
---|
420 | echo '# dummy' > "$dirpart/$file" |
---|
421 | done |
---|
422 | done |
---|
423 | ], [AMDEP_TRUE="$AMDEP_TRUE" |
---|
424 | ac_aux_dir="$ac_aux_dir"])]) |
---|
425 | |
---|
426 | # AM_MAKE_INCLUDE() |
---|
427 | # ----------------- |
---|
428 | # Check to see how make treats includes. |
---|
429 | AC_DEFUN([AM_MAKE_INCLUDE], |
---|
430 | [am_make=${MAKE-make} |
---|
431 | cat > confinc << 'END' |
---|
432 | doit: |
---|
433 | @echo done |
---|
434 | END |
---|
435 | # If we don't find an include directive, just comment out the code. |
---|
436 | AC_MSG_CHECKING([for style of include used by $am_make]) |
---|
437 | am__include='#' |
---|
438 | am__quote= |
---|
439 | _am_result=none |
---|
440 | # First try GNU make style include. |
---|
441 | echo "include confinc" > confmf |
---|
442 | # We grep out `Entering directory' and `Leaving directory' |
---|
443 | # messages which can occur if `w' ends up in MAKEFLAGS. |
---|
444 | # In particular we don't look at `^make:' because GNU make might |
---|
445 | # be invoked under some other name (usually "gmake"), in which |
---|
446 | # case it prints its new name instead of `make'. |
---|
447 | if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then |
---|
448 | am__include=include |
---|
449 | am__quote= |
---|
450 | _am_result=GNU |
---|
451 | fi |
---|
452 | # Now try BSD make style include. |
---|
453 | if test "$am__include" = "#"; then |
---|
454 | echo '.include "confinc"' > confmf |
---|
455 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then |
---|
456 | am__include=.include |
---|
457 | am__quote='"' |
---|
458 | _am_result=BSD |
---|
459 | fi |
---|
460 | fi |
---|
461 | AC_SUBST(am__include) |
---|
462 | AC_SUBST(am__quote) |
---|
463 | AC_MSG_RESULT($_am_result) |
---|
464 | rm -f confinc confmf |
---|
465 | ]) |
---|
466 | |
---|
467 | # serial 3 |
---|
468 | |
---|
469 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
---|
470 | # ------------------------------------- |
---|
471 | # Define a conditional. |
---|
472 | # |
---|
473 | # FIXME: Once using 2.50, use this: |
---|
474 | # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl |
---|
475 | AC_DEFUN([AM_CONDITIONAL], |
---|
476 | [ifelse([$1], [TRUE], |
---|
477 | [errprint(__file__:__line__: [$0: invalid condition: $1 |
---|
478 | ])dnl |
---|
479 | m4exit(1)])dnl |
---|
480 | ifelse([$1], [FALSE], |
---|
481 | [errprint(__file__:__line__: [$0: invalid condition: $1 |
---|
482 | ])dnl |
---|
483 | m4exit(1)])dnl |
---|
484 | AC_SUBST([$1_TRUE]) |
---|
485 | AC_SUBST([$1_FALSE]) |
---|
486 | if $2; then |
---|
487 | $1_TRUE= |
---|
488 | $1_FALSE='#' |
---|
489 | else |
---|
490 | $1_TRUE='#' |
---|
491 | $1_FALSE= |
---|
492 | fi]) |
---|
493 | |
---|
494 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
---|
495 | |
---|
496 | # serial 3 |
---|
497 | |
---|
498 | # When config.status generates a header, we must update the stamp-h file. |
---|
499 | # This file resides in the same directory as the config header |
---|
500 | # that is generated. We must strip everything past the first ":", |
---|
501 | # and everything past the last "/". |
---|
502 | |
---|
503 | AC_PREREQ([2.12]) |
---|
504 | |
---|
505 | AC_DEFUN([AM_CONFIG_HEADER], |
---|
506 | [ifdef([AC_FOREACH],dnl |
---|
507 | [dnl init our file count if it isn't already |
---|
508 | m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0])) |
---|
509 | dnl prepare to store our destination file list for use in config.status |
---|
510 | AC_FOREACH([_AM_File], [$1], |
---|
511 | [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*])) |
---|
512 | m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index)) |
---|
513 | dnl and add it to the list of files AC keeps track of, along |
---|
514 | dnl with our hook |
---|
515 | AC_CONFIG_HEADERS(_AM_File, |
---|
516 | dnl COMMANDS, [, INIT-CMDS] |
---|
517 | [# update the timestamp |
---|
518 | echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index[" |
---|
519 | ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS |
---|
520 | m4_popdef([_AM_Dest])])],dnl |
---|
521 | [AC_CONFIG_HEADER([$1]) |
---|
522 | AC_OUTPUT_COMMANDS( |
---|
523 | ifelse(patsubst([$1], [[^ ]], []), |
---|
524 | [], |
---|
525 | [test -z "$CONFIG_HEADERS" || echo timestamp >dnl |
---|
526 | patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl |
---|
527 | [am_indx=1 |
---|
528 | for am_file in $1; do |
---|
529 | case " \$CONFIG_HEADERS " in |
---|
530 | *" \$am_file "*) |
---|
531 | am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\` |
---|
532 | if test -n "\$am_dir"; then |
---|
533 | am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\` |
---|
534 | for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do |
---|
535 | am_tmpdir=\$am_tmpdir\$am_subdir/ |
---|
536 | if test ! -d \$am_tmpdir; then |
---|
537 | mkdir \$am_tmpdir |
---|
538 | fi |
---|
539 | done |
---|
540 | fi |
---|
541 | echo timestamp > "\$am_dir"stamp-h\$am_indx |
---|
542 | ;; |
---|
543 | esac |
---|
544 | am_indx=\`expr \$am_indx + 1\` |
---|
545 | done]) |
---|
546 | ])]) # AM_CONFIG_HEADER |
---|
547 | |
---|
548 | # _AM_DIRNAME(PATH) |
---|
549 | # ----------------- |
---|
550 | # Like AS_DIRNAME, only do it during macro expansion |
---|
551 | AC_DEFUN([_AM_DIRNAME], |
---|
552 | [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, |
---|
553 | m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1, |
---|
554 | m4_if(m4_regexp([$1], [^/.*]), -1, |
---|
555 | [.], |
---|
556 | m4_patsubst([$1], [^\(/\).*], [\1])), |
---|
557 | m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), |
---|
558 | m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl |
---|
559 | ]) # _AM_DIRNAME |
---|
560 | |
---|
561 | # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- |
---|
562 | |
---|
563 | # serial 46 AC_PROG_LIBTOOL |
---|
564 | |
---|
565 | AC_DEFUN([AC_PROG_LIBTOOL], |
---|
566 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
---|
567 | |
---|
568 | # This can be used to rebuild libtool when needed |
---|
569 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
---|
570 | |
---|
571 | # Always use our own libtool. |
---|
572 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
---|
573 | AC_SUBST(LIBTOOL)dnl |
---|
574 | |
---|
575 | # Prevent multiple expansion |
---|
576 | define([AC_PROG_LIBTOOL], []) |
---|
577 | ]) |
---|
578 | |
---|
579 | AC_DEFUN([AC_LIBTOOL_SETUP], |
---|
580 | [AC_PREREQ(2.13)dnl |
---|
581 | AC_REQUIRE([AC_ENABLE_SHARED])dnl |
---|
582 | AC_REQUIRE([AC_ENABLE_STATIC])dnl |
---|
583 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
---|
584 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
585 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
586 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
587 | AC_REQUIRE([AC_PROG_LD])dnl |
---|
588 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
---|
589 | AC_REQUIRE([AC_PROG_NM])dnl |
---|
590 | AC_REQUIRE([AC_PROG_LN_S])dnl |
---|
591 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
---|
592 | AC_REQUIRE([AC_OBJEXT])dnl |
---|
593 | AC_REQUIRE([AC_EXEEXT])dnl |
---|
594 | dnl |
---|
595 | |
---|
596 | _LT_AC_PROG_ECHO_BACKSLASH |
---|
597 | # Only perform the check for file, if the check method requires it |
---|
598 | case $deplibs_check_method in |
---|
599 | file_magic*) |
---|
600 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
---|
601 | AC_PATH_MAGIC |
---|
602 | fi |
---|
603 | ;; |
---|
604 | esac |
---|
605 | |
---|
606 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
---|
607 | AC_CHECK_TOOL(STRIP, strip, :) |
---|
608 | |
---|
609 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
---|
610 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
---|
611 | enable_win32_dll=yes, enable_win32_dll=no) |
---|
612 | |
---|
613 | AC_ARG_ENABLE(libtool-lock, |
---|
614 | [ --disable-libtool-lock avoid locking (might break parallel builds)]) |
---|
615 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
---|
616 | |
---|
617 | # Some flags need to be propagated to the compiler or linker for good |
---|
618 | # libtool support. |
---|
619 | case $host in |
---|
620 | *-*-irix6*) |
---|
621 | # Find out which ABI we are using. |
---|
622 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
---|
623 | if AC_TRY_EVAL(ac_compile); then |
---|
624 | case `/usr/bin/file conftest.$ac_objext` in |
---|
625 | *32-bit*) |
---|
626 | LD="${LD-ld} -32" |
---|
627 | ;; |
---|
628 | *N32*) |
---|
629 | LD="${LD-ld} -n32" |
---|
630 | ;; |
---|
631 | *64-bit*) |
---|
632 | LD="${LD-ld} -64" |
---|
633 | ;; |
---|
634 | esac |
---|
635 | fi |
---|
636 | rm -rf conftest* |
---|
637 | ;; |
---|
638 | |
---|
639 | *-*-sco3.2v5*) |
---|
640 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
---|
641 | SAVE_CFLAGS="$CFLAGS" |
---|
642 | CFLAGS="$CFLAGS -belf" |
---|
643 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
---|
644 | [AC_LANG_SAVE |
---|
645 | AC_LANG_C |
---|
646 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
---|
647 | AC_LANG_RESTORE]) |
---|
648 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
---|
649 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
---|
650 | CFLAGS="$SAVE_CFLAGS" |
---|
651 | fi |
---|
652 | ;; |
---|
653 | |
---|
654 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
---|
655 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
---|
656 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
---|
657 | AC_CHECK_TOOL(AS, as, false) |
---|
658 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
---|
659 | |
---|
660 | # recent cygwin and mingw systems supply a stub DllMain which the user |
---|
661 | # can override, but on older systems we have to supply one |
---|
662 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, |
---|
663 | [AC_TRY_LINK([], |
---|
664 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); |
---|
665 | DllMain (0, 0, 0);], |
---|
666 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) |
---|
667 | |
---|
668 | case $host/$CC in |
---|
669 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) |
---|
670 | # old mingw systems require "-dll" to link a DLL, while more recent ones |
---|
671 | # require "-mdll" |
---|
672 | SAVE_CFLAGS="$CFLAGS" |
---|
673 | CFLAGS="$CFLAGS -mdll" |
---|
674 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, |
---|
675 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) |
---|
676 | CFLAGS="$SAVE_CFLAGS" ;; |
---|
677 | *-*-cygwin* | *-*-pw32*) |
---|
678 | # cygwin systems need to pass --dll to the linker, and not link |
---|
679 | # crt.o which will require a WinMain@16 definition. |
---|
680 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; |
---|
681 | esac |
---|
682 | ;; |
---|
683 | ]) |
---|
684 | esac |
---|
685 | |
---|
686 | _LT_AC_LTCONFIG_HACK |
---|
687 | |
---|
688 | ]) |
---|
689 | |
---|
690 | # AC_LIBTOOL_HEADER_ASSERT |
---|
691 | # ------------------------ |
---|
692 | AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], |
---|
693 | [AC_CACHE_CHECK([whether $CC supports assert without backlinking], |
---|
694 | [lt_cv_func_assert_works], |
---|
695 | [case $host in |
---|
696 | *-*-solaris*) |
---|
697 | if test "$GCC" = yes && test "$with_gnu_ld" != yes; then |
---|
698 | case `$CC --version 2>/dev/null` in |
---|
699 | [[12]].*) lt_cv_func_assert_works=no ;; |
---|
700 | *) lt_cv_func_assert_works=yes ;; |
---|
701 | esac |
---|
702 | fi |
---|
703 | ;; |
---|
704 | esac]) |
---|
705 | |
---|
706 | if test "x$lt_cv_func_assert_works" = xyes; then |
---|
707 | AC_CHECK_HEADERS(assert.h) |
---|
708 | fi |
---|
709 | ])# AC_LIBTOOL_HEADER_ASSERT |
---|
710 | |
---|
711 | # _LT_AC_CHECK_DLFCN |
---|
712 | # -------------------- |
---|
713 | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
---|
714 | [AC_CHECK_HEADERS(dlfcn.h) |
---|
715 | ])# _LT_AC_CHECK_DLFCN |
---|
716 | |
---|
717 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
718 | # --------------------------------- |
---|
719 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
---|
720 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
721 | AC_REQUIRE([AC_PROG_NM]) |
---|
722 | AC_REQUIRE([AC_OBJEXT]) |
---|
723 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
---|
724 | AC_MSG_CHECKING([command to parse $NM output]) |
---|
725 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl |
---|
726 | |
---|
727 | # These are sane defaults that work on at least a few old systems. |
---|
728 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
---|
729 | |
---|
730 | # Character class describing NM global symbol codes. |
---|
731 | symcode='[[BCDEGRST]]' |
---|
732 | |
---|
733 | # Regexp to match symbols that can be accessed directly from C. |
---|
734 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
---|
735 | |
---|
736 | # Transform the above into a raw symbol and a C symbol. |
---|
737 | symxfrm='\1 \2\3 \3' |
---|
738 | |
---|
739 | # Transform an extracted symbol line into a proper C declaration |
---|
740 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
---|
741 | |
---|
742 | # Transform an extracted symbol line into symbol name and symbol address |
---|
743 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
744 | |
---|
745 | # Define system-specific variables. |
---|
746 | case $host_os in |
---|
747 | aix*) |
---|
748 | symcode='[[BCDT]]' |
---|
749 | ;; |
---|
750 | cygwin* | mingw* | pw32*) |
---|
751 | symcode='[[ABCDGISTW]]' |
---|
752 | ;; |
---|
753 | hpux*) # Its linker distinguishes data from code symbols |
---|
754 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
---|
755 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
756 | ;; |
---|
757 | irix*) |
---|
758 | symcode='[[BCDEGRST]]' |
---|
759 | ;; |
---|
760 | solaris* | sysv5*) |
---|
761 | symcode='[[BDT]]' |
---|
762 | ;; |
---|
763 | sysv4) |
---|
764 | symcode='[[DFNSTU]]' |
---|
765 | ;; |
---|
766 | esac |
---|
767 | |
---|
768 | # Handle CRLF in mingw tool chain |
---|
769 | opt_cr= |
---|
770 | case $host_os in |
---|
771 | mingw*) |
---|
772 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
---|
773 | ;; |
---|
774 | esac |
---|
775 | |
---|
776 | # If we're using GNU nm, then use its standard symbol codes. |
---|
777 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
---|
778 | symcode='[[ABCDGISTW]]' |
---|
779 | fi |
---|
780 | |
---|
781 | # Try without a prefix undercore, then with it. |
---|
782 | for ac_symprfx in "" "_"; do |
---|
783 | |
---|
784 | # Write the raw and C identifiers. |
---|
785 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
---|
786 | |
---|
787 | # Check to see that the pipe works correctly. |
---|
788 | pipe_works=no |
---|
789 | rm -f conftest* |
---|
790 | cat > conftest.$ac_ext <<EOF |
---|
791 | #ifdef __cplusplus |
---|
792 | extern "C" { |
---|
793 | #endif |
---|
794 | char nm_test_var; |
---|
795 | void nm_test_func(){} |
---|
796 | #ifdef __cplusplus |
---|
797 | } |
---|
798 | #endif |
---|
799 | int main(){nm_test_var='a';nm_test_func();return(0);} |
---|
800 | EOF |
---|
801 | |
---|
802 | if AC_TRY_EVAL(ac_compile); then |
---|
803 | # Now try to grab the symbols. |
---|
804 | nlist=conftest.nm |
---|
805 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
---|
806 | # Try sorting and uniquifying the output. |
---|
807 | if sort "$nlist" | uniq > "$nlist"T; then |
---|
808 | mv -f "$nlist"T "$nlist" |
---|
809 | else |
---|
810 | rm -f "$nlist"T |
---|
811 | fi |
---|
812 | |
---|
813 | # Make sure that we snagged all the symbols we need. |
---|
814 | if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
---|
815 | if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
---|
816 | cat <<EOF > conftest.$ac_ext |
---|
817 | #ifdef __cplusplus |
---|
818 | extern "C" { |
---|
819 | #endif |
---|
820 | |
---|
821 | EOF |
---|
822 | # Now generate the symbol file. |
---|
823 | eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' |
---|
824 | |
---|
825 | cat <<EOF >> conftest.$ac_ext |
---|
826 | #if defined (__STDC__) && __STDC__ |
---|
827 | # define lt_ptr void * |
---|
828 | #else |
---|
829 | # define lt_ptr char * |
---|
830 | # define const |
---|
831 | #endif |
---|
832 | |
---|
833 | /* The mapping between symbol names and symbols. */ |
---|
834 | const struct { |
---|
835 | const char *name; |
---|
836 | lt_ptr address; |
---|
837 | } |
---|
838 | lt_preloaded_symbols[[]] = |
---|
839 | { |
---|
840 | EOF |
---|
841 | sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext |
---|
842 | cat <<\EOF >> conftest.$ac_ext |
---|
843 | {0, (lt_ptr) 0} |
---|
844 | }; |
---|
845 | |
---|
846 | #ifdef __cplusplus |
---|
847 | } |
---|
848 | #endif |
---|
849 | EOF |
---|
850 | # Now try linking the two files. |
---|
851 | mv conftest.$ac_objext conftstm.$ac_objext |
---|
852 | save_LIBS="$LIBS" |
---|
853 | save_CFLAGS="$CFLAGS" |
---|
854 | LIBS="conftstm.$ac_objext" |
---|
855 | CFLAGS="$CFLAGS$no_builtin_flag" |
---|
856 | if AC_TRY_EVAL(ac_link) && test -s conftest; then |
---|
857 | pipe_works=yes |
---|
858 | fi |
---|
859 | LIBS="$save_LIBS" |
---|
860 | CFLAGS="$save_CFLAGS" |
---|
861 | else |
---|
862 | echo "cannot find nm_test_func in $nlist" >&AC_FD_CC |
---|
863 | fi |
---|
864 | else |
---|
865 | echo "cannot find nm_test_var in $nlist" >&AC_FD_CC |
---|
866 | fi |
---|
867 | else |
---|
868 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC |
---|
869 | fi |
---|
870 | else |
---|
871 | echo "$progname: failed program was:" >&AC_FD_CC |
---|
872 | cat conftest.$ac_ext >&5 |
---|
873 | fi |
---|
874 | rm -f conftest* conftst* |
---|
875 | |
---|
876 | # Do not use the global_symbol_pipe unless it works. |
---|
877 | if test "$pipe_works" = yes; then |
---|
878 | break |
---|
879 | else |
---|
880 | lt_cv_sys_global_symbol_pipe= |
---|
881 | fi |
---|
882 | done |
---|
883 | ]) |
---|
884 | global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" |
---|
885 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
---|
886 | global_symbol_to_cdecl= |
---|
887 | global_symbol_to_c_name_address= |
---|
888 | else |
---|
889 | global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" |
---|
890 | global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" |
---|
891 | fi |
---|
892 | if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; |
---|
893 | then |
---|
894 | AC_MSG_RESULT(failed) |
---|
895 | else |
---|
896 | AC_MSG_RESULT(ok) |
---|
897 | fi |
---|
898 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
899 | |
---|
900 | # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
---|
901 | # --------------------------------- |
---|
902 | AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], |
---|
903 | [# Find the correct PATH separator. Usually this is `:', but |
---|
904 | # DJGPP uses `;' like DOS. |
---|
905 | if test "X${PATH_SEPARATOR+set}" != Xset; then |
---|
906 | UNAME=${UNAME-`uname 2>/dev/null`} |
---|
907 | case X$UNAME in |
---|
908 | *-DOS) lt_cv_sys_path_separator=';' ;; |
---|
909 | *) lt_cv_sys_path_separator=':' ;; |
---|
910 | esac |
---|
911 | PATH_SEPARATOR=$lt_cv_sys_path_separator |
---|
912 | fi |
---|
913 | ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
---|
914 | |
---|
915 | # _LT_AC_PROG_ECHO_BACKSLASH |
---|
916 | # -------------------------- |
---|
917 | # Add some code to the start of the generated configure script which |
---|
918 | # will find an echo command which doesn't interpret backslashes. |
---|
919 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
---|
920 | [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
---|
921 | [AC_DIVERT_PUSH(NOTICE)]) |
---|
922 | _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
---|
923 | |
---|
924 | # Check that we are running under the correct shell. |
---|
925 | SHELL=${CONFIG_SHELL-/bin/sh} |
---|
926 | |
---|
927 | case X$ECHO in |
---|
928 | X*--fallback-echo) |
---|
929 | # Remove one level of quotation (which was required for Make). |
---|
930 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
---|
931 | ;; |
---|
932 | esac |
---|
933 | |
---|
934 | echo=${ECHO-echo} |
---|
935 | if test "X[$]1" = X--no-reexec; then |
---|
936 | # Discard the --no-reexec flag, and continue. |
---|
937 | shift |
---|
938 | elif test "X[$]1" = X--fallback-echo; then |
---|
939 | # Avoid inline document here, it may be left over |
---|
940 | : |
---|
941 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
---|
942 | # Yippee, $echo works! |
---|
943 | : |
---|
944 | else |
---|
945 | # Restart under the correct shell. |
---|
946 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
947 | fi |
---|
948 | |
---|
949 | if test "X[$]1" = X--fallback-echo; then |
---|
950 | # used as fallback echo |
---|
951 | shift |
---|
952 | cat <<EOF |
---|
953 | $* |
---|
954 | EOF |
---|
955 | exit 0 |
---|
956 | fi |
---|
957 | |
---|
958 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
959 | # if CDPATH is set. |
---|
960 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
961 | |
---|
962 | if test -z "$ECHO"; then |
---|
963 | if test "X${echo_test_string+set}" != Xset; then |
---|
964 | # find a string as large as possible, as long as the shell can cope with it |
---|
965 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
---|
966 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
---|
967 | if (echo_test_string="`eval $cmd`") 2>/dev/null && |
---|
968 | echo_test_string="`eval $cmd`" && |
---|
969 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
---|
970 | then |
---|
971 | break |
---|
972 | fi |
---|
973 | done |
---|
974 | fi |
---|
975 | |
---|
976 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
977 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
978 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
979 | : |
---|
980 | else |
---|
981 | # The Solaris, AIX, and Digital Unix default echo programs unquote |
---|
982 | # backslashes. This makes it impossible to quote backslashes using |
---|
983 | # echo "$something" | sed 's/\\/\\\\/g' |
---|
984 | # |
---|
985 | # So, first we look for a working echo in the user's PATH. |
---|
986 | |
---|
987 | IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
988 | for dir in $PATH /usr/ucb; do |
---|
989 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
---|
990 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
---|
991 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
---|
992 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
993 | echo="$dir/echo" |
---|
994 | break |
---|
995 | fi |
---|
996 | done |
---|
997 | IFS="$save_ifs" |
---|
998 | |
---|
999 | if test "X$echo" = Xecho; then |
---|
1000 | # We didn't find a better echo, so look for alternatives. |
---|
1001 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
---|
1002 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
---|
1003 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1004 | # This shell has a builtin print -r that does the trick. |
---|
1005 | echo='print -r' |
---|
1006 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
---|
1007 | test "X$CONFIG_SHELL" != X/bin/ksh; then |
---|
1008 | # If we have ksh, try running configure again with it. |
---|
1009 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
---|
1010 | export ORIGINAL_CONFIG_SHELL |
---|
1011 | CONFIG_SHELL=/bin/ksh |
---|
1012 | export CONFIG_SHELL |
---|
1013 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
1014 | else |
---|
1015 | # Try using printf. |
---|
1016 | echo='printf %s\n' |
---|
1017 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
1018 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
1019 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1020 | # Cool, printf works |
---|
1021 | : |
---|
1022 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
1023 | test "X$echo_testing_string" = 'X\t' && |
---|
1024 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
1025 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1026 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
---|
1027 | export CONFIG_SHELL |
---|
1028 | SHELL="$CONFIG_SHELL" |
---|
1029 | export SHELL |
---|
1030 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
1031 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
1032 | test "X$echo_testing_string" = 'X\t' && |
---|
1033 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
1034 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1035 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
1036 | else |
---|
1037 | # maybe with a smaller string... |
---|
1038 | prev=: |
---|
1039 | |
---|
1040 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
---|
1041 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
---|
1042 | then |
---|
1043 | break |
---|
1044 | fi |
---|
1045 | prev="$cmd" |
---|
1046 | done |
---|
1047 | |
---|
1048 | if test "$prev" != 'sed 50q "[$]0"'; then |
---|
1049 | echo_test_string=`eval $prev` |
---|
1050 | export echo_test_string |
---|
1051 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
---|
1052 | else |
---|
1053 | # Oops. We lost completely, so just stick with echo. |
---|
1054 | echo=echo |
---|
1055 | fi |
---|
1056 | fi |
---|
1057 | fi |
---|
1058 | fi |
---|
1059 | fi |
---|
1060 | fi |
---|
1061 | |
---|
1062 | # Copy echo and quote the copy suitably for passing to libtool from |
---|
1063 | # the Makefile, instead of quoting the original, which is used later. |
---|
1064 | ECHO=$echo |
---|
1065 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
---|
1066 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
---|
1067 | fi |
---|
1068 | |
---|
1069 | AC_SUBST(ECHO) |
---|
1070 | AC_DIVERT_POP |
---|
1071 | ])# _LT_AC_PROG_ECHO_BACKSLASH |
---|
1072 | |
---|
1073 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
---|
1074 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
---|
1075 | # ------------------------------------------------------------------ |
---|
1076 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
---|
1077 | [if test "$cross_compiling" = yes; then : |
---|
1078 | [$4] |
---|
1079 | else |
---|
1080 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
1081 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
---|
1082 | lt_status=$lt_dlunknown |
---|
1083 | cat > conftest.$ac_ext <<EOF |
---|
1084 | [#line __oline__ "configure" |
---|
1085 | #include "confdefs.h" |
---|
1086 | |
---|
1087 | #if HAVE_DLFCN_H |
---|
1088 | #include <dlfcn.h> |
---|
1089 | #endif |
---|
1090 | |
---|
1091 | #include <stdio.h> |
---|
1092 | |
---|
1093 | #ifdef RTLD_GLOBAL |
---|
1094 | # define LT_DLGLOBAL RTLD_GLOBAL |
---|
1095 | #else |
---|
1096 | # ifdef DL_GLOBAL |
---|
1097 | # define LT_DLGLOBAL DL_GLOBAL |
---|
1098 | # else |
---|
1099 | # define LT_DLGLOBAL 0 |
---|
1100 | # endif |
---|
1101 | #endif |
---|
1102 | |
---|
1103 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
---|
1104 | find out it does not work in some platform. */ |
---|
1105 | #ifndef LT_DLLAZY_OR_NOW |
---|
1106 | # ifdef RTLD_LAZY |
---|
1107 | # define LT_DLLAZY_OR_NOW RTLD_LAZY |
---|
1108 | # else |
---|
1109 | # ifdef DL_LAZY |
---|
1110 | # define LT_DLLAZY_OR_NOW DL_LAZY |
---|
1111 | # else |
---|
1112 | # ifdef RTLD_NOW |
---|
1113 | # define LT_DLLAZY_OR_NOW RTLD_NOW |
---|
1114 | # else |
---|
1115 | # ifdef DL_NOW |
---|
1116 | # define LT_DLLAZY_OR_NOW DL_NOW |
---|
1117 | # else |
---|
1118 | # define LT_DLLAZY_OR_NOW 0 |
---|
1119 | # endif |
---|
1120 | # endif |
---|
1121 | # endif |
---|
1122 | # endif |
---|
1123 | #endif |
---|
1124 | |
---|
1125 | #ifdef __cplusplus |
---|
1126 | extern "C" void exit (int); |
---|
1127 | #endif |
---|
1128 | |
---|
1129 | void fnord() { int i=42;} |
---|
1130 | int main () |
---|
1131 | { |
---|
1132 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
---|
1133 | int status = $lt_dlunknown; |
---|
1134 | |
---|
1135 | if (self) |
---|
1136 | { |
---|
1137 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
---|
1138 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
---|
1139 | /* dlclose (self); */ |
---|
1140 | } |
---|
1141 | |
---|
1142 | exit (status); |
---|
1143 | }] |
---|
1144 | EOF |
---|
1145 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
---|
1146 | (./conftest; exit; ) 2>/dev/null |
---|
1147 | lt_status=$? |
---|
1148 | case x$lt_status in |
---|
1149 | x$lt_dlno_uscore) $1 ;; |
---|
1150 | x$lt_dlneed_uscore) $2 ;; |
---|
1151 | x$lt_unknown|x*) $3 ;; |
---|
1152 | esac |
---|
1153 | else : |
---|
1154 | # compilation failed |
---|
1155 | $3 |
---|
1156 | fi |
---|
1157 | fi |
---|
1158 | rm -fr conftest* |
---|
1159 | ])# _LT_AC_TRY_DLOPEN_SELF |
---|
1160 | |
---|
1161 | # AC_LIBTOOL_DLOPEN_SELF |
---|
1162 | # ------------------- |
---|
1163 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
---|
1164 | [if test "x$enable_dlopen" != xyes; then |
---|
1165 | enable_dlopen=unknown |
---|
1166 | enable_dlopen_self=unknown |
---|
1167 | enable_dlopen_self_static=unknown |
---|
1168 | else |
---|
1169 | lt_cv_dlopen=no |
---|
1170 | lt_cv_dlopen_libs= |
---|
1171 | |
---|
1172 | case $host_os in |
---|
1173 | beos*) |
---|
1174 | lt_cv_dlopen="load_add_on" |
---|
1175 | lt_cv_dlopen_libs= |
---|
1176 | lt_cv_dlopen_self=yes |
---|
1177 | ;; |
---|
1178 | |
---|
1179 | cygwin* | mingw* | pw32*) |
---|
1180 | lt_cv_dlopen="LoadLibrary" |
---|
1181 | lt_cv_dlopen_libs= |
---|
1182 | ;; |
---|
1183 | |
---|
1184 | *) |
---|
1185 | AC_CHECK_FUNC([shl_load], |
---|
1186 | [lt_cv_dlopen="shl_load"], |
---|
1187 | [AC_CHECK_LIB([dld], [shl_load], |
---|
1188 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
---|
1189 | [AC_CHECK_FUNC([dlopen], |
---|
1190 | [lt_cv_dlopen="dlopen"], |
---|
1191 | [AC_CHECK_LIB([dl], [dlopen], |
---|
1192 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
---|
1193 | [AC_CHECK_LIB([svld], [dlopen], |
---|
1194 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
---|
1195 | [AC_CHECK_LIB([dld], [dld_link], |
---|
1196 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
---|
1197 | ]) |
---|
1198 | ]) |
---|
1199 | ]) |
---|
1200 | ]) |
---|
1201 | ]) |
---|
1202 | ;; |
---|
1203 | esac |
---|
1204 | |
---|
1205 | if test "x$lt_cv_dlopen" != xno; then |
---|
1206 | enable_dlopen=yes |
---|
1207 | else |
---|
1208 | enable_dlopen=no |
---|
1209 | fi |
---|
1210 | |
---|
1211 | case $lt_cv_dlopen in |
---|
1212 | dlopen) |
---|
1213 | save_CPPFLAGS="$CPPFLAGS" |
---|
1214 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
1215 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
---|
1216 | |
---|
1217 | save_LDFLAGS="$LDFLAGS" |
---|
1218 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
---|
1219 | |
---|
1220 | save_LIBS="$LIBS" |
---|
1221 | LIBS="$lt_cv_dlopen_libs $LIBS" |
---|
1222 | |
---|
1223 | AC_CACHE_CHECK([whether a program can dlopen itself], |
---|
1224 | lt_cv_dlopen_self, [dnl |
---|
1225 | _LT_AC_TRY_DLOPEN_SELF( |
---|
1226 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
---|
1227 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
---|
1228 | ]) |
---|
1229 | |
---|
1230 | if test "x$lt_cv_dlopen_self" = xyes; then |
---|
1231 | LDFLAGS="$LDFLAGS $link_static_flag" |
---|
1232 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
---|
1233 | lt_cv_dlopen_self_static, [dnl |
---|
1234 | _LT_AC_TRY_DLOPEN_SELF( |
---|
1235 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
---|
1236 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
---|
1237 | ]) |
---|
1238 | fi |
---|
1239 | |
---|
1240 | CPPFLAGS="$save_CPPFLAGS" |
---|
1241 | LDFLAGS="$save_LDFLAGS" |
---|
1242 | LIBS="$save_LIBS" |
---|
1243 | ;; |
---|
1244 | esac |
---|
1245 | |
---|
1246 | case $lt_cv_dlopen_self in |
---|
1247 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
---|
1248 | *) enable_dlopen_self=unknown ;; |
---|
1249 | esac |
---|
1250 | |
---|
1251 | case $lt_cv_dlopen_self_static in |
---|
1252 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
---|
1253 | *) enable_dlopen_self_static=unknown ;; |
---|
1254 | esac |
---|
1255 | fi |
---|
1256 | ])# AC_LIBTOOL_DLOPEN_SELF |
---|
1257 | |
---|
1258 | AC_DEFUN([_LT_AC_LTCONFIG_HACK], |
---|
1259 | [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl |
---|
1260 | # Sed substitution that helps us do robust quoting. It backslashifies |
---|
1261 | # metacharacters that are still active within double-quoted strings. |
---|
1262 | Xsed='sed -e s/^X//' |
---|
1263 | sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' |
---|
1264 | |
---|
1265 | # Same as above, but do not quote variable references. |
---|
1266 | double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' |
---|
1267 | |
---|
1268 | # Sed substitution to delay expansion of an escaped shell variable in a |
---|
1269 | # double_quote_subst'ed string. |
---|
1270 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
---|
1271 | |
---|
1272 | # Constants: |
---|
1273 | rm="rm -f" |
---|
1274 | |
---|
1275 | # Global variables: |
---|
1276 | default_ofile=libtool |
---|
1277 | can_build_shared=yes |
---|
1278 | |
---|
1279 | # All known linkers require a `.a' archive for static linking (except M$VC, |
---|
1280 | # which needs '.lib'). |
---|
1281 | libext=a |
---|
1282 | ltmain="$ac_aux_dir/ltmain.sh" |
---|
1283 | ofile="$default_ofile" |
---|
1284 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
---|
1285 | need_locks="$enable_libtool_lock" |
---|
1286 | |
---|
1287 | old_CC="$CC" |
---|
1288 | old_CFLAGS="$CFLAGS" |
---|
1289 | |
---|
1290 | # Set sane defaults for various variables |
---|
1291 | test -z "$AR" && AR=ar |
---|
1292 | test -z "$AR_FLAGS" && AR_FLAGS=cru |
---|
1293 | test -z "$AS" && AS=as |
---|
1294 | test -z "$CC" && CC=cc |
---|
1295 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
---|
1296 | test -z "$LD" && LD=ld |
---|
1297 | test -z "$LN_S" && LN_S="ln -s" |
---|
1298 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
---|
1299 | test -z "$NM" && NM=nm |
---|
1300 | test -z "$OBJDUMP" && OBJDUMP=objdump |
---|
1301 | test -z "$RANLIB" && RANLIB=: |
---|
1302 | test -z "$STRIP" && STRIP=: |
---|
1303 | test -z "$ac_objext" && ac_objext=o |
---|
1304 | |
---|
1305 | if test x"$host" != x"$build"; then |
---|
1306 | ac_tool_prefix=${host_alias}- |
---|
1307 | else |
---|
1308 | ac_tool_prefix= |
---|
1309 | fi |
---|
1310 | |
---|
1311 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. |
---|
1312 | case $host_os in |
---|
1313 | linux-gnu*) ;; |
---|
1314 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` |
---|
1315 | esac |
---|
1316 | |
---|
1317 | case $host_os in |
---|
1318 | aix3*) |
---|
1319 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
1320 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
1321 | # vanish in a puff of smoke. |
---|
1322 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
1323 | COLLECT_NAMES= |
---|
1324 | export COLLECT_NAMES |
---|
1325 | fi |
---|
1326 | ;; |
---|
1327 | esac |
---|
1328 | |
---|
1329 | # Determine commands to create old-style static archives. |
---|
1330 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
---|
1331 | old_postinstall_cmds='chmod 644 $oldlib' |
---|
1332 | old_postuninstall_cmds= |
---|
1333 | |
---|
1334 | if test -n "$RANLIB"; then |
---|
1335 | case $host_os in |
---|
1336 | openbsd*) |
---|
1337 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" |
---|
1338 | ;; |
---|
1339 | *) |
---|
1340 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
---|
1341 | ;; |
---|
1342 | esac |
---|
1343 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
---|
1344 | fi |
---|
1345 | |
---|
1346 | # Allow CC to be a program name with arguments. |
---|
1347 | set dummy $CC |
---|
1348 | compiler="[$]2" |
---|
1349 | |
---|
1350 | AC_MSG_CHECKING([for objdir]) |
---|
1351 | rm -f .libs 2>/dev/null |
---|
1352 | mkdir .libs 2>/dev/null |
---|
1353 | if test -d .libs; then |
---|
1354 | objdir=.libs |
---|
1355 | else |
---|
1356 | # MS-DOS does not allow filenames that begin with a dot. |
---|
1357 | objdir=_libs |
---|
1358 | fi |
---|
1359 | rmdir .libs 2>/dev/null |
---|
1360 | AC_MSG_RESULT($objdir) |
---|
1361 | |
---|
1362 | |
---|
1363 | AC_ARG_WITH(pic, |
---|
1364 | [ --with-pic try to use only PIC/non-PIC objects [default=use both]], |
---|
1365 | pic_mode="$withval", pic_mode=default) |
---|
1366 | test -z "$pic_mode" && pic_mode=default |
---|
1367 | |
---|
1368 | # We assume here that the value for lt_cv_prog_cc_pic will not be cached |
---|
1369 | # in isolation, and that seeing it set (from the cache) indicates that |
---|
1370 | # the associated values are set (in the cache) correctly too. |
---|
1371 | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
---|
1372 | AC_CACHE_VAL(lt_cv_prog_cc_pic, |
---|
1373 | [ lt_cv_prog_cc_pic= |
---|
1374 | lt_cv_prog_cc_shlib= |
---|
1375 | lt_cv_prog_cc_wl= |
---|
1376 | lt_cv_prog_cc_static= |
---|
1377 | lt_cv_prog_cc_no_builtin= |
---|
1378 | lt_cv_prog_cc_can_build_shared=$can_build_shared |
---|
1379 | |
---|
1380 | if test "$GCC" = yes; then |
---|
1381 | lt_cv_prog_cc_wl='-Wl,' |
---|
1382 | lt_cv_prog_cc_static='-static' |
---|
1383 | |
---|
1384 | case $host_os in |
---|
1385 | aix*) |
---|
1386 | # Below there is a dirty hack to force normal static linking with -ldl |
---|
1387 | # The problem is because libdl dynamically linked with both libc and |
---|
1388 | # libC (AIX C++ library), which obviously doesn't included in libraries |
---|
1389 | # list by gcc. This cause undefined symbols with -static flags. |
---|
1390 | # This hack allows C programs to be linked with "-static -ldl", but |
---|
1391 | # not sure about C++ programs. |
---|
1392 | lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" |
---|
1393 | ;; |
---|
1394 | amigaos*) |
---|
1395 | # FIXME: we need at least 68020 code to build shared libraries, but |
---|
1396 | # adding the `-m68020' flag to GCC prevents building anything better, |
---|
1397 | # like `-m68040'. |
---|
1398 | lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' |
---|
1399 | ;; |
---|
1400 | beos* | irix5* | irix6* | osf3* | osf4* | osf5*) |
---|
1401 | # PIC is the default for these OSes. |
---|
1402 | ;; |
---|
1403 | darwin* | rhapsody*) |
---|
1404 | # PIC is the default on this platform |
---|
1405 | # Common symbols not allowed in MH_DYLIB files |
---|
1406 | lt_cv_prog_cc_pic='-fno-common' |
---|
1407 | ;; |
---|
1408 | cygwin* | mingw* | pw32* | os2*) |
---|
1409 | # This hack is so that the source file can tell whether it is being |
---|
1410 | # built for inclusion in a dll (and should export symbols for example). |
---|
1411 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
---|
1412 | ;; |
---|
1413 | sysv4*MP*) |
---|
1414 | if test -d /usr/nec; then |
---|
1415 | lt_cv_prog_cc_pic=-Kconform_pic |
---|
1416 | fi |
---|
1417 | ;; |
---|
1418 | *) |
---|
1419 | lt_cv_prog_cc_pic='-fPIC' |
---|
1420 | ;; |
---|
1421 | esac |
---|
1422 | else |
---|
1423 | # PORTME Check for PIC flags for the system compiler. |
---|
1424 | case $host_os in |
---|
1425 | aix3* | aix4* | aix5*) |
---|
1426 | lt_cv_prog_cc_wl='-Wl,' |
---|
1427 | # All AIX code is PIC. |
---|
1428 | if test "$host_cpu" = ia64; then |
---|
1429 | # AIX 5 now supports IA64 processor |
---|
1430 | lt_cv_prog_cc_static='-Bstatic' |
---|
1431 | else |
---|
1432 | lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' |
---|
1433 | fi |
---|
1434 | ;; |
---|
1435 | |
---|
1436 | hpux9* | hpux10* | hpux11*) |
---|
1437 | # Is there a better lt_cv_prog_cc_static that works with the bundled CC? |
---|
1438 | lt_cv_prog_cc_wl='-Wl,' |
---|
1439 | lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" |
---|
1440 | lt_cv_prog_cc_pic='+Z' |
---|
1441 | ;; |
---|
1442 | |
---|
1443 | irix5* | irix6*) |
---|
1444 | lt_cv_prog_cc_wl='-Wl,' |
---|
1445 | lt_cv_prog_cc_static='-non_shared' |
---|
1446 | # PIC (with -KPIC) is the default. |
---|
1447 | ;; |
---|
1448 | |
---|
1449 | cygwin* | mingw* | pw32* | os2*) |
---|
1450 | # This hack is so that the source file can tell whether it is being |
---|
1451 | # built for inclusion in a dll (and should export symbols for example). |
---|
1452 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
---|
1453 | ;; |
---|
1454 | |
---|
1455 | newsos6) |
---|
1456 | lt_cv_prog_cc_pic='-KPIC' |
---|
1457 | lt_cv_prog_cc_static='-Bstatic' |
---|
1458 | ;; |
---|
1459 | |
---|
1460 | osf3* | osf4* | osf5*) |
---|
1461 | # All OSF/1 code is PIC. |
---|
1462 | lt_cv_prog_cc_wl='-Wl,' |
---|
1463 | lt_cv_prog_cc_static='-non_shared' |
---|
1464 | ;; |
---|
1465 | |
---|
1466 | sco3.2v5*) |
---|
1467 | lt_cv_prog_cc_pic='-Kpic' |
---|
1468 | lt_cv_prog_cc_static='-dn' |
---|
1469 | lt_cv_prog_cc_shlib='-belf' |
---|
1470 | ;; |
---|
1471 | |
---|
1472 | solaris*) |
---|
1473 | lt_cv_prog_cc_pic='-KPIC' |
---|
1474 | lt_cv_prog_cc_static='-Bstatic' |
---|
1475 | lt_cv_prog_cc_wl='-Wl,' |
---|
1476 | ;; |
---|
1477 | |
---|
1478 | sunos4*) |
---|
1479 | lt_cv_prog_cc_pic='-PIC' |
---|
1480 | lt_cv_prog_cc_static='-Bstatic' |
---|
1481 | lt_cv_prog_cc_wl='-Qoption ld ' |
---|
1482 | ;; |
---|
1483 | |
---|
1484 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
1485 | lt_cv_prog_cc_pic='-KPIC' |
---|
1486 | lt_cv_prog_cc_static='-Bstatic' |
---|
1487 | if test "x$host_vendor" = xsni; then |
---|
1488 | lt_cv_prog_cc_wl='-LD' |
---|
1489 | else |
---|
1490 | lt_cv_prog_cc_wl='-Wl,' |
---|
1491 | fi |
---|
1492 | ;; |
---|
1493 | |
---|
1494 | uts4*) |
---|
1495 | lt_cv_prog_cc_pic='-pic' |
---|
1496 | lt_cv_prog_cc_static='-Bstatic' |
---|
1497 | ;; |
---|
1498 | |
---|
1499 | sysv4*MP*) |
---|
1500 | if test -d /usr/nec ;then |
---|
1501 | lt_cv_prog_cc_pic='-Kconform_pic' |
---|
1502 | lt_cv_prog_cc_static='-Bstatic' |
---|
1503 | fi |
---|
1504 | ;; |
---|
1505 | |
---|
1506 | *) |
---|
1507 | lt_cv_prog_cc_can_build_shared=no |
---|
1508 | ;; |
---|
1509 | esac |
---|
1510 | fi |
---|
1511 | ]) |
---|
1512 | if test -z "$lt_cv_prog_cc_pic"; then |
---|
1513 | AC_MSG_RESULT([none]) |
---|
1514 | else |
---|
1515 | AC_MSG_RESULT([$lt_cv_prog_cc_pic]) |
---|
1516 | |
---|
1517 | # Check to make sure the pic_flag actually works. |
---|
1518 | AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) |
---|
1519 | AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl |
---|
1520 | save_CFLAGS="$CFLAGS" |
---|
1521 | CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" |
---|
1522 | AC_TRY_COMPILE([], [], [dnl |
---|
1523 | case $host_os in |
---|
1524 | hpux9* | hpux10* | hpux11*) |
---|
1525 | # On HP-UX, both CC and GCC only warn that PIC is supported... then |
---|
1526 | # they create non-PIC objects. So, if there were any warnings, we |
---|
1527 | # assume that PIC is not supported. |
---|
1528 | if test -s conftest.err; then |
---|
1529 | lt_cv_prog_cc_pic_works=no |
---|
1530 | else |
---|
1531 | lt_cv_prog_cc_pic_works=yes |
---|
1532 | fi |
---|
1533 | ;; |
---|
1534 | *) |
---|
1535 | lt_cv_prog_cc_pic_works=yes |
---|
1536 | ;; |
---|
1537 | esac |
---|
1538 | ], [dnl |
---|
1539 | lt_cv_prog_cc_pic_works=no |
---|
1540 | ]) |
---|
1541 | CFLAGS="$save_CFLAGS" |
---|
1542 | ]) |
---|
1543 | |
---|
1544 | if test "X$lt_cv_prog_cc_pic_works" = Xno; then |
---|
1545 | lt_cv_prog_cc_pic= |
---|
1546 | lt_cv_prog_cc_can_build_shared=no |
---|
1547 | else |
---|
1548 | lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" |
---|
1549 | fi |
---|
1550 | |
---|
1551 | AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) |
---|
1552 | fi |
---|
1553 | |
---|
1554 | # Check for any special shared library compilation flags. |
---|
1555 | if test -n "$lt_cv_prog_cc_shlib"; then |
---|
1556 | AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) |
---|
1557 | if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : |
---|
1558 | else |
---|
1559 | AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) |
---|
1560 | lt_cv_prog_cc_can_build_shared=no |
---|
1561 | fi |
---|
1562 | fi |
---|
1563 | |
---|
1564 | AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) |
---|
1565 | AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl |
---|
1566 | lt_cv_prog_cc_static_works=no |
---|
1567 | save_LDFLAGS="$LDFLAGS" |
---|
1568 | LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" |
---|
1569 | AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) |
---|
1570 | LDFLAGS="$save_LDFLAGS" |
---|
1571 | ]) |
---|
1572 | |
---|
1573 | # Belt *and* braces to stop my trousers falling down: |
---|
1574 | test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= |
---|
1575 | AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) |
---|
1576 | |
---|
1577 | pic_flag="$lt_cv_prog_cc_pic" |
---|
1578 | special_shlib_compile_flags="$lt_cv_prog_cc_shlib" |
---|
1579 | wl="$lt_cv_prog_cc_wl" |
---|
1580 | link_static_flag="$lt_cv_prog_cc_static" |
---|
1581 | no_builtin_flag="$lt_cv_prog_cc_no_builtin" |
---|
1582 | can_build_shared="$lt_cv_prog_cc_can_build_shared" |
---|
1583 | |
---|
1584 | |
---|
1585 | # Check to see if options -o and -c are simultaneously supported by compiler |
---|
1586 | AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) |
---|
1587 | AC_CACHE_VAL([lt_cv_compiler_c_o], [ |
---|
1588 | $rm -r conftest 2>/dev/null |
---|
1589 | mkdir conftest |
---|
1590 | cd conftest |
---|
1591 | echo "int some_variable = 0;" > conftest.$ac_ext |
---|
1592 | mkdir out |
---|
1593 | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
---|
1594 | # that will create temporary files in the current directory regardless of |
---|
1595 | # the output directory. Thus, making CWD read-only will cause this test |
---|
1596 | # to fail, enabling locking or at least warning the user not to do parallel |
---|
1597 | # builds. |
---|
1598 | chmod -w . |
---|
1599 | save_CFLAGS="$CFLAGS" |
---|
1600 | CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" |
---|
1601 | compiler_c_o=no |
---|
1602 | if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
---|
1603 | # The compiler can only warn and ignore the option if not recognized |
---|
1604 | # So say no if there are warnings |
---|
1605 | if test -s out/conftest.err; then |
---|
1606 | lt_cv_compiler_c_o=no |
---|
1607 | else |
---|
1608 | lt_cv_compiler_c_o=yes |
---|
1609 | fi |
---|
1610 | else |
---|
1611 | # Append any errors to the config.log. |
---|
1612 | cat out/conftest.err 1>&AC_FD_CC |
---|
1613 | lt_cv_compiler_c_o=no |
---|
1614 | fi |
---|
1615 | CFLAGS="$save_CFLAGS" |
---|
1616 | chmod u+w . |
---|
1617 | $rm conftest* out/* |
---|
1618 | rmdir out |
---|
1619 | cd .. |
---|
1620 | rmdir conftest |
---|
1621 | $rm -r conftest 2>/dev/null |
---|
1622 | ]) |
---|
1623 | compiler_c_o=$lt_cv_compiler_c_o |
---|
1624 | AC_MSG_RESULT([$compiler_c_o]) |
---|
1625 | |
---|
1626 | if test x"$compiler_c_o" = x"yes"; then |
---|
1627 | # Check to see if we can write to a .lo |
---|
1628 | AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) |
---|
1629 | AC_CACHE_VAL([lt_cv_compiler_o_lo], [ |
---|
1630 | lt_cv_compiler_o_lo=no |
---|
1631 | save_CFLAGS="$CFLAGS" |
---|
1632 | CFLAGS="$CFLAGS -c -o conftest.lo" |
---|
1633 | save_objext="$ac_objext" |
---|
1634 | ac_objext=lo |
---|
1635 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
---|
1636 | # The compiler 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 | lt_cv_compiler_o_lo=no |
---|
1640 | else |
---|
1641 | lt_cv_compiler_o_lo=yes |
---|
1642 | fi |
---|
1643 | ]) |
---|
1644 | ac_objext="$save_objext" |
---|
1645 | CFLAGS="$save_CFLAGS" |
---|
1646 | ]) |
---|
1647 | compiler_o_lo=$lt_cv_compiler_o_lo |
---|
1648 | AC_MSG_RESULT([$compiler_o_lo]) |
---|
1649 | else |
---|
1650 | compiler_o_lo=no |
---|
1651 | fi |
---|
1652 | |
---|
1653 | # Check to see if we can do hard links to lock some files if needed |
---|
1654 | hard_links="nottested" |
---|
1655 | if test "$compiler_c_o" = no && test "$need_locks" != no; then |
---|
1656 | # do not overwrite the value of need_locks provided by the user |
---|
1657 | AC_MSG_CHECKING([if we can lock with hard links]) |
---|
1658 | hard_links=yes |
---|
1659 | $rm conftest* |
---|
1660 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1661 | touch conftest.a |
---|
1662 | ln conftest.a conftest.b 2>&5 || hard_links=no |
---|
1663 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1664 | AC_MSG_RESULT([$hard_links]) |
---|
1665 | if test "$hard_links" = no; then |
---|
1666 | AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) |
---|
1667 | need_locks=warn |
---|
1668 | fi |
---|
1669 | else |
---|
1670 | need_locks=no |
---|
1671 | fi |
---|
1672 | |
---|
1673 | if test "$GCC" = yes; then |
---|
1674 | # Check to see if options -fno-rtti -fno-exceptions are supported by compiler |
---|
1675 | AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) |
---|
1676 | echo "int some_variable = 0;" > conftest.$ac_ext |
---|
1677 | save_CFLAGS="$CFLAGS" |
---|
1678 | CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" |
---|
1679 | compiler_rtti_exceptions=no |
---|
1680 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
---|
1681 | # The compiler can only warn and ignore the option if not recognized |
---|
1682 | # So say no if there are warnings |
---|
1683 | if test -s conftest.err; then |
---|
1684 | compiler_rtti_exceptions=no |
---|
1685 | else |
---|
1686 | compiler_rtti_exceptions=yes |
---|
1687 | fi |
---|
1688 | ]) |
---|
1689 | CFLAGS="$save_CFLAGS" |
---|
1690 | AC_MSG_RESULT([$compiler_rtti_exceptions]) |
---|
1691 | |
---|
1692 | if test "$compiler_rtti_exceptions" = "yes"; then |
---|
1693 | no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' |
---|
1694 | else |
---|
1695 | no_builtin_flag=' -fno-builtin' |
---|
1696 | fi |
---|
1697 | fi |
---|
1698 | |
---|
1699 | # See if the linker supports building shared libraries. |
---|
1700 | AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) |
---|
1701 | |
---|
1702 | allow_undefined_flag= |
---|
1703 | no_undefined_flag= |
---|
1704 | need_lib_prefix=unknown |
---|
1705 | need_version=unknown |
---|
1706 | # when you set need_version to no, make sure it does not cause -set_version |
---|
1707 | # flags to be left without arguments |
---|
1708 | archive_cmds= |
---|
1709 | archive_expsym_cmds= |
---|
1710 | old_archive_from_new_cmds= |
---|
1711 | old_archive_from_expsyms_cmds= |
---|
1712 | export_dynamic_flag_spec= |
---|
1713 | whole_archive_flag_spec= |
---|
1714 | thread_safe_flag_spec= |
---|
1715 | hardcode_into_libs=no |
---|
1716 | hardcode_libdir_flag_spec= |
---|
1717 | hardcode_libdir_separator= |
---|
1718 | hardcode_direct=no |
---|
1719 | hardcode_minus_L=no |
---|
1720 | hardcode_shlibpath_var=unsupported |
---|
1721 | runpath_var= |
---|
1722 | link_all_deplibs=unknown |
---|
1723 | always_export_symbols=no |
---|
1724 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
---|
1725 | # include_expsyms should be a list of space-separated symbols to be *always* |
---|
1726 | # included in the symbol list |
---|
1727 | include_expsyms= |
---|
1728 | # exclude_expsyms can be an egrep regular expression of symbols to exclude |
---|
1729 | # it will be wrapped by ` (' and `)$', so one must not match beginning or |
---|
1730 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
---|
1731 | # as well as any symbol that contains `d'. |
---|
1732 | exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
---|
1733 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
---|
1734 | # platforms (ab)use it in PIC code, but their linkers get confused if |
---|
1735 | # the symbol is explicitly referenced. Since portable code cannot |
---|
1736 | # rely on this symbol name, it's probably fine to never include it in |
---|
1737 | # preloaded symbol tables. |
---|
1738 | extract_expsyms_cmds= |
---|
1739 | |
---|
1740 | case $host_os in |
---|
1741 | cygwin* | mingw* | pw32*) |
---|
1742 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
---|
1743 | # When not using gcc, we currently assume that we are using |
---|
1744 | # Microsoft Visual C++. |
---|
1745 | if test "$GCC" != yes; then |
---|
1746 | with_gnu_ld=no |
---|
1747 | fi |
---|
1748 | ;; |
---|
1749 | openbsd*) |
---|
1750 | with_gnu_ld=no |
---|
1751 | ;; |
---|
1752 | esac |
---|
1753 | |
---|
1754 | ld_shlibs=yes |
---|
1755 | if test "$with_gnu_ld" = yes; then |
---|
1756 | # If archive_cmds runs LD, not CC, wlarc should be empty |
---|
1757 | wlarc='${wl}' |
---|
1758 | |
---|
1759 | # See if GNU ld supports shared libraries. |
---|
1760 | case $host_os in |
---|
1761 | aix3* | aix4* | aix5*) |
---|
1762 | # On AIX, the GNU linker is very broken |
---|
1763 | # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. |
---|
1764 | ld_shlibs=no |
---|
1765 | cat <<EOF 1>&2 |
---|
1766 | |
---|
1767 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
---|
1768 | *** to be unable to reliably create shared libraries on AIX. |
---|
1769 | *** Therefore, libtool is disabling shared libraries support. If you |
---|
1770 | *** really care for shared libraries, you may want to modify your PATH |
---|
1771 | *** so that a non-GNU linker is found, and then restart. |
---|
1772 | |
---|
1773 | EOF |
---|
1774 | ;; |
---|
1775 | |
---|
1776 | amigaos*) |
---|
1777 | 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)' |
---|
1778 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1779 | hardcode_minus_L=yes |
---|
1780 | |
---|
1781 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
---|
1782 | # that the semantics of dynamic libraries on AmigaOS, at least up |
---|
1783 | # to version 4, is to share data among multiple programs linked |
---|
1784 | # with the same dynamic library. Since this doesn't match the |
---|
1785 | # behavior of shared libraries on other platforms, we can use |
---|
1786 | # them. |
---|
1787 | ld_shlibs=no |
---|
1788 | ;; |
---|
1789 | |
---|
1790 | beos*) |
---|
1791 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1792 | allow_undefined_flag=unsupported |
---|
1793 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
---|
1794 | # support --undefined. This deserves some investigation. FIXME |
---|
1795 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1796 | else |
---|
1797 | ld_shlibs=no |
---|
1798 | fi |
---|
1799 | ;; |
---|
1800 | |
---|
1801 | cygwin* | mingw* | pw32*) |
---|
1802 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
---|
1803 | # no search path for DLLs. |
---|
1804 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1805 | allow_undefined_flag=unsupported |
---|
1806 | always_export_symbols=yes |
---|
1807 | |
---|
1808 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
---|
1809 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
---|
1810 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
---|
1811 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
---|
1812 | else $CC -o impgen impgen.c ; fi)~ |
---|
1813 | $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
---|
1814 | |
---|
1815 | old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
---|
1816 | |
---|
1817 | # cygwin and mingw dlls have different entry points and sets of symbols |
---|
1818 | # to exclude. |
---|
1819 | # FIXME: what about values for MSVC? |
---|
1820 | dll_entry=__cygwin_dll_entry@12 |
---|
1821 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
---|
1822 | case $host_os in |
---|
1823 | mingw*) |
---|
1824 | # mingw values |
---|
1825 | dll_entry=_DllMainCRTStartup@12 |
---|
1826 | dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
---|
1827 | ;; |
---|
1828 | esac |
---|
1829 | |
---|
1830 | # mingw and cygwin differ, and it's simplest to just exclude the union |
---|
1831 | # of the two symbol sets. |
---|
1832 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
---|
1833 | |
---|
1834 | # recent cygwin and mingw systems supply a stub DllMain which the user |
---|
1835 | # can override, but on older systems we have to supply one (in ltdll.c) |
---|
1836 | if test "x$lt_cv_need_dllmain" = "xyes"; then |
---|
1837 | ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
---|
1838 | ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ |
---|
1839 | test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
---|
1840 | else |
---|
1841 | ltdll_obj= |
---|
1842 | ltdll_cmds= |
---|
1843 | fi |
---|
1844 | |
---|
1845 | # Extract the symbol export list from an `--export-all' def file, |
---|
1846 | # then regenerate the def file from the symbol export list, so that |
---|
1847 | # the compiled dll only exports the symbol export list. |
---|
1848 | # Be careful not to strip the DATA tag left be newer dlltools. |
---|
1849 | export_symbols_cmds="$ltdll_cmds"' |
---|
1850 | $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
---|
1851 | sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' |
---|
1852 | |
---|
1853 | # If the export-symbols file already is a .def file (1st line |
---|
1854 | # is EXPORTS), use it as is. |
---|
1855 | # If DATA tags from a recent dlltool are present, honour them! |
---|
1856 | archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then |
---|
1857 | cp $export_symbols $output_objdir/$soname-def; |
---|
1858 | else |
---|
1859 | echo EXPORTS > $output_objdir/$soname-def; |
---|
1860 | _lt_hint=1; |
---|
1861 | cat $export_symbols | while read symbol; do |
---|
1862 | set dummy \$symbol; |
---|
1863 | case \[$]# in |
---|
1864 | 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
---|
1865 | *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
---|
1866 | esac; |
---|
1867 | _lt_hint=`expr 1 + \$_lt_hint`; |
---|
1868 | done; |
---|
1869 | fi~ |
---|
1870 | '"$ltdll_cmds"' |
---|
1871 | $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
---|
1872 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ |
---|
1873 | $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
---|
1874 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ |
---|
1875 | $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
---|
1876 | ;; |
---|
1877 | |
---|
1878 | netbsd*) |
---|
1879 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
1880 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
---|
1881 | wlarc= |
---|
1882 | else |
---|
1883 | archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1884 | archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
1885 | fi |
---|
1886 | ;; |
---|
1887 | |
---|
1888 | solaris* | sysv5*) |
---|
1889 | if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
---|
1890 | ld_shlibs=no |
---|
1891 | cat <<EOF 1>&2 |
---|
1892 | |
---|
1893 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
---|
1894 | *** create shared libraries on Solaris systems. Therefore, libtool |
---|
1895 | *** is disabling shared libraries support. We urge you to upgrade GNU |
---|
1896 | *** binutils to release 2.9.1 or newer. Another option is to modify |
---|
1897 | *** your PATH or compiler configuration so that the native linker is |
---|
1898 | *** used, and then restart. |
---|
1899 | |
---|
1900 | EOF |
---|
1901 | elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1902 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1903 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
1904 | else |
---|
1905 | ld_shlibs=no |
---|
1906 | fi |
---|
1907 | ;; |
---|
1908 | |
---|
1909 | sunos4*) |
---|
1910 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
1911 | wlarc= |
---|
1912 | hardcode_direct=yes |
---|
1913 | hardcode_shlibpath_var=no |
---|
1914 | ;; |
---|
1915 | |
---|
1916 | *) |
---|
1917 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1918 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1919 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
1920 | else |
---|
1921 | ld_shlibs=no |
---|
1922 | fi |
---|
1923 | ;; |
---|
1924 | esac |
---|
1925 | |
---|
1926 | if test "$ld_shlibs" = yes; then |
---|
1927 | runpath_var=LD_RUN_PATH |
---|
1928 | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
---|
1929 | export_dynamic_flag_spec='${wl}--export-dynamic' |
---|
1930 | case $host_os in |
---|
1931 | cygwin* | mingw* | pw32*) |
---|
1932 | # dlltool doesn't understand --whole-archive et. al. |
---|
1933 | whole_archive_flag_spec= |
---|
1934 | ;; |
---|
1935 | *) |
---|
1936 | # ancient GNU ld didn't support --whole-archive et. al. |
---|
1937 | if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
---|
1938 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
---|
1939 | else |
---|
1940 | whole_archive_flag_spec= |
---|
1941 | fi |
---|
1942 | ;; |
---|
1943 | esac |
---|
1944 | fi |
---|
1945 | else |
---|
1946 | # PORTME fill in a description of your system's linker (not GNU ld) |
---|
1947 | case $host_os in |
---|
1948 | aix3*) |
---|
1949 | allow_undefined_flag=unsupported |
---|
1950 | always_export_symbols=yes |
---|
1951 | 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' |
---|
1952 | # Note: this linker hardcodes the directories in LIBPATH if there |
---|
1953 | # are no directories specified by -L. |
---|
1954 | hardcode_minus_L=yes |
---|
1955 | if test "$GCC" = yes && test -z "$link_static_flag"; then |
---|
1956 | # Neither direct hardcoding nor static linking is supported with a |
---|
1957 | # broken collect2. |
---|
1958 | hardcode_direct=unsupported |
---|
1959 | fi |
---|
1960 | ;; |
---|
1961 | |
---|
1962 | aix4* | aix5*) |
---|
1963 | if test "$host_cpu" = ia64; then |
---|
1964 | # On IA64, the linker does run time linking by default, so we don't |
---|
1965 | # have to do anything special. |
---|
1966 | aix_use_runtimelinking=no |
---|
1967 | exp_sym_flag='-Bexport' |
---|
1968 | no_entry_flag="" |
---|
1969 | else |
---|
1970 | aix_use_runtimelinking=no |
---|
1971 | |
---|
1972 | # Test if we are trying to use run time linking or normal |
---|
1973 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
---|
1974 | # need to do runtime linking. |
---|
1975 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
---|
1976 | for ld_flag in $LDFLAGS; do |
---|
1977 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
---|
1978 | aix_use_runtimelinking=yes |
---|
1979 | break |
---|
1980 | fi |
---|
1981 | done |
---|
1982 | esac |
---|
1983 | |
---|
1984 | exp_sym_flag='-bexport' |
---|
1985 | no_entry_flag='-bnoentry' |
---|
1986 | fi |
---|
1987 | |
---|
1988 | # When large executables or shared objects are built, AIX ld can |
---|
1989 | # have problems creating the table of contents. If linking a library |
---|
1990 | # or program results in "error TOC overflow" add -mminimal-toc to |
---|
1991 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
---|
1992 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
---|
1993 | |
---|
1994 | hardcode_direct=yes |
---|
1995 | archive_cmds='' |
---|
1996 | hardcode_libdir_separator=':' |
---|
1997 | if test "$GCC" = yes; then |
---|
1998 | case $host_os in aix4.[[012]]|aix4.[[012]].*) |
---|
1999 | collect2name=`${CC} -print-prog-name=collect2` |
---|
2000 | if test -f "$collect2name" && \ |
---|
2001 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
---|
2002 | then |
---|
2003 | # We have reworked collect2 |
---|
2004 | hardcode_direct=yes |
---|
2005 | else |
---|
2006 | # We have old collect2 |
---|
2007 | hardcode_direct=unsupported |
---|
2008 | # It fails to find uninstalled libraries when the uninstalled |
---|
2009 | # path is not listed in the libpath. Setting hardcode_minus_L |
---|
2010 | # to unsupported forces relinking |
---|
2011 | hardcode_minus_L=yes |
---|
2012 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2013 | hardcode_libdir_separator= |
---|
2014 | fi |
---|
2015 | esac |
---|
2016 | |
---|
2017 | shared_flag='-shared' |
---|
2018 | else |
---|
2019 | # not using gcc |
---|
2020 | if test "$host_cpu" = ia64; then |
---|
2021 | shared_flag='${wl}-G' |
---|
2022 | else |
---|
2023 | if test "$aix_use_runtimelinking" = yes; then |
---|
2024 | shared_flag='${wl}-G' |
---|
2025 | else |
---|
2026 | shared_flag='${wl}-bM:SRE' |
---|
2027 | fi |
---|
2028 | fi |
---|
2029 | fi |
---|
2030 | |
---|
2031 | # It seems that -bexpall can do strange things, so it is better to |
---|
2032 | # generate a list of symbols to export. |
---|
2033 | always_export_symbols=yes |
---|
2034 | if test "$aix_use_runtimelinking" = yes; then |
---|
2035 | # Warning - without using the other runtime loading flags (-brtl), |
---|
2036 | # -berok will link without error, but may produce a broken library. |
---|
2037 | allow_undefined_flag='-berok' |
---|
2038 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
---|
2039 | archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
---|
2040 | else |
---|
2041 | if test "$host_cpu" = ia64; then |
---|
2042 | hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
---|
2043 | allow_undefined_flag="-z nodefs" |
---|
2044 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
---|
2045 | else |
---|
2046 | hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
---|
2047 | # Warning - without using the other run time loading flags, |
---|
2048 | # -berok will link without error, but may produce a broken library. |
---|
2049 | allow_undefined_flag='${wl}-berok' |
---|
2050 | # This is a bit strange, but is similar to how AIX traditionally builds |
---|
2051 | # it's shared libraries. |
---|
2052 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' |
---|
2053 | fi |
---|
2054 | fi |
---|
2055 | ;; |
---|
2056 | |
---|
2057 | amigaos*) |
---|
2058 | 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)' |
---|
2059 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2060 | hardcode_minus_L=yes |
---|
2061 | # see comment about different semantics on the GNU ld section |
---|
2062 | ld_shlibs=no |
---|
2063 | ;; |
---|
2064 | |
---|
2065 | cygwin* | mingw* | pw32*) |
---|
2066 | # When not using gcc, we currently assume that we are using |
---|
2067 | # Microsoft Visual C++. |
---|
2068 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
---|
2069 | # no search path for DLLs. |
---|
2070 | hardcode_libdir_flag_spec=' ' |
---|
2071 | allow_undefined_flag=unsupported |
---|
2072 | # Tell ltmain to make .lib files, not .a files. |
---|
2073 | libext=lib |
---|
2074 | # FIXME: Setting linknames here is a bad hack. |
---|
2075 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
---|
2076 | # The linker will automatically build a .lib file if we build a DLL. |
---|
2077 | old_archive_from_new_cmds='true' |
---|
2078 | # FIXME: Should let the user specify the lib program. |
---|
2079 | old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' |
---|
2080 | fix_srcfile_path='`cygpath -w "$srcfile"`' |
---|
2081 | ;; |
---|
2082 | |
---|
2083 | darwin* | rhapsody*) |
---|
2084 | case "$host_os" in |
---|
2085 | rhapsody* | darwin1.[[012]]) |
---|
2086 | allow_undefined_flag='-undefined suppress' |
---|
2087 | ;; |
---|
2088 | *) # Darwin 1.3 on |
---|
2089 | allow_undefined_flag='-flat_namespace -undefined suppress' |
---|
2090 | ;; |
---|
2091 | esac |
---|
2092 | # FIXME: Relying on posixy $() will cause problems for |
---|
2093 | # cross-compilation, but unfortunately the echo tests do not |
---|
2094 | # yet detect zsh echo's removal of \ escapes. |
---|
2095 | archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' |
---|
2096 | # We need to add '_' to the symbols in $export_symbols first |
---|
2097 | #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' |
---|
2098 | hardcode_direct=yes |
---|
2099 | hardcode_shlibpath_var=no |
---|
2100 | whole_archive_flag_spec='-all_load $convenience' |
---|
2101 | ;; |
---|
2102 | |
---|
2103 | freebsd1*) |
---|
2104 | ld_shlibs=no |
---|
2105 | ;; |
---|
2106 | |
---|
2107 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
---|
2108 | # support. Future versions do this automatically, but an explicit c++rt0.o |
---|
2109 | # does not break anything, and helps significantly (at the cost of a little |
---|
2110 | # extra space). |
---|
2111 | freebsd2.2*) |
---|
2112 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
---|
2113 | hardcode_libdir_flag_spec='-R$libdir' |
---|
2114 | hardcode_direct=yes |
---|
2115 | hardcode_shlibpath_var=no |
---|
2116 | ;; |
---|
2117 | |
---|
2118 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
---|
2119 | freebsd2*) |
---|
2120 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
2121 | hardcode_direct=yes |
---|
2122 | hardcode_minus_L=yes |
---|
2123 | hardcode_shlibpath_var=no |
---|
2124 | ;; |
---|
2125 | |
---|
2126 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
---|
2127 | freebsd*) |
---|
2128 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
---|
2129 | hardcode_libdir_flag_spec='-R$libdir' |
---|
2130 | hardcode_direct=yes |
---|
2131 | hardcode_shlibpath_var=no |
---|
2132 | ;; |
---|
2133 | |
---|
2134 | hpux9* | hpux10* | hpux11*) |
---|
2135 | case $host_os in |
---|
2136 | hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; |
---|
2137 | *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; |
---|
2138 | esac |
---|
2139 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
---|
2140 | hardcode_libdir_separator=: |
---|
2141 | hardcode_direct=yes |
---|
2142 | hardcode_minus_L=yes # Not in the search PATH, but as the default |
---|
2143 | # location of the library. |
---|
2144 | export_dynamic_flag_spec='${wl}-E' |
---|
2145 | ;; |
---|
2146 | |
---|
2147 | irix5* | irix6*) |
---|
2148 | if test "$GCC" = yes; then |
---|
2149 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
2150 | else |
---|
2151 | archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
2152 | fi |
---|
2153 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
2154 | hardcode_libdir_separator=: |
---|
2155 | link_all_deplibs=yes |
---|
2156 | ;; |
---|
2157 | |
---|
2158 | netbsd*) |
---|
2159 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
2160 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
---|
2161 | else |
---|
2162 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
---|
2163 | fi |
---|
2164 | hardcode_libdir_flag_spec='-R$libdir' |
---|
2165 | hardcode_direct=yes |
---|
2166 | hardcode_shlibpath_var=no |
---|
2167 | ;; |
---|
2168 | |
---|
2169 | newsos6) |
---|
2170 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2171 | hardcode_direct=yes |
---|
2172 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
2173 | hardcode_libdir_separator=: |
---|
2174 | hardcode_shlibpath_var=no |
---|
2175 | ;; |
---|
2176 | |
---|
2177 | openbsd*) |
---|
2178 | hardcode_direct=yes |
---|
2179 | hardcode_shlibpath_var=no |
---|
2180 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
2181 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
---|
2182 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
---|
2183 | export_dynamic_flag_spec='${wl}-E' |
---|
2184 | else |
---|
2185 | case "$host_os" in |
---|
2186 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
---|
2187 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
2188 | hardcode_libdir_flag_spec='-R$libdir' |
---|
2189 | ;; |
---|
2190 | *) |
---|
2191 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
---|
2192 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
---|
2193 | ;; |
---|
2194 | esac |
---|
2195 | fi |
---|
2196 | ;; |
---|
2197 | |
---|
2198 | os2*) |
---|
2199 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2200 | hardcode_minus_L=yes |
---|
2201 | allow_undefined_flag=unsupported |
---|
2202 | archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' |
---|
2203 | old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
---|
2204 | ;; |
---|
2205 | |
---|
2206 | osf3*) |
---|
2207 | if test "$GCC" = yes; then |
---|
2208 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
---|
2209 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
2210 | else |
---|
2211 | allow_undefined_flag=' -expect_unresolved \*' |
---|
2212 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
2213 | fi |
---|
2214 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
2215 | hardcode_libdir_separator=: |
---|
2216 | ;; |
---|
2217 | |
---|
2218 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
---|
2219 | if test "$GCC" = yes; then |
---|
2220 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
---|
2221 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
2222 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
2223 | else |
---|
2224 | allow_undefined_flag=' -expect_unresolved \*' |
---|
2225 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
2226 | archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
---|
2227 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' |
---|
2228 | |
---|
2229 | #Both c and cxx compiler support -rpath directly |
---|
2230 | hardcode_libdir_flag_spec='-rpath $libdir' |
---|
2231 | fi |
---|
2232 | hardcode_libdir_separator=: |
---|
2233 | ;; |
---|
2234 | |
---|
2235 | sco3.2v5*) |
---|
2236 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2237 | hardcode_shlibpath_var=no |
---|
2238 | runpath_var=LD_RUN_PATH |
---|
2239 | hardcode_runpath_var=yes |
---|
2240 | export_dynamic_flag_spec='${wl}-Bexport' |
---|
2241 | ;; |
---|
2242 | |
---|
2243 | solaris*) |
---|
2244 | # gcc --version < 3.0 without binutils cannot create self contained |
---|
2245 | # shared libraries reliably, requiring libgcc.a to resolve some of |
---|
2246 | # the object symbols generated in some cases. Libraries that use |
---|
2247 | # assert need libgcc.a to resolve __eprintf, for example. Linking |
---|
2248 | # a copy of libgcc.a into every shared library to guarantee resolving |
---|
2249 | # such symbols causes other problems: According to Tim Van Holder |
---|
2250 | # <tim.van.holder@pandora.be>, C++ libraries end up with a separate |
---|
2251 | # (to the application) exception stack for one thing. |
---|
2252 | no_undefined_flag=' -z defs' |
---|
2253 | if test "$GCC" = yes; then |
---|
2254 | case `$CC --version 2>/dev/null` in |
---|
2255 | [[12]].*) |
---|
2256 | cat <<EOF 1>&2 |
---|
2257 | |
---|
2258 | *** Warning: Releases of GCC earlier than version 3.0 cannot reliably |
---|
2259 | *** create self contained shared libraries on Solaris systems, without |
---|
2260 | *** introducing a dependency on libgcc.a. Therefore, libtool is disabling |
---|
2261 | *** -no-undefined support, which will at least allow you to build shared |
---|
2262 | *** libraries. However, you may find that when you link such libraries |
---|
2263 | *** into an application without using GCC, you have to manually add |
---|
2264 | *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to |
---|
2265 | *** upgrade to a newer version of GCC. Another option is to rebuild your |
---|
2266 | *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. |
---|
2267 | |
---|
2268 | EOF |
---|
2269 | no_undefined_flag= |
---|
2270 | ;; |
---|
2271 | esac |
---|
2272 | fi |
---|
2273 | # $CC -shared without GNU ld will not create a library from C++ |
---|
2274 | # object files and a static libstdc++, better avoid it by now |
---|
2275 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2276 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
2277 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
2278 | hardcode_libdir_flag_spec='-R$libdir' |
---|
2279 | hardcode_shlibpath_var=no |
---|
2280 | case $host_os in |
---|
2281 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
---|
2282 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
---|
2283 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
---|
2284 | esac |
---|
2285 | link_all_deplibs=yes |
---|
2286 | ;; |
---|
2287 | |
---|
2288 | sunos4*) |
---|
2289 | if test "x$host_vendor" = xsequent; then |
---|
2290 | # Use $CC to link under sequent, because it throws in some extra .o |
---|
2291 | # files that make .init and .fini sections work. |
---|
2292 | archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
2293 | else |
---|
2294 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
---|
2295 | fi |
---|
2296 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2297 | hardcode_direct=yes |
---|
2298 | hardcode_minus_L=yes |
---|
2299 | hardcode_shlibpath_var=no |
---|
2300 | ;; |
---|
2301 | |
---|
2302 | sysv4) |
---|
2303 | if test "x$host_vendor" = xsno; then |
---|
2304 | archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2305 | hardcode_direct=yes # is this really true??? |
---|
2306 | else |
---|
2307 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2308 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
---|
2309 | fi |
---|
2310 | runpath_var='LD_RUN_PATH' |
---|
2311 | hardcode_shlibpath_var=no |
---|
2312 | ;; |
---|
2313 | |
---|
2314 | sysv4.3*) |
---|
2315 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2316 | hardcode_shlibpath_var=no |
---|
2317 | export_dynamic_flag_spec='-Bexport' |
---|
2318 | ;; |
---|
2319 | |
---|
2320 | sysv5*) |
---|
2321 | no_undefined_flag=' -z text' |
---|
2322 | # $CC -shared without GNU ld will not create a library from C++ |
---|
2323 | # object files and a static libstdc++, better avoid it by now |
---|
2324 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2325 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
2326 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
2327 | hardcode_libdir_flag_spec= |
---|
2328 | hardcode_shlibpath_var=no |
---|
2329 | runpath_var='LD_RUN_PATH' |
---|
2330 | ;; |
---|
2331 | |
---|
2332 | uts4*) |
---|
2333 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2334 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2335 | hardcode_shlibpath_var=no |
---|
2336 | ;; |
---|
2337 | |
---|
2338 | dgux*) |
---|
2339 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2340 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2341 | hardcode_shlibpath_var=no |
---|
2342 | ;; |
---|
2343 | |
---|
2344 | sysv4*MP*) |
---|
2345 | if test -d /usr/nec; then |
---|
2346 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2347 | hardcode_shlibpath_var=no |
---|
2348 | runpath_var=LD_RUN_PATH |
---|
2349 | hardcode_runpath_var=yes |
---|
2350 | ld_shlibs=yes |
---|
2351 | fi |
---|
2352 | ;; |
---|
2353 | |
---|
2354 | sysv4.2uw2*) |
---|
2355 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
---|
2356 | hardcode_direct=yes |
---|
2357 | hardcode_minus_L=no |
---|
2358 | hardcode_shlibpath_var=no |
---|
2359 | hardcode_runpath_var=yes |
---|
2360 | runpath_var=LD_RUN_PATH |
---|
2361 | ;; |
---|
2362 | |
---|
2363 | sysv5uw7* | unixware7*) |
---|
2364 | no_undefined_flag='${wl}-z ${wl}text' |
---|
2365 | if test "$GCC" = yes; then |
---|
2366 | archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
2367 | else |
---|
2368 | archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
2369 | fi |
---|
2370 | runpath_var='LD_RUN_PATH' |
---|
2371 | hardcode_shlibpath_var=no |
---|
2372 | ;; |
---|
2373 | |
---|
2374 | *) |
---|
2375 | ld_shlibs=no |
---|
2376 | ;; |
---|
2377 | esac |
---|
2378 | fi |
---|
2379 | AC_MSG_RESULT([$ld_shlibs]) |
---|
2380 | test "$ld_shlibs" = no && can_build_shared=no |
---|
2381 | |
---|
2382 | # Check hardcoding attributes. |
---|
2383 | AC_MSG_CHECKING([how to hardcode library paths into programs]) |
---|
2384 | hardcode_action= |
---|
2385 | if test -n "$hardcode_libdir_flag_spec" || \ |
---|
2386 | test -n "$runpath_var"; then |
---|
2387 | |
---|
2388 | # We can hardcode non-existant directories. |
---|
2389 | if test "$hardcode_direct" != no && |
---|
2390 | # If the only mechanism to avoid hardcoding is shlibpath_var, we |
---|
2391 | # have to relink, otherwise we might link with an installed library |
---|
2392 | # when we should be linking with a yet-to-be-installed one |
---|
2393 | ## test "$hardcode_shlibpath_var" != no && |
---|
2394 | test "$hardcode_minus_L" != no; then |
---|
2395 | # Linking always hardcodes the temporary library directory. |
---|
2396 | hardcode_action=relink |
---|
2397 | else |
---|
2398 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
---|
2399 | hardcode_action=immediate |
---|
2400 | fi |
---|
2401 | else |
---|
2402 | # We cannot hardcode anything, or else we can only hardcode existing |
---|
2403 | # directories. |
---|
2404 | hardcode_action=unsupported |
---|
2405 | fi |
---|
2406 | AC_MSG_RESULT([$hardcode_action]) |
---|
2407 | |
---|
2408 | striplib= |
---|
2409 | old_striplib= |
---|
2410 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
---|
2411 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
---|
2412 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
---|
2413 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
---|
2414 | AC_MSG_RESULT([yes]) |
---|
2415 | else |
---|
2416 | AC_MSG_RESULT([no]) |
---|
2417 | fi |
---|
2418 | |
---|
2419 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
---|
2420 | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
---|
2421 | |
---|
2422 | # PORTME Fill in your ld.so characteristics |
---|
2423 | AC_MSG_CHECKING([dynamic linker characteristics]) |
---|
2424 | library_names_spec= |
---|
2425 | libname_spec='lib$name' |
---|
2426 | soname_spec= |
---|
2427 | postinstall_cmds= |
---|
2428 | postuninstall_cmds= |
---|
2429 | finish_cmds= |
---|
2430 | finish_eval= |
---|
2431 | shlibpath_var= |
---|
2432 | shlibpath_overrides_runpath=unknown |
---|
2433 | version_type=none |
---|
2434 | dynamic_linker="$host_os ld.so" |
---|
2435 | sys_lib_dlsearch_path_spec="/lib /usr/lib" |
---|
2436 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
---|
2437 | |
---|
2438 | case $host_os in |
---|
2439 | aix3*) |
---|
2440 | version_type=linux |
---|
2441 | library_names_spec='${libname}${release}.so$versuffix $libname.a' |
---|
2442 | shlibpath_var=LIBPATH |
---|
2443 | |
---|
2444 | # AIX has no versioning support, so we append a major version to the name. |
---|
2445 | soname_spec='${libname}${release}.so$major' |
---|
2446 | ;; |
---|
2447 | |
---|
2448 | aix4* | aix5*) |
---|
2449 | version_type=linux |
---|
2450 | if test "$host_cpu" = ia64; then |
---|
2451 | # AIX 5 supports IA64 |
---|
2452 | library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' |
---|
2453 | shlibpath_var=LD_LIBRARY_PATH |
---|
2454 | else |
---|
2455 | # With GCC up to 2.95.x, collect2 would create an import file |
---|
2456 | # for dependence libraries. The import file would start with |
---|
2457 | # the line `#! .'. This would cause the generated library to |
---|
2458 | # depend on `.', always an invalid library. This was fixed in |
---|
2459 | # development snapshots of GCC prior to 3.0. |
---|
2460 | case $host_os in |
---|
2461 | aix4 | aix4.[[01]] | aix4.[[01]].*) |
---|
2462 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
---|
2463 | echo ' yes ' |
---|
2464 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
---|
2465 | : |
---|
2466 | else |
---|
2467 | can_build_shared=no |
---|
2468 | fi |
---|
2469 | ;; |
---|
2470 | esac |
---|
2471 | # AIX (on Power*) has no versioning support, so currently we can |
---|
2472 | # not hardcode correct soname into executable. Probably we can |
---|
2473 | # add versioning support to collect2, so additional links can |
---|
2474 | # be useful in future. |
---|
2475 | if test "$aix_use_runtimelinking" = yes; then |
---|
2476 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
---|
2477 | # instead of lib<name>.a to let people know that these are not |
---|
2478 | # typical AIX shared libraries. |
---|
2479 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2480 | else |
---|
2481 | # We preserve .a as extension for shared libraries through AIX4.2 |
---|
2482 | # and later when we are not doing run time linking. |
---|
2483 | library_names_spec='${libname}${release}.a $libname.a' |
---|
2484 | soname_spec='${libname}${release}.so$major' |
---|
2485 | fi |
---|
2486 | shlibpath_var=LIBPATH |
---|
2487 | fi |
---|
2488 | ;; |
---|
2489 | |
---|
2490 | amigaos*) |
---|
2491 | library_names_spec='$libname.ixlibrary $libname.a' |
---|
2492 | # Create ${libname}_ixlibrary.a entries in /sys/libs. |
---|
2493 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' |
---|
2494 | ;; |
---|
2495 | |
---|
2496 | beos*) |
---|
2497 | library_names_spec='${libname}.so' |
---|
2498 | dynamic_linker="$host_os ld.so" |
---|
2499 | shlibpath_var=LIBRARY_PATH |
---|
2500 | ;; |
---|
2501 | |
---|
2502 | bsdi4*) |
---|
2503 | version_type=linux |
---|
2504 | need_version=no |
---|
2505 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2506 | soname_spec='${libname}${release}.so$major' |
---|
2507 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
---|
2508 | shlibpath_var=LD_LIBRARY_PATH |
---|
2509 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
---|
2510 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
---|
2511 | export_dynamic_flag_spec=-rdynamic |
---|
2512 | # the default ld.so.conf also contains /usr/contrib/lib and |
---|
2513 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
---|
2514 | # libtool to hard-code these into programs |
---|
2515 | ;; |
---|
2516 | |
---|
2517 | cygwin* | mingw* | pw32*) |
---|
2518 | version_type=windows |
---|
2519 | need_version=no |
---|
2520 | need_lib_prefix=no |
---|
2521 | case $GCC,$host_os in |
---|
2522 | yes,cygwin*) |
---|
2523 | library_names_spec='$libname.dll.a' |
---|
2524 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
---|
2525 | postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ |
---|
2526 | dldir=$destdir/`dirname \$dlpath`~ |
---|
2527 | test -d \$dldir || mkdir -p \$dldir~ |
---|
2528 | $install_prog .libs/$dlname \$dldir/$dlname' |
---|
2529 | postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
---|
2530 | dlpath=$dir/\$dldll~ |
---|
2531 | $rm \$dlpath' |
---|
2532 | ;; |
---|
2533 | yes,mingw*) |
---|
2534 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
---|
2535 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` |
---|
2536 | ;; |
---|
2537 | yes,pw32*) |
---|
2538 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' |
---|
2539 | ;; |
---|
2540 | *) |
---|
2541 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' |
---|
2542 | ;; |
---|
2543 | esac |
---|
2544 | dynamic_linker='Win32 ld.exe' |
---|
2545 | # FIXME: first we should search . and the directory the executable is in |
---|
2546 | shlibpath_var=PATH |
---|
2547 | ;; |
---|
2548 | |
---|
2549 | darwin* | rhapsody*) |
---|
2550 | dynamic_linker="$host_os dyld" |
---|
2551 | version_type=darwin |
---|
2552 | need_lib_prefix=no |
---|
2553 | need_version=no |
---|
2554 | # FIXME: Relying on posixy $() will cause problems for |
---|
2555 | # cross-compilation, but unfortunately the echo tests do not |
---|
2556 | # yet detect zsh echo's removal of \ escapes. |
---|
2557 | library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' |
---|
2558 | soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' |
---|
2559 | shlibpath_overrides_runpath=yes |
---|
2560 | shlibpath_var=DYLD_LIBRARY_PATH |
---|
2561 | ;; |
---|
2562 | |
---|
2563 | freebsd1*) |
---|
2564 | dynamic_linker=no |
---|
2565 | ;; |
---|
2566 | |
---|
2567 | freebsd*) |
---|
2568 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
---|
2569 | version_type=freebsd-$objformat |
---|
2570 | case $version_type in |
---|
2571 | freebsd-elf*) |
---|
2572 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
---|
2573 | need_version=no |
---|
2574 | need_lib_prefix=no |
---|
2575 | ;; |
---|
2576 | freebsd-*) |
---|
2577 | library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' |
---|
2578 | need_version=yes |
---|
2579 | ;; |
---|
2580 | esac |
---|
2581 | shlibpath_var=LD_LIBRARY_PATH |
---|
2582 | case $host_os in |
---|
2583 | freebsd2*) |
---|
2584 | shlibpath_overrides_runpath=yes |
---|
2585 | ;; |
---|
2586 | *) |
---|
2587 | shlibpath_overrides_runpath=no |
---|
2588 | hardcode_into_libs=yes |
---|
2589 | ;; |
---|
2590 | esac |
---|
2591 | ;; |
---|
2592 | |
---|
2593 | gnu*) |
---|
2594 | version_type=linux |
---|
2595 | need_lib_prefix=no |
---|
2596 | need_version=no |
---|
2597 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' |
---|
2598 | soname_spec='${libname}${release}.so$major' |
---|
2599 | shlibpath_var=LD_LIBRARY_PATH |
---|
2600 | hardcode_into_libs=yes |
---|
2601 | ;; |
---|
2602 | |
---|
2603 | hpux9* | hpux10* | hpux11*) |
---|
2604 | # Give a soname corresponding to the major version so that dld.sl refuses to |
---|
2605 | # link against other versions. |
---|
2606 | dynamic_linker="$host_os dld.sl" |
---|
2607 | version_type=sunos |
---|
2608 | need_lib_prefix=no |
---|
2609 | need_version=no |
---|
2610 | shlibpath_var=SHLIB_PATH |
---|
2611 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
---|
2612 | library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' |
---|
2613 | soname_spec='${libname}${release}.sl$major' |
---|
2614 | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
---|
2615 | postinstall_cmds='chmod 555 $lib' |
---|
2616 | ;; |
---|
2617 | |
---|
2618 | irix5* | irix6*) |
---|
2619 | version_type=irix |
---|
2620 | need_lib_prefix=no |
---|
2621 | need_version=no |
---|
2622 | soname_spec='${libname}${release}.so$major' |
---|
2623 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' |
---|
2624 | case $host_os in |
---|
2625 | irix5*) |
---|
2626 | libsuff= shlibsuff= |
---|
2627 | ;; |
---|
2628 | *) |
---|
2629 | case $LD in # libtool.m4 will add one of these switches to LD |
---|
2630 | *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; |
---|
2631 | *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; |
---|
2632 | *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; |
---|
2633 | *) libsuff= shlibsuff= libmagic=never-match;; |
---|
2634 | esac |
---|
2635 | ;; |
---|
2636 | esac |
---|
2637 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
---|
2638 | shlibpath_overrides_runpath=no |
---|
2639 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
---|
2640 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
---|
2641 | ;; |
---|
2642 | |
---|
2643 | # No shared lib support for Linux oldld, aout, or coff. |
---|
2644 | linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) |
---|
2645 | dynamic_linker=no |
---|
2646 | ;; |
---|
2647 | |
---|
2648 | # This must be Linux ELF. |
---|
2649 | linux-gnu*) |
---|
2650 | version_type=linux |
---|
2651 | need_lib_prefix=no |
---|
2652 | need_version=no |
---|
2653 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2654 | soname_spec='${libname}${release}.so$major' |
---|
2655 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
---|
2656 | shlibpath_var=LD_LIBRARY_PATH |
---|
2657 | shlibpath_overrides_runpath=no |
---|
2658 | # This implies no fast_install, which is unacceptable. |
---|
2659 | # Some rework will be needed to allow for fast_install |
---|
2660 | # before this can be enabled. |
---|
2661 | hardcode_into_libs=yes |
---|
2662 | |
---|
2663 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
---|
2664 | # powerpc, because MkLinux only supported shared libraries with the |
---|
2665 | # GNU dynamic linker. Since this was broken with cross compilers, |
---|
2666 | # most powerpc-linux boxes support dynamic linking these days and |
---|
2667 | # people can always --disable-shared, the test was removed, and we |
---|
2668 | # assume the GNU/Linux dynamic linker is in use. |
---|
2669 | dynamic_linker='GNU/Linux ld.so' |
---|
2670 | ;; |
---|
2671 | |
---|
2672 | netbsd*) |
---|
2673 | version_type=sunos |
---|
2674 | need_lib_prefix=no |
---|
2675 | need_version=no |
---|
2676 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
2677 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
---|
2678 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2679 | dynamic_linker='NetBSD (a.out) ld.so' |
---|
2680 | else |
---|
2681 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' |
---|
2682 | soname_spec='${libname}${release}.so$major' |
---|
2683 | dynamic_linker='NetBSD ld.elf_so' |
---|
2684 | fi |
---|
2685 | shlibpath_var=LD_LIBRARY_PATH |
---|
2686 | shlibpath_overrides_runpath=yes |
---|
2687 | hardcode_into_libs=yes |
---|
2688 | ;; |
---|
2689 | |
---|
2690 | newsos6) |
---|
2691 | version_type=linux |
---|
2692 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2693 | shlibpath_var=LD_LIBRARY_PATH |
---|
2694 | shlibpath_overrides_runpath=yes |
---|
2695 | ;; |
---|
2696 | |
---|
2697 | openbsd*) |
---|
2698 | version_type=sunos |
---|
2699 | need_lib_prefix=no |
---|
2700 | need_version=no |
---|
2701 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
2702 | case "$host_os" in |
---|
2703 | openbsd2.[[89]] | openbsd2.[[89]].*) |
---|
2704 | shlibpath_overrides_runpath=no |
---|
2705 | ;; |
---|
2706 | *) |
---|
2707 | shlibpath_overrides_runpath=yes |
---|
2708 | ;; |
---|
2709 | esac |
---|
2710 | else |
---|
2711 | shlibpath_overrides_runpath=yes |
---|
2712 | fi |
---|
2713 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
---|
2714 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2715 | shlibpath_var=LD_LIBRARY_PATH |
---|
2716 | ;; |
---|
2717 | |
---|
2718 | os2*) |
---|
2719 | libname_spec='$name' |
---|
2720 | need_lib_prefix=no |
---|
2721 | library_names_spec='$libname.dll $libname.a' |
---|
2722 | dynamic_linker='OS/2 ld.exe' |
---|
2723 | shlibpath_var=LIBPATH |
---|
2724 | ;; |
---|
2725 | |
---|
2726 | osf3* | osf4* | osf5*) |
---|
2727 | version_type=osf |
---|
2728 | need_version=no |
---|
2729 | soname_spec='${libname}${release}.so' |
---|
2730 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
---|
2731 | shlibpath_var=LD_LIBRARY_PATH |
---|
2732 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
---|
2733 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
---|
2734 | ;; |
---|
2735 | |
---|
2736 | sco3.2v5*) |
---|
2737 | version_type=osf |
---|
2738 | soname_spec='${libname}${release}.so$major' |
---|
2739 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2740 | shlibpath_var=LD_LIBRARY_PATH |
---|
2741 | ;; |
---|
2742 | |
---|
2743 | solaris*) |
---|
2744 | version_type=linux |
---|
2745 | need_lib_prefix=no |
---|
2746 | need_version=no |
---|
2747 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2748 | soname_spec='${libname}${release}.so$major' |
---|
2749 | shlibpath_var=LD_LIBRARY_PATH |
---|
2750 | shlibpath_overrides_runpath=yes |
---|
2751 | hardcode_into_libs=yes |
---|
2752 | # ldd complains unless libraries are executable |
---|
2753 | postinstall_cmds='chmod +x $lib' |
---|
2754 | ;; |
---|
2755 | |
---|
2756 | sunos4*) |
---|
2757 | version_type=sunos |
---|
2758 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
---|
2759 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
---|
2760 | shlibpath_var=LD_LIBRARY_PATH |
---|
2761 | shlibpath_overrides_runpath=yes |
---|
2762 | if test "$with_gnu_ld" = yes; then |
---|
2763 | need_lib_prefix=no |
---|
2764 | fi |
---|
2765 | need_version=yes |
---|
2766 | ;; |
---|
2767 | |
---|
2768 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
2769 | version_type=linux |
---|
2770 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2771 | soname_spec='${libname}${release}.so$major' |
---|
2772 | shlibpath_var=LD_LIBRARY_PATH |
---|
2773 | case $host_vendor in |
---|
2774 | sni) |
---|
2775 | shlibpath_overrides_runpath=no |
---|
2776 | ;; |
---|
2777 | motorola) |
---|
2778 | need_lib_prefix=no |
---|
2779 | need_version=no |
---|
2780 | shlibpath_overrides_runpath=no |
---|
2781 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
---|
2782 | ;; |
---|
2783 | esac |
---|
2784 | ;; |
---|
2785 | |
---|
2786 | uts4*) |
---|
2787 | version_type=linux |
---|
2788 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2789 | soname_spec='${libname}${release}.so$major' |
---|
2790 | shlibpath_var=LD_LIBRARY_PATH |
---|
2791 | ;; |
---|
2792 | |
---|
2793 | dgux*) |
---|
2794 | version_type=linux |
---|
2795 | need_lib_prefix=no |
---|
2796 | need_version=no |
---|
2797 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2798 | soname_spec='${libname}${release}.so$major' |
---|
2799 | shlibpath_var=LD_LIBRARY_PATH |
---|
2800 | ;; |
---|
2801 | |
---|
2802 | sysv4*MP*) |
---|
2803 | if test -d /usr/nec ;then |
---|
2804 | version_type=linux |
---|
2805 | library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' |
---|
2806 | soname_spec='$libname.so.$major' |
---|
2807 | shlibpath_var=LD_LIBRARY_PATH |
---|
2808 | fi |
---|
2809 | ;; |
---|
2810 | |
---|
2811 | *) |
---|
2812 | dynamic_linker=no |
---|
2813 | ;; |
---|
2814 | esac |
---|
2815 | AC_MSG_RESULT([$dynamic_linker]) |
---|
2816 | test "$dynamic_linker" = no && can_build_shared=no |
---|
2817 | |
---|
2818 | # Report the final consequences. |
---|
2819 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
---|
2820 | AC_MSG_RESULT([$can_build_shared]) |
---|
2821 | |
---|
2822 | AC_MSG_CHECKING([whether to build shared libraries]) |
---|
2823 | test "$can_build_shared" = "no" && enable_shared=no |
---|
2824 | |
---|
2825 | # On AIX, shared libraries and static libraries use the same namespace, and |
---|
2826 | # are all built from PIC. |
---|
2827 | case "$host_os" in |
---|
2828 | aix3*) |
---|
2829 | test "$enable_shared" = yes && enable_static=no |
---|
2830 | if test -n "$RANLIB"; then |
---|
2831 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
---|
2832 | postinstall_cmds='$RANLIB $lib' |
---|
2833 | fi |
---|
2834 | ;; |
---|
2835 | |
---|
2836 | aix4*) |
---|
2837 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
---|
2838 | test "$enable_shared" = yes && enable_static=no |
---|
2839 | fi |
---|
2840 | ;; |
---|
2841 | esac |
---|
2842 | AC_MSG_RESULT([$enable_shared]) |
---|
2843 | |
---|
2844 | AC_MSG_CHECKING([whether to build static libraries]) |
---|
2845 | # Make sure either enable_shared or enable_static is yes. |
---|
2846 | test "$enable_shared" = yes || enable_static=yes |
---|
2847 | AC_MSG_RESULT([$enable_static]) |
---|
2848 | |
---|
2849 | if test "$hardcode_action" = relink; then |
---|
2850 | # Fast installation is not supported |
---|
2851 | enable_fast_install=no |
---|
2852 | elif test "$shlibpath_overrides_runpath" = yes || |
---|
2853 | test "$enable_shared" = no; then |
---|
2854 | # Fast installation is not necessary |
---|
2855 | enable_fast_install=needless |
---|
2856 | fi |
---|
2857 | |
---|
2858 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
---|
2859 | if test "$GCC" = yes; then |
---|
2860 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
---|
2861 | fi |
---|
2862 | |
---|
2863 | AC_LIBTOOL_DLOPEN_SELF |
---|
2864 | |
---|
2865 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
---|
2866 | case $archive_cmds in |
---|
2867 | *'~'*) |
---|
2868 | # FIXME: we may have to deal with multi-command sequences. |
---|
2869 | ;; |
---|
2870 | '$CC '*) |
---|
2871 | # Test whether the compiler implicitly links with -lc since on some |
---|
2872 | # systems, -lgcc has to come before -lc. If gcc already passes -lc |
---|
2873 | # to ld, don't add -lc before -lgcc. |
---|
2874 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
---|
2875 | AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], |
---|
2876 | [$rm conftest* |
---|
2877 | echo 'static int dummy;' > conftest.$ac_ext |
---|
2878 | |
---|
2879 | if AC_TRY_EVAL(ac_compile); then |
---|
2880 | soname=conftest |
---|
2881 | lib=conftest |
---|
2882 | libobjs=conftest.$ac_objext |
---|
2883 | deplibs= |
---|
2884 | wl=$lt_cv_prog_cc_wl |
---|
2885 | compiler_flags=-v |
---|
2886 | linker_flags=-v |
---|
2887 | verstring= |
---|
2888 | output_objdir=. |
---|
2889 | libname=conftest |
---|
2890 | save_allow_undefined_flag=$allow_undefined_flag |
---|
2891 | allow_undefined_flag= |
---|
2892 | if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
---|
2893 | then |
---|
2894 | lt_cv_archive_cmds_need_lc=no |
---|
2895 | else |
---|
2896 | lt_cv_archive_cmds_need_lc=yes |
---|
2897 | fi |
---|
2898 | allow_undefined_flag=$save_allow_undefined_flag |
---|
2899 | else |
---|
2900 | cat conftest.err 1>&5 |
---|
2901 | fi]) |
---|
2902 | AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) |
---|
2903 | ;; |
---|
2904 | esac |
---|
2905 | fi |
---|
2906 | need_lc=${lt_cv_archive_cmds_need_lc-yes} |
---|
2907 | |
---|
2908 | # The second clause should only fire when bootstrapping the |
---|
2909 | # libtool distribution, otherwise you forgot to ship ltmain.sh |
---|
2910 | # with your package, and you will get complaints that there are |
---|
2911 | # no rules to generate ltmain.sh. |
---|
2912 | if test -f "$ltmain"; then |
---|
2913 | : |
---|
2914 | else |
---|
2915 | # If there is no Makefile yet, we rely on a make rule to execute |
---|
2916 | # `config.status --recheck' to rerun these tests and create the |
---|
2917 | # libtool script then. |
---|
2918 | test -f Makefile && make "$ltmain" |
---|
2919 | fi |
---|
2920 | |
---|
2921 | if test -f "$ltmain"; then |
---|
2922 | trap "$rm \"${ofile}T\"; exit 1" 1 2 15 |
---|
2923 | $rm -f "${ofile}T" |
---|
2924 | |
---|
2925 | echo creating $ofile |
---|
2926 | |
---|
2927 | # Now quote all the things that may contain metacharacters while being |
---|
2928 | # careful not to overquote the AC_SUBSTed values. We take copies of the |
---|
2929 | # variables and quote the copies for generation of the libtool script. |
---|
2930 | for var in echo old_CC old_CFLAGS \ |
---|
2931 | AR AR_FLAGS CC LD LN_S NM SHELL \ |
---|
2932 | reload_flag reload_cmds wl \ |
---|
2933 | pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
---|
2934 | thread_safe_flag_spec whole_archive_flag_spec libname_spec \ |
---|
2935 | library_names_spec soname_spec \ |
---|
2936 | RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
---|
2937 | old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ |
---|
2938 | postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ |
---|
2939 | old_striplib striplib file_magic_cmd export_symbols_cmds \ |
---|
2940 | deplibs_check_method allow_undefined_flag no_undefined_flag \ |
---|
2941 | finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ |
---|
2942 | global_symbol_to_c_name_address \ |
---|
2943 | hardcode_libdir_flag_spec hardcode_libdir_separator \ |
---|
2944 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
---|
2945 | compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do |
---|
2946 | |
---|
2947 | case $var in |
---|
2948 | reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
---|
2949 | old_postinstall_cmds | old_postuninstall_cmds | \ |
---|
2950 | export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ |
---|
2951 | extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ |
---|
2952 | postinstall_cmds | postuninstall_cmds | \ |
---|
2953 | finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
---|
2954 | # Double-quote double-evaled strings. |
---|
2955 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
---|
2956 | ;; |
---|
2957 | *) |
---|
2958 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
---|
2959 | ;; |
---|
2960 | esac |
---|
2961 | done |
---|
2962 | |
---|
2963 | cat <<__EOF__ > "${ofile}T" |
---|
2964 | #! $SHELL |
---|
2965 | |
---|
2966 | # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
---|
2967 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
---|
2968 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
---|
2969 | # |
---|
2970 | # Copyright (C) 1996-2000 Free Software Foundation, Inc. |
---|
2971 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
---|
2972 | # |
---|
2973 | # This program is free software; you can redistribute it and/or modify |
---|
2974 | # it under the terms of the GNU General Public License as published by |
---|
2975 | # the Free Software Foundation; either version 2 of the License, or |
---|
2976 | # (at your option) any later version. |
---|
2977 | # |
---|
2978 | # This program is distributed in the hope that it will be useful, but |
---|
2979 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
2980 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
2981 | # General Public License for more details. |
---|
2982 | # |
---|
2983 | # You should have received a copy of the GNU General Public License |
---|
2984 | # along with this program; if not, write to the Free Software |
---|
2985 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
2986 | # |
---|
2987 | # As a special exception to the GNU General Public License, if you |
---|
2988 | # distribute this file as part of a program that contains a |
---|
2989 | # configuration script generated by Autoconf, you may include it under |
---|
2990 | # the same distribution terms that you use for the rest of that program. |
---|
2991 | |
---|
2992 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
---|
2993 | Xsed="sed -e s/^X//" |
---|
2994 | |
---|
2995 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
2996 | # if CDPATH is set. |
---|
2997 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
2998 | |
---|
2999 | # ### BEGIN LIBTOOL CONFIG |
---|
3000 | |
---|
3001 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
---|
3002 | |
---|
3003 | # Shell to use when invoking shell scripts. |
---|
3004 | SHELL=$lt_SHELL |
---|
3005 | |
---|
3006 | # Whether or not to build shared libraries. |
---|
3007 | build_libtool_libs=$enable_shared |
---|
3008 | |
---|
3009 | # Whether or not to build static libraries. |
---|
3010 | build_old_libs=$enable_static |
---|
3011 | |
---|
3012 | # Whether or not to add -lc for building shared libraries. |
---|
3013 | build_libtool_need_lc=$need_lc |
---|
3014 | |
---|
3015 | # Whether or not to optimize for fast installation. |
---|
3016 | fast_install=$enable_fast_install |
---|
3017 | |
---|
3018 | # The host system. |
---|
3019 | host_alias=$host_alias |
---|
3020 | host=$host |
---|
3021 | |
---|
3022 | # An echo program that does not interpret backslashes. |
---|
3023 | echo=$lt_echo |
---|
3024 | |
---|
3025 | # The archiver. |
---|
3026 | AR=$lt_AR |
---|
3027 | AR_FLAGS=$lt_AR_FLAGS |
---|
3028 | |
---|
3029 | # The default C compiler. |
---|
3030 | CC=$lt_CC |
---|
3031 | |
---|
3032 | # Is the compiler the GNU C compiler? |
---|
3033 | with_gcc=$GCC |
---|
3034 | |
---|
3035 | # The linker used to build libraries. |
---|
3036 | LD=$lt_LD |
---|
3037 | |
---|
3038 | # Whether we need hard or soft links. |
---|
3039 | LN_S=$lt_LN_S |
---|
3040 | |
---|
3041 | # A BSD-compatible nm program. |
---|
3042 | NM=$lt_NM |
---|
3043 | |
---|
3044 | # A symbol stripping program |
---|
3045 | STRIP=$STRIP |
---|
3046 | |
---|
3047 | # Used to examine libraries when file_magic_cmd begins "file" |
---|
3048 | MAGIC_CMD=$MAGIC_CMD |
---|
3049 | |
---|
3050 | # Used on cygwin: DLL creation program. |
---|
3051 | DLLTOOL="$DLLTOOL" |
---|
3052 | |
---|
3053 | # Used on cygwin: object dumper. |
---|
3054 | OBJDUMP="$OBJDUMP" |
---|
3055 | |
---|
3056 | # Used on cygwin: assembler. |
---|
3057 | AS="$AS" |
---|
3058 | |
---|
3059 | # The name of the directory that contains temporary libtool files. |
---|
3060 | objdir=$objdir |
---|
3061 | |
---|
3062 | # How to create reloadable object files. |
---|
3063 | reload_flag=$lt_reload_flag |
---|
3064 | reload_cmds=$lt_reload_cmds |
---|
3065 | |
---|
3066 | # How to pass a linker flag through the compiler. |
---|
3067 | wl=$lt_wl |
---|
3068 | |
---|
3069 | # Object file suffix (normally "o"). |
---|
3070 | objext="$ac_objext" |
---|
3071 | |
---|
3072 | # Old archive suffix (normally "a"). |
---|
3073 | libext="$libext" |
---|
3074 | |
---|
3075 | # Executable file suffix (normally ""). |
---|
3076 | exeext="$exeext" |
---|
3077 | |
---|
3078 | # Additional compiler flags for building library objects. |
---|
3079 | pic_flag=$lt_pic_flag |
---|
3080 | pic_mode=$pic_mode |
---|
3081 | |
---|
3082 | # Does compiler simultaneously support -c and -o options? |
---|
3083 | compiler_c_o=$lt_compiler_c_o |
---|
3084 | |
---|
3085 | # Can we write directly to a .lo ? |
---|
3086 | compiler_o_lo=$lt_compiler_o_lo |
---|
3087 | |
---|
3088 | # Must we lock files when doing compilation ? |
---|
3089 | need_locks=$lt_need_locks |
---|
3090 | |
---|
3091 | # Do we need the lib prefix for modules? |
---|
3092 | need_lib_prefix=$need_lib_prefix |
---|
3093 | |
---|
3094 | # Do we need a version for libraries? |
---|
3095 | need_version=$need_version |
---|
3096 | |
---|
3097 | # Whether dlopen is supported. |
---|
3098 | dlopen_support=$enable_dlopen |
---|
3099 | |
---|
3100 | # Whether dlopen of programs is supported. |
---|
3101 | dlopen_self=$enable_dlopen_self |
---|
3102 | |
---|
3103 | # Whether dlopen of statically linked programs is supported. |
---|
3104 | dlopen_self_static=$enable_dlopen_self_static |
---|
3105 | |
---|
3106 | # Compiler flag to prevent dynamic linking. |
---|
3107 | link_static_flag=$lt_link_static_flag |
---|
3108 | |
---|
3109 | # Compiler flag to turn off builtin functions. |
---|
3110 | no_builtin_flag=$lt_no_builtin_flag |
---|
3111 | |
---|
3112 | # Compiler flag to allow reflexive dlopens. |
---|
3113 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec |
---|
3114 | |
---|
3115 | # Compiler flag to generate shared objects directly from archives. |
---|
3116 | whole_archive_flag_spec=$lt_whole_archive_flag_spec |
---|
3117 | |
---|
3118 | # Compiler flag to generate thread-safe objects. |
---|
3119 | thread_safe_flag_spec=$lt_thread_safe_flag_spec |
---|
3120 | |
---|
3121 | # Library versioning type. |
---|
3122 | version_type=$version_type |
---|
3123 | |
---|
3124 | # Format of library name prefix. |
---|
3125 | libname_spec=$lt_libname_spec |
---|
3126 | |
---|
3127 | # List of archive names. First name is the real one, the rest are links. |
---|
3128 | # The last name is the one that the linker finds with -lNAME. |
---|
3129 | library_names_spec=$lt_library_names_spec |
---|
3130 | |
---|
3131 | # The coded name of the library, if different from the real name. |
---|
3132 | soname_spec=$lt_soname_spec |
---|
3133 | |
---|
3134 | # Commands used to build and install an old-style archive. |
---|
3135 | RANLIB=$lt_RANLIB |
---|
3136 | old_archive_cmds=$lt_old_archive_cmds |
---|
3137 | old_postinstall_cmds=$lt_old_postinstall_cmds |
---|
3138 | old_postuninstall_cmds=$lt_old_postuninstall_cmds |
---|
3139 | |
---|
3140 | # Create an old-style archive from a shared archive. |
---|
3141 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds |
---|
3142 | |
---|
3143 | # Create a temporary old-style archive to link instead of a shared archive. |
---|
3144 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds |
---|
3145 | |
---|
3146 | # Commands used to build and install a shared archive. |
---|
3147 | archive_cmds=$lt_archive_cmds |
---|
3148 | archive_expsym_cmds=$lt_archive_expsym_cmds |
---|
3149 | postinstall_cmds=$lt_postinstall_cmds |
---|
3150 | postuninstall_cmds=$lt_postuninstall_cmds |
---|
3151 | |
---|
3152 | # Commands to strip libraries. |
---|
3153 | old_striplib=$lt_old_striplib |
---|
3154 | striplib=$lt_striplib |
---|
3155 | |
---|
3156 | # Method to check whether dependent libraries are shared objects. |
---|
3157 | deplibs_check_method=$lt_deplibs_check_method |
---|
3158 | |
---|
3159 | # Command to use when deplibs_check_method == file_magic. |
---|
3160 | file_magic_cmd=$lt_file_magic_cmd |
---|
3161 | |
---|
3162 | # Flag that allows shared libraries with undefined symbols to be built. |
---|
3163 | allow_undefined_flag=$lt_allow_undefined_flag |
---|
3164 | |
---|
3165 | # Flag that forces no undefined symbols. |
---|
3166 | no_undefined_flag=$lt_no_undefined_flag |
---|
3167 | |
---|
3168 | # Commands used to finish a libtool library installation in a directory. |
---|
3169 | finish_cmds=$lt_finish_cmds |
---|
3170 | |
---|
3171 | # Same as above, but a single script fragment to be evaled but not shown. |
---|
3172 | finish_eval=$lt_finish_eval |
---|
3173 | |
---|
3174 | # Take the output of nm and produce a listing of raw symbols and C names. |
---|
3175 | global_symbol_pipe=$lt_global_symbol_pipe |
---|
3176 | |
---|
3177 | # Transform the output of nm in a proper C declaration |
---|
3178 | global_symbol_to_cdecl=$lt_global_symbol_to_cdecl |
---|
3179 | |
---|
3180 | # Transform the output of nm in a C name address pair |
---|
3181 | global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address |
---|
3182 | |
---|
3183 | # This is the shared library runtime path variable. |
---|
3184 | runpath_var=$runpath_var |
---|
3185 | |
---|
3186 | # This is the shared library path variable. |
---|
3187 | shlibpath_var=$shlibpath_var |
---|
3188 | |
---|
3189 | # Is shlibpath searched before the hard-coded library search path? |
---|
3190 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
---|
3191 | |
---|
3192 | # How to hardcode a shared library path into an executable. |
---|
3193 | hardcode_action=$hardcode_action |
---|
3194 | |
---|
3195 | # Whether we should hardcode library paths into libraries. |
---|
3196 | hardcode_into_libs=$hardcode_into_libs |
---|
3197 | |
---|
3198 | # Flag to hardcode \$libdir into a binary during linking. |
---|
3199 | # This must work even if \$libdir does not exist. |
---|
3200 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec |
---|
3201 | |
---|
3202 | # Whether we need a single -rpath flag with a separated argument. |
---|
3203 | hardcode_libdir_separator=$lt_hardcode_libdir_separator |
---|
3204 | |
---|
3205 | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
---|
3206 | # resulting binary. |
---|
3207 | hardcode_direct=$hardcode_direct |
---|
3208 | |
---|
3209 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
---|
3210 | # resulting binary. |
---|
3211 | hardcode_minus_L=$hardcode_minus_L |
---|
3212 | |
---|
3213 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
---|
3214 | # the resulting binary. |
---|
3215 | hardcode_shlibpath_var=$hardcode_shlibpath_var |
---|
3216 | |
---|
3217 | # Variables whose values should be saved in libtool wrapper scripts and |
---|
3218 | # restored at relink time. |
---|
3219 | variables_saved_for_relink="$variables_saved_for_relink" |
---|
3220 | |
---|
3221 | # Whether libtool must link a program against all its dependency libraries. |
---|
3222 | link_all_deplibs=$link_all_deplibs |
---|
3223 | |
---|
3224 | # Compile-time system search path for libraries |
---|
3225 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
---|
3226 | |
---|
3227 | # Run-time system search path for libraries |
---|
3228 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
---|
3229 | |
---|
3230 | # Fix the shell variable \$srcfile for the compiler. |
---|
3231 | fix_srcfile_path="$fix_srcfile_path" |
---|
3232 | |
---|
3233 | # Set to yes if exported symbols are required. |
---|
3234 | always_export_symbols=$always_export_symbols |
---|
3235 | |
---|
3236 | # The commands to list exported symbols. |
---|
3237 | export_symbols_cmds=$lt_export_symbols_cmds |
---|
3238 | |
---|
3239 | # The commands to extract the exported symbol list from a shared archive. |
---|
3240 | extract_expsyms_cmds=$lt_extract_expsyms_cmds |
---|
3241 | |
---|
3242 | # Symbols that should not be listed in the preloaded symbols. |
---|
3243 | exclude_expsyms=$lt_exclude_expsyms |
---|
3244 | |
---|
3245 | # Symbols that must always be exported. |
---|
3246 | include_expsyms=$lt_include_expsyms |
---|
3247 | |
---|
3248 | # ### END LIBTOOL CONFIG |
---|
3249 | |
---|
3250 | __EOF__ |
---|
3251 | |
---|
3252 | case $host_os in |
---|
3253 | aix3*) |
---|
3254 | cat <<\EOF >> "${ofile}T" |
---|
3255 | |
---|
3256 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
3257 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
3258 | # vanish in a puff of smoke. |
---|
3259 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
3260 | COLLECT_NAMES= |
---|
3261 | export COLLECT_NAMES |
---|
3262 | fi |
---|
3263 | EOF |
---|
3264 | ;; |
---|
3265 | esac |
---|
3266 | |
---|
3267 | case $host_os in |
---|
3268 | cygwin* | mingw* | pw32* | os2*) |
---|
3269 | cat <<'EOF' >> "${ofile}T" |
---|
3270 | # This is a source program that is used to create dlls on Windows |
---|
3271 | # Don't remove nor modify the starting and closing comments |
---|
3272 | # /* ltdll.c starts here */ |
---|
3273 | # #define WIN32_LEAN_AND_MEAN |
---|
3274 | # #include <windows.h> |
---|
3275 | # #undef WIN32_LEAN_AND_MEAN |
---|
3276 | # #include <stdio.h> |
---|
3277 | # |
---|
3278 | # #ifndef __CYGWIN__ |
---|
3279 | # # ifdef __CYGWIN32__ |
---|
3280 | # # define __CYGWIN__ __CYGWIN32__ |
---|
3281 | # # endif |
---|
3282 | # #endif |
---|
3283 | # |
---|
3284 | # #ifdef __cplusplus |
---|
3285 | # extern "C" { |
---|
3286 | # #endif |
---|
3287 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
---|
3288 | # #ifdef __cplusplus |
---|
3289 | # } |
---|
3290 | # #endif |
---|
3291 | # |
---|
3292 | # #ifdef __CYGWIN__ |
---|
3293 | # #include <cygwin/cygwin_dll.h> |
---|
3294 | # DECLARE_CYGWIN_DLL( DllMain ); |
---|
3295 | # #endif |
---|
3296 | # HINSTANCE __hDllInstance_base; |
---|
3297 | # |
---|
3298 | # BOOL APIENTRY |
---|
3299 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
---|
3300 | # { |
---|
3301 | # __hDllInstance_base = hInst; |
---|
3302 | # return TRUE; |
---|
3303 | # } |
---|
3304 | # /* ltdll.c ends here */ |
---|
3305 | # This is a source program that is used to create import libraries |
---|
3306 | # on Windows for dlls which lack them. Don't remove nor modify the |
---|
3307 | # starting and closing comments |
---|
3308 | # /* impgen.c starts here */ |
---|
3309 | # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. |
---|
3310 | # |
---|
3311 | # This file is part of GNU libtool. |
---|
3312 | # |
---|
3313 | # This program is free software; you can redistribute it and/or modify |
---|
3314 | # it under the terms of the GNU General Public License as published by |
---|
3315 | # the Free Software Foundation; either version 2 of the License, or |
---|
3316 | # (at your option) any later version. |
---|
3317 | # |
---|
3318 | # This program is distributed in the hope that it will be useful, |
---|
3319 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
3320 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
3321 | # GNU General Public License for more details. |
---|
3322 | # |
---|
3323 | # You should have received a copy of the GNU General Public License |
---|
3324 | # along with this program; if not, write to the Free Software |
---|
3325 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
3326 | # */ |
---|
3327 | # |
---|
3328 | # #include <stdio.h> /* for printf() */ |
---|
3329 | # #include <unistd.h> /* for open(), lseek(), read() */ |
---|
3330 | # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
---|
3331 | # #include <string.h> /* for strdup() */ |
---|
3332 | # |
---|
3333 | # /* O_BINARY isn't required (or even defined sometimes) under Unix */ |
---|
3334 | # #ifndef O_BINARY |
---|
3335 | # #define O_BINARY 0 |
---|
3336 | # #endif |
---|
3337 | # |
---|
3338 | # static unsigned int |
---|
3339 | # pe_get16 (fd, offset) |
---|
3340 | # int fd; |
---|
3341 | # int offset; |
---|
3342 | # { |
---|
3343 | # unsigned char b[2]; |
---|
3344 | # lseek (fd, offset, SEEK_SET); |
---|
3345 | # read (fd, b, 2); |
---|
3346 | # return b[0] + (b[1]<<8); |
---|
3347 | # } |
---|
3348 | # |
---|
3349 | # static unsigned int |
---|
3350 | # pe_get32 (fd, offset) |
---|
3351 | # int fd; |
---|
3352 | # int offset; |
---|
3353 | # { |
---|
3354 | # unsigned char b[4]; |
---|
3355 | # lseek (fd, offset, SEEK_SET); |
---|
3356 | # read (fd, b, 4); |
---|
3357 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
---|
3358 | # } |
---|
3359 | # |
---|
3360 | # static unsigned int |
---|
3361 | # pe_as32 (ptr) |
---|
3362 | # void *ptr; |
---|
3363 | # { |
---|
3364 | # unsigned char *b = ptr; |
---|
3365 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
---|
3366 | # } |
---|
3367 | # |
---|
3368 | # int |
---|
3369 | # main (argc, argv) |
---|
3370 | # int argc; |
---|
3371 | # char *argv[]; |
---|
3372 | # { |
---|
3373 | # int dll; |
---|
3374 | # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
---|
3375 | # unsigned long export_rva, export_size, nsections, secptr, expptr; |
---|
3376 | # unsigned long name_rvas, nexp; |
---|
3377 | # unsigned char *expdata, *erva; |
---|
3378 | # char *filename, *dll_name; |
---|
3379 | # |
---|
3380 | # filename = argv[1]; |
---|
3381 | # |
---|
3382 | # dll = open(filename, O_RDONLY|O_BINARY); |
---|
3383 | # if (dll < 1) |
---|
3384 | # return 1; |
---|
3385 | # |
---|
3386 | # dll_name = filename; |
---|
3387 | # |
---|
3388 | # for (i=0; filename[i]; i++) |
---|
3389 | # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
---|
3390 | # dll_name = filename + i +1; |
---|
3391 | # |
---|
3392 | # pe_header_offset = pe_get32 (dll, 0x3c); |
---|
3393 | # opthdr_ofs = pe_header_offset + 4 + 20; |
---|
3394 | # num_entries = pe_get32 (dll, opthdr_ofs + 92); |
---|
3395 | # |
---|
3396 | # if (num_entries < 1) /* no exports */ |
---|
3397 | # return 1; |
---|
3398 | # |
---|
3399 | # export_rva = pe_get32 (dll, opthdr_ofs + 96); |
---|
3400 | # export_size = pe_get32 (dll, opthdr_ofs + 100); |
---|
3401 | # nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
---|
3402 | # secptr = (pe_header_offset + 4 + 20 + |
---|
3403 | # pe_get16 (dll, pe_header_offset + 4 + 16)); |
---|
3404 | # |
---|
3405 | # expptr = 0; |
---|
3406 | # for (i = 0; i < nsections; i++) |
---|
3407 | # { |
---|
3408 | # char sname[8]; |
---|
3409 | # unsigned long secptr1 = secptr + 40 * i; |
---|
3410 | # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
---|
3411 | # unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
---|
3412 | # unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
---|
3413 | # lseek(dll, secptr1, SEEK_SET); |
---|
3414 | # read(dll, sname, 8); |
---|
3415 | # if (vaddr <= export_rva && vaddr+vsize > export_rva) |
---|
3416 | # { |
---|
3417 | # expptr = fptr + (export_rva - vaddr); |
---|
3418 | # if (export_rva + export_size > vaddr + vsize) |
---|
3419 | # export_size = vsize - (export_rva - vaddr); |
---|
3420 | # break; |
---|
3421 | # } |
---|
3422 | # } |
---|
3423 | # |
---|
3424 | # expdata = (unsigned char*)malloc(export_size); |
---|
3425 | # lseek (dll, expptr, SEEK_SET); |
---|
3426 | # read (dll, expdata, export_size); |
---|
3427 | # erva = expdata - export_rva; |
---|
3428 | # |
---|
3429 | # nexp = pe_as32 (expdata+24); |
---|
3430 | # name_rvas = pe_as32 (expdata+32); |
---|
3431 | # |
---|
3432 | # printf ("EXPORTS\n"); |
---|
3433 | # for (i = 0; i<nexp; i++) |
---|
3434 | # { |
---|
3435 | # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
---|
3436 | # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
---|
3437 | # } |
---|
3438 | # |
---|
3439 | # return 0; |
---|
3440 | # } |
---|
3441 | # /* impgen.c ends here */ |
---|
3442 | |
---|
3443 | EOF |
---|
3444 | ;; |
---|
3445 | esac |
---|
3446 | |
---|
3447 | # We use sed instead of cat because bash on DJGPP gets confused if |
---|
3448 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
---|
3449 | # text mode, it properly converts lines to CR/LF. This bash problem |
---|
3450 | # is reportedly fixed, but why not run on old versions too? |
---|
3451 | sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) |
---|
3452 | |
---|
3453 | mv -f "${ofile}T" "$ofile" || \ |
---|
3454 | (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") |
---|
3455 | chmod +x "$ofile" |
---|
3456 | fi |
---|
3457 | |
---|
3458 | ])# _LT_AC_LTCONFIG_HACK |
---|
3459 | |
---|
3460 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
---|
3461 | AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) |
---|
3462 | |
---|
3463 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's |
---|
3464 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) |
---|
3465 | |
---|
3466 | # AC_ENABLE_SHARED - implement the --enable-shared flag |
---|
3467 | # Usage: AC_ENABLE_SHARED[(DEFAULT)] |
---|
3468 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
3469 | # `yes'. |
---|
3470 | AC_DEFUN([AC_ENABLE_SHARED], |
---|
3471 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
3472 | AC_ARG_ENABLE(shared, |
---|
3473 | changequote(<<, >>)dnl |
---|
3474 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
---|
3475 | changequote([, ])dnl |
---|
3476 | [p=${PACKAGE-default} |
---|
3477 | case $enableval in |
---|
3478 | yes) enable_shared=yes ;; |
---|
3479 | no) enable_shared=no ;; |
---|
3480 | *) |
---|
3481 | enable_shared=no |
---|
3482 | # Look at the argument we got. We use all the common list separators. |
---|
3483 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
3484 | for pkg in $enableval; do |
---|
3485 | if test "X$pkg" = "X$p"; then |
---|
3486 | enable_shared=yes |
---|
3487 | fi |
---|
3488 | done |
---|
3489 | IFS="$ac_save_ifs" |
---|
3490 | ;; |
---|
3491 | esac], |
---|
3492 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
---|
3493 | ]) |
---|
3494 | |
---|
3495 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
---|
3496 | AC_DEFUN([AC_DISABLE_SHARED], |
---|
3497 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3498 | AC_ENABLE_SHARED(no)]) |
---|
3499 | |
---|
3500 | # AC_ENABLE_STATIC - implement the --enable-static flag |
---|
3501 | # Usage: AC_ENABLE_STATIC[(DEFAULT)] |
---|
3502 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
3503 | # `yes'. |
---|
3504 | AC_DEFUN([AC_ENABLE_STATIC], |
---|
3505 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
3506 | AC_ARG_ENABLE(static, |
---|
3507 | changequote(<<, >>)dnl |
---|
3508 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
---|
3509 | changequote([, ])dnl |
---|
3510 | [p=${PACKAGE-default} |
---|
3511 | case $enableval in |
---|
3512 | yes) enable_static=yes ;; |
---|
3513 | no) enable_static=no ;; |
---|
3514 | *) |
---|
3515 | enable_static=no |
---|
3516 | # Look at the argument we got. We use all the common list separators. |
---|
3517 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
3518 | for pkg in $enableval; do |
---|
3519 | if test "X$pkg" = "X$p"; then |
---|
3520 | enable_static=yes |
---|
3521 | fi |
---|
3522 | done |
---|
3523 | IFS="$ac_save_ifs" |
---|
3524 | ;; |
---|
3525 | esac], |
---|
3526 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
---|
3527 | ]) |
---|
3528 | |
---|
3529 | # AC_DISABLE_STATIC - set the default static flag to --disable-static |
---|
3530 | AC_DEFUN([AC_DISABLE_STATIC], |
---|
3531 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3532 | AC_ENABLE_STATIC(no)]) |
---|
3533 | |
---|
3534 | |
---|
3535 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag |
---|
3536 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] |
---|
3537 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
3538 | # `yes'. |
---|
3539 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
---|
3540 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
3541 | AC_ARG_ENABLE(fast-install, |
---|
3542 | changequote(<<, >>)dnl |
---|
3543 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], |
---|
3544 | changequote([, ])dnl |
---|
3545 | [p=${PACKAGE-default} |
---|
3546 | case $enableval in |
---|
3547 | yes) enable_fast_install=yes ;; |
---|
3548 | no) enable_fast_install=no ;; |
---|
3549 | *) |
---|
3550 | enable_fast_install=no |
---|
3551 | # Look at the argument we got. We use all the common list separators. |
---|
3552 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
3553 | for pkg in $enableval; do |
---|
3554 | if test "X$pkg" = "X$p"; then |
---|
3555 | enable_fast_install=yes |
---|
3556 | fi |
---|
3557 | done |
---|
3558 | IFS="$ac_save_ifs" |
---|
3559 | ;; |
---|
3560 | esac], |
---|
3561 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
---|
3562 | ]) |
---|
3563 | |
---|
3564 | # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install |
---|
3565 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
---|
3566 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3567 | AC_ENABLE_FAST_INSTALL(no)]) |
---|
3568 | |
---|
3569 | # AC_LIBTOOL_PICMODE - implement the --with-pic flag |
---|
3570 | # Usage: AC_LIBTOOL_PICMODE[(MODE)] |
---|
3571 | # Where MODE is either `yes' or `no'. If omitted, it defaults to |
---|
3572 | # `both'. |
---|
3573 | AC_DEFUN([AC_LIBTOOL_PICMODE], |
---|
3574 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3575 | pic_mode=ifelse($#,1,$1,default)]) |
---|
3576 | |
---|
3577 | |
---|
3578 | # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library |
---|
3579 | AC_DEFUN([AC_PATH_TOOL_PREFIX], |
---|
3580 | [AC_MSG_CHECKING([for $1]) |
---|
3581 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
---|
3582 | [case $MAGIC_CMD in |
---|
3583 | /*) |
---|
3584 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
---|
3585 | ;; |
---|
3586 | ?:/*) |
---|
3587 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
---|
3588 | ;; |
---|
3589 | *) |
---|
3590 | ac_save_MAGIC_CMD="$MAGIC_CMD" |
---|
3591 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
3592 | dnl $ac_dummy forces splitting on constant user-supplied paths. |
---|
3593 | dnl POSIX.2 word splitting is done only on the output of word expansions, |
---|
3594 | dnl not every word. This closes a longstanding sh security hole. |
---|
3595 | ac_dummy="ifelse([$2], , $PATH, [$2])" |
---|
3596 | for ac_dir in $ac_dummy; do |
---|
3597 | test -z "$ac_dir" && ac_dir=. |
---|
3598 | if test -f $ac_dir/$1; then |
---|
3599 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
---|
3600 | if test -n "$file_magic_test_file"; then |
---|
3601 | case $deplibs_check_method in |
---|
3602 | "file_magic "*) |
---|
3603 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
---|
3604 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
3605 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
---|
3606 | egrep "$file_magic_regex" > /dev/null; then |
---|
3607 | : |
---|
3608 | else |
---|
3609 | cat <<EOF 1>&2 |
---|
3610 | |
---|
3611 | *** Warning: the command libtool uses to detect shared libraries, |
---|
3612 | *** $file_magic_cmd, produces output that libtool cannot recognize. |
---|
3613 | *** The result is that libtool may fail to recognize shared libraries |
---|
3614 | *** as such. This will affect the creation of libtool libraries that |
---|
3615 | *** depend on shared libraries, but programs linked with such libtool |
---|
3616 | *** libraries will work regardless of this problem. Nevertheless, you |
---|
3617 | *** may want to report the problem to your system manager and/or to |
---|
3618 | *** bug-libtool@gnu.org |
---|
3619 | |
---|
3620 | EOF |
---|
3621 | fi ;; |
---|
3622 | esac |
---|
3623 | fi |
---|
3624 | break |
---|
3625 | fi |
---|
3626 | done |
---|
3627 | IFS="$ac_save_ifs" |
---|
3628 | MAGIC_CMD="$ac_save_MAGIC_CMD" |
---|
3629 | ;; |
---|
3630 | esac]) |
---|
3631 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
3632 | if test -n "$MAGIC_CMD"; then |
---|
3633 | AC_MSG_RESULT($MAGIC_CMD) |
---|
3634 | else |
---|
3635 | AC_MSG_RESULT(no) |
---|
3636 | fi |
---|
3637 | ]) |
---|
3638 | |
---|
3639 | |
---|
3640 | # AC_PATH_MAGIC - find a file program which can recognise a shared library |
---|
3641 | AC_DEFUN([AC_PATH_MAGIC], |
---|
3642 | [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl |
---|
3643 | AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) |
---|
3644 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
---|
3645 | if test -n "$ac_tool_prefix"; then |
---|
3646 | AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) |
---|
3647 | else |
---|
3648 | MAGIC_CMD=: |
---|
3649 | fi |
---|
3650 | fi |
---|
3651 | ]) |
---|
3652 | |
---|
3653 | |
---|
3654 | # AC_PROG_LD - find the path to the GNU or non-GNU linker |
---|
3655 | AC_DEFUN([AC_PROG_LD], |
---|
3656 | [AC_ARG_WITH(gnu-ld, |
---|
3657 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
---|
3658 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
---|
3659 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
3660 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
3661 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
3662 | AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
---|
3663 | ac_prog=ld |
---|
3664 | if test "$GCC" = yes; then |
---|
3665 | # Check if gcc -print-prog-name=ld gives a path. |
---|
3666 | AC_MSG_CHECKING([for ld used by GCC]) |
---|
3667 | case $host in |
---|
3668 | *-*-mingw*) |
---|
3669 | # gcc leaves a trailing carriage return which upsets mingw |
---|
3670 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
---|
3671 | *) |
---|
3672 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
---|
3673 | esac |
---|
3674 | case $ac_prog in |
---|
3675 | # Accept absolute paths. |
---|
3676 | [[\\/]]* | [[A-Za-z]]:[[\\/]]*) |
---|
3677 | re_direlt='/[[^/]][[^/]]*/\.\./' |
---|
3678 | # Canonicalize the path of ld |
---|
3679 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
---|
3680 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
---|
3681 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
---|
3682 | done |
---|
3683 | test -z "$LD" && LD="$ac_prog" |
---|
3684 | ;; |
---|
3685 | "") |
---|
3686 | # If it fails, then pretend we aren't using GCC. |
---|
3687 | ac_prog=ld |
---|
3688 | ;; |
---|
3689 | *) |
---|
3690 | # If it is relative, then search for the first ld in PATH. |
---|
3691 | with_gnu_ld=unknown |
---|
3692 | ;; |
---|
3693 | esac |
---|
3694 | elif test "$with_gnu_ld" = yes; then |
---|
3695 | AC_MSG_CHECKING([for GNU ld]) |
---|
3696 | else |
---|
3697 | AC_MSG_CHECKING([for non-GNU ld]) |
---|
3698 | fi |
---|
3699 | AC_CACHE_VAL(lt_cv_path_LD, |
---|
3700 | [if test -z "$LD"; then |
---|
3701 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
3702 | for ac_dir in $PATH; do |
---|
3703 | test -z "$ac_dir" && ac_dir=. |
---|
3704 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
---|
3705 | lt_cv_path_LD="$ac_dir/$ac_prog" |
---|
3706 | # Check to see if the program is GNU ld. I'd rather use --version, |
---|
3707 | # but apparently some GNU ld's only accept -v. |
---|
3708 | # Break only if it was the GNU/non-GNU ld that we prefer. |
---|
3709 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
---|
3710 | test "$with_gnu_ld" != no && break |
---|
3711 | else |
---|
3712 | test "$with_gnu_ld" != yes && break |
---|
3713 | fi |
---|
3714 | fi |
---|
3715 | done |
---|
3716 | IFS="$ac_save_ifs" |
---|
3717 | else |
---|
3718 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
---|
3719 | fi]) |
---|
3720 | LD="$lt_cv_path_LD" |
---|
3721 | if test -n "$LD"; then |
---|
3722 | AC_MSG_RESULT($LD) |
---|
3723 | else |
---|
3724 | AC_MSG_RESULT(no) |
---|
3725 | fi |
---|
3726 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
---|
3727 | AC_PROG_LD_GNU |
---|
3728 | ]) |
---|
3729 | |
---|
3730 | # AC_PROG_LD_GNU - |
---|
3731 | AC_DEFUN([AC_PROG_LD_GNU], |
---|
3732 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
---|
3733 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
---|
3734 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
---|
3735 | lt_cv_prog_gnu_ld=yes |
---|
3736 | else |
---|
3737 | lt_cv_prog_gnu_ld=no |
---|
3738 | fi]) |
---|
3739 | with_gnu_ld=$lt_cv_prog_gnu_ld |
---|
3740 | ]) |
---|
3741 | |
---|
3742 | # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker |
---|
3743 | # -- PORTME Some linkers may need a different reload flag. |
---|
3744 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
---|
3745 | [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, |
---|
3746 | [lt_cv_ld_reload_flag='-r']) |
---|
3747 | reload_flag=$lt_cv_ld_reload_flag |
---|
3748 | test -n "$reload_flag" && reload_flag=" $reload_flag" |
---|
3749 | ]) |
---|
3750 | |
---|
3751 | # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies |
---|
3752 | # -- PORTME fill in with the dynamic library characteristics |
---|
3753 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
---|
3754 | [AC_CACHE_CHECK([how to recognise dependant libraries], |
---|
3755 | lt_cv_deplibs_check_method, |
---|
3756 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
---|
3757 | lt_cv_file_magic_test_file= |
---|
3758 | lt_cv_deplibs_check_method='unknown' |
---|
3759 | # Need to set the preceding variable on all platforms that support |
---|
3760 | # interlibrary dependencies. |
---|
3761 | # 'none' -- dependencies not supported. |
---|
3762 | # `unknown' -- same as none, but documents that we really don't know. |
---|
3763 | # 'pass_all' -- all dependencies passed with no checks. |
---|
3764 | # 'test_compile' -- check by making test program. |
---|
3765 | # 'file_magic [[regex]]' -- check by looking for files in library path |
---|
3766 | # which responds to the $file_magic_cmd with a given egrep regex. |
---|
3767 | # If you have `file' or equivalent on your system and you're not sure |
---|
3768 | # whether `pass_all' will *always* work, you probably want this one. |
---|
3769 | |
---|
3770 | case $host_os in |
---|
3771 | aix4* | aix5*) |
---|
3772 | lt_cv_deplibs_check_method=pass_all |
---|
3773 | ;; |
---|
3774 | |
---|
3775 | beos*) |
---|
3776 | lt_cv_deplibs_check_method=pass_all |
---|
3777 | ;; |
---|
3778 | |
---|
3779 | bsdi4*) |
---|
3780 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
---|
3781 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
---|
3782 | lt_cv_file_magic_test_file=/shlib/libc.so |
---|
3783 | ;; |
---|
3784 | |
---|
3785 | cygwin* | mingw* | pw32*) |
---|
3786 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
---|
3787 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
---|
3788 | ;; |
---|
3789 | |
---|
3790 | darwin* | rhapsody*) |
---|
3791 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
---|
3792 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
---|
3793 | case "$host_os" in |
---|
3794 | rhapsody* | darwin1.[[012]]) |
---|
3795 | lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` |
---|
3796 | ;; |
---|
3797 | *) # Darwin 1.3 on |
---|
3798 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' |
---|
3799 | ;; |
---|
3800 | esac |
---|
3801 | ;; |
---|
3802 | |
---|
3803 | freebsd*) |
---|
3804 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
3805 | case $host_cpu in |
---|
3806 | i*86 ) |
---|
3807 | # Not sure whether the presence of OpenBSD here was a mistake. |
---|
3808 | # Let's accept both of them until this is cleared up. |
---|
3809 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
---|
3810 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3811 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
3812 | ;; |
---|
3813 | esac |
---|
3814 | else |
---|
3815 | lt_cv_deplibs_check_method=pass_all |
---|
3816 | fi |
---|
3817 | ;; |
---|
3818 | |
---|
3819 | gnu*) |
---|
3820 | lt_cv_deplibs_check_method=pass_all |
---|
3821 | ;; |
---|
3822 | |
---|
3823 | hpux10.20*|hpux11*) |
---|
3824 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
---|
3825 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3826 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
---|
3827 | ;; |
---|
3828 | |
---|
3829 | irix5* | irix6*) |
---|
3830 | case $host_os in |
---|
3831 | irix5*) |
---|
3832 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3833 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
---|
3834 | ;; |
---|
3835 | *) |
---|
3836 | case $LD in |
---|
3837 | *-32|*"-32 ") libmagic=32-bit;; |
---|
3838 | *-n32|*"-n32 ") libmagic=N32;; |
---|
3839 | *-64|*"-64 ") libmagic=64-bit;; |
---|
3840 | *) libmagic=never-match;; |
---|
3841 | esac |
---|
3842 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3843 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" |
---|
3844 | ;; |
---|
3845 | esac |
---|
3846 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
---|
3847 | lt_cv_deplibs_check_method=pass_all |
---|
3848 | ;; |
---|
3849 | |
---|
3850 | # This must be Linux ELF. |
---|
3851 | linux-gnu*) |
---|
3852 | case $host_cpu in |
---|
3853 | alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) |
---|
3854 | lt_cv_deplibs_check_method=pass_all ;; |
---|
3855 | *) |
---|
3856 | # glibc up to 2.1.1 does not perform some relocations on ARM |
---|
3857 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
---|
3858 | esac |
---|
3859 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
---|
3860 | ;; |
---|
3861 | |
---|
3862 | netbsd*) |
---|
3863 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
3864 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' |
---|
3865 | else |
---|
3866 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' |
---|
3867 | fi |
---|
3868 | ;; |
---|
3869 | |
---|
3870 | newos6*) |
---|
3871 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
---|
3872 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3873 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
---|
3874 | ;; |
---|
3875 | |
---|
3876 | openbsd*) |
---|
3877 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3878 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
3879 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
3880 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
---|
3881 | else |
---|
3882 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
---|
3883 | fi |
---|
3884 | ;; |
---|
3885 | |
---|
3886 | osf3* | osf4* | osf5*) |
---|
3887 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3888 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' |
---|
3889 | lt_cv_file_magic_test_file=/shlib/libc.so |
---|
3890 | lt_cv_deplibs_check_method=pass_all |
---|
3891 | ;; |
---|
3892 | |
---|
3893 | sco3.2v5*) |
---|
3894 | lt_cv_deplibs_check_method=pass_all |
---|
3895 | ;; |
---|
3896 | |
---|
3897 | solaris*) |
---|
3898 | lt_cv_deplibs_check_method=pass_all |
---|
3899 | lt_cv_file_magic_test_file=/lib/libc.so |
---|
3900 | ;; |
---|
3901 | |
---|
3902 | sysv5uw[[78]]* | sysv4*uw2*) |
---|
3903 | lt_cv_deplibs_check_method=pass_all |
---|
3904 | ;; |
---|
3905 | |
---|
3906 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
3907 | case $host_vendor in |
---|
3908 | motorola) |
---|
3909 | 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]]' |
---|
3910 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
---|
3911 | ;; |
---|
3912 | ncr) |
---|
3913 | lt_cv_deplibs_check_method=pass_all |
---|
3914 | ;; |
---|
3915 | sequent) |
---|
3916 | lt_cv_file_magic_cmd='/bin/file' |
---|
3917 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
---|
3918 | ;; |
---|
3919 | sni) |
---|
3920 | lt_cv_file_magic_cmd='/bin/file' |
---|
3921 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
---|
3922 | lt_cv_file_magic_test_file=/lib/libc.so |
---|
3923 | ;; |
---|
3924 | esac |
---|
3925 | ;; |
---|
3926 | esac |
---|
3927 | ]) |
---|
3928 | file_magic_cmd=$lt_cv_file_magic_cmd |
---|
3929 | deplibs_check_method=$lt_cv_deplibs_check_method |
---|
3930 | ]) |
---|
3931 | |
---|
3932 | |
---|
3933 | # AC_PROG_NM - find the path to a BSD-compatible name lister |
---|
3934 | AC_DEFUN([AC_PROG_NM], |
---|
3935 | [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
---|
3936 | AC_MSG_CHECKING([for BSD-compatible nm]) |
---|
3937 | AC_CACHE_VAL(lt_cv_path_NM, |
---|
3938 | [if test -n "$NM"; then |
---|
3939 | # Let the user override the test. |
---|
3940 | lt_cv_path_NM="$NM" |
---|
3941 | else |
---|
3942 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
3943 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
---|
3944 | test -z "$ac_dir" && ac_dir=. |
---|
3945 | tmp_nm=$ac_dir/${ac_tool_prefix}nm |
---|
3946 | if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then |
---|
3947 | # Check to see if the nm accepts a BSD-compat flag. |
---|
3948 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
---|
3949 | # nm: unknown option "B" ignored |
---|
3950 | # Tru64's nm complains that /dev/null is an invalid object file |
---|
3951 | if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then |
---|
3952 | lt_cv_path_NM="$tmp_nm -B" |
---|
3953 | break |
---|
3954 | elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
---|
3955 | lt_cv_path_NM="$tmp_nm -p" |
---|
3956 | break |
---|
3957 | else |
---|
3958 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
---|
3959 | continue # so that we can try to find one that supports BSD flags |
---|
3960 | fi |
---|
3961 | fi |
---|
3962 | done |
---|
3963 | IFS="$ac_save_ifs" |
---|
3964 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
---|
3965 | fi]) |
---|
3966 | NM="$lt_cv_path_NM" |
---|
3967 | AC_MSG_RESULT([$NM]) |
---|
3968 | ]) |
---|
3969 | |
---|
3970 | # AC_CHECK_LIBM - check for math library |
---|
3971 | AC_DEFUN([AC_CHECK_LIBM], |
---|
3972 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
3973 | LIBM= |
---|
3974 | case $host in |
---|
3975 | *-*-beos* | *-*-cygwin* | *-*-pw32*) |
---|
3976 | # These system don't have libm |
---|
3977 | ;; |
---|
3978 | *-ncr-sysv4.3*) |
---|
3979 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
---|
3980 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
---|
3981 | ;; |
---|
3982 | *) |
---|
3983 | AC_CHECK_LIB(m, main, LIBM="-lm") |
---|
3984 | ;; |
---|
3985 | esac |
---|
3986 | ]) |
---|
3987 | |
---|
3988 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for |
---|
3989 | # the libltdl convenience library and INCLTDL to the include flags for |
---|
3990 | # the libltdl header and adds --enable-ltdl-convenience to the |
---|
3991 | # configure arguments. Note that LIBLTDL and INCLTDL are not |
---|
3992 | # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not |
---|
3993 | # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed |
---|
3994 | # with '${top_builddir}/' and INCLTDL will be prefixed with |
---|
3995 | # '${top_srcdir}/' (note the single quotes!). If your package is not |
---|
3996 | # flat and you're not using automake, define top_builddir and |
---|
3997 | # top_srcdir appropriately in the Makefiles. |
---|
3998 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
---|
3999 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
4000 | case $enable_ltdl_convenience in |
---|
4001 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
---|
4002 | "") enable_ltdl_convenience=yes |
---|
4003 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
---|
4004 | esac |
---|
4005 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
---|
4006 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
4007 | ]) |
---|
4008 | |
---|
4009 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for |
---|
4010 | # the libltdl installable library and INCLTDL to the include flags for |
---|
4011 | # the libltdl header and adds --enable-ltdl-install to the configure |
---|
4012 | # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is |
---|
4013 | # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed |
---|
4014 | # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will |
---|
4015 | # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed |
---|
4016 | # with '${top_srcdir}/' (note the single quotes!). If your package is |
---|
4017 | # not flat and you're not using automake, define top_builddir and |
---|
4018 | # top_srcdir appropriately in the Makefiles. |
---|
4019 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
---|
4020 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
---|
4021 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
4022 | AC_CHECK_LIB(ltdl, main, |
---|
4023 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
---|
4024 | [if test x"$enable_ltdl_install" = xno; then |
---|
4025 | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
---|
4026 | else |
---|
4027 | enable_ltdl_install=yes |
---|
4028 | fi |
---|
4029 | ]) |
---|
4030 | if test x"$enable_ltdl_install" = x"yes"; then |
---|
4031 | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
---|
4032 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
---|
4033 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
4034 | else |
---|
4035 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
---|
4036 | LIBLTDL="-lltdl" |
---|
4037 | INCLTDL= |
---|
4038 | fi |
---|
4039 | ]) |
---|
4040 | |
---|
4041 | # old names |
---|
4042 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
---|
4043 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
---|
4044 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
---|
4045 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
---|
4046 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
---|
4047 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
---|
4048 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
---|
4049 | |
---|
4050 | # This is just to silence aclocal about the macro not being used |
---|
4051 | ifelse([AC_DISABLE_FAST_INSTALL]) |
---|
4052 | |
---|