~ubuntu-branches/ubuntu/lucid/udisks/lucid

1 by Martin Pitt
Import upstream version 1.0.0~git20100212.aae17d9
1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
8
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
# PARTICULAR PURPOSE.
13
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17
[m4_warning([this file was generated for autoconf 2.65.
18
You have another version of autoconf.  It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
24
#
25
# This file is free software, distributed under the terms of the GNU
26
# General Public License.  As a special exception to the GNU General
27
# Public License, this file may be distributed as part of a program
28
# that contains a configuration script generated by Autoconf, under
29
# the same distribution terms as the rest of that program.
30
#
31
# This file can be copied and used freely without restrictions.  It can
32
# be used in projects which are not available under the GNU Public License
33
# but which still want to provide support for the GNU gettext functionality.
34
#
35
# Macro to add for using GNU gettext.
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
37
#
38
# Modified to never use included libintl. 
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
40
#
41
# Major rework to remove unused code
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
43
#
44
# Added better handling of ALL_LINGUAS from GNU gettext version 
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
46
#
47
# Modified to require ngettext
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
49
#
50
# We need this here as well, since someone might use autoconf-2.5x
51
# to configure GLib then an older version to configure a package
52
# using AM_GLIB_GNU_GETTEXT
53
AC_PREREQ(2.53)
54
55
dnl
56
dnl We go to great lengths to make sure that aclocal won't 
57
dnl try to pull in the installed version of these macros
58
dnl when running aclocal in the glib directory.
59
dnl
60
m4_copy([AC_DEFUN],[glib_DEFUN])
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
62
dnl
63
dnl At the end, if we're not within glib, we'll define the public
64
dnl definitions in terms of our private definitions.
65
dnl
66
67
# GLIB_LC_MESSAGES
68
#--------------------
69
glib_DEFUN([GLIB_LC_MESSAGES],
70
  [AC_CHECK_HEADERS([locale.h])
71
    if test $ac_cv_header_locale_h = yes; then
72
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75
    if test $am_cv_val_LC_MESSAGES = yes; then
76
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
77
        [Define if your <locale.h> file defines LC_MESSAGES.])
78
    fi
79
  fi])
80
81
# GLIB_PATH_PROG_WITH_TEST
82
#----------------------------
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86
[# Extract the first word of "$2", so it can be a program name with args.
87
set dummy $2; ac_word=[$]2
88
AC_MSG_CHECKING([for $ac_word])
89
AC_CACHE_VAL(ac_cv_path_$1,
90
[case "[$]$1" in
91
  /*)
92
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
93
  ;;
94
  *)
95
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
97
    test -z "$ac_dir" && ac_dir=.
98
    if test -f $ac_dir/$ac_word; then
99
      if [$3]; then
100
	ac_cv_path_$1="$ac_dir/$ac_word"
101
	break
102
      fi
103
    fi
104
  done
105
  IFS="$ac_save_ifs"
106
dnl If no 4th arg is given, leave the cache variable unset,
107
dnl so AC_PATH_PROGS will keep looking.
108
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
109
])dnl
110
  ;;
111
esac])dnl
112
$1="$ac_cv_path_$1"
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
114
  AC_MSG_RESULT([$]$1)
115
else
116
  AC_MSG_RESULT(no)
117
fi
118
AC_SUBST($1)dnl
119
])
120
121
# GLIB_WITH_NLS
122
#-----------------
123
glib_DEFUN([GLIB_WITH_NLS],
124
  dnl NLS is obligatory
125
  [USE_NLS=yes
126
    AC_SUBST(USE_NLS)
127
128
    gt_cv_have_gettext=no
129
130
    CATOBJEXT=NONE
131
    XGETTEXT=:
132
    INTLLIBS=
133
134
    AC_CHECK_HEADER(libintl.h,
135
     [gt_cv_func_dgettext_libintl="no"
136
      libintl_extra_libs=""
137
138
      #
139
      # First check in libc
140
      #
141
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
142
        [AC_TRY_LINK([
143
#include <libintl.h>
144
],
145
         [return !ngettext ("","", 1)],
146
	  gt_cv_func_ngettext_libc=yes,
147
          gt_cv_func_ngettext_libc=no)
148
        ])
149
  
150
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
152
        	[AC_TRY_LINK([
153
#include <libintl.h>
154
],
155
	          [return !dgettext ("","")],
156
		  gt_cv_func_dgettext_libc=yes,
157
	          gt_cv_func_dgettext_libc=no)
158
        	])
159
      fi
160
  
161
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
        AC_CHECK_FUNCS(bind_textdomain_codeset)
163
      fi
164
165
      #
166
      # If we don't have everything we want, check in libintl
167
      #
168
      if test "$gt_cv_func_dgettext_libc" != "yes" \
169
	 || test "$gt_cv_func_ngettext_libc" != "yes" \
170
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
171
        
172
        AC_CHECK_LIB(intl, bindtextdomain,
173
	    [AC_CHECK_LIB(intl, ngettext,
174
		    [AC_CHECK_LIB(intl, dgettext,
175
			          gt_cv_func_dgettext_libintl=yes)])])
176
177
	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
179
	  AC_MSG_RESULT([])
180
  	  AC_CHECK_LIB(intl, ngettext,
181
          	[AC_CHECK_LIB(intl, dcgettext,
182
		       [gt_cv_func_dgettext_libintl=yes
183
			libintl_extra_libs=-liconv],
184
			:,-liconv)],
185
		:,-liconv)
186
        fi
187
188
        #
189
        # If we found libintl, then check in it for bind_textdomain_codeset();
190
        # we'll prefer libc if neither have bind_textdomain_codeset(),
191
        # and both have dgettext and ngettext
192
        #
193
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194
          glib_save_LIBS="$LIBS"
195
          LIBS="$LIBS -lintl $libintl_extra_libs"
196
          unset ac_cv_func_bind_textdomain_codeset
197
          AC_CHECK_FUNCS(bind_textdomain_codeset)
198
          LIBS="$glib_save_LIBS"
199
200
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
            gt_cv_func_dgettext_libc=no
202
          else
203
            if test "$gt_cv_func_dgettext_libc" = "yes" \
204
		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
205
              gt_cv_func_dgettext_libintl=no
206
            fi
207
          fi
208
        fi
209
      fi
210
211
      if test "$gt_cv_func_dgettext_libc" = "yes" \
212
	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
        gt_cv_have_gettext=yes
214
      fi
215
  
216
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
        INTLLIBS="-lintl $libintl_extra_libs"
218
      fi
219
  
220
      if test "$gt_cv_have_gettext" = "yes"; then
221
	AC_DEFINE(HAVE_GETTEXT,1,
222
	  [Define if the GNU gettext() function is already present or preinstalled.])
223
	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224
	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225
	if test "$MSGFMT" != "no"; then
226
          glib_save_LIBS="$LIBS"
227
          LIBS="$LIBS $INTLLIBS"
228
	  AC_CHECK_FUNCS(dcgettext)
229
	  MSGFMT_OPTS=
230
	  AC_MSG_CHECKING([if msgfmt accepts -c])
231
	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232
msgid ""
233
msgstr ""
234
"Content-Type: text/plain; charset=UTF-8\n"
235
"Project-Id-Version: test 1.0\n"
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237
"Last-Translator: test <foo@bar.xx>\n"
238
"Language-Team: C <LL@li.org>\n"
239
"MIME-Version: 1.0\n"
240
"Content-Transfer-Encoding: 8bit\n"
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242
	  AC_SUBST(MSGFMT_OPTS)
243
	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244
	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245
	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246
	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247
			 return _nl_msg_cat_cntr],
248
	    [CATOBJEXT=.gmo 
249
             DATADIRNAME=share],
250
	    [case $host in
251
	    *-*-solaris*)
252
	    dnl On Solaris, if bind_textdomain_codeset is in libc,
253
	    dnl GNU format message catalog is always supported,
254
            dnl since both are added to the libc all together.
255
	    dnl Hence, we'd like to go with DATADIRNAME=share and
256
	    dnl and CATOBJEXT=.gmo in this case.
257
            AC_CHECK_FUNC(bind_textdomain_codeset,
258
	      [CATOBJEXT=.gmo 
259
               DATADIRNAME=share],
260
	      [CATOBJEXT=.mo
261
               DATADIRNAME=lib])
262
	    ;;
263
	    *)
264
	    CATOBJEXT=.mo
265
            DATADIRNAME=lib
266
	    ;;
267
	    esac])
268
          LIBS="$glib_save_LIBS"
269
	  INSTOBJEXT=.mo
270
	else
271
	  gt_cv_have_gettext=no
272
	fi
273
      fi
274
    ])
275
276
    if test "$gt_cv_have_gettext" = "yes" ; then
277
      AC_DEFINE(ENABLE_NLS, 1,
278
        [always defined to indicate that i18n is enabled])
279
    fi
280
281
    dnl Test whether we really found GNU xgettext.
282
    if test "$XGETTEXT" != ":"; then
283
      dnl If it is not GNU xgettext we define it as : so that the
284
      dnl Makefiles still can work.
285
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
286
        : ;
287
      else
288
        AC_MSG_RESULT(
289
	  [found xgettext program is not GNU xgettext; ignore it])
290
        XGETTEXT=":"
291
      fi
292
    fi
293
294
    # We need to process the po/ directory.
295
    POSUB=po
296
297
    AC_OUTPUT_COMMANDS(
298
      [case "$CONFIG_FILES" in *po/Makefile.in*)
299
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
300
      esac])
301
302
    dnl These rules are solely for the distribution goal.  While doing this
303
    dnl we only have to keep exactly one list of the available catalogs
304
    dnl in configure.in.
305
    for lang in $ALL_LINGUAS; do
306
      GMOFILES="$GMOFILES $lang.gmo"
307
      POFILES="$POFILES $lang.po"
308
    done
309
310
    dnl Make all variables we use known to autoconf.
311
    AC_SUBST(CATALOGS)
312
    AC_SUBST(CATOBJEXT)
313
    AC_SUBST(DATADIRNAME)
314
    AC_SUBST(GMOFILES)
315
    AC_SUBST(INSTOBJEXT)
316
    AC_SUBST(INTLLIBS)
317
    AC_SUBST(PO_IN_DATADIR_TRUE)
318
    AC_SUBST(PO_IN_DATADIR_FALSE)
319
    AC_SUBST(POFILES)
320
    AC_SUBST(POSUB)
321
  ])
322
323
# AM_GLIB_GNU_GETTEXT
324
# -------------------
325
# Do checks necessary for use of gettext. If a suitable implementation 
326
# of gettext is found in either in libintl or in the C library,
327
# it will set INTLLIBS to the libraries needed for use of gettext
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330
# on various variables needed by the Makefile.in.in installed by 
331
# glib-gettextize.
332
dnl
333
glib_DEFUN([GLIB_GNU_GETTEXT],
334
  [AC_REQUIRE([AC_PROG_CC])dnl
335
   AC_REQUIRE([AC_HEADER_STDC])dnl
336
   
337
   GLIB_LC_MESSAGES
338
   GLIB_WITH_NLS
339
340
   if test "$gt_cv_have_gettext" = "yes"; then
341
     if test "x$ALL_LINGUAS" = "x"; then
342
       LINGUAS=
343
     else
344
       AC_MSG_CHECKING(for catalogs to be installed)
345
       NEW_LINGUAS=
346
       for presentlang in $ALL_LINGUAS; do
347
         useit=no
348
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
           desiredlanguages="$LINGUAS"
350
         else
351
           desiredlanguages="$ALL_LINGUAS"
352
         fi
353
         for desiredlang in $desiredlanguages; do
354
 	   # Use the presentlang catalog if desiredlang is
355
           #   a. equal to presentlang, or
356
           #   b. a variant of presentlang (because in this case,
357
           #      presentlang can be used as a fallback for messages
358
           #      which are not translated in the desiredlang catalog).
359
           case "$desiredlang" in
360
             "$presentlang"*) useit=yes;;
361
           esac
362
         done
363
         if test $useit = yes; then
364
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
365
         fi
366
       done
367
       LINGUAS=$NEW_LINGUAS
368
       AC_MSG_RESULT($LINGUAS)
369
     fi
370
371
     dnl Construct list of names of catalog files to be constructed.
372
     if test -n "$LINGUAS"; then
373
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
374
     fi
375
   fi
376
377
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379
   dnl Try to locate is.
380
   MKINSTALLDIRS=
381
   if test -n "$ac_aux_dir"; then
382
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
383
   fi
384
   if test -z "$MKINSTALLDIRS"; then
385
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
386
   fi
387
   AC_SUBST(MKINSTALLDIRS)
388
389
   dnl Generate list of files to be processed by xgettext which will
390
   dnl be included in po/Makefile.
391
   test -d po || mkdir po
392
   if test "x$srcdir" != "x."; then
393
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394
       posrcprefix="$srcdir/"
395
     else
396
       posrcprefix="../$srcdir/"
397
     fi
398
   else
399
     posrcprefix="../"
400
   fi
401
   rm -f po/POTFILES
402
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
	< $srcdir/po/POTFILES.in > po/POTFILES
404
  ])
405
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407
# -------------------------------
408
# Define VARIABLE to the location where catalog files will
409
# be installed by po/Makefile.
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412
glib_save_prefix="$prefix"
413
glib_save_exec_prefix="$exec_prefix"
414
glib_save_datarootdir="$datarootdir"
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417
datarootdir=`eval echo "${datarootdir}"`
418
if test "x$CATOBJEXT" = "x.mo" ; then
419
  localedir=`eval echo "${libdir}/locale"`
420
else
421
  localedir=`eval echo "${datadir}/locale"`
422
fi
423
prefix="$glib_save_prefix"
424
exec_prefix="$glib_save_exec_prefix"
425
datarootdir="$glib_save_datarootdir"
426
AC_DEFINE_UNQUOTED($1, "$localedir",
427
  [Define the location where the catalogs will be installed])
428
])
429
430
dnl
431
dnl Now the definitions that aclocal will find
432
dnl
433
ifdef(glib_configure_in,[],[
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
436
])dnl
437
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
439
# 
440
# Create a temporary file with TEST-FILE as its contents and pass the
441
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
442
# 0 and perform ACTION-IF-FAIL for any other exit status.
443
AC_DEFUN([GLIB_RUN_PROG],
444
[cat >conftest.foo <<_ACEOF
445
$2
446
_ACEOF
447
if AC_RUN_LOG([$1 conftest.foo]); then
448
  m4_ifval([$3], [$3], [:])
449
m4_ifvaln([$4], [else $4])dnl
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
452
fi])
453
454
455
dnl -*- mode: autoconf -*-
456
457
# serial 1
458
459
dnl Usage:
460
dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
461
AC_DEFUN([GTK_DOC_CHECK],
462
[
463
  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
464
  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
1.1.3 by Michael Biebl
Import upstream version 1.0.0~git20100305.fa313b2
465
466
  dnl check for tools we added during development
467
  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
468
  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
469
  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
470
1 by Martin Pitt
Import upstream version 1.0.0~git20100212.aae17d9
471
  dnl for overriding the documentation installation directory
472
  AC_ARG_WITH([html-dir],
473
    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
474
    [with_html_dir='${datadir}/gtk-doc/html'])
475
  HTML_DIR="$with_html_dir"
476
  AC_SUBST([HTML_DIR])
477
478
  dnl enable/disable documentation building
479
  AC_ARG_ENABLE([gtk-doc],
480
    AS_HELP_STRING([--enable-gtk-doc],
481
                   [use gtk-doc to build documentation [[default=no]]]),,
482
    [enable_gtk_doc=no])
483
484
  if test x$enable_gtk_doc = xyes; then
485
    ifelse([$1],[],
486
      [PKG_CHECK_EXISTS([gtk-doc],,
487
                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
488
      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
1.1.3 by Michael Biebl
Import upstream version 1.0.0~git20100305.fa313b2
489
                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
1 by Martin Pitt
Import upstream version 1.0.0~git20100212.aae17d9
490
  fi
491
492
  AC_MSG_CHECKING([whether to build gtk-doc documentation])
493
  AC_MSG_RESULT($enable_gtk_doc)
494
1.1.3 by Michael Biebl
Import upstream version 1.0.0~git20100305.fa313b2
495
  dnl enable/disable output formats
496
  AC_ARG_ENABLE([gtk-doc-html],
497
    AS_HELP_STRING([--enable-gtk-doc-html],
498
                   [build documentation in html format [[default=yes]]]),,
499
    [enable_gtk_doc_html=yes])
500
    AC_ARG_ENABLE([gtk-doc-pdf],
501
      AS_HELP_STRING([--enable-gtk-doc-pdf],
502
                     [build documentation in pdf format [[default=no]]]),,
503
      [enable_gtk_doc_pdf=no])
504
505
  if test -z "$GTKDOC_MKPDF"; then
506
    enable_gtk_doc_pdf=no
507
  fi
508
1 by Martin Pitt
Import upstream version 1.0.0~git20100212.aae17d9
509
510
  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
1.1.3 by Michael Biebl
Import upstream version 1.0.0~git20100305.fa313b2
511
  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
512
  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
1 by Martin Pitt
Import upstream version 1.0.0~git20100212.aae17d9
513
  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
1.1.3 by Michael Biebl
Import upstream version 1.0.0~git20100305.fa313b2
514
  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
1 by Martin Pitt
Import upstream version 1.0.0~git20100212.aae17d9
515
])
516
517
518
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
519
# serial 40 IT_PROG_INTLTOOL
520
AC_DEFUN([IT_PROG_INTLTOOL], [
521
AC_PREREQ([2.50])dnl
522
AC_REQUIRE([AM_NLS])dnl
523
524
case "$am__api_version" in
525
    1.[01234])
526
	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
527
    ;;
528
    *)
529
    ;;
530
esac
531
532
if test -n "$1"; then
533
    AC_MSG_CHECKING([for intltool >= $1])
534
535
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
536
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
537
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
538
    ]
539
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
540
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
541
	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
542
fi
543
544
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
545
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
546
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
547
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
548
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
549
fi
550
551
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
552
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
553
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
554
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
555
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
556
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
557
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
558
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
559
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
560
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
561
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
562
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
563
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
564
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
565
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
566
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
567
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
568
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
569
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
570
571
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
572
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
573
_IT_SUBST(INTLTOOL_KEYS_RULE)
574
_IT_SUBST(INTLTOOL_PROP_RULE)
575
_IT_SUBST(INTLTOOL_OAF_RULE)
576
_IT_SUBST(INTLTOOL_PONG_RULE)
577
_IT_SUBST(INTLTOOL_SERVER_RULE)
578
_IT_SUBST(INTLTOOL_SHEET_RULE)
579
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
580
_IT_SUBST(INTLTOOL_UI_RULE)
581
_IT_SUBST(INTLTOOL_XAM_RULE)
582
_IT_SUBST(INTLTOOL_KBD_RULE)
583
_IT_SUBST(INTLTOOL_XML_RULE)
584
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
585
_IT_SUBST(INTLTOOL_CAVES_RULE)
586
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
587
_IT_SUBST(INTLTOOL_THEME_RULE)
588
_IT_SUBST(INTLTOOL_SERVICE_RULE)
589
_IT_SUBST(INTLTOOL_POLICY_RULE)
590
591
# Check the gettext tools to make sure they are GNU
592
AC_PATH_PROG(XGETTEXT, xgettext)
593
AC_PATH_PROG(MSGMERGE, msgmerge)
594
AC_PATH_PROG(MSGFMT, msgfmt)
595
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
596
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
597
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
598
fi
599
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
600
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
601
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
602
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
603
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
604
fi
605
606
AC_PATH_PROG(INTLTOOL_PERL, perl)
607
if test -z "$INTLTOOL_PERL"; then
608
   AC_MSG_ERROR([perl not found])
609
fi
610
AC_MSG_CHECKING([for perl >= 5.8.1])
611
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
612
if test $? -ne 0; then
613
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
614
else
615
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
616
   AC_MSG_RESULT([$IT_PERL_VERSION])
617
fi
618
if test "x$2" != "xno-xml"; then
619
   AC_MSG_CHECKING([for XML::Parser])
620
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
621
       AC_MSG_RESULT([ok])
622
   else
623
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
624
   fi
625
fi
626
627
# Substitute ALL_LINGUAS so we can use it in po/Makefile
628
AC_SUBST(ALL_LINGUAS)
629
630
# Set DATADIRNAME correctly if it is not set yet
631
# (copied from glib-gettext.m4)
632
if test -z "$DATADIRNAME"; then
633
  AC_LINK_IFELSE(
634
    [AC_LANG_PROGRAM([[]],
635
                     [[extern int _nl_msg_cat_cntr;
636
                       return _nl_msg_cat_cntr]])],
637
    [DATADIRNAME=share],
638
    [case $host in
639
    *-*-solaris*)
640
    dnl On Solaris, if bind_textdomain_codeset is in libc,
641
    dnl GNU format message catalog is always supported,
642
    dnl since both are added to the libc all together.
643
    dnl Hence, we'd like to go with DATADIRNAME=share
644
    dnl in this case.
645
    AC_CHECK_FUNC(bind_textdomain_codeset,
646
      [DATADIRNAME=share], [DATADIRNAME=lib])
647
    ;;
648
    *)
649
    [DATADIRNAME=lib]
650
    ;;
651
    esac])
652
fi
653
AC_SUBST(DATADIRNAME)
654
655
IT_PO_SUBDIR([po])
656
657
])
658
659
660
# IT_PO_SUBDIR(DIRNAME)
661
# ---------------------
662
# All po subdirs have to be declared with this macro; the subdir "po" is
663
# declared by IT_PROG_INTLTOOL.
664
#
665
AC_DEFUN([IT_PO_SUBDIR],
666
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
667
dnl
668
dnl The following CONFIG_COMMANDS should be exetuted at the very end
669
dnl of config.status.
670
AC_CONFIG_COMMANDS_PRE([
671
  AC_CONFIG_COMMANDS([$1/stamp-it], [
672
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
673
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
674
    fi
675
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
676
    >"$1/stamp-it.tmp"
677
    [sed '/^#/d
678
	 s/^[[].*] *//
679
	 /^[ 	]*$/d
680
	'"s|^|	$ac_top_srcdir/|" \
681
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
682
    ]
683
    [sed '/^POTFILES =/,/[^\\]$/ {
684
		/^POTFILES =/!d
685
		r $1/POTFILES
686
	  }
687
	 ' "$1/Makefile.in" >"$1/Makefile"]
688
    rm -f "$1/Makefile.tmp"
689
    mv "$1/stamp-it.tmp" "$1/stamp-it"
690
  ])
691
])dnl
692
])
693
694
# _IT_SUBST(VARIABLE)
695
# -------------------
696
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
697
#
698
AC_DEFUN([_IT_SUBST],
699
[
700
AC_SUBST([$1])
701
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
702
]
703
)
704
705
# deprecated macros
706
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
707
# A hint is needed for aclocal from Automake <= 1.9.4:
708
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
709
710
711
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
712
#
713
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
714
#                 2006, 2007, 2008 Free Software Foundation, Inc.
715
#   Written by Gordon Matzigkeit, 1996
716
#
717
# This file is free software; the Free Software Foundation gives
718
# unlimited permission to copy and/or distribute it, with or without
719
# modifications, as long as this notice is preserved.
720
721
m4_define([_LT_COPYING], [dnl
722
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
723
#                 2006, 2007, 2008 Free Software Foundation, Inc.
724
#   Written by Gordon Matzigkeit, 1996
725
#
726
#   This file is part of GNU Libtool.
727
#
728
# GNU Libtool is free software; you can redistribute it and/or
729
# modify it under the terms of the GNU General Public License as
730
# published by the Free Software Foundation; either version 2 of
731
# the License, or (at your option) any later version.
732
#
733
# As a special exception to the GNU General Public License,
734
# if you distribute this file as part of a program or library that
735
# is built using GNU Libtool, you may include this file under the
736
# same distribution terms that you use for the rest of that program.
737
#
738
# GNU Libtool is distributed in the hope that it will be useful,
739
# but WITHOUT ANY WARRANTY; without even the implied warranty of
740
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
741
# GNU General Public License for more details.
742
#
743
# You should have received a copy of the GNU General Public License
744
# along with GNU Libtool; see the file COPYING.  If not, a copy
745
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
746
# obtained by writing to the Free Software Foundation, Inc.,
747
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
748
])
749
750
# serial 56 LT_INIT
751
752
753
# LT_PREREQ(VERSION)
754
# ------------------
755
# Complain and exit if this libtool version is less that VERSION.
756
m4_defun([LT_PREREQ],
757
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
758
       [m4_default([$3],
759
		   [m4_fatal([Libtool version $1 or higher is required],
760
		             63)])],
761
       [$2])])
762
763
764
# _LT_CHECK_BUILDDIR
765
# ------------------
766
# Complain if the absolute build directory name contains unusual characters
767
m4_defun([_LT_CHECK_BUILDDIR],
768
[case `pwd` in
769
  *\ * | *\	*)
770
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
771
esac
772
])
773
774
775
# LT_INIT([OPTIONS])
776
# ------------------
777
AC_DEFUN([LT_INIT],
778
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
779
AC_BEFORE([$0], [LT_LANG])dnl
780
AC_BEFORE([$0], [LT_OUTPUT])dnl
781
AC_BEFORE([$0], [LTDL_INIT])dnl
782
m4_require([_LT_CHECK_BUILDDIR])dnl
783
784
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
785
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
786
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
787
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
788
dnl unless we require an AC_DEFUNed macro:
789
AC_REQUIRE([LTOPTIONS_VERSION])dnl
790
AC_REQUIRE([LTSUGAR_VERSION])dnl
791
AC_REQUIRE([LTVERSION_VERSION])dnl
792
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
793
m4_require([_LT_PROG_LTMAIN])dnl
794
795
dnl Parse OPTIONS
796
_LT_SET_OPTIONS([$0], [$1])
797
798
# This can be used to rebuild libtool when needed
799
LIBTOOL_DEPS="$ltmain"
800
801
# Always use our own libtool.
802
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
803
AC_SUBST(LIBTOOL)dnl
804
805
_LT_SETUP
806
807
# Only expand once:
808
m4_define([LT_INIT])
809
])# LT_INIT
810
811
# Old names:
812
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
813
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
814
dnl aclocal-1.4 backwards compatibility:
815
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
816
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
817
818
819
# _LT_CC_BASENAME(CC)
820
# -------------------
821
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
822
m4_defun([_LT_CC_BASENAME],
823
[for cc_temp in $1""; do
824
  case $cc_temp in
825
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
826
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
827
    \-*) ;;
828
    *) break;;
829
  esac
830
done
831
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
832
])
833
834
835
# _LT_FILEUTILS_DEFAULTS
836
# ----------------------
837
# It is okay to use these file commands and assume they have been set
838
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
839
m4_defun([_LT_FILEUTILS_DEFAULTS],
840
[: ${CP="cp -f"}
841
: ${MV="mv -f"}
842
: ${RM="rm -f"}
843
])# _LT_FILEUTILS_DEFAULTS
844
845
846
# _LT_SETUP
847
# ---------
848
m4_defun([_LT_SETUP],
849
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
850
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
851
_LT_DECL([], [host_alias], [0], [The host system])dnl
852
_LT_DECL([], [host], [0])dnl
853
_LT_DECL([], [host_os], [0])dnl
854
dnl
855
_LT_DECL([], [build_alias], [0], [The build system])dnl
856
_LT_DECL([], [build], [0])dnl
857
_LT_DECL([], [build_os], [0])dnl
858
dnl
859
AC_REQUIRE([AC_PROG_CC])dnl
860
AC_REQUIRE([LT_PATH_LD])dnl
861
AC_REQUIRE([LT_PATH_NM])dnl
862
dnl
863
AC_REQUIRE([AC_PROG_LN_S])dnl
864
test -z "$LN_S" && LN_S="ln -s"
865
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
866
dnl
867
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
868
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
869
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
870
dnl
871
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
872
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
873
m4_require([_LT_CMD_RELOAD])dnl
874
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
875
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
876
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
877
878
_LT_CONFIG_LIBTOOL_INIT([
879
# See if we are running on zsh, and set the options which allow our
880
# commands through without removal of \ escapes INIT.
881
if test -n "\${ZSH_VERSION+set}" ; then
882
   setopt NO_GLOB_SUBST
883
fi
884
])
885
if test -n "${ZSH_VERSION+set}" ; then
886
   setopt NO_GLOB_SUBST
887
fi
888
889
_LT_CHECK_OBJDIR
890
891
m4_require([_LT_TAG_COMPILER])dnl
892
_LT_PROG_ECHO_BACKSLASH
893
894
case $host_os in
895
aix3*)
896
  # AIX sometimes has problems with the GCC collect2 program.  For some
897
  # reason, if we set the COLLECT_NAMES environment variable, the problems
898
  # vanish in a puff of smoke.
899
  if test "X${COLLECT_NAMES+set}" != Xset; then
900
    COLLECT_NAMES=
901
    export COLLECT_NAMES
902
  fi
903
  ;;
904
esac
905
906
# Sed substitution that helps us do robust quoting.  It backslashifies
907
# metacharacters that are still active within double-quoted strings.
908
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
909
910
# Same as above, but do not quote variable references.
911
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
912
913
# Sed substitution to delay expansion of an escaped shell variable in a
914
# double_quote_subst'ed string.
915
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
916
917
# Sed substitution to delay expansion of an escaped single quote.
918
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
919
920
# Sed substitution to avoid accidental globbing in evaled expressions
921
no_glob_subst='s/\*/\\\*/g'
922
923
# Global variables:
924
ofile=libtool
925
can_build_shared=yes
926
927
# All known linkers require a `.a' archive for static linking (except MSVC,
928
# which needs '.lib').
929
libext=a
930
931
with_gnu_ld="$lt_cv_prog_gnu_ld"
932
933
old_CC="$CC"
934
old_CFLAGS="$CFLAGS"
935
936
# Set sane defaults for various variables
937
test -z "$CC" && CC=cc
938
test -z "$LTCC" && LTCC=$CC
939
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
940
test -z "$LD" && LD=ld
941
test -z "$ac_objext" && ac_objext=o
942
943
_LT_CC_BASENAME([$compiler])
944
945
# Only perform the check for file, if the check method requires it
946
test -z "$MAGIC_CMD" && MAGIC_CMD=file
947
case $deplibs_check_method in
948
file_magic*)
949
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
950
    _LT_PATH_MAGIC
951
  fi
952
  ;;
953
esac
954
955
# Use C for the default configuration in the libtool script
956
LT_SUPPORTED_TAG([CC])
957
_LT_LANG_C_CONFIG
958
_LT_LANG_DEFAULT_CONFIG
959
_LT_CONFIG_COMMANDS
960
])# _LT_SETUP
961
962
963
# _LT_PROG_LTMAIN
964
# ---------------
965
# Note that this code is called both from `configure', and `config.status'
966
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
967
# `config.status' has no value for ac_aux_dir unless we are using Automake,
968
# so we pass a copy along to make sure it has a sensible value anyway.
969
m4_defun([_LT_PROG_LTMAIN],
970
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
971
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
972
ltmain="$ac_aux_dir/ltmain.sh"
973
])# _LT_PROG_LTMAIN
974
975
976
977
# So that we can recreate a full libtool script including additional
978
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
979
# in macros and then make a single call at the end using the `libtool'
980
# label.
981
982
983
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
984
# ----------------------------------------
985
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
986
m4_define([_LT_CONFIG_LIBTOOL_INIT],
987
[m4_ifval([$1],
988
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
989
                     [$1
990
])])])
991
992
# Initialize.
993
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
994
995
996
# _LT_CONFIG_LIBTOOL([COMMANDS])
997
# ------------------------------
998
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
999
m4_define([_LT_CONFIG_LIBTOOL],
1000
[m4_ifval([$1],
1001
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1002
                     [$1
1003
])])])
1004
1005
# Initialize.
1006
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1007
1008
1009
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1010
# -----------------------------------------------------
1011
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1012
[_LT_CONFIG_LIBTOOL([$1])
1013
_LT_CONFIG_LIBTOOL_INIT([$2])
1014
])
1015
1016
1017
# _LT_FORMAT_COMMENT([COMMENT])
1018
# -----------------------------
1019
# Add leading comment marks to the start of each line, and a trailing
1020
# full-stop to the whole comment if one is not present already.
1021
m4_define([_LT_FORMAT_COMMENT],
1022
[m4_ifval([$1], [
1023
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1024
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1025
)])
1026
1027
1028
1029
1030
1031
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1032
# -------------------------------------------------------------------
1033
# CONFIGNAME is the name given to the value in the libtool script.
1034
# VARNAME is the (base) name used in the configure script.
1035
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1036
# VARNAME.  Any other value will be used directly.
1037
m4_define([_LT_DECL],
1038
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1039
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1040
	[m4_ifval([$1], [$1], [$2])])
1041
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1042
    m4_ifval([$4],
1043
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1044
    lt_dict_add_subkey([lt_decl_dict], [$2],
1045
	[tagged?], [m4_ifval([$5], [yes], [no])])])
