~ubuntu-branches/ubuntu/precise/indicator-sound/precise-201111281906

33 by Ken VanDine
merged upstream tarball
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
97 by Ken VanDine
Merged
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
[m4_warning([this file was generated for autoconf 2.68.
33 by Ken VanDine
merged upstream tarball
18
You have another version of autoconf.  It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22
dnl AM_GCONF_SOURCE_2
23
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
24
dnl  (i.e. pass to gconftool-2
25
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
26
dnl  you should install foo.schemas files
27
dnl
28
29
AC_DEFUN([AM_GCONF_SOURCE_2],
30
[
31
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
32
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
33
  else
34
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
35
  fi
36
37
  AC_ARG_WITH([gconf-source],
38
	      AC_HELP_STRING([--with-gconf-source=sourceaddress],
39
			     [Config database for installing schema files.]),
40
	      [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
41
42
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
43
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
44
45
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
46
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
47
  fi
48
49
  AC_ARG_WITH([gconf-schema-file-dir],
50
	      AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
51
			     [Directory for installing schema files.]),
52
	      [GCONF_SCHEMA_FILE_DIR="$withval"],)
53
54
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
55
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
56
57
  AC_ARG_ENABLE(schemas-install,
58
  	AC_HELP_STRING([--disable-schemas-install],
59
		       [Disable the schemas installation]),
60
     [case ${enableval} in
61
       yes|no) ;;
62
       *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
63
      esac])
64
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
65
])
66
67
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
68
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
69
#
70
# This file is free software, distributed under the terms of the GNU
71
# General Public License.  As a special exception to the GNU General
72
# Public License, this file may be distributed as part of a program
73
# that contains a configuration script generated by Autoconf, under
74
# the same distribution terms as the rest of that program.
75
#
76
# This file can be copied and used freely without restrictions.  It can
77
# be used in projects which are not available under the GNU Public License
78
# but which still want to provide support for the GNU gettext functionality.
79
#
80
# Macro to add for using GNU gettext.
81
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
82
#
83
# Modified to never use included libintl. 
84
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
85
#
86
# Major rework to remove unused code
87
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
88
#
89
# Added better handling of ALL_LINGUAS from GNU gettext version 
90
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
91
#
92
# Modified to require ngettext
93
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
94
#
95
# We need this here as well, since someone might use autoconf-2.5x
96
# to configure GLib then an older version to configure a package
97
# using AM_GLIB_GNU_GETTEXT
98
AC_PREREQ(2.53)
99
100
dnl
101
dnl We go to great lengths to make sure that aclocal won't 
102
dnl try to pull in the installed version of these macros
103
dnl when running aclocal in the glib directory.
104
dnl
105
m4_copy([AC_DEFUN],[glib_DEFUN])
106
m4_copy([AC_REQUIRE],[glib_REQUIRE])
107
dnl
108
dnl At the end, if we're not within glib, we'll define the public
109
dnl definitions in terms of our private definitions.
110
dnl
111
112
# GLIB_LC_MESSAGES
113
#--------------------
114
glib_DEFUN([GLIB_LC_MESSAGES],
115
  [AC_CHECK_HEADERS([locale.h])
116
    if test $ac_cv_header_locale_h = yes; then
117
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
118
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
119
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
120
    if test $am_cv_val_LC_MESSAGES = yes; then
121
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
122
        [Define if your <locale.h> file defines LC_MESSAGES.])
123
    fi
124
  fi])
125
126
# GLIB_PATH_PROG_WITH_TEST
127
#----------------------------
128
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
129
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
130
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
131
[# Extract the first word of "$2", so it can be a program name with args.
132
set dummy $2; ac_word=[$]2
133
AC_MSG_CHECKING([for $ac_word])
134
AC_CACHE_VAL(ac_cv_path_$1,
135
[case "[$]$1" in
136
  /*)
137
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
138
  ;;
139
  *)
140
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
141
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
142
    test -z "$ac_dir" && ac_dir=.
143
    if test -f $ac_dir/$ac_word; then
144
      if [$3]; then
145
	ac_cv_path_$1="$ac_dir/$ac_word"
146
	break
147
      fi
148
    fi
149
  done
150
  IFS="$ac_save_ifs"
151
dnl If no 4th arg is given, leave the cache variable unset,
152
dnl so AC_PATH_PROGS will keep looking.
153
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
154
])dnl
155
  ;;
156
esac])dnl
157
$1="$ac_cv_path_$1"
158
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
159
  AC_MSG_RESULT([$]$1)
160
else
161
  AC_MSG_RESULT(no)
162
fi
163
AC_SUBST($1)dnl
164
])
165
166
# GLIB_WITH_NLS
167
#-----------------
168
glib_DEFUN([GLIB_WITH_NLS],
169
  dnl NLS is obligatory
170
  [USE_NLS=yes
171
    AC_SUBST(USE_NLS)
172
173
    gt_cv_have_gettext=no
174
175
    CATOBJEXT=NONE
176
    XGETTEXT=:
177
    INTLLIBS=
178
179
    AC_CHECK_HEADER(libintl.h,
180
     [gt_cv_func_dgettext_libintl="no"
181
      libintl_extra_libs=""
182
183
      #
184
      # First check in libc
185
      #
186
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
187
        [AC_TRY_LINK([
188
#include <libintl.h>
189
],
190
         [return !ngettext ("","", 1)],
191
	  gt_cv_func_ngettext_libc=yes,
192
          gt_cv_func_ngettext_libc=no)
193
        ])
194
  
195
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
196
	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
197
        	[AC_TRY_LINK([
198
#include <libintl.h>
199
],
200
	          [return !dgettext ("","")],
201
		  gt_cv_func_dgettext_libc=yes,
202
	          gt_cv_func_dgettext_libc=no)
203
        	])
204
      fi
205
  
206
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
207
        AC_CHECK_FUNCS(bind_textdomain_codeset)
208
      fi
209
210
      #
211
      # If we don't have everything we want, check in libintl
212
      #
213
      if test "$gt_cv_func_dgettext_libc" != "yes" \
214
	 || test "$gt_cv_func_ngettext_libc" != "yes" \
215
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
216
        
217
        AC_CHECK_LIB(intl, bindtextdomain,
218
	    [AC_CHECK_LIB(intl, ngettext,
219
		    [AC_CHECK_LIB(intl, dgettext,
220
			          gt_cv_func_dgettext_libintl=yes)])])
221
222
	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
223
	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
224
	  AC_MSG_RESULT([])
225
  	  AC_CHECK_LIB(intl, ngettext,
226
          	[AC_CHECK_LIB(intl, dcgettext,
227
		       [gt_cv_func_dgettext_libintl=yes
228
			libintl_extra_libs=-liconv],
229
			:,-liconv)],
230
		:,-liconv)
231
        fi
232
233
        #
234
        # If we found libintl, then check in it for bind_textdomain_codeset();
235
        # we'll prefer libc if neither have bind_textdomain_codeset(),
236
        # and both have dgettext and ngettext
237
        #
238
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
239
          glib_save_LIBS="$LIBS"
240
          LIBS="$LIBS -lintl $libintl_extra_libs"
241
          unset ac_cv_func_bind_textdomain_codeset
242
          AC_CHECK_FUNCS(bind_textdomain_codeset)
243
          LIBS="$glib_save_LIBS"
244
245
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
246
            gt_cv_func_dgettext_libc=no
247
          else
248
            if test "$gt_cv_func_dgettext_libc" = "yes" \
249
		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
250
              gt_cv_func_dgettext_libintl=no
251
            fi
252
          fi
253
        fi
254
      fi
255
256
      if test "$gt_cv_func_dgettext_libc" = "yes" \
257
	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
258
        gt_cv_have_gettext=yes
259
      fi
260
  
261
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
262
        INTLLIBS="-lintl $libintl_extra_libs"
263
      fi
264
  
265
      if test "$gt_cv_have_gettext" = "yes"; then
266
	AC_DEFINE(HAVE_GETTEXT,1,
267
	  [Define if the GNU gettext() function is already present or preinstalled.])
268
	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
269
	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
270
	if test "$MSGFMT" != "no"; then
271
          glib_save_LIBS="$LIBS"
272
          LIBS="$LIBS $INTLLIBS"
273
	  AC_CHECK_FUNCS(dcgettext)
274
	  MSGFMT_OPTS=
275
	  AC_MSG_CHECKING([if msgfmt accepts -c])
276
	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
277
msgid ""
278
msgstr ""
279
"Content-Type: text/plain; charset=UTF-8\n"
280
"Project-Id-Version: test 1.0\n"
281
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
282
"Last-Translator: test <foo@bar.xx>\n"
283
"Language-Team: C <LL@li.org>\n"
284
"MIME-Version: 1.0\n"
285
"Content-Transfer-Encoding: 8bit\n"
286
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
287
	  AC_SUBST(MSGFMT_OPTS)
288
	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
289
	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
290
	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
291
	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
292
			 return _nl_msg_cat_cntr],
293
	    [CATOBJEXT=.gmo 
294
             DATADIRNAME=share],
295
	    [case $host in
296
	    *-*-solaris*)
297
	    dnl On Solaris, if bind_textdomain_codeset is in libc,
298
	    dnl GNU format message catalog is always supported,
299
            dnl since both are added to the libc all together.
300
	    dnl Hence, we'd like to go with DATADIRNAME=share and
301
	    dnl and CATOBJEXT=.gmo in this case.
302
            AC_CHECK_FUNC(bind_textdomain_codeset,
303
	      [CATOBJEXT=.gmo 
304
               DATADIRNAME=share],
305
	      [CATOBJEXT=.mo
306
               DATADIRNAME=lib])
307
	    ;;
308
	    *)
309
	    CATOBJEXT=.mo
310
            DATADIRNAME=lib
311
	    ;;
312
	    esac])
313
          LIBS="$glib_save_LIBS"
314
	  INSTOBJEXT=.mo
315
	else
316
	  gt_cv_have_gettext=no
317
	fi
318
      fi
319
    ])
320
321
    if test "$gt_cv_have_gettext" = "yes" ; then
322
      AC_DEFINE(ENABLE_NLS, 1,
323
        [always defined to indicate that i18n is enabled])
324
    fi
325
326
    dnl Test whether we really found GNU xgettext.
327
    if test "$XGETTEXT" != ":"; then
328
      dnl If it is not GNU xgettext we define it as : so that the
329
      dnl Makefiles still can work.
330
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
331
        : ;
332
      else
333
        AC_MSG_RESULT(
334
	  [found xgettext program is not GNU xgettext; ignore it])
335
        XGETTEXT=":"
336
      fi
337
    fi
338
339
    # We need to process the po/ directory.
340
    POSUB=po
341
342
    AC_OUTPUT_COMMANDS(
343
      [case "$CONFIG_FILES" in *po/Makefile.in*)
344
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
345
      esac])
346
347
    dnl These rules are solely for the distribution goal.  While doing this
348
    dnl we only have to keep exactly one list of the available catalogs
28.9.16 by Sebastien Bacher
Import upstream version 0.4.0
349
    dnl in configure.ac.
33 by Ken VanDine
merged upstream tarball
350
    for lang in $ALL_LINGUAS; do
351
      GMOFILES="$GMOFILES $lang.gmo"
352
      POFILES="$POFILES $lang.po"
353
    done
354
355
    dnl Make all variables we use known to autoconf.
356
    AC_SUBST(CATALOGS)
357
    AC_SUBST(CATOBJEXT)
358
    AC_SUBST(DATADIRNAME)
359
    AC_SUBST(GMOFILES)
360
    AC_SUBST(INSTOBJEXT)
361
    AC_SUBST(INTLLIBS)
362
    AC_SUBST(PO_IN_DATADIR_TRUE)
363
    AC_SUBST(PO_IN_DATADIR_FALSE)
364
    AC_SUBST(POFILES)
365
    AC_SUBST(POSUB)
366
  ])
367
368
# AM_GLIB_GNU_GETTEXT
369
# -------------------
370
# Do checks necessary for use of gettext. If a suitable implementation 
371
# of gettext is found in either in libintl or in the C library,
372
# it will set INTLLIBS to the libraries needed for use of gettext
373
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
374
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
375
# on various variables needed by the Makefile.in.in installed by 
376
# glib-gettextize.
377
dnl
378
glib_DEFUN([GLIB_GNU_GETTEXT],
379
  [AC_REQUIRE([AC_PROG_CC])dnl
380
   AC_REQUIRE([AC_HEADER_STDC])dnl
381
   
382
   GLIB_LC_MESSAGES
383
   GLIB_WITH_NLS
384
385
   if test "$gt_cv_have_gettext" = "yes"; then
386
     if test "x$ALL_LINGUAS" = "x"; then
387
       LINGUAS=
388
     else
389
       AC_MSG_CHECKING(for catalogs to be installed)
390
       NEW_LINGUAS=
391
       for presentlang in $ALL_LINGUAS; do
392
         useit=no
393
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
394
           desiredlanguages="$LINGUAS"
395
         else
396
           desiredlanguages="$ALL_LINGUAS"
397
         fi
398
         for desiredlang in $desiredlanguages; do
399
 	   # Use the presentlang catalog if desiredlang is
400
           #   a. equal to presentlang, or
401
           #   b. a variant of presentlang (because in this case,
402
           #      presentlang can be used as a fallback for messages
403
           #      which are not translated in the desiredlang catalog).
404
           case "$desiredlang" in
405
             "$presentlang"*) useit=yes;;
406
           esac
407
         done
408
         if test $useit = yes; then
409
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
410
         fi
411
       done
412
       LINGUAS=$NEW_LINGUAS
413
       AC_MSG_RESULT($LINGUAS)
414
     fi
415
416
     dnl Construct list of names of catalog files to be constructed.
417
     if test -n "$LINGUAS"; then
418
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
419
     fi
420
   fi
421
422
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
423
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
424
   dnl Try to locate is.
425
   MKINSTALLDIRS=
426
   if test -n "$ac_aux_dir"; then
427
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
428
   fi
429
   if test -z "$MKINSTALLDIRS"; then
430
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
431
   fi
432
   AC_SUBST(MKINSTALLDIRS)
433
434
   dnl Generate list of files to be processed by xgettext which will
435
   dnl be included in po/Makefile.
436
   test -d po || mkdir po
437
   if test "x$srcdir" != "x."; then
438
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
439
       posrcprefix="$srcdir/"
440
     else
441
       posrcprefix="../$srcdir/"
442
     fi
443
   else
444
     posrcprefix="../"
445
   fi
446
   rm -f po/POTFILES
447
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
448
	< $srcdir/po/POTFILES.in > po/POTFILES
449
  ])
450
451
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
452
# -------------------------------
453
# Define VARIABLE to the location where catalog files will
454
# be installed by po/Makefile.
455
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
456
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
457
glib_save_prefix="$prefix"
458
glib_save_exec_prefix="$exec_prefix"
459
glib_save_datarootdir="$datarootdir"
460
test "x$prefix" = xNONE && prefix=$ac_default_prefix
461
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
462
datarootdir=`eval echo "${datarootdir}"`
463
if test "x$CATOBJEXT" = "x.mo" ; then
464
  localedir=`eval echo "${libdir}/locale"`
465
else
466
  localedir=`eval echo "${datadir}/locale"`
467
fi
468
prefix="$glib_save_prefix"
469
exec_prefix="$glib_save_exec_prefix"
470
datarootdir="$glib_save_datarootdir"
471
AC_DEFINE_UNQUOTED($1, "$localedir",
472
  [Define the location where the catalogs will be installed])
473
])
474
475
dnl
476
dnl Now the definitions that aclocal will find
477
dnl
28.9.16 by Sebastien Bacher
Import upstream version 0.4.0
478
ifdef(glib_configure_ac,[],[
33 by Ken VanDine
merged upstream tarball
479
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
480
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
481
])dnl
482
483
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
484
# 
485
# Create a temporary file with TEST-FILE as its contents and pass the
486
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
487
# 0 and perform ACTION-IF-FAIL for any other exit status.
488
AC_DEFUN([GLIB_RUN_PROG],
489
[cat >conftest.foo <<_ACEOF
490
$2
491
_ACEOF
492
if AC_RUN_LOG([$1 conftest.foo]); then
493
  m4_ifval([$3], [$3], [:])
494
m4_ifvaln([$4], [else $4])dnl
495
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
496
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
497
fi])
498
499
28.51.17 by Ken VanDine
Import upstream version 0.5.3
500
dnl GLIB_GSETTINGS
501
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
502
dnl the schema should be compiled
503
dnl
504
505
AC_DEFUN([GLIB_GSETTINGS],
506
[
507
  m4_pattern_allow([AM_V_GEN])
508
  AC_ARG_ENABLE(schemas-compile,
97 by Ken VanDine
Merged
509
                AS_HELP_STRING([--disable-schemas-compile],
28.51.17 by Ken VanDine
Import upstream version 0.5.3
510
                               [Disable regeneration of gschemas.compiled on install]),
511
                [case ${enableval} in
512
                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
513
                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
514
                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
515
                 esac])
516
  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
517
  PKG_PROG_PKG_CONFIG([0.16])
518
  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
519
  if test x$cross_compiling != xyes; then
520
    GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
521
  else
522
    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
523
  fi
524
  AC_SUBST(GLIB_COMPILE_SCHEMAS)
525
  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
526
    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
527
  else
528
    ifelse([$1],,[:],[$1])
529
  fi
530
531
  GSETTINGS_RULES='
532
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
533
534
mostlyclean-am: clean-gsettings-schemas
535
536
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
537
538
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
28.51.18 by Ken VanDine
Import upstream version 0.5.4
539
	$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
28.51.17 by Ken VanDine
Import upstream version 0.5.3
540
541
all-am: $(gsettings_SCHEMAS:.xml=.valid)
542
uninstall-am: uninstall-gsettings-schemas
543
install-data-am: install-gsettings-schemas
544
545
.SECONDARY: $(gsettings_SCHEMAS)
546
547
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
548
	@$(NORMAL_INSTALL)
28.51.18 by Ken VanDine
Import upstream version 0.5.4
549
	if test -n "$^"; then \
550
		test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
551
		$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
552
		test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
553
	fi
28.51.17 by Ken VanDine
Import upstream version 0.5.3
554
555
uninstall-gsettings-schemas:
556
	@$(NORMAL_UNINSTALL)
557
	@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
558
	files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
559
	test -n "$$files" || exit 0; \
560
	echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
561
	cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
562
	test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
563
564
clean-gsettings-schemas:
565
	rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
566
567
ifdef gsettings_ENUM_NAMESPACE
568
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
28.51.18 by Ken VanDine
Import upstream version 0.5.4
569
	$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
28.51.17 by Ken VanDine
Import upstream version 0.5.3
570
endif
571
'
572
  _GSETTINGS_SUBST(GSETTINGS_RULES)
573
])
574
575
dnl _GSETTINGS_SUBST(VARIABLE)
576
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
577
AC_DEFUN([_GSETTINGS_SUBST],
578
[
579
AC_SUBST([$1])
580
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
581
]
582
)
583
28.51.38 by Ken VanDine
Import upstream version 0.7.5
584
585
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
586
# serial 40 IT_PROG_INTLTOOL
587
AC_DEFUN([IT_PROG_INTLTOOL], [
588
AC_PREREQ([2.50])dnl
589
AC_REQUIRE([AM_NLS])dnl
590
591
case "$am__api_version" in
592
    1.[01234])
593
	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
594
    ;;
595
    *)
596
    ;;
597
esac
598
599
if test -n "$1"; then
600
    AC_MSG_CHECKING([for intltool >= $1])
601
602
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
603
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
604
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
605
    ]
606
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
607
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
608
	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
609
fi
610
611
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
612
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
613
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
614
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
615
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
616
fi
617
618
  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 $< [$]@' 
619
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 $< [$]@' 
620
     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 $< [$]@' 
621
     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 $< [$]@' 
622
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
623
     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 $< [$]@' 
624
   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 $< [$]@' 
625
    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 $< [$]@' 
626
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 $< [$]@' 
627
       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 $< [$]@' 
628
      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 $< [$]@' 
629
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
630
      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 $< [$]@' 
631
      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 $< [$]@' 
632
    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 $< [$]@' 
633
  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 $< [$]@' 
634
    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 $< [$]@' 
635
    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 $< [$]@'
636
   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 $< [$]@'
637
638
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
639
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
640
_IT_SUBST(INTLTOOL_KEYS_RULE)
641
_IT_SUBST(INTLTOOL_PROP_RULE)
642
_IT_SUBST(INTLTOOL_OAF_RULE)
643
_IT_SUBST(INTLTOOL_PONG_RULE)
644
_IT_SUBST(INTLTOOL_SERVER_RULE)
645
_IT_SUBST(INTLTOOL_SHEET_RULE)
646
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
647
_IT_SUBST(INTLTOOL_UI_RULE)
648
_IT_SUBST(INTLTOOL_XAM_RULE)
649
_IT_SUBST(INTLTOOL_KBD_RULE)
650
_IT_SUBST(INTLTOOL_XML_RULE)
651
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
652
_IT_SUBST(INTLTOOL_CAVES_RULE)
653
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
654
_IT_SUBST(INTLTOOL_THEME_RULE)
655
_IT_SUBST(INTLTOOL_SERVICE_RULE)
656
_IT_SUBST(INTLTOOL_POLICY_RULE)
657
658
# Check the gettext tools to make sure they are GNU
659
AC_PATH_PROG(XGETTEXT, xgettext)
660
AC_PATH_PROG(MSGMERGE, msgmerge)
661
AC_PATH_PROG(MSGFMT, msgfmt)
662
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
663
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
664
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
665
fi
666
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
667
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
668
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
669
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
670
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
671
fi
672
673
AC_PATH_PROG(INTLTOOL_PERL, perl)
674
if test -z "$INTLTOOL_PERL"; then
675
   AC_MSG_ERROR([perl not found])
676
fi
677
AC_MSG_CHECKING([for perl >= 5.8.1])
678
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
679
if test $? -ne 0; then
680
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
681
else
682
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
683
   AC_MSG_RESULT([$IT_PERL_VERSION])
684
fi
685
if test "x$2" != "xno-xml"; then
686
   AC_MSG_CHECKING([for XML::Parser])
687
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
688
       AC_MSG_RESULT([ok])
689
   else
690
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
691
   fi
692
fi
693
694
# Substitute ALL_LINGUAS so we can use it in po/Makefile
695
AC_SUBST(ALL_LINGUAS)
696
697
# Set DATADIRNAME correctly if it is not set yet
698
# (copied from glib-gettext.m4)
699
if test -z "$DATADIRNAME"; then
700
  AC_LINK_IFELSE(
701
    [AC_LANG_PROGRAM([[]],
702
                     [[extern int _nl_msg_cat_cntr;
703
                       return _nl_msg_cat_cntr]])],
704
    [DATADIRNAME=share],
705
    [case $host in
706
    *-*-solaris*)
707
    dnl On Solaris, if bind_textdomain_codeset is in libc,
708
    dnl GNU format message catalog is always supported,
709
    dnl since both are added to the libc all together.
710
    dnl Hence, we'd like to go with DATADIRNAME=share
711
    dnl in this case.
712
    AC_CHECK_FUNC(bind_textdomain_codeset,
713
      [DATADIRNAME=share], [DATADIRNAME=lib])
714
    ;;
715
    *)
716
    [DATADIRNAME=lib]
717
    ;;
718
    esac])
719
fi
720
AC_SUBST(DATADIRNAME)
721
722
IT_PO_SUBDIR([po])
723
724
])
725
726
727
# IT_PO_SUBDIR(DIRNAME)
728
# ---------------------
729
# All po subdirs have to be declared with this macro; the subdir "po" is
730
# declared by IT_PROG_INTLTOOL.
731
#
732
AC_DEFUN([IT_PO_SUBDIR],
733
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
734
dnl
735
dnl The following CONFIG_COMMANDS should be executed at the very end
736
dnl of config.status.
737
AC_CONFIG_COMMANDS_PRE([
738
  AC_CONFIG_COMMANDS([$1/stamp-it], [
739
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
740
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
741
    fi
742
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
743
    >"$1/stamp-it.tmp"
744
    [sed '/^#/d
745
	 s/^[[].*] *//
746
	 /^[ 	]*$/d
747
	'"s|^|	$ac_top_srcdir/|" \
748
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
749
    ]
750
    [sed '/^POTFILES =/,/[^\\]$/ {
751
		/^POTFILES =/!d
752
		r $1/POTFILES
753
	  }
754
	 ' "$1/Makefile.in" >"$1/Makefile"]
755
    rm -f "$1/Makefile.tmp"
756
    mv "$1/stamp-it.tmp" "$1/stamp-it"
757
  ])
758
])dnl
759
])
760
761
# _IT_SUBST(VARIABLE)
762
# -------------------
763
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
764
#
765
AC_DEFUN([_IT_SUBST],
766
[
767
AC_SUBST([$1])
768
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
769
]
770
)
771
772
# deprecated macros
773
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
774
# A hint is needed for aclocal from Automake <= 1.9.4:
775
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
776
777
778
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
779
#
780
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
781
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
782
#                 Inc.
783
#   Written by Gordon Matzigkeit, 1996
784
#
785
# This file is free software; the Free Software Foundation gives
786
# unlimited permission to copy and/or distribute it, with or without
787
# modifications, as long as this notice is preserved.
788
789
m4_define([_LT_COPYING], [dnl
790
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
791
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
792
#                 Inc.
793
#   Written by Gordon Matzigkeit, 1996
794
#
795
#   This file is part of GNU Libtool.
796
#
797
# GNU Libtool is free software; you can redistribute it and/or
798
# modify it under the terms of the GNU General Public License as
799
# published by the Free Software Foundation; either version 2 of
800
# the License, or (at your option) any later version.
801
#
802
# As a special exception to the GNU General Public License,
803
# if you distribute this file as part of a program or library that
804
# is built using GNU Libtool, you may include this file under the
805
# same distribution terms that you use for the rest of that program.
806
#
807
# GNU Libtool is distributed in the hope that it will be useful,
808
# but WITHOUT ANY WARRANTY; without even the implied warranty of
809
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
810
# GNU General Public License for more details.
811
#
812
# You should have received a copy of the GNU General Public License
813
# along with GNU Libtool; see the file COPYING.  If not, a copy
814
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
815
# obtained by writing to the Free Software Foundation, Inc.,
816
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
817
])
818
819
# serial 57 LT_INIT
820
821
822
# LT_PREREQ(VERSION)
823
# ------------------
824
# Complain and exit if this libtool version is less that VERSION.
825
m4_defun([LT_PREREQ],
826
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
827
       [m4_default([$3],
828
		   [m4_fatal([Libtool version $1 or higher is required],
829
		             63)])],
830
       [$2])])
831
832
833
# _LT_CHECK_BUILDDIR
834
# ------------------
835
# Complain if the absolute build directory name contains unusual characters
836
m4_defun([_LT_CHECK_BUILDDIR],
837
[case `pwd` in
838
  *\ * | *\	*)
839
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
840
esac
841
])
842
843
844
# LT_INIT([OPTIONS])
845
# ------------------
846
AC_DEFUN([LT_INIT],
847
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
848
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
849
AC_BEFORE([$0], [LT_LANG])dnl
850
AC_BEFORE([$0], [LT_OUTPUT])dnl
851
AC_BEFORE([$0], [LTDL_INIT])dnl
852
m4_require([_LT_CHECK_BUILDDIR])dnl
853
854
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
855
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
856
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
857
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
858
dnl unless we require an AC_DEFUNed macro:
859
AC_REQUIRE([LTOPTIONS_VERSION])dnl
860
AC_REQUIRE([LTSUGAR_VERSION])dnl
861
AC_REQUIRE([LTVERSION_VERSION])dnl
862
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
863
m4_require([_LT_PROG_LTMAIN])dnl
864
865
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
866
867
dnl Parse OPTIONS
868
_LT_SET_OPTIONS([$0], [$1])
869
870
# This can be used to rebuild libtool when needed
871
LIBTOOL_DEPS="$ltmain"
872
873
# Always use our own libtool.
874
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
875
AC_SUBST(LIBTOOL)dnl
876
877
_LT_SETUP
878
879
# Only expand once:
880
m4_define([LT_INIT])
881
])# LT_INIT
882
883
# Old names:
884
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
885
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
886
dnl aclocal-1.4 backwards compatibility:
887
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
888
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
889
890
891
# _LT_CC_BASENAME(CC)
892
# -------------------
893
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
894
m4_defun([_LT_CC_BASENAME],
895
[for cc_temp in $1""; do
896
  case $cc_temp in
897
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
898
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
899
    \-*) ;;
900
    *) break;;
901
  esac
902
done
903
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
904
])
905
906
907
# _LT_FILEUTILS_DEFAULTS
908
# ----------------------
909
# It is okay to use these file commands and assume they have been set
910
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
911
m4_defun([_LT_FILEUTILS_DEFAULTS],
912
[: ${CP="cp -f"}
913
: ${MV="mv -f"}
914
: ${RM="rm -f"}
915
])# _LT_FILEUTILS_DEFAULTS
916
917
918
# _LT_SETUP
919
# ---------
920
m4_defun([_LT_SETUP],
921
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
922
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
923
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
924
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
925
926
_LT_DECL([], [host_alias], [0], [The host system])dnl
927
_LT_DECL([], [host], [0])dnl
928
_LT_DECL([], [host_os], [0])dnl
929
dnl
930
_LT_DECL([], [build_alias], [0], [The build system])dnl
931
_LT_DECL([], [build], [0])dnl
932
_LT_DECL([], [build_os], [0])dnl
933
dnl
934
AC_REQUIRE([AC_PROG_CC])dnl
935
AC_REQUIRE([LT_PATH_LD])dnl
936
AC_REQUIRE([LT_PATH_NM])dnl
937
dnl
938
AC_REQUIRE([AC_PROG_LN_S])dnl
939
test -z "$LN_S" && LN_S="ln -s"
940
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
941
dnl
942
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
943
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
944
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
945
dnl
946
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
947
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
948
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
949
m4_require([_LT_CMD_RELOAD])dnl
950
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
951
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
952
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
953
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
954
m4_require([_LT_WITH_SYSROOT])dnl
955
956
_LT_CONFIG_LIBTOOL_INIT([
957
# See if we are running on zsh, and set the options which allow our
958
# commands through without removal of \ escapes INIT.
959
if test -n "\${ZSH_VERSION+set}" ; then
960
   setopt NO_GLOB_SUBST
961
fi
962
])
963
if test -n "${ZSH_VERSION+set}" ; then
964
   setopt NO_GLOB_SUBST
965
fi
966
967
_LT_CHECK_OBJDIR
968
969
m4_require([_LT_TAG_COMPILER])dnl
970
971
case $host_os in
972
aix3*)
973
  # AIX sometimes has problems with the GCC collect2 program.  For some
974
  # reason, if we set the COLLECT_NAMES environment variable, the problems
975
  # vanish in a puff of smoke.
976
  if test "X${COLLECT_NAMES+set}" != Xset; then
977
    COLLECT_NAMES=
978
    export COLLECT_NAMES
979
  fi
980
  ;;
981
esac
982
983
# Global variables:
984
ofile=libtool
985
can_build_shared=yes
986
987
# All known linkers require a `.a' archive for static linking (except MSVC,
988
# which needs '.lib').
989
libext=a
990
991
with_gnu_ld="$lt_cv_prog_gnu_ld"
992
993
old_CC="$CC"
994
old_CFLAGS="$CFLAGS"
995
996
# Set sane defaults for various variables
997
test -z "$CC" && CC=cc
998
test -z "$LTCC" && LTCC=$CC
999
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1000
test -z "$LD" && LD=ld
1001
test -z "$ac_objext" && ac_objext=o
1002
1003
_LT_CC_BASENAME([$compiler])
1004
1005
# Only perform the check for file, if the check method requires it
1006
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1007
case $deplibs_check_method in
1008
file_magic*)
1009
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1010
    _LT_PATH_MAGIC
1011
  fi
1012
  ;;
1013
esac
1014
1015
# Use C for the default configuration in the libtool script
1016
LT_SUPPORTED_TAG([CC])
1017
_LT_LANG_C_CONFIG
1018
_LT_LANG_DEFAULT_CONFIG
1019
_LT_CONFIG_COMMANDS
1020
])# _LT_SETUP
1021
1022
1023
# _LT_PREPARE_SED_QUOTE_VARS
1024
# --------------------------
1025
# Define a few sed substitution that help us do robust quoting.
1026
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1027
[# Backslashify metacharacters that are still active within
1028
# double-quoted strings.
1029
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1030
1031
# Same as above, but do not quote variable references.
1032
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1033
1034
# Sed substitution to delay expansion of an escaped shell variable in a
1035
# double_quote_subst'ed string.
1036
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1037
1038
# Sed substitution to delay expansion of an escaped single quote.
1039
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1040
1041
# Sed substitution to avoid accidental globbing in evaled expressions
1042
no_glob_subst='s/\*/\\\*/g'
1043
])
1044
1045
# _LT_PROG_LTMAIN
1046
# ---------------
1047
# Note that this code is called both from `configure', and `config.status'
1048
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1049
# `config.status' has no value for ac_aux_dir unless we are using Automake,
1050
# so we pass a copy along to make sure it has a sensible value anyway.
1051
m4_defun([_LT_PROG_LTMAIN],
1052
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1053
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1054
ltmain="$ac_aux_dir/ltmain.sh"
1055
])# _LT_PROG_LTMAIN
1056
1057
1058
1059
# So that we can recreate a full libtool script including additional
1060
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1061
# in macros and then make a single call at the end using the `libtool'
1062
# label.
1063
1064
1065
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1066
# ----------------------------------------
1067
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1068
m4_define([_LT_CONFIG_LIBTOOL_INIT],
1069
[m4_ifval([$1],
1070
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1071
                     [$1
1072
])])])
1073
1074
# Initialize.
1075
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1076
1077
1078
# _LT_CONFIG_LIBTOOL([COMMANDS])
1079
# ------------------------------
1080
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1081
m4_define([_LT_CONFIG_LIBTOOL],
1082
[m4_ifval([$1],
1083
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1084
                     [$1
1085
])])])
1086
1087
# Initialize.
1088
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1089
1090
1091
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1092
# -----------------------------------------------------
1093
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1094
[_LT_CONFIG_LIBTOOL([$1])
1095
_LT_CONFIG_LIBTOOL_INIT([$2])
1096
])
1097
1098
1099
# _LT_FORMAT_COMMENT([COMMENT])
1100
# -----------------------------
1101
# Add leading comment marks to the start of each line, and a trailing
1102
# full-stop to the whole comment if one is not present already.
1103
m4_define([_LT_FORMAT_COMMENT],
1104
[m4_ifval([$1], [
1105
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1106
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1107
)])
1108
1109
1110
1111
1112
1113
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1114
# -------------------------------------------------------------------
1115
# CONFIGNAME is the name given to the value in the libtool script.
1116
# VARNAME is the (base) name used in the configure script.
1117
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1118
# VARNAME.  Any other value will be used directly.
1119
m4_define([_LT_DECL],
1120
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1121
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1122
	[m4_ifval([$1], [$1], [$2])])
1123
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1124
    m4_ifval([$4],
1125
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1126
    lt_dict_add_subkey([lt_decl_dict], [$2],
1127
	[tagged?], [m4_ifval([$5], [yes], [no])])])
1128
])
1129
1130
1131
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1132
# --------------------------------------------------------
1133
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1134
1135
1136
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1137
# ------------------------------------------------
1138
m4_define([lt_decl_tag_varnames],
1139
[_lt_decl_filter([tagged?], [yes], $@)])
1140
1141
1142
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1143
# ---------------------------------------------------------
1144
m4_define([_lt_decl_filter],
1145
[m4_case([$#],
1146
  [0], [m4_fatal([$0: too few arguments: $#])],
1147
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1148
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1149
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1150
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1151
])
1152
1153
1154
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1155
# --------------------------------------------------
1156
m4_define([lt_decl_quote_varnames],
1157
[_lt_decl_filter([value], [1], $@)])
1158
1159
1160
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1161
# ---------------------------------------------------
1162
m4_define([lt_decl_dquote_varnames],
1163
[_lt_decl_filter([value], [2], $@)])
1164
1165
1166
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1167
# ---------------------------------------------------
1168
m4_define([lt_decl_varnames_tagged],
1169
[m4_assert([$# <= 2])dnl
1170
_$0(m4_quote(m4_default([$1], [[, ]])),
1171
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1172
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1173
m4_define([_lt_decl_varnames_tagged],
1174
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1175
1176
1177
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1178
# ------------------------------------------------
1179
m4_define([lt_decl_all_varnames],
1180
[_$0(m4_quote(m4_default([$1], [[, ]])),
1181
     m4_if([$2], [],
1182
	   m4_quote(lt_decl_varnames),
1183
	m4_quote(m4_shift($@))))[]dnl
1184
])
1185
m4_define([_lt_decl_all_varnames],
1186
[lt_join($@, lt_decl_varnames_tagged([$1],
1187
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1188
])
1189
1190
1191
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1192
# ------------------------------------
1193
# Quote a variable value, and forward it to `config.status' so that its
1194
# declaration there will have the same value as in `configure'.  VARNAME
1195
# must have a single quote delimited value for this to work.
1196
m4_define([_LT_CONFIG_STATUS_DECLARE],
1197
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1198
1199
1200
# _LT_CONFIG_STATUS_DECLARATIONS
1201
# ------------------------------
1202
# We delimit libtool config variables with single quotes, so when
1203
# we write them to config.status, we have to be sure to quote all
1204
# embedded single quotes properly.  In configure, this macro expands
1205
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1206
#
1207
#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1208
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1209
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1210
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1211
1212
1213
# _LT_LIBTOOL_TAGS
1214
# ----------------
1215
# Output comment and list of tags supported by the script
1216
m4_defun([_LT_LIBTOOL_TAGS],
1217
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1218
available_tags="_LT_TAGS"dnl
1219
])
1220
1221
1222
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1223
# -----------------------------------
1224
# Extract the dictionary values for VARNAME (optionally with TAG) and
1225
# expand to a commented shell variable setting:
1226
#
1227
#    # Some comment about what VAR is for.
1228
#    visible_name=$lt_internal_name
1229
m4_define([_LT_LIBTOOL_DECLARE],
1230
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1231
					   [description])))[]dnl
1232
m4_pushdef([_libtool_name],
1233
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1234
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1235
    [0], [_libtool_name=[$]$1],
1236
    [1], [_libtool_name=$lt_[]$1],
1237
    [2], [_libtool_name=$lt_[]$1],
1238
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1239
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1240
])
1241
1242
1243
# _LT_LIBTOOL_CONFIG_VARS
1244
# -----------------------
1245
# Produce commented declarations of non-tagged libtool config variables
1246
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1247
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1248
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1249
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1250
[m4_foreach([_lt_var],
1251
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1252
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1253
1254
1255
# _LT_LIBTOOL_TAG_VARS(TAG)
1256
# -------------------------
1257
m4_define([_LT_LIBTOOL_TAG_VARS],
1258
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1259
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1260
1261
1262
# _LT_TAGVAR(VARNAME, [TAGNAME])
1263
# ------------------------------
1264
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1265
1266
1267
# _LT_CONFIG_COMMANDS
1268
# -------------------
1269
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1270
# variables for single and double quote escaping we saved from calls
1271
# to _LT_DECL, we can put quote escaped variables declarations
1272
# into `config.status', and then the shell code to quote escape them in
1273
# for loops in `config.status'.  Finally, any additional code accumulated
1274
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1275
m4_defun([_LT_CONFIG_COMMANDS],
1276
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1277
	dnl If the libtool generation code has been placed in $CONFIG_LT,
1278
	dnl instead of duplicating it all over again into config.status,
1279
	dnl then we will have config.status run $CONFIG_LT later, so it
1280
	dnl needs to know what name is stored there:
1281
        [AC_CONFIG_COMMANDS([libtool],
1282
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1283
    dnl If the libtool generation code is destined for config.status,
1284
    dnl expand the accumulated commands and init code now:
1285
    [AC_CONFIG_COMMANDS([libtool],
1286
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1287
])#_LT_CONFIG_COMMANDS
1288
1289
1290
# Initialize.
1291
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1292
[
1293
1294
# The HP-UX ksh and POSIX shell print the target directory to stdout
1295
# if CDPATH is set.
1296
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1297
1298
sed_quote_subst='$sed_quote_subst'
1299
double_quote_subst='$double_quote_subst'
1300
delay_variable_subst='$delay_variable_subst'
1301
_LT_CONFIG_STATUS_DECLARATIONS
1302
LTCC='$LTCC'
1303
LTCFLAGS='$LTCFLAGS'
1304
compiler='$compiler_DEFAULT'
1305
1306
# A function that is used when there is no print builtin or printf.
1307
func_fallback_echo ()
1308
{
1309
  eval 'cat <<_LTECHO_EOF
1310
\$[]1
1311
_LTECHO_EOF'
1312
}
1313
1314
# Quote evaled strings.
1315
for var in lt_decl_all_varnames([[ \
1316
]], lt_decl_quote_varnames); do
1317
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1318
    *[[\\\\\\\`\\"\\\$]]*)
1319
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1320
      ;;
1321
    *)
1322
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1323
      ;;
1324
    esac
1325
done
1326
1327
# Double-quote double-evaled strings.
1328
for var in lt_decl_all_varnames([[ \
1329
]], lt_decl_dquote_varnames); do
1330
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1331
    *[[\\\\\\\`\\"\\\$]]*)
1332
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1333
      ;;
1334
    *)
1335
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1336
      ;;
1337
    esac
1338
done
1339
1340
_LT_OUTPUT_LIBTOOL_INIT
1341
])
1342
1343
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1344
# ------------------------------------
1345
# Generate a child script FILE with all initialization necessary to
1346
# reuse the environment learned by the parent script, and make the
1347
# file executable.  If COMMENT is supplied, it is inserted after the
1348
# `#!' sequence but before initialization text begins.  After this
1349
# macro, additional text can be appended to FILE to form the body of
1350
# the child script.  The macro ends with non-zero status if the
1351
# file could not be fully written (such as if the disk is full).
1352
m4_ifdef([AS_INIT_GENERATED],
1353
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1354
[m4_defun([_LT_GENERATED_FILE_INIT],
1355
[m4_require([AS_PREPARE])]dnl
1356
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1357
[lt_write_fail=0
1358
cat >$1 <<_ASEOF || lt_write_fail=1
1359
#! $SHELL
1360
# Generated by $as_me.
1361
$2
1362
SHELL=\${CONFIG_SHELL-$SHELL}
1363
export SHELL
1364
_ASEOF
1365
cat >>$1 <<\_ASEOF || lt_write_fail=1
1366
AS_SHELL_SANITIZE
1367
_AS_PREPARE
1368
exec AS_MESSAGE_FD>&1
1369
_ASEOF
1370
test $lt_write_fail = 0 && chmod +x $1[]dnl
1371
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1372
1373
# LT_OUTPUT
1374
# ---------
1375
# This macro allows early generation of the libtool script (before
1376
# AC_OUTPUT is called), incase it is used in configure for compilation
1377
# tests.
1378
AC_DEFUN([LT_OUTPUT],
1379
[: ${CONFIG_LT=./config.lt}
1380
AC_MSG_NOTICE([creating $CONFIG_LT])
1381
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1382
[# Run this file to recreate a libtool stub with the current configuration.])
1383
1384
cat >>"$CONFIG_LT" <<\_LTEOF
1385
lt_cl_silent=false
1386
exec AS_MESSAGE_LOG_FD>>config.log
1387
{
1388
  echo
1389
  AS_BOX([Running $as_me.])
1390
} >&AS_MESSAGE_LOG_FD
1391
1392
lt_cl_help="\
1393
\`$as_me' creates a local libtool stub from the current configuration,
1394
for use in further configure time tests before the real libtool is
1395
generated.
1396
1397
Usage: $[0] [[OPTIONS]]
1398
1399
  -h, --help      print this help, then exit
1400
  -V, --version   print version number, then exit
1401
  -q, --quiet     do not print progress messages
1402
  -d, --debug     don't remove temporary files
1403
1404
Report bugs to <bug-libtool@gnu.org>."
1405
1406
lt_cl_version="\
1407
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1408
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1409
configured by $[0], generated by m4_PACKAGE_STRING.
1410
1411
Copyright (C) 2010 Free Software Foundation, Inc.
1412
This config.lt script is free software; the Free Software Foundation
1413
gives unlimited permision to copy, distribute and modify it."
1414
1415
while test $[#] != 0
1416
do
1417
  case $[1] in
1418
    --version | --v* | -V )
1419
      echo "$lt_cl_version"; exit 0 ;;
1420
    --help | --h* | -h )
1421
      echo "$lt_cl_help"; exit 0 ;;
1422
    --debug | --d* | -d )
1423
      debug=: ;;
1424
    --quiet | --q* | --silent | --s* | -q )
1425
      lt_cl_silent=: ;;
1426
1427
    -*) AC_MSG_ERROR([unrecognized option: $[1]
1428
Try \`$[0] --help' for more information.]) ;;
1429
1430
    *) AC_MSG_ERROR([unrecognized argument: $[1]
1431
Try \`$[0] --help' for more information.]) ;;
1432
  esac
1433
  shift
1434
done
1435
1436
if $lt_cl_silent; then
1437
  exec AS_MESSAGE_FD>/dev/null
1438
fi
1439
_LTEOF
1440
1441
cat >>"$CONFIG_LT" <<_LTEOF
1442
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1443
_LTEOF
1444
1445
cat >>"$CONFIG_LT" <<\_LTEOF
1446
AC_MSG_NOTICE([creating $ofile])
1447
_LT_OUTPUT_LIBTOOL_COMMANDS
1448
AS_EXIT(0)
1449
_LTEOF
1450
chmod +x "$CONFIG_LT"
1451
1452
# configure is writing to config.log, but config.lt does its own redirection,
1453
# appending to config.log, which fails on DOS, as config.log is still kept
1454
# open by configure.  Here we exec the FD to /dev/null, effectively closing
1455
# config.log, so it can be properly (re)opened and appended to by config.lt.
1456
lt_cl_success=:
1457
test "$silent" = yes &&
1458
  lt_config_lt_args="$lt_config_lt_args --quiet"
1459
exec AS_MESSAGE_LOG_FD>/dev/null
1460
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1461
exec AS_MESSAGE_LOG_FD>>config.log
1462
$lt_cl_success || AS_EXIT(1)
1463
])# LT_OUTPUT
1464
1465
1466
# _LT_CONFIG(TAG)
1467
# ---------------
1468
# If TAG is the built-in tag, create an initial libtool script with a
1469
# default configuration from the untagged config vars.  Otherwise add code
1470
# to config.status for appending the configuration named by TAG from the
1471
# matching tagged config vars.
1472
m4_defun([_LT_CONFIG],
1473
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1474
_LT_CONFIG_SAVE_COMMANDS([
1475
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1476
  m4_if(_LT_TAG, [C], [
1477
    # See if we are running on zsh, and set the options which allow our
1478
    # commands through without removal of \ escapes.
1479
    if test -n "${ZSH_VERSION+set}" ; then
1480
      setopt NO_GLOB_SUBST
1481
    fi
1482
1483
    cfgfile="${ofile}T"
1484
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1485
    $RM "$cfgfile"
1486
1487
    cat <<_LT_EOF >> "$cfgfile"
1488
#! $SHELL
1489
1490
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1491
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1492
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1493
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1494
#
1495
_LT_COPYING
1496
_LT_LIBTOOL_TAGS
1497
1498
# ### BEGIN LIBTOOL CONFIG
1499
_LT_LIBTOOL_CONFIG_VARS
1500
_LT_LIBTOOL_TAG_VARS
1501
# ### END LIBTOOL CONFIG
1502
1503
_LT_EOF
1504
1505
  case $host_os in
1506
  aix3*)
1507
    cat <<\_LT_EOF >> "$cfgfile"
1508
# AIX sometimes has problems with the GCC collect2 program.  For some
1509
# reason, if we set the COLLECT_NAMES environment variable, the problems
1510
# vanish in a puff of smoke.
1511
if test "X${COLLECT_NAMES+set}" != Xset; then
1512
  COLLECT_NAMES=
1513
  export COLLECT_NAMES
1514
fi
1515
_LT_EOF
1516
    ;;
1517
  esac
1518
1519
  _LT_PROG_LTMAIN
1520
1521
  # We use sed instead of cat because bash on DJGPP gets confused if
1522
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1523
  # text mode, it properly converts lines to CR/LF.  This bash problem
1524
  # is reportedly fixed, but why not run on old versions too?
1525
  sed '$q' "$ltmain" >> "$cfgfile" \
1526
     || (rm -f "$cfgfile"; exit 1)
1527
1528
  _LT_PROG_REPLACE_SHELLFNS
1529
1530
   mv -f "$cfgfile" "$ofile" ||
1531
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1532
  chmod +x "$ofile"
1533
],
1534
[cat <<_LT_EOF >> "$ofile"
1535
1536
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1537
dnl in a comment (ie after a #).
1538
# ### BEGIN LIBTOOL TAG CONFIG: $1
1539
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1540
# ### END LIBTOOL TAG CONFIG: $1
1541
_LT_EOF
1542
])dnl /m4_if
1543
],
1544
[m4_if([$1], [], [
1545
    PACKAGE='$PACKAGE'
1546
    VERSION='$VERSION'
1547
    TIMESTAMP='$TIMESTAMP'
1548
    RM='$RM'
1549
    ofile='$ofile'], [])
1550
])dnl /_LT_CONFIG_SAVE_COMMANDS
1551
])# _LT_CONFIG
1552
1553
1554
# LT_SUPPORTED_TAG(TAG)
1555
# ---------------------
1556
# Trace this macro to discover what tags are supported by the libtool
1557
# --tag option, using:
1558
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1559
AC_DEFUN([LT_SUPPORTED_TAG], [])
1560
1561
1562
# C support is built-in for now
1563
m4_define([_LT_LANG_C_enabled], [])
1564
m4_define([_LT_TAGS], [])
1565
1566
1567
# LT_LANG(LANG)
1568
# -------------
1569
# Enable libtool support for the given language if not already enabled.
1570
AC_DEFUN([LT_LANG],
1571
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1572
m4_case([$1],
1573
  [C],			[_LT_LANG(C)],
1574
  [C++],		[_LT_LANG(CXX)],
1575
  [Java],		[_LT_LANG(GCJ)],
1576
  [Fortran 77],		[_LT_LANG(F77)],
1577
  [Fortran],		[_LT_LANG(FC)],
1578
  [Windows Resource],	[_LT_LANG(RC)],
1579
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1580
    [_LT_LANG($1)],
1581
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1582
])# LT_LANG
1583
1584
1585
# _LT_LANG(LANGNAME)
1586
# ------------------
1587
m4_defun([_LT_LANG],
1588
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1589
  [LT_SUPPORTED_TAG([$1])dnl
1590
  m4_append([_LT_TAGS], [$1 ])dnl
1591
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1592
  _LT_LANG_$1_CONFIG($1)])dnl
1593
])# _LT_LANG
1594
1595
1596
# _LT_LANG_DEFAULT_CONFIG
1597
# -----------------------
1598
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1599
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1600
  [LT_LANG(CXX)],
1601
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1602
1603
AC_PROVIDE_IFELSE([AC_PROG_F77],
1604
  [LT_LANG(F77)],
1605
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1606
1607
AC_PROVIDE_IFELSE([AC_PROG_FC],
1608
  [LT_LANG(FC)],
1609
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1610
1611
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1612
dnl pulling things in needlessly.
1613
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1614
  [LT_LANG(GCJ)],
1615
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1616
    [LT_LANG(GCJ)],
1617
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1618
      [LT_LANG(GCJ)],
1619
      [m4_ifdef([AC_PROG_GCJ],
1620
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1621
       m4_ifdef([A][M_PROG_GCJ],
1622
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1623
       m4_ifdef([LT_PROG_GCJ],
1624
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1625
1626
AC_PROVIDE_IFELSE([LT_PROG_RC],
1627
  [LT_LANG(RC)],
1628
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1629
])# _LT_LANG_DEFAULT_CONFIG
1630
1631
# Obsolete macros:
1632
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1633
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1634
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1635
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1636
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1637
dnl aclocal-1.4 backwards compatibility:
1638
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1639
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1640
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1641
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1642
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1643
1644
1645
# _LT_TAG_COMPILER
1646
# ----------------
1647
m4_defun([_LT_TAG_COMPILER],
1648
[AC_REQUIRE([AC_PROG_CC])dnl
1649
1650
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1651
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1652
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1653
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1654
1655
# If no C compiler was specified, use CC.
1656
LTCC=${LTCC-"$CC"}
1657
1658
# If no C compiler flags were specified, use CFLAGS.
1659
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1660
1661
# Allow CC to be a program name with arguments.
1662
compiler=$CC
1663
])# _LT_TAG_COMPILER
1664
1665
1666
# _LT_COMPILER_BOILERPLATE
1667
# ------------------------
1668
# Check for compiler boilerplate output or warnings with
1669
# the simple compiler test code.
1670
m4_defun([_LT_COMPILER_BOILERPLATE],
1671
[m4_require([_LT_DECL_SED])dnl
1672
ac_outfile=conftest.$ac_objext
1673
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1674
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1675
_lt_compiler_boilerplate=`cat conftest.err`
1676
$RM conftest*
1677
])# _LT_COMPILER_BOILERPLATE
1678
1679
1680
# _LT_LINKER_BOILERPLATE
1681
# ----------------------
1682
# Check for linker boilerplate output or warnings with
1683
# the simple link test code.
1684
m4_defun([_LT_LINKER_BOILERPLATE],
1685
[m4_require([_LT_DECL_SED])dnl
1686
ac_outfile=conftest.$ac_objext
1687
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1688
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1689
_lt_linker_boilerplate=`cat conftest.err`
1690
$RM -r conftest*
1691
])# _LT_LINKER_BOILERPLATE
1692
1693
# _LT_REQUIRED_DARWIN_CHECKS
1694
# -------------------------
1695
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1696
  case $host_os in
1697
    rhapsody* | darwin*)
1698
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1699
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1700
    AC_CHECK_TOOL([LIPO], [lipo], [:])
1701
    AC_CHECK_TOOL([OTOOL], [otool], [:])
1702
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1703
    _LT_DECL([], [DSYMUTIL], [1],
1704
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1705
    _LT_DECL([], [NMEDIT], [1],
1706
      [Tool to change global to local symbols on Mac OS X])
1707
    _LT_DECL([], [LIPO], [1],
1708
      [Tool to manipulate fat objects and archives on Mac OS X])
1709
    _LT_DECL([], [OTOOL], [1],
1710
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1711
    _LT_DECL([], [OTOOL64], [1],
1712
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1713
1714
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1715
      [lt_cv_apple_cc_single_mod=no
1716
      if test -z "${LT_MULTI_MODULE}"; then
1717
	# By default we will add the -single_module flag. You can override
1718
	# by either setting the environment variable LT_MULTI_MODULE
1719
	# non-empty at configure time, or by adding -multi_module to the
1720
	# link flags.
1721
	rm -rf libconftest.dylib*
1722
	echo "int foo(void){return 1;}" > conftest.c
1723
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1724
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1725
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1726
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1727
        _lt_result=$?
1728
	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1729
	  lt_cv_apple_cc_single_mod=yes
1730
	else
1731
	  cat conftest.err >&AS_MESSAGE_LOG_FD
1732
	fi
1733
	rm -rf libconftest.dylib*
1734
	rm -f conftest.*
1735
      fi])
1736
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1737
      [lt_cv_ld_exported_symbols_list],
1738
      [lt_cv_ld_exported_symbols_list=no
1739
      save_LDFLAGS=$LDFLAGS
1740
      echo "_main" > conftest.sym
1741
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1742
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1743
	[lt_cv_ld_exported_symbols_list=yes],
1744
	[lt_cv_ld_exported_symbols_list=no])
1745
	LDFLAGS="$save_LDFLAGS"
1746
    ])
1747
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1748
      [lt_cv_ld_force_load=no
1749
      cat > conftest.c << _LT_EOF
1750
int forced_loaded() { return 2;}
1751
_LT_EOF
1752
      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1753
      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1754
      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1755
      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1756
      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1757
      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1758
      cat > conftest.c << _LT_EOF
1759
int main() { return 0;}
1760
_LT_EOF
1761
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1762
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1763
      _lt_result=$?
1764
      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
1765
	lt_cv_ld_force_load=yes
1766
      else
1767
	cat conftest.err >&AS_MESSAGE_LOG_FD
1768
      fi
1769
        rm -f conftest.err libconftest.a conftest conftest.c
1770
        rm -rf conftest.dSYM
1771
    ])
1772
    case $host_os in
1773
    rhapsody* | darwin1.[[012]])
1774
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1775
    darwin1.*)
1776
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1777
    darwin*) # darwin 5.x on
1778
      # if running on 10.5 or later, the deployment target defaults
1779
      # to the OS version, if on x86, and 10.4, the deployment
1780
      # target defaults to 10.4. Don't you love it?
1781
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1782
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1783
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1784
	10.[[012]]*)
1785
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1786
	10.*)
1787
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1788
      esac
1789
    ;;
1790
  esac
1791
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1792
      _lt_dar_single_mod='$single_module'
1793
    fi
1794
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1795
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1796
    else
1797
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1798
    fi
1799
    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1800
      _lt_dsymutil='~$DSYMUTIL $lib || :'
1801
    else
1802
      _lt_dsymutil=
1803
    fi
1804
    ;;
1805
  esac
1806
])
1807
1808
1809
# _LT_DARWIN_LINKER_FEATURES
1810
# --------------------------
1811
# Checks for linker and compiler features on darwin
1812
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1813
[
1814
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1815
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1816
  _LT_TAGVAR(hardcode_direct, $1)=no
1817
  _LT_TAGVAR(hardcode_automatic, $1)=yes
1818
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1819
  if test "$lt_cv_ld_force_load" = "yes"; then
1820
    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1821
  else
1822
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1823
  fi
1824
  _LT_TAGVAR(link_all_deplibs, $1)=yes
1825
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1826
  case $cc_basename in
1827
     ifort*) _lt_dar_can_shared=yes ;;
1828
     *) _lt_dar_can_shared=$GCC ;;
1829
  esac
1830
  if test "$_lt_dar_can_shared" = "yes"; then
1831
    output_verbose_link_cmd=func_echo_all
1832
    _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}"
1833
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1834
    _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}"
1835
    _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}"
1836
    m4_if([$1], [CXX],
1837
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1838
      _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}"
1839
      _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}"
1840
    fi
1841
],[])
1842
  else
1843
  _LT_TAGVAR(ld_shlibs, $1)=no
1844
  fi
1845
])
1846
1847
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1848
# ----------------------------------
1849
# Links a minimal program and checks the executable
1850
# for the system default hardcoded library path. In most cases,
1851
# this is /usr/lib:/lib, but when the MPI compilers are used
1852
# the location of the communication and MPI libs are included too.
1853
# If we don't find anything, use the default library path according
1854
# to the aix ld manual.
1855
# Store the results from the different compilers for each TAGNAME.
1856
# Allow to override them for all tags through lt_cv_aix_libpath.
1857
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1858
[m4_require([_LT_DECL_SED])dnl
1859
if test "${lt_cv_aix_libpath+set}" = set; then
1860
  aix_libpath=$lt_cv_aix_libpath
1861
else
1862
  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1863
  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1864
  lt_aix_libpath_sed='[
1865
      /Import File Strings/,/^$/ {
1866
	  /^0/ {
1867
	      s/^0  *\([^ ]*\) *$/\1/
1868
	      p
1869
	  }
1870
      }]'
1871
  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1872
  # Check for a 64-bit object if we didn't find anything.
1873
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1874
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1875
  fi],[])
1876
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1877
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1878
  fi
1879
  ])
1880
  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1881
fi
1882
])# _LT_SYS_MODULE_PATH_AIX
1883
1884
1885
# _LT_SHELL_INIT(ARG)
1886
# -------------------
1887
m4_define([_LT_SHELL_INIT],
1888
[m4_divert_text([M4SH-INIT], [$1
1889
])])# _LT_SHELL_INIT
1890
1891
1892
1893
# _LT_PROG_ECHO_BACKSLASH
1894
# -----------------------
1895
# Find how we can fake an echo command that does not interpret backslash.
1896
# In particular, with Autoconf 2.60 or later we add some code to the start
1897
# of the generated configure script which will find a shell with a builtin
1898
# printf (which we can use as an echo command).
1899
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1900
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1901
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1902
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1903
1904
AC_MSG_CHECKING([how to print strings])
1905
# Test print first, because it will be a builtin if present.
1906
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1907
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1908
  ECHO='print -r --'
1909
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1910
  ECHO='printf %s\n'
1911
else
1912
  # Use this function as a fallback that always works.
1913
  func_fallback_echo ()
1914
  {
1915
    eval 'cat <<_LTECHO_EOF
1916
$[]1
1917
_LTECHO_EOF'
1918
  }
1919
  ECHO='func_fallback_echo'
1920
fi
1921
1922
# func_echo_all arg...
1923
# Invoke $ECHO with all args, space-separated.
1924
func_echo_all ()
1925
{
1926
    $ECHO "$*" 
1927
}
1928
1929
case "$ECHO" in
1930
  printf*) AC_MSG_RESULT([printf]) ;;
1931
  print*) AC_MSG_RESULT([print -r]) ;;
1932
  *) AC_MSG_RESULT([cat]) ;;
1933
esac
1934
1935
m4_ifdef([_AS_DETECT_SUGGESTED],
1936
[_AS_DETECT_SUGGESTED([
1937
  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1938
    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1939
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1940
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1941
    PATH=/empty FPATH=/empty; export PATH FPATH
1942
    test "X`printf %s $ECHO`" = "X$ECHO" \
1943
      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1944
1945
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1946
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1947
])# _LT_PROG_ECHO_BACKSLASH
1948
1949
1950
# _LT_WITH_SYSROOT
1951
# ----------------
1952
AC_DEFUN([_LT_WITH_SYSROOT],
1953
[AC_MSG_CHECKING([for sysroot])
1954
AC_ARG_WITH([sysroot],
1955
[  --with-sysroot[=DIR] Search for dependent libraries within DIR
1956
                        (or the compiler's sysroot if not specified).],
1957
[], [with_sysroot=no])
1958
1959
dnl lt_sysroot will always be passed unquoted.  We quote it here
1960
dnl in case the user passed a directory name.
1961
lt_sysroot=
1962
case ${with_sysroot} in #(
1963
 yes)
1964
   if test "$GCC" = yes; then
1965
     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1966
   fi
1967
   ;; #(
1968
 /*)
1969
   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1970
   ;; #(
1971
 no|'')
1972
   ;; #(
1973
 *)
1974
   AC_MSG_RESULT([${with_sysroot}])
1975
   AC_MSG_ERROR([The sysroot must be an absolute path.])
1976
   ;;
1977
esac
1978
1979
 AC_MSG_RESULT([${lt_sysroot:-no}])
1980
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1981
[dependent libraries, and in which our libraries should be installed.])])
1982
1983
# _LT_ENABLE_LOCK
1984
# ---------------
1985
m4_defun([_LT_ENABLE_LOCK],
1986
[AC_ARG_ENABLE([libtool-lock],
1987
  [AS_HELP_STRING([--disable-libtool-lock],
1988
    [avoid locking (might break parallel builds)])])
1989
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1990
1991
# Some flags need to be propagated to the compiler or linker for good
1992
# libtool support.
1993
case $host in
1994
ia64-*-hpux*)
1995
  # Find out which ABI we are using.
1996
  echo 'int i;' > conftest.$ac_ext
1997
  if AC_TRY_EVAL(ac_compile); then
1998
    case `/usr/bin/file conftest.$ac_objext` in
1999
      *ELF-32*)
2000
	HPUX_IA64_MODE="32"
2001
	;;
2002
      *ELF-64*)
2003
	HPUX_IA64_MODE="64"
2004
	;;
2005
    esac
2006
  fi
2007
  rm -rf conftest*
2008
  ;;
2009
*-*-irix6*)
2010
  # Find out which ABI we are using.
2011
  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2012
  if AC_TRY_EVAL(ac_compile); then
2013
    if test "$lt_cv_prog_gnu_ld" = yes; then
2014
      case `/usr/bin/file conftest.$ac_objext` in
2015
	*32-bit*)
2016
	  LD="${LD-ld} -melf32bsmip"
2017
	  ;;
2018
	*N32*)
2019
	  LD="${LD-ld} -melf32bmipn32"
2020
	  ;;
2021
	*64-bit*)
2022
	  LD="${LD-ld} -melf64bmip"
2023
	;;
2024
      esac
2025
    else
2026
      case `/usr/bin/file conftest.$ac_objext` in
2027
	*32-bit*)
2028
	  LD="${LD-ld} -32"
2029
	  ;;
2030
	*N32*)
2031
	  LD="${LD-ld} -n32"
2032
	  ;;
2033
	*64-bit*)
2034
	  LD="${LD-ld} -64"
2035
	  ;;
2036
      esac
2037
    fi
2038
  fi
2039
  rm -rf conftest*
2040
  ;;
2041
2042
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2043
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2044
  # Find out which ABI we are using.
2045
  echo 'int i;' > conftest.$ac_ext
2046
  if AC_TRY_EVAL(ac_compile); then
2047
    case `/usr/bin/file conftest.o` in
2048
      *32-bit*)
2049
	case $host in
2050
	  x86_64-*kfreebsd*-gnu)
2051
	    LD="${LD-ld} -m elf_i386_fbsd"
2052
	    ;;
2053
	  x86_64-*linux*)
2054
	    LD="${LD-ld} -m elf_i386"
2055
	    ;;
2056
	  ppc64-*linux*|powerpc64-*linux*)
2057
	    LD="${LD-ld} -m elf32ppclinux"
2058
	    ;;
2059
	  s390x-*linux*)
2060
	    LD="${LD-ld} -m elf_s390"
2061
	    ;;
2062
	  sparc64-*linux*)
2063
	    LD="${LD-ld} -m elf32_sparc"
2064
	    ;;
2065
	esac
2066
	;;
2067
      *64-bit*)
2068
	case $host in
2069
	  x86_64-*kfreebsd*-gnu)
2070
	    LD="${LD-ld} -m elf_x86_64_fbsd"
2071
	    ;;
2072
	  x86_64-*linux*)
2073
	    LD="${LD-ld} -m elf_x86_64"
2074
	    ;;
2075
	  ppc*-*linux*|powerpc*-*linux*)
2076
	    LD="${LD-ld} -m elf64ppc"
2077
	    ;;
2078
	  s390*-*linux*|s390*-*tpf*)
2079
	    LD="${LD-ld} -m elf64_s390"
2080
	    ;;
2081
	  sparc*-*linux*)
2082
	    LD="${LD-ld} -m elf64_sparc"
2083
	    ;;
2084
	esac
2085
	;;
2086
    esac
2087
  fi
2088
  rm -rf conftest*
2089
  ;;
2090
2091
*-*-sco3.2v5*)
2092
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2093
  SAVE_CFLAGS="$CFLAGS"
2094
  CFLAGS="$CFLAGS -belf"
2095
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2096
    [AC_LANG_PUSH(C)
2097
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2098
     AC_LANG_POP])
2099
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2100
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2101
    CFLAGS="$SAVE_CFLAGS"
2102
  fi
2103
  ;;
2104
sparc*-*solaris*)
2105
  # Find out which ABI we are using.
2106
  echo 'int i;' > conftest.$ac_ext
2107
  if AC_TRY_EVAL(ac_compile); then
2108
    case `/usr/bin/file conftest.o` in
2109
    *64-bit*)
2110
      case $lt_cv_prog_gnu_ld in
2111
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2112
      *)
2113
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2114
	  LD="${LD-ld} -64"
2115
	fi
2116
	;;
2117
      esac
2118
      ;;
2119
    esac
2120
  fi
2121
  rm -rf conftest*
2122
  ;;
2123
esac
2124
2125
need_locks="$enable_libtool_lock"
2126
])# _LT_ENABLE_LOCK
2127
2128
2129
# _LT_PROG_AR
2130
# -----------
2131
m4_defun([_LT_PROG_AR],
2132
[AC_CHECK_TOOLS(AR, [ar], false)
2133
: ${AR=ar}
2134
: ${AR_FLAGS=cru}
2135
_LT_DECL([], [AR], [1], [The archiver])
2136
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2137
2138
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2139
  [lt_cv_ar_at_file=no
2140
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2141
     [echo conftest.$ac_objext > conftest.lst
2142
      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2143
      AC_TRY_EVAL([lt_ar_try])
2144
      if test "$ac_status" -eq 0; then
2145
	# Ensure the archiver fails upon bogus file names.
2146
	rm -f conftest.$ac_objext libconftest.a
2147
	AC_TRY_EVAL([lt_ar_try])
2148
	if test "$ac_status" -ne 0; then
2149
          lt_cv_ar_at_file=@
2150
        fi
2151
      fi
2152
      rm -f conftest.* libconftest.a
2153
     ])
2154
  ])
2155
2156
if test "x$lt_cv_ar_at_file" = xno; then
2157
  archiver_list_spec=
2158
else
2159
  archiver_list_spec=$lt_cv_ar_at_file
2160
fi
2161
_LT_DECL([], [archiver_list_spec], [1],
2162
  [How to feed a file listing to the archiver])
2163
])# _LT_PROG_AR
2164
2165
2166
# _LT_CMD_OLD_ARCHIVE
2167
# -------------------
2168
m4_defun([_LT_CMD_OLD_ARCHIVE],
2169
[_LT_PROG_AR
2170
2171
AC_CHECK_TOOL(STRIP, strip, :)
2172
test -z "$STRIP" && STRIP=:
2173
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2174
2175
AC_CHECK_TOOL(RANLIB, ranlib, :)
2176
test -z "$RANLIB" && RANLIB=:
2177
_LT_DECL([], [RANLIB], [1],
2178
    [Commands used to install an old-style archive])
2179
2180
# Determine commands to create old-style static archives.
2181
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2182
old_postinstall_cmds='chmod 644 $oldlib'
2183
old_postuninstall_cmds=
2184
2185
if test -n "$RANLIB"; then
2186
  case $host_os in
2187
  openbsd*)
2188
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2189
    ;;
2190
  *)
2191
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2192
    ;;
2193
  esac
2194
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2195
fi
2196
2197
case $host_os in
2198
  darwin*)
2199
    lock_old_archive_extraction=yes ;;
2200
  *)
2201
    lock_old_archive_extraction=no ;;
2202
esac
2203
_LT_DECL([], [old_postinstall_cmds], [2])
2204
_LT_DECL([], [old_postuninstall_cmds], [2])
2205
_LT_TAGDECL([], [old_archive_cmds], [2],
2206
    [Commands used to build an old-style archive])
2207
_LT_DECL([], [lock_old_archive_extraction], [0],
2208
    [Whether to use a lock for old archive extraction])
2209
])# _LT_CMD_OLD_ARCHIVE
2210
2211
2212
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2213
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2214
# ----------------------------------------------------------------
2215
# Check whether the given compiler option works
2216
AC_DEFUN([_LT_COMPILER_OPTION],
2217
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2218
m4_require([_LT_DECL_SED])dnl
2219
AC_CACHE_CHECK([$1], [$2],
2220
  [$2=no
2221
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2222
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2223
   lt_compiler_flag="$3"
2224
   # Insert the option either (1) after the last *FLAGS variable, or
2225
   # (2) before a word containing "conftest.", or (3) at the end.
2226
   # Note that $ac_compile itself does not contain backslashes and begins
2227
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2228
   # The option is referenced via a variable to avoid confusing sed.
2229
   lt_compile=`echo "$ac_compile" | $SED \
2230
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2231
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2232
   -e 's:$: $lt_compiler_flag:'`
2233
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2234
   (eval "$lt_compile" 2>conftest.err)
2235
   ac_status=$?
2236
   cat conftest.err >&AS_MESSAGE_LOG_FD
2237
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2238
   if (exit $ac_status) && test -s "$ac_outfile"; then
2239
     # The compiler can only warn and ignore the option if not recognized
2240
     # So say no if there are warnings other than the usual output.
2241
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2242
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2243
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2244
       $2=yes
2245
     fi
2246
   fi
2247
   $RM conftest*
2248
])
2249
2250
if test x"[$]$2" = xyes; then
2251
    m4_if([$5], , :, [$5])
2252
else
2253
    m4_if([$6], , :, [$6])
2254
fi
2255
])# _LT_COMPILER_OPTION
2256
2257
# Old name:
2258
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2259
dnl aclocal-1.4 backwards compatibility:
2260
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2261
2262
2263
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2264
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2265
# ----------------------------------------------------
2266
# Check whether the given linker option works
2267
AC_DEFUN([_LT_LINKER_OPTION],
2268
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2269
m4_require([_LT_DECL_SED])dnl
2270
AC_CACHE_CHECK([$1], [$2],
2271
  [$2=no
2272
   save_LDFLAGS="$LDFLAGS"
2273
   LDFLAGS="$LDFLAGS $3"
2274
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2275
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2276
     # The linker can only warn and ignore the option if not recognized
2277
     # So say no if there are warnings
2278
     if test -s conftest.err; then
2279
       # Append any errors to the config.log.
2280
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2281
       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2282
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2283
       if diff conftest.exp conftest.er2 >/dev/null; then
2284
         $2=yes
2285
       fi
2286
     else
2287
       $2=yes
2288
     fi
2289
   fi
2290
   $RM -r conftest*
2291
   LDFLAGS="$save_LDFLAGS"
2292
])
2293
2294
if test x"[$]$2" = xyes; then
2295
    m4_if([$4], , :, [$4])
2296
else
2297
    m4_if([$5], , :, [$5])
2298
fi
2299
])# _LT_LINKER_OPTION
2300
2301
# Old name:
2302
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2303
dnl aclocal-1.4 backwards compatibility:
2304
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2305
2306
2307
# LT_CMD_MAX_LEN
2308
#---------------
2309
AC_DEFUN([LT_CMD_MAX_LEN],
2310
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2311
# find the maximum length of command line arguments
2312
AC_MSG_CHECKING([the maximum length of command line arguments])
2313
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2314
  i=0
2315
  teststring="ABCD"
2316
2317
  case $build_os in
2318
  msdosdjgpp*)
2319
    # On DJGPP, this test can blow up pretty badly due to problems in libc
2320
    # (any single argument exceeding 2000 bytes causes a buffer overrun
2321
    # during glob expansion).  Even if it were fixed, the result of this
2322
    # check would be larger than it should be.
2323
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2324
    ;;
2325
2326
  gnu*)
2327
    # Under GNU Hurd, this test is not required because there is
2328
    # no limit to the length of command line arguments.
2329
    # Libtool will interpret -1 as no limit whatsoever
2330
    lt_cv_sys_max_cmd_len=-1;
2331
    ;;
2332
2333
  cygwin* | mingw* | cegcc*)
2334
    # On Win9x/ME, this test blows up -- it succeeds, but takes
2335
    # about 5 minutes as the teststring grows exponentially.
2336
    # Worse, since 9x/ME are not pre-emptively multitasking,
2337
    # you end up with a "frozen" computer, even though with patience
2338
    # the test eventually succeeds (with a max line length of 256k).
2339
    # Instead, let's just punt: use the minimum linelength reported by
2340
    # all of the supported platforms: 8192 (on NT/2K/XP).
2341
    lt_cv_sys_max_cmd_len=8192;
2342
    ;;
2343
2344
  mint*)
2345
    # On MiNT this can take a long time and run out of memory.
2346
    lt_cv_sys_max_cmd_len=8192;
2347
    ;;
2348
2349
  amigaos*)
2350
    # On AmigaOS with pdksh, this test takes hours, literally.
2351
    # So we just punt and use a minimum line length of 8192.
2352
    lt_cv_sys_max_cmd_len=8192;
2353
    ;;
2354
2355
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2356
    # This has been around since 386BSD, at least.  Likely further.
2357
    if test -x /sbin/sysctl; then
2358
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2359
    elif test -x /usr/sbin/sysctl; then
2360
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2361
    else
2362
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2363
    fi
2364
    # And add a safety zone
2365
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2366
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2367
    ;;
2368
2369
  interix*)
2370
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2371
    lt_cv_sys_max_cmd_len=196608
2372
    ;;
2373
2374
  osf*)
2375
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2376
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2377
    # nice to cause kernel panics so lets avoid the loop below.
2378
    # First set a reasonable default.
2379
    lt_cv_sys_max_cmd_len=16384
2380
    #
2381
    if test -x /sbin/sysconfig; then
2382
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2383
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2384
      esac
2385
    fi
2386
    ;;
2387
  sco3.2v5*)
2388
    lt_cv_sys_max_cmd_len=102400
2389
    ;;
2390
  sysv5* | sco5v6* | sysv4.2uw2*)
2391
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2392
    if test -n "$kargmax"; then
2393
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2394
    else
2395
      lt_cv_sys_max_cmd_len=32768
2396
    fi
2397
    ;;
2398
  *)
2399
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2400
    if test -n "$lt_cv_sys_max_cmd_len"; then
2401
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2402
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2403
    else
2404
      # Make teststring a little bigger before we do anything with it.
2405
      # a 1K string should be a reasonable start.
2406
      for i in 1 2 3 4 5 6 7 8 ; do
2407
        teststring=$teststring$teststring
2408
      done
2409
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2410
      # If test is not a shell built-in, we'll probably end up computing a
2411
      # maximum length that is only half of the actual maximum length, but
2412
      # we can't tell.
2413
      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
2414
	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2415
	      test $i != 17 # 1/2 MB should be enough
2416
      do
2417
        i=`expr $i + 1`
2418
        teststring=$teststring$teststring
2419
      done
2420
      # Only check the string length outside the loop.
2421
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2422
      teststring=
2423
      # Add a significant safety factor because C++ compilers can tack on
2424
      # massive amounts of additional arguments before passing them to the
2425
      # linker.  It appears as though 1/2 is a usable value.
2426
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2427
    fi
2428
    ;;
2429
  esac
2430
])
2431
if test -n $lt_cv_sys_max_cmd_len ; then
2432
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2433
else
2434
  AC_MSG_RESULT(none)
2435
fi
2436
max_cmd_len=$lt_cv_sys_max_cmd_len
2437
_LT_DECL([], [max_cmd_len], [0],
2438
    [What is the maximum length of a command?])
2439
])# LT_CMD_MAX_LEN
2440
2441
# Old name:
2442
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2443
dnl aclocal-1.4 backwards compatibility:
2444
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2445
2446
2447
# _LT_HEADER_DLFCN
2448
# ----------------
2449
m4_defun([_LT_HEADER_DLFCN],
2450
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2451
])# _LT_HEADER_DLFCN
2452
2453
2454
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2455
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2456
# ----------------------------------------------------------------
2457
m4_defun([_LT_TRY_DLOPEN_SELF],
2458
[m4_require([_LT_HEADER_DLFCN])dnl
2459
if test "$cross_compiling" = yes; then :
2460
  [$4]
2461
else
2462
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2463
  lt_status=$lt_dlunknown
2464
  cat > conftest.$ac_ext <<_LT_EOF
2465
[#line $LINENO "configure"
2466
#include "confdefs.h"
2467
2468
#if HAVE_DLFCN_H
2469
#include <dlfcn.h>
2470
#endif
2471
2472
#include <stdio.h>
2473
2474
#ifdef RTLD_GLOBAL
2475
#  define LT_DLGLOBAL		RTLD_GLOBAL
2476
#else
2477
#  ifdef DL_GLOBAL
2478
#    define LT_DLGLOBAL		DL_GLOBAL
2479
#  else
2480
#    define LT_DLGLOBAL		0
2481
#  endif
2482
#endif
2483
2484
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2485
   find out it does not work in some platform. */
2486
#ifndef LT_DLLAZY_OR_NOW
2487
#  ifdef RTLD_LAZY
2488
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2489
#  else
2490
#    ifdef DL_LAZY
2491
#      define LT_DLLAZY_OR_NOW		DL_LAZY
2492
#    else
2493
#      ifdef RTLD_NOW
2494
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2495
#      else
2496
#        ifdef DL_NOW
2497
#          define LT_DLLAZY_OR_NOW	DL_NOW
2498
#        else
2499
#          define LT_DLLAZY_OR_NOW	0
2500
#        endif
2501
#      endif
2502
#    endif
2503
#  endif
2504
#endif
2505
2506
/* When -fvisbility=hidden is used, assume the code has been annotated
2507
   correspondingly for the symbols needed.  */
2508
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2509
int fnord () __attribute__((visibility("default")));
2510
#endif
2511
2512
int fnord () { return 42; }
2513
int main ()
2514
{
2515
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2516
  int status = $lt_dlunknown;
2517
2518
  if (self)
2519
    {
2520
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2521
      else
2522
        {
2523
	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2524
          else puts (dlerror ());
2525
	}
2526
      /* dlclose (self); */
2527
    }
2528
  else
2529
    puts (dlerror ());
2530
2531
  return status;
2532
}]
2533
_LT_EOF
2534
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2535
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2536
    lt_status=$?
2537
    case x$lt_status in
2538
      x$lt_dlno_uscore) $1 ;;
2539
      x$lt_dlneed_uscore) $2 ;;
2540
      x$lt_dlunknown|x*) $3 ;;
2541
    esac
2542
  else :
2543
    # compilation failed
2544
    $3
2545
  fi
2546
fi
2547
rm -fr conftest*
2548
])# _LT_TRY_DLOPEN_SELF
2549
2550
2551
# LT_SYS_DLOPEN_SELF
2552
# ------------------
2553
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2554
[m4_require([_LT_HEADER_DLFCN])dnl
2555
if test "x$enable_dlopen" != xyes; then
2556
  enable_dlopen=unknown
2557
  enable_dlopen_self=unknown
2558
  enable_dlopen_self_static=unknown
2559
else
2560
  lt_cv_dlopen=no
2561
  lt_cv_dlopen_libs=
2562
2563
  case $host_os in
2564
  beos*)
2565
    lt_cv_dlopen="load_add_on"
2566
    lt_cv_dlopen_libs=
2567
    lt_cv_dlopen_self=yes
2568
    ;;
2569
2570
  mingw* | pw32* | cegcc*)
2571
    lt_cv_dlopen="LoadLibrary"
2572
    lt_cv_dlopen_libs=
2573
    ;;
2574
2575
  cygwin*)
2576
    lt_cv_dlopen="dlopen"
2577
    lt_cv_dlopen_libs=
2578
    ;;
2579
2580
  darwin*)
2581
  # if libdl is installed we need to link against it
2582
    AC_CHECK_LIB([dl], [dlopen],
2583
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2584
    lt_cv_dlopen="dyld"
2585
    lt_cv_dlopen_libs=
2586
    lt_cv_dlopen_self=yes
2587
    ])
2588
    ;;
2589
2590
  *)
2591
    AC_CHECK_FUNC([shl_load],
2592
	  [lt_cv_dlopen="shl_load"],
2593
      [AC_CHECK_LIB([dld], [shl_load],
2594
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2595
	[AC_CHECK_FUNC([dlopen],
2596
	      [lt_cv_dlopen="dlopen"],
2597
	  [AC_CHECK_LIB([dl], [dlopen],
2598
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2599
	    [AC_CHECK_LIB([svld], [dlopen],
2600
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2601
	      [AC_CHECK_LIB([dld], [dld_link],
2602
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2603
	      ])
2604
	    ])
2605
	  ])
2606
	])
2607
      ])
2608
    ;;
2609
  esac
2610
2611
  if test "x$lt_cv_dlopen" != xno; then
2612
    enable_dlopen=yes
2613
  else
2614
    enable_dlopen=no
2615
  fi
2616
2617
  case $lt_cv_dlopen in
2618
  dlopen)
2619
    save_CPPFLAGS="$CPPFLAGS"
2620
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2621
2622
    save_LDFLAGS="$LDFLAGS"
2623
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2624
2625
    save_LIBS="$LIBS"
2626
    LIBS="$lt_cv_dlopen_libs $LIBS"
2627
2628
    AC_CACHE_CHECK([whether a program can dlopen itself],
2629
	  lt_cv_dlopen_self, [dnl
2630
	  _LT_TRY_DLOPEN_SELF(
2631
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2632
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2633
    ])
2634
2635
    if test "x$lt_cv_dlopen_self" = xyes; then
2636
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2637
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2638
	  lt_cv_dlopen_self_static, [dnl
2639
	  _LT_TRY_DLOPEN_SELF(
2640
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2641
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2642
      ])
2643
    fi
2644
2645
    CPPFLAGS="$save_CPPFLAGS"
2646
    LDFLAGS="$save_LDFLAGS"
2647
    LIBS="$save_LIBS"
2648
    ;;
2649
  esac
2650
2651
  case $lt_cv_dlopen_self in
2652
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2653
  *) enable_dlopen_self=unknown ;;
2654
  esac
2655
2656
  case $lt_cv_dlopen_self_static in
2657
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2658
  *) enable_dlopen_self_static=unknown ;;
2659
  esac
2660
fi
2661
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2662
	 [Whether dlopen is supported])
2663
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2664
	 [Whether dlopen of programs is supported])
2665
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2666
	 [Whether dlopen of statically linked programs is supported])
2667
])# LT_SYS_DLOPEN_SELF
2668
2669
# Old name:
2670
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2671
dnl aclocal-1.4 backwards compatibility:
2672
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2673
2674
2675
# _LT_COMPILER_C_O([TAGNAME])
2676
# ---------------------------
2677
# Check to see if options -c and -o are simultaneously supported by compiler.
2678
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2679
m4_defun([_LT_COMPILER_C_O],
2680
[m4_require([_LT_DECL_SED])dnl
2681
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2682
m4_require([_LT_TAG_COMPILER])dnl
2683
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2684
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2685
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2686
   $RM -r conftest 2>/dev/null
2687
   mkdir conftest
2688
   cd conftest
2689
   mkdir out
2690
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2691
2692
   lt_compiler_flag="-o out/conftest2.$ac_objext"
2693
   # Insert the option either (1) after the last *FLAGS variable, or
2694
   # (2) before a word containing "conftest.", or (3) at the end.
2695
   # Note that $ac_compile itself does not contain backslashes and begins
2696
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2697
   lt_compile=`echo "$ac_compile" | $SED \
2698
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2699
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2700
   -e 's:$: $lt_compiler_flag:'`
2701
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2702
   (eval "$lt_compile" 2>out/conftest.err)
2703
   ac_status=$?
2704
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2705
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2706
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2707
   then
2708
     # The compiler can only warn and ignore the option if not recognized
2709
     # So say no if there are warnings
2710
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2711
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2712
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2713
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2714
     fi
2715
   fi
2716
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2717
   $RM conftest*
2718
   # SGI C++ compiler will create directory out/ii_files/ for
2719
   # template instantiation
2720
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2721
   $RM out/* && rmdir out
2722
   cd ..
2723
   $RM -r conftest
2724
   $RM conftest*
2725
])
2726
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2727
	[Does compiler simultaneously support -c and -o options?])
2728
])# _LT_COMPILER_C_O
2729
2730
2731
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2732
# ----------------------------------
2733
# Check to see if we can do hard links to lock some files if needed
2734
m4_defun([_LT_COMPILER_FILE_LOCKS],
2735
[m4_require([_LT_ENABLE_LOCK])dnl
2736
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2737
_LT_COMPILER_C_O([$1])
2738
2739
hard_links="nottested"
2740
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2741
  # do not overwrite the value of need_locks provided by the user
2742
  AC_MSG_CHECKING([if we can lock with hard links])
2743
  hard_links=yes
2744
  $RM conftest*
2745
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2746
  touch conftest.a
2747
  ln conftest.a conftest.b 2>&5 || hard_links=no
2748
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2749
  AC_MSG_RESULT([$hard_links])
2750
  if test "$hard_links" = no; then
2751
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2752
    need_locks=warn
2753
  fi
2754
else
2755
  need_locks=no
2756
fi
2757
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2758
])# _LT_COMPILER_FILE_LOCKS
2759
2760
2761
# _LT_CHECK_OBJDIR
2762
# ----------------
2763
m4_defun([_LT_CHECK_OBJDIR],
2764
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2765
[rm -f .libs 2>/dev/null
2766
mkdir .libs 2>/dev/null
2767
if test -d .libs; then
2768
  lt_cv_objdir=.libs
2769
else
2770
  # MS-DOS does not allow filenames that begin with a dot.
2771
  lt_cv_objdir=_libs
2772
fi
2773
rmdir .libs 2>/dev/null])
2774
objdir=$lt_cv_objdir
2775
_LT_DECL([], [objdir], [0],
2776
         [The name of the directory that contains temporary libtool files])dnl
2777
m4_pattern_allow([LT_OBJDIR])dnl
2778
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2779
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2780
])# _LT_CHECK_OBJDIR
2781
2782
2783
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2784
# --------------------------------------
2785
# Check hardcoding attributes.
2786
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2787
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2788
_LT_TAGVAR(hardcode_action, $1)=
2789
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2790
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2791
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2792
2793
  # We can hardcode non-existent directories.
2794
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2795
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2796
     # have to relink, otherwise we might link with an installed library
2797
     # when we should be linking with a yet-to-be-installed one
2798
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2799
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2800
    # Linking always hardcodes the temporary library directory.
2801
    _LT_TAGVAR(hardcode_action, $1)=relink
2802
  else
2803
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2804
    _LT_TAGVAR(hardcode_action, $1)=immediate
2805
  fi
2806
else
2807
  # We cannot hardcode anything, or else we can only hardcode existing
2808
  # directories.
2809
  _LT_TAGVAR(hardcode_action, $1)=unsupported
2810
fi
2811
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2812
2813
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2814
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2815
  # Fast installation is not supported
2816
  enable_fast_install=no
2817
elif test "$shlibpath_overrides_runpath" = yes ||
2818
     test "$enable_shared" = no; then
2819
  # Fast installation is not necessary
2820
  enable_fast_install=needless
2821
fi
2822
_LT_TAGDECL([], [hardcode_action], [0],
2823
    [How to hardcode a shared library path into an executable])
2824
])# _LT_LINKER_HARDCODE_LIBPATH
2825
2826
2827
# _LT_CMD_STRIPLIB
2828
# ----------------
2829
m4_defun([_LT_CMD_STRIPLIB],
2830
[m4_require([_LT_DECL_EGREP])
2831
striplib=
2832
old_striplib=
2833
AC_MSG_CHECKING([whether stripping libraries is possible])
2834
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2835
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2836
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2837
  AC_MSG_RESULT([yes])
2838
else
2839
# FIXME - insert some real tests, host_os isn't really good enough
2840
  case $host_os in
2841
  darwin*)
2842
    if test -n "$STRIP" ; then
2843
      striplib="$STRIP -x"
2844
      old_striplib="$STRIP -S"
2845
      AC_MSG_RESULT([yes])
2846
    else
2847
      AC_MSG_RESULT([no])
2848
    fi
2849
    ;;
2850
  *)
2851
    AC_MSG_RESULT([no])
2852
    ;;
2853
  esac
2854
fi
2855
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2856
_LT_DECL([], [striplib], [1])
2857
])# _LT_CMD_STRIPLIB
2858
2859
2860
# _LT_SYS_DYNAMIC_LINKER([TAG])
2861
# -----------------------------
2862
# PORTME Fill in your ld.so characteristics
2863
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2864
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2865
m4_require([_LT_DECL_EGREP])dnl
2866
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2867
m4_require([_LT_DECL_OBJDUMP])dnl
2868
m4_require([_LT_DECL_SED])dnl
2869
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2870
AC_MSG_CHECKING([dynamic linker characteristics])
2871
m4_if([$1],
2872
	[], [
2873
if test "$GCC" = yes; then
2874
  case $host_os in
2875
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2876
    *) lt_awk_arg="/^libraries:/" ;;
2877
  esac
2878
  case $host_os in
2879
    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2880
    *) lt_sed_strip_eq="s,=/,/,g" ;;
2881
  esac
2882
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2883
  case $lt_search_path_spec in
2884
  *\;*)
2885
    # if the path contains ";" then we assume it to be the separator
2886
    # otherwise default to the standard path separator (i.e. ":") - it is
2887
    # assumed that no part of a normal pathname contains ";" but that should
2888
    # okay in the real world where ";" in dirpaths is itself problematic.
2889
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2890
    ;;
2891
  *)
2892
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2893
    ;;
2894
  esac
2895
  # Ok, now we have the path, separated by spaces, we can step through it
2896
  # and add multilib dir if necessary.
2897
  lt_tmp_lt_search_path_spec=
2898
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2899
  for lt_sys_path in $lt_search_path_spec; do
2900
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2901
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2902
    else
2903
      test -d "$lt_sys_path" && \
2904
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2905
    fi
2906
  done
2907
  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2908
BEGIN {RS=" "; FS="/|\n";} {
2909
  lt_foo="";
2910
  lt_count=0;
2911
  for (lt_i = NF; lt_i > 0; lt_i--) {
2912
    if ($lt_i != "" && $lt_i != ".") {
2913
      if ($lt_i == "..") {
2914
        lt_count++;
2915
      } else {
2916
        if (lt_count == 0) {
2917
          lt_foo="/" $lt_i lt_foo;
2918
        } else {
2919
          lt_count--;
2920
        }
2921
      }
2922
    }
2923
  }
2924
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2925
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2926
}'`
2927
  # AWK program above erroneously prepends '/' to C:/dos/paths
2928
  # for these hosts.
2929
  case $host_os in
2930
    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2931
      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2932
  esac
2933
  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2934
else
2935
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2936
fi])
2937
library_names_spec=
2938
libname_spec='lib$name'
2939
soname_spec=
2940
shrext_cmds=".so"
2941
postinstall_cmds=
2942
postuninstall_cmds=
2943
finish_cmds=
2944
finish_eval=
2945
shlibpath_var=
2946
shlibpath_overrides_runpath=unknown
2947
version_type=none
2948
dynamic_linker="$host_os ld.so"
2949
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2950
need_lib_prefix=unknown
2951
hardcode_into_libs=no
2952
2953
# when you set need_version to no, make sure it does not cause -set_version
2954
# flags to be left without arguments
2955
need_version=unknown
2956
2957
case $host_os in
2958
aix3*)
2959
  version_type=linux
2960
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2961
  shlibpath_var=LIBPATH
2962
2963
  # AIX 3 has no versioning support, so we append a major version to the name.
2964
  soname_spec='${libname}${release}${shared_ext}$major'
2965
  ;;
2966
2967
aix[[4-9]]*)
2968
  version_type=linux
2969
  need_lib_prefix=no
2970
  need_version=no
2971
  hardcode_into_libs=yes
2972
  if test "$host_cpu" = ia64; then
2973
    # AIX 5 supports IA64
2974
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2975
    shlibpath_var=LD_LIBRARY_PATH
2976
  else
2977
    # With GCC up to 2.95.x, collect2 would create an import file
2978
    # for dependence libraries.  The import file would start with
2979
    # the line `#! .'.  This would cause the generated library to
2980
    # depend on `.', always an invalid library.  This was fixed in
2981
    # development snapshots of GCC prior to 3.0.
2982
    case $host_os in
2983
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2984
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2985
	   echo ' yes '
2986
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2987
	:
2988
      else
2989
	can_build_shared=no
2990
      fi
2991
      ;;
2992
    esac
2993
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2994
    # soname into executable. Probably we can add versioning support to
2995
    # collect2, so additional links can be useful in future.
2996
    if test "$aix_use_runtimelinking" = yes; then
2997
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2998
      # instead of lib<name>.a to let people know that these are not
2999
      # typical AIX shared libraries.
3000
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3001
    else
3002
      # We preserve .a as extension for shared libraries through AIX4.2
3003
      # and later when we are not doing run time linking.
3004
      library_names_spec='${libname}${release}.a $libname.a'
3005
      soname_spec='${libname}${release}${shared_ext}$major'
3006
    fi
3007
    shlibpath_var=LIBPATH
3008
  fi
3009
  ;;
3010
3011
amigaos*)
3012
  case $host_cpu in
3013
  powerpc)
3014
    # Since July 2007 AmigaOS4 officially supports .so libraries.
3015
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3016
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3017
    ;;
3018
  m68k)
3019
    library_names_spec='$libname.ixlibrary $libname.a'
3020
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3021
    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3022
    ;;
3023
  esac
3024
  ;;
3025
3026
beos*)
3027
  library_names_spec='${libname}${shared_ext}'
3028
  dynamic_linker="$host_os ld.so"
3029
  shlibpath_var=LIBRARY_PATH
3030
  ;;
3031
3032
bsdi[[45]]*)
3033
  version_type=linux
3034
  need_version=no
3035
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3036
  soname_spec='${libname}${release}${shared_ext}$major'
3037
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3038
  shlibpath_var=LD_LIBRARY_PATH
3039
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3040
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3041
  # the default ld.so.conf also contains /usr/contrib/lib and
3042
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3043
  # libtool to hard-code these into programs
3044
  ;;
3045
3046
cygwin* | mingw* | pw32* | cegcc*)
3047
  version_type=windows
3048
  shrext_cmds=".dll"
3049
  need_version=no
3050
  need_lib_prefix=no
3051
3052
  case $GCC,$cc_basename in
3053
  yes,*)
3054
    # gcc
3055
    library_names_spec='$libname.dll.a'
3056
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3057
    postinstall_cmds='base_file=`basename \${file}`~
3058
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3059
      dldir=$destdir/`dirname \$dlpath`~
3060
      test -d \$dldir || mkdir -p \$dldir~
3061
      $install_prog $dir/$dlname \$dldir/$dlname~
3062
      chmod a+x \$dldir/$dlname~
3063
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3064
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3065
      fi'
3066
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3067
      dlpath=$dir/\$dldll~
3068
       $RM \$dlpath'
3069
    shlibpath_overrides_runpath=yes
3070
3071
    case $host_os in
3072
    cygwin*)
3073
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3074
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3075
m4_if([$1], [],[
3076
      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3077
      ;;
3078
    mingw* | cegcc*)
3079
      # MinGW DLLs use traditional 'lib' prefix
3080
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3081
      ;;
3082
    pw32*)
3083
      # pw32 DLLs use 'pw' prefix rather than 'lib'
3084
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3085
      ;;
3086
    esac
3087
    dynamic_linker='Win32 ld.exe'
3088
    ;;
3089
3090
  *,cl*)
3091
    # Native MSVC
3092
    libname_spec='$name'
3093
    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3094
    library_names_spec='${libname}.dll.lib'
3095
3096
    case $build_os in
3097
    mingw*)
3098
      sys_lib_search_path_spec=
3099
      lt_save_ifs=$IFS
3100
      IFS=';'
3101
      for lt_path in $LIB
3102
      do
3103
        IFS=$lt_save_ifs
3104
        # Let DOS variable expansion print the short 8.3 style file name.
3105
        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3106
        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3107
      done
3108
      IFS=$lt_save_ifs
3109
      # Convert to MSYS style.
3110
      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3111
      ;;
3112
    cygwin*)
3113
      # Convert to unix form, then to dos form, then back to unix form
3114
      # but this time dos style (no spaces!) so that the unix form looks
3115
      # like /cygdrive/c/PROGRA~1:/cygdr...
3116
      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3117
      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3118
      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3119
      ;;
3120
    *)
3121
      sys_lib_search_path_spec="$LIB"
3122
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3123
        # It is most probably a Windows format PATH.
3124
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3125
      else
3126
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3127
      fi
3128
      # FIXME: find the short name or the path components, as spaces are
3129
      # common. (e.g. "Program Files" -> "PROGRA~1")
3130
      ;;
3131
    esac
3132
3133
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3134
    postinstall_cmds='base_file=`basename \${file}`~
3135
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3136
      dldir=$destdir/`dirname \$dlpath`~
3137
      test -d \$dldir || mkdir -p \$dldir~
3138
      $install_prog $dir/$dlname \$dldir/$dlname'
3139
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3140
      dlpath=$dir/\$dldll~
3141
       $RM \$dlpath'
3142
    shlibpath_overrides_runpath=yes
3143
    dynamic_linker='Win32 link.exe'
3144
    ;;
3145
3146
  *)
3147
    # Assume MSVC wrapper
3148
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3149
    dynamic_linker='Win32 ld.exe'
3150
    ;;
3151
  esac
3152
  # FIXME: first we should search . and the directory the executable is in
3153
  shlibpath_var=PATH
3154
  ;;
3155
3156
darwin* | rhapsody*)
3157
  dynamic_linker="$host_os dyld"
3158
  version_type=darwin
3159
  need_lib_prefix=no
3160
  need_version=no
3161
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3162
  soname_spec='${libname}${release}${major}$shared_ext'
3163
  shlibpath_overrides_runpath=yes
3164
  shlibpath_var=DYLD_LIBRARY_PATH
3165
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3166
m4_if([$1], [],[
3167
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3168
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3169
  ;;
3170
3171
dgux*)
3172
  version_type=linux
3173
  need_lib_prefix=no
3174
  need_version=no
3175
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3176
  soname_spec='${libname}${release}${shared_ext}$major'
3177
  shlibpath_var=LD_LIBRARY_PATH
3178
  ;;
3179
3180
freebsd1*)
3181
  dynamic_linker=no
3182
  ;;
3183
3184
freebsd* | dragonfly*)
3185
  # DragonFly does not have aout.  When/if they implement a new
3186
  # versioning mechanism, adjust this.
3187
  if test -x /usr/bin/objformat; then
3188
    objformat=`/usr/bin/objformat`
3189
  else
3190
    case $host_os in
3191
    freebsd[[123]]*) objformat=aout ;;
3192
    *) objformat=elf ;;
3193
    esac
3194
  fi
3195
  version_type=freebsd-$objformat
3196
  case $version_type in
3197
    freebsd-elf*)
3198
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3199
      need_version=no
3200
      need_lib_prefix=no
3201
      ;;
3202
    freebsd-*)
3203
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3204
      need_version=yes
3205
      ;;
3206
  esac
3207
  shlibpath_var=LD_LIBRARY_PATH
3208
  case $host_os in
3209
  freebsd2*)
3210
    shlibpath_overrides_runpath=yes
3211
    ;;
3212
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3213
    shlibpath_overrides_runpath=yes
3214
    hardcode_into_libs=yes
3215
    ;;
3216
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3217
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3218
    shlibpath_overrides_runpath=no
3219
    hardcode_into_libs=yes
3220
    ;;
3221
  *) # from 4.6 on, and DragonFly
3222
    shlibpath_overrides_runpath=yes
3223
    hardcode_into_libs=yes
3224
    ;;
3225
  esac
3226
  ;;
3227
3228
gnu*)
3229
  version_type=linux
3230
  need_lib_prefix=no
3231
  need_version=no
3232
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3233
  soname_spec='${libname}${release}${shared_ext}$major'
3234
  shlibpath_var=LD_LIBRARY_PATH
3235
  shlibpath_overrides_runpath=no
3236
  hardcode_into_libs=yes
3237
  ;;
3238
3239
haiku*)
3240
  version_type=linux
3241
  need_lib_prefix=no
3242
  need_version=no
3243
  dynamic_linker="$host_os runtime_loader"
3244
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3245
  soname_spec='${libname}${release}${shared_ext}$major'
3246
  shlibpath_var=LIBRARY_PATH
3247
  shlibpath_overrides_runpath=yes
3248
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3249
  hardcode_into_libs=yes
3250
  ;;
3251
3252
hpux9* | hpux10* | hpux11*)
3253
  # Give a soname corresponding to the major version so that dld.sl refuses to
3254
  # link against other versions.
3255
  version_type=sunos
3256
  need_lib_prefix=no
3257
  need_version=no
3258
  case $host_cpu in
3259
  ia64*)
3260
    shrext_cmds='.so'
3261
    hardcode_into_libs=yes
3262
    dynamic_linker="$host_os dld.so"
3263
    shlibpath_var=LD_LIBRARY_PATH
3264
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3265
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3266
    soname_spec='${libname}${release}${shared_ext}$major'
3267
    if test "X$HPUX_IA64_MODE" = X32; then
3268
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3269
    else
3270
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3271
    fi
3272
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3273
    ;;
3274
  hppa*64*)
3275
    shrext_cmds='.sl'
3276
    hardcode_into_libs=yes
3277
    dynamic_linker="$host_os dld.sl"
3278
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3279
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3280
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3281
    soname_spec='${libname}${release}${shared_ext}$major'
3282
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3283
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3284
    ;;
3285
  *)
3286
    shrext_cmds='.sl'
3287
    dynamic_linker="$host_os dld.sl"
3288
    shlibpath_var=SHLIB_PATH
3289
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3290
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3291
    soname_spec='${libname}${release}${shared_ext}$major'
3292
    ;;
3293
  esac
3294
  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3295
  postinstall_cmds='chmod 555 $lib'
3296
  # or fails outright, so override atomically:
3297
  install_override_mode=555
3298
  ;;
3299
3300
interix[[3-9]]*)
3301
  version_type=linux
3302
  need_lib_prefix=no
3303
  need_version=no
3304
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3305
  soname_spec='${libname}${release}${shared_ext}$major'
3306
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3307
  shlibpath_var=LD_LIBRARY_PATH
3308
  shlibpath_overrides_runpath=no
3309
  hardcode_into_libs=yes
3310
  ;;
3311
3312
irix5* | irix6* | nonstopux*)
3313
  case $host_os in
3314
    nonstopux*) version_type=nonstopux ;;
3315
    *)
3316
	if test "$lt_cv_prog_gnu_ld" = yes; then
3317
		version_type=linux
3318
	else
3319
		version_type=irix
3320
	fi ;;
3321
  esac
3322
  need_lib_prefix=no
3323
  need_version=no
3324
  soname_spec='${libname}${release}${shared_ext}$major'
3325
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3326
  case $host_os in
3327
  irix5* | nonstopux*)
3328
    libsuff= shlibsuff=
3329
    ;;
3330
  *)
3331
    case $LD in # libtool.m4 will add one of these switches to LD
3332
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3333
      libsuff= shlibsuff= libmagic=32-bit;;
3334
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3335
      libsuff=32 shlibsuff=N32 libmagic=N32;;
3336
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3337
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3338
    *) libsuff= shlibsuff= libmagic=never-match;;
3339
    esac
3340
    ;;
3341
  esac
3342
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3343
  shlibpath_overrides_runpath=no
3344
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3345
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3346
  hardcode_into_libs=yes
3347
  ;;
3348
3349
# No shared lib support for Linux oldld, aout, or coff.
3350
linux*oldld* | linux*aout* | linux*coff*)
3351
  dynamic_linker=no
3352
  ;;
3353
3354
# This must be Linux ELF.
3355
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3356
  version_type=linux
3357
  need_lib_prefix=no
3358
  need_version=no
3359
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3360
  soname_spec='${libname}${release}${shared_ext}$major'
3361
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3362
  shlibpath_var=LD_LIBRARY_PATH
3363
  shlibpath_overrides_runpath=no
3364
3365
  # Some binutils ld are patched to set DT_RUNPATH
3366
  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3367
    [lt_cv_shlibpath_overrides_runpath=no
3368
    save_LDFLAGS=$LDFLAGS
3369
    save_libdir=$libdir
3370
    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3371
	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3372
    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3373
      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3374
	 [lt_cv_shlibpath_overrides_runpath=yes])])
3375
    LDFLAGS=$save_LDFLAGS
3376
    libdir=$save_libdir
3377
    ])
3378
  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3379
3380
  # This implies no fast_install, which is unacceptable.
3381
  # Some rework will be needed to allow for fast_install
3382
  # before this can be enabled.
3383
  hardcode_into_libs=yes
3384
3385
  # Append ld.so.conf contents to the search path
3386
  if test -f /etc/ld.so.conf; then
3387
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
3388
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3389
  fi
3390
3391
  # We used to test for /lib/ld.so.1 and disable shared libraries on
3392
  # powerpc, because MkLinux only supported shared libraries with the
3393
  # GNU dynamic linker.  Since this was broken with cross compilers,
3394
  # most powerpc-linux boxes support dynamic linking these days and
3395
  # people can always --disable-shared, the test was removed, and we
3396
  # assume the GNU/Linux dynamic linker is in use.
3397
  dynamic_linker='GNU/Linux ld.so'
3398
  ;;
3399
3400
netbsdelf*-gnu)
3401
  version_type=linux
3402
  need_lib_prefix=no
3403
  need_version=no
3404
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3405
  soname_spec='${libname}${release}${shared_ext}$major'
3406
  shlibpath_var=LD_LIBRARY_PATH
3407
  shlibpath_overrides_runpath=no
3408
  hardcode_into_libs=yes
3409
  dynamic_linker='NetBSD ld.elf_so'
3410
  ;;
3411
3412
netbsd*)
3413
  version_type=sunos
3414
  need_lib_prefix=no
3415
  need_version=no
3416
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3417
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3418
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3419
    dynamic_linker='NetBSD (a.out) ld.so'
3420
  else
3421
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3422
    soname_spec='${libname}${release}${shared_ext}$major'
3423
    dynamic_linker='NetBSD ld.elf_so'
3424
  fi
3425
  shlibpath_var=LD_LIBRARY_PATH
3426
  shlibpath_overrides_runpath=yes
3427
  hardcode_into_libs=yes
3428
  ;;
3429
3430
newsos6)
3431
  version_type=linux
3432
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3433
  shlibpath_var=LD_LIBRARY_PATH
3434
  shlibpath_overrides_runpath=yes
3435
  ;;
3436
3437
*nto* | *qnx*)
3438
  version_type=qnx
3439
  need_lib_prefix=no
3440
  need_version=no
3441
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3442
  soname_spec='${libname}${release}${shared_ext}$major'
3443
  shlibpath_var=LD_LIBRARY_PATH
3444
  shlibpath_overrides_runpath=no
3445
  hardcode_into_libs=yes
3446
  dynamic_linker='ldqnx.so'
3447
  ;;
3448
3449
openbsd*)
3450
  version_type=sunos
3451
  sys_lib_dlsearch_path_spec="/usr/lib"
3452
  need_lib_prefix=no
3453
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3454
  case $host_os in
3455
    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3456
    *)				need_version=no  ;;
3457
  esac
3458
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3459
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3460
  shlibpath_var=LD_LIBRARY_PATH
3461
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3462
    case $host_os in
3463
      openbsd2.[[89]] | openbsd2.[[89]].*)
3464
	shlibpath_overrides_runpath=no
3465
	;;
3466
      *)
3467
	shlibpath_overrides_runpath=yes
3468
	;;
3469
      esac
3470
  else
3471
    shlibpath_overrides_runpath=yes
3472
  fi
3473
  ;;
3474
3475
os2*)
3476
  libname_spec='$name'
3477
  shrext_cmds=".dll"
3478
  need_lib_prefix=no
3479
  library_names_spec='$libname${shared_ext} $libname.a'
3480
  dynamic_linker='OS/2 ld.exe'
3481
  shlibpath_var=LIBPATH
3482
  ;;
3483
3484
osf3* | osf4* | osf5*)
3485
  version_type=osf
3486
  need_lib_prefix=no
3487
  need_version=no
3488
  soname_spec='${libname}${release}${shared_ext}$major'
3489
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3490
  shlibpath_var=LD_LIBRARY_PATH
3491
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3492
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3493
  ;;
3494
3495
rdos*)
3496
  dynamic_linker=no
3497
  ;;
3498
3499
solaris*)
3500
  version_type=linux
3501
  need_lib_prefix=no
3502
  need_version=no
3503
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3504
  soname_spec='${libname}${release}${shared_ext}$major'
3505
  shlibpath_var=LD_LIBRARY_PATH
3506
  shlibpath_overrides_runpath=yes
3507
  hardcode_into_libs=yes
3508
  # ldd complains unless libraries are executable
3509
  postinstall_cmds='chmod +x $lib'
3510
  ;;
3511
3512
sunos4*)
3513
  version_type=sunos
3514
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3515
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3516
  shlibpath_var=LD_LIBRARY_PATH
3517
  shlibpath_overrides_runpath=yes
3518
  if test "$with_gnu_ld" = yes; then
3519
    need_lib_prefix=no
3520
  fi
3521
  need_version=yes
3522
  ;;
3523
3524
sysv4 | sysv4.3*)
3525
  version_type=linux
3526
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3527
  soname_spec='${libname}${release}${shared_ext}$major'
3528
  shlibpath_var=LD_LIBRARY_PATH
3529
  case $host_vendor in
3530
    sni)
3531
      shlibpath_overrides_runpath=no
3532
      need_lib_prefix=no
3533
      runpath_var=LD_RUN_PATH
3534
      ;;
3535
    siemens)
3536
      need_lib_prefix=no
3537
      ;;
3538
    motorola)
3539
      need_lib_prefix=no
3540
      need_version=no
3541
      shlibpath_overrides_runpath=no
3542
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3543
      ;;
3544
  esac
3545
  ;;
3546
3547
sysv4*MP*)
3548
  if test -d /usr/nec ;then
3549
    version_type=linux
3550
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3551
    soname_spec='$libname${shared_ext}.$major'
3552
    shlibpath_var=LD_LIBRARY_PATH
3553
  fi
3554
  ;;
3555
3556
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3557
  version_type=freebsd-elf
3558
  need_lib_prefix=no
3559
  need_version=no
3560
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3561
  soname_spec='${libname}${release}${shared_ext}$major'
3562
  shlibpath_var=LD_LIBRARY_PATH
3563
  shlibpath_overrides_runpath=yes
3564
  hardcode_into_libs=yes
3565
  if test "$with_gnu_ld" = yes; then
3566
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3567
  else
3568
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3569
    case $host_os in
3570
      sco3.2v5*)
3571
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3572
	;;
3573
    esac
3574
  fi
3575
  sys_lib_dlsearch_path_spec='/usr/lib'
3576
  ;;
3577
3578
tpf*)
3579
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3580
  version_type=linux
3581
  need_lib_prefix=no
3582
  need_version=no
3583
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3584
  shlibpath_var=LD_LIBRARY_PATH
3585
  shlibpath_overrides_runpath=no
3586
  hardcode_into_libs=yes
3587
  ;;
3588
3589
uts4*)
3590
  version_type=linux
3591
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3592
  soname_spec='${libname}${release}${shared_ext}$major'
3593
  shlibpath_var=LD_LIBRARY_PATH
3594
  ;;
3595
3596
*)
3597
  dynamic_linker=no
3598
  ;;
3599
esac
3600
AC_MSG_RESULT([$dynamic_linker])
3601
test "$dynamic_linker" = no && can_build_shared=no
3602
3603
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3604
if test "$GCC" = yes; then
3605
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3606
fi
3607
3608
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3609
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3610
fi
3611
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3612
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3613
fi
3614
3615
_LT_DECL([], [variables_saved_for_relink], [1],
3616
    [Variables whose values should be saved in libtool wrapper scripts and
3617
    restored at link time])
3618
_LT_DECL([], [need_lib_prefix], [0],
3619
    [Do we need the "lib" prefix for modules?])
3620
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3621
_LT_DECL([], [version_type], [0], [Library versioning type])
3622
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3623
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3624
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3625
    [Is shlibpath searched before the hard-coded library search path?])
3626
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3627
_LT_DECL([], [library_names_spec], [1],
3628
    [[List of archive names.  First name is the real one, the rest are links.
3629
    The last name is the one that the linker finds with -lNAME]])
3630
_LT_DECL([], [soname_spec], [1],
3631
    [[The coded name of the library, if different from the real name]])
3632
_LT_DECL([], [install_override_mode], [1],
3633
    [Permission mode override for installation of shared libraries])
3634
_LT_DECL([], [postinstall_cmds], [2],
3635
    [Command to use after installation of a shared archive])
3636
_LT_DECL([], [postuninstall_cmds], [2],
3637
    [Command to use after uninstallation of a shared archive])
3638
_LT_DECL([], [finish_cmds], [2],
3639
    [Commands used to finish a libtool library installation in a directory])
3640
_LT_DECL([], [finish_eval], [1],
3641
    [[As "finish_cmds", except a single script fragment to be evaled but
3642
    not shown]])
3643
_LT_DECL([], [hardcode_into_libs], [0],
3644
    [Whether we should hardcode library paths into libraries])
3645
_LT_DECL([], [sys_lib_search_path_spec], [2],
3646
    [Compile-time system search path for libraries])
3647
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3648
    [Run-time system search path for libraries])
3649
])# _LT_SYS_DYNAMIC_LINKER
3650
3651
3652
# _LT_PATH_TOOL_PREFIX(TOOL)
3653
# --------------------------
3654
# find a file program which can recognize shared library
3655
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3656
[m4_require([_LT_DECL_EGREP])dnl
3657
AC_MSG_CHECKING([for $1])
3658
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3659
[case $MAGIC_CMD in
3660
[[\\/*] |  ?:[\\/]*])
3661
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3662
  ;;
3663
*)
3664
  lt_save_MAGIC_CMD="$MAGIC_CMD"
3665
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3666
dnl $ac_dummy forces splitting on constant user-supplied paths.
3667
dnl POSIX.2 word splitting is done only on the output of word expansions,
3668
dnl not every word.  This closes a longstanding sh security hole.
3669
  ac_dummy="m4_if([$2], , $PATH, [$2])"
3670
  for ac_dir in $ac_dummy; do
3671
    IFS="$lt_save_ifs"
3672
    test -z "$ac_dir" && ac_dir=.
3673
    if test -f $ac_dir/$1; then
3674
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3675
      if test -n "$file_magic_test_file"; then
3676
	case $deplibs_check_method in
3677
	"file_magic "*)
3678
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3679
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3680
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3681
	    $EGREP "$file_magic_regex" > /dev/null; then
3682
	    :
3683
	  else
3684
	    cat <<_LT_EOF 1>&2
3685
3686
*** Warning: the command libtool uses to detect shared libraries,
3687
*** $file_magic_cmd, produces output that libtool cannot recognize.
3688
*** The result is that libtool may fail to recognize shared libraries
3689
*** as such.  This will affect the creation of libtool libraries that
3690
*** depend on shared libraries, but programs linked with such libtool
3691
*** libraries will work regardless of this problem.  Nevertheless, you
3692
*** may want to report the problem to your system manager and/or to
3693
*** bug-libtool@gnu.org
3694
3695
_LT_EOF
3696
	  fi ;;
3697
	esac
3698
      fi
3699
      break
3700
    fi
3701
  done
3702
  IFS="$lt_save_ifs"
3703
  MAGIC_CMD="$lt_save_MAGIC_CMD"
3704
  ;;
3705
esac])
3706
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3707
if test -n "$MAGIC_CMD"; then
3708
  AC_MSG_RESULT($MAGIC_CMD)
3709
else
3710
  AC_MSG_RESULT(no)
3711
fi
3712
_LT_DECL([], [MAGIC_CMD], [0],
3713
	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3714
])# _LT_PATH_TOOL_PREFIX
3715
3716
# Old name:
3717
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3718
dnl aclocal-1.4 backwards compatibility:
3719
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3720
3721
3722
# _LT_PATH_MAGIC
3723
# --------------
3724
# find a file program which can recognize a shared library
3725
m4_defun([_LT_PATH_MAGIC],
3726
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3727
if test -z "$lt_cv_path_MAGIC_CMD"; then
3728
  if test -n "$ac_tool_prefix"; then
3729
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3730
  else
3731
    MAGIC_CMD=:
3732
  fi
3733
fi
3734
])# _LT_PATH_MAGIC
3735
3736
3737
# LT_PATH_LD
3738
# ----------
3739
# find the pathname to the GNU or non-GNU linker
3740
AC_DEFUN([LT_PATH_LD],
3741
[AC_REQUIRE([AC_PROG_CC])dnl
3742
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3743
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3744
m4_require([_LT_DECL_SED])dnl
3745
m4_require([_LT_DECL_EGREP])dnl
3746
m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3747
3748
AC_ARG_WITH([gnu-ld],
3749
    [AS_HELP_STRING([--with-gnu-ld],
3750
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3751
    [test "$withval" = no || with_gnu_ld=yes],
3752
    [with_gnu_ld=no])dnl
3753
3754
ac_prog=ld
3755
if test "$GCC" = yes; then
3756
  # Check if gcc -print-prog-name=ld gives a path.
3757
  AC_MSG_CHECKING([for ld used by $CC])
3758
  case $host in
3759
  *-*-mingw*)
3760
    # gcc leaves a trailing carriage return which upsets mingw
3761
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3762
  *)
3763
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3764
  esac
3765
  case $ac_prog in
3766
    # Accept absolute paths.
3767
    [[\\/]]* | ?:[[\\/]]*)
3768
      re_direlt='/[[^/]][[^/]]*/\.\./'
3769
      # Canonicalize the pathname of ld
3770
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3771
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3772
	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3773
      done
3774
      test -z "$LD" && LD="$ac_prog"
3775
      ;;
3776
  "")
3777
    # If it fails, then pretend we aren't using GCC.
3778
    ac_prog=ld
3779
    ;;
3780
  *)
3781
    # If it is relative, then search for the first ld in PATH.
3782
    with_gnu_ld=unknown
3783
    ;;
3784
  esac
3785
elif test "$with_gnu_ld" = yes; then
3786
  AC_MSG_CHECKING([for GNU ld])
3787
else
3788
  AC_MSG_CHECKING([for non-GNU ld])
3789
fi
3790
AC_CACHE_VAL(lt_cv_path_LD,
3791
[if test -z "$LD"; then
3792
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3793
  for ac_dir in $PATH; do
3794
    IFS="$lt_save_ifs"
3795
    test -z "$ac_dir" && ac_dir=.
3796
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3797
      lt_cv_path_LD="$ac_dir/$ac_prog"
3798
      # Check to see if the program is GNU ld.  I'd rather use --version,
3799
      # but apparently some variants of GNU ld only accept -v.
3800
      # Break only if it was the GNU/non-GNU ld that we prefer.
3801
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3802
      *GNU* | *'with BFD'*)
3803
	test "$with_gnu_ld" != no && break
3804
	;;
3805
      *)
3806
	test "$with_gnu_ld" != yes && break
3807
	;;
3808
      esac
3809
    fi
3810
  done
3811
  IFS="$lt_save_ifs"
3812
else
3813
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3814
fi])
3815
LD="$lt_cv_path_LD"
3816
if test -n "$LD"; then
3817
  AC_MSG_RESULT($LD)
3818
else
3819
  AC_MSG_RESULT(no)
3820
fi
3821
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3822
_LT_PATH_LD_GNU
3823
AC_SUBST([LD])
3824
3825
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3826
])# LT_PATH_LD
3827
3828
# Old names:
3829
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3830
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3831
dnl aclocal-1.4 backwards compatibility:
3832
dnl AC_DEFUN([AM_PROG_LD], [])
3833
dnl AC_DEFUN([AC_PROG_LD], [])
3834
3835
3836
# _LT_PATH_LD_GNU
3837
#- --------------
3838
m4_defun([_LT_PATH_LD_GNU],
3839
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3840
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3841
case `$LD -v 2>&1 </dev/null` in
3842
*GNU* | *'with BFD'*)
3843
  lt_cv_prog_gnu_ld=yes
3844
  ;;
3845
*)
3846
  lt_cv_prog_gnu_ld=no
3847
  ;;
3848
esac])
3849
with_gnu_ld=$lt_cv_prog_gnu_ld
3850
])# _LT_PATH_LD_GNU
3851
3852
3853
# _LT_CMD_RELOAD
3854
# --------------
3855
# find reload flag for linker
3856
#   -- PORTME Some linkers may need a different reload flag.
3857
m4_defun([_LT_CMD_RELOAD],
3858
[AC_CACHE_CHECK([for $LD option to reload object files],
3859
  lt_cv_ld_reload_flag,
3860
  [lt_cv_ld_reload_flag='-r'])
3861
reload_flag=$lt_cv_ld_reload_flag
3862
case $reload_flag in
3863
"" | " "*) ;;
3864
*) reload_flag=" $reload_flag" ;;
3865
esac
3866
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3867
case $host_os in
3868
  cygwin* | mingw* | pw32* | cegcc*)
3869
    if test "$GCC" != yes; then
3870
      reload_cmds=false
3871
    fi
3872
    ;;
3873
  darwin*)
3874
    if test "$GCC" = yes; then
3875
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3876
    else
3877
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3878
    fi
3879
    ;;
3880
esac
3881
_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3882
_LT_TAGDECL([], [reload_cmds], [2])dnl
3883
])# _LT_CMD_RELOAD
3884
3885
3886
# _LT_CHECK_MAGIC_METHOD
3887
# ----------------------
3888
# how to check for library dependencies
3889
#  -- PORTME fill in with the dynamic library characteristics
3890
m4_defun([_LT_CHECK_MAGIC_METHOD],
3891
[m4_require([_LT_DECL_EGREP])
3892
m4_require([_LT_DECL_OBJDUMP])
3893
AC_CACHE_CHECK([how to recognize dependent libraries],
3894
lt_cv_deplibs_check_method,
3895
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3896
lt_cv_file_magic_test_file=
3897
lt_cv_deplibs_check_method='unknown'
3898
# Need to set the preceding variable on all platforms that support
3899
# interlibrary dependencies.
3900
# 'none' -- dependencies not supported.
3901
# `unknown' -- same as none, but documents that we really don't know.
3902
# 'pass_all' -- all dependencies passed with no checks.
3903
# 'test_compile' -- check by making test program.
3904
# 'file_magic [[regex]]' -- check by looking for files in library path
3905
# which responds to the $file_magic_cmd with a given extended regex.
3906
# If you have `file' or equivalent on your system and you're not sure
3907
# whether `pass_all' will *always* work, you probably want this one.
3908
3909
case $host_os in
3910
aix[[4-9]]*)
3911
  lt_cv_deplibs_check_method=pass_all
3912
  ;;
3913
3914
beos*)
3915
  lt_cv_deplibs_check_method=pass_all
3916
  ;;
3917
3918
bsdi[[45]]*)
3919
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3920
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3921
  lt_cv_file_magic_test_file=/shlib/libc.so
3922
  ;;
3923
3924
cygwin*)
3925
  # func_win32_libid is a shell function defined in ltmain.sh
3926
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3927
  lt_cv_file_magic_cmd='func_win32_libid'
3928
  ;;
3929
3930
mingw* | pw32*)
3931
  # Base MSYS/MinGW do not provide the 'file' command needed by
3932
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3933
  # unless we find 'file', for example because we are cross-compiling.
3934
  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3935
  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3936
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3937
    lt_cv_file_magic_cmd='func_win32_libid'
3938
  else
3939
    # Keep this pattern in sync with the one in func_win32_libid.
3940
    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3941
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3942
  fi
3943
  ;;
3944
3945
cegcc*)
3946
  # use the weaker test based on 'objdump'. See mingw*.
3947
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3948
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3949
  ;;
3950
3951
darwin* | rhapsody*)
3952
  lt_cv_deplibs_check_method=pass_all
3953
  ;;
3954
3955
freebsd* | dragonfly*)
3956
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3957
    case $host_cpu in
3958
    i*86 )
3959
      # Not sure whether the presence of OpenBSD here was a mistake.
3960
      # Let's accept both of them until this is cleared up.
3961
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3962
      lt_cv_file_magic_cmd=/usr/bin/file
3963
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3964
      ;;
3965
    esac
3966
  else
3967
    lt_cv_deplibs_check_method=pass_all
3968
  fi
3969
  ;;
3970
3971
gnu*)
3972
  lt_cv_deplibs_check_method=pass_all
3973
  ;;
3974
3975
haiku*)
3976
  lt_cv_deplibs_check_method=pass_all
3977
  ;;
3978
3979
hpux10.20* | hpux11*)
3980
  lt_cv_file_magic_cmd=/usr/bin/file
3981
  case $host_cpu in
3982
  ia64*)
3983
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3984
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3985
    ;;
3986
  hppa*64*)
3987
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3988
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3989
    ;;
3990
  *)
3991
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3992
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3993
    ;;
3994
  esac
3995
  ;;
3996
3997
interix[[3-9]]*)
3998
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3999
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4000
  ;;
4001
4002
irix5* | irix6* | nonstopux*)
4003
  case $LD in
4004
  *-32|*"-32 ") libmagic=32-bit;;
4005
  *-n32|*"-n32 ") libmagic=N32;;
4006
  *-64|*"-64 ") libmagic=64-bit;;
4007
  *) libmagic=never-match;;
4008
  esac
4009
  lt_cv_deplibs_check_method=pass_all
4010
  ;;
4011
4012
# This must be Linux ELF.
4013
linux* | k*bsd*-gnu | kopensolaris*-gnu)
4014
  lt_cv_deplibs_check_method=pass_all
4015
  ;;
4016
4017
netbsd* | netbsdelf*-gnu)
4018
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4019
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4020
  else
4021
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4022
  fi
4023
  ;;
4024
4025
newos6*)
4026
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4027
  lt_cv_file_magic_cmd=/usr/bin/file
4028
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4029
  ;;
4030
4031
*nto* | *qnx*)
4032
  lt_cv_deplibs_check_method=pass_all
4033
  ;;
4034
4035
openbsd*)
4036
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4037
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4038
  else
4039
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4040
  fi
4041
  ;;
4042
4043
osf3* | osf4* | osf5*)
4044
  lt_cv_deplibs_check_method=pass_all
4045
  ;;
4046
4047
rdos*)
4048
  lt_cv_deplibs_check_method=pass_all
4049
  ;;
4050
4051
solaris*)
4052
  lt_cv_deplibs_check_method=pass_all
4053
  ;;
4054
4055
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4056
  lt_cv_deplibs_check_method=pass_all
4057
  ;;
4058
4059
sysv4 | sysv4.3*)
4060
  case $host_vendor in
4061
  motorola)
4062
    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]]'
4063
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4064
    ;;
4065
  ncr)
4066
    lt_cv_deplibs_check_method=pass_all
4067
    ;;
4068
  sequent)
4069
    lt_cv_file_magic_cmd='/bin/file'
4070
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4071
    ;;
4072
  sni)
4073
    lt_cv_file_magic_cmd='/bin/file'
4074
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4075
    lt_cv_file_magic_test_file=/lib/libc.so
4076
    ;;
4077
  siemens)
4078
    lt_cv_deplibs_check_method=pass_all
4079
    ;;
4080
  pc)
4081
    lt_cv_deplibs_check_method=pass_all
4082
    ;;
4083
  esac
4084
  ;;
4085
4086
tpf*)
4087
  lt_cv_deplibs_check_method=pass_all
4088
  ;;
4089
esac
4090
])
4091
4092
file_magic_glob=
4093
want_nocaseglob=no
4094
if test "$build" = "$host"; then
4095
  case $host_os in
4096
  mingw* | pw32*)
4097
    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4098
      want_nocaseglob=yes
4099
    else
4100
      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4101
    fi
4102
    ;;
4103
  esac
4104
fi
4105
4106
file_magic_cmd=$lt_cv_file_magic_cmd
4107
deplibs_check_method=$lt_cv_deplibs_check_method
4108
test -z "$deplibs_check_method" && deplibs_check_method=unknown
4109
4110
_LT_DECL([], [deplibs_check_method], [1],
4111
    [Method to check whether dependent libraries are shared objects])
4112
_LT_DECL([], [file_magic_cmd], [1],
4113
    [Command to use when deplibs_check_method = "file_magic"])
4114
_LT_DECL([], [file_magic_glob], [1],
4115
    [How to find potential files when deplibs_check_method = "file_magic"])
4116
_LT_DECL([], [want_nocaseglob], [1],
4117
    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4118
])# _LT_CHECK_MAGIC_METHOD
4119
4120
4121
# LT_PATH_NM
4122
# ----------
4123
# find the pathname to a BSD- or MS-compatible name lister
4124
AC_DEFUN([LT_PATH_NM],
4125
[AC_REQUIRE([AC_PROG_CC])dnl
4126
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4127
[if test -n "$NM"; then
4128
  # Let the user override the test.
4129
  lt_cv_path_NM="$NM"
4130
else
4131
  lt_nm_to_check="${ac_tool_prefix}nm"
4132
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4133
    lt_nm_to_check="$lt_nm_to_check nm"
4134
  fi
4135
  for lt_tmp_nm in $lt_nm_to_check; do
4136
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4137
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4138
      IFS="$lt_save_ifs"
4139
      test -z "$ac_dir" && ac_dir=.
4140
      tmp_nm="$ac_dir/$lt_tmp_nm"
4141
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4142
	# Check to see if the nm accepts a BSD-compat flag.
4143
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4144
	#   nm: unknown option "B" ignored
4145
	# Tru64's nm complains that /dev/null is an invalid object file
4146
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4147
	*/dev/null* | *'Invalid file or object type'*)
4148
	  lt_cv_path_NM="$tmp_nm -B"
4149
	  break
4150
	  ;;
4151
	*)
4152
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4153
	  */dev/null*)
4154
	    lt_cv_path_NM="$tmp_nm -p"
4155
	    break
4156
	    ;;
4157
	  *)
4158
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4159
	    continue # so that we can try to find one that supports BSD flags
4160
	    ;;
4161
	  esac
4162
	  ;;
4163
	esac
4164
      fi
4165
    done
4166
    IFS="$lt_save_ifs"
4167
  done
4168
  : ${lt_cv_path_NM=no}
4169
fi])
4170
if test "$lt_cv_path_NM" != "no"; then
4171
  NM="$lt_cv_path_NM"
4172
else
4173
  # Didn't find any BSD compatible name lister, look for dumpbin.
4174
  if test -n "$DUMPBIN"; then :
4175
    # Let the user override the test.
4176
  else
4177
    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4178
    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4179
    *COFF*)
4180
      DUMPBIN="$DUMPBIN -symbols"
4181
      ;;
4182
    *)
4183
      DUMPBIN=:
4184
      ;;
4185
    esac
4186
  fi
4187
  AC_SUBST([DUMPBIN])
4188
  if test "$DUMPBIN" != ":"; then
4189
    NM="$DUMPBIN"
4190
  fi
4191
fi
4192
test -z "$NM" && NM=nm
4193
AC_SUBST([NM])
4194
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4195
4196
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4197
  [lt_cv_nm_interface="BSD nm"
4198
  echo "int some_variable = 0;" > conftest.$ac_ext
4199
  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4200
  (eval "$ac_compile" 2>conftest.err)
4201
  cat conftest.err >&AS_MESSAGE_LOG_FD
4202
  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4203
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4204
  cat conftest.err >&AS_MESSAGE_LOG_FD
4205
  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4206
  cat conftest.out >&AS_MESSAGE_LOG_FD
4207
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4208
    lt_cv_nm_interface="MS dumpbin"
4209
  fi
4210
  rm -f conftest*])
4211
])# LT_PATH_NM
4212
4213
# Old names:
4214
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4215
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4216
dnl aclocal-1.4 backwards compatibility:
4217
dnl AC_DEFUN([AM_PROG_NM], [])
4218
dnl AC_DEFUN([AC_PROG_NM], [])
4219
4220
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4221
# --------------------------------
4222
# how to determine the name of the shared library
4223
# associated with a specific link library.
4224
#  -- PORTME fill in with the dynamic library characteristics
4225
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4226
[m4_require([_LT_DECL_EGREP])
4227
m4_require([_LT_DECL_OBJDUMP])
4228
m4_require([_LT_DECL_DLLTOOL])
4229
AC_CACHE_CHECK([how to associate runtime and link libraries],
4230
lt_cv_sharedlib_from_linklib_cmd,
4231
[lt_cv_sharedlib_from_linklib_cmd='unknown'
4232
4233
case $host_os in
4234
cygwin* | mingw* | pw32* | cegcc*)
4235
  # two different shell functions defined in ltmain.sh
4236
  # decide which to use based on capabilities of $DLLTOOL
4237
  case `$DLLTOOL --help 2>&1` in
4238
  *--identify-strict*)
4239
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4240
    ;;
4241
  *)
4242
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4243
    ;;
4244
  esac
4245
  ;;
4246
*)
4247
  # fallback: assume linklib IS sharedlib
4248
  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4249
  ;;
4250
esac
4251
])
4252
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4253
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4254
4255
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4256
    [Command to associate shared and link libraries])
4257
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4258
4259
4260
# _LT_PATH_MANIFEST_TOOL
4261
# ----------------------
4262
# locate the manifest tool
4263
m4_defun([_LT_PATH_MANIFEST_TOOL],
4264
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4265
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4266
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4267
  [lt_cv_path_mainfest_tool=no
4268
  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4269
  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4270
  cat conftest.err >&AS_MESSAGE_LOG_FD
4271
  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4272
    lt_cv_path_mainfest_tool=yes
4273
  fi
4274
  rm -f conftest*])
4275
if test "x$lt_cv_path_mainfest_tool" != xyes; then
4276
  MANIFEST_TOOL=:
4277
fi
4278
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4279
])# _LT_PATH_MANIFEST_TOOL
4280
4281
4282
# LT_LIB_M
4283
# --------
4284
# check for math library
4285
AC_DEFUN([LT_LIB_M],
4286
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4287
LIBM=
4288
case $host in
4289
*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4290
  # These system don't have libm, or don't need it
4291
  ;;
4292
*-ncr-sysv4.3*)
4293
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4294
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4295
  ;;
4296
*)
4297
  AC_CHECK_LIB(m, cos, LIBM="-lm")
4298
  ;;
4299
esac
4300
AC_SUBST([LIBM])
4301
])# LT_LIB_M
4302
4303
# Old name:
4304
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4305
dnl aclocal-1.4 backwards compatibility:
4306
dnl AC_DEFUN([AC_CHECK_LIBM], [])
4307
4308
4309
# _LT_COMPILER_NO_RTTI([TAGNAME])
4310
# -------------------------------
4311
m4_defun([_LT_COMPILER_NO_RTTI],
4312
[m4_require([_LT_TAG_COMPILER])dnl
4313
4314
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4315
4316
if test "$GCC" = yes; then
4317
  case $cc_basename in
4318
  nvcc*)
4319
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4320
  *)
4321
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4322
  esac
4323
4324
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4325
    lt_cv_prog_compiler_rtti_exceptions,
4326
    [-fno-rtti -fno-exceptions], [],
4327
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4328
fi
4329
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4330
	[Compiler flag to turn off builtin functions])
4331
])# _LT_COMPILER_NO_RTTI
4332
4333
4334
# _LT_CMD_GLOBAL_SYMBOLS
4335
# ----------------------
4336
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4337
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4338
AC_REQUIRE([AC_PROG_CC])dnl
4339
AC_REQUIRE([AC_PROG_AWK])dnl
4340
AC_REQUIRE([LT_PATH_NM])dnl
4341
AC_REQUIRE([LT_PATH_LD])dnl
4342
m4_require([_LT_DECL_SED])dnl
4343
m4_require([_LT_DECL_EGREP])dnl
4344
m4_require([_LT_TAG_COMPILER])dnl
4345
4346
# Check for command to grab the raw symbol name followed by C symbol from nm.
4347
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4348
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4349
[
4350
# These are sane defaults that work on at least a few old systems.
4351
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4352
4353
# Character class describing NM global symbol codes.
4354
symcode='[[BCDEGRST]]'
4355
4356
# Regexp to match symbols that can be accessed directly from C.
4357
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4358
4359
# Define system-specific variables.
4360
case $host_os in
4361
aix*)
4362
  symcode='[[BCDT]]'
4363
  ;;
4364
cygwin* | mingw* | pw32* | cegcc*)
4365
  symcode='[[ABCDGISTW]]'
4366
  ;;
4367
hpux*)
4368
  if test "$host_cpu" = ia64; then
4369
    symcode='[[ABCDEGRST]]'
4370
  fi
4371
  ;;
4372
irix* | nonstopux*)
4373
  symcode='[[BCDEGRST]]'
4374
  ;;
4375
osf*)
4376
  symcode='[[BCDEGQRST]]'
4377
  ;;
4378
solaris*)
4379
  symcode='[[BDRT]]'
4380
  ;;
4381
sco3.2v5*)
4382
  symcode='[[DT]]'
4383
  ;;
4384
sysv4.2uw2*)
4385
  symcode='[[DT]]'
4386
  ;;
4387
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4388
  symcode='[[ABDT]]'
4389
  ;;
4390
sysv4)
4391
  symcode='[[DFNSTU]]'
4392
  ;;
4393
esac
4394
4395
# If we're using GNU nm, then use its standard symbol codes.
4396
case `$NM -V 2>&1` in
4397
*GNU* | *'with BFD'*)
4398
  symcode='[[ABCDGIRSTW]]' ;;
4399
esac
4400
4401
# Transform an extracted symbol line into a proper C declaration.
4402
# Some systems (esp. on ia64) link data and code symbols differently,
4403
# so use this general approach.
4404
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4405
4406
# Transform an extracted symbol line into symbol name and symbol address
4407
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4408
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'"
4409
4410
# Handle CRLF in mingw tool chain
4411
opt_cr=
4412
case $build_os in
4413
mingw*)
4414
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4415
  ;;
4416
esac
4417
4418
# Try without a prefix underscore, then with it.
4419
for ac_symprfx in "" "_"; do
4420
4421
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4422
  symxfrm="\\1 $ac_symprfx\\2 \\2"
4423
4424
  # Write the raw and C identifiers.
4425
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4426
    # Fake it for dumpbin and say T for any non-static function
4427
    # and D for any global variable.
4428
    # Also find C++ and __fastcall symbols from MSVC++,
4429
    # which start with @ or ?.
4430
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4431
"     {last_section=section; section=\$ 3};"\
4432
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4433
"     \$ 0!~/External *\|/{next};"\
4434
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4435
"     {if(hide[section]) next};"\
4436
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4437
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4438
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4439
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4440
"     ' prfx=^$ac_symprfx]"
4441
  else
4442
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4443
  fi
4444
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4445
4446
  # Check to see that the pipe works correctly.
4447
  pipe_works=no
4448
4449
  rm -f conftest*
4450
  cat > conftest.$ac_ext <<_LT_EOF
4451
#ifdef __cplusplus
4452
extern "C" {
4453
#endif
4454
char nm_test_var;
4455
void nm_test_func(void);
4456
void nm_test_func(void){}
4457
#ifdef __cplusplus
4458
}
4459
#endif
4460
int main(){nm_test_var='a';nm_test_func();return(0);}
4461
_LT_EOF
4462
4463
  if AC_TRY_EVAL(ac_compile); then
4464
    # Now try to grab the symbols.
4465
    nlist=conftest.nm
4466
    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4467
      # Try sorting and uniquifying the output.
4468
      if sort "$nlist" | uniq > "$nlist"T; then
4469
	mv -f "$nlist"T "$nlist"
4470
      else
4471
	rm -f "$nlist"T
4472
      fi
4473
4474
      # Make sure that we snagged all the symbols we need.
4475
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4476
	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4477
	  cat <<_LT_EOF > conftest.$ac_ext
4478
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4479
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4480
/* DATA imports from DLLs on WIN32 con't be const, because runtime
4481
   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4482
# define LT@&t@_DLSYM_CONST
4483
#elif defined(__osf__)
4484
/* This system does not cope well with relocations in const data.  */
4485
# define LT@&t@_DLSYM_CONST
4486
#else
4487
# define LT@&t@_DLSYM_CONST const
4488
#endif
4489
4490
#ifdef __cplusplus
4491
extern "C" {
4492
#endif
4493
4494
_LT_EOF
4495
	  # Now generate the symbol file.
4496
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4497
4498
	  cat <<_LT_EOF >> conftest.$ac_ext
4499
4500
/* The mapping between symbol names and symbols.  */
4501
LT@&t@_DLSYM_CONST struct {
4502
  const char *name;
4503
  void       *address;
4504
}
4505
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4506
{
4507
  { "@PROGRAM@", (void *) 0 },
4508
_LT_EOF
4509
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4510
	  cat <<\_LT_EOF >> conftest.$ac_ext
4511
  {0, (void *) 0}
4512
};
4513
4514
/* This works around a problem in FreeBSD linker */
4515
#ifdef FREEBSD_WORKAROUND
4516
static const void *lt_preloaded_setup() {
4517
  return lt__PROGRAM__LTX_preloaded_symbols;
4518
}
4519
#endif
4520
4521
#ifdef __cplusplus
4522
}
4523
#endif
4524
_LT_EOF
4525
	  # Now try linking the two files.
4526
	  mv conftest.$ac_objext conftstm.$ac_objext
4527
	  lt_globsym_save_LIBS=$LIBS
4528
	  lt_globsym_save_CFLAGS=$CFLAGS
4529
	  LIBS="conftstm.$ac_objext"
4530
	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4531
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4532
	    pipe_works=yes
4533
	  fi
4534
	  LIBS=$lt_globsym_save_LIBS
4535
	  CFLAGS=$lt_globsym_save_CFLAGS
4536
	else
4537
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4538
	fi
4539
      else
4540
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4541
      fi
4542
    else
4543
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4544
    fi
4545
  else
4546
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4547
    cat conftest.$ac_ext >&5
4548
  fi
4549
  rm -rf conftest* conftst*
4550
4551
  # Do not use the global_symbol_pipe unless it works.
4552
  if test "$pipe_works" = yes; then
4553
    break
4554
  else
4555
    lt_cv_sys_global_symbol_pipe=
4556
  fi
4557
done
4558
])
4559
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4560
  lt_cv_sys_global_symbol_to_cdecl=
4561
fi
4562
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4563
  AC_MSG_RESULT(failed)
4564
else
4565
  AC_MSG_RESULT(ok)
4566
fi
4567
4568
# Response file support.
4569
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4570
  nm_file_list_spec='@'
4571
elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4572
  nm_file_list_spec='@'
4573
fi
4574
4575
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4576
    [Take the output of nm and produce a listing of raw symbols and C names])
4577
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4578
    [Transform the output of nm in a proper C declaration])
4579
_LT_DECL([global_symbol_to_c_name_address],
4580
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4581
    [Transform the output of nm in a C name address pair])
4582
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4583
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4584
    [Transform the output of nm in a C name address pair when lib prefix is needed])
4585
_LT_DECL([], [nm_file_list_spec], [1],
4586
    [Specify filename containing input files for $NM])
4587
]) # _LT_CMD_GLOBAL_SYMBOLS
4588
4589
4590
# _LT_COMPILER_PIC([TAGNAME])
4591
# ---------------------------
4592
m4_defun([_LT_COMPILER_PIC],
4593
[m4_require([_LT_TAG_COMPILER])dnl
4594
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4595
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4596
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4597
4598
m4_if([$1], [CXX], [
4599
  # C++ specific cases for pic, static, wl, etc.
4600
  if test "$GXX" = yes; then
4601
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4602
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4603
4604
    case $host_os in
4605
    aix*)
4606
      # All AIX code is PIC.
4607
      if test "$host_cpu" = ia64; then
4608
	# AIX 5 now supports IA64 processor
4609
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4610
      fi
4611
      ;;
4612
4613
    amigaos*)
4614
      case $host_cpu in
4615
      powerpc)
4616
            # see comment about AmigaOS4 .so support
4617
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4618
        ;;
4619
      m68k)
4620
            # FIXME: we need at least 68020 code to build shared libraries, but
4621
            # adding the `-m68020' flag to GCC prevents building anything better,
4622
            # like `-m68040'.
4623
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4624
        ;;
4625
      esac
4626
      ;;
4627
4628
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4629
      # PIC is the default for these OSes.
4630
      ;;
4631
    mingw* | cygwin* | os2* | pw32* | cegcc*)
4632
      # This hack is so that the source file can tell whether it is being
4633
      # built for inclusion in a dll (and should export symbols for example).
4634
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4635
      # (--disable-auto-import) libraries
4636
      m4_if([$1], [GCJ], [],
4637
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4638
      ;;
4639
    darwin* | rhapsody*)
4640
      # PIC is the default on this platform
4641
      # Common symbols not allowed in MH_DYLIB files
4642
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4643
      ;;
4644
    *djgpp*)
4645
      # DJGPP does not support shared libraries at all
4646
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4647
      ;;
4648
    haiku*)
4649
      # PIC is the default for Haiku.
4650
      # The "-static" flag exists, but is broken.
4651
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4652
      ;;
4653
    interix[[3-9]]*)
4654
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4655
      # Instead, we relocate shared libraries at runtime.
4656
      ;;
4657
    sysv4*MP*)
4658
      if test -d /usr/nec; then
4659
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4660
      fi
4661
      ;;
4662
    hpux*)
4663
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4664
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4665
      # sets the default TLS model and affects inlining.
4666
      case $host_cpu in
4667
      hppa*64*)
4668
	;;
4669
      *)
4670
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4671
	;;
4672
      esac
4673
      ;;
4674
    *qnx* | *nto*)
4675
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4676
      # it will coredump.
4677
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4678
      ;;
4679
    *)
4680
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4681
      ;;
4682
    esac
4683
  else
4684
    case $host_os in
4685
      aix[[4-9]]*)
4686
	# All AIX code is PIC.
4687
	if test "$host_cpu" = ia64; then
4688
	  # AIX 5 now supports IA64 processor
4689
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4690
	else
4691
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4692
	fi
4693
	;;
4694
      chorus*)
4695
	case $cc_basename in
4696
	cxch68*)
4697
	  # Green Hills C++ Compiler
4698
	  # _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"
4699
	  ;;
4700
	esac
4701
	;;
4702
      mingw* | cygwin* | os2* | pw32* | cegcc*)
4703
	# This hack is so that the source file can tell whether it is being
4704
	# built for inclusion in a dll (and should export symbols for example).
4705
	m4_if([$1], [GCJ], [],
4706
	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4707
	;;
4708
      dgux*)
4709
	case $cc_basename in
4710
	  ec++*)
4711
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4712
	    ;;
4713
	  ghcx*)
4714
	    # Green Hills C++ Compiler
4715
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4716
	    ;;
4717
	  *)
4718
	    ;;
4719
	esac
4720
	;;
4721
      freebsd* | dragonfly*)
4722
	# FreeBSD uses GNU C++
4723
	;;
4724
      hpux9* | hpux10* | hpux11*)
4725
	case $cc_basename in
4726
	  CC*)
4727
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4728
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4729
	    if test "$host_cpu" != ia64; then
4730
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4731
	    fi
4732
	    ;;
4733
	  aCC*)
4734
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4735
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4736
	    case $host_cpu in
4737
	    hppa*64*|ia64*)
4738
	      # +Z the default
4739
	      ;;
4740
	    *)
4741
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4742
	      ;;
4743
	    esac
4744
	    ;;
4745
	  *)
4746
	    ;;
4747
	esac
4748
	;;
4749
      interix*)
4750
	# This is c89, which is MS Visual C++ (no shared libs)
4751
	# Anyone wants to do a port?
4752
	;;
4753
      irix5* | irix6* | nonstopux*)
4754
	case $cc_basename in
4755
	  CC*)
4756
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4757
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4758
	    # CC pic flag -KPIC is the default.
4759
	    ;;
4760
	  *)
4761
	    ;;
4762
	esac
4763
	;;
4764
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4765
	case $cc_basename in
4766
	  KCC*)
4767
	    # KAI C++ Compiler
4768
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4769
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4770
	    ;;
4771
	  ecpc* )
4772
	    # old Intel C++ for x86_64 which still supported -KPIC.
4773
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4774
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4775
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4776
	    ;;
4777
	  icpc* )
4778
	    # Intel C++, used to be incompatible with GCC.
4779
	    # ICC 10 doesn't accept -KPIC any more.
4780
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4781
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4782
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4783
	    ;;
4784
	  pgCC* | pgcpp*)
4785
	    # Portland Group C++ compiler
4786
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4787
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4788
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4789
	    ;;
4790
	  cxx*)
4791
	    # Compaq C++
4792
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4793
	    # Linux and Compaq Tru64 Unix objects are PIC.
4794
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4795
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4796
	    ;;
4797
	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4798
	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4799
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4800
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4801
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4802
	    ;;
4803
	  *)
4804
	    case `$CC -V 2>&1 | sed 5q` in
4805
	    *Sun\ C*)
4806
	      # Sun C++ 5.9
4807
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4808
	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4809
	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4810
	      ;;
4811
	    esac
4812
	    ;;
4813
	esac
4814
	;;
4815
      lynxos*)
4816
	;;
4817
      m88k*)
4818
	;;
4819
      mvs*)
4820
	case $cc_basename in
4821
	  cxx*)
4822
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4823
	    ;;
4824
	  *)
4825
	    ;;
4826
	esac
4827
	;;
4828
      netbsd* | netbsdelf*-gnu)
4829
	;;
4830
      *qnx* | *nto*)
4831
        # QNX uses GNU C++, but need to define -shared option too, otherwise
4832
        # it will coredump.
4833
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4834
        ;;
4835
      osf3* | osf4* | osf5*)
4836
	case $cc_basename in
4837
	  KCC*)
4838
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4839
	    ;;
4840
	  RCC*)
4841
	    # Rational C++ 2.4.1
4842
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4843
	    ;;
4844
	  cxx*)
4845
	    # Digital/Compaq C++
4846
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4847
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4848
	    # Linux and Compaq Tru64 Unix objects are PIC.
4849
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4850
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4851
	    ;;
4852
	  *)
4853
	    ;;
4854
	esac
4855
	;;
4856
      psos*)
4857
	;;
4858
      solaris*)
4859
	case $cc_basename in
4860
	  CC* | sunCC*)
4861
	    # Sun C++ 4.2, 5.x and Centerline C++
4862
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4863
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4864
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4865
	    ;;
4866
	  gcx*)
4867
	    # Green Hills C++ Compiler
4868
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4869
	    ;;
4870
	  *)
4871
	    ;;
4872
	esac
4873
	;;
4874
      sunos4*)
4875
	case $cc_basename in
4876
	  CC*)
4877
	    # Sun C++ 4.x
4878
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4879
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4880
	    ;;
4881
	  lcc*)
4882
	    # Lucid
4883
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4884
	    ;;
4885
	  *)
4886
	    ;;
4887
	esac
4888
	;;
4889
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4890
	case $cc_basename in
4891
	  CC*)
4892
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4893
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4894
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4895
	    ;;
4896
	esac
4897
	;;
4898
      tandem*)
4899
	case $cc_basename in
4900
	  NCC*)
4901
	    # NonStop-UX NCC 3.20
4902
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4903
	    ;;
4904
	  *)
4905
	    ;;
4906
	esac
4907
	;;
4908
      vxworks*)
4909
	;;
4910
      *)
4911
	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4912
	;;
4913
    esac
4914
  fi
4915
],
4916
[
4917
  if test "$GCC" = yes; then
4918
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4919
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4920
4921
    case $host_os in
4922
      aix*)
4923
      # All AIX code is PIC.
4924
      if test "$host_cpu" = ia64; then
4925
	# AIX 5 now supports IA64 processor
4926
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4927
      fi
4928
      ;;
4929
4930
    amigaos*)
4931
      case $host_cpu in
4932
      powerpc)
4933
            # see comment about AmigaOS4 .so support
4934
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4935
        ;;
4936
      m68k)
4937
            # FIXME: we need at least 68020 code to build shared libraries, but
4938
            # adding the `-m68020' flag to GCC prevents building anything better,
4939
            # like `-m68040'.
4940
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4941
        ;;
4942
      esac
4943
      ;;
4944
4945
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4946
      # PIC is the default for these OSes.
4947
      ;;
4948
4949
    mingw* | cygwin* | pw32* | os2* | cegcc*)
4950
      # This hack is so that the source file can tell whether it is being
4951
      # built for inclusion in a dll (and should export symbols for example).
4952
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4953
      # (--disable-auto-import) libraries
4954
      m4_if([$1], [GCJ], [],
4955
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4956
      ;;
4957
4958
    darwin* | rhapsody*)
4959
      # PIC is the default on this platform
4960
      # Common symbols not allowed in MH_DYLIB files
4961
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4962
      ;;
4963
4964
    haiku*)
4965
      # PIC is the default for Haiku.
4966
      # The "-static" flag exists, but is broken.
4967
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4968
      ;;
4969
4970
    hpux*)
4971
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4972
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4973
      # sets the default TLS model and affects inlining.
4974
      case $host_cpu in
4975
      hppa*64*)
4976
	# +Z the default
4977
	;;
4978
      *)
4979
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4980
	;;
4981
      esac
4982
      ;;
4983
4984
    interix[[3-9]]*)
4985
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4986
      # Instead, we relocate shared libraries at runtime.
4987
      ;;
4988
4989
    msdosdjgpp*)
4990
      # Just because we use GCC doesn't mean we suddenly get shared libraries
4991
      # on systems that don't support them.
4992
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4993
      enable_shared=no
4994
      ;;
4995
4996
    *nto* | *qnx*)
4997
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4998
      # it will coredump.
4999
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5000
      ;;
5001
5002
    sysv4*MP*)
5003
      if test -d /usr/nec; then
5004
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5005
      fi
5006
      ;;
5007
5008
    *)
5009
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5010
      ;;
5011
    esac
5012
5013
    case $cc_basename in
5014
    nvcc*) # Cuda Compiler Driver 2.2
5015
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5016
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
5017
      ;;
5018
    esac
5019
  else
5020
    # PORTME Check for flag to pass linker flags through the system compiler.
5021
    case $host_os in
5022
    aix*)
5023
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5024
      if test "$host_cpu" = ia64; then
5025
	# AIX 5 now supports IA64 processor
5026
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5027
      else
5028
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5029
      fi
5030
      ;;
5031
5032
    mingw* | cygwin* | pw32* | os2* | cegcc*)
5033
      # This hack is so that the source file can tell whether it is being
5034
      # built for inclusion in a dll (and should export symbols for example).
5035
      m4_if([$1], [GCJ], [],
5036
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5037
      ;;
5038
5039
    hpux9* | hpux10* | hpux11*)
5040
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5041
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5042
      # not for PA HP-UX.
5043
      case $host_cpu in
5044
      hppa*64*|ia64*)
5045
	# +Z the default
5046
	;;
5047
      *)
5048
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5049
	;;
5050
      esac
5051
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5052
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5053
      ;;
5054
5055
    irix5* | irix6* | nonstopux*)
5056
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5057
      # PIC (with -KPIC) is the default.
5058
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5059
      ;;
5060
5061
    linux* | k*bsd*-gnu | kopensolaris*-gnu)
5062
      case $cc_basename in
5063
      # old Intel for x86_64 which still supported -KPIC.
5064
      ecc*)
5065
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5066
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5067
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5068
        ;;
5069
      # icc used to be incompatible with GCC.
5070
      # ICC 10 doesn't accept -KPIC any more.
5071
      icc* | ifort*)
5072
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5073
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5074
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5075
        ;;
5076
      # Lahey Fortran 8.1.
5077
      lf95*)
5078
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5079
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5080
	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5081
	;;
5082
      nagfor*)
5083
	# NAG Fortran compiler
5084
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5085
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5086
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5087
	;;
5088
      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5089
        # Portland Group compilers (*not* the Pentium gcc compiler,
5090
	# which looks to be a dead project)
5091
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5092
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5093
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5094
        ;;
5095
      ccc*)
5096
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5097
        # All Alpha code is PIC.
5098
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5099
        ;;
5100
      xl* | bgxl* | bgf* | mpixl*)
5101
	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5102
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5103
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5104
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5105
	;;
5106
      *)
5107
	case `$CC -V 2>&1 | sed 5q` in
5108
	*Sun\ F* | *Sun*Fortran*)
5109
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5110
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5111
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5112
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5113
	  ;;
5114
	*Sun\ C*)
5115
	  # Sun C 5.9
5116
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5117
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5118
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5119
	  ;;
5120
	esac
5121
	;;
5122
      esac
5123
      ;;
5124
5125
    newsos6)
5126
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5127
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5128
      ;;
5129
5130
    *nto* | *qnx*)
5131
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5132
      # it will coredump.
5133
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5134
      ;;
5135
5136
    osf3* | osf4* | osf5*)
5137
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5138
      # All OSF/1 code is PIC.
5139
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5140
      ;;
5141
5142
    rdos*)
5143
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5144
      ;;
5145
5146
    solaris*)
5147
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5148
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5149
      case $cc_basename in
5150
      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5151
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5152
      *)
5153
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5154
      esac
5155
      ;;
5156
5157
    sunos4*)
5158
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5159
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5160
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5161
      ;;
5162
5163
    sysv4 | sysv4.2uw2* | sysv4.3*)
5164
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5165
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5166
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5167
      ;;
5168
5169
    sysv4*MP*)
5170
      if test -d /usr/nec ;then
5171
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5172
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5173
      fi
5174
      ;;
5175
5176
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5177
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5178
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5179
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5180
      ;;
5181
5182
    unicos*)
5183
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5184
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5185
      ;;
5186
5187
    uts4*)
5188
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5189
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5190
      ;;
5191
5192
    *)
5193
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5194
      ;;
5195
    esac
5196
  fi
5197
])
5198
case $host_os in
5199
  # For platforms which do not support PIC, -DPIC is meaningless:
5200
  *djgpp*)
5201
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5202
    ;;
5203
  *)
5204
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5205
    ;;
5206
esac
5207
5208
AC_CACHE_CHECK([for $compiler option to produce PIC],
5209
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5210
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5211
_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5212
5213
#
5214
# Check to make sure the PIC flag actually works.
5215
#
5216
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5217
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5218
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5219
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5220
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5221
     "" | " "*) ;;
5222
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5223
     esac],
5224
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5225
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5226
fi
5227
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5228
	[Additional compiler flags for building library objects])
5229
5230
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5231
	[How to pass a linker flag through the compiler])
5232
#
5233
# Check to make sure the static flag actually works.
5234
#
5235
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5236
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5237
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5238
  $lt_tmp_static_flag,
5239
  [],
5240
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5241
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5242
	[Compiler flag to prevent dynamic linking])
5243
])# _LT_COMPILER_PIC
5244
5245
5246
# _LT_LINKER_SHLIBS([TAGNAME])
5247
# ----------------------------
5248
# See if the linker supports building shared libraries.
5249
m4_defun([_LT_LINKER_SHLIBS],
5250
[AC_REQUIRE([LT_PATH_LD])dnl
5251
AC_REQUIRE([LT_PATH_NM])dnl
5252
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5253
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5254
m4_require([_LT_DECL_EGREP])dnl
5255
m4_require([_LT_DECL_SED])dnl
5256
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5257
m4_require([_LT_TAG_COMPILER])dnl
5258
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5259
m4_if([$1], [CXX], [
5260
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5261
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5262
  case $host_os in
5263
  aix[[4-9]]*)
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
    # Also, AIX nm treats weak defined symbols like other global defined
5267
    # symbols, whereas GNU nm marks them as "W".
5268
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5269
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5270
    else
5271
      _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'
5272
    fi
5273
    ;;
5274
  pw32*)
5275
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5276
    ;;
5277
  cygwin* | mingw* | cegcc*)
5278
    case $cc_basename in
5279
    cl*) ;;
5280
    *)
5281
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5282
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5283
      ;;
5284
    esac
5285
    ;;
5286
  linux* | k*bsd*-gnu | gnu*)
5287
    _LT_TAGVAR(link_all_deplibs, $1)=no
5288
    ;;
5289
  *)
5290
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5291
    ;;
5292
  esac
5293
], [
5294
  runpath_var=
5295
  _LT_TAGVAR(allow_undefined_flag, $1)=
5296
  _LT_TAGVAR(always_export_symbols, $1)=no
5297
  _LT_TAGVAR(archive_cmds, $1)=
5298
  _LT_TAGVAR(archive_expsym_cmds, $1)=
5299
  _LT_TAGVAR(compiler_needs_object, $1)=no
5300
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5301
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5302
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5303
  _LT_TAGVAR(hardcode_automatic, $1)=no
5304
  _LT_TAGVAR(hardcode_direct, $1)=no
5305
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5306
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5307
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5308
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5309
  _LT_TAGVAR(hardcode_minus_L, $1)=no
5310
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5311
  _LT_TAGVAR(inherit_rpath, $1)=no
5312
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5313
  _LT_TAGVAR(module_cmds, $1)=
5314
  _LT_TAGVAR(module_expsym_cmds, $1)=
5315
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5316
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5317
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5318
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5319
  # include_expsyms should be a list of space-separated symbols to be *always*
5320
  # included in the symbol list
5321
  _LT_TAGVAR(include_expsyms, $1)=
5322
  # exclude_expsyms can be an extended regexp of symbols to exclude
5323
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5324
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5325
  # as well as any symbol that contains `d'.
5326
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5327
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5328
  # platforms (ab)use it in PIC code, but their linkers get confused if
5329
  # the symbol is explicitly referenced.  Since portable code cannot
5330
  # rely on this symbol name, it's probably fine to never include it in
5331
  # preloaded symbol tables.
5332
  # Exclude shared library initialization/finalization symbols.
5333
dnl Note also adjust exclude_expsyms for C++ above.
5334
  extract_expsyms_cmds=
5335
5336
  case $host_os in
5337
  cygwin* | mingw* | pw32* | cegcc*)
5338
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5339
    # When not using gcc, we currently assume that we are using
5340
    # Microsoft Visual C++.
5341
    if test "$GCC" != yes; then
5342
      with_gnu_ld=no
5343
    fi
5344
    ;;
5345
  interix*)
5346
    # we just hope/assume this is gcc and not c89 (= MSVC++)
5347
    with_gnu_ld=yes
5348
    ;;
5349
  openbsd*)
5350
    with_gnu_ld=no
5351
    ;;
5352
  linux* | k*bsd*-gnu | gnu*)
5353
    _LT_TAGVAR(link_all_deplibs, $1)=no
5354
    ;;
5355
  esac
5356
5357
  _LT_TAGVAR(ld_shlibs, $1)=yes
5358
5359
  # On some targets, GNU ld is compatible enough with the native linker
5360
  # that we're better off using the native interface for both.
5361
  lt_use_gnu_ld_interface=no
5362
  if test "$with_gnu_ld" = yes; then
5363
    case $host_os in
5364
      aix*)
5365
	# The AIX port of GNU ld has always aspired to compatibility
5366
	# with the native linker.  However, as the warning in the GNU ld
5367
	# block says, versions before 2.19.5* couldn't really create working
5368
	# shared libraries, regardless of the interface used.
5369
	case `$LD -v 2>&1` in
5370
	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5371
	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5372
	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5373
	  *)
5374
	    lt_use_gnu_ld_interface=yes
5375
	    ;;
5376
	esac
5377
	;;
5378
      *)
5379
	lt_use_gnu_ld_interface=yes
5380
	;;
5381
    esac
5382
  fi
5383
5384
  if test "$lt_use_gnu_ld_interface" = yes; then
5385
    # If archive_cmds runs LD, not CC, wlarc should be empty
5386
    wlarc='${wl}'
5387
5388
    # Set some defaults for GNU ld with shared library support. These
5389
    # are reset later if shared libraries are not supported. Putting them
5390
    # here allows them to be overridden if necessary.
5391
    runpath_var=LD_RUN_PATH
5392
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5393
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5394
    # ancient GNU ld didn't support --whole-archive et. al.
5395
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5396
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5397
    else
5398
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5399
    fi
5400
    supports_anon_versioning=no
5401
    case `$LD -v 2>&1` in
5402
      *GNU\ gold*) supports_anon_versioning=yes ;;
5403
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5404
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5405
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5406
      *\ 2.11.*) ;; # other 2.11 versions
5407
      *) supports_anon_versioning=yes ;;
5408
    esac
5409
5410
    # See if GNU ld supports shared libraries.
5411
    case $host_os in
5412
    aix[[3-9]]*)
5413
      # On AIX/PPC, the GNU linker is very broken
5414
      if test "$host_cpu" != ia64; then
5415
	_LT_TAGVAR(ld_shlibs, $1)=no
5416
	cat <<_LT_EOF 1>&2
5417
5418
*** Warning: the GNU linker, at least up to release 2.19, is reported
5419
*** to be unable to reliably create shared libraries on AIX.
5420
*** Therefore, libtool is disabling shared libraries support.  If you
5421
*** really care for shared libraries, you may want to install binutils
5422
*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5423
*** You will then need to restart the configuration process.
5424
5425
_LT_EOF
5426
      fi
5427
      ;;
5428
5429
    amigaos*)
5430
      case $host_cpu in
5431
      powerpc)
5432
            # see comment about AmigaOS4 .so support
5433
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5434
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5435
        ;;
5436
      m68k)
5437
            _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)'
5438
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5439
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5440
        ;;
5441
      esac
5442
      ;;
5443
5444
    beos*)
5445
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5446
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5447
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5448
	# support --undefined.  This deserves some investigation.  FIXME
5449
	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5450
      else
5451
	_LT_TAGVAR(ld_shlibs, $1)=no
5452
      fi
5453
      ;;
5454
5455
    cygwin* | mingw* | pw32* | cegcc*)
5456
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5457
      # as there is no search path for DLLs.
5458
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5459
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5460
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5461
      _LT_TAGVAR(always_export_symbols, $1)=no
5462
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5463
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5464
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5465
5466
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5467
        _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'
5468
	# If the export-symbols file already is a .def file (1st line
5469
	# is EXPORTS), use it as is; otherwise, prepend...
5470
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5471
	  cp $export_symbols $output_objdir/$soname.def;
5472
	else
5473
	  echo EXPORTS > $output_objdir/$soname.def;
5474
	  cat $export_symbols >> $output_objdir/$soname.def;
5475
	fi~
5476
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5477
      else
5478
	_LT_TAGVAR(ld_shlibs, $1)=no
5479
      fi
5480
      ;;
5481
5482
    haiku*)
5483
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5484
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5485
      ;;
5486
5487
    interix[[3-9]]*)
5488
      _LT_TAGVAR(hardcode_direct, $1)=no
5489
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5490
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5491
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5492
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5493
      # Instead, shared libraries are loaded at an image base (0x10000000 by
5494
      # default) and relocated if they conflict, which is a slow very memory
5495
      # consuming and fragmenting process.  To avoid this, we pick a random,
5496
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5497
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5498
      _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'
5499
      _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'
5500
      ;;
5501
5502
    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5503
      tmp_diet=no
5504
      if test "$host_os" = linux-dietlibc; then
5505
	case $cc_basename in
5506
	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5507
	esac
5508
      fi
5509
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5510
	 && test "$tmp_diet" = no
5511
      then
5512
	tmp_addflag=' $pic_flag'
5513
	tmp_sharedflag='-shared'
5514
	case $cc_basename,$host_cpu in
5515
        pgcc*)				# Portland Group C compiler
5516
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5517
	  tmp_addflag=' $pic_flag'
5518
	  ;;
5519
	pgf77* | pgf90* | pgf95* | pgfortran*)
5520
					# Portland Group f77 and f90 compilers
5521
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5522
	  tmp_addflag=' $pic_flag -Mnomain' ;;
5523
	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5524
	  tmp_addflag=' -i_dynamic' ;;
5525
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5526
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5527
	ifc* | ifort*)			# Intel Fortran compiler
5528
	  tmp_addflag=' -nofor_main' ;;
5529
	lf95*)				# Lahey Fortran 8.1
5530
	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5531
	  tmp_sharedflag='--shared' ;;
5532
	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5533
	  tmp_sharedflag='-qmkshrobj'
5534
	  tmp_addflag= ;;
5535
	nvcc*)	# Cuda Compiler Driver 2.2
5536
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5537
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5538
	  ;;
5539
	esac
5540
	case `$CC -V 2>&1 | sed 5q` in
5541
	*Sun\ C*)			# Sun C 5.9
5542
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5543
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5544
	  tmp_sharedflag='-G' ;;
5545
	*Sun\ F*)			# Sun Fortran 8.3
5546
	  tmp_sharedflag='-G' ;;
5547
	esac
5548
	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5549
5550
        if test "x$supports_anon_versioning" = xyes; then
5551
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5552
	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5553
	    echo "local: *; };" >> $output_objdir/$libname.ver~
5554
	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5555
        fi
5556
5557
	case $cc_basename in
5558
	xlf* | bgf* | bgxlf* | mpixlf*)
5559
	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5560
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5561
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5562
	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5563
	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5564
	  if test "x$supports_anon_versioning" = xyes; then
5565
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5566
	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5567
	      echo "local: *; };" >> $output_objdir/$libname.ver~
5568
	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5569
	  fi
5570
	  ;;
5571
	esac
5572
      else
5573
        _LT_TAGVAR(ld_shlibs, $1)=no
5574
      fi
5575
      ;;
5576
5577
    netbsd* | netbsdelf*-gnu)
5578
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5579
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5580
	wlarc=
5581
      else
5582
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5583
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5584
      fi
5585
      ;;
5586
5587
    solaris*)
5588
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5589
	_LT_TAGVAR(ld_shlibs, $1)=no
5590
	cat <<_LT_EOF 1>&2
5591
5592
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5593
*** create shared libraries on Solaris systems.  Therefore, libtool
5594
*** is disabling shared libraries support.  We urge you to upgrade GNU
5595
*** binutils to release 2.9.1 or newer.  Another option is to modify
5596
*** your PATH or compiler configuration so that the native linker is
5597
*** used, and then restart.
5598
5599
_LT_EOF
5600
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5601
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5602
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5603
      else
5604
	_LT_TAGVAR(ld_shlibs, $1)=no
5605
      fi
5606
      ;;
5607
5608
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5609
      case `$LD -v 2>&1` in
5610
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5611
	_LT_TAGVAR(ld_shlibs, $1)=no
5612
	cat <<_LT_EOF 1>&2
5613
5614
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5615
*** reliably create shared libraries on SCO systems.  Therefore, libtool
5616
*** is disabling shared libraries support.  We urge you to upgrade GNU
5617
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5618
*** your PATH or compiler configuration so that the native linker is
5619
*** used, and then restart.
5620
5621
_LT_EOF
5622
	;;
5623
	*)
5624
	  # For security reasons, it is highly recommended that you always
5625
	  # use absolute paths for naming shared libraries, and exclude the
5626
	  # DT_RUNPATH tag from executables and libraries.  But doing so
5627
	  # requires that you compile everything twice, which is a pain.
5628
	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5629
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5630
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5631
	    _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'
5632
	  else
5633
	    _LT_TAGVAR(ld_shlibs, $1)=no
5634
	  fi
5635
	;;
5636
      esac
5637
      ;;
5638
5639
    sunos4*)
5640
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5641
      wlarc=
5642
      _LT_TAGVAR(hardcode_direct, $1)=yes
5643
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5644
      ;;
5645
5646
    *)
5647
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5648
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5649
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5650
      else
5651
	_LT_TAGVAR(ld_shlibs, $1)=no
5652
      fi
5653
      ;;
5654
    esac
5655
5656
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5657
      runpath_var=
5658
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5659
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5660
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5661
    fi
5662
  else
5663
    # PORTME fill in a description of your system's linker (not GNU ld)
5664
    case $host_os in
5665
    aix3*)
5666
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5667
      _LT_TAGVAR(always_export_symbols, $1)=yes
5668
      _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'
5669
      # Note: this linker hardcodes the directories in LIBPATH if there
5670
      # are no directories specified by -L.
5671
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5672
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5673
	# Neither direct hardcoding nor static linking is supported with a
5674
	# broken collect2.
5675
	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5676
      fi
5677
      ;;
5678
5679
    aix[[4-9]]*)
5680
      if test "$host_cpu" = ia64; then
5681
	# On IA64, the linker does run time linking by default, so we don't
5682
	# have to do anything special.
5683
	aix_use_runtimelinking=no
5684
	exp_sym_flag='-Bexport'
5685
	no_entry_flag=""
5686
      else
5687
	# If we're using GNU nm, then we don't want the "-C" option.
5688
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5689
	# Also, AIX nm treats weak defined symbols like other global
5690
	# defined symbols, whereas GNU nm marks them as "W".
5691
	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5692
	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5693
	else
5694
	  _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'
5695
	fi
5696
	aix_use_runtimelinking=no
5697
5698
	# Test if we are trying to use run time linking or normal
5699
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5700
	# need to do runtime linking.
5701
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5702
	  for ld_flag in $LDFLAGS; do
5703
	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5704
	    aix_use_runtimelinking=yes
5705
	    break
5706
	  fi
5707
	  done
5708
	  ;;
5709
	esac
5710
5711
	exp_sym_flag='-bexport'
5712
	no_entry_flag='-bnoentry'
5713
      fi
5714
5715
      # When large executables or shared objects are built, AIX ld can
5716
      # have problems creating the table of contents.  If linking a library
5717
      # or program results in "error TOC overflow" add -mminimal-toc to
5718
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5719
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5720
5721
      _LT_TAGVAR(archive_cmds, $1)=''
5722
      _LT_TAGVAR(hardcode_direct, $1)=yes
5723
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5724
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5725
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5726
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5727
5728
      if test "$GCC" = yes; then
5729
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5730
	# We only want to do this on AIX 4.2 and lower, the check
5731
	# below for broken collect2 doesn't work under 4.3+
5732
	  collect2name=`${CC} -print-prog-name=collect2`
5733
	  if test -f "$collect2name" &&
5734
	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5735
	  then
5736
	  # We have reworked collect2
5737
	  :
5738
	  else
5739
	  # We have old collect2
5740
	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5741
	  # It fails to find uninstalled libraries when the uninstalled
5742
	  # path is not listed in the libpath.  Setting hardcode_minus_L
5743
	  # to unsupported forces relinking
5744
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5745
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5746
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5747
	  fi
5748
	  ;;
5749
	esac
5750
	shared_flag='-shared'
5751
	if test "$aix_use_runtimelinking" = yes; then
5752
	  shared_flag="$shared_flag "'${wl}-G'
5753
	fi
5754
	_LT_TAGVAR(link_all_deplibs, $1)=no
5755
      else
5756
	# not using gcc
5757
	if test "$host_cpu" = ia64; then
5758
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5759
	# chokes on -Wl,-G. The following line is correct:
5760
	  shared_flag='-G'
5761
	else
5762
	  if test "$aix_use_runtimelinking" = yes; then
5763
	    shared_flag='${wl}-G'
5764
	  else
5765
	    shared_flag='${wl}-bM:SRE'
5766
	  fi
5767
	fi
5768
      fi
5769
5770
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5771
      # It seems that -bexpall does not export symbols beginning with
5772
      # underscore (_), so it is better to generate a list of symbols to export.
5773
      _LT_TAGVAR(always_export_symbols, $1)=yes
5774
      if test "$aix_use_runtimelinking" = yes; then
5775
	# Warning - without using the other runtime loading flags (-brtl),
5776
	# -berok will link without error, but may produce a broken library.
5777
	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5778
        # Determine the default libpath from the value encoded in an
5779
        # empty executable.
5780
        _LT_SYS_MODULE_PATH_AIX([$1])
5781
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5782
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5783
      else
5784
	if test "$host_cpu" = ia64; then
5785
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5786
	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5787
	  _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"
5788
	else
5789
	 # Determine the default libpath from the value encoded in an
5790
	 # empty executable.
5791
	 _LT_SYS_MODULE_PATH_AIX([$1])
5792
	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5793
	  # Warning - without using the other run time loading flags,
5794
	  # -berok will link without error, but may produce a broken library.
5795
	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5796
	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5797
	  if test "$with_gnu_ld" = yes; then
5798
	    # We only use this code for GNU lds that support --whole-archive.
5799
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5800
	  else
5801
	    # Exported symbols can be pulled into shared objects from archives
5802
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5803
	  fi
5804
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5805
	  # This is similar to how AIX traditionally builds its shared libraries.
5806
	  _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'
5807
	fi
5808
      fi
5809
      ;;
5810
5811
    amigaos*)
5812
      case $host_cpu in
5813
      powerpc)
5814
            # see comment about AmigaOS4 .so support
5815
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5816
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5817
        ;;
5818
      m68k)
5819
            _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)'
5820
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5821
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5822
        ;;
5823
      esac
5824
      ;;
5825
5826
    bsdi[[45]]*)
5827
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5828
      ;;
5829
5830
    cygwin* | mingw* | pw32* | cegcc*)
5831
      # When not using gcc, we currently assume that we are using
5832
      # Microsoft Visual C++.
5833
      # hardcode_libdir_flag_spec is actually meaningless, as there is
5834
      # no search path for DLLs.
5835
      case $cc_basename in
5836
      cl*)
5837
	# Native MSVC
5838
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5839
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5840
	_LT_TAGVAR(always_export_symbols, $1)=yes
5841
	_LT_TAGVAR(file_list_spec, $1)='@'
5842
	# Tell ltmain to make .lib files, not .a files.
5843
	libext=lib
5844
	# Tell ltmain to make .dll files, not .so files.
5845
	shrext_cmds=".dll"
5846
	# FIXME: Setting linknames here is a bad hack.
5847
	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5848
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5849
	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5850
	  else
5851
	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5852
	  fi~
5853
	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5854
	  linknames='
5855
	# The linker will not automatically build a static lib if we build a DLL.
5856
	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5857
	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5858
	_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'
5859
	# Don't use ranlib
5860
	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5861
	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5862
	  lt_tool_outputfile="@TOOL_OUTPUT@"~
5863
	  case $lt_outputfile in
5864
	    *.exe|*.EXE) ;;
5865
	    *)
5866
	      lt_outputfile="$lt_outputfile.exe"
5867
	      lt_tool_outputfile="$lt_tool_outputfile.exe"
5868
	      ;;
5869
	  esac~
5870
	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5871
	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5872
	    $RM "$lt_outputfile.manifest";
5873
	  fi'
5874
	;;
5875
      *)
5876
	# Assume MSVC wrapper
5877
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5878
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5879
	# Tell ltmain to make .lib files, not .a files.
5880
	libext=lib
5881
	# Tell ltmain to make .dll files, not .so files.
5882
	shrext_cmds=".dll"
5883
	# FIXME: Setting linknames here is a bad hack.
5884
	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5885
	# The linker will automatically build a .lib file if we build a DLL.
5886
	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5887
	# FIXME: Should let the user specify the lib program.
5888
	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5889
	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5890
	;;
5891
      esac
5892
      ;;
5893
5894
    darwin* | rhapsody*)
5895
      _LT_DARWIN_LINKER_FEATURES($1)
5896
      ;;
5897
5898
    dgux*)
5899
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5900
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5901
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5902
      ;;
5903
5904
    freebsd1*)
5905
      _LT_TAGVAR(ld_shlibs, $1)=no
5906
      ;;
5907
5908
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5909
    # support.  Future versions do this automatically, but an explicit c++rt0.o
5910
    # does not break anything, and helps significantly (at the cost of a little
5911
    # extra space).
5912
    freebsd2.2*)
5913
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5914
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5915
      _LT_TAGVAR(hardcode_direct, $1)=yes
5916
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5917
      ;;
5918
5919
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5920
    freebsd2*)
5921
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5922
      _LT_TAGVAR(hardcode_direct, $1)=yes
5923
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5924
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5925
      ;;
5926
5927
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5928
    freebsd* | dragonfly*)
5929
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5930
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5931
      _LT_TAGVAR(hardcode_direct, $1)=yes
5932
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5933
      ;;
5934
5935
    hpux9*)
5936
      if test "$GCC" = yes; then
5937
	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5938
      else
5939
	_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'
5940
      fi
5941
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5942
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5943
      _LT_TAGVAR(hardcode_direct, $1)=yes
5944
5945
      # hardcode_minus_L: Not really in the search PATH,
5946
      # but as the default location of the library.
5947
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5948
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5949
      ;;
5950
5951
    hpux10*)
5952
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5953
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5954
      else
5955
	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5956
      fi
5957
      if test "$with_gnu_ld" = no; then
5958
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5959
	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5960
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5961
	_LT_TAGVAR(hardcode_direct, $1)=yes
5962
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5963
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5964
	# hardcode_minus_L: Not really in the search PATH,
5965
	# but as the default location of the library.
5966
	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5967
      fi
5968
      ;;
5969
5970
    hpux11*)
5971
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5972
	case $host_cpu in
5973
	hppa*64*)
5974
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5975
	  ;;
5976
	ia64*)
5977
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5978
	  ;;
5979
	*)
5980
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5981
	  ;;
5982
	esac
5983
      else
5984
	case $host_cpu in
5985
	hppa*64*)
5986
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5987
	  ;;
5988
	ia64*)
5989
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5990
	  ;;
5991
	*)
5992
	m4_if($1, [], [
5993
	  # Older versions of the 11.00 compiler do not understand -b yet
5994
	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5995
	  _LT_LINKER_OPTION([if $CC understands -b],
5996
	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5997
	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5998
	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5999
	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6000
	  ;;
6001
	esac
6002
      fi
6003
      if test "$with_gnu_ld" = no; then
6004
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6005
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6006
6007
	case $host_cpu in
6008
	hppa*64*|ia64*)
6009
	  _LT_TAGVAR(hardcode_direct, $1)=no
6010
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6011
	  ;;
6012
	*)
6013
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6014
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6015
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6016
6017
	  # hardcode_minus_L: Not really in the search PATH,
6018
	  # but as the default location of the library.
6019
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6020
	  ;;
6021
	esac
6022
      fi
6023
      ;;
6024
6025
    irix5* | irix6* | nonstopux*)
6026
      if test "$GCC" = yes; then
6027
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6028
	# Try to use the -exported_symbol ld option, if it does not
6029
	# work, assume that -exports_file does not work either and
6030
	# implicitly export all symbols.
6031
	# This should be the same for all languages, so no per-tag cache variable.
6032
	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6033
	  [lt_cv_irix_exported_symbol],
6034
	  [save_LDFLAGS="$LDFLAGS"
6035
	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6036
	   AC_LINK_IFELSE(
6037
	     [AC_LANG_SOURCE(
6038
	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6039
			      [C++], [[int foo (void) { return 0; }]],
6040
			      [Fortran 77], [[
6041
      subroutine foo
6042
      end]],
6043
			      [Fortran], [[
6044
      subroutine foo
6045
      end]])])],
6046
	      [lt_cv_irix_exported_symbol=yes],
6047
	      [lt_cv_irix_exported_symbol=no])
6048
           LDFLAGS="$save_LDFLAGS"])
6049
	if test "$lt_cv_irix_exported_symbol" = yes; then
6050
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6051
	fi
6052
      else
6053
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6054
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6055
      fi
6056
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6057
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6058
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6059
      _LT_TAGVAR(inherit_rpath, $1)=yes
6060
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6061
      ;;
6062
6063
    netbsd* | netbsdelf*-gnu)
6064
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6065
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6066
      else
6067
	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6068
      fi
6069
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6070
      _LT_TAGVAR(hardcode_direct, $1)=yes
6071
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6072
      ;;
6073
6074
    newsos6)
6075
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6076
      _LT_TAGVAR(hardcode_direct, $1)=yes
6077
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6078
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6079
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6080
      ;;
6081
6082
    *nto* | *qnx*)
6083
      ;;
6084
6085
    openbsd*)
6086
      if test -f /usr/libexec/ld.so; then
6087
	_LT_TAGVAR(hardcode_direct, $1)=yes
6088
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6089
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6090
	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6091
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6092
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6093
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6094
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6095
	else
6096
	  case $host_os in
6097
	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6098
	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6099
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6100
	     ;;
6101
	   *)
6102
	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6103
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6104
	     ;;
6105
	  esac
6106
	fi
6107
      else
6108
	_LT_TAGVAR(ld_shlibs, $1)=no
6109
      fi
6110
      ;;
6111
6112
    os2*)
6113
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6114
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6115
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6116
      _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'
6117
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6118
      ;;
6119
6120
    osf3*)
6121
      if test "$GCC" = yes; then
6122
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6123
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6124
      else
6125
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6126
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6127
      fi
6128
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6129
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6130
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6131
      ;;
6132
6133
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6134
      if test "$GCC" = yes; then
6135
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6136
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6137
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6138
      else
6139
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6140
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6141
	_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~
6142
	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6143
6144
	# Both c and cxx compiler support -rpath directly
6145
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6146
      fi
6147
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6148
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6149
      ;;
6150
6151
    solaris*)
6152
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6153
      if test "$GCC" = yes; then
6154
	wlarc='${wl}'
6155
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6156
	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6157
	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6158
      else
6159
	case `$CC -V 2>&1` in
6160
	*"Compilers 5.0"*)
6161
	  wlarc=''
6162
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6163
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6164
	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6165
	  ;;
6166
	*)
6167
	  wlarc='${wl}'
6168
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6169
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6170
	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6171
	  ;;
6172
	esac
6173
      fi
6174
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6175
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6176
      case $host_os in
6177
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6178
      *)
6179
	# The compiler driver will combine and reorder linker options,
6180
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6181
	# but is careful enough not to reorder.
6182
	# Supported since Solaris 2.6 (maybe 2.5.1?)
6183
	if test "$GCC" = yes; then
6184
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6185
	else
6186
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6187
	fi
6188
	;;
6189
      esac
6190
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6191
      ;;
6192
6193
    sunos4*)
6194
      if test "x$host_vendor" = xsequent; then
6195
	# Use $CC to link under sequent, because it throws in some extra .o
6196
	# files that make .init and .fini sections work.
6197
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6198
      else
6199
	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6200
      fi
6201
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6202
      _LT_TAGVAR(hardcode_direct, $1)=yes
6203
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6204
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6205
      ;;
6206
6207
    sysv4)
6208
      case $host_vendor in
6209
	sni)
6210
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6211
	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6212
	;;
6213
	siemens)
6214
	  ## LD is ld it makes a PLAMLIB
6215
	  ## CC just makes a GrossModule.
6216
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6217
	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6218
	  _LT_TAGVAR(hardcode_direct, $1)=no
6219
        ;;
6220
	motorola)
6221
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6222
	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6223
	;;
6224
      esac
6225
      runpath_var='LD_RUN_PATH'
6226
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6227
      ;;
6228
6229
    sysv4.3*)
6230
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6231
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6232
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6233
      ;;
6234
6235
    sysv4*MP*)
6236
      if test -d /usr/nec; then
6237
	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6238
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6239
	runpath_var=LD_RUN_PATH
6240
	hardcode_runpath_var=yes
6241
	_LT_TAGVAR(ld_shlibs, $1)=yes
6242
      fi
6243
      ;;
6244
6245
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6246
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6247
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6248
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6249
      runpath_var='LD_RUN_PATH'
6250
6251
      if test "$GCC" = yes; then
6252
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6253
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6254
      else
6255
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6256
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6257
      fi
6258
      ;;
6259
6260
    sysv5* | sco3.2v5* | sco5v6*)
6261
      # Note: We can NOT use -z defs as we might desire, because we do not
6262
      # link with -lc, and that would cause any symbols used from libc to
6263
      # always be unresolved, which means just about no library would
6264
      # ever link correctly.  If we're not using GNU ld we use -z text
6265
      # though, which does catch some bad symbols but isn't as heavy-handed
6266
      # as -z defs.
6267
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6268
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6269
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6270
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6271
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6272
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6273
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6274
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6275
      runpath_var='LD_RUN_PATH'
6276
6277
      if test "$GCC" = yes; then
6278
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6279
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6280
      else
6281
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6282
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6283
      fi
6284
      ;;
6285
6286
    uts4*)
6287
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6288
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6289
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6290
      ;;
6291
6292
    *)
6293
      _LT_TAGVAR(ld_shlibs, $1)=no
6294
      ;;
6295
    esac
6296
6297
    if test x$host_vendor = xsni; then
6298
      case $host in
6299
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6300
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6301
	;;
6302
      esac
6303
    fi
6304
  fi
6305
])
6306
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6307
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6308
6309
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6310
6311
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6312
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6313
_LT_DECL([], [extract_expsyms_cmds], [2],
6314
    [The commands to extract the exported symbol list from a shared archive])
6315
6316
#
6317
# Do we need to explicitly link libc?
6318
#
6319
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6320
x|xyes)
6321
  # Assume -lc should be added
6322
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6323
6324
  if test "$enable_shared" = yes && test "$GCC" = yes; then
6325
    case $_LT_TAGVAR(archive_cmds, $1) in
6326
    *'~'*)
6327
      # FIXME: we may have to deal with multi-command sequences.
6328
      ;;
6329
    '$CC '*)
6330
      # Test whether the compiler implicitly links with -lc since on some
6331
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6332
      # to ld, don't add -lc before -lgcc.
6333
      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6334
	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6335
	[$RM conftest*
6336
	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6337
6338
	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6339
	  soname=conftest
6340
	  lib=conftest
6341
	  libobjs=conftest.$ac_objext
6342
	  deplibs=
6343
	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6344
	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6345
	  compiler_flags=-v
6346
	  linker_flags=-v
6347
	  verstring=
6348
	  output_objdir=.
6349
	  libname=conftest
6350
	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6351
	  _LT_TAGVAR(allow_undefined_flag, $1)=
6352
	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6353
	  then
6354
	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6355
	  else
6356
	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6357
	  fi
6358
	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6359
	else
6360
	  cat conftest.err 1>&5
6361
	fi
6362
	$RM conftest*
6363
	])
6364
      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6365
      ;;
6366
    esac
6367
  fi
6368
  ;;
6369
esac
6370
6371
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6372
    [Whether or not to add -lc for building shared libraries])
6373
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6374
    [enable_shared_with_static_runtimes], [0],
6375
    [Whether or not to disallow shared libs when runtime libs are static])
6376
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6377
    [Compiler flag to allow reflexive dlopens])
6378
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6379
    [Compiler flag to generate shared objects directly from archives])
6380
_LT_TAGDECL([], [compiler_needs_object], [1],
6381
    [Whether the compiler copes with passing no objects directly])
6382
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6383
    [Create an old-style archive from a shared archive])
6384
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6385
    [Create a temporary old-style archive to link instead of a shared archive])
6386
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6387
_LT_TAGDECL([], [archive_expsym_cmds], [2])
6388
_LT_TAGDECL([], [module_cmds], [2],
6389
    [Commands used to build a loadable module if different from building
6390
    a shared archive.])
6391
_LT_TAGDECL([], [module_expsym_cmds], [2])
6392
_LT_TAGDECL([], [with_gnu_ld], [1],
6393
    [Whether we are building with GNU ld or not])
6394
_LT_TAGDECL([], [allow_undefined_flag], [1],
6395
    [Flag that allows shared libraries with undefined symbols to be built])
6396
_LT_TAGDECL([], [no_undefined_flag], [1],
6397
    [Flag that enforces no undefined symbols])
6398
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6399
    [Flag to hardcode $libdir into a binary during linking.
6400
    This must work even if $libdir does not exist])
6401
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6402
    [[If ld is used when linking, flag to hardcode $libdir into a binary
6403
    during linking.  This must work even if $libdir does not exist]])
6404
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6405
    [Whether we need a single "-rpath" flag with a separated argument])
6406
_LT_TAGDECL([], [hardcode_direct], [0],
6407
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6408
    DIR into the resulting binary])
6409
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6410
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6411
    DIR into the resulting binary and the resulting library dependency is
6412
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6413
    library is relocated])
6414
_LT_TAGDECL([], [hardcode_minus_L], [0],
6415
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6416
    into the resulting binary])
6417
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6418
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6419
    into the resulting binary])
6420
_LT_TAGDECL([], [hardcode_automatic], [0],
6421
    [Set to "yes" if building a shared library automatically hardcodes DIR
6422
    into the library and all subsequent libraries and executables linked
6423
    against it])
6424
_LT_TAGDECL([], [inherit_rpath], [0],
6425
    [Set to yes if linker adds runtime paths of dependent libraries
6426
    to runtime path list])
6427
_LT_TAGDECL([], [link_all_deplibs], [0],
6428
    [Whether libtool must link a program against all its dependency libraries])
6429
_LT_TAGDECL([], [always_export_symbols], [0],
6430
    [Set to "yes" if exported symbols are required])
6431
_LT_TAGDECL([], [export_symbols_cmds], [2],
6432
    [The commands to list exported symbols])
6433
_LT_TAGDECL([], [exclude_expsyms], [1],
6434
    [Symbols that should not be listed in the preloaded symbols])
6435
_LT_TAGDECL([], [include_expsyms], [1],
6436
    [Symbols that must always be exported])
6437
_LT_TAGDECL([], [prelink_cmds], [2],
6438
    [Commands necessary for linking programs (against libraries) with templates])
6439
_LT_TAGDECL([], [postlink_cmds], [2],
6440
    [Commands necessary for finishing linking programs])
6441
_LT_TAGDECL([], [file_list_spec], [1],
6442
    [Specify filename containing input files])
6443
dnl FIXME: Not yet implemented
6444
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6445
dnl    [Compiler flag to generate thread safe objects])
6446
])# _LT_LINKER_SHLIBS
6447
6448
6449
# _LT_LANG_C_CONFIG([TAG])
6450
# ------------------------
6451
# Ensure that the configuration variables for a C compiler are suitably
6452
# defined.  These variables are subsequently used by _LT_CONFIG to write
6453
# the compiler configuration to `libtool'.
6454
m4_defun([_LT_LANG_C_CONFIG],
6455
[m4_require([_LT_DECL_EGREP])dnl
6456
lt_save_CC="$CC"
6457
AC_LANG_PUSH(C)
6458
6459
# Source file extension for C test sources.
6460
ac_ext=c
6461
6462
# Object file extension for compiled C test sources.
6463
objext=o
6464
_LT_TAGVAR(objext, $1)=$objext
6465
6466
# Code to be used in simple compile tests
6467
lt_simple_compile_test_code="int some_variable = 0;"
6468
6469
# Code to be used in simple link tests
6470
lt_simple_link_test_code='int main(){return(0);}'
6471
6472
_LT_TAG_COMPILER
6473
# Save the default compiler, since it gets overwritten when the other
6474
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6475
compiler_DEFAULT=$CC
6476
6477
# save warnings/boilerplate of simple test code
6478
_LT_COMPILER_BOILERPLATE
6479
_LT_LINKER_BOILERPLATE
6480
6481
if test -n "$compiler"; then
6482
  _LT_COMPILER_NO_RTTI($1)
6483
  _LT_COMPILER_PIC($1)
6484
  _LT_COMPILER_C_O($1)
6485
  _LT_COMPILER_FILE_LOCKS($1)
6486
  _LT_LINKER_SHLIBS($1)
6487
  _LT_SYS_DYNAMIC_LINKER($1)
6488
  _LT_LINKER_HARDCODE_LIBPATH($1)
6489
  LT_SYS_DLOPEN_SELF
6490
  _LT_CMD_STRIPLIB
6491
6492
  # Report which library types will actually be built
6493
  AC_MSG_CHECKING([if libtool supports shared libraries])
6494
  AC_MSG_RESULT([$can_build_shared])
6495
6496
  AC_MSG_CHECKING([whether to build shared libraries])
6497
  test "$can_build_shared" = "no" && enable_shared=no
6498
6499
  # On AIX, shared libraries and static libraries use the same namespace, and
6500
  # are all built from PIC.
6501
  case $host_os in
6502
  aix3*)
6503
    test "$enable_shared" = yes && enable_static=no
6504
    if test -n "$RANLIB"; then
6505
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6506
      postinstall_cmds='$RANLIB $lib'
6507
    fi
6508
    ;;
6509
6510
  aix[[4-9]]*)
6511
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6512
      test "$enable_shared" = yes && enable_static=no
6513
    fi
6514
    ;;
6515
  esac
6516
  AC_MSG_RESULT([$enable_shared])
6517
6518
  AC_MSG_CHECKING([whether to build static libraries])
6519
  # Make sure either enable_shared or enable_static is yes.
6520
  test "$enable_shared" = yes || enable_static=yes
6521
  AC_MSG_RESULT([$enable_static])
6522
6523
  _LT_CONFIG($1)
6524
fi
6525
AC_LANG_POP
6526
CC="$lt_save_CC"
6527
])# _LT_LANG_C_CONFIG
6528
6529
6530
# _LT_LANG_CXX_CONFIG([TAG])
6531
# --------------------------
6532
# Ensure that the configuration variables for a C++ compiler are suitably
6533
# defined.  These variables are subsequently used by _LT_CONFIG to write
6534
# the compiler configuration to `libtool'.
6535
m4_defun([_LT_LANG_CXX_CONFIG],
6536
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6537
m4_require([_LT_DECL_EGREP])dnl
6538
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6539
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6540
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6541
    (test "X$CXX" != "Xg++"))) ; then
6542
  AC_PROG_CXXCPP
6543
else
6544
  _lt_caught_CXX_error=yes
6545
fi
6546
6547
AC_LANG_PUSH(C++)
6548
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6549
_LT_TAGVAR(allow_undefined_flag, $1)=
6550
_LT_TAGVAR(always_export_symbols, $1)=no
6551
_LT_TAGVAR(archive_expsym_cmds, $1)=
6552
_LT_TAGVAR(compiler_needs_object, $1)=no
6553
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6554
_LT_TAGVAR(hardcode_direct, $1)=no
6555
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6556
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6557
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6558
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6559
_LT_TAGVAR(hardcode_minus_L, $1)=no
6560
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6561
_LT_TAGVAR(hardcode_automatic, $1)=no
6562
_LT_TAGVAR(inherit_rpath, $1)=no
6563
_LT_TAGVAR(module_cmds, $1)=
6564
_LT_TAGVAR(module_expsym_cmds, $1)=
6565
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6566
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6567
_LT_TAGVAR(reload_flag, $1)=$reload_flag
6568
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6569
_LT_TAGVAR(no_undefined_flag, $1)=
6570
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6571
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6572
6573
# Source file extension for C++ test sources.
6574
ac_ext=cpp
6575
6576
# Object file extension for compiled C++ test sources.
6577
objext=o
6578
_LT_TAGVAR(objext, $1)=$objext
6579
6580
# No sense in running all these tests if we already determined that
6581
# the CXX compiler isn't working.  Some variables (like enable_shared)
6582
# are currently assumed to apply to all compilers on this platform,
6583
# and will be corrupted by setting them based on a non-working compiler.
6584
if test "$_lt_caught_CXX_error" != yes; then
6585
  # Code to be used in simple compile tests
6586
  lt_simple_compile_test_code="int some_variable = 0;"
6587
6588
  # Code to be used in simple link tests
6589
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6590
6591
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6592
  _LT_TAG_COMPILER
6593
6594
  # save warnings/boilerplate of simple test code
6595
  _LT_COMPILER_BOILERPLATE
6596
  _LT_LINKER_BOILERPLATE
6597
6598
  # Allow CC to be a program name with arguments.
6599
  lt_save_CC=$CC
6600
  lt_save_CFLAGS=$CFLAGS
6601
  lt_save_LD=$LD
6602
  lt_save_GCC=$GCC
6603
  GCC=$GXX
6604
  lt_save_with_gnu_ld=$with_gnu_ld
6605
  lt_save_path_LD=$lt_cv_path_LD
6606
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6607
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6608
  else
6609
    $as_unset lt_cv_prog_gnu_ld
6610
  fi
6611
  if test -n "${lt_cv_path_LDCXX+set}"; then
6612
    lt_cv_path_LD=$lt_cv_path_LDCXX
6613
  else
6614
    $as_unset lt_cv_path_LD
6615
  fi
6616
  test -z "${LDCXX+set}" || LD=$LDCXX
6617
  CC=${CXX-"c++"}
6618
  CFLAGS=$CXXFLAGS
6619
  compiler=$CC
6620
  _LT_TAGVAR(compiler, $1)=$CC
6621
  _LT_CC_BASENAME([$compiler])
6622
6623
  if test -n "$compiler"; then
6624
    # We don't want -fno-exception when compiling C++ code, so set the
6625
    # no_builtin_flag separately
6626
    if test "$GXX" = yes; then
6627
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6628
    else
6629
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6630
    fi
6631
6632
    if test "$GXX" = yes; then
6633
      # Set up default GNU C++ configuration
6634
6635
      LT_PATH_LD
6636
6637
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6638
      # archiving commands below assume that GNU ld is being used.
6639
      if test "$with_gnu_ld" = yes; then
6640
        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6641
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6642
6643
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6644
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6645
6646
        # If archive_cmds runs LD, not CC, wlarc should be empty
6647
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6648
        #     investigate it a little bit more. (MM)
6649
        wlarc='${wl}'
6650
6651
        # ancient GNU ld didn't support --whole-archive et. al.
6652
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6653
	  $GREP 'no-whole-archive' > /dev/null; then
6654
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6655
        else
6656
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6657
        fi
6658
      else
6659
        with_gnu_ld=no
6660
        wlarc=
6661
6662
        # A generic and very simple default shared library creation
6663
        # command for GNU C++ for the case where it uses the native
6664
        # linker, instead of GNU ld.  If possible, this setting should
6665
        # overridden to take advantage of the native linker features on
6666
        # the platform it is being used on.
6667
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6668
      fi
6669
6670
      # Commands to make compiler produce verbose output that lists
6671
      # what "hidden" libraries, object files and flags are used when
6672
      # linking a shared library.
6673
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6674
6675
    else
6676
      GXX=no
6677
      with_gnu_ld=no
6678
      wlarc=
6679
    fi
6680
6681
    # PORTME: fill in a description of your system's C++ link characteristics
6682
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6683
    _LT_TAGVAR(ld_shlibs, $1)=yes
6684
    case $host_os in
6685
      aix3*)
6686
        # FIXME: insert proper C++ library support
6687
        _LT_TAGVAR(ld_shlibs, $1)=no
6688
        ;;
6689
      aix[[4-9]]*)
6690
        if test "$host_cpu" = ia64; then
6691
          # On IA64, the linker does run time linking by default, so we don't
6692
          # have to do anything special.
6693
          aix_use_runtimelinking=no
6694
          exp_sym_flag='-Bexport'
6695
          no_entry_flag=""
6696
        else
6697
          aix_use_runtimelinking=no
6698
6699
          # Test if we are trying to use run time linking or normal
6700
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6701
          # need to do runtime linking.
6702
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6703
	    for ld_flag in $LDFLAGS; do
6704
	      case $ld_flag in
6705
	      *-brtl*)
6706
	        aix_use_runtimelinking=yes
6707
	        break
6708
	        ;;
6709
	      esac
6710
	    done
6711
	    ;;
6712
          esac
6713
6714
          exp_sym_flag='-bexport'
6715
          no_entry_flag='-bnoentry'
6716
        fi
6717
6718
        # When large executables or shared objects are built, AIX ld can
6719
        # have problems creating the table of contents.  If linking a library
6720
        # or program results in "error TOC overflow" add -mminimal-toc to
6721
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6722
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6723
6724
        _LT_TAGVAR(archive_cmds, $1)=''
6725
        _LT_TAGVAR(hardcode_direct, $1)=yes
6726
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6727
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6728
        _LT_TAGVAR(link_all_deplibs, $1)=yes
6729
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6730
6731
        if test "$GXX" = yes; then
6732
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6733
          # We only want to do this on AIX 4.2 and lower, the check
6734
          # below for broken collect2 doesn't work under 4.3+
6735
	  collect2name=`${CC} -print-prog-name=collect2`
6736
	  if test -f "$collect2name" &&
6737
	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6738
	  then
6739
	    # We have reworked collect2
6740
	    :
6741
	  else
6742
	    # We have old collect2
6743
	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6744
	    # It fails to find uninstalled libraries when the uninstalled
6745
	    # path is not listed in the libpath.  Setting hardcode_minus_L
6746
	    # to unsupported forces relinking
6747
	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6748
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6749
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6750
	  fi
6751
          esac
6752
          shared_flag='-shared'
6753
	  if test "$aix_use_runtimelinking" = yes; then
6754
	    shared_flag="$shared_flag "'${wl}-G'
6755
	  fi
6756
        else
6757
          # not using gcc
6758
          if test "$host_cpu" = ia64; then
6759
	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6760
	  # chokes on -Wl,-G. The following line is correct:
6761
	  shared_flag='-G'
6762
          else
6763
	    if test "$aix_use_runtimelinking" = yes; then
6764
	      shared_flag='${wl}-G'
6765
	    else
6766
	      shared_flag='${wl}-bM:SRE'
6767
	    fi
6768
          fi
6769
        fi
6770
6771
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6772
        # It seems that -bexpall does not export symbols beginning with
6773
        # underscore (_), so it is better to generate a list of symbols to
6774
	# export.
6775
        _LT_TAGVAR(always_export_symbols, $1)=yes
6776
        if test "$aix_use_runtimelinking" = yes; then
6777
          # Warning - without using the other runtime loading flags (-brtl),
6778
          # -berok will link without error, but may produce a broken library.
6779
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6780
          # Determine the default libpath from the value encoded in an empty
6781
          # executable.
6782
          _LT_SYS_MODULE_PATH_AIX([$1])
6783
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6784
6785
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6786
        else
6787
          if test "$host_cpu" = ia64; then
6788
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6789
	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6790
	    _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"
6791
          else
6792
	    # Determine the default libpath from the value encoded in an
6793
	    # empty executable.
6794
	    _LT_SYS_MODULE_PATH_AIX([$1])
6795
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6796
	    # Warning - without using the other run time loading flags,
6797
	    # -berok will link without error, but may produce a broken library.
6798
	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6799
	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6800
	    if test "$with_gnu_ld" = yes; then
6801
	      # We only use this code for GNU lds that support --whole-archive.
6802
	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6803
	    else
6804
	      # Exported symbols can be pulled into shared objects from archives
6805
	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6806
	    fi
6807
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6808
	    # This is similar to how AIX traditionally builds its shared
6809
	    # libraries.
6810
	    _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'
6811
          fi
6812
        fi
6813
        ;;
6814
6815
      beos*)
6816
	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6817
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6818
	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6819
	  # support --undefined.  This deserves some investigation.  FIXME
6820
	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6821
	else
6822
	  _LT_TAGVAR(ld_shlibs, $1)=no
6823
	fi
6824
	;;
6825
6826
      chorus*)
6827
        case $cc_basename in
6828
          *)
6829
	  # FIXME: insert proper C++ library support
6830
	  _LT_TAGVAR(ld_shlibs, $1)=no
6831
	  ;;
6832
        esac
6833
        ;;
6834
6835
      cygwin* | mingw* | pw32* | cegcc*)
6836
	case $GXX,$cc_basename in
6837
	,cl* | no,cl*)
6838
	  # Native MSVC
6839
	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6840
	  # no search path for DLLs.
6841
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6842
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6843
	  _LT_TAGVAR(always_export_symbols, $1)=yes
6844
	  _LT_TAGVAR(file_list_spec, $1)='@'
6845
	  # Tell ltmain to make .lib files, not .a files.
6846
	  libext=lib
6847
	  # Tell ltmain to make .dll files, not .so files.
6848
	  shrext_cmds=".dll"
6849
	  # FIXME: Setting linknames here is a bad hack.
6850
	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6851
	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6852
	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6853
	    else
6854
	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6855
	    fi~
6856
	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6857
	    linknames='
6858
	  # The linker will not automatically build a static lib if we build a DLL.
6859
	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6860
	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6861
	  # Don't use ranlib
6862
	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6863
	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6864
	    lt_tool_outputfile="@TOOL_OUTPUT@"~
6865
	    case $lt_outputfile in
6866
	      *.exe|*.EXE) ;;
6867
	      *)
6868
		lt_outputfile="$lt_outputfile.exe"
6869
		lt_tool_outputfile="$lt_tool_outputfile.exe"
6870
		;;
6871
	    esac~
6872
	    func_to_tool_file "$lt_outputfile"~
6873
	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6874
	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6875
	      $RM "$lt_outputfile.manifest";
6876
	    fi'
6877
	  ;;
6878
	*)
6879
	  # g++
6880
	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6881
	  # as there is no search path for DLLs.
6882
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6883
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6884
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6885
	  _LT_TAGVAR(always_export_symbols, $1)=no
6886
	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6887
6888
	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6889
	    _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'
6890
	    # If the export-symbols file already is a .def file (1st line
6891
	    # is EXPORTS), use it as is; otherwise, prepend...
6892
	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6893
	      cp $export_symbols $output_objdir/$soname.def;
6894
	    else
6895
	      echo EXPORTS > $output_objdir/$soname.def;
6896
	      cat $export_symbols >> $output_objdir/$soname.def;
6897
	    fi~
6898
	    $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'
6899
	  else
6900
	    _LT_TAGVAR(ld_shlibs, $1)=no
6901
	  fi
6902
	  ;;
6903
	esac
6904
	;;
6905
      darwin* | rhapsody*)
6906
        _LT_DARWIN_LINKER_FEATURES($1)
6907
	;;
6908
6909
      dgux*)
6910
        case $cc_basename in
6911
          ec++*)
6912
	    # FIXME: insert proper C++ library support
6913
	    _LT_TAGVAR(ld_shlibs, $1)=no
6914
	    ;;
6915
          ghcx*)
6916
	    # Green Hills C++ Compiler
6917
	    # FIXME: insert proper C++ library support
6918
	    _LT_TAGVAR(ld_shlibs, $1)=no
6919
	    ;;
6920
          *)
6921
	    # FIXME: insert proper C++ library support
6922
	    _LT_TAGVAR(ld_shlibs, $1)=no
6923
	    ;;
6924
        esac
6925
        ;;
6926
6927
      freebsd[[12]]*)
6928
        # C++ shared libraries reported to be fairly broken before
6929
	# switch to ELF
6930
        _LT_TAGVAR(ld_shlibs, $1)=no
6931
        ;;
6932
6933
      freebsd-elf*)
6934
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6935
        ;;
6936
6937
      freebsd* | dragonfly*)
6938
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6939
        # conventions
6940
        _LT_TAGVAR(ld_shlibs, $1)=yes
6941
        ;;
6942
6943
      gnu*)
6944
        ;;
6945
6946
      haiku*)
6947
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6948
        _LT_TAGVAR(link_all_deplibs, $1)=yes
6949
        ;;
6950
6951
      hpux9*)
6952
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6953
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6954
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6955
        _LT_TAGVAR(hardcode_direct, $1)=yes
6956
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6957
				             # but as the default
6958
				             # location of the library.
6959
6960
        case $cc_basename in
6961
          CC*)
6962
            # FIXME: insert proper C++ library support
6963
            _LT_TAGVAR(ld_shlibs, $1)=no
6964
            ;;
6965
          aCC*)
6966
            _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'
6967
            # Commands to make compiler produce verbose output that lists
6968
            # what "hidden" libraries, object files and flags are used when
6969
            # linking a shared library.
6970
            #
6971
            # There doesn't appear to be a way to prevent this compiler from
6972
            # explicitly linking system object files so we need to strip them
6973
            # from the output so that they don't get included in the library
6974
            # dependencies.
6975
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6976
            ;;
6977
          *)
6978
            if test "$GXX" = yes; then
6979
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
6980
            else
6981
              # FIXME: insert proper C++ library support
6982
              _LT_TAGVAR(ld_shlibs, $1)=no
6983
            fi
6984
            ;;
6985
        esac
6986
        ;;
6987
6988
      hpux10*|hpux11*)
6989
        if test $with_gnu_ld = no; then
6990
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6991
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6992
6993
          case $host_cpu in
6994
            hppa*64*|ia64*)
6995
              ;;
6996
            *)
6997
	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6998
              ;;
6999
          esac
7000
        fi
7001
        case $host_cpu in
7002
          hppa*64*|ia64*)
7003
            _LT_TAGVAR(hardcode_direct, $1)=no
7004
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7005
            ;;
7006
          *)
7007
            _LT_TAGVAR(hardcode_direct, $1)=yes
7008
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7009
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7010
					         # but as the default
7011
					         # location of the library.
7012
            ;;
7013
        esac
7014
7015
        case $cc_basename in
7016
          CC*)
7017
	    # FIXME: insert proper C++ library support
7018
	    _LT_TAGVAR(ld_shlibs, $1)=no
7019
	    ;;
7020
          aCC*)
7021
	    case $host_cpu in
7022
	      hppa*64*)
7023
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7024
	        ;;
7025
	      ia64*)
7026
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7027
	        ;;
7028
	      *)
7029
	        _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'
7030
	        ;;
7031
	    esac
7032
	    # Commands to make compiler produce verbose output that lists
7033
	    # what "hidden" libraries, object files and flags are used when
7034
	    # linking a shared library.
7035
	    #
7036
	    # There doesn't appear to be a way to prevent this compiler from
7037
	    # explicitly linking system object files so we need to strip them
7038
	    # from the output so that they don't get included in the library
7039
	    # dependencies.
7040
	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7041
	    ;;
7042
          *)
7043
	    if test "$GXX" = yes; then
7044
	      if test $with_gnu_ld = no; then
7045
	        case $host_cpu in
7046
	          hppa*64*)
7047
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7048
	            ;;
7049
	          ia64*)
7050
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7051
	            ;;
7052
	          *)
7053
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7054
	            ;;
7055
	        esac
7056
	      fi
7057
	    else
7058
	      # FIXME: insert proper C++ library support
7059
	      _LT_TAGVAR(ld_shlibs, $1)=no
7060
	    fi
7061
	    ;;
7062
        esac
7063
        ;;
7064
7065
      interix[[3-9]]*)
7066
	_LT_TAGVAR(hardcode_direct, $1)=no
7067
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7068
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7069
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7070
	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7071
	# Instead, shared libraries are loaded at an image base (0x10000000 by
7072
	# default) and relocated if they conflict, which is a slow very memory
7073
	# consuming and fragmenting process.  To avoid this, we pick a random,
7074
	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7075
	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7076
	_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'
7077
	_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'
7078
	;;
7079
      irix5* | irix6*)
7080
        case $cc_basename in
7081
          CC*)
7082
	    # SGI C++
7083
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7084
7085
	    # Archives containing C++ object files must be created using
7086
	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7087
	    # necessary to make sure instantiated templates are included
7088
	    # in the archive.
7089
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7090
	    ;;
7091
          *)
7092
	    if test "$GXX" = yes; then
7093
	      if test "$with_gnu_ld" = no; then
7094
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7095
	      else
7096
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7097
	      fi
7098
	    fi
7099
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7100
	    ;;
7101
        esac
7102
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7103
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7104
        _LT_TAGVAR(inherit_rpath, $1)=yes
7105
        ;;
7106
7107
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
7108
        case $cc_basename in
7109
          KCC*)
7110
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7111
7112
	    # KCC will only create a shared library if the output file
7113
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7114
	    # to its proper name (with version) after linking.
7115
	    _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'
7116
	    _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'
7117
	    # Commands to make compiler produce verbose output that lists
7118
	    # what "hidden" libraries, object files and flags are used when
7119
	    # linking a shared library.
7120
	    #
7121
	    # There doesn't appear to be a way to prevent this compiler from
7122
	    # explicitly linking system object files so we need to strip them
7123
	    # from the output so that they don't get included in the library
7124
	    # dependencies.
7125
	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7126
7127
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7128
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7129
7130
	    # Archives containing C++ object files must be created using
7131
	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7132
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7133
	    ;;
7134
	  icpc* | ecpc* )
7135
	    # Intel C++
7136
	    with_gnu_ld=yes
7137
	    # version 8.0 and above of icpc choke on multiply defined symbols
7138
	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7139
	    # earlier do not add the objects themselves.
7140
	    case `$CC -V 2>&1` in
7141
	      *"Version 7."*)
7142
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7143
		_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'
7144
		;;
7145
	      *)  # Version 8.0 or newer
7146
	        tmp_idyn=
7147
	        case $host_cpu in
7148
		  ia64*) tmp_idyn=' -i_dynamic';;
7149
		esac
7150
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7151
		_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'
7152
		;;
7153
	    esac
7154
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7155
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7156
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7157
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7158
	    ;;
7159
          pgCC* | pgcpp*)
7160
            # Portland Group C++ compiler
7161
	    case `$CC -V` in
7162
	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7163
	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7164
		rm -rf $tpldir~
7165
		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7166
		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7167
	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7168
		rm -rf $tpldir~
7169
		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7170
		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7171
		$RANLIB $oldlib'
7172
	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7173
		rm -rf $tpldir~
7174
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7175
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7176
	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7177
		rm -rf $tpldir~
7178
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7179
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7180
	      ;;
7181
	    *) # Version 6 and above use weak symbols
7182
	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7183
	      _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'
7184
	      ;;
7185
	    esac
7186
7187
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7188
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7189
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7190
            ;;
7191
	  cxx*)
7192
	    # Compaq C++
7193
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7194
	    _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'
7195
7196
	    runpath_var=LD_RUN_PATH
7197
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7198
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7199
7200
	    # Commands to make compiler produce verbose output that lists
7201
	    # what "hidden" libraries, object files and flags are used when
7202
	    # linking a shared library.
7203
	    #
7204
	    # There doesn't appear to be a way to prevent this compiler from
7205
	    # explicitly linking system object files so we need to strip them
7206
	    # from the output so that they don't get included in the library
7207
	    # dependencies.
7208
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7209
	    ;;
7210
	  xl* | mpixl* | bgxl*)
7211
	    # IBM XL 8.0 on PPC, with GNU ld
7212
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7213
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7214
	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7215
	    if test "x$supports_anon_versioning" = xyes; then
7216
	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7217
		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7218
		echo "local: *; };" >> $output_objdir/$libname.ver~
7219
		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7220
	    fi
7221
	    ;;
7222
	  *)
7223
	    case `$CC -V 2>&1 | sed 5q` in
7224
	    *Sun\ C*)
7225
	      # Sun C++ 5.9
7226
	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7227
	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7228
	      _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'
7229
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7230
	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7231
	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7232
7233
	      # Not sure whether something based on
7234
	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7235
	      # would be better.
7236
	      output_verbose_link_cmd='func_echo_all'
7237
7238
	      # Archives containing C++ object files must be created using
7239
	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7240
	      # necessary to make sure instantiated templates are included
7241
	      # in the archive.
7242
	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7243
	      ;;
7244
	    esac
7245
	    ;;
7246
	esac
7247
	;;
7248
7249
      lynxos*)
7250
        # FIXME: insert proper C++ library support
7251
	_LT_TAGVAR(ld_shlibs, $1)=no
7252
	;;
7253
7254
      m88k*)
7255
        # FIXME: insert proper C++ library support
7256
        _LT_TAGVAR(ld_shlibs, $1)=no
7257
	;;
7258
7259
      mvs*)
7260
        case $cc_basename in
7261
          cxx*)
7262
	    # FIXME: insert proper C++ library support
7263
	    _LT_TAGVAR(ld_shlibs, $1)=no
7264
	    ;;
7265
	  *)
7266
	    # FIXME: insert proper C++ library support
7267
	    _LT_TAGVAR(ld_shlibs, $1)=no
7268
	    ;;
7269
	esac
7270
	;;
7271
7272
      netbsd*)
7273
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7274
	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7275
	  wlarc=
7276
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7277
	  _LT_TAGVAR(hardcode_direct, $1)=yes
7278
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7279
	fi
7280
	# Workaround some broken pre-1.5 toolchains
7281
	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7282
	;;
7283
7284
      *nto* | *qnx*)
7285
        _LT_TAGVAR(ld_shlibs, $1)=yes
7286
	;;
7287
7288
      openbsd2*)
7289
        # C++ shared libraries are fairly broken
7290
	_LT_TAGVAR(ld_shlibs, $1)=no
7291
	;;
7292
7293
      openbsd*)
7294
	if test -f /usr/libexec/ld.so; then
7295
	  _LT_TAGVAR(hardcode_direct, $1)=yes
7296
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7297
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7298
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7299
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7300
	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7301
	    _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'
7302
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7303
	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7304
	  fi
7305
	  output_verbose_link_cmd=func_echo_all
7306
	else
7307
	  _LT_TAGVAR(ld_shlibs, $1)=no
7308
	fi
7309
	;;
7310
7311
      osf3* | osf4* | osf5*)
7312
        case $cc_basename in
7313
          KCC*)
7314
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7315
7316
	    # KCC will only create a shared library if the output file
7317
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7318
	    # to its proper name (with version) after linking.
7319
	    _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'
7320
7321
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7322
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7323
7324
	    # Archives containing C++ object files must be created using
7325
	    # the KAI C++ compiler.
7326
	    case $host in
7327
	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7328
	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7329
	    esac
7330
	    ;;
7331
          RCC*)
7332
	    # Rational C++ 2.4.1
7333
	    # FIXME: insert proper C++ library support
7334
	    _LT_TAGVAR(ld_shlibs, $1)=no
7335
	    ;;
7336
          cxx*)
7337
	    case $host in
7338
	      osf3*)
7339
	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7340
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7341
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7342
		;;
7343
	      *)
7344
	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7345
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7346
	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7347
	          echo "-hidden">> $lib.exp~
7348
	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
7349
	          $RM $lib.exp'
7350
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7351
		;;
7352
	    esac
7353
7354
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7355
7356
	    # Commands to make compiler produce verbose output that lists
7357
	    # what "hidden" libraries, object files and flags are used when
7358
	    # linking a shared library.
7359
	    #
7360
	    # There doesn't appear to be a way to prevent this compiler from
7361
	    # explicitly linking system object files so we need to strip them
7362
	    # from the output so that they don't get included in the library
7363
	    # dependencies.
7364
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7365
	    ;;
7366
	  *)
7367
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7368
	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7369
	      case $host in
7370
	        osf3*)
7371
	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7372
		  ;;
7373
	        *)
7374
	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7375
		  ;;
7376
	      esac
7377
7378
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7379
	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7380
7381
	      # Commands to make compiler produce verbose output that lists
7382
	      # what "hidden" libraries, object files and flags are used when
7383
	      # linking a shared library.
7384
	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7385
7386
	    else
7387
	      # FIXME: insert proper C++ library support
7388
	      _LT_TAGVAR(ld_shlibs, $1)=no
7389
	    fi
7390
	    ;;
7391
        esac
7392
        ;;
7393
7394
      psos*)
7395
        # FIXME: insert proper C++ library support
7396
        _LT_TAGVAR(ld_shlibs, $1)=no
7397
        ;;
7398
7399
      sunos4*)
7400
        case $cc_basename in
7401
          CC*)
7402
	    # Sun C++ 4.x
7403
	    # FIXME: insert proper C++ library support
7404
	    _LT_TAGVAR(ld_shlibs, $1)=no
7405
	    ;;
7406
          lcc*)
7407
	    # Lucid
7408
	    # FIXME: insert proper C++ library support
7409
	    _LT_TAGVAR(ld_shlibs, $1)=no
7410
	    ;;
7411
          *)
7412
	    # FIXME: insert proper C++ library support
7413
	    _LT_TAGVAR(ld_shlibs, $1)=no
7414
	    ;;
7415
        esac
7416
        ;;
7417
7418
      solaris*)
7419
        case $cc_basename in
7420
          CC* | sunCC*)
7421
	    # Sun C++ 4.2, 5.x and Centerline C++
7422
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7423
	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7424
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7425
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7426
	      $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'
7427
7428
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7429
	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7430
	    case $host_os in
7431
	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7432
	      *)
7433
		# The compiler driver will combine and reorder linker options,
7434
		# but understands `-z linker_flag'.
7435
	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7436
		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7437
	        ;;
7438
	    esac
7439
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7440
7441
	    output_verbose_link_cmd='func_echo_all'
7442
7443
	    # Archives containing C++ object files must be created using
7444
	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7445
	    # necessary to make sure instantiated templates are included
7446
	    # in the archive.
7447
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7448
	    ;;
7449
          gcx*)
7450
	    # Green Hills C++ Compiler
7451
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7452
7453
	    # The C++ compiler must be used to create the archive.
7454
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7455
	    ;;
7456
          *)
7457
	    # GNU C++ compiler with Solaris linker
7458
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7459
	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7460
	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7461
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7462
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7463
		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7464
7465
	        # Commands to make compiler produce verbose output that lists
7466
	        # what "hidden" libraries, object files and flags are used when
7467
	        # linking a shared library.
7468
	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7469
	      else
7470
	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7471
	        # platform.
7472
	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7473
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7474
		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7475
7476
	        # Commands to make compiler produce verbose output that lists
7477
	        # what "hidden" libraries, object files and flags are used when
7478
	        # linking a shared library.
7479
	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7480
	      fi
7481
7482
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7483
	      case $host_os in
7484
		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7485
		*)
7486
		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7487
		  ;;
7488
	      esac
7489
	    fi
7490
	    ;;
7491
        esac
7492
        ;;
7493
7494
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7495
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7496
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7497
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7498
      runpath_var='LD_RUN_PATH'
7499
7500
      case $cc_basename in
7501
        CC*)
7502
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7503
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7504
	  ;;
7505
	*)
7506
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7507
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7508
	  ;;
7509
      esac
7510
      ;;
7511
7512
      sysv5* | sco3.2v5* | sco5v6*)
7513
	# Note: We can NOT use -z defs as we might desire, because we do not
7514
	# link with -lc, and that would cause any symbols used from libc to
7515
	# always be unresolved, which means just about no library would
7516
	# ever link correctly.  If we're not using GNU ld we use -z text
7517
	# though, which does catch some bad symbols but isn't as heavy-handed
7518
	# as -z defs.
7519
	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7520
	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7521
	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7522
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7523
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7524
	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7525
	_LT_TAGVAR(link_all_deplibs, $1)=yes
7526
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7527
	runpath_var='LD_RUN_PATH'
7528
7529
	case $cc_basename in
7530
          CC*)
7531
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7532
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7533
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7534
	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
7535
	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7536
	      '"$_LT_TAGVAR(reload_cmds, $1)"
7537
	    ;;
7538
	  *)
7539
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7540
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7541
	    ;;
7542
	esac
7543
      ;;
7544
7545
      tandem*)
7546
        case $cc_basename in
7547
          NCC*)
7548
	    # NonStop-UX NCC 3.20
7549
	    # FIXME: insert proper C++ library support
7550
	    _LT_TAGVAR(ld_shlibs, $1)=no
7551
	    ;;
7552
          *)
7553
	    # FIXME: insert proper C++ library support
7554
	    _LT_TAGVAR(ld_shlibs, $1)=no
7555
	    ;;
7556
        esac
7557
        ;;
7558
7559
      vxworks*)
7560
        # FIXME: insert proper C++ library support
7561
        _LT_TAGVAR(ld_shlibs, $1)=no
7562
        ;;
7563
7564
      *)
7565
        # FIXME: insert proper C++ library support
7566
        _LT_TAGVAR(ld_shlibs, $1)=no
7567
        ;;
7568
    esac
7569
7570
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7571
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7572
7573
    _LT_TAGVAR(GCC, $1)="$GXX"
7574
    _LT_TAGVAR(LD, $1)="$LD"
7575
7576
    ## CAVEAT EMPTOR:
7577
    ## There is no encapsulation within the following macros, do not change
7578
    ## the running order or otherwise move them around unless you know exactly
7579
    ## what you are doing...
7580
    _LT_SYS_HIDDEN_LIBDEPS($1)
7581
    _LT_COMPILER_PIC($1)
7582
    _LT_COMPILER_C_O($1)
7583
    _LT_COMPILER_FILE_LOCKS($1)
7584
    _LT_LINKER_SHLIBS($1)
7585
    _LT_SYS_DYNAMIC_LINKER($1)
7586
    _LT_LINKER_HARDCODE_LIBPATH($1)
7587
7588
    _LT_CONFIG($1)
7589
  fi # test -n "$compiler"
7590
7591
  CC=$lt_save_CC
7592
  CFLAGS=$lt_save_CFLAGS
7593
  LDCXX=$LD
7594
  LD=$lt_save_LD
7595
  GCC=$lt_save_GCC
7596
  with_gnu_ld=$lt_save_with_gnu_ld
7597
  lt_cv_path_LDCXX=$lt_cv_path_LD
7598
  lt_cv_path_LD=$lt_save_path_LD
7599
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7600
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7601
fi # test "$_lt_caught_CXX_error" != yes
7602
7603
AC_LANG_POP
7604
])# _LT_LANG_CXX_CONFIG
7605
7606
7607
# _LT_FUNC_STRIPNAME_CNF
7608
# ----------------------
7609
# func_stripname_cnf prefix suffix name
7610
# strip PREFIX and SUFFIX off of NAME.
7611
# PREFIX and SUFFIX must not contain globbing or regex special
7612
# characters, hashes, percent signs, but SUFFIX may contain a leading
7613
# dot (in which case that matches only a dot).
7614
#
7615
# This function is identical to the (non-XSI) version of func_stripname,
7616
# except this one can be used by m4 code that may be executed by configure,
7617
# rather than the libtool script.
7618
m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7619
AC_REQUIRE([_LT_DECL_SED])
7620
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7621
func_stripname_cnf ()
7622
{
7623
  case ${2} in
7624
  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7625
  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7626
  esac
7627
} # func_stripname_cnf
7628
])# _LT_FUNC_STRIPNAME_CNF
7629
7630
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7631
# ---------------------------------
7632
# Figure out "hidden" library dependencies from verbose
7633
# compiler output when linking a shared library.
7634
# Parse the compiler output and extract the necessary
7635
# objects, libraries and library flags.
7636
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7637
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7638
AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7639
# Dependencies to place before and after the object being linked:
7640
_LT_TAGVAR(predep_objects, $1)=
7641
_LT_TAGVAR(postdep_objects, $1)=
7642
_LT_TAGVAR(predeps, $1)=
7643
_LT_TAGVAR(postdeps, $1)=
7644
_LT_TAGVAR(compiler_lib_search_path, $1)=
7645
7646
dnl we can't use the lt_simple_compile_test_code here,
7647
dnl because it contains code intended for an executable,
7648
dnl not a library.  It's possible we should let each
7649
dnl tag define a new lt_????_link_test_code variable,
7650
dnl but it's only used here...
7651
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7652
int a;
7653
void foo (void) { a = 0; }
7654
_LT_EOF
7655
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7656
class Foo
7657
{
7658
public:
7659
  Foo (void) { a = 0; }
7660
private:
7661
  int a;
7662
};
7663
_LT_EOF
7664
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7665
      subroutine foo
7666
      implicit none
7667
      integer*4 a
7668
      a=0
7669
      return
7670
      end
7671
_LT_EOF
7672
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7673
      subroutine foo
7674
      implicit none
7675
      integer a
7676
      a=0
7677
      return
7678
      end
7679
_LT_EOF
7680
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7681
public class foo {
7682
  private int a;
7683
  public void bar (void) {
7684
    a = 0;
7685
  }
7686
};
7687
_LT_EOF
7688
])
7689
7690
_lt_libdeps_save_CFLAGS=$CFLAGS
7691
case "$CC $CFLAGS " in #(
7692
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7693
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7694
esac
7695
7696
dnl Parse the compiler output and extract the necessary
7697
dnl objects, libraries and library flags.
7698
if AC_TRY_EVAL(ac_compile); then
7699
  # Parse the compiler output and extract the necessary
7700
  # objects, libraries and library flags.
7701
7702
  # Sentinel used to keep track of whether or not we are before
7703
  # the conftest object file.
7704
  pre_test_object_deps_done=no
7705
7706
  for p in `eval "$output_verbose_link_cmd"`; do
7707
    case ${prev}${p} in
7708
7709
    -L* | -R* | -l*)
7710
       # Some compilers place space between "-{L,R}" and the path.
7711
       # Remove the space.
7712
       if test $p = "-L" ||
7713
          test $p = "-R"; then
7714
	 prev=$p
7715
	 continue
7716
       fi
7717
7718
       # Expand the sysroot to ease extracting the directories later.
7719
       if test -z "$prev"; then
7720
         case $p in
7721
         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7722
         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7723
         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7724
         esac
7725
       fi
7726
       case $p in
7727
       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7728
       esac
7729
       if test "$pre_test_object_deps_done" = no; then
7730
	 case ${prev} in
7731
	 -L | -R)
7732
	   # Internal compiler library paths should come after those
7733
	   # provided the user.  The postdeps already come after the
7734
	   # user supplied libs so there is no need to process them.
7735
	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7736
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7737
	   else
7738
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7739
	   fi
7740
	   ;;
7741
	 # The "-l" case would never come before the object being
7742
	 # linked, so don't bother handling this case.
7743
	 esac
7744
       else
7745
	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7746
	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7747
	 else
7748
	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7749
	 fi
7750
       fi
7751
       prev=
7752
       ;;
7753
7754
    *.lto.$objext) ;; # Ignore GCC LTO objects
7755
    *.$objext)
7756
       # This assumes that the test object file only shows up
7757
       # once in the compiler output.
7758
       if test "$p" = "conftest.$objext"; then
7759
	 pre_test_object_deps_done=yes
7760
	 continue
7761
       fi
7762
7763
       if test "$pre_test_object_deps_done" = no; then
7764
	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7765
	   _LT_TAGVAR(predep_objects, $1)="$p"
7766
	 else
7767
	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7768
	 fi
7769
       else
7770
	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7771
	   _LT_TAGVAR(postdep_objects, $1)="$p"
7772
	 else
7773
	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7774
	 fi
7775
       fi
7776
       ;;
7777
7778
    *) ;; # Ignore the rest.
7779
7780
    esac
7781
  done
7782
7783
  # Clean up.
7784
  rm -f a.out a.exe
7785
else
7786
  echo "libtool.m4: error: problem compiling $1 test program"
7787
fi
7788
7789
$RM -f confest.$objext
7790
CFLAGS=$_lt_libdeps_save_CFLAGS
7791
7792
# PORTME: override above test on systems where it is broken
7793
m4_if([$1], [CXX],
7794
[case $host_os in
7795
interix[[3-9]]*)
7796
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7797
  # hack all around it, let's just trust "g++" to DTRT.
7798
  _LT_TAGVAR(predep_objects,$1)=
7799
  _LT_TAGVAR(postdep_objects,$1)=
7800
  _LT_TAGVAR(postdeps,$1)=
7801
  ;;
7802
7803
linux*)
7804
  case `$CC -V 2>&1 | sed 5q` in
7805
  *Sun\ C*)
7806
    # Sun C++ 5.9
7807
7808
    # The more standards-conforming stlport4 library is
7809
    # incompatible with the Cstd library. Avoid specifying
7810
    # it if it's in CXXFLAGS. Ignore libCrun as
7811
    # -library=stlport4 depends on it.
7812
    case " $CXX $CXXFLAGS " in
7813
    *" -library=stlport4 "*)
7814
      solaris_use_stlport4=yes
7815
      ;;
7816
    esac
7817
7818
    if test "$solaris_use_stlport4" != yes; then
7819
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7820
    fi
7821
    ;;
7822
  esac
7823
  ;;
7824
7825
solaris*)
7826
  case $cc_basename in
7827
  CC* | sunCC*)
7828
    # The more standards-conforming stlport4 library is
7829
    # incompatible with the Cstd library. Avoid specifying
7830
    # it if it's in CXXFLAGS. Ignore libCrun as
7831
    # -library=stlport4 depends on it.
7832
    case " $CXX $CXXFLAGS " in
7833
    *" -library=stlport4 "*)
7834
      solaris_use_stlport4=yes
7835
      ;;
7836
    esac
7837
7838
    # Adding this requires a known-good setup of shared libraries for
7839
    # Sun compiler versions before 5.6, else PIC objects from an old
7840
    # archive will be linked into the output, leading to subtle bugs.
7841
    if test "$solaris_use_stlport4" != yes; then
7842
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7843
    fi
7844
    ;;
7845
  esac
7846
  ;;
7847
esac
7848
])
7849
7850
case " $_LT_TAGVAR(postdeps, $1) " in
7851
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7852
esac
7853
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7854
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7855
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7856
fi
7857
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7858
    [The directories searched by this compiler when creating a shared library])
7859
_LT_TAGDECL([], [predep_objects], [1],
7860
    [Dependencies to place before and after the objects being linked to
7861
    create a shared library])
7862
_LT_TAGDECL([], [postdep_objects], [1])
7863
_LT_TAGDECL([], [predeps], [1])
7864
_LT_TAGDECL([], [postdeps], [1])
7865
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7866
    [The library search path used internally by the compiler when linking
7867
    a shared library])
7868
])# _LT_SYS_HIDDEN_LIBDEPS
7869
7870
7871
# _LT_LANG_F77_CONFIG([TAG])
7872
# --------------------------
7873
# Ensure that the configuration variables for a Fortran 77 compiler are
7874
# suitably defined.  These variables are subsequently used by _LT_CONFIG
7875
# to write the compiler configuration to `libtool'.
7876
m4_defun([_LT_LANG_F77_CONFIG],
7877
[AC_LANG_PUSH(Fortran 77)
7878
if test -z "$F77" || test "X$F77" = "Xno"; then
7879
  _lt_disable_F77=yes
7880
fi
7881
7882
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7883
_LT_TAGVAR(allow_undefined_flag, $1)=
7884
_LT_TAGVAR(always_export_symbols, $1)=no
7885
_LT_TAGVAR(archive_expsym_cmds, $1)=
7886
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7887
_LT_TAGVAR(hardcode_direct, $1)=no
7888
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7889
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7890
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7891
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7892
_LT_TAGVAR(hardcode_minus_L, $1)=no
7893
_LT_TAGVAR(hardcode_automatic, $1)=no
7894
_LT_TAGVAR(inherit_rpath, $1)=no
7895
_LT_TAGVAR(module_cmds, $1)=
7896
_LT_TAGVAR(module_expsym_cmds, $1)=
7897
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7898
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7899
_LT_TAGVAR(reload_flag, $1)=$reload_flag
7900
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7901
_LT_TAGVAR(no_undefined_flag, $1)=
7902
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7903
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7904
7905
# Source file extension for f77 test sources.
7906
ac_ext=f
7907
7908
# Object file extension for compiled f77 test sources.
7909
objext=o
7910
_LT_TAGVAR(objext, $1)=$objext
7911
7912
# No sense in running all these tests if we already determined that
7913
# the F77 compiler isn't working.  Some variables (like enable_shared)
7914
# are currently assumed to apply to all compilers on this platform,
7915
# and will be corrupted by setting them based on a non-working compiler.
7916
if test "$_lt_disable_F77" != yes; then
7917
  # Code to be used in simple compile tests
7918
  lt_simple_compile_test_code="\
7919
      subroutine t
7920
      return
7921
      end
7922
"
7923
7924
  # Code to be used in simple link tests
7925
  lt_simple_link_test_code="\
7926
      program t
7927
      end
7928
"
7929
7930
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7931
  _LT_TAG_COMPILER
7932
7933
  # save warnings/boilerplate of simple test code
7934
  _LT_COMPILER_BOILERPLATE
7935
  _LT_LINKER_BOILERPLATE
7936
7937
  # Allow CC to be a program name with arguments.
7938
  lt_save_CC="$CC"
7939
  lt_save_GCC=$GCC
7940
  lt_save_CFLAGS=$CFLAGS
7941
  CC=${F77-"f77"}
7942
  CFLAGS=$FFLAGS
7943
  compiler=$CC
7944
  _LT_TAGVAR(compiler, $1)=$CC
7945
  _LT_CC_BASENAME([$compiler])
7946
  GCC=$G77
7947
  if test -n "$compiler"; then
7948
    AC_MSG_CHECKING([if libtool supports shared libraries])
7949
    AC_MSG_RESULT([$can_build_shared])
7950
7951
    AC_MSG_CHECKING([whether to build shared libraries])
7952
    test "$can_build_shared" = "no" && enable_shared=no
7953
7954
    # On AIX, shared libraries and static libraries use the same namespace, and
7955
    # are all built from PIC.
7956
    case $host_os in
7957
      aix3*)
7958
        test "$enable_shared" = yes && enable_static=no
7959
        if test -n "$RANLIB"; then
7960
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7961
          postinstall_cmds='$RANLIB $lib'
7962
        fi
7963
        ;;
7964
      aix[[4-9]]*)
7965
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7966
	  test "$enable_shared" = yes && enable_static=no
7967
	fi
7968
        ;;
7969
    esac
7970
    AC_MSG_RESULT([$enable_shared])
7971
7972
    AC_MSG_CHECKING([whether to build static libraries])
7973
    # Make sure either enable_shared or enable_static is yes.
7974
    test "$enable_shared" = yes || enable_static=yes
7975
    AC_MSG_RESULT([$enable_static])
7976
7977
    _LT_TAGVAR(GCC, $1)="$G77"
7978
    _LT_TAGVAR(LD, $1)="$LD"
7979
7980
    ## CAVEAT EMPTOR:
7981
    ## There is no encapsulation within the following macros, do not change
7982
    ## the running order or otherwise move them around unless you know exactly
7983
    ## what you are doing...
7984
    _LT_COMPILER_PIC($1)
7985
    _LT_COMPILER_C_O($1)
7986
    _LT_COMPILER_FILE_LOCKS($1)
7987
    _LT_LINKER_SHLIBS($1)
7988
    _LT_SYS_DYNAMIC_LINKER($1)
7989
    _LT_LINKER_HARDCODE_LIBPATH($1)
7990
7991
    _LT_CONFIG($1)
7992
  fi # test -n "$compiler"
7993
7994
  GCC=$lt_save_GCC
7995
  CC="$lt_save_CC"
7996
  CFLAGS="$lt_save_CFLAGS"
7997
fi # test "$_lt_disable_F77" != yes
7998
7999
AC_LANG_POP
8000
])# _LT_LANG_F77_CONFIG
8001
8002
8003
# _LT_LANG_FC_CONFIG([TAG])
8004
# -------------------------
8005
# Ensure that the configuration variables for a Fortran compiler are
8006
# suitably defined.  These variables are subsequently used by _LT_CONFIG
8007
# to write the compiler configuration to `libtool'.
8008
m4_defun([_LT_LANG_FC_CONFIG],
8009
[AC_LANG_PUSH(Fortran)
8010
8011
if test -z "$FC" || test "X$FC" = "Xno"; then
8012
  _lt_disable_FC=yes
8013
fi
8014
8015
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8016
_LT_TAGVAR(allow_undefined_flag, $1)=
8017
_LT_TAGVAR(always_export_symbols, $1)=no
8018
_LT_TAGVAR(archive_expsym_cmds, $1)=
8019
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8020
_LT_TAGVAR(hardcode_direct, $1)=no
8021
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8022
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8023
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8024
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8025
_LT_TAGVAR(hardcode_minus_L, $1)=no
8026
_LT_TAGVAR(hardcode_automatic, $1)=no
8027
_LT_TAGVAR(inherit_rpath, $1)=no
8028
_LT_TAGVAR(module_cmds, $1)=
8029
_LT_TAGVAR(module_expsym_cmds, $1)=
8030
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8031
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8032
_LT_TAGVAR(reload_flag, $1)=$reload_flag
8033
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8034
_LT_TAGVAR(no_undefined_flag, $1)=
8035
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8036
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8037
8038
# Source file extension for fc test sources.
8039
ac_ext=${ac_fc_srcext-f}
8040
8041
# Object file extension for compiled fc test sources.
8042
objext=o
8043
_LT_TAGVAR(objext, $1)=$objext
8044
8045
# No sense in running all these tests if we already determined that
8046
# the FC compiler isn't working.  Some variables (like enable_shared)
8047
# are currently assumed to apply to all compilers on this platform,
8048
# and will be corrupted by setting them based on a non-working compiler.
8049
if test "$_lt_disable_FC" != yes; then
8050
  # Code to be used in simple compile tests
8051
  lt_simple_compile_test_code="\
8052
      subroutine t
8053
      return
8054
      end
8055
"
8056
8057
  # Code to be used in simple link tests
8058
  lt_simple_link_test_code="\
8059
      program t
8060
      end
8061
"
8062
8063
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8064
  _LT_TAG_COMPILER
8065
8066
  # save warnings/boilerplate of simple test code
8067
  _LT_COMPILER_BOILERPLATE
8068
  _LT_LINKER_BOILERPLATE
8069
8070
  # Allow CC to be a program name with arguments.
8071
  lt_save_CC="$CC"
8072
  lt_save_GCC=$GCC
8073
  lt_save_CFLAGS=$CFLAGS
8074
  CC=${FC-"f95"}
8075
  CFLAGS=$FCFLAGS
8076
  compiler=$CC
8077
  GCC=$ac_cv_fc_compiler_gnu
8078
8079
  _LT_TAGVAR(compiler, $1)=$CC
8080
  _LT_CC_BASENAME([$compiler])
8081
8082
  if test -n "$compiler"; then
8083
    AC_MSG_CHECKING([if libtool supports shared libraries])
8084
    AC_MSG_RESULT([$can_build_shared])
8085
8086
    AC_MSG_CHECKING([whether to build shared libraries])
8087
    test "$can_build_shared" = "no" && enable_shared=no
8088
8089
    # On AIX, shared libraries and static libraries use the same namespace, and
8090
    # are all built from PIC.
8091
    case $host_os in
8092
      aix3*)
8093
        test "$enable_shared" = yes && enable_static=no
8094
        if test -n "$RANLIB"; then
8095
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8096
          postinstall_cmds='$RANLIB $lib'
8097
        fi
8098
        ;;
8099
      aix[[4-9]]*)
8100
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8101
	  test "$enable_shared" = yes && enable_static=no
8102
	fi
8103
        ;;
8104
    esac
8105
    AC_MSG_RESULT([$enable_shared])
8106
8107
    AC_MSG_CHECKING([whether to build static libraries])
8108
    # Make sure either enable_shared or enable_static is yes.
8109
    test "$enable_shared" = yes || enable_static=yes
8110
    AC_MSG_RESULT([$enable_static])
8111
8112
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8113
    _LT_TAGVAR(LD, $1)="$LD"
8114
8115
    ## CAVEAT EMPTOR:
8116
    ## There is no encapsulation within the following macros, do not change
8117
    ## the running order or otherwise move them around unless you know exactly
8118
    ## what you are doing...
8119
    _LT_SYS_HIDDEN_LIBDEPS($1)
8120
    _LT_COMPILER_PIC($1)
8121
    _LT_COMPILER_C_O($1)
8122
    _LT_COMPILER_FILE_LOCKS($1)
8123
    _LT_LINKER_SHLIBS($1)
8124
    _LT_SYS_DYNAMIC_LINKER($1)
8125
    _LT_LINKER_HARDCODE_LIBPATH($1)
8126
8127
    _LT_CONFIG($1)
8128
  fi # test -n "$compiler"
8129
8130
  GCC=$lt_save_GCC
8131
  CC=$lt_save_CC
8132
  CFLAGS=$lt_save_CFLAGS
8133
fi # test "$_lt_disable_FC" != yes
8134
8135
AC_LANG_POP
8136
])# _LT_LANG_FC_CONFIG
8137
8138
8139
# _LT_LANG_GCJ_CONFIG([TAG])
8140
# --------------------------
8141
# Ensure that the configuration variables for the GNU Java Compiler compiler
8142
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8143
# to write the compiler configuration to `libtool'.
8144
m4_defun([_LT_LANG_GCJ_CONFIG],
8145
[AC_REQUIRE([LT_PROG_GCJ])dnl
8146
AC_LANG_SAVE
8147
8148
# Source file extension for Java test sources.
8149
ac_ext=java
8150
8151
# Object file extension for compiled Java test sources.
8152
objext=o
8153
_LT_TAGVAR(objext, $1)=$objext
8154
8155
# Code to be used in simple compile tests
8156
lt_simple_compile_test_code="class foo {}"
8157
8158
# Code to be used in simple link tests
8159
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8160
8161
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8162
_LT_TAG_COMPILER
8163
8164
# save warnings/boilerplate of simple test code
8165
_LT_COMPILER_BOILERPLATE
8166
_LT_LINKER_BOILERPLATE
8167
8168
# Allow CC to be a program name with arguments.
8169
lt_save_CC=$CC
8170
lt_save_CFLAGS=$CFLAGS
8171
lt_save_GCC=$GCC
8172
GCC=yes
8173
CC=${GCJ-"gcj"}
8174
CFLAGS=$GCJFLAGS
8175
compiler=$CC
8176
_LT_TAGVAR(compiler, $1)=$CC
8177
_LT_TAGVAR(LD, $1)="$LD"
8178
_LT_CC_BASENAME([$compiler])
8179
8180
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8181
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8182
8183
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8184
_LT_TAGVAR(reload_flag, $1)=$reload_flag
8185
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8186
8187
if test -n "$compiler"; then
8188
  _LT_COMPILER_NO_RTTI($1)
8189
  _LT_COMPILER_PIC($1)
8190
  _LT_COMPILER_C_O($1)
8191
  _LT_COMPILER_FILE_LOCKS($1)
8192
  _LT_LINKER_SHLIBS($1)
8193
  _LT_LINKER_HARDCODE_LIBPATH($1)
8194
8195
  _LT_CONFIG($1)
8196
fi
8197
8198
AC_LANG_RESTORE
8199
8200
GCC=$lt_save_GCC
8201
CC=$lt_save_CC
8202
CFLAGS=$lt_save_CFLAGS
8203
])# _LT_LANG_GCJ_CONFIG
8204
8205
8206
# _LT_LANG_RC_CONFIG([TAG])
8207
# -------------------------
8208
# Ensure that the configuration variables for the Windows resource compiler
8209
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8210
# to write the compiler configuration to `libtool'.
8211
m4_defun([_LT_LANG_RC_CONFIG],
8212
[AC_REQUIRE([LT_PROG_RC])dnl
8213
AC_LANG_SAVE
8214
8215
# Source file extension for RC test sources.
8216
ac_ext=rc
8217
8218
# Object file extension for compiled RC test sources.
8219
objext=o
8220
_LT_TAGVAR(objext, $1)=$objext
8221
8222
# Code to be used in simple compile tests
8223
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8224
8225
# Code to be used in simple link tests
8226
lt_simple_link_test_code="$lt_simple_compile_test_code"
8227
8228
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8229
_LT_TAG_COMPILER
8230
8231
# save warnings/boilerplate of simple test code
8232
_LT_COMPILER_BOILERPLATE
8233
_LT_LINKER_BOILERPLATE
8234
8235
# Allow CC to be a program name with arguments.
8236
lt_save_CC="$CC"
8237
lt_save_CFLAGS=$CFLAGS
8238
lt_save_GCC=$GCC
8239
GCC=
8240
CC=${RC-"windres"}
8241
CFLAGS=
8242
compiler=$CC
8243
_LT_TAGVAR(compiler, $1)=$CC
8244
_LT_CC_BASENAME([$compiler])
8245
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8246
8247
if test -n "$compiler"; then
8248
  :
8249
  _LT_CONFIG($1)
8250
fi
8251
8252
GCC=$lt_save_GCC
8253
AC_LANG_RESTORE
8254
CC=$lt_save_CC
8255
CFLAGS=$lt_save_CFLAGS
8256
])# _LT_LANG_RC_CONFIG
8257
8258
8259
# LT_PROG_GCJ
8260
# -----------
8261
AC_DEFUN([LT_PROG_GCJ],
8262
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8263
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8264
    [AC_CHECK_TOOL(GCJ, gcj,)
8265
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8266
      AC_SUBST(GCJFLAGS)])])[]dnl
8267
])
8268
8269
# Old name:
8270
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8271
dnl aclocal-1.4 backwards compatibility:
8272
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8273
8274
8275
# LT_PROG_RC
8276
# ----------
8277
AC_DEFUN([LT_PROG_RC],
8278
[AC_CHECK_TOOL(RC, windres,)
8279
])
8280
8281
# Old name:
8282
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8283
dnl aclocal-1.4 backwards compatibility:
8284
dnl AC_DEFUN([LT_AC_PROG_RC], [])
8285
8286
8287
# _LT_DECL_EGREP
8288
# --------------
8289
# If we don't have a new enough Autoconf to choose the best grep
8290
# available, choose the one first in the user's PATH.
8291
m4_defun([_LT_DECL_EGREP],
8292
[AC_REQUIRE([AC_PROG_EGREP])dnl
8293
AC_REQUIRE([AC_PROG_FGREP])dnl
8294
test -z "$GREP" && GREP=grep
8295
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8296
_LT_DECL([], [EGREP], [1], [An ERE matcher])
8297
_LT_DECL([], [FGREP], [1], [A literal string matcher])
8298
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8299
AC_SUBST([GREP])
8300
])
8301
8302
8303
# _LT_DECL_OBJDUMP
8304
# --------------
8305
# If we don't have a new enough Autoconf to choose the best objdump
8306
# available, choose the one first in the user's PATH.
8307
m4_defun([_LT_DECL_OBJDUMP],
8308
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8309
test -z "$OBJDUMP" && OBJDUMP=objdump
8310
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8311
AC_SUBST([OBJDUMP])
8312
])
8313
8314
# _LT_DECL_DLLTOOL
8315
# ----------------
8316
# Ensure DLLTOOL variable is set.
8317
m4_defun([_LT_DECL_DLLTOOL],
8318
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8319
test -z "$DLLTOOL" && DLLTOOL=dlltool
8320
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8321
AC_SUBST([DLLTOOL])
8322
])
8323
8324
# _LT_DECL_SED
8325
# ------------
8326
# Check for a fully-functional sed program, that truncates
8327
# as few characters as possible.  Prefer GNU sed if found.
8328
m4_defun([_LT_DECL_SED],
8329
[AC_PROG_SED
8330
test -z "$SED" && SED=sed
8331
Xsed="$SED -e 1s/^X//"
8332
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8333
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8334
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8335
])# _LT_DECL_SED
8336
8337
m4_ifndef([AC_PROG_SED], [
8338
# NOTE: This macro has been submitted for inclusion into   #
8339
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8340
#  a released version of Autoconf we should remove this    #
8341
#  macro and use it instead.                               #
8342
8343
m4_defun([AC_PROG_SED],
8344
[AC_MSG_CHECKING([for a sed that does not truncate output])
8345
AC_CACHE_VAL(lt_cv_path_SED,
8346
[# Loop through the user's path and test for sed and gsed.
8347
# Then use that list of sed's as ones to test for truncation.
8348
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8349
for as_dir in $PATH
8350
do
8351
  IFS=$as_save_IFS
8352
  test -z "$as_dir" && as_dir=.
8353
  for lt_ac_prog in sed gsed; do
8354
    for ac_exec_ext in '' $ac_executable_extensions; do
8355
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8356
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8357
      fi
8358
    done
8359
  done
8360
done
8361
IFS=$as_save_IFS
8362
lt_ac_max=0
8363
lt_ac_count=0
8364
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8365
# along with /bin/sed that truncates output.
8366
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8367
  test ! -f $lt_ac_sed && continue
8368
  cat /dev/null > conftest.in
8369
  lt_ac_count=0
8370
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8371
  # Check for GNU sed and select it if it is found.
8372
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8373
    lt_cv_path_SED=$lt_ac_sed
8374
    break
8375
  fi
8376
  while true; do
8377
    cat conftest.in conftest.in >conftest.tmp
8378
    mv conftest.tmp conftest.in
8379
    cp conftest.in conftest.nl
8380
    echo >>conftest.nl
8381
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8382
    cmp -s conftest.out conftest.nl || break
8383
    # 10000 chars as input seems more than enough
8384
    test $lt_ac_count -gt 10 && break
8385
    lt_ac_count=`expr $lt_ac_count + 1`
8386
    if test $lt_ac_count -gt $lt_ac_max; then
8387
      lt_ac_max=$lt_ac_count
8388
      lt_cv_path_SED=$lt_ac_sed
8389
    fi
8390
  done
8391
done
8392
])
8393
SED=$lt_cv_path_SED
8394
AC_SUBST([SED])
8395
AC_MSG_RESULT([$SED])
8396
])#AC_PROG_SED
8397
])#m4_ifndef
8398
8399
# Old name:
8400
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8401
dnl aclocal-1.4 backwards compatibility:
8402
dnl AC_DEFUN([LT_AC_PROG_SED], [])
8403
8404
8405
# _LT_CHECK_SHELL_FEATURES
8406
# ------------------------
8407
# Find out whether the shell is Bourne or XSI compatible,
8408
# or has some other useful features.
8409
m4_defun([_LT_CHECK_SHELL_FEATURES],
8410
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8411
# Try some XSI features
8412
xsi_shell=no
8413
( _lt_dummy="a/b/c"
8414
  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8415
      = c,a/b,b/c, \
8416
    && eval 'test $(( 1 + 1 )) -eq 2 \
8417
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8418
  && xsi_shell=yes
8419
AC_MSG_RESULT([$xsi_shell])
8420
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8421
8422
AC_MSG_CHECKING([whether the shell understands "+="])
8423
lt_shell_append=no
8424
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8425
    >/dev/null 2>&1 \
8426
  && lt_shell_append=yes
8427
AC_MSG_RESULT([$lt_shell_append])
8428
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8429
8430
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8431
  lt_unset=unset
8432
else
8433
  lt_unset=false
8434
fi
8435
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8436
8437
# test EBCDIC or ASCII
8438
case `echo X|tr X '\101'` in
8439
 A) # ASCII based system
8440
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8441
  lt_SP2NL='tr \040 \012'
8442
  lt_NL2SP='tr \015\012 \040\040'
8443
  ;;
8444
 *) # EBCDIC based system
8445
  lt_SP2NL='tr \100 \n'
8446
  lt_NL2SP='tr \r\n \100\100'
8447
  ;;
8448
esac
8449
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8450
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8451
])# _LT_CHECK_SHELL_FEATURES
8452
8453
8454
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8455
# ------------------------------------------------------
8456
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8457
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8458
m4_defun([_LT_PROG_FUNCTION_REPLACE],
8459
[dnl {
8460
sed -e '/^$1 ()$/,/^} # $1 /c\
8461
$1 ()\
8462
{\
8463
m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
8464
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8465
  && mv -f "$cfgfile.tmp" "$cfgfile" \
8466
    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8467
test 0 -eq $? || _lt_function_replace_fail=:
8468
])
8469
8470
8471
# _LT_PROG_REPLACE_SHELLFNS
8472
# -------------------------
8473
# Replace existing portable implementations of several shell functions with
8474
# equivalent extended shell implementations where those features are available..
8475
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8476
[if test x"$xsi_shell" = xyes; then
8477
  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8478
    case ${1} in
8479
      */*) func_dirname_result="${1%/*}${2}" ;;
8480
      *  ) func_dirname_result="${3}" ;;
8481
    esac])
8482
8483
  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8484
    func_basename_result="${1##*/}"])
8485
8486
  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8487
    case ${1} in
8488
      */*) func_dirname_result="${1%/*}${2}" ;;
8489
      *  ) func_dirname_result="${3}" ;;
8490
    esac
8491
    func_basename_result="${1##*/}"])
8492
8493
  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8494
    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8495
    # positional parameters, so assign one to ordinary parameter first.
8496
    func_stripname_result=${3}
8497
    func_stripname_result=${func_stripname_result#"${1}"}
8498
    func_stripname_result=${func_stripname_result%"${2}"}])
8499
8500
  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8501
    func_split_long_opt_name=${1%%=*}
8502
    func_split_long_opt_arg=${1#*=}])
8503
8504
  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8505
    func_split_short_opt_arg=${1#??}
8506
    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8507
8508
  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8509
    case ${1} in
8510
      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8511
      *)    func_lo2o_result=${1} ;;
8512
    esac])
8513
8514
  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8515
8516
  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8517
8518
  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8519
fi
8520
8521
if test x"$lt_shell_append" = xyes; then
8522
  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8523
8524
  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8525
    func_quote_for_eval "${2}"
8526
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8527
    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8528
8529
  # Save a `func_append' function call where possible by direct use of '+='
8530
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8531
    && mv -f "$cfgfile.tmp" "$cfgfile" \
8532
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8533
  test 0 -eq $? || _lt_function_replace_fail=:
8534
else
8535
  # Save a `func_append' function call even when '+=' is not available
8536
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8537
    && mv -f "$cfgfile.tmp" "$cfgfile" \
8538
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8539
  test 0 -eq $? || _lt_function_replace_fail=:
8540
fi
8541
8542
if test x"$_lt_function_replace_fail" = x":"; then
8543
  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8544
fi
8545
])
8546
8547
# _LT_PATH_CONVERSION_FUNCTIONS
8548
# -----------------------------
8549
# Determine which file name conversion functions should be used by
8550
# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8551
# for certain cross-compile configurations and native mingw.
8552
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8553
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8554
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8555
AC_MSG_CHECKING([how to convert $build file names to $host format])
8556
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8557
[case $host in
8558
  *-*-mingw* )
8559
    case $build in
8560
      *-*-mingw* ) # actually msys
8561
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8562
        ;;
8563
      *-*-cygwin* )
8564
        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8565
        ;;
8566
      * ) # otherwise, assume *nix
8567
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8568
        ;;
8569
    esac
8570
    ;;
8571
  *-*-cygwin* )
8572
    case $build in
8573
      *-*-mingw* ) # actually msys
8574
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8575
        ;;
8576
      *-*-cygwin* )
8577
        lt_cv_to_host_file_cmd=func_convert_file_noop
8578
        ;;
8579
      * ) # otherwise, assume *nix
8580
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8581
        ;;
8582
    esac
8583
    ;;
8584
  * ) # unhandled hosts (and "normal" native builds)
8585
    lt_cv_to_host_file_cmd=func_convert_file_noop
8586
    ;;
8587
esac
8588
])
8589
to_host_file_cmd=$lt_cv_to_host_file_cmd
8590
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8591
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8592
         [0], [convert $build file names to $host format])dnl
8593
8594
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8595
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8596
[#assume ordinary cross tools, or native build.
8597
lt_cv_to_tool_file_cmd=func_convert_file_noop
8598
case $host in
8599
  *-*-mingw* )
8600
    case $build in
8601
      *-*-mingw* ) # actually msys
8602
        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8603
        ;;
8604
    esac
8605
    ;;
8606
esac
8607
])
8608
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8609
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8610
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8611
         [0], [convert $build files to toolchain format])dnl
8612
])# _LT_PATH_CONVERSION_FUNCTIONS
8613
8614
# Helper functions for option handling.                    -*- Autoconf -*-
8615
#
8616
#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8617
#   Inc.
8618
#   Written by Gary V. Vaughan, 2004
8619
#
8620
# This file is free software; the Free Software Foundation gives
8621
# unlimited permission to copy and/or distribute it, with or without
8622
# modifications, as long as this notice is preserved.
8623
8624
# serial 7 ltoptions.m4
8625
8626
# This is to help aclocal find these macros, as it can't see m4_define.
8627
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8628
8629
8630
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8631
# ------------------------------------------
8632
m4_define([_LT_MANGLE_OPTION],
8633
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8634
8635
8636
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8637
# ---------------------------------------
8638
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8639
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8640
# saved as a flag.
8641
m4_define([_LT_SET_OPTION],
8642
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8643
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8644
        _LT_MANGLE_DEFUN([$1], [$2]),
8645
    [m4_warning([Unknown $1 option `$2'])])[]dnl
8646
])
8647
8648
8649
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8650
# ------------------------------------------------------------
8651
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8652
m4_define([_LT_IF_OPTION],
8653
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8654
8655
8656
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8657
# -------------------------------------------------------
8658
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8659
# are set.
8660
m4_define([_LT_UNLESS_OPTIONS],
8661
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8662
	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8663
		      [m4_define([$0_found])])])[]dnl
8664
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8665
])[]dnl
8666
])
8667
8668
8669
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8670
# ----------------------------------------
8671
# OPTION-LIST is a space-separated list of Libtool options associated
8672
# with MACRO-NAME.  If any OPTION has a matching handler declared with
8673
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8674
# the unknown option and exit.
8675
m4_defun([_LT_SET_OPTIONS],
8676
[# Set options
8677
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8678
    [_LT_SET_OPTION([$1], _LT_Option)])
8679
8680
m4_if([$1],[LT_INIT],[
8681
  dnl
8682
  dnl Simply set some default values (i.e off) if boolean options were not
8683
  dnl specified:
8684
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8685
  ])
8686
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8687
  ])
8688
  dnl
8689
  dnl If no reference was made to various pairs of opposing options, then
8690
  dnl we run the default mode handler for the pair.  For example, if neither
8691
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8692
  dnl archives by default:
8693
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8694
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8695
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8696
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8697
  		   [_LT_ENABLE_FAST_INSTALL])
8698
  ])
8699
])# _LT_SET_OPTIONS
8700
8701
8702
8703
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8704
# -----------------------------------------
8705
m4_define([_LT_MANGLE_DEFUN],
8706
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8707
8708
8709
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8710
# -----------------------------------------------
8711
m4_define([LT_OPTION_DEFINE],
8712
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8713
])# LT_OPTION_DEFINE
8714
8715
8716
# dlopen
8717
# ------
8718
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8719
])
8720
8721
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8722
[_LT_SET_OPTION([LT_INIT], [dlopen])
8723
AC_DIAGNOSE([obsolete],
8724
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8725
put the `dlopen' option into LT_INIT's first parameter.])
8726
])
8727
8728
dnl aclocal-1.4 backwards compatibility:
8729
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8730
8731
8732
# win32-dll
8733
# ---------
8734
# Declare package support for building win32 dll's.
8735
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8736
[enable_win32_dll=yes
8737
8738
case $host in
8739
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8740
  AC_CHECK_TOOL(AS, as, false)
8741
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8742
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8743
  ;;
8744
esac
8745
8746
test -z "$AS" && AS=as
8747
_LT_DECL([], [AS],      [1], [Assembler program])dnl
8748
8749
test -z "$DLLTOOL" && DLLTOOL=dlltool
8750
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8751
8752
test -z "$OBJDUMP" && OBJDUMP=objdump
8753
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8754
])# win32-dll
8755
8756
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8757
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8758
_LT_SET_OPTION([LT_INIT], [win32-dll])
8759
AC_DIAGNOSE([obsolete],
8760
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8761
put the `win32-dll' option into LT_INIT's first parameter.])
8762
])
8763
8764
dnl aclocal-1.4 backwards compatibility:
8765
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8766
8767
8768
# _LT_ENABLE_SHARED([DEFAULT])
8769
# ----------------------------
8770
# implement the --enable-shared flag, and supports the `shared' and
8771
# `disable-shared' LT_INIT options.
8772
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8773
m4_define([_LT_ENABLE_SHARED],
8774
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8775
AC_ARG_ENABLE([shared],
8776
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8777
	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8778
    [p=${PACKAGE-default}
8779
    case $enableval in
8780
    yes) enable_shared=yes ;;
8781
    no) enable_shared=no ;;
8782
    *)
8783
      enable_shared=no
8784
      # Look at the argument we got.  We use all the common list separators.
8785
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8786
      for pkg in $enableval; do
8787
	IFS="$lt_save_ifs"
8788
	if test "X$pkg" = "X$p"; then
8789
	  enable_shared=yes
8790
	fi
8791
      done
8792
      IFS="$lt_save_ifs"
8793
      ;;
8794
    esac],
8795
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8796
8797
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8798
	[Whether or not to build shared libraries])
8799
])# _LT_ENABLE_SHARED
8800
8801
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8802
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8803
8804
# Old names:
8805
AC_DEFUN([AC_ENABLE_SHARED],
8806
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8807
])
8808
8809
AC_DEFUN([AC_DISABLE_SHARED],
8810
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8811
])
8812
8813
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8814
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8815
8816
dnl aclocal-1.4 backwards compatibility:
8817
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8818
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8819
8820
8821
8822
# _LT_ENABLE_STATIC([DEFAULT])
8823
# ----------------------------
8824
# implement the --enable-static flag, and support the `static' and
8825
# `disable-static' LT_INIT options.
8826
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8827
m4_define([_LT_ENABLE_STATIC],
8828
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8829
AC_ARG_ENABLE([static],
8830
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8831
	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8832
    [p=${PACKAGE-default}
8833
    case $enableval in
8834
    yes) enable_static=yes ;;
8835
    no) enable_static=no ;;
8836
    *)
8837
     enable_static=no
8838
      # Look at the argument we got.  We use all the common list separators.
8839
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8840
      for pkg in $enableval; do
8841
	IFS="$lt_save_ifs"
8842
	if test "X$pkg" = "X$p"; then
8843
	  enable_static=yes
8844
	fi
8845
      done
8846
      IFS="$lt_save_ifs"
8847
      ;;
8848
    esac],
8849
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8850
8851
    _LT_DECL([build_old_libs], [enable_static], [0],
8852
	[Whether or not to build static libraries])
8853
])# _LT_ENABLE_STATIC
8854
8855
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8856
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8857
8858
# Old names:
8859
AC_DEFUN([AC_ENABLE_STATIC],
8860
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8861
])
8862
8863
AC_DEFUN([AC_DISABLE_STATIC],
8864
[_LT_SET_OPTION([LT_INIT], [disable-static])
8865
])
8866
8867
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8868
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8869
8870
dnl aclocal-1.4 backwards compatibility:
8871
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8872
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8873
8874
8875
8876
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8877
# ----------------------------------
8878
# implement the --enable-fast-install flag, and support the `fast-install'
8879
# and `disable-fast-install' LT_INIT options.
8880
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8881
m4_define([_LT_ENABLE_FAST_INSTALL],
8882
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8883
AC_ARG_ENABLE([fast-install],
8884
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8885
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8886
    [p=${PACKAGE-default}
8887
    case $enableval in
8888
    yes) enable_fast_install=yes ;;
8889
    no) enable_fast_install=no ;;
8890
    *)
8891
      enable_fast_install=no
8892
      # Look at the argument we got.  We use all the common list separators.
8893
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8894
      for pkg in $enableval; do
8895
	IFS="$lt_save_ifs"
8896
	if test "X$pkg" = "X$p"; then
8897
	  enable_fast_install=yes
8898
	fi
8899
      done
8900
      IFS="$lt_save_ifs"
8901
      ;;
8902
    esac],
8903
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8904
8905
_LT_DECL([fast_install], [enable_fast_install], [0],
8906
	 [Whether or not to optimize for fast installation])dnl
8907
])# _LT_ENABLE_FAST_INSTALL
8908
8909
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8910
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8911
8912
# Old names:
8913
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8914
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8915
AC_DIAGNOSE([obsolete],
8916
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8917
the `fast-install' option into LT_INIT's first parameter.])
8918
])
8919
8920
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8921
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8922
AC_DIAGNOSE([obsolete],
8923
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8924
the `disable-fast-install' option into LT_INIT's first parameter.])
8925
])
8926
8927
dnl aclocal-1.4 backwards compatibility:
8928
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8929
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8930
8931
8932
# _LT_WITH_PIC([MODE])
8933
# --------------------
8934
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8935
# LT_INIT options.
8936
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8937
m4_define([_LT_WITH_PIC],
8938
[AC_ARG_WITH([pic],
8939
    [AS_HELP_STRING([--with-pic],
8940
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8941
    [pic_mode="$withval"],
8942
    [pic_mode=default])
8943
8944
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8945
8946
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8947
])# _LT_WITH_PIC
8948
8949
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8950
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8951
8952
# Old name:
8953
AU_DEFUN([AC_LIBTOOL_PICMODE],
8954
[_LT_SET_OPTION([LT_INIT], [pic-only])
8955
AC_DIAGNOSE([obsolete],
8956
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8957
put the `pic-only' option into LT_INIT's first parameter.])
8958
])
8959
8960
dnl aclocal-1.4 backwards compatibility:
8961
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8962
8963
8964
m4_define([_LTDL_MODE], [])
8965
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8966
		 [m4_define([_LTDL_MODE], [nonrecursive])])
8967
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8968
		 [m4_define([_LTDL_MODE], [recursive])])
8969
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8970
		 [m4_define([_LTDL_MODE], [subproject])])
8971
8972
m4_define([_LTDL_TYPE], [])
8973
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8974
		 [m4_define([_LTDL_TYPE], [installable])])
8975
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8976
		 [m4_define([_LTDL_TYPE], [convenience])])
8977
8978
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8979
#
8980
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8981
# Written by Gary V. Vaughan, 2004
8982
#
8983
# This file is free software; the Free Software Foundation gives
8984
# unlimited permission to copy and/or distribute it, with or without
8985
# modifications, as long as this notice is preserved.
8986
8987
# serial 6 ltsugar.m4
8988
8989
# This is to help aclocal find these macros, as it can't see m4_define.
8990
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8991
8992
8993
# lt_join(SEP, ARG1, [ARG2...])
8994
# -----------------------------
8995
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8996
# associated separator.
8997
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8998
# versions in m4sugar had bugs.
8999
m4_define([lt_join],
9000
[m4_if([$#], [1], [],
9001
       [$#], [2], [[$2]],
9002
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9003
m4_define([_lt_join],
9004
[m4_if([$#$2], [2], [],
9005
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9006
9007
9008
# lt_car(LIST)
9009
# lt_cdr(LIST)
9010
# ------------
9011
# Manipulate m4 lists.
9012
# These macros are necessary as long as will still need to support
9013
# Autoconf-2.59 which quotes differently.
9014
m4_define([lt_car], [[$1]])
9015
m4_define([lt_cdr],
9016
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9017
       [$#], 1, [],
9018
       [m4_dquote(m4_shift($@))])])
9019
m4_define([lt_unquote], $1)
9020
9021
9022
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9023
# ------------------------------------------
9024
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9025
# Note that neither SEPARATOR nor STRING are expanded; they are appended
9026
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9027
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9028
# than defined and empty).
9029
#
9030
# This macro is needed until we can rely on Autoconf 2.62, since earlier
9031
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9032
m4_define([lt_append],
9033
[m4_define([$1],
9034
	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9035
9036
9037
9038
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9039
# ----------------------------------------------------------
9040
# Produce a SEP delimited list of all paired combinations of elements of
9041
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9042
# has the form PREFIXmINFIXSUFFIXn.
9043
# Needed until we can rely on m4_combine added in Autoconf 2.62.
9044
m4_define([lt_combine],
9045
[m4_if(m4_eval([$# > 3]), [1],
9046
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9047
[[m4_foreach([_Lt_prefix], [$2],
9048
	     [m4_foreach([_Lt_suffix],
9049
		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9050
	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9051
9052
9053
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9054
# -----------------------------------------------------------------------
9055
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9056
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9057
m4_define([lt_if_append_uniq],
9058
[m4_ifdef([$1],
9059
	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9060
		 [lt_append([$1], [$2], [$3])$4],
9061
		 [$5])],
9062
	  [lt_append([$1], [$2], [$3])$4])])
9063
9064
9065
# lt_dict_add(DICT, KEY, VALUE)
9066
# -----------------------------
9067
m4_define([lt_dict_add],
9068
[m4_define([$1($2)], [$3])])
9069
9070
9071
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9072
# --------------------------------------------
9073
m4_define([lt_dict_add_subkey],
9074
[m4_define([$1($2:$3)], [$4])])
9075
9076
9077
# lt_dict_fetch(DICT, KEY, [SUBKEY])
9078
# ----------------------------------
9079
m4_define([lt_dict_fetch],
9080
[m4_ifval([$3],
9081
	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9082
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9083
9084
9085
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9086
# -----------------------------------------------------------------
9087
m4_define([lt_if_dict_fetch],
9088
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9089
	[$5],
9090
    [$6])])
9091
9092
9093
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9094
# --------------------------------------------------------------
9095
m4_define([lt_dict_filter],
9096
[m4_if([$5], [], [],
9097
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9098
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9099
		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9100
])
9101
9102
# ltversion.m4 -- version numbers			-*- Autoconf -*-
9103
#
9104
#   Copyright (C) 2004 Free Software Foundation, Inc.
9105
#   Written by Scott James Remnant, 2004
9106
#
9107
# This file is free software; the Free Software Foundation gives
9108
# unlimited permission to copy and/or distribute it, with or without
9109
# modifications, as long as this notice is preserved.
9110
9111
# @configure_input@
9112
9113
# serial 3293 ltversion.m4
9114
# This file is part of GNU Libtool
9115
9116
m4_define([LT_PACKAGE_VERSION], [2.4])
9117
m4_define([LT_PACKAGE_REVISION], [1.3293])
9118
9119
AC_DEFUN([LTVERSION_VERSION],
9120
[macro_version='2.4'
9121
macro_revision='1.3293'
9122
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9123
_LT_DECL(, macro_revision, 0)
9124
])
9125
9126
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9127
#
9128
#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9129
#   Written by Scott James Remnant, 2004.
9130
#
9131
# This file is free software; the Free Software Foundation gives
9132
# unlimited permission to copy and/or distribute it, with or without
9133
# modifications, as long as this notice is preserved.
9134
9135
# serial 5 lt~obsolete.m4
9136
9137
# These exist entirely to fool aclocal when bootstrapping libtool.
9138
#
9139
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9140
# which have later been changed to m4_define as they aren't part of the
9141
# exported API, or moved to Autoconf or Automake where they belong.
9142
#
9143
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9144
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9145
# using a macro with the same name in our local m4/libtool.m4 it'll
9146
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9147
# and doesn't know about Autoconf macros at all.)
9148
#
9149
# So we provide this file, which has a silly filename so it's always
9150
# included after everything else.  This provides aclocal with the
9151
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9152
# because those macros already exist, or will be overwritten later.
9153
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9154
#
9155
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9156
# Yes, that means every name once taken will need to remain here until
9157
# we give up compatibility with versions before 1.7, at which point
9158
# we need to keep only those names which we still refer to.
9159
9160
# This is to help aclocal find these macros, as it can't see m4_define.
9161
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9162
9163
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9164
m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9165
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9166
m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9167
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9168
m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9169
m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9170
m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9171
m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9172
m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9173
m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9174
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9175
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9176
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9177
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9178
m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9179
m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9180
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9181
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9182
m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9183
m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9184
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9185
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9186
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9187
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9188
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9189
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9190
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9191
m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9192
m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9193
m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9194
m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9195
m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9196
m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9197
m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9198
m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9199
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9200
m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9201
m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9202
m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9203
m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9204
m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9205
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9206
m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9207
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9208
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9209
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9210
m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9211
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9212
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9213
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9214
m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9215
m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9216
m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9217
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9218
m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9219
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9220
m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9221
m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9222
m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9223
m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9224
28.9.16 by Sebastien Bacher
Import upstream version 0.4.0
9225
# nls.m4 serial 5 (gettext-0.18)
9226
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
9227
dnl Inc.
33 by Ken VanDine
merged upstream tarball
9228
dnl This file is free software; the Free Software Foundation
9229
dnl gives unlimited permission to copy and/or distribute it,
9230
dnl with or without modifications, as long as this notice is preserved.
9231
dnl
9232
dnl This file can can be used in projects which are not available under
9233
dnl the GNU General Public License or the GNU Library General Public
9234
dnl License but which still want to provide support for the GNU gettext
9235
dnl functionality.
9236
dnl Please note that the actual code of the GNU gettext library is covered
9237
dnl by the GNU Library General Public License, and the rest of the GNU
9238
dnl gettext package package is covered by the GNU General Public License.
9239
dnl They are *not* in the public domain.
9240
9241
dnl Authors:
9242
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9243
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9244
28.9.16 by Sebastien Bacher
Import upstream version 0.4.0
9245
AC_PREREQ([2.50])
33 by Ken VanDine
merged upstream tarball
9246
9247
AC_DEFUN([AM_NLS],
9248
[
9249
  AC_MSG_CHECKING([whether NLS is requested])
9250
  dnl Default is enabled NLS
28.9.16 by Sebastien Bacher
Import upstream version 0.4.0
9251
  AC_ARG_ENABLE([nls],
33 by Ken VanDine
merged upstream tarball
9252
    [  --disable-nls           do not use Native Language Support],
9253
    USE_NLS=$enableval, USE_NLS=yes)
28.9.16 by Sebastien Bacher
Import upstream version 0.4.0
9254
  AC_MSG_RESULT([$USE_NLS])
9255
  AC_SUBST([USE_NLS])
33 by Ken VanDine
merged upstream tarball
9256
])
9257
9258
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9259
# serial 1 (pkg-config-0.24)
33 by Ken VanDine
merged upstream tarball
9260
# 
9261
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9262
#
9263
# This program is free software; you can redistribute it and/or modify
9264
# it under the terms of the GNU General Public License as published by
9265
# the Free Software Foundation; either version 2 of the License, or
9266
# (at your option) any later version.
9267
#
9268
# This program is distributed in the hope that it will be useful, but
9269
# WITHOUT ANY WARRANTY; without even the implied warranty of
9270
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9271
# General Public License for more details.
9272
#
9273
# You should have received a copy of the GNU General Public License
9274
# along with this program; if not, write to the Free Software
9275
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9276
#
9277
# As a special exception to the GNU General Public License, if you
9278
# distribute this file as part of a program that contains a
9279
# configuration script generated by Autoconf, you may include it under
9280
# the same distribution terms that you use for the rest of that program.
9281
9282
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9283
# ----------------------------------
9284
AC_DEFUN([PKG_PROG_PKG_CONFIG],
9285
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
97 by Ken VanDine
Merged
9286
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9287
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9288
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9289
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9290
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9291
33 by Ken VanDine
merged upstream tarball
9292
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9293
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9294
fi
9295
if test -n "$PKG_CONFIG"; then
9296
	_pkg_min_version=m4_default([$1], [0.9.0])
9297
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9298
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9299
		AC_MSG_RESULT([yes])
9300
	else
9301
		AC_MSG_RESULT([no])
9302
		PKG_CONFIG=""
9303
	fi
9304
fi[]dnl
9305
])# PKG_PROG_PKG_CONFIG
9306
9307
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9308
#
9309
# Check to see whether a particular set of modules exists.  Similar
9310
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9311
#
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9312
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9313
# only at the first occurence in configure.ac, so if the first place
9314
# it's called might be skipped (such as if it is within an "if", you
9315
# have to call PKG_CHECK_EXISTS manually
33 by Ken VanDine
merged upstream tarball
9316
# --------------------------------------------------------------
9317
AC_DEFUN([PKG_CHECK_EXISTS],
9318
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9319
if test -n "$PKG_CONFIG" && \
9320
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9321
  m4_default([$2], [:])
33 by Ken VanDine
merged upstream tarball
9322
m4_ifvaln([$3], [else
9323
  $3])dnl
9324
fi])
9325
9326
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9327
# ---------------------------------------------
9328
m4_define([_PKG_CONFIG],
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9329
[if test -n "$$1"; then
9330
    pkg_cv_[]$1="$$1"
9331
 elif test -n "$PKG_CONFIG"; then
9332
    PKG_CHECK_EXISTS([$3],
97 by Ken VanDine
Merged
9333
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9334
		      test "x$?" != "x0" && pkg_failed=yes ],
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9335
		     [pkg_failed=yes])
9336
 else
9337
    pkg_failed=untried
33 by Ken VanDine
merged upstream tarball
9338
fi[]dnl
9339
])# _PKG_CONFIG
9340
9341
# _PKG_SHORT_ERRORS_SUPPORTED
9342
# -----------------------------
9343
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9344
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9345
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9346
        _pkg_short_errors_supported=yes
9347
else
9348
        _pkg_short_errors_supported=no
9349
fi[]dnl
9350
])# _PKG_SHORT_ERRORS_SUPPORTED
9351
9352
9353
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9354
# [ACTION-IF-NOT-FOUND])
9355
#
9356
#
9357
# Note that if there is a possibility the first call to
9358
# PKG_CHECK_MODULES might not happen, you should be sure to include an
9359
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9360
#
9361
#
9362
# --------------------------------------------------------------
9363
AC_DEFUN([PKG_CHECK_MODULES],
9364
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9365
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9366
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9367
9368
pkg_failed=no
9369
AC_MSG_CHECKING([for $1])
9370
9371
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9372
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9373
9374
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9375
and $1[]_LIBS to avoid the need to call pkg-config.
9376
See the pkg-config man page for more details.])
9377
9378
if test $pkg_failed = yes; then
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9379
   	AC_MSG_RESULT([no])
33 by Ken VanDine
merged upstream tarball
9380
        _PKG_SHORT_ERRORS_SUPPORTED
9381
        if test $_pkg_short_errors_supported = yes; then
97 by Ken VanDine
Merged
9382
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
33 by Ken VanDine
merged upstream tarball
9383
        else 
97 by Ken VanDine
Merged
9384
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
33 by Ken VanDine
merged upstream tarball
9385
        fi
9386
	# Put the nasty error message in config.log where it belongs
9387
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9388
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9389
	m4_default([$4], [AC_MSG_ERROR(
33 by Ken VanDine
merged upstream tarball
9390
[Package requirements ($2) were not met:
9391
9392
$$1_PKG_ERRORS
9393
9394
Consider adjusting the PKG_CONFIG_PATH environment variable if you
9395
installed software in a non-standard prefix.
9396
28.51.18 by Ken VanDine
Import upstream version 0.5.4
9397
_PKG_TEXT])[]dnl
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9398
        ])
33 by Ken VanDine
merged upstream tarball
9399
elif test $pkg_failed = untried; then
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9400
     	AC_MSG_RESULT([no])
9401
	m4_default([$4], [AC_MSG_FAILURE(
33 by Ken VanDine
merged upstream tarball
9402
[The pkg-config script could not be found or is too old.  Make sure it
9403
is in your PATH or set the PKG_CONFIG environment variable to the full
9404
path to pkg-config.
9405
9406
_PKG_TEXT
9407
28.51.18 by Ken VanDine
Import upstream version 0.5.4
9408
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9409
        ])
33 by Ken VanDine
merged upstream tarball
9410
else
9411
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9412
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9413
        AC_MSG_RESULT([yes])
28.51.2 by Ken VanDine
Import upstream version 0.3.9
9414
	$3
33 by Ken VanDine
merged upstream tarball
9415
fi[]dnl
9416
])# PKG_CHECK_MODULES
9417
9418
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
9419
#
9420
# This file is free software; the Free Software Foundation
9421
# gives unlimited permission to copy and/or distribute it,
9422
# with or without modifications, as long as this notice is preserved.
9423
9424
# AM_AUTOMAKE_VERSION(VERSION)
9425
# ----------------------------
9426
# Automake X.Y traces this macro to ensure aclocal.m4 has been
9427
# generated from the m4 files accompanying Automake X.Y.
9428
# (This private macro should not be called outside this file.)
9429
AC_DEFUN([AM_AUTOMAKE_VERSION],
9430
[am__api_version='1.11'
9431
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9432
dnl require some minimum version.  Point them to the right macro.
9433
m4_if([$1], [1.11.1], [],
9434
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9435
])
9436
9437
# _AM_AUTOCONF_VERSION(VERSION)
9438
# -----------------------------
9439
# aclocal traces this macro to find the Autoconf version.
9440
# This is a private macro too.  Using m4_define simplifies
9441
# the logic in aclocal, which can simply ignore this definition.
9442
m4_define([_AM_AUTOCONF_VERSION], [])
9443
9444
# AM_SET_CURRENT_AUTOMAKE_VERSION
9445
# -------------------------------
9446
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9447
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9448
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9449
[AM_AUTOMAKE_VERSION([1.11.1])dnl
9450
m4_ifndef([AC_AUTOCONF_VERSION],
9451
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9452
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9453
9454
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9455
9456
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9457
#
9458
# This file is free software; the Free Software Foundation
9459
# gives unlimited permission to copy and/or distribute it,
9460
# with or without modifications, as long as this notice is preserved.
9461
9462
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9463
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
9464
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9465
#
9466
# Of course, Automake must honor this variable whenever it calls a
9467
# tool from the auxiliary directory.  The problem is that $srcdir (and
9468
# therefore $ac_aux_dir as well) can be either absolute or relative,
9469
# depending on how configure is run.  This is pretty annoying, since
9470
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9471
# source directory, any form will work fine, but in subdirectories a
9472
# relative path needs to be adjusted first.
9473
#
9474
# $ac_aux_dir/missing
9475
#    fails when called from a subdirectory if $ac_aux_dir is relative
9476
# $top_srcdir/$ac_aux_dir/missing
9477
#    fails if $ac_aux_dir is absolute,
9478
#    fails when called from a subdirectory in a VPATH build with
9479
#          a relative $ac_aux_dir
9480
#
9481
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9482
# are both prefixed by $srcdir.  In an in-source build this is usually
9483
# harmless because $srcdir is `.', but things will broke when you
9484
# start a VPATH build or use an absolute $srcdir.
9485
#
9486
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9487
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9488
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9489
# and then we would define $MISSING as
9490
#   MISSING="\${SHELL} $am_aux_dir/missing"
9491
# This will work as long as MISSING is not called from configure, because
9492
# unfortunately $(top_srcdir) has no meaning in configure.
9493
# However there are other variables, like CC, which are often used in
9494
# configure, and could therefore not use this "fixed" $ac_aux_dir.
9495
#
9496
# Another solution, used here, is to always expand $ac_aux_dir to an
9497
# absolute PATH.  The drawback is that using absolute paths prevent a
9498
# configured tree to be moved without reconfiguration.
9499
9500
AC_DEFUN([AM_AUX_DIR_EXPAND],
9501
[dnl Rely on autoconf to set up CDPATH properly.
9502
AC_PREREQ([2.50])dnl
9503
# expand $ac_aux_dir to an absolute path
9504
am_aux_dir=`cd $ac_aux_dir && pwd`
9505
])
9506
9507
# AM_CONDITIONAL                                            -*- Autoconf -*-
9508
9509
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9510
# Free Software Foundation, Inc.
9511
#
9512
# This file is free software; the Free Software Foundation
9513
# gives unlimited permission to copy and/or distribute it,
9514
# with or without modifications, as long as this notice is preserved.
9515
9516
# serial 9
9517
9518
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9519
# -------------------------------------
9520
# Define a conditional.
9521
AC_DEFUN([AM_CONDITIONAL],
9522
[AC_PREREQ(2.52)dnl
9523
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9524
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9525
AC_SUBST([$1_TRUE])dnl
9526
AC_SUBST([$1_FALSE])dnl
9527
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9528
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9529
m4_define([_AM_COND_VALUE_$1], [$2])dnl
9530
if $2; then
9531
  $1_TRUE=
9532
  $1_FALSE='#'
9533
else
9534
  $1_TRUE='#'
9535
  $1_FALSE=
9536
fi
9537
AC_CONFIG_COMMANDS_PRE(
9538
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9539
  AC_MSG_ERROR([[conditional "$1" was never defined.
9540
Usually this means the macro was only invoked conditionally.]])
9541
fi])])
9542
9543
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9544
# Free Software Foundation, Inc.
9545
#
9546
# This file is free software; the Free Software Foundation
9547
# gives unlimited permission to copy and/or distribute it,
9548
# with or without modifications, as long as this notice is preserved.
9549
9550
# serial 10
9551
9552
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9553
# written in clear, in which case automake, when reading aclocal.m4,
9554
# will think it sees a *use*, and therefore will trigger all it's
9555
# C support machinery.  Also note that it means that autoscan, seeing
9556
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9557
9558
9559
# _AM_DEPENDENCIES(NAME)
9560
# ----------------------
9561
# See how the compiler implements dependency checking.
9562
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9563
# We try a few techniques and use that to set a single cache variable.
9564
#
9565
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9566
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9567
# dependency, and given that the user is not expected to run this macro,
9568
# just rely on AC_PROG_CC.
9569
AC_DEFUN([_AM_DEPENDENCIES],
9570
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9571
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9572
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9573
AC_REQUIRE([AM_DEP_TRACK])dnl
9574
9575
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9576
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9577
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9578
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9579
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9580
                   [depcc="$$1"   am_compiler_list=])
9581
9582
AC_CACHE_CHECK([dependency style of $depcc],
9583
               [am_cv_$1_dependencies_compiler_type],
9584
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9585
  # We make a subdir and do the tests there.  Otherwise we can end up
9586
  # making bogus files that we don't know about and never remove.  For
9587
  # instance it was reported that on HP-UX the gcc test will end up
9588
  # making a dummy file named `D' -- because `-MD' means `put the output
9589
  # in D'.
9590
  mkdir conftest.dir
9591
  # Copy depcomp to subdir because otherwise we won't find it if we're
9592
  # using a relative directory.
9593
  cp "$am_depcomp" conftest.dir
9594
  cd conftest.dir
9595
  # We will build objects and dependencies in a subdirectory because
9596
  # it helps to detect inapplicable dependency modes.  For instance
9597
  # both Tru64's cc and ICC support -MD to output dependencies as a
9598
  # side effect of compilation, but ICC will put the dependencies in
9599
  # the current directory while Tru64 will put them in the object
9600
  # directory.
9601
  mkdir sub
9602
9603
  am_cv_$1_dependencies_compiler_type=none
9604
  if test "$am_compiler_list" = ""; then
9605
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9606
  fi
9607
  am__universal=false
9608
  m4_case([$1], [CC],
9609
    [case " $depcc " in #(
9610
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9611
     esac],
9612
    [CXX],
9613
    [case " $depcc " in #(
9614
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9615
     esac])
9616
9617
  for depmode in $am_compiler_list; do
9618
    # Setup a source with many dependencies, because some compilers
9619
    # like to wrap large dependency lists on column 80 (with \), and
9620
    # we should not choose a depcomp mode which is confused by this.
9621
    #
9622
    # We need to recreate these files for each test, as the compiler may
9623
    # overwrite some of them when testing with obscure command lines.
9624
    # This happens at least with the AIX C compiler.
9625
    : > sub/conftest.c
9626
    for i in 1 2 3 4 5 6; do
9627
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9628
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9629
      # Solaris 8's {/usr,}/bin/sh.
9630
      touch sub/conftst$i.h
9631
    done
9632
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9633
9634
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9635
    # mode.  It turns out that the SunPro C++ compiler does not properly
9636
    # handle `-M -o', and we need to detect this.  Also, some Intel
9637
    # versions had trouble with output in subdirs
9638
    am__obj=sub/conftest.${OBJEXT-o}
9639
    am__minus_obj="-o $am__obj"
9640
    case $depmode in
9641
    gcc)
9642
      # This depmode causes a compiler race in universal mode.
9643
      test "$am__universal" = false || continue
9644
      ;;
9645
    nosideeffect)
9646
      # after this tag, mechanisms are not by side-effect, so they'll
9647
      # only be used when explicitly requested
9648
      if test "x$enable_dependency_tracking" = xyes; then
9649
	continue
9650
      else
9651
	break
9652
      fi
9653
      ;;
9654
    msvisualcpp | msvcmsys)
9655
      # This compiler won't grok `-c -o', but also, the minuso test has
9656
      # not run yet.  These depmodes are late enough in the game, and
9657
      # so weak that their functioning should not be impacted.
9658
      am__obj=conftest.${OBJEXT-o}
9659
      am__minus_obj=
9660
      ;;
9661
    none) break ;;
9662
    esac
9663
    if depmode=$depmode \
9664
       source=sub/conftest.c object=$am__obj \
9665
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9666
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9667
         >/dev/null 2>conftest.err &&
9668
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9669
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9670
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9671
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9672
      # icc doesn't choke on unknown options, it will just issue warnings
9673
      # or remarks (even with -Werror).  So we grep stderr for any message
9674
      # that says an option was ignored or not supported.
9675
      # When given -MP, icc 7.0 and 7.1 complain thusly:
9676
      #   icc: Command line warning: ignoring option '-M'; no argument required
9677
      # The diagnosis changed in icc 8.0:
9678
      #   icc: Command line remark: option '-MP' not supported
9679
      if (grep 'ignoring option' conftest.err ||
9680
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9681
        am_cv_$1_dependencies_compiler_type=$depmode
9682
        break
9683
      fi
9684
    fi
9685
  done
9686
9687
  cd ..
9688
  rm -rf conftest.dir
9689
else
9690
  am_cv_$1_dependencies_compiler_type=none
9691
fi
9692
])
9693
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9694
AM_CONDITIONAL([am__fastdep$1], [
9695
  test "x$enable_dependency_tracking" != xno \
9696
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9697
])
9698
9699
9700
# AM_SET_DEPDIR
9701
# -------------
9702
# Choose a directory name for dependency files.
9703
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9704
AC_DEFUN([AM_SET_DEPDIR],
9705
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9706
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9707
])
9708
9709
9710
# AM_DEP_TRACK
9711
# ------------
9712
AC_DEFUN([AM_DEP_TRACK],
9713
[AC_ARG_ENABLE(dependency-tracking,
9714
[  --disable-dependency-tracking  speeds up one-time build
9715
  --enable-dependency-tracking   do not reject slow dependency extractors])
9716
if test "x$enable_dependency_tracking" != xno; then
9717
  am_depcomp="$ac_aux_dir/depcomp"
9718
  AMDEPBACKSLASH='\'
9719
fi
9720
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9721
AC_SUBST([AMDEPBACKSLASH])dnl
9722
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9723
])
9724
9725
# Generate code to set up dependency tracking.              -*- Autoconf -*-
9726
9727
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9728
# Free Software Foundation, Inc.
9729
#
9730
# This file is free software; the Free Software Foundation
9731
# gives unlimited permission to copy and/or distribute it,
9732
# with or without modifications, as long as this notice is preserved.
9733
9734
#serial 5
9735
9736
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9737
# ------------------------------
9738
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9739
[{
9740
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
9741
  # are listed without --file.  Let's play safe and only enable the eval
9742
  # if we detect the quoting.
9743
  case $CONFIG_FILES in
9744
  *\'*) eval set x "$CONFIG_FILES" ;;
9745
  *)   set x $CONFIG_FILES ;;
9746
  esac
9747
  shift
9748
  for mf
9749
  do
9750
    # Strip MF so we end up with the name of the file.
9751
    mf=`echo "$mf" | sed -e 's/:.*$//'`
9752
    # Check whether this is an Automake generated Makefile or not.
9753
    # We used to match only the files named `Makefile.in', but
9754
    # some people rename them; so instead we look at the file content.
9755
    # Grep'ing the first line is not enough: some people post-process
9756
    # each Makefile.in and add a new line on top of each file to say so.
9757
    # Grep'ing the whole file is not good either: AIX grep has a line
9758
    # limit of 2048, but all sed's we know have understand at least 4000.
9759
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9760
      dirpart=`AS_DIRNAME("$mf")`
9761
    else
9762
      continue
9763
    fi
9764
    # Extract the definition of DEPDIR, am__include, and am__quote
9765
    # from the Makefile without running `make'.
9766
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9767
    test -z "$DEPDIR" && continue
9768
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
9769
    test -z "am__include" && continue
9770
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9771
    # When using ansi2knr, U may be empty or an underscore; expand it
9772
    U=`sed -n 's/^U = //p' < "$mf"`
9773
    # Find all dependency output files, they are included files with
9774
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
9775
    # simplest approach to changing $(DEPDIR) to its actual value in the
9776
    # expansion.
9777
    for file in `sed -n "
9778
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9779
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9780
      # Make sure the directory exists.
9781
      test -f "$dirpart/$file" && continue
9782
      fdir=`AS_DIRNAME(["$file"])`
9783
      AS_MKDIR_P([$dirpart/$fdir])
9784
      # echo "creating $dirpart/$file"
9785
      echo '# dummy' > "$dirpart/$file"
9786
    done
9787
  done
9788
}
9789
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9790
9791
9792
# AM_OUTPUT_DEPENDENCY_COMMANDS
9793
# -----------------------------
9794
# This macro should only be invoked once -- use via AC_REQUIRE.
9795
#
9796
# This code is only required when automatic dependency tracking
9797
# is enabled.  FIXME.  This creates each `.P' file that we will
9798
# need in order to bootstrap the dependency handling code.
9799
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9800
[AC_CONFIG_COMMANDS([depfiles],
9801
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9802
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9803
])
9804
9805
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9806
# Free Software Foundation, Inc.
9807
#
9808
# This file is free software; the Free Software Foundation
9809
# gives unlimited permission to copy and/or distribute it,
9810
# with or without modifications, as long as this notice is preserved.
9811
9812
# serial 8
9813
9814
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9815
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9816
9817
# Do all the work for Automake.                             -*- Autoconf -*-
9818
9819
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9820
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9821
#
9822
# This file is free software; the Free Software Foundation
9823
# gives unlimited permission to copy and/or distribute it,
9824
# with or without modifications, as long as this notice is preserved.
9825
9826
# serial 16
9827
9828
# This macro actually does too much.  Some checks are only needed if
9829
# your package does certain things.  But this isn't really a big deal.
9830
9831
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9832
# AM_INIT_AUTOMAKE([OPTIONS])
9833
# -----------------------------------------------
9834
# The call with PACKAGE and VERSION arguments is the old style
9835
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9836
# and VERSION should now be passed to AC_INIT and removed from
9837
# the call to AM_INIT_AUTOMAKE.
9838
# We support both call styles for the transition.  After
9839
# the next Automake release, Autoconf can make the AC_INIT
9840
# arguments mandatory, and then we can depend on a new Autoconf
9841
# release and drop the old call support.
9842
AC_DEFUN([AM_INIT_AUTOMAKE],
9843
[AC_PREREQ([2.62])dnl
9844
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9845
dnl the ones we care about.
9846
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9847
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9848
AC_REQUIRE([AC_PROG_INSTALL])dnl
9849
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9850
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9851
  # is not polluted with repeated "-I."
9852
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9853
  # test to see if srcdir already configured
9854
  if test -f $srcdir/config.status; then
9855
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9856
  fi
9857
fi
9858
9859
# test whether we have cygpath
9860
if test -z "$CYGPATH_W"; then
9861
  if (cygpath --version) >/dev/null 2>/dev/null; then
9862
    CYGPATH_W='cygpath -w'
9863
  else
9864
    CYGPATH_W=echo
9865
  fi
9866
fi
9867
AC_SUBST([CYGPATH_W])
9868
9869
# Define the identity of the package.
9870
dnl Distinguish between old-style and new-style calls.
9871
m4_ifval([$2],
9872
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9873
 AC_SUBST([PACKAGE], [$1])dnl
9874
 AC_SUBST([VERSION], [$2])],
9875
[_AM_SET_OPTIONS([$1])dnl
9876
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9877
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9878
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9879
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9880
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9881
9882
_AM_IF_OPTION([no-define],,
9883
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9884
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9885
9886
# Some tools Automake needs.
9887
AC_REQUIRE([AM_SANITY_CHECK])dnl
9888
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9889
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9890
AM_MISSING_PROG(AUTOCONF, autoconf)
9891
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9892
AM_MISSING_PROG(AUTOHEADER, autoheader)
9893
AM_MISSING_PROG(MAKEINFO, makeinfo)
9894
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9895
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9896
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9897
# We need awk for the "check" target.  The system "awk" is bad on
9898
# some platforms.
9899
AC_REQUIRE([AC_PROG_AWK])dnl
9900
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9901
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9902
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9903
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9904
			     [_AM_PROG_TAR([v7])])])
9905
_AM_IF_OPTION([no-dependencies],,
9906
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9907
		  [_AM_DEPENDENCIES(CC)],
9908
		  [define([AC_PROG_CC],
9909
			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9910
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9911
		  [_AM_DEPENDENCIES(CXX)],
9912
		  [define([AC_PROG_CXX],
9913
			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9914
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9915
		  [_AM_DEPENDENCIES(OBJC)],
9916
		  [define([AC_PROG_OBJC],
9917
			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9918
])
9919
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9920
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9921
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
9922
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9923
AC_CONFIG_COMMANDS_PRE(dnl
9924
[m4_provide_if([_AM_COMPILER_EXEEXT],
9925
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9926
])
9927
9928
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9929
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9930
dnl mangled by Autoconf and run in a shell conditional statement.
9931
m4_define([_AC_COMPILER_EXEEXT],
9932
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9933
9934
9935
# When config.status generates a header, we must update the stamp-h file.
9936
# This file resides in the same directory as the config header
9937
# that is generated.  The stamp files are numbered to have different names.
9938
9939
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9940
# loop where config.status creates the headers, so we can generate
9941
# our stamp files there.
9942
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9943
[# Compute $1's index in $config_headers.
9944
_am_arg=$1
9945
_am_stamp_count=1
9946
for _am_header in $config_headers :; do
9947
  case $_am_header in
9948
    $_am_arg | $_am_arg:* )
9949
      break ;;
9950
    * )
9951
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9952
  esac
9953
done
9954
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9955
9956
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
9957
#
9958
# This file is free software; the Free Software Foundation
9959
# gives unlimited permission to copy and/or distribute it,
9960
# with or without modifications, as long as this notice is preserved.
9961
9962
# AM_PROG_INSTALL_SH
9963
# ------------------
9964
# Define $install_sh.
9965
AC_DEFUN([AM_PROG_INSTALL_SH],
9966
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9967
if test x"${install_sh}" != xset; then
9968
  case $am_aux_dir in
9969
  *\ * | *\	*)
9970
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9971
  *)
9972
    install_sh="\${SHELL} $am_aux_dir/install-sh"
9973
  esac
9974
fi
9975
AC_SUBST(install_sh)])
9976
9977
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9978
#
9979
# This file is free software; the Free Software Foundation
9980
# gives unlimited permission to copy and/or distribute it,
9981
# with or without modifications, as long as this notice is preserved.
9982
9983
# serial 2
9984
9985
# Check whether the underlying file-system supports filenames
9986
# with a leading dot.  For instance MS-DOS doesn't.
9987
AC_DEFUN([AM_SET_LEADING_DOT],
9988
[rm -rf .tst 2>/dev/null
9989
mkdir .tst 2>/dev/null
9990
if test -d .tst; then
9991
  am__leading_dot=.
9992
else
9993
  am__leading_dot=_
9994
fi
9995
rmdir .tst 2>/dev/null
9996
AC_SUBST([am__leading_dot])])
9997
9998
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9999
# From Jim Meyering
10000
10001
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10002
# Free Software Foundation, Inc.
10003
#
10004
# This file is free software; the Free Software Foundation
10005
# gives unlimited permission to copy and/or distribute it,
10006
# with or without modifications, as long as this notice is preserved.
10007
10008
# serial 5
10009
10010
# AM_MAINTAINER_MODE([DEFAULT-MODE])
10011
# ----------------------------------
10012
# Control maintainer-specific portions of Makefiles.
10013
# Default is to disable them, unless `enable' is passed literally.
10014
# For symmetry, `disable' may be passed as well.  Anyway, the user
10015
# can override the default with the --enable/--disable switch.
10016
AC_DEFUN([AM_MAINTAINER_MODE],
10017
[m4_case(m4_default([$1], [disable]),
10018
       [enable], [m4_define([am_maintainer_other], [disable])],
10019
       [disable], [m4_define([am_maintainer_other], [enable])],
10020
       [m4_define([am_maintainer_other], [enable])
10021
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10022
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
10023
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10024
  AC_ARG_ENABLE([maintainer-mode],
10025
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
10026
			  (and sometimes confusing) to the casual installer],
10027
      [USE_MAINTAINER_MODE=$enableval],
10028
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10029
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10030
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10031
  MAINT=$MAINTAINER_MODE_TRUE
10032
  AC_SUBST([MAINT])dnl
10033
]
10034
)
10035
10036
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
10037
10038
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
10039
10040
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
10041
#
10042
# This file is free software; the Free Software Foundation
10043
# gives unlimited permission to copy and/or distribute it,
10044
# with or without modifications, as long as this notice is preserved.
10045
10046
# serial 4
10047
10048
# AM_MAKE_INCLUDE()
10049
# -----------------
10050
# Check to see how make treats includes.
10051
AC_DEFUN([AM_MAKE_INCLUDE],
10052
[am_make=${MAKE-make}
10053
cat > confinc << 'END'
10054
am__doit:
10055
	@echo this is the am__doit target
10056
.PHONY: am__doit
10057
END
10058
# If we don't find an include directive, just comment out the code.
10059
AC_MSG_CHECKING([for style of include used by $am_make])
10060
am__include="#"
10061
am__quote=
10062
_am_result=none
10063
# First try GNU make style include.
10064
echo "include confinc" > confmf
10065
# Ignore all kinds of additional output from `make'.
10066
case `$am_make -s -f confmf 2> /dev/null` in #(
10067
*the\ am__doit\ target*)
10068
  am__include=include
10069
  am__quote=
10070
  _am_result=GNU
10071
  ;;
10072
esac
10073
# Now try BSD make style include.
10074
if test "$am__include" = "#"; then
10075
   echo '.include "confinc"' > confmf
10076
   case `$am_make -s -f confmf 2> /dev/null` in #(
10077
   *the\ am__doit\ target*)
10078
     am__include=.include
10079
     am__quote="\""
10080
     _am_result=BSD
10081
     ;;
10082
   esac
10083
fi
10084
AC_SUBST([am__include])
10085
AC_SUBST([am__quote])
10086
AC_MSG_RESULT([$_am_result])
10087
rm -f confinc confmf
10088
])
10089
10090
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
10091
# Free Software Foundation, Inc.
10092
#
10093
# This file is free software; the Free Software Foundation
10094
# gives unlimited permission to copy and/or distribute it,
10095
# with or without modifications, as long as this notice is preserved.
10096
10097
# serial 6
10098
10099
# AM_PROG_CC_C_O
10100
# --------------
10101
# Like AC_PROG_CC_C_O, but changed for automake.
10102
AC_DEFUN([AM_PROG_CC_C_O],
10103
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
10104
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10105
AC_REQUIRE_AUX_FILE([compile])dnl
10106
# FIXME: we rely on the cache variable name because
10107
# there is no other way.
10108
set dummy $CC
10109
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
10110
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
10111
if test "$am_t" != yes; then
10112
   # Losing compiler, so override with the script.
10113
   # FIXME: It is wrong to rewrite CC.
10114
   # But if we don't then we get into trouble of one sort or another.
10115
   # A longer-term fix would be to have automake use am__CC in this case,
10116
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10117
   CC="$am_aux_dir/compile $CC"
10118
fi
10119
dnl Make sure AC_PROG_CC is never called again, or it will override our
10120
dnl setting of CC.
10121
m4_define([AC_PROG_CC],
10122
          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
10123
])
10124
10125
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10126
10127
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
10128
# Free Software Foundation, Inc.
10129
#
10130
# This file is free software; the Free Software Foundation
10131
# gives unlimited permission to copy and/or distribute it,
10132
# with or without modifications, as long as this notice is preserved.
10133
10134
# serial 6
10135
10136
# AM_MISSING_PROG(NAME, PROGRAM)
10137
# ------------------------------
10138
AC_DEFUN([AM_MISSING_PROG],
10139
[AC_REQUIRE([AM_MISSING_HAS_RUN])
10140
$1=${$1-"${am_missing_run}$2"}
10141
AC_SUBST($1)])
10142
10143
10144
# AM_MISSING_HAS_RUN
10145
# ------------------
10146
# Define MISSING if not defined so far and test if it supports --run.
10147
# If it does, set am_missing_run to use it, otherwise, to nothing.
10148
AC_DEFUN([AM_MISSING_HAS_RUN],
10149
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10150
AC_REQUIRE_AUX_FILE([missing])dnl
10151
if test x"${MISSING+set}" != xset; then
10152
  case $am_aux_dir in
10153
  *\ * | *\	*)
10154
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10155
  *)
10156
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
10157
  esac
10158
fi
10159
# Use eval to expand $SHELL
10160
if eval "$MISSING --run true"; then
10161
  am_missing_run="$MISSING --run "
10162
else
10163
  am_missing_run=
10164
  AC_MSG_WARN([`missing' script is too old or missing])
10165
fi
10166
])
10167
10168
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
10169
#
10170
# This file is free software; the Free Software Foundation
10171
# gives unlimited permission to copy and/or distribute it,
10172
# with or without modifications, as long as this notice is preserved.
10173
10174
# AM_PROG_MKDIR_P
10175
# ---------------
10176
# Check for `mkdir -p'.
10177
AC_DEFUN([AM_PROG_MKDIR_P],
10178
[AC_PREREQ([2.60])dnl
10179
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10180
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10181
dnl while keeping a definition of mkdir_p for backward compatibility.
10182
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10183
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10184
dnl Makefile.ins that do not define MKDIR_P, so we do our own
10185
dnl adjustment using top_builddir (which is defined more often than
10186
dnl MKDIR_P).
10187
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10188
case $mkdir_p in
10189
  [[\\/$]]* | ?:[[\\/]]*) ;;
10190
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10191
esac
10192
])
10193
10194
# Helper functions for option handling.                     -*- Autoconf -*-
10195
10196
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
10197
#
10198
# This file is free software; the Free Software Foundation
10199
# gives unlimited permission to copy and/or distribute it,
10200
# with or without modifications, as long as this notice is preserved.
10201
10202
# serial 4
10203
10204
# _AM_MANGLE_OPTION(NAME)
10205
# -----------------------
10206
AC_DEFUN([_AM_MANGLE_OPTION],
10207
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10208
10209
# _AM_SET_OPTION(NAME)
10210
# ------------------------------
10211
# Set option NAME.  Presently that only means defining a flag for this option.
10212
AC_DEFUN([_AM_SET_OPTION],
10213
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10214
10215
# _AM_SET_OPTIONS(OPTIONS)
10216
# ----------------------------------
10217
# OPTIONS is a space-separated list of Automake options.
10218
AC_DEFUN([_AM_SET_OPTIONS],
10219
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10220
10221
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10222
# -------------------------------------------
10223
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10224
AC_DEFUN([_AM_IF_OPTION],
10225
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10226
10227
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
10228
10229
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10230
# Free Software Foundation, Inc.
10231
#
10232
# This file is free software; the Free Software Foundation
10233
# gives unlimited permission to copy and/or distribute it,
10234
# with or without modifications, as long as this notice is preserved.
10235
10236
# serial 5
10237
10238
# AM_SANITY_CHECK
10239
# ---------------
10240
AC_DEFUN([AM_SANITY_CHECK],
10241
[AC_MSG_CHECKING([whether build environment is sane])
10242
# Just in case
10243
sleep 1
10244
echo timestamp > conftest.file
10245
# Reject unsafe characters in $srcdir or the absolute working directory
10246
# name.  Accept space and tab only in the latter.
10247
am_lf='
10248
'
10249
case `pwd` in
10250
  *[[\\\"\#\$\&\'\`$am_lf]]*)
10251
    AC_MSG_ERROR([unsafe absolute working directory name]);;
10252
esac
10253
case $srcdir in
10254
  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
10255
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10256
esac
10257
10258
# Do `set' in a subshell so we don't clobber the current shell's
10259
# arguments.  Must try -L first in case configure is actually a
10260
# symlink; some systems play weird games with the mod time of symlinks
10261
# (eg FreeBSD returns the mod time of the symlink's containing
10262
# directory).
10263
if (
10264
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10265
   if test "$[*]" = "X"; then
10266
      # -L didn't work.
10267
      set X `ls -t "$srcdir/configure" conftest.file`
10268
   fi
10269
   rm -f conftest.file
10270
   if test "$[*]" != "X $srcdir/configure conftest.file" \
10271
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
10272
10273
      # If neither matched, then we have a broken ls.  This can happen
10274
      # if, for instance, CONFIG_SHELL is bash and it inherits a
10275
      # broken ls alias from the environment.  This has actually
10276
      # happened.  Such a system could not be considered "sane".
10277
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10278
alias in your environment])
10279
   fi
10280
10281
   test "$[2]" = conftest.file
10282
   )
10283
then
10284
   # Ok.
10285
   :
10286
else
10287
   AC_MSG_ERROR([newly created file is older than distributed files!
10288
Check your system clock])
10289
fi
10290
AC_MSG_RESULT(yes)])
10291
10292
# Copyright (C) 2009  Free Software Foundation, Inc.
10293
#
10294
# This file is free software; the Free Software Foundation
10295
# gives unlimited permission to copy and/or distribute it,
10296
# with or without modifications, as long as this notice is preserved.
10297
10298
# serial 1
10299
10300
# AM_SILENT_RULES([DEFAULT])
10301
# --------------------------
10302
# Enable less verbose build rules; with the default set to DEFAULT
10303
# (`yes' being less verbose, `no' or empty being verbose).
10304
AC_DEFUN([AM_SILENT_RULES],
10305
[AC_ARG_ENABLE([silent-rules],
10306
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
10307
  --disable-silent-rules         verbose build output (undo: `make V=0')])
10308
case $enable_silent_rules in
10309
yes) AM_DEFAULT_VERBOSITY=0;;
10310
no)  AM_DEFAULT_VERBOSITY=1;;
10311
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10312
esac
10313
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10314
AM_BACKSLASH='\'
10315
AC_SUBST([AM_BACKSLASH])dnl
10316
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10317
])
10318
10319
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10320
#
10321
# This file is free software; the Free Software Foundation
10322
# gives unlimited permission to copy and/or distribute it,
10323
# with or without modifications, as long as this notice is preserved.
10324
10325
# AM_PROG_INSTALL_STRIP
10326
# ---------------------
10327
# One issue with vendor `install' (even GNU) is that you can't
10328
# specify the program used to strip binaries.  This is especially
10329
# annoying in cross-compiling environments, where the build's strip
10330
# is unlikely to handle the host's binaries.
10331
# Fortunately install-sh will honor a STRIPPROG variable, so we
10332
# always use install-sh in `make install-strip', and initialize
10333
# STRIPPROG with the value of the STRIP variable (set by the user).
10334
AC_DEFUN([AM_PROG_INSTALL_STRIP],
10335
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10336
# Installed binaries are usually stripped using `strip' when the user
10337
# run `make install-strip'.  However `strip' might not be the right
10338
# tool to use in cross-compilation environments, therefore Automake
10339
# will honor the `STRIP' environment variable to overrule this program.
10340
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10341
if test "$cross_compiling" != no; then
10342
  AC_CHECK_TOOL([STRIP], [strip], :)
10343
fi
10344
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10345
AC_SUBST([INSTALL_STRIP_PROGRAM])])
10346
10347
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
10348
#
10349
# This file is free software; the Free Software Foundation
10350
# gives unlimited permission to copy and/or distribute it,
10351
# with or without modifications, as long as this notice is preserved.
10352
10353
# serial 2
10354
10355
# _AM_SUBST_NOTMAKE(VARIABLE)
10356
# ---------------------------
10357
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10358
# This macro is traced by Automake.
10359
AC_DEFUN([_AM_SUBST_NOTMAKE])
10360
10361
# AM_SUBST_NOTMAKE(VARIABLE)
10362
# ---------------------------
10363
# Public sister of _AM_SUBST_NOTMAKE.
10364
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10365
10366
# Check how to create a tarball.                            -*- Autoconf -*-
10367
10368
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
10369
#
10370
# This file is free software; the Free Software Foundation
10371
# gives unlimited permission to copy and/or distribute it,
10372
# with or without modifications, as long as this notice is preserved.
10373
10374
# serial 2
10375
10376
# _AM_PROG_TAR(FORMAT)
10377
# --------------------
10378
# Check how to create a tarball in format FORMAT.
10379
# FORMAT should be one of `v7', `ustar', or `pax'.
10380
#
10381
# Substitute a variable $(am__tar) that is a command
10382
# writing to stdout a FORMAT-tarball containing the directory
10383
# $tardir.
10384
#     tardir=directory && $(am__tar) > result.tar
10385
#
10386
# Substitute a variable $(am__untar) that extract such
10387
# a tarball read from stdin.
10388
#     $(am__untar) < result.tar
10389
AC_DEFUN([_AM_PROG_TAR],
10390
[# Always define AMTAR for backward compatibility.
10391
AM_MISSING_PROG([AMTAR], [tar])
10392
m4_if([$1], [v7],
10393
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10394
     [m4_case([$1], [ustar],, [pax],,
10395
              [m4_fatal([Unknown tar format])])
10396
AC_MSG_CHECKING([how to create a $1 tar archive])
10397
# Loop over all known methods to create a tar archive until one works.
10398
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10399
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
10400
# Do not fold the above two line into one, because Tru64 sh and
10401
# Solaris sh will not grok spaces in the rhs of `-'.
10402
for _am_tool in $_am_tools
10403
do
10404
  case $_am_tool in
10405
  gnutar)
10406
    for _am_tar in tar gnutar gtar;
10407
    do
10408
      AM_RUN_LOG([$_am_tar --version]) && break
10409
    done
10410
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10411
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10412
    am__untar="$_am_tar -xf -"
10413
    ;;
10414
  plaintar)
10415
    # Must skip GNU tar: if it does not support --format= it doesn't create
10416
    # ustar tarball either.
10417
    (tar --version) >/dev/null 2>&1 && continue
10418
    am__tar='tar chf - "$$tardir"'
10419
    am__tar_='tar chf - "$tardir"'
10420
    am__untar='tar xf -'
10421
    ;;
10422
  pax)
10423
    am__tar='pax -L -x $1 -w "$$tardir"'
10424
    am__tar_='pax -L -x $1 -w "$tardir"'
10425
    am__untar='pax -r'
10426
    ;;
10427
  cpio)
10428
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10429
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10430
    am__untar='cpio -i -H $1 -d'
10431
    ;;
10432
  none)
10433
    am__tar=false
10434
    am__tar_=false
10435
    am__untar=false
10436
    ;;
10437
  esac
10438
10439
  # If the value was cached, stop now.  We just wanted to have am__tar
10440
  # and am__untar set.
10441
  test -n "${am_cv_prog_tar_$1}" && break
10442
10443
  # tar/untar a dummy directory, and stop if the command works
10444
  rm -rf conftest.dir
10445
  mkdir conftest.dir
10446
  echo GrepMe > conftest.dir/file
10447
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10448
  rm -rf conftest.dir
10449
  if test -s conftest.tar; then
10450
    AM_RUN_LOG([$am__untar <conftest.tar])
10451
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10452
  fi
10453
done
10454
rm -rf conftest.dir
10455
10456
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10457
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10458
AC_SUBST([am__tar])
10459
AC_SUBST([am__untar])
10460
]) # _AM_PROG_TAR
10461
28.9.7 by Ken VanDine
Import upstream version 0.3.1
10462
# Autoconf support for the Vala compiler
10463
10464
# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
10465
#
10466
# This file is free software; the Free Software Foundation
10467
# gives unlimited permission to copy and/or distribute it,
10468
# with or without modifications, as long as this notice is preserved.
10469
10470
# serial 4
10471
10472
# Check whether the Vala compiler exists in `PATH'. If it is found, the
10473
# variable VALAC is set. Optionally a minimum release number of the
10474
# compiler can be requested.
10475
#
10476
# AM_PROG_VALAC([MINIMUM-VERSION])
10477
# --------------------------------
10478
AC_DEFUN([AM_PROG_VALAC],
10479
[AC_PATH_PROG([VALAC], [valac], [])
10480
 AS_IF([test -z "$VALAC"],
10481
   [AC_MSG_WARN([No Vala compiler found.  You will not be able to compile .vala source files.])],
10482
   [AS_IF([test -n "$1"],
10483
      [AC_MSG_CHECKING([$VALAC is at least version $1])
10484
       am__vala_version=`$VALAC --version | sed 's/Vala  *//'`
10485
       AS_VERSION_COMPARE([$1], ["$am__vala_version"],
10486
         [AC_MSG_RESULT([yes])],
10487
         [AC_MSG_RESULT([yes])],
10488
         [AC_MSG_RESULT([no])
10489
          AC_MSG_ERROR([Vala $1 not found.])])])])
10490
])
10491