~mfisch/brasero/update-to-3.8.0

« back to all changes in this revision

Viewing changes to .pc/90_relibtoolize.patch/aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2010-07-04 15:14:24 UTC
  • mfrom: (1.3.7 upstream)
  • mto: (1.4.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 74.
  • Revision ID: james.westby@ubuntu.com-20100704151424-yg69h5sc55xgjp6h
Tags: 2.30.2-1
* New upstream release.
  - Fixes incorrectly reported size by passing correct arguments to
    g_signal_emit(). Closes: #568606
  - Fixes tracker search support. Closes: #465238
* debian/patches/90_relibtoolize.patch
  - Refresh for new upstream release.
* Switch to source formate 3.0 (quilt)
  - Add debian/source/format.
  - Drop Build-Depends on quilt.
  - Remove /usr/share/cdbs/1/rules/patchsys-quilt.mk from debian/rules.
* Bump-Standards-Version to 3.9.0
  - Use architecture wildcard kfreebsd-any for the libcam-dev Build-Depends.
  - Use Breaks instead of Conflicts as recommended by the new policy.

Show diffs side-by-side

added added

removed removed

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