1046
])
1047
1048
1049
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1050
# --------------------------------------------------------
1051
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1052
1053
1054
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1055
# ------------------------------------------------
1056
m4_define([lt_decl_tag_varnames],
1057
[_lt_decl_filter([tagged?], [yes], $@)])
1058
1059
1060
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1061
# ---------------------------------------------------------
1062
m4_define([_lt_decl_filter],
1063
[m4_case([$#],
1064
  [0], [m4_fatal([$0: too few arguments: $#])],
1065
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1066
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1067
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1068
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1069
])
1070
1071
1072
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1073
# --------------------------------------------------
1074
m4_define([lt_decl_quote_varnames],
1075
[_lt_decl_filter([value], [1], $@)])
1076
1077
1078
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1079
# ---------------------------------------------------
1080
m4_define([lt_decl_dquote_varnames],
1081
[_lt_decl_filter([value], [2], $@)])
1082
1083
1084
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1085
# ---------------------------------------------------
1086
m4_define([lt_decl_varnames_tagged],
1087
[m4_assert([$# <= 2])dnl
1088
_$0(m4_quote(m4_default([$1], [[, ]])),
1089
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1090
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1091
m4_define([_lt_decl_varnames_tagged],
1092
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1093
1094
1095
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1096
# ------------------------------------------------
1097
m4_define([lt_decl_all_varnames],
1098
[_$0(m4_quote(m4_default([$1], [[, ]])),
1099
     m4_if([$2], [],
1100
	   m4_quote(lt_decl_varnames),
1101
	m4_quote(m4_shift($@))))[]dnl
1102
])
1103
m4_define([_lt_decl_all_varnames],
1104
[lt_join($@, lt_decl_varnames_tagged([$1],
1105
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1106
])
1107
1108
1109
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1110
# ------------------------------------
1111
# Quote a variable value, and forward it to `config.status' so that its
1112
# declaration there will have the same value as in `configure'.  VARNAME
1113
# must have a single quote delimited value for this to work.
1114
m4_define([_LT_CONFIG_STATUS_DECLARE],
1115
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1116
1117
1118
# _LT_CONFIG_STATUS_DECLARATIONS
1119
# ------------------------------
1120
# We delimit libtool config variables with single quotes, so when
1121
# we write them to config.status, we have to be sure to quote all
1122
# embedded single quotes properly.  In configure, this macro expands
1123
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1124
#
1125
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1126
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1127
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1128
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1129
1130
1131
# _LT_LIBTOOL_TAGS
1132
# ----------------
1133
# Output comment and list of tags supported by the script
1134
m4_defun([_LT_LIBTOOL_TAGS],
1135
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1136
available_tags="_LT_TAGS"dnl
1137
])
1138
1139
1140
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1141
# -----------------------------------
1142
# Extract the dictionary values for VARNAME (optionally with TAG) and
1143
# expand to a commented shell variable setting:
1144
#
1145
#    # Some comment about what VAR is for.
1146
#    visible_name=$lt_internal_name
1147
m4_define([_LT_LIBTOOL_DECLARE],
1148
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1149
					   [description])))[]dnl
1150
m4_pushdef([_libtool_name],
1151
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1152
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1153
    [0], [_libtool_name=[$]$1],
1154
    [1], [_libtool_name=$lt_[]$1],
1155
    [2], [_libtool_name=$lt_[]$1],
1156
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1157
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1158
])
1159
1160
1161
# _LT_LIBTOOL_CONFIG_VARS
1162
# -----------------------
1163
# Produce commented declarations of non-tagged libtool config variables
1164
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1165
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1166
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1167
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1168
[m4_foreach([_lt_var],
1169
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1170
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1171
1172
1173
# _LT_LIBTOOL_TAG_VARS(TAG)
1174
# -------------------------
1175
m4_define([_LT_LIBTOOL_TAG_VARS],
1176
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1177
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1178
1179
1180
# _LT_TAGVAR(VARNAME, [TAGNAME])
1181
# ------------------------------
1182
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1183
1184
1185
# _LT_CONFIG_COMMANDS
1186
# -------------------
1187
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1188
# variables for single and double quote escaping we saved from calls
1189
# to _LT_DECL, we can put quote escaped variables declarations
1190
# into `config.status', and then the shell code to quote escape them in
1191
# for loops in `config.status'.  Finally, any additional code accumulated
1192
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1193
m4_defun([_LT_CONFIG_COMMANDS],
1194
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1195
	dnl If the libtool generation code has been placed in $CONFIG_LT,
1196
	dnl instead of duplicating it all over again into config.status,
1197
	dnl then we will have config.status run $CONFIG_LT later, so it
1198
	dnl needs to know what name is stored there:
1199
        [AC_CONFIG_COMMANDS([libtool],
1200
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1201
    dnl If the libtool generation code is destined for config.status,
1202
    dnl expand the accumulated commands and init code now:
1203
    [AC_CONFIG_COMMANDS([libtool],
1204
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1205
])#_LT_CONFIG_COMMANDS
1206
1207
1208
# Initialize.
1209
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1210
[
1211
1212
# The HP-UX ksh and POSIX shell print the target directory to stdout
1213
# if CDPATH is set.
1214
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1215
1216
sed_quote_subst='$sed_quote_subst'
1217
double_quote_subst='$double_quote_subst'
1218
delay_variable_subst='$delay_variable_subst'
1219
_LT_CONFIG_STATUS_DECLARATIONS
1220
LTCC='$LTCC'
1221
LTCFLAGS='$LTCFLAGS'
1222
compiler='$compiler_DEFAULT'
1223
1224
# Quote evaled strings.
1225
for var in lt_decl_all_varnames([[ \
1226
]], lt_decl_quote_varnames); do
1227
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1228
    *[[\\\\\\\`\\"\\\$]]*)
1229
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1230
      ;;
1231
    *)
1232
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1233
      ;;
1234
    esac
1235
done
1236
1237
# Double-quote double-evaled strings.
1238
for var in lt_decl_all_varnames([[ \
1239
]], lt_decl_dquote_varnames); do
1240
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1241
    *[[\\\\\\\`\\"\\\$]]*)
1242
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1243
      ;;
1244
    *)
1245
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1246
      ;;
1247
    esac
1248
done
1249
1250
# Fix-up fallback echo if it was mangled by the above quoting rules.
1251
case \$lt_ECHO in
1252
*'\\\[$]0 --fallback-echo"')dnl "
1253
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1254
  ;;
1255
esac
1256
1257
_LT_OUTPUT_LIBTOOL_INIT
1258
])
1259
1260
1261
# LT_OUTPUT
1262
# ---------
1263
# This macro allows early generation of the libtool script (before
1264
# AC_OUTPUT is called), incase it is used in configure for compilation
1265
# tests.
1266
AC_DEFUN([LT_OUTPUT],
1267
[: ${CONFIG_LT=./config.lt}
1268
AC_MSG_NOTICE([creating $CONFIG_LT])
1269
cat >"$CONFIG_LT" <<_LTEOF
1270
#! $SHELL
1271
# Generated by $as_me.
1272
# Run this file to recreate a libtool stub with the current configuration.
1273
1274
lt_cl_silent=false
1275
SHELL=\${CONFIG_SHELL-$SHELL}
1276
_LTEOF
1277
1278
cat >>"$CONFIG_LT" <<\_LTEOF
1279
AS_SHELL_SANITIZE
1280
_AS_PREPARE
1281
1282
exec AS_MESSAGE_FD>&1
1283
exec AS_MESSAGE_LOG_FD>>config.log
1284
{
1285
  echo
1286
  AS_BOX([Running $as_me.])
1287
} >&AS_MESSAGE_LOG_FD
1288
1289
lt_cl_help="\
1290
\`$as_me' creates a local libtool stub from the current configuration,
1291
for use in further configure time tests before the real libtool is
1292
generated.
1293
1294
Usage: $[0] [[OPTIONS]]
1295
1296
  -h, --help      print this help, then exit
1297
  -V, --version   print version number, then exit
1298
  -q, --quiet     do not print progress messages
1299
  -d, --debug     don't remove temporary files
1300
1301
Report bugs to <bug-libtool@gnu.org>."
1302
1303
lt_cl_version="\
1304
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1305
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1306
configured by $[0], generated by m4_PACKAGE_STRING.
1307
1308
Copyright (C) 2008 Free Software Foundation, Inc.
1309
This config.lt script is free software; the Free Software Foundation
1310
gives unlimited permision to copy, distribute and modify it."
1311
1312
while test $[#] != 0
1313
do
1314
  case $[1] in
1315
    --version | --v* | -V )
1316
      echo "$lt_cl_version"; exit 0 ;;
1317
    --help | --h* | -h )
1318
      echo "$lt_cl_help"; exit 0 ;;
1319
    --debug | --d* | -d )
1320
      debug=: ;;
1321
    --quiet | --q* | --silent | --s* | -q )
1322
      lt_cl_silent=: ;;
1323
1324
    -*) AC_MSG_ERROR([unrecognized option: $[1]
1325
Try \`$[0] --help' for more information.]) ;;
1326
1327
    *) AC_MSG_ERROR([unrecognized argument: $[1]
1328
Try \`$[0] --help' for more information.]) ;;
1329
  esac
1330
  shift
1331
done
1332
1333
if $lt_cl_silent; then
1334
  exec AS_MESSAGE_FD>/dev/null
1335
fi
1336
_LTEOF
1337
1338
cat >>"$CONFIG_LT" <<_LTEOF
1339
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1340
_LTEOF
1341
1342
cat >>"$CONFIG_LT" <<\_LTEOF
1343
AC_MSG_NOTICE([creating $ofile])
1344
_LT_OUTPUT_LIBTOOL_COMMANDS
1345
AS_EXIT(0)
1346
_LTEOF
1347
chmod +x "$CONFIG_LT"
1348
1349
# configure is writing to config.log, but config.lt does its own redirection,
1350
# appending to config.log, which fails on DOS, as config.log is still kept
1351
# open by configure.  Here we exec the FD to /dev/null, effectively closing
1352
# config.log, so it can be properly (re)opened and appended to by config.lt.
1353
if test "$no_create" != yes; then
1354
  lt_cl_success=:
1355
  test "$silent" = yes &&
1356
    lt_config_lt_args="$lt_config_lt_args --quiet"
1357
  exec AS_MESSAGE_LOG_FD>/dev/null
1358
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1359
  exec AS_MESSAGE_LOG_FD>>config.log
1360
  $lt_cl_success || AS_EXIT(1)
1361
fi
1362
])# LT_OUTPUT
1363
1364
1365
# _LT_CONFIG(TAG)
1366
# ---------------
1367
# If TAG is the built-in tag, create an initial libtool script with a
1368
# default configuration from the untagged config vars.  Otherwise add code
1369
# to config.status for appending the configuration named by TAG from the
1370
# matching tagged config vars.
1371
m4_defun([_LT_CONFIG],
1372
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1373
_LT_CONFIG_SAVE_COMMANDS([
1374
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1375
  m4_if(_LT_TAG, [C], [
1376
    # See if we are running on zsh, and set the options which allow our
1377
    # commands through without removal of \ escapes.
1378
    if test -n "${ZSH_VERSION+set}" ; then
1379
      setopt NO_GLOB_SUBST
1380
    fi
1381
1382
    cfgfile="${ofile}T"
1383
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1384
    $RM "$cfgfile"
1385
1386
    cat <<_LT_EOF >> "$cfgfile"
1387
#! $SHELL
1388
1389
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1390
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1391
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1392
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1393
#
1394
_LT_COPYING
1395
_LT_LIBTOOL_TAGS
1396
1397
# ### BEGIN LIBTOOL CONFIG
1398
_LT_LIBTOOL_CONFIG_VARS
1399
_LT_LIBTOOL_TAG_VARS
1400
# ### END LIBTOOL CONFIG
1401
1402
_LT_EOF
1403
1404
  case $host_os in
1405
  aix3*)
1406
    cat <<\_LT_EOF >> "$cfgfile"
1407
# AIX sometimes has problems with the GCC collect2 program.  For some
1408
# reason, if we set the COLLECT_NAMES environment variable, the problems
1409
# vanish in a puff of smoke.
1410
if test "X${COLLECT_NAMES+set}" != Xset; then
1411
  COLLECT_NAMES=
1412
  export COLLECT_NAMES
1413
fi
1414
_LT_EOF
1415
    ;;
1416
  esac
1417
1418
  _LT_PROG_LTMAIN
1419
1420
  # We use sed instead of cat because bash on DJGPP gets confused if
1421
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1422
  # text mode, it properly converts lines to CR/LF.  This bash problem
1423
  # is reportedly fixed, but why not run on old versions too?
1424
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1425
    || (rm -f "$cfgfile"; exit 1)
1426
1427
  _LT_PROG_XSI_SHELLFNS
1428
1429
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1430
    || (rm -f "$cfgfile"; exit 1)
1431
1432
  mv -f "$cfgfile" "$ofile" ||
1433
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1434
  chmod +x "$ofile"
1435
],
1436
[cat <<_LT_EOF >> "$ofile"
1437
1438
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1439
dnl in a comment (ie after a #).
1440
# ### BEGIN LIBTOOL TAG CONFIG: $1
1441
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1442
# ### END LIBTOOL TAG CONFIG: $1
1443
_LT_EOF
1444
])dnl /m4_if
1445
],
1446
[m4_if([$1], [], [
1447
    PACKAGE='$PACKAGE'
1448
    VERSION='$VERSION'
1449
    TIMESTAMP='$TIMESTAMP'
1450
    RM='$RM'
1451
    ofile='$ofile'], [])
1452
])dnl /_LT_CONFIG_SAVE_COMMANDS
1453
])# _LT_CONFIG
1454
1455
1456
# LT_SUPPORTED_TAG(TAG)
1457
# ---------------------
1458
# Trace this macro to discover what tags are supported by the libtool
1459
# --tag option, using:
1460
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1461
AC_DEFUN([LT_SUPPORTED_TAG], [])
1462
1463
1464
# C support is built-in for now
1465
m4_define([_LT_LANG_C_enabled], [])
1466
m4_define([_LT_TAGS], [])
1467
1468
1469
# LT_LANG(LANG)
1470
# -------------
1471
# Enable libtool support for the given language if not already enabled.
1472
AC_DEFUN([LT_LANG],
1473
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1474
m4_case([$1],
1475
  [C],			[_LT_LANG(C)],
1476
  [C++],		[_LT_LANG(CXX)],
1477
  [Java],		[_LT_LANG(GCJ)],
1478
  [Fortran 77],		[_LT_LANG(F77)],
1479
  [Fortran],		[_LT_LANG(FC)],
1480
  [Windows Resource],	[_LT_LANG(RC)],
1481
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1482
    [_LT_LANG($1)],
1483
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1484
])# LT_LANG
1485
1486
1487
# _LT_LANG(LANGNAME)
1488
# ------------------
1489
m4_defun([_LT_LANG],
1490
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1491
  [LT_SUPPORTED_TAG([$1])dnl
1492
  m4_append([_LT_TAGS], [$1 ])dnl
1493
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1494
  _LT_LANG_$1_CONFIG($1)])dnl
1495
])# _LT_LANG
1496
1497
1498
# _LT_LANG_DEFAULT_CONFIG
1499
# -----------------------
1500
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1501
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1502
  [LT_LANG(CXX)],
1503
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1504
1505
AC_PROVIDE_IFELSE([AC_PROG_F77],
1506
  [LT_LANG(F77)],
1507
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1508
1509
AC_PROVIDE_IFELSE([AC_PROG_FC],
1510
  [LT_LANG(FC)],
1511
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1512
1513
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1514
dnl pulling things in needlessly.
1515
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1516
  [LT_LANG(GCJ)],
1517
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1518
    [LT_LANG(GCJ)],
1519
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1520
      [LT_LANG(GCJ)],
1521
      [m4_ifdef([AC_PROG_GCJ],
1522
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1523
       m4_ifdef([A][M_PROG_GCJ],
1524
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1525
       m4_ifdef([LT_PROG_GCJ],
1526
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1527
1528
AC_PROVIDE_IFELSE([LT_PROG_RC],
1529
  [LT_LANG(RC)],
1530
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1531
])# _LT_LANG_DEFAULT_CONFIG
1532
1533
# Obsolete macros:
1534
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1535
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1536
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1537
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1538
dnl aclocal-1.4 backwards compatibility:
1539
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1540
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1541
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1542
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1543
1544
1545
# _LT_TAG_COMPILER
1546
# ----------------
1547
m4_defun([_LT_TAG_COMPILER],
1548
[AC_REQUIRE([AC_PROG_CC])dnl
1549
1550
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1551
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1552
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1553
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1554
1555
# If no C compiler was specified, use CC.
1556
LTCC=${LTCC-"$CC"}
1557
1558
# If no C compiler flags were specified, use CFLAGS.
1559
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1560
1561
# Allow CC to be a program name with arguments.
1562
compiler=$CC
1563
])# _LT_TAG_COMPILER
1564
1565
1566
# _LT_COMPILER_BOILERPLATE
1567
# ------------------------
1568
# Check for compiler boilerplate output or warnings with
1569
# the simple compiler test code.
1570
m4_defun([_LT_COMPILER_BOILERPLATE],
1571
[m4_require([_LT_DECL_SED])dnl
1572
ac_outfile=conftest.$ac_objext
1573
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1574
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1575
_lt_compiler_boilerplate=`cat conftest.err`
1576
$RM conftest*
1577
])# _LT_COMPILER_BOILERPLATE
1578
1579
1580
# _LT_LINKER_BOILERPLATE
1581
# ----------------------
1582
# Check for linker boilerplate output or warnings with
1583
# the simple link test code.
1584
m4_defun([_LT_LINKER_BOILERPLATE],
1585
[m4_require([_LT_DECL_SED])dnl
1586
ac_outfile=conftest.$ac_objext
1587
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1588
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1589
_lt_linker_boilerplate=`cat conftest.err`
1590
$RM -r conftest*
1591
])# _LT_LINKER_BOILERPLATE
1592
1593
# _LT_REQUIRED_DARWIN_CHECKS
1594
# -------------------------
1595
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1596
  case $host_os in
1597
    rhapsody* | darwin*)
1598
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1599
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1600
    AC_CHECK_TOOL([LIPO], [lipo], [:])
1601
    AC_CHECK_TOOL([OTOOL], [otool], [:])
1602
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1603
    _LT_DECL([], [DSYMUTIL], [1],
1604
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1605
    _LT_DECL([], [NMEDIT], [1],
1606
      [Tool to change global to local symbols on Mac OS X])
1607
    _LT_DECL([], [LIPO], [1],
1608
      [Tool to manipulate fat objects and archives on Mac OS X])
1609
    _LT_DECL([], [OTOOL], [1],
1610
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1611
    _LT_DECL([], [OTOOL64], [1],
1612
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1613
1614
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1615
      [lt_cv_apple_cc_single_mod=no
1616
      if test -z "${LT_MULTI_MODULE}"; then
1617
	# By default we will add the -single_module flag. You can override
1618
	# by either setting the environment variable LT_MULTI_MODULE
1619
	# non-empty at configure time, or by adding -multi_module to the
1620
	# link flags.
1621
	rm -rf libconftest.dylib*
1622
	echo "int foo(void){return 1;}" > conftest.c
1623
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1624
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1625
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1626
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1627
        _lt_result=$?
1628
	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1629
	  lt_cv_apple_cc_single_mod=yes
1630
	else
1631
	  cat conftest.err >&AS_MESSAGE_LOG_FD
1632
	fi
1633
	rm -rf libconftest.dylib*
1634
	rm -f conftest.*
1635
      fi])
1636
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1637
      [lt_cv_ld_exported_symbols_list],
1638
      [lt_cv_ld_exported_symbols_list=no
1639
      save_LDFLAGS=$LDFLAGS
1640
      echo "_main" > conftest.sym
1641
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1642
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1643
	[lt_cv_ld_exported_symbols_list=yes],
1644
	[lt_cv_ld_exported_symbols_list=no])
1645
	LDFLAGS="$save_LDFLAGS"
1646
    ])
1647
    case $host_os in
1648
    rhapsody* | darwin1.[[012]])
1649
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1650
    darwin1.*)
1651
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1652
    darwin*) # darwin 5.x on
1653
      # if running on 10.5 or later, the deployment target defaults
1654
      # to the OS version, if on x86, and 10.4, the deployment
1655
      # target defaults to 10.4. Don't you love it?
1656
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1657
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1658
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1659
	10.[[012]]*)
1660
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1661
	10.*)
1662
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1663
      esac
1664
    ;;
1665
  esac
1666
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1667
      _lt_dar_single_mod='$single_module'
1668
    fi
1669
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1670
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1671
    else
1672
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1673
    fi
1674
    if test "$DSYMUTIL" != ":"; then
1675
      _lt_dsymutil='~$DSYMUTIL $lib || :'
1676
    else
1677
      _lt_dsymutil=
1678
    fi
1679
    ;;
1680
  esac
1681
])
1682
1683
1684
# _LT_DARWIN_LINKER_FEATURES
1685
# --------------------------
1686
# Checks for linker and compiler features on darwin
1687
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1688
[
1689
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1690
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1691
  _LT_TAGVAR(hardcode_direct, $1)=no
1692
  _LT_TAGVAR(hardcode_automatic, $1)=yes
1693
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1694
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1695
  _LT_TAGVAR(link_all_deplibs, $1)=yes
1696
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1697
  case $cc_basename in
1698
     ifort*) _lt_dar_can_shared=yes ;;
1699
     *) _lt_dar_can_shared=$GCC ;;
1700
  esac
1701
  if test "$_lt_dar_can_shared" = "yes"; then
1702
    output_verbose_link_cmd=echo
1703
    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1704
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1705
    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1706
    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1707
    m4_if([$1], [CXX],
1708
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1709
      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1710
      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1711
    fi
1712
],[])
1713
  else
1714
  _LT_TAGVAR(ld_shlibs, $1)=no
1715
  fi
1716
])
1717
1718
# _LT_SYS_MODULE_PATH_AIX
1719
# -----------------------
1720
# Links a minimal program and checks the executable
1721
# for the system default hardcoded library path. In most cases,
1722
# this is /usr/lib:/lib, but when the MPI compilers are used
1723
# the location of the communication and MPI libs are included too.
1724
# If we don't find anything, use the default library path according
1725
# to the aix ld manual.
1726
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1727
[m4_require([_LT_DECL_SED])dnl
1728
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1729
lt_aix_libpath_sed='
1730
    /Import File Strings/,/^$/ {
1731
	/^0/ {
1732
	    s/^0  *\(.*\)$/\1/
1733
	    p
1734
	}
1735
    }'
1736
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1737
# Check for a 64-bit object if we didn't find anything.
1738
if test -z "$aix_libpath"; then
1739
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1740
fi],[])
1741
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1742
])# _LT_SYS_MODULE_PATH_AIX
1743
1744
1745
# _LT_SHELL_INIT(ARG)
1746
# -------------------
1747
m4_define([_LT_SHELL_INIT],
1748
[ifdef([AC_DIVERSION_NOTICE],
1749
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1750
	 [AC_DIVERT_PUSH(NOTICE)])
1751
$1
1752
AC_DIVERT_POP
1753
])# _LT_SHELL_INIT
1754
1755
1756
# _LT_PROG_ECHO_BACKSLASH
1757
# -----------------------
1758
# Add some code to the start of the generated configure script which
1759
# will find an echo command which doesn't interpret backslashes.
1760
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1761
[_LT_SHELL_INIT([
1762
# Check that we are running under the correct shell.
1763
SHELL=${CONFIG_SHELL-/bin/sh}
1764
1765
case X$lt_ECHO in
1766
X*--fallback-echo)
1767
  # Remove one level of quotation (which was required for Make).
1768
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1769
  ;;
1770
esac
1771
1772
ECHO=${lt_ECHO-echo}
1773
if test "X[$]1" = X--no-reexec; then
1774
  # Discard the --no-reexec flag, and continue.
1775
  shift
1776
elif test "X[$]1" = X--fallback-echo; then
1777
  # Avoid inline document here, it may be left over
1778
  :
1779
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1780
  # Yippee, $ECHO works!
1781
  :
1782
else
1783
  # Restart under the correct shell.
1784
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1785
fi
1786
1787
if test "X[$]1" = X--fallback-echo; then
1788
  # used as fallback echo
1789
  shift
1790
  cat <<_LT_EOF
1791
[$]*
1792
_LT_EOF
1793
  exit 0
1794
fi
1795
1796
# The HP-UX ksh and POSIX shell print the target directory to stdout
1797
# if CDPATH is set.
1798
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1799
1800
if test -z "$lt_ECHO"; then
1801
  if test "X${echo_test_string+set}" != Xset; then
1802
    # find a string as large as possible, as long as the shell can cope with it
1803
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1804
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1805
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1806
	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1807
      then
1808
        break
1809
      fi
1810
    done
1811
  fi
1812
1813
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1814
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1815
     test "X$echo_testing_string" = "X$echo_test_string"; then
1816
    :
1817
  else
1818
    # The Solaris, AIX, and Digital Unix default echo programs unquote
1819
    # backslashes.  This makes it impossible to quote backslashes using
1820
    #   echo "$something" | sed 's/\\/\\\\/g'
1821
    #
1822
    # So, first we look for a working echo in the user's PATH.
1823
1824
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1825
    for dir in $PATH /usr/ucb; do
1826
      IFS="$lt_save_ifs"
1827
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1828
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1829
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1830
         test "X$echo_testing_string" = "X$echo_test_string"; then
1831
        ECHO="$dir/echo"
1832
        break
1833
      fi
1834
    done
1835
    IFS="$lt_save_ifs"
1836
1837
    if test "X$ECHO" = Xecho; then
1838
      # We didn't find a better echo, so look for alternatives.
1839
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1840
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1841
         test "X$echo_testing_string" = "X$echo_test_string"; then
1842
        # This shell has a builtin print -r that does the trick.
1843
        ECHO='print -r'
1844
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1845
	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1846
        # If we have ksh, try running configure again with it.
1847
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1848
        export ORIGINAL_CONFIG_SHELL
1849
        CONFIG_SHELL=/bin/ksh
1850
        export CONFIG_SHELL
1851
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1852
      else
1853
        # Try using printf.
1854
        ECHO='printf %s\n'
1855
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1856
	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1857
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1858
	  # Cool, printf works
1859
	  :
1860
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1861
	     test "X$echo_testing_string" = 'X\t' &&
1862
	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1863
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1864
	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1865
	  export CONFIG_SHELL
1866
	  SHELL="$CONFIG_SHELL"
1867
	  export SHELL
1868
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1869
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1870
	     test "X$echo_testing_string" = 'X\t' &&
1871
	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1872
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1873
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1874
        else
1875
	  # maybe with a smaller string...
1876
	  prev=:
1877
1878
	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1879
	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1880
	    then
1881
	      break
1882
	    fi
1883
	    prev="$cmd"
1884
	  done
1885
1886
	  if test "$prev" != 'sed 50q "[$]0"'; then
1887
	    echo_test_string=`eval $prev`
1888
	    export echo_test_string
1889
	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1890
	  else
1891
	    # Oops.  We lost completely, so just stick with echo.
1892
	    ECHO=echo
1893
	  fi
1894
        fi
1895
      fi
1896
    fi
1897
  fi
1898
fi
1899
1900
# Copy echo and quote the copy suitably for passing to libtool from
1901
# the Makefile, instead of quoting the original, which is used later.
1902
lt_ECHO=$ECHO
1903
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1904
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1905
fi
1906
1907
AC_SUBST(lt_ECHO)
1908
])
1909
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1910
_LT_DECL([], [ECHO], [1],
1911
    [An echo program that does not interpret backslashes])
1912
])# _LT_PROG_ECHO_BACKSLASH
1913
1914
1915
# _LT_ENABLE_LOCK
1916
# ---------------
1917
m4_defun([_LT_ENABLE_LOCK],
1918
[AC_ARG_ENABLE([libtool-lock],
1919
  [AS_HELP_STRING([--disable-libtool-lock],
1920
    [avoid locking (might break parallel builds)])])
1921
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1922
1923
# Some flags need to be propagated to the compiler or linker for good
1924
# libtool support.
1925
case $host in
1926
ia64-*-hpux*)
1927
  # Find out which ABI we are using.
1928
  echo 'int i;' > conftest.$ac_ext
1929
  if AC_TRY_EVAL(ac_compile); then
1930
    case `/usr/bin/file conftest.$ac_objext` in
1931
      *ELF-32*)
1932
	HPUX_IA64_MODE="32"
1933
	;;
1934
      *ELF-64*)
1935
	HPUX_IA64_MODE="64"
1936
	;;
1937
    esac
1938
  fi
1939
  rm -rf conftest*
1940
  ;;
1941
*-*-irix6*)
1942
  # Find out which ABI we are using.
1943
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1944
  if AC_TRY_EVAL(ac_compile); then
1945
    if test "$lt_cv_prog_gnu_ld" = yes; then
1946
      case `/usr/bin/file conftest.$ac_objext` in
1947
	*32-bit*)
1948
	  LD="${LD-ld} -melf32bsmip"
1949
	  ;;
1950
	*N32*)
1951
	  LD="${LD-ld} -melf32bmipn32"
1952
	  ;;
1953
	*64-bit*)
1954
	  LD="${LD-ld} -melf64bmip"
1955
	;;
1956
      esac
1957
    else
1958
      case `/usr/bin/file conftest.$ac_objext` in
1959
	*32-bit*)
1960
	  LD="${LD-ld} -32"
1961
	  ;;
1962
	*N32*)
1963
	  LD="${LD-ld} -n32"
1964
	  ;;
1965
	*64-bit*)
1966
	  LD="${LD-ld} -64"
1967
	  ;;
1968
      esac
1969
    fi
1970
  fi
1971
  rm -rf conftest*
1972
  ;;
1973
1974
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1975
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1976
  # Find out which ABI we are using.
1977
  echo 'int i;' > conftest.$ac_ext
1978
  if AC_TRY_EVAL(ac_compile); then
1979
    case `/usr/bin/file conftest.o` in
1980
      *32-bit*)
1981
	case $host in
1982
	  x86_64-*kfreebsd*-gnu)
1983
	    LD="${LD-ld} -m elf_i386_fbsd"
1984
	    ;;
1985
	  x86_64-*linux*)
1986
	    LD="${LD-ld} -m elf_i386"
1987
	    ;;
1988
	  ppc64-*linux*|powerpc64-*linux*)
1989
	    LD="${LD-ld} -m elf32ppclinux"
1990
	    ;;
1991
	  s390x-*linux*)
1992
	    LD="${LD-ld} -m elf_s390"
1993
	    ;;
1994
	  sparc64-*linux*)
1995
	    LD="${LD-ld} -m elf32_sparc"
1996
	    ;;
1997
	esac
1998
	;;
1999
      *64-bit*)
2000
	case $host in
2001
	  x86_64-*kfreebsd*-gnu)
2002
	    LD="${LD-ld} -m elf_x86_64_fbsd"
2003
	    ;;
2004
	  x86_64-*linux*)
2005
	    LD="${LD-ld} -m elf_x86_64"
2006
	    ;;
2007
	  ppc*-*linux*|powerpc*-*linux*)
2008
	    LD="${LD-ld} -m elf64ppc"
2009
	    ;;
2010
	  s390*-*linux*|s390*-*tpf*)
2011
	    LD="${LD-ld} -m elf64_s390"
2012
	    ;;
2013
	  sparc*-*linux*)
2014
	    LD="${LD-ld} -m elf64_sparc"
2015
	    ;;
2016
	esac
2017
	;;
2018
    esac
2019
  fi
2020
  rm -rf conftest*
2021
  ;;
2022
2023
*-*-sco3.2v5*)
2024
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2025
  SAVE_CFLAGS="$CFLAGS"
2026
  CFLAGS="$CFLAGS -belf"
2027
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2028
    [AC_LANG_PUSH(C)
2029
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2030
     AC_LANG_POP])
2031
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2032
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2033
    CFLAGS="$SAVE_CFLAGS"
2034
  fi
2035
  ;;
2036
sparc*-*solaris*)
2037
  # Find out which ABI we are using.
2038
  echo 'int i;' > conftest.$ac_ext
2039
  if AC_TRY_EVAL(ac_compile); then
2040
    case `/usr/bin/file conftest.o` in
2041
    *64-bit*)
2042
      case $lt_cv_prog_gnu_ld in
2043
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2044
      *)
2045
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2046
	  LD="${LD-ld} -64"
2047
	fi
2048
	;;
2049
      esac
2050
      ;;
2051
    esac
2052
  fi
2053
  rm -rf conftest*
2054
  ;;
2055
esac
2056
2057
need_locks="$enable_libtool_lock"
2058
])# _LT_ENABLE_LOCK
2059
2060
2061
# _LT_CMD_OLD_ARCHIVE
2062
# -------------------
2063
m4_defun([_LT_CMD_OLD_ARCHIVE],
2064
[AC_CHECK_TOOL(AR, ar, false)
2065
test -z "$AR" && AR=ar
2066
test -z "$AR_FLAGS" && AR_FLAGS=cru
2067
_LT_DECL([], [AR], [1], [The archiver])
2068
_LT_DECL([], [AR_FLAGS], [1])
2069
2070
AC_CHECK_TOOL(STRIP, strip, :)
2071
test -z "$STRIP" && STRIP=:
2072
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2073
2074
AC_CHECK_TOOL(RANLIB, ranlib, :)
2075
test -z "$RANLIB" && RANLIB=:
2076
_LT_DECL([], [RANLIB], [1],
2077
    [Commands used to install an old-style archive])
2078
2079
# Determine commands to create old-style static archives.
2080
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2081
old_postinstall_cmds='chmod 644 $oldlib'
2082
old_postuninstall_cmds=
2083
2084
if test -n "$RANLIB"; then
2085
  case $host_os in
2086
  openbsd*)
2087
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2088
    ;;
2089
  *)
2090
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2091
    ;;
2092
  esac
2093
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2094
fi
2095
_LT_DECL([], [old_postinstall_cmds], [2])
2096
_LT_DECL([], [old_postuninstall_cmds], [2])
2097
_LT_TAGDECL([], [old_archive_cmds], [2],
2098
    [Commands used to build an old-style archive])
2099
])# _LT_CMD_OLD_ARCHIVE
2100
2101
2102
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2103
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2104
# ----------------------------------------------------------------
2105
# Check whether the given compiler option works
2106
AC_DEFUN([_LT_COMPILER_OPTION],
2107
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2108
m4_require([_LT_DECL_SED])dnl
2109
AC_CACHE_CHECK([$1], [$2],
2110
  [$2=no
2111
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2112
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2113
   lt_compiler_flag="$3"
2114
   # Insert the option either (1) after the last *FLAGS variable, or
2115
   # (2) before a word containing "conftest.", or (3) at the end.
2116
   # Note that $ac_compile itself does not contain backslashes and begins
2117
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2118
   # The option is referenced via a variable to avoid confusing sed.
2119
   lt_compile=`echo "$ac_compile" | $SED \
2120
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2121
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2122
   -e 's:$: $lt_compiler_flag:'`
2123
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2124
   (eval "$lt_compile" 2>conftest.err)
2125
   ac_status=$?
2126
   cat conftest.err >&AS_MESSAGE_LOG_FD
2127
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2128
   if (exit $ac_status) && test -s "$ac_outfile"; then
2129
     # The compiler can only warn and ignore the option if not recognized
2130
     # So say no if there are warnings other than the usual output.
2131
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2132
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2133
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2134
       $2=yes
2135
     fi
2136
   fi
2137
   $RM conftest*
2138
])
2139
2140
if test x"[$]$2" = xyes; then
2141
    m4_if([$5], , :, [$5])
2142
else
2143
    m4_if([$6], , :, [$6])
2144
fi
2145
])# _LT_COMPILER_OPTION
2146
2147
# Old name:
2148
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2149
dnl aclocal-1.4 backwards compatibility:
2150
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2151
2152
2153
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2154
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2155
# ----------------------------------------------------
2156
# Check whether the given linker option works
2157
AC_DEFUN([_LT_LINKER_OPTION],
2158
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2159
m4_require([_LT_DECL_SED])dnl
2160
AC_CACHE_CHECK([$1], [$2],
2161
  [$2=no
2162
   save_LDFLAGS="$LDFLAGS"
2163
   LDFLAGS="$LDFLAGS $3"
2164
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2165
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2166
     # The linker can only warn and ignore the option if not recognized
2167
     # So say no if there are warnings
2168
     if test -s conftest.err; then
2169
       # Append any errors to the config.log.
2170
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2171
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2172
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2173
       if diff conftest.exp conftest.er2 >/dev/null; then
2174
         $2=yes
2175
       fi
2176
     else
2177
       $2=yes
2178
     fi
2179
   fi
2180
   $RM -r conftest*
2181
   LDFLAGS="$save_LDFLAGS"
2182
])
2183
2184
if test x"[$]$2" = xyes; then
2185
    m4_if([$4], , :, [$4])
2186
else
2187
    m4_if([$5], , :, [$5])
2188
fi
2189
])# _LT_LINKER_OPTION
2190
2191
# Old name:
2192
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2193
dnl aclocal-1.4 backwards compatibility:
2194
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2195
2196
2197
# LT_CMD_MAX_LEN
2198
#---------------
2199
AC_DEFUN([LT_CMD_MAX_LEN],
2200
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2201
# find the maximum length of command line arguments
2202
AC_MSG_CHECKING([the maximum length of command line arguments])
2203
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2204
  i=0
2205
  teststring="ABCD"
2206
2207
  case $build_os in
2208
  msdosdjgpp*)
2209
    # On DJGPP, this test can blow up pretty badly due to problems in libc
2210
    # (any single argument exceeding 2000 bytes causes a buffer overrun
2211
    # during glob expansion).  Even if it were fixed, the result of this
2212
    # check would be larger than it should be.
2213
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2214
    ;;
2215
2216
  gnu*)
2217
    # Under GNU Hurd, this test is not required because there is
2218
    # no limit to the length of command line arguments.
2219
    # Libtool will interpret -1 as no limit whatsoever
2220
    lt_cv_sys_max_cmd_len=-1;
2221
    ;;
2222
2223
  cygwin* | mingw* | cegcc*)
2224
    # On Win9x/ME, this test blows up -- it succeeds, but takes
2225
    # about 5 minutes as the teststring grows exponentially.
2226
    # Worse, since 9x/ME are not pre-emptively multitasking,
2227
    # you end up with a "frozen" computer, even though with patience
2228
    # the test eventually succeeds (with a max line length of 256k).
2229
    # Instead, let's just punt: use the minimum linelength reported by
2230
    # all of the supported platforms: 8192 (on NT/2K/XP).
2231
    lt_cv_sys_max_cmd_len=8192;
2232
    ;;
2233
2234
  amigaos*)
2235
    # On AmigaOS with pdksh, this test takes hours, literally.
2236
    # So we just punt and use a minimum line length of 8192.
2237
    lt_cv_sys_max_cmd_len=8192;
2238
    ;;
2239
2240
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2241
    # This has been around since 386BSD, at least.  Likely further.
2242
    if test -x /sbin/sysctl; then
2243
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2244
    elif test -x /usr/sbin/sysctl; then
2245
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2246
    else
2247
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2248
    fi
2249
    # And add a safety zone
2250
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2251
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2252
    ;;
2253
2254
  interix*)
2255
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2256
    lt_cv_sys_max_cmd_len=196608
2257
    ;;
2258
2259
  osf*)
2260
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2261
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2262
    # nice to cause kernel panics so lets avoid the loop below.
2263
    # First set a reasonable default.
2264
    lt_cv_sys_max_cmd_len=16384
2265
    #
2266
    if test -x /sbin/sysconfig; then
2267
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2268
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2269
      esac
2270
    fi
2271
    ;;
2272
  sco3.2v5*)
2273
    lt_cv_sys_max_cmd_len=102400
2274
    ;;
2275
  sysv5* | sco5v6* | sysv4.2uw2*)
2276
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2277
    if test -n "$kargmax"; then
2278
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2279
    else
2280
      lt_cv_sys_max_cmd_len=32768
2281
    fi
2282
    ;;
2283
  *)
2284
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2285
    if test -n "$lt_cv_sys_max_cmd_len"; then
2286
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2287
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2288
    else
2289
      # Make teststring a little bigger before we do anything with it.
2290
      # a 1K string should be a reasonable start.
2291
      for i in 1 2 3 4 5 6 7 8 ; do
2292
        teststring=$teststring$teststring
2293
      done
2294
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2295
      # If test is not a shell built-in, we'll probably end up computing a
2296
      # maximum length that is only half of the actual maximum length, but
2297
      # we can't tell.
2298
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2299
	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2300
	      test $i != 17 # 1/2 MB should be enough
2301
      do
2302
        i=`expr $i + 1`
2303
        teststring=$teststring$teststring
2304
      done
2305
      # Only check the string length outside the loop.
2306
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2307
      teststring=
2308
      # Add a significant safety factor because C++ compilers can tack on
2309
      # massive amounts of additional arguments before passing them to the
2310
      # linker.  It appears as though 1/2 is a usable value.
2311
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2312
    fi
2313
    ;;
2314
  esac
2315
])
2316
if test -n $lt_cv_sys_max_cmd_len ; then
2317
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2318
else
2319
  AC_MSG_RESULT(none)
2320
fi
2321
max_cmd_len=$lt_cv_sys_max_cmd_len
2322
_LT_DECL([], [max_cmd_len], [0],
2323
    [What is the maximum length of a command?])
2324
])# LT_CMD_MAX_LEN
2325
2326
# Old name:
2327
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2328
dnl aclocal-1.4 backwards compatibility:
2329
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2330
2331
2332
# _LT_HEADER_DLFCN
2333
# ----------------
2334
m4_defun([_LT_HEADER_DLFCN],
2335
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2336
])# _LT_HEADER_DLFCN
2337
2338
2339
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2340
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2341
# ----------------------------------------------------------------
2342
m4_defun([_LT_TRY_DLOPEN_SELF],
2343
[m4_require([_LT_HEADER_DLFCN])dnl
2344
if test "$cross_compiling" = yes; then :
2345
  [$4]
2346
else
2347
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2348
  lt_status=$lt_dlunknown
2349
  cat > conftest.$ac_ext <<_LT_EOF
2350
[#line __oline__ "configure"
2351
#include "confdefs.h"
2352
2353
#if HAVE_DLFCN_H
2354
#include <dlfcn.h>
2355
#endif
2356
2357
#include <stdio.h>
2358
2359
#ifdef RTLD_GLOBAL
2360
#  define LT_DLGLOBAL		RTLD_GLOBAL
2361
#else
2362
#  ifdef DL_GLOBAL
2363
#    define LT_DLGLOBAL		DL_GLOBAL
2364
#  else
2365
#    define LT_DLGLOBAL		0
2366
#  endif
2367
#endif
2368
2369
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2370
   find out it does not work in some platform. */
2371
#ifndef LT_DLLAZY_OR_NOW
2372
#  ifdef RTLD_LAZY
2373
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2374
#  else
2375
#    ifdef DL_LAZY
2376
#      define LT_DLLAZY_OR_NOW		DL_LAZY
2377
#    else
2378
#      ifdef RTLD_NOW
2379
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2380
#      else
2381
#        ifdef DL_NOW
2382
#          define LT_DLLAZY_OR_NOW	DL_NOW
2383
#        else
2384
#          define LT_DLLAZY_OR_NOW	0
2385
#        endif
2386
#      endif
2387
#    endif
2388
#  endif
2389
#endif
2390
2391
void fnord() { int i=42;}
2392
int main ()
2393
{
2394
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2395
  int status = $lt_dlunknown;
2396
2397
  if (self)
2398
    {
2399
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2400
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2401
      /* dlclose (self); */
2402
    }
2403
  else
2404
    puts (dlerror ());
2405
2406
  return status;
2407
}]
2408
_LT_EOF
2409
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2410
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2411
    lt_status=$?
2412
    case x$lt_status in
2413
      x$lt_dlno_uscore) $1 ;;
2414
      x$lt_dlneed_uscore) $2 ;;
2415
      x$lt_dlunknown|x*) $3 ;;
2416
    esac
2417
  else :
2418
    # compilation failed
2419
    $3
2420
  fi
2421
fi
2422
rm -fr conftest*
2423
])# _LT_TRY_DLOPEN_SELF
2424
2425
2426
# LT_SYS_DLOPEN_SELF
2427
# ------------------
2428
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2429
[m4_require([_LT_HEADER_DLFCN])dnl
2430
if test "x$enable_dlopen" != xyes; then
2431
  enable_dlopen=unknown
2432
  enable_dlopen_self=unknown
2433
  enable_dlopen_self_static=unknown
2434
else
2435
  lt_cv_dlopen=no
2436
  lt_cv_dlopen_libs=
2437
2438
  case $host_os in
2439
  beos*)
2440
    lt_cv_dlopen="load_add_on"
2441
    lt_cv_dlopen_libs=
2442
    lt_cv_dlopen_self=yes
2443
    ;;
2444
2445
  mingw* | pw32* | cegcc*)
2446
    lt_cv_dlopen="LoadLibrary"
2447
    lt_cv_dlopen_libs=
2448
    ;;
2449
2450
  cygwin*)
2451
    lt_cv_dlopen="dlopen"
2452
    lt_cv_dlopen_libs=
2453
    ;;
2454
2455
  darwin*)
2456
  # if libdl is installed we need to link against it
2457
    AC_CHECK_LIB([dl], [dlopen],
2458
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2459
    lt_cv_dlopen="dyld"
2460
    lt_cv_dlopen_libs=
2461
    lt_cv_dlopen_self=yes
2462
    ])
2463
    ;;
2464
2465
  *)
2466
    AC_CHECK_FUNC([shl_load],
2467
	  [lt_cv_dlopen="shl_load"],
2468
      [AC_CHECK_LIB([dld], [shl_load],
2469
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2470
	[AC_CHECK_FUNC([dlopen],
2471
	      [lt_cv_dlopen="dlopen"],
2472
	  [AC_CHECK_LIB([dl], [dlopen],
2473
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2474
	    [AC_CHECK_LIB([svld], [dlopen],
2475
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2476
	      [AC_CHECK_LIB([dld], [dld_link],
2477
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2478
	      ])
2479
	    ])
2480
	  ])
2481
	])
2482
      ])
2483
    ;;
2484
  esac
2485
2486
  if test "x$lt_cv_dlopen" != xno; then
2487
    enable_dlopen=yes
2488
  else
2489
    enable_dlopen=no
2490
  fi
2491
2492
  case $lt_cv_dlopen in
2493
  dlopen)
2494
    save_CPPFLAGS="$CPPFLAGS"
2495
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2496
2497
    save_LDFLAGS="$LDFLAGS"
2498
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2499
2500
    save_LIBS="$LIBS"
2501
    LIBS="$lt_cv_dlopen_libs $LIBS"
2502
2503
    AC_CACHE_CHECK([whether a program can dlopen itself],
2504
	  lt_cv_dlopen_self, [dnl
2505
	  _LT_TRY_DLOPEN_SELF(
2506
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2507
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2508
    ])
2509
2510
    if test "x$lt_cv_dlopen_self" = xyes; then
2511
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2512
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2513
	  lt_cv_dlopen_self_static, [dnl
2514
	  _LT_TRY_DLOPEN_SELF(
2515
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2516
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2517
      ])
2518
    fi
2519
2520
    CPPFLAGS="$save_CPPFLAGS"
2521
    LDFLAGS="$save_LDFLAGS"
2522
    LIBS="$save_LIBS"
2523
    ;;
2524
  esac
2525
2526
  case $lt_cv_dlopen_self in
2527
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2528
  *) enable_dlopen_self=unknown ;;
2529
  esac
2530
2531
  case $lt_cv_dlopen_self_static in
2532
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2533
  *) enable_dlopen_self_static=unknown ;;
2534
  esac
2535
fi
2536
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2537
	 [Whether dlopen is supported])
2538
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2539
	 [Whether dlopen of programs is supported])
2540
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2541
	 [Whether dlopen of statically linked programs is supported])
2542
])# LT_SYS_DLOPEN_SELF
2543
2544
# Old name:
2545
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2546
dnl aclocal-1.4 backwards compatibility:
2547
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2548
2549
2550
# _LT_COMPILER_C_O([TAGNAME])
2551
# ---------------------------
2552
# Check to see if options -c and -o are simultaneously supported by compiler.
2553
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2554
m4_defun([_LT_COMPILER_C_O],
2555
[m4_require([_LT_DECL_SED])dnl
2556
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2557
m4_require([_LT_TAG_COMPILER])dnl
2558
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2559
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2560
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2561
   $RM -r conftest 2>/dev/null
2562
   mkdir conftest
2563
   cd conftest
2564
   mkdir out
2565
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2566
2567
   lt_compiler_flag="-o out/conftest2.$ac_objext"
2568
   # Insert the option either (1) after the last *FLAGS variable, or
2569
   # (2) before a word containing "conftest.", or (3) at the end.
2570
   # Note that $ac_compile itself does not contain backslashes and begins
2571
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2572
   lt_compile=`echo "$ac_compile" | $SED \
2573
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2574
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2575
   -e 's:$: $lt_compiler_flag:'`
2576
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2577
   (eval "$lt_compile" 2>out/conftest.err)
2578
   ac_status=$?
2579
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2580
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2581
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2582
   then
2583
     # The compiler can only warn and ignore the option if not recognized
2584
     # So say no if there are warnings
2585
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2586
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2587
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2588
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2589
     fi
2590
   fi
2591
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2592
   $RM conftest*
2593
   # SGI C++ compiler will create directory out/ii_files/ for
2594
   # template instantiation
2595
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2596
   $RM out/* && rmdir out
2597
   cd ..
2598
   $RM -r conftest
2599
   $RM conftest*
2600
])
2601
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2602
	[Does compiler simultaneously support -c and -o options?])
2603
])# _LT_COMPILER_C_O
2604
2605
2606
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2607
# ----------------------------------
2608
# Check to see if we can do hard links to lock some files if needed
2609
m4_defun([_LT_COMPILER_FILE_LOCKS],
2610
[m4_require([_LT_ENABLE_LOCK])dnl
2611
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2612
_LT_COMPILER_C_O([$1])
2613
2614
hard_links="nottested"
2615
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2616
  # do not overwrite the value of need_locks provided by the user
2617
  AC_MSG_CHECKING([if we can lock with hard links])
2618
  hard_links=yes
2619
  $RM conftest*
2620
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2621
  touch conftest.a
2622
  ln conftest.a conftest.b 2>&5 || hard_links=no
2623
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2624
  AC_MSG_RESULT([$hard_links])
2625
  if test "$hard_links" = no; then
2626
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2627
    need_locks=warn
2628
  fi
2629
else
2630
  need_locks=no
2631
fi
2632
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2633
])# _LT_COMPILER_FILE_LOCKS
2634
2635
2636
# _LT_CHECK_OBJDIR
2637
# ----------------
2638
m4_defun([_LT_CHECK_OBJDIR],
2639
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2640
[rm -f .libs 2>/dev/null
2641
mkdir .libs 2>/dev/null
2642
if test -d .libs; then
2643
  lt_cv_objdir=.libs
2644
else
2645
  # MS-DOS does not allow filenames that begin with a dot.
2646
  lt_cv_objdir=_libs
2647
fi
2648
rmdir .libs 2>/dev/null])
2649
objdir=$lt_cv_objdir
2650
_LT_DECL([], [objdir], [0],
2651
         [The name of the directory that contains temporary libtool files])dnl
2652
m4_pattern_allow([LT_OBJDIR])dnl
2653
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2654
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2655
])# _LT_CHECK_OBJDIR
2656
2657
2658
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2659
# --------------------------------------
2660
# Check hardcoding attributes.
2661
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2662
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2663
_LT_TAGVAR(hardcode_action, $1)=
2664
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2665
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2666
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2667
2668
  # We can hardcode non-existent directories.
2669
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2670
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2671
     # have to relink, otherwise we might link with an installed library
2672
     # when we should be linking with a yet-to-be-installed one
2673
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2674
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2675
    # Linking always hardcodes the temporary library directory.
2676
    _LT_TAGVAR(hardcode_action, $1)=relink
2677
  else
2678
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2679
    _LT_TAGVAR(hardcode_action, $1)=immediate
2680
  fi
2681
else
2682
  # We cannot hardcode anything, or else we can only hardcode existing
2683
  # directories.
2684
  _LT_TAGVAR(hardcode_action, $1)=unsupported
2685
fi
2686
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2687
2688
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2689
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2690
  # Fast installation is not supported
2691
  enable_fast_install=no
2692
elif test "$shlibpath_overrides_runpath" = yes ||
2693
     test "$enable_shared" = no; then
2694
  # Fast installation is not necessary
2695
  enable_fast_install=needless
2696
fi
2697
_LT_TAGDECL([], [hardcode_action], [0],
2698
    [How to hardcode a shared library path into an executable])
2699
])# _LT_LINKER_HARDCODE_LIBPATH
2700
2701
2702
# _LT_CMD_STRIPLIB
2703
# ----------------
2704
m4_defun([_LT_CMD_STRIPLIB],
2705
[m4_require([_LT_DECL_EGREP])
2706
striplib=
2707
old_striplib=
2708
AC_MSG_CHECKING([whether stripping libraries is possible])
2709
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2710
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2711
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2712
  AC_MSG_RESULT([yes])
2713
else
2714
# FIXME - insert some real tests, host_os isn't really good enough
2715
  case $host_os in
2716
  darwin*)
2717
    if test -n "$STRIP" ; then
2718
      striplib="$STRIP -x"
2719
      old_striplib="$STRIP -S"
2720
      AC_MSG_RESULT([yes])
2721
    else
2722
      AC_MSG_RESULT([no])
2723
    fi
2724
    ;;
2725
  *)
2726
    AC_MSG_RESULT([no])
2727
    ;;
2728
  esac
2729
fi
2730
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2731
_LT_DECL([], [striplib], [1])
2732
])# _LT_CMD_STRIPLIB
2733
2734
2735
# _LT_SYS_DYNAMIC_LINKER([TAG])
2736
# -----------------------------
2737
# PORTME Fill in your ld.so characteristics
2738
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2739
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2740
m4_require([_LT_DECL_EGREP])dnl
2741
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2742
m4_require([_LT_DECL_OBJDUMP])dnl
2743
m4_require([_LT_DECL_SED])dnl
2744
AC_MSG_CHECKING([dynamic linker characteristics])
2745
m4_if([$1],
2746
	[], [
2747
if test "$GCC" = yes; then
2748
  case $host_os in
2749
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2750
    *) lt_awk_arg="/^libraries:/" ;;
2751
  esac
2752
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2753
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2754
    # if the path contains ";" then we assume it to be the separator
2755
    # otherwise default to the standard path separator (i.e. ":") - it is
2756
    # assumed that no part of a normal pathname contains ";" but that should
2757
    # okay in the real world where ";" in dirpaths is itself problematic.
2758
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2759
  else
2760
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2761
  fi
2762
  # Ok, now we have the path, separated by spaces, we can step through it
2763
  # and add multilib dir if necessary.
2764
  lt_tmp_lt_search_path_spec=
2765
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2766
  for lt_sys_path in $lt_search_path_spec; do
2767
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2768
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2769
    else
2770
      test -d "$lt_sys_path" && \
2771
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2772
    fi
2773
  done
2774
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2775
BEGIN {RS=" "; FS="/|\n";} {
2776
  lt_foo="";
2777
  lt_count=0;
2778
  for (lt_i = NF; lt_i > 0; lt_i--) {
2779
    if ($lt_i != "" && $lt_i != ".") {
2780
      if ($lt_i == "..") {
2781
        lt_count++;
2782
      } else {
2783
        if (lt_count == 0) {
2784
          lt_foo="/" $lt_i lt_foo;
2785
        } else {
2786
          lt_count--;
2787
        }
2788
      }
2789
    }
2790
  }
2791
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2792
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2793
}'`
2794
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2795
else
2796
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2797
fi])
2798
library_names_spec=
2799
libname_spec='lib$name'
2800
soname_spec=
2801
shrext_cmds=".so"
2802
postinstall_cmds=
2803
postuninstall_cmds=
2804
finish_cmds=
2805
finish_eval=
2806
shlibpath_var=
2807
shlibpath_overrides_runpath=unknown
2808
version_type=none
2809
dynamic_linker="$host_os ld.so"
2810
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2811
need_lib_prefix=unknown
2812
hardcode_into_libs=no
2813
2814
# when you set need_version to no, make sure it does not cause -set_version
2815
# flags to be left without arguments
2816
need_version=unknown
2817
2818
case $host_os in
2819
aix3*)
2820
  version_type=linux
2821
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2822
  shlibpath_var=LIBPATH
2823
2824
  # AIX 3 has no versioning support, so we append a major version to the name.
2825
  soname_spec='${libname}${release}${shared_ext}$major'
2826
  ;;
2827
2828
aix[[4-9]]*)
2829
  version_type=linux
2830
  need_lib_prefix=no
2831
  need_version=no
2832
  hardcode_into_libs=yes
2833
  if test "$host_cpu" = ia64; then
2834
    # AIX 5 supports IA64
2835
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2836
    shlibpath_var=LD_LIBRARY_PATH
2837
  else
2838
    # With GCC up to 2.95.x, collect2 would create an import file
2839
    # for dependence libraries.  The import file would start with
2840
    # the line `#! .'.  This would cause the generated library to
2841
    # depend on `.', always an invalid library.  This was fixed in
2842
    # development snapshots of GCC prior to 3.0.
2843
    case $host_os in
2844
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2845
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2846
	   echo ' yes '
2847
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2848
	:
2849
      else
2850
	can_build_shared=no
2851
      fi
2852
      ;;
2853
    esac
2854
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2855
    # soname into executable. Probably we can add versioning support to
2856
    # collect2, so additional links can be useful in future.
2857
    if test "$aix_use_runtimelinking" = yes; then
2858
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2859
      # instead of lib<name>.a to let people know that these are not
2860
      # typical AIX shared libraries.
2861
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2862
    else
2863
      # We preserve .a as extension for shared libraries through AIX4.2
2864
      # and later when we are not doing run time linking.
2865
      library_names_spec='${libname}${release}.a $libname.a'
2866
      soname_spec='${libname}${release}${shared_ext}$major'
2867
    fi
2868
    shlibpath_var=LIBPATH
2869
  fi
2870
  ;;
2871
2872
amigaos*)
2873
  case $host_cpu in
2874
  powerpc)
2875
    # Since July 2007 AmigaOS4 officially supports .so libraries.
2876
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2877
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2878
    ;;
2879
  m68k)
2880
    library_names_spec='$libname.ixlibrary $libname.a'
2881
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2882
    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'
2883
    ;;
2884
  esac
2885
  ;;
2886
2887
beos*)
2888
  library_names_spec='${libname}${shared_ext}'
2889
  dynamic_linker="$host_os ld.so"
2890
  shlibpath_var=LIBRARY_PATH
2891
  ;;
2892
2893
bsdi[[45]]*)
2894
  version_type=linux
2895
  need_version=no
2896
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2897
  soname_spec='${libname}${release}${shared_ext}$major'
2898
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2899
  shlibpath_var=LD_LIBRARY_PATH
2900
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2901
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2902
  # the default ld.so.conf also contains /usr/contrib/lib and
2903
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2904
  # libtool to hard-code these into programs
2905
  ;;
2906
2907
cygwin* | mingw* | pw32* | cegcc*)
2908
  version_type=windows
2909
  shrext_cmds=".dll"
2910
  need_version=no
2911
  need_lib_prefix=no
2912
2913
  case $GCC,$host_os in
2914
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2915
    library_names_spec='$libname.dll.a'
2916
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2917
    postinstall_cmds='base_file=`basename \${file}`~
2918
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2919
      dldir=$destdir/`dirname \$dlpath`~
2920
      test -d \$dldir || mkdir -p \$dldir~
2921
      $install_prog $dir/$dlname \$dldir/$dlname~
2922
      chmod a+x \$dldir/$dlname~
2923
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2924
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2925
      fi'
2926
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2927
      dlpath=$dir/\$dldll~
2928
       $RM \$dlpath'
2929
    shlibpath_overrides_runpath=yes
2930
2931
    case $host_os in
2932
    cygwin*)
2933
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2934
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2935
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2936
      ;;
2937
    mingw* | cegcc*)
2938
      # MinGW DLLs use traditional 'lib' prefix
2939
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2940
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2941
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2942
        # It is most probably a Windows format PATH printed by
2943
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2944
        # path with ; separators, and with drive letters. We can handle the
2945
        # drive letters (cygwin fileutils understands them), so leave them,
2946
        # especially as we might pass files found there to a mingw objdump,
2947
        # which wouldn't understand a cygwinified path. Ahh.
2948
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2949
      else
2950
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2951
      fi
2952
      ;;
2953
    pw32*)
2954
      # pw32 DLLs use 'pw' prefix rather than 'lib'
2955
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2956
      ;;
2957
    esac
2958
    ;;
2959
2960
  *)
2961
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2962
    ;;
2963
  esac
2964
  dynamic_linker='Win32 ld.exe'
2965
  # FIXME: first we should search . and the directory the executable is in
2966
  shlibpath_var=PATH
2967
  ;;
2968
2969
darwin* | rhapsody*)
2970
  dynamic_linker="$host_os dyld"
2971
  version_type=darwin
2972
  need_lib_prefix=no
2973
  need_version=no
2974
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2975
  soname_spec='${libname}${release}${major}$shared_ext'
2976
  shlibpath_overrides_runpath=yes
2977
  shlibpath_var=DYLD_LIBRARY_PATH
2978
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2979
m4_if([$1], [],[
2980
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2981
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2982
  ;;
2983
2984
dgux*)
2985
  version_type=linux
2986
  need_lib_prefix=no
2987
  need_version=no
2988
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2989
  soname_spec='${libname}${release}${shared_ext}$major'
2990
  shlibpath_var=LD_LIBRARY_PATH
2991
  ;;
2992
2993
freebsd1*)
2994
  dynamic_linker=no
2995
  ;;
2996
2997
freebsd* | dragonfly*)
2998
  # DragonFly does not have aout.  When/if they implement a new
2999
  # versioning mechanism, adjust this.
3000
  if test -x /usr/bin/objformat; then
3001
    objformat=`/usr/bin/objformat`
3002
  else
3003
    case $host_os in
3004
    freebsd[[123]]*) objformat=aout ;;
3005
    *) objformat=elf ;;
3006
    esac
3007
  fi
3008
  version_type=freebsd-$objformat
3009
  case $version_type in
3010
    freebsd-elf*)
