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