Initialize the gmime for upstream
[platform/upstream/gmime.git] / aclocal.m4
1 # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5 # Inc.
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18 [m4_warning([this file was generated for autoconf 2.68.
19 You have another version of autoconf.  It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
23 # Configure paths for GLIB
24 # Owen Taylor     1997-2001
25
26 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
27 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
28 dnl gthread, or gio is specified in MODULES, pass to pkg-config
29 dnl
30 AC_DEFUN([AM_PATH_GLIB_2_0],
31 [dnl 
32 dnl Get the cflags and libraries from pkg-config
33 dnl
34 AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
35                     , enable_glibtest=yes)
36
37   pkg_config_args=glib-2.0
38   for module in . $4
39   do
40       case "$module" in
41          gmodule) 
42              pkg_config_args="$pkg_config_args gmodule-2.0"
43          ;;
44          gmodule-no-export) 
45              pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
46          ;;
47          gobject) 
48              pkg_config_args="$pkg_config_args gobject-2.0"
49          ;;
50          gthread) 
51              pkg_config_args="$pkg_config_args gthread-2.0"
52          ;;
53          gio*) 
54              pkg_config_args="$pkg_config_args $module-2.0"
55          ;;
56       esac
57   done
58
59   PKG_PROG_PKG_CONFIG([0.16])
60
61   no_glib=""
62
63   if test "x$PKG_CONFIG" = x ; then
64     no_glib=yes
65     PKG_CONFIG=no
66   fi
67
68   min_glib_version=ifelse([$1], ,2.0.0,$1)
69   AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
70
71   if test x$PKG_CONFIG != xno ; then
72     ## don't try to run the test against uninstalled libtool libs
73     if $PKG_CONFIG --uninstalled $pkg_config_args; then
74           echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
75           enable_glibtest=no
76     fi
77
78     if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
79           :
80     else
81           no_glib=yes
82     fi
83   fi
84
85   if test x"$no_glib" = x ; then
86     GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
87     GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
88     GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
89     GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
90
91     GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
92     GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
93     glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
94            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
95     glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
96            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
97     glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
98            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
99     if test "x$enable_glibtest" = "xyes" ; then
100       ac_save_CFLAGS="$CFLAGS"
101       ac_save_LIBS="$LIBS"
102       CFLAGS="$CFLAGS $GLIB_CFLAGS"
103       LIBS="$GLIB_LIBS $LIBS"
104 dnl
105 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
106 dnl checks the results of pkg-config to some extent)
107 dnl
108       rm -f conf.glibtest
109       AC_TRY_RUN([
110 #include <glib.h>
111 #include <stdio.h>
112 #include <stdlib.h>
113
114 int 
115 main ()
116 {
117   unsigned int major, minor, micro;
118   char *tmp_version;
119
120   fclose (fopen ("conf.glibtest", "w"));
121
122   /* HP/UX 9 (%@#!) writes to sscanf strings */
123   tmp_version = g_strdup("$min_glib_version");
124   if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, &micro) != 3) {
125      printf("%s, bad version string\n", "$min_glib_version");
126      exit(1);
127    }
128
129   if ((glib_major_version != $glib_config_major_version) ||
130       (glib_minor_version != $glib_config_minor_version) ||
131       (glib_micro_version != $glib_config_micro_version))
132     {
133       printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
134              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
135              glib_major_version, glib_minor_version, glib_micro_version);
136       printf ("*** was found! If pkg-config was correct, then it is best\n");
137       printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
138       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
139       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
140       printf("*** required on your system.\n");
141       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
142       printf("*** to point to the correct configuration files\n");
143     } 
144   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
145            (glib_minor_version != GLIB_MINOR_VERSION) ||
146            (glib_micro_version != GLIB_MICRO_VERSION))
147     {
148       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
149              GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
150       printf("*** library (version %d.%d.%d)\n",
151              glib_major_version, glib_minor_version, glib_micro_version);
152     }
153   else
154     {
155       if ((glib_major_version > major) ||
156         ((glib_major_version == major) && (glib_minor_version > minor)) ||
157         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
158       {
159         return 0;
160        }
161      else
162       {
163         printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
164                glib_major_version, glib_minor_version, glib_micro_version);
165         printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
166                major, minor, micro);
167         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
168         printf("***\n");
169         printf("*** If you have already installed a sufficiently new version, this error\n");
170         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
171         printf("*** being found. The easiest way to fix this is to remove the old version\n");
172         printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
173         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
174         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
175         printf("*** so that the correct libraries are found at run-time))\n");
176       }
177     }
178   return 1;
179 }
180 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
181        CFLAGS="$ac_save_CFLAGS"
182        LIBS="$ac_save_LIBS"
183      fi
184   fi
185   if test "x$no_glib" = x ; then
186      AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
187      ifelse([$2], , :, [$2])     
188   else
189      AC_MSG_RESULT(no)
190      if test "$PKG_CONFIG" = "no" ; then
191        echo "*** A new enough version of pkg-config was not found."
192        echo "*** See http://www.freedesktop.org/software/pkgconfig/"
193      else
194        if test -f conf.glibtest ; then
195         :
196        else
197           echo "*** Could not run GLIB test program, checking why..."
198           ac_save_CFLAGS="$CFLAGS"
199           ac_save_LIBS="$LIBS"
200           CFLAGS="$CFLAGS $GLIB_CFLAGS"
201           LIBS="$LIBS $GLIB_LIBS"
202           AC_TRY_LINK([
203 #include <glib.h>
204 #include <stdio.h>
205 ],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
206         [ echo "*** The test program compiled, but did not run. This usually means"
207           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
208           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
209           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
210           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
211           echo "*** is required on your system"
212           echo "***"
213           echo "*** If you have an old version installed, it is best to remove it, although"
214           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
215         [ echo "*** The test program failed to compile or link. See the file config.log for the"
216           echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
217           CFLAGS="$ac_save_CFLAGS"
218           LIBS="$ac_save_LIBS"
219        fi
220      fi
221      GLIB_CFLAGS=""
222      GLIB_LIBS=""
223      GLIB_GENMARSHAL=""
224      GOBJECT_QUERY=""
225      GLIB_MKENUMS=""
226      GLIB_COMPILE_RESOURCES=""
227      ifelse([$3], , :, [$3])
228   fi
229   AC_SUBST(GLIB_CFLAGS)
230   AC_SUBST(GLIB_LIBS)
231   AC_SUBST(GLIB_GENMARSHAL)
232   AC_SUBST(GOBJECT_QUERY)
233   AC_SUBST(GLIB_MKENUMS)
234   AC_SUBST(GLIB_COMPILE_RESOURCES)
235   rm -f conf.glibtest
236 ])
237
238 # gpgme.m4 - autoconf macro to detect GPGME.
239 # Copyright (C) 2002, 2003, 2004 g10 Code GmbH
240 #
241 # This file is free software; as a special exception the author gives
242 # unlimited permission to copy and/or distribute it, with or without
243 # modifications, as long as this notice is preserved.
244 #
245 # This file is distributed in the hope that it will be useful, but
246 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
247 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
248
249
250 AC_DEFUN([_AM_PATH_GPGME_CONFIG],
251 [ AC_ARG_WITH(gpgme-prefix,
252             AC_HELP_STRING([--with-gpgme-prefix=PFX],
253                            [prefix where GPGME is installed (optional)]),
254      gpgme_config_prefix="$withval", gpgme_config_prefix="")
255   if test "x$gpgme_config_prefix" != x ; then
256       GPGME_CONFIG="$gpgme_config_prefix/bin/gpgme-config"
257   fi
258   AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
259
260   if test "$GPGME_CONFIG" != "no" ; then
261     gpgme_version=`$GPGME_CONFIG --version`
262   fi
263   gpgme_version_major=`echo $gpgme_version | \
264                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
265   gpgme_version_minor=`echo $gpgme_version | \
266                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
267   gpgme_version_micro=`echo $gpgme_version | \
268                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
269 ])
270
271 dnl AM_PATH_GPGME([MINIMUM-VERSION,
272 dnl               [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
273 dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS.
274 dnl
275 AC_DEFUN([AM_PATH_GPGME],
276 [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
277   tmp=ifelse([$1], ,1:0.4.2,$1)
278   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
279      req_gpgme_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
280      min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
281   else
282      req_gpgme_api=0
283      min_gpgme_version="$tmp"
284   fi
285
286   AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
287   ok=no
288   if test "$GPGME_CONFIG" != "no" ; then
289     req_major=`echo $min_gpgme_version | \
290                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
291     req_minor=`echo $min_gpgme_version | \
292                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
293     req_micro=`echo $min_gpgme_version | \
294                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
295     if test "$gpgme_version_major" -gt "$req_major"; then
296         ok=yes
297     else 
298         if test "$gpgme_version_major" -eq "$req_major"; then
299             if test "$gpgme_version_minor" -gt "$req_minor"; then
300                ok=yes
301             else
302                if test "$gpgme_version_minor" -eq "$req_minor"; then
303                    if test "$gpgme_version_micro" -ge "$req_micro"; then
304                      ok=yes
305                    fi
306                fi
307             fi
308         fi
309     fi
310   fi
311   if test $ok = yes; then
312      # If we have a recent GPGME, we should also check that the
313      # API is compatible.
314      if test "$req_gpgme_api" -gt 0 ; then
315         tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
316         if test "$tmp" -gt 0 ; then
317            if test "$req_gpgme_api" -ne "$tmp" ; then
318              ok=no
319            fi
320         fi
321      fi
322   fi
323   if test $ok = yes; then
324     GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
325     GPGME_LIBS=`$GPGME_CONFIG --libs`
326     AC_MSG_RESULT(yes)
327     ifelse([$2], , :, [$2])
328   else
329     GPGME_CFLAGS=""
330     GPGME_LIBS=""
331     AC_MSG_RESULT(no)
332     ifelse([$3], , :, [$3])
333   fi
334   AC_SUBST(GPGME_CFLAGS)
335   AC_SUBST(GPGME_LIBS)
336 ])
337
338 dnl AM_PATH_GPGME_PTH([MINIMUM-VERSION,
339 dnl                   [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
340 dnl Test for libgpgme and define GPGME_PTH_CFLAGS and GPGME_PTH_LIBS.
341 dnl
342 AC_DEFUN([AM_PATH_GPGME_PTH],
343 [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
344   tmp=ifelse([$1], ,1:0.4.2,$1)
345   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
346      req_gpgme_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
347      min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
348   else
349      req_gpgme_api=0
350      min_gpgme_version="$tmp"
351   fi
352
353   AC_MSG_CHECKING(for GPGME Pth - version >= $min_gpgme_version)
354   ok=no
355   if test "$GPGME_CONFIG" != "no" ; then
356     if `$GPGME_CONFIG --thread=pth 2> /dev/null` ; then
357       req_major=`echo $min_gpgme_version | \
358                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
359       req_minor=`echo $min_gpgme_version | \
360                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
361       req_micro=`echo $min_gpgme_version | \
362                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
363       if test "$gpgme_version_major" -gt "$req_major"; then
364         ok=yes
365       else 
366         if test "$gpgme_version_major" -eq "$req_major"; then
367           if test "$gpgme_version_minor" -gt "$req_minor"; then
368             ok=yes
369           else
370             if test "$gpgme_version_minor" -eq "$req_minor"; then
371               if test "$gpgme_version_micro" -ge "$req_micro"; then
372                 ok=yes
373               fi
374             fi
375           fi
376         fi
377       fi
378     fi
379   fi
380   if test $ok = yes; then
381      # If we have a recent GPGME, we should also check that the
382      # API is compatible.
383      if test "$req_gpgme_api" -gt 0 ; then
384         tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
385         if test "$tmp" -gt 0 ; then
386            if test "$req_gpgme_api" -ne "$tmp" ; then
387              ok=no
388            fi
389         fi
390      fi
391   fi
392   if test $ok = yes; then
393     GPGME_PTH_CFLAGS=`$GPGME_CONFIG --thread=pth --cflags`
394     GPGME_PTH_LIBS=`$GPGME_CONFIG --thread=pth --libs`
395     AC_MSG_RESULT(yes)
396     ifelse([$2], , :, [$2])
397   else
398     GPGME_PTH_CFLAGS=""
399     GPGME_PTH_LIBS=""
400     AC_MSG_RESULT(no)
401     ifelse([$3], , :, [$3])
402   fi
403   AC_SUBST(GPGME_PTH_CFLAGS)
404   AC_SUBST(GPGME_PTH_LIBS)
405 ])
406
407 dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION,
408 dnl                       [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
409 dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS
410 dnl  and GPGME_PTHREAD_LIBS.
411 dnl
412 AC_DEFUN([AM_PATH_GPGME_PTHREAD],
413 [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
414   tmp=ifelse([$1], ,1:0.4.2,$1)
415   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
416      req_gpgme_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
417      min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
418   else
419      req_gpgme_api=0
420      min_gpgme_version="$tmp"
421   fi
422
423   AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
424   ok=no
425   if test "$GPGME_CONFIG" != "no" ; then
426     if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then
427       req_major=`echo $min_gpgme_version | \
428                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
429       req_minor=`echo $min_gpgme_version | \
430                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
431       req_micro=`echo $min_gpgme_version | \
432                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
433       if test "$gpgme_version_major" -gt "$req_major"; then
434         ok=yes
435       else 
436         if test "$gpgme_version_major" -eq "$req_major"; then
437           if test "$gpgme_version_minor" -gt "$req_minor"; then
438             ok=yes
439           else
440             if test "$gpgme_version_minor" -eq "$req_minor"; then
441               if test "$gpgme_version_micro" -ge "$req_micro"; then
442                 ok=yes
443               fi
444             fi
445           fi
446         fi
447       fi
448     fi
449   fi
450   if test $ok = yes; then
451      # If we have a recent GPGME, we should also check that the
452      # API is compatible.
453      if test "$req_gpgme_api" -gt 0 ; then
454         tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
455         if test "$tmp" -gt 0 ; then
456            if test "$req_gpgme_api" -ne "$tmp" ; then
457              ok=no
458            fi
459         fi
460      fi
461   fi
462   if test $ok = yes; then
463     GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags`
464     GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
465     AC_MSG_RESULT(yes)
466     ifelse([$2], , :, [$2])
467   else
468     GPGME_PTHREAD_CFLAGS=""
469     GPGME_PTHREAD_LIBS=""
470     AC_MSG_RESULT(no)
471     ifelse([$3], , :, [$3])
472   fi
473   AC_SUBST(GPGME_PTHREAD_CFLAGS)
474   AC_SUBST(GPGME_PTHREAD_LIBS)
475 ])
476
477
478 dnl AM_PATH_GPGME_GLIB([MINIMUM-VERSION,
479 dnl               [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
480 dnl Test for libgpgme-glib and define GPGME_GLIB_CFLAGS and GPGME_GLIB_LIBS.
481 dnl
482 AC_DEFUN([AM_PATH_GPGME_GLIB],
483 [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
484   tmp=ifelse([$1], ,1:0.4.2,$1)
485   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
486      req_gpgme_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
487      min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
488   else
489      req_gpgme_api=0
490      min_gpgme_version="$tmp"
491   fi
492
493   AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
494   ok=no
495   if test "$GPGME_CONFIG" != "no" ; then
496     req_major=`echo $min_gpgme_version | \
497                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
498     req_minor=`echo $min_gpgme_version | \
499                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
500     req_micro=`echo $min_gpgme_version | \
501                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
502     if test "$gpgme_version_major" -gt "$req_major"; then
503         ok=yes
504     else 
505         if test "$gpgme_version_major" -eq "$req_major"; then
506             if test "$gpgme_version_minor" -gt "$req_minor"; then
507                ok=yes
508             else
509                if test "$gpgme_version_minor" -eq "$req_minor"; then
510                    if test "$gpgme_version_micro" -ge "$req_micro"; then
511                      ok=yes
512                    fi
513                fi
514             fi
515         fi
516     fi
517   fi
518   if test $ok = yes; then
519      # If we have a recent GPGME, we should also check that the
520      # API is compatible.
521      if test "$req_gpgme_api" -gt 0 ; then
522         tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
523         if test "$tmp" -gt 0 ; then
524            if test "$req_gpgme_api" -ne "$tmp" ; then
525              ok=no
526            fi
527         fi
528      fi
529   fi
530   if test $ok = yes; then
531     GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
532     GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
533     AC_MSG_RESULT(yes)
534     ifelse([$2], , :, [$2])
535   else
536     GPGME_GLIB_CFLAGS=""
537     GPGME_GLIB_LIBS=""
538     AC_MSG_RESULT(no)
539     ifelse([$3], , :, [$3])
540   fi
541   AC_SUBST(GPGME_GLIB_CFLAGS)
542   AC_SUBST(GPGME_GLIB_LIBS)
543 ])
544
545
546 dnl -*- mode: autoconf -*-
547
548 # serial 1
549
550 dnl Usage:
551 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
552 AC_DEFUN([GTK_DOC_CHECK],
553 [
554   AC_REQUIRE([PKG_PROG_PKG_CONFIG])
555   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
556   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
557
558   dnl check for tools we added during development
559   AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
560   AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
561   AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
562
563   dnl for overriding the documentation installation directory
564   AC_ARG_WITH([html-dir],
565     AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
566     [with_html_dir='${datadir}/gtk-doc/html'])
567   HTML_DIR="$with_html_dir"
568   AC_SUBST([HTML_DIR])
569
570   dnl enable/disable documentation building
571   AC_ARG_ENABLE([gtk-doc],
572     AS_HELP_STRING([--enable-gtk-doc],
573                    [use gtk-doc to build documentation [[default=no]]]),,
574     [enable_gtk_doc=no])
575
576   if test x$enable_gtk_doc = xyes; then
577     ifelse([$1],[],
578       [PKG_CHECK_EXISTS([gtk-doc],,
579                         AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
580       [PKG_CHECK_EXISTS([gtk-doc >= $1],,
581                         AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
582     dnl don't check for glib if we build glib
583     if test "x$PACKAGE_NAME" != "xglib"; then
584       dnl don't fail if someone does not have glib
585       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
586     fi
587   fi
588
589   AC_MSG_CHECKING([whether to build gtk-doc documentation])
590   AC_MSG_RESULT($enable_gtk_doc)
591
592   dnl enable/disable output formats
593   AC_ARG_ENABLE([gtk-doc-html],
594     AS_HELP_STRING([--enable-gtk-doc-html],
595                    [build documentation in html format [[default=yes]]]),,
596     [enable_gtk_doc_html=yes])
597     AC_ARG_ENABLE([gtk-doc-pdf],
598       AS_HELP_STRING([--enable-gtk-doc-pdf],
599                      [build documentation in pdf format [[default=no]]]),,
600       [enable_gtk_doc_pdf=no])
601
602   if test -z "$GTKDOC_MKPDF"; then
603     enable_gtk_doc_pdf=no
604   fi
605
606
607   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
608   AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
609   AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
610   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
611   AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
612 ])
613
614 # iconv.m4 serial 11 (gettext-0.18.1)
615 dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
616 dnl This file is free software; the Free Software Foundation
617 dnl gives unlimited permission to copy and/or distribute it,
618 dnl with or without modifications, as long as this notice is preserved.
619
620 dnl From Bruno Haible.
621
622 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
623 [
624   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
625   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
626   AC_REQUIRE([AC_LIB_RPATH])
627
628   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
629   dnl accordingly.
630   AC_LIB_LINKFLAGS_BODY([iconv])
631 ])
632
633 AC_DEFUN([AM_ICONV_LINK],
634 [
635   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
636   dnl those with the standalone portable GNU libiconv installed).
637   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
638
639   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
640   dnl accordingly.
641   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
642
643   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
644   dnl because if the user has installed libiconv and not disabled its use
645   dnl via --without-libiconv-prefix, he wants to use it. The first
646   dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
647   am_save_CPPFLAGS="$CPPFLAGS"
648   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
649
650   AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
651     am_cv_func_iconv="no, consider installing GNU libiconv"
652     am_cv_lib_iconv=no
653     AC_TRY_LINK([#include <stdlib.h>
654 #include <iconv.h>],
655       [iconv_t cd = iconv_open("","");
656        iconv(cd,NULL,NULL,NULL,NULL);
657        iconv_close(cd);],
658       [am_cv_func_iconv=yes])
659     if test "$am_cv_func_iconv" != yes; then
660       am_save_LIBS="$LIBS"
661       LIBS="$LIBS $LIBICONV"
662       AC_TRY_LINK([#include <stdlib.h>
663 #include <iconv.h>],
664         [iconv_t cd = iconv_open("","");
665          iconv(cd,NULL,NULL,NULL,NULL);
666          iconv_close(cd);],
667         [am_cv_lib_iconv=yes]
668         [am_cv_func_iconv=yes])
669       LIBS="$am_save_LIBS"
670     fi
671   ])
672   if test "$am_cv_func_iconv" = yes; then
673     AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
674       dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
675       am_save_LIBS="$LIBS"
676       if test $am_cv_lib_iconv = yes; then
677         LIBS="$LIBS $LIBICONV"
678       fi
679       AC_TRY_RUN([
680 #include <iconv.h>
681 #include <string.h>
682 int main ()
683 {
684   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
685      returns.  */
686   {
687     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
688     if (cd_utf8_to_88591 != (iconv_t)(-1))
689       {
690         static const char input[] = "\342\202\254"; /* EURO SIGN */
691         char buf[10];
692         const char *inptr = input;
693         size_t inbytesleft = strlen (input);
694         char *outptr = buf;
695         size_t outbytesleft = sizeof (buf);
696         size_t res = iconv (cd_utf8_to_88591,
697                             (char **) &inptr, &inbytesleft,
698                             &outptr, &outbytesleft);
699         if (res == 0)
700           return 1;
701       }
702   }
703   /* Test against Solaris 10 bug: Failures are not distinguishable from
704      successful returns.  */
705   {
706     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
707     if (cd_ascii_to_88591 != (iconv_t)(-1))
708       {
709         static const char input[] = "\263";
710         char buf[10];
711         const char *inptr = input;
712         size_t inbytesleft = strlen (input);
713         char *outptr = buf;
714         size_t outbytesleft = sizeof (buf);
715         size_t res = iconv (cd_ascii_to_88591,
716                             (char **) &inptr, &inbytesleft,
717                             &outptr, &outbytesleft);
718         if (res == 0)
719           return 1;
720       }
721   }
722 #if 0 /* This bug could be worked around by the caller.  */
723   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
724   {
725     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
726     if (cd_88591_to_utf8 != (iconv_t)(-1))
727       {
728         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
729         char buf[50];
730         const char *inptr = input;
731         size_t inbytesleft = strlen (input);
732         char *outptr = buf;
733         size_t outbytesleft = sizeof (buf);
734         size_t res = iconv (cd_88591_to_utf8,
735                             (char **) &inptr, &inbytesleft,
736                             &outptr, &outbytesleft);
737         if ((int)res > 0)
738           return 1;
739       }
740   }
741 #endif
742   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
743      provided.  */
744   if (/* Try standardized names.  */
745       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
746       /* Try IRIX, OSF/1 names.  */
747       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
748       /* Try AIX names.  */
749       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
750       /* Try HP-UX names.  */
751       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
752     return 1;
753   return 0;
754 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
755         [case "$host_os" in
756            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
757            *)            am_cv_func_iconv_works="guessing yes" ;;
758          esac])
759       LIBS="$am_save_LIBS"
760     ])
761     case "$am_cv_func_iconv_works" in
762       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
763       *)   am_func_iconv=yes ;;
764     esac
765   else
766     am_func_iconv=no am_cv_lib_iconv=no
767   fi
768   if test "$am_func_iconv" = yes; then
769     AC_DEFINE([HAVE_ICONV], [1],
770       [Define if you have the iconv() function and it works.])
771   fi
772   if test "$am_cv_lib_iconv" = yes; then
773     AC_MSG_CHECKING([how to link with libiconv])
774     AC_MSG_RESULT([$LIBICONV])
775   else
776     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
777     dnl either.
778     CPPFLAGS="$am_save_CPPFLAGS"
779     LIBICONV=
780     LTLIBICONV=
781   fi
782   AC_SUBST([LIBICONV])
783   AC_SUBST([LTLIBICONV])
784 ])
785
786 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
787 dnl avoid warnings like
788 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
789 dnl This is tricky because of the way 'aclocal' is implemented:
790 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
791 dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
792 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
793 dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
794 dnl   warnings.
795 m4_define([gl_iconv_AC_DEFUN],
796   m4_version_prereq([2.64],
797     [[AC_DEFUN_ONCE(
798         [$1], [$2])]],
799     [[AC_DEFUN(
800         [$1], [$2])]]))
801 gl_iconv_AC_DEFUN([AM_ICONV],
802 [
803   AM_ICONV_LINK
804   if test "$am_cv_func_iconv" = yes; then
805     AC_MSG_CHECKING([for iconv declaration])
806     AC_CACHE_VAL([am_cv_proto_iconv], [
807       AC_TRY_COMPILE([
808 #include <stdlib.h>
809 #include <iconv.h>
810 extern
811 #ifdef __cplusplus
812 "C"
813 #endif
814 #if defined(__STDC__) || defined(__cplusplus)
815 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
816 #else
817 size_t iconv();
818 #endif
819 ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
820       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
821     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
822     AC_MSG_RESULT([
823          $am_cv_proto_iconv])
824     AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
825       [Define as const if the declaration of iconv() needs const.])
826   fi
827 ])
828
829 # lib-ld.m4 serial 4 (gettext-0.18)
830 dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
831 dnl This file is free software; the Free Software Foundation
832 dnl gives unlimited permission to copy and/or distribute it,
833 dnl with or without modifications, as long as this notice is preserved.
834
835 dnl Subroutines of libtool.m4,
836 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
837 dnl with libtool.m4.
838
839 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
840 AC_DEFUN([AC_LIB_PROG_LD_GNU],
841 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
842 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
843 case `$LD -v 2>&1 </dev/null` in
844 *GNU* | *'with BFD'*)
845   acl_cv_prog_gnu_ld=yes ;;
846 *)
847   acl_cv_prog_gnu_ld=no ;;
848 esac])
849 with_gnu_ld=$acl_cv_prog_gnu_ld
850 ])
851
852 dnl From libtool-1.4. Sets the variable LD.
853 AC_DEFUN([AC_LIB_PROG_LD],
854 [AC_ARG_WITH([gnu-ld],
855 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
856 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
857 AC_REQUIRE([AC_PROG_CC])dnl
858 AC_REQUIRE([AC_CANONICAL_HOST])dnl
859 # Prepare PATH_SEPARATOR.
860 # The user is always right.
861 if test "${PATH_SEPARATOR+set}" != set; then
862   echo "#! /bin/sh" >conf$$.sh
863   echo  "exit 0"   >>conf$$.sh
864   chmod +x conf$$.sh
865   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
866     PATH_SEPARATOR=';'
867   else
868     PATH_SEPARATOR=:
869   fi
870   rm -f conf$$.sh
871 fi
872 ac_prog=ld
873 if test "$GCC" = yes; then
874   # Check if gcc -print-prog-name=ld gives a path.
875   AC_MSG_CHECKING([for ld used by GCC])
876   case $host in
877   *-*-mingw*)
878     # gcc leaves a trailing carriage return which upsets mingw
879     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
880   *)
881     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
882   esac
883   case $ac_prog in
884     # Accept absolute paths.
885     [[\\/]* | [A-Za-z]:[\\/]*)]
886       [re_direlt='/[^/][^/]*/\.\./']
887       # Canonicalize the path of ld
888       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
889       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
890         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
891       done
892       test -z "$LD" && LD="$ac_prog"
893       ;;
894   "")
895     # If it fails, then pretend we aren't using GCC.
896     ac_prog=ld
897     ;;
898   *)
899     # If it is relative, then search for the first ld in PATH.
900     with_gnu_ld=unknown
901     ;;
902   esac
903 elif test "$with_gnu_ld" = yes; then
904   AC_MSG_CHECKING([for GNU ld])
905 else
906   AC_MSG_CHECKING([for non-GNU ld])
907 fi
908 AC_CACHE_VAL([acl_cv_path_LD],
909 [if test -z "$LD"; then
910   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
911   for ac_dir in $PATH; do
912     test -z "$ac_dir" && ac_dir=.
913     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
914       acl_cv_path_LD="$ac_dir/$ac_prog"
915       # Check to see if the program is GNU ld.  I'd rather use --version,
916       # but apparently some GNU ld's only accept -v.
917       # Break only if it was the GNU/non-GNU ld that we prefer.
918       case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
919       *GNU* | *'with BFD'*)
920         test "$with_gnu_ld" != no && break ;;
921       *)
922         test "$with_gnu_ld" != yes && break ;;
923       esac
924     fi
925   done
926   IFS="$ac_save_ifs"
927 else
928   acl_cv_path_LD="$LD" # Let the user override the test with a path.
929 fi])
930 LD="$acl_cv_path_LD"
931 if test -n "$LD"; then
932   AC_MSG_RESULT([$LD])
933 else
934   AC_MSG_RESULT([no])
935 fi
936 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
937 AC_LIB_PROG_LD_GNU
938 ])
939
940 # lib-link.m4 serial 21 (gettext-0.18)
941 dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
942 dnl This file is free software; the Free Software Foundation
943 dnl gives unlimited permission to copy and/or distribute it,
944 dnl with or without modifications, as long as this notice is preserved.
945
946 dnl From Bruno Haible.
947
948 AC_PREREQ([2.54])
949
950 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
951 dnl the libraries corresponding to explicit and implicit dependencies.
952 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
953 dnl augments the CPPFLAGS variable.
954 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
955 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
956 AC_DEFUN([AC_LIB_LINKFLAGS],
957 [
958   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
959   AC_REQUIRE([AC_LIB_RPATH])
960   pushdef([Name],[translit([$1],[./-], [___])])
961   pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
962                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
963   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
964     AC_LIB_LINKFLAGS_BODY([$1], [$2])
965     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
966     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
967     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
968     ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
969   ])
970   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
971   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
972   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
973   LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
974   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
975   AC_SUBST([LIB]NAME)
976   AC_SUBST([LTLIB]NAME)
977   AC_SUBST([LIB]NAME[_PREFIX])
978   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
979   dnl results of this search when this library appears as a dependency.
980   HAVE_LIB[]NAME=yes
981   popdef([NAME])
982   popdef([Name])
983 ])
984
985 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
986 dnl searches for libname and the libraries corresponding to explicit and
987 dnl implicit dependencies, together with the specified include files and
988 dnl the ability to compile and link the specified testcode. The missing-message
989 dnl defaults to 'no' and may contain additional hints for the user.
990 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
991 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
992 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
993 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
994 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
995 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
996 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
997 [
998   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
999   AC_REQUIRE([AC_LIB_RPATH])
1000   pushdef([Name],[translit([$1],[./-], [___])])
1001   pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1002                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1003
1004   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1005   dnl accordingly.
1006   AC_LIB_LINKFLAGS_BODY([$1], [$2])
1007
1008   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1009   dnl because if the user has installed lib[]Name and not disabled its use
1010   dnl via --without-lib[]Name-prefix, he wants to use it.
1011   ac_save_CPPFLAGS="$CPPFLAGS"
1012   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1013
1014   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1015     ac_save_LIBS="$LIBS"
1016     dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1017     dnl because these -l options might require -L options that are present in
1018     dnl LIBS. -l options benefit only from the -L options listed before it.
1019     dnl Otherwise, add it to the front of LIBS, because it may be a static
1020     dnl library that depends on another static library that is present in LIBS.
1021     dnl Static libraries benefit only from the static libraries listed after
1022     dnl it.
1023     case " $LIB[]NAME" in
1024       *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1025       *)       LIBS="$LIB[]NAME $LIBS" ;;
1026     esac
1027     AC_TRY_LINK([$3], [$4],
1028       [ac_cv_lib[]Name=yes],
1029       [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1030     LIBS="$ac_save_LIBS"
1031   ])
1032   if test "$ac_cv_lib[]Name" = yes; then
1033     HAVE_LIB[]NAME=yes
1034     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1035     AC_MSG_CHECKING([how to link with lib[]$1])
1036     AC_MSG_RESULT([$LIB[]NAME])
1037   else
1038     HAVE_LIB[]NAME=no
1039     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1040     dnl $INC[]NAME either.
1041     CPPFLAGS="$ac_save_CPPFLAGS"
1042     LIB[]NAME=
1043     LTLIB[]NAME=
1044     LIB[]NAME[]_PREFIX=
1045   fi
1046   AC_SUBST([HAVE_LIB]NAME)
1047   AC_SUBST([LIB]NAME)
1048   AC_SUBST([LTLIB]NAME)
1049   AC_SUBST([LIB]NAME[_PREFIX])
1050   popdef([NAME])
1051   popdef([Name])
1052 ])
1053
1054 dnl Determine the platform dependent parameters needed to use rpath:
1055 dnl   acl_libext,
1056 dnl   acl_shlibext,
1057 dnl   acl_hardcode_libdir_flag_spec,
1058 dnl   acl_hardcode_libdir_separator,
1059 dnl   acl_hardcode_direct,
1060 dnl   acl_hardcode_minus_L.
1061 AC_DEFUN([AC_LIB_RPATH],
1062 [
1063   dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1064   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1065   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
1066   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
1067   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
1068   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1069   AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1070     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1071     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1072     . ./conftest.sh
1073     rm -f ./conftest.sh
1074     acl_cv_rpath=done
1075   ])
1076   wl="$acl_cv_wl"
1077   acl_libext="$acl_cv_libext"
1078   acl_shlibext="$acl_cv_shlibext"
1079   acl_libname_spec="$acl_cv_libname_spec"
1080   acl_library_names_spec="$acl_cv_library_names_spec"
1081   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1082   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1083   acl_hardcode_direct="$acl_cv_hardcode_direct"
1084   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1085   dnl Determine whether the user wants rpath handling at all.
1086   AC_ARG_ENABLE([rpath],
1087     [  --disable-rpath         do not hardcode runtime library paths],
1088     :, enable_rpath=yes)
1089 ])
1090
1091 dnl AC_LIB_FROMPACKAGE(name, package)
1092 dnl declares that libname comes from the given package. The configure file
1093 dnl will then not have a --with-libname-prefix option but a
1094 dnl --with-package-prefix option. Several libraries can come from the same
1095 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1096 dnl macro call that searches for libname.
1097 AC_DEFUN([AC_LIB_FROMPACKAGE],
1098 [
1099   pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1100                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1101   define([acl_frompackage_]NAME, [$2])
1102   popdef([NAME])
1103   pushdef([PACK],[$2])
1104   pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1105                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1106   define([acl_libsinpackage_]PACKUP,
1107     m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
1108   popdef([PACKUP])
1109   popdef([PACK])
1110 ])
1111
1112 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1113 dnl the libraries corresponding to explicit and implicit dependencies.
1114 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1115 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1116 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1117 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1118 [
1119   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1120   pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1121                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1122   pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1123   pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1124                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1125   pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1126   dnl Autoconf >= 2.61 supports dots in --with options.
1127   pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
1128   dnl By default, look in $includedir and $libdir.
1129   use_additional=yes
1130   AC_LIB_WITH_FINAL_PREFIX([
1131     eval additional_includedir=\"$includedir\"
1132     eval additional_libdir=\"$libdir\"
1133   ])
1134   AC_ARG_WITH(P_A_C_K[-prefix],
1135 [[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
1136   --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
1137 [
1138     if test "X$withval" = "Xno"; then
1139       use_additional=no
1140     else
1141       if test "X$withval" = "X"; then
1142         AC_LIB_WITH_FINAL_PREFIX([
1143           eval additional_includedir=\"$includedir\"
1144           eval additional_libdir=\"$libdir\"
1145         ])
1146       else
1147         additional_includedir="$withval/include"
1148         additional_libdir="$withval/$acl_libdirstem"
1149         if test "$acl_libdirstem2" != "$acl_libdirstem" \
1150            && ! test -d "$withval/$acl_libdirstem"; then
1151           additional_libdir="$withval/$acl_libdirstem2"
1152         fi
1153       fi
1154     fi
1155 ])
1156   dnl Search the library and its dependencies in $additional_libdir and
1157   dnl $LDFLAGS. Using breadth-first-seach.
1158   LIB[]NAME=
1159   LTLIB[]NAME=
1160   INC[]NAME=
1161   LIB[]NAME[]_PREFIX=
1162   dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1163   dnl computed. So it has to be reset here.
1164   HAVE_LIB[]NAME=
1165   rpathdirs=
1166   ltrpathdirs=
1167   names_already_handled=
1168   names_next_round='$1 $2'
1169   while test -n "$names_next_round"; do
1170     names_this_round="$names_next_round"
1171     names_next_round=
1172     for name in $names_this_round; do
1173       already_handled=
1174       for n in $names_already_handled; do
1175         if test "$n" = "$name"; then
1176           already_handled=yes
1177           break
1178         fi
1179       done
1180       if test -z "$already_handled"; then
1181         names_already_handled="$names_already_handled $name"
1182         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1183         dnl or AC_LIB_HAVE_LINKFLAGS call.
1184         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1185         eval value=\"\$HAVE_LIB$uppername\"
1186         if test -n "$value"; then
1187           if test "$value" = yes; then
1188             eval value=\"\$LIB$uppername\"
1189             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1190             eval value=\"\$LTLIB$uppername\"
1191             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1192           else
1193             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1194             dnl that this library doesn't exist. So just drop it.
1195             :
1196           fi
1197         else
1198           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1199           dnl and the already constructed $LIBNAME/$LTLIBNAME.
1200           found_dir=
1201           found_la=
1202           found_so=
1203           found_a=
1204           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
1205           if test -n "$acl_shlibext"; then
1206             shrext=".$acl_shlibext"             # typically: shrext=.so
1207           else
1208             shrext=
1209           fi
1210           if test $use_additional = yes; then
1211             dir="$additional_libdir"
1212             dnl The same code as in the loop below:
1213             dnl First look for a shared library.
1214             if test -n "$acl_shlibext"; then
1215               if test -f "$dir/$libname$shrext"; then
1216                 found_dir="$dir"
1217                 found_so="$dir/$libname$shrext"
1218               else
1219                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1220                   ver=`(cd "$dir" && \
1221                         for f in "$libname$shrext".*; do echo "$f"; done \
1222                         | sed -e "s,^$libname$shrext\\\\.,," \
1223                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1224                         | sed 1q ) 2>/dev/null`
1225                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1226                     found_dir="$dir"
1227                     found_so="$dir/$libname$shrext.$ver"
1228                   fi
1229                 else
1230                   eval library_names=\"$acl_library_names_spec\"
1231                   for f in $library_names; do
1232                     if test -f "$dir/$f"; then
1233                       found_dir="$dir"
1234                       found_so="$dir/$f"
1235                       break
1236                     fi
1237                   done
1238                 fi
1239               fi
1240             fi
1241             dnl Then look for a static library.
1242             if test "X$found_dir" = "X"; then
1243               if test -f "$dir/$libname.$acl_libext"; then
1244                 found_dir="$dir"
1245                 found_a="$dir/$libname.$acl_libext"
1246               fi
1247             fi
1248             if test "X$found_dir" != "X"; then
1249               if test -f "$dir/$libname.la"; then
1250                 found_la="$dir/$libname.la"
1251               fi
1252             fi
1253           fi
1254           if test "X$found_dir" = "X"; then
1255             for x in $LDFLAGS $LTLIB[]NAME; do
1256               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1257               case "$x" in
1258                 -L*)
1259                   dir=`echo "X$x" | sed -e 's/^X-L//'`
1260                   dnl First look for a shared library.
1261                   if test -n "$acl_shlibext"; then
1262                     if test -f "$dir/$libname$shrext"; then
1263                       found_dir="$dir"
1264                       found_so="$dir/$libname$shrext"
1265                     else
1266                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1267                         ver=`(cd "$dir" && \
1268                               for f in "$libname$shrext".*; do echo "$f"; done \
1269                               | sed -e "s,^$libname$shrext\\\\.,," \
1270                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1271                               | sed 1q ) 2>/dev/null`
1272                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1273                           found_dir="$dir"
1274                           found_so="$dir/$libname$shrext.$ver"
1275                         fi
1276                       else
1277                         eval library_names=\"$acl_library_names_spec\"
1278                         for f in $library_names; do
1279                           if test -f "$dir/$f"; then
1280                             found_dir="$dir"
1281                             found_so="$dir/$f"
1282                             break
1283                           fi
1284                         done
1285                       fi
1286                     fi
1287                   fi
1288                   dnl Then look for a static library.
1289                   if test "X$found_dir" = "X"; then
1290                     if test -f "$dir/$libname.$acl_libext"; then
1291                       found_dir="$dir"
1292                       found_a="$dir/$libname.$acl_libext"
1293                     fi
1294                   fi
1295                   if test "X$found_dir" != "X"; then
1296                     if test -f "$dir/$libname.la"; then
1297                       found_la="$dir/$libname.la"
1298                     fi
1299                   fi
1300                   ;;
1301               esac
1302               if test "X$found_dir" != "X"; then
1303                 break
1304               fi
1305             done
1306           fi
1307           if test "X$found_dir" != "X"; then
1308             dnl Found the library.
1309             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1310             if test "X$found_so" != "X"; then
1311               dnl Linking with a shared library. We attempt to hardcode its
1312               dnl directory into the executable's runpath, unless it's the
1313               dnl standard /usr/lib.
1314               if test "$enable_rpath" = no \
1315                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
1316                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1317                 dnl No hardcoding is needed.
1318                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1319               else
1320                 dnl Use an explicit option to hardcode DIR into the resulting
1321                 dnl binary.
1322                 dnl Potentially add DIR to ltrpathdirs.
1323                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1324                 haveit=
1325                 for x in $ltrpathdirs; do
1326                   if test "X$x" = "X$found_dir"; then
1327                     haveit=yes
1328                     break
1329                   fi
1330                 done
1331                 if test -z "$haveit"; then
1332                   ltrpathdirs="$ltrpathdirs $found_dir"
1333                 fi
1334                 dnl The hardcoding into $LIBNAME is system dependent.
1335                 if test "$acl_hardcode_direct" = yes; then
1336                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1337                   dnl resulting binary.
1338                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1339                 else
1340                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1341                     dnl Use an explicit option to hardcode DIR into the resulting
1342                     dnl binary.
1343                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1344                     dnl Potentially add DIR to rpathdirs.
1345                     dnl The rpathdirs will be appended to $LIBNAME at the end.
1346                     haveit=
1347                     for x in $rpathdirs; do
1348                       if test "X$x" = "X$found_dir"; then
1349                         haveit=yes
1350                         break
1351                       fi
1352                     done
1353                     if test -z "$haveit"; then
1354                       rpathdirs="$rpathdirs $found_dir"
1355                     fi
1356                   else
1357                     dnl Rely on "-L$found_dir".
1358                     dnl But don't add it if it's already contained in the LDFLAGS
1359                     dnl or the already constructed $LIBNAME
1360                     haveit=
1361                     for x in $LDFLAGS $LIB[]NAME; do
1362                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1363                       if test "X$x" = "X-L$found_dir"; then
1364                         haveit=yes
1365                         break
1366                       fi
1367                     done
1368                     if test -z "$haveit"; then
1369                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1370                     fi
1371                     if test "$acl_hardcode_minus_L" != no; then
1372                       dnl FIXME: Not sure whether we should use
1373                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1374                       dnl here.
1375                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1376                     else
1377                       dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1378                       dnl here, because this doesn't fit in flags passed to the
1379                       dnl compiler. So give up. No hardcoding. This affects only
1380                       dnl very old systems.
1381                       dnl FIXME: Not sure whether we should use
1382                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1383                       dnl here.
1384                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1385                     fi
1386                   fi
1387                 fi
1388               fi
1389             else
1390               if test "X$found_a" != "X"; then
1391                 dnl Linking with a static library.
1392                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1393               else
1394                 dnl We shouldn't come here, but anyway it's good to have a
1395                 dnl fallback.
1396                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1397               fi
1398             fi
1399             dnl Assume the include files are nearby.
1400             additional_includedir=
1401             case "$found_dir" in
1402               */$acl_libdirstem | */$acl_libdirstem/)
1403                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1404                 if test "$name" = '$1'; then
1405                   LIB[]NAME[]_PREFIX="$basedir"
1406                 fi
1407                 additional_includedir="$basedir/include"
1408                 ;;
1409               */$acl_libdirstem2 | */$acl_libdirstem2/)
1410                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1411                 if test "$name" = '$1'; then
1412                   LIB[]NAME[]_PREFIX="$basedir"
1413                 fi
1414                 additional_includedir="$basedir/include"
1415                 ;;
1416             esac
1417             if test "X$additional_includedir" != "X"; then
1418               dnl Potentially add $additional_includedir to $INCNAME.
1419               dnl But don't add it
1420               dnl   1. if it's the standard /usr/include,
1421               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1422               dnl   3. if it's already present in $CPPFLAGS or the already
1423               dnl      constructed $INCNAME,
1424               dnl   4. if it doesn't exist as a directory.
1425               if test "X$additional_includedir" != "X/usr/include"; then
1426                 haveit=
1427                 if test "X$additional_includedir" = "X/usr/local/include"; then
1428                   if test -n "$GCC"; then
1429                     case $host_os in
1430                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1431                     esac
1432                   fi
1433                 fi
1434                 if test -z "$haveit"; then
1435                   for x in $CPPFLAGS $INC[]NAME; do
1436                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1437                     if test "X$x" = "X-I$additional_includedir"; then
1438                       haveit=yes
1439                       break
1440                     fi
1441                   done
1442                   if test -z "$haveit"; then
1443                     if test -d "$additional_includedir"; then
1444                       dnl Really add $additional_includedir to $INCNAME.
1445                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1446                     fi
1447                   fi
1448                 fi
1449               fi
1450             fi
1451             dnl Look for dependencies.
1452             if test -n "$found_la"; then
1453               dnl Read the .la file. It defines the variables
1454               dnl dlname, library_names, old_library, dependency_libs, current,
1455               dnl age, revision, installed, dlopen, dlpreopen, libdir.
1456               save_libdir="$libdir"
1457               case "$found_la" in
1458                 */* | *\\*) . "$found_la" ;;
1459                 *) . "./$found_la" ;;
1460               esac
1461               libdir="$save_libdir"
1462               dnl We use only dependency_libs.
1463               for dep in $dependency_libs; do
1464                 case "$dep" in
1465                   -L*)
1466                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1467                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1468                     dnl But don't add it
1469                     dnl   1. if it's the standard /usr/lib,
1470                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1471                     dnl   3. if it's already present in $LDFLAGS or the already
1472                     dnl      constructed $LIBNAME,
1473                     dnl   4. if it doesn't exist as a directory.
1474                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1475                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1476                       haveit=
1477                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1478                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1479                         if test -n "$GCC"; then
1480                           case $host_os in
1481                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1482                           esac
1483                         fi
1484                       fi
1485                       if test -z "$haveit"; then
1486                         haveit=
1487                         for x in $LDFLAGS $LIB[]NAME; do
1488                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1489                           if test "X$x" = "X-L$additional_libdir"; then
1490                             haveit=yes
1491                             break
1492                           fi
1493                         done
1494                         if test -z "$haveit"; then
1495                           if test -d "$additional_libdir"; then
1496                             dnl Really add $additional_libdir to $LIBNAME.
1497                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1498                           fi
1499                         fi
1500                         haveit=
1501                         for x in $LDFLAGS $LTLIB[]NAME; do
1502                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1503                           if test "X$x" = "X-L$additional_libdir"; then
1504                             haveit=yes
1505                             break
1506                           fi
1507                         done
1508                         if test -z "$haveit"; then
1509                           if test -d "$additional_libdir"; then
1510                             dnl Really add $additional_libdir to $LTLIBNAME.
1511                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1512                           fi
1513                         fi
1514                       fi
1515                     fi
1516                     ;;
1517                   -R*)
1518                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
1519                     if test "$enable_rpath" != no; then
1520                       dnl Potentially add DIR to rpathdirs.
1521                       dnl The rpathdirs will be appended to $LIBNAME at the end.
1522                       haveit=
1523                       for x in $rpathdirs; do
1524                         if test "X$x" = "X$dir"; then
1525                           haveit=yes
1526                           break
1527                         fi
1528                       done
1529                       if test -z "$haveit"; then
1530                         rpathdirs="$rpathdirs $dir"
1531                       fi
1532                       dnl Potentially add DIR to ltrpathdirs.
1533                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1534                       haveit=
1535                       for x in $ltrpathdirs; do
1536                         if test "X$x" = "X$dir"; then
1537                           haveit=yes
1538                           break
1539                         fi
1540                       done
1541                       if test -z "$haveit"; then
1542                         ltrpathdirs="$ltrpathdirs $dir"
1543                       fi
1544                     fi
1545                     ;;
1546                   -l*)
1547                     dnl Handle this in the next round.
1548                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1549                     ;;
1550                   *.la)
1551                     dnl Handle this in the next round. Throw away the .la's
1552                     dnl directory; it is already contained in a preceding -L
1553                     dnl option.
1554                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1555                     ;;
1556                   *)
1557                     dnl Most likely an immediate library name.
1558                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1559                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1560                     ;;
1561                 esac
1562               done
1563             fi
1564           else
1565             dnl Didn't find the library; assume it is in the system directories
1566             dnl known to the linker and runtime loader. (All the system
1567             dnl directories known to the linker should also be known to the
1568             dnl runtime loader, otherwise the system is severely misconfigured.)
1569             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1570             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1571           fi
1572         fi
1573       fi
1574     done
1575   done
1576   if test "X$rpathdirs" != "X"; then
1577     if test -n "$acl_hardcode_libdir_separator"; then
1578       dnl Weird platform: only the last -rpath option counts, the user must
1579       dnl pass all path elements in one option. We can arrange that for a
1580       dnl single library, but not when more than one $LIBNAMEs are used.
1581       alldirs=
1582       for found_dir in $rpathdirs; do
1583         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1584       done
1585       dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1586       acl_save_libdir="$libdir"
1587       libdir="$alldirs"
1588       eval flag=\"$acl_hardcode_libdir_flag_spec\"
1589       libdir="$acl_save_libdir"
1590       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1591     else
1592       dnl The -rpath options are cumulative.
1593       for found_dir in $rpathdirs; do
1594         acl_save_libdir="$libdir"
1595         libdir="$found_dir"
1596         eval flag=\"$acl_hardcode_libdir_flag_spec\"
1597         libdir="$acl_save_libdir"
1598         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1599       done
1600     fi
1601   fi
1602   if test "X$ltrpathdirs" != "X"; then
1603     dnl When using libtool, the option that works for both libraries and
1604     dnl executables is -R. The -R options are cumulative.
1605     for found_dir in $ltrpathdirs; do
1606       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1607     done
1608   fi
1609   popdef([P_A_C_K])
1610   popdef([PACKLIBS])
1611   popdef([PACKUP])
1612   popdef([PACK])
1613   popdef([NAME])
1614 ])
1615
1616 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1617 dnl unless already present in VAR.
1618 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1619 dnl contains two or three consecutive elements that belong together.
1620 AC_DEFUN([AC_LIB_APPENDTOVAR],
1621 [
1622   for element in [$2]; do
1623     haveit=
1624     for x in $[$1]; do
1625       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1626       if test "X$x" = "X$element"; then
1627         haveit=yes
1628         break
1629       fi
1630     done
1631     if test -z "$haveit"; then
1632       [$1]="${[$1]}${[$1]:+ }$element"
1633     fi
1634   done
1635 ])
1636
1637 dnl For those cases where a variable contains several -L and -l options
1638 dnl referring to unknown libraries and directories, this macro determines the
1639 dnl necessary additional linker options for the runtime path.
1640 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1641 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1642 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1643 dnl otherwise linking without libtool is assumed.
1644 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1645 [
1646   AC_REQUIRE([AC_LIB_RPATH])
1647   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1648   $1=
1649   if test "$enable_rpath" != no; then
1650     if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1651       dnl Use an explicit option to hardcode directories into the resulting
1652       dnl binary.
1653       rpathdirs=
1654       next=
1655       for opt in $2; do
1656         if test -n "$next"; then
1657           dir="$next"
1658           dnl No need to hardcode the standard /usr/lib.
1659           if test "X$dir" != "X/usr/$acl_libdirstem" \
1660              && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1661             rpathdirs="$rpathdirs $dir"
1662           fi
1663           next=
1664         else
1665           case $opt in
1666             -L) next=yes ;;
1667             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1668                  dnl No need to hardcode the standard /usr/lib.
1669                  if test "X$dir" != "X/usr/$acl_libdirstem" \
1670                     && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1671                    rpathdirs="$rpathdirs $dir"
1672                  fi
1673                  next= ;;
1674             *) next= ;;
1675           esac
1676         fi
1677       done
1678       if test "X$rpathdirs" != "X"; then
1679         if test -n ""$3""; then
1680           dnl libtool is used for linking. Use -R options.
1681           for dir in $rpathdirs; do
1682             $1="${$1}${$1:+ }-R$dir"
1683           done
1684         else
1685           dnl The linker is used for linking directly.
1686           if test -n "$acl_hardcode_libdir_separator"; then
1687             dnl Weird platform: only the last -rpath option counts, the user
1688             dnl must pass all path elements in one option.
1689             alldirs=
1690             for dir in $rpathdirs; do
1691               alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1692             done
1693             acl_save_libdir="$libdir"
1694             libdir="$alldirs"
1695             eval flag=\"$acl_hardcode_libdir_flag_spec\"
1696             libdir="$acl_save_libdir"
1697             $1="$flag"
1698           else
1699             dnl The -rpath options are cumulative.
1700             for dir in $rpathdirs; do
1701               acl_save_libdir="$libdir"
1702               libdir="$dir"
1703               eval flag=\"$acl_hardcode_libdir_flag_spec\"
1704               libdir="$acl_save_libdir"
1705               $1="${$1}${$1:+ }$flag"
1706             done
1707           fi
1708         fi
1709       fi
1710     fi
1711   fi
1712   AC_SUBST([$1])
1713 ])
1714
1715 # lib-prefix.m4 serial 7 (gettext-0.18)
1716 dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
1717 dnl This file is free software; the Free Software Foundation
1718 dnl gives unlimited permission to copy and/or distribute it,
1719 dnl with or without modifications, as long as this notice is preserved.
1720
1721 dnl From Bruno Haible.
1722
1723 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1724 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1725 dnl require excessive bracketing.
1726 ifdef([AC_HELP_STRING],
1727 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1728 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1729
1730 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1731 dnl to access previously installed libraries. The basic assumption is that
1732 dnl a user will want packages to use other packages he previously installed
1733 dnl with the same --prefix option.
1734 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1735 dnl libraries, but is otherwise very convenient.
1736 AC_DEFUN([AC_LIB_PREFIX],
1737 [
1738   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1739   AC_REQUIRE([AC_PROG_CC])
1740   AC_REQUIRE([AC_CANONICAL_HOST])
1741   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1742   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1743   dnl By default, look in $includedir and $libdir.
1744   use_additional=yes
1745   AC_LIB_WITH_FINAL_PREFIX([
1746     eval additional_includedir=\"$includedir\"
1747     eval additional_libdir=\"$libdir\"
1748   ])
1749   AC_LIB_ARG_WITH([lib-prefix],
1750 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1751   --without-lib-prefix    don't search for libraries in includedir and libdir],
1752 [
1753     if test "X$withval" = "Xno"; then
1754       use_additional=no
1755     else
1756       if test "X$withval" = "X"; then
1757         AC_LIB_WITH_FINAL_PREFIX([
1758           eval additional_includedir=\"$includedir\"
1759           eval additional_libdir=\"$libdir\"
1760         ])
1761       else
1762         additional_includedir="$withval/include"
1763         additional_libdir="$withval/$acl_libdirstem"
1764       fi
1765     fi
1766 ])
1767   if test $use_additional = yes; then
1768     dnl Potentially add $additional_includedir to $CPPFLAGS.
1769     dnl But don't add it
1770     dnl   1. if it's the standard /usr/include,
1771     dnl   2. if it's already present in $CPPFLAGS,
1772     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1773     dnl   4. if it doesn't exist as a directory.
1774     if test "X$additional_includedir" != "X/usr/include"; then
1775       haveit=
1776       for x in $CPPFLAGS; do
1777         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1778         if test "X$x" = "X-I$additional_includedir"; then
1779           haveit=yes
1780           break
1781         fi
1782       done
1783       if test -z "$haveit"; then
1784         if test "X$additional_includedir" = "X/usr/local/include"; then
1785           if test -n "$GCC"; then
1786             case $host_os in
1787               linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1788             esac
1789           fi
1790         fi
1791         if test -z "$haveit"; then
1792           if test -d "$additional_includedir"; then
1793             dnl Really add $additional_includedir to $CPPFLAGS.
1794             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1795           fi
1796         fi
1797       fi
1798     fi
1799     dnl Potentially add $additional_libdir to $LDFLAGS.
1800     dnl But don't add it
1801     dnl   1. if it's the standard /usr/lib,
1802     dnl   2. if it's already present in $LDFLAGS,
1803     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1804     dnl   4. if it doesn't exist as a directory.
1805     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1806       haveit=
1807       for x in $LDFLAGS; do
1808         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1809         if test "X$x" = "X-L$additional_libdir"; then
1810           haveit=yes
1811           break
1812         fi
1813       done
1814       if test -z "$haveit"; then
1815         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1816           if test -n "$GCC"; then
1817             case $host_os in
1818               linux*) haveit=yes;;
1819             esac
1820           fi
1821         fi
1822         if test -z "$haveit"; then
1823           if test -d "$additional_libdir"; then
1824             dnl Really add $additional_libdir to $LDFLAGS.
1825             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1826           fi
1827         fi
1828       fi
1829     fi
1830   fi
1831 ])
1832
1833 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1834 dnl acl_final_exec_prefix, containing the values to which $prefix and
1835 dnl $exec_prefix will expand at the end of the configure script.
1836 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1837 [
1838   dnl Unfortunately, prefix and exec_prefix get only finally determined
1839   dnl at the end of configure.
1840   if test "X$prefix" = "XNONE"; then
1841     acl_final_prefix="$ac_default_prefix"
1842   else
1843     acl_final_prefix="$prefix"
1844   fi
1845   if test "X$exec_prefix" = "XNONE"; then
1846     acl_final_exec_prefix='${prefix}'
1847   else
1848     acl_final_exec_prefix="$exec_prefix"
1849   fi
1850   acl_save_prefix="$prefix"
1851   prefix="$acl_final_prefix"
1852   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1853   prefix="$acl_save_prefix"
1854 ])
1855
1856 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1857 dnl variables prefix and exec_prefix bound to the values they will have
1858 dnl at the end of the configure script.
1859 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1860 [
1861   acl_save_prefix="$prefix"
1862   prefix="$acl_final_prefix"
1863   acl_save_exec_prefix="$exec_prefix"
1864   exec_prefix="$acl_final_exec_prefix"
1865   $1
1866   exec_prefix="$acl_save_exec_prefix"
1867   prefix="$acl_save_prefix"
1868 ])
1869
1870 dnl AC_LIB_PREPARE_MULTILIB creates
1871 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1872 dnl   "lib" or "lib64" or "lib/64",
1873 dnl - a variable acl_libdirstem2, as a secondary possible value for
1874 dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1875 dnl   "lib/amd64".
1876 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1877 [
1878   dnl There is no formal standard regarding lib and lib64.
1879   dnl On glibc systems, the current practice is that on a system supporting
1880   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1881   dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1882   dnl the compiler's default mode by looking at the compiler's library search
1883   dnl path. If at least one of its elements ends in /lib64 or points to a
1884   dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1885   dnl Otherwise we use the default, namely "lib".
1886   dnl On Solaris systems, the current practice is that on a system supporting
1887   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1888   dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1889   dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1890   AC_REQUIRE([AC_CANONICAL_HOST])
1891   acl_libdirstem=lib
1892   acl_libdirstem2=
1893   case "$host_os" in
1894     solaris*)
1895       dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1896       dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1897       dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1898       dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1899       dnl symlink is missing, so we set acl_libdirstem2 too.
1900       AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1901         [AC_EGREP_CPP([sixtyfour bits], [
1902 #ifdef _LP64
1903 sixtyfour bits
1904 #endif
1905            ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1906         ])
1907       if test $gl_cv_solaris_64bit = yes; then
1908         acl_libdirstem=lib/64
1909         case "$host_cpu" in
1910           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
1911           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1912         esac
1913       fi
1914       ;;
1915     *)
1916       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1917       if test -n "$searchpath"; then
1918         acl_save_IFS="${IFS=    }"; IFS=":"
1919         for searchdir in $searchpath; do
1920           if test -d "$searchdir"; then
1921             case "$searchdir" in
1922               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1923               */../ | */.. )
1924                 # Better ignore directories of this form. They are misleading.
1925                 ;;
1926               *) searchdir=`cd "$searchdir" && pwd`
1927                  case "$searchdir" in
1928                    */lib64 ) acl_libdirstem=lib64 ;;
1929                  esac ;;
1930             esac
1931           fi
1932         done
1933         IFS="$acl_save_IFS"
1934       fi
1935       ;;
1936   esac
1937   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1938 ])
1939
1940 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1941 #
1942 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1943 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1944 #                 Foundation, Inc.
1945 #   Written by Gordon Matzigkeit, 1996
1946 #
1947 # This file is free software; the Free Software Foundation gives
1948 # unlimited permission to copy and/or distribute it, with or without
1949 # modifications, as long as this notice is preserved.
1950
1951 m4_define([_LT_COPYING], [dnl
1952 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1953 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1954 #                 Foundation, Inc.
1955 #   Written by Gordon Matzigkeit, 1996
1956 #
1957 #   This file is part of GNU Libtool.
1958 #
1959 # GNU Libtool is free software; you can redistribute it and/or
1960 # modify it under the terms of the GNU General Public License as
1961 # published by the Free Software Foundation; either version 2 of
1962 # the License, or (at your option) any later version.
1963 #
1964 # As a special exception to the GNU General Public License,
1965 # if you distribute this file as part of a program or library that
1966 # is built using GNU Libtool, you may include this file under the
1967 # same distribution terms that you use for the rest of that program.
1968 #
1969 # GNU Libtool is distributed in the hope that it will be useful,
1970 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1971 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1972 # GNU General Public License for more details.
1973 #
1974 # You should have received a copy of the GNU General Public License
1975 # along with GNU Libtool; see the file COPYING.  If not, a copy
1976 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1977 # obtained by writing to the Free Software Foundation, Inc.,
1978 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1979 ])
1980
1981 # serial 57 LT_INIT
1982
1983
1984 # LT_PREREQ(VERSION)
1985 # ------------------
1986 # Complain and exit if this libtool version is less that VERSION.
1987 m4_defun([LT_PREREQ],
1988 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1989        [m4_default([$3],
1990                    [m4_fatal([Libtool version $1 or higher is required],
1991                              63)])],
1992        [$2])])
1993
1994
1995 # _LT_CHECK_BUILDDIR
1996 # ------------------
1997 # Complain if the absolute build directory name contains unusual characters
1998 m4_defun([_LT_CHECK_BUILDDIR],
1999 [case `pwd` in
2000   *\ * | *\     *)
2001     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2002 esac
2003 ])
2004
2005
2006 # LT_INIT([OPTIONS])
2007 # ------------------
2008 AC_DEFUN([LT_INIT],
2009 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2010 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2011 AC_BEFORE([$0], [LT_LANG])dnl
2012 AC_BEFORE([$0], [LT_OUTPUT])dnl
2013 AC_BEFORE([$0], [LTDL_INIT])dnl
2014 m4_require([_LT_CHECK_BUILDDIR])dnl
2015
2016 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2017 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2018 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2019 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2020 dnl unless we require an AC_DEFUNed macro:
2021 AC_REQUIRE([LTOPTIONS_VERSION])dnl
2022 AC_REQUIRE([LTSUGAR_VERSION])dnl
2023 AC_REQUIRE([LTVERSION_VERSION])dnl
2024 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2025 m4_require([_LT_PROG_LTMAIN])dnl
2026
2027 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2028
2029 dnl Parse OPTIONS
2030 _LT_SET_OPTIONS([$0], [$1])
2031
2032 # This can be used to rebuild libtool when needed
2033 LIBTOOL_DEPS="$ltmain"
2034
2035 # Always use our own libtool.
2036 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2037 AC_SUBST(LIBTOOL)dnl
2038
2039 _LT_SETUP
2040
2041 # Only expand once:
2042 m4_define([LT_INIT])
2043 ])# LT_INIT
2044
2045 # Old names:
2046 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2047 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2048 dnl aclocal-1.4 backwards compatibility:
2049 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2050 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2051
2052
2053 # _LT_CC_BASENAME(CC)
2054 # -------------------
2055 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2056 m4_defun([_LT_CC_BASENAME],
2057 [for cc_temp in $1""; do
2058   case $cc_temp in
2059     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2060     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2061     \-*) ;;
2062     *) break;;
2063   esac
2064 done
2065 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2066 ])
2067
2068
2069 # _LT_FILEUTILS_DEFAULTS
2070 # ----------------------
2071 # It is okay to use these file commands and assume they have been set
2072 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2073 m4_defun([_LT_FILEUTILS_DEFAULTS],
2074 [: ${CP="cp -f"}
2075 : ${MV="mv -f"}
2076 : ${RM="rm -f"}
2077 ])# _LT_FILEUTILS_DEFAULTS
2078
2079
2080 # _LT_SETUP
2081 # ---------
2082 m4_defun([_LT_SETUP],
2083 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2084 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2085 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2086 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2087
2088 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
2089 dnl
2090 _LT_DECL([], [host_alias], [0], [The host system])dnl
2091 _LT_DECL([], [host], [0])dnl
2092 _LT_DECL([], [host_os], [0])dnl
2093 dnl
2094 _LT_DECL([], [build_alias], [0], [The build system])dnl
2095 _LT_DECL([], [build], [0])dnl
2096 _LT_DECL([], [build_os], [0])dnl
2097 dnl
2098 AC_REQUIRE([AC_PROG_CC])dnl
2099 AC_REQUIRE([LT_PATH_LD])dnl
2100 AC_REQUIRE([LT_PATH_NM])dnl
2101 dnl
2102 AC_REQUIRE([AC_PROG_LN_S])dnl
2103 test -z "$LN_S" && LN_S="ln -s"
2104 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2105 dnl
2106 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2107 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2108 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2109 dnl
2110 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2111 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2112 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
2113 m4_require([_LT_CMD_RELOAD])dnl
2114 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2115 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
2116 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2117 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2118 m4_require([_LT_WITH_SYSROOT])dnl
2119
2120 _LT_CONFIG_LIBTOOL_INIT([
2121 # See if we are running on zsh, and set the options which allow our
2122 # commands through without removal of \ escapes INIT.
2123 if test -n "\${ZSH_VERSION+set}" ; then
2124    setopt NO_GLOB_SUBST
2125 fi
2126 ])
2127 if test -n "${ZSH_VERSION+set}" ; then
2128    setopt NO_GLOB_SUBST
2129 fi
2130
2131 _LT_CHECK_OBJDIR
2132
2133 m4_require([_LT_TAG_COMPILER])dnl
2134
2135 case $host_os in
2136 aix3*)
2137   # AIX sometimes has problems with the GCC collect2 program.  For some
2138   # reason, if we set the COLLECT_NAMES environment variable, the problems
2139   # vanish in a puff of smoke.
2140   if test "X${COLLECT_NAMES+set}" != Xset; then
2141     COLLECT_NAMES=
2142     export COLLECT_NAMES
2143   fi
2144   ;;
2145 esac
2146
2147 # Global variables:
2148 ofile=libtool
2149 can_build_shared=yes
2150
2151 # All known linkers require a `.a' archive for static linking (except MSVC,
2152 # which needs '.lib').
2153 libext=a
2154
2155 with_gnu_ld="$lt_cv_prog_gnu_ld"
2156
2157 old_CC="$CC"
2158 old_CFLAGS="$CFLAGS"
2159
2160 # Set sane defaults for various variables
2161 test -z "$CC" && CC=cc
2162 test -z "$LTCC" && LTCC=$CC
2163 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2164 test -z "$LD" && LD=ld
2165 test -z "$ac_objext" && ac_objext=o
2166
2167 _LT_CC_BASENAME([$compiler])
2168
2169 # Only perform the check for file, if the check method requires it
2170 test -z "$MAGIC_CMD" && MAGIC_CMD=file
2171 case $deplibs_check_method in
2172 file_magic*)
2173   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2174     _LT_PATH_MAGIC
2175   fi
2176   ;;
2177 esac
2178
2179 # Use C for the default configuration in the libtool script
2180 LT_SUPPORTED_TAG([CC])
2181 _LT_LANG_C_CONFIG
2182 _LT_LANG_DEFAULT_CONFIG
2183 _LT_CONFIG_COMMANDS
2184 ])# _LT_SETUP
2185
2186
2187 # _LT_PREPARE_SED_QUOTE_VARS
2188 # --------------------------
2189 # Define a few sed substitution that help us do robust quoting.
2190 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2191 [# Backslashify metacharacters that are still active within
2192 # double-quoted strings.
2193 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2194
2195 # Same as above, but do not quote variable references.
2196 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2197
2198 # Sed substitution to delay expansion of an escaped shell variable in a
2199 # double_quote_subst'ed string.
2200 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2201
2202 # Sed substitution to delay expansion of an escaped single quote.
2203 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2204
2205 # Sed substitution to avoid accidental globbing in evaled expressions
2206 no_glob_subst='s/\*/\\\*/g'
2207 ])
2208
2209 # _LT_PROG_LTMAIN
2210 # ---------------
2211 # Note that this code is called both from `configure', and `config.status'
2212 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2213 # `config.status' has no value for ac_aux_dir unless we are using Automake,
2214 # so we pass a copy along to make sure it has a sensible value anyway.
2215 m4_defun([_LT_PROG_LTMAIN],
2216 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2217 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2218 ltmain="$ac_aux_dir/ltmain.sh"
2219 ])# _LT_PROG_LTMAIN
2220
2221
2222
2223 # So that we can recreate a full libtool script including additional
2224 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2225 # in macros and then make a single call at the end using the `libtool'
2226 # label.
2227
2228
2229 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2230 # ----------------------------------------
2231 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2232 m4_define([_LT_CONFIG_LIBTOOL_INIT],
2233 [m4_ifval([$1],
2234           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2235                      [$1
2236 ])])])
2237
2238 # Initialize.
2239 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2240
2241
2242 # _LT_CONFIG_LIBTOOL([COMMANDS])
2243 # ------------------------------
2244 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2245 m4_define([_LT_CONFIG_LIBTOOL],
2246 [m4_ifval([$1],
2247           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2248                      [$1
2249 ])])])
2250
2251 # Initialize.
2252 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2253
2254
2255 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2256 # -----------------------------------------------------
2257 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2258 [_LT_CONFIG_LIBTOOL([$1])
2259 _LT_CONFIG_LIBTOOL_INIT([$2])
2260 ])
2261
2262
2263 # _LT_FORMAT_COMMENT([COMMENT])
2264 # -----------------------------
2265 # Add leading comment marks to the start of each line, and a trailing
2266 # full-stop to the whole comment if one is not present already.
2267 m4_define([_LT_FORMAT_COMMENT],
2268 [m4_ifval([$1], [
2269 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2270               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2271 )])
2272
2273
2274
2275
2276
2277 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2278 # -------------------------------------------------------------------
2279 # CONFIGNAME is the name given to the value in the libtool script.
2280 # VARNAME is the (base) name used in the configure script.
2281 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2282 # VARNAME.  Any other value will be used directly.
2283 m4_define([_LT_DECL],
2284 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2285     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2286         [m4_ifval([$1], [$1], [$2])])
2287     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2288     m4_ifval([$4],
2289         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2290     lt_dict_add_subkey([lt_decl_dict], [$2],
2291         [tagged?], [m4_ifval([$5], [yes], [no])])])
2292 ])
2293
2294
2295 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2296 # --------------------------------------------------------
2297 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2298
2299
2300 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2301 # ------------------------------------------------
2302 m4_define([lt_decl_tag_varnames],
2303 [_lt_decl_filter([tagged?], [yes], $@)])
2304
2305
2306 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2307 # ---------------------------------------------------------
2308 m4_define([_lt_decl_filter],
2309 [m4_case([$#],
2310   [0], [m4_fatal([$0: too few arguments: $#])],
2311   [1], [m4_fatal([$0: too few arguments: $#: $1])],
2312   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2313   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2314   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2315 ])
2316
2317
2318 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2319 # --------------------------------------------------
2320 m4_define([lt_decl_quote_varnames],
2321 [_lt_decl_filter([value], [1], $@)])
2322
2323
2324 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2325 # ---------------------------------------------------
2326 m4_define([lt_decl_dquote_varnames],
2327 [_lt_decl_filter([value], [2], $@)])
2328
2329
2330 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2331 # ---------------------------------------------------
2332 m4_define([lt_decl_varnames_tagged],
2333 [m4_assert([$# <= 2])dnl
2334 _$0(m4_quote(m4_default([$1], [[, ]])),
2335     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2336     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2337 m4_define([_lt_decl_varnames_tagged],
2338 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2339
2340
2341 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2342 # ------------------------------------------------
2343 m4_define([lt_decl_all_varnames],
2344 [_$0(m4_quote(m4_default([$1], [[, ]])),
2345      m4_if([$2], [],
2346            m4_quote(lt_decl_varnames),
2347         m4_quote(m4_shift($@))))[]dnl
2348 ])
2349 m4_define([_lt_decl_all_varnames],
2350 [lt_join($@, lt_decl_varnames_tagged([$1],
2351                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2352 ])
2353
2354
2355 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
2356 # ------------------------------------
2357 # Quote a variable value, and forward it to `config.status' so that its
2358 # declaration there will have the same value as in `configure'.  VARNAME
2359 # must have a single quote delimited value for this to work.
2360 m4_define([_LT_CONFIG_STATUS_DECLARE],
2361 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2362
2363
2364 # _LT_CONFIG_STATUS_DECLARATIONS
2365 # ------------------------------
2366 # We delimit libtool config variables with single quotes, so when
2367 # we write them to config.status, we have to be sure to quote all
2368 # embedded single quotes properly.  In configure, this macro expands
2369 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2370 #
2371 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2372 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2373 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2374     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2375
2376
2377 # _LT_LIBTOOL_TAGS
2378 # ----------------
2379 # Output comment and list of tags supported by the script
2380 m4_defun([_LT_LIBTOOL_TAGS],
2381 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2382 available_tags="_LT_TAGS"dnl
2383 ])
2384
2385
2386 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2387 # -----------------------------------
2388 # Extract the dictionary values for VARNAME (optionally with TAG) and
2389 # expand to a commented shell variable setting:
2390 #
2391 #    # Some comment about what VAR is for.
2392 #    visible_name=$lt_internal_name
2393 m4_define([_LT_LIBTOOL_DECLARE],
2394 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2395                                            [description])))[]dnl
2396 m4_pushdef([_libtool_name],
2397     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2398 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2399     [0], [_libtool_name=[$]$1],
2400     [1], [_libtool_name=$lt_[]$1],
2401     [2], [_libtool_name=$lt_[]$1],
2402     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2403 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2404 ])
2405
2406
2407 # _LT_LIBTOOL_CONFIG_VARS
2408 # -----------------------
2409 # Produce commented declarations of non-tagged libtool config variables
2410 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2411 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2412 # section) are produced by _LT_LIBTOOL_TAG_VARS.
2413 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2414 [m4_foreach([_lt_var],
2415     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2416     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2417
2418
2419 # _LT_LIBTOOL_TAG_VARS(TAG)
2420 # -------------------------
2421 m4_define([_LT_LIBTOOL_TAG_VARS],
2422 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2423     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2424
2425
2426 # _LT_TAGVAR(VARNAME, [TAGNAME])
2427 # ------------------------------
2428 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2429
2430
2431 # _LT_CONFIG_COMMANDS
2432 # -------------------
2433 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2434 # variables for single and double quote escaping we saved from calls
2435 # to _LT_DECL, we can put quote escaped variables declarations
2436 # into `config.status', and then the shell code to quote escape them in
2437 # for loops in `config.status'.  Finally, any additional code accumulated
2438 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2439 m4_defun([_LT_CONFIG_COMMANDS],
2440 [AC_PROVIDE_IFELSE([LT_OUTPUT],
2441         dnl If the libtool generation code has been placed in $CONFIG_LT,
2442         dnl instead of duplicating it all over again into config.status,
2443         dnl then we will have config.status run $CONFIG_LT later, so it
2444         dnl needs to know what name is stored there:
2445         [AC_CONFIG_COMMANDS([libtool],
2446             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2447     dnl If the libtool generation code is destined for config.status,
2448     dnl expand the accumulated commands and init code now:
2449     [AC_CONFIG_COMMANDS([libtool],
2450         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2451 ])#_LT_CONFIG_COMMANDS
2452
2453
2454 # Initialize.
2455 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2456 [
2457
2458 # The HP-UX ksh and POSIX shell print the target directory to stdout
2459 # if CDPATH is set.
2460 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2461
2462 sed_quote_subst='$sed_quote_subst'
2463 double_quote_subst='$double_quote_subst'
2464 delay_variable_subst='$delay_variable_subst'
2465 _LT_CONFIG_STATUS_DECLARATIONS
2466 LTCC='$LTCC'
2467 LTCFLAGS='$LTCFLAGS'
2468 compiler='$compiler_DEFAULT'
2469
2470 # A function that is used when there is no print builtin or printf.
2471 func_fallback_echo ()
2472 {
2473   eval 'cat <<_LTECHO_EOF
2474 \$[]1
2475 _LTECHO_EOF'
2476 }
2477
2478 # Quote evaled strings.
2479 for var in lt_decl_all_varnames([[ \
2480 ]], lt_decl_quote_varnames); do
2481     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2482     *[[\\\\\\\`\\"\\\$]]*)
2483       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2484       ;;
2485     *)
2486       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2487       ;;
2488     esac
2489 done
2490
2491 # Double-quote double-evaled strings.
2492 for var in lt_decl_all_varnames([[ \
2493 ]], lt_decl_dquote_varnames); do
2494     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2495     *[[\\\\\\\`\\"\\\$]]*)
2496       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2497       ;;
2498     *)
2499       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2500       ;;
2501     esac
2502 done
2503
2504 _LT_OUTPUT_LIBTOOL_INIT
2505 ])
2506
2507 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2508 # ------------------------------------
2509 # Generate a child script FILE with all initialization necessary to
2510 # reuse the environment learned by the parent script, and make the
2511 # file executable.  If COMMENT is supplied, it is inserted after the
2512 # `#!' sequence but before initialization text begins.  After this
2513 # macro, additional text can be appended to FILE to form the body of
2514 # the child script.  The macro ends with non-zero status if the
2515 # file could not be fully written (such as if the disk is full).
2516 m4_ifdef([AS_INIT_GENERATED],
2517 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2518 [m4_defun([_LT_GENERATED_FILE_INIT],
2519 [m4_require([AS_PREPARE])]dnl
2520 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2521 [lt_write_fail=0
2522 cat >$1 <<_ASEOF || lt_write_fail=1
2523 #! $SHELL
2524 # Generated by $as_me.
2525 $2
2526 SHELL=\${CONFIG_SHELL-$SHELL}
2527 export SHELL
2528 _ASEOF
2529 cat >>$1 <<\_ASEOF || lt_write_fail=1
2530 AS_SHELL_SANITIZE
2531 _AS_PREPARE
2532 exec AS_MESSAGE_FD>&1
2533 _ASEOF
2534 test $lt_write_fail = 0 && chmod +x $1[]dnl
2535 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2536
2537 # LT_OUTPUT
2538 # ---------
2539 # This macro allows early generation of the libtool script (before
2540 # AC_OUTPUT is called), incase it is used in configure for compilation
2541 # tests.
2542 AC_DEFUN([LT_OUTPUT],
2543 [: ${CONFIG_LT=./config.lt}
2544 AC_MSG_NOTICE([creating $CONFIG_LT])
2545 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2546 [# Run this file to recreate a libtool stub with the current configuration.])
2547
2548 cat >>"$CONFIG_LT" <<\_LTEOF
2549 lt_cl_silent=false
2550 exec AS_MESSAGE_LOG_FD>>config.log
2551 {
2552   echo
2553   AS_BOX([Running $as_me.])
2554 } >&AS_MESSAGE_LOG_FD
2555
2556 lt_cl_help="\
2557 \`$as_me' creates a local libtool stub from the current configuration,
2558 for use in further configure time tests before the real libtool is
2559 generated.
2560
2561 Usage: $[0] [[OPTIONS]]
2562
2563   -h, --help      print this help, then exit
2564   -V, --version   print version number, then exit
2565   -q, --quiet     do not print progress messages
2566   -d, --debug     don't remove temporary files
2567
2568 Report bugs to <bug-libtool@gnu.org>."
2569
2570 lt_cl_version="\
2571 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2572 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2573 configured by $[0], generated by m4_PACKAGE_STRING.
2574
2575 Copyright (C) 2011 Free Software Foundation, Inc.
2576 This config.lt script is free software; the Free Software Foundation
2577 gives unlimited permision to copy, distribute and modify it."
2578
2579 while test $[#] != 0
2580 do
2581   case $[1] in
2582     --version | --v* | -V )
2583       echo "$lt_cl_version"; exit 0 ;;
2584     --help | --h* | -h )
2585       echo "$lt_cl_help"; exit 0 ;;
2586     --debug | --d* | -d )
2587       debug=: ;;
2588     --quiet | --q* | --silent | --s* | -q )
2589       lt_cl_silent=: ;;
2590
2591     -*) AC_MSG_ERROR([unrecognized option: $[1]
2592 Try \`$[0] --help' for more information.]) ;;
2593
2594     *) AC_MSG_ERROR([unrecognized argument: $[1]
2595 Try \`$[0] --help' for more information.]) ;;
2596   esac
2597   shift
2598 done
2599
2600 if $lt_cl_silent; then
2601   exec AS_MESSAGE_FD>/dev/null
2602 fi
2603 _LTEOF
2604
2605 cat >>"$CONFIG_LT" <<_LTEOF
2606 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2607 _LTEOF
2608
2609 cat >>"$CONFIG_LT" <<\_LTEOF
2610 AC_MSG_NOTICE([creating $ofile])
2611 _LT_OUTPUT_LIBTOOL_COMMANDS
2612 AS_EXIT(0)
2613 _LTEOF
2614 chmod +x "$CONFIG_LT"
2615
2616 # configure is writing to config.log, but config.lt does its own redirection,
2617 # appending to config.log, which fails on DOS, as config.log is still kept
2618 # open by configure.  Here we exec the FD to /dev/null, effectively closing
2619 # config.log, so it can be properly (re)opened and appended to by config.lt.
2620 lt_cl_success=:
2621 test "$silent" = yes &&
2622   lt_config_lt_args="$lt_config_lt_args --quiet"
2623 exec AS_MESSAGE_LOG_FD>/dev/null
2624 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2625 exec AS_MESSAGE_LOG_FD>>config.log
2626 $lt_cl_success || AS_EXIT(1)
2627 ])# LT_OUTPUT
2628
2629
2630 # _LT_CONFIG(TAG)
2631 # ---------------
2632 # If TAG is the built-in tag, create an initial libtool script with a
2633 # default configuration from the untagged config vars.  Otherwise add code
2634 # to config.status for appending the configuration named by TAG from the
2635 # matching tagged config vars.
2636 m4_defun([_LT_CONFIG],
2637 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2638 _LT_CONFIG_SAVE_COMMANDS([
2639   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2640   m4_if(_LT_TAG, [C], [
2641     # See if we are running on zsh, and set the options which allow our
2642     # commands through without removal of \ escapes.
2643     if test -n "${ZSH_VERSION+set}" ; then
2644       setopt NO_GLOB_SUBST
2645     fi
2646
2647     cfgfile="${ofile}T"
2648     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2649     $RM "$cfgfile"
2650
2651     cat <<_LT_EOF >> "$cfgfile"
2652 #! $SHELL
2653
2654 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2655 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2656 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2657 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2658 #
2659 _LT_COPYING
2660 _LT_LIBTOOL_TAGS
2661
2662 # ### BEGIN LIBTOOL CONFIG
2663 _LT_LIBTOOL_CONFIG_VARS
2664 _LT_LIBTOOL_TAG_VARS
2665 # ### END LIBTOOL CONFIG
2666
2667 _LT_EOF
2668
2669   case $host_os in
2670   aix3*)
2671     cat <<\_LT_EOF >> "$cfgfile"
2672 # AIX sometimes has problems with the GCC collect2 program.  For some
2673 # reason, if we set the COLLECT_NAMES environment variable, the problems
2674 # vanish in a puff of smoke.
2675 if test "X${COLLECT_NAMES+set}" != Xset; then
2676   COLLECT_NAMES=
2677   export COLLECT_NAMES
2678 fi
2679 _LT_EOF
2680     ;;
2681   esac
2682
2683   _LT_PROG_LTMAIN
2684
2685   # We use sed instead of cat because bash on DJGPP gets confused if
2686   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2687   # text mode, it properly converts lines to CR/LF.  This bash problem
2688   # is reportedly fixed, but why not run on old versions too?
2689   sed '$q' "$ltmain" >> "$cfgfile" \
2690      || (rm -f "$cfgfile"; exit 1)
2691
2692   _LT_PROG_REPLACE_SHELLFNS
2693
2694    mv -f "$cfgfile" "$ofile" ||
2695     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2696   chmod +x "$ofile"
2697 ],
2698 [cat <<_LT_EOF >> "$ofile"
2699
2700 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2701 dnl in a comment (ie after a #).
2702 # ### BEGIN LIBTOOL TAG CONFIG: $1
2703 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2704 # ### END LIBTOOL TAG CONFIG: $1
2705 _LT_EOF
2706 ])dnl /m4_if
2707 ],
2708 [m4_if([$1], [], [
2709     PACKAGE='$PACKAGE'
2710     VERSION='$VERSION'
2711     TIMESTAMP='$TIMESTAMP'
2712     RM='$RM'
2713     ofile='$ofile'], [])
2714 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2715 ])# _LT_CONFIG
2716
2717
2718 # LT_SUPPORTED_TAG(TAG)
2719 # ---------------------
2720 # Trace this macro to discover what tags are supported by the libtool
2721 # --tag option, using:
2722 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2723 AC_DEFUN([LT_SUPPORTED_TAG], [])
2724
2725
2726 # C support is built-in for now
2727 m4_define([_LT_LANG_C_enabled], [])
2728 m4_define([_LT_TAGS], [])
2729
2730
2731 # LT_LANG(LANG)
2732 # -------------
2733 # Enable libtool support for the given language if not already enabled.
2734 AC_DEFUN([LT_LANG],
2735 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2736 m4_case([$1],
2737   [C],                  [_LT_LANG(C)],
2738   [C++],                [_LT_LANG(CXX)],
2739   [Go],                 [_LT_LANG(GO)],
2740   [Java],               [_LT_LANG(GCJ)],
2741   [Fortran 77],         [_LT_LANG(F77)],
2742   [Fortran],            [_LT_LANG(FC)],
2743   [Windows Resource],   [_LT_LANG(RC)],
2744   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2745     [_LT_LANG($1)],
2746     [m4_fatal([$0: unsupported language: "$1"])])])dnl
2747 ])# LT_LANG
2748
2749
2750 # _LT_LANG(LANGNAME)
2751 # ------------------
2752 m4_defun([_LT_LANG],
2753 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2754   [LT_SUPPORTED_TAG([$1])dnl
2755   m4_append([_LT_TAGS], [$1 ])dnl
2756   m4_define([_LT_LANG_]$1[_enabled], [])dnl
2757   _LT_LANG_$1_CONFIG($1)])dnl
2758 ])# _LT_LANG
2759
2760
2761 m4_ifndef([AC_PROG_GO], [
2762 # NOTE: This macro has been submitted for inclusion into   #
2763 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
2764 #  a released version of Autoconf we should remove this    #
2765 #  macro and use it instead.                               #
2766 m4_defun([AC_PROG_GO],
2767 [AC_LANG_PUSH(Go)dnl
2768 AC_ARG_VAR([GOC],     [Go compiler command])dnl
2769 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
2770 _AC_ARG_VAR_LDFLAGS()dnl
2771 AC_CHECK_TOOL(GOC, gccgo)
2772 if test -z "$GOC"; then
2773   if test -n "$ac_tool_prefix"; then
2774     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
2775   fi
2776 fi
2777 if test -z "$GOC"; then
2778   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
2779 fi
2780 ])#m4_defun
2781 ])#m4_ifndef
2782
2783
2784 # _LT_LANG_DEFAULT_CONFIG
2785 # -----------------------
2786 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2787 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2788   [LT_LANG(CXX)],
2789   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2790
2791 AC_PROVIDE_IFELSE([AC_PROG_F77],
2792   [LT_LANG(F77)],
2793   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2794
2795 AC_PROVIDE_IFELSE([AC_PROG_FC],
2796   [LT_LANG(FC)],
2797   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2798
2799 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2800 dnl pulling things in needlessly.
2801 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2802   [LT_LANG(GCJ)],
2803   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2804     [LT_LANG(GCJ)],
2805     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2806       [LT_LANG(GCJ)],
2807       [m4_ifdef([AC_PROG_GCJ],
2808         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2809        m4_ifdef([A][M_PROG_GCJ],
2810         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2811        m4_ifdef([LT_PROG_GCJ],
2812         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2813
2814 AC_PROVIDE_IFELSE([AC_PROG_GO],
2815   [LT_LANG(GO)],
2816   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2817
2818 AC_PROVIDE_IFELSE([LT_PROG_RC],
2819   [LT_LANG(RC)],
2820   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2821 ])# _LT_LANG_DEFAULT_CONFIG
2822
2823 # Obsolete macros:
2824 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2825 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2826 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2827 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2828 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2829 dnl aclocal-1.4 backwards compatibility:
2830 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2831 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2832 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2833 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2834 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2835
2836
2837 # _LT_TAG_COMPILER
2838 # ----------------
2839 m4_defun([_LT_TAG_COMPILER],
2840 [AC_REQUIRE([AC_PROG_CC])dnl
2841
2842 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2843 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2844 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2845 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2846
2847 # If no C compiler was specified, use CC.
2848 LTCC=${LTCC-"$CC"}
2849
2850 # If no C compiler flags were specified, use CFLAGS.
2851 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2852
2853 # Allow CC to be a program name with arguments.
2854 compiler=$CC
2855 ])# _LT_TAG_COMPILER
2856
2857
2858 # _LT_COMPILER_BOILERPLATE
2859 # ------------------------
2860 # Check for compiler boilerplate output or warnings with
2861 # the simple compiler test code.
2862 m4_defun([_LT_COMPILER_BOILERPLATE],
2863 [m4_require([_LT_DECL_SED])dnl
2864 ac_outfile=conftest.$ac_objext
2865 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2866 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2867 _lt_compiler_boilerplate=`cat conftest.err`
2868 $RM conftest*
2869 ])# _LT_COMPILER_BOILERPLATE
2870
2871
2872 # _LT_LINKER_BOILERPLATE
2873 # ----------------------
2874 # Check for linker boilerplate output or warnings with
2875 # the simple link test code.
2876 m4_defun([_LT_LINKER_BOILERPLATE],
2877 [m4_require([_LT_DECL_SED])dnl
2878 ac_outfile=conftest.$ac_objext
2879 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2880 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2881 _lt_linker_boilerplate=`cat conftest.err`
2882 $RM -r conftest*
2883 ])# _LT_LINKER_BOILERPLATE
2884
2885 # _LT_REQUIRED_DARWIN_CHECKS
2886 # -------------------------
2887 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2888   case $host_os in
2889     rhapsody* | darwin*)
2890     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2891     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2892     AC_CHECK_TOOL([LIPO], [lipo], [:])
2893     AC_CHECK_TOOL([OTOOL], [otool], [:])
2894     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2895     _LT_DECL([], [DSYMUTIL], [1],
2896       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2897     _LT_DECL([], [NMEDIT], [1],
2898       [Tool to change global to local symbols on Mac OS X])
2899     _LT_DECL([], [LIPO], [1],
2900       [Tool to manipulate fat objects and archives on Mac OS X])
2901     _LT_DECL([], [OTOOL], [1],
2902       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2903     _LT_DECL([], [OTOOL64], [1],
2904       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2905
2906     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2907       [lt_cv_apple_cc_single_mod=no
2908       if test -z "${LT_MULTI_MODULE}"; then
2909         # By default we will add the -single_module flag. You can override
2910         # by either setting the environment variable LT_MULTI_MODULE
2911         # non-empty at configure time, or by adding -multi_module to the
2912         # link flags.
2913         rm -rf libconftest.dylib*
2914         echo "int foo(void){return 1;}" > conftest.c
2915         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2916 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2917         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2918           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2919         _lt_result=$?
2920         # If there is a non-empty error log, and "single_module"
2921         # appears in it, assume the flag caused a linker warning
2922         if test -s conftest.err && $GREP single_module conftest.err; then
2923           cat conftest.err >&AS_MESSAGE_LOG_FD
2924         # Otherwise, if the output was created with a 0 exit code from
2925         # the compiler, it worked.
2926         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2927           lt_cv_apple_cc_single_mod=yes
2928         else
2929           cat conftest.err >&AS_MESSAGE_LOG_FD
2930         fi
2931         rm -rf libconftest.dylib*
2932         rm -f conftest.*
2933       fi])
2934
2935     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2936       [lt_cv_ld_exported_symbols_list],
2937       [lt_cv_ld_exported_symbols_list=no
2938       save_LDFLAGS=$LDFLAGS
2939       echo "_main" > conftest.sym
2940       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2941       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2942         [lt_cv_ld_exported_symbols_list=yes],
2943         [lt_cv_ld_exported_symbols_list=no])
2944         LDFLAGS="$save_LDFLAGS"
2945     ])
2946
2947     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2948       [lt_cv_ld_force_load=no
2949       cat > conftest.c << _LT_EOF
2950 int forced_loaded() { return 2;}
2951 _LT_EOF
2952       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2953       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2954       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2955       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2956       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2957       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2958       cat > conftest.c << _LT_EOF
2959 int main() { return 0;}
2960 _LT_EOF
2961       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2962       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2963       _lt_result=$?
2964       if test -s conftest.err && $GREP force_load conftest.err; then
2965         cat conftest.err >&AS_MESSAGE_LOG_FD
2966       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2967         lt_cv_ld_force_load=yes
2968       else
2969         cat conftest.err >&AS_MESSAGE_LOG_FD
2970       fi
2971         rm -f conftest.err libconftest.a conftest conftest.c
2972         rm -rf conftest.dSYM
2973     ])
2974     case $host_os in
2975     rhapsody* | darwin1.[[012]])
2976       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2977     darwin1.*)
2978       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2979     darwin*) # darwin 5.x on
2980       # if running on 10.5 or later, the deployment target defaults
2981       # to the OS version, if on x86, and 10.4, the deployment
2982       # target defaults to 10.4. Don't you love it?
2983       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2984         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2985           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2986         10.[[012]]*)
2987           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2988         10.*)
2989           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2990       esac
2991     ;;
2992   esac
2993     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2994       _lt_dar_single_mod='$single_module'
2995     fi
2996     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2997       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2998     else
2999       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3000     fi
3001     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
3002       _lt_dsymutil='~$DSYMUTIL $lib || :'
3003     else
3004       _lt_dsymutil=
3005     fi
3006     ;;
3007   esac
3008 ])
3009
3010
3011 # _LT_DARWIN_LINKER_FEATURES([TAG])
3012 # ---------------------------------
3013 # Checks for linker and compiler features on darwin
3014 m4_defun([_LT_DARWIN_LINKER_FEATURES],
3015 [
3016   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3017   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3018   _LT_TAGVAR(hardcode_direct, $1)=no
3019   _LT_TAGVAR(hardcode_automatic, $1)=yes
3020   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3021   if test "$lt_cv_ld_force_load" = "yes"; then
3022     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
3023     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
3024                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
3025   else
3026     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3027   fi
3028   _LT_TAGVAR(link_all_deplibs, $1)=yes
3029   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3030   case $cc_basename in
3031      ifort*) _lt_dar_can_shared=yes ;;
3032      *) _lt_dar_can_shared=$GCC ;;
3033   esac
3034   if test "$_lt_dar_can_shared" = "yes"; then
3035     output_verbose_link_cmd=func_echo_all
3036     _LT_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}"
3037     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3038     _LT_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}"
3039     _LT_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}"
3040     m4_if([$1], [CXX],
3041 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3042       _LT_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}"
3043       _LT_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}"
3044     fi
3045 ],[])
3046   else
3047   _LT_TAGVAR(ld_shlibs, $1)=no
3048   fi
3049 ])
3050
3051 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
3052 # ----------------------------------
3053 # Links a minimal program and checks the executable
3054 # for the system default hardcoded library path. In most cases,
3055 # this is /usr/lib:/lib, but when the MPI compilers are used
3056 # the location of the communication and MPI libs are included too.
3057 # If we don't find anything, use the default library path according
3058 # to the aix ld manual.
3059 # Store the results from the different compilers for each TAGNAME.
3060 # Allow to override them for all tags through lt_cv_aix_libpath.
3061 m4_defun([_LT_SYS_MODULE_PATH_AIX],
3062 [m4_require([_LT_DECL_SED])dnl
3063 if test "${lt_cv_aix_libpath+set}" = set; then
3064   aix_libpath=$lt_cv_aix_libpath
3065 else
3066   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
3067   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
3068   lt_aix_libpath_sed='[
3069       /Import File Strings/,/^$/ {
3070           /^0/ {
3071               s/^0  *\([^ ]*\) *$/\1/
3072               p
3073           }
3074       }]'
3075   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3076   # Check for a 64-bit object if we didn't find anything.
3077   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3078     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3079   fi],[])
3080   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3081     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
3082   fi
3083   ])
3084   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
3085 fi
3086 ])# _LT_SYS_MODULE_PATH_AIX
3087
3088
3089 # _LT_SHELL_INIT(ARG)
3090 # -------------------
3091 m4_define([_LT_SHELL_INIT],
3092 [m4_divert_text([M4SH-INIT], [$1
3093 ])])# _LT_SHELL_INIT
3094
3095
3096
3097 # _LT_PROG_ECHO_BACKSLASH
3098 # -----------------------
3099 # Find how we can fake an echo command that does not interpret backslash.
3100 # In particular, with Autoconf 2.60 or later we add some code to the start
3101 # of the generated configure script which will find a shell with a builtin
3102 # printf (which we can use as an echo command).
3103 m4_defun([_LT_PROG_ECHO_BACKSLASH],
3104 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3105 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3106 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3107
3108 AC_MSG_CHECKING([how to print strings])
3109 # Test print first, because it will be a builtin if present.
3110 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3111    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3112   ECHO='print -r --'
3113 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3114   ECHO='printf %s\n'
3115 else
3116   # Use this function as a fallback that always works.
3117   func_fallback_echo ()
3118   {
3119     eval 'cat <<_LTECHO_EOF
3120 $[]1
3121 _LTECHO_EOF'
3122   }
3123   ECHO='func_fallback_echo'
3124 fi
3125
3126 # func_echo_all arg...
3127 # Invoke $ECHO with all args, space-separated.
3128 func_echo_all ()
3129 {
3130     $ECHO "$*" 
3131 }
3132
3133 case "$ECHO" in
3134   printf*) AC_MSG_RESULT([printf]) ;;
3135   print*) AC_MSG_RESULT([print -r]) ;;
3136   *) AC_MSG_RESULT([cat]) ;;
3137 esac
3138
3139 m4_ifdef([_AS_DETECT_SUGGESTED],
3140 [_AS_DETECT_SUGGESTED([
3141   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3142     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3143     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3144     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3145     PATH=/empty FPATH=/empty; export PATH FPATH
3146     test "X`printf %s $ECHO`" = "X$ECHO" \
3147       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3148
3149 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3150 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3151 ])# _LT_PROG_ECHO_BACKSLASH
3152
3153
3154 # _LT_WITH_SYSROOT
3155 # ----------------
3156 AC_DEFUN([_LT_WITH_SYSROOT],
3157 [AC_MSG_CHECKING([for sysroot])
3158 AC_ARG_WITH([sysroot],
3159 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
3160                         (or the compiler's sysroot if not specified).],
3161 [], [with_sysroot=no])
3162
3163 dnl lt_sysroot will always be passed unquoted.  We quote it here
3164 dnl in case the user passed a directory name.
3165 lt_sysroot=
3166 case ${with_sysroot} in #(
3167  yes)
3168    if test "$GCC" = yes; then
3169      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
3170    fi
3171    ;; #(
3172  /*)
3173    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
3174    ;; #(
3175  no|'')
3176    ;; #(
3177  *)
3178    AC_MSG_RESULT([${with_sysroot}])
3179    AC_MSG_ERROR([The sysroot must be an absolute path.])
3180    ;;
3181 esac
3182
3183  AC_MSG_RESULT([${lt_sysroot:-no}])
3184 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
3185 [dependent libraries, and in which our libraries should be installed.])])
3186
3187 # _LT_ENABLE_LOCK
3188 # ---------------
3189 m4_defun([_LT_ENABLE_LOCK],
3190 [AC_ARG_ENABLE([libtool-lock],
3191   [AS_HELP_STRING([--disable-libtool-lock],
3192     [avoid locking (might break parallel builds)])])
3193 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3194
3195 # Some flags need to be propagated to the compiler or linker for good
3196 # libtool support.
3197 case $host in
3198 ia64-*-hpux*)
3199   # Find out which ABI we are using.
3200   echo 'int i;' > conftest.$ac_ext
3201   if AC_TRY_EVAL(ac_compile); then
3202     case `/usr/bin/file conftest.$ac_objext` in
3203       *ELF-32*)
3204         HPUX_IA64_MODE="32"
3205         ;;
3206       *ELF-64*)
3207         HPUX_IA64_MODE="64"
3208         ;;
3209     esac
3210   fi
3211   rm -rf conftest*
3212   ;;
3213 *-*-irix6*)
3214   # Find out which ABI we are using.
3215   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3216   if AC_TRY_EVAL(ac_compile); then
3217     if test "$lt_cv_prog_gnu_ld" = yes; then
3218       case `/usr/bin/file conftest.$ac_objext` in
3219         *32-bit*)
3220           LD="${LD-ld} -melf32bsmip"
3221           ;;
3222         *N32*)
3223           LD="${LD-ld} -melf32bmipn32"
3224           ;;
3225         *64-bit*)
3226           LD="${LD-ld} -melf64bmip"
3227         ;;
3228       esac
3229     else
3230       case `/usr/bin/file conftest.$ac_objext` in
3231         *32-bit*)
3232           LD="${LD-ld} -32"
3233           ;;
3234         *N32*)
3235           LD="${LD-ld} -n32"
3236           ;;
3237         *64-bit*)
3238           LD="${LD-ld} -64"
3239           ;;
3240       esac
3241     fi
3242   fi
3243   rm -rf conftest*
3244   ;;
3245
3246 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3247 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3248   # Find out which ABI we are using.
3249   echo 'int i;' > conftest.$ac_ext
3250   if AC_TRY_EVAL(ac_compile); then
3251     case `/usr/bin/file conftest.o` in
3252       *32-bit*)
3253         case $host in
3254           x86_64-*kfreebsd*-gnu)
3255             LD="${LD-ld} -m elf_i386_fbsd"
3256             ;;
3257           x86_64-*linux*)
3258             LD="${LD-ld} -m elf_i386"
3259             ;;
3260           ppc64-*linux*|powerpc64-*linux*)
3261             LD="${LD-ld} -m elf32ppclinux"
3262             ;;
3263           s390x-*linux*)
3264             LD="${LD-ld} -m elf_s390"
3265             ;;
3266           sparc64-*linux*)
3267             LD="${LD-ld} -m elf32_sparc"
3268             ;;
3269         esac
3270         ;;
3271       *64-bit*)
3272         case $host in
3273           x86_64-*kfreebsd*-gnu)
3274             LD="${LD-ld} -m elf_x86_64_fbsd"
3275             ;;
3276           x86_64-*linux*)
3277             LD="${LD-ld} -m elf_x86_64"
3278             ;;
3279           ppc*-*linux*|powerpc*-*linux*)
3280             LD="${LD-ld} -m elf64ppc"
3281             ;;
3282           s390*-*linux*|s390*-*tpf*)
3283             LD="${LD-ld} -m elf64_s390"
3284             ;;
3285           sparc*-*linux*)
3286             LD="${LD-ld} -m elf64_sparc"
3287             ;;
3288         esac
3289         ;;
3290     esac
3291   fi
3292   rm -rf conftest*
3293   ;;
3294
3295 *-*-sco3.2v5*)
3296   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3297   SAVE_CFLAGS="$CFLAGS"
3298   CFLAGS="$CFLAGS -belf"
3299   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3300     [AC_LANG_PUSH(C)
3301      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3302      AC_LANG_POP])
3303   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3304     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3305     CFLAGS="$SAVE_CFLAGS"
3306   fi
3307   ;;
3308 *-*solaris*)
3309   # Find out which ABI we are using.
3310   echo 'int i;' > conftest.$ac_ext
3311   if AC_TRY_EVAL(ac_compile); then
3312     case `/usr/bin/file conftest.o` in
3313     *64-bit*)
3314       case $lt_cv_prog_gnu_ld in
3315       yes*)
3316         case $host in
3317         i?86-*-solaris*)
3318           LD="${LD-ld} -m elf_x86_64"
3319           ;;
3320         sparc*-*-solaris*)
3321           LD="${LD-ld} -m elf64_sparc"
3322           ;;
3323         esac
3324         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
3325         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
3326           LD="${LD-ld}_sol2"
3327         fi
3328         ;;
3329       *)
3330         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3331           LD="${LD-ld} -64"
3332         fi
3333         ;;
3334       esac
3335       ;;
3336     esac
3337   fi
3338   rm -rf conftest*
3339   ;;
3340 esac
3341
3342 need_locks="$enable_libtool_lock"
3343 ])# _LT_ENABLE_LOCK
3344
3345
3346 # _LT_PROG_AR
3347 # -----------
3348 m4_defun([_LT_PROG_AR],
3349 [AC_CHECK_TOOLS(AR, [ar], false)
3350 : ${AR=ar}
3351 : ${AR_FLAGS=cru}
3352 _LT_DECL([], [AR], [1], [The archiver])
3353 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
3354
3355 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
3356   [lt_cv_ar_at_file=no
3357    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
3358      [echo conftest.$ac_objext > conftest.lst
3359       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
3360       AC_TRY_EVAL([lt_ar_try])
3361       if test "$ac_status" -eq 0; then
3362         # Ensure the archiver fails upon bogus file names.
3363         rm -f conftest.$ac_objext libconftest.a
3364         AC_TRY_EVAL([lt_ar_try])
3365         if test "$ac_status" -ne 0; then
3366           lt_cv_ar_at_file=@
3367         fi
3368       fi
3369       rm -f conftest.* libconftest.a
3370      ])
3371   ])
3372
3373 if test "x$lt_cv_ar_at_file" = xno; then
3374   archiver_list_spec=
3375 else
3376   archiver_list_spec=$lt_cv_ar_at_file
3377 fi
3378 _LT_DECL([], [archiver_list_spec], [1],
3379   [How to feed a file listing to the archiver])
3380 ])# _LT_PROG_AR
3381
3382
3383 # _LT_CMD_OLD_ARCHIVE
3384 # -------------------
3385 m4_defun([_LT_CMD_OLD_ARCHIVE],
3386 [_LT_PROG_AR
3387
3388 AC_CHECK_TOOL(STRIP, strip, :)
3389 test -z "$STRIP" && STRIP=:
3390 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
3391
3392 AC_CHECK_TOOL(RANLIB, ranlib, :)
3393 test -z "$RANLIB" && RANLIB=:
3394 _LT_DECL([], [RANLIB], [1],
3395     [Commands used to install an old-style archive])
3396
3397 # Determine commands to create old-style static archives.
3398 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3399 old_postinstall_cmds='chmod 644 $oldlib'
3400 old_postuninstall_cmds=
3401
3402 if test -n "$RANLIB"; then
3403   case $host_os in
3404   openbsd*)
3405     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
3406     ;;
3407   *)
3408     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
3409     ;;
3410   esac
3411   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
3412 fi
3413
3414 case $host_os in
3415   darwin*)
3416     lock_old_archive_extraction=yes ;;
3417   *)
3418     lock_old_archive_extraction=no ;;
3419 esac
3420 _LT_DECL([], [old_postinstall_cmds], [2])
3421 _LT_DECL([], [old_postuninstall_cmds], [2])
3422 _LT_TAGDECL([], [old_archive_cmds], [2],
3423     [Commands used to build an old-style archive])
3424 _LT_DECL([], [lock_old_archive_extraction], [0],
3425     [Whether to use a lock for old archive extraction])
3426 ])# _LT_CMD_OLD_ARCHIVE
3427
3428
3429 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3430 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3431 # ----------------------------------------------------------------
3432 # Check whether the given compiler option works
3433 AC_DEFUN([_LT_COMPILER_OPTION],
3434 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3435 m4_require([_LT_DECL_SED])dnl
3436 AC_CACHE_CHECK([$1], [$2],
3437   [$2=no
3438    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3439    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3440    lt_compiler_flag="$3"
3441    # Insert the option either (1) after the last *FLAGS variable, or
3442    # (2) before a word containing "conftest.", or (3) at the end.
3443    # Note that $ac_compile itself does not contain backslashes and begins
3444    # with a dollar sign (not a hyphen), so the echo should work correctly.
3445    # The option is referenced via a variable to avoid confusing sed.
3446    lt_compile=`echo "$ac_compile" | $SED \
3447    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3448    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3449    -e 's:$: $lt_compiler_flag:'`
3450    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3451    (eval "$lt_compile" 2>conftest.err)
3452    ac_status=$?
3453    cat conftest.err >&AS_MESSAGE_LOG_FD
3454    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3455    if (exit $ac_status) && test -s "$ac_outfile"; then
3456      # The compiler can only warn and ignore the option if not recognized
3457      # So say no if there are warnings other than the usual output.
3458      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3459      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3460      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3461        $2=yes
3462      fi
3463    fi
3464    $RM conftest*
3465 ])
3466
3467 if test x"[$]$2" = xyes; then
3468     m4_if([$5], , :, [$5])
3469 else
3470     m4_if([$6], , :, [$6])
3471 fi
3472 ])# _LT_COMPILER_OPTION
3473
3474 # Old name:
3475 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3476 dnl aclocal-1.4 backwards compatibility:
3477 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3478
3479
3480 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3481 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
3482 # ----------------------------------------------------
3483 # Check whether the given linker option works
3484 AC_DEFUN([_LT_LINKER_OPTION],
3485 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3486 m4_require([_LT_DECL_SED])dnl
3487 AC_CACHE_CHECK([$1], [$2],
3488   [$2=no
3489    save_LDFLAGS="$LDFLAGS"
3490    LDFLAGS="$LDFLAGS $3"
3491    echo "$lt_simple_link_test_code" > conftest.$ac_ext
3492    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3493      # The linker can only warn and ignore the option if not recognized
3494      # So say no if there are warnings
3495      if test -s conftest.err; then
3496        # Append any errors to the config.log.
3497        cat conftest.err 1>&AS_MESSAGE_LOG_FD
3498        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3499        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3500        if diff conftest.exp conftest.er2 >/dev/null; then
3501          $2=yes
3502        fi
3503      else
3504        $2=yes
3505      fi
3506    fi
3507    $RM -r conftest*
3508    LDFLAGS="$save_LDFLAGS"
3509 ])
3510
3511 if test x"[$]$2" = xyes; then
3512     m4_if([$4], , :, [$4])
3513 else
3514     m4_if([$5], , :, [$5])
3515 fi
3516 ])# _LT_LINKER_OPTION
3517
3518 # Old name:
3519 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3520 dnl aclocal-1.4 backwards compatibility:
3521 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3522
3523
3524 # LT_CMD_MAX_LEN
3525 #---------------
3526 AC_DEFUN([LT_CMD_MAX_LEN],
3527 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3528 # find the maximum length of command line arguments
3529 AC_MSG_CHECKING([the maximum length of command line arguments])
3530 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3531   i=0
3532   teststring="ABCD"
3533
3534   case $build_os in
3535   msdosdjgpp*)
3536     # On DJGPP, this test can blow up pretty badly due to problems in libc
3537     # (any single argument exceeding 2000 bytes causes a buffer overrun
3538     # during glob expansion).  Even if it were fixed, the result of this
3539     # check would be larger than it should be.
3540     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3541     ;;
3542
3543   gnu*)
3544     # Under GNU Hurd, this test is not required because there is
3545     # no limit to the length of command line arguments.
3546     # Libtool will interpret -1 as no limit whatsoever
3547     lt_cv_sys_max_cmd_len=-1;
3548     ;;
3549
3550   cygwin* | mingw* | cegcc*)
3551     # On Win9x/ME, this test blows up -- it succeeds, but takes
3552     # about 5 minutes as the teststring grows exponentially.
3553     # Worse, since 9x/ME are not pre-emptively multitasking,
3554     # you end up with a "frozen" computer, even though with patience
3555     # the test eventually succeeds (with a max line length of 256k).
3556     # Instead, let's just punt: use the minimum linelength reported by
3557     # all of the supported platforms: 8192 (on NT/2K/XP).
3558     lt_cv_sys_max_cmd_len=8192;
3559     ;;
3560
3561   mint*)
3562     # On MiNT this can take a long time and run out of memory.
3563     lt_cv_sys_max_cmd_len=8192;
3564     ;;
3565
3566   amigaos*)
3567     # On AmigaOS with pdksh, this test takes hours, literally.
3568     # So we just punt and use a minimum line length of 8192.
3569     lt_cv_sys_max_cmd_len=8192;
3570     ;;
3571
3572   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3573     # This has been around since 386BSD, at least.  Likely further.
3574     if test -x /sbin/sysctl; then
3575       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3576     elif test -x /usr/sbin/sysctl; then
3577       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3578     else
3579       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
3580     fi
3581     # And add a safety zone
3582     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3583     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3584     ;;
3585
3586   interix*)
3587     # We know the value 262144 and hardcode it with a safety zone (like BSD)
3588     lt_cv_sys_max_cmd_len=196608
3589     ;;
3590
3591   os2*)
3592     # The test takes a long time on OS/2.
3593     lt_cv_sys_max_cmd_len=8192
3594     ;;
3595
3596   osf*)
3597     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3598     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3599     # nice to cause kernel panics so lets avoid the loop below.
3600     # First set a reasonable default.
3601     lt_cv_sys_max_cmd_len=16384
3602     #
3603     if test -x /sbin/sysconfig; then
3604       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3605         *1*) lt_cv_sys_max_cmd_len=-1 ;;
3606       esac
3607     fi
3608     ;;
3609   sco3.2v5*)
3610     lt_cv_sys_max_cmd_len=102400
3611     ;;
3612   sysv5* | sco5v6* | sysv4.2uw2*)
3613     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3614     if test -n "$kargmax"; then
3615       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
3616     else
3617       lt_cv_sys_max_cmd_len=32768
3618     fi
3619     ;;
3620   *)
3621     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3622     if test -n "$lt_cv_sys_max_cmd_len"; then
3623       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3624       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3625     else
3626       # Make teststring a little bigger before we do anything with it.
3627       # a 1K string should be a reasonable start.
3628       for i in 1 2 3 4 5 6 7 8 ; do
3629         teststring=$teststring$teststring
3630       done
3631       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3632       # If test is not a shell built-in, we'll probably end up computing a
3633       # maximum length that is only half of the actual maximum length, but
3634       # we can't tell.
3635       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
3636                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3637               test $i != 17 # 1/2 MB should be enough
3638       do
3639         i=`expr $i + 1`
3640         teststring=$teststring$teststring
3641       done
3642       # Only check the string length outside the loop.
3643       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3644       teststring=
3645       # Add a significant safety factor because C++ compilers can tack on
3646       # massive amounts of additional arguments before passing them to the
3647       # linker.  It appears as though 1/2 is a usable value.
3648       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3649     fi
3650     ;;
3651   esac
3652 ])
3653 if test -n $lt_cv_sys_max_cmd_len ; then
3654   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3655 else
3656   AC_MSG_RESULT(none)
3657 fi
3658 max_cmd_len=$lt_cv_sys_max_cmd_len
3659 _LT_DECL([], [max_cmd_len], [0],
3660     [What is the maximum length of a command?])
3661 ])# LT_CMD_MAX_LEN
3662
3663 # Old name:
3664 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3665 dnl aclocal-1.4 backwards compatibility:
3666 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3667
3668
3669 # _LT_HEADER_DLFCN
3670 # ----------------
3671 m4_defun([_LT_HEADER_DLFCN],
3672 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3673 ])# _LT_HEADER_DLFCN
3674
3675
3676 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3677 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3678 # ----------------------------------------------------------------
3679 m4_defun([_LT_TRY_DLOPEN_SELF],
3680 [m4_require([_LT_HEADER_DLFCN])dnl
3681 if test "$cross_compiling" = yes; then :
3682   [$4]
3683 else
3684   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3685   lt_status=$lt_dlunknown
3686   cat > conftest.$ac_ext <<_LT_EOF
3687 [#line $LINENO "configure"
3688 #include "confdefs.h"
3689
3690 #if HAVE_DLFCN_H
3691 #include <dlfcn.h>
3692 #endif
3693
3694 #include <stdio.h>
3695
3696 #ifdef RTLD_GLOBAL
3697 #  define LT_DLGLOBAL           RTLD_GLOBAL
3698 #else
3699 #  ifdef DL_GLOBAL
3700 #    define LT_DLGLOBAL         DL_GLOBAL
3701 #  else
3702 #    define LT_DLGLOBAL         0
3703 #  endif
3704 #endif
3705
3706 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3707    find out it does not work in some platform. */
3708 #ifndef LT_DLLAZY_OR_NOW
3709 #  ifdef RTLD_LAZY
3710 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
3711 #  else
3712 #    ifdef DL_LAZY
3713 #      define LT_DLLAZY_OR_NOW          DL_LAZY
3714 #    else
3715 #      ifdef RTLD_NOW
3716 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
3717 #      else
3718 #        ifdef DL_NOW
3719 #          define LT_DLLAZY_OR_NOW      DL_NOW
3720 #        else
3721 #          define LT_DLLAZY_OR_NOW      0
3722 #        endif
3723 #      endif
3724 #    endif
3725 #  endif
3726 #endif
3727
3728 /* When -fvisbility=hidden is used, assume the code has been annotated
3729    correspondingly for the symbols needed.  */
3730 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3731 int fnord () __attribute__((visibility("default")));
3732 #endif
3733
3734 int fnord () { return 42; }
3735 int main ()
3736 {
3737   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3738   int status = $lt_dlunknown;
3739
3740   if (self)
3741     {
3742       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3743       else
3744         {
3745           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
3746           else puts (dlerror ());
3747         }
3748       /* dlclose (self); */
3749     }
3750   else
3751     puts (dlerror ());
3752
3753   return status;
3754 }]
3755 _LT_EOF
3756   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3757     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3758     lt_status=$?
3759     case x$lt_status in
3760       x$lt_dlno_uscore) $1 ;;
3761       x$lt_dlneed_uscore) $2 ;;
3762       x$lt_dlunknown|x*) $3 ;;
3763     esac
3764   else :
3765     # compilation failed
3766     $3
3767   fi
3768 fi
3769 rm -fr conftest*
3770 ])# _LT_TRY_DLOPEN_SELF
3771
3772
3773 # LT_SYS_DLOPEN_SELF
3774 # ------------------
3775 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3776 [m4_require([_LT_HEADER_DLFCN])dnl
3777 if test "x$enable_dlopen" != xyes; then
3778   enable_dlopen=unknown
3779   enable_dlopen_self=unknown
3780   enable_dlopen_self_static=unknown
3781 else
3782   lt_cv_dlopen=no
3783   lt_cv_dlopen_libs=
3784
3785   case $host_os in
3786   beos*)
3787     lt_cv_dlopen="load_add_on"
3788     lt_cv_dlopen_libs=
3789     lt_cv_dlopen_self=yes
3790     ;;
3791
3792   mingw* | pw32* | cegcc*)
3793     lt_cv_dlopen="LoadLibrary"
3794     lt_cv_dlopen_libs=
3795     ;;
3796
3797   cygwin*)
3798     lt_cv_dlopen="dlopen"
3799     lt_cv_dlopen_libs=
3800     ;;
3801
3802   darwin*)
3803   # if libdl is installed we need to link against it
3804     AC_CHECK_LIB([dl], [dlopen],
3805                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3806     lt_cv_dlopen="dyld"
3807     lt_cv_dlopen_libs=
3808     lt_cv_dlopen_self=yes
3809     ])
3810     ;;
3811
3812   *)
3813     AC_CHECK_FUNC([shl_load],
3814           [lt_cv_dlopen="shl_load"],
3815       [AC_CHECK_LIB([dld], [shl_load],
3816             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3817         [AC_CHECK_FUNC([dlopen],
3818               [lt_cv_dlopen="dlopen"],
3819           [AC_CHECK_LIB([dl], [dlopen],
3820                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3821             [AC_CHECK_LIB([svld], [dlopen],
3822                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3823               [AC_CHECK_LIB([dld], [dld_link],
3824                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3825               ])
3826             ])
3827           ])
3828         ])
3829       ])
3830     ;;
3831   esac
3832
3833   if test "x$lt_cv_dlopen" != xno; then
3834     enable_dlopen=yes
3835   else
3836     enable_dlopen=no
3837   fi
3838
3839   case $lt_cv_dlopen in
3840   dlopen)
3841     save_CPPFLAGS="$CPPFLAGS"
3842     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3843
3844     save_LDFLAGS="$LDFLAGS"
3845     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3846
3847     save_LIBS="$LIBS"
3848     LIBS="$lt_cv_dlopen_libs $LIBS"
3849
3850     AC_CACHE_CHECK([whether a program can dlopen itself],
3851           lt_cv_dlopen_self, [dnl
3852           _LT_TRY_DLOPEN_SELF(
3853             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3854             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3855     ])
3856
3857     if test "x$lt_cv_dlopen_self" = xyes; then
3858       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3859       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3860           lt_cv_dlopen_self_static, [dnl
3861           _LT_TRY_DLOPEN_SELF(
3862             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3863             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3864       ])
3865     fi
3866
3867     CPPFLAGS="$save_CPPFLAGS"
3868     LDFLAGS="$save_LDFLAGS"
3869     LIBS="$save_LIBS"
3870     ;;
3871   esac
3872
3873   case $lt_cv_dlopen_self in
3874   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3875   *) enable_dlopen_self=unknown ;;
3876   esac
3877
3878   case $lt_cv_dlopen_self_static in
3879   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3880   *) enable_dlopen_self_static=unknown ;;
3881   esac
3882 fi
3883 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3884          [Whether dlopen is supported])
3885 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3886          [Whether dlopen of programs is supported])
3887 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3888          [Whether dlopen of statically linked programs is supported])
3889 ])# LT_SYS_DLOPEN_SELF
3890
3891 # Old name:
3892 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3893 dnl aclocal-1.4 backwards compatibility:
3894 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3895
3896
3897 # _LT_COMPILER_C_O([TAGNAME])
3898 # ---------------------------
3899 # Check to see if options -c and -o are simultaneously supported by compiler.
3900 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3901 m4_defun([_LT_COMPILER_C_O],
3902 [m4_require([_LT_DECL_SED])dnl
3903 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3904 m4_require([_LT_TAG_COMPILER])dnl
3905 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3906   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3907   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3908    $RM -r conftest 2>/dev/null
3909    mkdir conftest
3910    cd conftest
3911    mkdir out
3912    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3913
3914    lt_compiler_flag="-o out/conftest2.$ac_objext"
3915    # Insert the option either (1) after the last *FLAGS variable, or
3916    # (2) before a word containing "conftest.", or (3) at the end.
3917    # Note that $ac_compile itself does not contain backslashes and begins
3918    # with a dollar sign (not a hyphen), so the echo should work correctly.
3919    lt_compile=`echo "$ac_compile" | $SED \
3920    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3921    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3922    -e 's:$: $lt_compiler_flag:'`
3923    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3924    (eval "$lt_compile" 2>out/conftest.err)
3925    ac_status=$?
3926    cat out/conftest.err >&AS_MESSAGE_LOG_FD
3927    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3928    if (exit $ac_status) && test -s out/conftest2.$ac_objext
3929    then
3930      # The compiler can only warn and ignore the option if not recognized
3931      # So say no if there are warnings
3932      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3933      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3934      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3935        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3936      fi
3937    fi
3938    chmod u+w . 2>&AS_MESSAGE_LOG_FD
3939    $RM conftest*
3940    # SGI C++ compiler will create directory out/ii_files/ for
3941    # template instantiation
3942    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3943    $RM out/* && rmdir out
3944    cd ..
3945    $RM -r conftest
3946    $RM conftest*
3947 ])
3948 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3949         [Does compiler simultaneously support -c and -o options?])
3950 ])# _LT_COMPILER_C_O
3951
3952
3953 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3954 # ----------------------------------
3955 # Check to see if we can do hard links to lock some files if needed
3956 m4_defun([_LT_COMPILER_FILE_LOCKS],
3957 [m4_require([_LT_ENABLE_LOCK])dnl
3958 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3959 _LT_COMPILER_C_O([$1])
3960
3961 hard_links="nottested"
3962 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3963   # do not overwrite the value of need_locks provided by the user
3964   AC_MSG_CHECKING([if we can lock with hard links])
3965   hard_links=yes
3966   $RM conftest*
3967   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3968   touch conftest.a
3969   ln conftest.a conftest.b 2>&5 || hard_links=no
3970   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3971   AC_MSG_RESULT([$hard_links])
3972   if test "$hard_links" = no; then
3973     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3974     need_locks=warn
3975   fi
3976 else
3977   need_locks=no
3978 fi
3979 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3980 ])# _LT_COMPILER_FILE_LOCKS
3981
3982
3983 # _LT_CHECK_OBJDIR
3984 # ----------------
3985 m4_defun([_LT_CHECK_OBJDIR],
3986 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3987 [rm -f .libs 2>/dev/null
3988 mkdir .libs 2>/dev/null
3989 if test -d .libs; then
3990   lt_cv_objdir=.libs
3991 else
3992   # MS-DOS does not allow filenames that begin with a dot.
3993   lt_cv_objdir=_libs
3994 fi
3995 rmdir .libs 2>/dev/null])
3996 objdir=$lt_cv_objdir
3997 _LT_DECL([], [objdir], [0],
3998          [The name of the directory that contains temporary libtool files])dnl
3999 m4_pattern_allow([LT_OBJDIR])dnl
4000 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4001   [Define to the sub-directory in which libtool stores uninstalled libraries.])
4002 ])# _LT_CHECK_OBJDIR
4003
4004
4005 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4006 # --------------------------------------
4007 # Check hardcoding attributes.
4008 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4009 [AC_MSG_CHECKING([how to hardcode library paths into programs])
4010 _LT_TAGVAR(hardcode_action, $1)=
4011 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4012    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4013    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4014
4015   # We can hardcode non-existent directories.
4016   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4017      # If the only mechanism to avoid hardcoding is shlibpath_var, we
4018      # have to relink, otherwise we might link with an installed library
4019      # when we should be linking with a yet-to-be-installed one
4020      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4021      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4022     # Linking always hardcodes the temporary library directory.
4023     _LT_TAGVAR(hardcode_action, $1)=relink
4024   else
4025     # We can link without hardcoding, and we can hardcode nonexisting dirs.
4026     _LT_TAGVAR(hardcode_action, $1)=immediate
4027   fi
4028 else
4029   # We cannot hardcode anything, or else we can only hardcode existing
4030   # directories.
4031   _LT_TAGVAR(hardcode_action, $1)=unsupported
4032 fi
4033 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4034
4035 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4036    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4037   # Fast installation is not supported
4038   enable_fast_install=no
4039 elif test "$shlibpath_overrides_runpath" = yes ||
4040      test "$enable_shared" = no; then
4041   # Fast installation is not necessary
4042   enable_fast_install=needless
4043 fi
4044 _LT_TAGDECL([], [hardcode_action], [0],
4045     [How to hardcode a shared library path into an executable])
4046 ])# _LT_LINKER_HARDCODE_LIBPATH
4047
4048
4049 # _LT_CMD_STRIPLIB
4050 # ----------------
4051 m4_defun([_LT_CMD_STRIPLIB],
4052 [m4_require([_LT_DECL_EGREP])
4053 striplib=
4054 old_striplib=
4055 AC_MSG_CHECKING([whether stripping libraries is possible])
4056 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4057   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4058   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4059   AC_MSG_RESULT([yes])
4060 else
4061 # FIXME - insert some real tests, host_os isn't really good enough
4062   case $host_os in
4063   darwin*)
4064     if test -n "$STRIP" ; then
4065       striplib="$STRIP -x"
4066       old_striplib="$STRIP -S"
4067       AC_MSG_RESULT([yes])
4068     else
4069       AC_MSG_RESULT([no])
4070     fi
4071     ;;
4072   *)
4073     AC_MSG_RESULT([no])
4074     ;;
4075   esac
4076 fi
4077 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4078 _LT_DECL([], [striplib], [1])
4079 ])# _LT_CMD_STRIPLIB
4080
4081
4082 # _LT_SYS_DYNAMIC_LINKER([TAG])
4083 # -----------------------------
4084 # PORTME Fill in your ld.so characteristics
4085 m4_defun([_LT_SYS_DYNAMIC_LINKER],
4086 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4087 m4_require([_LT_DECL_EGREP])dnl
4088 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4089 m4_require([_LT_DECL_OBJDUMP])dnl
4090 m4_require([_LT_DECL_SED])dnl
4091 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4092 AC_MSG_CHECKING([dynamic linker characteristics])
4093 m4_if([$1],
4094         [], [
4095 if test "$GCC" = yes; then
4096   case $host_os in
4097     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4098     *) lt_awk_arg="/^libraries:/" ;;
4099   esac
4100   case $host_os in
4101     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
4102     *) lt_sed_strip_eq="s,=/,/,g" ;;
4103   esac
4104   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4105   case $lt_search_path_spec in
4106   *\;*)
4107     # if the path contains ";" then we assume it to be the separator
4108     # otherwise default to the standard path separator (i.e. ":") - it is
4109     # assumed that no part of a normal pathname contains ";" but that should
4110     # okay in the real world where ";" in dirpaths is itself problematic.
4111     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4112     ;;
4113   *)
4114     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4115     ;;
4116   esac
4117   # Ok, now we have the path, separated by spaces, we can step through it
4118   # and add multilib dir if necessary.
4119   lt_tmp_lt_search_path_spec=
4120   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4121   for lt_sys_path in $lt_search_path_spec; do
4122     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4123       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4124     else
4125       test -d "$lt_sys_path" && \
4126         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4127     fi
4128   done
4129   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4130 BEGIN {RS=" "; FS="/|\n";} {
4131   lt_foo="";
4132   lt_count=0;
4133   for (lt_i = NF; lt_i > 0; lt_i--) {
4134     if ($lt_i != "" && $lt_i != ".") {
4135       if ($lt_i == "..") {
4136         lt_count++;
4137       } else {
4138         if (lt_count == 0) {
4139           lt_foo="/" $lt_i lt_foo;
4140         } else {
4141           lt_count--;
4142         }
4143       }
4144     }
4145   }
4146   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4147   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4148 }'`
4149   # AWK program above erroneously prepends '/' to C:/dos/paths
4150   # for these hosts.
4151   case $host_os in
4152     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4153       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
4154   esac
4155   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4156 else
4157   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4158 fi])
4159 library_names_spec=
4160 libname_spec='lib$name'
4161 soname_spec=
4162 shrext_cmds=".so"
4163 postinstall_cmds=
4164 postuninstall_cmds=
4165 finish_cmds=
4166 finish_eval=
4167 shlibpath_var=
4168 shlibpath_overrides_runpath=unknown
4169 version_type=none
4170 dynamic_linker="$host_os ld.so"
4171 sys_lib_dlsearch_path_spec="/lib /usr/lib"
4172 need_lib_prefix=unknown
4173 hardcode_into_libs=no
4174
4175 # when you set need_version to no, make sure it does not cause -set_version
4176 # flags to be left without arguments
4177 need_version=unknown
4178
4179 case $host_os in
4180 aix3*)
4181   version_type=linux # correct to gnu/linux during the next big refactor
4182   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4183   shlibpath_var=LIBPATH
4184
4185   # AIX 3 has no versioning support, so we append a major version to the name.
4186   soname_spec='${libname}${release}${shared_ext}$major'
4187   ;;
4188
4189 aix[[4-9]]*)
4190   version_type=linux # correct to gnu/linux during the next big refactor
4191   need_lib_prefix=no
4192   need_version=no
4193   hardcode_into_libs=yes
4194   if test "$host_cpu" = ia64; then
4195     # AIX 5 supports IA64
4196     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4197     shlibpath_var=LD_LIBRARY_PATH
4198   else
4199     # With GCC up to 2.95.x, collect2 would create an import file
4200     # for dependence libraries.  The import file would start with
4201     # the line `#! .'.  This would cause the generated library to
4202     # depend on `.', always an invalid library.  This was fixed in
4203     # development snapshots of GCC prior to 3.0.
4204     case $host_os in
4205       aix4 | aix4.[[01]] | aix4.[[01]].*)
4206       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4207            echo ' yes '
4208            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4209         :
4210       else
4211         can_build_shared=no
4212       fi
4213       ;;
4214     esac
4215     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4216     # soname into executable. Probably we can add versioning support to
4217     # collect2, so additional links can be useful in future.
4218     if test "$aix_use_runtimelinking" = yes; then
4219       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4220       # instead of lib<name>.a to let people know that these are not
4221       # typical AIX shared libraries.
4222       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4223     else
4224       # We preserve .a as extension for shared libraries through AIX4.2
4225       # and later when we are not doing run time linking.
4226       library_names_spec='${libname}${release}.a $libname.a'
4227       soname_spec='${libname}${release}${shared_ext}$major'
4228     fi
4229     shlibpath_var=LIBPATH
4230   fi
4231   ;;
4232
4233 amigaos*)
4234   case $host_cpu in
4235   powerpc)
4236     # Since July 2007 AmigaOS4 officially supports .so libraries.
4237     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4238     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4239     ;;
4240   m68k)
4241     library_names_spec='$libname.ixlibrary $libname.a'
4242     # Create ${libname}_ixlibrary.a entries in /sys/libs.
4243     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
4244     ;;
4245   esac
4246   ;;
4247
4248 beos*)
4249   library_names_spec='${libname}${shared_ext}'
4250   dynamic_linker="$host_os ld.so"
4251   shlibpath_var=LIBRARY_PATH
4252   ;;
4253
4254 bsdi[[45]]*)
4255   version_type=linux # correct to gnu/linux during the next big refactor
4256   need_version=no
4257   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4258   soname_spec='${libname}${release}${shared_ext}$major'
4259   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4260   shlibpath_var=LD_LIBRARY_PATH
4261   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4262   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4263   # the default ld.so.conf also contains /usr/contrib/lib and
4264   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4265   # libtool to hard-code these into programs
4266   ;;
4267
4268 cygwin* | mingw* | pw32* | cegcc*)
4269   version_type=windows
4270   shrext_cmds=".dll"
4271   need_version=no
4272   need_lib_prefix=no
4273
4274   case $GCC,$cc_basename in
4275   yes,*)
4276     # gcc
4277     library_names_spec='$libname.dll.a'
4278     # DLL is installed to $(libdir)/../bin by postinstall_cmds
4279     postinstall_cmds='base_file=`basename \${file}`~
4280       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4281       dldir=$destdir/`dirname \$dlpath`~
4282       test -d \$dldir || mkdir -p \$dldir~
4283       $install_prog $dir/$dlname \$dldir/$dlname~
4284       chmod a+x \$dldir/$dlname~
4285       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4286         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4287       fi'
4288     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4289       dlpath=$dir/\$dldll~
4290        $RM \$dlpath'
4291     shlibpath_overrides_runpath=yes
4292
4293     case $host_os in
4294     cygwin*)
4295       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4296       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4297 m4_if([$1], [],[
4298       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4299       ;;
4300     mingw* | cegcc*)
4301       # MinGW DLLs use traditional 'lib' prefix
4302       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4303       ;;
4304     pw32*)
4305       # pw32 DLLs use 'pw' prefix rather than 'lib'
4306       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4307       ;;
4308     esac
4309     dynamic_linker='Win32 ld.exe'
4310     ;;
4311
4312   *,cl*)
4313     # Native MSVC
4314     libname_spec='$name'
4315     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4316     library_names_spec='${libname}.dll.lib'
4317
4318     case $build_os in
4319     mingw*)
4320       sys_lib_search_path_spec=
4321       lt_save_ifs=$IFS
4322       IFS=';'
4323       for lt_path in $LIB
4324       do
4325         IFS=$lt_save_ifs
4326         # Let DOS variable expansion print the short 8.3 style file name.
4327         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
4328         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
4329       done
4330       IFS=$lt_save_ifs
4331       # Convert to MSYS style.
4332       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
4333       ;;
4334     cygwin*)
4335       # Convert to unix form, then to dos form, then back to unix form
4336       # but this time dos style (no spaces!) so that the unix form looks
4337       # like /cygdrive/c/PROGRA~1:/cygdr...
4338       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
4339       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
4340       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4341       ;;
4342     *)
4343       sys_lib_search_path_spec="$LIB"
4344       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4345         # It is most probably a Windows format PATH.
4346         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4347       else
4348         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4349       fi
4350       # FIXME: find the short name or the path components, as spaces are
4351       # common. (e.g. "Program Files" -> "PROGRA~1")
4352       ;;
4353     esac
4354
4355     # DLL is installed to $(libdir)/../bin by postinstall_cmds
4356     postinstall_cmds='base_file=`basename \${file}`~
4357       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4358       dldir=$destdir/`dirname \$dlpath`~
4359       test -d \$dldir || mkdir -p \$dldir~
4360       $install_prog $dir/$dlname \$dldir/$dlname'
4361     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4362       dlpath=$dir/\$dldll~
4363        $RM \$dlpath'
4364     shlibpath_overrides_runpath=yes
4365     dynamic_linker='Win32 link.exe'
4366     ;;
4367
4368   *)
4369     # Assume MSVC wrapper
4370     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4371     dynamic_linker='Win32 ld.exe'
4372     ;;
4373   esac
4374   # FIXME: first we should search . and the directory the executable is in
4375   shlibpath_var=PATH
4376   ;;
4377
4378 darwin* | rhapsody*)
4379   dynamic_linker="$host_os dyld"
4380   version_type=darwin
4381   need_lib_prefix=no
4382   need_version=no
4383   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4384   soname_spec='${libname}${release}${major}$shared_ext'
4385   shlibpath_overrides_runpath=yes
4386   shlibpath_var=DYLD_LIBRARY_PATH
4387   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4388 m4_if([$1], [],[
4389   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4390   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4391   ;;
4392
4393 dgux*)
4394   version_type=linux # correct to gnu/linux during the next big refactor
4395   need_lib_prefix=no
4396   need_version=no
4397   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4398   soname_spec='${libname}${release}${shared_ext}$major'
4399   shlibpath_var=LD_LIBRARY_PATH
4400   ;;
4401
4402 freebsd* | dragonfly*)
4403   # DragonFly does not have aout.  When/if they implement a new
4404   # versioning mechanism, adjust this.
4405   if test -x /usr/bin/objformat; then
4406     objformat=`/usr/bin/objformat`
4407   else
4408     case $host_os in
4409     freebsd[[23]].*) objformat=aout ;;
4410     *) objformat=elf ;;
4411     esac
4412   fi
4413   version_type=freebsd-$objformat
4414   case $version_type in
4415     freebsd-elf*)
4416       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4417       need_version=no
4418       need_lib_prefix=no
4419       ;;
4420     freebsd-*)
4421       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4422       need_version=yes
4423       ;;
4424   esac
4425   shlibpath_var=LD_LIBRARY_PATH
4426   case $host_os in
4427   freebsd2.*)
4428     shlibpath_overrides_runpath=yes
4429     ;;
4430   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4431     shlibpath_overrides_runpath=yes
4432     hardcode_into_libs=yes
4433     ;;
4434   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4435   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4436     shlibpath_overrides_runpath=no
4437     hardcode_into_libs=yes
4438     ;;
4439   *) # from 4.6 on, and DragonFly
4440     shlibpath_overrides_runpath=yes
4441     hardcode_into_libs=yes
4442     ;;
4443   esac
4444   ;;
4445
4446 gnu*)
4447   version_type=linux # correct to gnu/linux during the next big refactor
4448   need_lib_prefix=no
4449   need_version=no
4450   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4451   soname_spec='${libname}${release}${shared_ext}$major'
4452   shlibpath_var=LD_LIBRARY_PATH
4453   shlibpath_overrides_runpath=no
4454   hardcode_into_libs=yes
4455   ;;
4456
4457 haiku*)
4458   version_type=linux # correct to gnu/linux during the next big refactor
4459   need_lib_prefix=no
4460   need_version=no
4461   dynamic_linker="$host_os runtime_loader"
4462   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4463   soname_spec='${libname}${release}${shared_ext}$major'
4464   shlibpath_var=LIBRARY_PATH
4465   shlibpath_overrides_runpath=yes
4466   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4467   hardcode_into_libs=yes
4468   ;;
4469
4470 hpux9* | hpux10* | hpux11*)
4471   # Give a soname corresponding to the major version so that dld.sl refuses to
4472   # link against other versions.
4473   version_type=sunos
4474   need_lib_prefix=no
4475   need_version=no
4476   case $host_cpu in
4477   ia64*)
4478     shrext_cmds='.so'
4479     hardcode_into_libs=yes
4480     dynamic_linker="$host_os dld.so"
4481     shlibpath_var=LD_LIBRARY_PATH
4482     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4483     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4484     soname_spec='${libname}${release}${shared_ext}$major'
4485     if test "X$HPUX_IA64_MODE" = X32; then
4486       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4487     else
4488       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4489     fi
4490     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4491     ;;
4492   hppa*64*)
4493     shrext_cmds='.sl'
4494     hardcode_into_libs=yes
4495     dynamic_linker="$host_os dld.sl"
4496     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4497     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4498     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4499     soname_spec='${libname}${release}${shared_ext}$major'
4500     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4501     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4502     ;;
4503   *)
4504     shrext_cmds='.sl'
4505     dynamic_linker="$host_os dld.sl"
4506     shlibpath_var=SHLIB_PATH
4507     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4508     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4509     soname_spec='${libname}${release}${shared_ext}$major'
4510     ;;
4511   esac
4512   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4513   postinstall_cmds='chmod 555 $lib'
4514   # or fails outright, so override atomically:
4515   install_override_mode=555
4516   ;;
4517
4518 interix[[3-9]]*)
4519   version_type=linux # correct to gnu/linux during the next big refactor
4520   need_lib_prefix=no
4521   need_version=no
4522   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4523   soname_spec='${libname}${release}${shared_ext}$major'
4524   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4525   shlibpath_var=LD_LIBRARY_PATH
4526   shlibpath_overrides_runpath=no
4527   hardcode_into_libs=yes
4528   ;;
4529
4530 irix5* | irix6* | nonstopux*)
4531   case $host_os in
4532     nonstopux*) version_type=nonstopux ;;
4533     *)
4534         if test "$lt_cv_prog_gnu_ld" = yes; then
4535                 version_type=linux # correct to gnu/linux during the next big refactor
4536         else
4537                 version_type=irix
4538         fi ;;
4539   esac
4540   need_lib_prefix=no
4541   need_version=no
4542   soname_spec='${libname}${release}${shared_ext}$major'
4543   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4544   case $host_os in
4545   irix5* | nonstopux*)
4546     libsuff= shlibsuff=
4547     ;;
4548   *)
4549     case $LD in # libtool.m4 will add one of these switches to LD
4550     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4551       libsuff= shlibsuff= libmagic=32-bit;;
4552     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4553       libsuff=32 shlibsuff=N32 libmagic=N32;;
4554     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4555       libsuff=64 shlibsuff=64 libmagic=64-bit;;
4556     *) libsuff= shlibsuff= libmagic=never-match;;
4557     esac
4558     ;;
4559   esac
4560   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4561   shlibpath_overrides_runpath=no
4562   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4563   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4564   hardcode_into_libs=yes
4565   ;;
4566
4567 # No shared lib support for Linux oldld, aout, or coff.
4568 linux*oldld* | linux*aout* | linux*coff*)
4569   dynamic_linker=no
4570   ;;
4571
4572 # This must be glibc/ELF.
4573 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4574   version_type=linux # correct to gnu/linux during the next big refactor
4575   need_lib_prefix=no
4576   need_version=no
4577   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4578   soname_spec='${libname}${release}${shared_ext}$major'
4579   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4580   shlibpath_var=LD_LIBRARY_PATH
4581   shlibpath_overrides_runpath=no
4582
4583   # Some binutils ld are patched to set DT_RUNPATH
4584   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4585     [lt_cv_shlibpath_overrides_runpath=no
4586     save_LDFLAGS=$LDFLAGS
4587     save_libdir=$libdir
4588     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4589          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4590     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4591       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4592          [lt_cv_shlibpath_overrides_runpath=yes])])
4593     LDFLAGS=$save_LDFLAGS
4594     libdir=$save_libdir
4595     ])
4596   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4597
4598   # This implies no fast_install, which is unacceptable.
4599   # Some rework will be needed to allow for fast_install
4600   # before this can be enabled.
4601   hardcode_into_libs=yes
4602
4603   # Append ld.so.conf contents to the search path
4604   if test -f /etc/ld.so.conf; then
4605     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;s/"//g;/^$/d' | tr '\n' ' '`
4606     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4607   fi
4608
4609   # We used to test for /lib/ld.so.1 and disable shared libraries on
4610   # powerpc, because MkLinux only supported shared libraries with the
4611   # GNU dynamic linker.  Since this was broken with cross compilers,
4612   # most powerpc-linux boxes support dynamic linking these days and
4613   # people can always --disable-shared, the test was removed, and we
4614   # assume the GNU/Linux dynamic linker is in use.
4615   dynamic_linker='GNU/Linux ld.so'
4616   ;;
4617
4618 netbsdelf*-gnu)
4619   version_type=linux
4620   need_lib_prefix=no
4621   need_version=no
4622   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4623   soname_spec='${libname}${release}${shared_ext}$major'
4624   shlibpath_var=LD_LIBRARY_PATH
4625   shlibpath_overrides_runpath=no
4626   hardcode_into_libs=yes
4627   dynamic_linker='NetBSD ld.elf_so'
4628   ;;
4629
4630 netbsd*)
4631   version_type=sunos
4632   need_lib_prefix=no
4633   need_version=no
4634   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4635     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4636     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4637     dynamic_linker='NetBSD (a.out) ld.so'
4638   else
4639     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4640     soname_spec='${libname}${release}${shared_ext}$major'
4641     dynamic_linker='NetBSD ld.elf_so'
4642   fi
4643   shlibpath_var=LD_LIBRARY_PATH
4644   shlibpath_overrides_runpath=yes
4645   hardcode_into_libs=yes
4646   ;;
4647
4648 newsos6)
4649   version_type=linux # correct to gnu/linux during the next big refactor
4650   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4651   shlibpath_var=LD_LIBRARY_PATH
4652   shlibpath_overrides_runpath=yes
4653   ;;
4654
4655 *nto* | *qnx*)
4656   version_type=qnx
4657   need_lib_prefix=no
4658   need_version=no
4659   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4660   soname_spec='${libname}${release}${shared_ext}$major'
4661   shlibpath_var=LD_LIBRARY_PATH
4662   shlibpath_overrides_runpath=no
4663   hardcode_into_libs=yes
4664   dynamic_linker='ldqnx.so'
4665   ;;
4666
4667 openbsd*)
4668   version_type=sunos
4669   sys_lib_dlsearch_path_spec="/usr/lib"
4670   need_lib_prefix=no
4671   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4672   case $host_os in
4673     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
4674     *)                          need_version=no  ;;
4675   esac
4676   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4677   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4678   shlibpath_var=LD_LIBRARY_PATH
4679   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4680     case $host_os in
4681       openbsd2.[[89]] | openbsd2.[[89]].*)
4682         shlibpath_overrides_runpath=no
4683         ;;
4684       *)
4685         shlibpath_overrides_runpath=yes
4686         ;;
4687       esac
4688   else
4689     shlibpath_overrides_runpath=yes
4690   fi
4691   ;;
4692
4693 os2*)
4694   libname_spec='$name'
4695   shrext_cmds=".dll"
4696   need_lib_prefix=no
4697   library_names_spec='$libname${shared_ext} $libname.a'
4698   dynamic_linker='OS/2 ld.exe'
4699   shlibpath_var=LIBPATH
4700   ;;
4701
4702 osf3* | osf4* | osf5*)
4703   version_type=osf
4704   need_lib_prefix=no
4705   need_version=no
4706   soname_spec='${libname}${release}${shared_ext}$major'
4707   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4708   shlibpath_var=LD_LIBRARY_PATH
4709   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4710   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4711   ;;
4712
4713 rdos*)
4714   dynamic_linker=no
4715   ;;
4716
4717 solaris*)
4718   version_type=linux # correct to gnu/linux during the next big refactor
4719   need_lib_prefix=no
4720   need_version=no
4721   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4722   soname_spec='${libname}${release}${shared_ext}$major'
4723   shlibpath_var=LD_LIBRARY_PATH
4724   shlibpath_overrides_runpath=yes
4725   hardcode_into_libs=yes
4726   # ldd complains unless libraries are executable
4727   postinstall_cmds='chmod +x $lib'
4728   ;;
4729
4730 sunos4*)
4731   version_type=sunos
4732   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4733   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4734   shlibpath_var=LD_LIBRARY_PATH
4735   shlibpath_overrides_runpath=yes
4736   if test "$with_gnu_ld" = yes; then
4737     need_lib_prefix=no
4738   fi
4739   need_version=yes
4740   ;;
4741
4742 sysv4 | sysv4.3*)
4743   version_type=linux # correct to gnu/linux during the next big refactor
4744   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4745   soname_spec='${libname}${release}${shared_ext}$major'
4746   shlibpath_var=LD_LIBRARY_PATH
4747   case $host_vendor in
4748     sni)
4749       shlibpath_overrides_runpath=no
4750       need_lib_prefix=no
4751       runpath_var=LD_RUN_PATH
4752       ;;
4753     siemens)
4754       need_lib_prefix=no
4755       ;;
4756     motorola)
4757       need_lib_prefix=no
4758       need_version=no
4759       shlibpath_overrides_runpath=no
4760       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4761       ;;
4762   esac
4763   ;;
4764
4765 sysv4*MP*)
4766   if test -d /usr/nec ;then
4767     version_type=linux # correct to gnu/linux during the next big refactor
4768     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4769     soname_spec='$libname${shared_ext}.$major'
4770     shlibpath_var=LD_LIBRARY_PATH
4771   fi
4772   ;;
4773
4774 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4775   version_type=freebsd-elf
4776   need_lib_prefix=no
4777   need_version=no
4778   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4779   soname_spec='${libname}${release}${shared_ext}$major'
4780   shlibpath_var=LD_LIBRARY_PATH
4781   shlibpath_overrides_runpath=yes
4782   hardcode_into_libs=yes
4783   if test "$with_gnu_ld" = yes; then
4784     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4785   else
4786     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4787     case $host_os in
4788       sco3.2v5*)
4789         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4790         ;;
4791     esac
4792   fi
4793   sys_lib_dlsearch_path_spec='/usr/lib'
4794   ;;
4795
4796 tpf*)
4797   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4798   version_type=linux # correct to gnu/linux during the next big refactor
4799   need_lib_prefix=no
4800   need_version=no
4801   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4802   shlibpath_var=LD_LIBRARY_PATH
4803   shlibpath_overrides_runpath=no
4804   hardcode_into_libs=yes
4805   ;;
4806
4807 uts4*)
4808   version_type=linux # correct to gnu/linux during the next big refactor
4809   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4810   soname_spec='${libname}${release}${shared_ext}$major'
4811   shlibpath_var=LD_LIBRARY_PATH
4812   ;;
4813
4814 *)
4815   dynamic_linker=no
4816   ;;
4817 esac
4818 AC_MSG_RESULT([$dynamic_linker])
4819 test "$dynamic_linker" = no && can_build_shared=no
4820
4821 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4822 if test "$GCC" = yes; then
4823   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4824 fi
4825
4826 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4827   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4828 fi
4829 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4830   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4831 fi
4832
4833 _LT_DECL([], [variables_saved_for_relink], [1],
4834     [Variables whose values should be saved in libtool wrapper scripts and
4835     restored at link time])
4836 _LT_DECL([], [need_lib_prefix], [0],
4837     [Do we need the "lib" prefix for modules?])
4838 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4839 _LT_DECL([], [version_type], [0], [Library versioning type])
4840 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4841 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4842 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4843     [Is shlibpath searched before the hard-coded library search path?])
4844 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4845 _LT_DECL([], [library_names_spec], [1],
4846     [[List of archive names.  First name is the real one, the rest are links.
4847     The last name is the one that the linker finds with -lNAME]])
4848 _LT_DECL([], [soname_spec], [1],
4849     [[The coded name of the library, if different from the real name]])
4850 _LT_DECL([], [install_override_mode], [1],
4851     [Permission mode override for installation of shared libraries])
4852 _LT_DECL([], [postinstall_cmds], [2],
4853     [Command to use after installation of a shared archive])
4854 _LT_DECL([], [postuninstall_cmds], [2],
4855     [Command to use after uninstallation of a shared archive])
4856 _LT_DECL([], [finish_cmds], [2],
4857     [Commands used to finish a libtool library installation in a directory])
4858 _LT_DECL([], [finish_eval], [1],
4859     [[As "finish_cmds", except a single script fragment to be evaled but
4860     not shown]])
4861 _LT_DECL([], [hardcode_into_libs], [0],
4862     [Whether we should hardcode library paths into libraries])
4863 _LT_DECL([], [sys_lib_search_path_spec], [2],
4864     [Compile-time system search path for libraries])
4865 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4866     [Run-time system search path for libraries])
4867 ])# _LT_SYS_DYNAMIC_LINKER
4868
4869
4870 # _LT_PATH_TOOL_PREFIX(TOOL)
4871 # --------------------------
4872 # find a file program which can recognize shared library
4873 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4874 [m4_require([_LT_DECL_EGREP])dnl
4875 AC_MSG_CHECKING([for $1])
4876 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4877 [case $MAGIC_CMD in
4878 [[\\/*] |  ?:[\\/]*])
4879   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4880   ;;
4881 *)
4882   lt_save_MAGIC_CMD="$MAGIC_CMD"
4883   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4884 dnl $ac_dummy forces splitting on constant user-supplied paths.
4885 dnl POSIX.2 word splitting is done only on the output of word expansions,
4886 dnl not every word.  This closes a longstanding sh security hole.
4887   ac_dummy="m4_if([$2], , $PATH, [$2])"
4888   for ac_dir in $ac_dummy; do
4889     IFS="$lt_save_ifs"
4890     test -z "$ac_dir" && ac_dir=.
4891     if test -f $ac_dir/$1; then
4892       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4893       if test -n "$file_magic_test_file"; then
4894         case $deplibs_check_method in
4895         "file_magic "*)
4896           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4897           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4898           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4899             $EGREP "$file_magic_regex" > /dev/null; then
4900             :
4901           else
4902             cat <<_LT_EOF 1>&2
4903
4904 *** Warning: the command libtool uses to detect shared libraries,
4905 *** $file_magic_cmd, produces output that libtool cannot recognize.
4906 *** The result is that libtool may fail to recognize shared libraries
4907 *** as such.  This will affect the creation of libtool libraries that
4908 *** depend on shared libraries, but programs linked with such libtool
4909 *** libraries will work regardless of this problem.  Nevertheless, you
4910 *** may want to report the problem to your system manager and/or to
4911 *** bug-libtool@gnu.org
4912
4913 _LT_EOF
4914           fi ;;
4915         esac
4916       fi
4917       break
4918     fi
4919   done
4920   IFS="$lt_save_ifs"
4921   MAGIC_CMD="$lt_save_MAGIC_CMD"
4922   ;;
4923 esac])
4924 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4925 if test -n "$MAGIC_CMD"; then
4926   AC_MSG_RESULT($MAGIC_CMD)
4927 else
4928   AC_MSG_RESULT(no)
4929 fi
4930 _LT_DECL([], [MAGIC_CMD], [0],
4931          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4932 ])# _LT_PATH_TOOL_PREFIX
4933
4934 # Old name:
4935 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4936 dnl aclocal-1.4 backwards compatibility:
4937 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4938
4939
4940 # _LT_PATH_MAGIC
4941 # --------------
4942 # find a file program which can recognize a shared library
4943 m4_defun([_LT_PATH_MAGIC],
4944 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4945 if test -z "$lt_cv_path_MAGIC_CMD"; then
4946   if test -n "$ac_tool_prefix"; then
4947     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4948   else
4949     MAGIC_CMD=:
4950   fi
4951 fi
4952 ])# _LT_PATH_MAGIC
4953
4954
4955 # LT_PATH_LD
4956 # ----------
4957 # find the pathname to the GNU or non-GNU linker
4958 AC_DEFUN([LT_PATH_LD],
4959 [AC_REQUIRE([AC_PROG_CC])dnl
4960 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4961 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4962 m4_require([_LT_DECL_SED])dnl
4963 m4_require([_LT_DECL_EGREP])dnl
4964 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4965
4966 AC_ARG_WITH([gnu-ld],
4967     [AS_HELP_STRING([--with-gnu-ld],
4968         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4969     [test "$withval" = no || with_gnu_ld=yes],
4970     [with_gnu_ld=no])dnl
4971
4972 ac_prog=ld
4973 if test "$GCC" = yes; then
4974   # Check if gcc -print-prog-name=ld gives a path.
4975   AC_MSG_CHECKING([for ld used by $CC])
4976   case $host in
4977   *-*-mingw*)
4978     # gcc leaves a trailing carriage return which upsets mingw
4979     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4980   *)
4981     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4982   esac
4983   case $ac_prog in
4984     # Accept absolute paths.
4985     [[\\/]]* | ?:[[\\/]]*)
4986       re_direlt='/[[^/]][[^/]]*/\.\./'
4987       # Canonicalize the pathname of ld
4988       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4989       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4990         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4991       done
4992       test -z "$LD" && LD="$ac_prog"
4993       ;;
4994   "")
4995     # If it fails, then pretend we aren't using GCC.
4996     ac_prog=ld
4997     ;;
4998   *)
4999     # If it is relative, then search for the first ld in PATH.
5000     with_gnu_ld=unknown
5001     ;;
5002   esac
5003 elif test "$with_gnu_ld" = yes; then
5004   AC_MSG_CHECKING([for GNU ld])
5005 else
5006   AC_MSG_CHECKING([for non-GNU ld])
5007 fi
5008 AC_CACHE_VAL(lt_cv_path_LD,
5009 [if test -z "$LD"; then
5010   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5011   for ac_dir in $PATH; do
5012     IFS="$lt_save_ifs"
5013     test -z "$ac_dir" && ac_dir=.
5014     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5015       lt_cv_path_LD="$ac_dir/$ac_prog"
5016       # Check to see if the program is GNU ld.  I'd rather use --version,
5017       # but apparently some variants of GNU ld only accept -v.
5018       # Break only if it was the GNU/non-GNU ld that we prefer.
5019       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5020       *GNU* | *'with BFD'*)
5021         test "$with_gnu_ld" != no && break
5022         ;;
5023       *)
5024         test "$with_gnu_ld" != yes && break
5025         ;;
5026       esac
5027     fi
5028   done
5029   IFS="$lt_save_ifs"
5030 else
5031   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5032 fi])
5033 LD="$lt_cv_path_LD"
5034 if test -n "$LD"; then
5035   AC_MSG_RESULT($LD)
5036 else
5037   AC_MSG_RESULT(no)
5038 fi
5039 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5040 _LT_PATH_LD_GNU
5041 AC_SUBST([LD])
5042
5043 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5044 ])# LT_PATH_LD
5045
5046 # Old names:
5047 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5048 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5049 dnl aclocal-1.4 backwards compatibility:
5050 dnl AC_DEFUN([AM_PROG_LD], [])
5051 dnl AC_DEFUN([AC_PROG_LD], [])
5052
5053
5054 # _LT_PATH_LD_GNU
5055 #- --------------
5056 m4_defun([_LT_PATH_LD_GNU],
5057 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5058 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
5059 case `$LD -v 2>&1 </dev/null` in
5060 *GNU* | *'with BFD'*)
5061   lt_cv_prog_gnu_ld=yes
5062   ;;
5063 *)
5064   lt_cv_prog_gnu_ld=no
5065   ;;
5066 esac])
5067 with_gnu_ld=$lt_cv_prog_gnu_ld
5068 ])# _LT_PATH_LD_GNU
5069
5070
5071 # _LT_CMD_RELOAD
5072 # --------------
5073 # find reload flag for linker
5074 #   -- PORTME Some linkers may need a different reload flag.
5075 m4_defun([_LT_CMD_RELOAD],
5076 [AC_CACHE_CHECK([for $LD option to reload object files],
5077   lt_cv_ld_reload_flag,
5078   [lt_cv_ld_reload_flag='-r'])
5079 reload_flag=$lt_cv_ld_reload_flag
5080 case $reload_flag in
5081 "" | " "*) ;;
5082 *) reload_flag=" $reload_flag" ;;
5083 esac
5084 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5085 case $host_os in
5086   cygwin* | mingw* | pw32* | cegcc*)
5087     if test "$GCC" != yes; then
5088       reload_cmds=false
5089     fi
5090     ;;
5091   darwin*)
5092     if test "$GCC" = yes; then
5093       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5094     else
5095       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5096     fi
5097     ;;
5098 esac
5099 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5100 _LT_TAGDECL([], [reload_cmds], [2])dnl
5101 ])# _LT_CMD_RELOAD
5102
5103
5104 # _LT_CHECK_MAGIC_METHOD
5105 # ----------------------
5106 # how to check for library dependencies
5107 #  -- PORTME fill in with the dynamic library characteristics
5108 m4_defun([_LT_CHECK_MAGIC_METHOD],
5109 [m4_require([_LT_DECL_EGREP])
5110 m4_require([_LT_DECL_OBJDUMP])
5111 AC_CACHE_CHECK([how to recognize dependent libraries],
5112 lt_cv_deplibs_check_method,
5113 [lt_cv_file_magic_cmd='$MAGIC_CMD'
5114 lt_cv_file_magic_test_file=
5115 lt_cv_deplibs_check_method='unknown'
5116 # Need to set the preceding variable on all platforms that support
5117 # interlibrary dependencies.
5118 # 'none' -- dependencies not supported.
5119 # `unknown' -- same as none, but documents that we really don't know.
5120 # 'pass_all' -- all dependencies passed with no checks.
5121 # 'test_compile' -- check by making test program.
5122 # 'file_magic [[regex]]' -- check by looking for files in library path
5123 # which responds to the $file_magic_cmd with a given extended regex.
5124 # If you have `file' or equivalent on your system and you're not sure
5125 # whether `pass_all' will *always* work, you probably want this one.
5126
5127 case $host_os in
5128 aix[[4-9]]*)
5129   lt_cv_deplibs_check_method=pass_all
5130   ;;
5131
5132 beos*)
5133   lt_cv_deplibs_check_method=pass_all
5134   ;;
5135
5136 bsdi[[45]]*)
5137   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5138   lt_cv_file_magic_cmd='/usr/bin/file -L'
5139   lt_cv_file_magic_test_file=/shlib/libc.so
5140   ;;
5141
5142 cygwin*)
5143   # func_win32_libid is a shell function defined in ltmain.sh
5144   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5145   lt_cv_file_magic_cmd='func_win32_libid'
5146   ;;
5147
5148 mingw* | pw32*)
5149   # Base MSYS/MinGW do not provide the 'file' command needed by
5150   # func_win32_libid shell function, so use a weaker test based on 'objdump',
5151   # unless we find 'file', for example because we are cross-compiling.
5152   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5153   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5154     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5155     lt_cv_file_magic_cmd='func_win32_libid'
5156   else
5157     # Keep this pattern in sync with the one in func_win32_libid.
5158     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5159     lt_cv_file_magic_cmd='$OBJDUMP -f'
5160   fi
5161   ;;
5162
5163 cegcc*)
5164   # use the weaker test based on 'objdump'. See mingw*.
5165   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5166   lt_cv_file_magic_cmd='$OBJDUMP -f'
5167   ;;
5168
5169 darwin* | rhapsody*)
5170   lt_cv_deplibs_check_method=pass_all
5171   ;;
5172
5173 freebsd* | dragonfly*)
5174   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5175     case $host_cpu in
5176     i*86 )
5177       # Not sure whether the presence of OpenBSD here was a mistake.
5178       # Let's accept both of them until this is cleared up.
5179       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5180       lt_cv_file_magic_cmd=/usr/bin/file
5181       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5182       ;;
5183     esac
5184   else
5185     lt_cv_deplibs_check_method=pass_all
5186   fi
5187   ;;
5188
5189 gnu*)
5190   lt_cv_deplibs_check_method=pass_all
5191   ;;
5192
5193 haiku*)
5194   lt_cv_deplibs_check_method=pass_all
5195   ;;
5196
5197 hpux10.20* | hpux11*)
5198   lt_cv_file_magic_cmd=/usr/bin/file
5199   case $host_cpu in
5200   ia64*)
5201     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5202     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5203     ;;
5204   hppa*64*)
5205     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
5206     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5207     ;;
5208   *)
5209     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5210     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5211     ;;
5212   esac
5213   ;;
5214
5215 interix[[3-9]]*)
5216   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5217   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5218   ;;
5219
5220 irix5* | irix6* | nonstopux*)
5221   case $LD in
5222   *-32|*"-32 ") libmagic=32-bit;;
5223   *-n32|*"-n32 ") libmagic=N32;;
5224   *-64|*"-64 ") libmagic=64-bit;;
5225   *) libmagic=never-match;;
5226   esac
5227   lt_cv_deplibs_check_method=pass_all
5228   ;;
5229
5230 # This must be glibc/ELF.
5231 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5232   lt_cv_deplibs_check_method=pass_all
5233   ;;
5234
5235 netbsd* | netbsdelf*-gnu)
5236   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5237     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5238   else
5239     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5240   fi
5241   ;;
5242
5243 newos6*)
5244   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5245   lt_cv_file_magic_cmd=/usr/bin/file
5246   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5247   ;;
5248
5249 *nto* | *qnx*)
5250   lt_cv_deplibs_check_method=pass_all
5251   ;;
5252
5253 openbsd*)
5254   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5255     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5256   else
5257     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5258   fi
5259   ;;
5260
5261 osf3* | osf4* | osf5*)
5262   lt_cv_deplibs_check_method=pass_all
5263   ;;
5264
5265 rdos*)
5266   lt_cv_deplibs_check_method=pass_all
5267   ;;
5268
5269 solaris*)
5270   lt_cv_deplibs_check_method=pass_all
5271   ;;
5272
5273 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5274   lt_cv_deplibs_check_method=pass_all
5275   ;;
5276
5277 sysv4 | sysv4.3*)
5278   case $host_vendor in
5279   motorola)
5280     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]]'
5281     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5282     ;;
5283   ncr)
5284     lt_cv_deplibs_check_method=pass_all
5285     ;;
5286   sequent)
5287     lt_cv_file_magic_cmd='/bin/file'
5288     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5289     ;;
5290   sni)
5291     lt_cv_file_magic_cmd='/bin/file'
5292     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5293     lt_cv_file_magic_test_file=/lib/libc.so
5294     ;;
5295   siemens)
5296     lt_cv_deplibs_check_method=pass_all
5297     ;;
5298   pc)
5299     lt_cv_deplibs_check_method=pass_all
5300     ;;
5301   esac
5302   ;;
5303
5304 tpf*)
5305   lt_cv_deplibs_check_method=pass_all
5306   ;;
5307 esac
5308 ])
5309
5310 file_magic_glob=
5311 want_nocaseglob=no
5312 if test "$build" = "$host"; then
5313   case $host_os in
5314   mingw* | pw32*)
5315     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5316       want_nocaseglob=yes
5317     else
5318       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
5319     fi
5320     ;;
5321   esac
5322 fi
5323
5324 file_magic_cmd=$lt_cv_file_magic_cmd
5325 deplibs_check_method=$lt_cv_deplibs_check_method
5326 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5327
5328 _LT_DECL([], [deplibs_check_method], [1],
5329     [Method to check whether dependent libraries are shared objects])
5330 _LT_DECL([], [file_magic_cmd], [1],
5331     [Command to use when deplibs_check_method = "file_magic"])
5332 _LT_DECL([], [file_magic_glob], [1],
5333     [How to find potential files when deplibs_check_method = "file_magic"])
5334 _LT_DECL([], [want_nocaseglob], [1],
5335     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
5336 ])# _LT_CHECK_MAGIC_METHOD
5337
5338
5339 # LT_PATH_NM
5340 # ----------
5341 # find the pathname to a BSD- or MS-compatible name lister
5342 AC_DEFUN([LT_PATH_NM],
5343 [AC_REQUIRE([AC_PROG_CC])dnl
5344 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5345 [if test -n "$NM"; then
5346   # Let the user override the test.
5347   lt_cv_path_NM="$NM"
5348 else
5349   lt_nm_to_check="${ac_tool_prefix}nm"
5350   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5351     lt_nm_to_check="$lt_nm_to_check nm"
5352   fi
5353   for lt_tmp_nm in $lt_nm_to_check; do
5354     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5355     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5356       IFS="$lt_save_ifs"
5357       test -z "$ac_dir" && ac_dir=.
5358       tmp_nm="$ac_dir/$lt_tmp_nm"
5359       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5360         # Check to see if the nm accepts a BSD-compat flag.
5361         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5362         #   nm: unknown option "B" ignored
5363         # Tru64's nm complains that /dev/null is an invalid object file
5364         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5365         */dev/null* | *'Invalid file or object type'*)
5366           lt_cv_path_NM="$tmp_nm -B"
5367           break
5368           ;;
5369         *)
5370           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5371           */dev/null*)
5372             lt_cv_path_NM="$tmp_nm -p"
5373             break
5374             ;;
5375           *)
5376             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5377             continue # so that we can try to find one that supports BSD flags
5378             ;;
5379           esac
5380           ;;
5381         esac
5382       fi
5383     done
5384     IFS="$lt_save_ifs"
5385   done
5386   : ${lt_cv_path_NM=no}
5387 fi])
5388 if test "$lt_cv_path_NM" != "no"; then
5389   NM="$lt_cv_path_NM"
5390 else
5391   # Didn't find any BSD compatible name lister, look for dumpbin.
5392   if test -n "$DUMPBIN"; then :
5393     # Let the user override the test.
5394   else
5395     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5396     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5397     *COFF*)
5398       DUMPBIN="$DUMPBIN -symbols"
5399       ;;
5400     *)
5401       DUMPBIN=:
5402       ;;
5403     esac
5404   fi
5405   AC_SUBST([DUMPBIN])
5406   if test "$DUMPBIN" != ":"; then
5407     NM="$DUMPBIN"
5408   fi
5409 fi
5410 test -z "$NM" && NM=nm
5411 AC_SUBST([NM])
5412 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5413
5414 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5415   [lt_cv_nm_interface="BSD nm"
5416   echo "int some_variable = 0;" > conftest.$ac_ext
5417   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5418   (eval "$ac_compile" 2>conftest.err)
5419   cat conftest.err >&AS_MESSAGE_LOG_FD
5420   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5421   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5422   cat conftest.err >&AS_MESSAGE_LOG_FD
5423   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5424   cat conftest.out >&AS_MESSAGE_LOG_FD
5425   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5426     lt_cv_nm_interface="MS dumpbin"
5427   fi
5428   rm -f conftest*])
5429 ])# LT_PATH_NM
5430
5431 # Old names:
5432 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5433 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5434 dnl aclocal-1.4 backwards compatibility:
5435 dnl AC_DEFUN([AM_PROG_NM], [])
5436 dnl AC_DEFUN([AC_PROG_NM], [])
5437
5438 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5439 # --------------------------------
5440 # how to determine the name of the shared library
5441 # associated with a specific link library.
5442 #  -- PORTME fill in with the dynamic library characteristics
5443 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
5444 [m4_require([_LT_DECL_EGREP])
5445 m4_require([_LT_DECL_OBJDUMP])
5446 m4_require([_LT_DECL_DLLTOOL])
5447 AC_CACHE_CHECK([how to associate runtime and link libraries],
5448 lt_cv_sharedlib_from_linklib_cmd,
5449 [lt_cv_sharedlib_from_linklib_cmd='unknown'
5450
5451 case $host_os in
5452 cygwin* | mingw* | pw32* | cegcc*)
5453   # two different shell functions defined in ltmain.sh
5454   # decide which to use based on capabilities of $DLLTOOL
5455   case `$DLLTOOL --help 2>&1` in
5456   *--identify-strict*)
5457     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5458     ;;
5459   *)
5460     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5461     ;;
5462   esac
5463   ;;
5464 *)
5465   # fallback: assume linklib IS sharedlib
5466   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
5467   ;;
5468 esac
5469 ])
5470 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5471 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5472
5473 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
5474     [Command to associate shared and link libraries])
5475 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5476
5477
5478 # _LT_PATH_MANIFEST_TOOL
5479 # ----------------------
5480 # locate the manifest tool
5481 m4_defun([_LT_PATH_MANIFEST_TOOL],
5482 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
5483 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
5484 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
5485   [lt_cv_path_mainfest_tool=no
5486   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
5487   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
5488   cat conftest.err >&AS_MESSAGE_LOG_FD
5489   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
5490     lt_cv_path_mainfest_tool=yes
5491   fi
5492   rm -f conftest*])
5493 if test "x$lt_cv_path_mainfest_tool" != xyes; then
5494   MANIFEST_TOOL=:
5495 fi
5496 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
5497 ])# _LT_PATH_MANIFEST_TOOL
5498
5499
5500 # LT_LIB_M
5501 # --------
5502 # check for math library
5503 AC_DEFUN([LT_LIB_M],
5504 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5505 LIBM=
5506 case $host in
5507 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5508   # These system don't have libm, or don't need it
5509   ;;
5510 *-ncr-sysv4.3*)
5511   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5512   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5513   ;;
5514 *)
5515   AC_CHECK_LIB(m, cos, LIBM="-lm")
5516   ;;
5517 esac
5518 AC_SUBST([LIBM])
5519 ])# LT_LIB_M
5520
5521 # Old name:
5522 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5523 dnl aclocal-1.4 backwards compatibility:
5524 dnl AC_DEFUN([AC_CHECK_LIBM], [])
5525
5526
5527 # _LT_COMPILER_NO_RTTI([TAGNAME])
5528 # -------------------------------
5529 m4_defun([_LT_COMPILER_NO_RTTI],
5530 [m4_require([_LT_TAG_COMPILER])dnl
5531
5532 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5533
5534 if test "$GCC" = yes; then
5535   case $cc_basename in
5536   nvcc*)
5537     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5538   *)
5539     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5540   esac
5541
5542   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5543     lt_cv_prog_compiler_rtti_exceptions,
5544     [-fno-rtti -fno-exceptions], [],
5545     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5546 fi
5547 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5548         [Compiler flag to turn off builtin functions])
5549 ])# _LT_COMPILER_NO_RTTI
5550
5551
5552 # _LT_CMD_GLOBAL_SYMBOLS
5553 # ----------------------
5554 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5555 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5556 AC_REQUIRE([AC_PROG_CC])dnl
5557 AC_REQUIRE([AC_PROG_AWK])dnl
5558 AC_REQUIRE([LT_PATH_NM])dnl
5559 AC_REQUIRE([LT_PATH_LD])dnl
5560 m4_require([_LT_DECL_SED])dnl
5561 m4_require([_LT_DECL_EGREP])dnl
5562 m4_require([_LT_TAG_COMPILER])dnl
5563
5564 # Check for command to grab the raw symbol name followed by C symbol from nm.
5565 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5566 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5567 [
5568 # These are sane defaults that work on at least a few old systems.
5569 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5570
5571 # Character class describing NM global symbol codes.
5572 symcode='[[BCDEGRST]]'
5573
5574 # Regexp to match symbols that can be accessed directly from C.
5575 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5576
5577 # Define system-specific variables.
5578 case $host_os in
5579 aix*)
5580   symcode='[[BCDT]]'
5581   ;;
5582 cygwin* | mingw* | pw32* | cegcc*)
5583   symcode='[[ABCDGISTW]]'
5584   ;;
5585 hpux*)
5586   if test "$host_cpu" = ia64; then
5587     symcode='[[ABCDEGRST]]'
5588   fi
5589   ;;
5590 irix* | nonstopux*)
5591   symcode='[[BCDEGRST]]'
5592   ;;
5593 osf*)
5594   symcode='[[BCDEGQRST]]'
5595   ;;
5596 solaris*)
5597   symcode='[[BDRT]]'
5598   ;;
5599 sco3.2v5*)
5600   symcode='[[DT]]'
5601   ;;
5602 sysv4.2uw2*)
5603   symcode='[[DT]]'
5604   ;;
5605 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5606   symcode='[[ABDT]]'
5607   ;;
5608 sysv4)
5609   symcode='[[DFNSTU]]'
5610   ;;
5611 esac
5612
5613 # If we're using GNU nm, then use its standard symbol codes.
5614 case `$NM -V 2>&1` in
5615 *GNU* | *'with BFD'*)
5616   symcode='[[ABCDGIRSTW]]' ;;
5617 esac
5618
5619 # Transform an extracted symbol line into a proper C declaration.
5620 # Some systems (esp. on ia64) link data and code symbols differently,
5621 # so use this general approach.
5622 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5623
5624 # Transform an extracted symbol line into symbol name and symbol address
5625 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5626 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
5627
5628 # Handle CRLF in mingw tool chain
5629 opt_cr=
5630 case $build_os in
5631 mingw*)
5632   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5633   ;;
5634 esac
5635
5636 # Try without a prefix underscore, then with it.
5637 for ac_symprfx in "" "_"; do
5638
5639   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5640   symxfrm="\\1 $ac_symprfx\\2 \\2"
5641
5642   # Write the raw and C identifiers.
5643   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5644     # Fake it for dumpbin and say T for any non-static function
5645     # and D for any global variable.
5646     # Also find C++ and __fastcall symbols from MSVC++,
5647     # which start with @ or ?.
5648     lt_cv_sys_global_symbol_pipe="$AWK ['"\
5649 "     {last_section=section; section=\$ 3};"\
5650 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5651 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5652 "     \$ 0!~/External *\|/{next};"\
5653 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5654 "     {if(hide[section]) next};"\
5655 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5656 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5657 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5658 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5659 "     ' prfx=^$ac_symprfx]"
5660   else
5661     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5662   fi
5663   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5664
5665   # Check to see that the pipe works correctly.
5666   pipe_works=no
5667
5668   rm -f conftest*
5669   cat > conftest.$ac_ext <<_LT_EOF
5670 #ifdef __cplusplus
5671 extern "C" {
5672 #endif
5673 char nm_test_var;
5674 void nm_test_func(void);
5675 void nm_test_func(void){}
5676 #ifdef __cplusplus
5677 }
5678 #endif
5679 int main(){nm_test_var='a';nm_test_func();return(0);}
5680 _LT_EOF
5681
5682   if AC_TRY_EVAL(ac_compile); then
5683     # Now try to grab the symbols.
5684     nlist=conftest.nm
5685     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5686       # Try sorting and uniquifying the output.
5687       if sort "$nlist" | uniq > "$nlist"T; then
5688         mv -f "$nlist"T "$nlist"
5689       else
5690         rm -f "$nlist"T
5691       fi
5692
5693       # Make sure that we snagged all the symbols we need.
5694       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5695         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5696           cat <<_LT_EOF > conftest.$ac_ext
5697 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
5698 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5699 /* DATA imports from DLLs on WIN32 con't be const, because runtime
5700    relocations are performed -- see ld's documentation on pseudo-relocs.  */
5701 # define LT@&t@_DLSYM_CONST
5702 #elif defined(__osf__)
5703 /* This system does not cope well with relocations in const data.  */
5704 # define LT@&t@_DLSYM_CONST
5705 #else
5706 # define LT@&t@_DLSYM_CONST const
5707 #endif
5708
5709 #ifdef __cplusplus
5710 extern "C" {
5711 #endif
5712
5713 _LT_EOF
5714           # Now generate the symbol file.
5715           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5716
5717           cat <<_LT_EOF >> conftest.$ac_ext
5718
5719 /* The mapping between symbol names and symbols.  */
5720 LT@&t@_DLSYM_CONST struct {
5721   const char *name;
5722   void       *address;
5723 }
5724 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5725 {
5726   { "@PROGRAM@", (void *) 0 },
5727 _LT_EOF
5728           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5729           cat <<\_LT_EOF >> conftest.$ac_ext
5730   {0, (void *) 0}
5731 };
5732
5733 /* This works around a problem in FreeBSD linker */
5734 #ifdef FREEBSD_WORKAROUND
5735 static const void *lt_preloaded_setup() {
5736   return lt__PROGRAM__LTX_preloaded_symbols;
5737 }
5738 #endif
5739
5740 #ifdef __cplusplus
5741 }
5742 #endif
5743 _LT_EOF
5744           # Now try linking the two files.
5745           mv conftest.$ac_objext conftstm.$ac_objext
5746           lt_globsym_save_LIBS=$LIBS
5747           lt_globsym_save_CFLAGS=$CFLAGS
5748           LIBS="conftstm.$ac_objext"
5749           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5750           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5751             pipe_works=yes
5752           fi
5753           LIBS=$lt_globsym_save_LIBS
5754           CFLAGS=$lt_globsym_save_CFLAGS
5755         else
5756           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5757         fi
5758       else
5759         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5760       fi
5761     else
5762       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5763     fi
5764   else
5765     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5766     cat conftest.$ac_ext >&5
5767   fi
5768   rm -rf conftest* conftst*
5769
5770   # Do not use the global_symbol_pipe unless it works.
5771   if test "$pipe_works" = yes; then
5772     break
5773   else
5774     lt_cv_sys_global_symbol_pipe=
5775   fi
5776 done
5777 ])
5778 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5779   lt_cv_sys_global_symbol_to_cdecl=
5780 fi
5781 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5782   AC_MSG_RESULT(failed)
5783 else
5784   AC_MSG_RESULT(ok)
5785 fi
5786
5787 # Response file support.
5788 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5789   nm_file_list_spec='@'
5790 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
5791   nm_file_list_spec='@'
5792 fi
5793
5794 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5795     [Take the output of nm and produce a listing of raw symbols and C names])
5796 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5797     [Transform the output of nm in a proper C declaration])
5798 _LT_DECL([global_symbol_to_c_name_address],
5799     [lt_cv_sys_global_symbol_to_c_name_address], [1],
5800     [Transform the output of nm in a C name address pair])
5801 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5802     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5803     [Transform the output of nm in a C name address pair when lib prefix is needed])
5804 _LT_DECL([], [nm_file_list_spec], [1],
5805     [Specify filename containing input files for $NM])
5806 ]) # _LT_CMD_GLOBAL_SYMBOLS
5807
5808
5809 # _LT_COMPILER_PIC([TAGNAME])
5810 # ---------------------------
5811 m4_defun([_LT_COMPILER_PIC],
5812 [m4_require([_LT_TAG_COMPILER])dnl
5813 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5814 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5815 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5816
5817 m4_if([$1], [CXX], [
5818   # C++ specific cases for pic, static, wl, etc.
5819   if test "$GXX" = yes; then
5820     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5821     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5822
5823     case $host_os in
5824     aix*)
5825       # All AIX code is PIC.
5826       if test "$host_cpu" = ia64; then
5827         # AIX 5 now supports IA64 processor
5828         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5829       fi
5830       ;;
5831
5832     amigaos*)
5833       case $host_cpu in
5834       powerpc)
5835             # see comment about AmigaOS4 .so support
5836             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5837         ;;
5838       m68k)
5839             # FIXME: we need at least 68020 code to build shared libraries, but
5840             # adding the `-m68020' flag to GCC prevents building anything better,
5841             # like `-m68040'.
5842             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5843         ;;
5844       esac
5845       ;;
5846
5847     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5848       # PIC is the default for these OSes.
5849       ;;
5850     mingw* | cygwin* | os2* | pw32* | cegcc*)
5851       # This hack is so that the source file can tell whether it is being
5852       # built for inclusion in a dll (and should export symbols for example).
5853       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5854       # (--disable-auto-import) libraries
5855       m4_if([$1], [GCJ], [],
5856         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5857       ;;
5858     darwin* | rhapsody*)
5859       # PIC is the default on this platform
5860       # Common symbols not allowed in MH_DYLIB files
5861       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5862       ;;
5863     *djgpp*)
5864       # DJGPP does not support shared libraries at all
5865       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5866       ;;
5867     haiku*)
5868       # PIC is the default for Haiku.
5869       # The "-static" flag exists, but is broken.
5870       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5871       ;;
5872     interix[[3-9]]*)
5873       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5874       # Instead, we relocate shared libraries at runtime.
5875       ;;
5876     sysv4*MP*)
5877       if test -d /usr/nec; then
5878         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5879       fi
5880       ;;
5881     hpux*)
5882       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5883       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5884       # sets the default TLS model and affects inlining.
5885       case $host_cpu in
5886       hppa*64*)
5887         ;;
5888       *)
5889         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5890         ;;
5891       esac
5892       ;;
5893     *qnx* | *nto*)
5894       # QNX uses GNU C++, but need to define -shared option too, otherwise
5895       # it will coredump.
5896       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5897       ;;
5898     *)
5899       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5900       ;;
5901     esac
5902   else
5903     case $host_os in
5904       aix[[4-9]]*)
5905         # All AIX code is PIC.
5906         if test "$host_cpu" = ia64; then
5907           # AIX 5 now supports IA64 processor
5908           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5909         else
5910           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5911         fi
5912         ;;
5913       chorus*)
5914         case $cc_basename in
5915         cxch68*)
5916           # Green Hills C++ Compiler
5917           # _LT_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"
5918           ;;
5919         esac
5920         ;;
5921       mingw* | cygwin* | os2* | pw32* | cegcc*)
5922         # This hack is so that the source file can tell whether it is being
5923         # built for inclusion in a dll (and should export symbols for example).
5924         m4_if([$1], [GCJ], [],
5925           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5926         ;;
5927       dgux*)
5928         case $cc_basename in
5929           ec++*)
5930             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5931             ;;
5932           ghcx*)
5933             # Green Hills C++ Compiler
5934             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5935             ;;
5936           *)
5937             ;;
5938         esac
5939         ;;
5940       freebsd* | dragonfly*)
5941         # FreeBSD uses GNU C++
5942         ;;
5943       hpux9* | hpux10* | hpux11*)
5944         case $cc_basename in
5945           CC*)
5946             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5947             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5948             if test "$host_cpu" != ia64; then
5949               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5950             fi
5951             ;;
5952           aCC*)
5953             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5954             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5955             case $host_cpu in
5956             hppa*64*|ia64*)
5957               # +Z the default
5958               ;;
5959             *)
5960               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5961               ;;
5962             esac
5963             ;;
5964           *)
5965             ;;
5966         esac
5967         ;;
5968       interix*)
5969         # This is c89, which is MS Visual C++ (no shared libs)
5970         # Anyone wants to do a port?
5971         ;;
5972       irix5* | irix6* | nonstopux*)
5973         case $cc_basename in
5974           CC*)
5975             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5976             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5977             # CC pic flag -KPIC is the default.
5978             ;;
5979           *)
5980             ;;
5981         esac
5982         ;;
5983       linux* | k*bsd*-gnu | kopensolaris*-gnu)
5984         case $cc_basename in
5985           KCC*)
5986             # KAI C++ Compiler
5987             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5988             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5989             ;;
5990           ecpc* )
5991             # old Intel C++ for x86_64 which still supported -KPIC.
5992             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5993             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5994             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5995             ;;
5996           icpc* )
5997             # Intel C++, used to be incompatible with GCC.
5998             # ICC 10 doesn't accept -KPIC any more.
5999             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6000             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6001             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6002             ;;
6003           pgCC* | pgcpp*)
6004             # Portland Group C++ compiler
6005             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6006             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6007             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6008             ;;
6009           cxx*)
6010             # Compaq C++
6011             # Make sure the PIC flag is empty.  It appears that all Alpha
6012             # Linux and Compaq Tru64 Unix objects are PIC.
6013             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6014             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6015             ;;
6016           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6017             # IBM XL 8.0, 9.0 on PPC and BlueGene
6018             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6019             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6020             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6021             ;;
6022           *)
6023             case `$CC -V 2>&1 | sed 5q` in
6024             *Sun\ C*)
6025               # Sun C++ 5.9
6026               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6027               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6028               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6029               ;;
6030             esac
6031             ;;
6032         esac
6033         ;;
6034       lynxos*)
6035         ;;
6036       m88k*)
6037         ;;
6038       mvs*)
6039         case $cc_basename in
6040           cxx*)
6041             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6042             ;;
6043           *)
6044             ;;
6045         esac
6046         ;;
6047       netbsd* | netbsdelf*-gnu)
6048         ;;
6049       *qnx* | *nto*)
6050         # QNX uses GNU C++, but need to define -shared option too, otherwise
6051         # it will coredump.
6052         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6053         ;;
6054       osf3* | osf4* | osf5*)
6055         case $cc_basename in
6056           KCC*)
6057             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6058             ;;
6059           RCC*)
6060             # Rational C++ 2.4.1
6061             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6062             ;;
6063           cxx*)
6064             # Digital/Compaq C++
6065             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6066             # Make sure the PIC flag is empty.  It appears that all Alpha
6067             # Linux and Compaq Tru64 Unix objects are PIC.
6068             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6069             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6070             ;;
6071           *)
6072             ;;
6073         esac
6074         ;;
6075       psos*)
6076         ;;
6077       solaris*)
6078         case $cc_basename in
6079           CC* | sunCC*)
6080             # Sun C++ 4.2, 5.x and Centerline C++
6081             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6082             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6083             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6084             ;;
6085           gcx*)
6086             # Green Hills C++ Compiler
6087             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6088             ;;
6089           *)
6090             ;;
6091         esac
6092         ;;
6093       sunos4*)
6094         case $cc_basename in
6095           CC*)
6096             # Sun C++ 4.x
6097             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6098             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6099             ;;
6100           lcc*)
6101             # Lucid
6102             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6103             ;;
6104           *)
6105             ;;
6106         esac
6107         ;;
6108       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6109         case $cc_basename in
6110           CC*)
6111             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6112             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6113             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6114             ;;
6115         esac
6116         ;;
6117       tandem*)
6118         case $cc_basename in
6119           NCC*)
6120             # NonStop-UX NCC 3.20
6121             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6122             ;;
6123           *)
6124             ;;
6125         esac
6126         ;;
6127       vxworks*)
6128         ;;
6129       *)
6130         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6131         ;;
6132     esac
6133   fi
6134 ],
6135 [
6136   if test "$GCC" = yes; then
6137     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6138     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6139
6140     case $host_os in
6141       aix*)
6142       # All AIX code is PIC.
6143       if test "$host_cpu" = ia64; then
6144         # AIX 5 now supports IA64 processor
6145         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6146       fi
6147       ;;
6148
6149     amigaos*)
6150       case $host_cpu in
6151       powerpc)
6152             # see comment about AmigaOS4 .so support
6153             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6154         ;;
6155       m68k)
6156             # FIXME: we need at least 68020 code to build shared libraries, but
6157             # adding the `-m68020' flag to GCC prevents building anything better,
6158             # like `-m68040'.
6159             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6160         ;;
6161       esac
6162       ;;
6163
6164     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6165       # PIC is the default for these OSes.
6166       ;;
6167
6168     mingw* | cygwin* | pw32* | os2* | cegcc*)
6169       # This hack is so that the source file can tell whether it is being
6170       # built for inclusion in a dll (and should export symbols for example).
6171       # Although the cygwin gcc ignores -fPIC, still need this for old-style
6172       # (--disable-auto-import) libraries
6173       m4_if([$1], [GCJ], [],
6174         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6175       ;;
6176
6177     darwin* | rhapsody*)
6178       # PIC is the default on this platform
6179       # Common symbols not allowed in MH_DYLIB files
6180       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6181       ;;
6182
6183     haiku*)
6184       # PIC is the default for Haiku.
6185       # The "-static" flag exists, but is broken.
6186       _LT_TAGVAR(lt_prog_compiler_static, $1)=
6187       ;;
6188
6189     hpux*)
6190       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6191       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6192       # sets the default TLS model and affects inlining.
6193       case $host_cpu in
6194       hppa*64*)
6195         # +Z the default
6196         ;;
6197       *)
6198         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6199         ;;
6200       esac
6201       ;;
6202
6203     interix[[3-9]]*)
6204       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6205       # Instead, we relocate shared libraries at runtime.
6206       ;;
6207
6208     msdosdjgpp*)
6209       # Just because we use GCC doesn't mean we suddenly get shared libraries
6210       # on systems that don't support them.
6211       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6212       enable_shared=no
6213       ;;
6214
6215     *nto* | *qnx*)
6216       # QNX uses GNU C++, but need to define -shared option too, otherwise
6217       # it will coredump.
6218       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6219       ;;
6220
6221     sysv4*MP*)
6222       if test -d /usr/nec; then
6223         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6224       fi
6225       ;;
6226
6227     *)
6228       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6229       ;;
6230     esac
6231
6232     case $cc_basename in
6233     nvcc*) # Cuda Compiler Driver 2.2
6234       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6235       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6236         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
6237       fi
6238       ;;
6239     esac
6240   else
6241     # PORTME Check for flag to pass linker flags through the system compiler.
6242     case $host_os in
6243     aix*)
6244       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6245       if test "$host_cpu" = ia64; then
6246         # AIX 5 now supports IA64 processor
6247         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6248       else
6249         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6250       fi
6251       ;;
6252
6253     mingw* | cygwin* | pw32* | os2* | cegcc*)
6254       # This hack is so that the source file can tell whether it is being
6255       # built for inclusion in a dll (and should export symbols for example).
6256       m4_if([$1], [GCJ], [],
6257         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6258       ;;
6259
6260     hpux9* | hpux10* | hpux11*)
6261       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6262       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6263       # not for PA HP-UX.
6264       case $host_cpu in
6265       hppa*64*|ia64*)
6266         # +Z the default
6267         ;;
6268       *)
6269         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6270         ;;
6271       esac
6272       # Is there a better lt_prog_compiler_static that works with the bundled CC?
6273       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6274       ;;
6275
6276     irix5* | irix6* | nonstopux*)
6277       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6278       # PIC (with -KPIC) is the default.
6279       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6280       ;;
6281
6282     linux* | k*bsd*-gnu | kopensolaris*-gnu)
6283       case $cc_basename in
6284       # old Intel for x86_64 which still supported -KPIC.
6285       ecc*)
6286         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6287         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6288         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6289         ;;
6290       # icc used to be incompatible with GCC.
6291       # ICC 10 doesn't accept -KPIC any more.
6292       icc* | ifort*)
6293         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6294         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6295         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6296         ;;
6297       # Lahey Fortran 8.1.
6298       lf95*)
6299         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6300         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6301         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6302         ;;
6303       nagfor*)
6304         # NAG Fortran compiler
6305         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6306         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6307         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6308         ;;
6309       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6310         # Portland Group compilers (*not* the Pentium gcc compiler,
6311         # which looks to be a dead project)
6312         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6313         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6314         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6315         ;;
6316       ccc*)
6317         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6318         # All Alpha code is PIC.
6319         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6320         ;;
6321       xl* | bgxl* | bgf* | mpixl*)
6322         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6323         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6324         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6325         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6326         ;;
6327       *)
6328         case `$CC -V 2>&1 | sed 5q` in
6329         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
6330           # Sun Fortran 8.3 passes all unrecognized flags to the linker
6331           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6332           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6333           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6334           ;;
6335         *Sun\ F* | *Sun*Fortran*)
6336           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6337           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6338           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6339           ;;
6340         *Sun\ C*)
6341           # Sun C 5.9
6342           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6343           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6344           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6345           ;;
6346         *Intel*\ [[CF]]*Compiler*)
6347           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6348           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6349           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6350           ;;
6351         *Portland\ Group*)
6352           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6353           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6354           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6355           ;;
6356         esac
6357         ;;
6358       esac
6359       ;;
6360
6361     newsos6)
6362       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6363       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6364       ;;
6365
6366     *nto* | *qnx*)
6367       # QNX uses GNU C++, but need to define -shared option too, otherwise
6368       # it will coredump.
6369       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6370       ;;
6371
6372     osf3* | osf4* | osf5*)
6373       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6374       # All OSF/1 code is PIC.
6375       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6376       ;;
6377
6378     rdos*)
6379       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6380       ;;
6381
6382     solaris*)
6383       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6384       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6385       case $cc_basename in
6386       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6387         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6388       *)
6389         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6390       esac
6391       ;;
6392
6393     sunos4*)
6394       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6395       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6396       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6397       ;;
6398
6399     sysv4 | sysv4.2uw2* | sysv4.3*)
6400       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6401       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6402       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6403       ;;
6404
6405     sysv4*MP*)
6406       if test -d /usr/nec ;then
6407         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6408         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6409       fi
6410       ;;
6411
6412     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6413       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6414       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6415       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6416       ;;
6417
6418     unicos*)
6419       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6420       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6421       ;;
6422
6423     uts4*)
6424       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6425       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6426       ;;
6427
6428     *)
6429       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6430       ;;
6431     esac
6432   fi
6433 ])
6434 case $host_os in
6435   # For platforms which do not support PIC, -DPIC is meaningless:
6436   *djgpp*)
6437     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6438     ;;
6439   *)
6440     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6441     ;;
6442 esac
6443
6444 AC_CACHE_CHECK([for $compiler option to produce PIC],
6445   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
6446   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6447 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
6448
6449 #
6450 # Check to make sure the PIC flag actually works.
6451 #
6452 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6453   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6454     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6455     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6456     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6457      "" | " "*) ;;
6458      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6459      esac],
6460     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6461      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6462 fi
6463 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6464         [Additional compiler flags for building library objects])
6465
6466 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6467         [How to pass a linker flag through the compiler])
6468 #
6469 # Check to make sure the static flag actually works.
6470 #
6471 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6472 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6473   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6474   $lt_tmp_static_flag,
6475   [],
6476   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6477 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6478         [Compiler flag to prevent dynamic linking])
6479 ])# _LT_COMPILER_PIC
6480
6481
6482 # _LT_LINKER_SHLIBS([TAGNAME])
6483 # ----------------------------
6484 # See if the linker supports building shared libraries.
6485 m4_defun([_LT_LINKER_SHLIBS],
6486 [AC_REQUIRE([LT_PATH_LD])dnl
6487 AC_REQUIRE([LT_PATH_NM])dnl
6488 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6489 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6490 m4_require([_LT_DECL_EGREP])dnl
6491 m4_require([_LT_DECL_SED])dnl
6492 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6493 m4_require([_LT_TAG_COMPILER])dnl
6494 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6495 m4_if([$1], [CXX], [
6496   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6497   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6498   case $host_os in
6499   aix[[4-9]]*)
6500     # If we're using GNU nm, then we don't want the "-C" option.
6501     # -C means demangle to AIX nm, but means don't demangle with GNU nm
6502     # Also, AIX nm treats weak defined symbols like other global defined
6503     # symbols, whereas GNU nm marks them as "W".
6504     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6505       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6506     else
6507       _LT_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'
6508     fi
6509     ;;
6510   pw32*)
6511     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6512     ;;
6513   cygwin* | mingw* | cegcc*)
6514     case $cc_basename in
6515     cl*)
6516       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6517       ;;
6518     *)
6519       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6520       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6521       ;;
6522     esac
6523     ;;
6524   linux* | k*bsd*-gnu | gnu*)
6525     _LT_TAGVAR(link_all_deplibs, $1)=no
6526     ;;
6527   *)
6528     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6529     ;;
6530   esac
6531 ], [
6532   runpath_var=
6533   _LT_TAGVAR(allow_undefined_flag, $1)=
6534   _LT_TAGVAR(always_export_symbols, $1)=no
6535   _LT_TAGVAR(archive_cmds, $1)=
6536   _LT_TAGVAR(archive_expsym_cmds, $1)=
6537   _LT_TAGVAR(compiler_needs_object, $1)=no
6538   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6539   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6540   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6541   _LT_TAGVAR(hardcode_automatic, $1)=no
6542   _LT_TAGVAR(hardcode_direct, $1)=no
6543   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6544   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6545   _LT_TAGVAR(hardcode_libdir_separator, $1)=
6546   _LT_TAGVAR(hardcode_minus_L, $1)=no
6547   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6548   _LT_TAGVAR(inherit_rpath, $1)=no
6549   _LT_TAGVAR(link_all_deplibs, $1)=unknown
6550   _LT_TAGVAR(module_cmds, $1)=
6551   _LT_TAGVAR(module_expsym_cmds, $1)=
6552   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6553   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6554   _LT_TAGVAR(thread_safe_flag_spec, $1)=
6555   _LT_TAGVAR(whole_archive_flag_spec, $1)=
6556   # include_expsyms should be a list of space-separated symbols to be *always*
6557   # included in the symbol list
6558   _LT_TAGVAR(include_expsyms, $1)=
6559   # exclude_expsyms can be an extended regexp of symbols to exclude
6560   # it will be wrapped by ` (' and `)$', so one must not match beginning or
6561   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6562   # as well as any symbol that contains `d'.
6563   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6564   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6565   # platforms (ab)use it in PIC code, but their linkers get confused if
6566   # the symbol is explicitly referenced.  Since portable code cannot
6567   # rely on this symbol name, it's probably fine to never include it in
6568   # preloaded symbol tables.
6569   # Exclude shared library initialization/finalization symbols.
6570 dnl Note also adjust exclude_expsyms for C++ above.
6571   extract_expsyms_cmds=
6572
6573   case $host_os in
6574   cygwin* | mingw* | pw32* | cegcc*)
6575     # FIXME: the MSVC++ port hasn't been tested in a loooong time
6576     # When not using gcc, we currently assume that we are using
6577     # Microsoft Visual C++.
6578     if test "$GCC" != yes; then
6579       with_gnu_ld=no
6580     fi
6581     ;;
6582   interix*)
6583     # we just hope/assume this is gcc and not c89 (= MSVC++)
6584     with_gnu_ld=yes
6585     ;;
6586   openbsd*)
6587     with_gnu_ld=no
6588     ;;
6589   linux* | k*bsd*-gnu | gnu*)
6590     _LT_TAGVAR(link_all_deplibs, $1)=no
6591     ;;
6592   esac
6593
6594   _LT_TAGVAR(ld_shlibs, $1)=yes
6595
6596   # On some targets, GNU ld is compatible enough with the native linker
6597   # that we're better off using the native interface for both.
6598   lt_use_gnu_ld_interface=no
6599   if test "$with_gnu_ld" = yes; then
6600     case $host_os in
6601       aix*)
6602         # The AIX port of GNU ld has always aspired to compatibility
6603         # with the native linker.  However, as the warning in the GNU ld
6604         # block says, versions before 2.19.5* couldn't really create working
6605         # shared libraries, regardless of the interface used.
6606         case `$LD -v 2>&1` in
6607           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6608           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6609           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6610           *)
6611             lt_use_gnu_ld_interface=yes
6612             ;;
6613         esac
6614         ;;
6615       *)
6616         lt_use_gnu_ld_interface=yes
6617         ;;
6618     esac
6619   fi
6620
6621   if test "$lt_use_gnu_ld_interface" = yes; then
6622     # If archive_cmds runs LD, not CC, wlarc should be empty
6623     wlarc='${wl}'
6624
6625     # Set some defaults for GNU ld with shared library support. These
6626     # are reset later if shared libraries are not supported. Putting them
6627     # here allows them to be overridden if necessary.
6628     runpath_var=LD_RUN_PATH
6629     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6630     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6631     # ancient GNU ld didn't support --whole-archive et. al.
6632     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6633       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6634     else
6635       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6636     fi
6637     supports_anon_versioning=no
6638     case `$LD -v 2>&1` in
6639       *GNU\ gold*) supports_anon_versioning=yes ;;
6640       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6641       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6642       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6643       *\ 2.11.*) ;; # other 2.11 versions
6644       *) supports_anon_versioning=yes ;;
6645     esac
6646
6647     # See if GNU ld supports shared libraries.
6648     case $host_os in
6649     aix[[3-9]]*)
6650       # On AIX/PPC, the GNU linker is very broken
6651       if test "$host_cpu" != ia64; then
6652         _LT_TAGVAR(ld_shlibs, $1)=no
6653         cat <<_LT_EOF 1>&2
6654
6655 *** Warning: the GNU linker, at least up to release 2.19, is reported
6656 *** to be unable to reliably create shared libraries on AIX.
6657 *** Therefore, libtool is disabling shared libraries support.  If you
6658 *** really care for shared libraries, you may want to install binutils
6659 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6660 *** You will then need to restart the configuration process.
6661
6662 _LT_EOF
6663       fi
6664       ;;
6665
6666     amigaos*)
6667       case $host_cpu in
6668       powerpc)
6669             # see comment about AmigaOS4 .so support
6670             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6671             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6672         ;;
6673       m68k)
6674             _LT_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)'
6675             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6676             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6677         ;;
6678       esac
6679       ;;
6680
6681     beos*)
6682       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6683         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6684         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6685         # support --undefined.  This deserves some investigation.  FIXME
6686         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6687       else
6688         _LT_TAGVAR(ld_shlibs, $1)=no
6689       fi
6690       ;;
6691
6692     cygwin* | mingw* | pw32* | cegcc*)
6693       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6694       # as there is no search path for DLLs.
6695       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6696       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6697       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6698       _LT_TAGVAR(always_export_symbols, $1)=no
6699       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6700       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6701       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6702
6703       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6704         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6705         # If the export-symbols file already is a .def file (1st line
6706         # is EXPORTS), use it as is; otherwise, prepend...
6707         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6708           cp $export_symbols $output_objdir/$soname.def;
6709         else
6710           echo EXPORTS > $output_objdir/$soname.def;
6711           cat $export_symbols >> $output_objdir/$soname.def;
6712         fi~
6713         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6714       else
6715         _LT_TAGVAR(ld_shlibs, $1)=no
6716       fi
6717       ;;
6718
6719     haiku*)
6720       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6721       _LT_TAGVAR(link_all_deplibs, $1)=yes
6722       ;;
6723
6724     interix[[3-9]]*)
6725       _LT_TAGVAR(hardcode_direct, $1)=no
6726       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6727       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6728       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6729       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6730       # Instead, shared libraries are loaded at an image base (0x10000000 by
6731       # default) and relocated if they conflict, which is a slow very memory
6732       # consuming and fragmenting process.  To avoid this, we pick a random,
6733       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6734       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6735       _LT_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'
6736       _LT_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'
6737       ;;
6738
6739     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6740       tmp_diet=no
6741       if test "$host_os" = linux-dietlibc; then
6742         case $cc_basename in
6743           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
6744         esac
6745       fi
6746       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6747          && test "$tmp_diet" = no
6748       then
6749         tmp_addflag=' $pic_flag'
6750         tmp_sharedflag='-shared'
6751         case $cc_basename,$host_cpu in
6752         pgcc*)                          # Portland Group C compiler
6753           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6754           tmp_addflag=' $pic_flag'
6755           ;;
6756         pgf77* | pgf90* | pgf95* | pgfortran*)
6757                                         # Portland Group f77 and f90 compilers
6758           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6759           tmp_addflag=' $pic_flag -Mnomain' ;;
6760         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
6761           tmp_addflag=' -i_dynamic' ;;
6762         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
6763           tmp_addflag=' -i_dynamic -nofor_main' ;;
6764         ifc* | ifort*)                  # Intel Fortran compiler
6765           tmp_addflag=' -nofor_main' ;;
6766         lf95*)                          # Lahey Fortran 8.1
6767           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6768           tmp_sharedflag='--shared' ;;
6769         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6770           tmp_sharedflag='-qmkshrobj'
6771           tmp_addflag= ;;
6772         nvcc*)  # Cuda Compiler Driver 2.2
6773           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6774           _LT_TAGVAR(compiler_needs_object, $1)=yes
6775           ;;
6776         esac
6777         case `$CC -V 2>&1 | sed 5q` in
6778         *Sun\ C*)                       # Sun C 5.9
6779           _LT_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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6780           _LT_TAGVAR(compiler_needs_object, $1)=yes
6781           tmp_sharedflag='-G' ;;
6782         *Sun\ F*)                       # Sun Fortran 8.3
6783           tmp_sharedflag='-G' ;;
6784         esac
6785         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6786
6787         if test "x$supports_anon_versioning" = xyes; then
6788           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6789             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6790             echo "local: *; };" >> $output_objdir/$libname.ver~
6791             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6792         fi
6793
6794         case $cc_basename in
6795         xlf* | bgf* | bgxlf* | mpixlf*)
6796           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6797           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6798           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6799           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6800           if test "x$supports_anon_versioning" = xyes; then
6801             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6802               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6803               echo "local: *; };" >> $output_objdir/$libname.ver~
6804               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6805           fi
6806           ;;
6807         esac
6808       else
6809         _LT_TAGVAR(ld_shlibs, $1)=no
6810       fi
6811       ;;
6812
6813     netbsd* | netbsdelf*-gnu)
6814       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6815         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6816         wlarc=
6817       else
6818         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6819         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6820       fi
6821       ;;
6822
6823     solaris*)
6824       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6825         _LT_TAGVAR(ld_shlibs, $1)=no
6826         cat <<_LT_EOF 1>&2
6827
6828 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6829 *** create shared libraries on Solaris systems.  Therefore, libtool
6830 *** is disabling shared libraries support.  We urge you to upgrade GNU
6831 *** binutils to release 2.9.1 or newer.  Another option is to modify
6832 *** your PATH or compiler configuration so that the native linker is
6833 *** used, and then restart.
6834
6835 _LT_EOF
6836       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6837         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6838         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6839       else
6840         _LT_TAGVAR(ld_shlibs, $1)=no
6841       fi
6842       ;;
6843
6844     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6845       case `$LD -v 2>&1` in
6846         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6847         _LT_TAGVAR(ld_shlibs, $1)=no
6848         cat <<_LT_EOF 1>&2
6849
6850 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6851 *** reliably create shared libraries on SCO systems.  Therefore, libtool
6852 *** is disabling shared libraries support.  We urge you to upgrade GNU
6853 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6854 *** your PATH or compiler configuration so that the native linker is
6855 *** used, and then restart.
6856
6857 _LT_EOF
6858         ;;
6859         *)
6860           # For security reasons, it is highly recommended that you always
6861           # use absolute paths for naming shared libraries, and exclude the
6862           # DT_RUNPATH tag from executables and libraries.  But doing so
6863           # requires that you compile everything twice, which is a pain.
6864           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6865             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6866             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6867             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6868           else
6869             _LT_TAGVAR(ld_shlibs, $1)=no
6870           fi
6871         ;;
6872       esac
6873       ;;
6874
6875     sunos4*)
6876       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6877       wlarc=
6878       _LT_TAGVAR(hardcode_direct, $1)=yes
6879       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6880       ;;
6881
6882     *)
6883       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6884         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6885         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6886       else
6887         _LT_TAGVAR(ld_shlibs, $1)=no
6888       fi
6889       ;;
6890     esac
6891
6892     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6893       runpath_var=
6894       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6895       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6896       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6897     fi
6898   else
6899     # PORTME fill in a description of your system's linker (not GNU ld)
6900     case $host_os in
6901     aix3*)
6902       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6903       _LT_TAGVAR(always_export_symbols, $1)=yes
6904       _LT_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'
6905       # Note: this linker hardcodes the directories in LIBPATH if there
6906       # are no directories specified by -L.
6907       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6908       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6909         # Neither direct hardcoding nor static linking is supported with a
6910         # broken collect2.
6911         _LT_TAGVAR(hardcode_direct, $1)=unsupported
6912       fi
6913       ;;
6914
6915     aix[[4-9]]*)
6916       if test "$host_cpu" = ia64; then
6917         # On IA64, the linker does run time linking by default, so we don't
6918         # have to do anything special.
6919         aix_use_runtimelinking=no
6920         exp_sym_flag='-Bexport'
6921         no_entry_flag=""
6922       else
6923         # If we're using GNU nm, then we don't want the "-C" option.
6924         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6925         # Also, AIX nm treats weak defined symbols like other global
6926         # defined symbols, whereas GNU nm marks them as "W".
6927         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6928           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6929         else
6930           _LT_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'
6931         fi
6932         aix_use_runtimelinking=no
6933
6934         # Test if we are trying to use run time linking or normal
6935         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6936         # need to do runtime linking.
6937         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6938           for ld_flag in $LDFLAGS; do
6939           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6940             aix_use_runtimelinking=yes
6941             break
6942           fi
6943           done
6944           ;;
6945         esac
6946
6947         exp_sym_flag='-bexport'
6948         no_entry_flag='-bnoentry'
6949       fi
6950
6951       # When large executables or shared objects are built, AIX ld can
6952       # have problems creating the table of contents.  If linking a library
6953       # or program results in "error TOC overflow" add -mminimal-toc to
6954       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6955       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6956
6957       _LT_TAGVAR(archive_cmds, $1)=''
6958       _LT_TAGVAR(hardcode_direct, $1)=yes
6959       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6960       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6961       _LT_TAGVAR(link_all_deplibs, $1)=yes
6962       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6963
6964       if test "$GCC" = yes; then
6965         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6966         # We only want to do this on AIX 4.2 and lower, the check
6967         # below for broken collect2 doesn't work under 4.3+
6968           collect2name=`${CC} -print-prog-name=collect2`
6969           if test -f "$collect2name" &&
6970            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6971           then
6972           # We have reworked collect2
6973           :
6974           else
6975           # We have old collect2
6976           _LT_TAGVAR(hardcode_direct, $1)=unsupported
6977           # It fails to find uninstalled libraries when the uninstalled
6978           # path is not listed in the libpath.  Setting hardcode_minus_L
6979           # to unsupported forces relinking
6980           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6981           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6982           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6983           fi
6984           ;;
6985         esac
6986         shared_flag='-shared'
6987         if test "$aix_use_runtimelinking" = yes; then
6988           shared_flag="$shared_flag "'${wl}-G'
6989         fi
6990         _LT_TAGVAR(link_all_deplibs, $1)=no
6991       else
6992         # not using gcc
6993         if test "$host_cpu" = ia64; then
6994         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6995         # chokes on -Wl,-G. The following line is correct:
6996           shared_flag='-G'
6997         else
6998           if test "$aix_use_runtimelinking" = yes; then
6999             shared_flag='${wl}-G'
7000           else
7001             shared_flag='${wl}-bM:SRE'
7002           fi
7003         fi
7004       fi
7005
7006       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7007       # It seems that -bexpall does not export symbols beginning with
7008       # underscore (_), so it is better to generate a list of symbols to export.
7009       _LT_TAGVAR(always_export_symbols, $1)=yes
7010       if test "$aix_use_runtimelinking" = yes; then
7011         # Warning - without using the other runtime loading flags (-brtl),
7012         # -berok will link without error, but may produce a broken library.
7013         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7014         # Determine the default libpath from the value encoded in an
7015         # empty executable.
7016         _LT_SYS_MODULE_PATH_AIX([$1])
7017         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7018         _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7019       else
7020         if test "$host_cpu" = ia64; then
7021           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7022           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7023           _LT_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"
7024         else
7025          # Determine the default libpath from the value encoded in an
7026          # empty executable.
7027          _LT_SYS_MODULE_PATH_AIX([$1])
7028          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7029           # Warning - without using the other run time loading flags,
7030           # -berok will link without error, but may produce a broken library.
7031           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7032           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7033           if test "$with_gnu_ld" = yes; then
7034             # We only use this code for GNU lds that support --whole-archive.
7035             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7036           else
7037             # Exported symbols can be pulled into shared objects from archives
7038             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7039           fi
7040           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7041           # This is similar to how AIX traditionally builds its shared libraries.
7042           _LT_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'
7043         fi
7044       fi
7045       ;;
7046
7047     amigaos*)
7048       case $host_cpu in
7049       powerpc)
7050             # see comment about AmigaOS4 .so support
7051             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7052             _LT_TAGVAR(archive_expsym_cmds, $1)=''
7053         ;;
7054       m68k)
7055             _LT_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)'
7056             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7057             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7058         ;;
7059       esac
7060       ;;
7061
7062     bsdi[[45]]*)
7063       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7064       ;;
7065
7066     cygwin* | mingw* | pw32* | cegcc*)
7067       # When not using gcc, we currently assume that we are using
7068       # Microsoft Visual C++.
7069       # hardcode_libdir_flag_spec is actually meaningless, as there is
7070       # no search path for DLLs.
7071       case $cc_basename in
7072       cl*)
7073         # Native MSVC
7074         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7075         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7076         _LT_TAGVAR(always_export_symbols, $1)=yes
7077         _LT_TAGVAR(file_list_spec, $1)='@'
7078         # Tell ltmain to make .lib files, not .a files.
7079         libext=lib
7080         # Tell ltmain to make .dll files, not .so files.
7081         shrext_cmds=".dll"
7082         # FIXME: Setting linknames here is a bad hack.
7083         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7084         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7085             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7086           else
7087             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7088           fi~
7089           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7090           linknames='
7091         # The linker will not automatically build a static lib if we build a DLL.
7092         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7093         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7094         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7095         _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
7096         # Don't use ranlib
7097         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7098         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7099           lt_tool_outputfile="@TOOL_OUTPUT@"~
7100           case $lt_outputfile in
7101             *.exe|*.EXE) ;;
7102             *)
7103               lt_outputfile="$lt_outputfile.exe"
7104               lt_tool_outputfile="$lt_tool_outputfile.exe"
7105               ;;
7106           esac~
7107           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7108             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7109             $RM "$lt_outputfile.manifest";
7110           fi'
7111         ;;
7112       *)
7113         # Assume MSVC wrapper
7114         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7115         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7116         # Tell ltmain to make .lib files, not .a files.
7117         libext=lib
7118         # Tell ltmain to make .dll files, not .so files.
7119         shrext_cmds=".dll"
7120         # FIXME: Setting linknames here is a bad hack.
7121         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7122         # The linker will automatically build a .lib file if we build a DLL.
7123         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7124         # FIXME: Should let the user specify the lib program.
7125         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7126         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7127         ;;
7128       esac
7129       ;;
7130
7131     darwin* | rhapsody*)
7132       _LT_DARWIN_LINKER_FEATURES($1)
7133       ;;
7134
7135     dgux*)
7136       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7137       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7138       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7139       ;;
7140
7141     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7142     # support.  Future versions do this automatically, but an explicit c++rt0.o
7143     # does not break anything, and helps significantly (at the cost of a little
7144     # extra space).
7145     freebsd2.2*)
7146       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7147       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7148       _LT_TAGVAR(hardcode_direct, $1)=yes
7149       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7150       ;;
7151
7152     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7153     freebsd2.*)
7154       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7155       _LT_TAGVAR(hardcode_direct, $1)=yes
7156       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7157       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7158       ;;
7159
7160     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7161     freebsd* | dragonfly*)
7162       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7163       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7164       _LT_TAGVAR(hardcode_direct, $1)=yes
7165       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7166       ;;
7167
7168     hpux9*)
7169       if test "$GCC" = yes; then
7170         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7171       else
7172         _LT_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'
7173       fi
7174       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7175       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7176       _LT_TAGVAR(hardcode_direct, $1)=yes
7177
7178       # hardcode_minus_L: Not really in the search PATH,
7179       # but as the default location of the library.
7180       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7181       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7182       ;;
7183
7184     hpux10*)
7185       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7186         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7187       else
7188         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7189       fi
7190       if test "$with_gnu_ld" = no; then
7191         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7192         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7193         _LT_TAGVAR(hardcode_direct, $1)=yes
7194         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7195         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7196         # hardcode_minus_L: Not really in the search PATH,
7197         # but as the default location of the library.
7198         _LT_TAGVAR(hardcode_minus_L, $1)=yes
7199       fi
7200       ;;
7201
7202     hpux11*)
7203       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7204         case $host_cpu in
7205         hppa*64*)
7206           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7207           ;;
7208         ia64*)
7209           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7210           ;;
7211         *)
7212           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7213           ;;
7214         esac
7215       else
7216         case $host_cpu in
7217         hppa*64*)
7218           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7219           ;;
7220         ia64*)
7221           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7222           ;;
7223         *)
7224         m4_if($1, [], [
7225           # Older versions of the 11.00 compiler do not understand -b yet
7226           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7227           _LT_LINKER_OPTION([if $CC understands -b],
7228             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7229             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7230             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7231           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7232           ;;
7233         esac
7234       fi
7235       if test "$with_gnu_ld" = no; then
7236         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7237         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7238
7239         case $host_cpu in
7240         hppa*64*|ia64*)
7241           _LT_TAGVAR(hardcode_direct, $1)=no
7242           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7243           ;;
7244         *)
7245           _LT_TAGVAR(hardcode_direct, $1)=yes
7246           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7247           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7248
7249           # hardcode_minus_L: Not really in the search PATH,
7250           # but as the default location of the library.
7251           _LT_TAGVAR(hardcode_minus_L, $1)=yes
7252           ;;
7253         esac
7254       fi
7255       ;;
7256
7257     irix5* | irix6* | nonstopux*)
7258       if test "$GCC" = yes; then
7259         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7260         # Try to use the -exported_symbol ld option, if it does not
7261         # work, assume that -exports_file does not work either and
7262         # implicitly export all symbols.
7263         # This should be the same for all languages, so no per-tag cache variable.
7264         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
7265           [lt_cv_irix_exported_symbol],
7266           [save_LDFLAGS="$LDFLAGS"
7267            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7268            AC_LINK_IFELSE(
7269              [AC_LANG_SOURCE(
7270                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
7271                               [C++], [[int foo (void) { return 0; }]],
7272                               [Fortran 77], [[
7273       subroutine foo
7274       end]],
7275                               [Fortran], [[
7276       subroutine foo
7277       end]])])],
7278               [lt_cv_irix_exported_symbol=yes],
7279               [lt_cv_irix_exported_symbol=no])
7280            LDFLAGS="$save_LDFLAGS"])
7281         if test "$lt_cv_irix_exported_symbol" = yes; then
7282           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7283         fi
7284       else
7285         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7286         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
7287       fi
7288       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7289       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7290       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7291       _LT_TAGVAR(inherit_rpath, $1)=yes
7292       _LT_TAGVAR(link_all_deplibs, $1)=yes
7293       ;;
7294
7295     netbsd* | netbsdelf*-gnu)
7296       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7297         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7298       else
7299         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7300       fi
7301       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7302       _LT_TAGVAR(hardcode_direct, $1)=yes
7303       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7304       ;;
7305
7306     newsos6)
7307       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7308       _LT_TAGVAR(hardcode_direct, $1)=yes
7309       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7310       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7311       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7312       ;;
7313
7314     *nto* | *qnx*)
7315       ;;
7316
7317     openbsd*)
7318       if test -f /usr/libexec/ld.so; then
7319         _LT_TAGVAR(hardcode_direct, $1)=yes
7320         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7321         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7322         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7323           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7324           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7325           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7326           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7327         else
7328           case $host_os in
7329            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7330              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7331              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7332              ;;
7333            *)
7334              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7335              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7336              ;;
7337           esac
7338         fi
7339       else
7340         _LT_TAGVAR(ld_shlibs, $1)=no
7341       fi
7342       ;;
7343
7344     os2*)
7345       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7346       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7347       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7348       _LT_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'
7349       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7350       ;;
7351
7352     osf3*)
7353       if test "$GCC" = yes; then
7354         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7355         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7356       else
7357         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7358         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7359       fi
7360       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7361       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7362       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7363       ;;
7364
7365     osf4* | osf5*)      # as osf3* with the addition of -msym flag
7366       if test "$GCC" = yes; then
7367         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7368         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7369         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7370       else
7371         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7372         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7373         _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
7374         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
7375
7376         # Both c and cxx compiler support -rpath directly
7377         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7378       fi
7379       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7380       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7381       ;;
7382
7383     solaris*)
7384       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7385       if test "$GCC" = yes; then
7386         wlarc='${wl}'
7387         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7388         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7389           $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7390       else
7391         case `$CC -V 2>&1` in
7392         *"Compilers 5.0"*)
7393           wlarc=''
7394           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7395           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7396           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7397           ;;
7398         *)
7399           wlarc='${wl}'
7400           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7401           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7402           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7403           ;;
7404         esac
7405       fi
7406       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7407       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7408       case $host_os in
7409       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7410       *)
7411         # The compiler driver will combine and reorder linker options,
7412         # but understands `-z linker_flag'.  GCC discards it without `$wl',
7413         # but is careful enough not to reorder.
7414         # Supported since Solaris 2.6 (maybe 2.5.1?)
7415         if test "$GCC" = yes; then
7416           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7417         else
7418           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7419         fi
7420         ;;
7421       esac
7422       _LT_TAGVAR(link_all_deplibs, $1)=yes
7423       ;;
7424
7425     sunos4*)
7426       if test "x$host_vendor" = xsequent; then
7427         # Use $CC to link under sequent, because it throws in some extra .o
7428         # files that make .init and .fini sections work.
7429         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7430       else
7431         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7432       fi
7433       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7434       _LT_TAGVAR(hardcode_direct, $1)=yes
7435       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7436       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7437       ;;
7438
7439     sysv4)
7440       case $host_vendor in
7441         sni)
7442           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7443           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7444         ;;
7445         siemens)
7446           ## LD is ld it makes a PLAMLIB
7447           ## CC just makes a GrossModule.
7448           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7449           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7450           _LT_TAGVAR(hardcode_direct, $1)=no
7451         ;;
7452         motorola)
7453           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7454           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7455         ;;
7456       esac
7457       runpath_var='LD_RUN_PATH'
7458       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7459       ;;
7460
7461     sysv4.3*)
7462       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7463       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7464       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7465       ;;
7466
7467     sysv4*MP*)
7468       if test -d /usr/nec; then
7469         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7470         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7471         runpath_var=LD_RUN_PATH
7472         hardcode_runpath_var=yes
7473         _LT_TAGVAR(ld_shlibs, $1)=yes
7474       fi
7475       ;;
7476
7477     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7478       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7479       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7480       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7481       runpath_var='LD_RUN_PATH'
7482
7483       if test "$GCC" = yes; then
7484         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7485         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7486       else
7487         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7488         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7489       fi
7490       ;;
7491
7492     sysv5* | sco3.2v5* | sco5v6*)
7493       # Note: We can NOT use -z defs as we might desire, because we do not
7494       # link with -lc, and that would cause any symbols used from libc to
7495       # always be unresolved, which means just about no library would
7496       # ever link correctly.  If we're not using GNU ld we use -z text
7497       # though, which does catch some bad symbols but isn't as heavy-handed
7498       # as -z defs.
7499       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7500       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7501       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7502       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7503       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7504       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7505       _LT_TAGVAR(link_all_deplibs, $1)=yes
7506       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7507       runpath_var='LD_RUN_PATH'
7508
7509       if test "$GCC" = yes; then
7510         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7511         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7512       else
7513         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7514         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7515       fi
7516       ;;
7517
7518     uts4*)
7519       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7520       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7521       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7522       ;;
7523
7524     *)
7525       _LT_TAGVAR(ld_shlibs, $1)=no
7526       ;;
7527     esac
7528
7529     if test x$host_vendor = xsni; then
7530       case $host in
7531       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7532         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7533         ;;
7534       esac
7535     fi
7536   fi
7537 ])
7538 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7539 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7540
7541 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7542
7543 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7544 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7545 _LT_DECL([], [extract_expsyms_cmds], [2],
7546     [The commands to extract the exported symbol list from a shared archive])
7547
7548 #
7549 # Do we need to explicitly link libc?
7550 #
7551 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7552 x|xyes)
7553   # Assume -lc should be added
7554   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7555
7556   if test "$enable_shared" = yes && test "$GCC" = yes; then
7557     case $_LT_TAGVAR(archive_cmds, $1) in
7558     *'~'*)
7559       # FIXME: we may have to deal with multi-command sequences.
7560       ;;
7561     '$CC '*)
7562       # Test whether the compiler implicitly links with -lc since on some
7563       # systems, -lgcc has to come before -lc. If gcc already passes -lc
7564       # to ld, don't add -lc before -lgcc.
7565       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7566         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7567         [$RM conftest*
7568         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7569
7570         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7571           soname=conftest
7572           lib=conftest
7573           libobjs=conftest.$ac_objext
7574           deplibs=
7575           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7576           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7577           compiler_flags=-v
7578           linker_flags=-v
7579           verstring=
7580           output_objdir=.
7581           libname=conftest
7582           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7583           _LT_TAGVAR(allow_undefined_flag, $1)=
7584           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7585           then
7586             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7587           else
7588             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7589           fi
7590           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7591         else
7592           cat conftest.err 1>&5
7593         fi
7594         $RM conftest*
7595         ])
7596       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7597       ;;
7598     esac
7599   fi
7600   ;;
7601 esac
7602
7603 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7604     [Whether or not to add -lc for building shared libraries])
7605 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7606     [enable_shared_with_static_runtimes], [0],
7607     [Whether or not to disallow shared libs when runtime libs are static])
7608 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7609     [Compiler flag to allow reflexive dlopens])
7610 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
7611     [Compiler flag to generate shared objects directly from archives])
7612 _LT_TAGDECL([], [compiler_needs_object], [1],
7613     [Whether the compiler copes with passing no objects directly])
7614 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7615     [Create an old-style archive from a shared archive])
7616 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7617     [Create a temporary old-style archive to link instead of a shared archive])
7618 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7619 _LT_TAGDECL([], [archive_expsym_cmds], [2])
7620 _LT_TAGDECL([], [module_cmds], [2],
7621     [Commands used to build a loadable module if different from building
7622     a shared archive.])
7623 _LT_TAGDECL([], [module_expsym_cmds], [2])
7624 _LT_TAGDECL([], [with_gnu_ld], [1],
7625     [Whether we are building with GNU ld or not])
7626 _LT_TAGDECL([], [allow_undefined_flag], [1],
7627     [Flag that allows shared libraries with undefined symbols to be built])
7628 _LT_TAGDECL([], [no_undefined_flag], [1],
7629     [Flag that enforces no undefined symbols])
7630 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7631     [Flag to hardcode $libdir into a binary during linking.
7632     This must work even if $libdir does not exist])
7633 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
7634     [Whether we need a single "-rpath" flag with a separated argument])
7635 _LT_TAGDECL([], [hardcode_direct], [0],
7636     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7637     DIR into the resulting binary])
7638 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
7639     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7640     DIR into the resulting binary and the resulting library dependency is
7641     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7642     library is relocated])
7643 _LT_TAGDECL([], [hardcode_minus_L], [0],
7644     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7645     into the resulting binary])
7646 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7647     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7648     into the resulting binary])
7649 _LT_TAGDECL([], [hardcode_automatic], [0],
7650     [Set to "yes" if building a shared library automatically hardcodes DIR
7651     into the library and all subsequent libraries and executables linked
7652     against it])
7653 _LT_TAGDECL([], [inherit_rpath], [0],
7654     [Set to yes if linker adds runtime paths of dependent libraries
7655     to runtime path list])
7656 _LT_TAGDECL([], [link_all_deplibs], [0],
7657     [Whether libtool must link a program against all its dependency libraries])
7658 _LT_TAGDECL([], [always_export_symbols], [0],
7659     [Set to "yes" if exported symbols are required])
7660 _LT_TAGDECL([], [export_symbols_cmds], [2],
7661     [The commands to list exported symbols])
7662 _LT_TAGDECL([], [exclude_expsyms], [1],
7663     [Symbols that should not be listed in the preloaded symbols])
7664 _LT_TAGDECL([], [include_expsyms], [1],
7665     [Symbols that must always be exported])
7666 _LT_TAGDECL([], [prelink_cmds], [2],
7667     [Commands necessary for linking programs (against libraries) with templates])
7668 _LT_TAGDECL([], [postlink_cmds], [2],
7669     [Commands necessary for finishing linking programs])
7670 _LT_TAGDECL([], [file_list_spec], [1],
7671     [Specify filename containing input files])
7672 dnl FIXME: Not yet implemented
7673 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7674 dnl    [Compiler flag to generate thread safe objects])
7675 ])# _LT_LINKER_SHLIBS
7676
7677
7678 # _LT_LANG_C_CONFIG([TAG])
7679 # ------------------------
7680 # Ensure that the configuration variables for a C compiler are suitably
7681 # defined.  These variables are subsequently used by _LT_CONFIG to write
7682 # the compiler configuration to `libtool'.
7683 m4_defun([_LT_LANG_C_CONFIG],
7684 [m4_require([_LT_DECL_EGREP])dnl
7685 lt_save_CC="$CC"
7686 AC_LANG_PUSH(C)
7687
7688 # Source file extension for C test sources.
7689 ac_ext=c
7690
7691 # Object file extension for compiled C test sources.
7692 objext=o
7693 _LT_TAGVAR(objext, $1)=$objext
7694
7695 # Code to be used in simple compile tests
7696 lt_simple_compile_test_code="int some_variable = 0;"
7697
7698 # Code to be used in simple link tests
7699 lt_simple_link_test_code='int main(){return(0);}'
7700
7701 _LT_TAG_COMPILER
7702 # Save the default compiler, since it gets overwritten when the other
7703 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7704 compiler_DEFAULT=$CC
7705
7706 # save warnings/boilerplate of simple test code
7707 _LT_COMPILER_BOILERPLATE
7708 _LT_LINKER_BOILERPLATE
7709
7710 if test -n "$compiler"; then
7711   _LT_COMPILER_NO_RTTI($1)
7712   _LT_COMPILER_PIC($1)
7713   _LT_COMPILER_C_O($1)
7714   _LT_COMPILER_FILE_LOCKS($1)
7715   _LT_LINKER_SHLIBS($1)
7716   _LT_SYS_DYNAMIC_LINKER($1)
7717   _LT_LINKER_HARDCODE_LIBPATH($1)
7718   LT_SYS_DLOPEN_SELF
7719   _LT_CMD_STRIPLIB
7720
7721   # Report which library types will actually be built
7722   AC_MSG_CHECKING([if libtool supports shared libraries])
7723   AC_MSG_RESULT([$can_build_shared])
7724
7725   AC_MSG_CHECKING([whether to build shared libraries])
7726   test "$can_build_shared" = "no" && enable_shared=no
7727
7728   # On AIX, shared libraries and static libraries use the same namespace, and
7729   # are all built from PIC.
7730   case $host_os in
7731   aix3*)
7732     test "$enable_shared" = yes && enable_static=no
7733     if test -n "$RANLIB"; then
7734       archive_cmds="$archive_cmds~\$RANLIB \$lib"
7735       postinstall_cmds='$RANLIB $lib'
7736     fi
7737     ;;
7738
7739   aix[[4-9]]*)
7740     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7741       test "$enable_shared" = yes && enable_static=no
7742     fi
7743     ;;
7744   esac
7745   AC_MSG_RESULT([$enable_shared])
7746
7747   AC_MSG_CHECKING([whether to build static libraries])
7748   # Make sure either enable_shared or enable_static is yes.
7749   test "$enable_shared" = yes || enable_static=yes
7750   AC_MSG_RESULT([$enable_static])
7751
7752   _LT_CONFIG($1)
7753 fi
7754 AC_LANG_POP
7755 CC="$lt_save_CC"
7756 ])# _LT_LANG_C_CONFIG
7757
7758
7759 # _LT_LANG_CXX_CONFIG([TAG])
7760 # --------------------------
7761 # Ensure that the configuration variables for a C++ compiler are suitably
7762 # defined.  These variables are subsequently used by _LT_CONFIG to write
7763 # the compiler configuration to `libtool'.
7764 m4_defun([_LT_LANG_CXX_CONFIG],
7765 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7766 m4_require([_LT_DECL_EGREP])dnl
7767 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7768 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7769     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7770     (test "X$CXX" != "Xg++"))) ; then
7771   AC_PROG_CXXCPP
7772 else
7773   _lt_caught_CXX_error=yes
7774 fi
7775
7776 AC_LANG_PUSH(C++)
7777 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7778 _LT_TAGVAR(allow_undefined_flag, $1)=
7779 _LT_TAGVAR(always_export_symbols, $1)=no
7780 _LT_TAGVAR(archive_expsym_cmds, $1)=
7781 _LT_TAGVAR(compiler_needs_object, $1)=no
7782 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7783 _LT_TAGVAR(hardcode_direct, $1)=no
7784 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7785 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7786 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7787 _LT_TAGVAR(hardcode_minus_L, $1)=no
7788 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7789 _LT_TAGVAR(hardcode_automatic, $1)=no
7790 _LT_TAGVAR(inherit_rpath, $1)=no
7791 _LT_TAGVAR(module_cmds, $1)=
7792 _LT_TAGVAR(module_expsym_cmds, $1)=
7793 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7794 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7795 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7796 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7797 _LT_TAGVAR(no_undefined_flag, $1)=
7798 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7799 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7800
7801 # Source file extension for C++ test sources.
7802 ac_ext=cpp
7803
7804 # Object file extension for compiled C++ test sources.
7805 objext=o
7806 _LT_TAGVAR(objext, $1)=$objext
7807
7808 # No sense in running all these tests if we already determined that
7809 # the CXX compiler isn't working.  Some variables (like enable_shared)
7810 # are currently assumed to apply to all compilers on this platform,
7811 # and will be corrupted by setting them based on a non-working compiler.
7812 if test "$_lt_caught_CXX_error" != yes; then
7813   # Code to be used in simple compile tests
7814   lt_simple_compile_test_code="int some_variable = 0;"
7815
7816   # Code to be used in simple link tests
7817   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7818
7819   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7820   _LT_TAG_COMPILER
7821
7822   # save warnings/boilerplate of simple test code
7823   _LT_COMPILER_BOILERPLATE
7824   _LT_LINKER_BOILERPLATE
7825
7826   # Allow CC to be a program name with arguments.
7827   lt_save_CC=$CC
7828   lt_save_CFLAGS=$CFLAGS
7829   lt_save_LD=$LD
7830   lt_save_GCC=$GCC
7831   GCC=$GXX
7832   lt_save_with_gnu_ld=$with_gnu_ld
7833   lt_save_path_LD=$lt_cv_path_LD
7834   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7835     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7836   else
7837     $as_unset lt_cv_prog_gnu_ld
7838   fi
7839   if test -n "${lt_cv_path_LDCXX+set}"; then
7840     lt_cv_path_LD=$lt_cv_path_LDCXX
7841   else
7842     $as_unset lt_cv_path_LD
7843   fi
7844   test -z "${LDCXX+set}" || LD=$LDCXX
7845   CC=${CXX-"c++"}
7846   CFLAGS=$CXXFLAGS
7847   compiler=$CC
7848   _LT_TAGVAR(compiler, $1)=$CC
7849   _LT_CC_BASENAME([$compiler])
7850
7851   if test -n "$compiler"; then
7852     # We don't want -fno-exception when compiling C++ code, so set the
7853     # no_builtin_flag separately
7854     if test "$GXX" = yes; then
7855       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7856     else
7857       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7858     fi
7859
7860     if test "$GXX" = yes; then
7861       # Set up default GNU C++ configuration
7862
7863       LT_PATH_LD
7864
7865       # Check if GNU C++ uses GNU ld as the underlying linker, since the
7866       # archiving commands below assume that GNU ld is being used.
7867       if test "$with_gnu_ld" = yes; then
7868         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7869         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7870
7871         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7872         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7873
7874         # If archive_cmds runs LD, not CC, wlarc should be empty
7875         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7876         #     investigate it a little bit more. (MM)
7877         wlarc='${wl}'
7878
7879         # ancient GNU ld didn't support --whole-archive et. al.
7880         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7881           $GREP 'no-whole-archive' > /dev/null; then
7882           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7883         else
7884           _LT_TAGVAR(whole_archive_flag_spec, $1)=
7885         fi
7886       else
7887         with_gnu_ld=no
7888         wlarc=
7889
7890         # A generic and very simple default shared library creation
7891         # command for GNU C++ for the case where it uses the native
7892         # linker, instead of GNU ld.  If possible, this setting should
7893         # overridden to take advantage of the native linker features on
7894         # the platform it is being used on.
7895         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7896       fi
7897
7898       # Commands to make compiler produce verbose output that lists
7899       # what "hidden" libraries, object files and flags are used when
7900       # linking a shared library.
7901       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7902
7903     else
7904       GXX=no
7905       with_gnu_ld=no
7906       wlarc=
7907     fi
7908
7909     # PORTME: fill in a description of your system's C++ link characteristics
7910     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7911     _LT_TAGVAR(ld_shlibs, $1)=yes
7912     case $host_os in
7913       aix3*)
7914         # FIXME: insert proper C++ library support
7915         _LT_TAGVAR(ld_shlibs, $1)=no
7916         ;;
7917       aix[[4-9]]*)
7918         if test "$host_cpu" = ia64; then
7919           # On IA64, the linker does run time linking by default, so we don't
7920           # have to do anything special.
7921           aix_use_runtimelinking=no
7922           exp_sym_flag='-Bexport'
7923           no_entry_flag=""
7924         else
7925           aix_use_runtimelinking=no
7926
7927           # Test if we are trying to use run time linking or normal
7928           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7929           # need to do runtime linking.
7930           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7931             for ld_flag in $LDFLAGS; do
7932               case $ld_flag in
7933               *-brtl*)
7934                 aix_use_runtimelinking=yes
7935                 break
7936                 ;;
7937               esac
7938             done
7939             ;;
7940           esac
7941
7942           exp_sym_flag='-bexport'
7943           no_entry_flag='-bnoentry'
7944         fi
7945
7946         # When large executables or shared objects are built, AIX ld can
7947         # have problems creating the table of contents.  If linking a library
7948         # or program results in "error TOC overflow" add -mminimal-toc to
7949         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7950         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7951
7952         _LT_TAGVAR(archive_cmds, $1)=''
7953         _LT_TAGVAR(hardcode_direct, $1)=yes
7954         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7955         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7956         _LT_TAGVAR(link_all_deplibs, $1)=yes
7957         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7958
7959         if test "$GXX" = yes; then
7960           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7961           # We only want to do this on AIX 4.2 and lower, the check
7962           # below for broken collect2 doesn't work under 4.3+
7963           collect2name=`${CC} -print-prog-name=collect2`
7964           if test -f "$collect2name" &&
7965              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7966           then
7967             # We have reworked collect2
7968             :
7969           else
7970             # We have old collect2
7971             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7972             # It fails to find uninstalled libraries when the uninstalled
7973             # path is not listed in the libpath.  Setting hardcode_minus_L
7974             # to unsupported forces relinking
7975             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7976             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7977             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7978           fi
7979           esac
7980           shared_flag='-shared'
7981           if test "$aix_use_runtimelinking" = yes; then
7982             shared_flag="$shared_flag "'${wl}-G'
7983           fi
7984         else
7985           # not using gcc
7986           if test "$host_cpu" = ia64; then
7987           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7988           # chokes on -Wl,-G. The following line is correct:
7989           shared_flag='-G'
7990           else
7991             if test "$aix_use_runtimelinking" = yes; then
7992               shared_flag='${wl}-G'
7993             else
7994               shared_flag='${wl}-bM:SRE'
7995             fi
7996           fi
7997         fi
7998
7999         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8000         # It seems that -bexpall does not export symbols beginning with
8001         # underscore (_), so it is better to generate a list of symbols to
8002         # export.
8003         _LT_TAGVAR(always_export_symbols, $1)=yes
8004         if test "$aix_use_runtimelinking" = yes; then
8005           # Warning - without using the other runtime loading flags (-brtl),
8006           # -berok will link without error, but may produce a broken library.
8007           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8008           # Determine the default libpath from the value encoded in an empty
8009           # executable.
8010           _LT_SYS_MODULE_PATH_AIX([$1])
8011           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8012
8013           _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8014         else
8015           if test "$host_cpu" = ia64; then
8016             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8017             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8018             _LT_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"
8019           else
8020             # Determine the default libpath from the value encoded in an
8021             # empty executable.
8022             _LT_SYS_MODULE_PATH_AIX([$1])
8023             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8024             # Warning - without using the other run time loading flags,
8025             # -berok will link without error, but may produce a broken library.
8026             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8027             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8028             if test "$with_gnu_ld" = yes; then
8029               # We only use this code for GNU lds that support --whole-archive.
8030               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8031             else
8032               # Exported symbols can be pulled into shared objects from archives
8033               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8034             fi
8035             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8036             # This is similar to how AIX traditionally builds its shared
8037             # libraries.
8038             _LT_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'
8039           fi
8040         fi
8041         ;;
8042
8043       beos*)
8044         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8045           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8046           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8047           # support --undefined.  This deserves some investigation.  FIXME
8048           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8049         else
8050           _LT_TAGVAR(ld_shlibs, $1)=no
8051         fi
8052         ;;
8053
8054       chorus*)
8055         case $cc_basename in
8056           *)
8057           # FIXME: insert proper C++ library support
8058           _LT_TAGVAR(ld_shlibs, $1)=no
8059           ;;
8060         esac
8061         ;;
8062
8063       cygwin* | mingw* | pw32* | cegcc*)
8064         case $GXX,$cc_basename in
8065         ,cl* | no,cl*)
8066           # Native MSVC
8067           # hardcode_libdir_flag_spec is actually meaningless, as there is
8068           # no search path for DLLs.
8069           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8070           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8071           _LT_TAGVAR(always_export_symbols, $1)=yes
8072           _LT_TAGVAR(file_list_spec, $1)='@'
8073           # Tell ltmain to make .lib files, not .a files.
8074           libext=lib
8075           # Tell ltmain to make .dll files, not .so files.
8076           shrext_cmds=".dll"
8077           # FIXME: Setting linknames here is a bad hack.
8078           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
8079           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8080               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
8081             else
8082               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
8083             fi~
8084             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8085             linknames='
8086           # The linker will not automatically build a static lib if we build a DLL.
8087           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8088           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8089           # Don't use ranlib
8090           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
8091           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
8092             lt_tool_outputfile="@TOOL_OUTPUT@"~
8093             case $lt_outputfile in
8094               *.exe|*.EXE) ;;
8095               *)
8096                 lt_outputfile="$lt_outputfile.exe"
8097                 lt_tool_outputfile="$lt_tool_outputfile.exe"
8098                 ;;
8099             esac~
8100             func_to_tool_file "$lt_outputfile"~
8101             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
8102               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8103               $RM "$lt_outputfile.manifest";
8104             fi'
8105           ;;
8106         *)
8107           # g++
8108           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8109           # as there is no search path for DLLs.
8110           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8111           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8112           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8113           _LT_TAGVAR(always_export_symbols, $1)=no
8114           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8115
8116           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8117             _LT_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'
8118             # If the export-symbols file already is a .def file (1st line
8119             # is EXPORTS), use it as is; otherwise, prepend...
8120             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8121               cp $export_symbols $output_objdir/$soname.def;
8122             else
8123               echo EXPORTS > $output_objdir/$soname.def;
8124               cat $export_symbols >> $output_objdir/$soname.def;
8125             fi~
8126             $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'
8127           else
8128             _LT_TAGVAR(ld_shlibs, $1)=no
8129           fi
8130           ;;
8131         esac
8132         ;;
8133       darwin* | rhapsody*)
8134         _LT_DARWIN_LINKER_FEATURES($1)
8135         ;;
8136
8137       dgux*)
8138         case $cc_basename in
8139           ec++*)
8140             # FIXME: insert proper C++ library support
8141             _LT_TAGVAR(ld_shlibs, $1)=no
8142             ;;
8143           ghcx*)
8144             # Green Hills C++ Compiler
8145             # FIXME: insert proper C++ library support
8146             _LT_TAGVAR(ld_shlibs, $1)=no
8147             ;;
8148           *)
8149             # FIXME: insert proper C++ library support
8150             _LT_TAGVAR(ld_shlibs, $1)=no
8151             ;;
8152         esac
8153         ;;
8154
8155       freebsd2.*)
8156         # C++ shared libraries reported to be fairly broken before
8157         # switch to ELF
8158         _LT_TAGVAR(ld_shlibs, $1)=no
8159         ;;
8160
8161       freebsd-elf*)
8162         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8163         ;;
8164
8165       freebsd* | dragonfly*)
8166         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8167         # conventions
8168         _LT_TAGVAR(ld_shlibs, $1)=yes
8169         ;;
8170
8171       gnu*)
8172         ;;
8173
8174       haiku*)
8175         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8176         _LT_TAGVAR(link_all_deplibs, $1)=yes
8177         ;;
8178
8179       hpux9*)
8180         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8181         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8182         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8183         _LT_TAGVAR(hardcode_direct, $1)=yes
8184         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8185                                              # but as the default
8186                                              # location of the library.
8187
8188         case $cc_basename in
8189           CC*)
8190             # FIXME: insert proper C++ library support
8191             _LT_TAGVAR(ld_shlibs, $1)=no
8192             ;;
8193           aCC*)
8194             _LT_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'
8195             # Commands to make compiler produce verbose output that lists
8196             # what "hidden" libraries, object files and flags are used when
8197             # linking a shared library.
8198             #
8199             # There doesn't appear to be a way to prevent this compiler from
8200             # explicitly linking system object files so we need to strip them
8201             # from the output so that they don't get included in the library
8202             # dependencies.
8203             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
8204             ;;
8205           *)
8206             if test "$GXX" = yes; then
8207               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
8208             else
8209               # FIXME: insert proper C++ library support
8210               _LT_TAGVAR(ld_shlibs, $1)=no
8211             fi
8212             ;;
8213         esac
8214         ;;
8215
8216       hpux10*|hpux11*)
8217         if test $with_gnu_ld = no; then
8218           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8219           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8220
8221           case $host_cpu in
8222             hppa*64*|ia64*)
8223               ;;
8224             *)
8225               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8226               ;;
8227           esac
8228         fi
8229         case $host_cpu in
8230           hppa*64*|ia64*)
8231             _LT_TAGVAR(hardcode_direct, $1)=no
8232             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8233             ;;
8234           *)
8235             _LT_TAGVAR(hardcode_direct, $1)=yes
8236             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8237             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8238                                                  # but as the default
8239                                                  # location of the library.
8240             ;;
8241         esac
8242
8243         case $cc_basename in
8244           CC*)
8245             # FIXME: insert proper C++ library support
8246             _LT_TAGVAR(ld_shlibs, $1)=no
8247             ;;
8248           aCC*)
8249             case $host_cpu in
8250               hppa*64*)
8251                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8252                 ;;
8253               ia64*)
8254                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8255                 ;;
8256               *)
8257                 _LT_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'
8258                 ;;
8259             esac
8260             # Commands to make compiler produce verbose output that lists
8261             # what "hidden" libraries, object files and flags are used when
8262             # linking a shared library.
8263             #
8264             # There doesn't appear to be a way to prevent this compiler from
8265             # explicitly linking system object files so we need to strip them
8266             # from the output so that they don't get included in the library
8267             # dependencies.
8268             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; func_echo_all "$list"'
8269             ;;
8270           *)
8271             if test "$GXX" = yes; then
8272               if test $with_gnu_ld = no; then
8273                 case $host_cpu in
8274                   hppa*64*)
8275                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8276                     ;;
8277                   ia64*)
8278                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8279                     ;;
8280                   *)
8281                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8282                     ;;
8283                 esac
8284               fi
8285             else
8286               # FIXME: insert proper C++ library support
8287               _LT_TAGVAR(ld_shlibs, $1)=no
8288             fi
8289             ;;
8290         esac
8291         ;;
8292
8293       interix[[3-9]]*)
8294         _LT_TAGVAR(hardcode_direct, $1)=no
8295         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8296         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8297         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8298         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8299         # Instead, shared libraries are loaded at an image base (0x10000000 by
8300         # default) and relocated if they conflict, which is a slow very memory
8301         # consuming and fragmenting process.  To avoid this, we pick a random,
8302         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8303         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8304         _LT_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'
8305         _LT_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'
8306         ;;
8307       irix5* | irix6*)
8308         case $cc_basename in
8309           CC*)
8310             # SGI C++
8311             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8312
8313             # Archives containing C++ object files must be created using
8314             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8315             # necessary to make sure instantiated templates are included
8316             # in the archive.
8317             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8318             ;;
8319           *)
8320             if test "$GXX" = yes; then
8321               if test "$with_gnu_ld" = no; then
8322                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8323               else
8324                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
8325               fi
8326             fi
8327             _LT_TAGVAR(link_all_deplibs, $1)=yes
8328             ;;
8329         esac
8330         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8331         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8332         _LT_TAGVAR(inherit_rpath, $1)=yes
8333         ;;
8334
8335       linux* | k*bsd*-gnu | kopensolaris*-gnu)
8336         case $cc_basename in
8337           KCC*)
8338             # Kuck and Associates, Inc. (KAI) C++ Compiler
8339
8340             # KCC will only create a shared library if the output file
8341             # ends with ".so" (or ".sl" for HP-UX), so rename the library
8342             # to its proper name (with version) after linking.
8343             _LT_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'
8344             _LT_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'
8345             # Commands to make compiler produce verbose output that lists
8346             # what "hidden" libraries, object files and flags are used when
8347             # linking a shared library.
8348             #
8349             # There doesn't appear to be a way to prevent this compiler from
8350             # explicitly linking system object files so we need to strip them
8351             # from the output so that they don't get included in the library
8352             # dependencies.
8353             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; func_echo_all "$list"'
8354
8355             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8356             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8357
8358             # Archives containing C++ object files must be created using
8359             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8360             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8361             ;;
8362           icpc* | ecpc* )
8363             # Intel C++
8364             with_gnu_ld=yes
8365             # version 8.0 and above of icpc choke on multiply defined symbols
8366             # if we add $predep_objects and $postdep_objects, however 7.1 and
8367             # earlier do not add the objects themselves.
8368             case `$CC -V 2>&1` in
8369               *"Version 7."*)
8370                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8371                 _LT_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'
8372                 ;;
8373               *)  # Version 8.0 or newer
8374                 tmp_idyn=
8375                 case $host_cpu in
8376                   ia64*) tmp_idyn=' -i_dynamic';;
8377                 esac
8378                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8379                 _LT_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'
8380                 ;;
8381             esac
8382             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8383             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8384             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8385             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8386             ;;
8387           pgCC* | pgcpp*)
8388             # Portland Group C++ compiler
8389             case `$CC -V` in
8390             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8391               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8392                 rm -rf $tpldir~
8393                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8394                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8395               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8396                 rm -rf $tpldir~
8397                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8398                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8399                 $RANLIB $oldlib'
8400               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8401                 rm -rf $tpldir~
8402                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8403                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8404               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8405                 rm -rf $tpldir~
8406                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8407                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8408               ;;
8409             *) # Version 6 and above use weak symbols
8410               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8411               _LT_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'
8412               ;;
8413             esac
8414
8415             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8416             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8417             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8418             ;;
8419           cxx*)
8420             # Compaq C++
8421             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8422             _LT_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'
8423
8424             runpath_var=LD_RUN_PATH
8425             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8426             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8427
8428             # Commands to make compiler produce verbose output that lists
8429             # what "hidden" libraries, object files and flags are used when
8430             # linking a shared library.
8431             #
8432             # There doesn't appear to be a way to prevent this compiler from
8433             # explicitly linking system object files so we need to strip them
8434             # from the output so that they don't get included in the library
8435             # dependencies.
8436             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
8437             ;;
8438           xl* | mpixl* | bgxl*)
8439             # IBM XL 8.0 on PPC, with GNU ld
8440             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8441             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8442             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8443             if test "x$supports_anon_versioning" = xyes; then
8444               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8445                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8446                 echo "local: *; };" >> $output_objdir/$libname.ver~
8447                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8448             fi
8449             ;;
8450           *)
8451             case `$CC -V 2>&1 | sed 5q` in
8452             *Sun\ C*)
8453               # Sun C++ 5.9
8454               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8455               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8456               _LT_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'
8457               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8458               _LT_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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8459               _LT_TAGVAR(compiler_needs_object, $1)=yes
8460
8461               # Not sure whether something based on
8462               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8463               # would be better.
8464               output_verbose_link_cmd='func_echo_all'
8465
8466               # Archives containing C++ object files must be created using
8467               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8468               # necessary to make sure instantiated templates are included
8469               # in the archive.
8470               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8471               ;;
8472             esac
8473             ;;
8474         esac
8475         ;;
8476
8477       lynxos*)
8478         # FIXME: insert proper C++ library support
8479         _LT_TAGVAR(ld_shlibs, $1)=no
8480         ;;
8481
8482       m88k*)
8483         # FIXME: insert proper C++ library support
8484         _LT_TAGVAR(ld_shlibs, $1)=no
8485         ;;
8486
8487       mvs*)
8488         case $cc_basename in
8489           cxx*)
8490             # FIXME: insert proper C++ library support
8491             _LT_TAGVAR(ld_shlibs, $1)=no
8492             ;;
8493           *)
8494             # FIXME: insert proper C++ library support
8495             _LT_TAGVAR(ld_shlibs, $1)=no
8496             ;;
8497         esac
8498         ;;
8499
8500       netbsd*)
8501         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8502           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8503           wlarc=
8504           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8505           _LT_TAGVAR(hardcode_direct, $1)=yes
8506           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8507         fi
8508         # Workaround some broken pre-1.5 toolchains
8509         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8510         ;;
8511
8512       *nto* | *qnx*)
8513         _LT_TAGVAR(ld_shlibs, $1)=yes
8514         ;;
8515
8516       openbsd2*)
8517         # C++ shared libraries are fairly broken
8518         _LT_TAGVAR(ld_shlibs, $1)=no
8519         ;;
8520
8521       openbsd*)
8522         if test -f /usr/libexec/ld.so; then
8523           _LT_TAGVAR(hardcode_direct, $1)=yes
8524           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8525           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8526           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8527           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8528           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8529             _LT_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'
8530             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8531             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8532           fi
8533           output_verbose_link_cmd=func_echo_all
8534         else
8535           _LT_TAGVAR(ld_shlibs, $1)=no
8536         fi
8537         ;;
8538
8539       osf3* | osf4* | osf5*)
8540         case $cc_basename in
8541           KCC*)
8542             # Kuck and Associates, Inc. (KAI) C++ Compiler
8543
8544             # KCC will only create a shared library if the output file
8545             # ends with ".so" (or ".sl" for HP-UX), so rename the library
8546             # to its proper name (with version) after linking.
8547             _LT_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'
8548
8549             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8550             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8551
8552             # Archives containing C++ object files must be created using
8553             # the KAI C++ compiler.
8554             case $host in
8555               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8556               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8557             esac
8558             ;;
8559           RCC*)
8560             # Rational C++ 2.4.1
8561             # FIXME: insert proper C++ library support
8562             _LT_TAGVAR(ld_shlibs, $1)=no
8563             ;;
8564           cxx*)
8565             case $host in
8566               osf3*)
8567                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8568                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8569                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8570                 ;;
8571               *)
8572                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8573                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8574                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8575                   echo "-hidden">> $lib.exp~
8576                   $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~
8577                   $RM $lib.exp'
8578                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8579                 ;;
8580             esac
8581
8582             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8583
8584             # Commands to make compiler produce verbose output that lists
8585             # what "hidden" libraries, object files and flags are used when
8586             # linking a shared library.
8587             #
8588             # There doesn't appear to be a way to prevent this compiler from
8589             # explicitly linking system object files so we need to strip them
8590             # from the output so that they don't get included in the library
8591             # dependencies.
8592             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
8593             ;;
8594           *)
8595             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8596               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8597               case $host in
8598                 osf3*)
8599                   _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8600                   ;;
8601                 *)
8602                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8603                   ;;
8604               esac
8605
8606               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8607               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8608
8609               # Commands to make compiler produce verbose output that lists
8610               # what "hidden" libraries, object files and flags are used when
8611               # linking a shared library.
8612               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8613
8614             else
8615               # FIXME: insert proper C++ library support
8616               _LT_TAGVAR(ld_shlibs, $1)=no
8617             fi
8618             ;;
8619         esac
8620         ;;
8621
8622       psos*)
8623         # FIXME: insert proper C++ library support
8624         _LT_TAGVAR(ld_shlibs, $1)=no
8625         ;;
8626
8627       sunos4*)
8628         case $cc_basename in
8629           CC*)
8630             # Sun C++ 4.x
8631             # FIXME: insert proper C++ library support
8632             _LT_TAGVAR(ld_shlibs, $1)=no
8633             ;;
8634           lcc*)
8635             # Lucid
8636             # FIXME: insert proper C++ library support
8637             _LT_TAGVAR(ld_shlibs, $1)=no
8638             ;;
8639           *)
8640             # FIXME: insert proper C++ library support
8641             _LT_TAGVAR(ld_shlibs, $1)=no
8642             ;;
8643         esac
8644         ;;
8645
8646       solaris*)
8647         case $cc_basename in
8648           CC* | sunCC*)
8649             # Sun C++ 4.2, 5.x and Centerline C++
8650             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8651             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8652             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8653             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8654               $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'
8655
8656             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8657             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8658             case $host_os in
8659               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8660               *)
8661                 # The compiler driver will combine and reorder linker options,
8662                 # but understands `-z linker_flag'.
8663                 # Supported since Solaris 2.6 (maybe 2.5.1?)
8664                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8665                 ;;
8666             esac
8667             _LT_TAGVAR(link_all_deplibs, $1)=yes
8668
8669             output_verbose_link_cmd='func_echo_all'
8670
8671             # Archives containing C++ object files must be created using
8672             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8673             # necessary to make sure instantiated templates are included
8674             # in the archive.
8675             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8676             ;;
8677           gcx*)
8678             # Green Hills C++ Compiler
8679             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8680
8681             # The C++ compiler must be used to create the archive.
8682             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8683             ;;
8684           *)
8685             # GNU C++ compiler with Solaris linker
8686             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8687               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8688               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8689                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8690                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8691                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8692
8693                 # Commands to make compiler produce verbose output that lists
8694                 # what "hidden" libraries, object files and flags are used when
8695                 # linking a shared library.
8696                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8697               else
8698                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8699                 # platform.
8700                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8701                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8702                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8703
8704                 # Commands to make compiler produce verbose output that lists
8705                 # what "hidden" libraries, object files and flags are used when
8706                 # linking a shared library.
8707                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8708               fi
8709
8710               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8711               case $host_os in
8712                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8713                 *)
8714                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8715                   ;;
8716               esac
8717             fi
8718             ;;
8719         esac
8720         ;;
8721
8722     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8723       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8724       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8725       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8726       runpath_var='LD_RUN_PATH'
8727
8728       case $cc_basename in
8729         CC*)
8730           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8731           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8732           ;;
8733         *)
8734           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8735           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8736           ;;
8737       esac
8738       ;;
8739
8740       sysv5* | sco3.2v5* | sco5v6*)
8741         # Note: We can NOT use -z defs as we might desire, because we do not
8742         # link with -lc, and that would cause any symbols used from libc to
8743         # always be unresolved, which means just about no library would
8744         # ever link correctly.  If we're not using GNU ld we use -z text
8745         # though, which does catch some bad symbols but isn't as heavy-handed
8746         # as -z defs.
8747         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8748         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8749         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8750         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8751         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8752         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8753         _LT_TAGVAR(link_all_deplibs, $1)=yes
8754         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8755         runpath_var='LD_RUN_PATH'
8756
8757         case $cc_basename in
8758           CC*)
8759             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8760             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8761             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8762               '"$_LT_TAGVAR(old_archive_cmds, $1)"
8763             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8764               '"$_LT_TAGVAR(reload_cmds, $1)"
8765             ;;
8766           *)
8767             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8768             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8769             ;;
8770         esac
8771       ;;
8772
8773       tandem*)
8774         case $cc_basename in
8775           NCC*)
8776             # NonStop-UX NCC 3.20
8777             # FIXME: insert proper C++ library support
8778             _LT_TAGVAR(ld_shlibs, $1)=no
8779             ;;
8780           *)
8781             # FIXME: insert proper C++ library support
8782             _LT_TAGVAR(ld_shlibs, $1)=no
8783             ;;
8784         esac
8785         ;;
8786
8787       vxworks*)
8788         # FIXME: insert proper C++ library support
8789         _LT_TAGVAR(ld_shlibs, $1)=no
8790         ;;
8791
8792       *)
8793         # FIXME: insert proper C++ library support
8794         _LT_TAGVAR(ld_shlibs, $1)=no
8795         ;;
8796     esac
8797
8798     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8799     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8800
8801     _LT_TAGVAR(GCC, $1)="$GXX"
8802     _LT_TAGVAR(LD, $1)="$LD"
8803
8804     ## CAVEAT EMPTOR:
8805     ## There is no encapsulation within the following macros, do not change
8806     ## the running order or otherwise move them around unless you know exactly
8807     ## what you are doing...
8808     _LT_SYS_HIDDEN_LIBDEPS($1)
8809     _LT_COMPILER_PIC($1)
8810     _LT_COMPILER_C_O($1)
8811     _LT_COMPILER_FILE_LOCKS($1)
8812     _LT_LINKER_SHLIBS($1)
8813     _LT_SYS_DYNAMIC_LINKER($1)
8814     _LT_LINKER_HARDCODE_LIBPATH($1)
8815
8816     _LT_CONFIG($1)
8817   fi # test -n "$compiler"
8818
8819   CC=$lt_save_CC
8820   CFLAGS=$lt_save_CFLAGS
8821   LDCXX=$LD
8822   LD=$lt_save_LD
8823   GCC=$lt_save_GCC
8824   with_gnu_ld=$lt_save_with_gnu_ld
8825   lt_cv_path_LDCXX=$lt_cv_path_LD
8826   lt_cv_path_LD=$lt_save_path_LD
8827   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8828   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8829 fi # test "$_lt_caught_CXX_error" != yes
8830
8831 AC_LANG_POP
8832 ])# _LT_LANG_CXX_CONFIG
8833
8834
8835 # _LT_FUNC_STRIPNAME_CNF
8836 # ----------------------
8837 # func_stripname_cnf prefix suffix name
8838 # strip PREFIX and SUFFIX off of NAME.
8839 # PREFIX and SUFFIX must not contain globbing or regex special
8840 # characters, hashes, percent signs, but SUFFIX may contain a leading
8841 # dot (in which case that matches only a dot).
8842 #
8843 # This function is identical to the (non-XSI) version of func_stripname,
8844 # except this one can be used by m4 code that may be executed by configure,
8845 # rather than the libtool script.
8846 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8847 AC_REQUIRE([_LT_DECL_SED])
8848 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8849 func_stripname_cnf ()
8850 {
8851   case ${2} in
8852   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8853   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8854   esac
8855 } # func_stripname_cnf
8856 ])# _LT_FUNC_STRIPNAME_CNF
8857
8858 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8859 # ---------------------------------
8860 # Figure out "hidden" library dependencies from verbose
8861 # compiler output when linking a shared library.
8862 # Parse the compiler output and extract the necessary
8863 # objects, libraries and library flags.
8864 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8865 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8866 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8867 # Dependencies to place before and after the object being linked:
8868 _LT_TAGVAR(predep_objects, $1)=
8869 _LT_TAGVAR(postdep_objects, $1)=
8870 _LT_TAGVAR(predeps, $1)=
8871 _LT_TAGVAR(postdeps, $1)=
8872 _LT_TAGVAR(compiler_lib_search_path, $1)=
8873
8874 dnl we can't use the lt_simple_compile_test_code here,
8875 dnl because it contains code intended for an executable,
8876 dnl not a library.  It's possible we should let each
8877 dnl tag define a new lt_????_link_test_code variable,
8878 dnl but it's only used here...
8879 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8880 int a;
8881 void foo (void) { a = 0; }
8882 _LT_EOF
8883 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8884 class Foo
8885 {
8886 public:
8887   Foo (void) { a = 0; }
8888 private:
8889   int a;
8890 };
8891 _LT_EOF
8892 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8893       subroutine foo
8894       implicit none
8895       integer*4 a
8896       a=0
8897       return
8898       end
8899 _LT_EOF
8900 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8901       subroutine foo
8902       implicit none
8903       integer a
8904       a=0
8905       return
8906       end
8907 _LT_EOF
8908 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8909 public class foo {
8910   private int a;
8911   public void bar (void) {
8912     a = 0;
8913   }
8914 };
8915 _LT_EOF
8916 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8917 package foo
8918 func foo() {
8919 }
8920 _LT_EOF
8921 ])
8922
8923 _lt_libdeps_save_CFLAGS=$CFLAGS
8924 case "$CC $CFLAGS " in #(
8925 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8926 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8927 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8928 esac
8929
8930 dnl Parse the compiler output and extract the necessary
8931 dnl objects, libraries and library flags.
8932 if AC_TRY_EVAL(ac_compile); then
8933   # Parse the compiler output and extract the necessary
8934   # objects, libraries and library flags.
8935
8936   # Sentinel used to keep track of whether or not we are before
8937   # the conftest object file.
8938   pre_test_object_deps_done=no
8939
8940   for p in `eval "$output_verbose_link_cmd"`; do
8941     case ${prev}${p} in
8942
8943     -L* | -R* | -l*)
8944        # Some compilers place space between "-{L,R}" and the path.
8945        # Remove the space.
8946        if test $p = "-L" ||
8947           test $p = "-R"; then
8948          prev=$p
8949          continue
8950        fi
8951
8952        # Expand the sysroot to ease extracting the directories later.
8953        if test -z "$prev"; then
8954          case $p in
8955          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8956          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8957          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8958          esac
8959        fi
8960        case $p in
8961        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8962        esac
8963        if test "$pre_test_object_deps_done" = no; then
8964          case ${prev} in
8965          -L | -R)
8966            # Internal compiler library paths should come after those
8967            # provided the user.  The postdeps already come after the
8968            # user supplied libs so there is no need to process them.
8969            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8970              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8971            else
8972              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8973            fi
8974            ;;
8975          # The "-l" case would never come before the object being
8976          # linked, so don't bother handling this case.
8977          esac
8978        else
8979          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8980            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8981          else
8982            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8983          fi
8984        fi
8985        prev=
8986        ;;
8987
8988     *.lto.$objext) ;; # Ignore GCC LTO objects
8989     *.$objext)
8990        # This assumes that the test object file only shows up
8991        # once in the compiler output.
8992        if test "$p" = "conftest.$objext"; then
8993          pre_test_object_deps_done=yes
8994          continue
8995        fi
8996
8997        if test "$pre_test_object_deps_done" = no; then
8998          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8999            _LT_TAGVAR(predep_objects, $1)="$p"
9000          else
9001            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
9002          fi
9003        else
9004          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
9005            _LT_TAGVAR(postdep_objects, $1)="$p"
9006          else
9007            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
9008          fi
9009        fi
9010        ;;
9011
9012     *) ;; # Ignore the rest.
9013
9014     esac
9015   done
9016
9017   # Clean up.
9018   rm -f a.out a.exe
9019 else
9020   echo "libtool.m4: error: problem compiling $1 test program"
9021 fi
9022
9023 $RM -f confest.$objext
9024 CFLAGS=$_lt_libdeps_save_CFLAGS
9025
9026 # PORTME: override above test on systems where it is broken
9027 m4_if([$1], [CXX],
9028 [case $host_os in
9029 interix[[3-9]]*)
9030   # Interix 3.5 installs completely hosed .la files for C++, so rather than
9031   # hack all around it, let's just trust "g++" to DTRT.
9032   _LT_TAGVAR(predep_objects,$1)=
9033   _LT_TAGVAR(postdep_objects,$1)=
9034   _LT_TAGVAR(postdeps,$1)=
9035   ;;
9036
9037 linux*)
9038   case `$CC -V 2>&1 | sed 5q` in
9039   *Sun\ C*)
9040     # Sun C++ 5.9
9041
9042     # The more standards-conforming stlport4 library is
9043     # incompatible with the Cstd library. Avoid specifying
9044     # it if it's in CXXFLAGS. Ignore libCrun as
9045     # -library=stlport4 depends on it.
9046     case " $CXX $CXXFLAGS " in
9047     *" -library=stlport4 "*)
9048       solaris_use_stlport4=yes
9049       ;;
9050     esac
9051
9052     if test "$solaris_use_stlport4" != yes; then
9053       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9054     fi
9055     ;;
9056   esac
9057   ;;
9058
9059 solaris*)
9060   case $cc_basename in
9061   CC* | sunCC*)
9062     # The more standards-conforming stlport4 library is
9063     # incompatible with the Cstd library. Avoid specifying
9064     # it if it's in CXXFLAGS. Ignore libCrun as
9065     # -library=stlport4 depends on it.
9066     case " $CXX $CXXFLAGS " in
9067     *" -library=stlport4 "*)
9068       solaris_use_stlport4=yes
9069       ;;
9070     esac
9071
9072     # Adding this requires a known-good setup of shared libraries for
9073     # Sun compiler versions before 5.6, else PIC objects from an old
9074     # archive will be linked into the output, leading to subtle bugs.
9075     if test "$solaris_use_stlport4" != yes; then
9076       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9077     fi
9078     ;;
9079   esac
9080   ;;
9081 esac
9082 ])
9083
9084 case " $_LT_TAGVAR(postdeps, $1) " in
9085 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9086 esac
9087  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9088 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9089  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
9090 fi
9091 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9092     [The directories searched by this compiler when creating a shared library])
9093 _LT_TAGDECL([], [predep_objects], [1],
9094     [Dependencies to place before and after the objects being linked to
9095     create a shared library])
9096 _LT_TAGDECL([], [postdep_objects], [1])
9097 _LT_TAGDECL([], [predeps], [1])
9098 _LT_TAGDECL([], [postdeps], [1])
9099 _LT_TAGDECL([], [compiler_lib_search_path], [1],
9100     [The library search path used internally by the compiler when linking
9101     a shared library])
9102 ])# _LT_SYS_HIDDEN_LIBDEPS
9103
9104
9105 # _LT_LANG_F77_CONFIG([TAG])
9106 # --------------------------
9107 # Ensure that the configuration variables for a Fortran 77 compiler are
9108 # suitably defined.  These variables are subsequently used by _LT_CONFIG
9109 # to write the compiler configuration to `libtool'.
9110 m4_defun([_LT_LANG_F77_CONFIG],
9111 [AC_LANG_PUSH(Fortran 77)
9112 if test -z "$F77" || test "X$F77" = "Xno"; then
9113   _lt_disable_F77=yes
9114 fi
9115
9116 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9117 _LT_TAGVAR(allow_undefined_flag, $1)=
9118 _LT_TAGVAR(always_export_symbols, $1)=no
9119 _LT_TAGVAR(archive_expsym_cmds, $1)=
9120 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9121 _LT_TAGVAR(hardcode_direct, $1)=no
9122 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9123 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9124 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9125 _LT_TAGVAR(hardcode_minus_L, $1)=no
9126 _LT_TAGVAR(hardcode_automatic, $1)=no
9127 _LT_TAGVAR(inherit_rpath, $1)=no
9128 _LT_TAGVAR(module_cmds, $1)=
9129 _LT_TAGVAR(module_expsym_cmds, $1)=
9130 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9131 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9132 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9133 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9134 _LT_TAGVAR(no_undefined_flag, $1)=
9135 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9136 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9137
9138 # Source file extension for f77 test sources.
9139 ac_ext=f
9140
9141 # Object file extension for compiled f77 test sources.
9142 objext=o
9143 _LT_TAGVAR(objext, $1)=$objext
9144
9145 # No sense in running all these tests if we already determined that
9146 # the F77 compiler isn't working.  Some variables (like enable_shared)
9147 # are currently assumed to apply to all compilers on this platform,
9148 # and will be corrupted by setting them based on a non-working compiler.
9149 if test "$_lt_disable_F77" != yes; then
9150   # Code to be used in simple compile tests
9151   lt_simple_compile_test_code="\
9152       subroutine t
9153       return
9154       end
9155 "
9156
9157   # Code to be used in simple link tests
9158   lt_simple_link_test_code="\
9159       program t
9160       end
9161 "
9162
9163   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9164   _LT_TAG_COMPILER
9165
9166   # save warnings/boilerplate of simple test code
9167   _LT_COMPILER_BOILERPLATE
9168   _LT_LINKER_BOILERPLATE
9169
9170   # Allow CC to be a program name with arguments.
9171   lt_save_CC="$CC"
9172   lt_save_GCC=$GCC
9173   lt_save_CFLAGS=$CFLAGS
9174   CC=${F77-"f77"}
9175   CFLAGS=$FFLAGS
9176   compiler=$CC
9177   _LT_TAGVAR(compiler, $1)=$CC
9178   _LT_CC_BASENAME([$compiler])
9179   GCC=$G77
9180   if test -n "$compiler"; then
9181     AC_MSG_CHECKING([if libtool supports shared libraries])
9182     AC_MSG_RESULT([$can_build_shared])
9183
9184     AC_MSG_CHECKING([whether to build shared libraries])
9185     test "$can_build_shared" = "no" && enable_shared=no
9186
9187     # On AIX, shared libraries and static libraries use the same namespace, and
9188     # are all built from PIC.
9189     case $host_os in
9190       aix3*)
9191         test "$enable_shared" = yes && enable_static=no
9192         if test -n "$RANLIB"; then
9193           archive_cmds="$archive_cmds~\$RANLIB \$lib"
9194           postinstall_cmds='$RANLIB $lib'
9195         fi
9196         ;;
9197       aix[[4-9]]*)
9198         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9199           test "$enable_shared" = yes && enable_static=no
9200         fi
9201         ;;
9202     esac
9203     AC_MSG_RESULT([$enable_shared])
9204
9205     AC_MSG_CHECKING([whether to build static libraries])
9206     # Make sure either enable_shared or enable_static is yes.
9207     test "$enable_shared" = yes || enable_static=yes
9208     AC_MSG_RESULT([$enable_static])
9209
9210     _LT_TAGVAR(GCC, $1)="$G77"
9211     _LT_TAGVAR(LD, $1)="$LD"
9212
9213     ## CAVEAT EMPTOR:
9214     ## There is no encapsulation within the following macros, do not change
9215     ## the running order or otherwise move them around unless you know exactly
9216     ## what you are doing...
9217     _LT_COMPILER_PIC($1)
9218     _LT_COMPILER_C_O($1)
9219     _LT_COMPILER_FILE_LOCKS($1)
9220     _LT_LINKER_SHLIBS($1)
9221     _LT_SYS_DYNAMIC_LINKER($1)
9222     _LT_LINKER_HARDCODE_LIBPATH($1)
9223
9224     _LT_CONFIG($1)
9225   fi # test -n "$compiler"
9226
9227   GCC=$lt_save_GCC
9228   CC="$lt_save_CC"
9229   CFLAGS="$lt_save_CFLAGS"
9230 fi # test "$_lt_disable_F77" != yes
9231
9232 AC_LANG_POP
9233 ])# _LT_LANG_F77_CONFIG
9234
9235
9236 # _LT_LANG_FC_CONFIG([TAG])
9237 # -------------------------
9238 # Ensure that the configuration variables for a Fortran compiler are
9239 # suitably defined.  These variables are subsequently used by _LT_CONFIG
9240 # to write the compiler configuration to `libtool'.
9241 m4_defun([_LT_LANG_FC_CONFIG],
9242 [AC_LANG_PUSH(Fortran)
9243
9244 if test -z "$FC" || test "X$FC" = "Xno"; then
9245   _lt_disable_FC=yes
9246 fi
9247
9248 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9249 _LT_TAGVAR(allow_undefined_flag, $1)=
9250 _LT_TAGVAR(always_export_symbols, $1)=no
9251 _LT_TAGVAR(archive_expsym_cmds, $1)=
9252 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9253 _LT_TAGVAR(hardcode_direct, $1)=no
9254 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9255 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9256 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9257 _LT_TAGVAR(hardcode_minus_L, $1)=no
9258 _LT_TAGVAR(hardcode_automatic, $1)=no
9259 _LT_TAGVAR(inherit_rpath, $1)=no
9260 _LT_TAGVAR(module_cmds, $1)=
9261 _LT_TAGVAR(module_expsym_cmds, $1)=
9262 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9263 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9264 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9265 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9266 _LT_TAGVAR(no_undefined_flag, $1)=
9267 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9268 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9269
9270 # Source file extension for fc test sources.
9271 ac_ext=${ac_fc_srcext-f}
9272
9273 # Object file extension for compiled fc test sources.
9274 objext=o
9275 _LT_TAGVAR(objext, $1)=$objext
9276
9277 # No sense in running all these tests if we already determined that
9278 # the FC compiler isn't working.  Some variables (like enable_shared)
9279 # are currently assumed to apply to all compilers on this platform,
9280 # and will be corrupted by setting them based on a non-working compiler.
9281 if test "$_lt_disable_FC" != yes; then
9282   # Code to be used in simple compile tests
9283   lt_simple_compile_test_code="\
9284       subroutine t
9285       return
9286       end
9287 "
9288
9289   # Code to be used in simple link tests
9290   lt_simple_link_test_code="\
9291       program t
9292       end
9293 "
9294
9295   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9296   _LT_TAG_COMPILER
9297
9298   # save warnings/boilerplate of simple test code
9299   _LT_COMPILER_BOILERPLATE
9300   _LT_LINKER_BOILERPLATE
9301
9302   # Allow CC to be a program name with arguments.
9303   lt_save_CC="$CC"
9304   lt_save_GCC=$GCC
9305   lt_save_CFLAGS=$CFLAGS
9306   CC=${FC-"f95"}
9307   CFLAGS=$FCFLAGS
9308   compiler=$CC
9309   GCC=$ac_cv_fc_compiler_gnu
9310
9311   _LT_TAGVAR(compiler, $1)=$CC
9312   _LT_CC_BASENAME([$compiler])
9313
9314   if test -n "$compiler"; then
9315     AC_MSG_CHECKING([if libtool supports shared libraries])
9316     AC_MSG_RESULT([$can_build_shared])
9317
9318     AC_MSG_CHECKING([whether to build shared libraries])
9319     test "$can_build_shared" = "no" && enable_shared=no
9320
9321     # On AIX, shared libraries and static libraries use the same namespace, and
9322     # are all built from PIC.
9323     case $host_os in
9324       aix3*)
9325         test "$enable_shared" = yes && enable_static=no
9326         if test -n "$RANLIB"; then
9327           archive_cmds="$archive_cmds~\$RANLIB \$lib"
9328           postinstall_cmds='$RANLIB $lib'
9329         fi
9330         ;;
9331       aix[[4-9]]*)
9332         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9333           test "$enable_shared" = yes && enable_static=no
9334         fi
9335         ;;
9336     esac
9337     AC_MSG_RESULT([$enable_shared])
9338
9339     AC_MSG_CHECKING([whether to build static libraries])
9340     # Make sure either enable_shared or enable_static is yes.
9341     test "$enable_shared" = yes || enable_static=yes
9342     AC_MSG_RESULT([$enable_static])
9343
9344     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9345     _LT_TAGVAR(LD, $1)="$LD"
9346
9347     ## CAVEAT EMPTOR:
9348     ## There is no encapsulation within the following macros, do not change
9349     ## the running order or otherwise move them around unless you know exactly
9350     ## what you are doing...
9351     _LT_SYS_HIDDEN_LIBDEPS($1)
9352     _LT_COMPILER_PIC($1)
9353     _LT_COMPILER_C_O($1)
9354     _LT_COMPILER_FILE_LOCKS($1)
9355     _LT_LINKER_SHLIBS($1)
9356     _LT_SYS_DYNAMIC_LINKER($1)
9357     _LT_LINKER_HARDCODE_LIBPATH($1)
9358
9359     _LT_CONFIG($1)
9360   fi # test -n "$compiler"
9361
9362   GCC=$lt_save_GCC
9363   CC=$lt_save_CC
9364   CFLAGS=$lt_save_CFLAGS
9365 fi # test "$_lt_disable_FC" != yes
9366
9367 AC_LANG_POP
9368 ])# _LT_LANG_FC_CONFIG
9369
9370
9371 # _LT_LANG_GCJ_CONFIG([TAG])
9372 # --------------------------
9373 # Ensure that the configuration variables for the GNU Java Compiler compiler
9374 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
9375 # to write the compiler configuration to `libtool'.
9376 m4_defun([_LT_LANG_GCJ_CONFIG],
9377 [AC_REQUIRE([LT_PROG_GCJ])dnl
9378 AC_LANG_SAVE
9379
9380 # Source file extension for Java test sources.
9381 ac_ext=java
9382
9383 # Object file extension for compiled Java test sources.
9384 objext=o
9385 _LT_TAGVAR(objext, $1)=$objext
9386
9387 # Code to be used in simple compile tests
9388 lt_simple_compile_test_code="class foo {}"
9389
9390 # Code to be used in simple link tests
9391 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9392
9393 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9394 _LT_TAG_COMPILER
9395
9396 # save warnings/boilerplate of simple test code
9397 _LT_COMPILER_BOILERPLATE
9398 _LT_LINKER_BOILERPLATE
9399
9400 # Allow CC to be a program name with arguments.
9401 lt_save_CC=$CC
9402 lt_save_CFLAGS=$CFLAGS
9403 lt_save_GCC=$GCC
9404 GCC=yes
9405 CC=${GCJ-"gcj"}
9406 CFLAGS=$GCJFLAGS
9407 compiler=$CC
9408 _LT_TAGVAR(compiler, $1)=$CC
9409 _LT_TAGVAR(LD, $1)="$LD"
9410 _LT_CC_BASENAME([$compiler])
9411
9412 # GCJ did not exist at the time GCC didn't implicitly link libc in.
9413 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9414
9415 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9416 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9417 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9418
9419 if test -n "$compiler"; then
9420   _LT_COMPILER_NO_RTTI($1)
9421   _LT_COMPILER_PIC($1)
9422   _LT_COMPILER_C_O($1)
9423   _LT_COMPILER_FILE_LOCKS($1)
9424   _LT_LINKER_SHLIBS($1)
9425   _LT_LINKER_HARDCODE_LIBPATH($1)
9426
9427   _LT_CONFIG($1)
9428 fi
9429
9430 AC_LANG_RESTORE
9431
9432 GCC=$lt_save_GCC
9433 CC=$lt_save_CC
9434 CFLAGS=$lt_save_CFLAGS
9435 ])# _LT_LANG_GCJ_CONFIG
9436
9437
9438 # _LT_LANG_GO_CONFIG([TAG])
9439 # --------------------------
9440 # Ensure that the configuration variables for the GNU Go compiler
9441 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
9442 # to write the compiler configuration to `libtool'.
9443 m4_defun([_LT_LANG_GO_CONFIG],
9444 [AC_REQUIRE([LT_PROG_GO])dnl
9445 AC_LANG_SAVE
9446
9447 # Source file extension for Go test sources.
9448 ac_ext=go
9449
9450 # Object file extension for compiled Go test sources.
9451 objext=o
9452 _LT_TAGVAR(objext, $1)=$objext
9453
9454 # Code to be used in simple compile tests
9455 lt_simple_compile_test_code="package main; func main() { }"
9456
9457 # Code to be used in simple link tests
9458 lt_simple_link_test_code='package main; func main() { }'
9459
9460 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9461 _LT_TAG_COMPILER
9462
9463 # save warnings/boilerplate of simple test code
9464 _LT_COMPILER_BOILERPLATE
9465 _LT_LINKER_BOILERPLATE
9466
9467 # Allow CC to be a program name with arguments.
9468 lt_save_CC=$CC
9469 lt_save_CFLAGS=$CFLAGS
9470 lt_save_GCC=$GCC
9471 GCC=yes
9472 CC=${GOC-"gccgo"}
9473 CFLAGS=$GOFLAGS
9474 compiler=$CC
9475 _LT_TAGVAR(compiler, $1)=$CC
9476 _LT_TAGVAR(LD, $1)="$LD"
9477 _LT_CC_BASENAME([$compiler])
9478
9479 # Go did not exist at the time GCC didn't implicitly link libc in.
9480 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9481
9482 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9483 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9484 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9485
9486 if test -n "$compiler"; then
9487   _LT_COMPILER_NO_RTTI($1)
9488   _LT_COMPILER_PIC($1)
9489   _LT_COMPILER_C_O($1)
9490   _LT_COMPILER_FILE_LOCKS($1)
9491   _LT_LINKER_SHLIBS($1)
9492   _LT_LINKER_HARDCODE_LIBPATH($1)
9493
9494   _LT_CONFIG($1)
9495 fi
9496
9497 AC_LANG_RESTORE
9498
9499 GCC=$lt_save_GCC
9500 CC=$lt_save_CC
9501 CFLAGS=$lt_save_CFLAGS
9502 ])# _LT_LANG_GO_CONFIG
9503
9504
9505 # _LT_LANG_RC_CONFIG([TAG])
9506 # -------------------------
9507 # Ensure that the configuration variables for the Windows resource compiler
9508 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
9509 # to write the compiler configuration to `libtool'.
9510 m4_defun([_LT_LANG_RC_CONFIG],
9511 [AC_REQUIRE([LT_PROG_RC])dnl
9512 AC_LANG_SAVE
9513
9514 # Source file extension for RC test sources.
9515 ac_ext=rc
9516
9517 # Object file extension for compiled RC test sources.
9518 objext=o
9519 _LT_TAGVAR(objext, $1)=$objext
9520
9521 # Code to be used in simple compile tests
9522 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9523
9524 # Code to be used in simple link tests
9525 lt_simple_link_test_code="$lt_simple_compile_test_code"
9526
9527 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9528 _LT_TAG_COMPILER
9529
9530 # save warnings/boilerplate of simple test code
9531 _LT_COMPILER_BOILERPLATE
9532 _LT_LINKER_BOILERPLATE
9533
9534 # Allow CC to be a program name with arguments.
9535 lt_save_CC="$CC"
9536 lt_save_CFLAGS=$CFLAGS
9537 lt_save_GCC=$GCC
9538 GCC=
9539 CC=${RC-"windres"}
9540 CFLAGS=
9541 compiler=$CC
9542 _LT_TAGVAR(compiler, $1)=$CC
9543 _LT_CC_BASENAME([$compiler])
9544 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9545
9546 if test -n "$compiler"; then
9547   :
9548   _LT_CONFIG($1)
9549 fi
9550
9551 GCC=$lt_save_GCC
9552 AC_LANG_RESTORE
9553 CC=$lt_save_CC
9554 CFLAGS=$lt_save_CFLAGS
9555 ])# _LT_LANG_RC_CONFIG
9556
9557
9558 # LT_PROG_GCJ
9559 # -----------
9560 AC_DEFUN([LT_PROG_GCJ],
9561 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9562   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9563     [AC_CHECK_TOOL(GCJ, gcj,)
9564       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9565       AC_SUBST(GCJFLAGS)])])[]dnl
9566 ])
9567
9568 # Old name:
9569 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9570 dnl aclocal-1.4 backwards compatibility:
9571 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9572
9573
9574 # LT_PROG_GO
9575 # ----------
9576 AC_DEFUN([LT_PROG_GO],
9577 [AC_CHECK_TOOL(GOC, gccgo,)
9578 ])
9579
9580
9581 # LT_PROG_RC
9582 # ----------
9583 AC_DEFUN([LT_PROG_RC],
9584 [AC_CHECK_TOOL(RC, windres,)
9585 ])
9586
9587 # Old name:
9588 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9589 dnl aclocal-1.4 backwards compatibility:
9590 dnl AC_DEFUN([LT_AC_PROG_RC], [])
9591
9592
9593 # _LT_DECL_EGREP
9594 # --------------
9595 # If we don't have a new enough Autoconf to choose the best grep
9596 # available, choose the one first in the user's PATH.
9597 m4_defun([_LT_DECL_EGREP],
9598 [AC_REQUIRE([AC_PROG_EGREP])dnl
9599 AC_REQUIRE([AC_PROG_FGREP])dnl
9600 test -z "$GREP" && GREP=grep
9601 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9602 _LT_DECL([], [EGREP], [1], [An ERE matcher])
9603 _LT_DECL([], [FGREP], [1], [A literal string matcher])
9604 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9605 AC_SUBST([GREP])
9606 ])
9607
9608
9609 # _LT_DECL_OBJDUMP
9610 # --------------
9611 # If we don't have a new enough Autoconf to choose the best objdump
9612 # available, choose the one first in the user's PATH.
9613 m4_defun([_LT_DECL_OBJDUMP],
9614 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
9615 test -z "$OBJDUMP" && OBJDUMP=objdump
9616 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9617 AC_SUBST([OBJDUMP])
9618 ])
9619
9620 # _LT_DECL_DLLTOOL
9621 # ----------------
9622 # Ensure DLLTOOL variable is set.
9623 m4_defun([_LT_DECL_DLLTOOL],
9624 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9625 test -z "$DLLTOOL" && DLLTOOL=dlltool
9626 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
9627 AC_SUBST([DLLTOOL])
9628 ])
9629
9630 # _LT_DECL_SED
9631 # ------------
9632 # Check for a fully-functional sed program, that truncates
9633 # as few characters as possible.  Prefer GNU sed if found.
9634 m4_defun([_LT_DECL_SED],
9635 [AC_PROG_SED
9636 test -z "$SED" && SED=sed
9637 Xsed="$SED -e 1s/^X//"
9638 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9639 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9640     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9641 ])# _LT_DECL_SED
9642
9643 m4_ifndef([AC_PROG_SED], [
9644 # NOTE: This macro has been submitted for inclusion into   #
9645 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9646 #  a released version of Autoconf we should remove this    #
9647 #  macro and use it instead.                               #
9648
9649 m4_defun([AC_PROG_SED],
9650 [AC_MSG_CHECKING([for a sed that does not truncate output])
9651 AC_CACHE_VAL(lt_cv_path_SED,
9652 [# Loop through the user's path and test for sed and gsed.
9653 # Then use that list of sed's as ones to test for truncation.
9654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9655 for as_dir in $PATH
9656 do
9657   IFS=$as_save_IFS
9658   test -z "$as_dir" && as_dir=.
9659   for lt_ac_prog in sed gsed; do
9660     for ac_exec_ext in '' $ac_executable_extensions; do
9661       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9662         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9663       fi
9664     done
9665   done
9666 done
9667 IFS=$as_save_IFS
9668 lt_ac_max=0
9669 lt_ac_count=0
9670 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9671 # along with /bin/sed that truncates output.
9672 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9673   test ! -f $lt_ac_sed && continue
9674   cat /dev/null > conftest.in
9675   lt_ac_count=0
9676   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9677   # Check for GNU sed and select it if it is found.
9678   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9679     lt_cv_path_SED=$lt_ac_sed
9680     break
9681   fi
9682   while true; do
9683     cat conftest.in conftest.in >conftest.tmp
9684     mv conftest.tmp conftest.in
9685     cp conftest.in conftest.nl
9686     echo >>conftest.nl
9687     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9688     cmp -s conftest.out conftest.nl || break
9689     # 10000 chars as input seems more than enough
9690     test $lt_ac_count -gt 10 && break
9691     lt_ac_count=`expr $lt_ac_count + 1`
9692     if test $lt_ac_count -gt $lt_ac_max; then
9693       lt_ac_max=$lt_ac_count
9694       lt_cv_path_SED=$lt_ac_sed
9695     fi
9696   done
9697 done
9698 ])
9699 SED=$lt_cv_path_SED
9700 AC_SUBST([SED])
9701 AC_MSG_RESULT([$SED])
9702 ])#AC_PROG_SED
9703 ])#m4_ifndef
9704
9705 # Old name:
9706 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9707 dnl aclocal-1.4 backwards compatibility:
9708 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9709
9710
9711 # _LT_CHECK_SHELL_FEATURES
9712 # ------------------------
9713 # Find out whether the shell is Bourne or XSI compatible,
9714 # or has some other useful features.
9715 m4_defun([_LT_CHECK_SHELL_FEATURES],
9716 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9717 # Try some XSI features
9718 xsi_shell=no
9719 ( _lt_dummy="a/b/c"
9720   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
9721       = c,a/b,b/c, \
9722     && eval 'test $(( 1 + 1 )) -eq 2 \
9723     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9724   && xsi_shell=yes
9725 AC_MSG_RESULT([$xsi_shell])
9726 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9727
9728 AC_MSG_CHECKING([whether the shell understands "+="])
9729 lt_shell_append=no
9730 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9731     >/dev/null 2>&1 \
9732   && lt_shell_append=yes
9733 AC_MSG_RESULT([$lt_shell_append])
9734 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9735
9736 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9737   lt_unset=unset
9738 else
9739   lt_unset=false
9740 fi
9741 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9742
9743 # test EBCDIC or ASCII
9744 case `echo X|tr X '\101'` in
9745  A) # ASCII based system
9746     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9747   lt_SP2NL='tr \040 \012'
9748   lt_NL2SP='tr \015\012 \040\040'
9749   ;;
9750  *) # EBCDIC based system
9751   lt_SP2NL='tr \100 \n'
9752   lt_NL2SP='tr \r\n \100\100'
9753   ;;
9754 esac
9755 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9756 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9757 ])# _LT_CHECK_SHELL_FEATURES
9758
9759
9760 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
9761 # ------------------------------------------------------
9762 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
9763 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
9764 m4_defun([_LT_PROG_FUNCTION_REPLACE],
9765 [dnl {
9766 sed -e '/^$1 ()$/,/^} # $1 /c\
9767 $1 ()\
9768 {\
9769 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
9770 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
9771   && mv -f "$cfgfile.tmp" "$cfgfile" \
9772     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9773 test 0 -eq $? || _lt_function_replace_fail=:
9774 ])
9775
9776
9777 # _LT_PROG_REPLACE_SHELLFNS
9778 # -------------------------
9779 # Replace existing portable implementations of several shell functions with
9780 # equivalent extended shell implementations where those features are available..
9781 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
9782 [if test x"$xsi_shell" = xyes; then
9783   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
9784     case ${1} in
9785       */*) func_dirname_result="${1%/*}${2}" ;;
9786       *  ) func_dirname_result="${3}" ;;
9787     esac])
9788
9789   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
9790     func_basename_result="${1##*/}"])
9791
9792   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
9793     case ${1} in
9794       */*) func_dirname_result="${1%/*}${2}" ;;
9795       *  ) func_dirname_result="${3}" ;;
9796     esac
9797     func_basename_result="${1##*/}"])
9798
9799   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
9800     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9801     # positional parameters, so assign one to ordinary parameter first.
9802     func_stripname_result=${3}
9803     func_stripname_result=${func_stripname_result#"${1}"}
9804     func_stripname_result=${func_stripname_result%"${2}"}])
9805
9806   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
9807     func_split_long_opt_name=${1%%=*}
9808     func_split_long_opt_arg=${1#*=}])
9809
9810   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
9811     func_split_short_opt_arg=${1#??}
9812     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9813
9814   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
9815     case ${1} in
9816       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9817       *)    func_lo2o_result=${1} ;;
9818     esac])
9819
9820   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
9821
9822   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
9823
9824   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
9825 fi
9826
9827 if test x"$lt_shell_append" = xyes; then
9828   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
9829
9830   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
9831     func_quote_for_eval "${2}"
9832 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
9833     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9834
9835   # Save a `func_append' function call where possible by direct use of '+='
9836   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9837     && mv -f "$cfgfile.tmp" "$cfgfile" \
9838       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9839   test 0 -eq $? || _lt_function_replace_fail=:
9840 else
9841   # Save a `func_append' function call even when '+=' is not available
9842   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9843     && mv -f "$cfgfile.tmp" "$cfgfile" \
9844       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9845   test 0 -eq $? || _lt_function_replace_fail=:
9846 fi
9847
9848 if test x"$_lt_function_replace_fail" = x":"; then
9849   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
9850 fi
9851 ])
9852
9853 # _LT_PATH_CONVERSION_FUNCTIONS
9854 # -----------------------------
9855 # Determine which file name conversion functions should be used by
9856 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
9857 # for certain cross-compile configurations and native mingw.
9858 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9859 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9860 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9861 AC_MSG_CHECKING([how to convert $build file names to $host format])
9862 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9863 [case $host in
9864   *-*-mingw* )
9865     case $build in
9866       *-*-mingw* ) # actually msys
9867         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9868         ;;
9869       *-*-cygwin* )
9870         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9871         ;;
9872       * ) # otherwise, assume *nix
9873         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9874         ;;
9875     esac
9876     ;;
9877   *-*-cygwin* )
9878     case $build in
9879       *-*-mingw* ) # actually msys
9880         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9881         ;;
9882       *-*-cygwin* )
9883         lt_cv_to_host_file_cmd=func_convert_file_noop
9884         ;;
9885       * ) # otherwise, assume *nix
9886         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9887         ;;
9888     esac
9889     ;;
9890   * ) # unhandled hosts (and "normal" native builds)
9891     lt_cv_to_host_file_cmd=func_convert_file_noop
9892     ;;
9893 esac
9894 ])
9895 to_host_file_cmd=$lt_cv_to_host_file_cmd
9896 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9897 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9898          [0], [convert $build file names to $host format])dnl
9899
9900 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9901 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9902 [#assume ordinary cross tools, or native build.
9903 lt_cv_to_tool_file_cmd=func_convert_file_noop
9904 case $host in
9905   *-*-mingw* )
9906     case $build in
9907       *-*-mingw* ) # actually msys
9908         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9909         ;;
9910     esac
9911     ;;
9912 esac
9913 ])
9914 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9915 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9916 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9917          [0], [convert $build files to toolchain format])dnl
9918 ])# _LT_PATH_CONVERSION_FUNCTIONS
9919
9920 # Helper functions for option handling.                    -*- Autoconf -*-
9921 #
9922 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9923 #   Inc.
9924 #   Written by Gary V. Vaughan, 2004
9925 #
9926 # This file is free software; the Free Software Foundation gives
9927 # unlimited permission to copy and/or distribute it, with or without
9928 # modifications, as long as this notice is preserved.
9929
9930 # serial 7 ltoptions.m4
9931
9932 # This is to help aclocal find these macros, as it can't see m4_define.
9933 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9934
9935
9936 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9937 # ------------------------------------------
9938 m4_define([_LT_MANGLE_OPTION],
9939 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9940
9941
9942 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9943 # ---------------------------------------
9944 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9945 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9946 # saved as a flag.
9947 m4_define([_LT_SET_OPTION],
9948 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9949 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9950         _LT_MANGLE_DEFUN([$1], [$2]),
9951     [m4_warning([Unknown $1 option `$2'])])[]dnl
9952 ])
9953
9954
9955 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9956 # ------------------------------------------------------------
9957 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9958 m4_define([_LT_IF_OPTION],
9959 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9960
9961
9962 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9963 # -------------------------------------------------------
9964 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9965 # are set.
9966 m4_define([_LT_UNLESS_OPTIONS],
9967 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9968             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9969                       [m4_define([$0_found])])])[]dnl
9970 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9971 ])[]dnl
9972 ])
9973
9974
9975 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9976 # ----------------------------------------
9977 # OPTION-LIST is a space-separated list of Libtool options associated
9978 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9979 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9980 # the unknown option and exit.
9981 m4_defun([_LT_SET_OPTIONS],
9982 [# Set options
9983 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9984     [_LT_SET_OPTION([$1], _LT_Option)])
9985
9986 m4_if([$1],[LT_INIT],[
9987   dnl
9988   dnl Simply set some default values (i.e off) if boolean options were not
9989   dnl specified:
9990   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9991   ])
9992   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9993   ])
9994   dnl
9995   dnl If no reference was made to various pairs of opposing options, then
9996   dnl we run the default mode handler for the pair.  For example, if neither
9997   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9998   dnl archives by default:
9999   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
10000   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
10001   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
10002   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
10003                    [_LT_ENABLE_FAST_INSTALL])
10004   ])
10005 ])# _LT_SET_OPTIONS
10006
10007
10008
10009 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
10010 # -----------------------------------------
10011 m4_define([_LT_MANGLE_DEFUN],
10012 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
10013
10014
10015 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
10016 # -----------------------------------------------
10017 m4_define([LT_OPTION_DEFINE],
10018 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
10019 ])# LT_OPTION_DEFINE
10020
10021
10022 # dlopen
10023 # ------
10024 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
10025 ])
10026
10027 AU_DEFUN([AC_LIBTOOL_DLOPEN],
10028 [_LT_SET_OPTION([LT_INIT], [dlopen])
10029 AC_DIAGNOSE([obsolete],
10030 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10031 put the `dlopen' option into LT_INIT's first parameter.])
10032 ])
10033
10034 dnl aclocal-1.4 backwards compatibility:
10035 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
10036
10037
10038 # win32-dll
10039 # ---------
10040 # Declare package support for building win32 dll's.
10041 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
10042 [enable_win32_dll=yes
10043
10044 case $host in
10045 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
10046   AC_CHECK_TOOL(AS, as, false)
10047   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10048   AC_CHECK_TOOL(OBJDUMP, objdump, false)
10049   ;;
10050 esac
10051
10052 test -z "$AS" && AS=as
10053 _LT_DECL([], [AS],      [1], [Assembler program])dnl
10054
10055 test -z "$DLLTOOL" && DLLTOOL=dlltool
10056 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
10057
10058 test -z "$OBJDUMP" && OBJDUMP=objdump
10059 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
10060 ])# win32-dll
10061
10062 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
10063 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
10064 _LT_SET_OPTION([LT_INIT], [win32-dll])
10065 AC_DIAGNOSE([obsolete],
10066 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10067 put the `win32-dll' option into LT_INIT's first parameter.])
10068 ])
10069
10070 dnl aclocal-1.4 backwards compatibility:
10071 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
10072
10073
10074 # _LT_ENABLE_SHARED([DEFAULT])
10075 # ----------------------------
10076 # implement the --enable-shared flag, and supports the `shared' and
10077 # `disable-shared' LT_INIT options.
10078 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10079 m4_define([_LT_ENABLE_SHARED],
10080 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
10081 AC_ARG_ENABLE([shared],
10082     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
10083         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
10084     [p=${PACKAGE-default}
10085     case $enableval in
10086     yes) enable_shared=yes ;;
10087     no) enable_shared=no ;;
10088     *)
10089       enable_shared=no
10090       # Look at the argument we got.  We use all the common list separators.
10091       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10092       for pkg in $enableval; do
10093         IFS="$lt_save_ifs"
10094         if test "X$pkg" = "X$p"; then
10095           enable_shared=yes
10096         fi
10097       done
10098       IFS="$lt_save_ifs"
10099       ;;
10100     esac],
10101     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
10102
10103     _LT_DECL([build_libtool_libs], [enable_shared], [0],
10104         [Whether or not to build shared libraries])
10105 ])# _LT_ENABLE_SHARED
10106
10107 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
10108 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
10109
10110 # Old names:
10111 AC_DEFUN([AC_ENABLE_SHARED],
10112 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
10113 ])
10114
10115 AC_DEFUN([AC_DISABLE_SHARED],
10116 [_LT_SET_OPTION([LT_INIT], [disable-shared])
10117 ])
10118
10119 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10120 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10121
10122 dnl aclocal-1.4 backwards compatibility:
10123 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
10124 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
10125
10126
10127
10128 # _LT_ENABLE_STATIC([DEFAULT])
10129 # ----------------------------
10130 # implement the --enable-static flag, and support the `static' and
10131 # `disable-static' LT_INIT options.
10132 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10133 m4_define([_LT_ENABLE_STATIC],
10134 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10135 AC_ARG_ENABLE([static],
10136     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10137         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10138     [p=${PACKAGE-default}
10139     case $enableval in
10140     yes) enable_static=yes ;;
10141     no) enable_static=no ;;
10142     *)
10143      enable_static=no
10144       # Look at the argument we got.  We use all the common list separators.
10145       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10146       for pkg in $enableval; do
10147         IFS="$lt_save_ifs"
10148         if test "X$pkg" = "X$p"; then
10149           enable_static=yes
10150         fi
10151       done
10152       IFS="$lt_save_ifs"
10153       ;;
10154     esac],
10155     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10156
10157     _LT_DECL([build_old_libs], [enable_static], [0],
10158         [Whether or not to build static libraries])
10159 ])# _LT_ENABLE_STATIC
10160
10161 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10162 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10163
10164 # Old names:
10165 AC_DEFUN([AC_ENABLE_STATIC],
10166 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10167 ])
10168
10169 AC_DEFUN([AC_DISABLE_STATIC],
10170 [_LT_SET_OPTION([LT_INIT], [disable-static])
10171 ])
10172
10173 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10174 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10175
10176 dnl aclocal-1.4 backwards compatibility:
10177 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10178 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10179
10180
10181
10182 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
10183 # ----------------------------------
10184 # implement the --enable-fast-install flag, and support the `fast-install'
10185 # and `disable-fast-install' LT_INIT options.
10186 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10187 m4_define([_LT_ENABLE_FAST_INSTALL],
10188 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10189 AC_ARG_ENABLE([fast-install],
10190     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10191     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10192     [p=${PACKAGE-default}
10193     case $enableval in
10194     yes) enable_fast_install=yes ;;
10195     no) enable_fast_install=no ;;
10196     *)
10197       enable_fast_install=no
10198       # Look at the argument we got.  We use all the common list separators.
10199       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10200       for pkg in $enableval; do
10201         IFS="$lt_save_ifs"
10202         if test "X$pkg" = "X$p"; then
10203           enable_fast_install=yes
10204         fi
10205       done
10206       IFS="$lt_save_ifs"
10207       ;;
10208     esac],
10209     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10210
10211 _LT_DECL([fast_install], [enable_fast_install], [0],
10212          [Whether or not to optimize for fast installation])dnl
10213 ])# _LT_ENABLE_FAST_INSTALL
10214
10215 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10216 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10217
10218 # Old names:
10219 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10220 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10221 AC_DIAGNOSE([obsolete],
10222 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10223 the `fast-install' option into LT_INIT's first parameter.])
10224 ])
10225
10226 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10227 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10228 AC_DIAGNOSE([obsolete],
10229 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10230 the `disable-fast-install' option into LT_INIT's first parameter.])
10231 ])
10232
10233 dnl aclocal-1.4 backwards compatibility:
10234 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10235 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10236
10237
10238 # _LT_WITH_PIC([MODE])
10239 # --------------------
10240 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
10241 # LT_INIT options.
10242 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
10243 m4_define([_LT_WITH_PIC],
10244 [AC_ARG_WITH([pic],
10245     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
10246         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10247     [lt_p=${PACKAGE-default}
10248     case $withval in
10249     yes|no) pic_mode=$withval ;;
10250     *)
10251       pic_mode=default
10252       # Look at the argument we got.  We use all the common list separators.
10253       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10254       for lt_pkg in $withval; do
10255         IFS="$lt_save_ifs"
10256         if test "X$lt_pkg" = "X$lt_p"; then
10257           pic_mode=yes
10258         fi
10259       done
10260       IFS="$lt_save_ifs"
10261       ;;
10262     esac],
10263     [pic_mode=default])
10264
10265 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10266
10267 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10268 ])# _LT_WITH_PIC
10269
10270 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10271 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10272
10273 # Old name:
10274 AU_DEFUN([AC_LIBTOOL_PICMODE],
10275 [_LT_SET_OPTION([LT_INIT], [pic-only])
10276 AC_DIAGNOSE([obsolete],
10277 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10278 put the `pic-only' option into LT_INIT's first parameter.])
10279 ])
10280
10281 dnl aclocal-1.4 backwards compatibility:
10282 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10283
10284
10285 m4_define([_LTDL_MODE], [])
10286 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10287                  [m4_define([_LTDL_MODE], [nonrecursive])])
10288 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10289                  [m4_define([_LTDL_MODE], [recursive])])
10290 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10291                  [m4_define([_LTDL_MODE], [subproject])])
10292
10293 m4_define([_LTDL_TYPE], [])
10294 LT_OPTION_DEFINE([LTDL_INIT], [installable],
10295                  [m4_define([_LTDL_TYPE], [installable])])
10296 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10297                  [m4_define([_LTDL_TYPE], [convenience])])
10298
10299 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10300 #
10301 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10302 # Written by Gary V. Vaughan, 2004
10303 #
10304 # This file is free software; the Free Software Foundation gives
10305 # unlimited permission to copy and/or distribute it, with or without
10306 # modifications, as long as this notice is preserved.
10307
10308 # serial 6 ltsugar.m4
10309
10310 # This is to help aclocal find these macros, as it can't see m4_define.
10311 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10312
10313
10314 # lt_join(SEP, ARG1, [ARG2...])
10315 # -----------------------------
10316 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10317 # associated separator.
10318 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10319 # versions in m4sugar had bugs.
10320 m4_define([lt_join],
10321 [m4_if([$#], [1], [],
10322        [$#], [2], [[$2]],
10323        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10324 m4_define([_lt_join],
10325 [m4_if([$#$2], [2], [],
10326        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10327
10328
10329 # lt_car(LIST)
10330 # lt_cdr(LIST)
10331 # ------------
10332 # Manipulate m4 lists.
10333 # These macros are necessary as long as will still need to support
10334 # Autoconf-2.59 which quotes differently.
10335 m4_define([lt_car], [[$1]])
10336 m4_define([lt_cdr],
10337 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10338        [$#], 1, [],
10339        [m4_dquote(m4_shift($@))])])
10340 m4_define([lt_unquote], $1)
10341
10342
10343 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
10344 # ------------------------------------------
10345 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10346 # Note that neither SEPARATOR nor STRING are expanded; they are appended
10347 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10348 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
10349 # than defined and empty).
10350 #
10351 # This macro is needed until we can rely on Autoconf 2.62, since earlier
10352 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10353 m4_define([lt_append],
10354 [m4_define([$1],
10355            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10356
10357
10358
10359 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10360 # ----------------------------------------------------------
10361 # Produce a SEP delimited list of all paired combinations of elements of
10362 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10363 # has the form PREFIXmINFIXSUFFIXn.
10364 # Needed until we can rely on m4_combine added in Autoconf 2.62.
10365 m4_define([lt_combine],
10366 [m4_if(m4_eval([$# > 3]), [1],
10367        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10368 [[m4_foreach([_Lt_prefix], [$2],
10369              [m4_foreach([_Lt_suffix],
10370                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10371         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10372
10373
10374 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10375 # -----------------------------------------------------------------------
10376 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10377 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10378 m4_define([lt_if_append_uniq],
10379 [m4_ifdef([$1],
10380           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10381                  [lt_append([$1], [$2], [$3])$4],
10382                  [$5])],
10383           [lt_append([$1], [$2], [$3])$4])])
10384
10385
10386 # lt_dict_add(DICT, KEY, VALUE)
10387 # -----------------------------
10388 m4_define([lt_dict_add],
10389 [m4_define([$1($2)], [$3])])
10390
10391
10392 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10393 # --------------------------------------------
10394 m4_define([lt_dict_add_subkey],
10395 [m4_define([$1($2:$3)], [$4])])
10396
10397
10398 # lt_dict_fetch(DICT, KEY, [SUBKEY])
10399 # ----------------------------------
10400 m4_define([lt_dict_fetch],
10401 [m4_ifval([$3],
10402         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10403     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10404
10405
10406 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10407 # -----------------------------------------------------------------
10408 m4_define([lt_if_dict_fetch],
10409 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10410         [$5],
10411     [$6])])
10412
10413
10414 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10415 # --------------------------------------------------------------
10416 m4_define([lt_dict_filter],
10417 [m4_if([$5], [], [],
10418   [lt_join(m4_quote(m4_default([$4], [[, ]])),
10419            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10420                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10421 ])
10422
10423 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
10424 #
10425 #   Copyright (C) 2004 Free Software Foundation, Inc.
10426 #   Written by Scott James Remnant, 2004
10427 #
10428 # This file is free software; the Free Software Foundation gives
10429 # unlimited permission to copy and/or distribute it, with or without
10430 # modifications, as long as this notice is preserved.
10431
10432 # @configure_input@
10433
10434 # serial 3337 ltversion.m4
10435 # This file is part of GNU Libtool
10436
10437 m4_define([LT_PACKAGE_VERSION], [2.4.2])
10438 m4_define([LT_PACKAGE_REVISION], [1.3337])
10439
10440 AC_DEFUN([LTVERSION_VERSION],
10441 [macro_version='2.4.2'
10442 macro_revision='1.3337'
10443 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10444 _LT_DECL(, macro_revision, 0)
10445 ])
10446
10447 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10448 #
10449 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
10450 #   Written by Scott James Remnant, 2004.
10451 #
10452 # This file is free software; the Free Software Foundation gives
10453 # unlimited permission to copy and/or distribute it, with or without
10454 # modifications, as long as this notice is preserved.
10455
10456 # serial 5 lt~obsolete.m4
10457
10458 # These exist entirely to fool aclocal when bootstrapping libtool.
10459 #
10460 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10461 # which have later been changed to m4_define as they aren't part of the
10462 # exported API, or moved to Autoconf or Automake where they belong.
10463 #
10464 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10465 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10466 # using a macro with the same name in our local m4/libtool.m4 it'll
10467 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10468 # and doesn't know about Autoconf macros at all.)
10469 #
10470 # So we provide this file, which has a silly filename so it's always
10471 # included after everything else.  This provides aclocal with the
10472 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10473 # because those macros already exist, or will be overwritten later.
10474 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
10475 #
10476 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10477 # Yes, that means every name once taken will need to remain here until
10478 # we give up compatibility with versions before 1.7, at which point
10479 # we need to keep only those names which we still refer to.
10480
10481 # This is to help aclocal find these macros, as it can't see m4_define.
10482 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10483
10484 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10485 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
10486 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10487 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
10488 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10489 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
10490 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
10491 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10492 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
10493 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
10494 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
10495 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10496 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10497 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10498 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10499 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10500 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
10501 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10502 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10503 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
10504 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
10505 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10506 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10507 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10508 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10509 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10510 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10511 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10512 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
10513 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
10514 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
10515 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10516 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10517 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
10518 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
10519 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10520 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10521 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
10522 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10523 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
10524 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
10525 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
10526 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10527 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10528 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10529 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10530 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10531 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10532 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10533 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10534 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10535 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10536 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
10537 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10538 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10539 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10540 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10541 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10542 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
10543 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
10544 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
10545
10546 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
10547 # serial 1 (pkg-config-0.24)
10548
10549 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
10550 #
10551 # This program is free software; you can redistribute it and/or modify
10552 # it under the terms of the GNU General Public License as published by
10553 # the Free Software Foundation; either version 2 of the License, or
10554 # (at your option) any later version.
10555 #
10556 # This program is distributed in the hope that it will be useful, but
10557 # WITHOUT ANY WARRANTY; without even the implied warranty of
10558 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10559 # General Public License for more details.
10560 #
10561 # You should have received a copy of the GNU General Public License
10562 # along with this program; if not, write to the Free Software
10563 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
10564 #
10565 # As a special exception to the GNU General Public License, if you
10566 # distribute this file as part of a program that contains a
10567 # configuration script generated by Autoconf, you may include it under
10568 # the same distribution terms that you use for the rest of that program.
10569
10570 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
10571 # ----------------------------------
10572 AC_DEFUN([PKG_PROG_PKG_CONFIG],
10573 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
10574 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
10575 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
10576 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
10577 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
10578 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
10579
10580 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10581         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
10582 fi
10583 if test -n "$PKG_CONFIG"; then
10584         _pkg_min_version=m4_default([$1], [0.9.0])
10585         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
10586         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10587                 AC_MSG_RESULT([yes])
10588         else
10589                 AC_MSG_RESULT([no])
10590                 PKG_CONFIG=""
10591         fi
10592 fi[]dnl
10593 ])# PKG_PROG_PKG_CONFIG
10594
10595 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10596 #
10597 # Check to see whether a particular set of modules exists.  Similar
10598 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
10599 #
10600 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10601 # only at the first occurence in configure.ac, so if the first place
10602 # it's called might be skipped (such as if it is within an "if", you
10603 # have to call PKG_CHECK_EXISTS manually
10604 # --------------------------------------------------------------
10605 AC_DEFUN([PKG_CHECK_EXISTS],
10606 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10607 if test -n "$PKG_CONFIG" && \
10608     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
10609   m4_default([$2], [:])
10610 m4_ifvaln([$3], [else
10611   $3])dnl
10612 fi])
10613
10614 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
10615 # ---------------------------------------------
10616 m4_define([_PKG_CONFIG],
10617 [if test -n "$$1"; then
10618     pkg_cv_[]$1="$$1"
10619  elif test -n "$PKG_CONFIG"; then
10620     PKG_CHECK_EXISTS([$3],
10621                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
10622                       test "x$?" != "x0" && pkg_failed=yes ],
10623                      [pkg_failed=yes])
10624  else
10625     pkg_failed=untried
10626 fi[]dnl
10627 ])# _PKG_CONFIG
10628
10629 # _PKG_SHORT_ERRORS_SUPPORTED
10630 # -----------------------------
10631 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
10632 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10633 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
10634         _pkg_short_errors_supported=yes
10635 else
10636         _pkg_short_errors_supported=no
10637 fi[]dnl
10638 ])# _PKG_SHORT_ERRORS_SUPPORTED
10639
10640
10641 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
10642 # [ACTION-IF-NOT-FOUND])
10643 #
10644 #
10645 # Note that if there is a possibility the first call to
10646 # PKG_CHECK_MODULES might not happen, you should be sure to include an
10647 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
10648 #
10649 #
10650 # --------------------------------------------------------------
10651 AC_DEFUN([PKG_CHECK_MODULES],
10652 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10653 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
10654 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
10655
10656 pkg_failed=no
10657 AC_MSG_CHECKING([for $1])
10658
10659 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
10660 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
10661
10662 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
10663 and $1[]_LIBS to avoid the need to call pkg-config.
10664 See the pkg-config man page for more details.])
10665
10666 if test $pkg_failed = yes; then
10667         AC_MSG_RESULT([no])
10668         _PKG_SHORT_ERRORS_SUPPORTED
10669         if test $_pkg_short_errors_supported = yes; then
10670                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
10671         else 
10672                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
10673         fi
10674         # Put the nasty error message in config.log where it belongs
10675         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10676
10677         m4_default([$4], [AC_MSG_ERROR(
10678 [Package requirements ($2) were not met:
10679
10680 $$1_PKG_ERRORS
10681
10682 Consider adjusting the PKG_CONFIG_PATH environment variable if you
10683 installed software in a non-standard prefix.
10684
10685 _PKG_TEXT])[]dnl
10686         ])
10687 elif test $pkg_failed = untried; then
10688         AC_MSG_RESULT([no])
10689         m4_default([$4], [AC_MSG_FAILURE(
10690 [The pkg-config script could not be found or is too old.  Make sure it
10691 is in your PATH or set the PKG_CONFIG environment variable to the full
10692 path to pkg-config.
10693
10694 _PKG_TEXT
10695
10696 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
10697         ])
10698 else
10699         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10700         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10701         AC_MSG_RESULT([yes])
10702         $3
10703 fi[]dnl
10704 ])# PKG_CHECK_MODULES
10705
10706 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
10707 # Foundation, Inc.
10708 #
10709 # This file is free software; the Free Software Foundation
10710 # gives unlimited permission to copy and/or distribute it,
10711 # with or without modifications, as long as this notice is preserved.
10712
10713 # serial 1
10714
10715 # AM_AUTOMAKE_VERSION(VERSION)
10716 # ----------------------------
10717 # Automake X.Y traces this macro to ensure aclocal.m4 has been
10718 # generated from the m4 files accompanying Automake X.Y.
10719 # (This private macro should not be called outside this file.)
10720 AC_DEFUN([AM_AUTOMAKE_VERSION],
10721 [am__api_version='1.11'
10722 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10723 dnl require some minimum version.  Point them to the right macro.
10724 m4_if([$1], [1.11.3], [],
10725       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10726 ])
10727
10728 # _AM_AUTOCONF_VERSION(VERSION)
10729 # -----------------------------
10730 # aclocal traces this macro to find the Autoconf version.
10731 # This is a private macro too.  Using m4_define simplifies
10732 # the logic in aclocal, which can simply ignore this definition.
10733 m4_define([_AM_AUTOCONF_VERSION], [])
10734
10735 # AM_SET_CURRENT_AUTOMAKE_VERSION
10736 # -------------------------------
10737 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10738 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10739 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10740 [AM_AUTOMAKE_VERSION([1.11.3])dnl
10741 m4_ifndef([AC_AUTOCONF_VERSION],
10742   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10743 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10744
10745 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
10746
10747 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
10748 #
10749 # This file is free software; the Free Software Foundation
10750 # gives unlimited permission to copy and/or distribute it,
10751 # with or without modifications, as long as this notice is preserved.
10752
10753 # serial 1
10754
10755 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10756 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
10757 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
10758 #
10759 # Of course, Automake must honor this variable whenever it calls a
10760 # tool from the auxiliary directory.  The problem is that $srcdir (and
10761 # therefore $ac_aux_dir as well) can be either absolute or relative,
10762 # depending on how configure is run.  This is pretty annoying, since
10763 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
10764 # source directory, any form will work fine, but in subdirectories a
10765 # relative path needs to be adjusted first.
10766 #
10767 # $ac_aux_dir/missing
10768 #    fails when called from a subdirectory if $ac_aux_dir is relative
10769 # $top_srcdir/$ac_aux_dir/missing
10770 #    fails if $ac_aux_dir is absolute,
10771 #    fails when called from a subdirectory in a VPATH build with
10772 #          a relative $ac_aux_dir
10773 #
10774 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10775 # are both prefixed by $srcdir.  In an in-source build this is usually
10776 # harmless because $srcdir is `.', but things will broke when you
10777 # start a VPATH build or use an absolute $srcdir.
10778 #
10779 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10780 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
10781 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10782 # and then we would define $MISSING as
10783 #   MISSING="\${SHELL} $am_aux_dir/missing"
10784 # This will work as long as MISSING is not called from configure, because
10785 # unfortunately $(top_srcdir) has no meaning in configure.
10786 # However there are other variables, like CC, which are often used in
10787 # configure, and could therefore not use this "fixed" $ac_aux_dir.
10788 #
10789 # Another solution, used here, is to always expand $ac_aux_dir to an
10790 # absolute PATH.  The drawback is that using absolute paths prevent a
10791 # configured tree to be moved without reconfiguration.
10792
10793 AC_DEFUN([AM_AUX_DIR_EXPAND],
10794 [dnl Rely on autoconf to set up CDPATH properly.
10795 AC_PREREQ([2.50])dnl
10796 # expand $ac_aux_dir to an absolute path
10797 am_aux_dir=`cd $ac_aux_dir && pwd`
10798 ])
10799
10800
10801 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
10802 # Free Software Foundation, Inc.
10803 #
10804 # This file is free software; the Free Software Foundation
10805 # gives unlimited permission to copy and/or distribute it,
10806 # with or without modifications, as long as this notice is preserved.
10807
10808 # serial 4
10809
10810 # This was merged into AC_PROG_CC in Autoconf.
10811
10812 AU_DEFUN([AM_PROG_CC_STDC],
10813 [AC_PROG_CC
10814 AC_DIAGNOSE([obsolete], [$0:
10815         your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
10816         `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
10817         you adjust the code.  You can also remove the above call to
10818         AC_PROG_CC if you already called it elsewhere.])
10819 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
10820 ])
10821 AU_DEFUN([fp_PROG_CC_STDC])
10822
10823 # AM_CONDITIONAL                                            -*- Autoconf -*-
10824
10825 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
10826 # Free Software Foundation, Inc.
10827 #
10828 # This file is free software; the Free Software Foundation
10829 # gives unlimited permission to copy and/or distribute it,
10830 # with or without modifications, as long as this notice is preserved.
10831
10832 # serial 9
10833
10834 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
10835 # -------------------------------------
10836 # Define a conditional.
10837 AC_DEFUN([AM_CONDITIONAL],
10838 [AC_PREREQ(2.52)dnl
10839  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
10840         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10841 AC_SUBST([$1_TRUE])dnl
10842 AC_SUBST([$1_FALSE])dnl
10843 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
10844 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
10845 m4_define([_AM_COND_VALUE_$1], [$2])dnl
10846 if $2; then
10847   $1_TRUE=
10848   $1_FALSE='#'
10849 else
10850   $1_TRUE='#'
10851   $1_FALSE=
10852 fi
10853 AC_CONFIG_COMMANDS_PRE(
10854 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10855   AC_MSG_ERROR([[conditional "$1" was never defined.
10856 Usually this means the macro was only invoked conditionally.]])
10857 fi])])
10858
10859 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
10860 # 2010, 2011 Free Software Foundation, Inc.
10861 #
10862 # This file is free software; the Free Software Foundation
10863 # gives unlimited permission to copy and/or distribute it,
10864 # with or without modifications, as long as this notice is preserved.
10865
10866 # serial 12
10867
10868 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
10869 # written in clear, in which case automake, when reading aclocal.m4,
10870 # will think it sees a *use*, and therefore will trigger all it's
10871 # C support machinery.  Also note that it means that autoscan, seeing
10872 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10873
10874
10875 # _AM_DEPENDENCIES(NAME)
10876 # ----------------------
10877 # See how the compiler implements dependency checking.
10878 # NAME is "CC", "CXX", "GCJ", or "OBJC".
10879 # We try a few techniques and use that to set a single cache variable.
10880 #
10881 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10882 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10883 # dependency, and given that the user is not expected to run this macro,
10884 # just rely on AC_PROG_CC.
10885 AC_DEFUN([_AM_DEPENDENCIES],
10886 [AC_REQUIRE([AM_SET_DEPDIR])dnl
10887 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10888 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10889 AC_REQUIRE([AM_DEP_TRACK])dnl
10890
10891 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
10892        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
10893        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10894        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
10895        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
10896                    [depcc="$$1"   am_compiler_list=])
10897
10898 AC_CACHE_CHECK([dependency style of $depcc],
10899                [am_cv_$1_dependencies_compiler_type],
10900 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10901   # We make a subdir and do the tests there.  Otherwise we can end up
10902   # making bogus files that we don't know about and never remove.  For
10903   # instance it was reported that on HP-UX the gcc test will end up
10904   # making a dummy file named `D' -- because `-MD' means `put the output
10905   # in D'.
10906   rm -rf conftest.dir
10907   mkdir conftest.dir
10908   # Copy depcomp to subdir because otherwise we won't find it if we're
10909   # using a relative directory.
10910   cp "$am_depcomp" conftest.dir
10911   cd conftest.dir
10912   # We will build objects and dependencies in a subdirectory because
10913   # it helps to detect inapplicable dependency modes.  For instance
10914   # both Tru64's cc and ICC support -MD to output dependencies as a
10915   # side effect of compilation, but ICC will put the dependencies in
10916   # the current directory while Tru64 will put them in the object
10917   # directory.
10918   mkdir sub
10919
10920   am_cv_$1_dependencies_compiler_type=none
10921   if test "$am_compiler_list" = ""; then
10922      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10923   fi
10924   am__universal=false
10925   m4_case([$1], [CC],
10926     [case " $depcc " in #(
10927      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10928      esac],
10929     [CXX],
10930     [case " $depcc " in #(
10931      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10932      esac])
10933
10934   for depmode in $am_compiler_list; do
10935     # Setup a source with many dependencies, because some compilers
10936     # like to wrap large dependency lists on column 80 (with \), and
10937     # we should not choose a depcomp mode which is confused by this.
10938     #
10939     # We need to recreate these files for each test, as the compiler may
10940     # overwrite some of them when testing with obscure command lines.
10941     # This happens at least with the AIX C compiler.
10942     : > sub/conftest.c
10943     for i in 1 2 3 4 5 6; do
10944       echo '#include "conftst'$i'.h"' >> sub/conftest.c
10945       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
10946       # Solaris 8's {/usr,}/bin/sh.
10947       touch sub/conftst$i.h
10948     done
10949     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10950
10951     # We check with `-c' and `-o' for the sake of the "dashmstdout"
10952     # mode.  It turns out that the SunPro C++ compiler does not properly
10953     # handle `-M -o', and we need to detect this.  Also, some Intel
10954     # versions had trouble with output in subdirs
10955     am__obj=sub/conftest.${OBJEXT-o}
10956     am__minus_obj="-o $am__obj"
10957     case $depmode in
10958     gcc)
10959       # This depmode causes a compiler race in universal mode.
10960       test "$am__universal" = false || continue
10961       ;;
10962     nosideeffect)
10963       # after this tag, mechanisms are not by side-effect, so they'll
10964       # only be used when explicitly requested
10965       if test "x$enable_dependency_tracking" = xyes; then
10966         continue
10967       else
10968         break
10969       fi
10970       ;;
10971     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10972       # This compiler won't grok `-c -o', but also, the minuso test has
10973       # not run yet.  These depmodes are late enough in the game, and
10974       # so weak that their functioning should not be impacted.
10975       am__obj=conftest.${OBJEXT-o}
10976       am__minus_obj=
10977       ;;
10978     none) break ;;
10979     esac
10980     if depmode=$depmode \
10981        source=sub/conftest.c object=$am__obj \
10982        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10983        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10984          >/dev/null 2>conftest.err &&
10985        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10986        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10987        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10988        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10989       # icc doesn't choke on unknown options, it will just issue warnings
10990       # or remarks (even with -Werror).  So we grep stderr for any message
10991       # that says an option was ignored or not supported.
10992       # When given -MP, icc 7.0 and 7.1 complain thusly:
10993       #   icc: Command line warning: ignoring option '-M'; no argument required
10994       # The diagnosis changed in icc 8.0:
10995       #   icc: Command line remark: option '-MP' not supported
10996       if (grep 'ignoring option' conftest.err ||
10997           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10998         am_cv_$1_dependencies_compiler_type=$depmode
10999         break
11000       fi
11001     fi
11002   done
11003
11004   cd ..
11005   rm -rf conftest.dir
11006 else
11007   am_cv_$1_dependencies_compiler_type=none
11008 fi
11009 ])
11010 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
11011 AM_CONDITIONAL([am__fastdep$1], [
11012   test "x$enable_dependency_tracking" != xno \
11013   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
11014 ])
11015
11016
11017 # AM_SET_DEPDIR
11018 # -------------
11019 # Choose a directory name for dependency files.
11020 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
11021 AC_DEFUN([AM_SET_DEPDIR],
11022 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
11023 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
11024 ])
11025
11026
11027 # AM_DEP_TRACK
11028 # ------------
11029 AC_DEFUN([AM_DEP_TRACK],
11030 [AC_ARG_ENABLE(dependency-tracking,
11031 [  --disable-dependency-tracking  speeds up one-time build
11032   --enable-dependency-tracking   do not reject slow dependency extractors])
11033 if test "x$enable_dependency_tracking" != xno; then
11034   am_depcomp="$ac_aux_dir/depcomp"
11035   AMDEPBACKSLASH='\'
11036   am__nodep='_no'
11037 fi
11038 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
11039 AC_SUBST([AMDEPBACKSLASH])dnl
11040 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
11041 AC_SUBST([am__nodep])dnl
11042 _AM_SUBST_NOTMAKE([am__nodep])dnl
11043 ])
11044
11045 # Generate code to set up dependency tracking.              -*- Autoconf -*-
11046
11047 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
11048 # Free Software Foundation, Inc.
11049 #
11050 # This file is free software; the Free Software Foundation
11051 # gives unlimited permission to copy and/or distribute it,
11052 # with or without modifications, as long as this notice is preserved.
11053
11054 #serial 5
11055
11056 # _AM_OUTPUT_DEPENDENCY_COMMANDS
11057 # ------------------------------
11058 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
11059 [{
11060   # Autoconf 2.62 quotes --file arguments for eval, but not when files
11061   # are listed without --file.  Let's play safe and only enable the eval
11062   # if we detect the quoting.
11063   case $CONFIG_FILES in
11064   *\'*) eval set x "$CONFIG_FILES" ;;
11065   *)   set x $CONFIG_FILES ;;
11066   esac
11067   shift
11068   for mf
11069   do
11070     # Strip MF so we end up with the name of the file.
11071     mf=`echo "$mf" | sed -e 's/:.*$//'`
11072     # Check whether this is an Automake generated Makefile or not.
11073     # We used to match only the files named `Makefile.in', but
11074     # some people rename them; so instead we look at the file content.
11075     # Grep'ing the first line is not enough: some people post-process
11076     # each Makefile.in and add a new line on top of each file to say so.
11077     # Grep'ing the whole file is not good either: AIX grep has a line
11078     # limit of 2048, but all sed's we know have understand at least 4000.
11079     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
11080       dirpart=`AS_DIRNAME("$mf")`
11081     else
11082       continue
11083     fi
11084     # Extract the definition of DEPDIR, am__include, and am__quote
11085     # from the Makefile without running `make'.
11086     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
11087     test -z "$DEPDIR" && continue
11088     am__include=`sed -n 's/^am__include = //p' < "$mf"`
11089     test -z "am__include" && continue
11090     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
11091     # When using ansi2knr, U may be empty or an underscore; expand it
11092     U=`sed -n 's/^U = //p' < "$mf"`
11093     # Find all dependency output files, they are included files with
11094     # $(DEPDIR) in their names.  We invoke sed twice because it is the
11095     # simplest approach to changing $(DEPDIR) to its actual value in the
11096     # expansion.
11097     for file in `sed -n "
11098       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
11099          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
11100       # Make sure the directory exists.
11101       test -f "$dirpart/$file" && continue
11102       fdir=`AS_DIRNAME(["$file"])`
11103       AS_MKDIR_P([$dirpart/$fdir])
11104       # echo "creating $dirpart/$file"
11105       echo '# dummy' > "$dirpart/$file"
11106     done
11107   done
11108 }
11109 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
11110
11111
11112 # AM_OUTPUT_DEPENDENCY_COMMANDS
11113 # -----------------------------
11114 # This macro should only be invoked once -- use via AC_REQUIRE.
11115 #
11116 # This code is only required when automatic dependency tracking
11117 # is enabled.  FIXME.  This creates each `.P' file that we will
11118 # need in order to bootstrap the dependency handling code.
11119 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
11120 [AC_CONFIG_COMMANDS([depfiles],
11121      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
11122      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
11123 ])
11124
11125 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
11126 # Free Software Foundation, Inc.
11127 #
11128 # This file is free software; the Free Software Foundation
11129 # gives unlimited permission to copy and/or distribute it,
11130 # with or without modifications, as long as this notice is preserved.
11131
11132 # serial 8
11133
11134 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
11135 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
11136
11137 # Do all the work for Automake.                             -*- Autoconf -*-
11138
11139 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
11140 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
11141 #
11142 # This file is free software; the Free Software Foundation
11143 # gives unlimited permission to copy and/or distribute it,
11144 # with or without modifications, as long as this notice is preserved.
11145
11146 # serial 16
11147
11148 # This macro actually does too much.  Some checks are only needed if
11149 # your package does certain things.  But this isn't really a big deal.
11150
11151 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
11152 # AM_INIT_AUTOMAKE([OPTIONS])
11153 # -----------------------------------------------
11154 # The call with PACKAGE and VERSION arguments is the old style
11155 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
11156 # and VERSION should now be passed to AC_INIT and removed from
11157 # the call to AM_INIT_AUTOMAKE.
11158 # We support both call styles for the transition.  After
11159 # the next Automake release, Autoconf can make the AC_INIT
11160 # arguments mandatory, and then we can depend on a new Autoconf
11161 # release and drop the old call support.
11162 AC_DEFUN([AM_INIT_AUTOMAKE],
11163 [AC_PREREQ([2.62])dnl
11164 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
11165 dnl the ones we care about.
11166 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
11167 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
11168 AC_REQUIRE([AC_PROG_INSTALL])dnl
11169 if test "`cd $srcdir && pwd`" != "`pwd`"; then
11170   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
11171   # is not polluted with repeated "-I."
11172   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
11173   # test to see if srcdir already configured
11174   if test -f $srcdir/config.status; then
11175     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
11176   fi
11177 fi
11178
11179 # test whether we have cygpath
11180 if test -z "$CYGPATH_W"; then
11181   if (cygpath --version) >/dev/null 2>/dev/null; then
11182     CYGPATH_W='cygpath -w'
11183   else
11184     CYGPATH_W=echo
11185   fi
11186 fi
11187 AC_SUBST([CYGPATH_W])
11188
11189 # Define the identity of the package.
11190 dnl Distinguish between old-style and new-style calls.
11191 m4_ifval([$2],
11192 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
11193  AC_SUBST([PACKAGE], [$1])dnl
11194  AC_SUBST([VERSION], [$2])],
11195 [_AM_SET_OPTIONS([$1])dnl
11196 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
11197 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
11198   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
11199  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
11200  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
11201
11202 _AM_IF_OPTION([no-define],,
11203 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
11204  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
11205
11206 # Some tools Automake needs.
11207 AC_REQUIRE([AM_SANITY_CHECK])dnl
11208 AC_REQUIRE([AC_ARG_PROGRAM])dnl
11209 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
11210 AM_MISSING_PROG(AUTOCONF, autoconf)
11211 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
11212 AM_MISSING_PROG(AUTOHEADER, autoheader)
11213 AM_MISSING_PROG(MAKEINFO, makeinfo)
11214 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11215 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
11216 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
11217 # We need awk for the "check" target.  The system "awk" is bad on
11218 # some platforms.
11219 AC_REQUIRE([AC_PROG_AWK])dnl
11220 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
11221 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
11222 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
11223               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
11224                              [_AM_PROG_TAR([v7])])])
11225 _AM_IF_OPTION([no-dependencies],,
11226 [AC_PROVIDE_IFELSE([AC_PROG_CC],
11227                   [_AM_DEPENDENCIES(CC)],
11228                   [define([AC_PROG_CC],
11229                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
11230 AC_PROVIDE_IFELSE([AC_PROG_CXX],
11231                   [_AM_DEPENDENCIES(CXX)],
11232                   [define([AC_PROG_CXX],
11233                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
11234 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
11235                   [_AM_DEPENDENCIES(OBJC)],
11236                   [define([AC_PROG_OBJC],
11237                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
11238 ])
11239 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
11240 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
11241 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
11242 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
11243 AC_CONFIG_COMMANDS_PRE(dnl
11244 [m4_provide_if([_AM_COMPILER_EXEEXT],
11245   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
11246 ])
11247
11248 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
11249 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
11250 dnl mangled by Autoconf and run in a shell conditional statement.
11251 m4_define([_AC_COMPILER_EXEEXT],
11252 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
11253
11254
11255 # When config.status generates a header, we must update the stamp-h file.
11256 # This file resides in the same directory as the config header
11257 # that is generated.  The stamp files are numbered to have different names.
11258
11259 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
11260 # loop where config.status creates the headers, so we can generate
11261 # our stamp files there.
11262 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
11263 [# Compute $1's index in $config_headers.
11264 _am_arg=$1
11265 _am_stamp_count=1
11266 for _am_header in $config_headers :; do
11267   case $_am_header in
11268     $_am_arg | $_am_arg:* )
11269       break ;;
11270     * )
11271       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
11272   esac
11273 done
11274 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
11275
11276 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
11277 # Inc.
11278 #
11279 # This file is free software; the Free Software Foundation
11280 # gives unlimited permission to copy and/or distribute it,
11281 # with or without modifications, as long as this notice is preserved.
11282
11283 # serial 1
11284
11285 # AM_PROG_INSTALL_SH
11286 # ------------------
11287 # Define $install_sh.
11288 AC_DEFUN([AM_PROG_INSTALL_SH],
11289 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11290 if test x"${install_sh}" != xset; then
11291   case $am_aux_dir in
11292   *\ * | *\     *)
11293     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
11294   *)
11295     install_sh="\${SHELL} $am_aux_dir/install-sh"
11296   esac
11297 fi
11298 AC_SUBST(install_sh)])
11299
11300 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
11301 #
11302 # This file is free software; the Free Software Foundation
11303 # gives unlimited permission to copy and/or distribute it,
11304 # with or without modifications, as long as this notice is preserved.
11305
11306 # serial 2
11307
11308 # Check whether the underlying file-system supports filenames
11309 # with a leading dot.  For instance MS-DOS doesn't.
11310 AC_DEFUN([AM_SET_LEADING_DOT],
11311 [rm -rf .tst 2>/dev/null
11312 mkdir .tst 2>/dev/null
11313 if test -d .tst; then
11314   am__leading_dot=.
11315 else
11316   am__leading_dot=_
11317 fi
11318 rmdir .tst 2>/dev/null
11319 AC_SUBST([am__leading_dot])])
11320
11321 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
11322 # From Jim Meyering
11323
11324 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
11325 # 2011 Free Software Foundation, Inc.
11326 #
11327 # This file is free software; the Free Software Foundation
11328 # gives unlimited permission to copy and/or distribute it,
11329 # with or without modifications, as long as this notice is preserved.
11330
11331 # serial 5
11332
11333 # AM_MAINTAINER_MODE([DEFAULT-MODE])
11334 # ----------------------------------
11335 # Control maintainer-specific portions of Makefiles.
11336 # Default is to disable them, unless `enable' is passed literally.
11337 # For symmetry, `disable' may be passed as well.  Anyway, the user
11338 # can override the default with the --enable/--disable switch.
11339 AC_DEFUN([AM_MAINTAINER_MODE],
11340 [m4_case(m4_default([$1], [disable]),
11341        [enable], [m4_define([am_maintainer_other], [disable])],
11342        [disable], [m4_define([am_maintainer_other], [enable])],
11343        [m4_define([am_maintainer_other], [enable])
11344         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
11345 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
11346   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
11347   AC_ARG_ENABLE([maintainer-mode],
11348 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
11349                           (and sometimes confusing) to the casual installer],
11350       [USE_MAINTAINER_MODE=$enableval],
11351       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
11352   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
11353   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
11354   MAINT=$MAINTAINER_MODE_TRUE
11355   AC_SUBST([MAINT])dnl
11356 ]
11357 )
11358
11359 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
11360
11361 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
11362
11363 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
11364 #
11365 # This file is free software; the Free Software Foundation
11366 # gives unlimited permission to copy and/or distribute it,
11367 # with or without modifications, as long as this notice is preserved.
11368
11369 # serial 4
11370
11371 # AM_MAKE_INCLUDE()
11372 # -----------------
11373 # Check to see how make treats includes.
11374 AC_DEFUN([AM_MAKE_INCLUDE],
11375 [am_make=${MAKE-make}
11376 cat > confinc << 'END'
11377 am__doit:
11378         @echo this is the am__doit target
11379 .PHONY: am__doit
11380 END
11381 # If we don't find an include directive, just comment out the code.
11382 AC_MSG_CHECKING([for style of include used by $am_make])
11383 am__include="#"
11384 am__quote=
11385 _am_result=none
11386 # First try GNU make style include.
11387 echo "include confinc" > confmf
11388 # Ignore all kinds of additional output from `make'.
11389 case `$am_make -s -f confmf 2> /dev/null` in #(
11390 *the\ am__doit\ target*)
11391   am__include=include
11392   am__quote=
11393   _am_result=GNU
11394   ;;
11395 esac
11396 # Now try BSD make style include.
11397 if test "$am__include" = "#"; then
11398    echo '.include "confinc"' > confmf
11399    case `$am_make -s -f confmf 2> /dev/null` in #(
11400    *the\ am__doit\ target*)
11401      am__include=.include
11402      am__quote="\""
11403      _am_result=BSD
11404      ;;
11405    esac
11406 fi
11407 AC_SUBST([am__include])
11408 AC_SUBST([am__quote])
11409 AC_MSG_RESULT([$_am_result])
11410 rm -f confinc confmf
11411 ])
11412
11413 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
11414
11415 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
11416 # Free Software Foundation, Inc.
11417 #
11418 # This file is free software; the Free Software Foundation
11419 # gives unlimited permission to copy and/or distribute it,
11420 # with or without modifications, as long as this notice is preserved.
11421
11422 # serial 6
11423
11424 # AM_MISSING_PROG(NAME, PROGRAM)
11425 # ------------------------------
11426 AC_DEFUN([AM_MISSING_PROG],
11427 [AC_REQUIRE([AM_MISSING_HAS_RUN])
11428 $1=${$1-"${am_missing_run}$2"}
11429 AC_SUBST($1)])
11430
11431
11432 # AM_MISSING_HAS_RUN
11433 # ------------------
11434 # Define MISSING if not defined so far and test if it supports --run.
11435 # If it does, set am_missing_run to use it, otherwise, to nothing.
11436 AC_DEFUN([AM_MISSING_HAS_RUN],
11437 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11438 AC_REQUIRE_AUX_FILE([missing])dnl
11439 if test x"${MISSING+set}" != xset; then
11440   case $am_aux_dir in
11441   *\ * | *\     *)
11442     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
11443   *)
11444     MISSING="\${SHELL} $am_aux_dir/missing" ;;
11445   esac
11446 fi
11447 # Use eval to expand $SHELL
11448 if eval "$MISSING --run true"; then
11449   am_missing_run="$MISSING --run "
11450 else
11451   am_missing_run=
11452   AC_MSG_WARN([`missing' script is too old or missing])
11453 fi
11454 ])
11455
11456 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
11457 # Inc.
11458 #
11459 # This file is free software; the Free Software Foundation
11460 # gives unlimited permission to copy and/or distribute it,
11461 # with or without modifications, as long as this notice is preserved.
11462
11463 # serial 1
11464
11465 # AM_PROG_MKDIR_P
11466 # ---------------
11467 # Check for `mkdir -p'.
11468 AC_DEFUN([AM_PROG_MKDIR_P],
11469 [AC_PREREQ([2.60])dnl
11470 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
11471 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
11472 dnl while keeping a definition of mkdir_p for backward compatibility.
11473 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
11474 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
11475 dnl Makefile.ins that do not define MKDIR_P, so we do our own
11476 dnl adjustment using top_builddir (which is defined more often than
11477 dnl MKDIR_P).
11478 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
11479 case $mkdir_p in
11480   [[\\/$]]* | ?:[[\\/]]*) ;;
11481   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
11482 esac
11483 ])
11484
11485 # Helper functions for option handling.                     -*- Autoconf -*-
11486
11487 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
11488 # Foundation, Inc.
11489 #
11490 # This file is free software; the Free Software Foundation
11491 # gives unlimited permission to copy and/or distribute it,
11492 # with or without modifications, as long as this notice is preserved.
11493
11494 # serial 5
11495
11496 # _AM_MANGLE_OPTION(NAME)
11497 # -----------------------
11498 AC_DEFUN([_AM_MANGLE_OPTION],
11499 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
11500
11501 # _AM_SET_OPTION(NAME)
11502 # --------------------
11503 # Set option NAME.  Presently that only means defining a flag for this option.
11504 AC_DEFUN([_AM_SET_OPTION],
11505 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
11506
11507 # _AM_SET_OPTIONS(OPTIONS)
11508 # ------------------------
11509 # OPTIONS is a space-separated list of Automake options.
11510 AC_DEFUN([_AM_SET_OPTIONS],
11511 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
11512
11513 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
11514 # -------------------------------------------
11515 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11516 AC_DEFUN([_AM_IF_OPTION],
11517 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
11518
11519 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
11520 #
11521 # This file is free software; the Free Software Foundation
11522 # gives unlimited permission to copy and/or distribute it,
11523 # with or without modifications, as long as this notice is preserved.
11524
11525 # serial 1
11526
11527 # AM_RUN_LOG(COMMAND)
11528 # -------------------
11529 # Run COMMAND, save the exit status in ac_status, and log it.
11530 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
11531 AC_DEFUN([AM_RUN_LOG],
11532 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
11533    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
11534    ac_status=$?
11535    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
11536    (exit $ac_status); }])
11537
11538 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
11539
11540 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
11541 # Free Software Foundation, Inc.
11542 #
11543 # This file is free software; the Free Software Foundation
11544 # gives unlimited permission to copy and/or distribute it,
11545 # with or without modifications, as long as this notice is preserved.
11546
11547 # serial 5
11548
11549 # AM_SANITY_CHECK
11550 # ---------------
11551 AC_DEFUN([AM_SANITY_CHECK],
11552 [AC_MSG_CHECKING([whether build environment is sane])
11553 # Just in case
11554 sleep 1
11555 echo timestamp > conftest.file
11556 # Reject unsafe characters in $srcdir or the absolute working directory
11557 # name.  Accept space and tab only in the latter.
11558 am_lf='
11559 '
11560 case `pwd` in
11561   *[[\\\"\#\$\&\'\`$am_lf]]*)
11562     AC_MSG_ERROR([unsafe absolute working directory name]);;
11563 esac
11564 case $srcdir in
11565   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
11566     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
11567 esac
11568
11569 # Do `set' in a subshell so we don't clobber the current shell's
11570 # arguments.  Must try -L first in case configure is actually a
11571 # symlink; some systems play weird games with the mod time of symlinks
11572 # (eg FreeBSD returns the mod time of the symlink's containing
11573 # directory).
11574 if (
11575    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
11576    if test "$[*]" = "X"; then
11577       # -L didn't work.
11578       set X `ls -t "$srcdir/configure" conftest.file`
11579    fi
11580    rm -f conftest.file
11581    if test "$[*]" != "X $srcdir/configure conftest.file" \
11582       && test "$[*]" != "X conftest.file $srcdir/configure"; then
11583
11584       # If neither matched, then we have a broken ls.  This can happen
11585       # if, for instance, CONFIG_SHELL is bash and it inherits a
11586       # broken ls alias from the environment.  This has actually
11587       # happened.  Such a system could not be considered "sane".
11588       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
11589 alias in your environment])
11590    fi
11591
11592    test "$[2]" = conftest.file
11593    )
11594 then
11595    # Ok.
11596    :
11597 else
11598    AC_MSG_ERROR([newly created file is older than distributed files!
11599 Check your system clock])
11600 fi
11601 AC_MSG_RESULT(yes)])
11602
11603 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
11604 #
11605 # This file is free software; the Free Software Foundation
11606 # gives unlimited permission to copy and/or distribute it,
11607 # with or without modifications, as long as this notice is preserved.
11608
11609 # serial 1
11610
11611 # AM_PROG_INSTALL_STRIP
11612 # ---------------------
11613 # One issue with vendor `install' (even GNU) is that you can't
11614 # specify the program used to strip binaries.  This is especially
11615 # annoying in cross-compiling environments, where the build's strip
11616 # is unlikely to handle the host's binaries.
11617 # Fortunately install-sh will honor a STRIPPROG variable, so we
11618 # always use install-sh in `make install-strip', and initialize
11619 # STRIPPROG with the value of the STRIP variable (set by the user).
11620 AC_DEFUN([AM_PROG_INSTALL_STRIP],
11621 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11622 # Installed binaries are usually stripped using `strip' when the user
11623 # run `make install-strip'.  However `strip' might not be the right
11624 # tool to use in cross-compilation environments, therefore Automake
11625 # will honor the `STRIP' environment variable to overrule this program.
11626 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
11627 if test "$cross_compiling" != no; then
11628   AC_CHECK_TOOL([STRIP], [strip], :)
11629 fi
11630 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11631 AC_SUBST([INSTALL_STRIP_PROGRAM])])
11632
11633 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
11634 #
11635 # This file is free software; the Free Software Foundation
11636 # gives unlimited permission to copy and/or distribute it,
11637 # with or without modifications, as long as this notice is preserved.
11638
11639 # serial 3
11640
11641 # _AM_SUBST_NOTMAKE(VARIABLE)
11642 # ---------------------------
11643 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11644 # This macro is traced by Automake.
11645 AC_DEFUN([_AM_SUBST_NOTMAKE])
11646
11647 # AM_SUBST_NOTMAKE(VARIABLE)
11648 # --------------------------
11649 # Public sister of _AM_SUBST_NOTMAKE.
11650 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11651
11652 # Check how to create a tarball.                            -*- Autoconf -*-
11653
11654 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
11655 #
11656 # This file is free software; the Free Software Foundation
11657 # gives unlimited permission to copy and/or distribute it,
11658 # with or without modifications, as long as this notice is preserved.
11659
11660 # serial 2
11661
11662 # _AM_PROG_TAR(FORMAT)
11663 # --------------------
11664 # Check how to create a tarball in format FORMAT.
11665 # FORMAT should be one of `v7', `ustar', or `pax'.
11666 #
11667 # Substitute a variable $(am__tar) that is a command
11668 # writing to stdout a FORMAT-tarball containing the directory
11669 # $tardir.
11670 #     tardir=directory && $(am__tar) > result.tar
11671 #
11672 # Substitute a variable $(am__untar) that extract such
11673 # a tarball read from stdin.
11674 #     $(am__untar) < result.tar
11675 AC_DEFUN([_AM_PROG_TAR],
11676 [# Always define AMTAR for backward compatibility.  Yes, it's still used
11677 # in the wild :-(  We should find a proper way to deprecate it ...
11678 AC_SUBST([AMTAR], ['$${TAR-tar}'])
11679 m4_if([$1], [v7],
11680      [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
11681      [m4_case([$1], [ustar],, [pax],,
11682               [m4_fatal([Unknown tar format])])
11683 AC_MSG_CHECKING([how to create a $1 tar archive])
11684 # Loop over all known methods to create a tar archive until one works.
11685 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11686 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11687 # Do not fold the above two line into one, because Tru64 sh and
11688 # Solaris sh will not grok spaces in the rhs of `-'.
11689 for _am_tool in $_am_tools
11690 do
11691   case $_am_tool in
11692   gnutar)
11693     for _am_tar in tar gnutar gtar;
11694     do
11695       AM_RUN_LOG([$_am_tar --version]) && break
11696     done
11697     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11698     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11699     am__untar="$_am_tar -xf -"
11700     ;;
11701   plaintar)
11702     # Must skip GNU tar: if it does not support --format= it doesn't create
11703     # ustar tarball either.
11704     (tar --version) >/dev/null 2>&1 && continue
11705     am__tar='tar chf - "$$tardir"'
11706     am__tar_='tar chf - "$tardir"'
11707     am__untar='tar xf -'
11708     ;;
11709   pax)
11710     am__tar='pax -L -x $1 -w "$$tardir"'
11711     am__tar_='pax -L -x $1 -w "$tardir"'
11712     am__untar='pax -r'
11713     ;;
11714   cpio)
11715     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11716     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11717     am__untar='cpio -i -H $1 -d'
11718     ;;
11719   none)
11720     am__tar=false
11721     am__tar_=false
11722     am__untar=false
11723     ;;
11724   esac
11725
11726   # If the value was cached, stop now.  We just wanted to have am__tar
11727   # and am__untar set.
11728   test -n "${am_cv_prog_tar_$1}" && break
11729
11730   # tar/untar a dummy directory, and stop if the command works
11731   rm -rf conftest.dir
11732   mkdir conftest.dir
11733   echo GrepMe > conftest.dir/file
11734   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11735   rm -rf conftest.dir
11736   if test -s conftest.tar; then
11737     AM_RUN_LOG([$am__untar <conftest.tar])
11738     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11739   fi
11740 done
11741 rm -rf conftest.dir
11742
11743 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11744 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11745 AC_SUBST([am__tar])
11746 AC_SUBST([am__untar])
11747 ]) # _AM_PROG_TAR
11748
11749 m4_include([acinclude.m4])