3011
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3012
      need_version=no
3013
      need_lib_prefix=no
3014
      ;;
3015
    freebsd-*)
3016
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3017
      need_version=yes
3018
      ;;
3019
  esac
3020
  shlibpath_var=LD_LIBRARY_PATH
3021
  case $host_os in
3022
  freebsd2*)
3023
    shlibpath_overrides_runpath=yes
3024
    ;;
3025
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3026
    shlibpath_overrides_runpath=yes
3027
    hardcode_into_libs=yes
3028
    ;;
3029
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3030
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3031
    shlibpath_overrides_runpath=no
3032
    hardcode_into_libs=yes
3033
    ;;
3034
  *) # from 4.6 on, and DragonFly
3035
    shlibpath_overrides_runpath=yes
3036
    hardcode_into_libs=yes
3037
    ;;
3038
  esac
3039
  ;;
3040
3041
gnu*)
3042
  version_type=linux
3043
  need_lib_prefix=no
3044
  need_version=no
3045
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3046
  soname_spec='${libname}${release}${shared_ext}$major'
3047
  shlibpath_var=LD_LIBRARY_PATH
3048
  hardcode_into_libs=yes
3049
  ;;
3050
3051
hpux9* | hpux10* | hpux11*)
3052
  # Give a soname corresponding to the major version so that dld.sl refuses to
3053
  # link against other versions.
3054
  version_type=sunos
3055
  need_lib_prefix=no
3056
  need_version=no
3057
  case $host_cpu in
3058
  ia64*)
3059
    shrext_cmds='.so'
3060
    hardcode_into_libs=yes
3061
    dynamic_linker="$host_os dld.so"
3062
    shlibpath_var=LD_LIBRARY_PATH
3063
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3064
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3065
    soname_spec='${libname}${release}${shared_ext}$major'
3066
    if test "X$HPUX_IA64_MODE" = X32; then
3067
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3068
    else
3069
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3070
    fi
3071
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3072
    ;;
3073
  hppa*64*)
3074
    shrext_cmds='.sl'
3075
    hardcode_into_libs=yes
3076
    dynamic_linker="$host_os dld.sl"
3077
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3078
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3079
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3080
    soname_spec='${libname}${release}${shared_ext}$major'
3081
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3082
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3083
    ;;
3084
  *)
3085
    shrext_cmds='.sl'
3086
    dynamic_linker="$host_os dld.sl"
3087
    shlibpath_var=SHLIB_PATH
3088
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3089
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3090
    soname_spec='${libname}${release}${shared_ext}$major'
3091
    ;;
3092
  esac
3093
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3094
  postinstall_cmds='chmod 555 $lib'
3095
  ;;
3096
3097
interix[[3-9]]*)
3098
  version_type=linux
3099
  need_lib_prefix=no
3100
  need_version=no
3101
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3102
  soname_spec='${libname}${release}${shared_ext}$major'
3103
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3104
  shlibpath_var=LD_LIBRARY_PATH
3105
  shlibpath_overrides_runpath=no
3106
  hardcode_into_libs=yes
3107
  ;;
3108
3109
irix5* | irix6* | nonstopux*)
3110
  case $host_os in
3111
    nonstopux*) version_type=nonstopux ;;
3112
    *)
3113
	if test "$lt_cv_prog_gnu_ld" = yes; then
3114
		version_type=linux
3115
	else
3116
		version_type=irix
3117
	fi ;;
3118
  esac
3119
  need_lib_prefix=no
3120
  need_version=no
3121
  soname_spec='${libname}${release}${shared_ext}$major'
3122
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3123
  case $host_os in
3124
  irix5* | nonstopux*)
3125
    libsuff= shlibsuff=
3126
    ;;
3127
  *)
3128
    case $LD in # libtool.m4 will add one of these switches to LD
3129
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3130
      libsuff= shlibsuff= libmagic=32-bit;;
3131
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3132
      libsuff=32 shlibsuff=N32 libmagic=N32;;
3133
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3134
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3135
    *) libsuff= shlibsuff= libmagic=never-match;;
3136
    esac
3137
    ;;
3138
  esac
3139
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3140
  shlibpath_overrides_runpath=no
3141
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3142
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3143
  hardcode_into_libs=yes
3144
  ;;
3145
3146
# No shared lib support for Linux oldld, aout, or coff.
3147
linux*oldld* | linux*aout* | linux*coff*)
3148
  dynamic_linker=no
3149
  ;;
3150
3151
# This must be Linux ELF.
3152
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3153
  version_type=linux
3154
  need_lib_prefix=no
3155
  need_version=no
3156
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3157
  soname_spec='${libname}${release}${shared_ext}$major'
3158
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3159
  shlibpath_var=LD_LIBRARY_PATH
3160
  shlibpath_overrides_runpath=no
3161
  # Some binutils ld are patched to set DT_RUNPATH
3162
  save_LDFLAGS=$LDFLAGS
3163
  save_libdir=$libdir
3164
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3165
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3166
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3167
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3168
       [shlibpath_overrides_runpath=yes])])
3169
  LDFLAGS=$save_LDFLAGS
3170
  libdir=$save_libdir
3171
3172
  # This implies no fast_install, which is unacceptable.
3173
  # Some rework will be needed to allow for fast_install
3174
  # before this can be enabled.
3175
  hardcode_into_libs=yes
3176
3177
  # Append ld.so.conf contents to the search path
3178
  if test -f /etc/ld.so.conf; then
3179
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3180
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3181
  fi
3182
3183
  # We used to test for /lib/ld.so.1 and disable shared libraries on
3184
  # powerpc, because MkLinux only supported shared libraries with the
3185
  # GNU dynamic linker.  Since this was broken with cross compilers,
3186
  # most powerpc-linux boxes support dynamic linking these days and
3187
  # people can always --disable-shared, the test was removed, and we
3188
  # assume the GNU/Linux dynamic linker is in use.
3189
  dynamic_linker='GNU/Linux ld.so'
3190
  ;;
3191
3192
netbsdelf*-gnu)
3193
  version_type=linux
3194
  need_lib_prefix=no
3195
  need_version=no
3196
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3197
  soname_spec='${libname}${release}${shared_ext}$major'
3198
  shlibpath_var=LD_LIBRARY_PATH
3199
  shlibpath_overrides_runpath=no
3200
  hardcode_into_libs=yes
3201
  dynamic_linker='NetBSD ld.elf_so'
3202
  ;;
3203
3204
netbsd*)
3205
  version_type=sunos
3206
  need_lib_prefix=no
3207
  need_version=no
3208
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3209
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3210
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3211
    dynamic_linker='NetBSD (a.out) ld.so'
3212
  else
3213
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3214
    soname_spec='${libname}${release}${shared_ext}$major'
3215
    dynamic_linker='NetBSD ld.elf_so'
3216
  fi
3217
  shlibpath_var=LD_LIBRARY_PATH
3218
  shlibpath_overrides_runpath=yes
3219
  hardcode_into_libs=yes
3220
  ;;
3221
3222
newsos6)
3223
  version_type=linux
3224
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3225
  shlibpath_var=LD_LIBRARY_PATH
3226
  shlibpath_overrides_runpath=yes
3227
  ;;
3228
3229
*nto* | *qnx*)
3230
  version_type=qnx
3231
  need_lib_prefix=no
3232
  need_version=no
3233
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3234
  soname_spec='${libname}${release}${shared_ext}$major'
3235
  shlibpath_var=LD_LIBRARY_PATH
3236
  shlibpath_overrides_runpath=no
3237
  hardcode_into_libs=yes
3238
  dynamic_linker='ldqnx.so'
3239
  ;;
3240
3241
openbsd*)
3242
  version_type=sunos
3243
  sys_lib_dlsearch_path_spec="/usr/lib"
3244
  need_lib_prefix=no
3245
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3246
  case $host_os in
3247
    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3248
    *)				need_version=no  ;;
3249
  esac
3250
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3251
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3252
  shlibpath_var=LD_LIBRARY_PATH
3253
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3254
    case $host_os in
3255
      openbsd2.[[89]] | openbsd2.[[89]].*)
3256
	shlibpath_overrides_runpath=no
3257
	;;
3258
      *)
3259
	shlibpath_overrides_runpath=yes
3260
	;;
3261
      esac
3262
  else
3263
    shlibpath_overrides_runpath=yes
3264
  fi
3265
  ;;
3266
3267
os2*)
3268
  libname_spec='$name'
3269
  shrext_cmds=".dll"
3270
  need_lib_prefix=no
3271
  library_names_spec='$libname${shared_ext} $libname.a'
3272
  dynamic_linker='OS/2 ld.exe'
3273
  shlibpath_var=LIBPATH
3274
  ;;
3275
3276
osf3* | osf4* | osf5*)
3277
  version_type=osf
3278
  need_lib_prefix=no
3279
  need_version=no
3280
  soname_spec='${libname}${release}${shared_ext}$major'
3281
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3282
  shlibpath_var=LD_LIBRARY_PATH
3283
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3284
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3285
  ;;
3286
3287
rdos*)
3288
  dynamic_linker=no
3289
  ;;
3290
3291
solaris*)
3292
  version_type=linux
3293
  need_lib_prefix=no
3294
  need_version=no
3295
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3296
  soname_spec='${libname}${release}${shared_ext}$major'
3297
  shlibpath_var=LD_LIBRARY_PATH
3298
  shlibpath_overrides_runpath=yes
3299
  hardcode_into_libs=yes
3300
  # ldd complains unless libraries are executable
3301
  postinstall_cmds='chmod +x $lib'
3302
  ;;
3303
3304
sunos4*)
3305
  version_type=sunos
3306
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3307
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3308
  shlibpath_var=LD_LIBRARY_PATH
3309
  shlibpath_overrides_runpath=yes
3310
  if test "$with_gnu_ld" = yes; then
3311
    need_lib_prefix=no
3312
  fi
3313
  need_version=yes
3314
  ;;
3315
3316
sysv4 | sysv4.3*)
3317
  version_type=linux
3318
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3319
  soname_spec='${libname}${release}${shared_ext}$major'
3320
  shlibpath_var=LD_LIBRARY_PATH
3321
  case $host_vendor in
3322
    sni)
3323
      shlibpath_overrides_runpath=no
3324
      need_lib_prefix=no
3325
      runpath_var=LD_RUN_PATH
3326
      ;;
3327
    siemens)
3328
      need_lib_prefix=no
3329
      ;;
3330
    motorola)
3331
      need_lib_prefix=no
3332
      need_version=no
3333
      shlibpath_overrides_runpath=no
3334
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3335
      ;;
3336
  esac
3337
  ;;
3338
3339
sysv4*MP*)
3340
  if test -d /usr/nec ;then
3341
    version_type=linux
3342
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3343
    soname_spec='$libname${shared_ext}.$major'
3344
    shlibpath_var=LD_LIBRARY_PATH
3345
  fi
3346
  ;;
3347
3348
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3349
  version_type=freebsd-elf
3350
  need_lib_prefix=no
3351
  need_version=no
3352
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3353
  soname_spec='${libname}${release}${shared_ext}$major'
3354
  shlibpath_var=LD_LIBRARY_PATH
3355
  shlibpath_overrides_runpath=yes
3356
  hardcode_into_libs=yes
3357
  if test "$with_gnu_ld" = yes; then
3358
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3359
  else
3360
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3361
    case $host_os in
3362
      sco3.2v5*)
3363
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3364
	;;
3365
    esac
3366
  fi
3367
  sys_lib_dlsearch_path_spec='/usr/lib'
3368
  ;;
3369
3370
tpf*)
3371
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3372
  version_type=linux
3373
  need_lib_prefix=no
3374
  need_version=no
3375
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3376
  shlibpath_var=LD_LIBRARY_PATH
3377
  shlibpath_overrides_runpath=no
3378
  hardcode_into_libs=yes
3379
  ;;
3380
3381
uts4*)
3382
  version_type=linux
3383
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3384
  soname_spec='${libname}${release}${shared_ext}$major'
3385
  shlibpath_var=LD_LIBRARY_PATH
3386
  ;;
3387
3388
*)
3389
  dynamic_linker=no
3390
  ;;
3391
esac
3392
AC_MSG_RESULT([$dynamic_linker])
3393
test "$dynamic_linker" = no && can_build_shared=no
3394
3395
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3396
if test "$GCC" = yes; then
3397
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3398
fi
3399
3400
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3401
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3402
fi
3403
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3404
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3405
fi
3406
3407
_LT_DECL([], [variables_saved_for_relink], [1],
3408
    [Variables whose values should be saved in libtool wrapper scripts and
3409
    restored at link time])
3410
_LT_DECL([], [need_lib_prefix], [0],
3411
    [Do we need the "lib" prefix for modules?])
3412
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3413
_LT_DECL([], [version_type], [0], [Library versioning type])
3414
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3415
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3416
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3417
    [Is shlibpath searched before the hard-coded library search path?])
3418
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3419
_LT_DECL([], [library_names_spec], [1],
3420
    [[List of archive names.  First name is the real one, the rest are links.
3421
    The last name is the one that the linker finds with -lNAME]])
3422
_LT_DECL([], [soname_spec], [1],
3423
    [[The coded name of the library, if different from the real name]])
3424
_LT_DECL([], [postinstall_cmds], [2],
3425
    [Command to use after installation of a shared archive])
3426
_LT_DECL([], [postuninstall_cmds], [2],
3427
    [Command to use after uninstallation of a shared archive])
3428
_LT_DECL([], [finish_cmds], [2],
3429
    [Commands used to finish a libtool library installation in a directory])
3430
_LT_DECL([], [finish_eval], [1],
3431
    [[As "finish_cmds", except a single script fragment to be evaled but
3432
    not shown]])
3433
_LT_DECL([], [hardcode_into_libs], [0],
3434
    [Whether we should hardcode library paths into libraries])
3435
_LT_DECL([], [sys_lib_search_path_spec], [2],
3436
    [Compile-time system search path for libraries])
3437
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3438
    [Run-time system search path for libraries])
3439
])# _LT_SYS_DYNAMIC_LINKER
3440
3441
3442
# _LT_PATH_TOOL_PREFIX(TOOL)
3443
# --------------------------
3444
# find a file program which can recognize shared library
3445
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3446
[m4_require([_LT_DECL_EGREP])dnl
3447
AC_MSG_CHECKING([for $1])
3448
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3449
[case $MAGIC_CMD in
3450
[[\\/*] |  ?:[\\/]*])
3451
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3452
  ;;
3453
*)
3454
  lt_save_MAGIC_CMD="$MAGIC_CMD"
3455
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3456
dnl $ac_dummy forces splitting on constant user-supplied paths.
3457
dnl POSIX.2 word splitting is done only on the output of word expansions,
3458
dnl not every word.  This closes a longstanding sh security hole.
3459
  ac_dummy="m4_if([$2], , $PATH, [$2])"
3460
  for ac_dir in $ac_dummy; do
3461
    IFS="$lt_save_ifs"
3462
    test -z "$ac_dir" && ac_dir=.
3463
    if test -f $ac_dir/$1; then
3464
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3465
      if test -n "$file_magic_test_file"; then
3466
	case $deplibs_check_method in
3467
	"file_magic "*)
3468
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3469
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3470
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3471
	    $EGREP "$file_magic_regex" > /dev/null; then
3472
	    :
3473
	  else
3474
	    cat <<_LT_EOF 1>&2
3475
3476
*** Warning: the command libtool uses to detect shared libraries,
3477
*** $file_magic_cmd, produces output that libtool cannot recognize.
3478
*** The result is that libtool may fail to recognize shared libraries
3479
*** as such.  This will affect the creation of libtool libraries that
3480
*** depend on shared libraries, but programs linked with such libtool
3481
*** libraries will work regardless of this problem.  Nevertheless, you
3482
*** may want to report the problem to your system manager and/or to
3483
*** bug-libtool@gnu.org
3484
3485
_LT_EOF
3486
	  fi ;;
3487
	esac
3488
      fi
3489
      break
3490
    fi
3491
  done
3492
  IFS="$lt_save_ifs"
3493
  MAGIC_CMD="$lt_save_MAGIC_CMD"
3494
  ;;
3495
esac])
3496
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3497
if test -n "$MAGIC_CMD"; then
3498
  AC_MSG_RESULT($MAGIC_CMD)
3499
else
3500
  AC_MSG_RESULT(no)
3501
fi
3502
_LT_DECL([], [MAGIC_CMD], [0],
3503
	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3504
])# _LT_PATH_TOOL_PREFIX
3505
3506
# Old name:
3507
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3508
dnl aclocal-1.4 backwards compatibility:
3509
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3510
3511
3512
# _LT_PATH_MAGIC
3513
# --------------
3514
# find a file program which can recognize a shared library
3515
m4_defun([_LT_PATH_MAGIC],
3516
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3517
if test -z "$lt_cv_path_MAGIC_CMD"; then
3518
  if test -n "$ac_tool_prefix"; then
3519
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3520
  else
3521
    MAGIC_CMD=:
3522
  fi
3523
fi
3524
])# _LT_PATH_MAGIC
3525
3526
3527
# LT_PATH_LD
3528
# ----------
3529
# find the pathname to the GNU or non-GNU linker
3530
AC_DEFUN([LT_PATH_LD],
3531
[AC_REQUIRE([AC_PROG_CC])dnl
3532
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3533
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3534
m4_require([_LT_DECL_SED])dnl
3535
m4_require([_LT_DECL_EGREP])dnl
3536
3537
AC_ARG_WITH([gnu-ld],
3538
    [AS_HELP_STRING([--with-gnu-ld],
3539
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3540
    [test "$withval" = no || with_gnu_ld=yes],
3541
    [with_gnu_ld=no])dnl
3542
3543
ac_prog=ld
3544
if test "$GCC" = yes; then
3545
  # Check if gcc -print-prog-name=ld gives a path.
3546
  AC_MSG_CHECKING([for ld used by $CC])
3547
  case $host in
3548
  *-*-mingw*)
3549
    # gcc leaves a trailing carriage return which upsets mingw
3550
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3551
  *)
3552
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3553
  esac
3554
  case $ac_prog in
3555
    # Accept absolute paths.
3556
    [[\\/]]* | ?:[[\\/]]*)
3557
      re_direlt='/[[^/]][[^/]]*/\.\./'
3558
      # Canonicalize the pathname of ld
3559
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3560
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3561
	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3562
      done
3563
      test -z "$LD" && LD="$ac_prog"
3564
      ;;
3565
  "")
3566
    # If it fails, then pretend we aren't using GCC.
3567
    ac_prog=ld
3568
    ;;
3569
  *)
3570
    # If it is relative, then search for the first ld in PATH.
3571
    with_gnu_ld=unknown
3572
    ;;
3573
  esac
3574
elif test "$with_gnu_ld" = yes; then
3575
  AC_MSG_CHECKING([for GNU ld])
3576
else
3577
  AC_MSG_CHECKING([for non-GNU ld])
3578
fi
3579
AC_CACHE_VAL(lt_cv_path_LD,
3580
[if test -z "$LD"; then
3581
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3582
  for ac_dir in $PATH; do
3583
    IFS="$lt_save_ifs"
3584
    test -z "$ac_dir" && ac_dir=.
3585
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3586
      lt_cv_path_LD="$ac_dir/$ac_prog"
3587
      # Check to see if the program is GNU ld.  I'd rather use --version,
3588
      # but apparently some variants of GNU ld only accept -v.
3589
      # Break only if it was the GNU/non-GNU ld that we prefer.
3590
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3591
      *GNU* | *'with BFD'*)
3592
	test "$with_gnu_ld" != no && break
3593
	;;
3594
      *)
3595
	test "$with_gnu_ld" != yes && break
3596
	;;
3597
      esac
3598
    fi
3599
  done
3600
  IFS="$lt_save_ifs"
3601
else
3602
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3603
fi])
3604
LD="$lt_cv_path_LD"
3605
if test -n "$LD"; then
3606
  AC_MSG_RESULT($LD)
