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