OSDN Git Service

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