3607
else
3608
  AC_MSG_RESULT(no)
3609
fi
3610
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3611
_LT_PATH_LD_GNU
3612
AC_SUBST([LD])
3613
3614
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3615
])# LT_PATH_LD
3616
3617
# Old names:
3618
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3619
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3620
dnl aclocal-1.4 backwards compatibility:
3621
dnl AC_DEFUN([AM_PROG_LD], [])
3622
dnl AC_DEFUN([AC_PROG_LD], [])
3623
3624
3625
# _LT_PATH_LD_GNU
3626
#- --------------
3627
m4_defun([_LT_PATH_LD_GNU],
3628
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3629
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3630
case `$LD -v 2>&1 </dev/null` in
3631
*GNU* | *'with BFD'*)
3632
  lt_cv_prog_gnu_ld=yes
3633
  ;;
3634
*)
3635
  lt_cv_prog_gnu_ld=no
3636
  ;;
3637
esac])
3638
with_gnu_ld=$lt_cv_prog_gnu_ld
3639
])# _LT_PATH_LD_GNU
3640
3641
3642
# _LT_CMD_RELOAD
3643
# --------------
3644
# find reload flag for linker
3645
#   -- PORTME Some linkers may need a different reload flag.
3646
m4_defun([_LT_CMD_RELOAD],
3647
[AC_CACHE_CHECK([for $LD option to reload object files],
3648
  lt_cv_ld_reload_flag,
3649
  [lt_cv_ld_reload_flag='-r'])
3650
reload_flag=$lt_cv_ld_reload_flag
3651
case $reload_flag in
3652
"" | " "*) ;;
3653
*) reload_flag=" $reload_flag" ;;
3654
esac
3655
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3656
case $host_os in
3657
  darwin*)
3658
    if test "$GCC" = yes; then
3659
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3660
    else
3661
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3662
    fi
3663
    ;;
3664
esac
3665
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3666
_LT_DECL([], [reload_cmds], [2])dnl
3667
])# _LT_CMD_RELOAD
3668
3669
3670
# _LT_CHECK_MAGIC_METHOD
3671
# ----------------------
3672
# how to check for library dependencies
3673
#  -- PORTME fill in with the dynamic library characteristics
3674
m4_defun([_LT_CHECK_MAGIC_METHOD],
3675
[m4_require([_LT_DECL_EGREP])
3676
m4_require([_LT_DECL_OBJDUMP])
3677
AC_CACHE_CHECK([how to recognize dependent libraries],
3678
lt_cv_deplibs_check_method,
3679
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3680
lt_cv_file_magic_test_file=
3681
lt_cv_deplibs_check_method='unknown'
3682
# Need to set the preceding variable on all platforms that support
3683
# interlibrary dependencies.
3684
# 'none' -- dependencies not supported.
3685
# `unknown' -- same as none, but documents that we really don't know.
3686
# 'pass_all' -- all dependencies passed with no checks.
3687
# 'test_compile' -- check by making test program.
3688
# 'file_magic [[regex]]' -- check by looking for files in library path
3689
# which responds to the $file_magic_cmd with a given extended regex.
3690
# If you have `file' or equivalent on your system and you're not sure
3691
# whether `pass_all' will *always* work, you probably want this one.
3692
3693
case $host_os in
3694
aix[[4-9]]*)
3695
  lt_cv_deplibs_check_method=pass_all
3696
  ;;
3697
3698
beos*)
3699
  lt_cv_deplibs_check_method=pass_all
3700
  ;;
3701
3702
bsdi[[45]]*)
3703
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3704
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3705
  lt_cv_file_magic_test_file=/shlib/libc.so
3706
  ;;
3707
3708
cygwin*)
3709
  # func_win32_libid is a shell function defined in ltmain.sh
3710
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3711
  lt_cv_file_magic_cmd='func_win32_libid'
3712
  ;;
3713
3714
mingw* | pw32*)
3715
  # Base MSYS/MinGW do not provide the 'file' command needed by
3716
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3717
  # unless we find 'file', for example because we are cross-compiling.
3718
  if ( file / ) >/dev/null 2>&1; then
3719
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3720
    lt_cv_file_magic_cmd='func_win32_libid'
3721
  else
3722
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3723
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3724
  fi
3725
  ;;
3726
3727
cegcc)
3728
  # use the weaker test based on 'objdump'. See mingw*.
3729
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3730
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3731
  ;;
3732
3733
darwin* | rhapsody*)
3734
  lt_cv_deplibs_check_method=pass_all
3735
  ;;
3736
3737
freebsd* | dragonfly*)
3738
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3739
    case $host_cpu in
3740
    i*86 )
3741
      # Not sure whether the presence of OpenBSD here was a mistake.
3742
      # Let's accept both of them until this is cleared up.
3743
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3744
      lt_cv_file_magic_cmd=/usr/bin/file
3745
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3746
      ;;
3747
    esac
3748
  else
3749
    lt_cv_deplibs_check_method=pass_all
3750
  fi
3751
  ;;
3752
3753
gnu*)
3754
  lt_cv_deplibs_check_method=pass_all
3755
  ;;
3756
3757
hpux10.20* | hpux11*)
3758
  lt_cv_file_magic_cmd=/usr/bin/file
3759
  case $host_cpu in
3760
  ia64*)
3761
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3762
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3763
    ;;
3764
  hppa*64*)
3765
    [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]']
3766
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3767
    ;;
3768
  *)
3769
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3770
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3771
    ;;
3772
  esac
3773
  ;;
3774
3775
interix[[3-9]]*)
3776
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3777
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3778
  ;;
3779
3780
irix5* | irix6* | nonstopux*)
3781
  case $LD in
3782
  *-32|*"-32 ") libmagic=32-bit;;
3783
  *-n32|*"-n32 ") libmagic=N32;;
3784
  *-64|*"-64 ") libmagic=64-bit;;
3785
  *) libmagic=never-match;;
3786
  esac
3787
  lt_cv_deplibs_check_method=pass_all
3788
  ;;
3789
3790
# This must be Linux ELF.
3791
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3792
  lt_cv_deplibs_check_method=pass_all
3793
  ;;
3794
3795
netbsd* | netbsdelf*-gnu)
3796
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3797
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3798
  else
3799
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3800
  fi
3801
  ;;
3802
3803
newos6*)
3804
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3805
  lt_cv_file_magic_cmd=/usr/bin/file
3806
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3807
  ;;
3808
3809
*nto* | *qnx*)
3810
  lt_cv_deplibs_check_method=pass_all
3811
  ;;
3812
3813
openbsd*)
3814
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3815
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3816
  else
3817
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3818
  fi
3819
  ;;
3820
3821
osf3* | osf4* | osf5*)
3822
  lt_cv_deplibs_check_method=pass_all
3823
  ;;
3824
3825
rdos*)
3826
  lt_cv_deplibs_check_method=pass_all
3827
  ;;
3828
3829
solaris*)
3830
  lt_cv_deplibs_check_method=pass_all
3831
  ;;
3832
3833
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3834
  lt_cv_deplibs_check_method=pass_all
3835
  ;;
3836
3837
sysv4 | sysv4.3*)
3838
  case $host_vendor in
3839
  motorola)
3840
    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]]'
3841
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3842
    ;;
3843
  ncr)
3844
    lt_cv_deplibs_check_method=pass_all
3845
    ;;
3846
  sequent)
3847
    lt_cv_file_magic_cmd='/bin/file'
3848
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3849
    ;;
3850
  sni)
3851
    lt_cv_file_magic_cmd='/bin/file'
3852
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3853
    lt_cv_file_magic_test_file=/lib/libc.so
3854
    ;;
3855
  siemens)
3856
    lt_cv_deplibs_check_method=pass_all
3857
    ;;
3858
  pc)
3859
    lt_cv_deplibs_check_method=pass_all
3860
    ;;
3861
  esac
3862
  ;;
3863
3864
tpf*)
3865
  lt_cv_deplibs_check_method=pass_all
3866
  ;;
3867
esac
3868
])
3869
file_magic_cmd=$lt_cv_file_magic_cmd
3870
deplibs_check_method=$lt_cv_deplibs_check_method
3871
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3872
3873
_LT_DECL([], [deplibs_check_method], [1],
3874
    [Method to check whether dependent libraries are shared objects])
3875
_LT_DECL([], [file_magic_cmd], [1],
3876
    [Command to use when deplibs_check_method == "file_magic"])
3877
])# _LT_CHECK_MAGIC_METHOD
3878
3879
3880
# LT_PATH_NM
3881
# ----------
3882
# find the pathname to a BSD- or MS-compatible name lister
3883
AC_DEFUN([LT_PATH_NM],
3884
[AC_REQUIRE([AC_PROG_CC])dnl
3885
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3886
[if test -n "$NM"; then
3887
  # Let the user override the test.
3888
  lt_cv_path_NM="$NM"
3889
else
3890
  lt_nm_to_check="${ac_tool_prefix}nm"
3891
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3892
    lt_nm_to_check="$lt_nm_to_check nm"
3893
  fi
3894
  for lt_tmp_nm in $lt_nm_to_check; do
3895
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3896
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3897
      IFS="$lt_save_ifs"
3898
      test -z "$ac_dir" && ac_dir=.
3899
      tmp_nm="$ac_dir/$lt_tmp_nm"
3900
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3901
	# Check to see if the nm accepts a BSD-compat flag.
3902
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3903
	#   nm: unknown option "B" ignored
3904
	# Tru64's nm complains that /dev/null is an invalid object file
3905
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3906
	*/dev/null* | *'Invalid file or object type'*)
3907
	  lt_cv_path_NM="$tmp_nm -B"
3908
	  break
3909
	  ;;
3910
	*)
3911
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3912
	  */dev/null*)
3913
	    lt_cv_path_NM="$tmp_nm -p"
3914
	    break
3915
	    ;;
3916
	  *)
3917
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3918
	    continue # so that we can try to find one that supports BSD flags
3919
	    ;;
3920
	  esac
3921
	  ;;
3922
	esac
3923
      fi
3924
    done
3925
    IFS="$lt_save_ifs"
3926
  done
3927
  : ${lt_cv_path_NM=no}
3928
fi])
3929
if test "$lt_cv_path_NM" != "no"; then
3930
  NM="$lt_cv_path_NM"
3931
else
3932
  # Didn't find any BSD compatible name lister, look for dumpbin.
3933
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3934
  AC_SUBST([DUMPBIN])
3935
  if test "$DUMPBIN" != ":"; then
3936
    NM="$DUMPBIN"
3937
  fi
3938
fi
3939
test -z "$NM" && NM=nm
3940
AC_SUBST([NM])
3941
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3942
3943
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3944
  [lt_cv_nm_interface="BSD nm"
3945
  echo "int some_variable = 0;" > conftest.$ac_ext
3946
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3947
  (eval "$ac_compile" 2>conftest.err)
3948
  cat conftest.err >&AS_MESSAGE_LOG_FD
3949
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3950
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3951
  cat conftest.err >&AS_MESSAGE_LOG_FD
3952
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3953
  cat conftest.out >&AS_MESSAGE_LOG_FD
3954
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3955
    lt_cv_nm_interface="MS dumpbin"
3956
  fi
3957
  rm -f conftest*])
3958
])# LT_PATH_NM
3959
3960
# Old names:
3961
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3962
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3963
dnl aclocal-1.4 backwards compatibility:
3964
dnl AC_DEFUN([AM_PROG_NM], [])
3965
dnl AC_DEFUN([AC_PROG_NM], [])
3966
3967
3968
# LT_LIB_M
3969
# --------
3970
# check for math library
3971
AC_DEFUN([LT_LIB_M],
3972
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3973
LIBM=
3974
case $host in
3975
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3976
  # These system don't have libm, or don't need it
3977
  ;;
3978
*-ncr-sysv4.3*)
3979
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3980
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3981
  ;;
3982
*)
3983
  AC_CHECK_LIB(m, cos, LIBM="-lm")
3984
  ;;
3985
esac
3986
AC_SUBST([LIBM])
3987
])# LT_LIB_M
3988
3989
# Old name:
3990
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3991
dnl aclocal-1.4 backwards compatibility:
3992
dnl AC_DEFUN([AC_CHECK_LIBM], [])
3993
3994
3995
# _LT_COMPILER_NO_RTTI([TAGNAME])
3996
# -------------------------------
3997
m4_defun([_LT_COMPILER_NO_RTTI],
3998
[m4_require([_LT_TAG_COMPILER])dnl
3999
4000
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4001
4002
if test "$GCC" = yes; then
4003
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4004
4005
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4006
    lt_cv_prog_compiler_rtti_exceptions,
4007
    [-fno-rtti -fno-exceptions], [],
4008
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4009
fi
4010
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4011
	[Compiler flag to turn off builtin functions])
4012
])# _LT_COMPILER_NO_RTTI
4013
4014
4015
# _LT_CMD_GLOBAL_SYMBOLS
4016
# ----------------------
4017
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4018
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4019
AC_REQUIRE([AC_PROG_CC])dnl
4020
AC_REQUIRE([LT_PATH_NM])dnl
4021
AC_REQUIRE([LT_PATH_LD])dnl
4022
m4_require([_LT_DECL_SED])dnl
4023
m4_require([_LT_DECL_EGREP])dnl
4024
m4_require([_LT_TAG_COMPILER])dnl
4025
4026
# Check for command to grab the raw symbol name followed by C symbol from nm.
4027
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4028
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4029
[
4030
# These are sane defaults that work on at least a few old systems.
4031
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4032
4033
# Character class describing NM global symbol codes.
4034
symcode='[[BCDEGRST]]'
4035
4036
# Regexp to match symbols that can be accessed directly from C.
4037
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4038
4039
# Define system-specific variables.
4040
case $host_os in
4041
aix*)
4042
  symcode='[[BCDT]]'
4043
  ;;
4044
cygwin* | mingw* | pw32* | cegcc*)
4045
  symcode='[[ABCDGISTW]]'
4046
  ;;
4047
hpux*)
4048
  if test "$host_cpu" = ia64; then
4049
    symcode='[[ABCDEGRST]]'
4050
  fi
4051
  ;;
4052
irix* | nonstopux*)
4053
  symcode='[[BCDEGRST]]'
4054
  ;;
4055
osf*)
4056
  symcode='[[BCDEGQRST]]'
4057
  ;;
4058
solaris*)
4059
  symcode='[[BDRT]]'
4060
  ;;
4061
sco3.2v5*)
4062
  symcode='[[DT]]'
4063
  ;;
4064
sysv4.2uw2*)
4065
  symcode='[[DT]]'
4066
  ;;
4067
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4068
  symcode='[[ABDT]]'
4069
  ;;
4070
sysv4)
4071
  symcode='[[DFNSTU]]'
4072
  ;;
4073
esac
4074
4075
# If we're using GNU nm, then use its standard symbol codes.
4076
case `$NM -V 2>&1` in
4077
*GNU* | *'with BFD'*)
4078
  symcode='[[ABCDGIRSTW]]' ;;
4079
esac
4080
4081
# Transform an extracted symbol line into a proper C declaration.
4082
# Some systems (esp. on ia64) link data and code symbols differently,
4083
# so use this general approach.
4084
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4085
4086
# Transform an extracted symbol line into symbol name and symbol address
4087
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4088
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4089
4090
# Handle CRLF in mingw tool chain
4091
opt_cr=
4092
case $build_os in
4093
mingw*)
4094
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4095
  ;;
4096
esac
4097
4098
# Try without a prefix underscore, then with it.
4099
for ac_symprfx in "" "_"; do
4100
4101
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4102
  symxfrm="\\1 $ac_symprfx\\2 \\2"
4103
4104
  # Write the raw and C identifiers.
4105
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4106
    # Fake it for dumpbin and say T for any non-static function
4107
    # and D for any global variable.
4108
    # Also find C++ and __fastcall symbols from MSVC++,
4109
    # which start with @ or ?.
4110
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4111
"     {last_section=section; section=\$ 3};"\
4112
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4113
"     \$ 0!~/External *\|/{next};"\
4114
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4115
"     {if(hide[section]) next};"\
4116
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4117
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4118
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4119
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4120
"     ' prfx=^$ac_symprfx]"
4121
  else
4122
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4123
  fi
4124
4125
  # Check to see that the pipe works correctly.
4126
  pipe_works=no
4127
4128
  rm -f conftest*
4129
  cat > conftest.$ac_ext <<_LT_EOF
4130
#ifdef __cplusplus
4131
extern "C" {
4132
#endif
4133
char nm_test_var;
4134
void nm_test_func(void);
4135
void nm_test_func(void){}
4136
#ifdef __cplusplus
4137
}
4138
#endif
4139
int main(){nm_test_var='a';nm_test_func();return(0);}
4140
_LT_EOF
4141
4142
  if AC_TRY_EVAL(ac_compile); then
4143
    # Now try to grab the symbols.
4144
    nlist=conftest.nm
4145
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4146
      # Try sorting and uniquifying the output.
4147
      if sort "$nlist" | uniq > "$nlist"T; then
4148
	mv -f "$nlist"T "$nlist"
4149
      else
4150
	rm -f "$nlist"T
4151
      fi
4152
4153
      # Make sure that we snagged all the symbols we need.
4154
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4155
	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4156
	  cat <<_LT_EOF > conftest.$ac_ext
4157
#ifdef __cplusplus
4158
extern "C" {
4159
#endif
4160
4161
_LT_EOF
4162
	  # Now generate the symbol file.
4163
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4164
4165
	  cat <<_LT_EOF >> conftest.$ac_ext
4166
4167
/* The mapping between symbol names and symbols.  */
4168
const struct {
4169
  const char *name;
4170
  void       *address;
4171
}
4172
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4173
{
4174
  { "@PROGRAM@", (void *) 0 },
4175
_LT_EOF
4176
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4177
	  cat <<\_LT_EOF >> conftest.$ac_ext
4178
  {0, (void *) 0}
4179
};
4180
4181
/* This works around a problem in FreeBSD linker */
4182
#ifdef FREEBSD_WORKAROUND
4183
static const void *lt_preloaded_setup() {
4184
  return lt__PROGRAM__LTX_preloaded_symbols;
4185
}
4186
#endif
4187
4188
#ifdef __cplusplus
4189
}
4190
#endif
4191
_LT_EOF
4192
	  # Now try linking the two files.
4193
	  mv conftest.$ac_objext conftstm.$ac_objext
4194
	  lt_save_LIBS="$LIBS"
4195
	  lt_save_CFLAGS="$CFLAGS"
4196
	  LIBS="conftstm.$ac_objext"
4197
	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4198
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4199
	    pipe_works=yes
4200
	  fi
4201
	  LIBS="$lt_save_LIBS"
4202
	  CFLAGS="$lt_save_CFLAGS"
4203
	else
4204
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4205
	fi
4206
      else
4207
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4208
      fi
4209
    else
4210
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4211
    fi
4212
  else
4213
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4214
    cat conftest.$ac_ext >&5
4215
  fi
4216
  rm -rf conftest* conftst*
4217
4218
  # Do not use the global_symbol_pipe unless it works.
4219
  if test "$pipe_works" = yes; then
4220
    break
4221
  else
4222
    lt_cv_sys_global_symbol_pipe=
4223
  fi
4224
done
4225
])
4226
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4227
  lt_cv_sys_global_symbol_to_cdecl=
4228
fi
4229
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4230
  AC_MSG_RESULT(failed)
4231
else
4232
  AC_MSG_RESULT(ok)
4233
fi
4234
4235
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4236
    [Take the output of nm and produce a listing of raw symbols and C names])
4237
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4238
    [Transform the output of nm in a proper C declaration])
4239
_LT_DECL([global_symbol_to_c_name_address],
4240
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4241
    [Transform the output of nm in a C name address pair])
4242
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4243
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4244
    [Transform the output of nm in a C name address pair when lib prefix is needed])
4245
]) # _LT_CMD_GLOBAL_SYMBOLS
4246
4247
4248
# _LT_COMPILER_PIC([TAGNAME])
4249
# ---------------------------
4250
m4_defun([_LT_COMPILER_PIC],
4251
[m4_require([_LT_TAG_COMPILER])dnl
4252
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4253
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4254
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4255
4256
AC_MSG_CHECKING([for $compiler option to produce PIC])
4257
m4_if([$1], [CXX], [
4258
  # C++ specific cases for pic, static, wl, etc.
4259
  if test "$GXX" = yes; then
4260
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4261
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4262
4263
    case $host_os in
4264
    aix*)
4265
      # All AIX code is PIC.
4266
      if test "$host_cpu" = ia64; then
4267
	# AIX 5 now supports IA64 processor
4268
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4269
      fi
4270
      ;;
4271
4272
    amigaos*)
4273
      case $host_cpu in
4274
      powerpc)
4275
            # see comment about AmigaOS4 .so support
4276
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4277
        ;;
4278
      m68k)
4279
            # FIXME: we need at least 68020 code to build shared libraries, but
4280
            # adding the `-m68020' flag to GCC prevents building anything better,
4281
            # like `-m68040'.
4282
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4283
        ;;
4284
      esac
4285
      ;;
4286
4287
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4288
      # PIC is the default for these OSes.
4289
      ;;
4290
    mingw* | cygwin* | os2* | pw32* | cegcc*)
4291
      # This hack is so that the source file can tell whether it is being
4292
      # built for inclusion in a dll (and should export symbols for example).
4293
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4294
      # (--disable-auto-import) libraries
4295
      m4_if([$1], [GCJ], [],
4296
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4297
      ;;
4298
    darwin* | rhapsody*)
4299
      # PIC is the default on this platform
4300
      # Common symbols not allowed in MH_DYLIB files
4301
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4302
      ;;
4303
    *djgpp*)
4304
      # DJGPP does not support shared libraries at all
4305
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4306
      ;;
4307
    interix[[3-9]]*)
4308
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4309
      # Instead, we relocate shared libraries at runtime.
4310
      ;;
4311
    sysv4*MP*)
4312
      if test -d /usr/nec; then
4313
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4314
      fi
4315
      ;;
4316
    hpux*)
4317
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4318
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4319
      # sets the default TLS model and affects inlining.
4320
      case $host_cpu in
4321
      hppa*64*)
4322
	;;
4323
      *)
4324
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4325
	;;
4326
      esac
4327
      ;;
4328
    *qnx* | *nto*)
4329
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4330
      # it will coredump.
4331
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4332
      ;;
4333
    *)
4334
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4335
      ;;
4336
    esac
4337
  else
4338
    case $host_os in
4339
      aix[[4-9]]*)
4340
	# All AIX code is PIC.
4341
	if test "$host_cpu" = ia64; then
4342
	  # AIX 5 now supports IA64 processor
4343
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4344
	else
4345
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4346
	fi
4347
	;;
4348
      chorus*)
4349
	case $cc_basename in
4350
	cxch68*)
4351
	  # Green Hills C++ Compiler
4352
	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4353
	  ;;
4354
	esac
4355
	;;
4356
      dgux*)
4357
	case $cc_basename in
4358
	  ec++*)
4359
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4360
	    ;;
4361
	  ghcx*)
4362
	    # Green Hills C++ Compiler
4363
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4364
	    ;;
4365
	  *)
4366
	    ;;
4367
	esac
4368
	;;
4369
      freebsd* | dragonfly*)
4370
	# FreeBSD uses GNU C++
4371
	;;
4372
      hpux9* | hpux10* | hpux11*)
4373
	case $cc_basename in
4374
	  CC*)
4375
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4376
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4377
	    if test "$host_cpu" != ia64; then
4378
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4379
	    fi
4380
	    ;;
4381
	  aCC*)
4382
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4383
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4384
	    case $host_cpu in
4385
	    hppa*64*|ia64*)
4386
	      # +Z the default
4387
	      ;;
4388
	    *)
4389
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4390
	      ;;
4391
	    esac
4392
	    ;;
4393
	  *)
4394
	    ;;
4395
	esac
4396
	;;
4397
      interix*)
4398
	# This is c89, which is MS Visual C++ (no shared libs)
4399
	# Anyone wants to do a port?
4400
	;;
4401
      irix5* | irix6* | nonstopux*)
4402
	case $cc_basename in
4403
	  CC*)
4404
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4406
	    # CC pic flag -KPIC is the default.
4407
	    ;;
4408
	  *)
4409
	    ;;
4410
	esac
4411
	;;
4412
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4413
	case $cc_basename in
4414
	  KCC*)
4415
	    # KAI C++ Compiler
4416
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4417
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4418
	    ;;
4419
	  ecpc* )
4420
	    # old Intel C++ for x86_64 which still supported -KPIC.
4421
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4422
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4423
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4424
	    ;;
4425
	  icpc* )
4426
	    # Intel C++, used to be incompatible with GCC.
4427
	    # ICC 10 doesn't accept -KPIC any more.
4428
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4429
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4430
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4431
	    ;;
4432
	  pgCC* | pgcpp*)
4433
	    # Portland Group C++ compiler
4434
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4435
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4436
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4437
	    ;;
4438
	  cxx*)
4439
	    # Compaq C++
4440
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4441
	    # Linux and Compaq Tru64 Unix objects are PIC.
4442
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4443
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4444
	    ;;
4445
	  xlc* | xlC*)
4446
	    # IBM XL 8.0 on PPC
4447
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4448
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4449
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4450
	    ;;
4451
	  *)
4452
	    case `$CC -V 2>&1 | sed 5q` in
4453
	    *Sun\ C*)
4454
	      # Sun C++ 5.9
4455
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4456
	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4457
	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4458
	      ;;
4459
	    esac
4460
	    ;;
4461
	esac
4462
	;;
4463
      lynxos*)
4464
	;;
4465
      m88k*)
4466
	;;
4467
      mvs*)
4468
	case $cc_basename in
4469
	  cxx*)
4470
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4471
	    ;;
4472
	  *)
4473
	    ;;
4474
	esac
4475
	;;
4476
      netbsd* | netbsdelf*-gnu)
4477
	;;
4478
      *qnx* | *nto*)
4479
        # QNX uses GNU C++, but need to define -shared option too, otherwise
4480
        # it will coredump.
4481
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4482
        ;;
4483
      osf3* | osf4* | osf5*)
4484
	case $cc_basename in
4485
	  KCC*)
4486
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4487
	    ;;
4488
	  RCC*)
4489
	    # Rational C++ 2.4.1
4490
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4491
	    ;;
4492
	  cxx*)
4493
	    # Digital/Compaq C++
4494
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4495
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4496
	    # Linux and Compaq Tru64 Unix objects are PIC.
4497
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4498
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4499
	    ;;
4500
	  *)
4501
	    ;;
4502
	esac
4503
	;;
4504
      psos*)
4505
	;;
4506
      solaris*)
4507
	case $cc_basename in
4508
	  CC*)
4509
	    # Sun C++ 4.2, 5.x and Centerline C++
4510
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4511
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4512
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4513
	    ;;
4514
	  gcx*)
4515
	    # Green Hills C++ Compiler
4516
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4517
	    ;;
4518
	  *)
4519
	    ;;
4520
	esac
4521
	;;
4522
      sunos4*)
4523
	case $cc_basename in
4524
	  CC*)
4525
	    # Sun C++ 4.x
4526
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4527
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4528
	    ;;
4529
	  lcc*)
4530
	    # Lucid
4531
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4532
	    ;;
4533
	  *)
4534
	    ;;
4535
	esac
4536
	;;
4537
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4538
	case $cc_basename in
4539
	  CC*)
4540
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4541
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4542
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4543
	    ;;
4544
	esac
4545
	;;
4546
      tandem*)
4547
	case $cc_basename in
4548
	  NCC*)
4549
	    # NonStop-UX NCC 3.20
4550
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4551
	    ;;
4552
	  *)
4553
	    ;;
4554
	esac
4555
	;;
4556
      vxworks*)
4557
	;;
4558
      *)
4559
	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4560
	;;
4561
    esac
4562
  fi
4563
],
4564
[
4565
  if test "$GCC" = yes; then
4566
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4567
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4568
4569
    case $host_os in
4570
      aix*)
4571
      # All AIX code is PIC.
4572
      if test "$host_cpu" = ia64; then
4573
	# AIX 5 now supports IA64 processor
4574
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4575
      fi
4576
      ;;
4577
4578
    amigaos*)
4579
      case $host_cpu in
4580
      powerpc)
4581
            # see comment about AmigaOS4 .so support
4582
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4583
        ;;
4584
      m68k)
4585
            # FIXME: we need at least 68020 code to build shared libraries, but
4586
            # adding the `-m68020' flag to GCC prevents building anything better,
4587
            # like `-m68040'.
4588
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4589
        ;;
4590
      esac
4591
      ;;
4592
4593
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4594
      # PIC is the default for these OSes.
4595
      ;;
4596
4597
    mingw* | cygwin* | pw32* | os2* | cegcc*)
4598
      # This hack is so that the source file can tell whether it is being
4599
      # built for inclusion in a dll (and should export symbols for example).
4600
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4601
      # (--disable-auto-import) libraries
4602
      m4_if([$1], [GCJ], [],
4603
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4604
      ;;
4605
4606
    darwin* | rhapsody*)
4607
      # PIC is the default on this platform
4608
      # Common symbols not allowed in MH_DYLIB files
4609
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4610
      ;;
4611
4612
    hpux*)
4613
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4614
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4615
      # sets the default TLS model and affects inlining.
4616
      case $host_cpu in
4617
      hppa*64*)
4618
	# +Z the default
4619
	;;
4620
      *)
4621
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4622
	;;
4623
      esac
4624
      ;;
4625
4626
    interix[[3-9]]*)
4627
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4628
      # Instead, we relocate shared libraries at runtime.
4629
      ;;
4630
4631
    msdosdjgpp*)
4632
      # Just because we use GCC doesn't mean we suddenly get shared libraries
4633
      # on systems that don't support them.
4634
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4635
      enable_shared=no
4636
      ;;
4637
4638
    *nto* | *qnx*)
4639
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4640
      # it will coredump.
4641
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4642
      ;;
4643
4644
    sysv4*MP*)
4645
      if test -d /usr/nec; then
4646
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4647
      fi
4648
      ;;
4649
4650
    *)
4651
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4652
      ;;
4653
    esac
4654
  else
4655
    # PORTME Check for flag to pass linker flags through the system compiler.
4656
    case $host_os in
4657
    aix*)
4658
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4659
      if test "$host_cpu" = ia64; then
4660
	# AIX 5 now supports IA64 processor
4661
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4662
      else
4663
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4664
      fi
4665
      ;;
4666
4667
    mingw* | cygwin* | pw32* | os2* | cegcc*)
4668
      # This hack is so that the source file can tell whether it is being
4669
      # built for inclusion in a dll (and should export symbols for example).
4670
      m4_if([$1], [GCJ], [],
4671
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4672
      ;;
4673
4674
    hpux9* | hpux10* | hpux11*)
4675
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4676
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4677
      # not for PA HP-UX.
4678
      case $host_cpu in
4679
      hppa*64*|ia64*)
4680
	# +Z the default
4681
	;;
4682
      *)
4683
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4684
	;;
4685
      esac
4686
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4687
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4688
      ;;
4689
4690
    irix5* | irix6* | nonstopux*)
4691
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4692
      # PIC (with -KPIC) is the default.
4693
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4694
      ;;
4695
4696
    linux* | k*bsd*-gnu | kopensolaris*-gnu)
4697
      case $cc_basename in
4698
      # old Intel for x86_64 which still supported -KPIC.
4699
      ecc*)
4700
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4701
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4702
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4703
        ;;
4704
      # icc used to be incompatible with GCC.
4705
      # ICC 10 doesn't accept -KPIC any more.
4706
      icc* | ifort*)
4707
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4708
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4709
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4710
        ;;
4711
      # Lahey Fortran 8.1.
4712
      lf95*)
4713
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4714
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4715
	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4716
	;;
4717
      pgcc* | pgf77* | pgf90* | pgf95*)
4718
        # Portland Group compilers (*not* the Pentium gcc compiler,
4719
	# which looks to be a dead project)
4720
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4721
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4722
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4723
        ;;
4724
      ccc*)
4725
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4726
        # All Alpha code is PIC.
4727
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4728
        ;;
4729
      xl*)
4730
	# IBM XL C 8.0/Fortran 10.1 on PPC
4731
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4732
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4733
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4734
	;;
4735
      *)
4736
	case `$CC -V 2>&1 | sed 5q` in
4737
	*Sun\ C*)
4738
	  # Sun C 5.9
4739
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4740
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4741
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4742
	  ;;
4743
	*Sun\ F*)
4744
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4745
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4746
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4747
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4748
	  ;;
4749
	esac
4750
	;;
4751
      esac
4752
      ;;
4753
4754
    newsos6)
4755
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4756
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4757
      ;;
4758
4759
    *nto* | *qnx*)
4760
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4761
      # it will coredump.
4762
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4763
      ;;
4764
4765
    osf3* | osf4* | osf5*)
4766
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4767
      # All OSF/1 code is PIC.
4768
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4769
      ;;
4770
4771
    rdos*)
4772
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4773
      ;;
4774
4775
    solaris*)
4776
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4777
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4778
      case $cc_basename in
4779
      f77* | f90* | f95*)
4780
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4781
      *)
4782
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4783
      esac
4784
      ;;
4785
4786
    sunos4*)
4787
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4788
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4789
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4790
      ;;
4791
4792
    sysv4 | sysv4.2uw2* | sysv4.3*)
4793
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4794
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4795
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4796
      ;;
4797
4798
    sysv4*MP*)
4799
      if test -d /usr/nec ;then
4800
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4801
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4802
      fi
4803
      ;;
4804
4805
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4806
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4807
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4808
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4809
      ;;
4810
4811
    unicos*)
4812
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4813
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4814
      ;;
4815
4816
    uts4*)
4817
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4818
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4819
      ;;
4820
4821
    *)
4822
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4823
      ;;
4824
    esac
4825
  fi
4826
])
4827
case $host_os in
4828
  # For platforms which do not support PIC, -DPIC is meaningless:
4829
  *djgpp*)
4830
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4831
    ;;
4832
  *)
4833
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4834
    ;;
4835
esac
4836
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4837
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4838
	[How to pass a linker flag through the compiler])
4839
4840
#
4841
# Check to make sure the PIC flag actually works.
4842
#
4843
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4844
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4845
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4846
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4847
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4848
     "" | " "*) ;;
4849
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4850
     esac],
4851
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4852
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4853
fi
4854
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4855
	[Additional compiler flags for building library objects])
4856
4857
#
4858
# Check to make sure the static flag actually works.
4859
#
4860
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4861
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4862
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4863
  $lt_tmp_static_flag,
4864
  [],
4865
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4866
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4867
	[Compiler flag to prevent dynamic linking])
4868
])# _LT_COMPILER_PIC
4869
4870
4871
# _LT_LINKER_SHLIBS([TAGNAME])
4872
# ----------------------------
4873
# See if the linker supports building shared libraries.
4874
m4_defun([_LT_LINKER_SHLIBS],
4875
[AC_REQUIRE([LT_PATH_LD])dnl
4876
AC_REQUIRE([LT_PATH_NM])dnl
4877
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4878
m4_require([_LT_DECL_EGREP])dnl
4879
m4_require([_LT_DECL_SED])dnl
4880
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4881
m4_require([_LT_TAG_COMPILER])dnl
4882
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4883
m4_if([$1], [CXX], [
4884
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4885
  case $host_os in
4886
  aix[[4-9]]*)
4887
    # If we're using GNU nm, then we don't want the "-C" option.
4888
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4889
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4890
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4891
    else
4892
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4893
    fi
4894
    ;;
4895
  pw32*)
4896
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4897
  ;;
4898
  cygwin* | mingw* | cegcc*)
4899
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4900
  ;;
4901
  linux* | k*bsd*-gnu)
4902
    _LT_TAGVAR(link_all_deplibs, $1)=no
4903
  ;;
4904
  *)
4905
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4906
  ;;
4907
  esac
4908
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4909
], [
4910
  runpath_var=
4911
  _LT_TAGVAR(allow_undefined_flag, $1)=
4912
  _LT_TAGVAR(always_export_symbols, $1)=no
4913
  _LT_TAGVAR(archive_cmds, $1)=
4914
  _LT_TAGVAR(archive_expsym_cmds, $1)=
4915
  _LT_TAGVAR(compiler_needs_object, $1)=no
4916
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4917
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4918
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4919
  _LT_TAGVAR(hardcode_automatic, $1)=no
4920
  _LT_TAGVAR(hardcode_direct, $1)=no
4921
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4922
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4923
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4924
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4925
  _LT_TAGVAR(hardcode_minus_L, $1)=no
4926
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4927
  _LT_TAGVAR(inherit_rpath, $1)=no
4928
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4929
  _LT_TAGVAR(module_cmds, $1)=
4930
  _LT_TAGVAR(module_expsym_cmds, $1)=
4931
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4932
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4933
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4934
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4935
  # include_expsyms should be a list of space-separated symbols to be *always*
4936
  # included in the symbol list
4937
  _LT_TAGVAR(include_expsyms, $1)=
4938
  # exclude_expsyms can be an extended regexp of symbols to exclude
4939
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4940
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4941
  # as well as any symbol that contains `d'.
4942
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4943
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4944
  # platforms (ab)use it in PIC code, but their linkers get confused if
4945
  # the symbol is explicitly referenced.  Since portable code cannot
4946
  # rely on this symbol name, it's probably fine to never include it in
4947
  # preloaded symbol tables.
4948
  # Exclude shared library initialization/finalization symbols.
4949
dnl Note also adjust exclude_expsyms for C++ above.
4950
  extract_expsyms_cmds=
4951
4952
  case $host_os in
4953
  cygwin* | mingw* | pw32* | cegcc*)
