~ubuntu-branches/debian/squeeze/gpe-expenses/squeeze

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Neil Williams
  • Date: 2006-12-30 09:15:07 UTC
  • Revision ID: james.westby@ubuntu.com-20061230091507-0h4wsmmh44aulh4j
Tags: upstream-0.0.6
ImportĀ upstreamĀ versionĀ 0.0.6

Show diffs side-by-side

added added

removed removed

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