~bcurtiswx/ubuntu/precise/empathy/3.4.2.1-0ubuntu1

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sjoerd Simons
  • Date: 2007-05-20 15:31:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070520153142-r3auwguxdgxhktqb
Tags: upstream-0.4
ImportĀ upstreamĀ versionĀ 0.4

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