4954
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4955
    # When not using gcc, we currently assume that we are using
4956
    # Microsoft Visual C++.
4957
    if test "$GCC" != yes; then
4958
      with_gnu_ld=no
4959
    fi
4960
    ;;
4961
  interix*)
4962
    # we just hope/assume this is gcc and not c89 (= MSVC++)
4963
    with_gnu_ld=yes
4964
    ;;
4965
  openbsd*)
4966
    with_gnu_ld=no
4967
    ;;
4968
  linux* | k*bsd*-gnu)
4969
    _LT_TAGVAR(link_all_deplibs, $1)=no
4970
    ;;
4971
  esac
4972
4973
  _LT_TAGVAR(ld_shlibs, $1)=yes
4974
  if test "$with_gnu_ld" = yes; then
4975
    # If archive_cmds runs LD, not CC, wlarc should be empty
4976
    wlarc='${wl}'
4977
4978
    # Set some defaults for GNU ld with shared library support. These
4979
    # are reset later if shared libraries are not supported. Putting them
4980
    # here allows them to be overridden if necessary.
4981
    runpath_var=LD_RUN_PATH
4982
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4983
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4984
    # ancient GNU ld didn't support --whole-archive et. al.
4985
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4986
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4987
    else
4988
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4989
    fi
4990
    supports_anon_versioning=no
4991
    case `$LD -v 2>&1` in
4992
      *GNU\ gold*) supports_anon_versioning=yes ;;
4993
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4994
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4995
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4996
      *\ 2.11.*) ;; # other 2.11 versions
4997
      *) supports_anon_versioning=yes ;;
4998
    esac
4999
5000
    # See if GNU ld supports shared libraries.
5001
    case $host_os in
5002
    aix[[3-9]]*)
5003
      # On AIX/PPC, the GNU linker is very broken
5004
      if test "$host_cpu" != ia64; then
5005
	_LT_TAGVAR(ld_shlibs, $1)=no
5006
	cat <<_LT_EOF 1>&2
5007
5008
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5009
*** to be unable to reliably create shared libraries on AIX.
5010
*** Therefore, libtool is disabling shared libraries support.  If you
5011
*** really care for shared libraries, you may want to modify your PATH
5012
*** so that a non-GNU linker is found, and then restart.
5013
5014
_LT_EOF
5015
      fi
5016
      ;;
5017
5018
    amigaos*)
5019
      case $host_cpu in
5020
      powerpc)
5021
            # see comment about AmigaOS4 .so support
5022
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5023
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5024
        ;;
5025
      m68k)
5026
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5027
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5028
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5029
        ;;
5030
      esac
5031
      ;;
5032
5033
    beos*)
5034
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5035
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5036
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5037
	# support --undefined.  This deserves some investigation.  FIXME
5038
	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5039
      else
5040
	_LT_TAGVAR(ld_shlibs, $1)=no
5041
      fi
5042
      ;;
5043
5044
    cygwin* | mingw* | pw32* | cegcc*)
5045
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5046
      # as there is no search path for DLLs.
5047
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5048
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5049
      _LT_TAGVAR(always_export_symbols, $1)=no
5050
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5051
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5052
5053
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5054
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5055
	# If the export-symbols file already is a .def file (1st line
5056
	# is EXPORTS), use it as is; otherwise, prepend...
5057
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5058
	  cp $export_symbols $output_objdir/$soname.def;
5059
	else
5060
	  echo EXPORTS > $output_objdir/$soname.def;
5061
	  cat $export_symbols >> $output_objdir/$soname.def;
5062
	fi~
5063
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5064
      else
5065
	_LT_TAGVAR(ld_shlibs, $1)=no
5066
      fi
5067
      ;;
5068
5069
    interix[[3-9]]*)
5070
      _LT_TAGVAR(hardcode_direct, $1)=no
5071
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5072
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5073
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5074
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5075
      # Instead, shared libraries are loaded at an image base (0x10000000 by
5076
      # default) and relocated if they conflict, which is a slow very memory
5077
      # consuming and fragmenting process.  To avoid this, we pick a random,
5078
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5079
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5080
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5081
      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5082
      ;;
5083
5084
    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5085
      tmp_diet=no
5086
      if test "$host_os" = linux-dietlibc; then
5087
	case $cc_basename in
5088
	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5089
	esac
5090
      fi
5091
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5092
	 && test "$tmp_diet" = no
5093
      then
5094
	tmp_addflag=
5095
	tmp_sharedflag='-shared'
5096
	case $cc_basename,$host_cpu in
5097
        pgcc*)				# Portland Group C compiler
5098
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5099
	  tmp_addflag=' $pic_flag'
5100
	  ;;
5101
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5102
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5103
	  tmp_addflag=' $pic_flag -Mnomain' ;;
5104
	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5105
	  tmp_addflag=' -i_dynamic' ;;
5106
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5107
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5108
	ifc* | ifort*)			# Intel Fortran compiler
5109
	  tmp_addflag=' -nofor_main' ;;
5110
	lf95*)				# Lahey Fortran 8.1
5111
	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5112
	  tmp_sharedflag='--shared' ;;
5113
	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
5114
	  tmp_sharedflag='-qmkshrobj'
5115
	  tmp_addflag= ;;
5116
	esac
5117
	case `$CC -V 2>&1 | sed 5q` in
5118
	*Sun\ C*)			# Sun C 5.9
5119
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5120
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5121
	  tmp_sharedflag='-G' ;;
5122
	*Sun\ F*)			# Sun Fortran 8.3
5123
	  tmp_sharedflag='-G' ;;
5124
	esac
5125
	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5126
5127
        if test "x$supports_anon_versioning" = xyes; then
5128
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5129
	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5130
	    echo "local: *; };" >> $output_objdir/$libname.ver~
5131
	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5132
        fi
5133
5134
	case $cc_basename in
5135
	xlf*)
5136
	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5137
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5138
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5139
	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5140
	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5141
	  if test "x$supports_anon_versioning" = xyes; then
5142
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5143
	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5144
	      echo "local: *; };" >> $output_objdir/$libname.ver~
5145
	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5146
	  fi
5147
	  ;;
5148
	esac
5149
      else
5150
        _LT_TAGVAR(ld_shlibs, $1)=no
5151
      fi
5152
      ;;
5153
5154
    netbsd* | netbsdelf*-gnu)
5155
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5156
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5157
	wlarc=
5158
      else
5159
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5160
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5161
      fi
5162
      ;;
5163
5164
    solaris*)
5165
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5166
	_LT_TAGVAR(ld_shlibs, $1)=no
5167
	cat <<_LT_EOF 1>&2
5168
5169
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5170
*** create shared libraries on Solaris systems.  Therefore, libtool
5171
*** is disabling shared libraries support.  We urge you to upgrade GNU
5172
*** binutils to release 2.9.1 or newer.  Another option is to modify
5173
*** your PATH or compiler configuration so that the native linker is
5174
*** used, and then restart.
5175
5176
_LT_EOF
5177
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5178
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5179
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5180
      else
5181
	_LT_TAGVAR(ld_shlibs, $1)=no
5182
      fi
5183
      ;;
5184
5185
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5186
      case `$LD -v 2>&1` in
5187
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5188
	_LT_TAGVAR(ld_shlibs, $1)=no
5189
	cat <<_LT_EOF 1>&2
5190
5191
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5192
*** reliably create shared libraries on SCO systems.  Therefore, libtool
5193
*** is disabling shared libraries support.  We urge you to upgrade GNU
5194
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5195
*** your PATH or compiler configuration so that the native linker is
5196
*** used, and then restart.
5197
5198
_LT_EOF
5199
	;;
5200
	*)
5201
	  # For security reasons, it is highly recommended that you always
5202
	  # use absolute paths for naming shared libraries, and exclude the
5203
	  # DT_RUNPATH tag from executables and libraries.  But doing so
5204
	  # requires that you compile everything twice, which is a pain.
5205
	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5206
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5207
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5208
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5209
	  else
5210
	    _LT_TAGVAR(ld_shlibs, $1)=no
5211
	  fi
5212
	;;
5213
      esac
5214
      ;;
5215
5216
    sunos4*)
5217
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5218
      wlarc=
5219
      _LT_TAGVAR(hardcode_direct, $1)=yes
5220
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5221
      ;;
5222
5223
    *)
5224
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5225
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5226
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5227
      else
5228
	_LT_TAGVAR(ld_shlibs, $1)=no
5229
      fi
5230
      ;;
5231
    esac
5232
5233
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5234
      runpath_var=
5235
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5236
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5237
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5238
    fi
5239
  else
5240
    # PORTME fill in a description of your system's linker (not GNU ld)
5241
    case $host_os in
5242
    aix3*)
5243
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5244
      _LT_TAGVAR(always_export_symbols, $1)=yes
5245
      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5246
      # Note: this linker hardcodes the directories in LIBPATH if there
5247
      # are no directories specified by -L.
5248
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5249
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5250
	# Neither direct hardcoding nor static linking is supported with a
5251
	# broken collect2.
5252
	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5253
      fi
5254
      ;;
5255
5256
    aix[[4-9]]*)
5257
      if test "$host_cpu" = ia64; then
5258
	# On IA64, the linker does run time linking by default, so we don't
5259
	# have to do anything special.
5260
	aix_use_runtimelinking=no
5261
	exp_sym_flag='-Bexport'
5262
	no_entry_flag=""
5263
      else
5264
	# If we're using GNU nm, then we don't want the "-C" option.
5265
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5266
	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5267
	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5268
	else
5269
	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5270
	fi
5271
	aix_use_runtimelinking=no
5272
5273
	# Test if we are trying to use run time linking or normal
5274
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5275
	# need to do runtime linking.
5276
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5277
	  for ld_flag in $LDFLAGS; do
5278
	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5279
	    aix_use_runtimelinking=yes
5280
	    break
5281
	  fi
5282
	  done
5283
	  ;;
5284
	esac
5285
5286
	exp_sym_flag='-bexport'
5287
	no_entry_flag='-bnoentry'
5288
      fi
5289
5290
      # When large executables or shared objects are built, AIX ld can
5291
      # have problems creating the table of contents.  If linking a library
5292
      # or program results in "error TOC overflow" add -mminimal-toc to
5293
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5294
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5295
5296
      _LT_TAGVAR(archive_cmds, $1)=''
5297
      _LT_TAGVAR(hardcode_direct, $1)=yes
5298
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5299
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5300
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5301
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5302
5303
      if test "$GCC" = yes; then
5304
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5305
	# We only want to do this on AIX 4.2 and lower, the check
5306
	# below for broken collect2 doesn't work under 4.3+
5307
	  collect2name=`${CC} -print-prog-name=collect2`
5308
	  if test -f "$collect2name" &&
5309
	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5310
	  then
5311
	  # We have reworked collect2
5312
	  :
5313
	  else
5314
	  # We have old collect2
5315
	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5316
	  # It fails to find uninstalled libraries when the uninstalled
5317
	  # path is not listed in the libpath.  Setting hardcode_minus_L
5318
	  # to unsupported forces relinking
5319
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5320
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5321
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5322
	  fi
5323
	  ;;
5324
	esac
5325
	shared_flag='-shared'
5326
	if test "$aix_use_runtimelinking" = yes; then
5327
	  shared_flag="$shared_flag "'${wl}-G'
5328
	fi
5329
	_LT_TAGVAR(link_all_deplibs, $1)=no
5330
      else
5331
	# not using gcc
5332
	if test "$host_cpu" = ia64; then
5333
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5334
	# chokes on -Wl,-G. The following line is correct:
5335
	  shared_flag='-G'
5336
	else
5337
	  if test "$aix_use_runtimelinking" = yes; then
5338
	    shared_flag='${wl}-G'
5339
	  else
5340
	    shared_flag='${wl}-bM:SRE'
5341
	  fi
5342
	fi
5343
      fi
5344
5345
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5346
      # It seems that -bexpall does not export symbols beginning with
5347
      # underscore (_), so it is better to generate a list of symbols to export.
5348
      _LT_TAGVAR(always_export_symbols, $1)=yes
5349
      if test "$aix_use_runtimelinking" = yes; then
5350
	# Warning - without using the other runtime loading flags (-brtl),
5351
	# -berok will link without error, but may produce a broken library.
5352
	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5353
        # Determine the default libpath from the value encoded in an
5354
        # empty executable.
5355
        _LT_SYS_MODULE_PATH_AIX
5356
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5357
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5358
      else
5359
	if test "$host_cpu" = ia64; then
5360
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5361
	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5362
	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5363
	else
5364
	 # Determine the default libpath from the value encoded in an
5365
	 # empty executable.
5366
	 _LT_SYS_MODULE_PATH_AIX
5367
	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5368
	  # Warning - without using the other run time loading flags,
5369
	  # -berok will link without error, but may produce a broken library.
5370
	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5371
	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5372
	  # Exported symbols can be pulled into shared objects from archives
5373
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5374
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5375
	  # This is similar to how AIX traditionally builds its shared libraries.
5376
	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5377
	fi
5378
      fi
5379
      ;;
5380
5381
    amigaos*)
5382
      case $host_cpu in
5383
      powerpc)
5384
            # see comment about AmigaOS4 .so support
5385
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5386
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5387
        ;;
5388
      m68k)
5389
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5390
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5391
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5392
        ;;
5393
      esac
5394
      ;;
5395
5396
    bsdi[[45]]*)
5397
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5398
      ;;
5399
5400
    cygwin* | mingw* | pw32* | cegcc*)
5401
      # When not using gcc, we currently assume that we are using
5402
      # Microsoft Visual C++.
5403
      # hardcode_libdir_flag_spec is actually meaningless, as there is
5404
      # no search path for DLLs.
5405
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5406
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5407
      # Tell ltmain to make .lib files, not .a files.
5408
      libext=lib
5409
      # Tell ltmain to make .dll files, not .so files.
5410
      shrext_cmds=".dll"
5411
      # FIXME: Setting linknames here is a bad hack.
5412
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5413
      # The linker will automatically build a .lib file if we build a DLL.
5414
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5415
      # FIXME: Should let the user specify the lib program.
5416
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5417
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5418
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5419
      ;;
5420
5421
    darwin* | rhapsody*)
5422
      _LT_DARWIN_LINKER_FEATURES($1)
5423
      ;;
5424
5425
    dgux*)
5426
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5427
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5428
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5429
      ;;
5430
5431
    freebsd1*)
5432
      _LT_TAGVAR(ld_shlibs, $1)=no
5433
      ;;
5434
5435
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5436
    # support.  Future versions do this automatically, but an explicit c++rt0.o
5437
    # does not break anything, and helps significantly (at the cost of a little
5438
    # extra space).
5439
    freebsd2.2*)
5440
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5441
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5442
      _LT_TAGVAR(hardcode_direct, $1)=yes
5443
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5444
      ;;
5445
5446
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5447
    freebsd2*)
5448
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5449
      _LT_TAGVAR(hardcode_direct, $1)=yes
5450
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5451
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5452
      ;;
5453
5454
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5455
    freebsd* | dragonfly*)
5456
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5457
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5458
      _LT_TAGVAR(hardcode_direct, $1)=yes
5459
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5460
      ;;
5461
5462
    hpux9*)
5463
      if test "$GCC" = yes; then
5464
	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5465
      else
5466
	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5467
      fi
5468
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5469
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5470
      _LT_TAGVAR(hardcode_direct, $1)=yes
5471
5472
      # hardcode_minus_L: Not really in the search PATH,
5473
      # but as the default location of the library.
5474
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5475
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5476
      ;;
5477
5478
    hpux10*)
5479
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5480
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5481
      else
5482
	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5483
      fi
5484
      if test "$with_gnu_ld" = no; then
5485
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5486
	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5487
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5488
	_LT_TAGVAR(hardcode_direct, $1)=yes
5489
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5490
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5491
	# hardcode_minus_L: Not really in the search PATH,
5492
	# but as the default location of the library.
5493
	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5494
      fi
5495
      ;;
5496
5497
    hpux11*)
5498
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5499
	case $host_cpu in
5500
	hppa*64*)
5501
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5502
	  ;;
5503
	ia64*)
5504
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5505
	  ;;
5506
	*)
5507
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5508
	  ;;
5509
	esac
5510
      else
5511
	case $host_cpu in
5512
	hppa*64*)
5513
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5514
	  ;;
5515
	ia64*)
5516
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5517
	  ;;
5518
	*)
5519
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5520
	  ;;
5521
	esac
5522
      fi
5523
      if test "$with_gnu_ld" = no; then
5524
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5525
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5526
5527
	case $host_cpu in
5528
	hppa*64*|ia64*)
5529
	  _LT_TAGVAR(hardcode_direct, $1)=no
5530
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5531
	  ;;
5532
	*)
5533
	  _LT_TAGVAR(hardcode_direct, $1)=yes
5534
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5535
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5536
5537
	  # hardcode_minus_L: Not really in the search PATH,
5538
	  # but as the default location of the library.
5539
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5540
	  ;;
5541
	esac
5542
      fi
5543
      ;;
5544
5545
    irix5* | irix6* | nonstopux*)
5546
      if test "$GCC" = yes; then
5547
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5548
	# Try to use the -exported_symbol ld option, if it does not
5549
	# work, assume that -exports_file does not work either and
5550
	# implicitly export all symbols.
5551
        save_LDFLAGS="$LDFLAGS"
5552
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5553
        AC_LINK_IFELSE(int foo(void) {},
5554
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5555
        )
5556
        LDFLAGS="$save_LDFLAGS"
5557
      else
5558
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5559
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5560
      fi
5561
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5562
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5563
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5564
      _LT_TAGVAR(inherit_rpath, $1)=yes
5565
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5566
      ;;
5567
5568
    netbsd* | netbsdelf*-gnu)
5569
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5570
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5571
      else
5572
	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5573
      fi
5574
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5575
      _LT_TAGVAR(hardcode_direct, $1)=yes
5576
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5577
      ;;
5578
5579
    newsos6)
5580
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5581
      _LT_TAGVAR(hardcode_direct, $1)=yes
5582
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5583
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5584
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5585
      ;;
5586
5587
    *nto* | *qnx*)
5588
      ;;
5589
5590
    openbsd*)
5591
      if test -f /usr/libexec/ld.so; then
5592
	_LT_TAGVAR(hardcode_direct, $1)=yes
5593
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5594
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5595
	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5596
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5597
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5598
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5599
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5600
	else
5601
	  case $host_os in
5602
	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5603
	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5604
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5605
	     ;;
5606
	   *)
5607
	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5608
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5609
	     ;;
5610
	  esac
5611
	fi
5612
      else
5613
	_LT_TAGVAR(ld_shlibs, $1)=no
5614
      fi
5615
      ;;
5616
5617
    os2*)
5618
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5619
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5620
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5621
      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5622
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5623
      ;;
5624
5625
    osf3*)
5626
      if test "$GCC" = yes; then
5627
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5628
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5629
      else
5630
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5631
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5632
      fi
5633
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5634
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5635
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5636
      ;;
5637
5638
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5639
      if test "$GCC" = yes; then
5640
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5641
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5642
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5643
      else
5644
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5645
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5646
	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5647
	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5648
5649
	# Both c and cxx compiler support -rpath directly
5650
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5651
      fi
5652
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5653
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5654
      ;;
5655
5656
    solaris*)
5657
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5658
      if test "$GCC" = yes; then
5659
	wlarc='${wl}'
5660
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5661
	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5662
	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5663
      else
5664
	case `$CC -V 2>&1` in
5665
	*"Compilers 5.0"*)
5666
	  wlarc=''
5667
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5668
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5669
	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5670
	  ;;
5671
	*)
5672
	  wlarc='${wl}'
5673
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5674
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5675
	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5676
	  ;;
5677
	esac
5678
      fi
5679
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5680
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5681
      case $host_os in
5682
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5683
      *)
5684
	# The compiler driver will combine and reorder linker options,
5685
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5686
	# but is careful enough not to reorder.
5687
	# Supported since Solaris 2.6 (maybe 2.5.1?)
5688
	if test "$GCC" = yes; then
5689
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5690
	else
5691
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5692
	fi
5693
	;;
5694
      esac
5695
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5696
      ;;
5697
5698
    sunos4*)
5699
      if test "x$host_vendor" = xsequent; then
5700
	# Use $CC to link under sequent, because it throws in some extra .o
5701
	# files that make .init and .fini sections work.
5702
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5703
      else
5704
	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5705
      fi
5706
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5707
      _LT_TAGVAR(hardcode_direct, $1)=yes
5708
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5709
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5710
      ;;
5711
5712
    sysv4)
5713
      case $host_vendor in
5714
	sni)
5715
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5716
	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5717
	;;
5718
	siemens)
5719
	  ## LD is ld it makes a PLAMLIB
5720
	  ## CC just makes a GrossModule.
5721
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5722
	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5723
	  _LT_TAGVAR(hardcode_direct, $1)=no
5724
        ;;
5725
	motorola)
5726
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5727
	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5728
	;;
5729
      esac
5730
      runpath_var='LD_RUN_PATH'
5731
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5732
      ;;
5733
5734
    sysv4.3*)
5735
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5736
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5737
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5738
      ;;
5739
5740
    sysv4*MP*)
5741
      if test -d /usr/nec; then
5742
	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5743
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5744
	runpath_var=LD_RUN_PATH
5745
	hardcode_runpath_var=yes
5746
	_LT_TAGVAR(ld_shlibs, $1)=yes
5747
      fi
5748
      ;;
5749
5750
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5751
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5752
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5753
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5754
      runpath_var='LD_RUN_PATH'
5755
5756
      if test "$GCC" = yes; then
5757
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5758
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5759
      else
5760
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5761
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5762
      fi
5763
      ;;
5764
5765
    sysv5* | sco3.2v5* | sco5v6*)
5766
      # Note: We can NOT use -z defs as we might desire, because we do not
5767
      # link with -lc, and that would cause any symbols used from libc to
5768
      # always be unresolved, which means just about no library would
5769
      # ever link correctly.  If we're not using GNU ld we use -z text
5770
      # though, which does catch some bad symbols but isn't as heavy-handed
5771
      # as -z defs.
5772
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5773
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5774
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5775
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5776
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5777
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5778
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5779
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5780
      runpath_var='LD_RUN_PATH'
5781
5782
      if test "$GCC" = yes; then
5783
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5784
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5785
      else
5786
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5787
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5788
      fi
5789
      ;;
5790
5791
    uts4*)
5792
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5793
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5794
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5795
      ;;
5796
5797
    *)
5798
      _LT_TAGVAR(ld_shlibs, $1)=no
5799
      ;;
5800
    esac
5801
5802
    if test x$host_vendor = xsni; then
5803
      case $host in
5804
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5805
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5806
	;;
5807
      esac
5808
    fi
5809
  fi
5810
])
5811
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5812
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5813
5814
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5815
5816
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5817
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5818
_LT_DECL([], [extract_expsyms_cmds], [2],
5819
    [The commands to extract the exported symbol list from a shared archive])
5820
5821
#
5822
# Do we need to explicitly link libc?
5823
#
5824
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5825
x|xyes)
5826
  # Assume -lc should be added
5827
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5828
5829
  if test "$enable_shared" = yes && test "$GCC" = yes; then
5830
    case $_LT_TAGVAR(archive_cmds, $1) in
5831
    *'~'*)
5832
      # FIXME: we may have to deal with multi-command sequences.
5833
      ;;
5834
    '$CC '*)
5835
      # Test whether the compiler implicitly links with -lc since on some
5836
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5837
      # to ld, don't add -lc before -lgcc.
5838
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5839
      $RM conftest*
5840
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5841
5842
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5843
        soname=conftest
5844
        lib=conftest
5845
        libobjs=conftest.$ac_objext
5846
        deplibs=
5847
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5848
	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5849
        compiler_flags=-v
5850
        linker_flags=-v
5851
        verstring=
5852
        output_objdir=.
5853
        libname=conftest
5854
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5855
        _LT_TAGVAR(allow_undefined_flag, $1)=
5856
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5857
        then
5858
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5859
        else
5860
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5861
        fi
5862
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5863
      else
5864
        cat conftest.err 1>&5
5865
      fi
5866
      $RM conftest*
5867
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5868
      ;;
5869
    esac
5870
  fi
5871
  ;;
5872
esac
5873
5874
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5875
    [Whether or not to add -lc for building shared libraries])
5876
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5877
    [enable_shared_with_static_runtimes], [0],
5878
    [Whether or not to disallow shared libs when runtime libs are static])
5879
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5880
    [Compiler flag to allow reflexive dlopens])
5881
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5882
    [Compiler flag to generate shared objects directly from archives])
5883
_LT_TAGDECL([], [compiler_needs_object], [1],
5884
    [Whether the compiler copes with passing no objects directly])
5885
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5886
    [Create an old-style archive from a shared archive])
5887
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5888
    [Create a temporary old-style archive to link instead of a shared archive])
5889
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5890
_LT_TAGDECL([], [archive_expsym_cmds], [2])
5891
_LT_TAGDECL([], [module_cmds], [2],
5892
    [Commands used to build a loadable module if different from building
5893
    a shared archive.])
5894
_LT_TAGDECL([], [module_expsym_cmds], [2])
5895
_LT_TAGDECL([], [with_gnu_ld], [1],
5896
    [Whether we are building with GNU ld or not])
5897
_LT_TAGDECL([], [allow_undefined_flag], [1],
5898
    [Flag that allows shared libraries with undefined symbols to be built])
5899
_LT_TAGDECL([], [no_undefined_flag], [1],
5900
    [Flag that enforces no undefined symbols])
5901
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5902
    [Flag to hardcode $libdir into a binary during linking.
5903
    This must work even if $libdir does not exist])
5904
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5905
    [[If ld is used when linking, flag to hardcode $libdir into a binary
5906
    during linking.  This must work even if $libdir does not exist]])
5907
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5908
    [Whether we need a single "-rpath" flag with a separated argument])
5909
_LT_TAGDECL([], [hardcode_direct], [0],
5910
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5911
    DIR into the resulting binary])
5912
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5913
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5914
    DIR into the resulting binary and the resulting library dependency is
5915
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5916
    library is relocated])
5917
_LT_TAGDECL([], [hardcode_minus_L], [0],
5918
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5919
    into the resulting binary])
5920
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5921
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5922
    into the resulting binary])
5923
_LT_TAGDECL([], [hardcode_automatic], [0],
5924
    [Set to "yes" if building a shared library automatically hardcodes DIR
5925
    into the library and all subsequent libraries and executables linked
5926
    against it])
5927
_LT_TAGDECL([], [inherit_rpath], [0],
5928
    [Set to yes if linker adds runtime paths of dependent libraries
5929
    to runtime path list])
5930
_LT_TAGDECL([], [link_all_deplibs], [0],
5931
    [Whether libtool must link a program against all its dependency libraries])
5932
_LT_TAGDECL([], [fix_srcfile_path], [1],
5933
    [Fix the shell variable $srcfile for the compiler])
5934
_LT_TAGDECL([], [always_export_symbols], [0],
5935
    [Set to "yes" if exported symbols are required])
5936
_LT_TAGDECL([], [export_symbols_cmds], [2],
5937
    [The commands to list exported symbols])
5938
_LT_TAGDECL([], [exclude_expsyms], [1],
5939
    [Symbols that should not be listed in the preloaded symbols])
5940
_LT_TAGDECL([], [include_expsyms], [1],
5941
    [Symbols that must always be exported])
5942
_LT_TAGDECL([], [prelink_cmds], [2],
5943
    [Commands necessary for linking programs (against libraries) with templates])
5944
_LT_TAGDECL([], [file_list_spec], [1],
5945
    [Specify filename containing input files])
5946
dnl FIXME: Not yet implemented
5947
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5948
dnl    [Compiler flag to generate thread safe objects])
5949
])# _LT_LINKER_SHLIBS
5950
5951
5952
# _LT_LANG_C_CONFIG([TAG])
5953
# ------------------------
5954
# Ensure that the configuration variables for a C compiler are suitably
5955
# defined.  These variables are subsequently used by _LT_CONFIG to write
5956
# the compiler configuration to `libtool'.
5957
m4_defun([_LT_LANG_C_CONFIG],
5958
[m4_require([_LT_DECL_EGREP])dnl
5959
lt_save_CC="$CC"
5960
AC_LANG_PUSH(C)
5961
5962
# Source file extension for C test sources.
5963
ac_ext=c
5964
5965
# Object file extension for compiled C test sources.
5966
objext=o
5967
_LT_TAGVAR(objext, $1)=$objext
5968
5969
# Code to be used in simple compile tests
5970
lt_simple_compile_test_code="int some_variable = 0;"
5971
5972
# Code to be used in simple link tests
5973
lt_simple_link_test_code='int main(){return(0);}'
5974
5975
_LT_TAG_COMPILER
5976
# Save the default compiler, since it gets overwritten when the other
5977
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5978
compiler_DEFAULT=$CC
5979
5980
# save warnings/boilerplate of simple test code
5981
_LT_COMPILER_BOILERPLATE
5982
_LT_LINKER_BOILERPLATE
5983
5984
if test -n "$compiler"; then
5985
  _LT_COMPILER_NO_RTTI($1)
5986
  _LT_COMPILER_PIC($1)
5987
  _LT_COMPILER_C_O($1)
5988
  _LT_COMPILER_FILE_LOCKS($1)
5989
  _LT_LINKER_SHLIBS($1)
5990
  _LT_SYS_DYNAMIC_LINKER($1)
5991
  _LT_LINKER_HARDCODE_LIBPATH($1)
5992
  LT_SYS_DLOPEN_SELF
5993
  _LT_CMD_STRIPLIB
5994
5995
  # Report which library types will actually be built
5996
  AC_MSG_CHECKING([if libtool supports shared libraries])
5997
  AC_MSG_RESULT([$can_build_shared])
5998
5999
  AC_MSG_CHECKING([whether to build shared libraries])
6000
  test "$can_build_shared" = "no" && enable_shared=no
6001
6002
  # On AIX, shared libraries and static libraries use the same namespace, and
6003
  # are all built from PIC.
6004
  case $host_os in
6005
  aix3*)
6006
    test "$enable_shared" = yes && enable_static=no
6007
    if test -n "$RANLIB"; then
6008
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6009
      postinstall_cmds='$RANLIB $lib'
6010
    fi
6011
    ;;
6012
6013
  aix[[4-9]]*)
6014
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6015
      test "$enable_shared" = yes && enable_static=no
6016
    fi
6017
    ;;
6018
  esac
6019
  AC_MSG_RESULT([$enable_shared])
6020
6021
  AC_MSG_CHECKING([whether to build static libraries])
6022
  # Make sure either enable_shared or enable_static is yes.
6023
  test "$enable_shared" = yes || enable_static=yes
6024
  AC_MSG_RESULT([$enable_static])
6025
6026
  _LT_CONFIG($1)
6027
fi
6028
AC_LANG_POP
6029
CC="$lt_save_CC"
6030
])# _LT_LANG_C_CONFIG
6031
6032
6033
# _LT_PROG_CXX
6034
# ------------
6035
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6036
# compiler, we have our own version here.
6037
m4_defun([_LT_PROG_CXX],
6038
[
6039
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6040
AC_PROG_CXX
6041
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6042
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6043
    (test "X$CXX" != "Xg++"))) ; then
6044
  AC_PROG_CXXCPP
6045
else
6046
  _lt_caught_CXX_error=yes
6047
fi
6048
popdef([AC_MSG_ERROR])
6049
])# _LT_PROG_CXX
6050
6051
dnl aclocal-1.4 backwards compatibility:
6052
dnl AC_DEFUN([_LT_PROG_CXX], [])
6053
6054
6055
# _LT_LANG_CXX_CONFIG([TAG])
6056
# --------------------------
6057
# Ensure that the configuration variables for a C++ compiler are suitably
6058
# defined.  These variables are subsequently used by _LT_CONFIG to write
6059
# the compiler configuration to `libtool'.
6060
m4_defun([_LT_LANG_CXX_CONFIG],
6061
[AC_REQUIRE([_LT_PROG_CXX])dnl
6062
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6063
m4_require([_LT_DECL_EGREP])dnl
6064
6065
AC_LANG_PUSH(C++)
6066
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6067
_LT_TAGVAR(allow_undefined_flag, $1)=
6068
_LT_TAGVAR(always_export_symbols, $1)=no
6069
_LT_TAGVAR(archive_expsym_cmds, $1)=
6070
_LT_TAGVAR(compiler_needs_object, $1)=no
6071
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6072
_LT_TAGVAR(hardcode_direct, $1)=no
6073
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6074
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6075
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6076
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6077
_LT_TAGVAR(hardcode_minus_L, $1)=no
6078
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6079
_LT_TAGVAR(hardcode_automatic, $1)=no
6080
_LT_TAGVAR(inherit_rpath, $1)=no
6081
_LT_TAGVAR(module_cmds, $1)=
6082
_LT_TAGVAR(module_expsym_cmds, $1)=
6083
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6084
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6085
_LT_TAGVAR(no_undefined_flag, $1)=
6086
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6087
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6088
6089
# Source file extension for C++ test sources.
6090
ac_ext=cpp
6091
6092
# Object file extension for compiled C++ test sources.
6093
objext=o
6094
_LT_TAGVAR(objext, $1)=$objext
6095
6096
# No sense in running all these tests if we already determined that
6097
# the CXX compiler isn't working.  Some variables (like enable_shared)
6098
# are currently assumed to apply to all compilers on this platform,
6099
# and will be corrupted by setting them based on a non-working compiler.
6100
if test "$_lt_caught_CXX_error" != yes; then
6101
  # Code to be used in simple compile tests
6102
  lt_simple_compile_test_code="int some_variable = 0;"
6103
6104
  # Code to be used in simple link tests
6105
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6106
6107
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6108
  _LT_TAG_COMPILER
6109
6110
  # save warnings/boilerplate of simple test code
6111
  _LT_COMPILER_BOILERPLATE
6112
  _LT_LINKER_BOILERPLATE
6113
6114
  # Allow CC to be a program name with arguments.
6115
  lt_save_CC=$CC
6116
  lt_save_LD=$LD
6117
  lt_save_GCC=$GCC
6118
  GCC=$GXX
6119
  lt_save_with_gnu_ld=$with_gnu_ld
6120
  lt_save_path_LD=$lt_cv_path_LD
6121
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6122
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6123
  else
6124
    $as_unset lt_cv_prog_gnu_ld
6125
  fi
6126
  if test -n "${lt_cv_path_LDCXX+set}"; then
6127
    lt_cv_path_LD=$lt_cv_path_LDCXX
6128
  else
6129
    $as_unset lt_cv_path_LD
6130
  fi
6131
  test -z "${LDCXX+set}" || LD=$LDCXX
6132
  CC=${CXX-"c++"}
6133
  compiler=$CC
6134
  _LT_TAGVAR(compiler, $1)=$CC
6135
  _LT_CC_BASENAME([$compiler])
6136
6137
  if test -n "$compiler"; then
6138
    # We don't want -fno-exception when compiling C++ code, so set the
6139
    # no_builtin_flag separately
6140
    if test "$GXX" = yes; then
6141
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6142
    else
6143
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6144
    fi
6145
6146
    if test "$GXX" = yes; then
6147
      # Set up default GNU C++ configuration
6148
6149
      LT_PATH_LD
6150
6151
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6152
      # archiving commands below assume that GNU ld is being used.
6153
      if test "$with_gnu_ld" = yes; then
6154
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6155
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6156
6157
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6158
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6159
6160
        # If archive_cmds runs LD, not CC, wlarc should be empty
6161
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6162
        #     investigate it a little bit more. (MM)
6163
        wlarc='${wl}'
6164
6165
        # ancient GNU ld didn't support --whole-archive et. al.
6166
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6167
	  $GREP 'no-whole-archive' > /dev/null; then
6168
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6169
        else
6170
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6171
        fi
6172
      else
6173
        with_gnu_ld=no
6174
        wlarc=
6175
6176
        # A generic and very simple default shared library creation
6177
        # command for GNU C++ for the case where it uses the native
6178
        # linker, instead of GNU ld.  If possible, this setting should
6179
        # overridden to take advantage of the native linker features on
6180
        # the platform it is being used on.
6181
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6182
      fi
6183
6184
      # Commands to make compiler produce verbose output that lists
6185
      # what "hidden" libraries, object files and flags are used when
6186
      # linking a shared library.
6187
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6188
6189
    else
6190
      GXX=no
6191
      with_gnu_ld=no
6192
      wlarc=
6193
    fi
6194
6195
    # PORTME: fill in a description of your system's C++ link characteristics
6196
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6197
    _LT_TAGVAR(ld_shlibs, $1)=yes
6198
    case $host_os in
6199
      aix3*)
6200
        # FIXME: insert proper C++ library support
6201
        _LT_TAGVAR(ld_shlibs, $1)=no
6202
        ;;
6203
      aix[[4-9]]*)
6204
        if test "$host_cpu" = ia64; then
6205
          # On IA64, the linker does run time linking by default, so we don't
6206
          # have to do anything special.
6207
          aix_use_runtimelinking=no
6208
          exp_sym_flag='-Bexport'
6209
          no_entry_flag=""
6210
        else
6211
          aix_use_runtimelinking=no
6212
6213
          # Test if we are trying to use run time linking or normal
6214
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6215
          # need to do runtime linking.
6216
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6217
	    for ld_flag in $LDFLAGS; do
6218
	      case $ld_flag in
6219
	      *-brtl*)
6220
	        aix_use_runtimelinking=yes
6221
	        break
6222
	        ;;
6223
	      esac
6224
	    done
6225
	    ;;
6226
          esac
6227
6228
          exp_sym_flag='-bexport'
6229
          no_entry_flag='-bnoentry'
6230
        fi
6231
6232
        # When large executables or shared objects are built, AIX ld can
6233
        # have problems creating the table of contents.  If linking a library
6234
        # or program results in "error TOC overflow" add -mminimal-toc to
6235
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6236
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6237
6238
        _LT_TAGVAR(archive_cmds, $1)=''
6239
        _LT_TAGVAR(hardcode_direct, $1)=yes
6240
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6241
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6242
        _LT_TAGVAR(link_all_deplibs, $1)=yes
6243
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6244
6245
        if test "$GXX" = yes; then
6246
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6247
          # We only want to do this on AIX 4.2 and lower, the check
