~ubuntu-branches/ubuntu/precise/tumbler/precise

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-11-07 16:34:58 UTC
  • Revision ID: james.westby@ubuntu.com-20101107163458-skwfq34vnuavipne
Tags: upstream-0.1.4
ImportĀ upstreamĀ versionĀ 0.1.4

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
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
24
#
 
25
# This file is free software, distributed under the terms of the GNU
 
26
# General Public License.  As a special exception to the GNU General
 
27
# Public License, this file may be distributed as part of a program
 
28
# that contains a configuration script generated by Autoconf, under
 
29
# the same distribution terms as the rest of that program.
 
30
#
 
31
# This file can be copied and used freely without restrictions.  It can
 
32
# be used in projects which are not available under the GNU Public License
 
33
# but which still want to provide support for the GNU gettext functionality.
 
34
#
 
35
# Macro to add for using GNU gettext.
 
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
37
#
 
38
# Modified to never use included libintl. 
 
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
40
#
 
41
# Major rework to remove unused code
 
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
43
#
 
44
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
46
#
 
47
# Modified to require ngettext
 
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
49
#
 
50
# We need this here as well, since someone might use autoconf-2.5x
 
51
# to configure GLib then an older version to configure a package
 
52
# using AM_GLIB_GNU_GETTEXT
 
53
AC_PREREQ(2.53)
 
54
 
 
55
dnl
 
56
dnl We go to great lengths to make sure that aclocal won't 
 
57
dnl try to pull in the installed version of these macros
 
58
dnl when running aclocal in the glib directory.
 
59
dnl
 
60
m4_copy([AC_DEFUN],[glib_DEFUN])
 
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
62
dnl
 
63
dnl At the end, if we're not within glib, we'll define the public
 
64
dnl definitions in terms of our private definitions.
 
65
dnl
 
66
 
 
67
# GLIB_LC_MESSAGES
 
68
#--------------------
 
69
glib_DEFUN([GLIB_LC_MESSAGES],
 
70
  [AC_CHECK_HEADERS([locale.h])
 
71
    if test $ac_cv_header_locale_h = yes; then
 
72
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
73
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
74
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
75
    if test $am_cv_val_LC_MESSAGES = yes; then
 
76
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
77
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
78
    fi
 
79
  fi])
 
80
 
 
81
# GLIB_PATH_PROG_WITH_TEST
 
82
#----------------------------
 
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
84
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
86
[# Extract the first word of "$2", so it can be a program name with args.
 
87
set dummy $2; ac_word=[$]2
 
88
AC_MSG_CHECKING([for $ac_word])
 
89
AC_CACHE_VAL(ac_cv_path_$1,
 
90
[case "[$]$1" in
 
91
  /*)
 
92
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
93
  ;;
 
94
  *)
 
95
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
96
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
97
    test -z "$ac_dir" && ac_dir=.
 
98
    if test -f $ac_dir/$ac_word; then
 
99
      if [$3]; then
 
100
        ac_cv_path_$1="$ac_dir/$ac_word"
 
101
        break
 
102
      fi
 
103
    fi
 
104
  done
 
105
  IFS="$ac_save_ifs"
 
106
dnl If no 4th arg is given, leave the cache variable unset,
 
107
dnl so AC_PATH_PROGS will keep looking.
 
108
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
109
])dnl
 
110
  ;;
 
111
esac])dnl
 
112
$1="$ac_cv_path_$1"
 
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
114
  AC_MSG_RESULT([$]$1)
 
115
else
 
116
  AC_MSG_RESULT(no)
 
117
fi
 
118
AC_SUBST($1)dnl
 
119
])
 
120
 
 
121
# GLIB_WITH_NLS
 
122
#-----------------
 
123
glib_DEFUN([GLIB_WITH_NLS],
 
124
  dnl NLS is obligatory
 
125
  [USE_NLS=yes
 
126
    AC_SUBST(USE_NLS)
 
127
 
 
128
    gt_cv_have_gettext=no
 
129
 
 
130
    CATOBJEXT=NONE
 
131
    XGETTEXT=:
 
132
    INTLLIBS=
 
133
 
 
134
    AC_CHECK_HEADER(libintl.h,
 
135
     [gt_cv_func_dgettext_libintl="no"
 
136
      libintl_extra_libs=""
 
137
 
 
138
      #
 
139
      # First check in libc
 
140
      #
 
141
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
142
        [AC_TRY_LINK([
 
143
#include <libintl.h>
 
144
],
 
145
         [return !ngettext ("","", 1)],
 
146
          gt_cv_func_ngettext_libc=yes,
 
147
          gt_cv_func_ngettext_libc=no)
 
148
        ])
 
149
  
 
150
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
151
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
152
                [AC_TRY_LINK([
 
153
#include <libintl.h>
 
154
],
 
155
                  [return !dgettext ("","")],
 
156
                  gt_cv_func_dgettext_libc=yes,
 
157
                  gt_cv_func_dgettext_libc=no)
 
158
                ])
 
159
      fi
 
160
  
 
161
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
162
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
163
      fi
 
164
 
 
165
      #
 
166
      # If we don't have everything we want, check in libintl
 
167
      #
 
168
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
169
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
170
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
171
        
 
172
        AC_CHECK_LIB(intl, bindtextdomain,
 
173
            [AC_CHECK_LIB(intl, ngettext,
 
174
                    [AC_CHECK_LIB(intl, dgettext,
 
175
                                  gt_cv_func_dgettext_libintl=yes)])])
 
176
 
 
177
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
178
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
179
          AC_MSG_RESULT([])
 
180
          AC_CHECK_LIB(intl, ngettext,
 
181
                [AC_CHECK_LIB(intl, dcgettext,
 
182
                       [gt_cv_func_dgettext_libintl=yes
 
183
                        libintl_extra_libs=-liconv],
 
184
                        :,-liconv)],
 
185
                :,-liconv)
 
186
        fi
 
187
 
 
188
        #
 
189
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
190
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
191
        # and both have dgettext and ngettext
 
192
        #
 
193
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
194
          glib_save_LIBS="$LIBS"
 
195
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
196
          unset ac_cv_func_bind_textdomain_codeset
 
197
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
198
          LIBS="$glib_save_LIBS"
 
199
 
 
200
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
201
            gt_cv_func_dgettext_libc=no
 
202
          else
 
203
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
204
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
205
              gt_cv_func_dgettext_libintl=no
 
206
            fi
 
207
          fi
 
208
        fi
 
209
      fi
 
210
 
 
211
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
212
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
213
        gt_cv_have_gettext=yes
 
214
      fi
 
215
  
 
216
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
217
        INTLLIBS="-lintl $libintl_extra_libs"
 
218
      fi
 
219
  
 
220
      if test "$gt_cv_have_gettext" = "yes"; then
 
221
        AC_DEFINE(HAVE_GETTEXT,1,
 
222
          [Define if the GNU gettext() function is already present or preinstalled.])
 
223
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
224
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
225
        if test "$MSGFMT" != "no"; then
 
226
          glib_save_LIBS="$LIBS"
 
227
          LIBS="$LIBS $INTLLIBS"
 
228
          AC_CHECK_FUNCS(dcgettext)
 
229
          MSGFMT_OPTS=
 
230
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
231
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
232
msgid ""
 
233
msgstr ""
 
234
"Content-Type: text/plain; charset=UTF-8\n"
 
235
"Project-Id-Version: test 1.0\n"
 
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
237
"Last-Translator: test <foo@bar.xx>\n"
 
238
"Language-Team: C <LL@li.org>\n"
 
239
"MIME-Version: 1.0\n"
 
240
"Content-Transfer-Encoding: 8bit\n"
 
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
242
          AC_SUBST(MSGFMT_OPTS)
 
243
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
244
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
245
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
246
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
247
                         return _nl_msg_cat_cntr],
 
248
            [CATOBJEXT=.gmo 
 
249
             DATADIRNAME=share],
 
250
            [case $host in
 
251
            *-*-solaris*)
 
252
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
253
            dnl GNU format message catalog is always supported,
 
254
            dnl since both are added to the libc all together.
 
255
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
256
            dnl and CATOBJEXT=.gmo in this case.
 
257
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
258
              [CATOBJEXT=.gmo 
 
259
               DATADIRNAME=share],
 
260
              [CATOBJEXT=.mo
 
261
               DATADIRNAME=lib])
 
262
            ;;
 
263
            *)
 
264
            CATOBJEXT=.mo
 
265
            DATADIRNAME=lib
 
266
            ;;
 
267
            esac])
 
268
          LIBS="$glib_save_LIBS"
 
269
          INSTOBJEXT=.mo
 
270
        else
 
271
          gt_cv_have_gettext=no
 
272
        fi
 
273
      fi
 
274
    ])
 
275
 
 
276
    if test "$gt_cv_have_gettext" = "yes" ; then
 
277
      AC_DEFINE(ENABLE_NLS, 1,
 
278
        [always defined to indicate that i18n is enabled])
 
279
    fi
 
280
 
 
281
    dnl Test whether we really found GNU xgettext.
 
282
    if test "$XGETTEXT" != ":"; then
 
283
      dnl If it is not GNU xgettext we define it as : so that the
 
284
      dnl Makefiles still can work.
 
285
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
286
        : ;
 
287
      else
 
288
        AC_MSG_RESULT(
 
289
          [found xgettext program is not GNU xgettext; ignore it])
 
290
        XGETTEXT=":"
 
291
      fi
 
292
    fi
 
293
 
 
294
    # We need to process the po/ directory.
 
295
    POSUB=po
 
296
 
 
297
    AC_OUTPUT_COMMANDS(
 
298
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
299
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
300
      esac])
 
301
 
 
302
    dnl These rules are solely for the distribution goal.  While doing this
 
303
    dnl we only have to keep exactly one list of the available catalogs
 
304
    dnl in configure.in.
 
305
    for lang in $ALL_LINGUAS; do
 
306
      GMOFILES="$GMOFILES $lang.gmo"
 
307
      POFILES="$POFILES $lang.po"
 
308
    done
 
309
 
 
310
    dnl Make all variables we use known to autoconf.
 
311
    AC_SUBST(CATALOGS)
 
312
    AC_SUBST(CATOBJEXT)
 
313
    AC_SUBST(DATADIRNAME)
 
314
    AC_SUBST(GMOFILES)
 
315
    AC_SUBST(INSTOBJEXT)
 
316
    AC_SUBST(INTLLIBS)
 
317
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
318
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
319
    AC_SUBST(POFILES)
 
320
    AC_SUBST(POSUB)
 
321
  ])
 
322
 
 
323
# AM_GLIB_GNU_GETTEXT
 
324
# -------------------
 
325
# Do checks necessary for use of gettext. If a suitable implementation 
 
326
# of gettext is found in either in libintl or in the C library,
 
327
# it will set INTLLIBS to the libraries needed for use of gettext
 
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
330
# on various variables needed by the Makefile.in.in installed by 
 
331
# glib-gettextize.
 
332
dnl
 
333
glib_DEFUN([GLIB_GNU_GETTEXT],
 
334
  [AC_REQUIRE([AC_PROG_CC])dnl
 
335
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
336
   
 
337
   GLIB_LC_MESSAGES
 
338
   GLIB_WITH_NLS
 
339
 
 
340
   if test "$gt_cv_have_gettext" = "yes"; then
 
341
     if test "x$ALL_LINGUAS" = "x"; then
 
342
       LINGUAS=
 
343
     else
 
344
       AC_MSG_CHECKING(for catalogs to be installed)
 
345
       NEW_LINGUAS=
 
346
       for presentlang in $ALL_LINGUAS; do
 
347
         useit=no
 
348
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
349
           desiredlanguages="$LINGUAS"
 
350
         else
 
351
           desiredlanguages="$ALL_LINGUAS"
 
352
         fi
 
353
         for desiredlang in $desiredlanguages; do
 
354
           # Use the presentlang catalog if desiredlang is
 
355
           #   a. equal to presentlang, or
 
356
           #   b. a variant of presentlang (because in this case,
 
357
           #      presentlang can be used as a fallback for messages
 
358
           #      which are not translated in the desiredlang catalog).
 
359
           case "$desiredlang" in
 
360
             "$presentlang"*) useit=yes;;
 
361
           esac
 
362
         done
 
363
         if test $useit = yes; then
 
364
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
365
         fi
 
366
       done
 
367
       LINGUAS=$NEW_LINGUAS
 
368
       AC_MSG_RESULT($LINGUAS)
 
369
     fi
 
370
 
 
371
     dnl Construct list of names of catalog files to be constructed.
 
372
     if test -n "$LINGUAS"; then
 
373
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
374
     fi
 
375
   fi
 
376
 
 
377
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
378
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
379
   dnl Try to locate is.
 
380
   MKINSTALLDIRS=
 
381
   if test -n "$ac_aux_dir"; then
 
382
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
383
   fi
 
384
   if test -z "$MKINSTALLDIRS"; then
 
385
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
386
   fi
 
387
   AC_SUBST(MKINSTALLDIRS)
 
388
 
 
389
   dnl Generate list of files to be processed by xgettext which will
 
390
   dnl be included in po/Makefile.
 
391
   test -d po || mkdir po
 
392
   if test "x$srcdir" != "x."; then
 
393
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
394
       posrcprefix="$srcdir/"
 
395
     else
 
396
       posrcprefix="../$srcdir/"
 
397
     fi
 
398
   else
 
399
     posrcprefix="../"
 
400
   fi
 
401
   rm -f po/POTFILES
 
402
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
403
        < $srcdir/po/POTFILES.in > po/POTFILES
 
404
  ])
 
405
 
 
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
407
# -------------------------------
 
408
# Define VARIABLE to the location where catalog files will
 
409
# be installed by po/Makefile.
 
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
412
glib_save_prefix="$prefix"
 
413
glib_save_exec_prefix="$exec_prefix"
 
414
glib_save_datarootdir="$datarootdir"
 
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
417
datarootdir=`eval echo "${datarootdir}"`
 
418
if test "x$CATOBJEXT" = "x.mo" ; then
 
419
  localedir=`eval echo "${libdir}/locale"`
 
420
else
 
421
  localedir=`eval echo "${datadir}/locale"`
 
422
fi
 
423
prefix="$glib_save_prefix"
 
424
exec_prefix="$glib_save_exec_prefix"
 
425
datarootdir="$glib_save_datarootdir"
 
426
AC_DEFINE_UNQUOTED($1, "$localedir",
 
427
  [Define the location where the catalogs will be installed])
 
428
])
 
429
 
 
430
dnl
 
431
dnl Now the definitions that aclocal will find
 
432
dnl
 
433
ifdef(glib_configure_in,[],[
 
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
436
])dnl
 
437
 
 
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
439
 
440
# Create a temporary file with TEST-FILE as its contents and pass the
 
441
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
442
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
443
AC_DEFUN([GLIB_RUN_PROG],
 
444
[cat >conftest.foo <<_ACEOF
 
445
$2
 
446
_ACEOF
 
447
if AC_RUN_LOG([$1 conftest.foo]); then
 
448
  m4_ifval([$3], [$3], [:])
 
449
m4_ifvaln([$4], [else $4])dnl
 
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
452
fi])
 
453
 
 
454
 
 
455
# nls.m4 serial 5 (gettext-0.18)
 
456
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
 
457
dnl Inc.
 
458
dnl This file is free software; the Free Software Foundation
 
459
dnl gives unlimited permission to copy and/or distribute it,
 
460
dnl with or without modifications, as long as this notice is preserved.
 
461
dnl
 
462
dnl This file can can be used in projects which are not available under
 
463
dnl the GNU General Public License or the GNU Library General Public
 
464
dnl License but which still want to provide support for the GNU gettext
 
465
dnl functionality.
 
466
dnl Please note that the actual code of the GNU gettext library is covered
 
467
dnl by the GNU Library General Public License, and the rest of the GNU
 
468
dnl gettext package package is covered by the GNU General Public License.
 
469
dnl They are *not* in the public domain.
 
470
 
 
471
dnl Authors:
 
472
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
473
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
474
 
 
475
AC_PREREQ([2.50])
 
476
 
 
477
AC_DEFUN([AM_NLS],
 
478
[
 
479
  AC_MSG_CHECKING([whether NLS is requested])
 
480
  dnl Default is enabled NLS
 
481
  AC_ARG_ENABLE([nls],
 
482
    [  --disable-nls           do not use Native Language Support],
 
483
    USE_NLS=$enableval, USE_NLS=yes)
 
484
  AC_MSG_RESULT([$USE_NLS])
 
485
  AC_SUBST([USE_NLS])
 
486
])
 
487
 
 
488
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
489
 
490
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
 
491
#
 
492
# This program is free software; you can redistribute it and/or modify
 
493
# it under the terms of the GNU General Public License as published by
 
494
# the Free Software Foundation; either version 2 of the License, or
 
495
# (at your option) any later version.
 
496
#
 
497
# This program is distributed in the hope that it will be useful, but
 
498
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
499
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
500
# General Public License for more details.
 
501
#
 
502
# You should have received a copy of the GNU General Public License
 
503
# along with this program; if not, write to the Free Software
 
504
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
505
#
 
506
# As a special exception to the GNU General Public License, if you
 
507
# distribute this file as part of a program that contains a
 
508
# configuration script generated by Autoconf, you may include it under
 
509
# the same distribution terms that you use for the rest of that program.
 
510
 
 
511
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
512
# ----------------------------------
 
513
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
514
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
515
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
516
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
517
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
518
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
519
fi
 
520
if test -n "$PKG_CONFIG"; then
 
521
        _pkg_min_version=m4_default([$1], [0.9.0])
 
522
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
523
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
524
                AC_MSG_RESULT([yes])
 
525
        else
 
526
                AC_MSG_RESULT([no])
 
527
                PKG_CONFIG=""
 
528
        fi
 
529
                
 
530
fi[]dnl
 
531
])# PKG_PROG_PKG_CONFIG
 
532
 
 
533
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
534
#
 
535
# Check to see whether a particular set of modules exists.  Similar
 
536
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
537
#
 
538
#
 
539
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
540
# this or PKG_CHECK_MODULES is called, or make sure to call
 
541
# PKG_CHECK_EXISTS manually
 
542
# --------------------------------------------------------------
 
543
AC_DEFUN([PKG_CHECK_EXISTS],
 
544
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
545
if test -n "$PKG_CONFIG" && \
 
546
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
547
  m4_ifval([$2], [$2], [:])
 
548
m4_ifvaln([$3], [else
 
549
  $3])dnl
 
550
fi])
 
551
 
 
552
 
 
553
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
554
# ---------------------------------------------
 
555
m4_define([_PKG_CONFIG],
 
556
[if test -n "$$1"; then
 
557
    pkg_cv_[]$1="$$1"
 
558
 elif test -n "$PKG_CONFIG"; then
 
559
    PKG_CHECK_EXISTS([$3],
 
560
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
561
                     [pkg_failed=yes])
 
562
 else
 
563
    pkg_failed=untried
 
564
fi[]dnl
 
565
])# _PKG_CONFIG
 
566
 
 
567
# _PKG_SHORT_ERRORS_SUPPORTED
 
568
# -----------------------------
 
569
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
570
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
571
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
572
        _pkg_short_errors_supported=yes
 
573
else
 
574
        _pkg_short_errors_supported=no
 
575
fi[]dnl
 
576
])# _PKG_SHORT_ERRORS_SUPPORTED
 
577
 
 
578
 
 
579
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
580
# [ACTION-IF-NOT-FOUND])
 
581
#
 
582
#
 
583
# Note that if there is a possibility the first call to
 
584
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
585
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
586
#
 
587
#
 
588
# --------------------------------------------------------------
 
589
AC_DEFUN([PKG_CHECK_MODULES],
 
590
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
591
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
592
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
593
 
 
594
pkg_failed=no
 
595
AC_MSG_CHECKING([for $1])
 
596
 
 
597
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
598
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
599
 
 
600
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
601
and $1[]_LIBS to avoid the need to call pkg-config.
 
602
See the pkg-config man page for more details.])
 
603
 
 
604
if test $pkg_failed = yes; then
 
605
        _PKG_SHORT_ERRORS_SUPPORTED
 
606
        if test $_pkg_short_errors_supported = yes; then
 
607
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
608
        else 
 
609
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
610
        fi
 
611
        # Put the nasty error message in config.log where it belongs
 
612
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
613
 
 
614
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
615
[Package requirements ($2) were not met:
 
616
 
 
617
$$1_PKG_ERRORS
 
618
 
 
619
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
620
installed software in a non-standard prefix.
 
621
 
 
622
_PKG_TEXT
 
623
])],
 
624
                [AC_MSG_RESULT([no])
 
625
                $4])
 
626
elif test $pkg_failed = untried; then
 
627
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
628
[The pkg-config script could not be found or is too old.  Make sure it
 
629
is in your PATH or set the PKG_CONFIG environment variable to the full
 
630
path to pkg-config.
 
631
 
 
632
_PKG_TEXT
 
633
 
 
634
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
 
635
                [$4])
 
636
else
 
637
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
638
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
639
        AC_MSG_RESULT([yes])
 
640
        ifelse([$3], , :, [$3])
 
641
fi[]dnl
 
642
])# PKG_CHECK_MODULES
 
643
 
 
644
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 
645
#
 
646
# This file is free software; the Free Software Foundation
 
647
# gives unlimited permission to copy and/or distribute it,
 
648
# with or without modifications, as long as this notice is preserved.
 
649
 
 
650
# AM_AUTOMAKE_VERSION(VERSION)
 
651
# ----------------------------
 
652
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
653
# generated from the m4 files accompanying Automake X.Y.
 
654
# (This private macro should not be called outside this file.)
 
655
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
656
[am__api_version='1.11'
 
657
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
658
dnl require some minimum version.  Point them to the right macro.
 
659
m4_if([$1], [1.11.1], [],
 
660
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
661
])
 
662
 
 
663
# _AM_AUTOCONF_VERSION(VERSION)
 
664
# -----------------------------
 
665
# aclocal traces this macro to find the Autoconf version.
 
666
# This is a private macro too.  Using m4_define simplifies
 
667
# the logic in aclocal, which can simply ignore this definition.
 
668
m4_define([_AM_AUTOCONF_VERSION], [])
 
669
 
 
670
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
671
# -------------------------------
 
672
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 
673
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 
674
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
675
[AM_AUTOMAKE_VERSION([1.11.1])dnl
 
676
m4_ifndef([AC_AUTOCONF_VERSION],
 
677
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
678
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
679
 
 
680
# Figure out how to run the assembler.                      -*- Autoconf -*-
 
681
 
 
682
# Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
683
#
 
684
# This file is free software; the Free Software Foundation
 
685
# gives unlimited permission to copy and/or distribute it,
 
686
# with or without modifications, as long as this notice is preserved.
 
687
 
 
688
# serial 5
 
689
 
 
690
# AM_PROG_AS
 
691
# ----------
 
692
AC_DEFUN([AM_PROG_AS],
 
693
[# By default we simply use the C compiler to build assembly code.
 
694
AC_REQUIRE([AC_PROG_CC])
 
695
test "${CCAS+set}" = set || CCAS=$CC
 
696
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
 
697
AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
 
698
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
 
699
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
 
700
])
 
701
 
 
702
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
703
 
 
704
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
705
#
 
706
# This file is free software; the Free Software Foundation
 
707
# gives unlimited permission to copy and/or distribute it,
 
708
# with or without modifications, as long as this notice is preserved.
 
709
 
 
710
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
711
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
712
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
713
#
 
714
# Of course, Automake must honor this variable whenever it calls a
 
715
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
716
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
717
# depending on how configure is run.  This is pretty annoying, since
 
718
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
719
# source directory, any form will work fine, but in subdirectories a
 
720
# relative path needs to be adjusted first.
 
721
#
 
722
# $ac_aux_dir/missing
 
723
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
724
# $top_srcdir/$ac_aux_dir/missing
 
725
#    fails if $ac_aux_dir is absolute,
 
726
#    fails when called from a subdirectory in a VPATH build with
 
727
#          a relative $ac_aux_dir
 
728
#
 
729
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
730
# are both prefixed by $srcdir.  In an in-source build this is usually
 
731
# harmless because $srcdir is `.', but things will broke when you
 
732
# start a VPATH build or use an absolute $srcdir.
 
733
#
 
734
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
735
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
736
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
737
# and then we would define $MISSING as
 
738
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
739
# This will work as long as MISSING is not called from configure, because
 
740
# unfortunately $(top_srcdir) has no meaning in configure.
 
741
# However there are other variables, like CC, which are often used in
 
742
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
743
#
 
744
# Another solution, used here, is to always expand $ac_aux_dir to an
 
745
# absolute PATH.  The drawback is that using absolute paths prevent a
 
746
# configured tree to be moved without reconfiguration.
 
747
 
 
748
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
749
[dnl Rely on autoconf to set up CDPATH properly.
 
750
AC_PREREQ([2.50])dnl
 
751
# expand $ac_aux_dir to an absolute path
 
752
am_aux_dir=`cd $ac_aux_dir && pwd`
 
753
])
 
754
 
 
755
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
756
 
 
757
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 
758
# Free Software Foundation, Inc.
 
759
#
 
760
# This file is free software; the Free Software Foundation
 
761
# gives unlimited permission to copy and/or distribute it,
 
762
# with or without modifications, as long as this notice is preserved.
 
763
 
 
764
# serial 9
 
765
 
 
766
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
767
# -------------------------------------
 
768
# Define a conditional.
 
769
AC_DEFUN([AM_CONDITIONAL],
 
770
[AC_PREREQ(2.52)dnl
 
771
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
772
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
773
AC_SUBST([$1_TRUE])dnl
 
774
AC_SUBST([$1_FALSE])dnl
 
775
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
776
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
777
m4_define([_AM_COND_VALUE_$1], [$2])dnl
 
778
if $2; then
 
779
  $1_TRUE=
 
780
  $1_FALSE='#'
 
781
else
 
782
  $1_TRUE='#'
 
783
  $1_FALSE=
 
784
fi
 
785
AC_CONFIG_COMMANDS_PRE(
 
786
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
787
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
788
Usually this means the macro was only invoked conditionally.]])
 
789
fi])])
 
790
 
 
791
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 
792
# Free Software Foundation, Inc.
 
793
#
 
794
# This file is free software; the Free Software Foundation
 
795
# gives unlimited permission to copy and/or distribute it,
 
796
# with or without modifications, as long as this notice is preserved.
 
797
 
 
798
# serial 10
 
799
 
 
800
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
801
# written in clear, in which case automake, when reading aclocal.m4,
 
802
# will think it sees a *use*, and therefore will trigger all it's
 
803
# C support machinery.  Also note that it means that autoscan, seeing
 
804
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
805
 
 
806
 
 
807
# _AM_DEPENDENCIES(NAME)
 
808
# ----------------------
 
809
# See how the compiler implements dependency checking.
 
810
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
811
# We try a few techniques and use that to set a single cache variable.
 
812
#
 
813
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
814
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
815
# dependency, and given that the user is not expected to run this macro,
 
816
# just rely on AC_PROG_CC.
 
817
AC_DEFUN([_AM_DEPENDENCIES],
 
818
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
819
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
820
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
821
AC_REQUIRE([AM_DEP_TRACK])dnl
 
822
 
 
823
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
824
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
825
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
826
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
 
827
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
828
                   [depcc="$$1"   am_compiler_list=])
 
829
 
 
830
AC_CACHE_CHECK([dependency style of $depcc],
 
831
               [am_cv_$1_dependencies_compiler_type],
 
832
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
833
  # We make a subdir and do the tests there.  Otherwise we can end up
 
834
  # making bogus files that we don't know about and never remove.  For
 
835
  # instance it was reported that on HP-UX the gcc test will end up
 
836
  # making a dummy file named `D' -- because `-MD' means `put the output
 
837
  # in D'.
 
838
  mkdir conftest.dir
 
839
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
840
  # using a relative directory.
 
841
  cp "$am_depcomp" conftest.dir
 
842
  cd conftest.dir
 
843
  # We will build objects and dependencies in a subdirectory because
 
844
  # it helps to detect inapplicable dependency modes.  For instance
 
845
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
846
  # side effect of compilation, but ICC will put the dependencies in
 
847
  # the current directory while Tru64 will put them in the object
 
848
  # directory.
 
849
  mkdir sub
 
850
 
 
851
  am_cv_$1_dependencies_compiler_type=none
 
852
  if test "$am_compiler_list" = ""; then
 
853
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
854
  fi
 
855
  am__universal=false
 
856
  m4_case([$1], [CC],
 
857
    [case " $depcc " in #(
 
858
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
859
     esac],
 
860
    [CXX],
 
861
    [case " $depcc " in #(
 
862
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
863
     esac])
 
864
 
 
865
  for depmode in $am_compiler_list; do
 
866
    # Setup a source with many dependencies, because some compilers
 
867
    # like to wrap large dependency lists on column 80 (with \), and
 
868
    # we should not choose a depcomp mode which is confused by this.
 
869
    #
 
870
    # We need to recreate these files for each test, as the compiler may
 
871
    # overwrite some of them when testing with obscure command lines.
 
872
    # This happens at least with the AIX C compiler.
 
873
    : > sub/conftest.c
 
874
    for i in 1 2 3 4 5 6; do
 
875
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
876
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
877
      # Solaris 8's {/usr,}/bin/sh.
 
878
      touch sub/conftst$i.h
 
879
    done
 
880
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
881
 
 
882
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
883
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
884
    # handle `-M -o', and we need to detect this.  Also, some Intel
 
885
    # versions had trouble with output in subdirs
 
886
    am__obj=sub/conftest.${OBJEXT-o}
 
887
    am__minus_obj="-o $am__obj"
 
888
    case $depmode in
 
889
    gcc)
 
890
      # This depmode causes a compiler race in universal mode.
 
891
      test "$am__universal" = false || continue
 
892
      ;;
 
893
    nosideeffect)
 
894
      # after this tag, mechanisms are not by side-effect, so they'll
 
895
      # only be used when explicitly requested
 
896
      if test "x$enable_dependency_tracking" = xyes; then
 
897
        continue
 
898
      else
 
899
        break
 
900
      fi
 
901
      ;;
 
902
    msvisualcpp | msvcmsys)
 
903
      # This compiler won't grok `-c -o', but also, the minuso test has
 
904
      # not run yet.  These depmodes are late enough in the game, and
 
905
      # so weak that their functioning should not be impacted.
 
906
      am__obj=conftest.${OBJEXT-o}
 
907
      am__minus_obj=
 
908
      ;;
 
909
    none) break ;;
 
910
    esac
 
911
    if depmode=$depmode \
 
912
       source=sub/conftest.c object=$am__obj \
 
913
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
914
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 
915
         >/dev/null 2>conftest.err &&
 
916
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 
917
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
918
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 
919
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
920
      # icc doesn't choke on unknown options, it will just issue warnings
 
921
      # or remarks (even with -Werror).  So we grep stderr for any message
 
922
      # that says an option was ignored or not supported.
 
923
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
924
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
925
      # The diagnosis changed in icc 8.0:
 
926
      #   icc: Command line remark: option '-MP' not supported
 
927
      if (grep 'ignoring option' conftest.err ||
 
928
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
929
        am_cv_$1_dependencies_compiler_type=$depmode
 
930
        break
 
931
      fi
 
932
    fi
 
933
  done
 
934
 
 
935
  cd ..
 
936
  rm -rf conftest.dir
 
937
else
 
938
  am_cv_$1_dependencies_compiler_type=none
 
939
fi
 
940
])
 
941
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
942
AM_CONDITIONAL([am__fastdep$1], [
 
943
  test "x$enable_dependency_tracking" != xno \
 
944
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
945
])
 
946
 
 
947
 
 
948
# AM_SET_DEPDIR
 
949
# -------------
 
950
# Choose a directory name for dependency files.
 
951
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
952
AC_DEFUN([AM_SET_DEPDIR],
 
953
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
954
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
955
])
 
956
 
 
957
 
 
958
# AM_DEP_TRACK
 
959
# ------------
 
960
AC_DEFUN([AM_DEP_TRACK],
 
961
[AC_ARG_ENABLE(dependency-tracking,
 
962
[  --disable-dependency-tracking  speeds up one-time build
 
963
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
964
if test "x$enable_dependency_tracking" != xno; then
 
965
  am_depcomp="$ac_aux_dir/depcomp"
 
966
  AMDEPBACKSLASH='\'
 
967
fi
 
968
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
969
AC_SUBST([AMDEPBACKSLASH])dnl
 
970
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
971
])
 
972
 
 
973
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
974
 
 
975
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 
976
# Free Software Foundation, Inc.
 
977
#
 
978
# This file is free software; the Free Software Foundation
 
979
# gives unlimited permission to copy and/or distribute it,
 
980
# with or without modifications, as long as this notice is preserved.
 
981
 
 
982
#serial 5
 
983
 
 
984
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
985
# ------------------------------
 
986
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
987
[{
 
988
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
 
989
  # are listed without --file.  Let's play safe and only enable the eval
 
990
  # if we detect the quoting.
 
991
  case $CONFIG_FILES in
 
992
  *\'*) eval set x "$CONFIG_FILES" ;;
 
993
  *)   set x $CONFIG_FILES ;;
 
994
  esac
 
995
  shift
 
996
  for mf
 
997
  do
 
998
    # Strip MF so we end up with the name of the file.
 
999
    mf=`echo "$mf" | sed -e 's/:.*$//'`
 
1000
    # Check whether this is an Automake generated Makefile or not.
 
1001
    # We used to match only the files named `Makefile.in', but
 
1002
    # some people rename them; so instead we look at the file content.
 
1003
    # Grep'ing the first line is not enough: some people post-process
 
1004
    # each Makefile.in and add a new line on top of each file to say so.
 
1005
    # Grep'ing the whole file is not good either: AIX grep has a line
 
1006
    # limit of 2048, but all sed's we know have understand at least 4000.
 
1007
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 
1008
      dirpart=`AS_DIRNAME("$mf")`
 
1009
    else
 
1010
      continue
 
1011
    fi
 
1012
    # Extract the definition of DEPDIR, am__include, and am__quote
 
1013
    # from the Makefile without running `make'.
 
1014
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
1015
    test -z "$DEPDIR" && continue
 
1016
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
1017
    test -z "am__include" && continue
 
1018
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
1019
    # When using ansi2knr, U may be empty or an underscore; expand it
 
1020
    U=`sed -n 's/^U = //p' < "$mf"`
 
1021
    # Find all dependency output files, they are included files with
 
1022
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
1023
    # simplest approach to changing $(DEPDIR) to its actual value in the
 
1024
    # expansion.
 
1025
    for file in `sed -n "
 
1026
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
1027
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
1028
      # Make sure the directory exists.
 
1029
      test -f "$dirpart/$file" && continue
 
1030
      fdir=`AS_DIRNAME(["$file"])`
 
1031
      AS_MKDIR_P([$dirpart/$fdir])
 
1032
      # echo "creating $dirpart/$file"
 
1033
      echo '# dummy' > "$dirpart/$file"
 
1034
    done
 
1035
  done
 
1036
}
 
1037
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1038
 
 
1039
 
 
1040
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
1041
# -----------------------------
 
1042
# This macro should only be invoked once -- use via AC_REQUIRE.
 
1043
#
 
1044
# This code is only required when automatic dependency tracking
 
1045
# is enabled.  FIXME.  This creates each `.P' file that we will
 
1046
# need in order to bootstrap the dependency handling code.
 
1047
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1048
[AC_CONFIG_COMMANDS([depfiles],
 
1049
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1050
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
1051
])
 
1052
 
 
1053
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
1054
# Free Software Foundation, Inc.
 
1055
#
 
1056
# This file is free software; the Free Software Foundation
 
1057
# gives unlimited permission to copy and/or distribute it,
 
1058
# with or without modifications, as long as this notice is preserved.
 
1059
 
 
1060
# serial 8
 
1061
 
 
1062
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
1063
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
1064
 
 
1065
# Do all the work for Automake.                             -*- Autoconf -*-
 
1066
 
 
1067
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
1068
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 
1069
#
 
1070
# This file is free software; the Free Software Foundation
 
1071
# gives unlimited permission to copy and/or distribute it,
 
1072
# with or without modifications, as long as this notice is preserved.
 
1073
 
 
1074
# serial 16
 
1075
 
 
1076
# This macro actually does too much.  Some checks are only needed if
 
1077
# your package does certain things.  But this isn't really a big deal.
 
1078
 
 
1079
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
1080
# AM_INIT_AUTOMAKE([OPTIONS])
 
1081
# -----------------------------------------------
 
1082
# The call with PACKAGE and VERSION arguments is the old style
 
1083
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
1084
# and VERSION should now be passed to AC_INIT and removed from
 
1085
# the call to AM_INIT_AUTOMAKE.
 
1086
# We support both call styles for the transition.  After
 
1087
# the next Automake release, Autoconf can make the AC_INIT
 
1088
# arguments mandatory, and then we can depend on a new Autoconf
 
1089
# release and drop the old call support.
 
1090
AC_DEFUN([AM_INIT_AUTOMAKE],
 
1091
[AC_PREREQ([2.62])dnl
 
1092
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
1093
dnl the ones we care about.
 
1094
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
1095
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
1096
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
1097
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
1098
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
1099
  # is not polluted with repeated "-I."
 
1100
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
1101
  # test to see if srcdir already configured
 
1102
  if test -f $srcdir/config.status; then
 
1103
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
1104
  fi
 
1105
fi
 
1106
 
 
1107
# test whether we have cygpath
 
1108
if test -z "$CYGPATH_W"; then
 
1109
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
1110
    CYGPATH_W='cygpath -w'
 
1111
  else
 
1112
    CYGPATH_W=echo
 
1113
  fi
 
1114
fi
 
1115
AC_SUBST([CYGPATH_W])
 
1116
 
 
1117
# Define the identity of the package.
 
1118
dnl Distinguish between old-style and new-style calls.
 
1119
m4_ifval([$2],
 
1120
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
1121
 AC_SUBST([PACKAGE], [$1])dnl
 
1122
 AC_SUBST([VERSION], [$2])],
 
1123
[_AM_SET_OPTIONS([$1])dnl
 
1124
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
1125
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
1126
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 
1127
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
1128
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
1129
 
 
1130
_AM_IF_OPTION([no-define],,
 
1131
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
1132
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
1133
 
 
1134
# Some tools Automake needs.
 
1135
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
1136
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
1137
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
1138
AM_MISSING_PROG(AUTOCONF, autoconf)
 
1139
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
1140
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
1141
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
1142
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
1143
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 
1144
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
1145
# We need awk for the "check" target.  The system "awk" is bad on
 
1146
# some platforms.
 
1147
AC_REQUIRE([AC_PROG_AWK])dnl
 
1148
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
1149
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1150
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
1151
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
1152
                             [_AM_PROG_TAR([v7])])])
 
1153
_AM_IF_OPTION([no-dependencies],,
 
1154
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
1155
                  [_AM_DEPENDENCIES(CC)],
 
1156
                  [define([AC_PROG_CC],
 
1157
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
1158
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1159
                  [_AM_DEPENDENCIES(CXX)],
 
1160
                  [define([AC_PROG_CXX],
 
1161
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
1162
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
1163
                  [_AM_DEPENDENCIES(OBJC)],
 
1164
                  [define([AC_PROG_OBJC],
 
1165
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
1166
])
 
1167
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
 
1168
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
 
1169
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 
1170
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
1171
AC_CONFIG_COMMANDS_PRE(dnl
 
1172
[m4_provide_if([_AM_COMPILER_EXEEXT],
 
1173
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 
1174
])
 
1175
 
 
1176
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
1177
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 
1178
dnl mangled by Autoconf and run in a shell conditional statement.
 
1179
m4_define([_AC_COMPILER_EXEEXT],
 
1180
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
1181
 
 
1182
 
 
1183
# When config.status generates a header, we must update the stamp-h file.
 
1184
# This file resides in the same directory as the config header
 
1185
# that is generated.  The stamp files are numbered to have different names.
 
1186
 
 
1187
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
1188
# loop where config.status creates the headers, so we can generate
 
1189
# our stamp files there.
 
1190
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
1191
[# Compute $1's index in $config_headers.
 
1192
_am_arg=$1
 
1193
_am_stamp_count=1
 
1194
for _am_header in $config_headers :; do
 
1195
  case $_am_header in
 
1196
    $_am_arg | $_am_arg:* )
 
1197
      break ;;
 
1198
    * )
 
1199
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
1200
  esac
 
1201
done
 
1202
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
1203
 
 
1204
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 
1205
#
 
1206
# This file is free software; the Free Software Foundation
 
1207
# gives unlimited permission to copy and/or distribute it,
 
1208
# with or without modifications, as long as this notice is preserved.
 
1209
 
 
1210
# AM_PROG_INSTALL_SH
 
1211
# ------------------
 
1212
# Define $install_sh.
 
1213
AC_DEFUN([AM_PROG_INSTALL_SH],
 
1214
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1215
if test x"${install_sh}" != xset; then
 
1216
  case $am_aux_dir in
 
1217
  *\ * | *\     *)
 
1218
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 
1219
  *)
 
1220
    install_sh="\${SHELL} $am_aux_dir/install-sh"
 
1221
  esac
 
1222
fi
 
1223
AC_SUBST(install_sh)])
 
1224
 
 
1225
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
1226
#
 
1227
# This file is free software; the Free Software Foundation
 
1228
# gives unlimited permission to copy and/or distribute it,
 
1229
# with or without modifications, as long as this notice is preserved.
 
1230
 
 
1231
# serial 2
 
1232
 
 
1233
# Check whether the underlying file-system supports filenames
 
1234
# with a leading dot.  For instance MS-DOS doesn't.
 
1235
AC_DEFUN([AM_SET_LEADING_DOT],
 
1236
[rm -rf .tst 2>/dev/null
 
1237
mkdir .tst 2>/dev/null
 
1238
if test -d .tst; then
 
1239
  am__leading_dot=.
 
1240
else
 
1241
  am__leading_dot=_
 
1242
fi
 
1243
rmdir .tst 2>/dev/null
 
1244
AC_SUBST([am__leading_dot])])
 
1245
 
 
1246
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
1247
# From Jim Meyering
 
1248
 
 
1249
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 
1250
# Free Software Foundation, Inc.
 
1251
#
 
1252
# This file is free software; the Free Software Foundation
 
1253
# gives unlimited permission to copy and/or distribute it,
 
1254
# with or without modifications, as long as this notice is preserved.
 
1255
 
 
1256
# serial 5
 
1257
 
 
1258
# AM_MAINTAINER_MODE([DEFAULT-MODE])
 
1259
# ----------------------------------
 
1260
# Control maintainer-specific portions of Makefiles.
 
1261
# Default is to disable them, unless `enable' is passed literally.
 
1262
# For symmetry, `disable' may be passed as well.  Anyway, the user
 
1263
# can override the default with the --enable/--disable switch.
 
1264
AC_DEFUN([AM_MAINTAINER_MODE],
 
1265
[m4_case(m4_default([$1], [disable]),
 
1266
       [enable], [m4_define([am_maintainer_other], [disable])],
 
1267
       [disable], [m4_define([am_maintainer_other], [enable])],
 
1268
       [m4_define([am_maintainer_other], [enable])
 
1269
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
 
1270
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
 
1271
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
 
1272
  AC_ARG_ENABLE([maintainer-mode],
 
1273
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
 
1274
                          (and sometimes confusing) to the casual installer],
 
1275
      [USE_MAINTAINER_MODE=$enableval],
 
1276
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
 
1277
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
1278
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
 
1279
  MAINT=$MAINTAINER_MODE_TRUE
 
1280
  AC_SUBST([MAINT])dnl
 
1281
]
 
1282
)
 
1283
 
 
1284
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
1285
 
 
1286
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
1287
 
 
1288
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 
1289
#
 
1290
# This file is free software; the Free Software Foundation
 
1291
# gives unlimited permission to copy and/or distribute it,
 
1292
# with or without modifications, as long as this notice is preserved.
 
1293
 
 
1294
# serial 4
 
1295
 
 
1296
# AM_MAKE_INCLUDE()
 
1297
# -----------------
 
1298
# Check to see how make treats includes.
 
1299
AC_DEFUN([AM_MAKE_INCLUDE],
 
1300
[am_make=${MAKE-make}
 
1301
cat > confinc << 'END'
 
1302
am__doit:
 
1303
        @echo this is the am__doit target
 
1304
.PHONY: am__doit
 
1305
END
 
1306
# If we don't find an include directive, just comment out the code.
 
1307
AC_MSG_CHECKING([for style of include used by $am_make])
 
1308
am__include="#"
 
1309
am__quote=
 
1310
_am_result=none
 
1311
# First try GNU make style include.
 
1312
echo "include confinc" > confmf
 
1313
# Ignore all kinds of additional output from `make'.
 
1314
case `$am_make -s -f confmf 2> /dev/null` in #(
 
1315
*the\ am__doit\ target*)
 
1316
  am__include=include
 
1317
  am__quote=
 
1318
  _am_result=GNU
 
1319
  ;;
 
1320
esac
 
1321
# Now try BSD make style include.
 
1322
if test "$am__include" = "#"; then
 
1323
   echo '.include "confinc"' > confmf
 
1324
   case `$am_make -s -f confmf 2> /dev/null` in #(
 
1325
   *the\ am__doit\ target*)
 
1326
     am__include=.include
 
1327
     am__quote="\""
 
1328
     _am_result=BSD
 
1329
     ;;
 
1330
   esac
 
1331
fi
 
1332
AC_SUBST([am__include])
 
1333
AC_SUBST([am__quote])
 
1334
AC_MSG_RESULT([$_am_result])
 
1335
rm -f confinc confmf
 
1336
])
 
1337
 
 
1338
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
 
1339
# Free Software Foundation, Inc.
 
1340
#
 
1341
# This file is free software; the Free Software Foundation
 
1342
# gives unlimited permission to copy and/or distribute it,
 
1343
# with or without modifications, as long as this notice is preserved.
 
1344
 
 
1345
# serial 6
 
1346
 
 
1347
# AM_PROG_CC_C_O
 
1348
# --------------
 
1349
# Like AC_PROG_CC_C_O, but changed for automake.
 
1350
AC_DEFUN([AM_PROG_CC_C_O],
 
1351
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
 
1352
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1353
AC_REQUIRE_AUX_FILE([compile])dnl
 
1354
# FIXME: we rely on the cache variable name because
 
1355
# there is no other way.
 
1356
set dummy $CC
 
1357
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
 
1358
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
 
1359
if test "$am_t" != yes; then
 
1360
   # Losing compiler, so override with the script.
 
1361
   # FIXME: It is wrong to rewrite CC.
 
1362
   # But if we don't then we get into trouble of one sort or another.
 
1363
   # A longer-term fix would be to have automake use am__CC in this case,
 
1364
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 
1365
   CC="$am_aux_dir/compile $CC"
 
1366
fi
 
1367
dnl Make sure AC_PROG_CC is never called again, or it will override our
 
1368
dnl setting of CC.
 
1369
m4_define([AC_PROG_CC],
 
1370
          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
 
1371
])
 
1372
 
 
1373
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
1374
 
 
1375
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 
1376
# Free Software Foundation, Inc.
 
1377
#
 
1378
# This file is free software; the Free Software Foundation
 
1379
# gives unlimited permission to copy and/or distribute it,
 
1380
# with or without modifications, as long as this notice is preserved.
 
1381
 
 
1382
# serial 6
 
1383
 
 
1384
# AM_MISSING_PROG(NAME, PROGRAM)
 
1385
# ------------------------------
 
1386
AC_DEFUN([AM_MISSING_PROG],
 
1387
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
1388
$1=${$1-"${am_missing_run}$2"}
 
1389
AC_SUBST($1)])
 
1390
 
 
1391
 
 
1392
# AM_MISSING_HAS_RUN
 
1393
# ------------------
 
1394
# Define MISSING if not defined so far and test if it supports --run.
 
1395
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
1396
AC_DEFUN([AM_MISSING_HAS_RUN],
 
1397
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1398
AC_REQUIRE_AUX_FILE([missing])dnl
 
1399
if test x"${MISSING+set}" != xset; then
 
1400
  case $am_aux_dir in
 
1401
  *\ * | *\     *)
 
1402
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 
1403
  *)
 
1404
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
 
1405
  esac
 
1406
fi
 
1407
# Use eval to expand $SHELL
 
1408
if eval "$MISSING --run true"; then
 
1409
  am_missing_run="$MISSING --run "
 
1410
else
 
1411
  am_missing_run=
 
1412
  AC_MSG_WARN([`missing' script is too old or missing])
 
1413
fi
 
1414
])
 
1415
 
 
1416
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
1417
#
 
1418
# This file is free software; the Free Software Foundation
 
1419
# gives unlimited permission to copy and/or distribute it,
 
1420
# with or without modifications, as long as this notice is preserved.
 
1421
 
 
1422
# AM_PROG_MKDIR_P
 
1423
# ---------------
 
1424
# Check for `mkdir -p'.
 
1425
AC_DEFUN([AM_PROG_MKDIR_P],
 
1426
[AC_PREREQ([2.60])dnl
 
1427
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
1428
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
1429
dnl while keeping a definition of mkdir_p for backward compatibility.
 
1430
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
1431
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
1432
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
1433
dnl adjustment using top_builddir (which is defined more often than
 
1434
dnl MKDIR_P).
 
1435
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
1436
case $mkdir_p in
 
1437
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
1438
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
1439
esac
 
1440
])
 
1441
 
 
1442
# Helper functions for option handling.                     -*- Autoconf -*-
 
1443
 
 
1444
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 
1445
#
 
1446
# This file is free software; the Free Software Foundation
 
1447
# gives unlimited permission to copy and/or distribute it,
 
1448
# with or without modifications, as long as this notice is preserved.
 
1449
 
 
1450
# serial 4
 
1451
 
 
1452
# _AM_MANGLE_OPTION(NAME)
 
1453
# -----------------------
 
1454
AC_DEFUN([_AM_MANGLE_OPTION],
 
1455
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
1456
 
 
1457
# _AM_SET_OPTION(NAME)
 
1458
# ------------------------------
 
1459
# Set option NAME.  Presently that only means defining a flag for this option.
 
1460
AC_DEFUN([_AM_SET_OPTION],
 
1461
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
1462
 
 
1463
# _AM_SET_OPTIONS(OPTIONS)
 
1464
# ----------------------------------
 
1465
# OPTIONS is a space-separated list of Automake options.
 
1466
AC_DEFUN([_AM_SET_OPTIONS],
 
1467
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
1468
 
 
1469
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
1470
# -------------------------------------------
 
1471
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
1472
AC_DEFUN([_AM_IF_OPTION],
 
1473
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
1474
 
 
1475
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1476
#
 
1477
# This file is free software; the Free Software Foundation
 
1478
# gives unlimited permission to copy and/or distribute it,
 
1479
# with or without modifications, as long as this notice is preserved.
 
1480
 
 
1481
# AM_RUN_LOG(COMMAND)
 
1482
# -------------------
 
1483
# Run COMMAND, save the exit status in ac_status, and log it.
 
1484
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
 
1485
AC_DEFUN([AM_RUN_LOG],
 
1486
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
 
1487
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
 
1488
   ac_status=$?
 
1489
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1490
   (exit $ac_status); }])
 
1491
 
 
1492
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
1493
 
 
1494
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 
1495
# Free Software Foundation, Inc.
 
1496
#
 
1497
# This file is free software; the Free Software Foundation
 
1498
# gives unlimited permission to copy and/or distribute it,
 
1499
# with or without modifications, as long as this notice is preserved.
 
1500
 
 
1501
# serial 5
 
1502
 
 
1503
# AM_SANITY_CHECK
 
1504
# ---------------
 
1505
AC_DEFUN([AM_SANITY_CHECK],
 
1506
[AC_MSG_CHECKING([whether build environment is sane])
 
1507
# Just in case
 
1508
sleep 1
 
1509
echo timestamp > conftest.file
 
1510
# Reject unsafe characters in $srcdir or the absolute working directory
 
1511
# name.  Accept space and tab only in the latter.
 
1512
am_lf='
 
1513
'
 
1514
case `pwd` in
 
1515
  *[[\\\"\#\$\&\'\`$am_lf]]*)
 
1516
    AC_MSG_ERROR([unsafe absolute working directory name]);;
 
1517
esac
 
1518
case $srcdir in
 
1519
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
 
1520
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 
1521
esac
 
1522
 
 
1523
# Do `set' in a subshell so we don't clobber the current shell's
 
1524
# arguments.  Must try -L first in case configure is actually a
 
1525
# symlink; some systems play weird games with the mod time of symlinks
 
1526
# (eg FreeBSD returns the mod time of the symlink's containing
 
1527
# directory).
 
1528
if (
 
1529
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 
1530
   if test "$[*]" = "X"; then
 
1531
      # -L didn't work.
 
1532
      set X `ls -t "$srcdir/configure" conftest.file`
 
1533
   fi
 
1534
   rm -f conftest.file
 
1535
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
1536
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
1537
 
 
1538
      # If neither matched, then we have a broken ls.  This can happen
 
1539
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
1540
      # broken ls alias from the environment.  This has actually
 
1541
      # happened.  Such a system could not be considered "sane".
 
1542
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
1543
alias in your environment])
 
1544
   fi
 
1545
 
 
1546
   test "$[2]" = conftest.file
 
1547
   )
 
1548
then
 
1549
   # Ok.
 
1550
   :
 
1551
else
 
1552
   AC_MSG_ERROR([newly created file is older than distributed files!
 
1553
Check your system clock])
 
1554
fi
 
1555
AC_MSG_RESULT(yes)])
 
1556
 
 
1557
# Copyright (C) 2009  Free Software Foundation, Inc.
 
1558
#
 
1559
# This file is free software; the Free Software Foundation
 
1560
# gives unlimited permission to copy and/or distribute it,
 
1561
# with or without modifications, as long as this notice is preserved.
 
1562
 
 
1563
# serial 1
 
1564
 
 
1565
# AM_SILENT_RULES([DEFAULT])
 
1566
# --------------------------
 
1567
# Enable less verbose build rules; with the default set to DEFAULT
 
1568
# (`yes' being less verbose, `no' or empty being verbose).
 
1569
AC_DEFUN([AM_SILENT_RULES],
 
1570
[AC_ARG_ENABLE([silent-rules],
 
1571
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
 
1572
  --disable-silent-rules         verbose build output (undo: `make V=0')])
 
1573
case $enable_silent_rules in
 
1574
yes) AM_DEFAULT_VERBOSITY=0;;
 
1575
no)  AM_DEFAULT_VERBOSITY=1;;
 
1576
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 
1577
esac
 
1578
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 
1579
AM_BACKSLASH='\'
 
1580
AC_SUBST([AM_BACKSLASH])dnl
 
1581
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 
1582
])
 
1583
 
 
1584
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1585
#
 
1586
# This file is free software; the Free Software Foundation
 
1587
# gives unlimited permission to copy and/or distribute it,
 
1588
# with or without modifications, as long as this notice is preserved.
 
1589
 
 
1590
# AM_PROG_INSTALL_STRIP
 
1591
# ---------------------
 
1592
# One issue with vendor `install' (even GNU) is that you can't
 
1593
# specify the program used to strip binaries.  This is especially
 
1594
# annoying in cross-compiling environments, where the build's strip
 
1595
# is unlikely to handle the host's binaries.
 
1596
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
1597
# always use install-sh in `make install-strip', and initialize
 
1598
# STRIPPROG with the value of the STRIP variable (set by the user).
 
1599
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
1600
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
1601
# Installed binaries are usually stripped using `strip' when the user
 
1602
# run `make install-strip'.  However `strip' might not be the right
 
1603
# tool to use in cross-compilation environments, therefore Automake
 
1604
# will honor the `STRIP' environment variable to overrule this program.
 
1605
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
1606
if test "$cross_compiling" != no; then
 
1607
  AC_CHECK_TOOL([STRIP], [strip], :)
 
1608
fi
 
1609
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
1610
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
1611
 
 
1612
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
1613
#
 
1614
# This file is free software; the Free Software Foundation
 
1615
# gives unlimited permission to copy and/or distribute it,
 
1616
# with or without modifications, as long as this notice is preserved.
 
1617
 
 
1618
# serial 2
 
1619
 
 
1620
# _AM_SUBST_NOTMAKE(VARIABLE)
 
1621
# ---------------------------
 
1622
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 
1623
# This macro is traced by Automake.
 
1624
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
1625
 
 
1626
# AM_SUBST_NOTMAKE(VARIABLE)
 
1627
# ---------------------------
 
1628
# Public sister of _AM_SUBST_NOTMAKE.
 
1629
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
1630
 
 
1631
# Check how to create a tarball.                            -*- Autoconf -*-
 
1632
 
 
1633
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
1634
#
 
1635
# This file is free software; the Free Software Foundation
 
1636
# gives unlimited permission to copy and/or distribute it,
 
1637
# with or without modifications, as long as this notice is preserved.
 
1638
 
 
1639
# serial 2
 
1640
 
 
1641
# _AM_PROG_TAR(FORMAT)
 
1642
# --------------------
 
1643
# Check how to create a tarball in format FORMAT.
 
1644
# FORMAT should be one of `v7', `ustar', or `pax'.
 
1645
#
 
1646
# Substitute a variable $(am__tar) that is a command
 
1647
# writing to stdout a FORMAT-tarball containing the directory
 
1648
# $tardir.
 
1649
#     tardir=directory && $(am__tar) > result.tar
 
1650
#
 
1651
# Substitute a variable $(am__untar) that extract such
 
1652
# a tarball read from stdin.
 
1653
#     $(am__untar) < result.tar
 
1654
AC_DEFUN([_AM_PROG_TAR],
 
1655
[# Always define AMTAR for backward compatibility.
 
1656
AM_MISSING_PROG([AMTAR], [tar])
 
1657
m4_if([$1], [v7],
 
1658
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
1659
     [m4_case([$1], [ustar],, [pax],,
 
1660
              [m4_fatal([Unknown tar format])])
 
1661
AC_MSG_CHECKING([how to create a $1 tar archive])
 
1662
# Loop over all known methods to create a tar archive until one works.
 
1663
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
1664
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
1665
# Do not fold the above two line into one, because Tru64 sh and
 
1666
# Solaris sh will not grok spaces in the rhs of `-'.
 
1667
for _am_tool in $_am_tools
 
1668
do
 
1669
  case $_am_tool in
 
1670
  gnutar)
 
1671
    for _am_tar in tar gnutar gtar;
 
1672
    do
 
1673
      AM_RUN_LOG([$_am_tar --version]) && break
 
1674
    done
 
1675
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
1676
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
1677
    am__untar="$_am_tar -xf -"
 
1678
    ;;
 
1679
  plaintar)
 
1680
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
1681
    # ustar tarball either.
 
1682
    (tar --version) >/dev/null 2>&1 && continue
 
1683
    am__tar='tar chf - "$$tardir"'
 
1684
    am__tar_='tar chf - "$tardir"'
 
1685
    am__untar='tar xf -'
 
1686
    ;;
 
1687
  pax)
 
1688
    am__tar='pax -L -x $1 -w "$$tardir"'
 
1689
    am__tar_='pax -L -x $1 -w "$tardir"'
 
1690
    am__untar='pax -r'
 
1691
    ;;
 
1692
  cpio)
 
1693
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
1694
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
1695
    am__untar='cpio -i -H $1 -d'
 
1696
    ;;
 
1697
  none)
 
1698
    am__tar=false
 
1699
    am__tar_=false
 
1700
    am__untar=false
 
1701
    ;;
 
1702
  esac
 
1703
 
 
1704
  # If the value was cached, stop now.  We just wanted to have am__tar
 
1705
  # and am__untar set.
 
1706
  test -n "${am_cv_prog_tar_$1}" && break
 
1707
 
 
1708
  # tar/untar a dummy directory, and stop if the command works
 
1709
  rm -rf conftest.dir
 
1710
  mkdir conftest.dir
 
1711
  echo GrepMe > conftest.dir/file
 
1712
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
1713
  rm -rf conftest.dir
 
1714
  if test -s conftest.tar; then
 
1715
    AM_RUN_LOG([$am__untar <conftest.tar])
 
1716
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
1717
  fi
 
1718
done
 
1719
rm -rf conftest.dir
 
1720
 
 
1721
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
1722
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1723
AC_SUBST([am__tar])
 
1724
AC_SUBST([am__untar])
 
1725
]) # _AM_PROG_TAR
 
1726
 
 
1727
dnl -*- mode: autoconf -*-
 
1728
 
 
1729
# serial 1
 
1730
 
 
1731
dnl Usage:
 
1732
dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
 
1733
AC_DEFUN([GTK_DOC_CHECK],
 
1734
[
 
1735
  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
 
1736
  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
 
1737
 
 
1738
  dnl check for tools we added during development
 
1739
  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
 
1740
  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
 
1741
  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
 
1742
 
 
1743
  dnl for overriding the documentation installation directory
 
1744
  AC_ARG_WITH([html-dir],
 
1745
    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
 
1746
    [with_html_dir='${datadir}/gtk-doc/html'])
 
1747
  HTML_DIR="$with_html_dir"
 
1748
  AC_SUBST([HTML_DIR])
 
1749
 
 
1750
  dnl enable/disable documentation building
 
1751
  AC_ARG_ENABLE([gtk-doc],
 
1752
    AS_HELP_STRING([--enable-gtk-doc],
 
1753
                   [use gtk-doc to build documentation [[default=no]]]),,
 
1754
    [enable_gtk_doc=no])
 
1755
 
 
1756
  if test x$enable_gtk_doc = xyes; then
 
1757
    ifelse([$1],[],
 
1758
      [PKG_CHECK_EXISTS([gtk-doc],,
 
1759
                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
 
1760
      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
 
1761
                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
 
1762
  fi
 
1763
 
 
1764
  AC_MSG_CHECKING([whether to build gtk-doc documentation])
 
1765
  AC_MSG_RESULT($enable_gtk_doc)
 
1766
 
 
1767
  dnl enable/disable output formats
 
1768
  AC_ARG_ENABLE([gtk-doc-html],
 
1769
    AS_HELP_STRING([--enable-gtk-doc-html],
 
1770
                   [build documentation in html format [[default=yes]]]),,
 
1771
    [enable_gtk_doc_html=yes])
 
1772
    AC_ARG_ENABLE([gtk-doc-pdf],
 
1773
      AS_HELP_STRING([--enable-gtk-doc-pdf],
 
1774
                     [build documentation in pdf format [[default=no]]]),,
 
1775
      [enable_gtk_doc_pdf=no])
 
1776
 
 
1777
  if test -z "$GTKDOC_MKPDF"; then
 
1778
    enable_gtk_doc_pdf=no
 
1779
  fi
 
1780
 
 
1781
 
 
1782
  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
 
1783
  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
 
1784
  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
 
1785
  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
 
1786
  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
 
1787
])
 
1788
 
 
1789
 
 
1790
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
1791
# serial 40 IT_PROG_INTLTOOL
 
1792
AC_DEFUN([IT_PROG_INTLTOOL], [
 
1793
AC_PREREQ([2.50])dnl
 
1794
AC_REQUIRE([AM_NLS])dnl
 
1795
 
 
1796
case "$am__api_version" in
 
1797
    1.[01234])
 
1798
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
1799
    ;;
 
1800
    *)
 
1801
    ;;
 
1802
esac
 
1803
 
 
1804
if test -n "$1"; then
 
1805
    AC_MSG_CHECKING([for intltool >= $1])
 
1806
 
 
1807
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
1808
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
1809
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
1810
    ]
 
1811
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
1812
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
1813
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
1814
fi
 
1815
 
 
1816
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
1817
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
1818
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
1819
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
1820
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
1821
fi
 
1822
 
 
1823
  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 $< [$]@' 
 
1824
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 $< [$]@' 
 
1825
     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 $< [$]@' 
 
1826
     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 $< [$]@' 
 
1827
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
1828
     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 $< [$]@' 
 
1829
   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 $< [$]@' 
 
1830
    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 $< [$]@' 
 
1831
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 $< [$]@' 
 
1832
       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 $< [$]@' 
 
1833
      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 $< [$]@' 
 
1834
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
1835
      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 $< [$]@' 
 
1836
      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 $< [$]@' 
 
1837
    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 $< [$]@' 
 
1838
  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 $< [$]@' 
 
1839
    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 $< [$]@' 
 
1840
    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 $< [$]@'
 
1841
   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 $< [$]@'
 
1842
 
 
1843
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
1844
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
1845
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
1846
_IT_SUBST(INTLTOOL_PROP_RULE)
 
1847
_IT_SUBST(INTLTOOL_OAF_RULE)
 
1848
_IT_SUBST(INTLTOOL_PONG_RULE)
 
1849
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
1850
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
1851
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
1852
_IT_SUBST(INTLTOOL_UI_RULE)
 
1853
_IT_SUBST(INTLTOOL_XAM_RULE)
 
1854
_IT_SUBST(INTLTOOL_KBD_RULE)
 
1855
_IT_SUBST(INTLTOOL_XML_RULE)
 
1856
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
1857
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
1858
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
1859
_IT_SUBST(INTLTOOL_THEME_RULE)
 
1860
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
1861
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
1862
 
 
1863
# Check the gettext tools to make sure they are GNU
 
1864
AC_PATH_PROG(XGETTEXT, xgettext)
 
1865
AC_PATH_PROG(MSGMERGE, msgmerge)
 
1866
AC_PATH_PROG(MSGFMT, msgfmt)
 
1867
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1868
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
1869
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
1870
fi
 
1871
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
1872
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
1873
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
1874
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
1875
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
1876
fi
 
1877
 
 
1878
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
1879
if test -z "$INTLTOOL_PERL"; then
 
1880
   AC_MSG_ERROR([perl not found])
 
1881
fi
 
1882
AC_MSG_CHECKING([for perl >= 5.8.1])
 
1883
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
1884
if test $? -ne 0; then
 
1885
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
1886
else
 
1887
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
 
1888
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
1889
fi
 
1890
if test "x$2" != "xno-xml"; then
 
1891
   AC_MSG_CHECKING([for XML::Parser])
 
1892
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
1893
       AC_MSG_RESULT([ok])
 
1894
   else
 
1895
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
1896
   fi
 
1897
fi
 
1898
 
 
1899
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
1900
AC_SUBST(ALL_LINGUAS)
 
1901
 
 
1902
# Set DATADIRNAME correctly if it is not set yet
 
1903
# (copied from glib-gettext.m4)
 
1904
if test -z "$DATADIRNAME"; then
 
1905
  AC_LINK_IFELSE(
 
1906
    [AC_LANG_PROGRAM([[]],
 
1907
                     [[extern int _nl_msg_cat_cntr;
 
1908
                       return _nl_msg_cat_cntr]])],
 
1909
    [DATADIRNAME=share],
 
1910
    [case $host in
 
1911
    *-*-solaris*)
 
1912
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
1913
    dnl GNU format message catalog is always supported,
 
1914
    dnl since both are added to the libc all together.
 
1915
    dnl Hence, we'd like to go with DATADIRNAME=share
 
1916
    dnl in this case.
 
1917
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
1918
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
1919
    ;;
 
1920
    *)
 
1921
    [DATADIRNAME=lib]
 
1922
    ;;
 
1923
    esac])
 
1924
fi
 
1925
AC_SUBST(DATADIRNAME)
 
1926
 
 
1927
IT_PO_SUBDIR([po])
 
1928
 
 
1929
])
 
1930
 
 
1931
 
 
1932
# IT_PO_SUBDIR(DIRNAME)
 
1933
# ---------------------
 
1934
# All po subdirs have to be declared with this macro; the subdir "po" is
 
1935
# declared by IT_PROG_INTLTOOL.
 
1936
#
 
1937
AC_DEFUN([IT_PO_SUBDIR],
 
1938
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
1939
dnl
 
1940
dnl The following CONFIG_COMMANDS should be executed at the very end
 
1941
dnl of config.status.
 
1942
AC_CONFIG_COMMANDS_PRE([
 
1943
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
1944
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
1945
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
1946
    fi
 
1947
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
1948
    >"$1/stamp-it.tmp"
 
1949
    [sed '/^#/d
 
1950
         s/^[[].*] *//
 
1951
         /^[    ]*$/d
 
1952
        '"s|^|  $ac_top_srcdir/|" \
 
1953
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
1954
    ]
 
1955
    [sed '/^POTFILES =/,/[^\\]$/ {
 
1956
                /^POTFILES =/!d
 
1957
                r $1/POTFILES
 
1958
          }
 
1959
         ' "$1/Makefile.in" >"$1/Makefile"]
 
1960
    rm -f "$1/Makefile.tmp"
 
1961
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
1962
  ])
 
1963
])dnl
 
1964
])
 
1965
 
 
1966
# _IT_SUBST(VARIABLE)
 
1967
# -------------------
 
1968
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
1969
#
 
1970
AC_DEFUN([_IT_SUBST],
 
1971
[
 
1972
AC_SUBST([$1])
 
1973
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
1974
]
 
1975
)
 
1976
 
 
1977
# deprecated macros
 
1978
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
1979
# A hint is needed for aclocal from Automake <= 1.9.4:
 
1980
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
1981
 
 
1982
 
 
1983
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
1984
#
 
1985
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
1986
#                 2006, 2007, 2008 Free Software Foundation, Inc.
 
1987
#   Written by Gordon Matzigkeit, 1996
 
1988
#
 
1989
# This file is free software; the Free Software Foundation gives
 
1990
# unlimited permission to copy and/or distribute it, with or without
 
1991
# modifications, as long as this notice is preserved.
 
1992
 
 
1993
m4_define([_LT_COPYING], [dnl
 
1994
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
1995
#                 2006, 2007, 2008 Free Software Foundation, Inc.
 
1996
#   Written by Gordon Matzigkeit, 1996
 
1997
#
 
1998
#   This file is part of GNU Libtool.
 
1999
#
 
2000
# GNU Libtool is free software; you can redistribute it and/or
 
2001
# modify it under the terms of the GNU General Public License as
 
2002
# published by the Free Software Foundation; either version 2 of
 
2003
# the License, or (at your option) any later version.
 
2004
#
 
2005
# As a special exception to the GNU General Public License,
 
2006
# if you distribute this file as part of a program or library that
 
2007
# is built using GNU Libtool, you may include this file under the
 
2008
# same distribution terms that you use for the rest of that program.
 
2009
#
 
2010
# GNU Libtool is distributed in the hope that it will be useful,
 
2011
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
2012
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
2013
# GNU General Public License for more details.
 
2014
#
 
2015
# You should have received a copy of the GNU General Public License
 
2016
# along with GNU Libtool; see the file COPYING.  If not, a copy
 
2017
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
 
2018
# obtained by writing to the Free Software Foundation, Inc.,
 
2019
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
2020
])
 
2021
 
 
2022
# serial 56 LT_INIT
 
2023
 
 
2024
 
 
2025
# LT_PREREQ(VERSION)
 
2026
# ------------------
 
2027
# Complain and exit if this libtool version is less that VERSION.
 
2028
m4_defun([LT_PREREQ],
 
2029
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
 
2030
       [m4_default([$3],
 
2031
                   [m4_fatal([Libtool version $1 or higher is required],
 
2032
                             63)])],
 
2033
       [$2])])
 
2034
 
 
2035
 
 
2036
# _LT_CHECK_BUILDDIR
 
2037
# ------------------
 
2038
# Complain if the absolute build directory name contains unusual characters
 
2039
m4_defun([_LT_CHECK_BUILDDIR],
 
2040
[case `pwd` in
 
2041
  *\ * | *\     *)
 
2042
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
 
2043
esac
 
2044
])
 
2045
 
 
2046
 
 
2047
# LT_INIT([OPTIONS])
 
2048
# ------------------
 
2049
AC_DEFUN([LT_INIT],
 
2050
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
 
2051
AC_BEFORE([$0], [LT_LANG])dnl
 
2052
AC_BEFORE([$0], [LT_OUTPUT])dnl
 
2053
AC_BEFORE([$0], [LTDL_INIT])dnl
 
2054
m4_require([_LT_CHECK_BUILDDIR])dnl
 
2055
 
 
2056
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
 
2057
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
 
2058
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
 
2059
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
 
2060
dnl unless we require an AC_DEFUNed macro:
 
2061
AC_REQUIRE([LTOPTIONS_VERSION])dnl
 
2062
AC_REQUIRE([LTSUGAR_VERSION])dnl
 
2063
AC_REQUIRE([LTVERSION_VERSION])dnl
 
2064
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 
2065
m4_require([_LT_PROG_LTMAIN])dnl
 
2066
 
 
2067
dnl Parse OPTIONS
 
2068
_LT_SET_OPTIONS([$0], [$1])
 
2069
 
 
2070
# This can be used to rebuild libtool when needed
 
2071
LIBTOOL_DEPS="$ltmain"
 
2072
 
 
2073
# Always use our own libtool.
 
2074
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
2075
AC_SUBST(LIBTOOL)dnl
 
2076
 
 
2077
_LT_SETUP
 
2078
 
 
2079
# Only expand once:
 
2080
m4_define([LT_INIT])
 
2081
])# LT_INIT
 
2082
 
 
2083
# Old names:
 
2084
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
 
2085
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
 
2086
dnl aclocal-1.4 backwards compatibility:
 
2087
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 
2088
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
2089
 
 
2090
 
 
2091
# _LT_CC_BASENAME(CC)
 
2092
# -------------------
 
2093
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
2094
m4_defun([_LT_CC_BASENAME],
 
2095
[for cc_temp in $1""; do
 
2096
  case $cc_temp in
 
2097
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
2098
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
2099
    \-*) ;;
 
2100
    *) break;;
 
2101
  esac
 
2102
done
 
2103
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
2104
])
 
2105
 
 
2106
 
 
2107
# _LT_FILEUTILS_DEFAULTS
 
2108
# ----------------------
 
2109
# It is okay to use these file commands and assume they have been set
 
2110
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
 
2111
m4_defun([_LT_FILEUTILS_DEFAULTS],
 
2112
[: ${CP="cp -f"}
 
2113
: ${MV="mv -f"}
 
2114
: ${RM="rm -f"}
 
2115
])# _LT_FILEUTILS_DEFAULTS
 
2116
 
 
2117
 
 
2118
# _LT_SETUP
 
2119
# ---------
 
2120
m4_defun([_LT_SETUP],
 
2121
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2122
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
2123
_LT_DECL([], [host_alias], [0], [The host system])dnl
 
2124
_LT_DECL([], [host], [0])dnl
 
2125
_LT_DECL([], [host_os], [0])dnl
 
2126
dnl
 
2127
_LT_DECL([], [build_alias], [0], [The build system])dnl
 
2128
_LT_DECL([], [build], [0])dnl
 
2129
_LT_DECL([], [build_os], [0])dnl
 
2130
dnl
 
2131
AC_REQUIRE([AC_PROG_CC])dnl
 
2132
AC_REQUIRE([LT_PATH_LD])dnl
 
2133
AC_REQUIRE([LT_PATH_NM])dnl
 
2134
dnl
 
2135
AC_REQUIRE([AC_PROG_LN_S])dnl
 
2136
test -z "$LN_S" && LN_S="ln -s"
 
2137
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
 
2138
dnl
 
2139
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
 
2140
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
 
2141
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 
2142
dnl
 
2143
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2144
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
2145
m4_require([_LT_CMD_RELOAD])dnl
 
2146
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 
2147
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 
2148
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
2149
 
 
2150
_LT_CONFIG_LIBTOOL_INIT([
 
2151
# See if we are running on zsh, and set the options which allow our
 
2152
# commands through without removal of \ escapes INIT.
 
2153
if test -n "\${ZSH_VERSION+set}" ; then
 
2154
   setopt NO_GLOB_SUBST
 
2155
fi
 
2156
])
 
2157
if test -n "${ZSH_VERSION+set}" ; then
 
2158
   setopt NO_GLOB_SUBST
 
2159
fi
 
2160
 
 
2161
_LT_CHECK_OBJDIR
 
2162
 
 
2163
m4_require([_LT_TAG_COMPILER])dnl
 
2164
_LT_PROG_ECHO_BACKSLASH
 
2165
 
 
2166
case $host_os in
 
2167
aix3*)
 
2168
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
2169
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
2170
  # vanish in a puff of smoke.
 
2171
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
2172
    COLLECT_NAMES=
 
2173
    export COLLECT_NAMES
 
2174
  fi
 
2175
  ;;
 
2176
esac
 
2177
 
 
2178
# Sed substitution that helps us do robust quoting.  It backslashifies
 
2179
# metacharacters that are still active within double-quoted strings.
 
2180
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
2181
 
 
2182
# Same as above, but do not quote variable references.
 
2183
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
 
2184
 
 
2185
# Sed substitution to delay expansion of an escaped shell variable in a
 
2186
# double_quote_subst'ed string.
 
2187
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
2188
 
 
2189
# Sed substitution to delay expansion of an escaped single quote.
 
2190
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
2191
 
 
2192
# Sed substitution to avoid accidental globbing in evaled expressions
 
2193
no_glob_subst='s/\*/\\\*/g'
 
2194
 
 
2195
# Global variables:
 
2196
ofile=libtool
 
2197
can_build_shared=yes
 
2198
 
 
2199
# All known linkers require a `.a' archive for static linking (except MSVC,
 
2200
# which needs '.lib').
 
2201
libext=a
 
2202
 
 
2203
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
2204
 
 
2205
old_CC="$CC"
 
2206
old_CFLAGS="$CFLAGS"
 
2207
 
 
2208
# Set sane defaults for various variables
 
2209
test -z "$CC" && CC=cc
 
2210
test -z "$LTCC" && LTCC=$CC
 
2211
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 
2212
test -z "$LD" && LD=ld
 
2213
test -z "$ac_objext" && ac_objext=o
 
2214
 
 
2215
_LT_CC_BASENAME([$compiler])
 
2216
 
 
2217
# Only perform the check for file, if the check method requires it
 
2218
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
2219
case $deplibs_check_method in
 
2220
file_magic*)
 
2221
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
2222
    _LT_PATH_MAGIC
 
2223
  fi
 
2224
  ;;
 
2225
esac
 
2226
 
 
2227
# Use C for the default configuration in the libtool script
 
2228
LT_SUPPORTED_TAG([CC])
 
2229
_LT_LANG_C_CONFIG
 
2230
_LT_LANG_DEFAULT_CONFIG
 
2231
_LT_CONFIG_COMMANDS
 
2232
])# _LT_SETUP
 
2233
 
 
2234
 
 
2235
# _LT_PROG_LTMAIN
 
2236
# ---------------
 
2237
# Note that this code is called both from `configure', and `config.status'
 
2238
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
 
2239
# `config.status' has no value for ac_aux_dir unless we are using Automake,
 
2240
# so we pass a copy along to make sure it has a sensible value anyway.
 
2241
m4_defun([_LT_PROG_LTMAIN],
 
2242
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 
2243
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
 
2244
ltmain="$ac_aux_dir/ltmain.sh"
 
2245
])# _LT_PROG_LTMAIN
 
2246
 
 
2247
 
 
2248
 
 
2249
# So that we can recreate a full libtool script including additional
 
2250
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
 
2251
# in macros and then make a single call at the end using the `libtool'
 
2252
# label.
 
2253
 
 
2254
 
 
2255
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
 
2256
# ----------------------------------------
 
2257
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
2258
m4_define([_LT_CONFIG_LIBTOOL_INIT],
 
2259
[m4_ifval([$1],
 
2260
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
 
2261
                     [$1
 
2262
])])])
 
2263
 
 
2264
# Initialize.
 
2265
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
 
2266
 
 
2267
 
 
2268
# _LT_CONFIG_LIBTOOL([COMMANDS])
 
2269
# ------------------------------
 
2270
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
2271
m4_define([_LT_CONFIG_LIBTOOL],
 
2272
[m4_ifval([$1],
 
2273
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
 
2274
                     [$1
 
2275
])])])
 
2276
 
 
2277
# Initialize.
 
2278
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
 
2279
 
 
2280
 
 
2281
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
 
2282
# -----------------------------------------------------
 
2283
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
 
2284
[_LT_CONFIG_LIBTOOL([$1])
 
2285
_LT_CONFIG_LIBTOOL_INIT([$2])
 
2286
])
 
2287
 
 
2288
 
 
2289
# _LT_FORMAT_COMMENT([COMMENT])
 
2290
# -----------------------------
 
2291
# Add leading comment marks to the start of each line, and a trailing
 
2292
# full-stop to the whole comment if one is not present already.
 
2293
m4_define([_LT_FORMAT_COMMENT],
 
2294
[m4_ifval([$1], [
 
2295
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
 
2296
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
 
2297
)])
 
2298
 
 
2299
 
 
2300
 
 
2301
 
 
2302
 
 
2303
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
 
2304
# -------------------------------------------------------------------
 
2305
# CONFIGNAME is the name given to the value in the libtool script.
 
2306
# VARNAME is the (base) name used in the configure script.
 
2307
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
 
2308
# VARNAME.  Any other value will be used directly.
 
2309
m4_define([_LT_DECL],
 
2310
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
 
2311
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
 
2312
        [m4_ifval([$1], [$1], [$2])])
 
2313
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
 
2314
    m4_ifval([$4],
 
2315
        [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
 
2316
    lt_dict_add_subkey([lt_decl_dict], [$2],
 
2317
        [tagged?], [m4_ifval([$5], [yes], [no])])])
 
2318
])
 
2319
 
 
2320
 
 
2321
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
 
2322
# --------------------------------------------------------
 
2323
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
 
2324
 
 
2325
 
 
2326
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
 
2327
# ------------------------------------------------
 
2328
m4_define([lt_decl_tag_varnames],
 
2329
[_lt_decl_filter([tagged?], [yes], $@)])
 
2330
 
 
2331
 
 
2332
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
 
2333
# ---------------------------------------------------------
 
2334
m4_define([_lt_decl_filter],
 
2335
[m4_case([$#],
 
2336
  [0], [m4_fatal([$0: too few arguments: $#])],
 
2337
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
 
2338
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
 
2339
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
 
2340
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
 
2341
])
 
2342
 
 
2343
 
 
2344
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
 
2345
# --------------------------------------------------
 
2346
m4_define([lt_decl_quote_varnames],
 
2347
[_lt_decl_filter([value], [1], $@)])
 
2348
 
 
2349
 
 
2350
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
 
2351
# ---------------------------------------------------
 
2352
m4_define([lt_decl_dquote_varnames],
 
2353
[_lt_decl_filter([value], [2], $@)])
 
2354
 
 
2355
 
 
2356
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
 
2357
# ---------------------------------------------------
 
2358
m4_define([lt_decl_varnames_tagged],
 
2359
[m4_assert([$# <= 2])dnl
 
2360
_$0(m4_quote(m4_default([$1], [[, ]])),
 
2361
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
 
2362
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
 
2363
m4_define([_lt_decl_varnames_tagged],
 
2364
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
 
2365
 
 
2366
 
 
2367
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
 
2368
# ------------------------------------------------
 
2369
m4_define([lt_decl_all_varnames],
 
2370
[_$0(m4_quote(m4_default([$1], [[, ]])),
 
2371
     m4_if([$2], [],
 
2372
           m4_quote(lt_decl_varnames),
 
2373
        m4_quote(m4_shift($@))))[]dnl
 
2374
])
 
2375
m4_define([_lt_decl_all_varnames],
 
2376
[lt_join($@, lt_decl_varnames_tagged([$1],
 
2377
                        lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
 
2378
])
 
2379
 
 
2380
 
 
2381
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
 
2382
# ------------------------------------
 
2383
# Quote a variable value, and forward it to `config.status' so that its
 
2384
# declaration there will have the same value as in `configure'.  VARNAME
 
2385
# must have a single quote delimited value for this to work.
 
2386
m4_define([_LT_CONFIG_STATUS_DECLARE],
 
2387
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
 
2388
 
 
2389
 
 
2390
# _LT_CONFIG_STATUS_DECLARATIONS
 
2391
# ------------------------------
 
2392
# We delimit libtool config variables with single quotes, so when
 
2393
# we write them to config.status, we have to be sure to quote all
 
2394
# embedded single quotes properly.  In configure, this macro expands
 
2395
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 
2396
#
 
2397
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
 
2398
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 
2399
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
 
2400
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
 
2401
 
 
2402
 
 
2403
# _LT_LIBTOOL_TAGS
 
2404
# ----------------
 
2405
# Output comment and list of tags supported by the script
 
2406
m4_defun([_LT_LIBTOOL_TAGS],
 
2407
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
 
2408
available_tags="_LT_TAGS"dnl
 
2409
])
 
2410
 
 
2411
 
 
2412
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
 
2413
# -----------------------------------
 
2414
# Extract the dictionary values for VARNAME (optionally with TAG) and
 
2415
# expand to a commented shell variable setting:
 
2416
#
 
2417
#    # Some comment about what VAR is for.
 
2418
#    visible_name=$lt_internal_name
 
2419
m4_define([_LT_LIBTOOL_DECLARE],
 
2420
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
 
2421
                                           [description])))[]dnl
 
2422
m4_pushdef([_libtool_name],
 
2423
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
 
2424
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
 
2425
    [0], [_libtool_name=[$]$1],
 
2426
    [1], [_libtool_name=$lt_[]$1],
 
2427
    [2], [_libtool_name=$lt_[]$1],
 
2428
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
 
2429
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 
2430
])
 
2431
 
 
2432
 
 
2433
# _LT_LIBTOOL_CONFIG_VARS
 
2434
# -----------------------
 
2435
# Produce commented declarations of non-tagged libtool config variables
 
2436
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
 
2437
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 
2438
# section) are produced by _LT_LIBTOOL_TAG_VARS.
 
2439
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
 
2440
[m4_foreach([_lt_var],
 
2441
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
 
2442
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
 
2443
 
 
2444
 
 
2445
# _LT_LIBTOOL_TAG_VARS(TAG)
 
2446
# -------------------------
 
2447
m4_define([_LT_LIBTOOL_TAG_VARS],
 
2448
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
 
2449
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
 
2450
 
 
2451
 
 
2452
# _LT_TAGVAR(VARNAME, [TAGNAME])
 
2453
# ------------------------------
 
2454
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 
2455
 
 
2456
 
 
2457
# _LT_CONFIG_COMMANDS
 
2458
# -------------------
 
2459
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 
2460
# variables for single and double quote escaping we saved from calls
 
2461
# to _LT_DECL, we can put quote escaped variables declarations
 
2462
# into `config.status', and then the shell code to quote escape them in
 
2463
# for loops in `config.status'.  Finally, any additional code accumulated
 
2464
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 
2465
m4_defun([_LT_CONFIG_COMMANDS],
 
2466
[AC_PROVIDE_IFELSE([LT_OUTPUT],
 
2467
        dnl If the libtool generation code has been placed in $CONFIG_LT,
 
2468
        dnl instead of duplicating it all over again into config.status,
 
2469
        dnl then we will have config.status run $CONFIG_LT later, so it
 
2470
        dnl needs to know what name is stored there:
 
2471
        [AC_CONFIG_COMMANDS([libtool],
 
2472
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
 
2473
    dnl If the libtool generation code is destined for config.status,
 
2474
    dnl expand the accumulated commands and init code now:
 
2475
    [AC_CONFIG_COMMANDS([libtool],
 
2476
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
 
2477
])#_LT_CONFIG_COMMANDS
 
2478
 
 
2479
 
 
2480
# Initialize.
 
2481
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
 
2482
[
 
2483
 
 
2484
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
2485
# if CDPATH is set.
 
2486
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
2487
 
 
2488
sed_quote_subst='$sed_quote_subst'
 
2489
double_quote_subst='$double_quote_subst'
 
2490
delay_variable_subst='$delay_variable_subst'
 
2491
_LT_CONFIG_STATUS_DECLARATIONS
 
2492
LTCC='$LTCC'
 
2493
LTCFLAGS='$LTCFLAGS'
 
2494
compiler='$compiler_DEFAULT'
 
2495
 
 
2496
# Quote evaled strings.
 
2497
for var in lt_decl_all_varnames([[ \
 
2498
]], lt_decl_quote_varnames); do
 
2499
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
 
2500
    *[[\\\\\\\`\\"\\\$]]*)
 
2501
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
 
2502
      ;;
 
2503
    *)
 
2504
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
2505
      ;;
 
2506
    esac
 
2507
done
 
2508
 
 
2509
# Double-quote double-evaled strings.
 
2510
for var in lt_decl_all_varnames([[ \
 
2511
]], lt_decl_dquote_varnames); do
 
2512
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
 
2513
    *[[\\\\\\\`\\"\\\$]]*)
 
2514
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
 
2515
      ;;
 
2516
    *)
 
2517
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
2518
      ;;
 
2519
    esac
 
2520
done
 
2521
 
 
2522
# Fix-up fallback echo if it was mangled by the above quoting rules.
 
2523
case \$lt_ECHO in
 
2524
*'\\\[$]0 --fallback-echo"')dnl "
 
2525
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
 
2526
  ;;
 
2527
esac
 
2528
 
 
2529
_LT_OUTPUT_LIBTOOL_INIT
 
2530
])
 
2531
 
 
2532
 
 
2533
# LT_OUTPUT
 
2534
# ---------
 
2535
# This macro allows early generation of the libtool script (before
 
2536
# AC_OUTPUT is called), incase it is used in configure for compilation
 
2537
# tests.
 
2538
AC_DEFUN([LT_OUTPUT],
 
2539
[: ${CONFIG_LT=./config.lt}
 
2540
AC_MSG_NOTICE([creating $CONFIG_LT])
 
2541
cat >"$CONFIG_LT" <<_LTEOF
 
2542
#! $SHELL
 
2543
# Generated by $as_me.
 
2544
# Run this file to recreate a libtool stub with the current configuration.
 
2545
 
 
2546
lt_cl_silent=false
 
2547
SHELL=\${CONFIG_SHELL-$SHELL}
 
2548
_LTEOF
 
2549
 
 
2550
cat >>"$CONFIG_LT" <<\_LTEOF
 
2551
AS_SHELL_SANITIZE
 
2552
_AS_PREPARE
 
2553
 
 
2554
exec AS_MESSAGE_FD>&1
 
2555
exec AS_MESSAGE_LOG_FD>>config.log
 
2556
{
 
2557
  echo
 
2558
  AS_BOX([Running $as_me.])
 
2559
} >&AS_MESSAGE_LOG_FD
 
2560
 
 
2561
lt_cl_help="\
 
2562
\`$as_me' creates a local libtool stub from the current configuration,
 
2563
for use in further configure time tests before the real libtool is
 
2564
generated.
 
2565
 
 
2566
Usage: $[0] [[OPTIONS]]
 
2567
 
 
2568
  -h, --help      print this help, then exit
 
2569
  -V, --version   print version number, then exit
 
2570
  -q, --quiet     do not print progress messages
 
2571
  -d, --debug     don't remove temporary files
 
2572
 
 
2573
Report bugs to <bug-libtool@gnu.org>."
 
2574
 
 
2575
lt_cl_version="\
 
2576
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 
2577
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 
2578
configured by $[0], generated by m4_PACKAGE_STRING.
 
2579
 
 
2580
Copyright (C) 2008 Free Software Foundation, Inc.
 
2581
This config.lt script is free software; the Free Software Foundation
 
2582
gives unlimited permision to copy, distribute and modify it."
 
2583
 
 
2584
while test $[#] != 0
 
2585
do
 
2586
  case $[1] in
 
2587
    --version | --v* | -V )
 
2588
      echo "$lt_cl_version"; exit 0 ;;
 
2589
    --help | --h* | -h )
 
2590
      echo "$lt_cl_help"; exit 0 ;;
 
2591
    --debug | --d* | -d )
 
2592
      debug=: ;;
 
2593
    --quiet | --q* | --silent | --s* | -q )
 
2594
      lt_cl_silent=: ;;
 
2595
 
 
2596
    -*) AC_MSG_ERROR([unrecognized option: $[1]
 
2597
Try \`$[0] --help' for more information.]) ;;
 
2598
 
 
2599
    *) AC_MSG_ERROR([unrecognized argument: $[1]
 
2600
Try \`$[0] --help' for more information.]) ;;
 
2601
  esac
 
2602
  shift
 
2603
done
 
2604
 
 
2605
if $lt_cl_silent; then
 
2606
  exec AS_MESSAGE_FD>/dev/null
 
2607
fi
 
2608
_LTEOF
 
2609
 
 
2610
cat >>"$CONFIG_LT" <<_LTEOF
 
2611
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
 
2612
_LTEOF
 
2613
 
 
2614
cat >>"$CONFIG_LT" <<\_LTEOF
 
2615
AC_MSG_NOTICE([creating $ofile])
 
2616
_LT_OUTPUT_LIBTOOL_COMMANDS
 
2617
AS_EXIT(0)
 
2618
_LTEOF
 
2619
chmod +x "$CONFIG_LT"
 
2620
 
 
2621
# configure is writing to config.log, but config.lt does its own redirection,
 
2622
# appending to config.log, which fails on DOS, as config.log is still kept
 
2623
# open by configure.  Here we exec the FD to /dev/null, effectively closing
 
2624
# config.log, so it can be properly (re)opened and appended to by config.lt.
 
2625
if test "$no_create" != yes; then
 
2626
  lt_cl_success=:
 
2627
  test "$silent" = yes &&
 
2628
    lt_config_lt_args="$lt_config_lt_args --quiet"
 
2629
  exec AS_MESSAGE_LOG_FD>/dev/null
 
2630
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
 
2631
  exec AS_MESSAGE_LOG_FD>>config.log
 
2632
  $lt_cl_success || AS_EXIT(1)
 
2633
fi
 
2634
])# LT_OUTPUT
 
2635
 
 
2636
 
 
2637
# _LT_CONFIG(TAG)
 
2638
# ---------------
 
2639
# If TAG is the built-in tag, create an initial libtool script with a
 
2640
# default configuration from the untagged config vars.  Otherwise add code
 
2641
# to config.status for appending the configuration named by TAG from the
 
2642
# matching tagged config vars.
 
2643
m4_defun([_LT_CONFIG],
 
2644
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2645
_LT_CONFIG_SAVE_COMMANDS([
 
2646
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
 
2647
  m4_if(_LT_TAG, [C], [
 
2648
    # See if we are running on zsh, and set the options which allow our
 
2649
    # commands through without removal of \ escapes.
 
2650
    if test -n "${ZSH_VERSION+set}" ; then
 
2651
      setopt NO_GLOB_SUBST
 
2652
    fi
 
2653
 
 
2654
    cfgfile="${ofile}T"
 
2655
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
 
2656
    $RM "$cfgfile"
 
2657
 
 
2658
    cat <<_LT_EOF >> "$cfgfile"
 
2659
#! $SHELL
 
2660
 
 
2661
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
2662
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
 
2663
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
2664
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
2665
#
 
2666
_LT_COPYING
 
2667
_LT_LIBTOOL_TAGS
 
2668
 
 
2669
# ### BEGIN LIBTOOL CONFIG
 
2670
_LT_LIBTOOL_CONFIG_VARS
 
2671
_LT_LIBTOOL_TAG_VARS
 
2672
# ### END LIBTOOL CONFIG
 
2673
 
 
2674
_LT_EOF
 
2675
 
 
2676
  case $host_os in
 
2677
  aix3*)
 
2678
    cat <<\_LT_EOF >> "$cfgfile"
 
2679
# AIX sometimes has problems with the GCC collect2 program.  For some
 
2680
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
2681
# vanish in a puff of smoke.
 
2682
if test "X${COLLECT_NAMES+set}" != Xset; then
 
2683
  COLLECT_NAMES=
 
2684
  export COLLECT_NAMES
 
2685
fi
 
2686
_LT_EOF
 
2687
    ;;
 
2688
  esac
 
2689
 
 
2690
  _LT_PROG_LTMAIN
 
2691
 
 
2692
  # We use sed instead of cat because bash on DJGPP gets confused if
 
2693
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
2694
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
2695
  # is reportedly fixed, but why not run on old versions too?
 
2696
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
 
2697
    || (rm -f "$cfgfile"; exit 1)
 
2698
 
 
2699
  _LT_PROG_XSI_SHELLFNS
 
2700
 
 
2701
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
 
2702
    || (rm -f "$cfgfile"; exit 1)
 
2703
 
 
2704
  mv -f "$cfgfile" "$ofile" ||
 
2705
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
2706
  chmod +x "$ofile"
 
2707
],
 
2708
[cat <<_LT_EOF >> "$ofile"
 
2709
 
 
2710
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
 
2711
dnl in a comment (ie after a #).
 
2712
# ### BEGIN LIBTOOL TAG CONFIG: $1
 
2713
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
 
2714
# ### END LIBTOOL TAG CONFIG: $1
 
2715
_LT_EOF
 
2716
])dnl /m4_if
 
2717
],
 
2718
[m4_if([$1], [], [
 
2719
    PACKAGE='$PACKAGE'
 
2720
    VERSION='$VERSION'
 
2721
    TIMESTAMP='$TIMESTAMP'
 
2722
    RM='$RM'
 
2723
    ofile='$ofile'], [])
 
2724
])dnl /_LT_CONFIG_SAVE_COMMANDS
 
2725
])# _LT_CONFIG
 
2726
 
 
2727
 
 
2728
# LT_SUPPORTED_TAG(TAG)
 
2729
# ---------------------
 
2730
# Trace this macro to discover what tags are supported by the libtool
 
2731
# --tag option, using:
 
2732
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
 
2733
AC_DEFUN([LT_SUPPORTED_TAG], [])
 
2734
 
 
2735
 
 
2736
# C support is built-in for now
 
2737
m4_define([_LT_LANG_C_enabled], [])
 
2738
m4_define([_LT_TAGS], [])
 
2739
 
 
2740
 
 
2741
# LT_LANG(LANG)
 
2742
# -------------
 
2743
# Enable libtool support for the given language if not already enabled.
 
2744
AC_DEFUN([LT_LANG],
 
2745
[AC_BEFORE([$0], [LT_OUTPUT])dnl
 
2746
m4_case([$1],
 
2747
  [C],                  [_LT_LANG(C)],
 
2748
  [C++],                [_LT_LANG(CXX)],
 
2749
  [Java],               [_LT_LANG(GCJ)],
 
2750
  [Fortran 77],         [_LT_LANG(F77)],
 
2751
  [Fortran],            [_LT_LANG(FC)],
 
2752
  [Windows Resource],   [_LT_LANG(RC)],
 
2753
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
 
2754
    [_LT_LANG($1)],
 
2755
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
 
2756
])# LT_LANG
 
2757
 
 
2758
 
 
2759
# _LT_LANG(LANGNAME)
 
2760
# ------------------
 
2761
m4_defun([_LT_LANG],
 
2762
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
 
2763
  [LT_SUPPORTED_TAG([$1])dnl
 
2764
  m4_append([_LT_TAGS], [$1 ])dnl
 
2765
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
 
2766
  _LT_LANG_$1_CONFIG($1)])dnl
 
2767
])# _LT_LANG
 
2768
 
 
2769
 
 
2770
# _LT_LANG_DEFAULT_CONFIG
 
2771
# -----------------------
 
2772
m4_defun([_LT_LANG_DEFAULT_CONFIG],
 
2773
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
2774
  [LT_LANG(CXX)],
 
2775
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
 
2776
 
 
2777
AC_PROVIDE_IFELSE([AC_PROG_F77],
 
2778
  [LT_LANG(F77)],
 
2779
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
 
2780
 
 
2781
AC_PROVIDE_IFELSE([AC_PROG_FC],
 
2782
  [LT_LANG(FC)],
 
2783
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
 
2784
 
 
2785
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
 
2786
dnl pulling things in needlessly.
 
2787
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
2788
  [LT_LANG(GCJ)],
 
2789
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
2790
    [LT_LANG(GCJ)],
 
2791
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
 
2792
      [LT_LANG(GCJ)],
 
2793
      [m4_ifdef([AC_PROG_GCJ],
 
2794
        [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
 
2795
       m4_ifdef([A][M_PROG_GCJ],
 
2796
        [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
 
2797
       m4_ifdef([LT_PROG_GCJ],
 
2798
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
2799
 
 
2800
AC_PROVIDE_IFELSE([LT_PROG_RC],
 
2801
  [LT_LANG(RC)],
 
2802
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
 
2803
])# _LT_LANG_DEFAULT_CONFIG
 
2804
 
 
2805
# Obsolete macros:
 
2806
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 
2807
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 
2808
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 
2809
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
 
2810
dnl aclocal-1.4 backwards compatibility:
 
2811
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 
2812
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 
2813
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 
2814
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
 
2815
 
 
2816
 
 
2817
# _LT_TAG_COMPILER
 
2818
# ----------------
 
2819
m4_defun([_LT_TAG_COMPILER],
 
2820
[AC_REQUIRE([AC_PROG_CC])dnl
 
2821
 
 
2822
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
 
2823
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
 
2824
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
 
2825
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
 
2826
 
 
2827
# If no C compiler was specified, use CC.
 
2828
LTCC=${LTCC-"$CC"}
 
2829
 
 
2830
# If no C compiler flags were specified, use CFLAGS.
 
2831
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
2832
 
 
2833
# Allow CC to be a program name with arguments.
 
2834
compiler=$CC
 
2835
])# _LT_TAG_COMPILER
 
2836
 
 
2837
 
 
2838
# _LT_COMPILER_BOILERPLATE
 
2839
# ------------------------
 
2840
# Check for compiler boilerplate output or warnings with
 
2841
# the simple compiler test code.
 
2842
m4_defun([_LT_COMPILER_BOILERPLATE],
 
2843
[m4_require([_LT_DECL_SED])dnl
 
2844
ac_outfile=conftest.$ac_objext
 
2845
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
 
2846
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
2847
_lt_compiler_boilerplate=`cat conftest.err`
 
2848
$RM conftest*
 
2849
])# _LT_COMPILER_BOILERPLATE
 
2850
 
 
2851
 
 
2852
# _LT_LINKER_BOILERPLATE
 
2853
# ----------------------
 
2854
# Check for linker boilerplate output or warnings with
 
2855
# the simple link test code.
 
2856
m4_defun([_LT_LINKER_BOILERPLATE],
 
2857
[m4_require([_LT_DECL_SED])dnl
 
2858
ac_outfile=conftest.$ac_objext
 
2859
echo "$lt_simple_link_test_code" >conftest.$ac_ext
 
2860
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
2861
_lt_linker_boilerplate=`cat conftest.err`
 
2862
$RM -r conftest*
 
2863
])# _LT_LINKER_BOILERPLATE
 
2864
 
 
2865
# _LT_REQUIRED_DARWIN_CHECKS
 
2866
# -------------------------
 
2867
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
2868
  case $host_os in
 
2869
    rhapsody* | darwin*)
 
2870
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
 
2871
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
 
2872
    AC_CHECK_TOOL([LIPO], [lipo], [:])
 
2873
    AC_CHECK_TOOL([OTOOL], [otool], [:])
 
2874
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
 
2875
    _LT_DECL([], [DSYMUTIL], [1],
 
2876
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
 
2877
    _LT_DECL([], [NMEDIT], [1],
 
2878
      [Tool to change global to local symbols on Mac OS X])
 
2879
    _LT_DECL([], [LIPO], [1],
 
2880
      [Tool to manipulate fat objects and archives on Mac OS X])
 
2881
    _LT_DECL([], [OTOOL], [1],
 
2882
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
 
2883
    _LT_DECL([], [OTOOL64], [1],
 
2884
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
 
2885
 
 
2886
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
 
2887
      [lt_cv_apple_cc_single_mod=no
 
2888
      if test -z "${LT_MULTI_MODULE}"; then
 
2889
        # By default we will add the -single_module flag. You can override
 
2890
        # by either setting the environment variable LT_MULTI_MODULE
 
2891
        # non-empty at configure time, or by adding -multi_module to the
 
2892
        # link flags.
 
2893
        rm -rf libconftest.dylib*
 
2894
        echo "int foo(void){return 1;}" > conftest.c
 
2895
        echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
2896
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
 
2897
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
2898
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
 
2899
        _lt_result=$?
 
2900
        if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
 
2901
          lt_cv_apple_cc_single_mod=yes
 
2902
        else
 
2903
          cat conftest.err >&AS_MESSAGE_LOG_FD
 
2904
        fi
 
2905
        rm -rf libconftest.dylib*
 
2906
        rm -f conftest.*
 
2907
      fi])
 
2908
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
 
2909
      [lt_cv_ld_exported_symbols_list],
 
2910
      [lt_cv_ld_exported_symbols_list=no
 
2911
      save_LDFLAGS=$LDFLAGS
 
2912
      echo "_main" > conftest.sym
 
2913
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
 
2914
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
2915
        [lt_cv_ld_exported_symbols_list=yes],
 
2916
        [lt_cv_ld_exported_symbols_list=no])
 
2917
        LDFLAGS="$save_LDFLAGS"
 
2918
    ])
 
2919
    case $host_os in
 
2920
    rhapsody* | darwin1.[[012]])
 
2921
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
 
2922
    darwin1.*)
 
2923
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
2924
    darwin*) # darwin 5.x on
 
2925
      # if running on 10.5 or later, the deployment target defaults
 
2926
      # to the OS version, if on x86, and 10.4, the deployment
 
2927
      # target defaults to 10.4. Don't you love it?
 
2928
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 
2929
        10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
 
2930
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
2931
        10.[[012]]*)
 
2932
          _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
2933
        10.*)
 
2934
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
2935
      esac
 
2936
    ;;
 
2937
  esac
 
2938
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
 
2939
      _lt_dar_single_mod='$single_module'
 
2940
    fi
 
2941
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
 
2942
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
 
2943
    else
 
2944
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
2945
    fi
 
2946
    if test "$DSYMUTIL" != ":"; then
 
2947
      _lt_dsymutil='~$DSYMUTIL $lib || :'
 
2948
    else
 
2949
      _lt_dsymutil=
 
2950
    fi
 
2951
    ;;
 
2952
  esac
 
2953
])
 
2954
 
 
2955
 
 
2956
# _LT_DARWIN_LINKER_FEATURES
 
2957
# --------------------------
 
2958
# Checks for linker and compiler features on darwin
 
2959
m4_defun([_LT_DARWIN_LINKER_FEATURES],
 
2960
[
 
2961
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
 
2962
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
2963
  _LT_TAGVAR(hardcode_direct, $1)=no
 
2964
  _LT_TAGVAR(hardcode_automatic, $1)=yes
 
2965
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
2966
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
 
2967
  _LT_TAGVAR(link_all_deplibs, $1)=yes
 
2968
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
 
2969
  case $cc_basename in
 
2970
     ifort*) _lt_dar_can_shared=yes ;;
 
2971
     *) _lt_dar_can_shared=$GCC ;;
 
2972
  esac
 
2973
  if test "$_lt_dar_can_shared" = "yes"; then
 
2974
    output_verbose_link_cmd=echo
 
2975
    _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}"
 
2976
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
 
2977
    _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}"
 
2978
    _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}"
 
2979
    m4_if([$1], [CXX],
 
2980
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
 
2981
      _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}"
 
2982
      _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}"
 
2983
    fi
 
2984
],[])
 
2985
  else
 
2986
  _LT_TAGVAR(ld_shlibs, $1)=no
 
2987
  fi
 
2988
])
 
2989
 
 
2990
# _LT_SYS_MODULE_PATH_AIX
 
2991
# -----------------------
 
2992
# Links a minimal program and checks the executable
 
2993
# for the system default hardcoded library path. In most cases,
 
2994
# this is /usr/lib:/lib, but when the MPI compilers are used
 
2995
# the location of the communication and MPI libs are included too.
 
2996
# If we don't find anything, use the default library path according
 
2997
# to the aix ld manual.
 
2998
m4_defun([_LT_SYS_MODULE_PATH_AIX],
 
2999
[m4_require([_LT_DECL_SED])dnl
 
3000
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
3001
lt_aix_libpath_sed='
 
3002
    /Import File Strings/,/^$/ {
 
3003
        /^0/ {
 
3004
            s/^0  *\(.*\)$/\1/
 
3005
            p
 
3006
        }
 
3007
    }'
 
3008
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
3009
# Check for a 64-bit object if we didn't find anything.
 
3010
if test -z "$aix_libpath"; then
 
3011
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
3012
fi],[])
 
3013
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
3014
])# _LT_SYS_MODULE_PATH_AIX
 
3015
 
 
3016
 
 
3017
# _LT_SHELL_INIT(ARG)
 
3018
# -------------------
 
3019
m4_define([_LT_SHELL_INIT],
 
3020
[ifdef([AC_DIVERSION_NOTICE],
 
3021
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
3022
         [AC_DIVERT_PUSH(NOTICE)])
 
3023
$1
 
3024
AC_DIVERT_POP
 
3025
])# _LT_SHELL_INIT
 
3026
 
 
3027
 
 
3028
# _LT_PROG_ECHO_BACKSLASH
 
3029
# -----------------------
 
3030
# Add some code to the start of the generated configure script which
 
3031
# will find an echo command which doesn't interpret backslashes.
 
3032
m4_defun([_LT_PROG_ECHO_BACKSLASH],
 
3033
[_LT_SHELL_INIT([
 
3034
# Check that we are running under the correct shell.
 
3035
SHELL=${CONFIG_SHELL-/bin/sh}
 
3036
 
 
3037
case X$lt_ECHO in
 
3038
X*--fallback-echo)
 
3039
  # Remove one level of quotation (which was required for Make).
 
3040
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
3041
  ;;
 
3042
esac
 
3043
 
 
3044
ECHO=${lt_ECHO-echo}
 
3045
if test "X[$]1" = X--no-reexec; then
 
3046
  # Discard the --no-reexec flag, and continue.
 
3047
  shift
 
3048
elif test "X[$]1" = X--fallback-echo; then
 
3049
  # Avoid inline document here, it may be left over
 
3050
  :
 
3051
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
 
3052
  # Yippee, $ECHO works!
 
3053
  :
 
3054
else
 
3055
  # Restart under the correct shell.
 
3056
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
3057
fi
 
3058
 
 
3059
if test "X[$]1" = X--fallback-echo; then
 
3060
  # used as fallback echo
 
3061
  shift
 
3062
  cat <<_LT_EOF
 
3063
[$]*
 
3064
_LT_EOF
 
3065
  exit 0
 
3066
fi
 
3067
 
 
3068
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
3069
# if CDPATH is set.
 
3070
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
3071
 
 
3072
if test -z "$lt_ECHO"; then
 
3073
  if test "X${echo_test_string+set}" != Xset; then
 
3074
    # find a string as large as possible, as long as the shell can cope with it
 
3075
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
3076
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
3077
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
 
3078
         { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
 
3079
      then
 
3080
        break
 
3081
      fi
 
3082
    done
 
3083
  fi
 
3084
 
 
3085
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
 
3086
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
 
3087
     test "X$echo_testing_string" = "X$echo_test_string"; then
 
3088
    :
 
3089
  else
 
3090
    # The Solaris, AIX, and Digital Unix default echo programs unquote
 
3091
    # backslashes.  This makes it impossible to quote backslashes using
 
3092
    #   echo "$something" | sed 's/\\/\\\\/g'
 
3093
    #
 
3094
    # So, first we look for a working echo in the user's PATH.
 
3095
 
 
3096
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3097
    for dir in $PATH /usr/ucb; do
 
3098
      IFS="$lt_save_ifs"
 
3099
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
3100
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
3101
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
3102
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
3103
        ECHO="$dir/echo"
 
3104
        break
 
3105
      fi
 
3106
    done
 
3107
    IFS="$lt_save_ifs"
 
3108
 
 
3109
    if test "X$ECHO" = Xecho; then
 
3110
      # We didn't find a better echo, so look for alternatives.
 
3111
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
 
3112
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
 
3113
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
3114
        # This shell has a builtin print -r that does the trick.
 
3115
        ECHO='print -r'
 
3116
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
 
3117
           test "X$CONFIG_SHELL" != X/bin/ksh; then
 
3118
        # If we have ksh, try running configure again with it.
 
3119
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
3120
        export ORIGINAL_CONFIG_SHELL
 
3121
        CONFIG_SHELL=/bin/ksh
 
3122
        export CONFIG_SHELL
 
3123
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
3124
      else
 
3125
        # Try using printf.
 
3126
        ECHO='printf %s\n'
 
3127
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
 
3128
           echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
 
3129
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
3130
          # Cool, printf works
 
3131
          :
 
3132
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
3133
             test "X$echo_testing_string" = 'X\t' &&
 
3134
             echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
3135
             test "X$echo_testing_string" = "X$echo_test_string"; then
 
3136
          CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
3137
          export CONFIG_SHELL
 
3138
          SHELL="$CONFIG_SHELL"
 
3139
          export SHELL
 
3140
          ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
 
3141
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
3142
             test "X$echo_testing_string" = 'X\t' &&
 
3143
             echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
3144
             test "X$echo_testing_string" = "X$echo_test_string"; then
 
3145
          ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
 
3146
        else
 
3147
          # maybe with a smaller string...
 
3148
          prev=:
 
3149
 
 
3150
          for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
3151
            if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
 
3152
            then
 
3153
              break
 
3154
            fi
 
3155
            prev="$cmd"
 
3156
          done
 
3157
 
 
3158
          if test "$prev" != 'sed 50q "[$]0"'; then
 
3159
            echo_test_string=`eval $prev`
 
3160
            export echo_test_string
 
3161
            exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
3162
          else
 
3163
            # Oops.  We lost completely, so just stick with echo.
 
3164
            ECHO=echo
 
3165
          fi
 
3166
        fi
 
3167
      fi
 
3168
    fi
 
3169
  fi
 
3170
fi
 
3171
 
 
3172
# Copy echo and quote the copy suitably for passing to libtool from
 
3173
# the Makefile, instead of quoting the original, which is used later.
 
3174
lt_ECHO=$ECHO
 
3175
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
3176
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
3177
fi
 
3178
 
 
3179
AC_SUBST(lt_ECHO)
 
3180
])
 
3181
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
 
3182
_LT_DECL([], [ECHO], [1],
 
3183
    [An echo program that does not interpret backslashes])
 
3184
])# _LT_PROG_ECHO_BACKSLASH
 
3185
 
 
3186
 
 
3187
# _LT_ENABLE_LOCK
 
3188
# ---------------
 
3189
m4_defun([_LT_ENABLE_LOCK],
 
3190
[AC_ARG_ENABLE([libtool-lock],
 
3191
  [AS_HELP_STRING([--disable-libtool-lock],
 
3192
    [avoid locking (might break parallel builds)])])
 
3193
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
3194
 
 
3195
# Some flags need to be propagated to the compiler or linker for good
 
3196
# libtool support.
 
3197
case $host in
 
3198
ia64-*-hpux*)
 
3199
  # Find out which ABI we are using.
 
3200
  echo 'int i;' > conftest.$ac_ext
 
3201
  if AC_TRY_EVAL(ac_compile); then
 
3202
    case `/usr/bin/file conftest.$ac_objext` in
 
3203
      *ELF-32*)
 
3204
        HPUX_IA64_MODE="32"
 
3205
        ;;
 
3206
      *ELF-64*)
 
3207
        HPUX_IA64_MODE="64"
 
3208
        ;;
 
3209
    esac
 
3210
  fi
 
3211
  rm -rf conftest*
 
3212
  ;;
 
3213
*-*-irix6*)
 
3214
  # Find out which ABI we are using.
 
3215
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
3216
  if AC_TRY_EVAL(ac_compile); then
 
3217
    if test "$lt_cv_prog_gnu_ld" = yes; then
 
3218
      case `/usr/bin/file conftest.$ac_objext` in
 
3219
        *32-bit*)
 
3220
          LD="${LD-ld} -melf32bsmip"
 
3221
          ;;
 
3222
        *N32*)
 
3223
          LD="${LD-ld} -melf32bmipn32"
 
3224
          ;;
 
3225
        *64-bit*)
 
3226
          LD="${LD-ld} -melf64bmip"
 
3227
        ;;
 
3228
      esac
 
3229
    else
 
3230
      case `/usr/bin/file conftest.$ac_objext` in
 
3231
        *32-bit*)
 
3232
          LD="${LD-ld} -32"
 
3233
          ;;
 
3234
        *N32*)
 
3235
          LD="${LD-ld} -n32"
 
3236
          ;;
 
3237
        *64-bit*)
 
3238
          LD="${LD-ld} -64"
 
3239
          ;;
 
3240
      esac
 
3241
    fi
 
3242
  fi
 
3243
  rm -rf conftest*
 
3244
  ;;
 
3245
 
 
3246
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 
3247
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
3248
  # Find out which ABI we are using.
 
3249
  echo 'int i;' > conftest.$ac_ext
 
3250
  if AC_TRY_EVAL(ac_compile); then
 
3251
    case `/usr/bin/file conftest.o` in
 
3252
      *32-bit*)
 
3253
        case $host in
 
3254
          x86_64-*kfreebsd*-gnu)
 
3255
            LD="${LD-ld} -m elf_i386_fbsd"
 
3256
            ;;
 
3257
          x86_64-*linux*)
 
3258
            LD="${LD-ld} -m elf_i386"
 
3259
            ;;
 
3260
          ppc64-*linux*|powerpc64-*linux*)
 
3261
            LD="${LD-ld} -m elf32ppclinux"
 
3262
            ;;
 
3263
          s390x-*linux*)
 
3264
            LD="${LD-ld} -m elf_s390"
 
3265
            ;;
 
3266
          sparc64-*linux*)
 
3267
            LD="${LD-ld} -m elf32_sparc"
 
3268
            ;;
 
3269
        esac
 
3270
        ;;
 
3271
      *64-bit*)
 
3272
        case $host in
 
3273
          x86_64-*kfreebsd*-gnu)
 
3274
            LD="${LD-ld} -m elf_x86_64_fbsd"
 
3275
            ;;
 
3276
          x86_64-*linux*)
 
3277
            LD="${LD-ld} -m elf_x86_64"
 
3278
            ;;
 
3279
          ppc*-*linux*|powerpc*-*linux*)
 
3280
            LD="${LD-ld} -m elf64ppc"
 
3281
            ;;
 
3282
          s390*-*linux*|s390*-*tpf*)
 
3283
            LD="${LD-ld} -m elf64_s390"
 
3284
            ;;
 
3285
          sparc*-*linux*)
 
3286
            LD="${LD-ld} -m elf64_sparc"
 
3287
            ;;
 
3288
        esac
 
3289
        ;;
 
3290
    esac
 
3291
  fi
 
3292
  rm -rf conftest*
 
3293
  ;;
 
3294
 
 
3295
*-*-sco3.2v5*)
 
3296
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
3297
  SAVE_CFLAGS="$CFLAGS"
 
3298
  CFLAGS="$CFLAGS -belf"
 
3299
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
3300
    [AC_LANG_PUSH(C)
 
3301
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
3302
     AC_LANG_POP])
 
3303
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
3304
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
3305
    CFLAGS="$SAVE_CFLAGS"
 
3306
  fi
 
3307
  ;;
 
3308
sparc*-*solaris*)
 
3309
  # Find out which ABI we are using.
 
3310
  echo 'int i;' > conftest.$ac_ext
 
3311
  if AC_TRY_EVAL(ac_compile); then
 
3312
    case `/usr/bin/file conftest.o` in
 
3313
    *64-bit*)
 
3314
      case $lt_cv_prog_gnu_ld in
 
3315
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
3316
      *)
 
3317
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 
3318
          LD="${LD-ld} -64"
 
3319
        fi
 
3320
        ;;
 
3321
      esac
 
3322
      ;;
 
3323
    esac
 
3324
  fi
 
3325
  rm -rf conftest*
 
3326
  ;;
 
3327
esac
 
3328
 
 
3329
need_locks="$enable_libtool_lock"
 
3330
])# _LT_ENABLE_LOCK
 
3331
 
 
3332
 
 
3333
# _LT_CMD_OLD_ARCHIVE
 
3334
# -------------------
 
3335
m4_defun([_LT_CMD_OLD_ARCHIVE],
 
3336
[AC_CHECK_TOOL(AR, ar, false)
 
3337
test -z "$AR" && AR=ar
 
3338
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
3339
_LT_DECL([], [AR], [1], [The archiver])
 
3340
_LT_DECL([], [AR_FLAGS], [1])
 
3341
 
 
3342
AC_CHECK_TOOL(STRIP, strip, :)
 
3343
test -z "$STRIP" && STRIP=:
 
3344
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
 
3345
 
 
3346
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
3347
test -z "$RANLIB" && RANLIB=:
 
3348
_LT_DECL([], [RANLIB], [1],
 
3349
    [Commands used to install an old-style archive])
 
3350
 
 
3351
# Determine commands to create old-style static archives.
 
3352
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
 
3353
old_postinstall_cmds='chmod 644 $oldlib'
 
3354
old_postuninstall_cmds=
 
3355
 
 
3356
if test -n "$RANLIB"; then
 
3357
  case $host_os in
 
3358
  openbsd*)
 
3359
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
 
3360
    ;;
 
3361
  *)
 
3362
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
 
3363
    ;;
 
3364
  esac
 
3365
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
3366
fi
 
3367
_LT_DECL([], [old_postinstall_cmds], [2])
 
3368
_LT_DECL([], [old_postuninstall_cmds], [2])
 
3369
_LT_TAGDECL([], [old_archive_cmds], [2],
 
3370
    [Commands used to build an old-style archive])
 
3371
])# _LT_CMD_OLD_ARCHIVE
 
3372
 
 
3373
 
 
3374
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
3375
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
3376
# ----------------------------------------------------------------
 
3377
# Check whether the given compiler option works
 
3378
AC_DEFUN([_LT_COMPILER_OPTION],
 
3379
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
3380
m4_require([_LT_DECL_SED])dnl
 
3381
AC_CACHE_CHECK([$1], [$2],
 
3382
  [$2=no
 
3383
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
3384
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
3385
   lt_compiler_flag="$3"
 
3386
   # Insert the option either (1) after the last *FLAGS variable, or
 
3387
   # (2) before a word containing "conftest.", or (3) at the end.
 
3388
   # Note that $ac_compile itself does not contain backslashes and begins
 
3389
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
3390
   # The option is referenced via a variable to avoid confusing sed.
 
3391
   lt_compile=`echo "$ac_compile" | $SED \
 
3392
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
3393
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
3394
   -e 's:$: $lt_compiler_flag:'`
 
3395
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
3396
   (eval "$lt_compile" 2>conftest.err)
 
3397
   ac_status=$?
 
3398
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
3399
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
3400
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
3401
     # The compiler can only warn and ignore the option if not recognized
 
3402
     # So say no if there are warnings other than the usual output.
 
3403
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
 
3404
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
3405
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
 
3406
       $2=yes
 
3407
     fi
 
3408
   fi
 
3409
   $RM conftest*
 
3410
])
 
3411
 
 
3412
if test x"[$]$2" = xyes; then
 
3413
    m4_if([$5], , :, [$5])
 
3414
else
 
3415
    m4_if([$6], , :, [$6])
 
3416
fi
 
3417
])# _LT_COMPILER_OPTION
 
3418
 
 
3419
# Old name:
 
3420
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
 
3421
dnl aclocal-1.4 backwards compatibility:
 
3422
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
 
3423
 
 
3424
 
 
3425
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
3426
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
 
3427
# ----------------------------------------------------
 
3428
# Check whether the given linker option works
 
3429
AC_DEFUN([_LT_LINKER_OPTION],
 
3430
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
3431
m4_require([_LT_DECL_SED])dnl
 
3432
AC_CACHE_CHECK([$1], [$2],
 
3433
  [$2=no
 
3434
   save_LDFLAGS="$LDFLAGS"
 
3435
   LDFLAGS="$LDFLAGS $3"
 
3436
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
 
3437
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
3438
     # The linker can only warn and ignore the option if not recognized
 
3439
     # So say no if there are warnings
 
3440
     if test -s conftest.err; then
 
3441
       # Append any errors to the config.log.
 
3442
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
3443
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
 
3444
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
3445
       if diff conftest.exp conftest.er2 >/dev/null; then
 
3446
         $2=yes
 
3447
       fi
 
3448
     else
 
3449
       $2=yes
 
3450
     fi
 
3451
   fi
 
3452
   $RM -r conftest*
 
3453
   LDFLAGS="$save_LDFLAGS"
 
3454
])
 
3455
 
 
3456
if test x"[$]$2" = xyes; then
 
3457
    m4_if([$4], , :, [$4])
 
3458
else
 
3459
    m4_if([$5], , :, [$5])
 
3460
fi
 
3461
])# _LT_LINKER_OPTION
 
3462
 
 
3463
# Old name:
 
3464
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
 
3465
dnl aclocal-1.4 backwards compatibility:
 
3466
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
 
3467
 
 
3468
 
 
3469
# LT_CMD_MAX_LEN
 
3470
#---------------
 
3471
AC_DEFUN([LT_CMD_MAX_LEN],
 
3472
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3473
# find the maximum length of command line arguments
 
3474
AC_MSG_CHECKING([the maximum length of command line arguments])
 
3475
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
3476
  i=0
 
3477
  teststring="ABCD"
 
3478
 
 
3479
  case $build_os in
 
3480
  msdosdjgpp*)
 
3481
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
3482
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
3483
    # during glob expansion).  Even if it were fixed, the result of this
 
3484
    # check would be larger than it should be.
 
3485
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
3486
    ;;
 
3487
 
 
3488
  gnu*)
 
3489
    # Under GNU Hurd, this test is not required because there is
 
3490
    # no limit to the length of command line arguments.
 
3491
    # Libtool will interpret -1 as no limit whatsoever
 
3492
    lt_cv_sys_max_cmd_len=-1;
 
3493
    ;;
 
3494
 
 
3495
  cygwin* | mingw* | cegcc*)
 
3496
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
3497
    # about 5 minutes as the teststring grows exponentially.
 
3498
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
3499
    # you end up with a "frozen" computer, even though with patience
 
3500
    # the test eventually succeeds (with a max line length of 256k).
 
3501
    # Instead, let's just punt: use the minimum linelength reported by
 
3502
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
3503
    lt_cv_sys_max_cmd_len=8192;
 
3504
    ;;
 
3505
 
 
3506
  amigaos*)
 
3507
    # On AmigaOS with pdksh, this test takes hours, literally.
 
3508
    # So we just punt and use a minimum line length of 8192.
 
3509
    lt_cv_sys_max_cmd_len=8192;
 
3510
    ;;
 
3511
 
 
3512
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
3513
    # This has been around since 386BSD, at least.  Likely further.
 
3514
    if test -x /sbin/sysctl; then
 
3515
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
3516
    elif test -x /usr/sbin/sysctl; then
 
3517
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
3518
    else
 
3519
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
3520
    fi
 
3521
    # And add a safety zone
 
3522
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
3523
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
3524
    ;;
 
3525
 
 
3526
  interix*)
 
3527
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
 
3528
    lt_cv_sys_max_cmd_len=196608
 
3529
    ;;
 
3530
 
 
3531
  osf*)
 
3532
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
3533
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
3534
    # nice to cause kernel panics so lets avoid the loop below.
 
3535
    # First set a reasonable default.
 
3536
    lt_cv_sys_max_cmd_len=16384
 
3537
    #
 
3538
    if test -x /sbin/sysconfig; then
 
3539
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
3540
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
3541
      esac
 
3542
    fi
 
3543
    ;;
 
3544
  sco3.2v5*)
 
3545
    lt_cv_sys_max_cmd_len=102400
 
3546
    ;;
 
3547
  sysv5* | sco5v6* | sysv4.2uw2*)
 
3548
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
 
3549
    if test -n "$kargmax"; then
 
3550
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
 
3551
    else
 
3552
      lt_cv_sys_max_cmd_len=32768
 
3553
    fi
 
3554
    ;;
 
3555
  *)
 
3556
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
 
3557
    if test -n "$lt_cv_sys_max_cmd_len"; then
 
3558
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
3559
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
3560
    else
 
3561
      # Make teststring a little bigger before we do anything with it.
 
3562
      # a 1K string should be a reasonable start.
 
3563
      for i in 1 2 3 4 5 6 7 8 ; do
 
3564
        teststring=$teststring$teststring
 
3565
      done
 
3566
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
3567
      # If test is not a shell built-in, we'll probably end up computing a
 
3568
      # maximum length that is only half of the actual maximum length, but
 
3569
      # we can't tell.
 
3570
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
 
3571
                 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
 
3572
              test $i != 17 # 1/2 MB should be enough
 
3573
      do
 
3574
        i=`expr $i + 1`
 
3575
        teststring=$teststring$teststring
 
3576
      done
 
3577
      # Only check the string length outside the loop.
 
3578
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
 
3579
      teststring=
 
3580
      # Add a significant safety factor because C++ compilers can tack on
 
3581
      # massive amounts of additional arguments before passing them to the
 
3582
      # linker.  It appears as though 1/2 is a usable value.
 
3583
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
3584
    fi
 
3585
    ;;
 
3586
  esac
 
3587
])
 
3588
if test -n $lt_cv_sys_max_cmd_len ; then
 
3589
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
3590
else
 
3591
  AC_MSG_RESULT(none)
 
3592
fi
 
3593
max_cmd_len=$lt_cv_sys_max_cmd_len
 
3594
_LT_DECL([], [max_cmd_len], [0],
 
3595
    [What is the maximum length of a command?])
 
3596
])# LT_CMD_MAX_LEN
 
3597
 
 
3598
# Old name:
 
3599
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
 
3600
dnl aclocal-1.4 backwards compatibility:
 
3601
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
 
3602
 
 
3603
 
 
3604
# _LT_HEADER_DLFCN
 
3605
# ----------------
 
3606
m4_defun([_LT_HEADER_DLFCN],
 
3607
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
 
3608
])# _LT_HEADER_DLFCN
 
3609
 
 
3610
 
 
3611
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
3612
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
3613
# ----------------------------------------------------------------
 
3614
m4_defun([_LT_TRY_DLOPEN_SELF],
 
3615
[m4_require([_LT_HEADER_DLFCN])dnl
 
3616
if test "$cross_compiling" = yes; then :
 
3617
  [$4]
 
3618
else
 
3619
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
3620
  lt_status=$lt_dlunknown
 
3621
  cat > conftest.$ac_ext <<_LT_EOF
 
3622
[#line __oline__ "configure"
 
3623
#include "confdefs.h"
 
3624
 
 
3625
#if HAVE_DLFCN_H
 
3626
#include <dlfcn.h>
 
3627
#endif
 
3628
 
 
3629
#include <stdio.h>
 
3630
 
 
3631
#ifdef RTLD_GLOBAL
 
3632
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
3633
#else
 
3634
#  ifdef DL_GLOBAL
 
3635
#    define LT_DLGLOBAL         DL_GLOBAL
 
3636
#  else
 
3637
#    define LT_DLGLOBAL         0
 
3638
#  endif
 
3639
#endif
 
3640
 
 
3641
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
3642
   find out it does not work in some platform. */
 
3643
#ifndef LT_DLLAZY_OR_NOW
 
3644
#  ifdef RTLD_LAZY
 
3645
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
3646
#  else
 
3647
#    ifdef DL_LAZY
 
3648
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
3649
#    else
 
3650
#      ifdef RTLD_NOW
 
3651
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
3652
#      else
 
3653
#        ifdef DL_NOW
 
3654
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
3655
#        else
 
3656
#          define LT_DLLAZY_OR_NOW      0
 
3657
#        endif
 
3658
#      endif
 
3659
#    endif
 
3660
#  endif
 
3661
#endif
 
3662
 
 
3663
void fnord() { int i=42;}
 
3664
int main ()
 
3665
{
 
3666
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
3667
  int status = $lt_dlunknown;
 
3668
 
 
3669
  if (self)
 
3670
    {
 
3671
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
3672
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
3673
      /* dlclose (self); */
 
3674
    }
 
3675
  else
 
3676
    puts (dlerror ());
 
3677
 
 
3678
  return status;
 
3679
}]
 
3680
_LT_EOF
 
3681
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
3682
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
 
3683
    lt_status=$?
 
3684
    case x$lt_status in
 
3685
      x$lt_dlno_uscore) $1 ;;
 
3686
      x$lt_dlneed_uscore) $2 ;;
 
3687
      x$lt_dlunknown|x*) $3 ;;
 
3688
    esac
 
3689
  else :
 
3690
    # compilation failed
 
3691
    $3
 
3692
  fi
 
3693
fi
 
3694
rm -fr conftest*
 
3695
])# _LT_TRY_DLOPEN_SELF
 
3696
 
 
3697
 
 
3698
# LT_SYS_DLOPEN_SELF
 
3699
# ------------------
 
3700
AC_DEFUN([LT_SYS_DLOPEN_SELF],
 
3701
[m4_require([_LT_HEADER_DLFCN])dnl
 
3702
if test "x$enable_dlopen" != xyes; then
 
3703
  enable_dlopen=unknown
 
3704
  enable_dlopen_self=unknown
 
3705
  enable_dlopen_self_static=unknown
 
3706
else
 
3707
  lt_cv_dlopen=no
 
3708
  lt_cv_dlopen_libs=
 
3709
 
 
3710
  case $host_os in
 
3711
  beos*)
 
3712
    lt_cv_dlopen="load_add_on"
 
3713
    lt_cv_dlopen_libs=
 
3714
    lt_cv_dlopen_self=yes
 
3715
    ;;
 
3716
 
 
3717
  mingw* | pw32* | cegcc*)
 
3718
    lt_cv_dlopen="LoadLibrary"
 
3719
    lt_cv_dlopen_libs=
 
3720
    ;;
 
3721
 
 
3722
  cygwin*)
 
3723
    lt_cv_dlopen="dlopen"
 
3724
    lt_cv_dlopen_libs=
 
3725
    ;;
 
3726
 
 
3727
  darwin*)
 
3728
  # if libdl is installed we need to link against it
 
3729
    AC_CHECK_LIB([dl], [dlopen],
 
3730
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
3731
    lt_cv_dlopen="dyld"
 
3732
    lt_cv_dlopen_libs=
 
3733
    lt_cv_dlopen_self=yes
 
3734
    ])
 
3735
    ;;
 
3736
 
 
3737
  *)
 
3738
    AC_CHECK_FUNC([shl_load],
 
3739
          [lt_cv_dlopen="shl_load"],
 
3740
      [AC_CHECK_LIB([dld], [shl_load],
 
3741
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
 
3742
        [AC_CHECK_FUNC([dlopen],
 
3743
              [lt_cv_dlopen="dlopen"],
 
3744
          [AC_CHECK_LIB([dl], [dlopen],
 
3745
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
3746
            [AC_CHECK_LIB([svld], [dlopen],
 
3747
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
3748
              [AC_CHECK_LIB([dld], [dld_link],
 
3749
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
 
3750
              ])
 
3751
            ])
 
3752
          ])
 
3753
        ])
 
3754
      ])
 
3755
    ;;
 
3756
  esac
 
3757
 
 
3758
  if test "x$lt_cv_dlopen" != xno; then
 
3759
    enable_dlopen=yes
 
3760
  else
 
3761
    enable_dlopen=no
 
3762
  fi
 
3763
 
 
3764
  case $lt_cv_dlopen in
 
3765
  dlopen)
 
3766
    save_CPPFLAGS="$CPPFLAGS"
 
3767
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
3768
 
 
3769
    save_LDFLAGS="$LDFLAGS"
 
3770
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
3771
 
 
3772
    save_LIBS="$LIBS"
 
3773
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
3774
 
 
3775
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
3776
          lt_cv_dlopen_self, [dnl
 
3777
          _LT_TRY_DLOPEN_SELF(
 
3778
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
3779
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
3780
    ])
 
3781
 
 
3782
    if test "x$lt_cv_dlopen_self" = xyes; then
 
3783
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
 
3784
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
3785
          lt_cv_dlopen_self_static, [dnl
 
3786
          _LT_TRY_DLOPEN_SELF(
 
3787
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
3788
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
3789
      ])
 
3790
    fi
 
3791
 
 
3792
    CPPFLAGS="$save_CPPFLAGS"
 
3793
    LDFLAGS="$save_LDFLAGS"
 
3794
    LIBS="$save_LIBS"
 
3795
    ;;
 
3796
  esac
 
3797
 
 
3798
  case $lt_cv_dlopen_self in
 
3799
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
3800
  *) enable_dlopen_self=unknown ;;
 
3801
  esac
 
3802
 
 
3803
  case $lt_cv_dlopen_self_static in
 
3804
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
3805
  *) enable_dlopen_self_static=unknown ;;
 
3806
  esac
 
3807
fi
 
3808
_LT_DECL([dlopen_support], [enable_dlopen], [0],
 
3809
         [Whether dlopen is supported])
 
3810
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
 
3811
         [Whether dlopen of programs is supported])
 
3812
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
 
3813
         [Whether dlopen of statically linked programs is supported])
 
3814
])# LT_SYS_DLOPEN_SELF
 
3815
 
 
3816
# Old name:
 
3817
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
 
3818
dnl aclocal-1.4 backwards compatibility:
 
3819
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
 
3820
 
 
3821
 
 
3822
# _LT_COMPILER_C_O([TAGNAME])
 
3823
# ---------------------------
 
3824
# Check to see if options -c and -o are simultaneously supported by compiler.
 
3825
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
 
3826
m4_defun([_LT_COMPILER_C_O],
 
3827
[m4_require([_LT_DECL_SED])dnl
 
3828
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
3829
m4_require([_LT_TAG_COMPILER])dnl
 
3830
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
3831
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
3832
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
3833
   $RM -r conftest 2>/dev/null
 
3834
   mkdir conftest
 
3835
   cd conftest
 
3836
   mkdir out
 
3837
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
3838
 
 
3839
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
3840
   # Insert the option either (1) after the last *FLAGS variable, or
 
3841
   # (2) before a word containing "conftest.", or (3) at the end.
 
3842
   # Note that $ac_compile itself does not contain backslashes and begins
 
3843
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
3844
   lt_compile=`echo "$ac_compile" | $SED \
 
3845
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
3846
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
3847
   -e 's:$: $lt_compiler_flag:'`
 
3848
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
3849
   (eval "$lt_compile" 2>out/conftest.err)
 
3850
   ac_status=$?
 
3851
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
3852
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
3853
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
3854
   then
 
3855
     # The compiler can only warn and ignore the option if not recognized
 
3856
     # So say no if there are warnings
 
3857
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
 
3858
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
 
3859
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
3860
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
3861
     fi
 
3862
   fi
 
3863
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
 
3864
   $RM conftest*
 
3865
   # SGI C++ compiler will create directory out/ii_files/ for
 
3866
   # template instantiation
 
3867
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
 
3868
   $RM out/* && rmdir out
 
3869
   cd ..
 
3870
   $RM -r conftest
 
3871
   $RM conftest*
 
3872
])
 
3873
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
 
3874
        [Does compiler simultaneously support -c and -o options?])
 
3875
])# _LT_COMPILER_C_O
 
3876
 
 
3877
 
 
3878
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
 
3879
# ----------------------------------
 
3880
# Check to see if we can do hard links to lock some files if needed
 
3881
m4_defun([_LT_COMPILER_FILE_LOCKS],
 
3882
[m4_require([_LT_ENABLE_LOCK])dnl
 
3883
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
3884
_LT_COMPILER_C_O([$1])
 
3885
 
 
3886
hard_links="nottested"
 
3887
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
3888
  # do not overwrite the value of need_locks provided by the user
 
3889
  AC_MSG_CHECKING([if we can lock with hard links])
 
3890
  hard_links=yes
 
3891
  $RM conftest*
 
3892
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
3893
  touch conftest.a
 
3894
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
3895
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
3896
  AC_MSG_RESULT([$hard_links])
 
3897
  if test "$hard_links" = no; then
 
3898
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
3899
    need_locks=warn
 
3900
  fi
 
3901
else
 
3902
  need_locks=no
 
3903
fi
 
3904
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
 
3905
])# _LT_COMPILER_FILE_LOCKS
 
3906
 
 
3907
 
 
3908
# _LT_CHECK_OBJDIR
 
3909
# ----------------
 
3910
m4_defun([_LT_CHECK_OBJDIR],
 
3911
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
3912
[rm -f .libs 2>/dev/null
 
3913
mkdir .libs 2>/dev/null
 
3914
if test -d .libs; then
 
3915
  lt_cv_objdir=.libs
 
3916
else
 
3917
  # MS-DOS does not allow filenames that begin with a dot.
 
3918
  lt_cv_objdir=_libs
 
3919
fi
 
3920
rmdir .libs 2>/dev/null])
 
3921
objdir=$lt_cv_objdir
 
3922
_LT_DECL([], [objdir], [0],
 
3923
         [The name of the directory that contains temporary libtool files])dnl
 
3924
m4_pattern_allow([LT_OBJDIR])dnl
 
3925
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
 
3926
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
 
3927
])# _LT_CHECK_OBJDIR
 
3928
 
 
3929
 
 
3930
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
 
3931
# --------------------------------------
 
3932
# Check hardcoding attributes.
 
3933
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 
3934
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
3935
_LT_TAGVAR(hardcode_action, $1)=
 
3936
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
 
3937
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
 
3938
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
3939
 
 
3940
  # We can hardcode non-existent directories.
 
3941
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
 
3942
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
3943
     # have to relink, otherwise we might link with an installed library
 
3944
     # when we should be linking with a yet-to-be-installed one
 
3945
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
3946
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
 
3947
    # Linking always hardcodes the temporary library directory.
 
3948
    _LT_TAGVAR(hardcode_action, $1)=relink
 
3949
  else
 
3950
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
3951
    _LT_TAGVAR(hardcode_action, $1)=immediate
 
3952
  fi
 
3953
else
 
3954
  # We cannot hardcode anything, or else we can only hardcode existing
 
3955
  # directories.
 
3956
  _LT_TAGVAR(hardcode_action, $1)=unsupported
 
3957
fi
 
3958
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
3959
 
 
3960
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
 
3961
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
 
3962
  # Fast installation is not supported
 
3963
  enable_fast_install=no
 
3964
elif test "$shlibpath_overrides_runpath" = yes ||
 
3965
     test "$enable_shared" = no; then
 
3966
  # Fast installation is not necessary
 
3967
  enable_fast_install=needless
 
3968
fi
 
3969
_LT_TAGDECL([], [hardcode_action], [0],
 
3970
    [How to hardcode a shared library path into an executable])
 
3971
])# _LT_LINKER_HARDCODE_LIBPATH
 
3972
 
 
3973
 
 
3974
# _LT_CMD_STRIPLIB
 
3975
# ----------------
 
3976
m4_defun([_LT_CMD_STRIPLIB],
 
3977
[m4_require([_LT_DECL_EGREP])
 
3978
striplib=
 
3979
old_striplib=
 
3980
AC_MSG_CHECKING([whether stripping libraries is possible])
 
3981
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
 
3982
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
3983
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
3984
  AC_MSG_RESULT([yes])
 
3985
else
 
3986
# FIXME - insert some real tests, host_os isn't really good enough
 
3987
  case $host_os in
 
3988
  darwin*)
 
3989
    if test -n "$STRIP" ; then
 
3990
      striplib="$STRIP -x"
 
3991
      old_striplib="$STRIP -S"
 
3992
      AC_MSG_RESULT([yes])
 
3993
    else
 
3994
      AC_MSG_RESULT([no])
 
3995
    fi
 
3996
    ;;
 
3997
  *)
 
3998
    AC_MSG_RESULT([no])
 
3999
    ;;
 
4000
  esac
 
4001
fi
 
4002
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 
4003
_LT_DECL([], [striplib], [1])
 
4004
])# _LT_CMD_STRIPLIB
 
4005
 
 
4006
 
 
4007
# _LT_SYS_DYNAMIC_LINKER([TAG])
 
4008
# -----------------------------
 
4009
# PORTME Fill in your ld.so characteristics
 
4010
m4_defun([_LT_SYS_DYNAMIC_LINKER],
 
4011
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
4012
m4_require([_LT_DECL_EGREP])dnl
 
4013
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
4014
m4_require([_LT_DECL_OBJDUMP])dnl
 
4015
m4_require([_LT_DECL_SED])dnl
 
4016
AC_MSG_CHECKING([dynamic linker characteristics])
 
4017
m4_if([$1],
 
4018
        [], [
 
4019
if test "$GCC" = yes; then
 
4020
  case $host_os in
 
4021
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
 
4022
    *) lt_awk_arg="/^libraries:/" ;;
 
4023
  esac
 
4024
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
4025
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
 
4026
    # if the path contains ";" then we assume it to be the separator
 
4027
    # otherwise default to the standard path separator (i.e. ":") - it is
 
4028
    # assumed that no part of a normal pathname contains ";" but that should
 
4029
    # okay in the real world where ";" in dirpaths is itself problematic.
 
4030
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
 
4031
  else
 
4032
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
4033
  fi
 
4034
  # Ok, now we have the path, separated by spaces, we can step through it
 
4035
  # and add multilib dir if necessary.
 
4036
  lt_tmp_lt_search_path_spec=
 
4037
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
 
4038
  for lt_sys_path in $lt_search_path_spec; do
 
4039
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
 
4040
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
 
4041
    else
 
4042
      test -d "$lt_sys_path" && \
 
4043
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
 
4044
    fi
 
4045
  done
 
4046
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
 
4047
BEGIN {RS=" "; FS="/|\n";} {
 
4048
  lt_foo="";
 
4049
  lt_count=0;
 
4050
  for (lt_i = NF; lt_i > 0; lt_i--) {
 
4051
    if ($lt_i != "" && $lt_i != ".") {
 
4052
      if ($lt_i == "..") {
 
4053
        lt_count++;
 
4054
      } else {
 
4055
        if (lt_count == 0) {
 
4056
          lt_foo="/" $lt_i lt_foo;
 
4057
        } else {
 
4058
          lt_count--;
 
4059
        }
 
4060
      }
 
4061
    }
 
4062
  }
 
4063
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
 
4064
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 
4065
}'`
 
4066
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
 
4067
else
 
4068
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
4069
fi])
 
4070
library_names_spec=
 
4071
libname_spec='lib$name'
 
4072
soname_spec=
 
4073
shrext_cmds=".so"
 
4074
postinstall_cmds=
 
4075
postuninstall_cmds=
 
4076
finish_cmds=
 
4077
finish_eval=
 
4078
shlibpath_var=
 
4079
shlibpath_overrides_runpath=unknown
 
4080
version_type=none
 
4081
dynamic_linker="$host_os ld.so"
 
4082
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
4083
need_lib_prefix=unknown
 
4084
hardcode_into_libs=no
 
4085
 
 
4086
# when you set need_version to no, make sure it does not cause -set_version
 
4087
# flags to be left without arguments
 
4088
need_version=unknown
 
4089
 
 
4090
case $host_os in
 
4091
aix3*)
 
4092
  version_type=linux
 
4093
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
4094
  shlibpath_var=LIBPATH
 
4095
 
 
4096
  # AIX 3 has no versioning support, so we append a major version to the name.
 
4097
  soname_spec='${libname}${release}${shared_ext}$major'
 
4098
  ;;
 
4099
 
 
4100
aix[[4-9]]*)
 
4101
  version_type=linux
 
4102
  need_lib_prefix=no
 
4103
  need_version=no
 
4104
  hardcode_into_libs=yes
 
4105
  if test "$host_cpu" = ia64; then
 
4106
    # AIX 5 supports IA64
 
4107
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
4108
    shlibpath_var=LD_LIBRARY_PATH
 
4109
  else
 
4110
    # With GCC up to 2.95.x, collect2 would create an import file
 
4111
    # for dependence libraries.  The import file would start with
 
4112
    # the line `#! .'.  This would cause the generated library to
 
4113
    # depend on `.', always an invalid library.  This was fixed in
 
4114
    # development snapshots of GCC prior to 3.0.
 
4115
    case $host_os in
 
4116
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
4117
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
4118
           echo ' yes '
 
4119
           echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 
4120
        :
 
4121
      else
 
4122
        can_build_shared=no
 
4123
      fi
 
4124
      ;;
 
4125
    esac
 
4126
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
4127
    # soname into executable. Probably we can add versioning support to
 
4128
    # collect2, so additional links can be useful in future.
 
4129
    if test "$aix_use_runtimelinking" = yes; then
 
4130
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
4131
      # instead of lib<name>.a to let people know that these are not
 
4132
      # typical AIX shared libraries.
 
4133
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4134
    else
 
4135
      # We preserve .a as extension for shared libraries through AIX4.2
 
4136
      # and later when we are not doing run time linking.
 
4137
      library_names_spec='${libname}${release}.a $libname.a'
 
4138
      soname_spec='${libname}${release}${shared_ext}$major'
 
4139
    fi
 
4140
    shlibpath_var=LIBPATH
 
4141
  fi
 
4142
  ;;
 
4143
 
 
4144
amigaos*)
 
4145
  case $host_cpu in
 
4146
  powerpc)
 
4147
    # Since July 2007 AmigaOS4 officially supports .so libraries.
 
4148
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
 
4149
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4150
    ;;
 
4151
  m68k)
 
4152
    library_names_spec='$libname.ixlibrary $libname.a'
 
4153
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
4154
    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
 
4155
    ;;
 
4156
  esac
 
4157
  ;;
 
4158
 
 
4159
beos*)
 
4160
  library_names_spec='${libname}${shared_ext}'
 
4161
  dynamic_linker="$host_os ld.so"
 
4162
  shlibpath_var=LIBRARY_PATH
 
4163
  ;;
 
4164
 
 
4165
bsdi[[45]]*)
 
4166
  version_type=linux
 
4167
  need_version=no
 
4168
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4169
  soname_spec='${libname}${release}${shared_ext}$major'
 
4170
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
4171
  shlibpath_var=LD_LIBRARY_PATH
 
4172
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
4173
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
4174
  # the default ld.so.conf also contains /usr/contrib/lib and
 
4175
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
4176
  # libtool to hard-code these into programs
 
4177
  ;;
 
4178
 
 
4179
cygwin* | mingw* | pw32* | cegcc*)
 
4180
  version_type=windows
 
4181
  shrext_cmds=".dll"
 
4182
  need_version=no
 
4183
  need_lib_prefix=no
 
4184
 
 
4185
  case $GCC,$host_os in
 
4186
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
 
4187
    library_names_spec='$libname.dll.a'
 
4188
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
4189
    postinstall_cmds='base_file=`basename \${file}`~
 
4190
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
 
4191
      dldir=$destdir/`dirname \$dlpath`~
 
4192
      test -d \$dldir || mkdir -p \$dldir~
 
4193
      $install_prog $dir/$dlname \$dldir/$dlname~
 
4194
      chmod a+x \$dldir/$dlname~
 
4195
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
 
4196
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
 
4197
      fi'
 
4198
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
4199
      dlpath=$dir/\$dldll~
 
4200
       $RM \$dlpath'
 
4201
    shlibpath_overrides_runpath=yes
 
4202
 
 
4203
    case $host_os in
 
4204
    cygwin*)
 
4205
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
4206
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
4207
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
4208
      ;;
 
4209
    mingw* | cegcc*)
 
4210
      # MinGW DLLs use traditional 'lib' prefix
 
4211
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
4212
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
4213
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
 
4214
        # It is most probably a Windows format PATH printed by
 
4215
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
4216
        # path with ; separators, and with drive letters. We can handle the
 
4217
        # drive letters (cygwin fileutils understands them), so leave them,
 
4218
        # especially as we might pass files found there to a mingw objdump,
 
4219
        # which wouldn't understand a cygwinified path. Ahh.
 
4220
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
4221
      else
 
4222
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
4223
      fi
 
4224
      ;;
 
4225
    pw32*)
 
4226
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
4227
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
4228
      ;;
 
4229
    esac
 
4230
    ;;
 
4231
 
 
4232
  *)
 
4233
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
4234
    ;;
 
4235
  esac
 
4236
  dynamic_linker='Win32 ld.exe'
 
4237
  # FIXME: first we should search . and the directory the executable is in
 
4238
  shlibpath_var=PATH
 
4239
  ;;
 
4240
 
 
4241
darwin* | rhapsody*)
 
4242
  dynamic_linker="$host_os dyld"
 
4243
  version_type=darwin
 
4244
  need_lib_prefix=no
 
4245
  need_version=no
 
4246
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
4247
  soname_spec='${libname}${release}${major}$shared_ext'
 
4248
  shlibpath_overrides_runpath=yes
 
4249
  shlibpath_var=DYLD_LIBRARY_PATH
 
4250
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
4251
m4_if([$1], [],[
 
4252
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
 
4253
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
4254
  ;;
 
4255
 
 
4256
dgux*)
 
4257
  version_type=linux
 
4258
  need_lib_prefix=no
 
4259
  need_version=no
 
4260
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
4261
  soname_spec='${libname}${release}${shared_ext}$major'
 
4262
  shlibpath_var=LD_LIBRARY_PATH
 
4263
  ;;
 
4264
 
 
4265
freebsd1*)
 
4266
  dynamic_linker=no
 
4267
  ;;
 
4268
 
 
4269
freebsd* | dragonfly*)
 
4270
  # DragonFly does not have aout.  When/if they implement a new
 
4271
  # versioning mechanism, adjust this.
 
4272
  if test -x /usr/bin/objformat; then
 
4273
    objformat=`/usr/bin/objformat`
 
4274
  else
 
4275
    case $host_os in
 
4276
    freebsd[[123]]*) objformat=aout ;;
 
4277
    *) objformat=elf ;;
 
4278
    esac
 
4279
  fi
 
4280
  version_type=freebsd-$objformat
 
4281
  case $version_type in
 
4282
    freebsd-elf*)
 
4283
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
4284
      need_version=no
 
4285
      need_lib_prefix=no
 
4286
      ;;
 
4287
    freebsd-*)
 
4288
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
4289
      need_version=yes
 
4290
      ;;
 
4291
  esac
 
4292
  shlibpath_var=LD_LIBRARY_PATH
 
4293
  case $host_os in
 
4294
  freebsd2*)
 
4295
    shlibpath_overrides_runpath=yes
 
4296
    ;;
 
4297
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
4298
    shlibpath_overrides_runpath=yes
 
4299
    hardcode_into_libs=yes
 
4300
    ;;
 
4301
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
 
4302
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
 
4303
    shlibpath_overrides_runpath=no
 
4304
    hardcode_into_libs=yes
 
4305
    ;;
 
4306
  *) # from 4.6 on, and DragonFly
 
4307
    shlibpath_overrides_runpath=yes
 
4308
    hardcode_into_libs=yes
 
4309
    ;;
 
4310
  esac
 
4311
  ;;
 
4312
 
 
4313
gnu*)
 
4314
  version_type=linux
 
4315
  need_lib_prefix=no
 
4316
  need_version=no
 
4317
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
4318
  soname_spec='${libname}${release}${shared_ext}$major'
 
4319
  shlibpath_var=LD_LIBRARY_PATH
 
4320
  hardcode_into_libs=yes
 
4321
  ;;
 
4322
 
 
4323
hpux9* | hpux10* | hpux11*)
 
4324
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
4325
  # link against other versions.
 
4326
  version_type=sunos
 
4327
  need_lib_prefix=no
 
4328
  need_version=no
 
4329
  case $host_cpu in
 
4330
  ia64*)
 
4331
    shrext_cmds='.so'
 
4332
    hardcode_into_libs=yes
 
4333
    dynamic_linker="$host_os dld.so"
 
4334
    shlibpath_var=LD_LIBRARY_PATH
 
4335
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
4336
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4337
    soname_spec='${libname}${release}${shared_ext}$major'
 
4338
    if test "X$HPUX_IA64_MODE" = X32; then
 
4339
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
4340
    else
 
4341
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
4342
    fi
 
4343
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
4344
    ;;
 
4345
  hppa*64*)
 
4346
    shrext_cmds='.sl'
 
4347
    hardcode_into_libs=yes
 
4348
    dynamic_linker="$host_os dld.sl"
 
4349
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
4350
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
4351
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4352
    soname_spec='${libname}${release}${shared_ext}$major'
 
4353
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
4354
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
4355
    ;;
 
4356
  *)
 
4357
    shrext_cmds='.sl'
 
4358
    dynamic_linker="$host_os dld.sl"
 
4359
    shlibpath_var=SHLIB_PATH
 
4360
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
4361
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4362
    soname_spec='${libname}${release}${shared_ext}$major'
 
4363
    ;;
 
4364
  esac
 
4365
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
4366
  postinstall_cmds='chmod 555 $lib'
 
4367
  ;;
 
4368
 
 
4369
interix[[3-9]]*)
 
4370
  version_type=linux
 
4371
  need_lib_prefix=no
 
4372
  need_version=no
 
4373
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
4374
  soname_spec='${libname}${release}${shared_ext}$major'
 
4375
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
 
4376
  shlibpath_var=LD_LIBRARY_PATH
 
4377
  shlibpath_overrides_runpath=no
 
4378
  hardcode_into_libs=yes
 
4379
  ;;
 
4380
 
 
4381
irix5* | irix6* | nonstopux*)
 
4382
  case $host_os in
 
4383
    nonstopux*) version_type=nonstopux ;;
 
4384
    *)
 
4385
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
4386
                version_type=linux
 
4387
        else
 
4388
                version_type=irix
 
4389
        fi ;;
 
4390
  esac
 
4391
  need_lib_prefix=no
 
4392
  need_version=no
 
4393
  soname_spec='${libname}${release}${shared_ext}$major'
 
4394
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
4395
  case $host_os in
 
4396
  irix5* | nonstopux*)
 
4397
    libsuff= shlibsuff=
 
4398
    ;;
 
4399
  *)
 
4400
    case $LD in # libtool.m4 will add one of these switches to LD
 
4401
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
4402
      libsuff= shlibsuff= libmagic=32-bit;;
 
4403
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
4404
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
4405
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
4406
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
4407
    *) libsuff= shlibsuff= libmagic=never-match;;
 
4408
    esac
 
4409
    ;;
 
4410
  esac
 
4411
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
4412
  shlibpath_overrides_runpath=no
 
4413
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
4414
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
4415
  hardcode_into_libs=yes
 
4416
  ;;
 
4417
 
 
4418
# No shared lib support for Linux oldld, aout, or coff.
 
4419
linux*oldld* | linux*aout* | linux*coff*)
 
4420
  dynamic_linker=no
 
4421
  ;;
 
4422
 
 
4423
# This must be Linux ELF.
 
4424
linux* | k*bsd*-gnu)
 
4425
  version_type=linux
 
4426
  need_lib_prefix=no
 
4427
  need_version=no
 
4428
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4429
  soname_spec='${libname}${release}${shared_ext}$major'
 
4430
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
4431
  shlibpath_var=LD_LIBRARY_PATH
 
4432
  shlibpath_overrides_runpath=no
 
4433
  # Some binutils ld are patched to set DT_RUNPATH
 
4434
  save_LDFLAGS=$LDFLAGS
 
4435
  save_libdir=$libdir
 
4436
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
 
4437
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
 
4438
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
4439
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
 
4440
       [shlibpath_overrides_runpath=yes])])
 
4441
  LDFLAGS=$save_LDFLAGS
 
4442
  libdir=$save_libdir
 
4443
 
 
4444
  # This implies no fast_install, which is unacceptable.
 
4445
  # Some rework will be needed to allow for fast_install
 
4446
  # before this can be enabled.
 
4447
  hardcode_into_libs=yes
 
4448
 
 
4449
  # Add ABI-specific directories to the system library path.
 
4450
  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
 
4451
 
 
4452
  # Append ld.so.conf contents to the search path
 
4453
  if test -f /etc/ld.so.conf; then
 
4454
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
4455
    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
 
4456
  fi
 
4457
 
 
4458
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
4459
  # powerpc, because MkLinux only supported shared libraries with the
 
4460
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
4461
  # most powerpc-linux boxes support dynamic linking these days and
 
4462
  # people can always --disable-shared, the test was removed, and we
 
4463
  # assume the GNU/Linux dynamic linker is in use.
 
4464
  dynamic_linker='GNU/Linux ld.so'
 
4465
  ;;
 
4466
 
 
4467
netbsd*)
 
4468
  version_type=sunos
 
4469
  need_lib_prefix=no
 
4470
  need_version=no
 
4471
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
4472
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
4473
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
4474
    dynamic_linker='NetBSD (a.out) ld.so'
 
4475
  else
 
4476
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
4477
    soname_spec='${libname}${release}${shared_ext}$major'
 
4478
    dynamic_linker='NetBSD ld.elf_so'
 
4479
  fi
 
4480
  shlibpath_var=LD_LIBRARY_PATH
 
4481
  shlibpath_overrides_runpath=yes
 
4482
  hardcode_into_libs=yes
 
4483
  ;;
 
4484
 
 
4485
newsos6)
 
4486
  version_type=linux
 
4487
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4488
  shlibpath_var=LD_LIBRARY_PATH
 
4489
  shlibpath_overrides_runpath=yes
 
4490
  ;;
 
4491
 
 
4492
*nto* | *qnx*)
 
4493
  version_type=qnx
 
4494
  need_lib_prefix=no
 
4495
  need_version=no
 
4496
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4497
  soname_spec='${libname}${release}${shared_ext}$major'
 
4498
  shlibpath_var=LD_LIBRARY_PATH
 
4499
  shlibpath_overrides_runpath=no
 
4500
  hardcode_into_libs=yes
 
4501
  dynamic_linker='ldqnx.so'
 
4502
  ;;
 
4503
 
 
4504
openbsd*)
 
4505
  version_type=sunos
 
4506
  sys_lib_dlsearch_path_spec="/usr/lib"
 
4507
  need_lib_prefix=no
 
4508
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
4509
  case $host_os in
 
4510
    openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
 
4511
    *)                          need_version=no  ;;
 
4512
  esac
 
4513
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
4514
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
4515
  shlibpath_var=LD_LIBRARY_PATH
 
4516
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
4517
    case $host_os in
 
4518
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
4519
        shlibpath_overrides_runpath=no
 
4520
        ;;
 
4521
      *)
 
4522
        shlibpath_overrides_runpath=yes
 
4523
        ;;
 
4524
      esac
 
4525
  else
 
4526
    shlibpath_overrides_runpath=yes
 
4527
  fi
 
4528
  ;;
 
4529
 
 
4530
os2*)
 
4531
  libname_spec='$name'
 
4532
  shrext_cmds=".dll"
 
4533
  need_lib_prefix=no
 
4534
  library_names_spec='$libname${shared_ext} $libname.a'
 
4535
  dynamic_linker='OS/2 ld.exe'
 
4536
  shlibpath_var=LIBPATH
 
4537
  ;;
 
4538
 
 
4539
osf3* | osf4* | osf5*)
 
4540
  version_type=osf
 
4541
  need_lib_prefix=no
 
4542
  need_version=no
 
4543
  soname_spec='${libname}${release}${shared_ext}$major'
 
4544
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4545
  shlibpath_var=LD_LIBRARY_PATH
 
4546
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
4547
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
4548
  ;;
 
4549
 
 
4550
rdos*)
 
4551
  dynamic_linker=no
 
4552
  ;;
 
4553
 
 
4554
solaris*)
 
4555
  version_type=linux
 
4556
  need_lib_prefix=no
 
4557
  need_version=no
 
4558
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4559
  soname_spec='${libname}${release}${shared_ext}$major'
 
4560
  shlibpath_var=LD_LIBRARY_PATH
 
4561
  shlibpath_overrides_runpath=yes
 
4562
  hardcode_into_libs=yes
 
4563
  # ldd complains unless libraries are executable
 
4564
  postinstall_cmds='chmod +x $lib'
 
4565
  ;;
 
4566
 
 
4567
sunos4*)
 
4568
  version_type=sunos
 
4569
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
4570
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
4571
  shlibpath_var=LD_LIBRARY_PATH
 
4572
  shlibpath_overrides_runpath=yes
 
4573
  if test "$with_gnu_ld" = yes; then
 
4574
    need_lib_prefix=no
 
4575
  fi
 
4576
  need_version=yes
 
4577
  ;;
 
4578
 
 
4579
sysv4 | sysv4.3*)
 
4580
  version_type=linux
 
4581
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4582
  soname_spec='${libname}${release}${shared_ext}$major'
 
4583
  shlibpath_var=LD_LIBRARY_PATH
 
4584
  case $host_vendor in
 
4585
    sni)
 
4586
      shlibpath_overrides_runpath=no
 
4587
      need_lib_prefix=no
 
4588
      runpath_var=LD_RUN_PATH
 
4589
      ;;
 
4590
    siemens)
 
4591
      need_lib_prefix=no
 
4592
      ;;
 
4593
    motorola)
 
4594
      need_lib_prefix=no
 
4595
      need_version=no
 
4596
      shlibpath_overrides_runpath=no
 
4597
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
4598
      ;;
 
4599
  esac
 
4600
  ;;
 
4601
 
 
4602
sysv4*MP*)
 
4603
  if test -d /usr/nec ;then
 
4604
    version_type=linux
 
4605
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
4606
    soname_spec='$libname${shared_ext}.$major'
 
4607
    shlibpath_var=LD_LIBRARY_PATH
 
4608
  fi
 
4609
  ;;
 
4610
 
 
4611
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
4612
  version_type=freebsd-elf
 
4613
  need_lib_prefix=no
 
4614
  need_version=no
 
4615
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
4616
  soname_spec='${libname}${release}${shared_ext}$major'
 
4617
  shlibpath_var=LD_LIBRARY_PATH
 
4618
  shlibpath_overrides_runpath=yes
 
4619
  hardcode_into_libs=yes
 
4620
  if test "$with_gnu_ld" = yes; then
 
4621
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
 
4622
  else
 
4623
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
 
4624
    case $host_os in
 
4625
      sco3.2v5*)
 
4626
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
 
4627
        ;;
 
4628
    esac
 
4629
  fi
 
4630
  sys_lib_dlsearch_path_spec='/usr/lib'
 
4631
  ;;
 
4632
 
 
4633
tpf*)
 
4634
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
 
4635
  version_type=linux
 
4636
  need_lib_prefix=no
 
4637
  need_version=no
 
4638
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4639
  shlibpath_var=LD_LIBRARY_PATH
 
4640
  shlibpath_overrides_runpath=no
 
4641
  hardcode_into_libs=yes
 
4642
  ;;
 
4643
 
 
4644
uts4*)
 
4645
  version_type=linux
 
4646
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4647
  soname_spec='${libname}${release}${shared_ext}$major'
 
4648
  shlibpath_var=LD_LIBRARY_PATH
 
4649
  ;;
 
4650
 
 
4651
*)
 
4652
  dynamic_linker=no
 
4653
  ;;
 
4654
esac
 
4655
AC_MSG_RESULT([$dynamic_linker])
 
4656
test "$dynamic_linker" = no && can_build_shared=no
 
4657
 
 
4658
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
4659
if test "$GCC" = yes; then
 
4660
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
4661
fi
 
4662
 
 
4663
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
 
4664
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
 
4665
fi
 
4666
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
 
4667
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 
4668
fi
 
4669
 
 
4670
_LT_DECL([], [variables_saved_for_relink], [1],
 
4671
    [Variables whose values should be saved in libtool wrapper scripts and
 
4672
    restored at link time])
 
4673
_LT_DECL([], [need_lib_prefix], [0],
 
4674
    [Do we need the "lib" prefix for modules?])
 
4675
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
 
4676
_LT_DECL([], [version_type], [0], [Library versioning type])
 
4677
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
 
4678
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
 
4679
_LT_DECL([], [shlibpath_overrides_runpath], [0],
 
4680
    [Is shlibpath searched before the hard-coded library search path?])
 
4681
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
 
4682
_LT_DECL([], [library_names_spec], [1],
 
4683
    [[List of archive names.  First name is the real one, the rest are links.
 
4684
    The last name is the one that the linker finds with -lNAME]])
 
4685
_LT_DECL([], [soname_spec], [1],
 
4686
    [[The coded name of the library, if different from the real name]])
 
4687
_LT_DECL([], [postinstall_cmds], [2],
 
4688
    [Command to use after installation of a shared archive])
 
4689
_LT_DECL([], [postuninstall_cmds], [2],
 
4690
    [Command to use after uninstallation of a shared archive])
 
4691
_LT_DECL([], [finish_cmds], [2],
 
4692
    [Commands used to finish a libtool library installation in a directory])
 
4693
_LT_DECL([], [finish_eval], [1],
 
4694
    [[As "finish_cmds", except a single script fragment to be evaled but
 
4695
    not shown]])
 
4696
_LT_DECL([], [hardcode_into_libs], [0],
 
4697
    [Whether we should hardcode library paths into libraries])
 
4698
_LT_DECL([], [sys_lib_search_path_spec], [2],
 
4699
    [Compile-time system search path for libraries])
 
4700
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
 
4701
    [Run-time system search path for libraries])
 
4702
])# _LT_SYS_DYNAMIC_LINKER
 
4703
 
 
4704
 
 
4705
# _LT_PATH_TOOL_PREFIX(TOOL)
 
4706
# --------------------------
 
4707
# find a file program which can recognize shared library
 
4708
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 
4709
[m4_require([_LT_DECL_EGREP])dnl
 
4710
AC_MSG_CHECKING([for $1])
 
4711
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
4712
[case $MAGIC_CMD in
 
4713
[[\\/*] |  ?:[\\/]*])
 
4714
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
4715
  ;;
 
4716
*)
 
4717
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
4718
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
4719
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
4720
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
4721
dnl not every word.  This closes a longstanding sh security hole.
 
4722
  ac_dummy="m4_if([$2], , $PATH, [$2])"
 
4723
  for ac_dir in $ac_dummy; do
 
4724
    IFS="$lt_save_ifs"
 
4725
    test -z "$ac_dir" && ac_dir=.
 
4726
    if test -f $ac_dir/$1; then
 
4727
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
4728
      if test -n "$file_magic_test_file"; then
 
4729
        case $deplibs_check_method in
 
4730
        "file_magic "*)
 
4731
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
4732
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
4733
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
4734
            $EGREP "$file_magic_regex" > /dev/null; then
 
4735
            :
 
4736
          else
 
4737
            cat <<_LT_EOF 1>&2
 
4738
 
 
4739
*** Warning: the command libtool uses to detect shared libraries,
 
4740
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
4741
*** The result is that libtool may fail to recognize shared libraries
 
4742
*** as such.  This will affect the creation of libtool libraries that
 
4743
*** depend on shared libraries, but programs linked with such libtool
 
4744
*** libraries will work regardless of this problem.  Nevertheless, you
 
4745
*** may want to report the problem to your system manager and/or to
 
4746
*** bug-libtool@gnu.org
 
4747
 
 
4748
_LT_EOF
 
4749
          fi ;;
 
4750
        esac
 
4751
      fi
 
4752
      break
 
4753
    fi
 
4754
  done
 
4755
  IFS="$lt_save_ifs"
 
4756
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
4757
  ;;
 
4758
esac])
 
4759
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
4760
if test -n "$MAGIC_CMD"; then
 
4761
  AC_MSG_RESULT($MAGIC_CMD)
 
4762
else
 
4763
  AC_MSG_RESULT(no)
 
4764
fi
 
4765
_LT_DECL([], [MAGIC_CMD], [0],
 
4766
         [Used to examine libraries when file_magic_cmd begins with "file"])dnl
 
4767
])# _LT_PATH_TOOL_PREFIX
 
4768
 
 
4769
# Old name:
 
4770
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
 
4771
dnl aclocal-1.4 backwards compatibility:
 
4772
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
4773
 
 
4774
 
 
4775
# _LT_PATH_MAGIC
 
4776
# --------------
 
4777
# find a file program which can recognize a shared library
 
4778
m4_defun([_LT_PATH_MAGIC],
 
4779
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
4780
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
4781
  if test -n "$ac_tool_prefix"; then
 
4782
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
4783
  else
 
4784
    MAGIC_CMD=:
 
4785
  fi
 
4786
fi
 
4787
])# _LT_PATH_MAGIC
 
4788
 
 
4789
 
 
4790
# LT_PATH_LD
 
4791
# ----------
 
4792
# find the pathname to the GNU or non-GNU linker
 
4793
AC_DEFUN([LT_PATH_LD],
 
4794
[AC_REQUIRE([AC_PROG_CC])dnl
 
4795
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
4796
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
4797
m4_require([_LT_DECL_SED])dnl
 
4798
m4_require([_LT_DECL_EGREP])dnl
 
4799
 
 
4800
AC_ARG_WITH([gnu-ld],
 
4801
    [AS_HELP_STRING([--with-gnu-ld],
 
4802
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
4803
    [test "$withval" = no || with_gnu_ld=yes],
 
4804
    [with_gnu_ld=no])dnl
 
4805
 
 
4806
ac_prog=ld
 
4807
if test "$GCC" = yes; then
 
4808
  # Check if gcc -print-prog-name=ld gives a path.
 
4809
  AC_MSG_CHECKING([for ld used by $CC])
 
4810
  case $host in
 
4811
  *-*-mingw*)
 
4812
    # gcc leaves a trailing carriage return which upsets mingw
 
4813
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
4814
  *)
 
4815
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
4816
  esac
 
4817
  case $ac_prog in
 
4818
    # Accept absolute paths.
 
4819
    [[\\/]]* | ?:[[\\/]]*)
 
4820
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
4821
      # Canonicalize the pathname of ld
 
4822
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
 
4823
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 
4824
        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
 
4825
      done
 
4826
      test -z "$LD" && LD="$ac_prog"
 
4827
      ;;
 
4828
  "")
 
4829
    # If it fails, then pretend we aren't using GCC.
 
4830
    ac_prog=ld
 
4831
    ;;
 
4832
  *)
 
4833
    # If it is relative, then search for the first ld in PATH.
 
4834
    with_gnu_ld=unknown
 
4835
    ;;
 
4836
  esac
 
4837
elif test "$with_gnu_ld" = yes; then
 
4838
  AC_MSG_CHECKING([for GNU ld])
 
4839
else
 
4840
  AC_MSG_CHECKING([for non-GNU ld])
 
4841
fi
 
4842
AC_CACHE_VAL(lt_cv_path_LD,
 
4843
[if test -z "$LD"; then
 
4844
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
4845
  for ac_dir in $PATH; do
 
4846
    IFS="$lt_save_ifs"
 
4847
    test -z "$ac_dir" && ac_dir=.
 
4848
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
4849
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
4850
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
4851
      # but apparently some variants of GNU ld only accept -v.
 
4852
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
4853
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
4854
      *GNU* | *'with BFD'*)
 
4855
        test "$with_gnu_ld" != no && break
 
4856
        ;;
 
4857
      *)
 
4858
        test "$with_gnu_ld" != yes && break
 
4859
        ;;
 
4860
      esac
 
4861
    fi
 
4862
  done
 
4863
  IFS="$lt_save_ifs"
 
4864
else
 
4865
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
4866
fi])
 
4867
LD="$lt_cv_path_LD"
 
4868
if test -n "$LD"; then
 
4869
  AC_MSG_RESULT($LD)
 
4870
else
 
4871
  AC_MSG_RESULT(no)
 
4872
fi
 
4873
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
4874
_LT_PATH_LD_GNU
 
4875
AC_SUBST([LD])
 
4876
 
 
4877
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
 
4878
])# LT_PATH_LD
 
4879
 
 
4880
# Old names:
 
4881
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
 
4882
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
 
4883
dnl aclocal-1.4 backwards compatibility:
 
4884
dnl AC_DEFUN([AM_PROG_LD], [])
 
4885
dnl AC_DEFUN([AC_PROG_LD], [])
 
4886
 
 
4887
 
 
4888
# _LT_PATH_LD_GNU
 
4889
#- --------------
 
4890
m4_defun([_LT_PATH_LD_GNU],
 
4891
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
4892
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 
4893
case `$LD -v 2>&1 </dev/null` in
 
4894
*GNU* | *'with BFD'*)
 
4895
  lt_cv_prog_gnu_ld=yes
 
4896
  ;;
 
4897
*)
 
4898
  lt_cv_prog_gnu_ld=no
 
4899
  ;;
 
4900
esac])
 
4901
with_gnu_ld=$lt_cv_prog_gnu_ld
 
4902
])# _LT_PATH_LD_GNU
 
4903
 
 
4904
 
 
4905
# _LT_CMD_RELOAD
 
4906
# --------------
 
4907
# find reload flag for linker
 
4908
#   -- PORTME Some linkers may need a different reload flag.
 
4909
m4_defun([_LT_CMD_RELOAD],
 
4910
[AC_CACHE_CHECK([for $LD option to reload object files],
 
4911
  lt_cv_ld_reload_flag,
 
4912
  [lt_cv_ld_reload_flag='-r'])
 
4913
reload_flag=$lt_cv_ld_reload_flag
 
4914
case $reload_flag in
 
4915
"" | " "*) ;;
 
4916
*) reload_flag=" $reload_flag" ;;
 
4917
esac
 
4918
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
4919
case $host_os in
 
4920
  darwin*)
 
4921
    if test "$GCC" = yes; then
 
4922
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
 
4923
    else
 
4924
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
4925
    fi
 
4926
    ;;
 
4927
esac
 
4928
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
 
4929
_LT_DECL([], [reload_cmds], [2])dnl
 
4930
])# _LT_CMD_RELOAD
 
4931
 
 
4932
 
 
4933
# _LT_CHECK_MAGIC_METHOD
 
4934
# ----------------------
 
4935
# how to check for library dependencies
 
4936
#  -- PORTME fill in with the dynamic library characteristics
 
4937
m4_defun([_LT_CHECK_MAGIC_METHOD],
 
4938
[m4_require([_LT_DECL_EGREP])
 
4939
m4_require([_LT_DECL_OBJDUMP])
 
4940
AC_CACHE_CHECK([how to recognize dependent libraries],
 
4941
lt_cv_deplibs_check_method,
 
4942
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
4943
lt_cv_file_magic_test_file=
 
4944
lt_cv_deplibs_check_method='unknown'
 
4945
# Need to set the preceding variable on all platforms that support
 
4946
# interlibrary dependencies.
 
4947
# 'none' -- dependencies not supported.
 
4948
# `unknown' -- same as none, but documents that we really don't know.
 
4949
# 'pass_all' -- all dependencies passed with no checks.
 
4950
# 'test_compile' -- check by making test program.
 
4951
# 'file_magic [[regex]]' -- check by looking for files in library path
 
4952
# which responds to the $file_magic_cmd with a given extended regex.
 
4953
# If you have `file' or equivalent on your system and you're not sure
 
4954
# whether `pass_all' will *always* work, you probably want this one.
 
4955
 
 
4956
case $host_os in
 
4957
aix[[4-9]]*)
 
4958
  lt_cv_deplibs_check_method=pass_all
 
4959
  ;;
 
4960
 
 
4961
beos*)
 
4962
  lt_cv_deplibs_check_method=pass_all
 
4963
  ;;
 
4964
 
 
4965
bsdi[[45]]*)
 
4966
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
4967
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
4968
  lt_cv_file_magic_test_file=/shlib/libc.so
 
4969
  ;;
 
4970
 
 
4971
cygwin*)
 
4972
  # func_win32_libid is a shell function defined in ltmain.sh
 
4973
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
4974
  lt_cv_file_magic_cmd='func_win32_libid'
 
4975
  ;;
 
4976
 
 
4977
mingw* | pw32*)
 
4978
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
4979
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
 
4980
  # unless we find 'file', for example because we are cross-compiling.
 
4981
  if ( file / ) >/dev/null 2>&1; then
 
4982
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
4983
    lt_cv_file_magic_cmd='func_win32_libid'
 
4984
  else
 
4985
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
4986
    lt_cv_file_magic_cmd='$OBJDUMP -f'
 
4987
  fi
 
4988
  ;;
 
4989
 
 
4990
cegcc)
 
4991
  # use the weaker test based on 'objdump'. See mingw*.
 
4992
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
 
4993
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
4994
  ;;
 
4995
 
 
4996
darwin* | rhapsody*)
 
4997
  lt_cv_deplibs_check_method=pass_all
 
4998
  ;;
 
4999
 
 
5000
freebsd* | dragonfly*)
 
5001
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
5002
    case $host_cpu in
 
5003
    i*86 )
 
5004
      # Not sure whether the presence of OpenBSD here was a mistake.
 
5005
      # Let's accept both of them until this is cleared up.
 
5006
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
5007
      lt_cv_file_magic_cmd=/usr/bin/file
 
5008
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
5009
      ;;
 
5010
    esac
 
5011
  else
 
5012
    lt_cv_deplibs_check_method=pass_all
 
5013
  fi
 
5014
  ;;
 
5015
 
 
5016
gnu*)
 
5017
  lt_cv_deplibs_check_method=pass_all
 
5018
  ;;
 
5019
 
 
5020
hpux10.20* | hpux11*)
 
5021
  lt_cv_file_magic_cmd=/usr/bin/file
 
5022
  case $host_cpu in
 
5023
  ia64*)
 
5024
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
5025
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
5026
    ;;
 
5027
  hppa*64*)
 
5028
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
 
5029
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
5030
    ;;
 
5031
  *)
 
5032
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
5033
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
5034
    ;;
 
5035
  esac
 
5036
  ;;
 
5037
 
 
5038
interix[[3-9]]*)
 
5039
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
 
5040
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
 
5041
  ;;
 
5042
 
 
5043
irix5* | irix6* | nonstopux*)
 
5044
  case $LD in
 
5045
  *-32|*"-32 ") libmagic=32-bit;;
 
5046
  *-n32|*"-n32 ") libmagic=N32;;
 
5047
  *-64|*"-64 ") libmagic=64-bit;;
 
5048
  *) libmagic=never-match;;
 
5049
  esac
 
5050
  lt_cv_deplibs_check_method=pass_all
 
5051
  ;;
 
5052
 
 
5053
# This must be Linux ELF.
 
5054
linux* | k*bsd*-gnu)
 
5055
  lt_cv_deplibs_check_method=pass_all
 
5056
  ;;
 
5057
 
 
5058
netbsd*)
 
5059
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
5060
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
5061
  else
 
5062
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
5063
  fi
 
5064
  ;;
 
5065
 
 
5066
newos6*)
 
5067
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
5068
  lt_cv_file_magic_cmd=/usr/bin/file
 
5069
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
5070
  ;;
 
5071
 
 
5072
*nto* | *qnx*)
 
5073
  lt_cv_deplibs_check_method=pass_all
 
5074
  ;;
 
5075
 
 
5076
openbsd*)
 
5077
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
5078
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
5079
  else
 
5080
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
5081
  fi
 
5082
  ;;
 
5083
 
 
5084
osf3* | osf4* | osf5*)
 
5085
  lt_cv_deplibs_check_method=pass_all
 
5086
  ;;
 
5087
 
 
5088
rdos*)
 
5089
  lt_cv_deplibs_check_method=pass_all
 
5090
  ;;
 
5091
 
 
5092
solaris*)
 
5093
  lt_cv_deplibs_check_method=pass_all
 
5094
  ;;
 
5095
 
 
5096
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
5097
  lt_cv_deplibs_check_method=pass_all
 
5098
  ;;
 
5099
 
 
5100
sysv4 | sysv4.3*)
 
5101
  case $host_vendor in
 
5102
  motorola)
 
5103
    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]]'
 
5104
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
5105
    ;;
 
5106
  ncr)
 
5107
    lt_cv_deplibs_check_method=pass_all
 
5108
    ;;
 
5109
  sequent)
 
5110
    lt_cv_file_magic_cmd='/bin/file'
 
5111
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
5112
    ;;
 
5113
  sni)
 
5114
    lt_cv_file_magic_cmd='/bin/file'
 
5115
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
5116
    lt_cv_file_magic_test_file=/lib/libc.so
 
5117
    ;;
 
5118
  siemens)
 
5119
    lt_cv_deplibs_check_method=pass_all
 
5120
    ;;
 
5121
  pc)
 
5122
    lt_cv_deplibs_check_method=pass_all
 
5123
    ;;
 
5124
  esac
 
5125
  ;;
 
5126
 
 
5127
tpf*)
 
5128
  lt_cv_deplibs_check_method=pass_all
 
5129
  ;;
 
5130
esac
 
5131
])
 
5132
file_magic_cmd=$lt_cv_file_magic_cmd
 
5133
deplibs_check_method=$lt_cv_deplibs_check_method
 
5134
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
5135
 
 
5136
_LT_DECL([], [deplibs_check_method], [1],
 
5137
    [Method to check whether dependent libraries are shared objects])
 
5138
_LT_DECL([], [file_magic_cmd], [1],
 
5139
    [Command to use when deplibs_check_method == "file_magic"])
 
5140
])# _LT_CHECK_MAGIC_METHOD
 
5141
 
 
5142
 
 
5143
# LT_PATH_NM
 
5144
# ----------
 
5145
# find the pathname to a BSD- or MS-compatible name lister
 
5146
AC_DEFUN([LT_PATH_NM],
 
5147
[AC_REQUIRE([AC_PROG_CC])dnl
 
5148
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 
5149
[if test -n "$NM"; then
 
5150
  # Let the user override the test.
 
5151
  lt_cv_path_NM="$NM"
 
5152
else
 
5153
  lt_nm_to_check="${ac_tool_prefix}nm"
 
5154
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
 
5155
    lt_nm_to_check="$lt_nm_to_check nm"
 
5156
  fi
 
5157
  for lt_tmp_nm in $lt_nm_to_check; do
 
5158
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
5159
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
 
5160
      IFS="$lt_save_ifs"
 
5161
      test -z "$ac_dir" && ac_dir=.
 
5162
      tmp_nm="$ac_dir/$lt_tmp_nm"
 
5163
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
5164
        # Check to see if the nm accepts a BSD-compat flag.
 
5165
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
5166
        #   nm: unknown option "B" ignored
 
5167
        # Tru64's nm complains that /dev/null is an invalid object file
 
5168
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
5169
        */dev/null* | *'Invalid file or object type'*)
 
5170
          lt_cv_path_NM="$tmp_nm -B"
 
5171
          break
 
5172
          ;;
 
5173
        *)
 
5174
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
5175
          */dev/null*)
 
5176
            lt_cv_path_NM="$tmp_nm -p"
 
5177
            break
 
5178
            ;;
 
5179
          *)
 
5180
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
5181
            continue # so that we can try to find one that supports BSD flags
 
5182
            ;;
 
5183
          esac
 
5184
          ;;
 
5185
        esac
 
5186
      fi
 
5187
    done
 
5188
    IFS="$lt_save_ifs"
 
5189
  done
 
5190
  : ${lt_cv_path_NM=no}
 
5191
fi])
 
5192
if test "$lt_cv_path_NM" != "no"; then
 
5193
  NM="$lt_cv_path_NM"
 
5194
else
 
5195
  # Didn't find any BSD compatible name lister, look for dumpbin.
 
5196
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
 
5197
  AC_SUBST([DUMPBIN])
 
5198
  if test "$DUMPBIN" != ":"; then
 
5199
    NM="$DUMPBIN"
 
5200
  fi
 
5201
fi
 
5202
test -z "$NM" && NM=nm
 
5203
AC_SUBST([NM])
 
5204
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 
5205
 
 
5206
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
 
5207
  [lt_cv_nm_interface="BSD nm"
 
5208
  echo "int some_variable = 0;" > conftest.$ac_ext
 
5209
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
 
5210
  (eval "$ac_compile" 2>conftest.err)
 
5211
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
5212
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
 
5213
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
 
5214
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
5215
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
 
5216
  cat conftest.out >&AS_MESSAGE_LOG_FD
 
5217
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
 
5218
    lt_cv_nm_interface="MS dumpbin"
 
5219
  fi
 
5220
  rm -f conftest*])
 
5221
])# LT_PATH_NM
 
5222
 
 
5223
# Old names:
 
5224
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
 
5225
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
 
5226
dnl aclocal-1.4 backwards compatibility:
 
5227
dnl AC_DEFUN([AM_PROG_NM], [])
 
5228
dnl AC_DEFUN([AC_PROG_NM], [])
 
5229
 
 
5230
 
 
5231
# LT_LIB_M
 
5232
# --------
 
5233
# check for math library
 
5234
AC_DEFUN([LT_LIB_M],
 
5235
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
5236
LIBM=
 
5237
case $host in
 
5238
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
5239
  # These system don't have libm, or don't need it
 
5240
  ;;
 
5241
*-ncr-sysv4.3*)
 
5242
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
5243
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
5244
  ;;
 
5245
*)
 
5246
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
5247
  ;;
 
5248
esac
 
5249
AC_SUBST([LIBM])
 
5250
])# LT_LIB_M
 
5251
 
 
5252
# Old name:
 
5253
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
 
5254
dnl aclocal-1.4 backwards compatibility:
 
5255
dnl AC_DEFUN([AC_CHECK_LIBM], [])
 
5256
 
 
5257
 
 
5258
# _LT_COMPILER_NO_RTTI([TAGNAME])
 
5259
# -------------------------------
 
5260
m4_defun([_LT_COMPILER_NO_RTTI],
 
5261
[m4_require([_LT_TAG_COMPILER])dnl
 
5262
 
 
5263
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
5264
 
 
5265
if test "$GCC" = yes; then
 
5266
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
5267
 
 
5268
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
5269
    lt_cv_prog_compiler_rtti_exceptions,
 
5270
    [-fno-rtti -fno-exceptions], [],
 
5271
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
5272
fi
 
5273
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 
5274
        [Compiler flag to turn off builtin functions])
 
5275
])# _LT_COMPILER_NO_RTTI
 
5276
 
 
5277
 
 
5278
# _LT_CMD_GLOBAL_SYMBOLS
 
5279
# ----------------------
 
5280
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 
5281
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
5282
AC_REQUIRE([AC_PROG_CC])dnl
 
5283
AC_REQUIRE([LT_PATH_NM])dnl
 
5284
AC_REQUIRE([LT_PATH_LD])dnl
 
5285
m4_require([_LT_DECL_SED])dnl
 
5286
m4_require([_LT_DECL_EGREP])dnl
 
5287
m4_require([_LT_TAG_COMPILER])dnl
 
5288
 
 
5289
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
5290
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
5291
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
5292
[
 
5293
# These are sane defaults that work on at least a few old systems.
 
5294
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
5295
 
 
5296
# Character class describing NM global symbol codes.
 
5297
symcode='[[BCDEGRST]]'
 
5298
 
 
5299
# Regexp to match symbols that can be accessed directly from C.
 
5300
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
5301
 
 
5302
# Define system-specific variables.
 
5303
case $host_os in
 
5304
aix*)
 
5305
  symcode='[[BCDT]]'
 
5306
  ;;
 
5307
cygwin* | mingw* | pw32* | cegcc*)
 
5308
  symcode='[[ABCDGISTW]]'
 
5309
  ;;
 
5310
hpux*)
 
5311
  if test "$host_cpu" = ia64; then
 
5312
    symcode='[[ABCDEGRST]]'
 
5313
  fi
 
5314
  ;;
 
5315
irix* | nonstopux*)
 
5316
  symcode='[[BCDEGRST]]'
 
5317
  ;;
 
5318
osf*)
 
5319
  symcode='[[BCDEGQRST]]'
 
5320
  ;;
 
5321
solaris*)
 
5322
  symcode='[[BDRT]]'
 
5323
  ;;
 
5324
sco3.2v5*)
 
5325
  symcode='[[DT]]'
 
5326
  ;;
 
5327
sysv4.2uw2*)
 
5328
  symcode='[[DT]]'
 
5329
  ;;
 
5330
sysv5* | sco5v6* | unixware* | OpenUNIX*)
 
5331
  symcode='[[ABDT]]'
 
5332
  ;;
 
5333
sysv4)
 
5334
  symcode='[[DFNSTU]]'
 
5335
  ;;
 
5336
esac
 
5337
 
 
5338
# If we're using GNU nm, then use its standard symbol codes.
 
5339
case `$NM -V 2>&1` in
 
5340
*GNU* | *'with BFD'*)
 
5341
  symcode='[[ABCDGIRSTW]]' ;;
 
5342
esac
 
5343
 
 
5344
# Transform an extracted symbol line into a proper C declaration.
 
5345
# Some systems (esp. on ia64) link data and code symbols differently,
 
5346
# so use this general approach.
 
5347
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
5348
 
 
5349
# Transform an extracted symbol line into symbol name and symbol address
 
5350
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
5351
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'"
 
5352
 
 
5353
# Handle CRLF in mingw tool chain
 
5354
opt_cr=
 
5355
case $build_os in
 
5356
mingw*)
 
5357
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
5358
  ;;
 
5359
esac
 
5360
 
 
5361
# Try without a prefix underscore, then with it.
 
5362
for ac_symprfx in "" "_"; do
 
5363
 
 
5364
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
5365
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
5366
 
 
5367
  # Write the raw and C identifiers.
 
5368
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
 
5369
    # Fake it for dumpbin and say T for any non-static function
 
5370
    # and D for any global variable.
 
5371
    # Also find C++ and __fastcall symbols from MSVC++,
 
5372
    # which start with @ or ?.
 
5373
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
 
5374
"     {last_section=section; section=\$ 3};"\
 
5375
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 
5376
"     \$ 0!~/External *\|/{next};"\
 
5377
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 
5378
"     {if(hide[section]) next};"\
 
5379
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
 
5380
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
 
5381
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
 
5382
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
 
5383
"     ' prfx=^$ac_symprfx]"
 
5384
  else
 
5385
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
5386
  fi
 
5387
 
 
5388
  # Check to see that the pipe works correctly.
 
5389
  pipe_works=no
 
5390
 
 
5391
  rm -f conftest*
 
5392
  cat > conftest.$ac_ext <<_LT_EOF
 
5393
#ifdef __cplusplus
 
5394
extern "C" {
 
5395
#endif
 
5396
char nm_test_var;
 
5397
void nm_test_func(void);
 
5398
void nm_test_func(void){}
 
5399
#ifdef __cplusplus
 
5400
}
 
5401
#endif
 
5402
int main(){nm_test_var='a';nm_test_func();return(0);}
 
5403
_LT_EOF
 
5404
 
 
5405
  if AC_TRY_EVAL(ac_compile); then
 
5406
    # Now try to grab the symbols.
 
5407
    nlist=conftest.nm
 
5408
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
5409
      # Try sorting and uniquifying the output.
 
5410
      if sort "$nlist" | uniq > "$nlist"T; then
 
5411
        mv -f "$nlist"T "$nlist"
 
5412
      else
 
5413
        rm -f "$nlist"T
 
5414
      fi
 
5415
 
 
5416
      # Make sure that we snagged all the symbols we need.
 
5417
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 
5418
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 
5419
          cat <<_LT_EOF > conftest.$ac_ext
 
5420
#ifdef __cplusplus
 
5421
extern "C" {
 
5422
#endif
 
5423
 
 
5424
_LT_EOF
 
5425
          # Now generate the symbol file.
 
5426
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
5427
 
 
5428
          cat <<_LT_EOF >> conftest.$ac_ext
 
5429
 
 
5430
/* The mapping between symbol names and symbols.  */
 
5431
const struct {
 
5432
  const char *name;
 
5433
  void       *address;
 
5434
}
 
5435
lt__PROGRAM__LTX_preloaded_symbols[[]] =
 
5436
{
 
5437
  { "@PROGRAM@", (void *) 0 },
 
5438
_LT_EOF
 
5439
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 
5440
          cat <<\_LT_EOF >> conftest.$ac_ext
 
5441
  {0, (void *) 0}
 
5442
};
 
5443
 
 
5444
/* This works around a problem in FreeBSD linker */
 
5445
#ifdef FREEBSD_WORKAROUND
 
5446
static const void *lt_preloaded_setup() {
 
5447
  return lt__PROGRAM__LTX_preloaded_symbols;
 
5448
}
 
5449
#endif
 
5450
 
 
5451
#ifdef __cplusplus
 
5452
}
 
5453
#endif
 
5454
_LT_EOF
 
5455
          # Now try linking the two files.
 
5456
          mv conftest.$ac_objext conftstm.$ac_objext
 
5457
          lt_save_LIBS="$LIBS"
 
5458
          lt_save_CFLAGS="$CFLAGS"
 
5459
          LIBS="conftstm.$ac_objext"
 
5460
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
5461
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
5462
            pipe_works=yes
 
5463
          fi
 
5464
          LIBS="$lt_save_LIBS"
 
5465
          CFLAGS="$lt_save_CFLAGS"
 
5466
        else
 
5467
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
5468
        fi
 
5469
      else
 
5470
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
5471
      fi
 
5472
    else
 
5473
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
5474
    fi
 
5475
  else
 
5476
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
5477
    cat conftest.$ac_ext >&5
 
5478
  fi
 
5479
  rm -rf conftest* conftst*
 
5480
 
 
5481
  # Do not use the global_symbol_pipe unless it works.
 
5482
  if test "$pipe_works" = yes; then
 
5483
    break
 
5484
  else
 
5485
    lt_cv_sys_global_symbol_pipe=
 
5486
  fi
 
5487
done
 
5488
])
 
5489
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
5490
  lt_cv_sys_global_symbol_to_cdecl=
 
5491
fi
 
5492
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
5493
  AC_MSG_RESULT(failed)
 
5494
else
 
5495
  AC_MSG_RESULT(ok)
 
5496
fi
 
5497
 
 
5498
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
 
5499
    [Take the output of nm and produce a listing of raw symbols and C names])
 
5500
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
 
5501
    [Transform the output of nm in a proper C declaration])
 
5502
_LT_DECL([global_symbol_to_c_name_address],
 
5503
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
 
5504
    [Transform the output of nm in a C name address pair])
 
5505
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
 
5506
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
 
5507
    [Transform the output of nm in a C name address pair when lib prefix is needed])
 
5508
]) # _LT_CMD_GLOBAL_SYMBOLS
 
5509
 
 
5510
 
 
5511
# _LT_COMPILER_PIC([TAGNAME])
 
5512
# ---------------------------
 
5513
m4_defun([_LT_COMPILER_PIC],
 
5514
[m4_require([_LT_TAG_COMPILER])dnl
 
5515
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
 
5516
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5517
_LT_TAGVAR(lt_prog_compiler_static, $1)=
 
5518
 
 
5519
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
5520
m4_if([$1], [CXX], [
 
5521
  # C++ specific cases for pic, static, wl, etc.
 
5522
  if test "$GXX" = yes; then
 
5523
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5524
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5525
 
 
5526
    case $host_os in
 
5527
    aix*)
 
5528
      # All AIX code is PIC.
 
5529
      if test "$host_cpu" = ia64; then
 
5530
        # AIX 5 now supports IA64 processor
 
5531
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5532
      fi
 
5533
      ;;
 
5534
 
 
5535
    amigaos*)
 
5536
      case $host_cpu in
 
5537
      powerpc)
 
5538
            # see comment about AmigaOS4 .so support
 
5539
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5540
        ;;
 
5541
      m68k)
 
5542
            # FIXME: we need at least 68020 code to build shared libraries, but
 
5543
            # adding the `-m68020' flag to GCC prevents building anything better,
 
5544
            # like `-m68040'.
 
5545
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
5546
        ;;
 
5547
      esac
 
5548
      ;;
 
5549
 
 
5550
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
5551
      # PIC is the default for these OSes.
 
5552
      ;;
 
5553
    mingw* | cygwin* | os2* | pw32* | cegcc*)
 
5554
      # This hack is so that the source file can tell whether it is being
 
5555
      # built for inclusion in a dll (and should export symbols for example).
 
5556
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
5557
      # (--disable-auto-import) libraries
 
5558
      m4_if([$1], [GCJ], [],
 
5559
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
5560
      ;;
 
5561
    darwin* | rhapsody*)
 
5562
      # PIC is the default on this platform
 
5563
      # Common symbols not allowed in MH_DYLIB files
 
5564
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
5565
      ;;
 
5566
    *djgpp*)
 
5567
      # DJGPP does not support shared libraries at all
 
5568
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5569
      ;;
 
5570
    interix[[3-9]]*)
 
5571
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
5572
      # Instead, we relocate shared libraries at runtime.
 
5573
      ;;
 
5574
    sysv4*MP*)
 
5575
      if test -d /usr/nec; then
 
5576
        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
5577
      fi
 
5578
      ;;
 
5579
    hpux*)
 
5580
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
5581
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
5582
      # sets the default TLS model and affects inlining.
 
5583
      case $host_cpu in
 
5584
      hppa*64*)
 
5585
        ;;
 
5586
      *)
 
5587
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5588
        ;;
 
5589
      esac
 
5590
      ;;
 
5591
    *qnx* | *nto*)
 
5592
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
5593
      # it will coredump.
 
5594
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
5595
      ;;
 
5596
    *)
 
5597
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5598
      ;;
 
5599
    esac
 
5600
  else
 
5601
    case $host_os in
 
5602
      aix[[4-9]]*)
 
5603
        # All AIX code is PIC.
 
5604
        if test "$host_cpu" = ia64; then
 
5605
          # AIX 5 now supports IA64 processor
 
5606
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5607
        else
 
5608
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5609
        fi
 
5610
        ;;
 
5611
      chorus*)
 
5612
        case $cc_basename in
 
5613
        cxch68*)
 
5614
          # Green Hills C++ Compiler
 
5615
          # _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"
 
5616
          ;;
 
5617
        esac
 
5618
        ;;
 
5619
      dgux*)
 
5620
        case $cc_basename in
 
5621
          ec++*)
 
5622
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5623
            ;;
 
5624
          ghcx*)
 
5625
            # Green Hills C++ Compiler
 
5626
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5627
            ;;
 
5628
          *)
 
5629
            ;;
 
5630
        esac
 
5631
        ;;
 
5632
      freebsd* | dragonfly*)
 
5633
        # FreeBSD uses GNU C++
 
5634
        ;;
 
5635
      hpux9* | hpux10* | hpux11*)
 
5636
        case $cc_basename in
 
5637
          CC*)
 
5638
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5639
            _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5640
            if test "$host_cpu" != ia64; then
 
5641
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5642
            fi
 
5643
            ;;
 
5644
          aCC*)
 
5645
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5646
            _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5647
            case $host_cpu in
 
5648
            hppa*64*|ia64*)
 
5649
              # +Z the default
 
5650
              ;;
 
5651
            *)
 
5652
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5653
              ;;
 
5654
            esac
 
5655
            ;;
 
5656
          *)
 
5657
            ;;
 
5658
        esac
 
5659
        ;;
 
5660
      interix*)
 
5661
        # This is c89, which is MS Visual C++ (no shared libs)
 
5662
        # Anyone wants to do a port?
 
5663
        ;;
 
5664
      irix5* | irix6* | nonstopux*)
 
5665
        case $cc_basename in
 
5666
          CC*)
 
5667
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5668
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5669
            # CC pic flag -KPIC is the default.
 
5670
            ;;
 
5671
          *)
 
5672
            ;;
 
5673
        esac
 
5674
        ;;
 
5675
      linux* | k*bsd*-gnu)
 
5676
        case $cc_basename in
 
5677
          KCC*)
 
5678
            # KAI C++ Compiler
 
5679
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
5680
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5681
            ;;
 
5682
          ecpc* )
 
5683
            # old Intel C++ for x86_64 which still supported -KPIC.
 
5684
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5685
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5686
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5687
            ;;
 
5688
          icpc* )
 
5689
            # Intel C++, used to be incompatible with GCC.
 
5690
            # ICC 10 doesn't accept -KPIC any more.
 
5691
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5692
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5693
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5694
            ;;
 
5695
          pgCC* | pgcpp*)
 
5696
            # Portland Group C++ compiler
 
5697
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5698
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5699
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5700
            ;;
 
5701
          cxx*)
 
5702
            # Compaq C++
 
5703
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
5704
            # Linux and Compaq Tru64 Unix objects are PIC.
 
5705
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5706
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5707
            ;;
 
5708
          xlc* | xlC*)
 
5709
            # IBM XL 8.0 on PPC
 
5710
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5711
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 
5712
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 
5713
            ;;
 
5714
          *)
 
5715
            case `$CC -V 2>&1 | sed 5q` in
 
5716
            *Sun\ C*)
 
5717
              # Sun C++ 5.9
 
5718
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5719
              _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5720
              _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5721
              ;;
 
5722
            esac
 
5723
            ;;
 
5724
        esac
 
5725
        ;;
 
5726
      lynxos*)
 
5727
        ;;
 
5728
      m88k*)
 
5729
        ;;
 
5730
      mvs*)
 
5731
        case $cc_basename in
 
5732
          cxx*)
 
5733
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
5734
            ;;
 
5735
          *)
 
5736
            ;;
 
5737
        esac
 
5738
        ;;
 
5739
      netbsd*)
 
5740
        ;;
 
5741
      *qnx* | *nto*)
 
5742
        # QNX uses GNU C++, but need to define -shared option too, otherwise
 
5743
        # it will coredump.
 
5744
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
5745
        ;;
 
5746
      osf3* | osf4* | osf5*)
 
5747
        case $cc_basename in
 
5748
          KCC*)
 
5749
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
5750
            ;;
 
5751
          RCC*)
 
5752
            # Rational C++ 2.4.1
 
5753
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5754
            ;;
 
5755
          cxx*)
 
5756
            # Digital/Compaq C++
 
5757
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5758
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
5759
            # Linux and Compaq Tru64 Unix objects are PIC.
 
5760
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5761
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5762
            ;;
 
5763
          *)
 
5764
            ;;
 
5765
        esac
 
5766
        ;;
 
5767
      psos*)
 
5768
        ;;
 
5769
      solaris*)
 
5770
        case $cc_basename in
 
5771
          CC*)
 
5772
            # Sun C++ 4.2, 5.x and Centerline C++
 
5773
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5774
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5775
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5776
            ;;
 
5777
          gcx*)
 
5778
            # Green Hills C++ Compiler
 
5779
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5780
            ;;
 
5781
          *)
 
5782
            ;;
 
5783
        esac
 
5784
        ;;
 
5785
      sunos4*)
 
5786
        case $cc_basename in
 
5787
          CC*)
 
5788
            # Sun C++ 4.x
 
5789
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5790
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5791
            ;;
 
5792
          lcc*)
 
5793
            # Lucid
 
5794
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5795
            ;;
 
5796
          *)
 
5797
            ;;
 
5798
        esac
 
5799
        ;;
 
5800
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
5801
        case $cc_basename in
 
5802
          CC*)
 
5803
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5804
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5805
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5806
            ;;
 
5807
        esac
 
5808
        ;;
 
5809
      tandem*)
 
5810
        case $cc_basename in
 
5811
          NCC*)
 
5812
            # NonStop-UX NCC 3.20
 
5813
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5814
            ;;
 
5815
          *)
 
5816
            ;;
 
5817
        esac
 
5818
        ;;
 
5819
      vxworks*)
 
5820
        ;;
 
5821
      *)
 
5822
        _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5823
        ;;
 
5824
    esac
 
5825
  fi
 
5826
],
 
5827
[
 
5828
  if test "$GCC" = yes; then
 
5829
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5830
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5831
 
 
5832
    case $host_os in
 
5833
      aix*)
 
5834
      # All AIX code is PIC.
 
5835
      if test "$host_cpu" = ia64; then
 
5836
        # AIX 5 now supports IA64 processor
 
5837
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5838
      fi
 
5839
      ;;
 
5840
 
 
5841
    amigaos*)
 
5842
      case $host_cpu in
 
5843
      powerpc)
 
5844
            # see comment about AmigaOS4 .so support
 
5845
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5846
        ;;
 
5847
      m68k)
 
5848
            # FIXME: we need at least 68020 code to build shared libraries, but
 
5849
            # adding the `-m68020' flag to GCC prevents building anything better,
 
5850
            # like `-m68040'.
 
5851
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
5852
        ;;
 
5853
      esac
 
5854
      ;;
 
5855
 
 
5856
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
5857
      # PIC is the default for these OSes.
 
5858
      ;;
 
5859
 
 
5860
    mingw* | cygwin* | pw32* | os2* | cegcc*)
 
5861
      # This hack is so that the source file can tell whether it is being
 
5862
      # built for inclusion in a dll (and should export symbols for example).
 
5863
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
5864
      # (--disable-auto-import) libraries
 
5865
      m4_if([$1], [GCJ], [],
 
5866
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
5867
      ;;
 
5868
 
 
5869
    darwin* | rhapsody*)
 
5870
      # PIC is the default on this platform
 
5871
      # Common symbols not allowed in MH_DYLIB files
 
5872
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
5873
      ;;
 
5874
 
 
5875
    hpux*)
 
5876
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
5877
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
5878
      # sets the default TLS model and affects inlining.
 
5879
      case $host_cpu in
 
5880
      hppa*64*)
 
5881
        # +Z the default
 
5882
        ;;
 
5883
      *)
 
5884
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5885
        ;;
 
5886
      esac
 
5887
      ;;
 
5888
 
 
5889
    interix[[3-9]]*)
 
5890
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
5891
      # Instead, we relocate shared libraries at runtime.
 
5892
      ;;
 
5893
 
 
5894
    msdosdjgpp*)
 
5895
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
5896
      # on systems that don't support them.
 
5897
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5898
      enable_shared=no
 
5899
      ;;
 
5900
 
 
5901
    *nto* | *qnx*)
 
5902
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
5903
      # it will coredump.
 
5904
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
5905
      ;;
 
5906
 
 
5907
    sysv4*MP*)
 
5908
      if test -d /usr/nec; then
 
5909
        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
5910
      fi
 
5911
      ;;
 
5912
 
 
5913
    *)
 
5914
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5915
      ;;
 
5916
    esac
 
5917
  else
 
5918
    # PORTME Check for flag to pass linker flags through the system compiler.
 
5919
    case $host_os in
 
5920
    aix*)
 
5921
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5922
      if test "$host_cpu" = ia64; then
 
5923
        # AIX 5 now supports IA64 processor
 
5924
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5925
      else
 
5926
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5927
      fi
 
5928
      ;;
 
5929
 
 
5930
    mingw* | cygwin* | pw32* | os2* | cegcc*)
 
5931
      # This hack is so that the source file can tell whether it is being
 
5932
      # built for inclusion in a dll (and should export symbols for example).
 
5933
      m4_if([$1], [GCJ], [],
 
5934
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
5935
      ;;
 
5936
 
 
5937
    hpux9* | hpux10* | hpux11*)
 
5938
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5939
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5940
      # not for PA HP-UX.
 
5941
      case $host_cpu in
 
5942
      hppa*64*|ia64*)
 
5943
        # +Z the default
 
5944
        ;;
 
5945
      *)
 
5946
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5947
        ;;
 
5948
      esac
 
5949
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
5950
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5951
      ;;
 
5952
 
 
5953
    irix5* | irix6* | nonstopux*)
 
5954
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5955
      # PIC (with -KPIC) is the default.
 
5956
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5957
      ;;
 
5958
 
 
5959
    linux* | k*bsd*-gnu)
 
5960
      case $cc_basename in
 
5961
      # old Intel for x86_64 which still supported -KPIC.
 
5962
      ecc*)
 
5963
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5964
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5965
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5966
        ;;
 
5967
      # icc used to be incompatible with GCC.
 
5968
      # ICC 10 doesn't accept -KPIC any more.
 
5969
      icc* | ifort*)
 
5970
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5971
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5972
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5973
        ;;
 
5974
      # Lahey Fortran 8.1.
 
5975
      lf95*)
 
5976
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5977
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
 
5978
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
 
5979
        ;;
 
5980
      pgcc* | pgf77* | pgf90* | pgf95*)
 
5981
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
5982
        # which looks to be a dead project)
 
5983
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5984
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5985
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5986
        ;;
 
5987
      ccc*)
 
5988
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5989
        # All Alpha code is PIC.
 
5990
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5991
        ;;
 
5992
      xl*)
 
5993
        # IBM XL C 8.0/Fortran 10.1 on PPC
 
5994
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5995
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 
5996
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 
5997
        ;;
 
5998
      *)
 
5999
        case `$CC -V 2>&1 | sed 5q` in
 
6000
        *Sun\ C*)
 
6001
          # Sun C 5.9
 
6002
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6003
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6004
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6005
          ;;
 
6006
        *Sun\ F*)
 
6007
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
 
6008
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6009
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6010
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 
6011
          ;;
 
6012
        esac
 
6013
        ;;
 
6014
      esac
 
6015
      ;;
 
6016
 
 
6017
    newsos6)
 
6018
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6019
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6020
      ;;
 
6021
 
 
6022
    *nto* | *qnx*)
 
6023
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
6024
      # it will coredump.
 
6025
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
6026
      ;;
 
6027
 
 
6028
    osf3* | osf4* | osf5*)
 
6029
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6030
      # All OSF/1 code is PIC.
 
6031
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6032
      ;;
 
6033
 
 
6034
    rdos*)
 
6035
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6036
      ;;
 
6037
 
 
6038
    solaris*)
 
6039
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6040
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6041
      case $cc_basename in
 
6042
      f77* | f90* | f95*)
 
6043
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
6044
      *)
 
6045
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
6046
      esac
 
6047
      ;;
 
6048
 
 
6049
    sunos4*)
 
6050
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
6051
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
6052
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6053
      ;;
 
6054
 
 
6055
    sysv4 | sysv4.2uw2* | sysv4.3*)
 
6056
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6057
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6058
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6059
      ;;
 
6060
 
 
6061
    sysv4*MP*)
 
6062
      if test -d /usr/nec ;then
 
6063
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
6064
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6065
      fi
 
6066
      ;;
 
6067
 
 
6068
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
6069
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6070
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6071
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6072
      ;;
 
6073
 
 
6074
    unicos*)
 
6075
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6076
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
6077
      ;;
 
6078
 
 
6079
    uts4*)
 
6080
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
6081
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6082
      ;;
 
6083
 
 
6084
    *)
 
6085
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
6086
      ;;
 
6087
    esac
 
6088
  fi
 
6089
])
 
6090
case $host_os in
 
6091
  # For platforms which do not support PIC, -DPIC is meaningless:
 
6092
  *djgpp*)
 
6093
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
6094
    ;;
 
6095
  *)
 
6096
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
 
6097
    ;;
 
6098
esac
 
6099
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
 
6100
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
 
6101
        [How to pass a linker flag through the compiler])
 
6102
 
 
6103
#
 
6104
# Check to make sure the PIC flag actually works.
 
6105
#
 
6106
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
6107
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
 
6108
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
 
6109
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
 
6110
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
 
6111
     "" | " "*) ;;
 
6112
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
6113
     esac],
 
6114
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
6115
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
6116
fi
 
6117
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
 
6118
        [Additional compiler flags for building library objects])
 
6119
 
 
6120
#
 
6121
# Check to make sure the static flag actually works.
 
6122
#
 
6123
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
 
6124
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
 
6125
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
 
6126
  $lt_tmp_static_flag,
 
6127
  [],
 
6128
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
 
6129
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 
6130
        [Compiler flag to prevent dynamic linking])
 
6131
])# _LT_COMPILER_PIC
 
6132
 
 
6133
 
 
6134
# _LT_LINKER_SHLIBS([TAGNAME])
 
6135
# ----------------------------
 
6136
# See if the linker supports building shared libraries.
 
6137
m4_defun([_LT_LINKER_SHLIBS],
 
6138
[AC_REQUIRE([LT_PATH_LD])dnl
 
6139
AC_REQUIRE([LT_PATH_NM])dnl
 
6140
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
6141
m4_require([_LT_DECL_EGREP])dnl
 
6142
m4_require([_LT_DECL_SED])dnl
 
6143
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
6144
m4_require([_LT_TAG_COMPILER])dnl
 
6145
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
6146
m4_if([$1], [CXX], [
 
6147
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
6148
  case $host_os in
 
6149
  aix[[4-9]]*)
 
6150
    # If we're using GNU nm, then we don't want the "-C" option.
 
6151
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
6152
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
6153
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
6154
    else
 
6155
      _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'
 
6156
    fi
 
6157
    ;;
 
6158
  pw32*)
 
6159
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
6160
  ;;
 
6161
  cygwin* | mingw* | cegcc*)
 
6162
    _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'
 
6163
  ;;
 
6164
  *)
 
6165
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
6166
  ;;
 
6167
  esac
 
6168
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 
6169
], [
 
6170
  runpath_var=
 
6171
  _LT_TAGVAR(allow_undefined_flag, $1)=
 
6172
  _LT_TAGVAR(always_export_symbols, $1)=no
 
6173
  _LT_TAGVAR(archive_cmds, $1)=
 
6174
  _LT_TAGVAR(archive_expsym_cmds, $1)=
 
6175
  _LT_TAGVAR(compiler_needs_object, $1)=no
 
6176
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
6177
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
6178
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
6179
  _LT_TAGVAR(hardcode_automatic, $1)=no
 
6180
  _LT_TAGVAR(hardcode_direct, $1)=no
 
6181
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
6182
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6183
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
6184
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
6185
  _LT_TAGVAR(hardcode_minus_L, $1)=no
 
6186
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
6187
  _LT_TAGVAR(inherit_rpath, $1)=no
 
6188
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
 
6189
  _LT_TAGVAR(module_cmds, $1)=
 
6190
  _LT_TAGVAR(module_expsym_cmds, $1)=
 
6191
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
 
6192
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
6193
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
 
6194
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6195
  # include_expsyms should be a list of space-separated symbols to be *always*
 
6196
  # included in the symbol list
 
6197
  _LT_TAGVAR(include_expsyms, $1)=
 
6198
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
6199
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
6200
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
6201
  # as well as any symbol that contains `d'.
 
6202
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 
6203
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
6204
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
6205
  # the symbol is explicitly referenced.  Since portable code cannot
 
6206
  # rely on this symbol name, it's probably fine to never include it in
 
6207
  # preloaded symbol tables.
 
6208
  # Exclude shared library initialization/finalization symbols.
 
6209
dnl Note also adjust exclude_expsyms for C++ above.
 
6210
  extract_expsyms_cmds=
 
6211
 
 
6212
  case $host_os in
 
6213
  cygwin* | mingw* | pw32* | cegcc*)
 
6214
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
6215
    # When not using gcc, we currently assume that we are using
 
6216
    # Microsoft Visual C++.
 
6217
    if test "$GCC" != yes; then
 
6218
      with_gnu_ld=no
 
6219
    fi
 
6220
    ;;
 
6221
  interix*)
 
6222
    # we just hope/assume this is gcc and not c89 (= MSVC++)
 
6223
    with_gnu_ld=yes
 
6224
    ;;
 
6225
  openbsd*)
 
6226
    with_gnu_ld=no
 
6227
    ;;
 
6228
  esac
 
6229
 
 
6230
  _LT_TAGVAR(ld_shlibs, $1)=yes
 
6231
  if test "$with_gnu_ld" = yes; then
 
6232
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
6233
    wlarc='${wl}'
 
6234
 
 
6235
    # Set some defaults for GNU ld with shared library support. These
 
6236
    # are reset later if shared libraries are not supported. Putting them
 
6237
    # here allows them to be overridden if necessary.
 
6238
    runpath_var=LD_RUN_PATH
 
6239
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6240
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
6241
    # ancient GNU ld didn't support --whole-archive et. al.
 
6242
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
 
6243
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
6244
    else
 
6245
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6246
    fi
 
6247
    supports_anon_versioning=no
 
6248
    case `$LD -v 2>&1` in
 
6249
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
6250
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
6251
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
6252
      *\ 2.11.*) ;; # other 2.11 versions
 
6253
      *) supports_anon_versioning=yes ;;
 
6254
    esac
 
6255
 
 
6256
    # See if GNU ld supports shared libraries.
 
6257
    case $host_os in
 
6258
    aix[[3-9]]*)
 
6259
      # On AIX/PPC, the GNU linker is very broken
 
6260
      if test "$host_cpu" != ia64; then
 
6261
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6262
        cat <<_LT_EOF 1>&2
 
6263
 
 
6264
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
6265
*** to be unable to reliably create shared libraries on AIX.
 
6266
*** Therefore, libtool is disabling shared libraries support.  If you
 
6267
*** really care for shared libraries, you may want to modify your PATH
 
6268
*** so that a non-GNU linker is found, and then restart.
 
6269
 
 
6270
_LT_EOF
 
6271
      fi
 
6272
      ;;
 
6273
 
 
6274
    amigaos*)
 
6275
      case $host_cpu in
 
6276
      powerpc)
 
6277
            # see comment about AmigaOS4 .so support
 
6278
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6279
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
 
6280
        ;;
 
6281
      m68k)
 
6282
            _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)'
 
6283
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6284
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6285
        ;;
 
6286
      esac
 
6287
      ;;
 
6288
 
 
6289
    beos*)
 
6290
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6291
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6292
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
6293
        # support --undefined.  This deserves some investigation.  FIXME
 
6294
        _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6295
      else
 
6296
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6297
      fi
 
6298
      ;;
 
6299
 
 
6300
    cygwin* | mingw* | pw32* | cegcc*)
 
6301
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
6302
      # as there is no search path for DLLs.
 
6303
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6304
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6305
      _LT_TAGVAR(always_export_symbols, $1)=no
 
6306
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6307
      _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'
 
6308
 
 
6309
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
6310
        _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'
 
6311
        # If the export-symbols file already is a .def file (1st line
 
6312
        # is EXPORTS), use it as is; otherwise, prepend...
 
6313
        _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
6314
          cp $export_symbols $output_objdir/$soname.def;
 
6315
        else
 
6316
          echo EXPORTS > $output_objdir/$soname.def;
 
6317
          cat $export_symbols >> $output_objdir/$soname.def;
 
6318
        fi~
 
6319
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
6320
      else
 
6321
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6322
      fi
 
6323
      ;;
 
6324
 
 
6325
    interix[[3-9]]*)
 
6326
      _LT_TAGVAR(hardcode_direct, $1)=no
 
6327
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6328
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6329
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6330
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
6331
      # Instead, shared libraries are loaded at an image base (0x10000000 by
 
6332
      # default) and relocated if they conflict, which is a slow very memory
 
6333
      # consuming and fragmenting process.  To avoid this, we pick a random,
 
6334
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
6335
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
6336
      _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'
 
6337
      _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'
 
6338
      ;;
 
6339
 
 
6340
    gnu* | linux* | tpf* | k*bsd*-gnu)
 
6341
      tmp_diet=no
 
6342
      if test "$host_os" = linux-dietlibc; then
 
6343
        case $cc_basename in
 
6344
          diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
 
6345
        esac
 
6346
      fi
 
6347
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 
6348
         && test "$tmp_diet" = no
 
6349
      then
 
6350
        tmp_addflag=
 
6351
        tmp_sharedflag='-shared'
 
6352
        case $cc_basename,$host_cpu in
 
6353
        pgcc*)                          # Portland Group C compiler
 
6354
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
6355
          tmp_addflag=' $pic_flag'
 
6356
          ;;
 
6357
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
 
6358
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
6359
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
6360
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
 
6361
          tmp_addflag=' -i_dynamic' ;;
 
6362
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
6363
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
6364
        ifc* | ifort*)                  # Intel Fortran compiler
 
6365
          tmp_addflag=' -nofor_main' ;;
 
6366
        lf95*)                          # Lahey Fortran 8.1
 
6367
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6368
          tmp_sharedflag='--shared' ;;
 
6369
        xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
 
6370
          tmp_sharedflag='-qmkshrobj'
 
6371
          tmp_addflag= ;;
 
6372
        esac
 
6373
        case `$CC -V 2>&1 | sed 5q` in
 
6374
        *Sun\ C*)                       # Sun C 5.9
 
6375
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
6376
          _LT_TAGVAR(compiler_needs_object, $1)=yes
 
6377
          tmp_sharedflag='-G' ;;
 
6378
        *Sun\ F*)                       # Sun Fortran 8.3
 
6379
          tmp_sharedflag='-G' ;;
 
6380
        esac
 
6381
        _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6382
 
 
6383
        if test "x$supports_anon_versioning" = xyes; then
 
6384
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
6385
            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
6386
            echo "local: *; };" >> $output_objdir/$libname.ver~
 
6387
            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
6388
        fi
 
6389
 
 
6390
        case $cc_basename in
 
6391
        xlf*)
 
6392
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 
6393
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
 
6394
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6395
          _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
6396
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
 
6397
          if test "x$supports_anon_versioning" = xyes; then
 
6398
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
6399
              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
6400
              echo "local: *; };" >> $output_objdir/$libname.ver~
 
6401
              $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 
6402
          fi
 
6403
          ;;
 
6404
        esac
 
6405
      else
 
6406
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6407
      fi
 
6408
      ;;
 
6409
 
 
6410
    netbsd*)
 
6411
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
6412
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
6413
        wlarc=
 
6414
      else
 
6415
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6416
        _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'
 
6417
      fi
 
6418
      ;;
 
6419
 
 
6420
    solaris*)
 
6421
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
 
6422
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6423
        cat <<_LT_EOF 1>&2
 
6424
 
 
6425
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
6426
*** create shared libraries on Solaris systems.  Therefore, libtool
 
6427
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
6428
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
6429
*** your PATH or compiler configuration so that the native linker is
 
6430
*** used, and then restart.
 
6431
 
 
6432
_LT_EOF
 
6433
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6434
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6435
        _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'
 
6436
      else
 
6437
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6438
      fi
 
6439
      ;;
 
6440
 
 
6441
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
 
6442
      case `$LD -v 2>&1` in
 
6443
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
 
6444
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6445
        cat <<_LT_EOF 1>&2
 
6446
 
 
6447
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 
6448
*** reliably create shared libraries on SCO systems.  Therefore, libtool
 
6449
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
6450
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
 
6451
*** your PATH or compiler configuration so that the native linker is
 
6452
*** used, and then restart.
 
6453
 
 
6454
_LT_EOF
 
6455
        ;;
 
6456
        *)
 
6457
          # For security reasons, it is highly recommended that you always
 
6458
          # use absolute paths for naming shared libraries, and exclude the
 
6459
          # DT_RUNPATH tag from executables and libraries.  But doing so
 
6460
          # requires that you compile everything twice, which is a pain.
 
6461
          if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6462
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6463
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6464
            _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'
 
6465
          else
 
6466
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6467
          fi
 
6468
        ;;
 
6469
      esac
 
6470
      ;;
 
6471
 
 
6472
    sunos4*)
 
6473
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6474
      wlarc=
 
6475
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6476
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6477
      ;;
 
6478
 
 
6479
    *)
 
6480
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6481
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6482
        _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'
 
6483
      else
 
6484
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6485
      fi
 
6486
      ;;
 
6487
    esac
 
6488
 
 
6489
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
 
6490
      runpath_var=
 
6491
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6492
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
6493
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6494
    fi
 
6495
  else
 
6496
    # PORTME fill in a description of your system's linker (not GNU ld)
 
6497
    case $host_os in
 
6498
    aix3*)
 
6499
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6500
      _LT_TAGVAR(always_export_symbols, $1)=yes
 
6501
      _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'
 
6502
      # Note: this linker hardcodes the directories in LIBPATH if there
 
6503
      # are no directories specified by -L.
 
6504
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6505
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 
6506
        # Neither direct hardcoding nor static linking is supported with a
 
6507
        # broken collect2.
 
6508
        _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
6509
      fi
 
6510
      ;;
 
6511
 
 
6512
    aix[[4-9]]*)
 
6513
      if test "$host_cpu" = ia64; then
 
6514
        # On IA64, the linker does run time linking by default, so we don't
 
6515
        # have to do anything special.
 
6516
        aix_use_runtimelinking=no
 
6517
        exp_sym_flag='-Bexport'
 
6518
        no_entry_flag=""
 
6519
      else
 
6520
        # If we're using GNU nm, then we don't want the "-C" option.
 
6521
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
6522
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
6523
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
6524
        else
 
6525
          _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'
 
6526
        fi
 
6527
        aix_use_runtimelinking=no
 
6528
 
 
6529
        # Test if we are trying to use run time linking or normal
 
6530
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
6531
        # need to do runtime linking.
 
6532
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 
6533
          for ld_flag in $LDFLAGS; do
 
6534
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
6535
            aix_use_runtimelinking=yes
 
6536
            break
 
6537
          fi
 
6538
          done
 
6539
          ;;
 
6540
        esac
 
6541
 
 
6542
        exp_sym_flag='-bexport'
 
6543
        no_entry_flag='-bnoentry'
 
6544
      fi
 
6545
 
 
6546
      # When large executables or shared objects are built, AIX ld can
 
6547
      # have problems creating the table of contents.  If linking a library
 
6548
      # or program results in "error TOC overflow" add -mminimal-toc to
 
6549
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
6550
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
6551
 
 
6552
      _LT_TAGVAR(archive_cmds, $1)=''
 
6553
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6554
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6555
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
6556
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6557
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
6558
 
 
6559
      if test "$GCC" = yes; then
 
6560
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
6561
        # We only want to do this on AIX 4.2 and lower, the check
 
6562
        # below for broken collect2 doesn't work under 4.3+
 
6563
          collect2name=`${CC} -print-prog-name=collect2`
 
6564
          if test -f "$collect2name" &&
 
6565
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
6566
          then
 
6567
          # We have reworked collect2
 
6568
          :
 
6569
          else
 
6570
          # We have old collect2
 
6571
          _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
6572
          # It fails to find uninstalled libraries when the uninstalled
 
6573
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
6574
          # to unsupported forces relinking
 
6575
          _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6576
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6577
          _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
6578
          fi
 
6579
          ;;
 
6580
        esac
 
6581
        shared_flag='-shared'
 
6582
        if test "$aix_use_runtimelinking" = yes; then
 
6583
          shared_flag="$shared_flag "'${wl}-G'
 
6584
        fi
 
6585
      else
 
6586
        # not using gcc
 
6587
        if test "$host_cpu" = ia64; then
 
6588
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
6589
        # chokes on -Wl,-G. The following line is correct:
 
6590
          shared_flag='-G'
 
6591
        else
 
6592
          if test "$aix_use_runtimelinking" = yes; then
 
6593
            shared_flag='${wl}-G'
 
6594
          else
 
6595
            shared_flag='${wl}-bM:SRE'
 
6596
          fi
 
6597
        fi
 
6598
      fi
 
6599
 
 
6600
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
 
6601
      # It seems that -bexpall does not export symbols beginning with
 
6602
      # underscore (_), so it is better to generate a list of symbols to export.
 
6603
      _LT_TAGVAR(always_export_symbols, $1)=yes
 
6604
      if test "$aix_use_runtimelinking" = yes; then
 
6605
        # Warning - without using the other runtime loading flags (-brtl),
 
6606
        # -berok will link without error, but may produce a broken library.
 
6607
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
 
6608
        # Determine the default libpath from the value encoded in an
 
6609
        # empty executable.
 
6610
        _LT_SYS_MODULE_PATH_AIX
 
6611
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6612
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
6613
      else
 
6614
        if test "$host_cpu" = ia64; then
 
6615
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
6616
          _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
6617
          _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"
 
6618
        else
 
6619
         # Determine the default libpath from the value encoded in an
 
6620
         # empty executable.
 
6621
         _LT_SYS_MODULE_PATH_AIX
 
6622
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6623
          # Warning - without using the other run time loading flags,
 
6624
          # -berok will link without error, but may produce a broken library.
 
6625
          _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
6626
          _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
6627
          # Exported symbols can be pulled into shared objects from archives
 
6628
          _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
6629
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6630
          # This is similar to how AIX traditionally builds its shared libraries.
 
6631
          _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'
 
6632
        fi
 
6633
      fi
 
6634
      ;;
 
6635
 
 
6636
    amigaos*)
 
6637
      case $host_cpu in
 
6638
      powerpc)
 
6639
            # see comment about AmigaOS4 .so support
 
6640
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6641
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
 
6642
        ;;
 
6643
      m68k)
 
6644
            _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)'
 
6645
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6646
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6647
        ;;
 
6648
      esac
 
6649
      ;;
 
6650
 
 
6651
    bsdi[[45]]*)
 
6652
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
6653
      ;;
 
6654
 
 
6655
    cygwin* | mingw* | pw32* | cegcc*)
 
6656
      # When not using gcc, we currently assume that we are using
 
6657
      # Microsoft Visual C++.
 
6658
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
6659
      # no search path for DLLs.
 
6660
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
6661
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6662
      # Tell ltmain to make .lib files, not .a files.
 
6663
      libext=lib
 
6664
      # Tell ltmain to make .dll files, not .so files.
 
6665
      shrext_cmds=".dll"
 
6666
      # FIXME: Setting linknames here is a bad hack.
 
6667
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
6668
      # The linker will automatically build a .lib file if we build a DLL.
 
6669
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
6670
      # FIXME: Should let the user specify the lib program.
 
6671
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
 
6672
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
 
6673
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6674
      ;;
 
6675
 
 
6676
    darwin* | rhapsody*)
 
6677
      _LT_DARWIN_LINKER_FEATURES($1)
 
6678
      ;;
 
6679
 
 
6680
    dgux*)
 
6681
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6682
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6683
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6684
      ;;
 
6685
 
 
6686
    freebsd1*)
 
6687
      _LT_TAGVAR(ld_shlibs, $1)=no
 
6688
      ;;
 
6689
 
 
6690
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
6691
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
6692
    # does not break anything, and helps significantly (at the cost of a little
 
6693
    # extra space).
 
6694
    freebsd2.2*)
 
6695
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
6696
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6697
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6698
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6699
      ;;
 
6700
 
 
6701
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
6702
    freebsd2*)
 
6703
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6704
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6705
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6706
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6707
      ;;
 
6708
 
 
6709
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
6710
    freebsd* | dragonfly*)
 
6711
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
6712
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6713
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6714
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6715
      ;;
 
6716
 
 
6717
    hpux9*)
 
6718
      if test "$GCC" = yes; then
 
6719
        _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'
 
6720
      else
 
6721
        _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'
 
6722
      fi
 
6723
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6724
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6725
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6726
 
 
6727
      # hardcode_minus_L: Not really in the search PATH,
 
6728
      # but as the default location of the library.
 
6729
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6730
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6731
      ;;
 
6732
 
 
6733
    hpux10*)
 
6734
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6735
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6736
      else
 
6737
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
6738
      fi
 
6739
      if test "$with_gnu_ld" = no; then
 
6740
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6741
        _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
6742
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6743
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
6744
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6745
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6746
        # hardcode_minus_L: Not really in the search PATH,
 
6747
        # but as the default location of the library.
 
6748
        _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6749
      fi
 
6750
      ;;
 
6751
 
 
6752
    hpux11*)
 
6753
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6754
        case $host_cpu in
 
6755
        hppa*64*)
 
6756
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6757
          ;;
 
6758
        ia64*)
 
6759
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
6760
          ;;
 
6761
        *)
 
6762
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6763
          ;;
 
6764
        esac
 
6765
      else
 
6766
        case $host_cpu in
 
6767
        hppa*64*)
 
6768
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6769
          ;;
 
6770
        ia64*)
 
6771
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
6772
          ;;
 
6773
        *)
 
6774
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6775
          ;;
 
6776
        esac
 
6777
      fi
 
6778
      if test "$with_gnu_ld" = no; then
 
6779
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6780
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6781
 
 
6782
        case $host_cpu in
 
6783
        hppa*64*|ia64*)
 
6784
          _LT_TAGVAR(hardcode_direct, $1)=no
 
6785
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6786
          ;;
 
6787
        *)
 
6788
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
6789
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6790
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6791
 
 
6792
          # hardcode_minus_L: Not really in the search PATH,
 
6793
          # but as the default location of the library.
 
6794
          _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6795
          ;;
 
6796
        esac
 
6797
      fi
 
6798
      ;;
 
6799
 
 
6800
    irix5* | irix6* | nonstopux*)
 
6801
      if test "$GCC" = yes; then
 
6802
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6803
        # Try to use the -exported_symbol ld option, if it does not
 
6804
        # work, assume that -exports_file does not work either and
 
6805
        # implicitly export all symbols.
 
6806
        save_LDFLAGS="$LDFLAGS"
 
6807
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
 
6808
        AC_LINK_IFELSE(int foo(void) {},
 
6809
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
6810
        )
 
6811
        LDFLAGS="$save_LDFLAGS"
 
6812
      else
 
6813
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
6814
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
 
6815
      fi
 
6816
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6817
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6818
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6819
      _LT_TAGVAR(inherit_rpath, $1)=yes
 
6820
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6821
      ;;
 
6822
 
 
6823
    netbsd*)
 
6824
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
6825
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
6826
      else
 
6827
        _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
6828
      fi
 
6829
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6830
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6831
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6832
      ;;
 
6833
 
 
6834
    newsos6)
 
6835
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6836
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6837
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6838
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6839
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6840
      ;;
 
6841
 
 
6842
    *nto* | *qnx*)
 
6843
      ;;
 
6844
 
 
6845
    openbsd*)
 
6846
      if test -f /usr/libexec/ld.so; then
 
6847
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
6848
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6849
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6850
        if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6851
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6852
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
6853
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6854
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6855
        else
 
6856
          case $host_os in
 
6857
           openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
6858
             _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6859
             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6860
             ;;
 
6861
           *)
 
6862
             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6863
             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6864
             ;;
 
6865
          esac
 
6866
        fi
 
6867
      else
 
6868
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6869
      fi
 
6870
      ;;
 
6871
 
 
6872
    os2*)
 
6873
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6874
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6875
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6876
      _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'
 
6877
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
6878
      ;;
 
6879
 
 
6880
    osf3*)
 
6881
      if test "$GCC" = yes; then
 
6882
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6883
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6884
      else
 
6885
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6886
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
6887
      fi
 
6888
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6889
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6890
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6891
      ;;
 
6892
 
 
6893
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
6894
      if test "$GCC" = yes; then
 
6895
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6896
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6897
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6898
      else
 
6899
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6900
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
6901
        _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~
 
6902
        $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
6903
 
 
6904
        # Both c and cxx compiler support -rpath directly
 
6905
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
6906
      fi
 
6907
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6908
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6909
      ;;
 
6910
 
 
6911
    solaris*)
 
6912
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
 
6913
      if test "$GCC" = yes; then
 
6914
        wlarc='${wl}'
 
6915
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6916
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6917
          $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
6918
      else
 
6919
        case `$CC -V 2>&1` in
 
6920
        *"Compilers 5.0"*)
 
6921
          wlarc=''
 
6922
          _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6923
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6924
          $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 
6925
          ;;
 
6926
        *)
 
6927
          wlarc='${wl}'
 
6928
          _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6929
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6930
          $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
6931
          ;;
 
6932
        esac
 
6933
      fi
 
6934
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6935
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6936
      case $host_os in
 
6937
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
6938
      *)
 
6939
        # The compiler driver will combine and reorder linker options,
 
6940
        # but understands `-z linker_flag'.  GCC discards it without `$wl',
 
6941
        # but is careful enough not to reorder.
 
6942
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
6943
        if test "$GCC" = yes; then
 
6944
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
6945
        else
 
6946
          _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
6947
        fi
 
6948
        ;;
 
6949
      esac
 
6950
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6951
      ;;
 
6952
 
 
6953
    sunos4*)
 
6954
      if test "x$host_vendor" = xsequent; then
 
6955
        # Use $CC to link under sequent, because it throws in some extra .o
 
6956
        # files that make .init and .fini sections work.
 
6957
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6958
      else
 
6959
        _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
6960
      fi
 
6961
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6962
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6963
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6964
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6965
      ;;
 
6966
 
 
6967
    sysv4)
 
6968
      case $host_vendor in
 
6969
        sni)
 
6970
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6971
          _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
6972
        ;;
 
6973
        siemens)
 
6974
          ## LD is ld it makes a PLAMLIB
 
6975
          ## CC just makes a GrossModule.
 
6976
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
6977
          _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
6978
          _LT_TAGVAR(hardcode_direct, $1)=no
 
6979
        ;;
 
6980
        motorola)
 
6981
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6982
          _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
6983
        ;;
 
6984
      esac
 
6985
      runpath_var='LD_RUN_PATH'
 
6986
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6987
      ;;
 
6988
 
 
6989
    sysv4.3*)
 
6990
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6991
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6992
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
6993
      ;;
 
6994
 
 
6995
    sysv4*MP*)
 
6996
      if test -d /usr/nec; then
 
6997
        _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6998
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6999
        runpath_var=LD_RUN_PATH
 
7000
        hardcode_runpath_var=yes
 
7001
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
7002
      fi
 
7003
      ;;
 
7004
 
 
7005
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
7006
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
7007
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7008
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7009
      runpath_var='LD_RUN_PATH'
 
7010
 
 
7011
      if test "$GCC" = yes; then
 
7012
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7013
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7014
      else
 
7015
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7016
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7017
      fi
 
7018
      ;;
 
7019
 
 
7020
    sysv5* | sco3.2v5* | sco5v6*)
 
7021
      # Note: We can NOT use -z defs as we might desire, because we do not
 
7022
      # link with -lc, and that would cause any symbols used from libc to
 
7023
      # always be unresolved, which means just about no library would
 
7024
      # ever link correctly.  If we're not using GNU ld we use -z text
 
7025
      # though, which does catch some bad symbols but isn't as heavy-handed
 
7026
      # as -z defs.
 
7027
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
7028
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
7029
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7030
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7031
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
 
7032
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7033
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7034
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
7035
      runpath_var='LD_RUN_PATH'
 
7036
 
 
7037
      if test "$GCC" = yes; then
 
7038
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7039
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7040
      else
 
7041
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7042
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7043
      fi
 
7044
      ;;
 
7045
 
 
7046
    uts4*)
 
7047
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7048
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7049
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7050
      ;;
 
7051
 
 
7052
    *)
 
7053
      _LT_TAGVAR(ld_shlibs, $1)=no
 
7054
      ;;
 
7055
    esac
 
7056
 
 
7057
    if test x$host_vendor = xsni; then
 
7058
      case $host in
 
7059
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
7060
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
 
7061
        ;;
 
7062
      esac
 
7063
    fi
 
7064
  fi
 
7065
])
 
7066
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
 
7067
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
7068
 
 
7069
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
7070
 
 
7071
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
 
7072
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
 
7073
_LT_DECL([], [extract_expsyms_cmds], [2],
 
7074
    [The commands to extract the exported symbol list from a shared archive])
 
7075
 
 
7076
#
 
7077
# Do we need to explicitly link libc?
 
7078
#
 
7079
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
 
7080
x|xyes)
 
7081
  # Assume -lc should be added
 
7082
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7083
 
 
7084
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
7085
    case $_LT_TAGVAR(archive_cmds, $1) in
 
7086
    *'~'*)
 
7087
      # FIXME: we may have to deal with multi-command sequences.
 
7088
      ;;
 
7089
    '$CC '*)
 
7090
      # Test whether the compiler implicitly links with -lc since on some
 
7091
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
7092
      # to ld, don't add -lc before -lgcc.
 
7093
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
7094
      $RM conftest*
 
7095
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
7096
 
 
7097
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
7098
        soname=conftest
 
7099
        lib=conftest
 
7100
        libobjs=conftest.$ac_objext
 
7101
        deplibs=
 
7102
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
 
7103
        pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
 
7104
        compiler_flags=-v
 
7105
        linker_flags=-v
 
7106
        verstring=
 
7107
        output_objdir=.
 
7108
        libname=conftest
 
7109
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
 
7110
        _LT_TAGVAR(allow_undefined_flag, $1)=
 
7111
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
 
7112
        then
 
7113
          _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7114
        else
 
7115
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7116
        fi
 
7117
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
7118
      else
 
7119
        cat conftest.err 1>&5
 
7120
      fi
 
7121
      $RM conftest*
 
7122
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
 
7123
      ;;
 
7124
    esac
 
7125
  fi
 
7126
  ;;
 
7127
esac
 
7128
 
 
7129
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
 
7130
    [Whether or not to add -lc for building shared libraries])
 
7131
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
 
7132
    [enable_shared_with_static_runtimes], [0],
 
7133
    [Whether or not to disallow shared libs when runtime libs are static])
 
7134
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
 
7135
    [Compiler flag to allow reflexive dlopens])
 
7136
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
 
7137
    [Compiler flag to generate shared objects directly from archives])
 
7138
_LT_TAGDECL([], [compiler_needs_object], [1],
 
7139
    [Whether the compiler copes with passing no objects directly])
 
7140
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
 
7141
    [Create an old-style archive from a shared archive])
 
7142
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
 
7143
    [Create a temporary old-style archive to link instead of a shared archive])
 
7144
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
 
7145
_LT_TAGDECL([], [archive_expsym_cmds], [2])
 
7146
_LT_TAGDECL([], [module_cmds], [2],
 
7147
    [Commands used to build a loadable module if different from building
 
7148
    a shared archive.])
 
7149
_LT_TAGDECL([], [module_expsym_cmds], [2])
 
7150
_LT_TAGDECL([], [with_gnu_ld], [1],
 
7151
    [Whether we are building with GNU ld or not])
 
7152
_LT_TAGDECL([], [allow_undefined_flag], [1],
 
7153
    [Flag that allows shared libraries with undefined symbols to be built])
 
7154
_LT_TAGDECL([], [no_undefined_flag], [1],
 
7155
    [Flag that enforces no undefined symbols])
 
7156
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
 
7157
    [Flag to hardcode $libdir into a binary during linking.
 
7158
    This must work even if $libdir does not exist])
 
7159
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
 
7160
    [[If ld is used when linking, flag to hardcode $libdir into a binary
 
7161
    during linking.  This must work even if $libdir does not exist]])
 
7162
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
 
7163
    [Whether we need a single "-rpath" flag with a separated argument])
 
7164
_LT_TAGDECL([], [hardcode_direct], [0],
 
7165
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
 
7166
    DIR into the resulting binary])
 
7167
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
 
7168
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
 
7169
    DIR into the resulting binary and the resulting library dependency is
 
7170
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
 
7171
    library is relocated])
 
7172
_LT_TAGDECL([], [hardcode_minus_L], [0],
 
7173
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
 
7174
    into the resulting binary])
 
7175
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
 
7176
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
 
7177
    into the resulting binary])
 
7178
_LT_TAGDECL([], [hardcode_automatic], [0],
 
7179
    [Set to "yes" if building a shared library automatically hardcodes DIR
 
7180
    into the library and all subsequent libraries and executables linked
 
7181
    against it])
 
7182
_LT_TAGDECL([], [inherit_rpath], [0],
 
7183
    [Set to yes if linker adds runtime paths of dependent libraries
 
7184
    to runtime path list])
 
7185
_LT_TAGDECL([], [link_all_deplibs], [0],
 
7186
    [Whether libtool must link a program against all its dependency libraries])
 
7187
_LT_TAGDECL([], [fix_srcfile_path], [1],
 
7188
    [Fix the shell variable $srcfile for the compiler])
 
7189
_LT_TAGDECL([], [always_export_symbols], [0],
 
7190
    [Set to "yes" if exported symbols are required])
 
7191
_LT_TAGDECL([], [export_symbols_cmds], [2],
 
7192
    [The commands to list exported symbols])
 
7193
_LT_TAGDECL([], [exclude_expsyms], [1],
 
7194
    [Symbols that should not be listed in the preloaded symbols])
 
7195
_LT_TAGDECL([], [include_expsyms], [1],
 
7196
    [Symbols that must always be exported])
 
7197
_LT_TAGDECL([], [prelink_cmds], [2],
 
7198
    [Commands necessary for linking programs (against libraries) with templates])
 
7199
_LT_TAGDECL([], [file_list_spec], [1],
 
7200
    [Specify filename containing input files])
 
7201
dnl FIXME: Not yet implemented
 
7202
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
 
7203
dnl    [Compiler flag to generate thread safe objects])
 
7204
])# _LT_LINKER_SHLIBS
 
7205
 
 
7206
 
 
7207
# _LT_LANG_C_CONFIG([TAG])
 
7208
# ------------------------
 
7209
# Ensure that the configuration variables for a C compiler are suitably
 
7210
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
7211
# the compiler configuration to `libtool'.
 
7212
m4_defun([_LT_LANG_C_CONFIG],
 
7213
[m4_require([_LT_DECL_EGREP])dnl
 
7214
lt_save_CC="$CC"
 
7215
AC_LANG_PUSH(C)
 
7216
 
 
7217
# Source file extension for C test sources.
 
7218
ac_ext=c
 
7219
 
 
7220
# Object file extension for compiled C test sources.
 
7221
objext=o
 
7222
_LT_TAGVAR(objext, $1)=$objext
 
7223
 
 
7224
# Code to be used in simple compile tests
 
7225
lt_simple_compile_test_code="int some_variable = 0;"
 
7226
 
 
7227
# Code to be used in simple link tests
 
7228
lt_simple_link_test_code='int main(){return(0);}'
 
7229
 
 
7230
_LT_TAG_COMPILER
 
7231
# Save the default compiler, since it gets overwritten when the other
 
7232
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
 
7233
compiler_DEFAULT=$CC
 
7234
 
 
7235
# save warnings/boilerplate of simple test code
 
7236
_LT_COMPILER_BOILERPLATE
 
7237
_LT_LINKER_BOILERPLATE
 
7238
 
 
7239
if test -n "$compiler"; then
 
7240
  _LT_COMPILER_NO_RTTI($1)
 
7241
  _LT_COMPILER_PIC($1)
 
7242
  _LT_COMPILER_C_O($1)
 
7243
  _LT_COMPILER_FILE_LOCKS($1)
 
7244
  _LT_LINKER_SHLIBS($1)
 
7245
  _LT_SYS_DYNAMIC_LINKER($1)
 
7246
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
7247
  LT_SYS_DLOPEN_SELF
 
7248
  _LT_CMD_STRIPLIB
 
7249
 
 
7250
  # Report which library types will actually be built
 
7251
  AC_MSG_CHECKING([if libtool supports shared libraries])
 
7252
  AC_MSG_RESULT([$can_build_shared])
 
7253
 
 
7254
  AC_MSG_CHECKING([whether to build shared libraries])
 
7255
  test "$can_build_shared" = "no" && enable_shared=no
 
7256
 
 
7257
  # On AIX, shared libraries and static libraries use the same namespace, and
 
7258
  # are all built from PIC.
 
7259
  case $host_os in
 
7260
  aix3*)
 
7261
    test "$enable_shared" = yes && enable_static=no
 
7262
    if test -n "$RANLIB"; then
 
7263
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
7264
      postinstall_cmds='$RANLIB $lib'
 
7265
    fi
 
7266
    ;;
 
7267
 
 
7268
  aix[[4-9]]*)
 
7269
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
7270
      test "$enable_shared" = yes && enable_static=no
 
7271
    fi
 
7272
    ;;
 
7273
  esac
 
7274
  AC_MSG_RESULT([$enable_shared])
 
7275
 
 
7276
  AC_MSG_CHECKING([whether to build static libraries])
 
7277
  # Make sure either enable_shared or enable_static is yes.
 
7278
  test "$enable_shared" = yes || enable_static=yes
 
7279
  AC_MSG_RESULT([$enable_static])
 
7280
 
 
7281
  _LT_CONFIG($1)
 
7282
fi
 
7283
AC_LANG_POP
 
7284
CC="$lt_save_CC"
 
7285
])# _LT_LANG_C_CONFIG
 
7286
 
 
7287
 
 
7288
# _LT_PROG_CXX
 
7289
# ------------
 
7290
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
 
7291
# compiler, we have our own version here.
 
7292
m4_defun([_LT_PROG_CXX],
 
7293
[
 
7294
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
 
7295
AC_PROG_CXX
 
7296
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
7297
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
7298
    (test "X$CXX" != "Xg++"))) ; then
 
7299
  AC_PROG_CXXCPP
 
7300
else
 
7301
  _lt_caught_CXX_error=yes
 
7302
fi
 
7303
popdef([AC_MSG_ERROR])
 
7304
])# _LT_PROG_CXX
 
7305
 
 
7306
dnl aclocal-1.4 backwards compatibility:
 
7307
dnl AC_DEFUN([_LT_PROG_CXX], [])
 
7308
 
 
7309
 
 
7310
# _LT_LANG_CXX_CONFIG([TAG])
 
7311
# --------------------------
 
7312
# Ensure that the configuration variables for a C++ compiler are suitably
 
7313
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
7314
# the compiler configuration to `libtool'.
 
7315
m4_defun([_LT_LANG_CXX_CONFIG],
 
7316
[AC_REQUIRE([_LT_PROG_CXX])dnl
 
7317
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
7318
m4_require([_LT_DECL_EGREP])dnl
 
7319
 
 
7320
AC_LANG_PUSH(C++)
 
7321
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7322
_LT_TAGVAR(allow_undefined_flag, $1)=
 
7323
_LT_TAGVAR(always_export_symbols, $1)=no
 
7324
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
7325
_LT_TAGVAR(compiler_needs_object, $1)=no
 
7326
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
7327
_LT_TAGVAR(hardcode_direct, $1)=no
 
7328
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
7329
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7330
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
7331
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
7332
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
7333
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
7334
_LT_TAGVAR(hardcode_automatic, $1)=no
 
7335
_LT_TAGVAR(inherit_rpath, $1)=no
 
7336
_LT_TAGVAR(module_cmds, $1)=
 
7337
_LT_TAGVAR(module_expsym_cmds, $1)=
 
7338
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
7339
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7340
_LT_TAGVAR(no_undefined_flag, $1)=
 
7341
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
7342
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
7343
 
 
7344
# Source file extension for C++ test sources.
 
7345
ac_ext=cpp
 
7346
 
 
7347
# Object file extension for compiled C++ test sources.
 
7348
objext=o
 
7349
_LT_TAGVAR(objext, $1)=$objext
 
7350
 
 
7351
# No sense in running all these tests if we already determined that
 
7352
# the CXX compiler isn't working.  Some variables (like enable_shared)
 
7353
# are currently assumed to apply to all compilers on this platform,
 
7354
# and will be corrupted by setting them based on a non-working compiler.
 
7355
if test "$_lt_caught_CXX_error" != yes; then
 
7356
  # Code to be used in simple compile tests
 
7357
  lt_simple_compile_test_code="int some_variable = 0;"
 
7358
 
 
7359
  # Code to be used in simple link tests
 
7360
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
 
7361
 
 
7362
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7363
  _LT_TAG_COMPILER
 
7364
 
 
7365
  # save warnings/boilerplate of simple test code
 
7366
  _LT_COMPILER_BOILERPLATE
 
7367
  _LT_LINKER_BOILERPLATE
 
7368
 
 
7369
  # Allow CC to be a program name with arguments.
 
7370
  lt_save_CC=$CC
 
7371
  lt_save_LD=$LD
 
7372
  lt_save_GCC=$GCC
 
7373
  GCC=$GXX
 
7374
  lt_save_with_gnu_ld=$with_gnu_ld
 
7375
  lt_save_path_LD=$lt_cv_path_LD
 
7376
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
7377
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
7378
  else
 
7379
    $as_unset lt_cv_prog_gnu_ld
 
7380
  fi
 
7381
  if test -n "${lt_cv_path_LDCXX+set}"; then
 
7382
    lt_cv_path_LD=$lt_cv_path_LDCXX
 
7383
  else
 
7384
    $as_unset lt_cv_path_LD
 
7385
  fi
 
7386
  test -z "${LDCXX+set}" || LD=$LDCXX
 
7387
  CC=${CXX-"c++"}
 
7388
  compiler=$CC
 
7389
  _LT_TAGVAR(compiler, $1)=$CC
 
7390
  _LT_CC_BASENAME([$compiler])
 
7391
 
 
7392
  if test -n "$compiler"; then
 
7393
    # We don't want -fno-exception when compiling C++ code, so set the
 
7394
    # no_builtin_flag separately
 
7395
    if test "$GXX" = yes; then
 
7396
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
7397
    else
 
7398
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
7399
    fi
 
7400
 
 
7401
    if test "$GXX" = yes; then
 
7402
      # Set up default GNU C++ configuration
 
7403
 
 
7404
      LT_PATH_LD
 
7405
 
 
7406
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
7407
      # archiving commands below assume that GNU ld is being used.
 
7408
      if test "$with_gnu_ld" = yes; then
 
7409
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7410
        _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'
 
7411
 
 
7412
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7413
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7414
 
 
7415
        # If archive_cmds runs LD, not CC, wlarc should be empty
 
7416
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
7417
        #     investigate it a little bit more. (MM)
 
7418
        wlarc='${wl}'
 
7419
 
 
7420
        # ancient GNU ld didn't support --whole-archive et. al.
 
7421
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 
7422
          $GREP 'no-whole-archive' > /dev/null; then
 
7423
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
7424
        else
 
7425
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
7426
        fi
 
7427
      else
 
7428
        with_gnu_ld=no
 
7429
        wlarc=
 
7430
 
 
7431
        # A generic and very simple default shared library creation
 
7432
        # command for GNU C++ for the case where it uses the native
 
7433
        # linker, instead of GNU ld.  If possible, this setting should
 
7434
        # overridden to take advantage of the native linker features on
 
7435
        # the platform it is being used on.
 
7436
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
7437
      fi
 
7438
 
 
7439
      # Commands to make compiler produce verbose output that lists
 
7440
      # what "hidden" libraries, object files and flags are used when
 
7441
      # linking a shared library.
 
7442
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
7443
 
 
7444
    else
 
7445
      GXX=no
 
7446
      with_gnu_ld=no
 
7447
      wlarc=
 
7448
    fi
 
7449
 
 
7450
    # PORTME: fill in a description of your system's C++ link characteristics
 
7451
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
7452
    _LT_TAGVAR(ld_shlibs, $1)=yes
 
7453
    case $host_os in
 
7454
      aix3*)
 
7455
        # FIXME: insert proper C++ library support
 
7456
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7457
        ;;
 
7458
      aix[[4-9]]*)
 
7459
        if test "$host_cpu" = ia64; then
 
7460
          # On IA64, the linker does run time linking by default, so we don't
 
7461
          # have to do anything special.
 
7462
          aix_use_runtimelinking=no
 
7463
          exp_sym_flag='-Bexport'
 
7464
          no_entry_flag=""
 
7465
        else
 
7466
          aix_use_runtimelinking=no
 
7467
 
 
7468
          # Test if we are trying to use run time linking or normal
 
7469
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
7470
          # need to do runtime linking.
 
7471
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 
7472
            for ld_flag in $LDFLAGS; do
 
7473
              case $ld_flag in
 
7474
              *-brtl*)
 
7475
                aix_use_runtimelinking=yes
 
7476
                break
 
7477
                ;;
 
7478
              esac
 
7479
            done
 
7480
            ;;
 
7481
          esac
 
7482
 
 
7483
          exp_sym_flag='-bexport'
 
7484
          no_entry_flag='-bnoentry'
 
7485
        fi
 
7486
 
 
7487
        # When large executables or shared objects are built, AIX ld can
 
7488
        # have problems creating the table of contents.  If linking a library
 
7489
        # or program results in "error TOC overflow" add -mminimal-toc to
 
7490
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
7491
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
7492
 
 
7493
        _LT_TAGVAR(archive_cmds, $1)=''
 
7494
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
7495
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
7496
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7497
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7498
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
7499
 
 
7500
        if test "$GXX" = yes; then
 
7501
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
7502
          # We only want to do this on AIX 4.2 and lower, the check
 
7503
          # below for broken collect2 doesn't work under 4.3+
 
7504
          collect2name=`${CC} -print-prog-name=collect2`
 
7505
          if test -f "$collect2name" &&
 
7506
             strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
7507
          then
 
7508
            # We have reworked collect2
 
7509
            :
 
7510
          else
 
7511
            # We have old collect2
 
7512
            _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
7513
            # It fails to find uninstalled libraries when the uninstalled
 
7514
            # path is not listed in the libpath.  Setting hardcode_minus_L
 
7515
            # to unsupported forces relinking
 
7516
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
7517
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7518
            _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
7519
          fi
 
7520
          esac
 
7521
          shared_flag='-shared'
 
7522
          if test "$aix_use_runtimelinking" = yes; then
 
7523
            shared_flag="$shared_flag "'${wl}-G'
 
7524
          fi
 
7525
        else
 
7526
          # not using gcc
 
7527
          if test "$host_cpu" = ia64; then
 
7528
          # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
7529
          # chokes on -Wl,-G. The following line is correct:
 
7530
          shared_flag='-G'
 
7531
          else
 
7532
            if test "$aix_use_runtimelinking" = yes; then
 
7533
              shared_flag='${wl}-G'
 
7534
            else
 
7535
              shared_flag='${wl}-bM:SRE'
 
7536
            fi
 
7537
          fi
 
7538
        fi
 
7539
 
 
7540
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
 
7541
        # It seems that -bexpall does not export symbols beginning with
 
7542
        # underscore (_), so it is better to generate a list of symbols to
 
7543
        # export.
 
7544
        _LT_TAGVAR(always_export_symbols, $1)=yes
 
7545
        if test "$aix_use_runtimelinking" = yes; then
 
7546
          # Warning - without using the other runtime loading flags (-brtl),
 
7547
          # -berok will link without error, but may produce a broken library.
 
7548
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
 
7549
          # Determine the default libpath from the value encoded in an empty
 
7550
          # executable.
 
7551
          _LT_SYS_MODULE_PATH_AIX
 
7552
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7553
 
 
7554
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
7555
        else
 
7556
          if test "$host_cpu" = ia64; then
 
7557
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
7558
            _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
7559
            _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"
 
7560
          else
 
7561
            # Determine the default libpath from the value encoded in an
 
7562
            # empty executable.
 
7563
            _LT_SYS_MODULE_PATH_AIX
 
7564
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7565
            # Warning - without using the other run time loading flags,
 
7566
            # -berok will link without error, but may produce a broken library.
 
7567
            _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
7568
            _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
7569
            # Exported symbols can be pulled into shared objects from archives
 
7570
            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
7571
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7572
            # This is similar to how AIX traditionally builds its shared
 
7573
            # libraries.
 
7574
            _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'
 
7575
          fi
 
7576
        fi
 
7577
        ;;
 
7578
 
 
7579
      beos*)
 
7580
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
7581
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7582
          # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
7583
          # support --undefined.  This deserves some investigation.  FIXME
 
7584
          _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7585
        else
 
7586
          _LT_TAGVAR(ld_shlibs, $1)=no
 
7587
        fi
 
7588
        ;;
 
7589
 
 
7590
      chorus*)
 
7591
        case $cc_basename in
 
7592
          *)
 
7593
          # FIXME: insert proper C++ library support
 
7594
          _LT_TAGVAR(ld_shlibs, $1)=no
 
7595
          ;;
 
7596
        esac
 
7597
        ;;
 
7598
 
 
7599
      cygwin* | mingw* | pw32* | cegcc*)
 
7600
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
7601
        # as there is no search path for DLLs.
 
7602
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7603
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7604
        _LT_TAGVAR(always_export_symbols, $1)=no
 
7605
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
7606
 
 
7607
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
7608
          _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'
 
7609
          # If the export-symbols file already is a .def file (1st line
 
7610
          # is EXPORTS), use it as is; otherwise, prepend...
 
7611
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
7612
            cp $export_symbols $output_objdir/$soname.def;
 
7613
          else
 
7614
            echo EXPORTS > $output_objdir/$soname.def;
 
7615
            cat $export_symbols >> $output_objdir/$soname.def;
 
7616
          fi~
 
7617
          $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'
 
7618
        else
 
7619
          _LT_TAGVAR(ld_shlibs, $1)=no
 
7620
        fi
 
7621
        ;;
 
7622
      darwin* | rhapsody*)
 
7623
        _LT_DARWIN_LINKER_FEATURES($1)
 
7624
        ;;
 
7625
 
 
7626
      dgux*)
 
7627
        case $cc_basename in
 
7628
          ec++*)
 
7629
            # FIXME: insert proper C++ library support
 
7630
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7631
            ;;
 
7632
          ghcx*)
 
7633
            # Green Hills C++ Compiler
 
7634
            # FIXME: insert proper C++ library support
 
7635
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7636
            ;;
 
7637
          *)
 
7638
            # FIXME: insert proper C++ library support
 
7639
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7640
            ;;
 
7641
        esac
 
7642
        ;;
 
7643
 
 
7644
      freebsd[[12]]*)
 
7645
        # C++ shared libraries reported to be fairly broken before
 
7646
        # switch to ELF
 
7647
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7648
        ;;
 
7649
 
 
7650
      freebsd-elf*)
 
7651
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7652
        ;;
 
7653
 
 
7654
      freebsd* | dragonfly*)
 
7655
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
7656
        # conventions
 
7657
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
7658
        ;;
 
7659
 
 
7660
      gnu*)
 
7661
        ;;
 
7662
 
 
7663
      hpux9*)
 
7664
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
7665
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7666
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7667
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
7668
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
7669
                                             # but as the default
 
7670
                                             # location of the library.
 
7671
 
 
7672
        case $cc_basename in
 
7673
          CC*)
 
7674
            # FIXME: insert proper C++ library support
 
7675
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7676
            ;;
 
7677
          aCC*)
 
7678
            _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'
 
7679
            # Commands to make compiler produce verbose output that lists
 
7680
            # what "hidden" libraries, object files and flags are used when
 
7681
            # linking a shared library.
 
7682
            #
 
7683
            # There doesn't appear to be a way to prevent this compiler from
 
7684
            # explicitly linking system object files so we need to strip them
 
7685
            # from the output so that they don't get included in the library
 
7686
            # dependencies.
 
7687
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
7688
            ;;
 
7689
          *)
 
7690
            if test "$GXX" = yes; then
 
7691
              _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'
 
7692
            else
 
7693
              # FIXME: insert proper C++ library support
 
7694
              _LT_TAGVAR(ld_shlibs, $1)=no
 
7695
            fi
 
7696
            ;;
 
7697
        esac
 
7698
        ;;
 
7699
 
 
7700
      hpux10*|hpux11*)
 
7701
        if test $with_gnu_ld = no; then
 
7702
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
7703
          _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7704
 
 
7705
          case $host_cpu in
 
7706
            hppa*64*|ia64*)
 
7707
              ;;
 
7708
            *)
 
7709
              _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7710
              ;;
 
7711
          esac
 
7712
        fi
 
7713
        case $host_cpu in
 
7714
          hppa*64*|ia64*)
 
7715
            _LT_TAGVAR(hardcode_direct, $1)=no
 
7716
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7717
            ;;
 
7718
          *)
 
7719
            _LT_TAGVAR(hardcode_direct, $1)=yes
 
7720
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
7721
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
7722
                                                 # but as the default
 
7723
                                                 # location of the library.
 
7724
            ;;
 
7725
        esac
 
7726
 
 
7727
        case $cc_basename in
 
7728
          CC*)
 
7729
            # FIXME: insert proper C++ library support
 
7730
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7731
            ;;
 
7732
          aCC*)
 
7733
            case $host_cpu in
 
7734
              hppa*64*)
 
7735
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7736
                ;;
 
7737
              ia64*)
 
7738
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7739
                ;;
 
7740
              *)
 
7741
                _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'
 
7742
                ;;
 
7743
            esac
 
7744
            # Commands to make compiler produce verbose output that lists
 
7745
            # what "hidden" libraries, object files and flags are used when
 
7746
            # linking a shared library.
 
7747
            #
 
7748
            # There doesn't appear to be a way to prevent this compiler from
 
7749
            # explicitly linking system object files so we need to strip them
 
7750
            # from the output so that they don't get included in the library
 
7751
            # dependencies.
 
7752
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
7753
            ;;
 
7754
          *)
 
7755
            if test "$GXX" = yes; then
 
7756
              if test $with_gnu_ld = no; then
 
7757
                case $host_cpu in
 
7758
                  hppa*64*)
 
7759
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7760
                    ;;
 
7761
                  ia64*)
 
7762
                    _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'
 
7763
                    ;;
 
7764
                  *)
 
7765
                    _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'
 
7766
                    ;;
 
7767
                esac
 
7768
              fi
 
7769
            else
 
7770
              # FIXME: insert proper C++ library support
 
7771
              _LT_TAGVAR(ld_shlibs, $1)=no
 
7772
            fi
 
7773
            ;;
 
7774
        esac
 
7775
        ;;
 
7776
 
 
7777
      interix[[3-9]]*)
 
7778
        _LT_TAGVAR(hardcode_direct, $1)=no
 
7779
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7780
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7781
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7782
        # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
7783
        # Instead, shared libraries are loaded at an image base (0x10000000 by
 
7784
        # default) and relocated if they conflict, which is a slow very memory
 
7785
        # consuming and fragmenting process.  To avoid this, we pick a random,
 
7786
        # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
7787
        # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
7788
        _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'
 
7789
        _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'
 
7790
        ;;
 
7791
      irix5* | irix6*)
 
7792
        case $cc_basename in
 
7793
          CC*)
 
7794
            # SGI C++
 
7795
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
7796
 
 
7797
            # Archives containing C++ object files must be created using
 
7798
            # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
7799
            # necessary to make sure instantiated templates are included
 
7800
            # in the archive.
 
7801
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
7802
            ;;
 
7803
          *)
 
7804
            if test "$GXX" = yes; then
 
7805
              if test "$with_gnu_ld" = no; then
 
7806
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7807
              else
 
7808
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
 
7809
              fi
 
7810
            fi
 
7811
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7812
            ;;
 
7813
        esac
 
7814
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7815
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7816
        _LT_TAGVAR(inherit_rpath, $1)=yes
 
7817
        ;;
 
7818
 
 
7819
      linux* | k*bsd*-gnu)
 
7820
        case $cc_basename in
 
7821
          KCC*)
 
7822
            # Kuck and Associates, Inc. (KAI) C++ Compiler
 
7823
 
 
7824
            # KCC will only create a shared library if the output file
 
7825
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
7826
            # to its proper name (with version) after linking.
 
7827
            _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'
 
7828
            _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'
 
7829
            # Commands to make compiler produce verbose output that lists
 
7830
            # what "hidden" libraries, object files and flags are used when
 
7831
            # linking a shared library.
 
7832
            #
 
7833
            # There doesn't appear to be a way to prevent this compiler from
 
7834
            # explicitly linking system object files so we need to strip them
 
7835
            # from the output so that they don't get included in the library
 
7836
            # dependencies.
 
7837
            output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
7838
 
 
7839
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7840
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7841
 
 
7842
            # Archives containing C++ object files must be created using
 
7843
            # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
7844
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
7845
            ;;
 
7846
          icpc* | ecpc* )
 
7847
            # Intel C++
 
7848
            with_gnu_ld=yes
 
7849
            # version 8.0 and above of icpc choke on multiply defined symbols
 
7850
            # if we add $predep_objects and $postdep_objects, however 7.1 and
 
7851
            # earlier do not add the objects themselves.
 
7852
            case `$CC -V 2>&1` in
 
7853
              *"Version 7."*)
 
7854
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7855
                _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'
 
7856
                ;;
 
7857
              *)  # Version 8.0 or newer
 
7858
                tmp_idyn=
 
7859
                case $host_cpu in
 
7860
                  ia64*) tmp_idyn=' -i_dynamic';;
 
7861
                esac
 
7862
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7863
                _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'
 
7864
                ;;
 
7865
            esac
 
7866
            _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7867
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7868
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7869
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
7870
            ;;
 
7871
          pgCC* | pgcpp*)
 
7872
            # Portland Group C++ compiler
 
7873
            case `$CC -V` in
 
7874
            *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
 
7875
              _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
 
7876
                rm -rf $tpldir~
 
7877
                $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
 
7878
                compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
 
7879
              _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
 
7880
                rm -rf $tpldir~
 
7881
                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
 
7882
                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
 
7883
                $RANLIB $oldlib'
 
7884
              _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
 
7885
                rm -rf $tpldir~
 
7886
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
 
7887
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
7888
              _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
 
7889
                rm -rf $tpldir~
 
7890
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
 
7891
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
7892
              ;;
 
7893
            *) # Version 6 will use weak symbols
 
7894
              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
7895
              _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'
 
7896
              ;;
 
7897
            esac
 
7898
 
 
7899
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
7900
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7901
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
7902
            ;;
 
7903
          cxx*)
 
7904
            # Compaq C++
 
7905
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7906
            _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'
 
7907
 
 
7908
            runpath_var=LD_RUN_PATH
 
7909
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
7910
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7911
 
 
7912
            # Commands to make compiler produce verbose output that lists
 
7913
            # what "hidden" libraries, object files and flags are used when
 
7914
            # linking a shared library.
 
7915
            #
 
7916
            # There doesn't appear to be a way to prevent this compiler from
 
7917
            # explicitly linking system object files so we need to strip them
 
7918
            # from the output so that they don't get included in the library
 
7919
            # dependencies.
 
7920
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
7921
            ;;
 
7922
          xl*)
 
7923
            # IBM XL 8.0 on PPC, with GNU ld
 
7924
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7925
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7926
            _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7927
            if test "x$supports_anon_versioning" = xyes; then
 
7928
              _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
7929
                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
7930
                echo "local: *; };" >> $output_objdir/$libname.ver~
 
7931
                $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
7932
            fi
 
7933
            ;;
 
7934
          *)
 
7935
            case `$CC -V 2>&1 | sed 5q` in
 
7936
            *Sun\ C*)
 
7937
              # Sun C++ 5.9
 
7938
              _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
7939
              _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7940
              _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'
 
7941
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7942
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
7943
              _LT_TAGVAR(compiler_needs_object, $1)=yes
 
7944
 
 
7945
              # Not sure whether something based on
 
7946
              # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
 
7947
              # would be better.
 
7948
              output_verbose_link_cmd='echo'
 
7949
 
 
7950
              # Archives containing C++ object files must be created using
 
7951
              # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
7952
              # necessary to make sure instantiated templates are included
 
7953
              # in the archive.
 
7954
              _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
7955
              ;;
 
7956
            esac
 
7957
            ;;
 
7958
        esac
 
7959
        ;;
 
7960
 
 
7961
      lynxos*)
 
7962
        # FIXME: insert proper C++ library support
 
7963
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7964
        ;;
 
7965
 
 
7966
      m88k*)
 
7967
        # FIXME: insert proper C++ library support
 
7968
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7969
        ;;
 
7970
 
 
7971
      mvs*)
 
7972
        case $cc_basename in
 
7973
          cxx*)
 
7974
            # FIXME: insert proper C++ library support
 
7975
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7976
            ;;
 
7977
          *)
 
7978
            # FIXME: insert proper C++ library support
 
7979
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7980
            ;;
 
7981
        esac
 
7982
        ;;
 
7983
 
 
7984
      netbsd*)
 
7985
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
7986
          _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
7987
          wlarc=
 
7988
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7989
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
7990
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7991
        fi
 
7992
        # Workaround some broken pre-1.5 toolchains
 
7993
        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
7994
        ;;
 
7995
 
 
7996
      *nto* | *qnx*)
 
7997
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
7998
        ;;
 
7999
 
 
8000
      openbsd2*)
 
8001
        # C++ shared libraries are fairly broken
 
8002
        _LT_TAGVAR(ld_shlibs, $1)=no
 
8003
        ;;
 
8004
 
 
8005
      openbsd*)
 
8006
        if test -f /usr/libexec/ld.so; then
 
8007
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
8008
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8009
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
8010
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
8011
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8012
          if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
8013
            _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'
 
8014
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
8015
            _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
8016
          fi
 
8017
          output_verbose_link_cmd=echo
 
8018
        else
 
8019
          _LT_TAGVAR(ld_shlibs, $1)=no
 
8020
        fi
 
8021
        ;;
 
8022
 
 
8023
      osf3* | osf4* | osf5*)
 
8024
        case $cc_basename in
 
8025
          KCC*)
 
8026
            # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8027
 
 
8028
            # KCC will only create a shared library if the output file
 
8029
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8030
            # to its proper name (with version) after linking.
 
8031
            _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'
 
8032
 
 
8033
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8034
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
8035
 
 
8036
            # Archives containing C++ object files must be created using
 
8037
            # the KAI C++ compiler.
 
8038
            case $host in
 
8039
              osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
 
8040
              *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
 
8041
            esac
 
8042
            ;;
 
8043
          RCC*)
 
8044
            # Rational C++ 2.4.1
 
8045
            # FIXME: insert proper C++ library support
 
8046
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8047
            ;;
 
8048
          cxx*)
 
8049
            case $host in
 
8050
              osf3*)
 
8051
                _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8052
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
8053
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8054
                ;;
 
8055
              *)
 
8056
                _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
8057
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
8058
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
8059
                  echo "-hidden">> $lib.exp~
 
8060
                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
 
8061
                  $RM $lib.exp'
 
8062
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8063
                ;;
 
8064
            esac
 
8065
 
 
8066
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
8067
 
 
8068
            # Commands to make compiler produce verbose output that lists
 
8069
            # what "hidden" libraries, object files and flags are used when
 
8070
            # linking a shared library.
 
8071
            #
 
8072
            # There doesn't appear to be a way to prevent this compiler from
 
8073
            # explicitly linking system object files so we need to strip them
 
8074
            # from the output so that they don't get included in the library
 
8075
            # dependencies.
 
8076
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
8077
            ;;
 
8078
          *)
 
8079
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8080
              _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8081
              case $host in
 
8082
                osf3*)
 
8083
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
8084
                  ;;
 
8085
                *)
 
8086
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
8087
                  ;;
 
8088
              esac
 
8089
 
 
8090
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8091
              _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
8092
 
 
8093
              # Commands to make compiler produce verbose output that lists
 
8094
              # what "hidden" libraries, object files and flags are used when
 
8095
              # linking a shared library.
 
8096
              output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
8097
 
 
8098
            else
 
8099
              # FIXME: insert proper C++ library support
 
8100
              _LT_TAGVAR(ld_shlibs, $1)=no
 
8101
            fi
 
8102
            ;;
 
8103
        esac
 
8104
        ;;
 
8105
 
 
8106
      psos*)
 
8107
        # FIXME: insert proper C++ library support
 
8108
        _LT_TAGVAR(ld_shlibs, $1)=no
 
8109
        ;;
 
8110
 
 
8111
      sunos4*)
 
8112
        case $cc_basename in
 
8113
          CC*)
 
8114
            # Sun C++ 4.x
 
8115
            # FIXME: insert proper C++ library support
 
8116
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8117
            ;;
 
8118
          lcc*)
 
8119
            # Lucid
 
8120
            # FIXME: insert proper C++ library support
 
8121
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8122
            ;;
 
8123
          *)
 
8124
            # FIXME: insert proper C++ library support
 
8125
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8126
            ;;
 
8127
        esac
 
8128
        ;;
 
8129
 
 
8130
      solaris*)
 
8131
        case $cc_basename in
 
8132
          CC*)
 
8133
            # Sun C++ 4.2, 5.x and Centerline C++
 
8134
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
 
8135
            _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
8136
            _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8137
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
8138
              $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'
 
8139
 
 
8140
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
8141
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8142
            case $host_os in
 
8143
              solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
8144
              *)
 
8145
                # The compiler driver will combine and reorder linker options,
 
8146
                # but understands `-z linker_flag'.
 
8147
                # Supported since Solaris 2.6 (maybe 2.5.1?)
 
8148
                _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
8149
                ;;
 
8150
            esac
 
8151
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
8152
 
 
8153
            output_verbose_link_cmd='echo'
 
8154
 
 
8155
            # Archives containing C++ object files must be created using
 
8156
            # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
8157
            # necessary to make sure instantiated templates are included
 
8158
            # in the archive.
 
8159
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
8160
            ;;
 
8161
          gcx*)
 
8162
            # Green Hills C++ Compiler
 
8163
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8164
 
 
8165
            # The C++ compiler must be used to create the archive.
 
8166
            _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
8167
            ;;
 
8168
          *)
 
8169
            # GNU C++ compiler with Solaris linker
 
8170
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8171
              _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
8172
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
 
8173
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8174
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
8175
                  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
8176
 
 
8177
                # Commands to make compiler produce verbose output that lists
 
8178
                # what "hidden" libraries, object files and flags are used when
 
8179
                # linking a shared library.
 
8180
                output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
8181
              else
 
8182
                # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
8183
                # platform.
 
8184
                _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8185
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
8186
                  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
8187
 
 
8188
                # Commands to make compiler produce verbose output that lists
 
8189
                # what "hidden" libraries, object files and flags are used when
 
8190
                # linking a shared library.
 
8191
                output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
8192
              fi
 
8193
 
 
8194
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
8195
              case $host_os in
 
8196
                solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
8197
                *)
 
8198
                  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
8199
                  ;;
 
8200
              esac
 
8201
            fi
 
8202
            ;;
 
8203
        esac
 
8204
        ;;
 
8205
 
 
8206
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
8207
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
8208
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8209
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8210
      runpath_var='LD_RUN_PATH'
 
8211
 
 
8212
      case $cc_basename in
 
8213
        CC*)
 
8214
          _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8215
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8216
          ;;
 
8217
        *)
 
8218
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8219
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8220
          ;;
 
8221
      esac
 
8222
      ;;
 
8223
 
 
8224
      sysv5* | sco3.2v5* | sco5v6*)
 
8225
        # Note: We can NOT use -z defs as we might desire, because we do not
 
8226
        # link with -lc, and that would cause any symbols used from libc to
 
8227
        # always be unresolved, which means just about no library would
 
8228
        # ever link correctly.  If we're not using GNU ld we use -z text
 
8229
        # though, which does catch some bad symbols but isn't as heavy-handed
 
8230
        # as -z defs.
 
8231
        _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
8232
        _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
8233
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8234
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8235
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
 
8236
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
8237
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
8238
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
8239
        runpath_var='LD_RUN_PATH'
 
8240
 
 
8241
        case $cc_basename in
 
8242
          CC*)
 
8243
            _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8244
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8245
            ;;
 
8246
          *)
 
8247
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8248
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8249
            ;;
 
8250
        esac
 
8251
      ;;
 
8252
 
 
8253
      tandem*)
 
8254
        case $cc_basename in
 
8255
          NCC*)
 
8256
            # NonStop-UX NCC 3.20
 
8257
            # FIXME: insert proper C++ library support
 
8258
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8259
            ;;
 
8260
          *)
 
8261
            # FIXME: insert proper C++ library support
 
8262
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8263
            ;;
 
8264
        esac
 
8265
        ;;
 
8266
 
 
8267
      vxworks*)
 
8268
        # FIXME: insert proper C++ library support
 
8269
        _LT_TAGVAR(ld_shlibs, $1)=no
 
8270
        ;;
 
8271
 
 
8272
      *)
 
8273
        # FIXME: insert proper C++ library support
 
8274
        _LT_TAGVAR(ld_shlibs, $1)=no
 
8275
        ;;
 
8276
    esac
 
8277
 
 
8278
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
 
8279
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
8280
 
 
8281
    _LT_TAGVAR(GCC, $1)="$GXX"
 
8282
    _LT_TAGVAR(LD, $1)="$LD"
 
8283
 
 
8284
    ## CAVEAT EMPTOR:
 
8285
    ## There is no encapsulation within the following macros, do not change
 
8286
    ## the running order or otherwise move them around unless you know exactly
 
8287
    ## what you are doing...
 
8288
    _LT_SYS_HIDDEN_LIBDEPS($1)
 
8289
    _LT_COMPILER_PIC($1)
 
8290
    _LT_COMPILER_C_O($1)
 
8291
    _LT_COMPILER_FILE_LOCKS($1)
 
8292
    _LT_LINKER_SHLIBS($1)
 
8293
    _LT_SYS_DYNAMIC_LINKER($1)
 
8294
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
8295
 
 
8296
    _LT_CONFIG($1)
 
8297
  fi # test -n "$compiler"
 
8298
 
 
8299
  CC=$lt_save_CC
 
8300
  LDCXX=$LD
 
8301
  LD=$lt_save_LD
 
8302
  GCC=$lt_save_GCC
 
8303
  with_gnu_ld=$lt_save_with_gnu_ld
 
8304
  lt_cv_path_LDCXX=$lt_cv_path_LD
 
8305
  lt_cv_path_LD=$lt_save_path_LD
 
8306
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
8307
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
8308
fi # test "$_lt_caught_CXX_error" != yes
 
8309
 
 
8310
AC_LANG_POP
 
8311
])# _LT_LANG_CXX_CONFIG
 
8312
 
 
8313
 
 
8314
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 
8315
# ---------------------------------
 
8316
# Figure out "hidden" library dependencies from verbose
 
8317
# compiler output when linking a shared library.
 
8318
# Parse the compiler output and extract the necessary
 
8319
# objects, libraries and library flags.
 
8320
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 
8321
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
8322
# Dependencies to place before and after the object being linked:
 
8323
_LT_TAGVAR(predep_objects, $1)=
 
8324
_LT_TAGVAR(postdep_objects, $1)=
 
8325
_LT_TAGVAR(predeps, $1)=
 
8326
_LT_TAGVAR(postdeps, $1)=
 
8327
_LT_TAGVAR(compiler_lib_search_path, $1)=
 
8328
 
 
8329
dnl we can't use the lt_simple_compile_test_code here,
 
8330
dnl because it contains code intended for an executable,
 
8331
dnl not a library.  It's possible we should let each
 
8332
dnl tag define a new lt_????_link_test_code variable,
 
8333
dnl but it's only used here...
 
8334
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
 
8335
int a;
 
8336
void foo (void) { a = 0; }
 
8337
_LT_EOF
 
8338
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
 
8339
class Foo
 
8340
{
 
8341
public:
 
8342
  Foo (void) { a = 0; }
 
8343
private:
 
8344
  int a;
 
8345
};
 
8346
_LT_EOF
 
8347
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
 
8348
      subroutine foo
 
8349
      implicit none
 
8350
      integer*4 a
 
8351
      a=0
 
8352
      return
 
8353
      end
 
8354
_LT_EOF
 
8355
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
 
8356
      subroutine foo
 
8357
      implicit none
 
8358
      integer a
 
8359
      a=0
 
8360
      return
 
8361
      end
 
8362
_LT_EOF
 
8363
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
 
8364
public class foo {
 
8365
  private int a;
 
8366
  public void bar (void) {
 
8367
    a = 0;
 
8368
  }
 
8369
};
 
8370
_LT_EOF
 
8371
])
 
8372
dnl Parse the compiler output and extract the necessary
 
8373
dnl objects, libraries and library flags.
 
8374
if AC_TRY_EVAL(ac_compile); then
 
8375
  # Parse the compiler output and extract the necessary
 
8376
  # objects, libraries and library flags.
 
8377
 
 
8378
  # Sentinel used to keep track of whether or not we are before
 
8379
  # the conftest object file.
 
8380
  pre_test_object_deps_done=no
 
8381
 
 
8382
  for p in `eval "$output_verbose_link_cmd"`; do
 
8383
    case $p in
 
8384
 
 
8385
    -L* | -R* | -l*)
 
8386
       # Some compilers place space between "-{L,R}" and the path.
 
8387
       # Remove the space.
 
8388
       if test $p = "-L" ||
 
8389
          test $p = "-R"; then
 
8390
         prev=$p
 
8391
         continue
 
8392
       else
 
8393
         prev=
 
8394
       fi
 
8395
 
 
8396
       if test "$pre_test_object_deps_done" = no; then
 
8397
         case $p in
 
8398
         -L* | -R*)
 
8399
           # Internal compiler library paths should come after those
 
8400
           # provided the user.  The postdeps already come after the
 
8401
           # user supplied libs so there is no need to process them.
 
8402
           if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
 
8403
             _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
8404
           else
 
8405
             _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
8406
           fi
 
8407
           ;;
 
8408
         # The "-l" case would never come before the object being
 
8409
         # linked, so don't bother handling this case.
 
8410
         esac
 
8411
       else
 
8412
         if test -z "$_LT_TAGVAR(postdeps, $1)"; then
 
8413
           _LT_TAGVAR(postdeps, $1)="${prev}${p}"
 
8414
         else
 
8415
           _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
 
8416
         fi
 
8417
       fi
 
8418
       ;;
 
8419
 
 
8420
    *.$objext)
 
8421
       # This assumes that the test object file only shows up
 
8422
       # once in the compiler output.
 
8423
       if test "$p" = "conftest.$objext"; then
 
8424
         pre_test_object_deps_done=yes
 
8425
         continue
 
8426
       fi
 
8427
 
 
8428
       if test "$pre_test_object_deps_done" = no; then
 
8429
         if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
 
8430
           _LT_TAGVAR(predep_objects, $1)="$p"
 
8431
         else
 
8432
           _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
 
8433
         fi
 
8434
       else
 
8435
         if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
 
8436
           _LT_TAGVAR(postdep_objects, $1)="$p"
 
8437
         else
 
8438
           _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
 
8439
         fi
 
8440
       fi
 
8441
       ;;
 
8442
 
 
8443
    *) ;; # Ignore the rest.
 
8444
 
 
8445
    esac
 
8446
  done
 
8447
 
 
8448
  # Clean up.
 
8449
  rm -f a.out a.exe
 
8450
else
 
8451
  echo "libtool.m4: error: problem compiling $1 test program"
 
8452
fi
 
8453
 
 
8454
$RM -f confest.$objext
 
8455
 
 
8456
# PORTME: override above test on systems where it is broken
 
8457
m4_if([$1], [CXX],
 
8458
[case $host_os in
 
8459
interix[[3-9]]*)
 
8460
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
 
8461
  # hack all around it, let's just trust "g++" to DTRT.
 
8462
  _LT_TAGVAR(predep_objects,$1)=
 
8463
  _LT_TAGVAR(postdep_objects,$1)=
 
8464
  _LT_TAGVAR(postdeps,$1)=
 
8465
  ;;
 
8466
 
 
8467
linux*)
 
8468
  case `$CC -V 2>&1 | sed 5q` in
 
8469
  *Sun\ C*)
 
8470
    # Sun C++ 5.9
 
8471
 
 
8472
    # The more standards-conforming stlport4 library is
 
8473
    # incompatible with the Cstd library. Avoid specifying
 
8474
    # it if it's in CXXFLAGS. Ignore libCrun as
 
8475
    # -library=stlport4 depends on it.
 
8476
    case " $CXX $CXXFLAGS " in
 
8477
    *" -library=stlport4 "*)
 
8478
      solaris_use_stlport4=yes
 
8479
      ;;
 
8480
    esac
 
8481
 
 
8482
    if test "$solaris_use_stlport4" != yes; then
 
8483
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
8484
    fi
 
8485
    ;;
 
8486
  esac
 
8487
  ;;
 
8488
 
 
8489
solaris*)
 
8490
  case $cc_basename in
 
8491
  CC*)
 
8492
    # The more standards-conforming stlport4 library is
 
8493
    # incompatible with the Cstd library. Avoid specifying
 
8494
    # it if it's in CXXFLAGS. Ignore libCrun as
 
8495
    # -library=stlport4 depends on it.
 
8496
    case " $CXX $CXXFLAGS " in
 
8497
    *" -library=stlport4 "*)
 
8498
      solaris_use_stlport4=yes
 
8499
      ;;
 
8500
    esac
 
8501
 
 
8502
    # Adding this requires a known-good setup of shared libraries for
 
8503
    # Sun compiler versions before 5.6, else PIC objects from an old
 
8504
    # archive will be linked into the output, leading to subtle bugs.
 
8505
    if test "$solaris_use_stlport4" != yes; then
 
8506
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
8507
    fi
 
8508
    ;;
 
8509
  esac
 
8510
  ;;
 
8511
esac
 
8512
])
 
8513
 
 
8514
case " $_LT_TAGVAR(postdeps, $1) " in
 
8515
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
8516
esac
 
8517
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
 
8518
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
 
8519
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
 
8520
fi
 
8521
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
 
8522
    [The directories searched by this compiler when creating a shared library])
 
8523
_LT_TAGDECL([], [predep_objects], [1],
 
8524
    [Dependencies to place before and after the objects being linked to
 
8525
    create a shared library])
 
8526
_LT_TAGDECL([], [postdep_objects], [1])
 
8527
_LT_TAGDECL([], [predeps], [1])
 
8528
_LT_TAGDECL([], [postdeps], [1])
 
8529
_LT_TAGDECL([], [compiler_lib_search_path], [1],
 
8530
    [The library search path used internally by the compiler when linking
 
8531
    a shared library])
 
8532
])# _LT_SYS_HIDDEN_LIBDEPS
 
8533
 
 
8534
 
 
8535
# _LT_PROG_F77
 
8536
# ------------
 
8537
# Since AC_PROG_F77 is broken, in that it returns the empty string
 
8538
# if there is no fortran compiler, we have our own version here.
 
8539
m4_defun([_LT_PROG_F77],
 
8540
[
 
8541
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
 
8542
AC_PROG_F77
 
8543
if test -z "$F77" || test "X$F77" = "Xno"; then
 
8544
  _lt_disable_F77=yes
 
8545
fi
 
8546
popdef([AC_MSG_ERROR])
 
8547
])# _LT_PROG_F77
 
8548
 
 
8549
dnl aclocal-1.4 backwards compatibility:
 
8550
dnl AC_DEFUN([_LT_PROG_F77], [])
 
8551
 
 
8552
 
 
8553
# _LT_LANG_F77_CONFIG([TAG])
 
8554
# --------------------------
 
8555
# Ensure that the configuration variables for a Fortran 77 compiler are
 
8556
# suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8557
# to write the compiler configuration to `libtool'.
 
8558
m4_defun([_LT_LANG_F77_CONFIG],
 
8559
[AC_REQUIRE([_LT_PROG_F77])dnl
 
8560
AC_LANG_PUSH(Fortran 77)
 
8561
 
 
8562
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8563
_LT_TAGVAR(allow_undefined_flag, $1)=
 
8564
_LT_TAGVAR(always_export_symbols, $1)=no
 
8565
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
8566
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
8567
_LT_TAGVAR(hardcode_direct, $1)=no
 
8568
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
8569
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
8570
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
8571
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
8572
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
8573
_LT_TAGVAR(hardcode_automatic, $1)=no
 
8574
_LT_TAGVAR(inherit_rpath, $1)=no
 
8575
_LT_TAGVAR(module_cmds, $1)=
 
8576
_LT_TAGVAR(module_expsym_cmds, $1)=
 
8577
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
8578
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8579
_LT_TAGVAR(no_undefined_flag, $1)=
 
8580
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
8581
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
8582
 
 
8583
# Source file extension for f77 test sources.
 
8584
ac_ext=f
 
8585
 
 
8586
# Object file extension for compiled f77 test sources.
 
8587
objext=o
 
8588
_LT_TAGVAR(objext, $1)=$objext
 
8589
 
 
8590
# No sense in running all these tests if we already determined that
 
8591
# the F77 compiler isn't working.  Some variables (like enable_shared)
 
8592
# are currently assumed to apply to all compilers on this platform,
 
8593
# and will be corrupted by setting them based on a non-working compiler.
 
8594
if test "$_lt_disable_F77" != yes; then
 
8595
  # Code to be used in simple compile tests
 
8596
  lt_simple_compile_test_code="\
 
8597
      subroutine t
 
8598
      return
 
8599
      end
 
8600
"
 
8601
 
 
8602
  # Code to be used in simple link tests
 
8603
  lt_simple_link_test_code="\
 
8604
      program t
 
8605
      end
 
8606
"
 
8607
 
 
8608
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8609
  _LT_TAG_COMPILER
 
8610
 
 
8611
  # save warnings/boilerplate of simple test code
 
8612
  _LT_COMPILER_BOILERPLATE
 
8613
  _LT_LINKER_BOILERPLATE
 
8614
 
 
8615
  # Allow CC to be a program name with arguments.
 
8616
  lt_save_CC="$CC"
 
8617
  lt_save_GCC=$GCC
 
8618
  CC=${F77-"f77"}
 
8619
  compiler=$CC
 
8620
  _LT_TAGVAR(compiler, $1)=$CC
 
8621
  _LT_CC_BASENAME([$compiler])
 
8622
  GCC=$G77
 
8623
  if test -n "$compiler"; then
 
8624
    AC_MSG_CHECKING([if libtool supports shared libraries])
 
8625
    AC_MSG_RESULT([$can_build_shared])
 
8626
 
 
8627
    AC_MSG_CHECKING([whether to build shared libraries])
 
8628
    test "$can_build_shared" = "no" && enable_shared=no
 
8629
 
 
8630
    # On AIX, shared libraries and static libraries use the same namespace, and
 
8631
    # are all built from PIC.
 
8632
    case $host_os in
 
8633
      aix3*)
 
8634
        test "$enable_shared" = yes && enable_static=no
 
8635
        if test -n "$RANLIB"; then
 
8636
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
8637
          postinstall_cmds='$RANLIB $lib'
 
8638
        fi
 
8639
        ;;
 
8640
      aix[[4-9]]*)
 
8641
        if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
8642
          test "$enable_shared" = yes && enable_static=no
 
8643
        fi
 
8644
        ;;
 
8645
    esac
 
8646
    AC_MSG_RESULT([$enable_shared])
 
8647
 
 
8648
    AC_MSG_CHECKING([whether to build static libraries])
 
8649
    # Make sure either enable_shared or enable_static is yes.
 
8650
    test "$enable_shared" = yes || enable_static=yes
 
8651
    AC_MSG_RESULT([$enable_static])
 
8652
 
 
8653
    _LT_TAGVAR(GCC, $1)="$G77"
 
8654
    _LT_TAGVAR(LD, $1)="$LD"
 
8655
 
 
8656
    ## CAVEAT EMPTOR:
 
8657
    ## There is no encapsulation within the following macros, do not change
 
8658
    ## the running order or otherwise move them around unless you know exactly
 
8659
    ## what you are doing...
 
8660
    _LT_COMPILER_PIC($1)
 
8661
    _LT_COMPILER_C_O($1)
 
8662
    _LT_COMPILER_FILE_LOCKS($1)
 
8663
    _LT_LINKER_SHLIBS($1)
 
8664
    _LT_SYS_DYNAMIC_LINKER($1)
 
8665
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
8666
 
 
8667
    _LT_CONFIG($1)
 
8668
  fi # test -n "$compiler"
 
8669
 
 
8670
  GCC=$lt_save_GCC
 
8671
  CC="$lt_save_CC"
 
8672
fi # test "$_lt_disable_F77" != yes
 
8673
 
 
8674
AC_LANG_POP
 
8675
])# _LT_LANG_F77_CONFIG
 
8676
 
 
8677
 
 
8678
# _LT_PROG_FC
 
8679
# -----------
 
8680
# Since AC_PROG_FC is broken, in that it returns the empty string
 
8681
# if there is no fortran compiler, we have our own version here.
 
8682
m4_defun([_LT_PROG_FC],
 
8683
[
 
8684
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
 
8685
AC_PROG_FC
 
8686
if test -z "$FC" || test "X$FC" = "Xno"; then
 
8687
  _lt_disable_FC=yes
 
8688
fi
 
8689
popdef([AC_MSG_ERROR])
 
8690
])# _LT_PROG_FC
 
8691
 
 
8692
dnl aclocal-1.4 backwards compatibility:
 
8693
dnl AC_DEFUN([_LT_PROG_FC], [])
 
8694
 
 
8695
 
 
8696
# _LT_LANG_FC_CONFIG([TAG])
 
8697
# -------------------------
 
8698
# Ensure that the configuration variables for a Fortran compiler are
 
8699
# suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8700
# to write the compiler configuration to `libtool'.
 
8701
m4_defun([_LT_LANG_FC_CONFIG],
 
8702
[AC_REQUIRE([_LT_PROG_FC])dnl
 
8703
AC_LANG_PUSH(Fortran)
 
8704
 
 
8705
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8706
_LT_TAGVAR(allow_undefined_flag, $1)=
 
8707
_LT_TAGVAR(always_export_symbols, $1)=no
 
8708
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
8709
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
8710
_LT_TAGVAR(hardcode_direct, $1)=no
 
8711
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
8712
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
8713
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
8714
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
8715
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
8716
_LT_TAGVAR(hardcode_automatic, $1)=no
 
8717
_LT_TAGVAR(inherit_rpath, $1)=no
 
8718
_LT_TAGVAR(module_cmds, $1)=
 
8719
_LT_TAGVAR(module_expsym_cmds, $1)=
 
8720
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
8721
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8722
_LT_TAGVAR(no_undefined_flag, $1)=
 
8723
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
8724
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
8725
 
 
8726
# Source file extension for fc test sources.
 
8727
ac_ext=${ac_fc_srcext-f}
 
8728
 
 
8729
# Object file extension for compiled fc test sources.
 
8730
objext=o
 
8731
_LT_TAGVAR(objext, $1)=$objext
 
8732
 
 
8733
# No sense in running all these tests if we already determined that
 
8734
# the FC compiler isn't working.  Some variables (like enable_shared)
 
8735
# are currently assumed to apply to all compilers on this platform,
 
8736
# and will be corrupted by setting them based on a non-working compiler.
 
8737
if test "$_lt_disable_FC" != yes; then
 
8738
  # Code to be used in simple compile tests
 
8739
  lt_simple_compile_test_code="\
 
8740
      subroutine t
 
8741
      return
 
8742
      end
 
8743
"
 
8744
 
 
8745
  # Code to be used in simple link tests
 
8746
  lt_simple_link_test_code="\
 
8747
      program t
 
8748
      end
 
8749
"
 
8750
 
 
8751
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8752
  _LT_TAG_COMPILER
 
8753
 
 
8754
  # save warnings/boilerplate of simple test code
 
8755
  _LT_COMPILER_BOILERPLATE
 
8756
  _LT_LINKER_BOILERPLATE
 
8757
 
 
8758
  # Allow CC to be a program name with arguments.
 
8759
  lt_save_CC="$CC"
 
8760
  lt_save_GCC=$GCC
 
8761
  CC=${FC-"f95"}
 
8762
  compiler=$CC
 
8763
  GCC=$ac_cv_fc_compiler_gnu
 
8764
 
 
8765
  _LT_TAGVAR(compiler, $1)=$CC
 
8766
  _LT_CC_BASENAME([$compiler])
 
8767
 
 
8768
  if test -n "$compiler"; then
 
8769
    AC_MSG_CHECKING([if libtool supports shared libraries])
 
8770
    AC_MSG_RESULT([$can_build_shared])
 
8771
 
 
8772
    AC_MSG_CHECKING([whether to build shared libraries])
 
8773
    test "$can_build_shared" = "no" && enable_shared=no
 
8774
 
 
8775
    # On AIX, shared libraries and static libraries use the same namespace, and
 
8776
    # are all built from PIC.
 
8777
    case $host_os in
 
8778
      aix3*)
 
8779
        test "$enable_shared" = yes && enable_static=no
 
8780
        if test -n "$RANLIB"; then
 
8781
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
8782
          postinstall_cmds='$RANLIB $lib'
 
8783
        fi
 
8784
        ;;
 
8785
      aix[[4-9]]*)
 
8786
        if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
8787
          test "$enable_shared" = yes && enable_static=no
 
8788
        fi
 
8789
        ;;
 
8790
    esac
 
8791
    AC_MSG_RESULT([$enable_shared])
 
8792
 
 
8793
    AC_MSG_CHECKING([whether to build static libraries])
 
8794
    # Make sure either enable_shared or enable_static is yes.
 
8795
    test "$enable_shared" = yes || enable_static=yes
 
8796
    AC_MSG_RESULT([$enable_static])
 
8797
 
 
8798
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
 
8799
    _LT_TAGVAR(LD, $1)="$LD"
 
8800
 
 
8801
    ## CAVEAT EMPTOR:
 
8802
    ## There is no encapsulation within the following macros, do not change
 
8803
    ## the running order or otherwise move them around unless you know exactly
 
8804
    ## what you are doing...
 
8805
    _LT_SYS_HIDDEN_LIBDEPS($1)
 
8806
    _LT_COMPILER_PIC($1)
 
8807
    _LT_COMPILER_C_O($1)
 
8808
    _LT_COMPILER_FILE_LOCKS($1)
 
8809
    _LT_LINKER_SHLIBS($1)
 
8810
    _LT_SYS_DYNAMIC_LINKER($1)
 
8811
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
8812
 
 
8813
    _LT_CONFIG($1)
 
8814
  fi # test -n "$compiler"
 
8815
 
 
8816
  GCC=$lt_save_GCC
 
8817
  CC="$lt_save_CC"
 
8818
fi # test "$_lt_disable_FC" != yes
 
8819
 
 
8820
AC_LANG_POP
 
8821
])# _LT_LANG_FC_CONFIG
 
8822
 
 
8823
 
 
8824
# _LT_LANG_GCJ_CONFIG([TAG])
 
8825
# --------------------------
 
8826
# Ensure that the configuration variables for the GNU Java Compiler compiler
 
8827
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8828
# to write the compiler configuration to `libtool'.
 
8829
m4_defun([_LT_LANG_GCJ_CONFIG],
 
8830
[AC_REQUIRE([LT_PROG_GCJ])dnl
 
8831
AC_LANG_SAVE
 
8832
 
 
8833
# Source file extension for Java test sources.
 
8834
ac_ext=java
 
8835
 
 
8836
# Object file extension for compiled Java test sources.
 
8837
objext=o
 
8838
_LT_TAGVAR(objext, $1)=$objext
 
8839
 
 
8840
# Code to be used in simple compile tests
 
8841
lt_simple_compile_test_code="class foo {}"
 
8842
 
 
8843
# Code to be used in simple link tests
 
8844
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
 
8845
 
 
8846
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8847
_LT_TAG_COMPILER
 
8848
 
 
8849
# save warnings/boilerplate of simple test code
 
8850
_LT_COMPILER_BOILERPLATE
 
8851
_LT_LINKER_BOILERPLATE
 
8852
 
 
8853
# Allow CC to be a program name with arguments.
 
8854
lt_save_CC="$CC"
 
8855
lt_save_GCC=$GCC
 
8856
GCC=yes
 
8857
CC=${GCJ-"gcj"}
 
8858
compiler=$CC
 
8859
_LT_TAGVAR(compiler, $1)=$CC
 
8860
_LT_TAGVAR(LD, $1)="$LD"
 
8861
_LT_CC_BASENAME([$compiler])
 
8862
 
 
8863
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
8864
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8865
 
 
8866
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8867
 
 
8868
if test -n "$compiler"; then
 
8869
  _LT_COMPILER_NO_RTTI($1)
 
8870
  _LT_COMPILER_PIC($1)
 
8871
  _LT_COMPILER_C_O($1)
 
8872
  _LT_COMPILER_FILE_LOCKS($1)
 
8873
  _LT_LINKER_SHLIBS($1)
 
8874
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
8875
 
 
8876
  _LT_CONFIG($1)
 
8877
fi
 
8878
 
 
8879
AC_LANG_RESTORE
 
8880
 
 
8881
GCC=$lt_save_GCC
 
8882
CC="$lt_save_CC"
 
8883
])# _LT_LANG_GCJ_CONFIG
 
8884
 
 
8885
 
 
8886
# _LT_LANG_RC_CONFIG([TAG])
 
8887
# -------------------------
 
8888
# Ensure that the configuration variables for the Windows resource compiler
 
8889
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8890
# to write the compiler configuration to `libtool'.
 
8891
m4_defun([_LT_LANG_RC_CONFIG],
 
8892
[AC_REQUIRE([LT_PROG_RC])dnl
 
8893
AC_LANG_SAVE
 
8894
 
 
8895
# Source file extension for RC test sources.
 
8896
ac_ext=rc
 
8897
 
 
8898
# Object file extension for compiled RC test sources.
 
8899
objext=o
 
8900
_LT_TAGVAR(objext, $1)=$objext
 
8901
 
 
8902
# Code to be used in simple compile tests
 
8903
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
8904
 
 
8905
# Code to be used in simple link tests
 
8906
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
8907
 
 
8908
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8909
_LT_TAG_COMPILER
 
8910
 
 
8911
# save warnings/boilerplate of simple test code
 
8912
_LT_COMPILER_BOILERPLATE
 
8913
_LT_LINKER_BOILERPLATE
 
8914
 
 
8915
# Allow CC to be a program name with arguments.
 
8916
lt_save_CC="$CC"
 
8917
lt_save_GCC=$GCC
 
8918
GCC=
 
8919
CC=${RC-"windres"}
 
8920
compiler=$CC
 
8921
_LT_TAGVAR(compiler, $1)=$CC
 
8922
_LT_CC_BASENAME([$compiler])
 
8923
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
8924
 
 
8925
if test -n "$compiler"; then
 
8926
  :
 
8927
  _LT_CONFIG($1)
 
8928
fi
 
8929
 
 
8930
GCC=$lt_save_GCC
 
8931
AC_LANG_RESTORE
 
8932
CC="$lt_save_CC"
 
8933
])# _LT_LANG_RC_CONFIG
 
8934
 
 
8935
 
 
8936
# LT_PROG_GCJ
 
8937
# -----------
 
8938
AC_DEFUN([LT_PROG_GCJ],
 
8939
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
 
8940
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
 
8941
    [AC_CHECK_TOOL(GCJ, gcj,)
 
8942
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
8943
      AC_SUBST(GCJFLAGS)])])[]dnl
 
8944
])
 
8945
 
 
8946
# Old name:
 
8947
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
 
8948
dnl aclocal-1.4 backwards compatibility:
 
8949
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
8950
 
 
8951
 
 
8952
# LT_PROG_RC
 
8953
# ----------
 
8954
AC_DEFUN([LT_PROG_RC],
 
8955
[AC_CHECK_TOOL(RC, windres,)
 
8956
])
 
8957
 
 
8958
# Old name:
 
8959
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
 
8960
dnl aclocal-1.4 backwards compatibility:
 
8961
dnl AC_DEFUN([LT_AC_PROG_RC], [])
 
8962
 
 
8963
 
 
8964
# _LT_DECL_EGREP
 
8965
# --------------
 
8966
# If we don't have a new enough Autoconf to choose the best grep
 
8967
# available, choose the one first in the user's PATH.
 
8968
m4_defun([_LT_DECL_EGREP],
 
8969
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
8970
AC_REQUIRE([AC_PROG_FGREP])dnl
 
8971
test -z "$GREP" && GREP=grep
 
8972
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
 
8973
_LT_DECL([], [EGREP], [1], [An ERE matcher])
 
8974
_LT_DECL([], [FGREP], [1], [A literal string matcher])
 
8975
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
 
8976
AC_SUBST([GREP])
 
8977
])
 
8978
 
 
8979
 
 
8980
# _LT_DECL_OBJDUMP
 
8981
# --------------
 
8982
# If we don't have a new enough Autoconf to choose the best objdump
 
8983
# available, choose the one first in the user's PATH.
 
8984
m4_defun([_LT_DECL_OBJDUMP],
 
8985
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
8986
test -z "$OBJDUMP" && OBJDUMP=objdump
 
8987
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 
8988
AC_SUBST([OBJDUMP])
 
8989
])
 
8990
 
 
8991
 
 
8992
# _LT_DECL_SED
 
8993
# ------------
 
8994
# Check for a fully-functional sed program, that truncates
 
8995
# as few characters as possible.  Prefer GNU sed if found.
 
8996
m4_defun([_LT_DECL_SED],
 
8997
[AC_PROG_SED
 
8998
test -z "$SED" && SED=sed
 
8999
Xsed="$SED -e 1s/^X//"
 
9000
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
 
9001
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
 
9002
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
 
9003
])# _LT_DECL_SED
 
9004
 
 
9005
m4_ifndef([AC_PROG_SED], [
 
9006
# NOTE: This macro has been submitted for inclusion into   #
 
9007
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
9008
#  a released version of Autoconf we should remove this    #
 
9009
#  macro and use it instead.                               #
 
9010
 
 
9011
m4_defun([AC_PROG_SED],
 
9012
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
9013
AC_CACHE_VAL(lt_cv_path_SED,
 
9014
[# Loop through the user's path and test for sed and gsed.
 
9015
# Then use that list of sed's as ones to test for truncation.
 
9016
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
9017
for as_dir in $PATH
 
9018
do
 
9019
  IFS=$as_save_IFS
 
9020
  test -z "$as_dir" && as_dir=.
 
9021
  for lt_ac_prog in sed gsed; do
 
9022
    for ac_exec_ext in '' $ac_executable_extensions; do
 
9023
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
9024
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
9025
      fi
 
9026
    done
 
9027
  done
 
9028
done
 
9029
IFS=$as_save_IFS
 
9030
lt_ac_max=0
 
9031
lt_ac_count=0
 
9032
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
9033
# along with /bin/sed that truncates output.
 
9034
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
9035
  test ! -f $lt_ac_sed && continue
 
9036
  cat /dev/null > conftest.in
 
9037
  lt_ac_count=0
 
9038
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
9039
  # Check for GNU sed and select it if it is found.
 
9040
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
9041
    lt_cv_path_SED=$lt_ac_sed
 
9042
    break
 
9043
  fi
 
9044
  while true; do
 
9045
    cat conftest.in conftest.in >conftest.tmp
 
9046
    mv conftest.tmp conftest.in
 
9047
    cp conftest.in conftest.nl
 
9048
    echo >>conftest.nl
 
9049
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
9050
    cmp -s conftest.out conftest.nl || break
 
9051
    # 10000 chars as input seems more than enough
 
9052
    test $lt_ac_count -gt 10 && break
 
9053
    lt_ac_count=`expr $lt_ac_count + 1`
 
9054
    if test $lt_ac_count -gt $lt_ac_max; then
 
9055
      lt_ac_max=$lt_ac_count
 
9056
      lt_cv_path_SED=$lt_ac_sed
 
9057
    fi
 
9058
  done
 
9059
done
 
9060
])
 
9061
SED=$lt_cv_path_SED
 
9062
AC_SUBST([SED])
 
9063
AC_MSG_RESULT([$SED])
 
9064
])#AC_PROG_SED
 
9065
])#m4_ifndef
 
9066
 
 
9067
# Old name:
 
9068
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
 
9069
dnl aclocal-1.4 backwards compatibility:
 
9070
dnl AC_DEFUN([LT_AC_PROG_SED], [])
 
9071
 
 
9072
 
 
9073
# _LT_CHECK_SHELL_FEATURES
 
9074
# ------------------------
 
9075
# Find out whether the shell is Bourne or XSI compatible,
 
9076
# or has some other useful features.
 
9077
m4_defun([_LT_CHECK_SHELL_FEATURES],
 
9078
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
 
9079
# Try some XSI features
 
9080
xsi_shell=no
 
9081
( _lt_dummy="a/b/c"
 
9082
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
 
9083
      = c,a/b,, \
 
9084
    && eval 'test $(( 1 + 1 )) -eq 2 \
 
9085
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
 
9086
  && xsi_shell=yes
 
9087
AC_MSG_RESULT([$xsi_shell])
 
9088
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
 
9089
 
 
9090
AC_MSG_CHECKING([whether the shell understands "+="])
 
9091
lt_shell_append=no
 
9092
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
 
9093
    >/dev/null 2>&1 \
 
9094
  && lt_shell_append=yes
 
9095
AC_MSG_RESULT([$lt_shell_append])
 
9096
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
 
9097
 
 
9098
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
 
9099
  lt_unset=unset
 
9100
else
 
9101
  lt_unset=false
 
9102
fi
 
9103
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
 
9104
 
 
9105
# test EBCDIC or ASCII
 
9106
case `echo X|tr X '\101'` in
 
9107
 A) # ASCII based system
 
9108
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
 
9109
  lt_SP2NL='tr \040 \012'
 
9110
  lt_NL2SP='tr \015\012 \040\040'
 
9111
  ;;
 
9112
 *) # EBCDIC based system
 
9113
  lt_SP2NL='tr \100 \n'
 
9114
  lt_NL2SP='tr \r\n \100\100'
 
9115
  ;;
 
9116
esac
 
9117
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
 
9118
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 
9119
])# _LT_CHECK_SHELL_FEATURES
 
9120
 
 
9121
 
 
9122
# _LT_PROG_XSI_SHELLFNS
 
9123
# ---------------------
 
9124
# Bourne and XSI compatible variants of some useful shell functions.
 
9125
m4_defun([_LT_PROG_XSI_SHELLFNS],
 
9126
[case $xsi_shell in
 
9127
  yes)
 
9128
    cat << \_LT_EOF >> "$cfgfile"
 
9129
 
 
9130
# func_dirname file append nondir_replacement
 
9131
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
 
9132
# otherwise set result to NONDIR_REPLACEMENT.
 
9133
func_dirname ()
 
9134
{
 
9135
  case ${1} in
 
9136
    */*) func_dirname_result="${1%/*}${2}" ;;
 
9137
    *  ) func_dirname_result="${3}" ;;
 
9138
  esac
 
9139
}
 
9140
 
 
9141
# func_basename file
 
9142
func_basename ()
 
9143
{
 
9144
  func_basename_result="${1##*/}"
 
9145
}
 
9146
 
 
9147
# func_dirname_and_basename file append nondir_replacement
 
9148
# perform func_basename and func_dirname in a single function
 
9149
# call:
 
9150
#   dirname:  Compute the dirname of FILE.  If nonempty,
 
9151
#             add APPEND to the result, otherwise set result
 
9152
#             to NONDIR_REPLACEMENT.
 
9153
#             value returned in "$func_dirname_result"
 
9154
#   basename: Compute filename of FILE.
 
9155
#             value retuned in "$func_basename_result"
 
9156
# Implementation must be kept synchronized with func_dirname
 
9157
# and func_basename. For efficiency, we do not delegate to
 
9158
# those functions but instead duplicate the functionality here.
 
9159
func_dirname_and_basename ()
 
9160
{
 
9161
  case ${1} in
 
9162
    */*) func_dirname_result="${1%/*}${2}" ;;
 
9163
    *  ) func_dirname_result="${3}" ;;
 
9164
  esac
 
9165
  func_basename_result="${1##*/}"
 
9166
}
 
9167
 
 
9168
# func_stripname prefix suffix name
 
9169
# strip PREFIX and SUFFIX off of NAME.
 
9170
# PREFIX and SUFFIX must not contain globbing or regex special
 
9171
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
9172
# dot (in which case that matches only a dot).
 
9173
func_stripname ()
 
9174
{
 
9175
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
 
9176
  # positional parameters, so assign one to ordinary parameter first.
 
9177
  func_stripname_result=${3}
 
9178
  func_stripname_result=${func_stripname_result#"${1}"}
 
9179
  func_stripname_result=${func_stripname_result%"${2}"}
 
9180
}
 
9181
 
 
9182
# func_opt_split
 
9183
func_opt_split ()
 
9184
{
 
9185
  func_opt_split_opt=${1%%=*}
 
9186
  func_opt_split_arg=${1#*=}
 
9187
}
 
9188
 
 
9189
# func_lo2o object
 
9190
func_lo2o ()
 
9191
{
 
9192
  case ${1} in
 
9193
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
 
9194
    *)    func_lo2o_result=${1} ;;
 
9195
  esac
 
9196
}
 
9197
 
 
9198
# func_xform libobj-or-source
 
9199
func_xform ()
 
9200
{
 
9201
  func_xform_result=${1%.*}.lo
 
9202
}
 
9203
 
 
9204
# func_arith arithmetic-term...
 
9205
func_arith ()
 
9206
{
 
9207
  func_arith_result=$(( $[*] ))
 
9208
}
 
9209
 
 
9210
# func_len string
 
9211
# STRING may not start with a hyphen.
 
9212
func_len ()
 
9213
{
 
9214
  func_len_result=${#1}
 
9215
}
 
9216
 
 
9217
_LT_EOF
 
9218
    ;;
 
9219
  *) # Bourne compatible functions.
 
9220
    cat << \_LT_EOF >> "$cfgfile"
 
9221
 
 
9222
# func_dirname file append nondir_replacement
 
9223
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
 
9224
# otherwise set result to NONDIR_REPLACEMENT.
 
9225
func_dirname ()
 
9226
{
 
9227
  # Extract subdirectory from the argument.
 
9228
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
 
9229
  if test "X$func_dirname_result" = "X${1}"; then
 
9230
    func_dirname_result="${3}"
 
9231
  else
 
9232
    func_dirname_result="$func_dirname_result${2}"
 
9233
  fi
 
9234
}
 
9235
 
 
9236
# func_basename file
 
9237
func_basename ()
 
9238
{
 
9239
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
 
9240
}
 
9241
 
 
9242
dnl func_dirname_and_basename
 
9243
dnl A portable version of this function is already defined in general.m4sh
 
9244
dnl so there is no need for it here.
 
9245
 
 
9246
# func_stripname prefix suffix name
 
9247
# strip PREFIX and SUFFIX off of NAME.
 
9248
# PREFIX and SUFFIX must not contain globbing or regex special
 
9249
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
9250
# dot (in which case that matches only a dot).
 
9251
# func_strip_suffix prefix name
 
9252
func_stripname ()
 
9253
{
 
9254
  case ${2} in
 
9255
    .*) func_stripname_result=`$ECHO "X${3}" \
 
9256
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
 
9257
    *)  func_stripname_result=`$ECHO "X${3}" \
 
9258
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
 
9259
  esac
 
9260
}
 
9261
 
 
9262
# sed scripts:
 
9263
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
 
9264
my_sed_long_arg='1s/^-[[^=]]*=//'
 
9265
 
 
9266
# func_opt_split
 
9267
func_opt_split ()
 
9268
{
 
9269
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
 
9270
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
 
9271
}
 
9272
 
 
9273
# func_lo2o object
 
9274
func_lo2o ()
 
9275
{
 
9276
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
 
9277
}
 
9278
 
 
9279
# func_xform libobj-or-source
 
9280
func_xform ()
 
9281
{
 
9282
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
 
9283
}
 
9284
 
 
9285
# func_arith arithmetic-term...
 
9286
func_arith ()
 
9287
{
 
9288
  func_arith_result=`expr "$[@]"`
 
9289
}
 
9290
 
 
9291
# func_len string
 
9292
# STRING may not start with a hyphen.
 
9293
func_len ()
 
9294
{
 
9295
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
 
9296
}
 
9297
 
 
9298
_LT_EOF
 
9299
esac
 
9300
 
 
9301
case $lt_shell_append in
 
9302
  yes)
 
9303
    cat << \_LT_EOF >> "$cfgfile"
 
9304
 
 
9305
# func_append var value
 
9306
# Append VALUE to the end of shell variable VAR.
 
9307
func_append ()
 
9308
{
 
9309
  eval "$[1]+=\$[2]"
 
9310
}
 
9311
_LT_EOF
 
9312
    ;;
 
9313
  *)
 
9314
    cat << \_LT_EOF >> "$cfgfile"
 
9315
 
 
9316
# func_append var value
 
9317
# Append VALUE to the end of shell variable VAR.
 
9318
func_append ()
 
9319
{
 
9320
  eval "$[1]=\$$[1]\$[2]"
 
9321
}
 
9322
 
 
9323
_LT_EOF
 
9324
    ;;
 
9325
  esac
 
9326
])
 
9327
 
 
9328
# Helper functions for option handling.                    -*- Autoconf -*-
 
9329
#
 
9330
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
9331
#   Written by Gary V. Vaughan, 2004
 
9332
#
 
9333
# This file is free software; the Free Software Foundation gives
 
9334
# unlimited permission to copy and/or distribute it, with or without
 
9335
# modifications, as long as this notice is preserved.
 
9336
 
 
9337
# serial 6 ltoptions.m4
 
9338
 
 
9339
# This is to help aclocal find these macros, as it can't see m4_define.
 
9340
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
 
9341
 
 
9342
 
 
9343
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
 
9344
# ------------------------------------------
 
9345
m4_define([_LT_MANGLE_OPTION],
 
9346
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
 
9347
 
 
9348
 
 
9349
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
 
9350
# ---------------------------------------
 
9351
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
 
9352
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
 
9353
# saved as a flag.
 
9354
m4_define([_LT_SET_OPTION],
 
9355
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
 
9356
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
 
9357
        _LT_MANGLE_DEFUN([$1], [$2]),
 
9358
    [m4_warning([Unknown $1 option `$2'])])[]dnl
 
9359
])
 
9360
 
 
9361
 
 
9362
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
 
9363
# ------------------------------------------------------------
 
9364
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
9365
m4_define([_LT_IF_OPTION],
 
9366
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
 
9367
 
 
9368
 
 
9369
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
 
9370
# -------------------------------------------------------
 
9371
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
 
9372
# are set.
 
9373
m4_define([_LT_UNLESS_OPTIONS],
 
9374
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
 
9375
            [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
 
9376
                      [m4_define([$0_found])])])[]dnl
 
9377
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
 
9378
])[]dnl
 
9379
])
 
9380
 
 
9381
 
 
9382
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
 
9383
# ----------------------------------------
 
9384
# OPTION-LIST is a space-separated list of Libtool options associated
 
9385
# with MACRO-NAME.  If any OPTION has a matching handler declared with
 
9386
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
 
9387
# the unknown option and exit.
 
9388
m4_defun([_LT_SET_OPTIONS],
 
9389
[# Set options
 
9390
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
 
9391
    [_LT_SET_OPTION([$1], _LT_Option)])
 
9392
 
 
9393
m4_if([$1],[LT_INIT],[
 
9394
  dnl
 
9395
  dnl Simply set some default values (i.e off) if boolean options were not
 
9396
  dnl specified:
 
9397
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
 
9398
  ])
 
9399
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
 
9400
  ])
 
9401
  dnl
 
9402
  dnl If no reference was made to various pairs of opposing options, then
 
9403
  dnl we run the default mode handler for the pair.  For example, if neither
 
9404
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
 
9405
  dnl archives by default:
 
9406
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
 
9407
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
 
9408
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
 
9409
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
 
9410
                   [_LT_ENABLE_FAST_INSTALL])
 
9411
  ])
 
9412
])# _LT_SET_OPTIONS
 
9413
 
 
9414
 
 
9415
 
 
9416
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
 
9417
# -----------------------------------------
 
9418
m4_define([_LT_MANGLE_DEFUN],
 
9419
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
 
9420
 
 
9421
 
 
9422
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
 
9423
# -----------------------------------------------
 
9424
m4_define([LT_OPTION_DEFINE],
 
9425
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
 
9426
])# LT_OPTION_DEFINE
 
9427
 
 
9428
 
 
9429
# dlopen
 
9430
# ------
 
9431
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
 
9432
])
 
9433
 
 
9434
AU_DEFUN([AC_LIBTOOL_DLOPEN],
 
9435
[_LT_SET_OPTION([LT_INIT], [dlopen])
 
9436
AC_DIAGNOSE([obsolete],
 
9437
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
9438
put the `dlopen' option into LT_INIT's first parameter.])
 
9439
])
 
9440
 
 
9441
dnl aclocal-1.4 backwards compatibility:
 
9442
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
 
9443
 
 
9444
 
 
9445
# win32-dll
 
9446
# ---------
 
9447
# Declare package support for building win32 dll's.
 
9448
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 
9449
[enable_win32_dll=yes
 
9450
 
 
9451
case $host in
 
9452
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
 
9453
  AC_CHECK_TOOL(AS, as, false)
 
9454
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
9455
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
9456
  ;;
 
9457
esac
 
9458
 
 
9459
test -z "$AS" && AS=as
 
9460
_LT_DECL([], [AS],      [0], [Assembler program])dnl
 
9461
 
 
9462
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
9463
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
 
9464
 
 
9465
test -z "$OBJDUMP" && OBJDUMP=objdump
 
9466
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
 
9467
])# win32-dll
 
9468
 
 
9469
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
9470
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
9471
_LT_SET_OPTION([LT_INIT], [win32-dll])
 
9472
AC_DIAGNOSE([obsolete],
 
9473
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
9474
put the `win32-dll' option into LT_INIT's first parameter.])
 
9475
])
 
9476
 
 
9477
dnl aclocal-1.4 backwards compatibility:
 
9478
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
9479
 
 
9480
 
 
9481
# _LT_ENABLE_SHARED([DEFAULT])
 
9482
# ----------------------------
 
9483
# implement the --enable-shared flag, and supports the `shared' and
 
9484
# `disable-shared' LT_INIT options.
 
9485
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
9486
m4_define([_LT_ENABLE_SHARED],
 
9487
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
9488
AC_ARG_ENABLE([shared],
 
9489
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
9490
        [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
 
9491
    [p=${PACKAGE-default}
 
9492
    case $enableval in
 
9493
    yes) enable_shared=yes ;;
 
9494
    no) enable_shared=no ;;
 
9495
    *)
 
9496
      enable_shared=no
 
9497
      # Look at the argument we got.  We use all the common list separators.
 
9498
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
9499
      for pkg in $enableval; do
 
9500
        IFS="$lt_save_ifs"
 
9501
        if test "X$pkg" = "X$p"; then
 
9502
          enable_shared=yes
 
9503
        fi
 
9504
      done
 
9505
      IFS="$lt_save_ifs"
 
9506
      ;;
 
9507
    esac],
 
9508
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
 
9509
 
 
9510
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
 
9511
        [Whether or not to build shared libraries])
 
9512
])# _LT_ENABLE_SHARED
 
9513
 
 
9514
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
 
9515
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
 
9516
 
 
9517
# Old names:
 
9518
AC_DEFUN([AC_ENABLE_SHARED],
 
9519
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
 
9520
])
 
9521
 
 
9522
AC_DEFUN([AC_DISABLE_SHARED],
 
9523
[_LT_SET_OPTION([LT_INIT], [disable-shared])
 
9524
])
 
9525
 
 
9526
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
 
9527
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
9528
 
 
9529
dnl aclocal-1.4 backwards compatibility:
 
9530
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
 
9531
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
9532
 
 
9533
 
 
9534
 
 
9535
# _LT_ENABLE_STATIC([DEFAULT])
 
9536
# ----------------------------
 
9537
# implement the --enable-static flag, and support the `static' and
 
9538
# `disable-static' LT_INIT options.
 
9539
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
9540
m4_define([_LT_ENABLE_STATIC],
 
9541
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
9542
AC_ARG_ENABLE([static],
 
9543
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
9544
        [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
 
9545
    [p=${PACKAGE-default}
 
9546
    case $enableval in
 
9547
    yes) enable_static=yes ;;
 
9548
    no) enable_static=no ;;
 
9549
    *)
 
9550
     enable_static=no
 
9551
      # Look at the argument we got.  We use all the common list separators.
 
9552
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
9553
      for pkg in $enableval; do
 
9554
        IFS="$lt_save_ifs"
 
9555
        if test "X$pkg" = "X$p"; then
 
9556
          enable_static=yes
 
9557
        fi
 
9558
      done
 
9559
      IFS="$lt_save_ifs"
 
9560
      ;;
 
9561
    esac],
 
9562
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
 
9563
 
 
9564
    _LT_DECL([build_old_libs], [enable_static], [0],
 
9565
        [Whether or not to build static libraries])
 
9566
])# _LT_ENABLE_STATIC
 
9567
 
 
9568
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
 
9569
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
 
9570
 
 
9571
# Old names:
 
9572
AC_DEFUN([AC_ENABLE_STATIC],
 
9573
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
 
9574
])
 
9575
 
 
9576
AC_DEFUN([AC_DISABLE_STATIC],
 
9577
[_LT_SET_OPTION([LT_INIT], [disable-static])
 
9578
])
 
9579
 
 
9580
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
 
9581
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
9582
 
 
9583
dnl aclocal-1.4 backwards compatibility:
 
9584
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
 
9585
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
9586
 
 
9587
 
 
9588
 
 
9589
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
 
9590
# ----------------------------------
 
9591
# implement the --enable-fast-install flag, and support the `fast-install'
 
9592
# and `disable-fast-install' LT_INIT options.
 
9593
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
9594
m4_define([_LT_ENABLE_FAST_INSTALL],
 
9595
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
9596
AC_ARG_ENABLE([fast-install],
 
9597
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
9598
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
9599
    [p=${PACKAGE-default}
 
9600
    case $enableval in
 
9601
    yes) enable_fast_install=yes ;;
 
9602
    no) enable_fast_install=no ;;
 
9603
    *)
 
9604
      enable_fast_install=no
 
9605
      # Look at the argument we got.  We use all the common list separators.
 
9606
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
9607
      for pkg in $enableval; do
 
9608
        IFS="$lt_save_ifs"
 
9609
        if test "X$pkg" = "X$p"; then
 
9610
          enable_fast_install=yes
 
9611
        fi
 
9612
      done
 
9613
      IFS="$lt_save_ifs"
 
9614
      ;;
 
9615
    esac],
 
9616
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
 
9617
 
 
9618
_LT_DECL([fast_install], [enable_fast_install], [0],
 
9619
         [Whether or not to optimize for fast installation])dnl
 
9620
])# _LT_ENABLE_FAST_INSTALL
 
9621
 
 
9622
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
 
9623
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
 
9624
 
 
9625
# Old names:
 
9626
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
 
9627
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
 
9628
AC_DIAGNOSE([obsolete],
 
9629
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
 
9630
the `fast-install' option into LT_INIT's first parameter.])
 
9631
])
 
9632
 
 
9633
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
 
9634
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
 
9635
AC_DIAGNOSE([obsolete],
 
9636
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
 
9637
the `disable-fast-install' option into LT_INIT's first parameter.])
 
9638
])
 
9639
 
 
9640
dnl aclocal-1.4 backwards compatibility:
 
9641
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
 
9642
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
9643
 
 
9644
 
 
9645
# _LT_WITH_PIC([MODE])
 
9646
# --------------------
 
9647
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
 
9648
# LT_INIT options.
 
9649
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
9650
m4_define([_LT_WITH_PIC],
 
9651
[AC_ARG_WITH([pic],
 
9652
    [AS_HELP_STRING([--with-pic],
 
9653
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
9654
    [pic_mode="$withval"],
 
9655
    [pic_mode=default])
 
9656
 
 
9657
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
 
9658
 
 
9659
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 
9660
])# _LT_WITH_PIC
 
9661
 
 
9662
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
 
9663
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
 
9664
 
 
9665
# Old name:
 
9666
AU_DEFUN([AC_LIBTOOL_PICMODE],
 
9667
[_LT_SET_OPTION([LT_INIT], [pic-only])
 
9668
AC_DIAGNOSE([obsolete],
 
9669
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
9670
put the `pic-only' option into LT_INIT's first parameter.])
 
9671
])
 
9672
 
 
9673
dnl aclocal-1.4 backwards compatibility:
 
9674
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
 
9675
 
 
9676
 
 
9677
m4_define([_LTDL_MODE], [])
 
9678
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
 
9679
                 [m4_define([_LTDL_MODE], [nonrecursive])])
 
9680
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
 
9681
                 [m4_define([_LTDL_MODE], [recursive])])
 
9682
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
 
9683
                 [m4_define([_LTDL_MODE], [subproject])])
 
9684
 
 
9685
m4_define([_LTDL_TYPE], [])
 
9686
LT_OPTION_DEFINE([LTDL_INIT], [installable],
 
9687
                 [m4_define([_LTDL_TYPE], [installable])])
 
9688
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
 
9689
                 [m4_define([_LTDL_TYPE], [convenience])])
 
9690
 
 
9691
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 
9692
#
 
9693
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
9694
# Written by Gary V. Vaughan, 2004
 
9695
#
 
9696
# This file is free software; the Free Software Foundation gives
 
9697
# unlimited permission to copy and/or distribute it, with or without
 
9698
# modifications, as long as this notice is preserved.
 
9699
 
 
9700
# serial 6 ltsugar.m4
 
9701
 
 
9702
# This is to help aclocal find these macros, as it can't see m4_define.
 
9703
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
 
9704
 
 
9705
 
 
9706
# lt_join(SEP, ARG1, [ARG2...])
 
9707
# -----------------------------
 
9708
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
 
9709
# associated separator.
 
9710
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
 
9711
# versions in m4sugar had bugs.
 
9712
m4_define([lt_join],
 
9713
[m4_if([$#], [1], [],
 
9714
       [$#], [2], [[$2]],
 
9715
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
 
9716
m4_define([_lt_join],
 
9717
[m4_if([$#$2], [2], [],
 
9718
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
 
9719
 
 
9720
 
 
9721
# lt_car(LIST)
 
9722
# lt_cdr(LIST)
 
9723
# ------------
 
9724
# Manipulate m4 lists.
 
9725
# These macros are necessary as long as will still need to support
 
9726
# Autoconf-2.59 which quotes differently.
 
9727
m4_define([lt_car], [[$1]])
 
9728
m4_define([lt_cdr],
 
9729
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
 
9730
       [$#], 1, [],
 
9731
       [m4_dquote(m4_shift($@))])])
 
9732
m4_define([lt_unquote], $1)
 
9733
 
 
9734
 
 
9735
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
 
9736
# ------------------------------------------
 
9737
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
 
9738
# Note that neither SEPARATOR nor STRING are expanded; they are appended
 
9739
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
 
9740
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
 
9741
# than defined and empty).
 
9742
#
 
9743
# This macro is needed until we can rely on Autoconf 2.62, since earlier
 
9744
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
 
9745
m4_define([lt_append],
 
9746
[m4_define([$1],
 
9747
           m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
 
9748
 
 
9749
 
 
9750
 
 
9751
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
 
9752
# ----------------------------------------------------------
 
9753
# Produce a SEP delimited list of all paired combinations of elements of
 
9754
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
 
9755
# has the form PREFIXmINFIXSUFFIXn.
 
9756
# Needed until we can rely on m4_combine added in Autoconf 2.62.
 
9757
m4_define([lt_combine],
 
9758
[m4_if(m4_eval([$# > 3]), [1],
 
9759
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
 
9760
[[m4_foreach([_Lt_prefix], [$2],
 
9761
             [m4_foreach([_Lt_suffix],
 
9762
                ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
 
9763
        [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
 
9764
 
 
9765
 
 
9766
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
 
9767
# -----------------------------------------------------------------------
 
9768
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
 
9769
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
 
9770
m4_define([lt_if_append_uniq],
 
9771
[m4_ifdef([$1],
 
9772
          [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
 
9773
                 [lt_append([$1], [$2], [$3])$4],
 
9774
                 [$5])],
 
9775
          [lt_append([$1], [$2], [$3])$4])])
 
9776
 
 
9777
 
 
9778
# lt_dict_add(DICT, KEY, VALUE)
 
9779
# -----------------------------
 
9780
m4_define([lt_dict_add],
 
9781
[m4_define([$1($2)], [$3])])
 
9782
 
 
9783
 
 
9784
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
 
9785
# --------------------------------------------
 
9786
m4_define([lt_dict_add_subkey],
 
9787
[m4_define([$1($2:$3)], [$4])])
 
9788
 
 
9789
 
 
9790
# lt_dict_fetch(DICT, KEY, [SUBKEY])
 
9791
# ----------------------------------
 
9792
m4_define([lt_dict_fetch],
 
9793
[m4_ifval([$3],
 
9794
        m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
 
9795
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
 
9796
 
 
9797
 
 
9798
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
 
9799
# -----------------------------------------------------------------
 
9800
m4_define([lt_if_dict_fetch],
 
9801
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
 
9802
        [$5],
 
9803
    [$6])])
 
9804
 
 
9805
 
 
9806
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
 
9807
# --------------------------------------------------------------
 
9808
m4_define([lt_dict_filter],
 
9809
[m4_if([$5], [], [],
 
9810
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
 
9811
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
 
9812
                      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
 
9813
])
 
9814
 
 
9815
# ltversion.m4 -- version numbers                       -*- Autoconf -*-
 
9816
#
 
9817
#   Copyright (C) 2004 Free Software Foundation, Inc.
 
9818
#   Written by Scott James Remnant, 2004
 
9819
#
 
9820
# This file is free software; the Free Software Foundation gives
 
9821
# unlimited permission to copy and/or distribute it, with or without
 
9822
# modifications, as long as this notice is preserved.
 
9823
 
 
9824
# Generated from ltversion.in.
 
9825
 
 
9826
# serial 3017 ltversion.m4
 
9827
# This file is part of GNU Libtool
 
9828
 
 
9829
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
 
9830
m4_define([LT_PACKAGE_REVISION], [1.3017])
 
9831
 
 
9832
AC_DEFUN([LTVERSION_VERSION],
 
9833
[macro_version='2.2.6b'
 
9834
macro_revision='1.3017'
 
9835
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 
9836
_LT_DECL(, macro_revision, 0)
 
9837
])
 
9838
 
 
9839
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 
9840
#
 
9841
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
 
9842
#   Written by Scott James Remnant, 2004.
 
9843
#
 
9844
# This file is free software; the Free Software Foundation gives
 
9845
# unlimited permission to copy and/or distribute it, with or without
 
9846
# modifications, as long as this notice is preserved.
 
9847
 
 
9848
# serial 4 lt~obsolete.m4
 
9849
 
 
9850
# These exist entirely to fool aclocal when bootstrapping libtool.
 
9851
#
 
9852
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
 
9853
# which have later been changed to m4_define as they aren't part of the
 
9854
# exported API, or moved to Autoconf or Automake where they belong.
 
9855
#
 
9856
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
 
9857
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
 
9858
# using a macro with the same name in our local m4/libtool.m4 it'll
 
9859
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
 
9860
# and doesn't know about Autoconf macros at all.)
 
9861
#
 
9862
# So we provide this file, which has a silly filename so it's always
 
9863
# included after everything else.  This provides aclocal with the
 
9864
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
 
9865
# because those macros already exist, or will be overwritten later.
 
9866
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
 
9867
#
 
9868
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
 
9869
# Yes, that means every name once taken will need to remain here until
 
9870
# we give up compatibility with versions before 1.7, at which point
 
9871
# we need to keep only those names which we still refer to.
 
9872
 
 
9873
# This is to help aclocal find these macros, as it can't see m4_define.
 
9874
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
 
9875
 
 
9876
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
 
9877
m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
 
9878
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
 
9879
m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
 
9880
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
 
9881
m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
 
9882
m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
 
9883
m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
 
9884
m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
 
9885
m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
 
9886
m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
 
9887
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
 
9888
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
 
9889
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
 
9890
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
 
9891
m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
 
9892
m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
 
9893
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
 
9894
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
 
9895
m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
 
9896
m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
 
9897
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
 
9898
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
 
9899
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
 
9900
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
 
9901
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
 
9902
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
 
9903
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
 
9904
m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
 
9905
m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
 
9906
m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
 
9907
m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
 
9908
m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
 
9909
m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
 
9910
m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
 
9911
m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
 
9912
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
 
9913
m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
 
9914
m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 
9915
m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
 
9916
m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
 
9917
m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
 
9918
m4_ifndef([AC_LIBTOOL_RC],              [AC_DEFUN([AC_LIBTOOL_RC])])
 
9919
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 
9920
m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 
9921
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
 
9922
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
 
9923
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
 
9924
m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
 
9925
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
 
9926
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
 
9927
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 
9928
m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 
9929
m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
 
9930
m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
 
9931
 
 
9932
dnl $Id$
 
9933
dnl
 
9934
dnl Copyright (c) 2002-2006
 
9935
dnl         The Xfce development team. All rights reserved.
 
9936
dnl
 
9937
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
 
9938
dnl
 
9939
dnl This program is free software; you can redistribute it and/or modify it
 
9940
dnl under the terms of the GNU General Public License as published by the Free
 
9941
dnl Software Foundation; either version 2 of the License, or (at your option)
 
9942
dnl any later version.
 
9943
dnl
 
9944
dnl This program is distributed in the hope that it will be useful, but WITHOUT
 
9945
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
9946
dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
9947
dnl more details.
 
9948
dnl
 
9949
dnl You should have received a copy of the GNU General Public License along with
 
9950
dnl this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
9951
dnl Place, Suite 330, Boston, MA  02111-1307  USA
 
9952
dnl
 
9953
dnl xdt-depends
 
9954
dnl -----------
 
9955
dnl  Contains M4 macros to check for software dependencies.
 
9956
dnl  Partly based on prior work of the XDG contributors.
 
9957
dnl
 
9958
 
 
9959
 
 
9960
 
 
9961
dnl We need recent a autoconf version
 
9962
AC_PREREQ([2.53])
 
9963
 
 
9964
 
 
9965
dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS)
 
9966
dnl
 
9967
dnl For each token in FLAGS, checks to be sure the compiler supports
 
9968
dnl the flag, and if so, adds each one to VAR.
 
9969
dnl
 
9970
AC_DEFUN([XDT_SUPPORTED_FLAGS],
 
9971
[
 
9972
  for flag in $2; do
 
9973
    AC_MSG_CHECKING([if $CC supports $flag])
 
9974
    saved_CFLAGS="$CFLAGS"
 
9975
    CFLAGS="$CFLAGS $flag"
 
9976
    AC_COMPILE_IFELSE([ ], [flag_supported=yes], [flag_supported=no])
 
9977
    CFLAGS="$saved_CFLAGS"
 
9978
    AC_MSG_RESULT([$flag_supported])
 
9979
 
 
9980
    if test "x$flag_supported" = "xyes"; then
 
9981
      $1="$$1 $flag"
 
9982
    fi
 
9983
  done
 
9984
])
 
9985
 
 
9986
 
 
9987
 
 
9988
dnl XDT_FEATURE_DEBUG(default_level=minimum)
 
9989
dnl
 
9990
AC_DEFUN([XDT_FEATURE_DEBUG],
 
9991
[
 
9992
  dnl weird indentation to keep output indentation correct
 
9993
  AC_ARG_ENABLE([debug],
 
9994
                AC_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],
 
9995
                               [Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@])
 
9996
AC_HELP_STRING([--disable-debug], [Include no debugging support]),
 
9997
                [enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])])
 
9998
 
 
9999
  AC_MSG_CHECKING([whether to build with debugging support])
 
10000
  if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
 
10001
    AC_DEFINE([DEBUG], [1], [Define for debugging support])
 
10002
 
 
10003
    xdt_cv_additional_CFLAGS="-DXFCE_DISABLE_DEPRECATED \
 
10004
                              -Wall -Wextra \
 
10005
                              -Wno-missing-field-initializers \
 
10006
                              -Wno-unused-parameter -Wold-style-definition \
 
10007
                              -Wdeclaration-after-statement \
 
10008
                              -Wmissing-declarations -Wredundant-decls \
 
10009
                              -Wmissing-noreturn -Wshadow -Wpointer-arith \
 
10010
                              -Wcast-align -Wformat-security \
 
10011
                              -Winit-self -Wmissing-include-dirs -Wundef \
 
10012
                              -Wmissing-format-attribute -Wnested-externs \
 
10013
                              -fstack-protector"
 
10014
    CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
 
10015
    
 
10016
    if test x"$enable_debug" = x"full"; then
 
10017
      AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
 
10018
      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g3 -Werror"
 
10019
      CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG"
 
10020
      AC_MSG_RESULT([full])
 
10021
    else
 
10022
      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -g"
 
10023
      AC_MSG_RESULT([yes])
 
10024
    fi
 
10025
 
 
10026
    XDT_SUPPORTED_FLAGS([supported_CFLAGS], [$xdt_cv_additional_CFLAGS])
 
10027
 
 
10028
    ifelse([$CXX], , , [
 
10029
      dnl FIXME: should test on c++ compiler, but the following line causes
 
10030
      dnl        autoconf errors for projects that don't check for a
 
10031
      dnl        c++ compiler at all.
 
10032
      dnl AC_LANG_PUSH([C++])
 
10033
      dnl XDT_SUPPORTED_FLAGS([supported_CXXFLAGS], [$xdt_cv_additional_CFLAGS])
 
10034
      dnl AC_LANG_POP()
 
10035
      dnl        instead, just use supported_CFLAGS...
 
10036
      supported_CXXFLAGS="$supported_CFLAGS"
 
10037
    ])
 
10038
 
 
10039
    CFLAGS="$CFLAGS $supported_CFLAGS"
 
10040
    CXXFLAGS="$CXXFLAGS $supported_CXXFLAGS"
 
10041
  else
 
10042
    CPPFLAGS="$CPPFLAGS -DNDEBUG"
 
10043
 
 
10044
    if test x"$enable_debug" = x"no"; then
 
10045
      CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
 
10046
      AC_MSG_RESULT([no])
 
10047
    else
 
10048
      AC_MSG_RESULT([minimum])
 
10049
    fi
 
10050
  fi
 
10051
])
 
10052
 
 
10053
 
 
10054
dnl XDT_FEATURE_VISIBILITY()
 
10055
dnl
 
10056
dnl Checks to see if the compiler supports the 'visibility' attribute
 
10057
dnl If so, adds -DHAVE_GNUC_VISIBILTY to CPPFLAGS.  Also sets the
 
10058
dnl automake conditional HAVE_GNUC_VISIBILITY.
 
10059
dnl
 
10060
AC_DEFUN([XDT_FEATURE_VISIBILITY],
 
10061
[
 
10062
  AC_ARG_ENABLE([visibility],
 
10063
                AC_HELP_STRING([--disable-visibility],
 
10064
                               [Don't use ELF visibility attributes]),
 
10065
                [enable_visibility=$enableval], [enable_visibility=yes])
 
10066
  have_gnuc_visibility=no
 
10067
  if test "x$enable_visibility" != "xno"; then
 
10068
    XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
 
10069
    saved_CFLAGS="$CFLAGS"
 
10070
    CFLAGS="$CFLAGS $xdt_vis_test_cflags"
 
10071
    AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
 
10072
    AC_COMPILE_IFELSE(AC_LANG_SOURCE(
 
10073
    [
 
10074
      void test_default (void);
 
10075
      void test_hidden (void);
 
10076
 
 
10077
      void __attribute__ ((visibility("default"))) test_default (void) {}
 
10078
      void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
 
10079
 
 
10080
      int main (int argc, char **argv) {
 
10081
        test_default ();
 
10082
        test_hidden ();
 
10083
        return 0;
 
10084
      }
 
10085
    ]),
 
10086
    [
 
10087
      have_gnuc_visibility=yes
 
10088
      AC_MSG_RESULT([yes])
 
10089
    ],
 
10090
    [
 
10091
      AC_MSG_RESULT([no])
 
10092
    ])
 
10093
    CFLAGS="$saved_CFLAGS"
 
10094
  fi
 
10095
 
 
10096
  if test "x$have_gnuc_visibility" = "xyes"; then
 
10097
    CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
 
10098
    XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-fvisibility=hidden])
 
10099
    CFLAGS="$CFLAGS $xdt_vis_hidden_cflags"
 
10100
  fi
 
10101
 
 
10102
  AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])
 
10103
])
 
10104
 
 
10105
dnl XDT_FEATURE_LINKER_OPTS
 
10106
dnl
 
10107
dnl Checks for and enables any special linker optimizations.
 
10108
dnl
 
10109
AC_DEFUN([XDT_FEATURE_LINKER_OPTS],
 
10110
[
 
10111
  AC_ARG_ENABLE([linker-opts],
 
10112
                AC_HELP_STRING([--disable-linker-opts],
 
10113
                               [Disable linker optimizations]),
 
10114
                [enable_linker_opts=$enableval], [enable_linker_opts=yes])
 
10115
 
 
10116
  if test "x$enable_linker_opts" != "xno"; then
 
10117
    AC_MSG_CHECKING([whether $LD accepts --as-needed])
 
10118
    case `$LD --as-needed -v 2>&1 </dev/null` in
 
10119
    *GNU* | *'with BFD'*)
 
10120
      LDFLAGS="$LDFLAGS -Wl,--as-needed"
 
10121
      AC_MSG_RESULT([yes])
 
10122
      ;;
 
10123
    *)
 
10124
      AC_MSG_RESULT([no])
 
10125
      ;;
 
10126
    esac
 
10127
    AC_MSG_CHECKING([whether $LD accepts -O1])
 
10128
    case `$LD -O1 -v 2>&1 </dev/null` in
 
10129
    *GNU* | *'with BFD'*)
 
10130
      LDFLAGS="$LDFLAGS -Wl,-O1"
 
10131
      AC_MSG_RESULT([yes])
 
10132
      ;;
 
10133
    *)
 
10134
      AC_MSG_RESULT([no])
 
10135
      ;;
 
10136
    esac
 
10137
  fi
 
10138
])
 
10139
 
 
10140
dnl BM_DEBUG_SUPPORT()
 
10141
dnl
 
10142
AC_DEFUN([BM_DEBUG_SUPPORT],
 
10143
[
 
10144
dnl # --enable-debug
 
10145
  AC_REQUIRE([XDT_FEATURE_DEBUG])
 
10146
 
 
10147
dnl # --enable-profiling
 
10148
  AC_ARG_ENABLE([profiling],
 
10149
AC_HELP_STRING([--enable-profiling],
 
10150
    [Generate extra code to write profile information])
 
10151
AC_HELP_STRING([--disable-profiling],
 
10152
    [No extra code for profiling (default)]),
 
10153
    [], [enable_profiling=no])
 
10154
 
 
10155
  AC_MSG_CHECKING([whether to build with profiling support])
 
10156
  if test x"$enable_profiling" != x"no"; then
 
10157
    CFLAGS="$CFLAGS -pg"
 
10158
    LDFLAGS="$LDFLAGS -pg"
 
10159
    AC_MSG_RESULT([yes])
 
10160
  else
 
10161
    AC_MSG_RESULT([no])
 
10162
  fi
 
10163
 
 
10164
dnl # --enable-gcov
 
10165
  AC_ARG_ENABLE([gcov],
 
10166
AC_HELP_STRING([--enable-gcov],
 
10167
    [compile with coverage profiling instrumentation (gcc only)])
 
10168
AC_HELP_STRING([--disable-gcov],
 
10169
    [do not generate coverage profiling instrumentation (default)]),
 
10170
    [], [enable_gcov=no])
 
10171
 
 
10172
  AC_MSG_CHECKING([whether to compile with coverage profiling instrumentation])
 
10173
  if test x"$enable_gcov" != x"no"; then
 
10174
    CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
 
10175
    AC_MSG_RESULT([yes])
 
10176
  else
 
10177
    AC_MSG_RESULT([no])
 
10178
  fi
 
10179
 
 
10180
dnl # --disable-asserts
 
10181
  AC_ARG_ENABLE([asserts],
 
10182
AC_HELP_STRING([--disable-asserts], [Disable assertions [DANGEROUS]]),
 
10183
    [], [enable_asserts=yes])
 
10184
 
 
10185
  AC_MSG_CHECKING([whether to disable assertions])
 
10186
  if test x"$enable_asserts" = x"no"; then
 
10187
    AC_MSG_RESULT([yes])
 
10188
    CPPFLAGS="$CPPFLAGS -DG_DISABLE_CHECKS -DG_DISABLE_ASSERT"
 
10189
    CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS"
 
10190
  else
 
10191
    AC_MSG_RESULT([no])
 
10192
  fi
 
10193
 
 
10194
dnl # --enable-final
 
10195
  AC_REQUIRE([AC_PROG_LD])
 
10196
  AC_ARG_ENABLE([final],
 
10197
AC_HELP_STRING([--enable-final], [Build final version]),
 
10198
    [], [enable_final=yes])
 
10199
 
 
10200
  AC_MSG_CHECKING([whether to build final version])
 
10201
  if test x"$enable_final" = x"yes"; then
 
10202
    AC_MSG_RESULT([yes])
 
10203
    AC_MSG_CHECKING([whether $LD accepts -O1])
 
10204
    case `$LD -O1 -v 2>&1 </dev/null` in
 
10205
    *GNU* | *'with BFD'*)
 
10206
      LDFLAGS="$LDFLAGS -Wl,-O1"
 
10207
      AC_MSG_RESULT([yes])
 
10208
        ;;
 
10209
    *)
 
10210
      AC_MSG_RESULT([no])
 
10211
        ;;
 
10212
    esac
 
10213
  else
 
10214
    AC_MSG_RESULT([no])
 
10215
  fi
 
10216
])
 
10217
 
 
10218
dnl $Id$
 
10219
dnl
 
10220
dnl Copyright (c) 2002-2006
 
10221
dnl         The Xfce development team. All rights reserved.
 
10222
dnl
 
10223
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
 
10224
dnl
 
10225
dnl This program is free software; you can redistribute it and/or modify it
 
10226
dnl under the terms of the GNU General Public License as published by the Free
 
10227
dnl Software Foundation; either version 2 of the License, or (at your option)
 
10228
dnl any later version.
 
10229
dnl
 
10230
dnl This program is distributed in the hope that it will be useful, but WITHOUT
 
10231
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
10232
dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
10233
dnl more details.
 
10234
dnl
 
10235
dnl You should have received a copy of the GNU General Public License along with
 
10236
dnl this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
10237
dnl Place, Suite 330, Boston, MA  02111-1307  USA
 
10238
dnl
 
10239
dnl xdt-i18n
 
10240
dnl --------
 
10241
dnl  Internalization M4 macros.
 
10242
dnl
 
10243
 
 
10244
 
 
10245
dnl XDT_I18N(LINGUAS [, PACKAGE])
 
10246
dnl
 
10247
dnl This macro takes care of setting up everything for i18n support.
 
10248
dnl
 
10249
dnl If PACKAGE isn't specified, it defaults to the package tarname; see
 
10250
dnl the description of AC_INIT() for an explanation of what makes up
 
10251
dnl the package tarname. Normally, you don't need to specify PACKAGE,
 
10252
dnl but you can stick with the default.
 
10253
dnl
 
10254
AC_DEFUN([XDT_I18N],
 
10255
[
 
10256
  dnl Substitute GETTEXT_PACKAGE variable
 
10257
  GETTEXT_PACKAGE=m4_default([$2], [AC_PACKAGE_TARNAME()])
 
10258
  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])
 
10259
  AC_SUBST([GETTEXT_PACKAGE])
 
10260
 
 
10261
  dnl gettext and stuff
 
10262
  ALL_LINGUAS="$1"
 
10263
  AM_GLIB_GNU_GETTEXT()
 
10264
 
 
10265
  dnl This is required on some Linux systems
 
10266
  AC_CHECK_FUNC([bind_textdomain_codeset])
 
10267
 
 
10268
  dnl Determine where to install locale files
 
10269
  AC_MSG_CHECKING([for locales directory])
 
10270
  AC_ARG_WITH([locales-dir], 
 
10271
  [
 
10272
    AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR])
 
10273
  ], [localedir=$withval],
 
10274
  [
 
10275
    if test x"$CATOBJEXT" = x".mo"; then
 
10276
      localedir=$libdir/locale
 
10277
    else
 
10278
      localedir=$datadir/locale
 
10279
    fi
 
10280
  ])
 
10281
  AC_MSG_RESULT([$localedir])
 
10282
  AC_SUBST([localedir])
 
10283
 
 
10284
  dnl Determine additional xgettext flags
 
10285
  AC_MSG_CHECKING([for additional xgettext flags])
 
10286
  if test x"$XGETTEXT_ARGS" = x""; then
 
10287
    XGETTEXT_ARGS="--keyword=Q_ --from-code=UTF-8";
 
10288
  else
 
10289
    XGETTEXT_ARGS="$XGETTEXT_ARGS --keyword=Q_ --from-code=UTF-8";
 
10290
  fi
 
10291
  AC_SUBST([XGETTEXT_ARGS])
 
10292
  AC_MSG_RESULT([$XGETTEXT_ARGS])
 
10293
])
 
10294
 
 
10295
 
 
10296
 
 
10297
dnl BM_I18N(PACKAGE, LINGUAS)
 
10298
dnl
 
10299
dnl Simple wrapper for XDT_I18N(LINGUAS, PACKAGE). Kept for
 
10300
dnl backward compatibility. Will be removed in the
 
10301
dnl future.
 
10302
dnl
 
10303
AC_DEFUN([BM_I18N],
 
10304
[
 
10305
  XDT_I18N([$2], [$1])
 
10306
])
 
10307
 
 
10308
 
 
10309
m4_include([acinclude.m4])