~ubuntu-branches/ubuntu/karmic/compiz/karmic-proposed

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-12-03 09:14:04 UTC
  • mto: This revision was merged to the branch mainline in revision 161.
  • Revision ID: james.westby@ubuntu.com-20091203091404-r3pjdjjjdt6e1xro
Tags: upstream-0.8.4
ImportĀ upstreamĀ versionĀ 0.8.4

Show diffs side-by-side

added added

removed removed

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