6248
          # below for broken collect2 doesn't work under 4.3+
6249
	  collect2name=`${CC} -print-prog-name=collect2`
6250
	  if test -f "$collect2name" &&
6251
	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6252
	  then
6253
	    # We have reworked collect2
6254
	    :
6255
	  else
6256
	    # We have old collect2
6257
	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6258
	    # It fails to find uninstalled libraries when the uninstalled
6259
	    # path is not listed in the libpath.  Setting hardcode_minus_L
6260
	    # to unsupported forces relinking
6261
	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6262
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6263
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6264
	  fi
6265
          esac
6266
          shared_flag='-shared'
6267
	  if test "$aix_use_runtimelinking" = yes; then
6268
	    shared_flag="$shared_flag "'${wl}-G'
6269
	  fi
6270
        else
6271
          # not using gcc
6272
          if test "$host_cpu" = ia64; then
6273
	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6274
	  # chokes on -Wl,-G. The following line is correct:
6275
	  shared_flag='-G'
6276
          else
6277
	    if test "$aix_use_runtimelinking" = yes; then
6278
	      shared_flag='${wl}-G'
6279
	    else
6280
	      shared_flag='${wl}-bM:SRE'
6281
	    fi
6282
          fi
6283
        fi
6284
6285
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6286
        # It seems that -bexpall does not export symbols beginning with
6287
        # underscore (_), so it is better to generate a list of symbols to
6288
	# export.
6289
        _LT_TAGVAR(always_export_symbols, $1)=yes
6290
        if test "$aix_use_runtimelinking" = yes; then
6291
          # Warning - without using the other runtime loading flags (-brtl),
6292
          # -berok will link without error, but may produce a broken library.
6293
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6294
          # Determine the default libpath from the value encoded in an empty
6295
          # executable.
6296
          _LT_SYS_MODULE_PATH_AIX
6297
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6298
6299
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6300
        else
6301
          if test "$host_cpu" = ia64; then
6302
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6303
	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6304
	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6305
          else
6306
	    # Determine the default libpath from the value encoded in an
6307
	    # empty executable.
6308
	    _LT_SYS_MODULE_PATH_AIX
6309
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6310
	    # Warning - without using the other run time loading flags,
6311
	    # -berok will link without error, but may produce a broken library.
6312
	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6313
	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6314
	    # Exported symbols can be pulled into shared objects from archives
6315
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6316
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6317
	    # This is similar to how AIX traditionally builds its shared
6318
	    # libraries.
6319
	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6320
          fi
6321
        fi
6322
        ;;
6323
6324
      beos*)
6325
	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6326
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6327
	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6328
	  # support --undefined.  This deserves some investigation.  FIXME
6329
	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6330
	else
6331
	  _LT_TAGVAR(ld_shlibs, $1)=no
6332
	fi
6333
	;;
6334
6335
      chorus*)
6336
        case $cc_basename in
6337
          *)
6338
	  # FIXME: insert proper C++ library support
6339
	  _LT_TAGVAR(ld_shlibs, $1)=no
6340
	  ;;
6341
        esac
6342
        ;;
6343
6344
      cygwin* | mingw* | pw32* | cegcc*)
6345
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6346
        # as there is no search path for DLLs.
6347
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6348
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6349
        _LT_TAGVAR(always_export_symbols, $1)=no
6350
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6351
6352
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6353
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6354
          # If the export-symbols file already is a .def file (1st line
6355
          # is EXPORTS), use it as is; otherwise, prepend...
6356
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6357
	    cp $export_symbols $output_objdir/$soname.def;
6358
          else
6359
	    echo EXPORTS > $output_objdir/$soname.def;
6360
	    cat $export_symbols >> $output_objdir/$soname.def;
6361
          fi~
6362
          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6363
        else
6364
          _LT_TAGVAR(ld_shlibs, $1)=no
6365
        fi
6366
        ;;
6367
      darwin* | rhapsody*)
6368
        _LT_DARWIN_LINKER_FEATURES($1)
6369
	;;
6370
6371
      dgux*)
6372
        case $cc_basename in
6373
          ec++*)
6374
	    # FIXME: insert proper C++ library support
6375
	    _LT_TAGVAR(ld_shlibs, $1)=no
6376
	    ;;
6377
          ghcx*)
6378
	    # Green Hills C++ Compiler
6379
	    # FIXME: insert proper C++ library support
6380
	    _LT_TAGVAR(ld_shlibs, $1)=no
6381
	    ;;
6382
          *)
6383
	    # FIXME: insert proper C++ library support
6384
	    _LT_TAGVAR(ld_shlibs, $1)=no
6385
	    ;;
6386
        esac
6387
        ;;
6388
6389
      freebsd[[12]]*)
6390
        # C++ shared libraries reported to be fairly broken before
6391
	# switch to ELF
6392
        _LT_TAGVAR(ld_shlibs, $1)=no
6393
        ;;
6394
6395
      freebsd-elf*)
6396
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6397
        ;;
6398
6399
      freebsd* | dragonfly*)
6400
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6401
        # conventions
6402
        _LT_TAGVAR(ld_shlibs, $1)=yes
6403
        ;;
6404
6405
      gnu*)
6406
        ;;
6407
6408
      hpux9*)
6409
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6410
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6411
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6412
        _LT_TAGVAR(hardcode_direct, $1)=yes
6413
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6414
				             # but as the default
6415
				             # location of the library.
6416
6417
        case $cc_basename in
6418
          CC*)
6419
            # FIXME: insert proper C++ library support
6420
            _LT_TAGVAR(ld_shlibs, $1)=no
6421
            ;;
6422
          aCC*)
6423
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6424
            # Commands to make compiler produce verbose output that lists
6425
            # what "hidden" libraries, object files and flags are used when
6426
            # linking a shared library.
6427
            #
6428
            # There doesn't appear to be a way to prevent this compiler from
6429
            # explicitly linking system object files so we need to strip them
6430
            # from the output so that they don't get included in the library
6431
            # dependencies.
6432
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6433
            ;;
6434
          *)
6435
            if test "$GXX" = yes; then
6436
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6437
            else
6438
              # FIXME: insert proper C++ library support
6439
              _LT_TAGVAR(ld_shlibs, $1)=no
6440
            fi
6441
            ;;
6442
        esac
6443
        ;;
6444
6445
      hpux10*|hpux11*)
6446
        if test $with_gnu_ld = no; then
6447
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6448
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6449
6450
          case $host_cpu in
6451
            hppa*64*|ia64*)
6452
              ;;
6453
            *)
6454
	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6455
              ;;
6456
          esac
6457
        fi
6458
        case $host_cpu in
6459
          hppa*64*|ia64*)
6460
            _LT_TAGVAR(hardcode_direct, $1)=no
6461
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6462
            ;;
6463
          *)
6464
            _LT_TAGVAR(hardcode_direct, $1)=yes
6465
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6466
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6467
					         # but as the default
6468
					         # location of the library.
6469
            ;;
6470
        esac
6471
6472
        case $cc_basename in
6473
          CC*)
6474
	    # FIXME: insert proper C++ library support
6475
	    _LT_TAGVAR(ld_shlibs, $1)=no
6476
	    ;;
6477
          aCC*)
6478
	    case $host_cpu in
6479
	      hppa*64*)
6480
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6481
	        ;;
6482
	      ia64*)
6483
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6484
	        ;;
6485
	      *)
6486
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6487
	        ;;
6488
	    esac
6489
	    # Commands to make compiler produce verbose output that lists
6490
	    # what "hidden" libraries, object files and flags are used when
6491
	    # linking a shared library.
6492
	    #
6493
	    # There doesn't appear to be a way to prevent this compiler from
6494
	    # explicitly linking system object files so we need to strip them
6495
	    # from the output so that they don't get included in the library
6496
	    # dependencies.
6497
	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6498
	    ;;
6499
          *)
6500
	    if test "$GXX" = yes; then
6501
	      if test $with_gnu_ld = no; then
6502
	        case $host_cpu in
6503
	          hppa*64*)
6504
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6505
	            ;;
6506
	          ia64*)
6507
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6508
	            ;;
6509
	          *)
6510
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6511
	            ;;
6512
	        esac
6513
	      fi
6514
	    else
6515
	      # FIXME: insert proper C++ library support
6516
	      _LT_TAGVAR(ld_shlibs, $1)=no
6517
	    fi
6518
	    ;;
6519
        esac
6520
        ;;
6521
6522
      interix[[3-9]]*)
6523
	_LT_TAGVAR(hardcode_direct, $1)=no
6524
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6525
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6526
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6527
	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6528
	# Instead, shared libraries are loaded at an image base (0x10000000 by
6529
	# default) and relocated if they conflict, which is a slow very memory
6530
	# consuming and fragmenting process.  To avoid this, we pick a random,
6531
	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6532
	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6533
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6534
	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6535
	;;
6536
      irix5* | irix6*)
6537
        case $cc_basename in
6538
          CC*)
6539
	    # SGI C++
6540
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6541
6542
	    # Archives containing C++ object files must be created using
6543
	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6544
	    # necessary to make sure instantiated templates are included
6545
	    # in the archive.
6546
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6547
	    ;;
6548
          *)
6549
	    if test "$GXX" = yes; then
6550
	      if test "$with_gnu_ld" = no; then
6551
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6552
	      else
6553
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
6554
	      fi
6555
	    fi
6556
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6557
	    ;;
6558
        esac
6559
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6560
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6561
        _LT_TAGVAR(inherit_rpath, $1)=yes
6562
        ;;
6563
6564
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6565
        case $cc_basename in
6566
          KCC*)
6567
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6568
6569
	    # KCC will only create a shared library if the output file
6570
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6571
	    # to its proper name (with version) after linking.
6572
	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6573
	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6574
	    # Commands to make compiler produce verbose output that lists
6575
	    # what "hidden" libraries, object files and flags are used when
6576
	    # linking a shared library.
6577
	    #
6578
	    # There doesn't appear to be a way to prevent this compiler from
6579
	    # explicitly linking system object files so we need to strip them
6580
	    # from the output so that they don't get included in the library
6581
	    # dependencies.
6582
	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6583
6584
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6585
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6586
6587
	    # Archives containing C++ object files must be created using
6588
	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6589
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6590
	    ;;
6591
	  icpc* | ecpc* )
6592
	    # Intel C++
6593
	    with_gnu_ld=yes
6594
	    # version 8.0 and above of icpc choke on multiply defined symbols
6595
	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6596
	    # earlier do not add the objects themselves.
6597
	    case `$CC -V 2>&1` in
6598
	      *"Version 7."*)
6599
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6600
		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6601
		;;
6602
	      *)  # Version 8.0 or newer
6603
	        tmp_idyn=
6604
	        case $host_cpu in
6605
		  ia64*) tmp_idyn=' -i_dynamic';;
6606
		esac
6607
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6608
		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6609
		;;
6610
	    esac
6611
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6612
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6613
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6614
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6615
	    ;;
6616
          pgCC* | pgcpp*)
6617
            # Portland Group C++ compiler
6618
	    case `$CC -V` in
6619
	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6620
	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6621
		rm -rf $tpldir~
6622
		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6623
		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6624
	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6625
		rm -rf $tpldir~
6626
		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6627
		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6628
		$RANLIB $oldlib'
6629
	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6630
		rm -rf $tpldir~
6631
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6632
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6633
	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6634
		rm -rf $tpldir~
6635
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6636
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6637
	      ;;
6638
	    *) # Version 6 will use weak symbols
6639
	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6640
	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6641
	      ;;
6642
	    esac
6643
6644
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6645
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6646
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6647
            ;;
6648
	  cxx*)
6649
	    # Compaq C++
6650
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6651
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6652
6653
	    runpath_var=LD_RUN_PATH
6654
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6655
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6656
6657
	    # Commands to make compiler produce verbose output that lists
6658
	    # what "hidden" libraries, object files and flags are used when
6659
	    # linking a shared library.
6660
	    #
6661
	    # There doesn't appear to be a way to prevent this compiler from
6662
	    # explicitly linking system object files so we need to strip them
6663
	    # from the output so that they don't get included in the library
6664
	    # dependencies.
6665
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6666
	    ;;
6667
	  xl*)
6668
	    # IBM XL 8.0 on PPC, with GNU ld
6669
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6670
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6671
	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6672
	    if test "x$supports_anon_versioning" = xyes; then
6673
	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6674
		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6675
		echo "local: *; };" >> $output_objdir/$libname.ver~
6676
		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6677
	    fi
6678
	    ;;
6679
	  *)
6680
	    case `$CC -V 2>&1 | sed 5q` in
6681
	    *Sun\ C*)
6682
	      # Sun C++ 5.9
6683
	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6684
	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6685
	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6686
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6687
	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6688
	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6689
6690
	      # Not sure whether something based on
6691
	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6692
	      # would be better.
6693
	      output_verbose_link_cmd='echo'
6694
6695
	      # Archives containing C++ object files must be created using
6696
	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6697
	      # necessary to make sure instantiated templates are included
6698
	      # in the archive.
6699
	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6700
	      ;;
6701
	    esac
6702
	    ;;
6703
	esac
6704
	;;
6705
6706
      lynxos*)
6707
        # FIXME: insert proper C++ library support
6708
	_LT_TAGVAR(ld_shlibs, $1)=no
6709
	;;
6710
6711
      m88k*)
6712
        # FIXME: insert proper C++ library support
6713
        _LT_TAGVAR(ld_shlibs, $1)=no
6714
	;;
6715
6716
      mvs*)
6717
        case $cc_basename in
6718
          cxx*)
6719
	    # FIXME: insert proper C++ library support
6720
	    _LT_TAGVAR(ld_shlibs, $1)=no
6721
	    ;;
6722
	  *)
6723
	    # FIXME: insert proper C++ library support
6724
	    _LT_TAGVAR(ld_shlibs, $1)=no
6725
	    ;;
6726
	esac
6727
	;;
6728
6729
      netbsd*)
6730
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6731
	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6732
	  wlarc=
6733
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6734
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6735
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6736
	fi
6737
	# Workaround some broken pre-1.5 toolchains
6738
	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6739
	;;
6740
6741
      *nto* | *qnx*)
6742
        _LT_TAGVAR(ld_shlibs, $1)=yes
6743
	;;
6744
6745
      openbsd2*)
6746
        # C++ shared libraries are fairly broken
6747
	_LT_TAGVAR(ld_shlibs, $1)=no
6748
	;;
6749
6750
      openbsd*)
6751
	if test -f /usr/libexec/ld.so; then
6752
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6753
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6754
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6755
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6756
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6757
	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6758
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6759
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6760
	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6761
	  fi
6762
	  output_verbose_link_cmd=echo
6763
	else
6764
	  _LT_TAGVAR(ld_shlibs, $1)=no
6765
	fi
6766
	;;
6767
6768
      osf3* | osf4* | osf5*)
6769
        case $cc_basename in
6770
          KCC*)
6771
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6772
6773
	    # KCC will only create a shared library if the output file
6774
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6775
	    # to its proper name (with version) after linking.
6776
	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6777
6778
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6779
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6780
6781
	    # Archives containing C++ object files must be created using
6782
	    # the KAI C++ compiler.
6783
	    case $host in
6784
	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6785
	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6786
	    esac
6787
	    ;;
6788
          RCC*)
6789
	    # Rational C++ 2.4.1
6790
	    # FIXME: insert proper C++ library support
6791
	    _LT_TAGVAR(ld_shlibs, $1)=no
6792
	    ;;
6793
          cxx*)
6794
	    case $host in
6795
	      osf3*)
6796
	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6797
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6798
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6799
		;;
6800
	      *)
6801
	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6802
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6803
	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6804
	          echo "-hidden">> $lib.exp~
6805
	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6806
	          $RM $lib.exp'
6807
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6808
		;;
6809
	    esac
6810
6811
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6812
6813
	    # Commands to make compiler produce verbose output that lists
6814
	    # what "hidden" libraries, object files and flags are used when
6815
	    # linking a shared library.
6816
	    #
6817
	    # There doesn't appear to be a way to prevent this compiler from
6818
	    # explicitly linking system object files so we need to strip them
6819
	    # from the output so that they don't get included in the library
6820
	    # dependencies.
6821
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6822
	    ;;
6823
	  *)
6824
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6825
	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6826
	      case $host in
6827
	        osf3*)
6828
	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6829
		  ;;
6830
	        *)
6831
	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6832
		  ;;
6833
	      esac
6834
6835
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6836
	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6837
6838
	      # Commands to make compiler produce verbose output that lists
6839
	      # what "hidden" libraries, object files and flags are used when
6840
	      # linking a shared library.
6841
	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6842
6843
	    else
6844
	      # FIXME: insert proper C++ library support
6845
	      _LT_TAGVAR(ld_shlibs, $1)=no
6846
	    fi
6847
	    ;;
6848
        esac
6849
        ;;
6850
6851
      psos*)
6852
        # FIXME: insert proper C++ library support
6853
        _LT_TAGVAR(ld_shlibs, $1)=no
6854
        ;;
6855
6856
      sunos4*)
6857
        case $cc_basename in
6858
          CC*)
6859
	    # Sun C++ 4.x
6860
	    # FIXME: insert proper C++ library support
6861
	    _LT_TAGVAR(ld_shlibs, $1)=no
6862
	    ;;
6863
          lcc*)
6864
	    # Lucid
6865
	    # FIXME: insert proper C++ library support
6866
	    _LT_TAGVAR(ld_shlibs, $1)=no
6867
	    ;;
6868
          *)
6869
	    # FIXME: insert proper C++ library support
6870
	    _LT_TAGVAR(ld_shlibs, $1)=no
6871
	    ;;
6872
        esac
6873
        ;;
6874
6875
      solaris*)
6876
        case $cc_basename in
6877
          CC*)
6878
	    # Sun C++ 4.2, 5.x and Centerline C++
6879
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6880
	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6881
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6882
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6883
	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6884
6885
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6886
	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6887
	    case $host_os in
6888
	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6889
	      *)
6890
		# The compiler driver will combine and reorder linker options,
6891
		# but understands `-z linker_flag'.
6892
	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6893
		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6894
	        ;;
6895
	    esac
6896
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6897
6898
	    output_verbose_link_cmd='echo'
6899
6900
	    # Archives containing C++ object files must be created using
6901
	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6902
	    # necessary to make sure instantiated templates are included
6903
	    # in the archive.
6904
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6905
	    ;;
6906
          gcx*)
6907
	    # Green Hills C++ Compiler
6908
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6909
6910
	    # The C++ compiler must be used to create the archive.
6911
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6912
	    ;;
6913
          *)
6914
	    # GNU C++ compiler with Solaris linker
6915
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6916
	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6917
	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6918
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6919
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6920
		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6921
6922
	        # Commands to make compiler produce verbose output that lists
6923
	        # what "hidden" libraries, object files and flags are used when
6924
	        # linking a shared library.
6925
	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6926
	      else
6927
	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6928
	        # platform.
6929
	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6930
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6931
		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6932
6933
	        # Commands to make compiler produce verbose output that lists
6934
	        # what "hidden" libraries, object files and flags are used when
6935
	        # linking a shared library.
6936
	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6937
	      fi
6938
6939
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6940
	      case $host_os in
6941
		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6942
		*)
6943
		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6944
		  ;;
6945
	      esac
6946
	    fi
6947
	    ;;
6948
        esac
6949
        ;;
6950
6951
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6952
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6953
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6954
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6955
      runpath_var='LD_RUN_PATH'
6956
6957
      case $cc_basename in
6958
        CC*)
6959
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6960
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6961
	  ;;
6962
	*)
6963
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6964
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6965
	  ;;
6966
      esac
6967
      ;;
6968
6969
      sysv5* | sco3.2v5* | sco5v6*)
6970
	# Note: We can NOT use -z defs as we might desire, because we do not
6971
	# link with -lc, and that would cause any symbols used from libc to
6972
	# always be unresolved, which means just about no library would
6973
	# ever link correctly.  If we're not using GNU ld we use -z text
6974
	# though, which does catch some bad symbols but isn't as heavy-handed
6975
	# as -z defs.
6976
	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6977
	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6978
	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6979
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6980
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6981
	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6982
	_LT_TAGVAR(link_all_deplibs, $1)=yes
6983
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6984
	runpath_var='LD_RUN_PATH'
6985
6986
	case $cc_basename in
6987
          CC*)
6988
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6989
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6990
	    ;;
6991
	  *)
6992
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6993
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6994
	    ;;
6995
	esac
6996
      ;;
6997
6998
      tandem*)
6999
        case $cc_basename in
7000
          NCC*)
7001
	    # NonStop-UX NCC 3.20
7002
	    # FIXME: insert proper C++ library support
7003
	    _LT_TAGVAR(ld_shlibs, $1)=no
7004
	    ;;
7005
          *)
7006
	    # FIXME: insert proper C++ library support
7007
	    _LT_TAGVAR(ld_shlibs, $1)=no
7008
	    ;;
7009
        esac
7010
        ;;
7011
7012
      vxworks*)
7013
        # FIXME: insert proper C++ library support
7014
        _LT_TAGVAR(ld_shlibs, $1)=no
7015
        ;;
7016
7017
      *)
7018
        # FIXME: insert proper C++ library support
7019
        _LT_TAGVAR(ld_shlibs, $1)=no
7020
        ;;
7021
    esac
7022
7023
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7024
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7025
7026
    _LT_TAGVAR(GCC, $1)="$GXX"
7027
    _LT_TAGVAR(LD, $1)="$LD"
7028
7029
    ## CAVEAT EMPTOR:
7030
    ## There is no encapsulation within the following macros, do not change
7031
    ## the running order or otherwise move them around unless you know exactly
7032
    ## what you are doing...
7033
    _LT_SYS_HIDDEN_LIBDEPS($1)
7034
    _LT_COMPILER_PIC($1)
7035
    _LT_COMPILER_C_O($1)
7036
    _LT_COMPILER_FILE_LOCKS($1)
7037
    _LT_LINKER_SHLIBS($1)
7038
    _LT_SYS_DYNAMIC_LINKER($1)
7039
    _LT_LINKER_HARDCODE_LIBPATH($1)
7040
7041
    _LT_CONFIG($1)
7042
  fi # test -n "$compiler"
7043
7044
  CC=$lt_save_CC
7045
  LDCXX=$LD
7046
  LD=$lt_save_LD
7047
  GCC=$lt_save_GCC
7048
  with_gnu_ld=$lt_save_with_gnu_ld
7049
  lt_cv_path_LDCXX=$lt_cv_path_LD
7050
  lt_cv_path_LD=$lt_save_path_LD
7051
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7052
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7053
fi # test "$_lt_caught_CXX_error" != yes
7054
7055
AC_LANG_POP
7056
])# _LT_LANG_CXX_CONFIG
7057
7058
7059
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7060
# ---------------------------------
7061
# Figure out "hidden" library dependencies from verbose
7062
# compiler output when linking a shared library.
7063
# Parse the compiler output and extract the necessary
7064
# objects, libraries and library flags.
7065
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7066
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7067
# Dependencies to place before and after the object being linked:
7068
_LT_TAGVAR(predep_objects, $1)=
7069
_LT_TAGVAR(postdep_objects, $1)=
7070
_LT_TAGVAR(predeps, $1)=
7071
_LT_TAGVAR(postdeps, $1)=
7072
_LT_TAGVAR(compiler_lib_search_path, $1)=
7073
7074
dnl we can't use the lt_simple_compile_test_code here,
7075
dnl because it contains code intended for an executable,
7076
dnl not a library.  It's possible we should let each
7077
dnl tag define a new lt_????_link_test_code variable,
7078
dnl but it's only used here...
7079
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7080
int a;
7081
void foo (void) { a = 0; }
7082
_LT_EOF
7083
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7084
class Foo
7085
{
7086
public:
7087
  Foo (void) { a = 0; }
7088
private:
7089
  int a;
7090
};
7091
_LT_EOF
7092
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7093
      subroutine foo
7094
      implicit none
7095
      integer*4 a
7096
      a=0
7097
      return
7098
      end
7099
_LT_EOF
7100
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7101
      subroutine foo
7102
      implicit none
7103
      integer a
7104
      a=0
7105
      return
7106
      end
7107
_LT_EOF
7108
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7109
public class foo {
7110
  private int a;
7111
  public void bar (void) {
7112
    a = 0;
7113
  }
7114
};
7115
_LT_EOF
7116
])
7117
dnl Parse the compiler output and extract the necessary
7118
dnl objects, libraries and library flags.
7119
if AC_TRY_EVAL(ac_compile); then
7120
  # Parse the compiler output and extract the necessary
7121
  # objects, libraries and library flags.
7122
7123
  # Sentinel used to keep track of whether or not we are before
7124
  # the conftest object file.
7125
  pre_test_object_deps_done=no
7126
7127
  for p in `eval "$output_verbose_link_cmd"`; do
7128
    case $p in
7129
7130
    -L* | -R* | -l*)
7131
       # Some compilers place space between "-{L,R}" and the path.
7132
       # Remove the space.
7133
       if test $p = "-L" ||
7134
          test $p = "-R"; then
7135
	 prev=$p
7136
	 continue
7137
       else
7138
	 prev=
7139
       fi
7140
7141
       if test "$pre_test_object_deps_done" = no; then
7142
	 case $p in
7143
	 -L* | -R*)
7144
	   # Internal compiler library paths should come after those
7145
	   # provided the user.  The postdeps already come after the
7146
	   # user supplied libs so there is no need to process them.
7147
	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7148
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7149
	   else
7150
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7151
	   fi
7152
	   ;;
7153
	 # The "-l" case would never come before the object being
7154
	 # linked, so don't bother handling this case.
7155
	 esac
7156
       else
7157
	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7158
	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7159
	 else
7160
	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7161
	 fi
7162
       fi
7163
       ;;
7164
7165
    *.$objext)
7166
       # This assumes that the test object file only shows up
7167
       # once in the compiler output.
7168
       if test "$p" = "conftest.$objext"; then
7169
	 pre_test_object_deps_done=yes
7170
	 continue
7171
       fi
7172
7173
       if test "$pre_test_object_deps_done" = no; then
7174
	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7175
	   _LT_TAGVAR(predep_objects, $1)="$p"
7176
	 else
7177
	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7178
	 fi
7179
       else
7180
	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7181
	   _LT_TAGVAR(postdep_objects, $1)="$p"
7182
	 else
7183
	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7184
	 fi
7185
       fi
7186
       ;;
7187
7188
    *) ;; # Ignore the rest.
7189
7190
    esac
7191
  done
7192
7193
  # Clean up.
7194
  rm -f a.out a.exe
7195
else
7196
  echo "libtool.m4: error: problem compiling $1 test program"
7197
fi
7198
7199
$RM -f confest.$objext
7200
7201
# PORTME: override above test on systems where it is broken
7202
m4_if([$1], [CXX],
7203
[case $host_os in
7204
interix[[3-9]]*)
7205
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7206
  # hack all around it, let's just trust "g++" to DTRT.
7207
  _LT_TAGVAR(predep_objects,$1)=
7208
  _LT_TAGVAR(postdep_objects,$1)=
7209
  _LT_TAGVAR(postdeps,$1)=
7210
  ;;
7211
7212
linux*)
7213
  case `$CC -V 2>&1 | sed 5q` in
7214
  *Sun\ C*)
7215
    # Sun C++ 5.9
7216
7217
    # The more standards-conforming stlport4 library is
7218
    # incompatible with the Cstd library. Avoid specifying
7219
    # it if it's in CXXFLAGS. Ignore libCrun as
7220
    # -library=stlport4 depends on it.
7221
    case " $CXX $CXXFLAGS " in
7222
    *" -library=stlport4 "*)
7223
      solaris_use_stlport4=yes
7224
      ;;
7225
    esac
7226
7227
    if test "$solaris_use_stlport4" != yes; then
7228
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7229
    fi
7230
    ;;
7231
  esac
7232
  ;;
7233
7234
solaris*)
7235
  case $cc_basename in
7236
  CC*)
7237
    # The more standards-conforming stlport4 library is
7238
    # incompatible with the Cstd library. Avoid specifying
7239
    # it if it's in CXXFLAGS. Ignore libCrun as
7240
    # -library=stlport4 depends on it.
7241
    case " $CXX $CXXFLAGS " in
7242
    *" -library=stlport4 "*)
7243
      solaris_use_stlport4=yes
7244
      ;;
7245
    esac
7246
7247
    # Adding this requires a known-good setup of shared libraries for
7248
    # Sun compiler versions before 5.6, else PIC objects from an old
7249
    # archive will be linked into the output, leading to subtle bugs.
7250
    if test "$solaris_use_stlport4" != yes; then
7251
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7252
    fi
7253
    ;;
7254
  esac
7255
  ;;
7256
esac
7257
])
7258
7259
case " $_LT_TAGVAR(postdeps, $1) " in
7260
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7261
esac
7262
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7263
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7264
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7265
fi
7266
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7267
    [The directories searched by this compiler when creating a shared library])
7268
_LT_TAGDECL([], [predep_objects], [1],
7269
    [Dependencies to place before and after the objects being linked to
7270
    create a shared library])
7271
_LT_TAGDECL([], [postdep_objects], [1])
7272
_LT_TAGDECL([], [predeps], [1])
7273
_LT_TAGDECL([], [postdeps], [1])
7274
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7275
    [The library search path used internally by the compiler when linking
7276
    a shared library])
7277
])# _LT_SYS_HIDDEN_LIBDEPS
7278
7279
7280
# _LT_PROG_F77
7281
# ------------
7282
# Since AC_PROG_F77 is broken, in that it returns the empty string
7283
# if there is no fortran compiler, we have our own version here.
7284
m4_defun([_LT_PROG_F77],
7285
[
7286
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7287
AC_PROG_F77
7288
if test -z "$F77" || test "X$F77" = "Xno"; then
7289
  _lt_disable_F77=yes
7290
fi
7291
popdef([AC_MSG_ERROR])
7292
])# _LT_PROG_F77
7293
7294
dnl aclocal-1.4 backwards compatibility:
7295
dnl AC_DEFUN([_LT_PROG_F77], [])
7296
7297
7298
# _LT_LANG_F77_CONFIG([TAG])
7299
# --------------------------
7300
# Ensure that the configuration variables for a Fortran 77 compiler are
7301
# suitably defined.  These variables are subsequently used by _LT_CONFIG
7302
# to write the compiler configuration to `libtool'.
7303
m4_defun([_LT_LANG_F77_CONFIG],
7304
[AC_REQUIRE([_LT_PROG_F77])dnl
7305
AC_LANG_PUSH(Fortran 77)
7306
7307
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7308
_LT_TAGVAR(allow_undefined_flag, $1)=
7309
_LT_TAGVAR(always_export_symbols, $1)=no
7310
_LT_TAGVAR(archive_expsym_cmds, $1)=
7311
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7312
_LT_TAGVAR(hardcode_direct, $1)=no
7313
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7314
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7315
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7316
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7317
_LT_TAGVAR(hardcode_minus_L, $1)=no
7318
_LT_TAGVAR(hardcode_automatic, $1)=no
7319
_LT_TAGVAR(inherit_rpath, $1)=no
7320
_LT_TAGVAR(module_cmds, $1)=
7321
_LT_TAGVAR(module_expsym_cmds, $1)=
7322
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7323
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7324
_LT_TAGVAR(no_undefined_flag, $1)=
7325
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7326
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7327
7328
# Source file extension for f77 test sources.
7329
ac_ext=f
7330
7331
# Object file extension for compiled f77 test sources.
7332
objext=o
7333
_LT_TAGVAR(objext, $1)=$objext
7334
7335
# No sense in running all these tests if we already determined that
7336
# the F77 compiler isn't working.  Some variables (like enable_shared)
7337
# are currently assumed to apply to all compilers on this platform,
7338
# and will be corrupted by setting them based on a non-working compiler.
7339
if test "$_lt_disable_F77" != yes; then
7340
  # Code to be used in simple compile tests
7341
  lt_simple_compile_test_code="\
7342
      subroutine t
7343
      return
7344
      end
7345
"
7346
7347
  # Code to be used in simple link tests
7348
  lt_simple_link_test_code="\
7349
      program t
7350
      end
7351
"
7352
7353
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7354
  _LT_TAG_COMPILER
7355
7356
  # save warnings/boilerplate of simple test code
7357
  _LT_COMPILER_BOILERPLATE
7358
  _LT_LINKER_BOILERPLATE
7359
7360
  # Allow CC to be a program name with arguments.
7361
  lt_save_CC="$CC"
7362
  lt_save_GCC=$GCC
7363
  CC=${F77-"f77"}
7364
  compiler=$CC
7365
  _LT_TAGVAR(compiler, $1)=$CC
7366
  _LT_CC_BASENAME([$compiler])
7367
  GCC=$G77
7368
  if test -n "$compiler"; then
7369
    AC_MSG_CHECKING([if libtool supports shared libraries])
7370
    AC_MSG_RESULT([$can_build_shared])
7371
7372
    AC_MSG_CHECKING([whether to build shared libraries])
7373
    test "$can_build_shared" = "no" && enable_shared=no
7374
7375
    # On AIX, shared libraries and static libraries use the same namespace, and
7376
    # are all built from PIC.
7377
    case $host_os in
7378
      aix3*)
7379
        test "$enable_shared" = yes && enable_static=no
7380
        if test -n "$RANLIB"; then
7381
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7382
          postinstall_cmds='$RANLIB $lib'
7383
        fi
7384
        ;;
7385
      aix[[4-9]]*)
7386
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7387
	  test "$enable_shared" = yes && enable_static=no
7388
	fi
7389
        ;;
7390
    esac
7391
    AC_MSG_RESULT([$enable_shared])
7392
7393
    AC_MSG_CHECKING([whether to build static libraries])
7394
    # Make sure either enable_shared or enable_static is yes.
7395
    test "$enable_shared" = yes || enable_static=yes
7396
    AC_MSG_RESULT([$enable_static])
7397
7398
    _LT_TAGVAR(GCC, $1)="$G77"
7399
    _LT_TAGVAR(LD, $1)="$LD"
7400
7401
    ## CAVEAT EMPTOR:
7402
    ## There is no encapsulation within the following macros, do not change
7403
    ## the running order or otherwise move them around unless you know exactly
7404
    ## what you are doing...
7405
    _LT_COMPILER_PIC($1)
7406
    _LT_COMPILER_C_O($1)
7407
    _LT_COMPILER_FILE_LOCKS($1)
7408
    _LT_LINKER_SHLIBS($1)
7409
    _LT_SYS_DYNAMIC_LINKER($1)
7410
    _LT_LINKER_HARDCODE_LIBPATH($1)
7411
7412
    _LT_CONFIG($1)
7413
  fi # test -n "$compiler"
7414
7415
  GCC=$lt_save_GCC
7416
  CC="$lt_save_CC"
7417
fi # test "$_lt_disable_F77" != yes
7418
7419
AC_LANG_POP
7420
])# _LT_LANG_F77_CONFIG
7421
7422
7423
# _LT_PROG_FC
7424
# -----------
7425
# Since AC_PROG_FC is broken, in that it returns the empty string
7426
# if there is no fortran compiler, we have our own version here.
7427
m4_defun([_LT_PROG_FC],
7428
[
7429
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7430
AC_PROG_FC
7431
if test -z "$FC" || test "X$FC" = "Xno"; then
7432
  _lt_disable_FC=yes
7433
fi
7434
popdef([AC_MSG_ERROR])
7435
])# _LT_PROG_FC
7436
7437
dnl aclocal-1.4 backwards compatibility:
7438
dnl AC_DEFUN([_LT_PROG_FC], [])
7439
7440
7441
# _LT_LANG_FC_CONFIG([TAG])
7442
# -------------------------
7443
# Ensure that the configuration variables for a Fortran compiler are
7444
# suitably defined.  These variables are subsequently used by _LT_CONFIG
7445
# to write the compiler configuration to `libtool'.
7446
m4_defun([_LT_LANG_FC_CONFIG],
7447
[AC_REQUIRE([_LT_PROG_FC])dnl
7448
AC_LANG_PUSH(Fortran)
7449
7450
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7451
_LT_TAGVAR(allow_undefined_flag, $1)=
7452
_LT_TAGVAR(always_export_symbols, $1)=no
7453
_LT_TAGVAR(archive_expsym_cmds, $1)=
7454
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7455
_LT_TAGVAR(hardcode_direct, $1)=no
7456
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7457
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7458
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7459
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7460
_LT_TAGVAR(hardcode_minus_L, $1)=no
7461
_LT_TAGVAR(hardcode_automatic, $1)=no
7462
_LT_TAGVAR(inherit_rpath, $1)=no
7463
_LT_TAGVAR(module_cmds, $1)=
7464
_LT_TAGVAR(module_expsym_cmds, $1)=
7465
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7466
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7467
_LT_TAGVAR(no_undefined_flag, $1)=
7468
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7469
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7470
7471
# Source file extension for fc test sources.
7472
ac_ext=${ac_fc_srcext-f}
7473
7474
# Object file extension for compiled fc test sources.
7475
objext=o
7476
_LT_TAGVAR(objext, $1)=$objext
7477
7478
# No sense in running all these tests if we already determined that
7479
# the FC compiler isn't working.  Some variables (like enable_shared)
7480
# are currently assumed to apply to all compilers on this platform,
7481
# and will be corrupted by setting them based on a non-working compiler.
7482
if test "$_lt_disable_FC" != yes; then
7483
  # Code to be used in simple compile tests
7484
  lt_simple_compile_test_code="\
7485
      subroutine t
7486
      return
7487
      end
7488
"
7489
7490
  # Code to be used in simple link tests
7491
  lt_simple_link_test_code="\
7492
      program t
7493
      end
7494
"
7495
7496
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7497
  _LT_TAG_COMPILER
7498
7499
  # save warnings/boilerplate of simple test code
7500
  _LT_COMPILER_BOILERPLATE
7501
  _LT_LINKER_BOILERPLATE
7502
7503
  # Allow CC to be a program name with arguments.
7504
  lt_save_CC="$CC"
7505
  lt_save_GCC=$GCC
7506
  CC=${FC-"f95"}
7507
  compiler=$CC
7508
  GCC=$ac_cv_fc_compiler_gnu
7509
7510
  _LT_TAGVAR(compiler, $1)=$CC
7511
  _LT_CC_BASENAME([$compiler])
7512
7513
  if test -n "$compiler"; then
7514
    AC_MSG_CHECKING([if libtool supports shared libraries])
7515
    AC_MSG_RESULT([$can_build_shared])
7516
7517
    AC_MSG_CHECKING([whether to build shared libraries])
7518
    test "$can_build_shared" = "no" && enable_shared=no
7519
7520
    # On AIX, shared libraries and static libraries use the same namespace, and
7521
    # are all built from PIC.
7522
    case $host_os in
7523
      aix3*)
7524
        test "$enable_shared" = yes && enable_static=no
7525
        if test -n "$RANLIB"; then
7526
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7527
          postinstall_cmds='$RANLIB $lib'
7528
        fi
7529
        ;;
7530
      aix[[4-9]]*)
