convert from svn repository: remove tags directory
[lttv.git] / trunk / lttng-xenomai / LinuxTraceToolkitViewer-0.8.61-xenoltt / aclocal.m4
1 # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
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 # AC_LTTV_SETUP_FOR_TARGET
15 # ----------------
16 # Check for utils function
17 AC_DEFUN([AC_LTTV_SETUP_FOR_TARGET],
18 [ UTIL_LIBS=""
19 case $host in
20 *-*-cygwin*)
21 AC_SUBST(SHARED_FLAGS,"-module -no-undefined -XLinker --export-all-symbols")
22 AC_SUBST(PLUGIN_FLAGS,"-module -no-undefined -avoid-version")
23 AC_CHECK_LIB([util], [forkpty], UTIL_LIBS="-lutil", AC_MSG_ERROR([libutil is required in order to compile LinuxTraceToolkit]))
24 cygwin=true
25 ;;
26
27 *-*-mingw*)
28 # mingw32 doesn't have libutil
29 AC_SUBST(SHARED_FLAGS,"-module -no-undefined -avoid-version -XLinker --export-all-symbols")
30 AC_SUBST(PLUGIN_FLAGS,"-module -no-undefined -avoid-version")
31 mingw=true
32 ;;
33 *)
34 AC_SUBST(SHARED_FLAGS,"-module")
35 AC_SUBST(PLUGIN_FLAGS,"-module -avoid-version")
36 AC_CHECK_LIB([util], [forkpty], UTIL_LIBS="-lutil", AC_MSG_ERROR([libutil is required in order to compile LinuxTraceToolkit]))
37 linux=true
38 ;;
39 esac
40 AM_CONDITIONAL(LTTV_MINGW, test x$mingw = xtrue)
41 AM_CONDITIONAL(LTTV_CYGWIN, test x$cygwin = xtrue)
42 AM_CONDITIONAL(LTTV_LINUX, test x$linux = xtrue)
43 AM_CONDITIONAL(USE_UTIL_LIBS, test "$UTIL_LIBS" != "")
44 ])# AC_LTTV_SETUP_FOR_TARGET
45
46 # AM_CONDITIONAL -*- Autoconf -*-
47
48 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
49
50 # This program is free software; you can redistribute it and/or modify
51 # it under the terms of the GNU General Public License as published by
52 # the Free Software Foundation; either version 2, or (at your option)
53 # any later version.
54
55 # This program is distributed in the hope that it will be useful,
56 # but WITHOUT ANY WARRANTY; without even the implied warranty of
57 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58 # GNU General Public License for more details.
59
60 # You should have received a copy of the GNU General Public License
61 # along with this program; if not, write to the Free Software
62 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
63 # 02111-1307, USA.
64
65 # serial 5
66
67 AC_PREREQ(2.52)
68
69 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
70 # -------------------------------------
71 # Define a conditional.
72 AC_DEFUN([AM_CONDITIONAL],
73 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
74 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
75 AC_SUBST([$1_TRUE])
76 AC_SUBST([$1_FALSE])
77 if $2; then
78 $1_TRUE=
79 $1_FALSE='#'
80 else
81 $1_TRUE='#'
82 $1_FALSE=
83 fi
84 AC_CONFIG_COMMANDS_PRE(
85 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
86 AC_MSG_ERROR([conditional "$1" was never defined.
87 Usually this means the macro was only invoked conditionally.])
88 fi])])
89
90 # Do all the work for Automake. -*- Autoconf -*-
91
92 # This macro actually does too much some checks are only needed if
93 # your package does certain things. But this isn't really a big deal.
94
95 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
96 # Free Software Foundation, Inc.
97
98 # This program is free software; you can redistribute it and/or modify
99 # it under the terms of the GNU General Public License as published by
100 # the Free Software Foundation; either version 2, or (at your option)
101 # any later version.
102
103 # This program is distributed in the hope that it will be useful,
104 # but WITHOUT ANY WARRANTY; without even the implied warranty of
105 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
106 # GNU General Public License for more details.
107
108 # You should have received a copy of the GNU General Public License
109 # along with this program; if not, write to the Free Software
110 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
111 # 02111-1307, USA.
112
113 # serial 10
114
115 AC_PREREQ([2.54])
116
117 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
118 # the ones we care about.
119 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
120
121 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
122 # AM_INIT_AUTOMAKE([OPTIONS])
123 # -----------------------------------------------
124 # The call with PACKAGE and VERSION arguments is the old style
125 # call (pre autoconf-2.50), which is being phased out. PACKAGE
126 # and VERSION should now be passed to AC_INIT and removed from
127 # the call to AM_INIT_AUTOMAKE.
128 # We support both call styles for the transition. After
129 # the next Automake release, Autoconf can make the AC_INIT
130 # arguments mandatory, and then we can depend on a new Autoconf
131 # release and drop the old call support.
132 AC_DEFUN([AM_INIT_AUTOMAKE],
133 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
134 AC_REQUIRE([AC_PROG_INSTALL])dnl
135 # test to see if srcdir already configured
136 if test "`cd $srcdir && pwd`" != "`pwd`" &&
137 test -f $srcdir/config.status; then
138 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
139 fi
140
141 # test whether we have cygpath
142 if test -z "$CYGPATH_W"; then
143 if (cygpath --version) >/dev/null 2>/dev/null; then
144 CYGPATH_W='cygpath -w'
145 else
146 CYGPATH_W=echo
147 fi
148 fi
149 AC_SUBST([CYGPATH_W])
150
151 # Define the identity of the package.
152 dnl Distinguish between old-style and new-style calls.
153 m4_ifval([$2],
154 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
155 AC_SUBST([PACKAGE], [$1])dnl
156 AC_SUBST([VERSION], [$2])],
157 [_AM_SET_OPTIONS([$1])dnl
158 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
159 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
160
161 _AM_IF_OPTION([no-define],,
162 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
163 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
164
165 # Some tools Automake needs.
166 AC_REQUIRE([AM_SANITY_CHECK])dnl
167 AC_REQUIRE([AC_ARG_PROGRAM])dnl
168 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
169 AM_MISSING_PROG(AUTOCONF, autoconf)
170 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
171 AM_MISSING_PROG(AUTOHEADER, autoheader)
172 AM_MISSING_PROG(MAKEINFO, makeinfo)
173 AM_MISSING_PROG(AMTAR, tar)
174 AM_PROG_INSTALL_SH
175 AM_PROG_INSTALL_STRIP
176 # We need awk for the "check" target. The system "awk" is bad on
177 # some platforms.
178 AC_REQUIRE([AC_PROG_AWK])dnl
179 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
180 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
181
182 _AM_IF_OPTION([no-dependencies],,
183 [AC_PROVIDE_IFELSE([AC_PROG_CC],
184 [_AM_DEPENDENCIES(CC)],
185 [define([AC_PROG_CC],
186 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
187 AC_PROVIDE_IFELSE([AC_PROG_CXX],
188 [_AM_DEPENDENCIES(CXX)],
189 [define([AC_PROG_CXX],
190 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
191 ])
192 ])
193
194
195 # When config.status generates a header, we must update the stamp-h file.
196 # This file resides in the same directory as the config header
197 # that is generated. The stamp files are numbered to have different names.
198
199 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
200 # loop where config.status creates the headers, so we can generate
201 # our stamp files there.
202 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
203 [# Compute $1's index in $config_headers.
204 _am_stamp_count=1
205 for _am_header in $config_headers :; do
206 case $_am_header in
207 $1 | $1:* )
208 break ;;
209 * )
210 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
211 esac
212 done
213 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
214
215 # Copyright 2002 Free Software Foundation, Inc.
216
217 # This program is free software; you can redistribute it and/or modify
218 # it under the terms of the GNU General Public License as published by
219 # the Free Software Foundation; either version 2, or (at your option)
220 # any later version.
221
222 # This program is distributed in the hope that it will be useful,
223 # but WITHOUT ANY WARRANTY; without even the implied warranty of
224 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
225 # GNU General Public License for more details.
226
227 # You should have received a copy of the GNU General Public License
228 # along with this program; if not, write to the Free Software
229 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
230
231 # AM_AUTOMAKE_VERSION(VERSION)
232 # ----------------------------
233 # Automake X.Y traces this macro to ensure aclocal.m4 has been
234 # generated from the m4 files accompanying Automake X.Y.
235 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
236
237 # AM_SET_CURRENT_AUTOMAKE_VERSION
238 # -------------------------------
239 # Call AM_AUTOMAKE_VERSION so it can be traced.
240 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
241 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
242 [AM_AUTOMAKE_VERSION([1.7.9])])
243
244 # Helper functions for option handling. -*- Autoconf -*-
245
246 # Copyright 2001, 2002 Free Software Foundation, Inc.
247
248 # This program is free software; you can redistribute it and/or modify
249 # it under the terms of the GNU General Public License as published by
250 # the Free Software Foundation; either version 2, or (at your option)
251 # any later version.
252
253 # This program is distributed in the hope that it will be useful,
254 # but WITHOUT ANY WARRANTY; without even the implied warranty of
255 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
256 # GNU General Public License for more details.
257
258 # You should have received a copy of the GNU General Public License
259 # along with this program; if not, write to the Free Software
260 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
261 # 02111-1307, USA.
262
263 # serial 2
264
265 # _AM_MANGLE_OPTION(NAME)
266 # -----------------------
267 AC_DEFUN([_AM_MANGLE_OPTION],
268 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
269
270 # _AM_SET_OPTION(NAME)
271 # ------------------------------
272 # Set option NAME. Presently that only means defining a flag for this option.
273 AC_DEFUN([_AM_SET_OPTION],
274 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
275
276 # _AM_SET_OPTIONS(OPTIONS)
277 # ----------------------------------
278 # OPTIONS is a space-separated list of Automake options.
279 AC_DEFUN([_AM_SET_OPTIONS],
280 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
281
282 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
283 # -------------------------------------------
284 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
285 AC_DEFUN([_AM_IF_OPTION],
286 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
287
288 #
289 # Check to make sure that the build environment is sane.
290 #
291
292 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
293
294 # This program is free software; you can redistribute it and/or modify
295 # it under the terms of the GNU General Public License as published by
296 # the Free Software Foundation; either version 2, or (at your option)
297 # any later version.
298
299 # This program is distributed in the hope that it will be useful,
300 # but WITHOUT ANY WARRANTY; without even the implied warranty of
301 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
302 # GNU General Public License for more details.
303
304 # You should have received a copy of the GNU General Public License
305 # along with this program; if not, write to the Free Software
306 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
307 # 02111-1307, USA.
308
309 # serial 3
310
311 # AM_SANITY_CHECK
312 # ---------------
313 AC_DEFUN([AM_SANITY_CHECK],
314 [AC_MSG_CHECKING([whether build environment is sane])
315 # Just in case
316 sleep 1
317 echo timestamp > conftest.file
318 # Do `set' in a subshell so we don't clobber the current shell's
319 # arguments. Must try -L first in case configure is actually a
320 # symlink; some systems play weird games with the mod time of symlinks
321 # (eg FreeBSD returns the mod time of the symlink's containing
322 # directory).
323 if (
324 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
325 if test "$[*]" = "X"; then
326 # -L didn't work.
327 set X `ls -t $srcdir/configure conftest.file`
328 fi
329 rm -f conftest.file
330 if test "$[*]" != "X $srcdir/configure conftest.file" \
331 && test "$[*]" != "X conftest.file $srcdir/configure"; then
332
333 # If neither matched, then we have a broken ls. This can happen
334 # if, for instance, CONFIG_SHELL is bash and it inherits a
335 # broken ls alias from the environment. This has actually
336 # happened. Such a system could not be considered "sane".
337 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
338 alias in your environment])
339 fi
340
341 test "$[2]" = conftest.file
342 )
343 then
344 # Ok.
345 :
346 else
347 AC_MSG_ERROR([newly created file is older than distributed files!
348 Check your system clock])
349 fi
350 AC_MSG_RESULT(yes)])
351
352 # -*- Autoconf -*-
353
354
355 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
356
357 # This program is free software; you can redistribute it and/or modify
358 # it under the terms of the GNU General Public License as published by
359 # the Free Software Foundation; either version 2, or (at your option)
360 # any later version.
361
362 # This program is distributed in the hope that it will be useful,
363 # but WITHOUT ANY WARRANTY; without even the implied warranty of
364 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
365 # GNU General Public License for more details.
366
367 # You should have received a copy of the GNU General Public License
368 # along with this program; if not, write to the Free Software
369 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
370 # 02111-1307, USA.
371
372 # serial 3
373
374 # AM_MISSING_PROG(NAME, PROGRAM)
375 # ------------------------------
376 AC_DEFUN([AM_MISSING_PROG],
377 [AC_REQUIRE([AM_MISSING_HAS_RUN])
378 $1=${$1-"${am_missing_run}$2"}
379 AC_SUBST($1)])
380
381
382 # AM_MISSING_HAS_RUN
383 # ------------------
384 # Define MISSING if not defined so far and test if it supports --run.
385 # If it does, set am_missing_run to use it, otherwise, to nothing.
386 AC_DEFUN([AM_MISSING_HAS_RUN],
387 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
388 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
389 # Use eval to expand $SHELL
390 if eval "$MISSING --run true"; then
391 am_missing_run="$MISSING --run "
392 else
393 am_missing_run=
394 AC_MSG_WARN([`missing' script is too old or missing])
395 fi
396 ])
397
398 # AM_AUX_DIR_EXPAND
399
400 # Copyright 2001 Free Software Foundation, Inc.
401
402 # This program is free software; you can redistribute it and/or modify
403 # it under the terms of the GNU General Public License as published by
404 # the Free Software Foundation; either version 2, or (at your option)
405 # any later version.
406
407 # This program is distributed in the hope that it will be useful,
408 # but WITHOUT ANY WARRANTY; without even the implied warranty of
409 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
410 # GNU General Public License for more details.
411
412 # You should have received a copy of the GNU General Public License
413 # along with this program; if not, write to the Free Software
414 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
415 # 02111-1307, USA.
416
417 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
418 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
419 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
420 #
421 # Of course, Automake must honor this variable whenever it calls a
422 # tool from the auxiliary directory. The problem is that $srcdir (and
423 # therefore $ac_aux_dir as well) can be either absolute or relative,
424 # depending on how configure is run. This is pretty annoying, since
425 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
426 # source directory, any form will work fine, but in subdirectories a
427 # relative path needs to be adjusted first.
428 #
429 # $ac_aux_dir/missing
430 # fails when called from a subdirectory if $ac_aux_dir is relative
431 # $top_srcdir/$ac_aux_dir/missing
432 # fails if $ac_aux_dir is absolute,
433 # fails when called from a subdirectory in a VPATH build with
434 # a relative $ac_aux_dir
435 #
436 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
437 # are both prefixed by $srcdir. In an in-source build this is usually
438 # harmless because $srcdir is `.', but things will broke when you
439 # start a VPATH build or use an absolute $srcdir.
440 #
441 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
442 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
443 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
444 # and then we would define $MISSING as
445 # MISSING="\${SHELL} $am_aux_dir/missing"
446 # This will work as long as MISSING is not called from configure, because
447 # unfortunately $(top_srcdir) has no meaning in configure.
448 # However there are other variables, like CC, which are often used in
449 # configure, and could therefore not use this "fixed" $ac_aux_dir.
450 #
451 # Another solution, used here, is to always expand $ac_aux_dir to an
452 # absolute PATH. The drawback is that using absolute paths prevent a
453 # configured tree to be moved without reconfiguration.
454
455 # Rely on autoconf to set up CDPATH properly.
456 AC_PREREQ([2.50])
457
458 AC_DEFUN([AM_AUX_DIR_EXPAND], [
459 # expand $ac_aux_dir to an absolute path
460 am_aux_dir=`cd $ac_aux_dir && pwd`
461 ])
462
463 # AM_PROG_INSTALL_SH
464 # ------------------
465 # Define $install_sh.
466
467 # Copyright 2001 Free Software Foundation, Inc.
468
469 # This program is free software; you can redistribute it and/or modify
470 # it under the terms of the GNU General Public License as published by
471 # the Free Software Foundation; either version 2, or (at your option)
472 # any later version.
473
474 # This program is distributed in the hope that it will be useful,
475 # but WITHOUT ANY WARRANTY; without even the implied warranty of
476 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
477 # GNU General Public License for more details.
478
479 # You should have received a copy of the GNU General Public License
480 # along with this program; if not, write to the Free Software
481 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
482 # 02111-1307, USA.
483
484 AC_DEFUN([AM_PROG_INSTALL_SH],
485 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
486 install_sh=${install_sh-"$am_aux_dir/install-sh"}
487 AC_SUBST(install_sh)])
488
489 # AM_PROG_INSTALL_STRIP
490
491 # Copyright 2001 Free Software Foundation, Inc.
492
493 # This program is free software; you can redistribute it and/or modify
494 # it under the terms of the GNU General Public License as published by
495 # the Free Software Foundation; either version 2, or (at your option)
496 # any later version.
497
498 # This program is distributed in the hope that it will be useful,
499 # but WITHOUT ANY WARRANTY; without even the implied warranty of
500 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
501 # GNU General Public License for more details.
502
503 # You should have received a copy of the GNU General Public License
504 # along with this program; if not, write to the Free Software
505 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
506 # 02111-1307, USA.
507
508 # One issue with vendor `install' (even GNU) is that you can't
509 # specify the program used to strip binaries. This is especially
510 # annoying in cross-compiling environments, where the build's strip
511 # is unlikely to handle the host's binaries.
512 # Fortunately install-sh will honor a STRIPPROG variable, so we
513 # always use install-sh in `make install-strip', and initialize
514 # STRIPPROG with the value of the STRIP variable (set by the user).
515 AC_DEFUN([AM_PROG_INSTALL_STRIP],
516 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
517 # Installed binaries are usually stripped using `strip' when the user
518 # run `make install-strip'. However `strip' might not be the right
519 # tool to use in cross-compilation environments, therefore Automake
520 # will honor the `STRIP' environment variable to overrule this program.
521 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
522 if test "$cross_compiling" != no; then
523 AC_CHECK_TOOL([STRIP], [strip], :)
524 fi
525 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
526 AC_SUBST([INSTALL_STRIP_PROGRAM])])
527
528 # -*- Autoconf -*-
529 # Copyright (C) 2003 Free Software Foundation, Inc.
530
531 # This program is free software; you can redistribute it and/or modify
532 # it under the terms of the GNU General Public License as published by
533 # the Free Software Foundation; either version 2, or (at your option)
534 # any later version.
535
536 # This program is distributed in the hope that it will be useful,
537 # but WITHOUT ANY WARRANTY; without even the implied warranty of
538 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
539 # GNU General Public License for more details.
540
541 # You should have received a copy of the GNU General Public License
542 # along with this program; if not, write to the Free Software
543 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
544 # 02111-1307, USA.
545
546 # serial 1
547
548 # Check whether the underlying file-system supports filenames
549 # with a leading dot. For instance MS-DOS doesn't.
550 AC_DEFUN([AM_SET_LEADING_DOT],
551 [rm -rf .tst 2>/dev/null
552 mkdir .tst 2>/dev/null
553 if test -d .tst; then
554 am__leading_dot=.
555 else
556 am__leading_dot=_
557 fi
558 rmdir .tst 2>/dev/null
559 AC_SUBST([am__leading_dot])])
560
561 # serial 5 -*- Autoconf -*-
562
563 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
564
565 # This program is free software; you can redistribute it and/or modify
566 # it under the terms of the GNU General Public License as published by
567 # the Free Software Foundation; either version 2, or (at your option)
568 # any later version.
569
570 # This program is distributed in the hope that it will be useful,
571 # but WITHOUT ANY WARRANTY; without even the implied warranty of
572 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
573 # GNU General Public License for more details.
574
575 # You should have received a copy of the GNU General Public License
576 # along with this program; if not, write to the Free Software
577 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
578 # 02111-1307, USA.
579
580
581 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
582 # written in clear, in which case automake, when reading aclocal.m4,
583 # will think it sees a *use*, and therefore will trigger all it's
584 # C support machinery. Also note that it means that autoscan, seeing
585 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
586
587
588
589 # _AM_DEPENDENCIES(NAME)
590 # ----------------------
591 # See how the compiler implements dependency checking.
592 # NAME is "CC", "CXX", "GCJ", or "OBJC".
593 # We try a few techniques and use that to set a single cache variable.
594 #
595 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
596 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
597 # dependency, and given that the user is not expected to run this macro,
598 # just rely on AC_PROG_CC.
599 AC_DEFUN([_AM_DEPENDENCIES],
600 [AC_REQUIRE([AM_SET_DEPDIR])dnl
601 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
602 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
603 AC_REQUIRE([AM_DEP_TRACK])dnl
604
605 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
606 [$1], CXX, [depcc="$CXX" am_compiler_list=],
607 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
608 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
609 [depcc="$$1" am_compiler_list=])
610
611 AC_CACHE_CHECK([dependency style of $depcc],
612 [am_cv_$1_dependencies_compiler_type],
613 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
614 # We make a subdir and do the tests there. Otherwise we can end up
615 # making bogus files that we don't know about and never remove. For
616 # instance it was reported that on HP-UX the gcc test will end up
617 # making a dummy file named `D' -- because `-MD' means `put the output
618 # in D'.
619 mkdir conftest.dir
620 # Copy depcomp to subdir because otherwise we won't find it if we're
621 # using a relative directory.
622 cp "$am_depcomp" conftest.dir
623 cd conftest.dir
624 # We will build objects and dependencies in a subdirectory because
625 # it helps to detect inapplicable dependency modes. For instance
626 # both Tru64's cc and ICC support -MD to output dependencies as a
627 # side effect of compilation, but ICC will put the dependencies in
628 # the current directory while Tru64 will put them in the object
629 # directory.
630 mkdir sub
631
632 am_cv_$1_dependencies_compiler_type=none
633 if test "$am_compiler_list" = ""; then
634 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
635 fi
636 for depmode in $am_compiler_list; do
637 # Setup a source with many dependencies, because some compilers
638 # like to wrap large dependency lists on column 80 (with \), and
639 # we should not choose a depcomp mode which is confused by this.
640 #
641 # We need to recreate these files for each test, as the compiler may
642 # overwrite some of them when testing with obscure command lines.
643 # This happens at least with the AIX C compiler.
644 : > sub/conftest.c
645 for i in 1 2 3 4 5 6; do
646 echo '#include "conftst'$i'.h"' >> sub/conftest.c
647 : > sub/conftst$i.h
648 done
649 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
650
651 case $depmode in
652 nosideeffect)
653 # after this tag, mechanisms are not by side-effect, so they'll
654 # only be used when explicitly requested
655 if test "x$enable_dependency_tracking" = xyes; then
656 continue
657 else
658 break
659 fi
660 ;;
661 none) break ;;
662 esac
663 # We check with `-c' and `-o' for the sake of the "dashmstdout"
664 # mode. It turns out that the SunPro C++ compiler does not properly
665 # handle `-M -o', and we need to detect this.
666 if depmode=$depmode \
667 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
668 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
669 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
670 >/dev/null 2>conftest.err &&
671 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
672 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
673 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
674 # icc doesn't choke on unknown options, it will just issue warnings
675 # (even with -Werror). So we grep stderr for any message
676 # that says an option was ignored.
677 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
678 am_cv_$1_dependencies_compiler_type=$depmode
679 break
680 fi
681 fi
682 done
683
684 cd ..
685 rm -rf conftest.dir
686 else
687 am_cv_$1_dependencies_compiler_type=none
688 fi
689 ])
690 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
691 AM_CONDITIONAL([am__fastdep$1], [
692 test "x$enable_dependency_tracking" != xno \
693 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
694 ])
695
696
697 # AM_SET_DEPDIR
698 # -------------
699 # Choose a directory name for dependency files.
700 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
701 AC_DEFUN([AM_SET_DEPDIR],
702 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
703 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
704 ])
705
706
707 # AM_DEP_TRACK
708 # ------------
709 AC_DEFUN([AM_DEP_TRACK],
710 [AC_ARG_ENABLE(dependency-tracking,
711 [ --disable-dependency-tracking Speeds up one-time builds
712 --enable-dependency-tracking Do not reject slow dependency extractors])
713 if test "x$enable_dependency_tracking" != xno; then
714 am_depcomp="$ac_aux_dir/depcomp"
715 AMDEPBACKSLASH='\'
716 fi
717 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
718 AC_SUBST([AMDEPBACKSLASH])
719 ])
720
721 # Generate code to set up dependency tracking. -*- Autoconf -*-
722
723 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
724
725 # This program is free software; you can redistribute it and/or modify
726 # it under the terms of the GNU General Public License as published by
727 # the Free Software Foundation; either version 2, or (at your option)
728 # any later version.
729
730 # This program is distributed in the hope that it will be useful,
731 # but WITHOUT ANY WARRANTY; without even the implied warranty of
732 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
733 # GNU General Public License for more details.
734
735 # You should have received a copy of the GNU General Public License
736 # along with this program; if not, write to the Free Software
737 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
738 # 02111-1307, USA.
739
740 #serial 2
741
742 # _AM_OUTPUT_DEPENDENCY_COMMANDS
743 # ------------------------------
744 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
745 [for mf in $CONFIG_FILES; do
746 # Strip MF so we end up with the name of the file.
747 mf=`echo "$mf" | sed -e 's/:.*$//'`
748 # Check whether this is an Automake generated Makefile or not.
749 # We used to match only the files named `Makefile.in', but
750 # some people rename them; so instead we look at the file content.
751 # Grep'ing the first line is not enough: some people post-process
752 # each Makefile.in and add a new line on top of each file to say so.
753 # So let's grep whole file.
754 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
755 dirpart=`AS_DIRNAME("$mf")`
756 else
757 continue
758 fi
759 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
760 # Extract the definition of DEP_FILES from the Makefile without
761 # running `make'.
762 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
763 test -z "$DEPDIR" && continue
764 # When using ansi2knr, U may be empty or an underscore; expand it
765 U=`sed -n -e '/^U = / s///p' < "$mf"`
766 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
767 # We invoke sed twice because it is the simplest approach to
768 # changing $(DEPDIR) to its actual value in the expansion.
769 for file in `sed -n -e '
770 /^DEP_FILES = .*\\\\$/ {
771 s/^DEP_FILES = //
772 :loop
773 s/\\\\$//
774 p
775 n
776 /\\\\$/ b loop
777 p
778 }
779 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
780 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
781 # Make sure the directory exists.
782 test -f "$dirpart/$file" && continue
783 fdir=`AS_DIRNAME(["$file"])`
784 AS_MKDIR_P([$dirpart/$fdir])
785 # echo "creating $dirpart/$file"
786 echo '# dummy' > "$dirpart/$file"
787 done
788 done
789 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
790
791
792 # AM_OUTPUT_DEPENDENCY_COMMANDS
793 # -----------------------------
794 # This macro should only be invoked once -- use via AC_REQUIRE.
795 #
796 # This code is only required when automatic dependency tracking
797 # is enabled. FIXME. This creates each `.P' file that we will
798 # need in order to bootstrap the dependency handling code.
799 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
800 [AC_CONFIG_COMMANDS([depfiles],
801 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
802 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
803 ])
804
805 # Check to see how 'make' treats includes. -*- Autoconf -*-
806
807 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
808
809 # This program is free software; you can redistribute it and/or modify
810 # it under the terms of the GNU General Public License as published by
811 # the Free Software Foundation; either version 2, or (at your option)
812 # any later version.
813
814 # This program is distributed in the hope that it will be useful,
815 # but WITHOUT ANY WARRANTY; without even the implied warranty of
816 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
817 # GNU General Public License for more details.
818
819 # You should have received a copy of the GNU General Public License
820 # along with this program; if not, write to the Free Software
821 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
822 # 02111-1307, USA.
823
824 # serial 2
825
826 # AM_MAKE_INCLUDE()
827 # -----------------
828 # Check to see how make treats includes.
829 AC_DEFUN([AM_MAKE_INCLUDE],
830 [am_make=${MAKE-make}
831 cat > confinc << 'END'
832 am__doit:
833 @echo done
834 .PHONY: am__doit
835 END
836 # If we don't find an include directive, just comment out the code.
837 AC_MSG_CHECKING([for style of include used by $am_make])
838 am__include="#"
839 am__quote=
840 _am_result=none
841 # First try GNU make style include.
842 echo "include confinc" > confmf
843 # We grep out `Entering directory' and `Leaving directory'
844 # messages which can occur if `w' ends up in MAKEFLAGS.
845 # In particular we don't look at `^make:' because GNU make might
846 # be invoked under some other name (usually "gmake"), in which
847 # case it prints its new name instead of `make'.
848 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
849 am__include=include
850 am__quote=
851 _am_result=GNU
852 fi
853 # Now try BSD make style include.
854 if test "$am__include" = "#"; then
855 echo '.include "confinc"' > confmf
856 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
857 am__include=.include
858 am__quote="\""
859 _am_result=BSD
860 fi
861 fi
862 AC_SUBST([am__include])
863 AC_SUBST([am__quote])
864 AC_MSG_RESULT([$_am_result])
865 rm -f confinc confmf
866 ])
867
868 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
869
870 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
871
872 # This program is free software; you can redistribute it and/or modify
873 # it under the terms of the GNU General Public License as published by
874 # the Free Software Foundation; either version 2, or (at your option)
875 # any later version.
876
877 # This program is distributed in the hope that it will be useful,
878 # but WITHOUT ANY WARRANTY; without even the implied warranty of
879 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
880 # GNU General Public License for more details.
881
882 # You should have received a copy of the GNU General Public License
883 # along with this program; if not, write to the Free Software
884 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
885 # 02111-1307, USA.
886
887 AC_PREREQ([2.52])
888
889 # serial 6
890
891 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
892 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
893
894 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
895
896 # serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
897
898
899 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
900 # -----------------------------------------------------------
901 # If this macro is not defined by Autoconf, define it here.
902 m4_ifdef([AC_PROVIDE_IFELSE],
903 [],
904 [m4_define([AC_PROVIDE_IFELSE],
905 [m4_ifdef([AC_PROVIDE_$1],
906 [$2], [$3])])])
907
908
909 # AC_PROG_LIBTOOL
910 # ---------------
911 AC_DEFUN([AC_PROG_LIBTOOL],
912 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
913 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
914 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
915 AC_PROVIDE_IFELSE([AC_PROG_CXX],
916 [AC_LIBTOOL_CXX],
917 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
918 ])])
919 dnl And a similar setup for Fortran 77 support
920 AC_PROVIDE_IFELSE([AC_PROG_F77],
921 [AC_LIBTOOL_F77],
922 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
923 ])])
924
925 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
926 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
927 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
928 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
929 [AC_LIBTOOL_GCJ],
930 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
931 [AC_LIBTOOL_GCJ],
932 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
933 [AC_LIBTOOL_GCJ],
934 [ifdef([AC_PROG_GCJ],
935 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
936 ifdef([A][M_PROG_GCJ],
937 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
938 ifdef([LT_AC_PROG_GCJ],
939 [define([LT_AC_PROG_GCJ],
940 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
941 ])])# AC_PROG_LIBTOOL
942
943
944 # _AC_PROG_LIBTOOL
945 # ----------------
946 AC_DEFUN([_AC_PROG_LIBTOOL],
947 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
948 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
949 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
950 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
951
952 # This can be used to rebuild libtool when needed
953 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
954
955 # Always use our own libtool.
956 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
957 AC_SUBST(LIBTOOL)dnl
958
959 # Prevent multiple expansion
960 define([AC_PROG_LIBTOOL], [])
961 ])# _AC_PROG_LIBTOOL
962
963
964 # AC_LIBTOOL_SETUP
965 # ----------------
966 AC_DEFUN([AC_LIBTOOL_SETUP],
967 [AC_PREREQ(2.50)dnl
968 AC_REQUIRE([AC_ENABLE_SHARED])dnl
969 AC_REQUIRE([AC_ENABLE_STATIC])dnl
970 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
971 AC_REQUIRE([AC_CANONICAL_HOST])dnl
972 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
973 AC_REQUIRE([AC_PROG_CC])dnl
974 AC_REQUIRE([AC_PROG_LD])dnl
975 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
976 AC_REQUIRE([AC_PROG_NM])dnl
977
978 AC_REQUIRE([AC_PROG_LN_S])dnl
979 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
980 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
981 AC_REQUIRE([AC_OBJEXT])dnl
982 AC_REQUIRE([AC_EXEEXT])dnl
983 dnl
984
985 AC_LIBTOOL_SYS_MAX_CMD_LEN
986 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
987 AC_LIBTOOL_OBJDIR
988
989 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
990 _LT_AC_PROG_ECHO_BACKSLASH
991
992 case $host_os in
993 aix3*)
994 # AIX sometimes has problems with the GCC collect2 program. For some
995 # reason, if we set the COLLECT_NAMES environment variable, the problems
996 # vanish in a puff of smoke.
997 if test "X${COLLECT_NAMES+set}" != Xset; then
998 COLLECT_NAMES=
999 export COLLECT_NAMES
1000 fi
1001 ;;
1002 esac
1003
1004 # Sed substitution that helps us do robust quoting. It backslashifies
1005 # metacharacters that are still active within double-quoted strings.
1006 Xsed='sed -e 1s/^X//'
1007 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1008
1009 # Same as above, but do not quote variable references.
1010 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1011
1012 # Sed substitution to delay expansion of an escaped shell variable in a
1013 # double_quote_subst'ed string.
1014 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1015
1016 # Sed substitution to avoid accidental globbing in evaled expressions
1017 no_glob_subst='s/\*/\\\*/g'
1018
1019 # Constants:
1020 rm="rm -f"
1021
1022 # Global variables:
1023 default_ofile=libtool
1024 can_build_shared=yes
1025
1026 # All known linkers require a `.a' archive for static linking (except MSVC,
1027 # which needs '.lib').
1028 libext=a
1029 ltmain="$ac_aux_dir/ltmain.sh"
1030 ofile="$default_ofile"
1031 with_gnu_ld="$lt_cv_prog_gnu_ld"
1032
1033 AC_CHECK_TOOL(AR, ar, false)
1034 AC_CHECK_TOOL(RANLIB, ranlib, :)
1035 AC_CHECK_TOOL(STRIP, strip, :)
1036
1037 old_CC="$CC"
1038 old_CFLAGS="$CFLAGS"
1039
1040 # Set sane defaults for various variables
1041 test -z "$AR" && AR=ar
1042 test -z "$AR_FLAGS" && AR_FLAGS=cru
1043 test -z "$AS" && AS=as
1044 test -z "$CC" && CC=cc
1045 test -z "$LTCC" && LTCC=$CC
1046 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1047 test -z "$DLLTOOL" && DLLTOOL=dlltool
1048 test -z "$LD" && LD=ld
1049 test -z "$LN_S" && LN_S="ln -s"
1050 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1051 test -z "$NM" && NM=nm
1052 test -z "$SED" && SED=sed
1053 test -z "$OBJDUMP" && OBJDUMP=objdump
1054 test -z "$RANLIB" && RANLIB=:
1055 test -z "$STRIP" && STRIP=:
1056 test -z "$ac_objext" && ac_objext=o
1057
1058 # Determine commands to create old-style static archives.
1059 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1060 old_postinstall_cmds='chmod 644 $oldlib'
1061 old_postuninstall_cmds=
1062
1063 if test -n "$RANLIB"; then
1064 case $host_os in
1065 openbsd*)
1066 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1067 ;;
1068 *)
1069 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1070 ;;
1071 esac
1072 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1073 fi
1074
1075 _LT_CC_BASENAME([$compiler])
1076
1077 # Only perform the check for file, if the check method requires it
1078 case $deplibs_check_method in
1079 file_magic*)
1080 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1081 AC_PATH_MAGIC
1082 fi
1083 ;;
1084 esac
1085
1086 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1087 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1088 enable_win32_dll=yes, enable_win32_dll=no)
1089
1090 AC_ARG_ENABLE([libtool-lock],
1091 [AC_HELP_STRING([--disable-libtool-lock],
1092 [avoid locking (might break parallel builds)])])
1093 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1094
1095 AC_ARG_WITH([pic],
1096 [AC_HELP_STRING([--with-pic],
1097 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1098 [pic_mode="$withval"],
1099 [pic_mode=default])
1100 test -z "$pic_mode" && pic_mode=default
1101
1102 # Use C for the default configuration in the libtool script
1103 tagname=
1104 AC_LIBTOOL_LANG_C_CONFIG
1105 _LT_AC_TAGCONFIG
1106 ])# AC_LIBTOOL_SETUP
1107
1108
1109 # _LT_AC_SYS_COMPILER
1110 # -------------------
1111 AC_DEFUN([_LT_AC_SYS_COMPILER],
1112 [AC_REQUIRE([AC_PROG_CC])dnl
1113
1114 # If no C compiler was specified, use CC.
1115 LTCC=${LTCC-"$CC"}
1116
1117 # If no C compiler flags were specified, use CFLAGS.
1118 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1119
1120 # Allow CC to be a program name with arguments.
1121 compiler=$CC
1122 ])# _LT_AC_SYS_COMPILER
1123
1124
1125 # _LT_CC_BASENAME(CC)
1126 # -------------------
1127 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1128 AC_DEFUN([_LT_CC_BASENAME],
1129 [for cc_temp in $1""; do
1130 case $cc_temp in
1131 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1132 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1133 \-*) ;;
1134 *) break;;
1135 esac
1136 done
1137 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1138 ])
1139
1140
1141 # _LT_COMPILER_BOILERPLATE
1142 # ------------------------
1143 # Check for compiler boilerplate output or warnings with
1144 # the simple compiler test code.
1145 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1146 [ac_outfile=conftest.$ac_objext
1147 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1148 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1149 _lt_compiler_boilerplate=`cat conftest.err`
1150 $rm conftest*
1151 ])# _LT_COMPILER_BOILERPLATE
1152
1153
1154 # _LT_LINKER_BOILERPLATE
1155 # ----------------------
1156 # Check for linker boilerplate output or warnings with
1157 # the simple link test code.
1158 AC_DEFUN([_LT_LINKER_BOILERPLATE],
1159 [ac_outfile=conftest.$ac_objext
1160 printf "$lt_simple_link_test_code" >conftest.$ac_ext
1161 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1162 _lt_linker_boilerplate=`cat conftest.err`
1163 $rm conftest*
1164 ])# _LT_LINKER_BOILERPLATE
1165
1166
1167 # _LT_AC_SYS_LIBPATH_AIX
1168 # ----------------------
1169 # Links a minimal program and checks the executable
1170 # for the system default hardcoded library path. In most cases,
1171 # this is /usr/lib:/lib, but when the MPI compilers are used
1172 # the location of the communication and MPI libs are included too.
1173 # If we don't find anything, use the default library path according
1174 # to the aix ld manual.
1175 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1176 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1177 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1178 }'`
1179 # Check for a 64-bit object if we didn't find anything.
1180 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1181 }'`; fi],[])
1182 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1183 ])# _LT_AC_SYS_LIBPATH_AIX
1184
1185
1186 # _LT_AC_SHELL_INIT(ARG)
1187 # ----------------------
1188 AC_DEFUN([_LT_AC_SHELL_INIT],
1189 [ifdef([AC_DIVERSION_NOTICE],
1190 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1191 [AC_DIVERT_PUSH(NOTICE)])
1192 $1
1193 AC_DIVERT_POP
1194 ])# _LT_AC_SHELL_INIT
1195
1196
1197 # _LT_AC_PROG_ECHO_BACKSLASH
1198 # --------------------------
1199 # Add some code to the start of the generated configure script which
1200 # will find an echo command which doesn't interpret backslashes.
1201 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1202 [_LT_AC_SHELL_INIT([
1203 # Check that we are running under the correct shell.
1204 SHELL=${CONFIG_SHELL-/bin/sh}
1205
1206 case X$ECHO in
1207 X*--fallback-echo)
1208 # Remove one level of quotation (which was required for Make).
1209 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1210 ;;
1211 esac
1212
1213 echo=${ECHO-echo}
1214 if test "X[$]1" = X--no-reexec; then
1215 # Discard the --no-reexec flag, and continue.
1216 shift
1217 elif test "X[$]1" = X--fallback-echo; then
1218 # Avoid inline document here, it may be left over
1219 :
1220 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1221 # Yippee, $echo works!
1222 :
1223 else
1224 # Restart under the correct shell.
1225 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1226 fi
1227
1228 if test "X[$]1" = X--fallback-echo; then
1229 # used as fallback echo
1230 shift
1231 cat <<EOF
1232 [$]*
1233 EOF
1234 exit 0
1235 fi
1236
1237 # The HP-UX ksh and POSIX shell print the target directory to stdout
1238 # if CDPATH is set.
1239 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1240
1241 if test -z "$ECHO"; then
1242 if test "X${echo_test_string+set}" != Xset; then
1243 # find a string as large as possible, as long as the shell can cope with it
1244 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1245 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1246 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1247 echo_test_string=`eval $cmd` &&
1248 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1249 then
1250 break
1251 fi
1252 done
1253 fi
1254
1255 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1256 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1257 test "X$echo_testing_string" = "X$echo_test_string"; then
1258 :
1259 else
1260 # The Solaris, AIX, and Digital Unix default echo programs unquote
1261 # backslashes. This makes it impossible to quote backslashes using
1262 # echo "$something" | sed 's/\\/\\\\/g'
1263 #
1264 # So, first we look for a working echo in the user's PATH.
1265
1266 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1267 for dir in $PATH /usr/ucb; do
1268 IFS="$lt_save_ifs"
1269 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1270 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1271 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1272 test "X$echo_testing_string" = "X$echo_test_string"; then
1273 echo="$dir/echo"
1274 break
1275 fi
1276 done
1277 IFS="$lt_save_ifs"
1278
1279 if test "X$echo" = Xecho; then
1280 # We didn't find a better echo, so look for alternatives.
1281 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1282 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1283 test "X$echo_testing_string" = "X$echo_test_string"; then
1284 # This shell has a builtin print -r that does the trick.
1285 echo='print -r'
1286 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1287 test "X$CONFIG_SHELL" != X/bin/ksh; then
1288 # If we have ksh, try running configure again with it.
1289 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1290 export ORIGINAL_CONFIG_SHELL
1291 CONFIG_SHELL=/bin/ksh
1292 export CONFIG_SHELL
1293 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1294 else
1295 # Try using printf.
1296 echo='printf %s\n'
1297 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1298 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1299 test "X$echo_testing_string" = "X$echo_test_string"; then
1300 # Cool, printf works
1301 :
1302 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1303 test "X$echo_testing_string" = 'X\t' &&
1304 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1305 test "X$echo_testing_string" = "X$echo_test_string"; then
1306 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1307 export CONFIG_SHELL
1308 SHELL="$CONFIG_SHELL"
1309 export SHELL
1310 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1311 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1312 test "X$echo_testing_string" = 'X\t' &&
1313 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1314 test "X$echo_testing_string" = "X$echo_test_string"; then
1315 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1316 else
1317 # maybe with a smaller string...
1318 prev=:
1319
1320 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1321 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1322 then
1323 break
1324 fi
1325 prev="$cmd"
1326 done
1327
1328 if test "$prev" != 'sed 50q "[$]0"'; then
1329 echo_test_string=`eval $prev`
1330 export echo_test_string
1331 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1332 else
1333 # Oops. We lost completely, so just stick with echo.
1334 echo=echo
1335 fi
1336 fi
1337 fi
1338 fi
1339 fi
1340 fi
1341
1342 # Copy echo and quote the copy suitably for passing to libtool from
1343 # the Makefile, instead of quoting the original, which is used later.
1344 ECHO=$echo
1345 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1346 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1347 fi
1348
1349 AC_SUBST(ECHO)
1350 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1351
1352
1353 # _LT_AC_LOCK
1354 # -----------
1355 AC_DEFUN([_LT_AC_LOCK],
1356 [AC_ARG_ENABLE([libtool-lock],
1357 [AC_HELP_STRING([--disable-libtool-lock],
1358 [avoid locking (might break parallel builds)])])
1359 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1360
1361 # Some flags need to be propagated to the compiler or linker for good
1362 # libtool support.
1363 case $host in
1364 ia64-*-hpux*)
1365 # Find out which ABI we are using.
1366 echo 'int i;' > conftest.$ac_ext
1367 if AC_TRY_EVAL(ac_compile); then
1368 case `/usr/bin/file conftest.$ac_objext` in
1369 *ELF-32*)
1370 HPUX_IA64_MODE="32"
1371 ;;
1372 *ELF-64*)
1373 HPUX_IA64_MODE="64"
1374 ;;
1375 esac
1376 fi
1377 rm -rf conftest*
1378 ;;
1379 *-*-irix6*)
1380 # Find out which ABI we are using.
1381 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1382 if AC_TRY_EVAL(ac_compile); then
1383 if test "$lt_cv_prog_gnu_ld" = yes; then
1384 case `/usr/bin/file conftest.$ac_objext` in
1385 *32-bit*)
1386 LD="${LD-ld} -melf32bsmip"
1387 ;;
1388 *N32*)
1389 LD="${LD-ld} -melf32bmipn32"
1390 ;;
1391 *64-bit*)
1392 LD="${LD-ld} -melf64bmip"
1393 ;;
1394 esac
1395 else
1396 case `/usr/bin/file conftest.$ac_objext` in
1397 *32-bit*)
1398 LD="${LD-ld} -32"
1399 ;;
1400 *N32*)
1401 LD="${LD-ld} -n32"
1402 ;;
1403 *64-bit*)
1404 LD="${LD-ld} -64"
1405 ;;
1406 esac
1407 fi
1408 fi
1409 rm -rf conftest*
1410 ;;
1411
1412 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1413 # Find out which ABI we are using.
1414 echo 'int i;' > conftest.$ac_ext
1415 if AC_TRY_EVAL(ac_compile); then
1416 case `/usr/bin/file conftest.o` in
1417 *32-bit*)
1418 case $host in
1419 x86_64-*linux*)
1420 LD="${LD-ld} -m elf_i386"
1421 ;;
1422 ppc64-*linux*|powerpc64-*linux*)
1423 LD="${LD-ld} -m elf32ppclinux"
1424 ;;
1425 s390x-*linux*)
1426 LD="${LD-ld} -m elf_s390"
1427 ;;
1428 sparc64-*linux*)
1429 LD="${LD-ld} -m elf32_sparc"
1430 ;;
1431 esac
1432 ;;
1433 *64-bit*)
1434 case $host in
1435 x86_64-*linux*)
1436 LD="${LD-ld} -m elf_x86_64"
1437 ;;
1438 ppc*-*linux*|powerpc*-*linux*)
1439 LD="${LD-ld} -m elf64ppc"
1440 ;;
1441 s390*-*linux*)
1442 LD="${LD-ld} -m elf64_s390"
1443 ;;
1444 sparc*-*linux*)
1445 LD="${LD-ld} -m elf64_sparc"
1446 ;;
1447 esac
1448 ;;
1449 esac
1450 fi
1451 rm -rf conftest*
1452 ;;
1453
1454 *-*-sco3.2v5*)
1455 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1456 SAVE_CFLAGS="$CFLAGS"
1457 CFLAGS="$CFLAGS -belf"
1458 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1459 [AC_LANG_PUSH(C)
1460 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1461 AC_LANG_POP])
1462 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1463 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1464 CFLAGS="$SAVE_CFLAGS"
1465 fi
1466 ;;
1467 sparc*-*solaris*)
1468 # Find out which ABI we are using.
1469 echo 'int i;' > conftest.$ac_ext
1470 if AC_TRY_EVAL(ac_compile); then
1471 case `/usr/bin/file conftest.o` in
1472 *64-bit*)
1473 case $lt_cv_prog_gnu_ld in
1474 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1475 *) LD="${LD-ld} -64" ;;
1476 esac
1477 ;;
1478 esac
1479 fi
1480 rm -rf conftest*
1481 ;;
1482
1483 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1484 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1485 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1486 AC_CHECK_TOOL(AS, as, false)
1487 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1488 ;;
1489 ])
1490 esac
1491
1492 need_locks="$enable_libtool_lock"
1493
1494 ])# _LT_AC_LOCK
1495
1496
1497 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1498 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1499 # ----------------------------------------------------------------
1500 # Check whether the given compiler option works
1501 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1502 [AC_REQUIRE([LT_AC_PROG_SED])
1503 AC_CACHE_CHECK([$1], [$2],
1504 [$2=no
1505 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1506 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1507 lt_compiler_flag="$3"
1508 # Insert the option either (1) after the last *FLAGS variable, or
1509 # (2) before a word containing "conftest.", or (3) at the end.
1510 # Note that $ac_compile itself does not contain backslashes and begins
1511 # with a dollar sign (not a hyphen), so the echo should work correctly.
1512 # The option is referenced via a variable to avoid confusing sed.
1513 lt_compile=`echo "$ac_compile" | $SED \
1514 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1515 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1516 -e 's:$: $lt_compiler_flag:'`
1517 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1518 (eval "$lt_compile" 2>conftest.err)
1519 ac_status=$?
1520 cat conftest.err >&AS_MESSAGE_LOG_FD
1521 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1522 if (exit $ac_status) && test -s "$ac_outfile"; then
1523 # The compiler can only warn and ignore the option if not recognized
1524 # So say no if there are warnings other than the usual output.
1525 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1526 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1527 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1528 $2=yes
1529 fi
1530 fi
1531 $rm conftest*
1532 ])
1533
1534 if test x"[$]$2" = xyes; then
1535 ifelse([$5], , :, [$5])
1536 else
1537 ifelse([$6], , :, [$6])
1538 fi
1539 ])# AC_LIBTOOL_COMPILER_OPTION
1540
1541
1542 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1543 # [ACTION-SUCCESS], [ACTION-FAILURE])
1544 # ------------------------------------------------------------
1545 # Check whether the given compiler option works
1546 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1547 [AC_CACHE_CHECK([$1], [$2],
1548 [$2=no
1549 save_LDFLAGS="$LDFLAGS"
1550 LDFLAGS="$LDFLAGS $3"
1551 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1552 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1553 # The linker can only warn and ignore the option if not recognized
1554 # So say no if there are warnings
1555 if test -s conftest.err; then
1556 # Append any errors to the config.log.
1557 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1558 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1559 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1560 if diff conftest.exp conftest.er2 >/dev/null; then
1561 $2=yes
1562 fi
1563 else
1564 $2=yes
1565 fi
1566 fi
1567 $rm conftest*
1568 LDFLAGS="$save_LDFLAGS"
1569 ])
1570
1571 if test x"[$]$2" = xyes; then
1572 ifelse([$4], , :, [$4])
1573 else
1574 ifelse([$5], , :, [$5])
1575 fi
1576 ])# AC_LIBTOOL_LINKER_OPTION
1577
1578
1579 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1580 # --------------------------
1581 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1582 [# find the maximum length of command line arguments
1583 AC_MSG_CHECKING([the maximum length of command line arguments])
1584 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1585 i=0
1586 teststring="ABCD"
1587
1588 case $build_os in
1589 msdosdjgpp*)
1590 # On DJGPP, this test can blow up pretty badly due to problems in libc
1591 # (any single argument exceeding 2000 bytes causes a buffer overrun
1592 # during glob expansion). Even if it were fixed, the result of this
1593 # check would be larger than it should be.
1594 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1595 ;;
1596
1597 gnu*)
1598 # Under GNU Hurd, this test is not required because there is
1599 # no limit to the length of command line arguments.
1600 # Libtool will interpret -1 as no limit whatsoever
1601 lt_cv_sys_max_cmd_len=-1;
1602 ;;
1603
1604 cygwin* | mingw*)
1605 # On Win9x/ME, this test blows up -- it succeeds, but takes
1606 # about 5 minutes as the teststring grows exponentially.
1607 # Worse, since 9x/ME are not pre-emptively multitasking,
1608 # you end up with a "frozen" computer, even though with patience
1609 # the test eventually succeeds (with a max line length of 256k).
1610 # Instead, let's just punt: use the minimum linelength reported by
1611 # all of the supported platforms: 8192 (on NT/2K/XP).
1612 lt_cv_sys_max_cmd_len=8192;
1613 ;;
1614
1615 amigaos*)
1616 # On AmigaOS with pdksh, this test takes hours, literally.
1617 # So we just punt and use a minimum line length of 8192.
1618 lt_cv_sys_max_cmd_len=8192;
1619 ;;
1620
1621 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1622 # This has been around since 386BSD, at least. Likely further.
1623 if test -x /sbin/sysctl; then
1624 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1625 elif test -x /usr/sbin/sysctl; then
1626 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1627 else
1628 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1629 fi
1630 # And add a safety zone
1631 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1632 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1633 ;;
1634
1635 interix*)
1636 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1637 lt_cv_sys_max_cmd_len=196608
1638 ;;
1639
1640 osf*)
1641 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1642 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1643 # nice to cause kernel panics so lets avoid the loop below.
1644 # First set a reasonable default.
1645 lt_cv_sys_max_cmd_len=16384
1646 #
1647 if test -x /sbin/sysconfig; then
1648 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1649 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1650 esac
1651 fi
1652 ;;
1653 sco3.2v5*)
1654 lt_cv_sys_max_cmd_len=102400
1655 ;;
1656 sysv5* | sco5v6* | sysv4.2uw2*)
1657 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1658 if test -n "$kargmax"; then
1659 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1660 else
1661 lt_cv_sys_max_cmd_len=32768
1662 fi
1663 ;;
1664 *)
1665 # If test is not a shell built-in, we'll probably end up computing a
1666 # maximum length that is only half of the actual maximum length, but
1667 # we can't tell.
1668 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1669 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1670 = "XX$teststring") >/dev/null 2>&1 &&
1671 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1672 lt_cv_sys_max_cmd_len=$new_result &&
1673 test $i != 17 # 1/2 MB should be enough
1674 do
1675 i=`expr $i + 1`
1676 teststring=$teststring$teststring
1677 done
1678 teststring=
1679 # Add a significant safety factor because C++ compilers can tack on massive
1680 # amounts of additional arguments before passing them to the linker.
1681 # It appears as though 1/2 is a usable value.
1682 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1683 ;;
1684 esac
1685 ])
1686 if test -n $lt_cv_sys_max_cmd_len ; then
1687 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1688 else
1689 AC_MSG_RESULT(none)
1690 fi
1691 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1692
1693
1694 # _LT_AC_CHECK_DLFCN
1695 # ------------------
1696 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1697 [AC_CHECK_HEADERS(dlfcn.h)dnl
1698 ])# _LT_AC_CHECK_DLFCN
1699
1700
1701 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1702 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1703 # ---------------------------------------------------------------------
1704 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1705 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1706 if test "$cross_compiling" = yes; then :
1707 [$4]
1708 else
1709 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1710 lt_status=$lt_dlunknown
1711 cat > conftest.$ac_ext <<EOF
1712 [#line __oline__ "configure"
1713 #include "confdefs.h"
1714
1715 #if HAVE_DLFCN_H
1716 #include <dlfcn.h>
1717 #endif
1718
1719 #include <stdio.h>
1720
1721 #ifdef RTLD_GLOBAL
1722 # define LT_DLGLOBAL RTLD_GLOBAL
1723 #else
1724 # ifdef DL_GLOBAL
1725 # define LT_DLGLOBAL DL_GLOBAL
1726 # else
1727 # define LT_DLGLOBAL 0
1728 # endif
1729 #endif
1730
1731 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1732 find out it does not work in some platform. */
1733 #ifndef LT_DLLAZY_OR_NOW
1734 # ifdef RTLD_LAZY
1735 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1736 # else
1737 # ifdef DL_LAZY
1738 # define LT_DLLAZY_OR_NOW DL_LAZY
1739 # else
1740 # ifdef RTLD_NOW
1741 # define LT_DLLAZY_OR_NOW RTLD_NOW
1742 # else
1743 # ifdef DL_NOW
1744 # define LT_DLLAZY_OR_NOW DL_NOW
1745 # else
1746 # define LT_DLLAZY_OR_NOW 0
1747 # endif
1748 # endif
1749 # endif
1750 # endif
1751 #endif
1752
1753 #ifdef __cplusplus
1754 extern "C" void exit (int);
1755 #endif
1756
1757 void fnord() { int i=42;}
1758 int main ()
1759 {
1760 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1761 int status = $lt_dlunknown;
1762
1763 if (self)
1764 {
1765 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1766 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1767 /* dlclose (self); */
1768 }
1769 else
1770 puts (dlerror ());
1771
1772 exit (status);
1773 }]
1774 EOF
1775 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1776 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1777 lt_status=$?
1778 case x$lt_status in
1779 x$lt_dlno_uscore) $1 ;;
1780 x$lt_dlneed_uscore) $2 ;;
1781 x$lt_dlunknown|x*) $3 ;;
1782 esac
1783 else :
1784 # compilation failed
1785 $3
1786 fi
1787 fi
1788 rm -fr conftest*
1789 ])# _LT_AC_TRY_DLOPEN_SELF
1790
1791
1792 # AC_LIBTOOL_DLOPEN_SELF
1793 # ----------------------
1794 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1795 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1796 if test "x$enable_dlopen" != xyes; then
1797 enable_dlopen=unknown
1798 enable_dlopen_self=unknown
1799 enable_dlopen_self_static=unknown
1800 else
1801 lt_cv_dlopen=no
1802 lt_cv_dlopen_libs=
1803
1804 case $host_os in
1805 beos*)
1806 lt_cv_dlopen="load_add_on"
1807 lt_cv_dlopen_libs=
1808 lt_cv_dlopen_self=yes
1809 ;;
1810
1811 mingw* | pw32*)
1812 lt_cv_dlopen="LoadLibrary"
1813 lt_cv_dlopen_libs=
1814 ;;
1815
1816 cygwin*)
1817 lt_cv_dlopen="dlopen"
1818 lt_cv_dlopen_libs=
1819 ;;
1820
1821 darwin*)
1822 # if libdl is installed we need to link against it
1823 AC_CHECK_LIB([dl], [dlopen],
1824 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1825 lt_cv_dlopen="dyld"
1826 lt_cv_dlopen_libs=
1827 lt_cv_dlopen_self=yes
1828 ])
1829 ;;
1830
1831 *)
1832 AC_CHECK_FUNC([shl_load],
1833 [lt_cv_dlopen="shl_load"],
1834 [AC_CHECK_LIB([dld], [shl_load],
1835 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1836 [AC_CHECK_FUNC([dlopen],
1837 [lt_cv_dlopen="dlopen"],
1838 [AC_CHECK_LIB([dl], [dlopen],
1839 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1840 [AC_CHECK_LIB([svld], [dlopen],
1841 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1842 [AC_CHECK_LIB([dld], [dld_link],
1843 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1844 ])
1845 ])
1846 ])
1847 ])
1848 ])
1849 ;;
1850 esac
1851
1852 if test "x$lt_cv_dlopen" != xno; then
1853 enable_dlopen=yes
1854 else
1855 enable_dlopen=no
1856 fi
1857
1858 case $lt_cv_dlopen in
1859 dlopen)
1860 save_CPPFLAGS="$CPPFLAGS"
1861 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1862
1863 save_LDFLAGS="$LDFLAGS"
1864 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1865
1866 save_LIBS="$LIBS"
1867 LIBS="$lt_cv_dlopen_libs $LIBS"
1868
1869 AC_CACHE_CHECK([whether a program can dlopen itself],
1870 lt_cv_dlopen_self, [dnl
1871 _LT_AC_TRY_DLOPEN_SELF(
1872 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1873 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1874 ])
1875
1876 if test "x$lt_cv_dlopen_self" = xyes; then
1877 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1878 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1879 lt_cv_dlopen_self_static, [dnl
1880 _LT_AC_TRY_DLOPEN_SELF(
1881 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1882 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1883 ])
1884 fi
1885
1886 CPPFLAGS="$save_CPPFLAGS"
1887 LDFLAGS="$save_LDFLAGS"
1888 LIBS="$save_LIBS"
1889 ;;
1890 esac
1891
1892 case $lt_cv_dlopen_self in
1893 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1894 *) enable_dlopen_self=unknown ;;
1895 esac
1896
1897 case $lt_cv_dlopen_self_static in
1898 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1899 *) enable_dlopen_self_static=unknown ;;
1900 esac
1901 fi
1902 ])# AC_LIBTOOL_DLOPEN_SELF
1903
1904
1905 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1906 # ---------------------------------
1907 # Check to see if options -c and -o are simultaneously supported by compiler
1908 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1909 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1910 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1911 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1912 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1913 $rm -r conftest 2>/dev/null
1914 mkdir conftest
1915 cd conftest
1916 mkdir out
1917 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1918
1919 lt_compiler_flag="-o out/conftest2.$ac_objext"
1920 # Insert the option either (1) after the last *FLAGS variable, or
1921 # (2) before a word containing "conftest.", or (3) at the end.
1922 # Note that $ac_compile itself does not contain backslashes and begins
1923 # with a dollar sign (not a hyphen), so the echo should work correctly.
1924 lt_compile=`echo "$ac_compile" | $SED \
1925 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1926 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1927 -e 's:$: $lt_compiler_flag:'`
1928 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1929 (eval "$lt_compile" 2>out/conftest.err)
1930 ac_status=$?
1931 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1932 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1933 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1934 then
1935 # The compiler can only warn and ignore the option if not recognized
1936 # So say no if there are warnings
1937 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1938 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1939 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1940 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1941 fi
1942 fi
1943 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1944 $rm conftest*
1945 # SGI C++ compiler will create directory out/ii_files/ for
1946 # template instantiation
1947 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1948 $rm out/* && rmdir out
1949 cd ..
1950 rmdir conftest
1951 $rm conftest*
1952 ])
1953 ])# AC_LIBTOOL_PROG_CC_C_O
1954
1955
1956 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1957 # -----------------------------------------
1958 # Check to see if we can do hard links to lock some files if needed
1959 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1960 [AC_REQUIRE([_LT_AC_LOCK])dnl
1961
1962 hard_links="nottested"
1963 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1964 # do not overwrite the value of need_locks provided by the user
1965 AC_MSG_CHECKING([if we can lock with hard links])
1966 hard_links=yes
1967 $rm conftest*
1968 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1969 touch conftest.a
1970 ln conftest.a conftest.b 2>&5 || hard_links=no
1971 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1972 AC_MSG_RESULT([$hard_links])
1973 if test "$hard_links" = no; then
1974 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1975 need_locks=warn
1976 fi
1977 else
1978 need_locks=no
1979 fi
1980 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1981
1982
1983 # AC_LIBTOOL_OBJDIR
1984 # -----------------
1985 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1986 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1987 [rm -f .libs 2>/dev/null
1988 mkdir .libs 2>/dev/null
1989 if test -d .libs; then
1990 lt_cv_objdir=.libs
1991 else
1992 # MS-DOS does not allow filenames that begin with a dot.
1993 lt_cv_objdir=_libs
1994 fi
1995 rmdir .libs 2>/dev/null])
1996 objdir=$lt_cv_objdir
1997 ])# AC_LIBTOOL_OBJDIR
1998
1999
2000 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2001 # ----------------------------------------------
2002 # Check hardcoding attributes.
2003 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2004 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2005 _LT_AC_TAGVAR(hardcode_action, $1)=
2006 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2007 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2008 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2009
2010 # We can hardcode non-existant directories.
2011 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2012 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2013 # have to relink, otherwise we might link with an installed library
2014 # when we should be linking with a yet-to-be-installed one
2015 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2016 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2017 # Linking always hardcodes the temporary library directory.
2018 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2019 else
2020 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2021 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2022 fi
2023 else
2024 # We cannot hardcode anything, or else we can only hardcode existing
2025 # directories.
2026 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2027 fi
2028 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2029
2030 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2031 # Fast installation is not supported
2032 enable_fast_install=no
2033 elif test "$shlibpath_overrides_runpath" = yes ||
2034 test "$enable_shared" = no; then
2035 # Fast installation is not necessary
2036 enable_fast_install=needless
2037 fi
2038 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2039
2040
2041 # AC_LIBTOOL_SYS_LIB_STRIP
2042 # ------------------------
2043 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2044 [striplib=
2045 old_striplib=
2046 AC_MSG_CHECKING([whether stripping libraries is possible])
2047 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2048 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2049 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2050 AC_MSG_RESULT([yes])
2051 else
2052 # FIXME - insert some real tests, host_os isn't really good enough
2053 case $host_os in
2054 darwin*)
2055 if test -n "$STRIP" ; then
2056 striplib="$STRIP -x"
2057 AC_MSG_RESULT([yes])
2058 else
2059 AC_MSG_RESULT([no])
2060 fi
2061 ;;
2062 *)
2063 AC_MSG_RESULT([no])
2064 ;;
2065 esac
2066 fi
2067 ])# AC_LIBTOOL_SYS_LIB_STRIP
2068
2069
2070 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2071 # -----------------------------
2072 # PORTME Fill in your ld.so characteristics
2073 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2074 [AC_MSG_CHECKING([dynamic linker characteristics])
2075 library_names_spec=
2076 libname_spec='lib$name'
2077 soname_spec=
2078 shrext_cmds=".so"
2079 postinstall_cmds=
2080 postuninstall_cmds=
2081 finish_cmds=
2082 finish_eval=
2083 shlibpath_var=
2084 shlibpath_overrides_runpath=unknown
2085 version_type=none
2086 dynamic_linker="$host_os ld.so"
2087 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2088 if test "$GCC" = yes; then
2089 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2090 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2091 # if the path contains ";" then we assume it to be the separator
2092 # otherwise default to the standard path separator (i.e. ":") - it is
2093 # assumed that no part of a normal pathname contains ";" but that should
2094 # okay in the real world where ";" in dirpaths is itself problematic.
2095 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2096 else
2097 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2098 fi
2099 else
2100 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2101 fi
2102 need_lib_prefix=unknown
2103 hardcode_into_libs=no
2104
2105 # when you set need_version to no, make sure it does not cause -set_version
2106 # flags to be left without arguments
2107 need_version=unknown
2108
2109 case $host_os in
2110 aix3*)
2111 version_type=linux
2112 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2113 shlibpath_var=LIBPATH
2114
2115 # AIX 3 has no versioning support, so we append a major version to the name.
2116 soname_spec='${libname}${release}${shared_ext}$major'
2117 ;;
2118
2119 aix4* | aix5*)
2120 version_type=linux
2121 need_lib_prefix=no
2122 need_version=no
2123 hardcode_into_libs=yes
2124 if test "$host_cpu" = ia64; then
2125 # AIX 5 supports IA64
2126 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2127 shlibpath_var=LD_LIBRARY_PATH
2128 else
2129 # With GCC up to 2.95.x, collect2 would create an import file
2130 # for dependence libraries. The import file would start with
2131 # the line `#! .'. This would cause the generated library to
2132 # depend on `.', always an invalid library. This was fixed in
2133 # development snapshots of GCC prior to 3.0.
2134 case $host_os in
2135 aix4 | aix4.[[01]] | aix4.[[01]].*)
2136 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2137 echo ' yes '
2138 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2139 :
2140 else
2141 can_build_shared=no
2142 fi
2143 ;;
2144 esac
2145 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2146 # soname into executable. Probably we can add versioning support to
2147 # collect2, so additional links can be useful in future.
2148 if test "$aix_use_runtimelinking" = yes; then
2149 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2150 # instead of lib<name>.a to let people know that these are not
2151 # typical AIX shared libraries.
2152 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2153 else
2154 # We preserve .a as extension for shared libraries through AIX4.2
2155 # and later when we are not doing run time linking.
2156 library_names_spec='${libname}${release}.a $libname.a'
2157 soname_spec='${libname}${release}${shared_ext}$major'
2158 fi
2159 shlibpath_var=LIBPATH
2160 fi
2161 ;;
2162
2163 amigaos*)
2164 library_names_spec='$libname.ixlibrary $libname.a'
2165 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2166 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'
2167 ;;
2168
2169 beos*)
2170 library_names_spec='${libname}${shared_ext}'
2171 dynamic_linker="$host_os ld.so"
2172 shlibpath_var=LIBRARY_PATH
2173 ;;
2174
2175 bsdi[[45]]*)
2176 version_type=linux
2177 need_version=no
2178 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2179 soname_spec='${libname}${release}${shared_ext}$major'
2180 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2181 shlibpath_var=LD_LIBRARY_PATH
2182 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2183 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2184 # the default ld.so.conf also contains /usr/contrib/lib and
2185 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2186 # libtool to hard-code these into programs
2187 ;;
2188
2189 cygwin* | mingw* | pw32*)
2190 version_type=windows
2191 shrext_cmds=".dll"
2192 need_version=no
2193 need_lib_prefix=no
2194
2195 case $GCC,$host_os in
2196 yes,cygwin* | yes,mingw* | yes,pw32*)
2197 library_names_spec='$libname.dll.a'
2198 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2199 postinstall_cmds='base_file=`basename \${file}`~
2200 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2201 dldir=$destdir/`dirname \$dlpath`~
2202 test -d \$dldir || mkdir -p \$dldir~
2203 $install_prog $dir/$dlname \$dldir/$dlname~
2204 chmod a+x \$dldir/$dlname'
2205 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2206 dlpath=$dir/\$dldll~
2207 $rm \$dlpath'
2208 shlibpath_overrides_runpath=yes
2209
2210 case $host_os in
2211 cygwin*)
2212 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2213 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2214 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2215 ;;
2216 mingw*)
2217 # MinGW DLLs use traditional 'lib' prefix
2218 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2219 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2220 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2221 # It is most probably a Windows format PATH printed by
2222 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2223 # path with ; separators, and with drive letters. We can handle the
2224 # drive letters (cygwin fileutils understands them), so leave them,
2225 # especially as we might pass files found there to a mingw objdump,
2226 # which wouldn't understand a cygwinified path. Ahh.
2227 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2228 else
2229 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2230 fi
2231 ;;
2232 pw32*)
2233 # pw32 DLLs use 'pw' prefix rather than 'lib'
2234 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2235 ;;
2236 esac
2237 ;;
2238
2239 *)
2240 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2241 ;;
2242 esac
2243 dynamic_linker='Win32 ld.exe'
2244 # FIXME: first we should search . and the directory the executable is in
2245 shlibpath_var=PATH
2246 ;;
2247
2248 darwin* | rhapsody*)
2249 dynamic_linker="$host_os dyld"
2250 version_type=darwin
2251 need_lib_prefix=no
2252 need_version=no
2253 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2254 soname_spec='${libname}${release}${major}$shared_ext'
2255 shlibpath_overrides_runpath=yes
2256 shlibpath_var=DYLD_LIBRARY_PATH
2257 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2258 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2259 if test "$GCC" = yes; then
2260 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2261 else
2262 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2263 fi
2264 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2265 ;;
2266
2267 dgux*)
2268 version_type=linux
2269 need_lib_prefix=no
2270 need_version=no
2271 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2272 soname_spec='${libname}${release}${shared_ext}$major'
2273 shlibpath_var=LD_LIBRARY_PATH
2274 ;;
2275
2276 freebsd1*)
2277 dynamic_linker=no
2278 ;;
2279
2280 freebsd* | dragonfly*)
2281 # DragonFly does not have aout. When/if they implement a new
2282 # versioning mechanism, adjust this.
2283 if test -x /usr/bin/objformat; then
2284 objformat=`/usr/bin/objformat`
2285 else
2286 case $host_os in
2287 freebsd[[123]]*) objformat=aout ;;
2288 *) objformat=elf ;;
2289 esac
2290 fi
2291 version_type=freebsd-$objformat
2292 case $version_type in
2293 freebsd-elf*)
2294 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2295 need_version=no
2296 need_lib_prefix=no
2297 ;;
2298 freebsd-*)
2299 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2300 need_version=yes
2301 ;;
2302 esac
2303 shlibpath_var=LD_LIBRARY_PATH
2304 case $host_os in
2305 freebsd2*)
2306 shlibpath_overrides_runpath=yes
2307 ;;
2308 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2309 shlibpath_overrides_runpath=yes
2310 hardcode_into_libs=yes
2311 ;;
2312 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2313 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2314 shlibpath_overrides_runpath=no
2315 hardcode_into_libs=yes
2316 ;;
2317 freebsd*) # from 4.6 on
2318 shlibpath_overrides_runpath=yes
2319 hardcode_into_libs=yes
2320 ;;
2321 esac
2322 ;;
2323
2324 gnu*)
2325 version_type=linux
2326 need_lib_prefix=no
2327 need_version=no
2328 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2329 soname_spec='${libname}${release}${shared_ext}$major'
2330 shlibpath_var=LD_LIBRARY_PATH
2331 hardcode_into_libs=yes
2332 ;;
2333
2334 hpux9* | hpux10* | hpux11*)
2335 # Give a soname corresponding to the major version so that dld.sl refuses to
2336 # link against other versions.
2337 version_type=sunos
2338 need_lib_prefix=no
2339 need_version=no
2340 case $host_cpu in
2341 ia64*)
2342 shrext_cmds='.so'
2343 hardcode_into_libs=yes
2344 dynamic_linker="$host_os dld.so"
2345 shlibpath_var=LD_LIBRARY_PATH
2346 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2347 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2348 soname_spec='${libname}${release}${shared_ext}$major'
2349 if test "X$HPUX_IA64_MODE" = X32; then
2350 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2351 else
2352 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2353 fi
2354 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2355 ;;
2356 hppa*64*)
2357 shrext_cmds='.sl'
2358 hardcode_into_libs=yes
2359 dynamic_linker="$host_os dld.sl"
2360 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2361 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2362 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2363 soname_spec='${libname}${release}${shared_ext}$major'
2364 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2365 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2366 ;;
2367 *)
2368 shrext_cmds='.sl'
2369 dynamic_linker="$host_os dld.sl"
2370 shlibpath_var=SHLIB_PATH
2371 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2372 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2373 soname_spec='${libname}${release}${shared_ext}$major'
2374 ;;
2375 esac
2376 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2377 postinstall_cmds='chmod 555 $lib'
2378 ;;
2379
2380 interix3*)
2381 version_type=linux
2382 need_lib_prefix=no
2383 need_version=no
2384 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2385 soname_spec='${libname}${release}${shared_ext}$major'
2386 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2387 shlibpath_var=LD_LIBRARY_PATH
2388 shlibpath_overrides_runpath=no
2389 hardcode_into_libs=yes
2390 ;;
2391
2392 irix5* | irix6* | nonstopux*)
2393 case $host_os in
2394 nonstopux*) version_type=nonstopux ;;
2395 *)
2396 if test "$lt_cv_prog_gnu_ld" = yes; then
2397 version_type=linux
2398 else
2399 version_type=irix
2400 fi ;;
2401 esac
2402 need_lib_prefix=no
2403 need_version=no
2404 soname_spec='${libname}${release}${shared_ext}$major'
2405 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2406 case $host_os in
2407 irix5* | nonstopux*)
2408 libsuff= shlibsuff=
2409 ;;
2410 *)
2411 case $LD in # libtool.m4 will add one of these switches to LD
2412 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2413 libsuff= shlibsuff= libmagic=32-bit;;
2414 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2415 libsuff=32 shlibsuff=N32 libmagic=N32;;
2416 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2417 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2418 *) libsuff= shlibsuff= libmagic=never-match;;
2419 esac
2420 ;;
2421 esac
2422 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2423 shlibpath_overrides_runpath=no
2424 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2425 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2426 hardcode_into_libs=yes
2427 ;;
2428
2429 # No shared lib support for Linux oldld, aout, or coff.
2430 linux*oldld* | linux*aout* | linux*coff*)
2431 dynamic_linker=no
2432 ;;
2433
2434 # This must be Linux ELF.
2435 linux* | k*bsd*-gnu)
2436 version_type=linux
2437 need_lib_prefix=no
2438 need_version=no
2439 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2440 soname_spec='${libname}${release}${shared_ext}$major'
2441 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2442 shlibpath_var=LD_LIBRARY_PATH
2443 shlibpath_overrides_runpath=no
2444 # This implies no fast_install, which is unacceptable.
2445 # Some rework will be needed to allow for fast_install
2446 # before this can be enabled.
2447 hardcode_into_libs=yes
2448
2449 # Append ld.so.conf contents to the search path
2450 if test -f /etc/ld.so.conf; then
2451 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2452 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2453 fi
2454
2455 # We used to test for /lib/ld.so.1 and disable shared libraries on
2456 # powerpc, because MkLinux only supported shared libraries with the
2457 # GNU dynamic linker. Since this was broken with cross compilers,
2458 # most powerpc-linux boxes support dynamic linking these days and
2459 # people can always --disable-shared, the test was removed, and we
2460 # assume the GNU/Linux dynamic linker is in use.
2461 dynamic_linker='GNU/Linux ld.so'
2462 ;;
2463
2464 netbsdelf*-gnu)
2465 version_type=linux
2466 need_lib_prefix=no
2467 need_version=no
2468 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2469 soname_spec='${libname}${release}${shared_ext}$major'
2470 shlibpath_var=LD_LIBRARY_PATH
2471 shlibpath_overrides_runpath=no
2472 hardcode_into_libs=yes
2473 dynamic_linker='NetBSD ld.elf_so'
2474 ;;
2475
2476 netbsd*)
2477 version_type=sunos
2478 need_lib_prefix=no
2479 need_version=no
2480 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2481 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2482 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2483 dynamic_linker='NetBSD (a.out) ld.so'
2484 else
2485 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2486 soname_spec='${libname}${release}${shared_ext}$major'
2487 dynamic_linker='NetBSD ld.elf_so'
2488 fi
2489 shlibpath_var=LD_LIBRARY_PATH
2490 shlibpath_overrides_runpath=yes
2491 hardcode_into_libs=yes
2492 ;;
2493
2494 newsos6)
2495 version_type=linux
2496 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2497 shlibpath_var=LD_LIBRARY_PATH
2498 shlibpath_overrides_runpath=yes
2499 ;;
2500
2501 nto-qnx*)
2502 version_type=linux
2503 need_lib_prefix=no
2504 need_version=no
2505 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2506 soname_spec='${libname}${release}${shared_ext}$major'
2507 shlibpath_var=LD_LIBRARY_PATH
2508 shlibpath_overrides_runpath=yes
2509 ;;
2510
2511 openbsd*)
2512 version_type=sunos
2513 sys_lib_dlsearch_path_spec="/usr/lib"
2514 need_lib_prefix=no
2515 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2516 case $host_os in
2517 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2518 *) need_version=no ;;
2519 esac
2520 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2521 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2522 shlibpath_var=LD_LIBRARY_PATH
2523 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2524 case $host_os in
2525 openbsd2.[[89]] | openbsd2.[[89]].*)
2526 shlibpath_overrides_runpath=no
2527 ;;
2528 *)
2529 shlibpath_overrides_runpath=yes
2530 ;;
2531 esac
2532 else
2533 shlibpath_overrides_runpath=yes
2534 fi
2535 ;;
2536
2537 os2*)
2538 libname_spec='$name'
2539 shrext_cmds=".dll"
2540 need_lib_prefix=no
2541 library_names_spec='$libname${shared_ext} $libname.a'
2542 dynamic_linker='OS/2 ld.exe'
2543 shlibpath_var=LIBPATH
2544 ;;
2545
2546 osf3* | osf4* | osf5*)
2547 version_type=osf
2548 need_lib_prefix=no
2549 need_version=no
2550 soname_spec='${libname}${release}${shared_ext}$major'
2551 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2552 shlibpath_var=LD_LIBRARY_PATH
2553 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2554 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2555 ;;
2556
2557 solaris*)
2558 version_type=linux
2559 need_lib_prefix=no
2560 need_version=no
2561 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2562 soname_spec='${libname}${release}${shared_ext}$major'
2563 shlibpath_var=LD_LIBRARY_PATH
2564 shlibpath_overrides_runpath=yes
2565 hardcode_into_libs=yes
2566 # ldd complains unless libraries are executable
2567 postinstall_cmds='chmod +x $lib'
2568 ;;
2569
2570 sunos4*)
2571 version_type=sunos
2572 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2573 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2574 shlibpath_var=LD_LIBRARY_PATH
2575 shlibpath_overrides_runpath=yes
2576 if test "$with_gnu_ld" = yes; then
2577 need_lib_prefix=no
2578 fi
2579 need_version=yes
2580 ;;
2581
2582 sysv4 | sysv4.3*)
2583 version_type=linux
2584 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2585 soname_spec='${libname}${release}${shared_ext}$major'
2586 shlibpath_var=LD_LIBRARY_PATH
2587 case $host_vendor in
2588 sni)
2589 shlibpath_overrides_runpath=no
2590 need_lib_prefix=no
2591 export_dynamic_flag_spec='${wl}-Blargedynsym'
2592 runpath_var=LD_RUN_PATH
2593 ;;
2594 siemens)
2595 need_lib_prefix=no
2596 ;;
2597 motorola)
2598 need_lib_prefix=no
2599 need_version=no
2600 shlibpath_overrides_runpath=no
2601 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2602 ;;
2603 esac
2604 ;;
2605
2606 sysv4*MP*)
2607 if test -d /usr/nec ;then
2608 version_type=linux
2609 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2610 soname_spec='$libname${shared_ext}.$major'
2611 shlibpath_var=LD_LIBRARY_PATH
2612 fi
2613 ;;
2614
2615 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2616 version_type=freebsd-elf
2617 need_lib_prefix=no
2618 need_version=no
2619 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2620 soname_spec='${libname}${release}${shared_ext}$major'
2621 shlibpath_var=LD_LIBRARY_PATH
2622 hardcode_into_libs=yes
2623 if test "$with_gnu_ld" = yes; then
2624 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2625 shlibpath_overrides_runpath=no
2626 else
2627 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2628 shlibpath_overrides_runpath=yes
2629 case $host_os in
2630 sco3.2v5*)
2631 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2632 ;;
2633 esac
2634 fi
2635 sys_lib_dlsearch_path_spec='/usr/lib'
2636 ;;
2637
2638 uts4*)
2639 version_type=linux
2640 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2641 soname_spec='${libname}${release}${shared_ext}$major'
2642 shlibpath_var=LD_LIBRARY_PATH
2643 ;;
2644
2645 *)
2646 dynamic_linker=no
2647 ;;
2648 esac
2649 AC_MSG_RESULT([$dynamic_linker])
2650 test "$dynamic_linker" = no && can_build_shared=no
2651
2652 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2653 if test "$GCC" = yes; then
2654 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2655 fi
2656 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2657
2658
2659 # _LT_AC_TAGCONFIG
2660 # ----------------
2661 AC_DEFUN([_LT_AC_TAGCONFIG],
2662 [AC_ARG_WITH([tags],
2663 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2664 [include additional configurations @<:@automatic@:>@])],
2665 [tagnames="$withval"])
2666
2667 if test -f "$ltmain" && test -n "$tagnames"; then
2668 if test ! -f "${ofile}"; then
2669 AC_MSG_WARN([output file `$ofile' does not exist])
2670 fi
2671
2672 if test -z "$LTCC"; then
2673 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2674 if test -z "$LTCC"; then
2675 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2676 else
2677 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2678 fi
2679 fi
2680 if test -z "$LTCFLAGS"; then
2681 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2682 fi
2683
2684 # Extract list of available tagged configurations in $ofile.
2685 # Note that this assumes the entire list is on one line.
2686 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2687
2688 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2689 for tagname in $tagnames; do
2690 IFS="$lt_save_ifs"
2691 # Check whether tagname contains only valid characters
2692 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2693 "") ;;
2694 *) AC_MSG_ERROR([invalid tag name: $tagname])
2695 ;;
2696 esac
2697
2698 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2699 then
2700 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2701 fi
2702
2703 # Update the list of available tags.
2704 if test -n "$tagname"; then
2705 echo appending configuration tag \"$tagname\" to $ofile
2706
2707 case $tagname in
2708 CXX)
2709 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2710 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2711 (test "X$CXX" != "Xg++"))) ; then
2712 AC_LIBTOOL_LANG_CXX_CONFIG
2713 else
2714 tagname=""
2715 fi
2716 ;;
2717
2718 F77)
2719 if test -n "$F77" && test "X$F77" != "Xno"; then
2720 AC_LIBTOOL_LANG_F77_CONFIG
2721 else
2722 tagname=""
2723 fi
2724 ;;
2725
2726 GCJ)
2727 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2728 AC_LIBTOOL_LANG_GCJ_CONFIG
2729 else
2730 tagname=""
2731 fi
2732 ;;
2733
2734 RC)
2735 AC_LIBTOOL_LANG_RC_CONFIG
2736 ;;
2737
2738 *)
2739 AC_MSG_ERROR([Unsupported tag name: $tagname])
2740 ;;
2741 esac
2742
2743 # Append the new tag name to the list of available tags.
2744 if test -n "$tagname" ; then
2745 available_tags="$available_tags $tagname"
2746 fi
2747 fi
2748 done
2749 IFS="$lt_save_ifs"
2750
2751 # Now substitute the updated list of available tags.
2752 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2753 mv "${ofile}T" "$ofile"
2754 chmod +x "$ofile"
2755 else
2756 rm -f "${ofile}T"
2757 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2758 fi
2759 fi
2760 ])# _LT_AC_TAGCONFIG
2761
2762
2763 # AC_LIBTOOL_DLOPEN
2764 # -----------------
2765 # enable checks for dlopen support
2766 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2767 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2768 ])# AC_LIBTOOL_DLOPEN
2769
2770
2771 # AC_LIBTOOL_WIN32_DLL
2772 # --------------------
2773 # declare package support for building win32 DLLs
2774 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2775 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2776 ])# AC_LIBTOOL_WIN32_DLL
2777
2778
2779 # AC_ENABLE_SHARED([DEFAULT])
2780 # ---------------------------
2781 # implement the --enable-shared flag
2782 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2783 AC_DEFUN([AC_ENABLE_SHARED],
2784 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2785 AC_ARG_ENABLE([shared],
2786 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2787 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2788 [p=${PACKAGE-default}
2789 case $enableval in
2790 yes) enable_shared=yes ;;
2791 no) enable_shared=no ;;
2792 *)
2793 enable_shared=no
2794 # Look at the argument we got. We use all the common list separators.
2795 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2796 for pkg in $enableval; do
2797 IFS="$lt_save_ifs"
2798 if test "X$pkg" = "X$p"; then
2799 enable_shared=yes
2800 fi
2801 done
2802 IFS="$lt_save_ifs"
2803 ;;
2804 esac],
2805 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2806 ])# AC_ENABLE_SHARED
2807
2808
2809 # AC_DISABLE_SHARED
2810 # -----------------
2811 # set the default shared flag to --disable-shared
2812 AC_DEFUN([AC_DISABLE_SHARED],
2813 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2814 AC_ENABLE_SHARED(no)
2815 ])# AC_DISABLE_SHARED
2816
2817
2818 # AC_ENABLE_STATIC([DEFAULT])
2819 # ---------------------------
2820 # implement the --enable-static flag
2821 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2822 AC_DEFUN([AC_ENABLE_STATIC],
2823 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2824 AC_ARG_ENABLE([static],
2825 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2826 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2827 [p=${PACKAGE-default}
2828 case $enableval in
2829 yes) enable_static=yes ;;
2830 no) enable_static=no ;;
2831 *)
2832 enable_static=no
2833 # Look at the argument we got. We use all the common list separators.
2834 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2835 for pkg in $enableval; do
2836 IFS="$lt_save_ifs"
2837 if test "X$pkg" = "X$p"; then
2838 enable_static=yes
2839 fi
2840 done
2841 IFS="$lt_save_ifs"
2842 ;;
2843 esac],
2844 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2845 ])# AC_ENABLE_STATIC
2846
2847
2848 # AC_DISABLE_STATIC
2849 # -----------------
2850 # set the default static flag to --disable-static
2851 AC_DEFUN([AC_DISABLE_STATIC],
2852 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2853 AC_ENABLE_STATIC(no)
2854 ])# AC_DISABLE_STATIC
2855
2856
2857 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2858 # ---------------------------------
2859 # implement the --enable-fast-install flag
2860 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2861 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2862 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2863 AC_ARG_ENABLE([fast-install],
2864 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2865 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2866 [p=${PACKAGE-default}
2867 case $enableval in
2868 yes) enable_fast_install=yes ;;
2869 no) enable_fast_install=no ;;
2870 *)
2871 enable_fast_install=no
2872 # Look at the argument we got. We use all the common list separators.
2873 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2874 for pkg in $enableval; do
2875 IFS="$lt_save_ifs"
2876 if test "X$pkg" = "X$p"; then
2877 enable_fast_install=yes
2878 fi
2879 done
2880 IFS="$lt_save_ifs"
2881 ;;
2882 esac],
2883 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2884 ])# AC_ENABLE_FAST_INSTALL
2885
2886
2887 # AC_DISABLE_FAST_INSTALL
2888 # -----------------------
2889 # set the default to --disable-fast-install
2890 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2891 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2892 AC_ENABLE_FAST_INSTALL(no)
2893 ])# AC_DISABLE_FAST_INSTALL
2894
2895
2896 # AC_LIBTOOL_PICMODE([MODE])
2897 # --------------------------
2898 # implement the --with-pic flag
2899 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2900 AC_DEFUN([AC_LIBTOOL_PICMODE],
2901 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2902 pic_mode=ifelse($#,1,$1,default)
2903 ])# AC_LIBTOOL_PICMODE
2904
2905
2906 # AC_PROG_EGREP
2907 # -------------
2908 # This is predefined starting with Autoconf 2.54, so this conditional
2909 # definition can be removed once we require Autoconf 2.54 or later.
2910 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2911 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2912 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2913 then ac_cv_prog_egrep='grep -E'
2914 else ac_cv_prog_egrep='egrep'
2915 fi])
2916 EGREP=$ac_cv_prog_egrep
2917 AC_SUBST([EGREP])
2918 ])])
2919
2920
2921 # AC_PATH_TOOL_PREFIX
2922 # -------------------
2923 # find a file program which can recognise shared library
2924 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2925 [AC_REQUIRE([AC_PROG_EGREP])dnl
2926 AC_MSG_CHECKING([for $1])
2927 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2928 [case $MAGIC_CMD in
2929 [[\\/*] | ?:[\\/]*])
2930 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2931 ;;
2932 *)
2933 lt_save_MAGIC_CMD="$MAGIC_CMD"
2934 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2935 dnl $ac_dummy forces splitting on constant user-supplied paths.
2936 dnl POSIX.2 word splitting is done only on the output of word expansions,
2937 dnl not every word. This closes a longstanding sh security hole.
2938 ac_dummy="ifelse([$2], , $PATH, [$2])"
2939 for ac_dir in $ac_dummy; do
2940 IFS="$lt_save_ifs"
2941 test -z "$ac_dir" && ac_dir=.
2942 if test -f $ac_dir/$1; then
2943 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2944 if test -n "$file_magic_test_file"; then
2945 case $deplibs_check_method in
2946 "file_magic "*)
2947 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2948 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2949 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2950 $EGREP "$file_magic_regex" > /dev/null; then
2951 :
2952 else
2953 cat <<EOF 1>&2
2954
2955 *** Warning: the command libtool uses to detect shared libraries,
2956 *** $file_magic_cmd, produces output that libtool cannot recognize.
2957 *** The result is that libtool may fail to recognize shared libraries
2958 *** as such. This will affect the creation of libtool libraries that
2959 *** depend on shared libraries, but programs linked with such libtool
2960 *** libraries will work regardless of this problem. Nevertheless, you
2961 *** may want to report the problem to your system manager and/or to
2962 *** bug-libtool@gnu.org
2963
2964 EOF
2965 fi ;;
2966 esac
2967 fi
2968 break
2969 fi
2970 done
2971 IFS="$lt_save_ifs"
2972 MAGIC_CMD="$lt_save_MAGIC_CMD"
2973 ;;
2974 esac])
2975 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2976 if test -n "$MAGIC_CMD"; then
2977 AC_MSG_RESULT($MAGIC_CMD)
2978 else
2979 AC_MSG_RESULT(no)
2980 fi
2981 ])# AC_PATH_TOOL_PREFIX
2982
2983
2984 # AC_PATH_MAGIC
2985 # -------------
2986 # find a file program which can recognise a shared library
2987 AC_DEFUN([AC_PATH_MAGIC],
2988 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2989 if test -z "$lt_cv_path_MAGIC_CMD"; then
2990 if test -n "$ac_tool_prefix"; then
2991 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2992 else
2993 MAGIC_CMD=:
2994 fi
2995 fi
2996 ])# AC_PATH_MAGIC
2997
2998
2999 # AC_PROG_LD
3000 # ----------
3001 # find the pathname to the GNU or non-GNU linker
3002 AC_DEFUN([AC_PROG_LD],
3003 [AC_ARG_WITH([gnu-ld],
3004 [AC_HELP_STRING([--with-gnu-ld],
3005 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3006 [test "$withval" = no || with_gnu_ld=yes],
3007 [with_gnu_ld=no])
3008 AC_REQUIRE([LT_AC_PROG_SED])dnl
3009 AC_REQUIRE([AC_PROG_CC])dnl
3010 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3011 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3012 ac_prog=ld
3013 if test "$GCC" = yes; then
3014 # Check if gcc -print-prog-name=ld gives a path.
3015 AC_MSG_CHECKING([for ld used by $CC])
3016 case $host in
3017 *-*-mingw*)
3018 # gcc leaves a trailing carriage return which upsets mingw
3019 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3020 *)
3021 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3022 esac
3023 case $ac_prog in
3024 # Accept absolute paths.
3025 [[\\/]]* | ?:[[\\/]]*)
3026 re_direlt='/[[^/]][[^/]]*/\.\./'
3027 # Canonicalize the pathname of ld
3028 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3029 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3030 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3031 done
3032 test -z "$LD" && LD="$ac_prog"
3033 ;;
3034 "")
3035 # If it fails, then pretend we aren't using GCC.
3036 ac_prog=ld
3037 ;;
3038 *)
3039 # If it is relative, then search for the first ld in PATH.
3040 with_gnu_ld=unknown
3041 ;;
3042 esac
3043 elif test "$with_gnu_ld" = yes; then
3044 AC_MSG_CHECKING([for GNU ld])
3045 else
3046 AC_MSG_CHECKING([for non-GNU ld])
3047 fi
3048 AC_CACHE_VAL(lt_cv_path_LD,
3049 [if test -z "$LD"; then
3050 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3051 for ac_dir in $PATH; do
3052 IFS="$lt_save_ifs"
3053 test -z "$ac_dir" && ac_dir=.
3054 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3055 lt_cv_path_LD="$ac_dir/$ac_prog"
3056 # Check to see if the program is GNU ld. I'd rather use --version,
3057 # but apparently some variants of GNU ld only accept -v.
3058 # Break only if it was the GNU/non-GNU ld that we prefer.
3059 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3060 *GNU* | *'with BFD'*)
3061 test "$with_gnu_ld" != no && break
3062 ;;
3063 *)
3064 test "$with_gnu_ld" != yes && break
3065 ;;
3066 esac
3067 fi
3068 done
3069 IFS="$lt_save_ifs"
3070 else
3071 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3072 fi])
3073 LD="$lt_cv_path_LD"
3074 if test -n "$LD"; then
3075 AC_MSG_RESULT($LD)
3076 else
3077 AC_MSG_RESULT(no)
3078 fi
3079 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3080 AC_PROG_LD_GNU
3081 ])# AC_PROG_LD
3082
3083
3084 # AC_PROG_LD_GNU
3085 # --------------
3086 AC_DEFUN([AC_PROG_LD_GNU],
3087 [AC_REQUIRE([AC_PROG_EGREP])dnl
3088 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3089 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3090 case `$LD -v 2>&1 </dev/null` in
3091 *GNU* | *'with BFD'*)
3092 lt_cv_prog_gnu_ld=yes
3093 ;;
3094 *)
3095 lt_cv_prog_gnu_ld=no
3096 ;;
3097 esac])
3098 with_gnu_ld=$lt_cv_prog_gnu_ld
3099 ])# AC_PROG_LD_GNU
3100
3101
3102 # AC_PROG_LD_RELOAD_FLAG
3103 # ----------------------
3104 # find reload flag for linker
3105 # -- PORTME Some linkers may need a different reload flag.
3106 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3107 [AC_CACHE_CHECK([for $LD option to reload object files],
3108 lt_cv_ld_reload_flag,
3109 [lt_cv_ld_reload_flag='-r'])
3110 reload_flag=$lt_cv_ld_reload_flag
3111 case $reload_flag in
3112 "" | " "*) ;;
3113 *) reload_flag=" $reload_flag" ;;
3114 esac
3115 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3116 case $host_os in
3117 darwin*)
3118 if test "$GCC" = yes; then
3119 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3120 else
3121 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3122 fi
3123 ;;
3124 esac
3125 ])# AC_PROG_LD_RELOAD_FLAG
3126
3127
3128 # AC_DEPLIBS_CHECK_METHOD
3129 # -----------------------
3130 # how to check for library dependencies
3131 # -- PORTME fill in with the dynamic library characteristics
3132 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3133 [AC_CACHE_CHECK([how to recognise dependent libraries],
3134 lt_cv_deplibs_check_method,
3135 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3136 lt_cv_file_magic_test_file=
3137 lt_cv_deplibs_check_method='unknown'
3138 # Need to set the preceding variable on all platforms that support
3139 # interlibrary dependencies.
3140 # 'none' -- dependencies not supported.
3141 # `unknown' -- same as none, but documents that we really don't know.
3142 # 'pass_all' -- all dependencies passed with no checks.
3143 # 'test_compile' -- check by making test program.
3144 # 'file_magic [[regex]]' -- check by looking for files in library path
3145 # which responds to the $file_magic_cmd with a given extended regex.
3146 # If you have `file' or equivalent on your system and you're not sure
3147 # whether `pass_all' will *always* work, you probably want this one.
3148
3149 case $host_os in
3150 aix4* | aix5*)
3151 lt_cv_deplibs_check_method=pass_all
3152 ;;
3153
3154 beos*)
3155 lt_cv_deplibs_check_method=pass_all
3156 ;;
3157
3158 bsdi[[45]]*)
3159 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3160 lt_cv_file_magic_cmd='/usr/bin/file -L'
3161 lt_cv_file_magic_test_file=/shlib/libc.so
3162 ;;
3163
3164 cygwin*)
3165 # func_win32_libid is a shell function defined in ltmain.sh
3166 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3167 lt_cv_file_magic_cmd='func_win32_libid'
3168 ;;
3169
3170 mingw* | pw32*)
3171 # Base MSYS/MinGW do not provide the 'file' command needed by
3172 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3173 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3174 lt_cv_file_magic_cmd='$OBJDUMP -f'
3175 ;;
3176
3177 darwin* | rhapsody*)
3178 lt_cv_deplibs_check_method=pass_all
3179 ;;
3180
3181 freebsd* | dragonfly*)
3182 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3183 case $host_cpu in
3184 i*86 )
3185 # Not sure whether the presence of OpenBSD here was a mistake.
3186 # Let's accept both of them until this is cleared up.
3187 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3188 lt_cv_file_magic_cmd=/usr/bin/file
3189 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3190 ;;
3191 esac
3192 else
3193 lt_cv_deplibs_check_method=pass_all
3194 fi
3195 ;;
3196
3197 gnu*)
3198 lt_cv_deplibs_check_method=pass_all
3199 ;;
3200
3201 hpux10.20* | hpux11*)
3202 lt_cv_file_magic_cmd=/usr/bin/file
3203 case $host_cpu in
3204 ia64*)
3205 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3206 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3207 ;;
3208 hppa*64*)
3209 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3210 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3211 ;;
3212 *)
3213 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3214 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3215 ;;
3216 esac
3217 ;;
3218
3219 interix3*)
3220 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3221 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3222 ;;
3223
3224 irix5* | irix6* | nonstopux*)
3225 case $LD in
3226 *-32|*"-32 ") libmagic=32-bit;;
3227 *-n32|*"-n32 ") libmagic=N32;;
3228 *-64|*"-64 ") libmagic=64-bit;;
3229 *) libmagic=never-match;;
3230 esac
3231 lt_cv_deplibs_check_method=pass_all
3232 ;;
3233
3234 # This must be Linux ELF.
3235 linux* | k*bsd*-gnu)
3236 lt_cv_deplibs_check_method=pass_all
3237 ;;
3238
3239 netbsd* | netbsdelf*-gnu)
3240 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3241 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3242 else
3243 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3244 fi
3245 ;;
3246
3247 newos6*)
3248 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3249 lt_cv_file_magic_cmd=/usr/bin/file
3250 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3251 ;;
3252
3253 nto-qnx*)
3254 lt_cv_deplibs_check_method=unknown
3255 ;;
3256
3257 openbsd*)
3258 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3259 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3260 else
3261 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3262 fi
3263 ;;
3264
3265 osf3* | osf4* | osf5*)
3266 lt_cv_deplibs_check_method=pass_all
3267 ;;
3268
3269 solaris*)
3270 lt_cv_deplibs_check_method=pass_all
3271 ;;
3272
3273 sysv4 | sysv4.3*)
3274 case $host_vendor in
3275 motorola)
3276 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]]'
3277 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3278 ;;
3279 ncr)
3280 lt_cv_deplibs_check_method=pass_all
3281 ;;
3282 sequent)
3283 lt_cv_file_magic_cmd='/bin/file'
3284 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3285 ;;
3286 sni)
3287 lt_cv_file_magic_cmd='/bin/file'
3288 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3289 lt_cv_file_magic_test_file=/lib/libc.so
3290 ;;
3291 siemens)
3292 lt_cv_deplibs_check_method=pass_all
3293 ;;
3294 pc)
3295 lt_cv_deplibs_check_method=pass_all
3296 ;;
3297 esac
3298 ;;
3299
3300 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3301 lt_cv_deplibs_check_method=pass_all
3302 ;;
3303 esac
3304 ])
3305 file_magic_cmd=$lt_cv_file_magic_cmd
3306 deplibs_check_method=$lt_cv_deplibs_check_method
3307 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3308 ])# AC_DEPLIBS_CHECK_METHOD
3309
3310
3311 # AC_PROG_NM
3312 # ----------
3313 # find the pathname to a BSD-compatible name lister
3314 AC_DEFUN([AC_PROG_NM],
3315 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3316 [if test -n "$NM"; then
3317 # Let the user override the test.
3318 lt_cv_path_NM="$NM"
3319 else
3320 lt_nm_to_check="${ac_tool_prefix}nm"
3321 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3322 lt_nm_to_check="$lt_nm_to_check nm"
3323 fi
3324 for lt_tmp_nm in $lt_nm_to_check; do
3325 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3326 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3327 IFS="$lt_save_ifs"
3328 test -z "$ac_dir" && ac_dir=.
3329 tmp_nm="$ac_dir/$lt_tmp_nm"
3330 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3331 # Check to see if the nm accepts a BSD-compat flag.
3332 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3333 # nm: unknown option "B" ignored
3334 # Tru64's nm complains that /dev/null is an invalid object file
3335 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3336 */dev/null* | *'Invalid file or object type'*)
3337 lt_cv_path_NM="$tmp_nm -B"
3338 break
3339 ;;
3340 *)
3341 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3342 */dev/null*)
3343 lt_cv_path_NM="$tmp_nm -p"
3344 break
3345 ;;
3346 *)
3347 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3348 continue # so that we can try to find one that supports BSD flags
3349 ;;
3350 esac
3351 ;;
3352 esac
3353 fi
3354 done
3355 IFS="$lt_save_ifs"
3356 done
3357 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3358 fi])
3359 NM="$lt_cv_path_NM"
3360 ])# AC_PROG_NM
3361
3362
3363 # AC_CHECK_LIBM
3364 # -------------
3365 # check for math library
3366 AC_DEFUN([AC_CHECK_LIBM],
3367 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3368 LIBM=
3369 case $host in
3370 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3371 # These system don't have libm, or don't need it
3372 ;;
3373 *-ncr-sysv4.3*)
3374 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3375 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3376 ;;
3377 *)
3378 AC_CHECK_LIB(m, cos, LIBM="-lm")
3379 ;;
3380 esac
3381 ])# AC_CHECK_LIBM
3382
3383
3384 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3385 # -----------------------------------
3386 # sets LIBLTDL to the link flags for the libltdl convenience library and
3387 # LTDLINCL to the include flags for the libltdl header and adds
3388 # --enable-ltdl-convenience to the configure arguments. Note that
3389 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3390 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3391 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3392 # (note the single quotes!). If your package is not flat and you're not
3393 # using automake, define top_builddir and top_srcdir appropriately in
3394 # the Makefiles.
3395 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3396 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3397 case $enable_ltdl_convenience in
3398 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3399 "") enable_ltdl_convenience=yes
3400 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3401 esac
3402 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3403 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3404 # For backwards non-gettext consistent compatibility...
3405 INCLTDL="$LTDLINCL"
3406 ])# AC_LIBLTDL_CONVENIENCE
3407
3408
3409 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3410 # -----------------------------------
3411 # sets LIBLTDL to the link flags for the libltdl installable library and
3412 # LTDLINCL to the include flags for the libltdl header and adds
3413 # --enable-ltdl-install to the configure arguments. Note that
3414 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3415 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3416 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3417 # '${top_srcdir}/' (note the single quotes!). If your package is not
3418 # flat and you're not using automake, define top_builddir and top_srcdir
3419 # appropriately in the Makefiles.
3420 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3421 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3422 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3423 AC_CHECK_LIB(ltdl, lt_dlinit,
3424 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3425 [if test x"$enable_ltdl_install" = xno; then
3426 AC_MSG_WARN([libltdl not installed, but installation disabled])
3427 else
3428 enable_ltdl_install=yes
3429 fi
3430 ])
3431 if test x"$enable_ltdl_install" = x"yes"; then
3432 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3433 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3434 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3435 else
3436 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3437 LIBLTDL="-lltdl"
3438 LTDLINCL=
3439 fi
3440 # For backwards non-gettext consistent compatibility...
3441 INCLTDL="$LTDLINCL"
3442 ])# AC_LIBLTDL_INSTALLABLE
3443
3444
3445 # AC_LIBTOOL_CXX
3446 # --------------
3447 # enable support for C++ libraries
3448 AC_DEFUN([AC_LIBTOOL_CXX],
3449 [AC_REQUIRE([_LT_AC_LANG_CXX])
3450 ])# AC_LIBTOOL_CXX
3451
3452
3453 # _LT_AC_LANG_CXX
3454 # ---------------
3455 AC_DEFUN([_LT_AC_LANG_CXX],
3456 [AC_REQUIRE([AC_PROG_CXX])
3457 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3458 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3459 ])# _LT_AC_LANG_CXX
3460
3461 # _LT_AC_PROG_CXXCPP
3462 # ------------------
3463 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3464 [
3465 AC_REQUIRE([AC_PROG_CXX])
3466 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3467 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3468 (test "X$CXX" != "Xg++"))) ; then
3469 AC_PROG_CXXCPP
3470 fi
3471 ])# _LT_AC_PROG_CXXCPP
3472
3473 # AC_LIBTOOL_F77
3474 # --------------
3475 # enable support for Fortran 77 libraries
3476 AC_DEFUN([AC_LIBTOOL_F77],
3477 [AC_REQUIRE([_LT_AC_LANG_F77])
3478 ])# AC_LIBTOOL_F77
3479
3480
3481 # _LT_AC_LANG_F77
3482 # ---------------
3483 AC_DEFUN([_LT_AC_LANG_F77],
3484 [AC_REQUIRE([AC_PROG_F77])
3485 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3486 ])# _LT_AC_LANG_F77
3487
3488
3489 # AC_LIBTOOL_GCJ
3490 # --------------
3491 # enable support for GCJ libraries
3492 AC_DEFUN([AC_LIBTOOL_GCJ],
3493 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3494 ])# AC_LIBTOOL_GCJ
3495
3496
3497 # _LT_AC_LANG_GCJ
3498 # ---------------
3499 AC_DEFUN([_LT_AC_LANG_GCJ],
3500 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3501 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3502 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3503 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3504 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3505 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3506 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3507 ])# _LT_AC_LANG_GCJ
3508
3509
3510 # AC_LIBTOOL_RC
3511 # -------------
3512 # enable support for Windows resource files
3513 AC_DEFUN([AC_LIBTOOL_RC],
3514 [AC_REQUIRE([LT_AC_PROG_RC])
3515 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3516 ])# AC_LIBTOOL_RC
3517
3518
3519 # AC_LIBTOOL_LANG_C_CONFIG
3520 # ------------------------
3521 # Ensure that the configuration vars for the C compiler are
3522 # suitably defined. Those variables are subsequently used by
3523 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3524 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3525 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3526 [lt_save_CC="$CC"
3527 AC_LANG_PUSH(C)
3528
3529 # Source file extension for C test sources.
3530 ac_ext=c
3531
3532 # Object file extension for compiled C test sources.
3533 objext=o
3534 _LT_AC_TAGVAR(objext, $1)=$objext
3535
3536 # Code to be used in simple compile tests
3537 lt_simple_compile_test_code="int some_variable = 0;\n"
3538
3539 # Code to be used in simple link tests
3540 lt_simple_link_test_code='int main(){return(0);}\n'
3541
3542 _LT_AC_SYS_COMPILER
3543
3544 # save warnings/boilerplate of simple test code
3545 _LT_COMPILER_BOILERPLATE
3546 _LT_LINKER_BOILERPLATE
3547
3548 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3549 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3550 AC_LIBTOOL_PROG_CC_C_O($1)
3551 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3552 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3553 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3554 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3555 AC_LIBTOOL_SYS_LIB_STRIP
3556 AC_LIBTOOL_DLOPEN_SELF
3557
3558 # Report which library types will actually be built
3559 AC_MSG_CHECKING([if libtool supports shared libraries])
3560 AC_MSG_RESULT([$can_build_shared])
3561
3562 AC_MSG_CHECKING([whether to build shared libraries])
3563 test "$can_build_shared" = "no" && enable_shared=no
3564
3565 # On AIX, shared libraries and static libraries use the same namespace, and
3566 # are all built from PIC.
3567 case $host_os in
3568 aix3*)
3569 test "$enable_shared" = yes && enable_static=no
3570 if test -n "$RANLIB"; then
3571 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3572 postinstall_cmds='$RANLIB $lib'
3573 fi
3574 ;;
3575
3576 aix4* | aix5*)
3577 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3578 test "$enable_shared" = yes && enable_static=no
3579 fi
3580 ;;
3581 esac
3582 AC_MSG_RESULT([$enable_shared])
3583
3584 AC_MSG_CHECKING([whether to build static libraries])
3585 # Make sure either enable_shared or enable_static is yes.
3586 test "$enable_shared" = yes || enable_static=yes
3587 AC_MSG_RESULT([$enable_static])
3588
3589 AC_LIBTOOL_CONFIG($1)
3590
3591 AC_LANG_POP
3592 CC="$lt_save_CC"
3593 ])# AC_LIBTOOL_LANG_C_CONFIG
3594
3595
3596 # AC_LIBTOOL_LANG_CXX_CONFIG
3597 # --------------------------
3598 # Ensure that the configuration vars for the C compiler are
3599 # suitably defined. Those variables are subsequently used by
3600 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3601 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3602 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3603 [AC_LANG_PUSH(C++)
3604 AC_REQUIRE([AC_PROG_CXX])
3605 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3606
3607 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3608 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3609 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3610 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3611 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3612 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3613 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3614 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3615 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3616 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3617 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3618 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3619 _LT_AC_TAGVAR(module_cmds, $1)=
3620 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3621 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3622 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3623 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3624 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3625 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3626
3627 # Dependencies to place before and after the object being linked:
3628 _LT_AC_TAGVAR(predep_objects, $1)=
3629 _LT_AC_TAGVAR(postdep_objects, $1)=
3630 _LT_AC_TAGVAR(predeps, $1)=
3631 _LT_AC_TAGVAR(postdeps, $1)=
3632 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3633
3634 # Source file extension for C++ test sources.
3635 ac_ext=cpp
3636
3637 # Object file extension for compiled C++ test sources.
3638 objext=o
3639 _LT_AC_TAGVAR(objext, $1)=$objext
3640
3641 # Code to be used in simple compile tests
3642 lt_simple_compile_test_code="int some_variable = 0;\n"
3643
3644 # Code to be used in simple link tests
3645 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
3646
3647 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3648 _LT_AC_SYS_COMPILER
3649
3650 # save warnings/boilerplate of simple test code
3651 _LT_COMPILER_BOILERPLATE
3652 _LT_LINKER_BOILERPLATE
3653
3654 # Allow CC to be a program name with arguments.
3655 lt_save_CC=$CC
3656 lt_save_LD=$LD
3657 lt_save_GCC=$GCC
3658 GCC=$GXX
3659 lt_save_with_gnu_ld=$with_gnu_ld
3660 lt_save_path_LD=$lt_cv_path_LD
3661 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3662 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3663 else
3664 $as_unset lt_cv_prog_gnu_ld
3665 fi
3666 if test -n "${lt_cv_path_LDCXX+set}"; then
3667 lt_cv_path_LD=$lt_cv_path_LDCXX
3668 else
3669 $as_unset lt_cv_path_LD
3670 fi
3671 test -z "${LDCXX+set}" || LD=$LDCXX
3672 CC=${CXX-"c++"}
3673 compiler=$CC
3674 _LT_AC_TAGVAR(compiler, $1)=$CC
3675 _LT_CC_BASENAME([$compiler])
3676
3677 # We don't want -fno-exception wen compiling C++ code, so set the
3678 # no_builtin_flag separately
3679 if test "$GXX" = yes; then
3680 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3681 else
3682 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3683 fi
3684
3685 if test "$GXX" = yes; then
3686 # Set up default GNU C++ configuration
3687
3688 AC_PROG_LD
3689
3690 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3691 # archiving commands below assume that GNU ld is being used.
3692 if test "$with_gnu_ld" = yes; then
3693 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3694 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3695
3696 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3697 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3698
3699 # If archive_cmds runs LD, not CC, wlarc should be empty
3700 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3701 # investigate it a little bit more. (MM)
3702 wlarc='${wl}'
3703
3704 # ancient GNU ld didn't support --whole-archive et. al.
3705 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3706 grep 'no-whole-archive' > /dev/null; then
3707 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3708 else
3709 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3710 fi
3711 else
3712 with_gnu_ld=no
3713 wlarc=
3714
3715 # A generic and very simple default shared library creation
3716 # command for GNU C++ for the case where it uses the native
3717 # linker, instead of GNU ld. If possible, this setting should
3718 # overridden to take advantage of the native linker features on
3719 # the platform it is being used on.
3720 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3721 fi
3722
3723 # Commands to make compiler produce verbose output that lists
3724 # what "hidden" libraries, object files and flags are used when
3725 # linking a shared library.
3726 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3727
3728 else
3729 GXX=no
3730 with_gnu_ld=no
3731 wlarc=
3732 fi
3733
3734 # PORTME: fill in a description of your system's C++ link characteristics
3735 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3736 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3737 case $host_os in
3738 aix3*)
3739 # FIXME: insert proper C++ library support
3740 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3741 ;;
3742 aix4* | aix5*)
3743 if test "$host_cpu" = ia64; then
3744 # On IA64, the linker does run time linking by default, so we don't
3745 # have to do anything special.
3746 aix_use_runtimelinking=no
3747 exp_sym_flag='-Bexport'
3748 no_entry_flag=""
3749 else
3750 aix_use_runtimelinking=no
3751
3752 # Test if we are trying to use run time linking or normal
3753 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3754 # need to do runtime linking.
3755 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3756 for ld_flag in $LDFLAGS; do
3757 case $ld_flag in
3758 *-brtl*)
3759 aix_use_runtimelinking=yes
3760 break
3761 ;;
3762 esac
3763 done
3764 ;;
3765 esac
3766
3767 exp_sym_flag='-bexport'
3768 no_entry_flag='-bnoentry'
3769 fi
3770
3771 # When large executables or shared objects are built, AIX ld can
3772 # have problems creating the table of contents. If linking a library
3773 # or program results in "error TOC overflow" add -mminimal-toc to
3774 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3775 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3776
3777 _LT_AC_TAGVAR(archive_cmds, $1)=''
3778 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3779 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3780 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3781
3782 if test "$GXX" = yes; then
3783 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3784 # We only want to do this on AIX 4.2 and lower, the check
3785 # below for broken collect2 doesn't work under 4.3+
3786 collect2name=`${CC} -print-prog-name=collect2`
3787 if test -f "$collect2name" && \
3788 strings "$collect2name" | grep resolve_lib_name >/dev/null
3789 then
3790 # We have reworked collect2
3791 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3792 else
3793 # We have old collect2
3794 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3795 # It fails to find uninstalled libraries when the uninstalled
3796 # path is not listed in the libpath. Setting hardcode_minus_L
3797 # to unsupported forces relinking
3798 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3799 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3800 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3801 fi
3802 ;;
3803 esac
3804 shared_flag='-shared'
3805 if test "$aix_use_runtimelinking" = yes; then
3806 shared_flag="$shared_flag "'${wl}-G'
3807 fi
3808 else
3809 # not using gcc
3810 if test "$host_cpu" = ia64; then
3811 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3812 # chokes on -Wl,-G. The following line is correct:
3813 shared_flag='-G'
3814 else
3815 if test "$aix_use_runtimelinking" = yes; then
3816 shared_flag='${wl}-G'
3817 else
3818 shared_flag='${wl}-bM:SRE'
3819 fi
3820 fi
3821 fi
3822
3823 # It seems that -bexpall does not export symbols beginning with
3824 # underscore (_), so it is better to generate a list of symbols to export.
3825 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3826 if test "$aix_use_runtimelinking" = yes; then
3827 # Warning - without using the other runtime loading flags (-brtl),
3828 # -berok will link without error, but may produce a broken library.
3829 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3830 # Determine the default libpath from the value encoded in an empty executable.
3831 _LT_AC_SYS_LIBPATH_AIX
3832 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3833
3834 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3835 else
3836 if test "$host_cpu" = ia64; then
3837 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3838 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3839 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3840 else
3841 # Determine the default libpath from the value encoded in an empty executable.
3842 _LT_AC_SYS_LIBPATH_AIX
3843 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3844 # Warning - without using the other run time loading flags,
3845 # -berok will link without error, but may produce a broken library.
3846 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3847 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3848 # Exported symbols can be pulled into shared objects from archives
3849 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3850 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3851 # This is similar to how AIX traditionally builds its shared libraries.
3852 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3853 fi
3854 fi
3855 ;;
3856
3857 beos*)
3858 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3859 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3860 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3861 # support --undefined. This deserves some investigation. FIXME
3862 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3863 else
3864 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3865 fi
3866 ;;
3867
3868 chorus*)
3869 case $cc_basename in
3870 *)
3871 # FIXME: insert proper C++ library support
3872 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3873 ;;
3874 esac
3875 ;;
3876
3877 cygwin* | mingw* | pw32*)
3878 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3879 # as there is no search path for DLLs.
3880 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3881 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3882 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3883 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3884
3885 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3886 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3887 # If the export-symbols file already is a .def file (1st line
3888 # is EXPORTS), use it as is; otherwise, prepend...
3889 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3890 cp $export_symbols $output_objdir/$soname.def;
3891 else
3892 echo EXPORTS > $output_objdir/$soname.def;
3893 cat $export_symbols >> $output_objdir/$soname.def;
3894 fi~
3895 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3896 else
3897 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3898 fi
3899 ;;
3900 darwin* | rhapsody*)
3901 case $host_os in
3902 rhapsody* | darwin1.[[012]])
3903 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3904 ;;
3905 *) # Darwin 1.3 on
3906 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3907 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3908 else
3909 case ${MACOSX_DEPLOYMENT_TARGET} in
3910 10.[[012]])
3911 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3912 ;;
3913 10.*)
3914 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3915 ;;
3916 esac
3917 fi
3918 ;;
3919 esac
3920 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3921 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3922 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3923 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3924 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3925 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3926
3927 if test "$GXX" = yes ; then
3928 lt_int_apple_cc_single_mod=no
3929 output_verbose_link_cmd='echo'
3930 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3931 lt_int_apple_cc_single_mod=yes
3932 fi
3933 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3934 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3935 else
3936 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3937 fi
3938 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3939 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3940 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3941 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3942 else
3943 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3944 fi
3945 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3946 else
3947 case $cc_basename in
3948 xlc*)
3949 output_verbose_link_cmd='echo'
3950 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3951 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3952 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3953 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3954 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3955 ;;
3956 *)
3957 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3958 ;;
3959 esac
3960 fi
3961 ;;
3962
3963 dgux*)
3964 case $cc_basename in
3965 ec++*)
3966 # FIXME: insert proper C++ library support
3967 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3968 ;;
3969 ghcx*)
3970 # Green Hills C++ Compiler
3971 # FIXME: insert proper C++ library support
3972 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3973 ;;
3974 *)
3975 # FIXME: insert proper C++ library support
3976 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3977 ;;
3978 esac
3979 ;;
3980 freebsd[[12]]*)
3981 # C++ shared libraries reported to be fairly broken before switch to ELF
3982 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3983 ;;
3984 freebsd-elf*)
3985 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3986 ;;
3987 freebsd* | dragonfly*)
3988 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3989 # conventions
3990 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3991 ;;
3992 gnu*)
3993 ;;
3994 hpux9*)
3995 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3996 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3997 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3998 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3999 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4000 # but as the default
4001 # location of the library.
4002
4003 case $cc_basename in
4004 CC*)
4005 # FIXME: insert proper C++ library support
4006 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4007 ;;
4008 aCC*)
4009 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4010 # Commands to make compiler produce verbose output that lists
4011 # what "hidden" libraries, object files and flags are used when
4012 # linking a shared library.
4013 #
4014 # There doesn't appear to be a way to prevent this compiler from
4015 # explicitly linking system object files so we need to strip them
4016 # from the output so that they don't get included in the library
4017 # dependencies.
4018 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4019 ;;
4020 *)
4021 if test "$GXX" = yes; then
4022 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4023 else
4024 # FIXME: insert proper C++ library support
4025 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4026 fi
4027 ;;
4028 esac
4029 ;;
4030 hpux10*|hpux11*)
4031 if test $with_gnu_ld = no; then
4032 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4033 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4034
4035 case $host_cpu in
4036 hppa*64*|ia64*)
4037 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4038 ;;
4039 *)
4040 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4041 ;;
4042 esac
4043 fi
4044 case $host_cpu in
4045 hppa*64*|ia64*)
4046 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4047 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4048 ;;
4049 *)
4050 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4051 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4052 # but as the default
4053 # location of the library.
4054 ;;
4055 esac
4056
4057 case $cc_basename in
4058 CC*)
4059 # FIXME: insert proper C++ library support
4060 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4061 ;;
4062 aCC*)
4063 case $host_cpu in
4064 hppa*64*)
4065 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4066 ;;
4067 ia64*)
4068 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4069 ;;
4070 *)
4071 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4072 ;;
4073 esac
4074 # Commands to make compiler produce verbose output that lists
4075 # what "hidden" libraries, object files and flags are used when
4076 # linking a shared library.
4077 #
4078 # There doesn't appear to be a way to prevent this compiler from
4079 # explicitly linking system object files so we need to strip them
4080 # from the output so that they don't get included in the library
4081 # dependencies.
4082 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4083 ;;
4084 *)
4085 if test "$GXX" = yes; then
4086 if test $with_gnu_ld = no; then
4087 case $host_cpu in
4088 hppa*64*)
4089 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4090 ;;
4091 ia64*)
4092 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4093 ;;
4094 *)
4095 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4096 ;;
4097 esac
4098 fi
4099 else
4100 # FIXME: insert proper C++ library support
4101 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4102 fi
4103 ;;
4104 esac
4105 ;;
4106 interix3*)
4107 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4108 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4109 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4110 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4111 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4112 # Instead, shared libraries are loaded at an image base (0x10000000 by
4113 # default) and relocated if they conflict, which is a slow very memory
4114 # consuming and fragmenting process. To avoid this, we pick a random,
4115 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4116 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4117 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4118 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4119 ;;
4120 irix5* | irix6*)
4121 case $cc_basename in
4122 CC*)
4123 # SGI C++
4124 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4125
4126 # Archives containing C++ object files must be created using
4127 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4128 # necessary to make sure instantiated templates are included
4129 # in the archive.
4130 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4131 ;;
4132 *)
4133 if test "$GXX" = yes; then
4134 if test "$with_gnu_ld" = no; then
4135 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4136 else
4137 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4138 fi
4139 fi
4140 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4141 ;;
4142 esac
4143 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4144 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4145 ;;
4146 linux* | k*bsd*-gnu)
4147 case $cc_basename in
4148 KCC*)
4149 # Kuck and Associates, Inc. (KAI) C++ Compiler
4150
4151 # KCC will only create a shared library if the output file
4152 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4153 # to its proper name (with version) after linking.
4154 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4155 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4156 # Commands to make compiler produce verbose output that lists
4157 # what "hidden" libraries, object files and flags are used when
4158 # linking a shared library.
4159 #
4160 # There doesn't appear to be a way to prevent this compiler from
4161 # explicitly linking system object files so we need to strip them
4162 # from the output so that they don't get included in the library
4163 # dependencies.
4164 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4165
4166 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4167 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4168
4169 # Archives containing C++ object files must be created using
4170 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4171 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4172 ;;
4173 icpc*)
4174 # Intel C++
4175 with_gnu_ld=yes
4176 # version 8.0 and above of icpc choke on multiply defined symbols
4177 # if we add $predep_objects and $postdep_objects, however 7.1 and
4178 # earlier do not add the objects themselves.
4179 case `$CC -V 2>&1` in
4180 *"Version 7."*)
4181 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4182 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4183 ;;
4184 *) # Version 8.0 or newer
4185 tmp_idyn=
4186 case $host_cpu in
4187 ia64*) tmp_idyn=' -i_dynamic';;
4188 esac
4189 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4190 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4191 ;;
4192 esac
4193 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4194 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4195 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4196 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4197 ;;
4198 pgCC*)
4199 # Portland Group C++ compiler
4200 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4201 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4202
4203 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4204 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4205 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4206 ;;
4207 cxx*)
4208 # Compaq C++
4209 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4210 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4211
4212 runpath_var=LD_RUN_PATH
4213 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4214 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4215
4216 # Commands to make compiler produce verbose output that lists
4217 # what "hidden" libraries, object files and flags are used when
4218 # linking a shared library.
4219 #
4220 # There doesn't appear to be a way to prevent this compiler from
4221 # explicitly linking system object files so we need to strip them
4222 # from the output so that they don't get included in the library
4223 # dependencies.
4224 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4225 ;;
4226 esac
4227 ;;
4228 lynxos*)
4229 # FIXME: insert proper C++ library support
4230 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4231 ;;
4232 m88k*)
4233 # FIXME: insert proper C++ library support
4234 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4235 ;;
4236 mvs*)
4237 case $cc_basename in
4238 cxx*)
4239 # FIXME: insert proper C++ library support
4240 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4241 ;;
4242 *)
4243 # FIXME: insert proper C++ library support
4244 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4245 ;;
4246 esac
4247 ;;
4248 netbsd* | netbsdelf*-gnu)
4249 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4250 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4251 wlarc=
4252 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4253 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4254 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4255 fi
4256 # Workaround some broken pre-1.5 toolchains
4257 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4258 ;;
4259 openbsd2*)
4260 # C++ shared libraries are fairly broken
4261 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4262 ;;
4263 openbsd*)
4264 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4265 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4266 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4267 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4268 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4269 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4270 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4271 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4272 fi
4273 output_verbose_link_cmd='echo'
4274 ;;
4275 osf3*)
4276 case $cc_basename in
4277 KCC*)
4278 # Kuck and Associates, Inc. (KAI) C++ Compiler
4279
4280 # KCC will only create a shared library if the output file
4281 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4282 # to its proper name (with version) after linking.
4283 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4284
4285 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4286 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4287
4288 # Archives containing C++ object files must be created using
4289 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4290 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4291
4292 ;;
4293 RCC*)
4294 # Rational C++ 2.4.1
4295 # FIXME: insert proper C++ library support
4296 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4297 ;;
4298 cxx*)
4299 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4300 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4301
4302 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4303 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4304
4305 # Commands to make compiler produce verbose output that lists
4306 # what "hidden" libraries, object files and flags are used when
4307 # linking a shared library.
4308 #
4309 # There doesn't appear to be a way to prevent this compiler from
4310 # explicitly linking system object files so we need to strip them
4311 # from the output so that they don't get included in the library
4312 # dependencies.
4313 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4314 ;;
4315 *)
4316 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4317 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4318 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4319
4320 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4321 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4322
4323 # Commands to make compiler produce verbose output that lists
4324 # what "hidden" libraries, object files and flags are used when
4325 # linking a shared library.
4326 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4327
4328 else
4329 # FIXME: insert proper C++ library support
4330 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4331 fi
4332 ;;
4333 esac
4334 ;;
4335 osf4* | osf5*)
4336 case $cc_basename in
4337 KCC*)
4338 # Kuck and Associates, Inc. (KAI) C++ Compiler
4339
4340 # KCC will only create a shared library if the output file
4341 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4342 # to its proper name (with version) after linking.
4343 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4344
4345 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4346 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4347
4348 # Archives containing C++ object files must be created using
4349 # the KAI C++ compiler.
4350 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4351 ;;
4352 RCC*)
4353 # Rational C++ 2.4.1
4354 # FIXME: insert proper C++ library support
4355 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4356 ;;
4357 cxx*)
4358 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4359 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4360 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4361 echo "-hidden">> $lib.exp~
4362 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4363 $rm $lib.exp'
4364
4365 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4366 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4367
4368 # Commands to make compiler produce verbose output that lists
4369 # what "hidden" libraries, object files and flags are used when
4370 # linking a shared library.
4371 #
4372 # There doesn't appear to be a way to prevent this compiler from
4373 # explicitly linking system object files so we need to strip them
4374 # from the output so that they don't get included in the library
4375 # dependencies.
4376 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4377 ;;
4378 *)
4379 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4380 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4381 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4382
4383 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4384 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4385
4386 # Commands to make compiler produce verbose output that lists
4387 # what "hidden" libraries, object files and flags are used when
4388 # linking a shared library.
4389 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4390
4391 else
4392 # FIXME: insert proper C++ library support
4393 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4394 fi
4395 ;;
4396 esac
4397 ;;
4398 psos*)
4399 # FIXME: insert proper C++ library support
4400 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4401 ;;
4402 sunos4*)
4403 case $cc_basename in
4404 CC*)
4405 # Sun C++ 4.x
4406 # FIXME: insert proper C++ library support
4407 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4408 ;;
4409 lcc*)
4410 # Lucid
4411 # FIXME: insert proper C++ library support
4412 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4413 ;;
4414 *)
4415 # FIXME: insert proper C++ library support
4416 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4417 ;;
4418 esac
4419 ;;
4420 solaris*)
4421 case $cc_basename in
4422 CC*)
4423 # Sun C++ 4.2, 5.x and Centerline C++
4424 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4425 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4426 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4427 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4428 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4429
4430 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4431 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4432 case $host_os in
4433 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4434 *)
4435 # The C++ compiler is used as linker so we must use $wl
4436 # flag to pass the commands to the underlying system
4437 # linker. We must also pass each convience library through
4438 # to the system linker between allextract/defaultextract.
4439 # The C++ compiler will combine linker options so we
4440 # cannot just pass the convience library names through
4441 # without $wl.
4442 # Supported since Solaris 2.6 (maybe 2.5.1?)
4443 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4444 ;;
4445 esac
4446 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4447
4448 output_verbose_link_cmd='echo'
4449
4450 # Archives containing C++ object files must be created using
4451 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4452 # necessary to make sure instantiated templates are included
4453 # in the archive.
4454 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4455 ;;
4456 gcx*)
4457 # Green Hills C++ Compiler
4458 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4459
4460 # The C++ compiler must be used to create the archive.
4461 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4462 ;;
4463 *)
4464 # GNU C++ compiler with Solaris linker
4465 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4466 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4467 if $CC --version | grep -v '^2\.7' > /dev/null; then
4468 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4469 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4470 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4471
4472 # Commands to make compiler produce verbose output that lists
4473 # what "hidden" libraries, object files and flags are used when
4474 # linking a shared library.
4475 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4476 else
4477 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4478 # platform.
4479 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4480 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4481 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4482
4483 # Commands to make compiler produce verbose output that lists
4484 # what "hidden" libraries, object files and flags are used when
4485 # linking a shared library.
4486 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4487 fi
4488
4489 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4490 fi
4491 ;;
4492 esac
4493 ;;
4494 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4495 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4496 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4497 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4498 runpath_var='LD_RUN_PATH'
4499
4500 case $cc_basename in
4501 CC*)
4502 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4503 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4504 ;;
4505 *)
4506 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4507 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4508 ;;
4509 esac
4510 ;;
4511 sysv5* | sco3.2v5* | sco5v6*)
4512 # Note: We can NOT use -z defs as we might desire, because we do not
4513 # link with -lc, and that would cause any symbols used from libc to
4514 # always be unresolved, which means just about no library would
4515 # ever link correctly. If we're not using GNU ld we use -z text
4516 # though, which does catch some bad symbols but isn't as heavy-handed
4517 # as -z defs.
4518 # For security reasons, it is highly recommended that you always
4519 # use absolute paths for naming shared libraries, and exclude the
4520 # DT_RUNPATH tag from executables and libraries. But doing so
4521 # requires that you compile everything twice, which is a pain.
4522 # So that behaviour is only enabled if SCOABSPATH is set to a
4523 # non-empty value in the environment. Most likely only useful for
4524 # creating official distributions of packages.
4525 # This is a hack until libtool officially supports absolute path
4526 # names for shared libraries.
4527 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4528 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4529 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4530 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4531 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4532 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4533 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4534 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4535 runpath_var='LD_RUN_PATH'
4536
4537 case $cc_basename in
4538 CC*)
4539 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4540 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4541 ;;
4542 *)
4543 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4544 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4545 ;;
4546 esac
4547 ;;
4548 tandem*)
4549 case $cc_basename in
4550 NCC*)
4551 # NonStop-UX NCC 3.20
4552 # FIXME: insert proper C++ library support
4553 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4554 ;;
4555 *)
4556 # FIXME: insert proper C++ library support
4557 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4558 ;;
4559 esac
4560 ;;
4561 vxworks*)
4562 # FIXME: insert proper C++ library support
4563 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4564 ;;
4565 *)
4566 # FIXME: insert proper C++ library support
4567 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4568 ;;
4569 esac
4570 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4571 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4572
4573 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4574 _LT_AC_TAGVAR(LD, $1)="$LD"
4575
4576 AC_LIBTOOL_POSTDEP_PREDEP($1)
4577 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4578 AC_LIBTOOL_PROG_CC_C_O($1)
4579 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4580 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4581 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4582 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4583
4584 AC_LIBTOOL_CONFIG($1)
4585
4586 AC_LANG_POP
4587 CC=$lt_save_CC
4588 LDCXX=$LD
4589 LD=$lt_save_LD
4590 GCC=$lt_save_GCC
4591 with_gnu_ldcxx=$with_gnu_ld
4592 with_gnu_ld=$lt_save_with_gnu_ld
4593 lt_cv_path_LDCXX=$lt_cv_path_LD
4594 lt_cv_path_LD=$lt_save_path_LD
4595 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4596 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4597 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4598
4599 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4600 # ------------------------------------
4601 # Figure out "hidden" library dependencies from verbose
4602 # compiler output when linking a shared library.
4603 # Parse the compiler output and extract the necessary
4604 # objects, libraries and library flags.
4605 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4606 dnl we can't use the lt_simple_compile_test_code here,
4607 dnl because it contains code intended for an executable,
4608 dnl not a library. It's possible we should let each
4609 dnl tag define a new lt_????_link_test_code variable,
4610 dnl but it's only used here...
4611 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4612 int a;
4613 void foo (void) { a = 0; }
4614 EOF
4615 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4616 class Foo
4617 {
4618 public:
4619 Foo (void) { a = 0; }
4620 private:
4621 int a;
4622 };
4623 EOF
4624 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4625 subroutine foo
4626 implicit none
4627 integer*4 a
4628 a=0
4629 return
4630 end
4631 EOF
4632 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4633 public class foo {
4634 private int a;
4635 public void bar (void) {
4636 a = 0;
4637 }
4638 };
4639 EOF
4640 ])
4641 dnl Parse the compiler output and extract the necessary
4642 dnl objects, libraries and library flags.
4643 if AC_TRY_EVAL(ac_compile); then
4644 # Parse the compiler output and extract the necessary
4645 # objects, libraries and library flags.
4646
4647 # Sentinel used to keep track of whether or not we are before
4648 # the conftest object file.
4649 pre_test_object_deps_done=no
4650
4651 # The `*' in the case matches for architectures that use `case' in
4652 # $output_verbose_cmd can trigger glob expansion during the loop
4653 # eval without this substitution.
4654 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4655
4656 for p in `eval $output_verbose_link_cmd`; do
4657 case $p in
4658
4659 -L* | -R* | -l*)
4660 # Some compilers place space between "-{L,R}" and the path.
4661 # Remove the space.
4662 if test $p = "-L" \
4663 || test $p = "-R"; then
4664 prev=$p
4665 continue
4666 else
4667 prev=
4668 fi
4669
4670 if test "$pre_test_object_deps_done" = no; then
4671 case $p in
4672 -L* | -R*)
4673 # Internal compiler library paths should come after those
4674 # provided the user. The postdeps already come after the
4675 # user supplied libs so there is no need to process them.
4676 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4677 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4678 else
4679 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4680 fi
4681 ;;
4682 # The "-l" case would never come before the object being
4683 # linked, so don't bother handling this case.
4684 esac
4685 else
4686 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4687 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4688 else
4689 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4690 fi
4691 fi
4692 ;;
4693
4694 *.$objext)
4695 # This assumes that the test object file only shows up
4696 # once in the compiler output.
4697 if test "$p" = "conftest.$objext"; then
4698 pre_test_object_deps_done=yes
4699 continue
4700 fi
4701
4702 if test "$pre_test_object_deps_done" = no; then
4703 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4704 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4705 else
4706 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4707 fi
4708 else
4709 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4710 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4711 else
4712 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4713 fi
4714 fi
4715 ;;
4716
4717 *) ;; # Ignore the rest.
4718
4719 esac
4720 done
4721
4722 # Clean up.
4723 rm -f a.out a.exe
4724 else
4725 echo "libtool.m4: error: problem compiling $1 test program"
4726 fi
4727
4728 $rm -f confest.$objext
4729
4730 # PORTME: override above test on systems where it is broken
4731 ifelse([$1],[CXX],
4732 [case $host_os in
4733 interix3*)
4734 # Interix 3.5 installs completely hosed .la files for C++, so rather than
4735 # hack all around it, let's just trust "g++" to DTRT.
4736 _LT_AC_TAGVAR(predep_objects,$1)=
4737 _LT_AC_TAGVAR(postdep_objects,$1)=
4738 _LT_AC_TAGVAR(postdeps,$1)=
4739 ;;
4740
4741 solaris*)
4742 case $cc_basename in
4743 CC*)
4744 # Adding this requires a known-good setup of shared libraries for
4745 # Sun compiler versions before 5.6, else PIC objects from an old
4746 # archive will be linked into the output, leading to subtle bugs.
4747 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4748 ;;
4749 esac
4750 ;;
4751 esac
4752 ])
4753
4754 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4755 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4756 esac
4757 ])# AC_LIBTOOL_POSTDEP_PREDEP
4758
4759 # AC_LIBTOOL_LANG_F77_CONFIG
4760 # --------------------------
4761 # Ensure that the configuration vars for the C compiler are
4762 # suitably defined. Those variables are subsequently used by
4763 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4764 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4765 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4766 [AC_REQUIRE([AC_PROG_F77])
4767 AC_LANG_PUSH(Fortran 77)
4768
4769 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4770 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4771 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4772 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4773 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4774 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4775 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4776 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4777 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4778 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4779 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4780 _LT_AC_TAGVAR(module_cmds, $1)=
4781 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4782 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4783 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4784 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4785 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4786 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4787
4788 # Source file extension for f77 test sources.
4789 ac_ext=f
4790
4791 # Object file extension for compiled f77 test sources.
4792 objext=o
4793 _LT_AC_TAGVAR(objext, $1)=$objext
4794
4795 # Code to be used in simple compile tests
4796 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4797
4798 # Code to be used in simple link tests
4799 lt_simple_link_test_code=" program t\n end\n"
4800
4801 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4802 _LT_AC_SYS_COMPILER
4803
4804 # save warnings/boilerplate of simple test code
4805 _LT_COMPILER_BOILERPLATE
4806 _LT_LINKER_BOILERPLATE
4807
4808 # Allow CC to be a program name with arguments.
4809 lt_save_CC="$CC"
4810 CC=${F77-"f77"}
4811 compiler=$CC
4812 _LT_AC_TAGVAR(compiler, $1)=$CC
4813 _LT_CC_BASENAME([$compiler])
4814
4815 AC_MSG_CHECKING([if libtool supports shared libraries])
4816 AC_MSG_RESULT([$can_build_shared])
4817
4818 AC_MSG_CHECKING([whether to build shared libraries])
4819 test "$can_build_shared" = "no" && enable_shared=no
4820
4821 # On AIX, shared libraries and static libraries use the same namespace, and
4822 # are all built from PIC.
4823 case $host_os in
4824 aix3*)
4825 test "$enable_shared" = yes && enable_static=no
4826 if test -n "$RANLIB"; then
4827 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4828 postinstall_cmds='$RANLIB $lib'
4829 fi
4830 ;;
4831 aix4* | aix5*)
4832 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4833 test "$enable_shared" = yes && enable_static=no
4834 fi
4835 ;;
4836 esac
4837 AC_MSG_RESULT([$enable_shared])
4838
4839 AC_MSG_CHECKING([whether to build static libraries])
4840 # Make sure either enable_shared or enable_static is yes.
4841 test "$enable_shared" = yes || enable_static=yes
4842 AC_MSG_RESULT([$enable_static])
4843
4844 _LT_AC_TAGVAR(GCC, $1)="$G77"
4845 _LT_AC_TAGVAR(LD, $1)="$LD"
4846
4847 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4848 AC_LIBTOOL_PROG_CC_C_O($1)
4849 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4850 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4851 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4852 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4853
4854 AC_LIBTOOL_CONFIG($1)
4855
4856 AC_LANG_POP
4857 CC="$lt_save_CC"
4858 ])# AC_LIBTOOL_LANG_F77_CONFIG
4859
4860
4861 # AC_LIBTOOL_LANG_GCJ_CONFIG
4862 # --------------------------
4863 # Ensure that the configuration vars for the C compiler are
4864 # suitably defined. Those variables are subsequently used by
4865 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4866 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4867 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4868 [AC_LANG_SAVE
4869
4870 # Source file extension for Java test sources.
4871 ac_ext=java
4872
4873 # Object file extension for compiled Java test sources.
4874 objext=o
4875 _LT_AC_TAGVAR(objext, $1)=$objext
4876
4877 # Code to be used in simple compile tests
4878 lt_simple_compile_test_code="class foo {}\n"
4879
4880 # Code to be used in simple link tests
4881 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4882
4883 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4884 _LT_AC_SYS_COMPILER
4885
4886 # save warnings/boilerplate of simple test code
4887 _LT_COMPILER_BOILERPLATE
4888 _LT_LINKER_BOILERPLATE
4889
4890 # Allow CC to be a program name with arguments.
4891 lt_save_CC="$CC"
4892 CC=${GCJ-"gcj"}
4893 compiler=$CC
4894 _LT_AC_TAGVAR(compiler, $1)=$CC
4895 _LT_CC_BASENAME([$compiler])
4896
4897 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4898 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4899
4900 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4901
4902 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4903 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4904 AC_LIBTOOL_PROG_CC_C_O($1)
4905 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4906 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4907 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4908 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4909
4910 AC_LIBTOOL_CONFIG($1)
4911
4912 AC_LANG_RESTORE
4913 CC="$lt_save_CC"
4914 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4915
4916
4917 # AC_LIBTOOL_LANG_RC_CONFIG
4918 # -------------------------
4919 # Ensure that the configuration vars for the Windows resource compiler are
4920 # suitably defined. Those variables are subsequently used by
4921 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4922 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4923 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4924 [AC_LANG_SAVE
4925
4926 # Source file extension for RC test sources.
4927 ac_ext=rc
4928
4929 # Object file extension for compiled RC test sources.
4930 objext=o
4931 _LT_AC_TAGVAR(objext, $1)=$objext
4932
4933 # Code to be used in simple compile tests
4934 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4935
4936 # Code to be used in simple link tests
4937 lt_simple_link_test_code="$lt_simple_compile_test_code"
4938
4939 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4940 _LT_AC_SYS_COMPILER
4941
4942 # save warnings/boilerplate of simple test code
4943 _LT_COMPILER_BOILERPLATE
4944 _LT_LINKER_BOILERPLATE
4945
4946 # Allow CC to be a program name with arguments.
4947 lt_save_CC="$CC"
4948 CC=${RC-"windres"}
4949 compiler=$CC
4950 _LT_AC_TAGVAR(compiler, $1)=$CC
4951 _LT_CC_BASENAME([$compiler])
4952 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4953
4954 AC_LIBTOOL_CONFIG($1)
4955
4956 AC_LANG_RESTORE
4957 CC="$lt_save_CC"
4958 ])# AC_LIBTOOL_LANG_RC_CONFIG
4959
4960
4961 # AC_LIBTOOL_CONFIG([TAGNAME])
4962 # ----------------------------
4963 # If TAGNAME is not passed, then create an initial libtool script
4964 # with a default configuration from the untagged config vars. Otherwise
4965 # add code to config.status for appending the configuration named by
4966 # TAGNAME from the matching tagged config vars.
4967 AC_DEFUN([AC_LIBTOOL_CONFIG],
4968 [# The else clause should only fire when bootstrapping the
4969 # libtool distribution, otherwise you forgot to ship ltmain.sh
4970 # with your package, and you will get complaints that there are
4971 # no rules to generate ltmain.sh.
4972 if test -f "$ltmain"; then
4973 # See if we are running on zsh, and set the options which allow our commands through
4974 # without removal of \ escapes.
4975 if test -n "${ZSH_VERSION+set}" ; then
4976 setopt NO_GLOB_SUBST
4977 fi
4978 # Now quote all the things that may contain metacharacters while being
4979 # careful not to overquote the AC_SUBSTed values. We take copies of the
4980 # variables and quote the copies for generation of the libtool script.
4981 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4982 SED SHELL STRIP \
4983 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4984 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4985 deplibs_check_method reload_flag reload_cmds need_locks \
4986 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4987 lt_cv_sys_global_symbol_to_c_name_address \
4988 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4989 old_postinstall_cmds old_postuninstall_cmds \
4990 _LT_AC_TAGVAR(compiler, $1) \
4991 _LT_AC_TAGVAR(CC, $1) \
4992 _LT_AC_TAGVAR(LD, $1) \
4993 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4994 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4995 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4996 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4997 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4998 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4999 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5000 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5001 _LT_AC_TAGVAR(old_archive_cmds, $1) \
5002 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5003 _LT_AC_TAGVAR(predep_objects, $1) \
5004 _LT_AC_TAGVAR(postdep_objects, $1) \
5005 _LT_AC_TAGVAR(predeps, $1) \
5006 _LT_AC_TAGVAR(postdeps, $1) \
5007 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5008 _LT_AC_TAGVAR(archive_cmds, $1) \
5009 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5010 _LT_AC_TAGVAR(postinstall_cmds, $1) \
5011 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5012 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5013 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5014 _LT_AC_TAGVAR(no_undefined_flag, $1) \
5015 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5016 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5017 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5018 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5019 _LT_AC_TAGVAR(hardcode_automatic, $1) \
5020 _LT_AC_TAGVAR(module_cmds, $1) \
5021 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5022 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5023 _LT_AC_TAGVAR(exclude_expsyms, $1) \
5024 _LT_AC_TAGVAR(include_expsyms, $1); do
5025
5026 case $var in
5027 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5028 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5029 _LT_AC_TAGVAR(archive_cmds, $1) | \
5030 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5031 _LT_AC_TAGVAR(module_cmds, $1) | \
5032 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5033 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5034 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5035 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5036 postinstall_cmds | postuninstall_cmds | \
5037 old_postinstall_cmds | old_postuninstall_cmds | \
5038 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5039 # Double-quote double-evaled strings.
5040 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5041 ;;
5042 *)
5043 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5044 ;;
5045 esac
5046 done
5047
5048 case $lt_echo in
5049 *'\[$]0 --fallback-echo"')
5050 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5051 ;;
5052 esac
5053
5054 ifelse([$1], [],
5055 [cfgfile="${ofile}T"
5056 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5057 $rm -f "$cfgfile"
5058 AC_MSG_NOTICE([creating $ofile])],
5059 [cfgfile="$ofile"])
5060
5061 cat <<__EOF__ >> "$cfgfile"
5062 ifelse([$1], [],
5063 [#! $SHELL
5064
5065 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5066 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5067 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5068 #
5069 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5070 # Free Software Foundation, Inc.
5071 #
5072 # This file is part of GNU Libtool:
5073 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5074 #
5075 # This program is free software; you can redistribute it and/or modify
5076 # it under the terms of the GNU General Public License as published by
5077 # the Free Software Foundation; either version 2 of the License, or
5078 # (at your option) any later version.
5079 #
5080 # This program is distributed in the hope that it will be useful, but
5081 # WITHOUT ANY WARRANTY; without even the implied warranty of
5082 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5083 # General Public License for more details.
5084 #
5085 # You should have received a copy of the GNU General Public License
5086 # along with this program; if not, write to the Free Software
5087 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5088 #
5089 # As a special exception to the GNU General Public License, if you
5090 # distribute this file as part of a program that contains a
5091 # configuration script generated by Autoconf, you may include it under
5092 # the same distribution terms that you use for the rest of that program.
5093
5094 # A sed program that does not truncate output.
5095 SED=$lt_SED
5096
5097 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5098 Xsed="$SED -e 1s/^X//"
5099
5100 # The HP-UX ksh and POSIX shell print the target directory to stdout
5101 # if CDPATH is set.
5102 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5103
5104 # The names of the tagged configurations supported by this script.
5105 available_tags=
5106
5107 # ### BEGIN LIBTOOL CONFIG],
5108 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5109
5110 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5111
5112 # Shell to use when invoking shell scripts.
5113 SHELL=$lt_SHELL
5114
5115 # Whether or not to build shared libraries.
5116 build_libtool_libs=$enable_shared
5117
5118 # Whether or not to build static libraries.
5119 build_old_libs=$enable_static
5120
5121 # Whether or not to add -lc for building shared libraries.
5122 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5123
5124 # Whether or not to disallow shared libs when runtime libs are static
5125 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5126
5127 # Whether or not to optimize for fast installation.
5128 fast_install=$enable_fast_install
5129
5130 # The host system.
5131 host_alias=$host_alias
5132 host=$host
5133 host_os=$host_os
5134
5135 # The build system.
5136 build_alias=$build_alias
5137 build=$build
5138 build_os=$build_os
5139
5140 # An echo program that does not interpret backslashes.
5141 echo=$lt_echo
5142
5143 # The archiver.
5144 AR=$lt_AR
5145 AR_FLAGS=$lt_AR_FLAGS
5146
5147 # A C compiler.
5148 LTCC=$lt_LTCC
5149
5150 # LTCC compiler flags.
5151 LTCFLAGS=$lt_LTCFLAGS
5152
5153 # A language-specific compiler.
5154 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5155
5156 # Is the compiler the GNU C compiler?
5157 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5158
5159 # An ERE matcher.
5160 EGREP=$lt_EGREP
5161
5162 # The linker used to build libraries.
5163 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5164
5165 # Whether we need hard or soft links.
5166 LN_S=$lt_LN_S
5167
5168 # A BSD-compatible nm program.
5169 NM=$lt_NM
5170
5171 # A symbol stripping program
5172 STRIP=$lt_STRIP
5173
5174 # Used to examine libraries when file_magic_cmd begins "file"
5175 MAGIC_CMD=$MAGIC_CMD
5176
5177 # Used on cygwin: DLL creation program.
5178 DLLTOOL="$DLLTOOL"
5179
5180 # Used on cygwin: object dumper.
5181 OBJDUMP="$OBJDUMP"
5182
5183 # Used on cygwin: assembler.
5184 AS="$AS"
5185
5186 # The name of the directory that contains temporary libtool files.
5187 objdir=$objdir
5188
5189 # How to create reloadable object files.
5190 reload_flag=$lt_reload_flag
5191 reload_cmds=$lt_reload_cmds
5192
5193 # How to pass a linker flag through the compiler.
5194 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5195
5196 # Object file suffix (normally "o").
5197 objext="$ac_objext"
5198
5199 # Old archive suffix (normally "a").
5200 libext="$libext"
5201
5202 # Shared library suffix (normally ".so").
5203 shrext_cmds='$shrext_cmds'
5204
5205 # Executable file suffix (normally "").
5206 exeext="$exeext"
5207
5208 # Additional compiler flags for building library objects.
5209 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5210 pic_mode=$pic_mode
5211
5212 # What is the maximum length of a command?
5213 max_cmd_len=$lt_cv_sys_max_cmd_len
5214
5215 # Does compiler simultaneously support -c and -o options?
5216 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5217
5218 # Must we lock files when doing compilation?
5219 need_locks=$lt_need_locks
5220
5221 # Do we need the lib prefix for modules?
5222 need_lib_prefix=$need_lib_prefix
5223
5224 # Do we need a version for libraries?
5225 need_version=$need_version
5226
5227 # Whether dlopen is supported.
5228 dlopen_support=$enable_dlopen
5229
5230 # Whether dlopen of programs is supported.
5231 dlopen_self=$enable_dlopen_self
5232
5233 # Whether dlopen of statically linked programs is supported.
5234 dlopen_self_static=$enable_dlopen_self_static
5235
5236 # Compiler flag to prevent dynamic linking.
5237 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5238
5239 # Compiler flag to turn off builtin functions.
5240 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5241
5242 # Compiler flag to allow reflexive dlopens.
5243 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5244
5245 # Compiler flag to generate shared objects directly from archives.
5246 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5247
5248 # Compiler flag to generate thread-safe objects.
5249 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5250
5251 # Library versioning type.
5252 version_type=$version_type
5253
5254 # Format of library name prefix.
5255 libname_spec=$lt_libname_spec
5256
5257 # List of archive names. First name is the real one, the rest are links.
5258 # The last name is the one that the linker finds with -lNAME.
5259 library_names_spec=$lt_library_names_spec
5260
5261 # The coded name of the library, if different from the real name.
5262 soname_spec=$lt_soname_spec
5263
5264 # Commands used to build and install an old-style archive.
5265 RANLIB=$lt_RANLIB
5266 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5267 old_postinstall_cmds=$lt_old_postinstall_cmds
5268 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5269
5270 # Create an old-style archive from a shared archive.
5271 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5272
5273 # Create a temporary old-style archive to link instead of a shared archive.
5274 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5275
5276 # Commands used to build and install a shared archive.
5277 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5278 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5279 postinstall_cmds=$lt_postinstall_cmds
5280 postuninstall_cmds=$lt_postuninstall_cmds
5281
5282 # Commands used to build a loadable module (assumed same as above if empty)
5283 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5284 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5285
5286 # Commands to strip libraries.
5287 old_striplib=$lt_old_striplib
5288 striplib=$lt_striplib
5289
5290 # Dependencies to place before the objects being linked to create a
5291 # shared library.
5292 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5293
5294 # Dependencies to place after the objects being linked to create a
5295 # shared library.
5296 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5297
5298 # Dependencies to place before the objects being linked to create a
5299 # shared library.
5300 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5301
5302 # Dependencies to place after the objects being linked to create a
5303 # shared library.
5304 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5305
5306 # The library search path used internally by the compiler when linking
5307 # a shared library.
5308 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5309
5310 # Method to check whether dependent libraries are shared objects.
5311 deplibs_check_method=$lt_deplibs_check_method
5312
5313 # Command to use when deplibs_check_method == file_magic.
5314 file_magic_cmd=$lt_file_magic_cmd
5315
5316 # Flag that allows shared libraries with undefined symbols to be built.
5317 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5318
5319 # Flag that forces no undefined symbols.
5320 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5321
5322 # Commands used to finish a libtool library installation in a directory.
5323 finish_cmds=$lt_finish_cmds
5324
5325 # Same as above, but a single script fragment to be evaled but not shown.
5326 finish_eval=$lt_finish_eval
5327
5328 # Take the output of nm and produce a listing of raw symbols and C names.
5329 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5330
5331 # Transform the output of nm in a proper C declaration
5332 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5333
5334 # Transform the output of nm in a C name address pair
5335 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5336
5337 # This is the shared library runtime path variable.
5338 runpath_var=$runpath_var
5339
5340 # This is the shared library path variable.
5341 shlibpath_var=$shlibpath_var
5342
5343 # Is shlibpath searched before the hard-coded library search path?
5344 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5345
5346 # How to hardcode a shared library path into an executable.
5347 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5348
5349 # Whether we should hardcode library paths into libraries.
5350 hardcode_into_libs=$hardcode_into_libs
5351
5352 # Flag to hardcode \$libdir into a binary during linking.
5353 # This must work even if \$libdir does not exist.
5354 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5355
5356 # If ld is used when linking, flag to hardcode \$libdir into
5357 # a binary during linking. This must work even if \$libdir does
5358 # not exist.
5359 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5360
5361 # Whether we need a single -rpath flag with a separated argument.
5362 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5363
5364 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5365 # resulting binary.
5366 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5367
5368 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5369 # resulting binary.
5370 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5371
5372 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5373 # the resulting binary.
5374 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5375
5376 # Set to yes if building a shared library automatically hardcodes DIR into the library
5377 # and all subsequent libraries and executables linked against it.
5378 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5379
5380 # Variables whose values should be saved in libtool wrapper scripts and
5381 # restored at relink time.
5382 variables_saved_for_relink="$variables_saved_for_relink"
5383
5384 # Whether libtool must link a program against all its dependency libraries.
5385 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5386
5387 # Compile-time system search path for libraries
5388 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5389
5390 # Run-time system search path for libraries
5391 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5392
5393 # Fix the shell variable \$srcfile for the compiler.
5394 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5395
5396 # Set to yes if exported symbols are required.
5397 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5398
5399 # The commands to list exported symbols.
5400 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5401
5402 # The commands to extract the exported symbol list from a shared archive.
5403 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5404
5405 # Symbols that should not be listed in the preloaded symbols.
5406 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5407
5408 # Symbols that must always be exported.
5409 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5410
5411 ifelse([$1],[],
5412 [# ### END LIBTOOL CONFIG],
5413 [# ### END LIBTOOL TAG CONFIG: $tagname])
5414
5415 __EOF__
5416
5417 ifelse([$1],[], [
5418 case $host_os in
5419 aix3*)
5420 cat <<\EOF >> "$cfgfile"
5421
5422 # AIX sometimes has problems with the GCC collect2 program. For some
5423 # reason, if we set the COLLECT_NAMES environment variable, the problems
5424 # vanish in a puff of smoke.
5425 if test "X${COLLECT_NAMES+set}" != Xset; then
5426 COLLECT_NAMES=
5427 export COLLECT_NAMES
5428 fi
5429 EOF
5430 ;;
5431 esac
5432
5433 # We use sed instead of cat because bash on DJGPP gets confused if
5434 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5435 # text mode, it properly converts lines to CR/LF. This bash problem
5436 # is reportedly fixed, but why not run on old versions too?
5437 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5438
5439 mv -f "$cfgfile" "$ofile" || \
5440 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5441 chmod +x "$ofile"
5442 ])
5443 else
5444 # If there is no Makefile yet, we rely on a make rule to execute
5445 # `config.status --recheck' to rerun these tests and create the
5446 # libtool script then.
5447 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5448 if test -f "$ltmain_in"; then
5449 test -f Makefile && make "$ltmain"
5450 fi
5451 fi
5452 ])# AC_LIBTOOL_CONFIG
5453
5454
5455 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5456 # -------------------------------------------
5457 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5458 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5459
5460 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5461
5462 if test "$GCC" = yes; then
5463 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5464
5465 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5466 lt_cv_prog_compiler_rtti_exceptions,
5467 [-fno-rtti -fno-exceptions], [],
5468 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5469 fi
5470 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5471
5472
5473 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5474 # ---------------------------------
5475 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5476 [AC_REQUIRE([AC_CANONICAL_HOST])
5477 AC_REQUIRE([AC_PROG_NM])
5478 AC_REQUIRE([AC_OBJEXT])
5479 # Check for command to grab the raw symbol name followed by C symbol from nm.
5480 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5481 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5482 [
5483 # These are sane defaults that work on at least a few old systems.
5484 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5485
5486 # Character class describing NM global symbol codes.
5487 symcode='[[BCDEGRST]]'
5488
5489 # Regexp to match symbols that can be accessed directly from C.
5490 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5491
5492 # Transform an extracted symbol line into a proper C declaration
5493 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5494
5495 # Transform an extracted symbol line into symbol name and symbol address
5496 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5497
5498 # Define system-specific variables.
5499 case $host_os in
5500 aix*)
5501 symcode='[[BCDT]]'
5502 ;;
5503 cygwin* | mingw* | pw32*)
5504 symcode='[[ABCDGISTW]]'
5505 ;;
5506 hpux*) # Its linker distinguishes data from code symbols
5507 if test "$host_cpu" = ia64; then
5508 symcode='[[ABCDEGRST]]'
5509 fi
5510 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5511 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5512 ;;
5513 linux* | k*bsd*-gnu)
5514 if test "$host_cpu" = ia64; then
5515 symcode='[[ABCDGIRSTW]]'
5516 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5517 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5518 fi
5519 ;;
5520 irix* | nonstopux*)
5521 symcode='[[BCDEGRST]]'
5522 ;;
5523 osf*)
5524 symcode='[[BCDEGQRST]]'
5525 ;;
5526 solaris*)
5527 symcode='[[BDRT]]'
5528 ;;
5529 sco3.2v5*)
5530 symcode='[[DT]]'
5531 ;;
5532 sysv4.2uw2*)
5533 symcode='[[DT]]'
5534 ;;
5535 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5536 symcode='[[ABDT]]'
5537 ;;
5538 sysv4)
5539 symcode='[[DFNSTU]]'
5540 ;;
5541 esac
5542
5543 # Handle CRLF in mingw tool chain
5544 opt_cr=
5545 case $build_os in
5546 mingw*)
5547 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5548 ;;
5549 esac
5550
5551 # If we're using GNU nm, then use its standard symbol codes.
5552 case `$NM -V 2>&1` in
5553 *GNU* | *'with BFD'*)
5554 symcode='[[ABCDGIRSTW]]' ;;
5555 esac
5556
5557 # Try without a prefix undercore, then with it.
5558 for ac_symprfx in "" "_"; do
5559
5560 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5561 symxfrm="\\1 $ac_symprfx\\2 \\2"
5562
5563 # Write the raw and C identifiers.
5564 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5565
5566 # Check to see that the pipe works correctly.
5567 pipe_works=no
5568
5569 rm -f conftest*
5570 cat > conftest.$ac_ext <<EOF
5571 #ifdef __cplusplus
5572 extern "C" {
5573 #endif
5574 char nm_test_var;
5575 void nm_test_func(){}
5576 #ifdef __cplusplus
5577 }
5578 #endif
5579 int main(){nm_test_var='a';nm_test_func();return(0);}
5580 EOF
5581
5582 if AC_TRY_EVAL(ac_compile); then
5583 # Now try to grab the symbols.
5584 nlist=conftest.nm
5585 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5586 # Try sorting and uniquifying the output.
5587 if sort "$nlist" | uniq > "$nlist"T; then
5588 mv -f "$nlist"T "$nlist"
5589 else
5590 rm -f "$nlist"T
5591 fi
5592
5593 # Make sure that we snagged all the symbols we need.
5594 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5595 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5596 cat <<EOF > conftest.$ac_ext
5597 #ifdef __cplusplus
5598 extern "C" {
5599 #endif
5600
5601 EOF
5602 # Now generate the symbol file.
5603 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5604
5605 cat <<EOF >> conftest.$ac_ext
5606 #if defined (__STDC__) && __STDC__
5607 # define lt_ptr_t void *
5608 #else
5609 # define lt_ptr_t char *
5610 # define const
5611 #endif
5612
5613 /* The mapping between symbol names and symbols. */
5614 const struct {
5615 const char *name;
5616 lt_ptr_t address;
5617 }
5618 lt_preloaded_symbols[[]] =
5619 {
5620 EOF
5621 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5622 cat <<\EOF >> conftest.$ac_ext
5623 {0, (lt_ptr_t) 0}
5624 };
5625
5626 #ifdef __cplusplus
5627 }
5628 #endif
5629 EOF
5630 # Now try linking the two files.
5631 mv conftest.$ac_objext conftstm.$ac_objext
5632 lt_save_LIBS="$LIBS"
5633 lt_save_CFLAGS="$CFLAGS"
5634 LIBS="conftstm.$ac_objext"
5635 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5636 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5637 pipe_works=yes
5638 fi
5639 LIBS="$lt_save_LIBS"
5640 CFLAGS="$lt_save_CFLAGS"
5641 else
5642 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5643 fi
5644 else
5645 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5646 fi
5647 else
5648 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5649 fi
5650 else
5651 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5652 cat conftest.$ac_ext >&5
5653 fi
5654 rm -f conftest* conftst*
5655
5656 # Do not use the global_symbol_pipe unless it works.
5657 if test "$pipe_works" = yes; then
5658 break
5659 else
5660 lt_cv_sys_global_symbol_pipe=
5661 fi
5662 done
5663 ])
5664 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5665 lt_cv_sys_global_symbol_to_cdecl=
5666 fi
5667 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5668 AC_MSG_RESULT(failed)
5669 else
5670 AC_MSG_RESULT(ok)
5671 fi
5672 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5673
5674
5675 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5676 # ---------------------------------------
5677 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5678 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5679 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5680 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5681
5682 AC_MSG_CHECKING([for $compiler option to produce PIC])
5683 ifelse([$1],[CXX],[
5684 # C++ specific cases for pic, static, wl, etc.
5685 if test "$GXX" = yes; then
5686 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5687 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5688
5689 case $host_os in
5690 aix*)
5691 # All AIX code is PIC.
5692 if test "$host_cpu" = ia64; then
5693 # AIX 5 now supports IA64 processor
5694 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5695 fi
5696 ;;
5697 amigaos*)
5698 # FIXME: we need at least 68020 code to build shared libraries, but
5699 # adding the `-m68020' flag to GCC prevents building anything better,
5700 # like `-m68040'.
5701 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5702 ;;
5703 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5704 # PIC is the default for these OSes.
5705 ;;
5706 mingw* | os2* | pw32*)
5707 # This hack is so that the source file can tell whether it is being
5708 # built for inclusion in a dll (and should export symbols for example).
5709 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5710 ;;
5711 darwin* | rhapsody*)
5712 # PIC is the default on this platform
5713 # Common symbols not allowed in MH_DYLIB files
5714 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5715 ;;
5716 *djgpp*)
5717 # DJGPP does not support shared libraries at all
5718 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5719 ;;
5720 interix3*)
5721 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5722 # Instead, we relocate shared libraries at runtime.
5723 ;;
5724 sysv4*MP*)
5725 if test -d /usr/nec; then
5726 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5727 fi
5728 ;;
5729 hpux*)
5730 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5731 # not for PA HP-UX.
5732 case $host_cpu in
5733 hppa*64*|ia64*)
5734 ;;
5735 *)
5736 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5737 ;;
5738 esac
5739 ;;
5740 *)
5741 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5742 ;;
5743 esac
5744 else
5745 case $host_os in
5746 aix4* | aix5*)
5747 # All AIX code is PIC.
5748 if test "$host_cpu" = ia64; then
5749 # AIX 5 now supports IA64 processor
5750 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5751 else
5752 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5753 fi
5754 ;;
5755 chorus*)
5756 case $cc_basename in
5757 cxch68*)
5758 # Green Hills C++ Compiler
5759 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5760 ;;
5761 esac
5762 ;;
5763 darwin*)
5764 # PIC is the default on this platform
5765 # Common symbols not allowed in MH_DYLIB files
5766 case $cc_basename in
5767 xlc*)
5768 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5769 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5770 ;;
5771 esac
5772 ;;
5773 dgux*)
5774 case $cc_basename in
5775 ec++*)
5776 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5777 ;;
5778 ghcx*)
5779 # Green Hills C++ Compiler
5780 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5781 ;;
5782 *)
5783 ;;
5784 esac
5785 ;;
5786 freebsd* | dragonfly*)
5787 # FreeBSD uses GNU C++
5788 ;;
5789 hpux9* | hpux10* | hpux11*)
5790 case $cc_basename in
5791 CC*)
5792 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5793 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5794 if test "$host_cpu" != ia64; then
5795 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5796 fi
5797 ;;
5798 aCC*)
5799 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5800 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5801 case $host_cpu in
5802 hppa*64*|ia64*)
5803 # +Z the default
5804 ;;
5805 *)
5806 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5807 ;;
5808 esac
5809 ;;
5810 *)
5811 ;;
5812 esac
5813 ;;
5814 interix*)
5815 # This is c89, which is MS Visual C++ (no shared libs)
5816 # Anyone wants to do a port?
5817 ;;
5818 irix5* | irix6* | nonstopux*)
5819 case $cc_basename in
5820 CC*)
5821 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5822 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5823 # CC pic flag -KPIC is the default.
5824 ;;
5825 *)
5826 ;;
5827 esac
5828 ;;
5829 linux* | k*bsd*-gnu)
5830 case $cc_basename in
5831 KCC*)
5832 # KAI C++ Compiler
5833 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5834 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5835 ;;
5836 icpc* | ecpc*)
5837 # Intel C++
5838 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5839 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5840 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5841 ;;
5842 pgCC*)
5843 # Portland Group C++ compiler.
5844 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5845 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5846 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5847 ;;
5848 cxx*)
5849 # Compaq C++
5850 # Make sure the PIC flag is empty. It appears that all Alpha
5851 # Linux and Compaq Tru64 Unix objects are PIC.
5852 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5853 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5854 ;;
5855 *)
5856 ;;
5857 esac
5858 ;;
5859 lynxos*)
5860 ;;
5861 m88k*)
5862 ;;
5863 mvs*)
5864 case $cc_basename in
5865 cxx*)
5866 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5867 ;;
5868 *)
5869 ;;
5870 esac
5871 ;;
5872 netbsd* | netbsdelf*-gnu)
5873 ;;
5874 osf3* | osf4* | osf5*)
5875 case $cc_basename in
5876 KCC*)
5877 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5878 ;;
5879 RCC*)
5880 # Rational C++ 2.4.1
5881 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5882 ;;
5883 cxx*)
5884 # Digital/Compaq C++
5885 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5886 # Make sure the PIC flag is empty. It appears that all Alpha
5887 # Linux and Compaq Tru64 Unix objects are PIC.
5888 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5889 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5890 ;;
5891 *)
5892 ;;
5893 esac
5894 ;;
5895 psos*)
5896 ;;
5897 solaris*)
5898 case $cc_basename in
5899 CC*)
5900 # Sun C++ 4.2, 5.x and Centerline C++
5901 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5902 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5903 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5904 ;;
5905 gcx*)
5906 # Green Hills C++ Compiler
5907 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5908 ;;
5909 *)
5910 ;;
5911 esac
5912 ;;
5913 sunos4*)
5914 case $cc_basename in
5915 CC*)
5916 # Sun C++ 4.x
5917 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5918 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5919 ;;
5920 lcc*)
5921 # Lucid
5922 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5923 ;;
5924 *)
5925 ;;
5926 esac
5927 ;;
5928 tandem*)
5929 case $cc_basename in
5930 NCC*)
5931 # NonStop-UX NCC 3.20
5932 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5933 ;;
5934 *)
5935 ;;
5936 esac
5937 ;;
5938 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5939 case $cc_basename in
5940 CC*)
5941 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5942 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5943 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5944 ;;
5945 esac
5946 ;;
5947 vxworks*)
5948 ;;
5949 *)
5950 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5951 ;;
5952 esac
5953 fi
5954 ],
5955 [
5956 if test "$GCC" = yes; then
5957 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5958 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5959
5960 case $host_os in
5961 aix*)
5962 # All AIX code is PIC.
5963 if test "$host_cpu" = ia64; then
5964 # AIX 5 now supports IA64 processor
5965 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5966 fi
5967 ;;
5968
5969 amigaos*)
5970 # FIXME: we need at least 68020 code to build shared libraries, but
5971 # adding the `-m68020' flag to GCC prevents building anything better,
5972 # like `-m68040'.
5973 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5974 ;;
5975
5976 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5977 # PIC is the default for these OSes.
5978 ;;
5979
5980 mingw* | pw32* | os2*)
5981 # This hack is so that the source file can tell whether it is being
5982 # built for inclusion in a dll (and should export symbols for example).
5983 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5984 ;;
5985
5986 darwin* | rhapsody*)
5987 # PIC is the default on this platform
5988 # Common symbols not allowed in MH_DYLIB files
5989 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5990 ;;
5991
5992 interix3*)
5993 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5994 # Instead, we relocate shared libraries at runtime.
5995 ;;
5996
5997 msdosdjgpp*)
5998 # Just because we use GCC doesn't mean we suddenly get shared libraries
5999 # on systems that don't support them.
6000 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6001 enable_shared=no
6002 ;;
6003
6004 sysv4*MP*)
6005 if test -d /usr/nec; then
6006 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6007 fi
6008 ;;
6009
6010 hpux*)
6011 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6012 # not for PA HP-UX.
6013 case $host_cpu in
6014 hppa*64*|ia64*)
6015 # +Z the default
6016 ;;
6017 *)
6018 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6019 ;;
6020 esac
6021 ;;
6022
6023 *)
6024 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6025 ;;
6026 esac
6027 else
6028 # PORTME Check for flag to pass linker flags through the system compiler.
6029 case $host_os in
6030 aix*)
6031 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6032 if test "$host_cpu" = ia64; then
6033 # AIX 5 now supports IA64 processor
6034 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6035 else
6036 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6037 fi
6038 ;;
6039 darwin*)
6040 # PIC is the default on this platform
6041 # Common symbols not allowed in MH_DYLIB files
6042 case $cc_basename in
6043 xlc*)
6044 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6045 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6046 ;;
6047 esac
6048 ;;
6049
6050 mingw* | pw32* | os2*)
6051 # This hack is so that the source file can tell whether it is being
6052 # built for inclusion in a dll (and should export symbols for example).
6053 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6054 ;;
6055
6056 hpux9* | hpux10* | hpux11*)
6057 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6058 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6059 # not for PA HP-UX.
6060 case $host_cpu in
6061 hppa*64*|ia64*)
6062 # +Z the default
6063 ;;
6064 *)
6065 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6066 ;;
6067 esac
6068 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6069 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6070 ;;
6071
6072 irix5* | irix6* | nonstopux*)
6073 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6074 # PIC (with -KPIC) is the default.
6075 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6076 ;;
6077
6078 newsos6)
6079 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6080 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6081 ;;
6082
6083 linux* | k*bsd*-gnu)
6084 case $cc_basename in
6085 icc* | ecc*)
6086 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6087 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6088 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6089 ;;
6090 pgcc* | pgf77* | pgf90* | pgf95*)
6091 # Portland Group compilers (*not* the Pentium gcc compiler,
6092 # which looks to be a dead project)
6093 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6094 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6095 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6096 ;;
6097 ccc*)
6098 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6099 # All Alpha code is PIC.
6100 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6101 ;;
6102 esac
6103 ;;
6104
6105 osf3* | osf4* | osf5*)
6106 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6107 # All OSF/1 code is PIC.
6108 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6109 ;;
6110
6111 solaris*)
6112 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6113 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6114 case $cc_basename in
6115 f77* | f90* | f95*)
6116 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6117 *)
6118 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6119 esac
6120 ;;
6121
6122 sunos4*)
6123 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6124 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6125 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6126 ;;
6127
6128 sysv4 | sysv4.2uw2* | sysv4.3*)
6129 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6130 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6131 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6132 ;;
6133
6134 sysv4*MP*)
6135 if test -d /usr/nec ;then
6136 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6137 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6138 fi
6139 ;;
6140
6141 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6142 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6143 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6144 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6145 ;;
6146
6147 unicos*)
6148 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6149 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6150 ;;
6151
6152 uts4*)
6153 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6154 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6155 ;;
6156
6157 *)
6158 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6159 ;;
6160 esac
6161 fi
6162 ])
6163 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6164
6165 #
6166 # Check to make sure the PIC flag actually works.
6167 #
6168 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6169 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6170 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6171 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6172 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6173 "" | " "*) ;;
6174 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6175 esac],
6176 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6177 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6178 fi
6179 case $host_os in
6180 # For platforms which do not support PIC, -DPIC is meaningless:
6181 *djgpp*)
6182 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6183 ;;
6184 *)
6185 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6186 ;;
6187 esac
6188
6189 #
6190 # Check to make sure the static flag actually works.
6191 #
6192 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6193 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6194 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6195 $lt_tmp_static_flag,
6196 [],
6197 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6198 ])
6199
6200
6201 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6202 # ------------------------------------
6203 # See if the linker supports building shared libraries.
6204 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6205 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6206 ifelse([$1],[CXX],[
6207 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6208 case $host_os in
6209 aix4* | aix5*)
6210 # If we're using GNU nm, then we don't want the "-C" option.
6211 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6212 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6213 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6214 else
6215 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6216 fi
6217 ;;
6218 pw32*)
6219 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6220 ;;
6221 cygwin* | mingw*)
6222 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6223 ;;
6224 linux* | k*bsd*-gnu)
6225 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6226 ;;
6227 *)
6228 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6229 ;;
6230 esac
6231 ],[
6232 runpath_var=
6233 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6234 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6235 _LT_AC_TAGVAR(archive_cmds, $1)=
6236 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6237 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6238 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6239 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6240 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6241 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6242 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6243 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6244 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6245 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6246 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6247 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6248 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6249 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6250 _LT_AC_TAGVAR(module_cmds, $1)=
6251 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6252 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6253 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6254 # include_expsyms should be a list of space-separated symbols to be *always*
6255 # included in the symbol list
6256 _LT_AC_TAGVAR(include_expsyms, $1)=
6257 # exclude_expsyms can be an extended regexp of symbols to exclude
6258 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6259 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6260 # as well as any symbol that contains `d'.
6261 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6262 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6263 # platforms (ab)use it in PIC code, but their linkers get confused if
6264 # the symbol is explicitly referenced. Since portable code cannot
6265 # rely on this symbol name, it's probably fine to never include it in
6266 # preloaded symbol tables.
6267 extract_expsyms_cmds=
6268 # Just being paranoid about ensuring that cc_basename is set.
6269 _LT_CC_BASENAME([$compiler])
6270 case $host_os in
6271 cygwin* | mingw* | pw32*)
6272 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6273 # When not using gcc, we currently assume that we are using
6274 # Microsoft Visual C++.
6275 if test "$GCC" != yes; then
6276 with_gnu_ld=no
6277 fi
6278 ;;
6279 interix*)
6280 # we just hope/assume this is gcc and not c89 (= MSVC++)
6281 with_gnu_ld=yes
6282 ;;
6283 openbsd*)
6284 with_gnu_ld=no
6285 ;;
6286 esac
6287
6288 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6289 if test "$with_gnu_ld" = yes; then
6290 # If archive_cmds runs LD, not CC, wlarc should be empty
6291 wlarc='${wl}'
6292
6293 # Set some defaults for GNU ld with shared library support. These
6294 # are reset later if shared libraries are not supported. Putting them
6295 # here allows them to be overridden if necessary.
6296 runpath_var=LD_RUN_PATH
6297 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6298 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6299 # ancient GNU ld didn't support --whole-archive et. al.
6300 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6301 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6302 else
6303 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6304 fi
6305 supports_anon_versioning=no
6306 case `$LD -v 2>/dev/null` in
6307 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6308 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6309 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6310 *\ 2.11.*) ;; # other 2.11 versions
6311 *) supports_anon_versioning=yes ;;
6312 esac
6313
6314 # See if GNU ld supports shared libraries.
6315 case $host_os in
6316 aix3* | aix4* | aix5*)
6317 # On AIX/PPC, the GNU linker is very broken
6318 if test "$host_cpu" != ia64; then
6319 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6320 cat <<EOF 1>&2
6321
6322 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6323 *** to be unable to reliably create shared libraries on AIX.
6324 *** Therefore, libtool is disabling shared libraries support. If you
6325 *** really care for shared libraries, you may want to modify your PATH
6326 *** so that a non-GNU linker is found, and then restart.
6327
6328 EOF
6329 fi
6330 ;;
6331
6332 amigaos*)
6333 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6334 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6335 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6336
6337 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6338 # that the semantics of dynamic libraries on AmigaOS, at least up
6339 # to version 4, is to share data among multiple programs linked
6340 # with the same dynamic library. Since this doesn't match the
6341 # behavior of shared libraries on other platforms, we can't use
6342 # them.
6343 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6344 ;;
6345
6346 beos*)
6347 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6348 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6349 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6350 # support --undefined. This deserves some investigation. FIXME
6351 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6352 else
6353 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6354 fi
6355 ;;
6356
6357 cygwin* | mingw* | pw32*)
6358 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6359 # as there is no search path for DLLs.
6360 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6361 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6362 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6363 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6364 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6365
6366 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6367 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6368 # If the export-symbols file already is a .def file (1st line
6369 # is EXPORTS), use it as is; otherwise, prepend...
6370 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6371 cp $export_symbols $output_objdir/$soname.def;
6372 else
6373 echo EXPORTS > $output_objdir/$soname.def;
6374 cat $export_symbols >> $output_objdir/$soname.def;
6375 fi~
6376 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6377 else
6378 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6379 fi
6380 ;;
6381
6382 interix3*)
6383 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6384 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6385 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6386 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6387 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6388 # Instead, shared libraries are loaded at an image base (0x10000000 by
6389 # default) and relocated if they conflict, which is a slow very memory
6390 # consuming and fragmenting process. To avoid this, we pick a random,
6391 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6392 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6393 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6394 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6395 ;;
6396
6397 linux* | k*bsd*-gnu)
6398 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6399 tmp_addflag=
6400 case $cc_basename,$host_cpu in
6401 pgcc*) # Portland Group C compiler
6402 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6403 tmp_addflag=' $pic_flag'
6404 ;;
6405 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6406 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6407 tmp_addflag=' $pic_flag -Mnomain' ;;
6408 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6409 tmp_addflag=' -i_dynamic' ;;
6410 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6411 tmp_addflag=' -i_dynamic -nofor_main' ;;
6412 ifc* | ifort*) # Intel Fortran compiler
6413 tmp_addflag=' -nofor_main' ;;
6414 esac
6415 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6416
6417 if test $supports_anon_versioning = yes; then
6418 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6419 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6420 $echo "local: *; };" >> $output_objdir/$libname.ver~
6421 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6422 fi
6423 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6424 else
6425 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6426 fi
6427 ;;
6428
6429 netbsd* | netbsdelf*-gnu)
6430 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6431 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6432 wlarc=
6433 else
6434 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6435 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6436 fi
6437 ;;
6438
6439 solaris*)
6440 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6441 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6442 cat <<EOF 1>&2
6443
6444 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6445 *** create shared libraries on Solaris systems. Therefore, libtool
6446 *** is disabling shared libraries support. We urge you to upgrade GNU
6447 *** binutils to release 2.9.1 or newer. Another option is to modify
6448 *** your PATH or compiler configuration so that the native linker is
6449 *** used, and then restart.
6450
6451 EOF
6452 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6453 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6454 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6455 else
6456 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6457 fi
6458 ;;
6459
6460 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6461 case `$LD -v 2>&1` in
6462 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6463 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6464 cat <<_LT_EOF 1>&2
6465
6466 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6467 *** reliably create shared libraries on SCO systems. Therefore, libtool
6468 *** is disabling shared libraries support. We urge you to upgrade GNU
6469 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6470 *** your PATH or compiler configuration so that the native linker is
6471 *** used, and then restart.
6472
6473 _LT_EOF
6474 ;;
6475 *)
6476 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6477 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6478 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6479 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6480 else
6481 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6482 fi
6483 ;;
6484 esac
6485 ;;
6486
6487 sunos4*)
6488 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6489 wlarc=
6490 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6491 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6492 ;;
6493
6494 *)
6495 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6496 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6497 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6498 else
6499 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6500 fi
6501 ;;
6502 esac
6503
6504 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6505 runpath_var=
6506 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6507 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6508 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6509 fi
6510 else
6511 # PORTME fill in a description of your system's linker (not GNU ld)
6512 case $host_os in
6513 aix3*)
6514 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6515 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6516 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6517 # Note: this linker hardcodes the directories in LIBPATH if there
6518 # are no directories specified by -L.
6519 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6520 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6521 # Neither direct hardcoding nor static linking is supported with a
6522 # broken collect2.
6523 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6524 fi
6525 ;;
6526
6527 aix4* | aix5*)
6528 if test "$host_cpu" = ia64; then
6529 # On IA64, the linker does run time linking by default, so we don't
6530 # have to do anything special.
6531 aix_use_runtimelinking=no
6532 exp_sym_flag='-Bexport'
6533 no_entry_flag=""
6534 else
6535 # If we're using GNU nm, then we don't want the "-C" option.
6536 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6537 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6538 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6539 else
6540 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6541 fi
6542 aix_use_runtimelinking=no
6543
6544 # Test if we are trying to use run time linking or normal
6545 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6546 # need to do runtime linking.
6547 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6548 for ld_flag in $LDFLAGS; do
6549 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6550 aix_use_runtimelinking=yes
6551 break
6552 fi
6553 done
6554 ;;
6555 esac
6556
6557 exp_sym_flag='-bexport'
6558 no_entry_flag='-bnoentry'
6559 fi
6560
6561 # When large executables or shared objects are built, AIX ld can
6562 # have problems creating the table of contents. If linking a library
6563 # or program results in "error TOC overflow" add -mminimal-toc to
6564 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6565 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6566
6567 _LT_AC_TAGVAR(archive_cmds, $1)=''
6568 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6569 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6570 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6571
6572 if test "$GCC" = yes; then
6573 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6574 # We only want to do this on AIX 4.2 and lower, the check
6575 # below for broken collect2 doesn't work under 4.3+
6576 collect2name=`${CC} -print-prog-name=collect2`
6577 if test -f "$collect2name" && \
6578 strings "$collect2name" | grep resolve_lib_name >/dev/null
6579 then
6580 # We have reworked collect2
6581 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6582 else
6583 # We have old collect2
6584 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6585 # It fails to find uninstalled libraries when the uninstalled
6586 # path is not listed in the libpath. Setting hardcode_minus_L
6587 # to unsupported forces relinking
6588 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6589 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6590 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6591 fi
6592 ;;
6593 esac
6594 shared_flag='-shared'
6595 if test "$aix_use_runtimelinking" = yes; then
6596 shared_flag="$shared_flag "'${wl}-G'
6597 fi
6598 else
6599 # not using gcc
6600 if test "$host_cpu" = ia64; then
6601 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6602 # chokes on -Wl,-G. The following line is correct:
6603 shared_flag='-G'
6604 else
6605 if test "$aix_use_runtimelinking" = yes; then
6606 shared_flag='${wl}-G'
6607 else
6608 shared_flag='${wl}-bM:SRE'
6609 fi
6610 fi
6611 fi
6612
6613 # It seems that -bexpall does not export symbols beginning with
6614 # underscore (_), so it is better to generate a list of symbols to export.
6615 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6616 if test "$aix_use_runtimelinking" = yes; then
6617 # Warning - without using the other runtime loading flags (-brtl),
6618 # -berok will link without error, but may produce a broken library.
6619 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6620 # Determine the default libpath from the value encoded in an empty executable.
6621 _LT_AC_SYS_LIBPATH_AIX
6622 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6623 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6624 else
6625 if test "$host_cpu" = ia64; then
6626 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6627 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6628 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6629 else
6630 # Determine the default libpath from the value encoded in an empty executable.
6631 _LT_AC_SYS_LIBPATH_AIX
6632 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6633 # Warning - without using the other run time loading flags,
6634 # -berok will link without error, but may produce a broken library.
6635 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6636 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6637 # Exported symbols can be pulled into shared objects from archives
6638 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6639 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6640 # This is similar to how AIX traditionally builds its shared libraries.
6641 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6642 fi
6643 fi
6644 ;;
6645
6646 amigaos*)
6647 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6648 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6649 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6650 # see comment about different semantics on the GNU ld section
6651 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6652 ;;
6653
6654 bsdi[[45]]*)
6655 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6656 ;;
6657
6658 cygwin* | mingw* | pw32*)
6659 # When not using gcc, we currently assume that we are using
6660 # Microsoft Visual C++.
6661 # hardcode_libdir_flag_spec is actually meaningless, as there is
6662 # no search path for DLLs.
6663 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6664 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6665 # Tell ltmain to make .lib files, not .a files.
6666 libext=lib
6667 # Tell ltmain to make .dll files, not .so files.
6668 shrext_cmds=".dll"
6669 # FIXME: Setting linknames here is a bad hack.
6670 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6671 # The linker will automatically build a .lib file if we build a DLL.
6672 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6673 # FIXME: Should let the user specify the lib program.
6674 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6675 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6676 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6677 ;;
6678
6679 darwin* | rhapsody*)
6680 case $host_os in
6681 rhapsody* | darwin1.[[012]])
6682 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6683 ;;
6684 *) # Darwin 1.3 on
6685 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6686 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6687 else
6688 case ${MACOSX_DEPLOYMENT_TARGET} in
6689 10.[[012]])
6690 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6691 ;;
6692 10.*)
6693 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6694 ;;
6695 esac
6696 fi
6697 ;;
6698 esac
6699 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6700 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6701 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6702 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6703 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6704 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6705 if test "$GCC" = yes ; then
6706 output_verbose_link_cmd='echo'
6707 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6708 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6709 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6710 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6711 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6712 else
6713 case $cc_basename in
6714 xlc*)
6715 output_verbose_link_cmd='echo'
6716 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6717 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6718 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6719 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6720 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6721 ;;
6722 *)
6723 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6724 ;;
6725 esac
6726 fi
6727 ;;
6728
6729 dgux*)
6730 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6731 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6732 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6733 ;;
6734
6735 freebsd1*)
6736 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6737 ;;
6738
6739 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6740 # support. Future versions do this automatically, but an explicit c++rt0.o
6741 # does not break anything, and helps significantly (at the cost of a little
6742 # extra space).
6743 freebsd2.2*)
6744 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6745 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6746 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6747 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6748 ;;
6749
6750 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6751 freebsd2*)
6752 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6753 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6754 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6755 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6756 ;;
6757
6758 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6759 freebsd* | dragonfly*)
6760 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6761 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6762 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6763 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6764 ;;
6765
6766 hpux9*)
6767 if test "$GCC" = yes; then
6768 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6769 else
6770 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6771 fi
6772 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6773 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6774 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6775
6776 # hardcode_minus_L: Not really in the search PATH,
6777 # but as the default location of the library.
6778 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6779 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6780 ;;
6781
6782 hpux10*)
6783 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6784 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6785 else
6786 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6787 fi
6788 if test "$with_gnu_ld" = no; then
6789 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6790 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6791
6792 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6793 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6794
6795 # hardcode_minus_L: Not really in the search PATH,
6796 # but as the default location of the library.
6797 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6798 fi
6799 ;;
6800
6801 hpux11*)
6802 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6803 case $host_cpu in
6804 hppa*64*)
6805 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6806 ;;
6807 ia64*)
6808 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6809 ;;
6810 *)
6811 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6812 ;;
6813 esac
6814 else
6815 case $host_cpu in
6816 hppa*64*)
6817 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6818 ;;
6819 ia64*)
6820 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6821 ;;
6822 *)
6823 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6824 ;;
6825 esac
6826 fi
6827 if test "$with_gnu_ld" = no; then
6828 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6829 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6830
6831 case $host_cpu in
6832 hppa*64*|ia64*)
6833 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6834 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6835 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6836 ;;
6837 *)
6838 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6839 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6840
6841 # hardcode_minus_L: Not really in the search PATH,
6842 # but as the default location of the library.
6843 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6844 ;;
6845 esac
6846 fi
6847 ;;
6848
6849 irix5* | irix6* | nonstopux*)
6850 if test "$GCC" = yes; then
6851 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6852 else
6853 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6854 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6855 fi
6856 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6857 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6858 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6859 ;;
6860
6861 netbsd* | netbsdelf*-gnu)
6862 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6863 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6864 else
6865 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6866 fi
6867 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6868 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6869 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6870 ;;
6871
6872 newsos6)
6873 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6874 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6875 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6876 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6877 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6878 ;;
6879
6880 openbsd*)
6881 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6882 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6883 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6884 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6885 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6886 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6887 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6888 else
6889 case $host_os in
6890 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6891 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6892 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6893 ;;
6894 *)
6895 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6896 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6897 ;;
6898 esac
6899 fi
6900 ;;
6901
6902 os2*)
6903 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6904 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6905 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6906 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6907 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6908 ;;
6909
6910 osf3*)
6911 if test "$GCC" = yes; then
6912 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6913 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6914 else
6915 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6916 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6917 fi
6918 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6919 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6920 ;;
6921
6922 osf4* | osf5*) # as osf3* with the addition of -msym flag
6923 if test "$GCC" = yes; then
6924 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6925 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6927 else
6928 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6929 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6930 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6931 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6932
6933 # Both c and cxx compiler support -rpath directly
6934 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6935 fi
6936 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6937 ;;
6938
6939 solaris*)
6940 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6941 if test "$GCC" = yes; then
6942 wlarc='${wl}'
6943 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6944 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6945 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6946 else
6947 wlarc=''
6948 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6949 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6950 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6951 fi
6952 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6953 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6954 case $host_os in
6955 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6956 *)
6957 # The compiler driver will combine linker options so we
6958 # cannot just pass the convience library names through
6959 # without $wl, iff we do not link with $LD.
6960 # Luckily, gcc supports the same syntax we need for Sun Studio.
6961 # Supported since Solaris 2.6 (maybe 2.5.1?)
6962 case $wlarc in
6963 '')
6964 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6965 *)
6966 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6967 esac ;;
6968 esac
6969 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6970 ;;
6971
6972 sunos4*)
6973 if test "x$host_vendor" = xsequent; then
6974 # Use $CC to link under sequent, because it throws in some extra .o
6975 # files that make .init and .fini sections work.
6976 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6977 else
6978 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6979 fi
6980 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6981 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6982 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6983 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6984 ;;
6985
6986 sysv4)
6987 case $host_vendor in
6988 sni)
6989 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6990 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6991 ;;
6992 siemens)
6993 ## LD is ld it makes a PLAMLIB
6994 ## CC just makes a GrossModule.
6995 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6996 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6997 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6998 ;;
6999 motorola)
7000 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7001 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7002 ;;
7003 esac
7004 runpath_var='LD_RUN_PATH'
7005 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7006 ;;
7007
7008 sysv4.3*)
7009 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7010 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7011 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7012 ;;
7013
7014 sysv4*MP*)
7015 if test -d /usr/nec; then
7016 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7017 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7018 runpath_var=LD_RUN_PATH
7019 hardcode_runpath_var=yes
7020 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7021 fi
7022 ;;
7023
7024 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7025 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7026 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7027 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7028 runpath_var='LD_RUN_PATH'
7029
7030 if test "$GCC" = yes; then
7031 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7032 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7033 else
7034 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7035 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7036 fi
7037 ;;
7038
7039 sysv5* | sco3.2v5* | sco5v6*)
7040 # Note: We can NOT use -z defs as we might desire, because we do not
7041 # link with -lc, and that would cause any symbols used from libc to
7042 # always be unresolved, which means just about no library would
7043 # ever link correctly. If we're not using GNU ld we use -z text
7044 # though, which does catch some bad symbols but isn't as heavy-handed
7045 # as -z defs.
7046 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7047 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7048 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7049 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7050 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7051 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7052 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7053 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7054 runpath_var='LD_RUN_PATH'
7055
7056 if test "$GCC" = yes; then
7057 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7058 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7059 else
7060 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7061 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7062 fi
7063 ;;
7064
7065 uts4*)
7066 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7067 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7068 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7069 ;;
7070
7071 *)
7072 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7073 ;;
7074 esac
7075 fi
7076 ])
7077 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7078 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7079
7080 #
7081 # Do we need to explicitly link libc?
7082 #
7083 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7084 x|xyes)
7085 # Assume -lc should be added
7086 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7087
7088 if test "$enable_shared" = yes && test "$GCC" = yes; then
7089 case $_LT_AC_TAGVAR(archive_cmds, $1) in
7090 *'~'*)
7091 # FIXME: we may have to deal with multi-command sequences.
7092 ;;
7093 '$CC '*)
7094 # Test whether the compiler implicitly links with -lc since on some
7095 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7096 # to ld, don't add -lc before -lgcc.
7097 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7098 $rm conftest*
7099 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7100
7101 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7102 soname=conftest
7103 lib=conftest
7104 libobjs=conftest.$ac_objext
7105 deplibs=
7106 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7107 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7108 compiler_flags=-v
7109 linker_flags=-v
7110 verstring=
7111 output_objdir=.
7112 libname=conftest
7113 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7114 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7115 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7116 then
7117 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7118 else
7119 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7120 fi
7121 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7122 else
7123 cat conftest.err 1>&5
7124 fi
7125 $rm conftest*
7126 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7127 ;;
7128 esac
7129 fi
7130 ;;
7131 esac
7132 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7133
7134
7135 # _LT_AC_FILE_LTDLL_C
7136 # -------------------
7137 # Be careful that the start marker always follows a newline.
7138 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7139 # /* ltdll.c starts here */
7140 # #define WIN32_LEAN_AND_MEAN
7141 # #include <windows.h>
7142 # #undef WIN32_LEAN_AND_MEAN
7143 # #include <stdio.h>
7144 #
7145 # #ifndef __CYGWIN__
7146 # # ifdef __CYGWIN32__
7147 # # define __CYGWIN__ __CYGWIN32__
7148 # # endif
7149 # #endif
7150 #
7151 # #ifdef __cplusplus
7152 # extern "C" {
7153 # #endif
7154 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7155 # #ifdef __cplusplus
7156 # }
7157 # #endif
7158 #
7159 # #ifdef __CYGWIN__
7160 # #include <cygwin/cygwin_dll.h>
7161 # DECLARE_CYGWIN_DLL( DllMain );
7162 # #endif
7163 # HINSTANCE __hDllInstance_base;
7164 #
7165 # BOOL APIENTRY
7166 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7167 # {
7168 # __hDllInstance_base = hInst;
7169 # return TRUE;
7170 # }
7171 # /* ltdll.c ends here */
7172 ])# _LT_AC_FILE_LTDLL_C
7173
7174
7175 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7176 # ---------------------------------
7177 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7178
7179
7180 # old names
7181 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7182 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7183 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7184 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7185 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7186 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7187 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7188
7189 # This is just to silence aclocal about the macro not being used
7190 ifelse([AC_DISABLE_FAST_INSTALL])
7191
7192 AC_DEFUN([LT_AC_PROG_GCJ],
7193 [AC_CHECK_TOOL(GCJ, gcj, no)
7194 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7195 AC_SUBST(GCJFLAGS)
7196 ])
7197
7198 AC_DEFUN([LT_AC_PROG_RC],
7199 [AC_CHECK_TOOL(RC, windres, no)
7200 ])
7201
7202 # NOTE: This macro has been submitted for inclusion into #
7203 # GNU Autoconf as AC_PROG_SED. When it is available in #
7204 # a released version of Autoconf we should remove this #
7205 # macro and use it instead. #
7206 # LT_AC_PROG_SED
7207 # --------------
7208 # Check for a fully-functional sed program, that truncates
7209 # as few characters as possible. Prefer GNU sed if found.
7210 AC_DEFUN([LT_AC_PROG_SED],
7211 [AC_MSG_CHECKING([for a sed that does not truncate output])
7212 AC_CACHE_VAL(lt_cv_path_SED,
7213 [# Loop through the user's path and test for sed and gsed.
7214 # Then use that list of sed's as ones to test for truncation.
7215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7216 for as_dir in $PATH
7217 do
7218 IFS=$as_save_IFS
7219 test -z "$as_dir" && as_dir=.
7220 for lt_ac_prog in sed gsed; do
7221 for ac_exec_ext in '' $ac_executable_extensions; do
7222 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7223 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7224 fi
7225 done
7226 done
7227 done
7228 lt_ac_max=0
7229 lt_ac_count=0
7230 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7231 # along with /bin/sed that truncates output.
7232 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7233 test ! -f $lt_ac_sed && continue
7234 cat /dev/null > conftest.in
7235 lt_ac_count=0
7236 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7237 # Check for GNU sed and select it if it is found.
7238 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7239 lt_cv_path_SED=$lt_ac_sed
7240 break
7241 fi
7242 while true; do
7243 cat conftest.in conftest.in >conftest.tmp
7244 mv conftest.tmp conftest.in
7245 cp conftest.in conftest.nl
7246 echo >>conftest.nl
7247 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7248 cmp -s conftest.out conftest.nl || break
7249 # 10000 chars as input seems more than enough
7250 test $lt_ac_count -gt 10 && break
7251 lt_ac_count=`expr $lt_ac_count + 1`
7252 if test $lt_ac_count -gt $lt_ac_max; then
7253 lt_ac_max=$lt_ac_count
7254 lt_cv_path_SED=$lt_ac_sed
7255 fi
7256 done
7257 done
7258 ])
7259 SED=$lt_cv_path_SED
7260 AC_MSG_RESULT([$SED])
7261 ])
7262
7263 # Configure paths for GLIB
7264 # Owen Taylor 1997-2001
7265
7266 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
7267 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
7268 dnl gthread is specified in MODULES, pass to pkg-config
7269 dnl
7270 AC_DEFUN([AM_PATH_GLIB_2_0],
7271 [dnl
7272 dnl Get the cflags and libraries from pkg-config
7273 dnl
7274 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
7275 , enable_glibtest=yes)
7276
7277 pkg_config_args=glib-2.0
7278 for module in . $4
7279 do
7280 case "$module" in
7281 gmodule)
7282 pkg_config_args="$pkg_config_args gmodule-2.0"
7283 ;;
7284 gmodule-no-export)
7285 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
7286 ;;
7287 gobject)
7288 pkg_config_args="$pkg_config_args gobject-2.0"
7289 ;;
7290 gthread)
7291 pkg_config_args="$pkg_config_args gthread-2.0"
7292 ;;
7293 esac
7294 done
7295
7296 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
7297
7298 no_glib=""
7299
7300 if test x$PKG_CONFIG != xno ; then
7301 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
7302 :
7303 else
7304 echo *** pkg-config too old; version 0.7 or better required.
7305 no_glib=yes
7306 PKG_CONFIG=no
7307 fi
7308 else
7309 no_glib=yes
7310 fi
7311
7312 min_glib_version=ifelse([$1], ,2.0.0,$1)
7313 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
7314
7315 if test x$PKG_CONFIG != xno ; then
7316 ## don't try to run the test against uninstalled libtool libs
7317 if $PKG_CONFIG --uninstalled $pkg_config_args; then
7318 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
7319 enable_glibtest=no
7320 fi
7321
7322 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
7323 :
7324 else
7325 no_glib=yes
7326 fi
7327 fi
7328
7329 if test x"$no_glib" = x ; then
7330 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
7331 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
7332 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
7333
7334 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
7335 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
7336 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
7337 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
7338 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
7339 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
7340 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
7341 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
7342 if test "x$enable_glibtest" = "xyes" ; then
7343 ac_save_CFLAGS="$CFLAGS"
7344 ac_save_LIBS="$LIBS"
7345 CFLAGS="$CFLAGS $GLIB_CFLAGS"
7346 LIBS="$GLIB_LIBS $LIBS"
7347 dnl
7348 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
7349 dnl checks the results of pkg-config to some extent)
7350 dnl
7351 rm -f conf.glibtest
7352 AC_TRY_RUN([
7353 #include <glib.h>
7354 #include <stdio.h>
7355 #include <stdlib.h>
7356
7357 int
7358 main ()
7359 {
7360 int major, minor, micro;
7361 char *tmp_version;
7362
7363 system ("touch conf.glibtest");
7364
7365 /* HP/UX 9 (%@#!) writes to sscanf strings */
7366 tmp_version = g_strdup("$min_glib_version");
7367 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
7368 printf("%s, bad version string\n", "$min_glib_version");
7369 exit(1);
7370 }
7371
7372 if ((glib_major_version != $glib_config_major_version) ||
7373 (glib_minor_version != $glib_config_minor_version) ||
7374 (glib_micro_version != $glib_config_micro_version))
7375 {
7376 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
7377 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
7378 glib_major_version, glib_minor_version, glib_micro_version);
7379 printf ("*** was found! If pkg-config was correct, then it is best\n");
7380 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
7381 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
7382 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
7383 printf("*** required on your system.\n");
7384 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
7385 printf("*** to point to the correct configuration files\n");
7386 }
7387 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
7388 (glib_minor_version != GLIB_MINOR_VERSION) ||
7389 (glib_micro_version != GLIB_MICRO_VERSION))
7390 {
7391 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
7392 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
7393 printf("*** library (version %d.%d.%d)\n",
7394 glib_major_version, glib_minor_version, glib_micro_version);
7395 }
7396 else
7397 {
7398 if ((glib_major_version > major) ||
7399 ((glib_major_version == major) && (glib_minor_version > minor)) ||
7400 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
7401 {
7402 return 0;
7403 }
7404 else
7405 {
7406 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
7407 glib_major_version, glib_minor_version, glib_micro_version);
7408 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
7409 major, minor, micro);
7410 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
7411 printf("***\n");
7412 printf("*** If you have already installed a sufficiently new version, this error\n");
7413 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
7414 printf("*** being found. The easiest way to fix this is to remove the old version\n");
7415 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
7416 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
7417 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
7418 printf("*** so that the correct libraries are found at run-time))\n");
7419 }
7420 }
7421 return 1;
7422 }
7423 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
7424 CFLAGS="$ac_save_CFLAGS"
7425 LIBS="$ac_save_LIBS"
7426 fi
7427 fi
7428 if test "x$no_glib" = x ; then
7429 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
7430 ifelse([$2], , :, [$2])
7431 else
7432 AC_MSG_RESULT(no)
7433 if test "$PKG_CONFIG" = "no" ; then
7434 echo "*** A new enough version of pkg-config was not found."
7435 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
7436 else
7437 if test -f conf.glibtest ; then
7438 :
7439 else
7440 echo "*** Could not run GLIB test program, checking why..."
7441 ac_save_CFLAGS="$CFLAGS"
7442 ac_save_LIBS="$LIBS"
7443 CFLAGS="$CFLAGS $GLIB_CFLAGS"
7444 LIBS="$LIBS $GLIB_LIBS"
7445 AC_TRY_LINK([
7446 #include <glib.h>
7447 #include <stdio.h>
7448 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
7449 [ echo "*** The test program compiled, but did not run. This usually means"
7450 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
7451 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
7452 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7453 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7454 echo "*** is required on your system"
7455 echo "***"
7456 echo "*** If you have an old version installed, it is best to remove it, although"
7457 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
7458 [ echo "*** The test program failed to compile or link. See the file config.log for the"
7459 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
7460 CFLAGS="$ac_save_CFLAGS"
7461 LIBS="$ac_save_LIBS"
7462 fi
7463 fi
7464 GLIB_CFLAGS=""
7465 GLIB_LIBS=""
7466 GLIB_GENMARSHAL=""
7467 GOBJECT_QUERY=""
7468 GLIB_MKENUMS=""
7469 ifelse([$3], , :, [$3])
7470 fi
7471 AC_SUBST(GLIB_CFLAGS)
7472 AC_SUBST(GLIB_LIBS)
7473 AC_SUBST(GLIB_GENMARSHAL)
7474 AC_SUBST(GOBJECT_QUERY)
7475 AC_SUBST(GLIB_MKENUMS)
7476 rm -f conf.glibtest
7477 ])
7478
7479 # Configure paths for GTK+
7480 # Owen Taylor 1997-2001
7481
7482 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
7483 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
7484 dnl pass to pkg-config
7485 dnl
7486 AC_DEFUN([AM_PATH_GTK_2_0],
7487 [dnl
7488 dnl Get the cflags and libraries from pkg-config
7489 dnl
7490 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
7491 , enable_gtktest=yes)
7492
7493 pkg_config_args=gtk+-2.0
7494 for module in . $4
7495 do
7496 case "$module" in
7497 gthread)
7498 pkg_config_args="$pkg_config_args gthread-2.0"
7499 ;;
7500 esac
7501 done
7502
7503 no_gtk=""
7504
7505 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
7506
7507 if test x$PKG_CONFIG != xno ; then
7508 if pkg-config --atleast-pkgconfig-version 0.7 ; then
7509 :
7510 else
7511 echo "*** pkg-config too old; version 0.7 or better required."
7512 no_gtk=yes
7513 PKG_CONFIG=no
7514 fi
7515 else
7516 no_gtk=yes
7517 fi
7518
7519 min_gtk_version=ifelse([$1], ,2.0.0,$1)
7520 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
7521
7522 if test x$PKG_CONFIG != xno ; then
7523 ## don't try to run the test against uninstalled libtool libs
7524 if $PKG_CONFIG --uninstalled $pkg_config_args; then
7525 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
7526 enable_gtktest=no
7527 fi
7528
7529 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
7530 :
7531 else
7532 no_gtk=yes
7533 fi
7534 fi
7535
7536 if test x"$no_gtk" = x ; then
7537 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
7538 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
7539 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
7540 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
7541 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
7542 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
7543 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
7544 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
7545 if test "x$enable_gtktest" = "xyes" ; then
7546 ac_save_CFLAGS="$CFLAGS"
7547 ac_save_LIBS="$LIBS"
7548 CFLAGS="$CFLAGS $GTK_CFLAGS"
7549 LIBS="$GTK_LIBS $LIBS"
7550 dnl
7551 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
7552 dnl checks the results of pkg-config to some extent)
7553 dnl
7554 rm -f conf.gtktest
7555 AC_TRY_RUN([
7556 #include <gtk/gtk.h>
7557 #include <stdio.h>
7558 #include <stdlib.h>
7559
7560 int
7561 main ()
7562 {
7563 int major, minor, micro;
7564 char *tmp_version;
7565
7566 system ("touch conf.gtktest");
7567
7568 /* HP/UX 9 (%@#!) writes to sscanf strings */
7569 tmp_version = g_strdup("$min_gtk_version");
7570 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
7571 printf("%s, bad version string\n", "$min_gtk_version");
7572 exit(1);
7573 }
7574
7575 if ((gtk_major_version != $gtk_config_major_version) ||
7576 (gtk_minor_version != $gtk_config_minor_version) ||
7577 (gtk_micro_version != $gtk_config_micro_version))
7578 {
7579 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
7580 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
7581 gtk_major_version, gtk_minor_version, gtk_micro_version);
7582 printf ("*** was found! If pkg-config was correct, then it is best\n");
7583 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
7584 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
7585 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
7586 printf("*** required on your system.\n");
7587 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
7588 printf("*** to point to the correct configuration files\n");
7589 }
7590 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
7591 (gtk_minor_version != GTK_MINOR_VERSION) ||
7592 (gtk_micro_version != GTK_MICRO_VERSION))
7593 {
7594 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
7595 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
7596 printf("*** library (version %d.%d.%d)\n",
7597 gtk_major_version, gtk_minor_version, gtk_micro_version);
7598 }
7599 else
7600 {
7601 if ((gtk_major_version > major) ||
7602 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
7603 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
7604 {
7605 return 0;
7606 }
7607 else
7608 {
7609 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
7610 gtk_major_version, gtk_minor_version, gtk_micro_version);
7611 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
7612 major, minor, micro);
7613 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
7614 printf("***\n");
7615 printf("*** If you have already installed a sufficiently new version, this error\n");
7616 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
7617 printf("*** being found. The easiest way to fix this is to remove the old version\n");
7618 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
7619 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
7620 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
7621 printf("*** so that the correct libraries are found at run-time))\n");
7622 }
7623 }
7624 return 1;
7625 }
7626 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
7627 CFLAGS="$ac_save_CFLAGS"
7628 LIBS="$ac_save_LIBS"
7629 fi
7630 fi
7631 if test "x$no_gtk" = x ; then
7632 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
7633 ifelse([$2], , :, [$2])
7634 else
7635 AC_MSG_RESULT(no)
7636 if test "$PKG_CONFIG" = "no" ; then
7637 echo "*** A new enough version of pkg-config was not found."
7638 echo "*** See http://pkgconfig.sourceforge.net"
7639 else
7640 if test -f conf.gtktest ; then
7641 :
7642 else
7643 echo "*** Could not run GTK+ test program, checking why..."
7644 ac_save_CFLAGS="$CFLAGS"
7645 ac_save_LIBS="$LIBS"
7646 CFLAGS="$CFLAGS $GTK_CFLAGS"
7647 LIBS="$LIBS $GTK_LIBS"
7648 AC_TRY_LINK([
7649 #include <gtk/gtk.h>
7650 #include <stdio.h>
7651 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
7652 [ echo "*** The test program compiled, but did not run. This usually means"
7653 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
7654 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
7655 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7656 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7657 echo "*** is required on your system"
7658 echo "***"
7659 echo "*** If you have an old version installed, it is best to remove it, although"
7660 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
7661 [ echo "*** The test program failed to compile or link. See the file config.log for the"
7662 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
7663 CFLAGS="$ac_save_CFLAGS"
7664 LIBS="$ac_save_LIBS"
7665 fi
7666 fi
7667 GTK_CFLAGS=""
7668 GTK_LIBS=""
7669 ifelse([$3], , :, [$3])
7670 fi
7671 AC_SUBST(GTK_CFLAGS)
7672 AC_SUBST(GTK_LIBS)
7673 rm -f conf.gtktest
7674 ])
7675
7676 # isc-posix.m4 serial 2 (gettext-0.11.2)
7677 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
7678 dnl This file is free software; the Free Software Foundation
7679 dnl gives unlimited permission to copy and/or distribute it,
7680 dnl with or without modifications, as long as this notice is preserved.
7681
7682 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
7683
7684 # This test replaces the one in autoconf.
7685 # Currently this macro should have the same name as the autoconf macro
7686 # because gettext's gettext.m4 (distributed in the automake package)
7687 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
7688 # give these diagnostics:
7689 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
7690 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
7691
7692 undefine([AC_ISC_POSIX])
7693
7694 AC_DEFUN([AC_ISC_POSIX],
7695 [
7696 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
7697 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
7698 ]
7699 )
7700
7701
7702 # Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
7703
7704 # This program is free software; you can redistribute it and/or modify
7705 # it under the terms of the GNU General Public License as published by
7706 # the Free Software Foundation; either version 2, or (at your option)
7707 # any later version.
7708
7709 # This program is distributed in the hope that it will be useful,
7710 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7711 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7712 # GNU General Public License for more details.
7713
7714 # You should have received a copy of the GNU General Public License
7715 # along with this program; if not, write to the Free Software
7716 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7717 # 02111-1307, USA.
7718
7719 # serial 2
7720
7721 # @defmac AC_PROG_CC_STDC
7722 # @maindex PROG_CC_STDC
7723 # @ovindex CC
7724 # If the C compiler in not in ANSI C mode by default, try to add an option
7725 # to output variable @code{CC} to make it so. This macro tries various
7726 # options that select ANSI C on some system or another. It considers the
7727 # compiler to be in ANSI C mode if it handles function prototypes correctly.
7728 #
7729 # If you use this macro, you should check after calling it whether the C
7730 # compiler has been set to accept ANSI C; if not, the shell variable
7731 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
7732 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
7733 # program @code{ansi2knr}, which comes with Ghostscript.
7734 # @end defmac
7735
7736 AC_DEFUN([AM_PROG_CC_STDC],
7737 [AC_REQUIRE([AC_PROG_CC])
7738 AC_BEFORE([$0], [AC_C_INLINE])
7739 AC_BEFORE([$0], [AC_C_CONST])
7740 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
7741 dnl a magic option to avoid problems with ANSI preprocessor commands
7742 dnl like #elif.
7743 dnl FIXME: can't do this because then AC_AIX won't work due to a
7744 dnl circular dependency.
7745 dnl AC_BEFORE([$0], [AC_PROG_CPP])
7746 AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
7747 AC_CACHE_VAL(am_cv_prog_cc_stdc,
7748 [am_cv_prog_cc_stdc=no
7749 ac_save_CC="$CC"
7750 # Don't try gcc -ansi; that turns off useful extensions and
7751 # breaks some systems' header files.
7752 # AIX -qlanglvl=ansi
7753 # Ultrix and OSF/1 -std1
7754 # HP-UX 10.20 and later -Ae
7755 # HP-UX older versions -Aa -D_HPUX_SOURCE
7756 # SVR4 -Xc -D__EXTENSIONS__
7757 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7758 do
7759 CC="$ac_save_CC $ac_arg"
7760 AC_TRY_COMPILE(
7761 [#include <stdarg.h>
7762 #include <stdio.h>
7763 #include <sys/types.h>
7764 #include <sys/stat.h>
7765 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7766 struct buf { int x; };
7767 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7768 static char *e (p, i)
7769 char **p;
7770 int i;
7771 {
7772 return p[i];
7773 }
7774 static char *f (char * (*g) (char **, int), char **p, ...)
7775 {
7776 char *s;
7777 va_list v;
7778 va_start (v,p);
7779 s = g (p, va_arg (v,int));
7780 va_end (v);
7781 return s;
7782 }
7783 int test (int i, double x);
7784 struct s1 {int (*f) (int a);};
7785 struct s2 {int (*f) (double a);};
7786 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7787 int argc;
7788 char **argv;
7789 ], [
7790 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7791 ],
7792 [am_cv_prog_cc_stdc="$ac_arg"; break])
7793 done
7794 CC="$ac_save_CC"
7795 ])
7796 if test -z "$am_cv_prog_cc_stdc"; then
7797 AC_MSG_RESULT([none needed])
7798 else
7799 AC_MSG_RESULT([$am_cv_prog_cc_stdc])
7800 fi
7801 case "x$am_cv_prog_cc_stdc" in
7802 x|xno) ;;
7803 *) CC="$CC $am_cv_prog_cc_stdc" ;;
7804 esac
7805 ])
7806
7807 AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
7808
7809 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
7810 #
7811 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7812 #
7813 # This program is free software; you can redistribute it and/or modify
7814 # it under the terms of the GNU General Public License as published by
7815 # the Free Software Foundation; either version 2 of the License, or
7816 # (at your option) any later version.
7817 #
7818 # This program is distributed in the hope that it will be useful, but
7819 # WITHOUT ANY WARRANTY; without even the implied warranty of
7820 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7821 # General Public License for more details.
7822 #
7823 # You should have received a copy of the GNU General Public License
7824 # along with this program; if not, write to the Free Software
7825 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7826 #
7827 # As a special exception to the GNU General Public License, if you
7828 # distribute this file as part of a program that contains a
7829 # configuration script generated by Autoconf, you may include it under
7830 # the same distribution terms that you use for the rest of that program.
7831
7832 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
7833 # ----------------------------------
7834 AC_DEFUN([PKG_PROG_PKG_CONFIG],
7835 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7836 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7837 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7838 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7839 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7840 fi
7841 if test -n "$PKG_CONFIG"; then
7842 _pkg_min_version=m4_default([$1], [0.9.0])
7843 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7844 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7845 AC_MSG_RESULT([yes])
7846 else
7847 AC_MSG_RESULT([no])
7848 PKG_CONFIG=""
7849 fi
7850
7851 fi[]dnl
7852 ])# PKG_PROG_PKG_CONFIG
7853
7854 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7855 #
7856 # Check to see whether a particular set of modules exists. Similar
7857 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
7858 #
7859 #
7860 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
7861 # this or PKG_CHECK_MODULES is called, or make sure to call
7862 # PKG_CHECK_EXISTS manually
7863 # --------------------------------------------------------------
7864 AC_DEFUN([PKG_CHECK_EXISTS],
7865 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7866 if test -n "$PKG_CONFIG" && \
7867 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7868 m4_ifval([$2], [$2], [:])
7869 m4_ifvaln([$3], [else
7870 $3])dnl
7871 fi])
7872
7873
7874 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7875 # ---------------------------------------------
7876 m4_define([_PKG_CONFIG],
7877 [if test -n "$PKG_CONFIG"; then
7878 if test -n "$$1"; then
7879 pkg_cv_[]$1="$$1"
7880 else
7881 PKG_CHECK_EXISTS([$3],
7882 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7883 [pkg_failed=yes])
7884 fi
7885 else
7886 pkg_failed=untried
7887 fi[]dnl
7888 ])# _PKG_CONFIG
7889
7890 # _PKG_SHORT_ERRORS_SUPPORTED
7891 # -----------------------------
7892 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
7893 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
7894 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7895 _pkg_short_errors_supported=yes
7896 else
7897 _pkg_short_errors_supported=no
7898 fi[]dnl
7899 ])# _PKG_SHORT_ERRORS_SUPPORTED
7900
7901
7902 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7903 # [ACTION-IF-NOT-FOUND])
7904 #
7905 #
7906 # Note that if there is a possibility the first call to
7907 # PKG_CHECK_MODULES might not happen, you should be sure to include an
7908 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7909 #
7910 #
7911 # --------------------------------------------------------------
7912 AC_DEFUN([PKG_CHECK_MODULES],
7913 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7914 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7915 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7916
7917 pkg_failed=no
7918 AC_MSG_CHECKING([for $1])
7919
7920 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7921 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
7922
7923 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
7924 and $1[]_LIBS to avoid the need to call pkg-config.
7925 See the pkg-config man page for more details.])
7926
7927 if test $pkg_failed = yes; then
7928 _PKG_SHORT_ERRORS_SUPPORTED
7929 if test $_pkg_short_errors_supported = yes; then
7930 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
7931 else
7932 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7933 fi
7934 # Put the nasty error message in config.log where it belongs
7935 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
7936
7937 ifelse([$4], , [AC_MSG_ERROR(dnl
7938 [Package requirements ($2) were not met:
7939
7940 $$1_PKG_ERRORS
7941
7942 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7943 installed software in a non-standard prefix.
7944
7945 _PKG_TEXT
7946 ])],
7947 [$4])
7948 elif test $pkg_failed = untried; then
7949 ifelse([$4], , [AC_MSG_FAILURE(dnl
7950 [The pkg-config script could not be found or is too old. Make sure it
7951 is in your PATH or set the PKG_CONFIG environment variable to the full
7952 path to pkg-config.
7953
7954 _PKG_TEXT
7955
7956 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
7957 [$4])
7958 else
7959 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7960 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7961 AC_MSG_RESULT([yes])
7962 ifelse([$3], , :, [$3])
7963 fi[]dnl
7964 ])# PKG_CHECK_MODULES
7965
This page took 0.260206 seconds and 4 git commands to generate.