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