7531
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7532
	  test "$enable_shared" = yes && enable_static=no
7533
	fi
7534
        ;;
7535
    esac
7536
    AC_MSG_RESULT([$enable_shared])
7537
7538
    AC_MSG_CHECKING([whether to build static libraries])
7539
    # Make sure either enable_shared or enable_static is yes.
7540
    test "$enable_shared" = yes || enable_static=yes
7541
    AC_MSG_RESULT([$enable_static])
7542
7543
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7544
    _LT_TAGVAR(LD, $1)="$LD"
7545
7546
    ## CAVEAT EMPTOR:
7547
    ## There is no encapsulation within the following macros, do not change
7548
    ## the running order or otherwise move them around unless you know exactly
7549
    ## what you are doing...
7550
    _LT_SYS_HIDDEN_LIBDEPS($1)
7551
    _LT_COMPILER_PIC($1)
7552
    _LT_COMPILER_C_O($1)
7553
    _LT_COMPILER_FILE_LOCKS($1)
7554
    _LT_LINKER_SHLIBS($1)
7555
    _LT_SYS_DYNAMIC_LINKER($1)
7556
    _LT_LINKER_HARDCODE_LIBPATH($1)
7557
7558
    _LT_CONFIG($1)
7559
  fi # test -n "$compiler"
7560
7561
  GCC=$lt_save_GCC
7562
  CC="$lt_save_CC"
7563
fi # test "$_lt_disable_FC" != yes
7564
7565
AC_LANG_POP
7566
])# _LT_LANG_FC_CONFIG
7567
7568
7569
# _LT_LANG_GCJ_CONFIG([TAG])
7570
# --------------------------
7571
# Ensure that the configuration variables for the GNU Java Compiler compiler
7572
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7573
# to write the compiler configuration to `libtool'.
7574
m4_defun([_LT_LANG_GCJ_CONFIG],
7575
[AC_REQUIRE([LT_PROG_GCJ])dnl
7576
AC_LANG_SAVE
7577
7578
# Source file extension for Java test sources.
7579
ac_ext=java
7580
7581
# Object file extension for compiled Java test sources.
7582
objext=o
7583
_LT_TAGVAR(objext, $1)=$objext
7584
7585
# Code to be used in simple compile tests
7586
lt_simple_compile_test_code="class foo {}"
7587
7588
# Code to be used in simple link tests
7589
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7590
7591
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7592
_LT_TAG_COMPILER
7593
7594
# save warnings/boilerplate of simple test code
7595
_LT_COMPILER_BOILERPLATE
7596
_LT_LINKER_BOILERPLATE
7597
7598
# Allow CC to be a program name with arguments.
7599
lt_save_CC="$CC"
7600
lt_save_GCC=$GCC
7601
GCC=yes
7602
CC=${GCJ-"gcj"}
7603
compiler=$CC
7604
_LT_TAGVAR(compiler, $1)=$CC
7605
_LT_TAGVAR(LD, $1)="$LD"
7606
_LT_CC_BASENAME([$compiler])
7607
7608
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7609
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7610
7611
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7612
7613
if test -n "$compiler"; then
7614
  _LT_COMPILER_NO_RTTI($1)
7615
  _LT_COMPILER_PIC($1)
7616
  _LT_COMPILER_C_O($1)
7617
  _LT_COMPILER_FILE_LOCKS($1)
7618
  _LT_LINKER_SHLIBS($1)
7619
  _LT_LINKER_HARDCODE_LIBPATH($1)
7620
7621
  _LT_CONFIG($1)
7622
fi
7623
7624
AC_LANG_RESTORE
7625
7626
GCC=$lt_save_GCC
7627
CC="$lt_save_CC"
7628
])# _LT_LANG_GCJ_CONFIG
7629
7630
7631
# _LT_LANG_RC_CONFIG([TAG])
7632
# -------------------------
7633
# Ensure that the configuration variables for the Windows resource compiler
7634
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7635
# to write the compiler configuration to `libtool'.
7636
m4_defun([_LT_LANG_RC_CONFIG],
7637
[AC_REQUIRE([LT_PROG_RC])dnl
7638
AC_LANG_SAVE
7639
7640
# Source file extension for RC test sources.
7641
ac_ext=rc
7642
7643
# Object file extension for compiled RC test sources.
7644
objext=o
7645
_LT_TAGVAR(objext, $1)=$objext
7646
7647
# Code to be used in simple compile tests
7648
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7649
7650
# Code to be used in simple link tests
7651
lt_simple_link_test_code="$lt_simple_compile_test_code"
7652
7653
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7654
_LT_TAG_COMPILER
7655
7656
# save warnings/boilerplate of simple test code
7657
_LT_COMPILER_BOILERPLATE
7658
_LT_LINKER_BOILERPLATE
7659
7660
# Allow CC to be a program name with arguments.
7661
lt_save_CC="$CC"
7662
lt_save_GCC=$GCC
7663
GCC=
7664
CC=${RC-"windres"}
7665
compiler=$CC
7666
_LT_TAGVAR(compiler, $1)=$CC
7667
_LT_CC_BASENAME([$compiler])
7668
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7669
7670
if test -n "$compiler"; then
7671
  :
7672
  _LT_CONFIG($1)
7673
fi
7674
7675
GCC=$lt_save_GCC
7676
AC_LANG_RESTORE
7677
CC="$lt_save_CC"
7678
])# _LT_LANG_RC_CONFIG
7679
7680
7681
# LT_PROG_GCJ
7682
# -----------
7683
AC_DEFUN([LT_PROG_GCJ],
7684
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7685
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7686
    [AC_CHECK_TOOL(GCJ, gcj,)
7687
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7688
      AC_SUBST(GCJFLAGS)])])[]dnl
7689
])
7690
7691
# Old name:
7692
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7693
dnl aclocal-1.4 backwards compatibility:
7694
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7695
7696
7697
# LT_PROG_RC
7698
# ----------
7699
AC_DEFUN([LT_PROG_RC],
7700
[AC_CHECK_TOOL(RC, windres,)
7701
])
7702
7703
# Old name:
7704
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7705
dnl aclocal-1.4 backwards compatibility:
7706
dnl AC_DEFUN([LT_AC_PROG_RC], [])
7707
7708
7709
# _LT_DECL_EGREP
7710
# --------------
7711
# If we don't have a new enough Autoconf to choose the best grep
7712
# available, choose the one first in the user's PATH.
7713
m4_defun([_LT_DECL_EGREP],
7714
[AC_REQUIRE([AC_PROG_EGREP])dnl
7715
AC_REQUIRE([AC_PROG_FGREP])dnl
7716
test -z "$GREP" && GREP=grep
7717
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7718
_LT_DECL([], [EGREP], [1], [An ERE matcher])
7719
_LT_DECL([], [FGREP], [1], [A literal string matcher])
7720
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7721
AC_SUBST([GREP])
7722
])
7723
7724
7725
# _LT_DECL_OBJDUMP
7726
# --------------
7727
# If we don't have a new enough Autoconf to choose the best objdump
7728
# available, choose the one first in the user's PATH.
7729
m4_defun([_LT_DECL_OBJDUMP],
7730
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7731
test -z "$OBJDUMP" && OBJDUMP=objdump
7732
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7733
AC_SUBST([OBJDUMP])
7734
])
7735
7736
7737
# _LT_DECL_SED
7738
# ------------
7739
# Check for a fully-functional sed program, that truncates
7740
# as few characters as possible.  Prefer GNU sed if found.
7741
m4_defun([_LT_DECL_SED],
7742
[AC_PROG_SED
7743
test -z "$SED" && SED=sed
7744
Xsed="$SED -e 1s/^X//"
7745
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7746
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7747
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7748
])# _LT_DECL_SED
7749
7750
m4_ifndef([AC_PROG_SED], [
7751
# NOTE: This macro has been submitted for inclusion into   #
7752
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7753
#  a released version of Autoconf we should remove this    #
7754
#  macro and use it instead.                               #
7755
7756
m4_defun([AC_PROG_SED],
7757
[AC_MSG_CHECKING([for a sed that does not truncate output])
7758
AC_CACHE_VAL(lt_cv_path_SED,
7759
[# Loop through the user's path and test for sed and gsed.
7760
# Then use that list of sed's as ones to test for truncation.
7761
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7762
for as_dir in $PATH
7763
do
7764
  IFS=$as_save_IFS
7765
  test -z "$as_dir" && as_dir=.
7766
  for lt_ac_prog in sed gsed; do
7767
    for ac_exec_ext in '' $ac_executable_extensions; do
7768
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7769
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7770
      fi
7771
    done
7772
  done
7773
done
7774
IFS=$as_save_IFS
7775
lt_ac_max=0
7776
lt_ac_count=0
7777
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7778
# along with /bin/sed that truncates output.
7779
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7780
  test ! -f $lt_ac_sed && continue
7781
  cat /dev/null > conftest.in
7782
  lt_ac_count=0
7783
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7784
  # Check for GNU sed and select it if it is found.
7785
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7786
    lt_cv_path_SED=$lt_ac_sed
7787
    break
7788
  fi
7789
  while true; do
7790
    cat conftest.in conftest.in >conftest.tmp
7791
    mv conftest.tmp conftest.in
7792
    cp conftest.in conftest.nl
7793
    echo >>conftest.nl
7794
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7795
    cmp -s conftest.out conftest.nl || break
7796
    # 10000 chars as input seems more than enough
7797
    test $lt_ac_count -gt 10 && break
7798
    lt_ac_count=`expr $lt_ac_count + 1`
7799
    if test $lt_ac_count -gt $lt_ac_max; then
7800
      lt_ac_max=$lt_ac_count
7801
      lt_cv_path_SED=$lt_ac_sed
7802
    fi
7803
  done
7804
done
7805
])
7806
SED=$lt_cv_path_SED
7807
AC_SUBST([SED])
7808
AC_MSG_RESULT([$SED])
7809
])#AC_PROG_SED
7810
])#m4_ifndef
7811
7812
# Old name:
7813
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7814
dnl aclocal-1.4 backwards compatibility:
7815
dnl AC_DEFUN([LT_AC_PROG_SED], [])
7816
7817
7818
# _LT_CHECK_SHELL_FEATURES
7819
# ------------------------
7820
# Find out whether the shell is Bourne or XSI compatible,
7821
# or has some other useful features.
7822
m4_defun([_LT_CHECK_SHELL_FEATURES],
7823
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7824
# Try some XSI features
7825
xsi_shell=no
7826
( _lt_dummy="a/b/c"
7827
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7828
      = c,a/b,, \
7829
    && eval 'test $(( 1 + 1 )) -eq 2 \
7830
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7831
  && xsi_shell=yes
7832
AC_MSG_RESULT([$xsi_shell])
7833
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7834
7835
AC_MSG_CHECKING([whether the shell understands "+="])
7836
lt_shell_append=no
7837
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7838
    >/dev/null 2>&1 \
7839
  && lt_shell_append=yes
7840
AC_MSG_RESULT([$lt_shell_append])
7841
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7842
7843
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7844
  lt_unset=unset
7845
else
7846
  lt_unset=false
7847
fi
7848
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7849
7850
# test EBCDIC or ASCII
7851
case `echo X|tr X '\101'` in
7852
 A) # ASCII based system
7853
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7854
  lt_SP2NL='tr \040 \012'
7855
  lt_NL2SP='tr \015\012 \040\040'
7856
  ;;
7857
 *) # EBCDIC based system
7858
  lt_SP2NL='tr \100 \n'
7859
  lt_NL2SP='tr \r\n \100\100'
7860
  ;;
7861
esac
7862
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7863
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7864
])# _LT_CHECK_SHELL_FEATURES
7865
7866
7867
# _LT_PROG_XSI_SHELLFNS
7868
# ---------------------
7869
# Bourne and XSI compatible variants of some useful shell functions.
7870
m4_defun([_LT_PROG_XSI_SHELLFNS],
7871
[case $xsi_shell in
7872
  yes)
7873
    cat << \_LT_EOF >> "$cfgfile"
7874
7875
# func_dirname file append nondir_replacement
7876
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7877
# otherwise set result to NONDIR_REPLACEMENT.
7878
func_dirname ()
7879
{
7880
  case ${1} in
7881
    */*) func_dirname_result="${1%/*}${2}" ;;
7882
    *  ) func_dirname_result="${3}" ;;
7883
  esac
7884
}
7885
7886
# func_basename file
7887
func_basename ()
7888
{
7889
  func_basename_result="${1##*/}"
7890
}
7891
7892
# func_dirname_and_basename file append nondir_replacement
7893
# perform func_basename and func_dirname in a single function
7894
# call:
7895
#   dirname:  Compute the dirname of FILE.  If nonempty,
7896
#             add APPEND to the result, otherwise set result
7897
#             to NONDIR_REPLACEMENT.
7898
#             value returned in "$func_dirname_result"
7899
#   basename: Compute filename of FILE.
7900
#             value retuned in "$func_basename_result"
7901
# Implementation must be kept synchronized with func_dirname
7902
# and func_basename. For efficiency, we do not delegate to
7903
# those functions but instead duplicate the functionality here.
7904
func_dirname_and_basename ()
7905
{
7906
  case ${1} in
7907
    */*) func_dirname_result="${1%/*}${2}" ;;
7908
    *  ) func_dirname_result="${3}" ;;
7909
  esac
7910
  func_basename_result="${1##*/}"
7911
}
7912
7913
# func_stripname prefix suffix name
7914
# strip PREFIX and SUFFIX off of NAME.
7915
# PREFIX and SUFFIX must not contain globbing or regex special
7916
# characters, hashes, percent signs, but SUFFIX may contain a leading
7917
# dot (in which case that matches only a dot).
7918
func_stripname ()
7919
{
7920
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7921
  # positional parameters, so assign one to ordinary parameter first.
7922
  func_stripname_result=${3}
7923
  func_stripname_result=${func_stripname_result#"${1}"}
7924
  func_stripname_result=${func_stripname_result%"${2}"}
7925
}
7926
7927
# func_opt_split
7928
func_opt_split ()
7929
{
7930
  func_opt_split_opt=${1%%=*}
7931
  func_opt_split_arg=${1#*=}
7932
}
7933
7934
# func_lo2o object
7935
func_lo2o ()
7936
{
7937
  case ${1} in
7938
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7939
    *)    func_lo2o_result=${1} ;;
7940
  esac
7941
}
7942
7943
# func_xform libobj-or-source
7944
func_xform ()
7945
{
7946
  func_xform_result=${1%.*}.lo
7947
}
7948
7949
# func_arith arithmetic-term...
7950
func_arith ()
7951
{
7952
  func_arith_result=$(( $[*] ))
7953
}
7954
7955
# func_len string
7956
# STRING may not start with a hyphen.
7957
func_len ()
7958
{
7959
  func_len_result=${#1}
7960
}
7961
7962
_LT_EOF
7963
    ;;
7964
  *) # Bourne compatible functions.
7965
    cat << \_LT_EOF >> "$cfgfile"
7966
7967
# func_dirname file append nondir_replacement
7968
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7969
# otherwise set result to NONDIR_REPLACEMENT.
7970
func_dirname ()
7971
{
7972
  # Extract subdirectory from the argument.
7973
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7974
  if test "X$func_dirname_result" = "X${1}"; then
7975
    func_dirname_result="${3}"
7976
  else
7977
    func_dirname_result="$func_dirname_result${2}"
7978
  fi
7979
}
7980
7981
# func_basename file
7982
func_basename ()
7983
{
7984
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7985
}
7986
7987
dnl func_dirname_and_basename
7988
dnl A portable version of this function is already defined in general.m4sh
7989
dnl so there is no need for it here.
7990
7991
# func_stripname prefix suffix name
7992
# strip PREFIX and SUFFIX off of NAME.
7993
# PREFIX and SUFFIX must not contain globbing or regex special
7994
# characters, hashes, percent signs, but SUFFIX may contain a leading
7995
# dot (in which case that matches only a dot).
7996
# func_strip_suffix prefix name
7997
func_stripname ()
7998
{
7999
  case ${2} in
8000
    .*) func_stripname_result=`$ECHO "X${3}" \
8001
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8002
    *)  func_stripname_result=`$ECHO "X${3}" \
8003
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8004
  esac
8005
}
8006
8007
# sed scripts:
8008
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8009
my_sed_long_arg='1s/^-[[^=]]*=//'
8010
8011
# func_opt_split
8012
func_opt_split ()
8013
{
8014
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8015
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8016
}
8017
8018
# func_lo2o object
8019
func_lo2o ()
8020
{
8021
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8022
}
8023
8024
# func_xform libobj-or-source
8025
func_xform ()
8026
{
8027
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8028
}
8029
8030
# func_arith arithmetic-term...
8031
func_arith ()
8032
{
8033
  func_arith_result=`expr "$[@]"`
8034
}
8035
8036
# func_len string
8037
# STRING may not start with a hyphen.
8038
func_len ()
8039
{
8040
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8041
}
8042
8043
_LT_EOF
8044
esac
8045
8046
case $lt_shell_append in
8047
  yes)
8048
    cat << \_LT_EOF >> "$cfgfile"
8049
8050
# func_append var value
8051
# Append VALUE to the end of shell variable VAR.
8052
func_append ()
8053
{
8054
  eval "$[1]+=\$[2]"
8055
}
8056
_LT_EOF
8057
    ;;
8058
  *)
8059
    cat << \_LT_EOF >> "$cfgfile"
8060
8061
# func_append var value
8062
# Append VALUE to the end of shell variable VAR.
8063
func_append ()
8064
{
8065
  eval "$[1]=\$$[1]\$[2]"
8066
}
8067
8068
_LT_EOF
8069
    ;;
8070
  esac
8071
])
8072
8073
# Helper functions for option handling.                    -*- Autoconf -*-
8074
#
8075
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8076
#   Written by Gary V. Vaughan, 2004
8077
#
8078
# This file is free software; the Free Software Foundation gives
8079
# unlimited permission to copy and/or distribute it, with or without
8080
# modifications, as long as this notice is preserved.
8081
8082
# serial 6 ltoptions.m4
8083
8084
# This is to help aclocal find these macros, as it can't see m4_define.
8085
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8086
8087
8088
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8089
# ------------------------------------------
8090
m4_define([_LT_MANGLE_OPTION],
8091
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8092
8093
8094
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8095
# ---------------------------------------
8096
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8097
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8098
# saved as a flag.
8099
m4_define([_LT_SET_OPTION],
8100
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8101
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8102
        _LT_MANGLE_DEFUN([$1], [$2]),
8103
    [m4_warning([Unknown $1 option `$2'])])[]dnl
8104
])
8105
8106
8107
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8108
# ------------------------------------------------------------
8109
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8110
m4_define([_LT_IF_OPTION],
8111
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8112
8113
8114
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8115
# -------------------------------------------------------
8116
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8117
# are set.
8118
m4_define([_LT_UNLESS_OPTIONS],
8119
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8120
	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8121
		      [m4_define([$0_found])])])[]dnl
8122
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8123
])[]dnl
8124
])
8125
8126
8127
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8128
# ----------------------------------------
8129
# OPTION-LIST is a space-separated list of Libtool options associated
8130
# with MACRO-NAME.  If any OPTION has a matching handler declared with
8131
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8132
# the unknown option and exit.
8133
m4_defun([_LT_SET_OPTIONS],
8134
[# Set options
8135
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8136
    [_LT_SET_OPTION([$1], _LT_Option)])
8137
8138
m4_if([$1],[LT_INIT],[
8139
  dnl
8140
  dnl Simply set some default values (i.e off) if boolean options were not
8141
  dnl specified:
8142
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8143
  ])
8144
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8145
  ])
8146
  dnl
8147
  dnl If no reference was made to various pairs of opposing options, then
8148
  dnl we run the default mode handler for the pair.  For example, if neither
8149
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8150
  dnl archives by default:
8151
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8152
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8153
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8154
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8155
  		   [_LT_ENABLE_FAST_INSTALL])
8156
  ])
8157
])# _LT_SET_OPTIONS
8158
8159
8160
8161
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8162
# -----------------------------------------
8163
m4_define([_LT_MANGLE_DEFUN],
8164
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8165
8166
8167
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8168
# -----------------------------------------------
8169
m4_define([LT_OPTION_DEFINE],
8170
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8171
])# LT_OPTION_DEFINE
8172
8173
8174
# dlopen
8175
# ------
8176
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8177
])
8178
8179
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8180
[_LT_SET_OPTION([LT_INIT], [dlopen])
8181
AC_DIAGNOSE([obsolete],
8182
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8183
put the `dlopen' option into LT_INIT's first parameter.])
8184
])
8185
8186
dnl aclocal-1.4 backwards compatibility:
8187
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8188
8189
8190
# win32-dll
8191
# ---------
8192
# Declare package support for building win32 dll's.
8193
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8194
[enable_win32_dll=yes
8195
8196
case $host in
8197
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8198
  AC_CHECK_TOOL(AS, as, false)
8199
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8200
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8201
  ;;
8202
esac
8203
8204
test -z "$AS" && AS=as
8205
_LT_DECL([], [AS],      [0], [Assembler program])dnl
8206
8207
test -z "$DLLTOOL" && DLLTOOL=dlltool
8208
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8209
8210
test -z "$OBJDUMP" && OBJDUMP=objdump
8211
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8212
])# win32-dll
8213
8214
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8215
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8216
_LT_SET_OPTION([LT_INIT], [win32-dll])
8217
AC_DIAGNOSE([obsolete],
8218
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8219
put the `win32-dll' option into LT_INIT's first parameter.])
8220
])
8221
8222
dnl aclocal-1.4 backwards compatibility:
8223
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8224
8225
8226
# _LT_ENABLE_SHARED([DEFAULT])
8227
# ----------------------------
8228
# implement the --enable-shared flag, and supports the `shared' and
8229
# `disable-shared' LT_INIT options.
8230
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8231
m4_define([_LT_ENABLE_SHARED],
8232
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8233
AC_ARG_ENABLE([shared],
8234
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8235
	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8236
    [p=${PACKAGE-default}
8237
    case $enableval in
8238
    yes) enable_shared=yes ;;
8239
    no) enable_shared=no ;;
8240
    *)
8241
      enable_shared=no
8242
      # Look at the argument we got.  We use all the common list separators.
8243
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8244
      for pkg in $enableval; do
8245
	IFS="$lt_save_ifs"
8246
	if test "X$pkg" = "X$p"; then
8247
	  enable_shared=yes
8248
	fi
8249
      done
8250
      IFS="$lt_save_ifs"
8251
      ;;
8252
    esac],
8253
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8254
8255
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8256
	[Whether or not to build shared libraries])
8257
])# _LT_ENABLE_SHARED
8258
8259
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8260
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8261
8262
# Old names:
8263
AC_DEFUN([AC_ENABLE_SHARED],
8264
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8265
])
8266
8267
AC_DEFUN([AC_DISABLE_SHARED],
8268
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8269
])
8270
8271
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8272
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8273
8274
dnl aclocal-1.4 backwards compatibility:
8275
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8276
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8277
8278
8279
8280
# _LT_ENABLE_STATIC([DEFAULT])
8281
# ----------------------------
8282
# implement the --enable-static flag, and support the `static' and
8283
# `disable-static' LT_INIT options.
8284
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8285
m4_define([_LT_ENABLE_STATIC],
8286
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8287
AC_ARG_ENABLE([static],
8288
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8289
	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8290
    [p=${PACKAGE-default}
8291
    case $enableval in
8292
    yes) enable_static=yes ;;
8293
    no) enable_static=no ;;
8294
    *)
8295
     enable_static=no
8296
      # Look at the argument we got.  We use all the common list separators.
8297
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8298
      for pkg in $enableval; do
8299
	IFS="$lt_save_ifs"
8300
	if test "X$pkg" = "X$p"; then
8301
	  enable_static=yes
8302
	fi
8303
      done
8304
      IFS="$lt_save_ifs"
8305
      ;;
8306
    esac],
8307
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8308
8309
    _LT_DECL([build_old_libs], [enable_static], [0],
8310
	[Whether or not to build static libraries])
8311
])# _LT_ENABLE_STATIC
8312
8313
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8314
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8315
8316
# Old names:
8317
AC_DEFUN([AC_ENABLE_STATIC],
8318
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8319
])
8320
8321
AC_DEFUN([AC_DISABLE_STATIC],
8322
[_LT_SET_OPTION([LT_INIT], [disable-static])
8323
])
8324
8325
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8326
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8327
8328
dnl aclocal-1.4 backwards compatibility:
8329
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8330
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8331
8332
8333
8334
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8335
# ----------------------------------
8336
# implement the --enable-fast-install flag, and support the `fast-install'
8337
# and `disable-fast-install' LT_INIT options.
8338
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8339
m4_define([_LT_ENABLE_FAST_INSTALL],
8340
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8341
AC_ARG_ENABLE([fast-install],
8342
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8343
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8344
    [p=${PACKAGE-default}
8345
    case $enableval in
8346
    yes) enable_fast_install=yes ;;
8347
    no) enable_fast_install=no ;;
8348
    *)
8349
      enable_fast_install=no
8350
      # Look at the argument we got.  We use all the common list separators.
8351
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8352
      for pkg in $enableval; do
8353
	IFS="$lt_save_ifs"
8354
	if test "X$pkg" = "X$p"; then
8355
	  enable_fast_install=yes
8356
	fi
8357
      done
8358
      IFS="$lt_save_ifs"
8359
      ;;
8360
    esac],
8361
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8362
8363
_LT_DECL([fast_install], [enable_fast_install], [0],
8364
	 [Whether or not to optimize for fast installation])dnl
