~ubuntu-branches/ubuntu/trusty/xfce4-panel/trusty-proposed

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Simon Huggins
  • Date: 2004-06-08 10:44:21 UTC
  • Revision ID: james.westby@ubuntu.com-20040608104421-b0b77kis8o0uoi6q
Tags: upstream-4.0.5
ImportĀ upstreamĀ versionĀ 4.0.5

Show diffs side-by-side

added added

removed removed

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