8365
])# _LT_ENABLE_FAST_INSTALL
8366
8367
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8368
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8369
8370
# Old names:
8371
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8372
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8373
AC_DIAGNOSE([obsolete],
8374
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8375
the `fast-install' option into LT_INIT's first parameter.])
8376
])
8377
8378
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8379
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8380
AC_DIAGNOSE([obsolete],
8381
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8382
the `disable-fast-install' option into LT_INIT's first parameter.])
8383
])
8384
8385
dnl aclocal-1.4 backwards compatibility:
8386
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8387
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8388
8389
8390
# _LT_WITH_PIC([MODE])
8391
# --------------------
8392
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8393
# LT_INIT options.
8394
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8395
m4_define([_LT_WITH_PIC],
8396
[AC_ARG_WITH([pic],
8397
    [AS_HELP_STRING([--with-pic],
8398
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8399
    [pic_mode="$withval"],
8400
    [pic_mode=default])
8401
8402
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8403
8404
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8405
])# _LT_WITH_PIC
8406
8407
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8408
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8409
8410
# Old name:
8411
AU_DEFUN([AC_LIBTOOL_PICMODE],
8412
[_LT_SET_OPTION([LT_INIT], [pic-only])
8413
AC_DIAGNOSE([obsolete],
8414
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8415
put the `pic-only' option into LT_INIT's first parameter.])
8416
])
8417
8418
dnl aclocal-1.4 backwards compatibility:
8419
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8420
8421
8422
m4_define([_LTDL_MODE], [])
8423
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8424
		 [m4_define([_LTDL_MODE], [nonrecursive])])
8425
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8426
		 [m4_define([_LTDL_MODE], [recursive])])
8427
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8428
		 [m4_define([_LTDL_MODE], [subproject])])
8429
8430
m4_define([_LTDL_TYPE], [])
8431
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8432
		 [m4_define([_LTDL_TYPE], [installable])])
8433
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8434
		 [m4_define([_LTDL_TYPE], [convenience])])
8435
8436
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8437
#
8438
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8439
# Written by Gary V. Vaughan, 2004
8440
#
8441
# This file is free software; the Free Software Foundation gives
8442
# unlimited permission to copy and/or distribute it, with or without
8443
# modifications, as long as this notice is preserved.
8444
8445
# serial 6 ltsugar.m4
8446
8447
# This is to help aclocal find these macros, as it can't see m4_define.
8448
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8449
8450
8451
# lt_join(SEP, ARG1, [ARG2...])
8452
# -----------------------------
8453
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8454
# associated separator.
8455
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8456
# versions in m4sugar had bugs.
8457
m4_define([lt_join],
8458
[m4_if([$#], [1], [],
8459
       [$#], [2], [[$2]],
8460
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8461
m4_define([_lt_join],
8462
[m4_if([$#$2], [2], [],
8463
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8464
8465
8466
# lt_car(LIST)
8467
# lt_cdr(LIST)
8468
# ------------
8469
# Manipulate m4 lists.
8470
# These macros are necessary as long as will still need to support
8471
# Autoconf-2.59 which quotes differently.
8472
m4_define([lt_car], [[$1]])
8473
m4_define([lt_cdr],
8474
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8475
       [$#], 1, [],
8476
       [m4_dquote(m4_shift($@))])])
8477
m4_define([lt_unquote], $1)
8478
8479
8480
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8481
# ------------------------------------------
8482
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8483
# Note that neither SEPARATOR nor STRING are expanded; they are appended
8484
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8485
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8486
# than defined and empty).
8487
#
8488
# This macro is needed until we can rely on Autoconf 2.62, since earlier
8489
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8490
m4_define([lt_append],
8491
[m4_define([$1],
8492
	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8493
8494
8495
8496
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8497
# ----------------------------------------------------------
8498
# Produce a SEP delimited list of all paired combinations of elements of
8499
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8500
# has the form PREFIXmINFIXSUFFIXn.
8501
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8502
m4_define([lt_combine],
8503
[m4_if(m4_eval([$# > 3]), [1],
8504
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8505
[[m4_foreach([_Lt_prefix], [$2],
8506
	     [m4_foreach([_Lt_suffix],
8507
		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8508
	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8509
8510
8511
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8512
# -----------------------------------------------------------------------
8513
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8514
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8515
m4_define([lt_if_append_uniq],
8516
[m4_ifdef([$1],
8517
	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8518
		 [lt_append([$1], [$2], [$3])$4],
8519
		 [$5])],
8520
	  [lt_append([$1], [$2], [$3])$4])])
8521
8522
8523
# lt_dict_add(DICT, KEY, VALUE)
8524
# -----------------------------
8525
m4_define([lt_dict_add],
8526
[m4_define([$1($2)], [$3])])
8527
8528
8529
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8530
# --------------------------------------------
8531
m4_define([lt_dict_add_subkey],
8532
[m4_define([$1($2:$3)], [$4])])
8533
8534
8535
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8536
# ----------------------------------
8537
m4_define([lt_dict_fetch],
8538
[m4_ifval([$3],
8539
	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8540
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8541
8542
8543
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8544
# -----------------------------------------------------------------
8545
m4_define([lt_if_dict_fetch],
8546
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8547
	[$5],
8548
    [$6])])
8549
8550
8551
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8552
# --------------------------------------------------------------
8553
m4_define([lt_dict_filter],
8554
[m4_if([$5], [], [],
8555
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
8556
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8557
		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8558
])
8559
8560
# ltversion.m4 -- version numbers			-*- Autoconf -*-
8561
#
8562
#   Copyright (C) 2004 Free Software Foundation, Inc.
8563
#   Written by Scott James Remnant, 2004
8564
#
8565
# This file is free software; the Free Software Foundation gives
8566
# unlimited permission to copy and/or distribute it, with or without
8567
# modifications, as long as this notice is preserved.
8568
8569
# Generated from ltversion.in.
8570
8571
# serial 3017 ltversion.m4
8572
# This file is part of GNU Libtool
8573
8574
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
8575
m4_define([LT_PACKAGE_REVISION], [1.3017])
8576
8577
AC_DEFUN([LTVERSION_VERSION],
8578
[macro_version='2.2.6b'
8579
macro_revision='1.3017'
8580
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8581
_LT_DECL(, macro_revision, 0)
8582
])
8583
8584
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8585
#
8586
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8587
#   Written by Scott James Remnant, 2004.
8588
#
8589
# This file is free software; the Free Software Foundation gives
8590
# unlimited permission to copy and/or distribute it, with or without
8591
# modifications, as long as this notice is preserved.
8592
8593
# serial 4 lt~obsolete.m4
8594
8595
# These exist entirely to fool aclocal when bootstrapping libtool.
8596
#
8597
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8598
# which have later been changed to m4_define as they aren't part of the
8599
# exported API, or moved to Autoconf or Automake where they belong.
8600
#
8601
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8602
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8603
# using a macro with the same name in our local m4/libtool.m4 it'll
8604
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8605
# and doesn't know about Autoconf macros at all.)
8606
#
8607
# So we provide this file, which has a silly filename so it's always
8608
# included after everything else.  This provides aclocal with the
8609
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8610
# because those macros already exist, or will be overwritten later.
8611
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
8612
#
8613
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8614
# Yes, that means every name once taken will need to remain here until
8615
# we give up compatibility with versions before 1.7, at which point
8616
# we need to keep only those names which we still refer to.
8617
8618
# This is to help aclocal find these macros, as it can't see m4_define.
8619
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8620
8621
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8622
m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
8623
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8624
m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
8625
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8626
m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
8627
m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
8628
m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8629
m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
8630
m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
8631
m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
8632
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8633
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8634
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8635
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8636
m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8637
m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
8638
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8639
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8640
m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
8641
m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
8642
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8643
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8644
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8645
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8646
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8647
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8648
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8649
m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
8650
m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
8651
m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
8652
m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8653
m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8654
m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
8655
m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
8656
m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8657
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8658
m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
8659
m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8660
m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
8661
m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
8662
m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
8663
m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
8664
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8665
m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8666
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8667
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8668
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8669
m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8670
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8671
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8672
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8673
m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8674
m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
8675
m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8676
8677
# nls.m4 serial 3 (gettext-0.15)
8678
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
8679
dnl This file is free software; the Free Software Foundation
8680
dnl gives unlimited permission to copy and/or distribute it,
8681
dnl with or without modifications, as long as this notice is preserved.
8682
dnl
8683
dnl This file can can be used in projects which are not available under
8684
dnl the GNU General Public License or the GNU Library General Public
8685
dnl License but which still want to provide support for the GNU gettext
8686
dnl functionality.
8687
dnl Please note that the actual code of the GNU gettext library is covered
8688
dnl by the GNU Library General Public License, and the rest of the GNU
8689
dnl gettext package package is covered by the GNU General Public License.
8690
dnl They are *not* in the public domain.
8691
8692
dnl Authors:
8693
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8694
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8695
8696
AC_PREREQ(2.50)
8697
8698
AC_DEFUN([AM_NLS],
8699
[
8700
  AC_MSG_CHECKING([whether NLS is requested])
8701
  dnl Default is enabled NLS
8702
  AC_ARG_ENABLE(nls,
8703
    [  --disable-nls           do not use Native Language Support],
8704
    USE_NLS=$enableval, USE_NLS=yes)
8705
  AC_MSG_RESULT($USE_NLS)
8706
  AC_SUBST(USE_NLS)
8707
])
8708
8709
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8710
# 
8711
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8712
#
8713
# This program is free software; you can redistribute it and/or modify
8714
# it under the terms of the GNU General Public License as published by
8715
# the Free Software Foundation; either version 2 of the License, or
8716
# (at your option) any later version.
8717
#
8718
# This program is distributed in the hope that it will be useful, but
8719
# WITHOUT ANY WARRANTY; without even the implied warranty of
8720
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8721
# General Public License for more details.
8722
#
8723
# You should have received a copy of the GNU General Public License
8724
# along with this program; if not, write to the Free Software
8725
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8726
#
8727
# As a special exception to the GNU General Public License, if you
8728
# distribute this file as part of a program that contains a
8729
# configuration script generated by Autoconf, you may include it under
8730
# the same distribution terms that you use for the rest of that program.
8731
8732
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8733
# ----------------------------------
8734
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8735
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8736
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8737
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8738
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8739
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8740
fi
8741
if test -n "$PKG_CONFIG"; then
8742
	_pkg_min_version=m4_default([$1], [0.9.0])
8743
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8744
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8745
		AC_MSG_RESULT([yes])
8746
	else
8747
		AC_MSG_RESULT([no])
8748
		PKG_CONFIG=""
8749
	fi
8750
		
8751
fi[]dnl
8752
])# PKG_PROG_PKG_CONFIG
8753
8754
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8755
#
8756
# Check to see whether a particular set of modules exists.  Similar
8757
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8758
#
8759
#
8760
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8761
# this or PKG_CHECK_MODULES is called, or make sure to call
8762
# PKG_CHECK_EXISTS manually
8763
# --------------------------------------------------------------
8764
AC_DEFUN([PKG_CHECK_EXISTS],
8765
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8766
if test -n "$PKG_CONFIG" && \
8767
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8768
  m4_ifval([$2], [$2], [:])
8769
m4_ifvaln([$3], [else
8770
  $3])dnl
8771
fi])
8772
8773
8774
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8775
# ---------------------------------------------
8776
m4_define([_PKG_CONFIG],
8777
[if test -n "$PKG_CONFIG"; then
8778
    if test -n "$$1"; then
8779
        pkg_cv_[]$1="$$1"
8780
    else
8781
        PKG_CHECK_EXISTS([$3],
8782
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8783
			 [pkg_failed=yes])
8784
    fi
8785
else
8786
	pkg_failed=untried
8787
fi[]dnl
8788
])# _PKG_CONFIG
8789
8790
# _PKG_SHORT_ERRORS_SUPPORTED
8791
# -----------------------------
8792
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8793
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8794
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8795
        _pkg_short_errors_supported=yes
8796
else
8797
        _pkg_short_errors_supported=no
8798
fi[]dnl
8799
])# _PKG_SHORT_ERRORS_SUPPORTED
8800
8801
8802
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8803
# [ACTION-IF-NOT-FOUND])
8804
#
8805
#
8806
# Note that if there is a possibility the first call to
8807
# PKG_CHECK_MODULES might not happen, you should be sure to include an
8808
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8809
#
8810
#
8811
# --------------------------------------------------------------
8812
AC_DEFUN([PKG_CHECK_MODULES],
8813
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8814
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8815
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8816
8817
pkg_failed=no
8818
AC_MSG_CHECKING([for $1])
8819
8820
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8821
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8822
8823
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8824
and $1[]_LIBS to avoid the need to call pkg-config.
8825
See the pkg-config man page for more details.])
8826
8827
if test $pkg_failed = yes; then
8828
        _PKG_SHORT_ERRORS_SUPPORTED
8829
        if test $_pkg_short_errors_supported = yes; then
8830
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
8831
        else 
8832
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8833
        fi
8834
	# Put the nasty error message in config.log where it belongs
8835
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8836
8837
	ifelse([$4], , [AC_MSG_ERROR(dnl
8838
[Package requirements ($2) were not met:
8839
8840
$$1_PKG_ERRORS
8841
8842
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8843
installed software in a non-standard prefix.
8844
8845
_PKG_TEXT
8846
])],
8847
		[AC_MSG_RESULT([no])
8848
                $4])
8849
elif test $pkg_failed = untried; then
8850
	ifelse([$4], , [AC_MSG_FAILURE(dnl
8851
[The pkg-config script could not be found or is too old.  Make sure it
8852
is in your PATH or set the PKG_CONFIG environment variable to the full
8853
path to pkg-config.
8854
8855
_PKG_TEXT
8856
8857
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8858
		[$4])
8859
else
8860
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8861
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8862
        AC_MSG_RESULT([yes])
8863
	ifelse([$3], , :, [$3])
8864
fi[]dnl
8865
])# PKG_CHECK_MODULES
8866
8867
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8868
#
8869
# This file is free software; the Free Software Foundation
8870
# gives unlimited permission to copy and/or distribute it,
8871
# with or without modifications, as long as this notice is preserved.
8872
8873
# AM_AUTOMAKE_VERSION(VERSION)
8874
# ----------------------------
8875
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8876
# generated from the m4 files accompanying Automake X.Y.
8877
# (This private macro should not be called outside this file.)
8878
AC_DEFUN([AM_AUTOMAKE_VERSION],
8879
[am__api_version='1.11'
8880
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8881
dnl require some minimum version.  Point them to the right macro.
8882
m4_if([$1], [1.11.1], [],
8883
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8884
])
8885
8886
# _AM_AUTOCONF_VERSION(VERSION)
8887
# -----------------------------
8888
# aclocal traces this macro to find the Autoconf version.
8889
# This is a private macro too.  Using m4_define simplifies
8890
# the logic in aclocal, which can simply ignore this definition.
8891
m4_define([_AM_AUTOCONF_VERSION], [])
8892
8893
# AM_SET_CURRENT_AUTOMAKE_VERSION
8894
# -------------------------------
8895
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8896
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8897
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8898
[AM_AUTOMAKE_VERSION([1.11.1])dnl
8899
m4_ifndef([AC_AUTOCONF_VERSION],
8900
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8901
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8902
8903
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8904
8905
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8906
#
8907
# This file is free software; the Free Software Foundation
8908
# gives unlimited permission to copy and/or distribute it,
8909
# with or without modifications, as long as this notice is preserved.
8910
8911
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8912
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8913
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8914
#
8915
# Of course, Automake must honor this variable whenever it calls a
8916
# tool from the auxiliary directory.  The problem is that $srcdir (and
8917
# therefore $ac_aux_dir as well) can be either absolute or relative,
8918
# depending on how configure is run.  This is pretty annoying, since
8919
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8920
# source directory, any form will work fine, but in subdirectories a
8921
# relative path needs to be adjusted first.
8922
#
8923
# $ac_aux_dir/missing
8924
#    fails when called from a subdirectory if $ac_aux_dir is relative
8925
# $top_srcdir/$ac_aux_dir/missing
8926
#    fails if $ac_aux_dir is absolute,
8927
#    fails when called from a subdirectory in a VPATH build with
8928
#          a relative $ac_aux_dir
8929
#
8930
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8931
# are both prefixed by $srcdir.  In an in-source build this is usually
8932
# harmless because $srcdir is `.', but things will broke when you
8933
# start a VPATH build or use an absolute $srcdir.
8934
#
8935
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8936
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8937
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8938
# and then we would define $MISSING as
8939
#   MISSING="\${SHELL} $am_aux_dir/missing"
8940
# This will work as long as MISSING is not called from configure, because
8941
# unfortunately $(top_srcdir) has no meaning in configure.
8942
# However there are other variables, like CC, which are often used in
8943
# configure, and could therefore not use this "fixed" $ac_aux_dir.
8944
#
8945
# Another solution, used here, is to always expand $ac_aux_dir to an
8946
# absolute PATH.  The drawback is that using absolute paths prevent a
8947
# configured tree to be moved without reconfiguration.
8948
8949
AC_DEFUN([AM_AUX_DIR_EXPAND],
8950
[dnl Rely on autoconf to set up CDPATH properly.
8951
AC_PREREQ([2.50])dnl
8952
# expand $ac_aux_dir to an absolute path
8953
am_aux_dir=`cd $ac_aux_dir && pwd`
8954
])
8955
8956
8957
# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
8958
# Free Software Foundation, Inc.
8959
#
8960
# This file is free software; the Free Software Foundation
8961
# gives unlimited permission to copy and/or distribute it,
8962
# with or without modifications, as long as this notice is preserved.
8963
8964
# serial 4
8965
8966
# This was merged into AC_PROG_CC in Autoconf.
8967
8968
AU_DEFUN([AM_PROG_CC_STDC],
8969
[AC_PROG_CC
8970
AC_DIAGNOSE([obsolete], [$0:
8971
	your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
8972
	`ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
8973
	you adjust the code.  You can also remove the above call to
8974
	AC_PROG_CC if you already called it elsewhere.])
8975
am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
8976
])
8977
AU_DEFUN([fp_PROG_CC_STDC])
8978
8979
# AM_CONDITIONAL                                            -*- Autoconf -*-
8980
8981
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8982
# Free Software Foundation, Inc.
8983
#
8984
# This file is free software; the Free Software Foundation
8985
# gives unlimited permission to copy and/or distribute it,
8986
# with or without modifications, as long as this notice is preserved.
8987
8988
# serial 9
8989
8990
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8991
# -------------------------------------
8992
# Define a conditional.
8993
AC_DEFUN([AM_CONDITIONAL],
8994
[AC_PREREQ(2.52)dnl
8995
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8996
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8997
AC_SUBST([$1_TRUE])dnl
8998
AC_SUBST([$1_FALSE])dnl
8999
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9000
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9001
m4_define([_AM_COND_VALUE_$1], [$2])dnl
9002
if $2; then
9003
  $1_TRUE=
9004
  $1_FALSE='#'
9005
else
9006
  $1_TRUE='#'
9007
  $1_FALSE=
9008
fi
9009
AC_CONFIG_COMMANDS_PRE(
9010
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9011
  AC_MSG_ERROR([[conditional "$1" was never defined.
9012
Usually this means the macro was only invoked conditionally.]])
9013
fi])])
9014
9015
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9016
# Free Software Foundation, Inc.
9017
#
9018
# This file is free software; the Free Software Foundation
9019
# gives unlimited permission to copy and/or distribute it,
9020
# with or without modifications, as long as this notice is preserved.
9021
9022
# serial 10
9023
9024
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9025
# written in clear, in which case automake, when reading aclocal.m4,
9026
# will think it sees a *use*, and therefore will trigger all it's
9027
# C support machinery.  Also note that it means that autoscan, seeing
9028
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9029
9030
9031
# _AM_DEPENDENCIES(NAME)
9032
# ----------------------
9033
# See how the compiler implements dependency checking.
9034
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9035
# We try a few techniques and use that to set a single cache variable.
9036
#
9037
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9038
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9039
# dependency, and given that the user is not expected to run this macro,
9040
# just rely on AC_PROG_CC.
9041
AC_DEFUN([_AM_DEPENDENCIES],
9042
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9043
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9044
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9045
AC_REQUIRE([AM_DEP_TRACK])dnl
9046
9047
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9048
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9049
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9050
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9051
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9052
                   [depcc="$$1"   am_compiler_list=])
9053
9054
AC_CACHE_CHECK([dependency style of $depcc],
9055
               [am_cv_$1_dependencies_compiler_type],
9056
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9057
  # We make a subdir and do the tests there.  Otherwise we can end up
9058
  # making bogus files that we don't know about and never remove.  For
9059
  # instance it was reported that on HP-UX the gcc test will end up
9060
  # making a dummy file named `D' -- because `-MD' means `put the output
9061
  # in D'.
9062
  mkdir conftest.dir
9063
  # Copy depcomp to subdir because otherwise we won't find it if we're
9064
  # using a relative directory.
9065
  cp "$am_depcomp" conftest.dir
9066
  cd conftest.dir
9067
  # We will build objects and dependencies in a subdirectory because
9068
  # it helps to detect inapplicable dependency modes.  For instance
9069
  # both Tru64's cc and ICC support -MD to output dependencies as a
9070
  # side effect of compilation, but ICC will put the dependencies in
9071
  # the current directory while Tru64 will put them in the object
9072
  # directory.
9073
  mkdir sub
9074
9075
  am_cv_$1_dependencies_compiler_type=none
9076
  if test "$am_compiler_list" = ""; then
9077
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9078
  fi
9079
  am__universal=false
9080
  m4_case([$1], [CC],
9081
    [case " $depcc " in #(
9082
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9083
     esac],
9084
    [CXX],
9085
    [case " $depcc " in #(
9086
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9087
     esac])
9088
9089
  for depmode in $am_compiler_list; do
9090
    # Setup a source with many dependencies, because some compilers
9091
    # like to wrap large dependency lists on column 80 (with \), and
9092
    # we should not choose a depcomp mode which is confused by this.
9093
    #
9094
    # We need to recreate these files for each test, as the compiler may
9095
    # overwrite some of them when testing with obscure command lines.
9096
    # This happens at least with the AIX C compiler.
9097
    : > sub/conftest.c
9098
    for i in 1 2 3 4 5 6; do
9099
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9100
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9101
      # Solaris 8's {/usr,}/bin/sh.
9102
      touch sub/conftst$i.h
9103
    done
9104
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9105
9106
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9107
    # mode.  It turns out that the SunPro C++ compiler does not properly
9108
    # handle `-M -o', and we need to detect this.  Also, some Intel
9109
    # versions had trouble with output in subdirs
9110
    am__obj=sub/conftest.${OBJEXT-o}
9111
    am__minus_obj="-o $am__obj"
9112
    case $depmode in
9113
    gcc)
9114
      # This depmode causes a compiler race in universal mode.
9115
      test "$am__universal" = false || continue
9116
      ;;
9117
    nosideeffect)
9118
      # after this tag, mechanisms are not by side-effect, so they'll
9119
      # only be used when explicitly requested
9120
      if test "x$enable_dependency_tracking" = xyes; then
9121
	continue
9122
      else
9123
	break
9124
      fi
9125
      ;;
9126
    msvisualcpp | msvcmsys)
9127
      # This compiler won't grok `-c -o', but also, the minuso test has
9128
      # not run yet.  These depmodes are late enough in the game, and
9129
      # so weak that their functioning should not be impacted.
9130
      am__obj=conftest.${OBJEXT-o}
9131
      am__minus_obj=
9132
      ;;
9133
    none) break ;;
9134
    esac
9135
    if depmode=$depmode \
9136
       source=sub/conftest.c object=$am__obj \
9137
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9138
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9139
         >/dev/null 2>conftest.err &&
9140
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9141
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9142
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9143
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9144
      # icc doesn't choke on unknown options, it will just issue warnings
9145
      # or remarks (even with -Werror).  So we grep stderr for any message
9146
      # that says an option was ignored or not supported.
9147
      # When given -MP, icc 7.0 and 7.1 complain thusly:
9148
      #   icc: Command line warning: ignoring option '-M'; no argument required
9149
      # The diagnosis changed in icc 8.0:
9150
      #   icc: Command line remark: option '-MP' not supported
9151
      if (grep 'ignoring option' conftest.err ||
9152
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9153
        am_cv_$1_dependencies_compiler_type=$depmode
9154
        break
9155
      fi
9156
    fi
9157
  done
9158
9159
  cd ..
9160
  rm -rf conftest.dir
9161
else
9162
  am_cv_$1_dependencies_compiler_type=none
9163
fi
9164
])
9165
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9166
AM_CONDITIONAL([am__fastdep$1], [
9167
  test "x$enable_dependency_tracking" != xno \
9168
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9169
])
9170
9171
9172
# AM_SET_DEPDIR
9173
# -------------
9174
# Choose a directory name for dependency files.
9175
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9176
AC_DEFUN([AM_SET_DEPDIR],
9177
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9178
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9179
])
9180
9181
9182
# AM_DEP_TRACK
9183
# ------------
9184
AC_DEFUN([AM_DEP_TRACK],
9185
[AC_ARG_ENABLE(dependency-tracking,
9186
[  --disable-dependency-tracking  speeds up one-time build
9187
  --enable-dependency-tracking   do not reject slow dependency extractors])
9188
if test "x$enable_dependency_tracking" != xno; then
9189
  am_depcomp="$ac_aux_dir/depcomp"
9190
  AMDEPBACKSLASH='\'
9191
fi
9192
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9193
AC_SUBST([AMDEPBACKSLASH])dnl
9194
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9195
])
9196
9197
# Generate code to set up dependency tracking.              -*- Autoconf -*-
9198
9199
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9200
# Free Software Foundation, Inc.
9201
#
9202
# This file is free software; the Free Software Foundation
9203
# gives unlimited permission to copy and/or distribute it,
9204
# with or without modifications, as long as this notice is preserved.
9205
9206
#serial 5
9207
9208
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9209
# ------------------------------
9210
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9211
[{
9212
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
9213
  # are listed without --file.  Let's play safe and only enable the eval
9214
  # if we detect the quoting.
9215
  case $CONFIG_FILES in
9216
  *\'*) eval set x "$CONFIG_FILES" ;;
9217
  *)   set x $CONFIG_FILES ;;
9218
  esac
9219
  shift
9220
  for mf
9221
  do
9222
    # Strip MF so we end up with the name of the file.
9223
    mf=`echo "$mf" | sed -e 's/:.*$//'`
9224
    # Check whether this is an Automake generated Makefile or not.
9225
    # We used to match only the files named `Makefile.in', but
9226
    # some people rename them; so instead we look at the file content.
9227
    # Grep'ing the first line is not enough: some people post-process
9228
    # each Makefile.in and add a new line on top of each file to say so.
9229
    # Grep'ing the whole file is not good either: AIX grep has a line
9230
    # limit of 2048, but all sed's we know have understand at least 4000.
9231
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9232
      dirpart=`AS_DIRNAME("$mf")`
9233
    else
9234
      continue
9235
    fi
9236
    # Extract the definition of DEPDIR, am__include, and am__quote
9237
    # from the Makefile without running `make'.
9238
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9239
    test -z "$DEPDIR" && continue
9240
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
9241
    test -z "am__include" && continue
9242
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9243
    # When using ansi2knr, U may be empty or an underscore; expand it
9244
    U=`sed -n 's/^U = //p' < "$mf"`
9245
    # Find all dependency output files, they are included files with
9246
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
9247
    # simplest approach to changing $(DEPDIR) to its actual value in the
9248
    # expansion.
9249
    for file in `sed -n "
9250
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9251
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9252
      # Make sure the directory exists.
9253
      test -f "$dirpart/$file" && continue
9254
      fdir=`AS_DIRNAME(["$file"])`
9255
      AS_MKDIR_P([$dirpart/$fdir])
9256
      # echo "creating $dirpart/$file"
9257
      echo '# dummy' > "$dirpart/$file"
9258
    done
9259
  done
9260
}
9261
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9262
9263
9264
# AM_OUTPUT_DEPENDENCY_COMMANDS
9265
# -----------------------------
9266
# This macro should only be invoked once -- use via AC_REQUIRE.
9267
#
9268
# This code is only required when automatic dependency tracking
9269
# is enabled.  FIXME.  This creates each `.P' file that we will
9270
# need in order to bootstrap the dependency handling code.
9271
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9272
[AC_CONFIG_COMMANDS([depfiles],
9273
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9274
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9275
])
9276
9277
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9278
# Free Software Foundation, Inc.
9279
#
9280
# This file is free software; the Free Software Foundation
9281
# gives unlimited permission to copy and/or distribute it,
9282
# with or without modifications, as long as this notice is preserved.
9283
9284
# serial 8
9285
9286
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9287
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9288
9289
# Do all the work for Automake.                             -*- Autoconf -*-
9290
9291
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9292
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9293
#
9294
# This file is free software; the Free Software Foundation
9295
# gives unlimited permission to copy and/or distribute it,
9296
# with or without modifications, as long as this notice is preserved.
9297
9298
# serial 16
9299
9300
# This macro actually does too much.  Some checks are only needed if
9301
# your package does certain things.  But this isn't really a big deal.
9302
9303
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9304
# AM_INIT_AUTOMAKE([OPTIONS])
9305
# -----------------------------------------------
9306
# The call with PACKAGE and VERSION arguments is the old style
9307
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9308
# and VERSION should now be passed to AC_INIT and removed from
9309
# the call to AM_INIT_AUTOMAKE.
9310
# We support both call styles for the transition.  After
9311
# the next Automake release, Autoconf can make the AC_INIT
9312
# arguments mandatory, and then we can depend on a new Autoconf
9313
# release and drop the old call support.
9314
AC_DEFUN([AM_INIT_AUTOMAKE],
9315
[AC_PREREQ([2.62])dnl
9316
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9317
dnl the ones we care about.
9318
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9319
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9320
AC_REQUIRE([AC_PROG_INSTALL])dnl
9321
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9322
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9323
  # is not polluted with repeated "-I."
9324
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9325
  # test to see if srcdir already configured
9326
  if test -f $srcdir/config.status; then
9327
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9328
  fi
9329
fi
9330
9331
# test whether we have cygpath
9332
if test -z "$CYGPATH_W"; then
9333
  if (cygpath --version) >/dev/null 2>/dev/null; then
9334
    CYGPATH_W='cygpath -w'
9335
  else
9336
    CYGPATH_W=echo
9337
  fi
9338
fi
9339
AC_SUBST([CYGPATH_W])
9340
9341
# Define the identity of the package.
9342
dnl Distinguish between old-style and new-style calls.
9343
m4_ifval([$2],
9344
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9345
 AC_SUBST([PACKAGE], [$1])dnl
9346
 AC_SUBST([VERSION], [$2])],
9347
[_AM_SET_OPTIONS([$1])dnl
9348
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9349
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9350
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9351
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9352
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9353
9354
_AM_IF_OPTION([no-define],,
9355
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9356
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9357
9358
# Some tools Automake needs.
9359
AC_REQUIRE([AM_SANITY_CHECK])dnl
9360
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9361
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9362
AM_MISSING_PROG(AUTOCONF, autoconf)
9363
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9364
AM_MISSING_PROG(AUTOHEADER, autoheader)
9365
AM_MISSING_PROG(MAKEINFO, makeinfo)
9366
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9367
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9368
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9369
# We need awk for the "check" target.  The system "awk" is bad on
9370
# some platforms.
9371
AC_REQUIRE([AC_PROG_AWK])dnl
9372
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9373
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9374
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9375
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9376
			     [_AM_PROG_TAR([v7])])])
9377
_AM_IF_OPTION([no-dependencies],,
9378
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9379
		  [_AM_DEPENDENCIES(CC)],
9380
		  [define([AC_PROG_CC],
9381
			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9382
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9383
		  [_AM_DEPENDENCIES(CXX)],
9384
		  [define([AC_PROG_CXX],
9385
			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9386
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9387
		  [_AM_DEPENDENCIES(OBJC)],
9388
		  [define([AC_PROG_OBJC],
9389
			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9390
])
9391
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9392
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9393
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
9394
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9395
AC_CONFIG_COMMANDS_PRE(dnl
9396
[m4_provide_if([_AM_COMPILER_EXEEXT],
9397
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9398
])
9399
9400
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9401
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9402
dnl mangled by Autoconf and run in a shell conditional statement.
9403
m4_define([_AC_COMPILER_EXEEXT],
9404
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9405
9406
9407
# When config.status generates a header, we must update the stamp-h file.
9408
# This file resides in the same directory as the config header
9409
# that is generated.  The stamp files are numbered to have different names.
9410
9411
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9412
# loop where config.status creates the headers, so we can generate
9413
# our stamp files there.
9414
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9415
[# Compute $1's index in $config_headers.
9416
_am_arg=$1
9417
_am_stamp_count=1
9418
for _am_header in $config_headers :; do
9419
  case $_am_header in
9420
    $_am_arg | $_am_arg:* )
9421
      break ;;
9422
    * )
9423
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9424
  esac
9425
done
9426
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9427
9428
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
9429
#
9430
# This file is free software; the Free Software Foundation
9431
# gives unlimited permission to copy and/or distribute it,
9432
# with or without modifications, as long as this notice is preserved.
9433
9434
# AM_PROG_INSTALL_SH
9435
# ------------------
9436
# Define $install_sh.
9437
AC_DEFUN([AM_PROG_INSTALL_SH],
9438
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9439
if test x"${install_sh}" != xset; then
9440
  case $am_aux_dir in
9441
  *\ * | *\	*)
9442
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9443
  *)
9444
    install_sh="\${SHELL} $am_aux_dir/install-sh"
9445
  esac
9446
fi
9447
AC_SUBST(install_sh)])
9448
9449
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9450
#
9451
# This file is free software; the Free Software Foundation
9452
# gives unlimited permission to copy and/or distribute it,
9453
# with or without modifications, as long as this notice is preserved.
9454
9455
# serial 2
9456
9457
# Check whether the underlying file-system supports filenames
9458
# with a leading dot.  For instance MS-DOS doesn't.
9459
AC_DEFUN([AM_SET_LEADING_DOT],
9460
[rm -rf .tst 2>/dev/null
9461
mkdir .tst 2>/dev/null
9462
if test -d .tst; then
9463
  am__leading_dot=.
9464
else
9465
  am__leading_dot=_
9466
fi
9467
rmdir .tst 2>/dev/null
9468
AC_SUBST([am__leading_dot])])
9469
9470
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9471
# From Jim Meyering
9472
9473
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9474
# Free Software Foundation, Inc.
9475
#
9476
# This file is free software; the Free Software Foundation
9477
# gives unlimited permission to copy and/or distribute it,
9478
# with or without modifications, as long as this notice is preserved.
9479
9480
# serial 5
9481
9482
# AM_MAINTAINER_MODE([DEFAULT-MODE])
9483
# ----------------------------------
9484
# Control maintainer-specific portions of Makefiles.
9485
# Default is to disable them, unless `enable' is passed literally.
9486
# For symmetry, `disable' may be passed as well.  Anyway, the user
9487
# can override the default with the --enable/--disable switch.
9488
AC_DEFUN([AM_MAINTAINER_MODE],
9489
[m4_case(m4_default([$1], [disable]),
9490
       [enable], [m4_define([am_maintainer_other], [disable])],
9491
       [disable], [m4_define([am_maintainer_other], [enable])],
9492
       [m4_define([am_maintainer_other], [enable])
9493
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9494
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9495
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9496
  AC_ARG_ENABLE([maintainer-mode],
9497
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
9498
			  (and sometimes confusing) to the casual installer],
9499
      [USE_MAINTAINER_MODE=$enableval],
9500
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9501
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9502
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9503
  MAINT=$MAINTAINER_MODE_TRUE
9504
  AC_SUBST([MAINT])dnl
9505
]
9506
)
9507
9508
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9509
9510
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
9511
9512
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
9513
#
9514
# This file is free software; the Free Software Foundation
9515
# gives unlimited permission to copy and/or distribute it,
9516
# with or without modifications, as long as this notice is preserved.
9517
9518
# serial 4
9519
9520
# AM_MAKE_INCLUDE()
9521
# -----------------
9522
# Check to see how make treats includes.
9523
AC_DEFUN([AM_MAKE_INCLUDE],
9524
[am_make=${MAKE-make}
9525
cat > confinc << 'END'
9526
am__doit:
9527
	@echo this is the am__doit target
9528
.PHONY: am__doit
9529
END
9530
# If we don't find an include directive, just comment out the code.
9531
AC_MSG_CHECKING([for style of include used by $am_make])
9532
am__include="#"
9533
am__quote=
9534
_am_result=none
9535
# First try GNU make style include.
9536
echo "include confinc" > confmf
9537
# Ignore all kinds of additional output from `make'.
9538
case `$am_make -s -f confmf 2> /dev/null` in #(
9539
*the\ am__doit\ target*)
9540
  am__include=include
9541
  am__quote=
9542
  _am_result=GNU
9543
  ;;
9544
esac
9545
# Now try BSD make style include.
9546
if test "$am__include" = "#"; then
9547
   echo '.include "confinc"' > confmf
9548
   case `$am_make -s -f confmf 2> /dev/null` in #(
9549
   *the\ am__doit\ target*)
9550
     am__include=.include
9551
     am__quote="\""
9552
     _am_result=BSD
9553
     ;;
9554
   esac
9555
fi
9556
AC_SUBST([am__include])
9557
AC_SUBST([am__quote])
9558
AC_MSG_RESULT([$_am_result])
9559
rm -f confinc confmf
9560
])
9561
9562
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
9563
# Free Software Foundation, Inc.
9564
#
9565
# This file is free software; the Free Software Foundation
9566
# gives unlimited permission to copy and/or distribute it,
9567
# with or without modifications, as long as this notice is preserved.
9568
9569
# serial 6
9570
9571
# AM_PROG_CC_C_O
9572
# --------------
9573
# Like AC_PROG_CC_C_O, but changed for automake.
9574
AC_DEFUN([AM_PROG_CC_C_O],
9575
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
9576
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9577
AC_REQUIRE_AUX_FILE([compile])dnl
9578
# FIXME: we rely on the cache variable name because
9579
# there is no other way.
9580
set dummy $CC
9581
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
9582
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
9583
if test "$am_t" != yes; then
9584
   # Losing compiler, so override with the script.
9585
   # FIXME: It is wrong to rewrite CC.
9586
   # But if we don't then we get into trouble of one sort or another.
9587
   # A longer-term fix would be to have automake use am__CC in this case,
9588
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9589
   CC="$am_aux_dir/compile $CC"
9590
fi
9591
dnl Make sure AC_PROG_CC is never called again, or it will override our
9592
dnl setting of CC.
9593
m4_define([AC_PROG_CC],
9594
          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
9595
])
9596
9597
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9598
9599
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9600
# Free Software Foundation, Inc.
9601
#
9602
# This file is free software; the Free Software Foundation
9603
# gives unlimited permission to copy and/or distribute it,
9604
# with or without modifications, as long as this notice is preserved.
9605
9606
# serial 6
9607
9608
# AM_MISSING_PROG(NAME, PROGRAM)
9609
# ------------------------------
9610
AC_DEFUN([AM_MISSING_PROG],
9611
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9612
$1=${$1-"${am_missing_run}$2"}
9613
AC_SUBST($1)])
9614
9615
9616
# AM_MISSING_HAS_RUN
9617
# ------------------
9618
# Define MISSING if not defined so far and test if it supports --run.
9619
# If it does, set am_missing_run to use it, otherwise, to nothing.
9620
AC_DEFUN([AM_MISSING_HAS_RUN],
9621
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9622
AC_REQUIRE_AUX_FILE([missing])dnl
9623
if test x"${MISSING+set}" != xset; then
9624
  case $am_aux_dir in
9625
  *\ * | *\	*)
9626
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9627
  *)
9628
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
9629
  esac
9630
fi
9631
# Use eval to expand $SHELL
9632
if eval "$MISSING --run true"; then
9633
  am_missing_run="$MISSING --run "
9634
else
9635
  am_missing_run=
9636
  AC_MSG_WARN([`missing' script is too old or missing])
9637
fi
9638
])
9639
9640
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
9641
#
9642
# This file is free software; the Free Software Foundation
9643
# gives unlimited permission to copy and/or distribute it,
9644
# with or without modifications, as long as this notice is preserved.
9645
9646
# AM_PROG_MKDIR_P
9647
# ---------------
9648
# Check for `mkdir -p'.
9649
AC_DEFUN([AM_PROG_MKDIR_P],
9650
[AC_PREREQ([2.60])dnl
9651
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9652
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9653
dnl while keeping a definition of mkdir_p for backward compatibility.
9654
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9655
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9656
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9657
dnl adjustment using top_builddir (which is defined more often than
9658
dnl MKDIR_P).
9659
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9660
case $mkdir_p in
9661
  [[\\/$]]* | ?:[[\\/]]*) ;;
9662
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9663
esac
9664
])
9665
9666
# Helper functions for option handling.                     -*- Autoconf -*-
9667
9668
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
9669
#
9670
# This file is free software; the Free Software Foundation
9671
# gives unlimited permission to copy and/or distribute it,
9672
# with or without modifications, as long as this notice is preserved.
9673
9674
# serial 4
9675
9676
# _AM_MANGLE_OPTION(NAME)
9677
# -----------------------
9678
AC_DEFUN([_AM_MANGLE_OPTION],
9679
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9680
9681
# _AM_SET_OPTION(NAME)
9682
# ------------------------------
9683
# Set option NAME.  Presently that only means defining a flag for this option.
9684
AC_DEFUN([_AM_SET_OPTION],
9685
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9686
9687
# _AM_SET_OPTIONS(OPTIONS)
9688
# ----------------------------------
9689
# OPTIONS is a space-separated list of Automake options.
9690
AC_DEFUN([_AM_SET_OPTIONS],
9691
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9692
9693
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9694
# -------------------------------------------
9695
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9696
AC_DEFUN([_AM_IF_OPTION],
9697
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9698
9699
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9700
9701
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9702
# Free Software Foundation, Inc.
9703
#
9704
# This file is free software; the Free Software Foundation
9705
# gives unlimited permission to copy and/or distribute it,
9706
# with or without modifications, as long as this notice is preserved.
9707
9708
# serial 5
9709
9710
# AM_SANITY_CHECK
9711
# ---------------
9712
AC_DEFUN([AM_SANITY_CHECK],
9713
[AC_MSG_CHECKING([whether build environment is sane])
9714
# Just in case
9715
sleep 1
9716
echo timestamp > conftest.file
9717
# Reject unsafe characters in $srcdir or the absolute working directory
9718
# name.  Accept space and tab only in the latter.
9719
am_lf='
9720
'
9721
case `pwd` in
9722
  *[[\\\"\#\$\&\'\`$am_lf]]*)
9723
    AC_MSG_ERROR([unsafe absolute working directory name]);;
9724
esac
9725
case $srcdir in
9726
  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
9727
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9728
esac
9729
9730
# Do `set' in a subshell so we don't clobber the current shell's
9731
# arguments.  Must try -L first in case configure is actually a
9732
# symlink; some systems play weird games with the mod time of symlinks
9733
# (eg FreeBSD returns the mod time of the symlink's containing
9734
# directory).
9735
if (
9736
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9737
   if test "$[*]" = "X"; then
9738
      # -L didn't work.
9739
      set X `ls -t "$srcdir/configure" conftest.file`
9740
   fi
9741
   rm -f conftest.file
9742
   if test "$[*]" != "X $srcdir/configure conftest.file" \
9743
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
9744
9745
      # If neither matched, then we have a broken ls.  This can happen
9746
      # if, for instance, CONFIG_SHELL is bash and it inherits a
9747
      # broken ls alias from the environment.  This has actually
9748
      # happened.  Such a system could not be considered "sane".
9749
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9750
alias in your environment])
9751
   fi
9752
9753
   test "$[2]" = conftest.file
9754
   )
9755
then
9756
   # Ok.
9757
   :
9758
else
9759
   AC_MSG_ERROR([newly created file is older than distributed files!
9760
Check your system clock])
9761
fi
9762
AC_MSG_RESULT(yes)])
9763
9764
# Copyright (C) 2009  Free Software Foundation, Inc.
9765
#
9766
# This file is free software; the Free Software Foundation
9767
# gives unlimited permission to copy and/or distribute it,
9768
# with or without modifications, as long as this notice is preserved.
9769
9770
# serial 1
9771
9772
# AM_SILENT_RULES([DEFAULT])
9773
# --------------------------
9774
# Enable less verbose build rules; with the default set to DEFAULT
9775
# (`yes' being less verbose, `no' or empty being verbose).
9776
AC_DEFUN([AM_SILENT_RULES],
9777
[AC_ARG_ENABLE([silent-rules],
9778
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
9779
  --disable-silent-rules         verbose build output (undo: `make V=0')])
9780
case $enable_silent_rules in
9781
yes) AM_DEFAULT_VERBOSITY=0;;
9782
no)  AM_DEFAULT_VERBOSITY=1;;
9783
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9784
esac
9785
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
9786
AM_BACKSLASH='\'
9787
AC_SUBST([AM_BACKSLASH])dnl
9788
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
9789
])
9790
9791
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9792
#
9793
# This file is free software; the Free Software Foundation
9794
# gives unlimited permission to copy and/or distribute it,
9795
# with or without modifications, as long as this notice is preserved.
9796
9797
# AM_PROG_INSTALL_STRIP
9798
# ---------------------
9799
# One issue with vendor `install' (even GNU) is that you can't
9800
# specify the program used to strip binaries.  This is especially
9801
# annoying in cross-compiling environments, where the build's strip
9802
# is unlikely to handle the host's binaries.
9803
# Fortunately install-sh will honor a STRIPPROG variable, so we
9804
# always use install-sh in `make install-strip', and initialize
9805
# STRIPPROG with the value of the STRIP variable (set by the user).
9806
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9807
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9808
# Installed binaries are usually stripped using `strip' when the user
9809
# run `make install-strip'.  However `strip' might not be the right
9810
# tool to use in cross-compilation environments, therefore Automake
9811
# will honor the `STRIP' environment variable to overrule this program.
9812
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9813
if test "$cross_compiling" != no; then
9814
  AC_CHECK_TOOL([STRIP], [strip], :)
9815
fi
9816
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9817
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9818
9819
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9820
#
9821
# This file is free software; the Free Software Foundation
9822
# gives unlimited permission to copy and/or distribute it,
9823
# with or without modifications, as long as this notice is preserved.
9824
9825
# serial 2
9826
9827
# _AM_SUBST_NOTMAKE(VARIABLE)
9828
# ---------------------------
9829
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9830
# This macro is traced by Automake.
9831
AC_DEFUN([_AM_SUBST_NOTMAKE])
9832
9833
# AM_SUBST_NOTMAKE(VARIABLE)
9834
# ---------------------------
9835
# Public sister of _AM_SUBST_NOTMAKE.
9836
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9837
9838
# Check how to create a tarball.                            -*- Autoconf -*-
9839
9840
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9841
#
9842
# This file is free software; the Free Software Foundation
9843
# gives unlimited permission to copy and/or distribute it,
9844
# with or without modifications, as long as this notice is preserved.
9845
9846
# serial 2
9847
9848
# _AM_PROG_TAR(FORMAT)
9849
# --------------------
9850
# Check how to create a tarball in format FORMAT.
9851
# FORMAT should be one of `v7', `ustar', or `pax'.
9852
#
9853
# Substitute a variable $(am__tar) that is a command
9854
# writing to stdout a FORMAT-tarball containing the directory
9855
# $tardir.
9856
#     tardir=directory && $(am__tar) > result.tar
9857
#
9858
# Substitute a variable $(am__untar) that extract such
9859
# a tarball read from stdin.
9860
#     $(am__untar) < result.tar
9861
AC_DEFUN([_AM_PROG_TAR],
9862
[# Always define AMTAR for backward compatibility.
9863
AM_MISSING_PROG([AMTAR], [tar])
9864
m4_if([$1], [v7],
9865
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9866
     [m4_case([$1], [ustar],, [pax],,
9867
              [m4_fatal([Unknown tar format])])
9868
AC_MSG_CHECKING([how to create a $1 tar archive])
9869
# Loop over all known methods to create a tar archive until one works.
9870
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9871
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9872
# Do not fold the above two line into one, because Tru64 sh and
9873
# Solaris sh will not grok spaces in the rhs of `-'.
9874
for _am_tool in $_am_tools
9875
do
9876
  case $_am_tool in
9877
  gnutar)
9878
    for _am_tar in tar gnutar gtar;
9879
    do
9880
      AM_RUN_LOG([$_am_tar --version]) && break
9881
    done
9882
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9883
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9884
    am__untar="$_am_tar -xf -"
9885
    ;;
9886
  plaintar)
9887
    # Must skip GNU tar: if it does not support --format= it doesn't create
9888
    # ustar tarball either.
9889
    (tar --version) >/dev/null 2>&1 && continue
9890
    am__tar='tar chf - "$$tardir"'
9891
    am__tar_='tar chf - "$tardir"'
9892
    am__untar='tar xf -'
9893
    ;;
9894
  pax)
9895
    am__tar='pax -L -x $1 -w "$$tardir"'
9896
    am__tar_='pax -L -x $1 -w "$tardir"'
9897
    am__untar='pax -r'
9898
    ;;
9899
  cpio)
9900
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9901
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9902
    am__untar='cpio -i -H $1 -d'
9903
    ;;
9904
  none)
9905
    am__tar=false
9906
    am__tar_=false
9907
    am__untar=false
9908
    ;;
9909
  esac
9910
9911
  # If the value was cached, stop now.  We just wanted to have am__tar
9912
  # and am__untar set.
9913
  test -n "${am_cv_prog_tar_$1}" && break
9914
9915
  # tar/untar a dummy directory, and stop if the command works
9916
  rm -rf conftest.dir
9917
  mkdir conftest.dir
9918
  echo GrepMe > conftest.dir/file
9919
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9920
  rm -rf conftest.dir
9921
  if test -s conftest.tar; then
9922
    AM_RUN_LOG([$am__untar <conftest.tar])
9923
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9924
  fi
9925
done
9926
rm -rf conftest.dir
9927
9928
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9929
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9930
AC_SUBST([am__tar])
9931
AC_SUBST([am__untar])
9932
]) # _AM_PROG_TAR
9933