1
# generated automatically by aclocal 1.8.2 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
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
14
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
15
# Copyright (C) 2001-2003 Red Hat, Inc.
17
# This file is free software, distributed under the terms of the GNU
18
# General Public License. As a special exception to the GNU General
19
# Public License, this file may be distributed as part of a program
20
# that contains a configuration script generated by Autoconf, under
21
# the same distribution terms as the rest of that program.
23
# This file can be copied and used freely without restrictions. It can
24
# be used in projects which are not available under the GNU Public License
25
# but which still want to provide support for the GNU gettext functionality.
27
# Macro to add for using GNU gettext.
28
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
30
# Modified to never use included libintl.
31
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
33
# Major rework to remove unused code
34
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
36
# Added better handling of ALL_LINGUAS from GNU gettext version
37
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
40
# We need this here as well, since someone might use autoconf-2.5x
41
# to configure GLib then an older version to configure a package
42
# using AM_GLIB_GNU_GETTEXT
46
dnl We go to great lengths to make sure that aclocal won't
47
dnl try to pull in the installed version of these macros
48
dnl when running aclocal in the glib directory.
50
m4_copy([AC_DEFUN],[glib_DEFUN])
51
m4_copy([AC_REQUIRE],[glib_REQUIRE])
53
dnl At the end, if we're not within glib, we'll define the public
54
dnl definitions in terms of our private definitions.
59
glib_DEFUN([GLIB_LC_MESSAGES],
60
[AC_CHECK_HEADERS([locale.h])
61
if test $ac_cv_header_locale_h = yes; then
62
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
63
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
64
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
65
if test $am_cv_val_LC_MESSAGES = yes; then
66
AC_DEFINE(HAVE_LC_MESSAGES, 1,
67
[Define if your <locale.h> file defines LC_MESSAGES.])
71
# GLIB_PATH_PROG_WITH_TEST
72
#----------------------------
73
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
74
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
75
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
76
[# Extract the first word of "$2", so it can be a program name with args.
77
set dummy $2; ac_word=[$]2
78
AC_MSG_CHECKING([for $ac_word])
79
AC_CACHE_VAL(ac_cv_path_$1,
82
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
85
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
86
for ac_dir in ifelse([$5], , $PATH, [$5]); do
87
test -z "$ac_dir" && ac_dir=.
88
if test -f $ac_dir/$ac_word; then
90
ac_cv_path_$1="$ac_dir/$ac_word"
96
dnl If no 4th arg is given, leave the cache variable unset,
97
dnl so AC_PATH_PROGS will keep looking.
98
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
103
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
113
glib_DEFUN([GLIB_WITH_NLS],
114
dnl NLS is obligatory
118
gt_cv_have_gettext=no
124
AC_CHECK_HEADER(libintl.h,
125
[gt_cv_func_dgettext_libintl="no"
126
libintl_extra_libs=""
129
# First check in libc
131
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
135
[return (int) dgettext ("","")],
136
gt_cv_func_dgettext_libc=yes,
137
gt_cv_func_dgettext_libc=no)
140
if test "$gt_cv_func_dgettext_libc" = "yes" ; then
141
AC_CHECK_FUNCS(bind_textdomain_codeset)
145
# If we don't have everything we want, check in libintl
147
if test "$gt_cv_func_dgettext_libc" != "yes" \
148
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
150
AC_CHECK_LIB(intl, bindtextdomain,
151
[AC_CHECK_LIB(intl, dgettext,
152
gt_cv_func_dgettext_libintl=yes)])
154
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
155
AC_MSG_CHECKING([if -liconv is needed to use gettext])
157
AC_CHECK_LIB(intl, dcgettext,
158
[gt_cv_func_dgettext_libintl=yes
159
libintl_extra_libs=-liconv],
164
# If we found libintl, then check in it for bind_textdomain_codeset();
165
# we'll prefer libc if neither have bind_textdomain_codeset(),
166
# and both have dgettext
168
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
169
glib_save_LIBS="$LIBS"
170
LIBS="$LIBS -lintl $libintl_extra_libs"
171
unset ac_cv_func_bind_textdomain_codeset
172
AC_CHECK_FUNCS(bind_textdomain_codeset)
173
LIBS="$glib_save_LIBS"
175
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
176
gt_cv_func_dgettext_libc=no
178
if test "$gt_cv_func_dgettext_libc" = "yes"; then
179
gt_cv_func_dgettext_libintl=no
185
if test "$gt_cv_func_dgettext_libc" = "yes" \
186
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
187
gt_cv_have_gettext=yes
190
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
191
INTLLIBS="-lintl $libintl_extra_libs"
194
if test "$gt_cv_have_gettext" = "yes"; then
195
AC_DEFINE(HAVE_GETTEXT,1,
196
[Define if the GNU gettext() function is already present or preinstalled.])
197
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
198
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
199
if test "$MSGFMT" != "no"; then
200
glib_save_LIBS="$LIBS"
201
LIBS="$LIBS $INTLLIBS"
202
AC_CHECK_FUNCS(dcgettext)
203
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
204
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
205
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
206
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
207
return _nl_msg_cat_cntr],
212
dnl On Solaris, if bind_textdomain_codeset is in libc,
213
dnl GNU format message catalog is always supported,
214
dnl since both are added to the libc all together.
215
dnl Hence, we'd like to go with DATADIRNAME=share and
216
dnl and CATOBJEXT=.gmo in this case.
217
AC_CHECK_FUNC(bind_textdomain_codeset,
228
LIBS="$glib_save_LIBS"
231
gt_cv_have_gettext=no
236
if test "$gt_cv_have_gettext" = "yes" ; then
237
AC_DEFINE(ENABLE_NLS, 1,
238
[always defined to indicate that i18n is enabled])
241
dnl Test whether we really found GNU xgettext.
242
if test "$XGETTEXT" != ":"; then
243
dnl If it is not GNU xgettext we define it as : so that the
244
dnl Makefiles still can work.
245
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
249
[found xgettext program is not GNU xgettext; ignore it])
254
# We need to process the po/ directory.
258
[case "$CONFIG_FILES" in *po/Makefile.in*)
259
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
262
dnl These rules are solely for the distribution goal. While doing this
263
dnl we only have to keep exactly one list of the available catalogs
265
for lang in $ALL_LINGUAS; do
266
GMOFILES="$GMOFILES $lang.gmo"
267
POFILES="$POFILES $lang.po"
270
dnl Make all variables we use known to autoconf.
273
AC_SUBST(DATADIRNAME)
277
AC_SUBST(PO_IN_DATADIR_TRUE)
278
AC_SUBST(PO_IN_DATADIR_FALSE)
283
# AM_GLIB_GNU_GETTEXT
284
# -------------------
285
# Do checks necessary for use of gettext. If a suitable implementation
286
# of gettext is found in either in libintl or in the C library,
287
# it will set INTLLIBS to the libraries needed for use of gettext
288
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
289
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
290
# on various variables needed by the Makefile.in.in installed by
293
glib_DEFUN([GLIB_GNU_GETTEXT],
294
[AC_REQUIRE([AC_PROG_CC])dnl
295
AC_REQUIRE([AC_HEADER_STDC])dnl
300
if test "$gt_cv_have_gettext" = "yes"; then
301
if test "x$ALL_LINGUAS" = "x"; then
304
AC_MSG_CHECKING(for catalogs to be installed)
306
for presentlang in $ALL_LINGUAS; do
308
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
309
desiredlanguages="$LINGUAS"
311
desiredlanguages="$ALL_LINGUAS"
313
for desiredlang in $desiredlanguages; do
314
# Use the presentlang catalog if desiredlang is
315
# a. equal to presentlang, or
316
# b. a variant of presentlang (because in this case,
317
# presentlang can be used as a fallback for messages
318
# which are not translated in the desiredlang catalog).
319
case "$desiredlang" in
320
"$presentlang"*) useit=yes;;
323
if test $useit = yes; then
324
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
328
AC_MSG_RESULT($LINGUAS)
331
dnl Construct list of names of catalog files to be constructed.
332
if test -n "$LINGUAS"; then
333
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
337
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
338
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
339
dnl Try to locate is.
341
if test -n "$ac_aux_dir"; then
342
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
344
if test -z "$MKINSTALLDIRS"; then
345
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
347
AC_SUBST(MKINSTALLDIRS)
349
dnl Generate list of files to be processed by xgettext which will
350
dnl be included in po/Makefile.
351
test -d po || mkdir po
352
if test "x$srcdir" != "x."; then
353
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
354
posrcprefix="$srcdir/"
356
posrcprefix="../$srcdir/"
362
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
363
< $srcdir/po/POTFILES.in > po/POTFILES
366
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
367
# -------------------------------
368
# Define VARIABLE to the location where catalog files will
369
# be installed by po/Makefile.
370
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
371
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
372
glib_save_prefix="$prefix"
373
glib_save_exec_prefix="$exec_prefix"
374
test "x$prefix" = xNONE && prefix=$ac_default_prefix
375
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
376
if test "x$CATOBJEXT" = "x.mo" ; then
377
localedir=`eval echo "${libdir}/locale"`
379
localedir=`eval echo "${datadir}/locale"`
381
prefix="$glib_save_prefix"
382
exec_prefix="$glib_save_exec_prefix"
383
AC_DEFINE_UNQUOTED($1, "$localedir",
384
[Define the location where the catalogs will be installed])
388
dnl Now the definitions that aclocal will find
390
ifdef(glib_configure_in,[],[
391
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
392
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
395
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
397
# serial 47 AC_PROG_LIBTOOL
400
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
401
# -----------------------------------------------------------
402
# If this macro is not defined by Autoconf, define it here.
403
m4_ifdef([AC_PROVIDE_IFELSE],
405
[m4_define([AC_PROVIDE_IFELSE],
406
[m4_ifdef([AC_PROVIDE_$1],
412
AC_DEFUN([AC_PROG_LIBTOOL],
413
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
414
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
415
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
416
AC_PROVIDE_IFELSE([AC_PROG_CXX],
418
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
420
dnl And a similar setup for Fortran 77 support
421
AC_PROVIDE_IFELSE([AC_PROG_F77],
423
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
426
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
427
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
428
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
429
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
431
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
433
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
435
[ifdef([AC_PROG_GCJ],
436
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
437
ifdef([A][M_PROG_GCJ],
438
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
439
ifdef([LT_AC_PROG_GCJ],
440
[define([LT_AC_PROG_GCJ],
441
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
442
])])# AC_PROG_LIBTOOL
447
AC_DEFUN([_AC_PROG_LIBTOOL],
448
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
449
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
450
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
451
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
453
# This can be used to rebuild libtool when needed
454
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
456
# Always use our own libtool.
457
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
460
# Prevent multiple expansion
461
define([AC_PROG_LIBTOOL], [])
467
AC_DEFUN([AC_LIBTOOL_SETUP],
469
AC_REQUIRE([AC_ENABLE_SHARED])dnl
470
AC_REQUIRE([AC_ENABLE_STATIC])dnl
471
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
472
AC_REQUIRE([AC_CANONICAL_HOST])dnl
473
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
474
AC_REQUIRE([AC_PROG_CC])dnl
475
AC_REQUIRE([AC_PROG_LD])dnl
476
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
477
AC_REQUIRE([AC_PROG_NM])dnl
479
AC_REQUIRE([AC_PROG_LN_S])dnl
480
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
481
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
482
AC_REQUIRE([AC_OBJEXT])dnl
483
AC_REQUIRE([AC_EXEEXT])dnl
486
AC_LIBTOOL_SYS_MAX_CMD_LEN
487
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
490
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
491
_LT_AC_PROG_ECHO_BACKSLASH
495
# AIX sometimes has problems with the GCC collect2 program. For some
496
# reason, if we set the COLLECT_NAMES environment variable, the problems
497
# vanish in a puff of smoke.
498
if test "X${COLLECT_NAMES+set}" != Xset; then
505
# Sed substitution that helps us do robust quoting. It backslashifies
506
# metacharacters that are still active within double-quoted strings.
508
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
510
# Same as above, but do not quote variable references.
511
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
513
# Sed substitution to delay expansion of an escaped shell variable in a
514
# double_quote_subst'ed string.
515
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
517
# Sed substitution to avoid accidental globbing in evaled expressions
518
no_glob_subst='s/\*/\\\*/g'
524
default_ofile=libtool
527
# All known linkers require a `.a' archive for static linking (except M$VC,
528
# which needs '.lib').
530
ltmain="$ac_aux_dir/ltmain.sh"
531
ofile="$default_ofile"
532
with_gnu_ld="$lt_cv_prog_gnu_ld"
534
AC_CHECK_TOOL(AR, ar, false)
535
AC_CHECK_TOOL(RANLIB, ranlib, :)
536
AC_CHECK_TOOL(STRIP, strip, :)
541
# Set sane defaults for various variables
542
test -z "$AR" && AR=ar
543
test -z "$AR_FLAGS" && AR_FLAGS=cru
544
test -z "$AS" && AS=as
545
test -z "$CC" && CC=cc
546
test -z "$LTCC" && LTCC=$CC
547
test -z "$DLLTOOL" && DLLTOOL=dlltool
548
test -z "$LD" && LD=ld
549
test -z "$LN_S" && LN_S="ln -s"
550
test -z "$MAGIC_CMD" && MAGIC_CMD=file
551
test -z "$NM" && NM=nm
552
test -z "$SED" && SED=sed
553
test -z "$OBJDUMP" && OBJDUMP=objdump
554
test -z "$RANLIB" && RANLIB=:
555
test -z "$STRIP" && STRIP=:
556
test -z "$ac_objext" && ac_objext=o
558
# Determine commands to create old-style static archives.
559
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
560
old_postinstall_cmds='chmod 644 $oldlib'
561
old_postuninstall_cmds=
563
if test -n "$RANLIB"; then
566
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
569
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
572
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
575
# Only perform the check for file, if the check method requires it
576
case $deplibs_check_method in
578
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
584
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
585
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
586
enable_win32_dll=yes, enable_win32_dll=no)
588
AC_ARG_ENABLE([libtool-lock],
589
[AC_HELP_STRING([--disable-libtool-lock],
590
[avoid locking (might break parallel builds)])])
591
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
594
[AC_HELP_STRING([--with-pic],
595
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
596
[pic_mode="$withval"],
598
test -z "$pic_mode" && pic_mode=default
600
# Use C for the default configuration in the libtool script
602
AC_LIBTOOL_LANG_C_CONFIG
607
# _LT_AC_SYS_COMPILER
608
# -------------------
609
AC_DEFUN([_LT_AC_SYS_COMPILER],
610
[AC_REQUIRE([AC_PROG_CC])dnl
612
# If no C compiler was specified, use CC.
615
# Allow CC to be a program name with arguments.
617
])# _LT_AC_SYS_COMPILER
620
# _LT_AC_SYS_LIBPATH_AIX
621
# ----------------------
622
# Links a minimal program and checks the executable
623
# for the system default hardcoded library path. In most cases,
624
# this is /usr/lib:/lib, but when the MPI compilers are used
625
# the location of the communication and MPI libs are included too.
626
# If we don't find anything, use the default library path according
627
# to the aix ld manual.
628
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
629
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
630
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
632
# Check for a 64-bit object if we didn't find anything.
633
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
635
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
636
])# _LT_AC_SYS_LIBPATH_AIX
639
# _LT_AC_SHELL_INIT(ARG)
640
# ----------------------
641
AC_DEFUN([_LT_AC_SHELL_INIT],
642
[ifdef([AC_DIVERSION_NOTICE],
643
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
644
[AC_DIVERT_PUSH(NOTICE)])
647
])# _LT_AC_SHELL_INIT
650
# _LT_AC_PROG_ECHO_BACKSLASH
651
# --------------------------
652
# Add some code to the start of the generated configure script which
653
# will find an echo command which doesn't interpret backslashes.
654
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
656
# Check that we are running under the correct shell.
657
SHELL=${CONFIG_SHELL-/bin/sh}
661
# Remove one level of quotation (which was required for Make).
662
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
667
if test "X[$]1" = X--no-reexec; then
668
# Discard the --no-reexec flag, and continue.
670
elif test "X[$]1" = X--fallback-echo; then
671
# Avoid inline document here, it may be left over
673
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
674
# Yippee, $echo works!
677
# Restart under the correct shell.
678
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
681
if test "X[$]1" = X--fallback-echo; then
682
# used as fallback echo
690
# The HP-UX ksh and POSIX shell print the target directory to stdout
692
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
694
if test -z "$ECHO"; then
695
if test "X${echo_test_string+set}" != Xset; then
696
# find a string as large as possible, as long as the shell can cope with it
697
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
698
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
699
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
700
echo_test_string="`eval $cmd`" &&
701
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
708
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
709
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
710
test "X$echo_testing_string" = "X$echo_test_string"; then
713
# The Solaris, AIX, and Digital Unix default echo programs unquote
714
# backslashes. This makes it impossible to quote backslashes using
715
# echo "$something" | sed 's/\\/\\\\/g'
717
# So, first we look for a working echo in the user's PATH.
719
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
720
for dir in $PATH /usr/ucb; do
722
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
723
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
724
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
725
test "X$echo_testing_string" = "X$echo_test_string"; then
732
if test "X$echo" = Xecho; then
733
# We didn't find a better echo, so look for alternatives.
734
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
735
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
736
test "X$echo_testing_string" = "X$echo_test_string"; then
737
# This shell has a builtin print -r that does the trick.
739
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
740
test "X$CONFIG_SHELL" != X/bin/ksh; then
741
# If we have ksh, try running configure again with it.
742
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
743
export ORIGINAL_CONFIG_SHELL
744
CONFIG_SHELL=/bin/ksh
746
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
750
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
751
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
752
test "X$echo_testing_string" = "X$echo_test_string"; then
755
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
756
test "X$echo_testing_string" = 'X\t' &&
757
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
758
test "X$echo_testing_string" = "X$echo_test_string"; then
759
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
761
SHELL="$CONFIG_SHELL"
763
echo="$CONFIG_SHELL [$]0 --fallback-echo"
764
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
765
test "X$echo_testing_string" = 'X\t' &&
766
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
767
test "X$echo_testing_string" = "X$echo_test_string"; then
768
echo="$CONFIG_SHELL [$]0 --fallback-echo"
770
# maybe with a smaller string...
773
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
774
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
781
if test "$prev" != 'sed 50q "[$]0"'; then
782
echo_test_string=`eval $prev`
783
export echo_test_string
784
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
786
# Oops. We lost completely, so just stick with echo.
795
# Copy echo and quote the copy suitably for passing to libtool from
796
# the Makefile, instead of quoting the original, which is used later.
798
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
799
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
803
])])# _LT_AC_PROG_ECHO_BACKSLASH
808
AC_DEFUN([_LT_AC_LOCK],
809
[AC_ARG_ENABLE([libtool-lock],
810
[AC_HELP_STRING([--disable-libtool-lock],
811
[avoid locking (might break parallel builds)])])
812
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
814
# Some flags need to be propagated to the compiler or linker for good
818
# Find out which ABI we are using.
819
echo 'int i;' > conftest.$ac_ext
820
if AC_TRY_EVAL(ac_compile); then
821
case `/usr/bin/file conftest.$ac_objext` in
833
# Find out which ABI we are using.
834
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
835
if AC_TRY_EVAL(ac_compile); then
836
if test "$lt_cv_prog_gnu_ld" = yes; then
837
case `/usr/bin/file conftest.$ac_objext` in
839
LD="${LD-ld} -melf32bsmip"
842
LD="${LD-ld} -melf32bmipn32"
845
LD="${LD-ld} -melf64bmip"
849
case `/usr/bin/file conftest.$ac_objext` in
865
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
866
# Find out which ABI we are using.
867
echo 'int i;' > conftest.$ac_ext
868
if AC_TRY_EVAL(ac_compile); then
869
case "`/usr/bin/file conftest.o`" in
873
LD="${LD-ld} -m elf_i386"
876
LD="${LD-ld} -m elf32ppclinux"
879
LD="${LD-ld} -m elf_s390"
882
LD="${LD-ld} -m elf32_sparc"
889
LD="${LD-ld} -m elf_x86_64"
891
ppc*-*linux*|powerpc*-*linux*)
892
LD="${LD-ld} -m elf64ppc"
895
LD="${LD-ld} -m elf64_s390"
898
LD="${LD-ld} -m elf64_sparc"
908
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
909
SAVE_CFLAGS="$CFLAGS"
910
CFLAGS="$CFLAGS -belf"
911
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
913
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
915
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
916
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
917
CFLAGS="$SAVE_CFLAGS"
920
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
921
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
922
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
923
AC_CHECK_TOOL(AS, as, false)
924
AC_CHECK_TOOL(OBJDUMP, objdump, false)
929
need_locks="$enable_libtool_lock"
934
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
935
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
936
# ----------------------------------------------------------------
937
# Check whether the given compiler option works
938
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
939
[AC_CACHE_CHECK([$1], [$2],
941
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
942
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
943
lt_compiler_flag="$3"
944
# Insert the option either (1) after the last *FLAGS variable, or
945
# (2) before a word containing "conftest.", or (3) at the end.
946
# Note that $ac_compile itself does not contain backslashes and begins
947
# with a dollar sign (not a hyphen), so the echo should work correctly.
948
# The option is referenced via a variable to avoid confusing sed.
949
lt_compile=`echo "$ac_compile" | $SED \
950
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
951
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
952
-e 's:$: $lt_compiler_flag:'`
953
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
954
(eval "$lt_compile" 2>conftest.err)
956
cat conftest.err >&AS_MESSAGE_LOG_FD
957
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
958
if (exit $ac_status) && test -s "$ac_outfile"; then
959
# The compiler can only warn and ignore the option if not recognized
960
# So say no if there are warnings
961
if test ! -s conftest.err; then
968
if test x"[$]$2" = xyes; then
969
ifelse([$5], , :, [$5])
971
ifelse([$6], , :, [$6])
973
])# AC_LIBTOOL_COMPILER_OPTION
976
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
977
# [ACTION-SUCCESS], [ACTION-FAILURE])
978
# ------------------------------------------------------------
979
# Check whether the given compiler option works
980
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
981
[AC_CACHE_CHECK([$1], [$2],
983
save_LDFLAGS="$LDFLAGS"
984
LDFLAGS="$LDFLAGS $3"
985
printf "$lt_simple_link_test_code" > conftest.$ac_ext
986
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
987
# The compiler can only warn and ignore the option if not recognized
988
# So say no if there are warnings
989
if test -s conftest.err; then
990
# Append any errors to the config.log.
991
cat conftest.err 1>&AS_MESSAGE_LOG_FD
997
LDFLAGS="$save_LDFLAGS"
1000
if test x"[$]$2" = xyes; then
1001
ifelse([$4], , :, [$4])
1003
ifelse([$5], , :, [$5])
1005
])# AC_LIBTOOL_LINKER_OPTION
1008
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1009
# --------------------------
1010
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1011
[# find the maximum length of command line arguments
1012
AC_MSG_CHECKING([the maximum length of command line arguments])
1013
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1019
# On DJGPP, this test can blow up pretty badly due to problems in libc
1020
# (any single argument exceeding 2000 bytes causes a buffer overrun
1021
# during glob expansion). Even if it were fixed, the result of this
1022
# check would be larger than it should be.
1023
lt_cv_sys_max_cmd_len=12288; # 12K is about right
1027
# Under GNU Hurd, this test is not required because there is
1028
# no limit to the length of command line arguments.
1029
# Libtool will interpret -1 as no limit whatsoever
1030
lt_cv_sys_max_cmd_len=-1;
1034
# On Win9x/ME, this test blows up -- it succeeds, but takes
1035
# about 5 minutes as the teststring grows exponentially.
1036
# Worse, since 9x/ME are not pre-emptively multitasking,
1037
# you end up with a "frozen" computer, even though with patience
1038
# the test eventually succeeds (with a max line length of 256k).
1039
# Instead, let's just punt: use the minimum linelength reported by
1040
# all of the supported platforms: 8192 (on NT/2K/XP).
1041
lt_cv_sys_max_cmd_len=8192;
1045
# If test is not a shell built-in, we'll probably end up computing a
1046
# maximum length that is only half of the actual maximum length, but
1048
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1049
= "XX$testring") >/dev/null 2>&1 &&
1050
new_result=`expr "X$testring" : ".*" 2>&1` &&
1051
lt_cv_sys_max_cmd_len=$new_result &&
1052
test $i != 17 # 1/2 MB should be enough
1055
testring=$testring$testring
1058
# Add a significant safety factor because C++ compilers can tack on massive
1059
# amounts of additional arguments before passing them to the linker.
1060
# It appears as though 1/2 is a usable value.
1061
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1065
if test -n $lt_cv_sys_max_cmd_len ; then
1066
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1070
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1073
# _LT_AC_CHECK_DLFCN
1074
# --------------------
1075
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1076
[AC_CHECK_HEADERS(dlfcn.h)dnl
1077
])# _LT_AC_CHECK_DLFCN
1080
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1081
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1082
# ------------------------------------------------------------------
1083
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1084
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1085
if test "$cross_compiling" = yes; then :
1088
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1089
lt_status=$lt_dlunknown
1090
cat > conftest.$ac_ext <<EOF
1091
[#line __oline__ "configure"
1092
#include "confdefs.h"
1101
# define LT_DLGLOBAL RTLD_GLOBAL
1104
# define LT_DLGLOBAL DL_GLOBAL
1106
# define LT_DLGLOBAL 0
1110
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1111
find out it does not work in some platform. */
1112
#ifndef LT_DLLAZY_OR_NOW
1114
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1117
# define LT_DLLAZY_OR_NOW DL_LAZY
1120
# define LT_DLLAZY_OR_NOW RTLD_NOW
1123
# define LT_DLLAZY_OR_NOW DL_NOW
1125
# define LT_DLLAZY_OR_NOW 0
1133
extern "C" void exit (int);
1136
void fnord() { int i=42;}
1139
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1140
int status = $lt_dlunknown;
1144
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1145
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1146
/* dlclose (self); */
1152
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1153
(./conftest; exit; ) 2>/dev/null
1156
x$lt_dlno_uscore) $1 ;;
1157
x$lt_dlneed_uscore) $2 ;;
1158
x$lt_unknown|x*) $3 ;;
1161
# compilation failed
1166
])# _LT_AC_TRY_DLOPEN_SELF
1169
# AC_LIBTOOL_DLOPEN_SELF
1170
# -------------------
1171
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1172
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1173
if test "x$enable_dlopen" != xyes; then
1174
enable_dlopen=unknown
1175
enable_dlopen_self=unknown
1176
enable_dlopen_self_static=unknown
1183
lt_cv_dlopen="load_add_on"
1185
lt_cv_dlopen_self=yes
1189
lt_cv_dlopen="LoadLibrary"
1194
lt_cv_dlopen="dlopen"
1199
# if libdl is installed we need to link against it
1200
AC_CHECK_LIB([dl], [dlopen],
1201
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1204
lt_cv_dlopen_self=yes
1209
AC_CHECK_FUNC([shl_load],
1210
[lt_cv_dlopen="shl_load"],
1211
[AC_CHECK_LIB([dld], [shl_load],
1212
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1213
[AC_CHECK_FUNC([dlopen],
1214
[lt_cv_dlopen="dlopen"],
1215
[AC_CHECK_LIB([dl], [dlopen],
1216
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1217
[AC_CHECK_LIB([svld], [dlopen],
1218
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1219
[AC_CHECK_LIB([dld], [dld_link],
1220
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1229
if test "x$lt_cv_dlopen" != xno; then
1235
case $lt_cv_dlopen in
1237
save_CPPFLAGS="$CPPFLAGS"
1238
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1240
save_LDFLAGS="$LDFLAGS"
1241
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1244
LIBS="$lt_cv_dlopen_libs $LIBS"
1246
AC_CACHE_CHECK([whether a program can dlopen itself],
1247
lt_cv_dlopen_self, [dnl
1248
_LT_AC_TRY_DLOPEN_SELF(
1249
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1250
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1253
if test "x$lt_cv_dlopen_self" = xyes; then
1254
LDFLAGS="$LDFLAGS $link_static_flag"
1255
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1256
lt_cv_dlopen_self_static, [dnl
1257
_LT_AC_TRY_DLOPEN_SELF(
1258
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1259
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1263
CPPFLAGS="$save_CPPFLAGS"
1264
LDFLAGS="$save_LDFLAGS"
1269
case $lt_cv_dlopen_self in
1270
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1271
*) enable_dlopen_self=unknown ;;
1274
case $lt_cv_dlopen_self_static in
1275
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1276
*) enable_dlopen_self_static=unknown ;;
1279
])# AC_LIBTOOL_DLOPEN_SELF
1282
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1283
# ---------------------------------
1284
# Check to see if options -c and -o are simultaneously supported by compiler
1285
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1286
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1287
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1288
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1289
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1290
$rm -r conftest 2>/dev/null
1294
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1296
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1297
# that will create temporary files in the current directory regardless of
1298
# the output directory. Thus, making CWD read-only will cause this test
1299
# to fail, enabling locking or at least warning the user not to do parallel
1303
lt_compiler_flag="-o out/conftest2.$ac_objext"
1304
# Insert the option either (1) after the last *FLAGS variable, or
1305
# (2) before a word containing "conftest.", or (3) at the end.
1306
# Note that $ac_compile itself does not contain backslashes and begins
1307
# with a dollar sign (not a hyphen), so the echo should work correctly.
1308
lt_compile=`echo "$ac_compile" | $SED \
1309
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1310
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1311
-e 's:$: $lt_compiler_flag:'`
1312
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1313
(eval "$lt_compile" 2>out/conftest.err)
1315
cat out/conftest.err >&AS_MESSAGE_LOG_FD
1316
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1317
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1319
# The compiler can only warn and ignore the option if not recognized
1320
# So say no if there are warnings
1321
if test ! -s out/conftest.err; then
1322
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1332
])# AC_LIBTOOL_PROG_CC_C_O
1335
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1336
# -----------------------------------------
1337
# Check to see if we can do hard links to lock some files if needed
1338
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1339
[AC_REQUIRE([_LT_AC_LOCK])dnl
1341
hard_links="nottested"
1342
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1343
# do not overwrite the value of need_locks provided by the user
1344
AC_MSG_CHECKING([if we can lock with hard links])
1347
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1349
ln conftest.a conftest.b 2>&5 || hard_links=no
1350
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1351
AC_MSG_RESULT([$hard_links])
1352
if test "$hard_links" = no; then
1353
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1359
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1364
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1365
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1366
[rm -f .libs 2>/dev/null
1367
mkdir .libs 2>/dev/null
1368
if test -d .libs; then
1371
# MS-DOS does not allow filenames that begin with a dot.
1374
rmdir .libs 2>/dev/null])
1375
objdir=$lt_cv_objdir
1376
])# AC_LIBTOOL_OBJDIR
1379
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1380
# ----------------------------------------------
1381
# Check hardcoding attributes.
1382
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1383
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1384
_LT_AC_TAGVAR(hardcode_action, $1)=
1385
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1386
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1387
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1389
# We can hardcode non-existant directories.
1390
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1391
# If the only mechanism to avoid hardcoding is shlibpath_var, we
1392
# have to relink, otherwise we might link with an installed library
1393
# when we should be linking with a yet-to-be-installed one
1394
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1395
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1396
# Linking always hardcodes the temporary library directory.
1397
_LT_AC_TAGVAR(hardcode_action, $1)=relink
1399
# We can link without hardcoding, and we can hardcode nonexisting dirs.
1400
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
1403
# We cannot hardcode anything, or else we can only hardcode existing
1405
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1407
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1409
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1410
# Fast installation is not supported
1411
enable_fast_install=no
1412
elif test "$shlibpath_overrides_runpath" = yes ||
1413
test "$enable_shared" = no; then
1414
# Fast installation is not necessary
1415
enable_fast_install=needless
1417
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1420
# AC_LIBTOOL_SYS_LIB_STRIP
1421
# ------------------------
1422
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1425
AC_MSG_CHECKING([whether stripping libraries is possible])
1426
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1427
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1428
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1429
AC_MSG_RESULT([yes])
1431
# FIXME - insert some real tests, host_os isn't really good enough
1434
if test -n "$STRIP" ; then
1435
striplib="$STRIP -x"
1436
AC_MSG_RESULT([yes])
1446
])# AC_LIBTOOL_SYS_LIB_STRIP
1449
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1450
# -----------------------------
1451
# PORTME Fill in your ld.so characteristics
1452
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1453
[AC_MSG_CHECKING([dynamic linker characteristics])
1455
libname_spec='lib$name'
1463
shlibpath_overrides_runpath=unknown
1465
dynamic_linker="$host_os ld.so"
1466
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1467
if test "$GCC" = yes; then
1468
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1469
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1470
# if the path contains ";" then we assume it to be the separator
1471
# otherwise default to the standard path separator (i.e. ":") - it is
1472
# assumed that no part of a normal pathname contains ";" but that should
1473
# okay in the real world where ";" in dirpaths is itself problematic.
1474
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1476
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1479
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1481
need_lib_prefix=unknown
1482
hardcode_into_libs=no
1484
# when you set need_version to no, make sure it does not cause -set_version
1485
# flags to be left without arguments
1486
need_version=unknown
1491
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1492
shlibpath_var=LIBPATH
1494
# AIX 3 has no versioning support, so we append a major version to the name.
1495
soname_spec='${libname}${release}${shared_ext}$major'
1502
hardcode_into_libs=yes
1503
if test "$host_cpu" = ia64; then
1504
# AIX 5 supports IA64
1505
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1506
shlibpath_var=LD_LIBRARY_PATH
1508
# With GCC up to 2.95.x, collect2 would create an import file
1509
# for dependence libraries. The import file would start with
1510
# the line `#! .'. This would cause the generated library to
1511
# depend on `.', always an invalid library. This was fixed in
1512
# development snapshots of GCC prior to 3.0.
1514
aix4 | aix4.[[01]] | aix4.[[01]].*)
1515
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1517
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1524
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1525
# soname into executable. Probably we can add versioning support to
1526
# collect2, so additional links can be useful in future.
1527
if test "$aix_use_runtimelinking" = yes; then
1528
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
1529
# instead of lib<name>.a to let people know that these are not
1530
# typical AIX shared libraries.
1531
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1533
# We preserve .a as extension for shared libraries through AIX4.2
1534
# and later when we are not doing run time linking.
1535
library_names_spec='${libname}${release}.a $libname.a'
1536
soname_spec='${libname}${release}${shared_ext}$major'
1538
shlibpath_var=LIBPATH
1543
library_names_spec='$libname.ixlibrary $libname.a'
1544
# Create ${libname}_ixlibrary.a entries in /sys/libs.
1545
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
1549
library_names_spec='${libname}${shared_ext}'
1550
dynamic_linker="$host_os ld.so"
1551
shlibpath_var=LIBRARY_PATH
1557
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1558
soname_spec='${libname}${release}${shared_ext}$major'
1559
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1560
shlibpath_var=LD_LIBRARY_PATH
1561
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1562
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1563
# the default ld.so.conf also contains /usr/contrib/lib and
1564
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1565
# libtool to hard-code these into programs
1568
cygwin* | mingw* | pw32*)
1569
version_type=windows
1574
case $GCC,$host_os in
1575
yes,cygwin* | yes,mingw* | yes,pw32*)
1576
library_names_spec='$libname.dll.a'
1577
# DLL is installed to $(libdir)/../bin by postinstall_cmds
1578
postinstall_cmds='base_file=`basename \${file}`~
1579
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1580
dldir=$destdir/`dirname \$dlpath`~
1581
test -d \$dldir || mkdir -p \$dldir~
1582
$install_prog $dir/$dlname \$dldir/$dlname'
1583
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1584
dlpath=$dir/\$dldll~
1586
shlibpath_overrides_runpath=yes
1590
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
1591
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1592
sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1595
# MinGW DLLs use traditional 'lib' prefix
1596
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1597
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1598
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1599
# It is most probably a Windows format PATH printed by
1600
# mingw gcc, but we are running on Cygwin. Gcc prints its search
1601
# path with ; separators, and with drive letters. We can handle the
1602
# drive letters (cygwin fileutils understands them), so leave them,
1603
# especially as we might pass files found there to a mingw objdump,
1604
# which wouldn't understand a cygwinified path. Ahh.
1605
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1607
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1611
# pw32 DLLs use 'pw' prefix rather than 'lib'
1612
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1618
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1621
dynamic_linker='Win32 ld.exe'
1622
# FIXME: first we should search . and the directory the executable is in
1626
darwin* | rhapsody*)
1627
dynamic_linker="$host_os dyld"
1631
# FIXME: Relying on posixy $() will cause problems for
1632
# cross-compilation, but unfortunately the echo tests do not
1633
# yet detect zsh echo's removal of \ escapes.
1634
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1635
soname_spec='${libname}${release}${major}$shared_ext'
1636
shlibpath_overrides_runpath=yes
1637
shlibpath_var=DYLD_LIBRARY_PATH
1638
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
1639
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1640
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
1641
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1643
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1650
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1651
soname_spec='${libname}${release}${shared_ext}$major'
1652
shlibpath_var=LD_LIBRARY_PATH
1660
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1661
version_type=freebsd-$objformat
1662
case $version_type in
1664
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1669
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1673
shlibpath_var=LD_LIBRARY_PATH
1676
shlibpath_overrides_runpath=yes
1678
freebsd3.[01]* | freebsdelf3.[01]*)
1679
shlibpath_overrides_runpath=yes
1680
hardcode_into_libs=yes
1683
shlibpath_overrides_runpath=no
1684
hardcode_into_libs=yes
1693
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1694
soname_spec='${libname}${release}${shared_ext}$major'
1695
shlibpath_var=LD_LIBRARY_PATH
1696
hardcode_into_libs=yes
1699
hpux9* | hpux10* | hpux11*)
1700
# Give a soname corresponding to the major version so that dld.sl refuses to
1701
# link against other versions.
1708
hardcode_into_libs=yes
1709
dynamic_linker="$host_os dld.so"
1710
shlibpath_var=LD_LIBRARY_PATH
1711
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1712
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1713
soname_spec='${libname}${release}${shared_ext}$major'
1714
if test "X$HPUX_IA64_MODE" = X32; then
1715
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1717
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1719
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1723
hardcode_into_libs=yes
1724
dynamic_linker="$host_os dld.sl"
1725
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1726
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1727
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1728
soname_spec='${libname}${release}${shared_ext}$major'
1729
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1730
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1734
dynamic_linker="$host_os dld.sl"
1735
shlibpath_var=SHLIB_PATH
1736
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1737
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1738
soname_spec='${libname}${release}${shared_ext}$major'
1741
# HP-UX runs *really* slowly unless shared libraries are mode 555.
1742
postinstall_cmds='chmod 555 $lib'
1745
irix5* | irix6* | nonstopux*)
1747
nonstopux*) version_type=nonstopux ;;
1749
if test "$lt_cv_prog_gnu_ld" = yes; then
1757
soname_spec='${libname}${release}${shared_ext}$major'
1758
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1760
irix5* | nonstopux*)
1764
case $LD in # libtool.m4 will add one of these switches to LD
1765
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1766
libsuff= shlibsuff= libmagic=32-bit;;
1767
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1768
libsuff=32 shlibsuff=N32 libmagic=N32;;
1769
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1770
libsuff=64 shlibsuff=64 libmagic=64-bit;;
1771
*) libsuff= shlibsuff= libmagic=never-match;;
1775
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1776
shlibpath_overrides_runpath=no
1777
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1778
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1779
hardcode_into_libs=yes
1782
# No shared lib support for Linux oldld, aout, or coff.
1783
linux*oldld* | linux*aout* | linux*coff*)
1787
# This must be Linux ELF.
1792
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1793
soname_spec='${libname}${release}${shared_ext}$major'
1794
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1795
shlibpath_var=LD_LIBRARY_PATH
1796
shlibpath_overrides_runpath=no
1797
# This implies no fast_install, which is unacceptable.
1798
# Some rework will be needed to allow for fast_install
1799
# before this can be enabled.
1800
hardcode_into_libs=yes
1802
# We used to test for /lib/ld.so.1 and disable shared libraries on
1803
# powerpc, because MkLinux only supported shared libraries with the
1804
# GNU dynamic linker. Since this was broken with cross compilers,
1805
# most powerpc-linux boxes support dynamic linking these days and
1806
# people can always --disable-shared, the test was removed, and we
1807
# assume the GNU/Linux dynamic linker is in use.
1808
dynamic_linker='GNU/Linux ld.so'
1810
# Find out which ABI we are using (multilib Linux x86_64 hack).
1813
x86_64*|s390x*|powerpc64*)
1814
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1815
if AC_TRY_EVAL(ac_compile); then
1816
case `/usr/bin/file conftest.$ac_objext` in
1827
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
1828
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1835
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1836
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1837
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1838
dynamic_linker='NetBSD (a.out) ld.so'
1840
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
1841
soname_spec='${libname}${release}${shared_ext}$major'
1842
dynamic_linker='NetBSD ld.elf_so'
1844
shlibpath_var=LD_LIBRARY_PATH
1845
shlibpath_overrides_runpath=yes
1846
hardcode_into_libs=yes
1851
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1852
shlibpath_var=LD_LIBRARY_PATH
1853
shlibpath_overrides_runpath=yes
1860
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1861
soname_spec='${libname}${release}${shared_ext}$major'
1862
shlibpath_var=LD_LIBRARY_PATH
1863
shlibpath_overrides_runpath=yes
1870
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1871
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1872
shlibpath_var=LD_LIBRARY_PATH
1873
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1875
openbsd2.[[89]] | openbsd2.[[89]].*)
1876
shlibpath_overrides_runpath=no
1879
shlibpath_overrides_runpath=yes
1883
shlibpath_overrides_runpath=yes
1888
libname_spec='$name'
1891
library_names_spec='$libname${shared_ext} $libname.a'
1892
dynamic_linker='OS/2 ld.exe'
1893
shlibpath_var=LIBPATH
1896
osf3* | osf4* | osf5*)
1900
soname_spec='${libname}${release}${shared_ext}$major'
1901
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1902
shlibpath_var=LD_LIBRARY_PATH
1903
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1904
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1909
soname_spec='${libname}${release}${shared_ext}$major'
1910
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1911
shlibpath_var=LD_LIBRARY_PATH
1918
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1919
soname_spec='${libname}${release}${shared_ext}$major'
1920
shlibpath_var=LD_LIBRARY_PATH
1921
shlibpath_overrides_runpath=yes
1922
hardcode_into_libs=yes
1923
# ldd complains unless libraries are executable
1924
postinstall_cmds='chmod +x $lib'
1929
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1930
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1931
shlibpath_var=LD_LIBRARY_PATH
1932
shlibpath_overrides_runpath=yes
1933
if test "$with_gnu_ld" = yes; then
1939
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1941
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1942
soname_spec='${libname}${release}${shared_ext}$major'
1943
shlibpath_var=LD_LIBRARY_PATH
1944
case $host_vendor in
1946
shlibpath_overrides_runpath=no
1948
export_dynamic_flag_spec='${wl}-Blargedynsym'
1949
runpath_var=LD_RUN_PATH
1957
shlibpath_overrides_runpath=no
1958
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1964
if test -d /usr/nec ;then
1966
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1967
soname_spec='$libname${shared_ext}.$major'
1968
shlibpath_var=LD_LIBRARY_PATH
1974
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1975
soname_spec='${libname}${release}${shared_ext}$major'
1976
shlibpath_var=LD_LIBRARY_PATH
1983
AC_MSG_RESULT([$dynamic_linker])
1984
test "$dynamic_linker" = no && can_build_shared=no
1985
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1990
AC_DEFUN([_LT_AC_TAGCONFIG],
1991
[AC_ARG_WITH([tags],
1992
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1993
[include additional configurations @<:@automatic@:>@])],
1994
[tagnames="$withval"])
1996
if test -f "$ltmain" && test -n "$tagnames"; then
1997
if test ! -f "${ofile}"; then
1998
AC_MSG_WARN([output file `$ofile' does not exist])
2001
if test -z "$LTCC"; then
2002
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2003
if test -z "$LTCC"; then
2004
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2006
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2010
# Extract list of available tagged configurations in $ofile.
2011
# Note that this assumes the entire list is on one line.
2012
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2014
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2015
for tagname in $tagnames; do
2017
# Check whether tagname contains only valid characters
2018
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2020
*) AC_MSG_ERROR([invalid tag name: $tagname])
2024
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2026
AC_MSG_ERROR([tag name \"$tagname\" already exists])
2029
# Update the list of available tags.
2030
if test -n "$tagname"; then
2031
echo appending configuration tag \"$tagname\" to $ofile
2035
if test -n "$CXX" && test "X$CXX" != "Xno"; then
2036
AC_LIBTOOL_LANG_CXX_CONFIG
2043
if test -n "$F77" && test "X$F77" != "Xno"; then
2044
AC_LIBTOOL_LANG_F77_CONFIG
2051
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2052
AC_LIBTOOL_LANG_GCJ_CONFIG
2059
AC_LIBTOOL_LANG_RC_CONFIG
2063
AC_MSG_ERROR([Unsupported tag name: $tagname])
2067
# Append the new tag name to the list of available tags.
2068
if test -n "$tagname" ; then
2069
available_tags="$available_tags $tagname"
2075
# Now substitute the updated list of available tags.
2076
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2077
mv "${ofile}T" "$ofile"
2081
AC_MSG_ERROR([unable to update list of available tagged configurations.])
2084
])# _LT_AC_TAGCONFIG
2089
# enable checks for dlopen support
2090
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2091
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2092
])# AC_LIBTOOL_DLOPEN
2095
# AC_LIBTOOL_WIN32_DLL
2096
# --------------------
2097
# declare package support for building win32 dll's
2098
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2099
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2100
])# AC_LIBTOOL_WIN32_DLL
2103
# AC_ENABLE_SHARED([DEFAULT])
2104
# ---------------------------
2105
# implement the --enable-shared flag
2106
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2107
AC_DEFUN([AC_ENABLE_SHARED],
2108
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2109
AC_ARG_ENABLE([shared],
2110
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2111
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2112
[p=${PACKAGE-default}
2114
yes) enable_shared=yes ;;
2115
no) enable_shared=no ;;
2118
# Look at the argument we got. We use all the common list separators.
2119
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2120
for pkg in $enableval; do
2122
if test "X$pkg" = "X$p"; then
2129
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2130
])# AC_ENABLE_SHARED
2135
#- set the default shared flag to --disable-shared
2136
AC_DEFUN([AC_DISABLE_SHARED],
2137
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2138
AC_ENABLE_SHARED(no)
2139
])# AC_DISABLE_SHARED
2142
# AC_ENABLE_STATIC([DEFAULT])
2143
# ---------------------------
2144
# implement the --enable-static flag
2145
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2146
AC_DEFUN([AC_ENABLE_STATIC],
2147
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2148
AC_ARG_ENABLE([static],
2149
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2150
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2151
[p=${PACKAGE-default}
2153
yes) enable_static=yes ;;
2154
no) enable_static=no ;;
2157
# Look at the argument we got. We use all the common list separators.
2158
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2159
for pkg in $enableval; do
2161
if test "X$pkg" = "X$p"; then
2168
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
2169
])# AC_ENABLE_STATIC
2174
# set the default static flag to --disable-static
2175
AC_DEFUN([AC_DISABLE_STATIC],
2176
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2177
AC_ENABLE_STATIC(no)
2178
])# AC_DISABLE_STATIC
2181
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2182
# ---------------------------------
2183
# implement the --enable-fast-install flag
2184
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2185
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2186
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2187
AC_ARG_ENABLE([fast-install],
2188
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2189
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2190
[p=${PACKAGE-default}
2192
yes) enable_fast_install=yes ;;
2193
no) enable_fast_install=no ;;
2195
enable_fast_install=no
2196
# Look at the argument we got. We use all the common list separators.
2197
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2198
for pkg in $enableval; do
2200
if test "X$pkg" = "X$p"; then
2201
enable_fast_install=yes
2207
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2208
])# AC_ENABLE_FAST_INSTALL
2211
# AC_DISABLE_FAST_INSTALL
2212
# -----------------------
2213
# set the default to --disable-fast-install
2214
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2215
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2216
AC_ENABLE_FAST_INSTALL(no)
2217
])# AC_DISABLE_FAST_INSTALL
2220
# AC_LIBTOOL_PICMODE([MODE])
2221
# --------------------------
2222
# implement the --with-pic flag
2223
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2224
AC_DEFUN([AC_LIBTOOL_PICMODE],
2225
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2226
pic_mode=ifelse($#,1,$1,default)
2227
])# AC_LIBTOOL_PICMODE
2232
# This is predefined starting with Autoconf 2.54, so this conditional
2233
# definition can be removed once we require Autoconf 2.54 or later.
2234
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2235
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2236
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2237
then ac_cv_prog_egrep='grep -E'
2238
else ac_cv_prog_egrep='egrep'
2240
EGREP=$ac_cv_prog_egrep
2245
# AC_PATH_TOOL_PREFIX
2246
# -------------------
2247
# find a file program which can recognise shared library
2248
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2249
[AC_REQUIRE([AC_PROG_EGREP])dnl
2250
AC_MSG_CHECKING([for $1])
2251
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2253
[[\\/*] | ?:[\\/]*])
2254
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2257
lt_save_MAGIC_CMD="$MAGIC_CMD"
2258
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2259
dnl $ac_dummy forces splitting on constant user-supplied paths.
2260
dnl POSIX.2 word splitting is done only on the output of word expansions,
2261
dnl not every word. This closes a longstanding sh security hole.
2262
ac_dummy="ifelse([$2], , $PATH, [$2])"
2263
for ac_dir in $ac_dummy; do
2265
test -z "$ac_dir" && ac_dir=.
2266
if test -f $ac_dir/$1; then
2267
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2268
if test -n "$file_magic_test_file"; then
2269
case $deplibs_check_method in
2271
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2272
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2273
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2274
$EGREP "$file_magic_regex" > /dev/null; then
2279
*** Warning: the command libtool uses to detect shared libraries,
2280
*** $file_magic_cmd, produces output that libtool cannot recognize.
2281
*** The result is that libtool may fail to recognize shared libraries
2282
*** as such. This will affect the creation of libtool libraries that
2283
*** depend on shared libraries, but programs linked with such libtool
2284
*** libraries will work regardless of this problem. Nevertheless, you
2285
*** may want to report the problem to your system manager and/or to
2286
*** bug-libtool@gnu.org
2296
MAGIC_CMD="$lt_save_MAGIC_CMD"
2299
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2300
if test -n "$MAGIC_CMD"; then
2301
AC_MSG_RESULT($MAGIC_CMD)
2305
])# AC_PATH_TOOL_PREFIX
2310
# find a file program which can recognise a shared library
2311
AC_DEFUN([AC_PATH_MAGIC],
2312
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2313
if test -z "$lt_cv_path_MAGIC_CMD"; then
2314
if test -n "$ac_tool_prefix"; then
2315
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2325
# find the path to the GNU or non-GNU linker
2326
AC_DEFUN([AC_PROG_LD],
2327
[AC_ARG_WITH([gnu-ld],
2328
[AC_HELP_STRING([--with-gnu-ld],
2329
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2330
[test "$withval" = no || with_gnu_ld=yes],
2332
AC_REQUIRE([LT_AC_PROG_SED])dnl
2333
AC_REQUIRE([AC_PROG_CC])dnl
2334
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2335
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2337
if test "$GCC" = yes; then
2338
# Check if gcc -print-prog-name=ld gives a path.
2339
AC_MSG_CHECKING([for ld used by $CC])
2342
# gcc leaves a trailing carriage return which upsets mingw
2343
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2345
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2348
# Accept absolute paths.
2349
[[\\/]]* | ?:[[\\/]]*)
2350
re_direlt='/[[^/]][[^/]]*/\.\./'
2351
# Canonicalize the path of ld
2352
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2353
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2354
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2356
test -z "$LD" && LD="$ac_prog"
2359
# If it fails, then pretend we aren't using GCC.
2363
# If it is relative, then search for the first ld in PATH.
2367
elif test "$with_gnu_ld" = yes; then
2368
AC_MSG_CHECKING([for GNU ld])
2370
AC_MSG_CHECKING([for non-GNU ld])
2372
AC_CACHE_VAL(lt_cv_path_LD,
2373
[if test -z "$LD"; then
2374
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2375
for ac_dir in $PATH; do
2377
test -z "$ac_dir" && ac_dir=.
2378
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2379
lt_cv_path_LD="$ac_dir/$ac_prog"
2380
# Check to see if the program is GNU ld. I'd rather use --version,
2381
# but apparently some GNU ld's only accept -v.
2382
# Break only if it was the GNU/non-GNU ld that we prefer.
2383
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2384
*GNU* | *'with BFD'*)
2385
test "$with_gnu_ld" != no && break
2388
test "$with_gnu_ld" != yes && break
2395
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2398
if test -n "$LD"; then
2403
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2410
AC_DEFUN([AC_PROG_LD_GNU],
2411
[AC_REQUIRE([AC_PROG_EGREP])dnl
2412
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2413
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2414
case `$LD -v 2>&1 </dev/null` in
2415
*GNU* | *'with BFD'*)
2416
lt_cv_prog_gnu_ld=yes
2419
lt_cv_prog_gnu_ld=no
2422
with_gnu_ld=$lt_cv_prog_gnu_ld
2426
# AC_PROG_LD_RELOAD_FLAG
2427
# ----------------------
2428
# find reload flag for linker
2429
# -- PORTME Some linkers may need a different reload flag.
2430
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2431
[AC_CACHE_CHECK([for $LD option to reload object files],
2432
lt_cv_ld_reload_flag,
2433
[lt_cv_ld_reload_flag='-r'])
2434
reload_flag=$lt_cv_ld_reload_flag
2435
case $reload_flag in
2437
*) reload_flag=" $reload_flag" ;;
2439
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2440
])# AC_PROG_LD_RELOAD_FLAG
2443
# AC_DEPLIBS_CHECK_METHOD
2444
# -----------------------
2445
# how to check for library dependencies
2446
# -- PORTME fill in with the dynamic library characteristics
2447
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2448
[AC_CACHE_CHECK([how to recognise dependent libraries],
2449
lt_cv_deplibs_check_method,
2450
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2451
lt_cv_file_magic_test_file=
2452
lt_cv_deplibs_check_method='unknown'
2453
# Need to set the preceding variable on all platforms that support
2454
# interlibrary dependencies.
2455
# 'none' -- dependencies not supported.
2456
# `unknown' -- same as none, but documents that we really don't know.
2457
# 'pass_all' -- all dependencies passed with no checks.
2458
# 'test_compile' -- check by making test program.
2459
# 'file_magic [[regex]]' -- check by looking for files in library path
2460
# which responds to the $file_magic_cmd with a given extended regex.
2461
# If you have `file' or equivalent on your system and you're not sure
2462
# whether `pass_all' will *always* work, you probably want this one.
2466
lt_cv_deplibs_check_method=pass_all
2470
lt_cv_deplibs_check_method=pass_all
2474
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2475
lt_cv_file_magic_cmd='/usr/bin/file -L'
2476
lt_cv_file_magic_test_file=/shlib/libc.so
2479
cygwin* | mingw* | pw32*)
2480
# win32_libid is a shell function defined in ltmain.sh
2481
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2482
lt_cv_file_magic_cmd='win32_libid'
2485
darwin* | rhapsody*)
2486
# this will be overwritten by pass_all, but leave it in just in case
2487
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2488
lt_cv_file_magic_cmd='/usr/bin/file -L'
2490
rhapsody* | darwin1.[[012]])
2491
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2494
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2497
lt_cv_deplibs_check_method=pass_all
2501
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2504
# Not sure whether the presence of OpenBSD here was a mistake.
2505
# Let's accept both of them until this is cleared up.
2506
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2507
lt_cv_file_magic_cmd=/usr/bin/file
2508
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2512
lt_cv_deplibs_check_method=pass_all
2517
lt_cv_deplibs_check_method=pass_all
2520
hpux10.20* | hpux11*)
2521
lt_cv_file_magic_cmd=/usr/bin/file
2524
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2525
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2528
[lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2529
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2532
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2533
lt_cv_file_magic_test_file=/usr/lib/libc.sl
2538
irix5* | irix6* | nonstopux*)
2540
irix5* | nonstopux*)
2541
# this will be overridden with pass_all, but let us keep it just in case
2542
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2546
*-32|*"-32 ") libmagic=32-bit;;
2547
*-n32|*"-n32 ") libmagic=N32;;
2548
*-64|*"-64 ") libmagic=64-bit;;
2549
*) libmagic=never-match;;
2551
# this will be overridden with pass_all, but let us keep it just in case
2552
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
2555
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2556
lt_cv_deplibs_check_method=pass_all
2559
# This must be Linux ELF.
2562
alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64*)
2563
lt_cv_deplibs_check_method=pass_all ;;
2565
# glibc up to 2.1.1 does not perform some relocations on ARM
2566
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2568
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2572
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2573
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2575
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2580
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2581
lt_cv_file_magic_cmd=/usr/bin/file
2582
lt_cv_file_magic_test_file=/usr/lib/libnls.so
2586
lt_cv_deplibs_check_method=unknown
2590
lt_cv_file_magic_cmd=/usr/bin/file
2591
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2592
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2593
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2595
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2599
osf3* | osf4* | osf5*)
2600
# this will be overridden with pass_all, but let us keep it just in case
2601
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2602
lt_cv_file_magic_test_file=/shlib/libc.so
2603
lt_cv_deplibs_check_method=pass_all
2607
lt_cv_deplibs_check_method=pass_all
2611
lt_cv_deplibs_check_method=pass_all
2612
lt_cv_file_magic_test_file=/lib/libc.so
2615
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2616
case $host_vendor in
2618
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
2619
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2622
lt_cv_deplibs_check_method=pass_all
2625
lt_cv_file_magic_cmd='/bin/file'
2626
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2629
lt_cv_file_magic_cmd='/bin/file'
2630
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2631
lt_cv_file_magic_test_file=/lib/libc.so
2634
lt_cv_deplibs_check_method=pass_all
2639
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2640
lt_cv_deplibs_check_method=pass_all
2644
file_magic_cmd=$lt_cv_file_magic_cmd
2645
deplibs_check_method=$lt_cv_deplibs_check_method
2646
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2647
])# AC_DEPLIBS_CHECK_METHOD
2652
# find the path to a BSD-compatible name lister
2653
AC_DEFUN([AC_PROG_NM],
2654
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2655
[if test -n "$NM"; then
2656
# Let the user override the test.
2659
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2660
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2662
test -z "$ac_dir" && ac_dir=.
2663
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2664
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2665
# Check to see if the nm accepts a BSD-compat flag.
2666
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2667
# nm: unknown option "B" ignored
2668
# Tru64's nm complains that /dev/null is an invalid object file
2669
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2670
*/dev/null* | *'Invalid file or object type'*)
2671
lt_cv_path_NM="$tmp_nm -B"
2675
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2677
lt_cv_path_NM="$tmp_nm -p"
2681
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2682
continue # so that we can try to find one that supports BSD flags
2689
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2697
# check for math library
2698
AC_DEFUN([AC_CHECK_LIBM],
2699
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2702
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2703
# These system don't have libm, or don't need it
2706
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2707
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2710
AC_CHECK_LIB(m, cos, LIBM="-lm")
2716
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2717
# -----------------------------------
2718
# sets LIBLTDL to the link flags for the libltdl convenience library and
2719
# LTDLINCL to the include flags for the libltdl header and adds
2720
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2721
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2722
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2723
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2724
# '${top_srcdir}/' (note the single quotes!). If your package is not
2725
# flat and you're not using automake, define top_builddir and
2726
# top_srcdir appropriately in the Makefiles.
2727
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2728
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2729
case $enable_ltdl_convenience in
2730
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2731
"") enable_ltdl_convenience=yes
2732
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2734
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2735
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2736
# For backwards non-gettext consistent compatibility...
2738
])# AC_LIBLTDL_CONVENIENCE
2741
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2742
# -----------------------------------
2743
# sets LIBLTDL to the link flags for the libltdl installable library and
2744
# LTDLINCL to the include flags for the libltdl header and adds
2745
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2746
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2747
# DIRECTORY is not provided and an installed libltdl is not found, it is
2748
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2749
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2750
# quotes!). If your package is not flat and you're not using automake,
2751
# define top_builddir and top_srcdir appropriately in the Makefiles.
2752
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2753
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2754
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2755
AC_CHECK_LIB(ltdl, lt_dlinit,
2756
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2757
[if test x"$enable_ltdl_install" = xno; then
2758
AC_MSG_WARN([libltdl not installed, but installation disabled])
2760
enable_ltdl_install=yes
2763
if test x"$enable_ltdl_install" = x"yes"; then
2764
ac_configure_args="$ac_configure_args --enable-ltdl-install"
2765
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2766
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2768
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2772
# For backwards non-gettext consistent compatibility...
2774
])# AC_LIBLTDL_INSTALLABLE
2779
# enable support for C++ libraries
2780
AC_DEFUN([AC_LIBTOOL_CXX],
2781
[AC_REQUIRE([_LT_AC_LANG_CXX])
2787
AC_DEFUN([_LT_AC_LANG_CXX],
2788
[AC_REQUIRE([AC_PROG_CXX])
2789
AC_REQUIRE([AC_PROG_CXXCPP])
2790
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
2796
# enable support for Fortran 77 libraries
2797
AC_DEFUN([AC_LIBTOOL_F77],
2798
[AC_REQUIRE([_LT_AC_LANG_F77])
2804
AC_DEFUN([_LT_AC_LANG_F77],
2805
[AC_REQUIRE([AC_PROG_F77])
2806
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
2812
# enable support for GCJ libraries
2813
AC_DEFUN([AC_LIBTOOL_GCJ],
2814
[AC_REQUIRE([_LT_AC_LANG_GCJ])
2820
AC_DEFUN([_LT_AC_LANG_GCJ],
2821
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2822
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2823
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2824
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2825
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2826
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2827
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
2833
# enable support for Windows resource files
2834
AC_DEFUN([AC_LIBTOOL_RC],
2835
[AC_REQUIRE([LT_AC_PROG_RC])
2836
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
2840
# AC_LIBTOOL_LANG_C_CONFIG
2841
# ------------------------
2842
# Ensure that the configuration vars for the C compiler are
2843
# suitably defined. Those variables are subsequently used by
2844
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2845
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2846
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2850
# Source file extension for C test sources.
2853
# Object file extension for compiled C test sources.
2855
_LT_AC_TAGVAR(objext, $1)=$objext
2857
# Code to be used in simple compile tests
2858
lt_simple_compile_test_code="int some_variable = 0;\n"
2860
# Code to be used in simple link tests
2861
lt_simple_link_test_code='int main(){return(0);}\n'
2866
# Check for any special shared library compilation flags.
2868
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2869
if test "$GCC" = no; then
2872
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2876
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2877
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2878
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
2880
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2881
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2887
# Check to make sure the static flag actually works.
2889
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2890
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2891
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2893
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2896
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2897
AC_LIBTOOL_PROG_COMPILER_PIC($1)
2898
AC_LIBTOOL_PROG_CC_C_O($1)
2899
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2900
AC_LIBTOOL_PROG_LD_SHLIBS($1)
2901
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2902
AC_LIBTOOL_SYS_LIB_STRIP
2903
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2904
AC_LIBTOOL_DLOPEN_SELF($1)
2906
# Report which librarie types wil actually be built
2907
AC_MSG_CHECKING([if libtool supports shared libraries])
2908
AC_MSG_RESULT([$can_build_shared])
2910
AC_MSG_CHECKING([whether to build shared libraries])
2911
test "$can_build_shared" = "no" && enable_shared=no
2913
# On AIX, shared libraries and static libraries use the same namespace, and
2914
# are all built from PIC.
2917
test "$enable_shared" = yes && enable_static=no
2918
if test -n "$RANLIB"; then
2919
archive_cmds="$archive_cmds~\$RANLIB \$lib"
2920
postinstall_cmds='$RANLIB $lib'
2925
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2926
test "$enable_shared" = yes && enable_static=no
2929
darwin* | rhapsody*)
2930
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
2931
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2933
rhapsody* | darwin1.[[012]])
2934
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
2937
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2940
# FIXME: Relying on posixy $() will cause problems for
2941
# cross-compilation, but unfortunately the echo tests do not
2942
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
2943
# `"' quotes if we put them in here... so don't!
2944
output_verbose_link_cmd='echo'
2945
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
2946
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
2947
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2948
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2949
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2950
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2951
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2952
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2953
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2954
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2958
AC_MSG_RESULT([$enable_shared])
2960
AC_MSG_CHECKING([whether to build static libraries])
2961
# Make sure either enable_shared or enable_static is yes.
2962
test "$enable_shared" = yes || enable_static=yes
2963
AC_MSG_RESULT([$enable_static])
2965
AC_LIBTOOL_CONFIG($1)
2969
])# AC_LIBTOOL_LANG_C_CONFIG
2972
# AC_LIBTOOL_LANG_CXX_CONFIG
2973
# --------------------------
2974
# Ensure that the configuration vars for the C compiler are
2975
# suitably defined. Those variables are subsequently used by
2976
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2977
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2978
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2980
AC_REQUIRE([AC_PROG_CXX])
2981
AC_REQUIRE([AC_PROG_CXXCPP])
2983
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2984
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2985
_LT_AC_TAGVAR(always_export_symbols, $1)=no
2986
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2987
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2988
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2989
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2990
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2991
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2992
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2993
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2994
_LT_AC_TAGVAR(module_cmds, $1)=
2995
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2996
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2997
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2998
_LT_AC_TAGVAR(no_undefined_flag, $1)=
2999
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3000
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3002
# Dependencies to place before and after the object being linked:
3003
_LT_AC_TAGVAR(predep_objects, $1)=
3004
_LT_AC_TAGVAR(postdep_objects, $1)=
3005
_LT_AC_TAGVAR(predeps, $1)=
3006
_LT_AC_TAGVAR(postdeps, $1)=
3007
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3009
# Source file extension for C++ test sources.
3012
# Object file extension for compiled C++ test sources.
3014
_LT_AC_TAGVAR(objext, $1)=$objext
3016
# Code to be used in simple compile tests
3017
lt_simple_compile_test_code="int some_variable = 0;\n"
3019
# Code to be used in simple link tests
3020
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3022
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3025
# Allow CC to be a program name with arguments.
3030
lt_save_with_gnu_ld=$with_gnu_ld
3031
lt_save_path_LD=$lt_cv_path_LD
3032
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3033
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3035
unset lt_cv_prog_gnu_ld
3037
if test -n "${lt_cv_path_LDCXX+set}"; then
3038
lt_cv_path_LD=$lt_cv_path_LDCXX
3042
test -z "${LDCXX+set}" || LD=$LDCXX
3045
_LT_AC_TAGVAR(compiler, $1)=$CC
3046
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3048
# We don't want -fno-exception wen compiling C++ code, so set the
3049
# no_builtin_flag separately
3050
if test "$GXX" = yes; then
3051
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3053
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3056
if test "$GXX" = yes; then
3057
# Set up default GNU C++ configuration
3061
# Check if GNU C++ uses GNU ld as the underlying linker, since the
3062
# archiving commands below assume that GNU ld is being used.
3063
if test "$with_gnu_ld" = yes; then
3064
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3065
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3067
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3068
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3070
# If archive_cmds runs LD, not CC, wlarc should be empty
3071
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3072
# investigate it a little bit more. (MM)
3075
# ancient GNU ld didn't support --whole-archive et. al.
3076
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3077
grep 'no-whole-archive' > /dev/null; then
3078
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3080
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3086
# A generic and very simple default shared library creation
3087
# command for GNU C++ for the case where it uses the native
3088
# linker, instead of GNU ld. If possible, this setting should
3089
# overridden to take advantage of the native linker features on
3090
# the platform it is being used on.
3091
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3094
# Commands to make compiler produce verbose output that lists
3095
# what "hidden" libraries, object files and flags are used when
3096
# linking a shared library.
3097
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3105
# PORTME: fill in a description of your system's C++ link characteristics
3106
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3107
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3110
# FIXME: insert proper C++ library support
3111
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3114
if test "$host_cpu" = ia64; then
3115
# On IA64, the linker does run time linking by default, so we don't
3116
# have to do anything special.
3117
aix_use_runtimelinking=no
3118
exp_sym_flag='-Bexport'
3121
aix_use_runtimelinking=no
3123
# Test if we are trying to use run time linking or normal
3124
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
3125
# need to do runtime linking.
3126
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3127
for ld_flag in $LDFLAGS; do
3130
aix_use_runtimelinking=yes
3137
exp_sym_flag='-bexport'
3138
no_entry_flag='-bnoentry'
3141
# When large executables or shared objects are built, AIX ld can
3142
# have problems creating the table of contents. If linking a library
3143
# or program results in "error TOC overflow" add -mminimal-toc to
3144
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3145
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3147
_LT_AC_TAGVAR(archive_cmds, $1)=''
3148
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3149
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3150
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3152
if test "$GXX" = yes; then
3153
case $host_os in aix4.[012]|aix4.[012].*)
3154
# We only want to do this on AIX 4.2 and lower, the check
3155
# below for broken collect2 doesn't work under 4.3+
3156
collect2name=`${CC} -print-prog-name=collect2`
3157
if test -f "$collect2name" && \
3158
strings "$collect2name" | grep resolve_lib_name >/dev/null
3160
# We have reworked collect2
3161
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3163
# We have old collect2
3164
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3165
# It fails to find uninstalled libraries when the uninstalled
3166
# path is not listed in the libpath. Setting hardcode_minus_L
3167
# to unsupported forces relinking
3168
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3169
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3170
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3173
shared_flag='-shared'
3176
if test "$host_cpu" = ia64; then
3177
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3178
# chokes on -Wl,-G. The following line is correct:
3181
if test "$aix_use_runtimelinking" = yes; then
3182
shared_flag='${wl}-G'
3184
shared_flag='${wl}-bM:SRE'
3189
# It seems that -bexpall does not export symbols beginning with
3190
# underscore (_), so it is better to generate a list of symbols to export.
3191
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3192
if test "$aix_use_runtimelinking" = yes; then
3193
# Warning - without using the other runtime loading flags (-brtl),
3194
# -berok will link without error, but may produce a broken library.
3195
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3196
# Determine the default libpath from the value encoded in an empty executable.
3197
_LT_AC_SYS_LIBPATH_AIX
3198
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3200
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3202
if test "$host_cpu" = ia64; then
3203
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3204
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3205
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3207
# Determine the default libpath from the value encoded in an empty executable.
3208
_LT_AC_SYS_LIBPATH_AIX
3209
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3210
# Warning - without using the other run time loading flags,
3211
# -berok will link without error, but may produce a broken library.
3212
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3213
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3214
# -bexpall does not export symbols beginning with underscore (_)
3215
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3216
# Exported symbols can be pulled into shared objects from archives
3217
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3218
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3219
# This is similar to how AIX traditionally builds it's shared libraries.
3220
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3225
case $cc_basename in
3227
# FIXME: insert proper C++ library support
3228
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3233
cygwin* | mingw* | pw32*)
3234
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3235
# as there is no search path for DLLs.
3236
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3237
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3238
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3239
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3241
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3242
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3243
# If the export-symbols file already is a .def file (1st line
3244
# is EXPORTS), use it as is; otherwise, prepend...
3245
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3246
cp $export_symbols $output_objdir/$soname.def;
3248
echo EXPORTS > $output_objdir/$soname.def;
3249
cat $export_symbols >> $output_objdir/$soname.def;
3251
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3253
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3257
darwin* | rhapsody*)
3258
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
3259
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3261
rhapsody* | darwin1.[[012]])
3262
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3265
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3268
lt_int_apple_cc_single_mod=no
3269
output_verbose_link_cmd='echo'
3270
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3271
lt_int_apple_cc_single_mod=yes
3273
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3274
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3276
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3278
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
3280
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3281
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3282
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3284
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3286
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3287
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3288
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3289
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3290
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3291
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3296
case $cc_basename in
3298
# FIXME: insert proper C++ library support
3299
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3302
# Green Hills C++ Compiler
3303
# FIXME: insert proper C++ library support
3304
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3307
# FIXME: insert proper C++ library support
3308
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3313
# C++ shared libraries reported to be fairly broken before switch to ELF
3314
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3317
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3320
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3322
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3327
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3328
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3329
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3330
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3331
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3332
# but as the default
3333
# location of the library.
3335
case $cc_basename in
3337
# FIXME: insert proper C++ library support
3338
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3341
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3342
# Commands to make compiler produce verbose output that lists
3343
# what "hidden" libraries, object files and flags are used when
3344
# linking a shared library.
3346
# There doesn't appear to be a way to prevent this compiler from
3347
# explicitly linking system object files so we need to strip them
3348
# from the output so that they don't get included in the library
3350
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3353
if test "$GXX" = yes; then
3354
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3356
# FIXME: insert proper C++ library support
3357
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3363
if test $with_gnu_ld = no; then
3366
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3367
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3368
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3371
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3374
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3375
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3376
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3382
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3383
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3386
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3387
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3388
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3389
# but as the default
3390
# location of the library.
3393
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3394
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3395
# but as the default
3396
# location of the library.
3400
case $cc_basename in
3402
# FIXME: insert proper C++ library support
3403
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3408
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3411
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3414
# Commands to make compiler produce verbose output that lists
3415
# what "hidden" libraries, object files and flags are used when
3416
# linking a shared library.
3418
# There doesn't appear to be a way to prevent this compiler from
3419
# explicitly linking system object files so we need to strip them
3420
# from the output so that they don't get included in the library
3422
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3425
if test "$GXX" = yes; then
3426
if test $with_gnu_ld = no; then
3429
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3432
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3437
# FIXME: insert proper C++ library support
3438
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3444
case $cc_basename in
3447
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3449
# Archives containing C++ object files must be created using
3450
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
3451
# necessary to make sure instantiated templates are included
3453
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3456
if test "$GXX" = yes; then
3457
if test "$with_gnu_ld" = no; then
3458
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3460
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3463
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3466
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3467
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3470
case $cc_basename in
3472
# Kuck and Associates, Inc. (KAI) C++ Compiler
3474
# KCC will only create a shared library if the output file
3475
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3476
# to its proper name (with version) after linking.
3477
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3478
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3479
# Commands to make compiler produce verbose output that lists
3480
# what "hidden" libraries, object files and flags are used when
3481
# linking a shared library.
3483
# There doesn't appear to be a way to prevent this compiler from
3484
# explicitly linking system object files so we need to strip them
3485
# from the output so that they don't get included in the library
3487
output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3489
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3490
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3492
# Archives containing C++ object files must be created using
3493
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3494
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3499
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3500
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3501
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3502
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3503
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3504
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3508
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3509
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3511
runpath_var=LD_RUN_PATH
3512
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3513
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3515
# Commands to make compiler produce verbose output that lists
3516
# what "hidden" libraries, object files and flags are used when
3517
# linking a shared library.
3519
# There doesn't appear to be a way to prevent this compiler from
3520
# explicitly linking system object files so we need to strip them
3521
# from the output so that they don't get included in the library
3523
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3528
# FIXME: insert proper C++ library support
3529
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3532
# FIXME: insert proper C++ library support
3533
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3536
case $cc_basename in
3538
# FIXME: insert proper C++ library support
3539
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3542
# FIXME: insert proper C++ library support
3543
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3548
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3549
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3551
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3552
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3553
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3555
# Workaround some broken pre-1.5 toolchains
3556
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3559
case $cc_basename in
3561
# Kuck and Associates, Inc. (KAI) C++ Compiler
3563
# KCC will only create a shared library if the output file
3564
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3565
# to its proper name (with version) after linking.
3566
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3568
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3569
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3571
# Archives containing C++ object files must be created using
3572
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3573
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3577
# Rational C++ 2.4.1
3578
# FIXME: insert proper C++ library support
3579
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3582
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3583
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3585
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3586
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3588
# Commands to make compiler produce verbose output that lists
3589
# what "hidden" libraries, object files and flags are used when
3590
# linking a shared library.
3592
# There doesn't appear to be a way to prevent this compiler from
3593
# explicitly linking system object files so we need to strip them
3594
# from the output so that they don't get included in the library
3596
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3599
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3600
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3601
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3603
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3604
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3606
# Commands to make compiler produce verbose output that lists
3607
# what "hidden" libraries, object files and flags are used when
3608
# linking a shared library.
3609
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3612
# FIXME: insert proper C++ library support
3613
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3619
case $cc_basename in
3621
# Kuck and Associates, Inc. (KAI) C++ Compiler
3623
# KCC will only create a shared library if the output file
3624
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3625
# to its proper name (with version) after linking.
3626
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3628
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3629
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3631
# Archives containing C++ object files must be created using
3632
# the KAI C++ compiler.
3633
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3636
# Rational C++ 2.4.1
3637
# FIXME: insert proper C++ library support
3638
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3641
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3642
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3643
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3644
echo "-hidden">> $lib.exp~
3645
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
3648
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3649
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3651
# Commands to make compiler produce verbose output that lists
3652
# what "hidden" libraries, object files and flags are used when
3653
# linking a shared library.
3655
# There doesn't appear to be a way to prevent this compiler from
3656
# explicitly linking system object files so we need to strip them
3657
# from the output so that they don't get included in the library
3659
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3662
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3663
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3664
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3666
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3667
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3669
# Commands to make compiler produce verbose output that lists
3670
# what "hidden" libraries, object files and flags are used when
3671
# linking a shared library.
3672
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3675
# FIXME: insert proper C++ library support
3676
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3682
# FIXME: insert proper C++ library support
3683
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3686
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3687
case $cc_basename in
3689
# FIXME: insert proper C++ library support
3690
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3693
# FIXME: insert proper C++ library support
3694
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3699
case $cc_basename in
3702
# FIXME: insert proper C++ library support
3703
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3707
# FIXME: insert proper C++ library support
3708
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3711
# FIXME: insert proper C++ library support
3712
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3717
case $cc_basename in
3719
# Sun C++ 4.2, 5.x and Centerline C++
3720
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3721
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3722
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3723
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3725
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3726
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3728
solaris2.[0-5] | solaris2.[0-5].*) ;;
3730
# The C++ compiler is used as linker so we must use $wl
3731
# flag to pass the commands to the underlying system
3733
# Supported since Solaris 2.6 (maybe 2.5.1?)
3734
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3737
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3739
# Commands to make compiler produce verbose output that lists
3740
# what "hidden" libraries, object files and flags are used when
3741
# linking a shared library.
3743
# There doesn't appear to be a way to prevent this compiler from
3744
# explicitly linking system object files so we need to strip them
3745
# from the output so that they don't get included in the library
3747
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3749
# Archives containing C++ object files must be created using
3750
# "CC -xar", where "CC" is the Sun C++ compiler. This is
3751
# necessary to make sure instantiated templates are included
3753
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3756
# Green Hills C++ Compiler
3757
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3759
# The C++ compiler must be used to create the archive.
3760
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3763
# GNU C++ compiler with Solaris linker
3764
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3765
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3766
if $CC --version | grep -v '^2\.7' > /dev/null; then
3767
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3768
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3769
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3771
# Commands to make compiler produce verbose output that lists
3772
# what "hidden" libraries, object files and flags are used when
3773
# linking a shared library.
3774
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3776
# g++ 2.7 appears to require `-G' NOT `-shared' on this
3778
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3779
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3780
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3782
# Commands to make compiler produce verbose output that lists
3783
# what "hidden" libraries, object files and flags are used when
3784
# linking a shared library.
3785
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3788
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3793
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3794
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3797
case $cc_basename in
3799
# NonStop-UX NCC 3.20
3800
# FIXME: insert proper C++ library support
3801
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3804
# FIXME: insert proper C++ library support
3805
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3810
# FIXME: insert proper C++ library support
3811
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3814
# FIXME: insert proper C++ library support
3815
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3818
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3819
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3821
_LT_AC_TAGVAR(GCC, $1)="$GXX"
3822
_LT_AC_TAGVAR(LD, $1)="$LD"
3824
AC_LIBTOOL_POSTDEP_PREDEP($1)
3825
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3826
AC_LIBTOOL_PROG_CC_C_O($1)
3827
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3828
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3829
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3830
AC_LIBTOOL_SYS_LIB_STRIP
3831
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3832
AC_LIBTOOL_DLOPEN_SELF($1)
3834
AC_LIBTOOL_CONFIG($1)
3841
with_gnu_ldcxx=$with_gnu_ld
3842
with_gnu_ld=$lt_save_with_gnu_ld
3843
lt_cv_path_LDCXX=$lt_cv_path_LD
3844
lt_cv_path_LD=$lt_save_path_LD
3845
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3846
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3847
])# AC_LIBTOOL_LANG_CXX_CONFIG
3849
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3850
# ------------------------
3851
# Figure out "hidden" library dependencies from verbose
3852
# compiler output when linking a shared library.
3853
# Parse the compiler output and extract the necessary
3854
# objects, libraries and library flags.
3855
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3856
dnl we can't use the lt_simple_compile_test_code here,
3857
dnl because it contains code intended for an executable,
3858
dnl not a library. It's possible we should let each
3859
dnl tag define a new lt_????_link_test_code variable,
3860
dnl but it's only used here...
3861
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3863
void foo (void) { a = 0; }
3865
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3869
Foo (void) { a = 0; }
3874
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3882
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3885
public void bar (void) {
3891
dnl Parse the compiler output and extract the necessary
3892
dnl objects, libraries and library flags.
3893
if AC_TRY_EVAL(ac_compile); then
3894
# Parse the compiler output and extract the necessary
3895
# objects, libraries and library flags.
3897
# Sentinel used to keep track of whether or not we are before
3898
# the conftest object file.
3899
pre_test_object_deps_done=no
3901
# The `*' in the case matches for architectures that use `case' in
3902
# $output_verbose_cmd can trigger glob expansion during the loop
3903
# eval without this substitution.
3904
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3906
for p in `eval $output_verbose_link_cmd`; do
3910
# Some compilers place space between "-{L,R}" and the path.
3913
|| test $p = "-R"; then
3920
if test "$pre_test_object_deps_done" = no; then
3923
# Internal compiler library paths should come after those
3924
# provided the user. The postdeps already come after the
3925
# user supplied libs so there is no need to process them.
3926
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3927
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3929
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3932
# The "-l" case would never come before the object being
3933
# linked, so don't bother handling this case.
3936
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3937
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3939
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3945
# This assumes that the test object file only shows up
3946
# once in the compiler output.
3947
if test "$p" = "conftest.$objext"; then
3948
pre_test_object_deps_done=yes
3952
if test "$pre_test_object_deps_done" = no; then
3953
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3954
_LT_AC_TAGVAR(predep_objects, $1)="$p"
3956
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3959
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3960
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
3962
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3967
*) ;; # Ignore the rest.
3975
echo "libtool.m4: error: problem compiling $1 test program"
3978
$rm -f confest.$objext
3980
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3981
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3983
])# AC_LIBTOOL_POSTDEP_PREDEP
3985
# AC_LIBTOOL_LANG_F77_CONFIG
3986
# ------------------------
3987
# Ensure that the configuration vars for the C compiler are
3988
# suitably defined. Those variables are subsequently used by
3989
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3990
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3991
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3992
[AC_REQUIRE([AC_PROG_F77])
3993
AC_LANG_PUSH(Fortran 77)
3995
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3996
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3997
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3998
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3999
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4000
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4001
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4002
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4003
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4004
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4005
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4006
_LT_AC_TAGVAR(module_cmds, $1)=
4007
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4008
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4009
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4010
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4011
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4012
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4014
# Source file extension for f77 test sources.
4017
# Object file extension for compiled f77 test sources.
4019
_LT_AC_TAGVAR(objext, $1)=$objext
4021
# Code to be used in simple compile tests
4022
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4024
# Code to be used in simple link tests
4025
lt_simple_link_test_code=" program t\n end\n"
4027
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4030
# Allow CC to be a program name with arguments.
4034
_LT_AC_TAGVAR(compiler, $1)=$CC
4035
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4037
AC_MSG_CHECKING([if libtool supports shared libraries])
4038
AC_MSG_RESULT([$can_build_shared])
4040
AC_MSG_CHECKING([whether to build shared libraries])
4041
test "$can_build_shared" = "no" && enable_shared=no
4043
# On AIX, shared libraries and static libraries use the same namespace, and
4044
# are all built from PIC.
4047
test "$enable_shared" = yes && enable_static=no
4048
if test -n "$RANLIB"; then
4049
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4050
postinstall_cmds='$RANLIB $lib'
4054
test "$enable_shared" = yes && enable_static=no
4057
AC_MSG_RESULT([$enable_shared])
4059
AC_MSG_CHECKING([whether to build static libraries])
4060
# Make sure either enable_shared or enable_static is yes.
4061
test "$enable_shared" = yes || enable_static=yes
4062
AC_MSG_RESULT([$enable_static])
4064
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4066
_LT_AC_TAGVAR(GCC, $1)="$G77"
4067
_LT_AC_TAGVAR(LD, $1)="$LD"
4069
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4070
AC_LIBTOOL_PROG_CC_C_O($1)
4071
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4072
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4073
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4074
AC_LIBTOOL_SYS_LIB_STRIP
4075
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4077
AC_LIBTOOL_CONFIG($1)
4081
])# AC_LIBTOOL_LANG_F77_CONFIG
4084
# AC_LIBTOOL_LANG_GCJ_CONFIG
4085
# --------------------------
4086
# Ensure that the configuration vars for the C compiler are
4087
# suitably defined. Those variables are subsequently used by
4088
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4089
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4090
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4093
# Source file extension for Java test sources.
4096
# Object file extension for compiled Java test sources.
4098
_LT_AC_TAGVAR(objext, $1)=$objext
4100
# Code to be used in simple compile tests
4101
lt_simple_compile_test_code="class foo {}\n"
4103
# Code to be used in simple link tests
4104
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4106
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4109
# Allow CC to be a program name with arguments.
4113
_LT_AC_TAGVAR(compiler, $1)=$CC
4115
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4116
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4118
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4119
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4120
AC_LIBTOOL_PROG_CC_C_O($1)
4121
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4122
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4123
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4124
AC_LIBTOOL_SYS_LIB_STRIP
4125
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4126
AC_LIBTOOL_DLOPEN_SELF($1)
4128
AC_LIBTOOL_CONFIG($1)
4132
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4135
# AC_LIBTOOL_LANG_RC_CONFIG
4136
# --------------------------
4137
# Ensure that the configuration vars for the Windows resource compiler are
4138
# suitably defined. Those variables are subsequently used by
4139
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4140
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4141
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4144
# Source file extension for RC test sources.
4147
# Object file extension for compiled RC test sources.
4149
_LT_AC_TAGVAR(objext, $1)=$objext
4151
# Code to be used in simple compile tests
4152
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4154
# Code to be used in simple link tests
4155
lt_simple_link_test_code="$lt_simple_compile_test_code"
4157
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4160
# Allow CC to be a program name with arguments.
4164
_LT_AC_TAGVAR(compiler, $1)=$CC
4165
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4167
AC_LIBTOOL_CONFIG($1)
4171
])# AC_LIBTOOL_LANG_RC_CONFIG
4174
# AC_LIBTOOL_CONFIG([TAGNAME])
4175
# ----------------------------
4176
# If TAGNAME is not passed, then create an initial libtool script
4177
# with a default configuration from the untagged config vars. Otherwise
4178
# add code to config.status for appending the configuration named by
4179
# TAGNAME from the matching tagged config vars.
4180
AC_DEFUN([AC_LIBTOOL_CONFIG],
4181
[# The else clause should only fire when bootstrapping the
4182
# libtool distribution, otherwise you forgot to ship ltmain.sh
4183
# with your package, and you will get complaints that there are
4184
# no rules to generate ltmain.sh.
4185
if test -f "$ltmain"; then
4186
# See if we are running on zsh, and set the options which allow our commands through
4187
# without removal of \ escapes.
4188
if test -n "${ZSH_VERSION+set}" ; then
4189
setopt NO_GLOB_SUBST
4191
# Now quote all the things that may contain metacharacters while being
4192
# careful not to overquote the AC_SUBSTed values. We take copies of the
4193
# variables and quote the copies for generation of the libtool script.
4194
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
4195
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4196
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4197
deplibs_check_method reload_flag reload_cmds need_locks \
4198
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4199
lt_cv_sys_global_symbol_to_c_name_address \
4200
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4201
old_postinstall_cmds old_postuninstall_cmds \
4202
_LT_AC_TAGVAR(compiler, $1) \
4203
_LT_AC_TAGVAR(CC, $1) \
4204
_LT_AC_TAGVAR(LD, $1) \
4205
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4206
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4207
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4208
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4209
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4210
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4211
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4212
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4213
_LT_AC_TAGVAR(old_archive_cmds, $1) \
4214
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4215
_LT_AC_TAGVAR(predep_objects, $1) \
4216
_LT_AC_TAGVAR(postdep_objects, $1) \
4217
_LT_AC_TAGVAR(predeps, $1) \
4218
_LT_AC_TAGVAR(postdeps, $1) \
4219
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4220
_LT_AC_TAGVAR(archive_cmds, $1) \
4221
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4222
_LT_AC_TAGVAR(postinstall_cmds, $1) \
4223
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
4224
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4225
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
4226
_LT_AC_TAGVAR(no_undefined_flag, $1) \
4227
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
4228
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4229
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4230
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4231
_LT_AC_TAGVAR(hardcode_automatic, $1) \
4232
_LT_AC_TAGVAR(module_cmds, $1) \
4233
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
4234
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4235
_LT_AC_TAGVAR(exclude_expsyms, $1) \
4236
_LT_AC_TAGVAR(include_expsyms, $1); do
4239
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
4240
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4241
_LT_AC_TAGVAR(archive_cmds, $1) | \
4242
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4243
_LT_AC_TAGVAR(module_cmds, $1) | \
4244
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4245
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4246
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4247
extract_expsyms_cmds | reload_cmds | finish_cmds | \
4248
postinstall_cmds | postuninstall_cmds | \
4249
old_postinstall_cmds | old_postuninstall_cmds | \
4250
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4251
# Double-quote double-evaled strings.
4252
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4255
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4261
*'\[$]0 --fallback-echo"')
4262
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4267
[cfgfile="${ofile}T"
4268
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4270
AC_MSG_NOTICE([creating $ofile])],
4273
cat <<__EOF__ >> "$cfgfile"
4277
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4278
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4279
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4281
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4282
# Free Software Foundation, Inc.
4284
# This file is part of GNU Libtool:
4285
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4287
# This program is free software; you can redistribute it and/or modify
4288
# it under the terms of the GNU General Public License as published by
4289
# the Free Software Foundation; either version 2 of the License, or
4290
# (at your option) any later version.
4292
# This program is distributed in the hope that it will be useful, but
4293
# WITHOUT ANY WARRANTY; without even the implied warranty of
4294
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4295
# General Public License for more details.
4297
# You should have received a copy of the GNU General Public License
4298
# along with this program; if not, write to the Free Software
4299
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4301
# As a special exception to the GNU General Public License, if you
4302
# distribute this file as part of a program that contains a
4303
# configuration script generated by Autoconf, you may include it under
4304
# the same distribution terms that you use for the rest of that program.
4306
# A sed program that does not truncate output.
4309
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4310
Xsed="$SED -e s/^X//"
4312
# The HP-UX ksh and POSIX shell print the target directory to stdout
4314
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4316
# The names of the tagged configurations supported by this script.
4319
# ### BEGIN LIBTOOL CONFIG],
4320
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4322
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4324
# Shell to use when invoking shell scripts.
4327
# Whether or not to build shared libraries.
4328
build_libtool_libs=$enable_shared
4330
# Whether or not to build static libraries.
4331
build_old_libs=$enable_static
4333
# Whether or not to add -lc for building shared libraries.
4334
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4336
# Whether or not to disallow shared libs when runtime libs are static
4337
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4339
# Whether or not to optimize for fast installation.
4340
fast_install=$enable_fast_install
4343
host_alias=$host_alias
4346
# An echo program that does not interpret backslashes.
4351
AR_FLAGS=$lt_AR_FLAGS
4356
# A language-specific compiler.
4357
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4359
# Is the compiler the GNU C compiler?
4360
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4365
# The linker used to build libraries.
4366
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4368
# Whether we need hard or soft links.
4371
# A BSD-compatible nm program.
4374
# A symbol stripping program
4377
# Used to examine libraries when file_magic_cmd begins "file"
4378
MAGIC_CMD=$MAGIC_CMD
4380
# Used on cygwin: DLL creation program.
4383
# Used on cygwin: object dumper.
4386
# Used on cygwin: assembler.
4389
# The name of the directory that contains temporary libtool files.
4392
# How to create reloadable object files.
4393
reload_flag=$lt_reload_flag
4394
reload_cmds=$lt_reload_cmds
4396
# How to pass a linker flag through the compiler.
4397
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4399
# Object file suffix (normally "o").
4402
# Old archive suffix (normally "a").
4405
# Shared library suffix (normally ".so").
4408
# Executable file suffix (normally "").
4411
# Additional compiler flags for building library objects.
4412
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4415
# What is the maximum length of a command?
4416
max_cmd_len=$lt_cv_sys_max_cmd_len
4418
# Does compiler simultaneously support -c and -o options?
4419
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4421
# Must we lock files when doing compilation ?
4422
need_locks=$lt_need_locks
4424
# Do we need the lib prefix for modules?
4425
need_lib_prefix=$need_lib_prefix
4427
# Do we need a version for libraries?
4428
need_version=$need_version
4430
# Whether dlopen is supported.
4431
dlopen_support=$enable_dlopen
4433
# Whether dlopen of programs is supported.
4434
dlopen_self=$enable_dlopen_self
4436
# Whether dlopen of statically linked programs is supported.
4437
dlopen_self_static=$enable_dlopen_self_static
4439
# Compiler flag to prevent dynamic linking.
4440
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4442
# Compiler flag to turn off builtin functions.
4443
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4445
# Compiler flag to allow reflexive dlopens.
4446
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4448
# Compiler flag to generate shared objects directly from archives.
4449
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4451
# Compiler flag to generate thread-safe objects.
4452
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4454
# Library versioning type.
4455
version_type=$version_type
4457
# Format of library name prefix.
4458
libname_spec=$lt_libname_spec
4460
# List of archive names. First name is the real one, the rest are links.
4461
# The last name is the one that the linker finds with -lNAME.
4462
library_names_spec=$lt_library_names_spec
4464
# The coded name of the library, if different from the real name.
4465
soname_spec=$lt_soname_spec
4467
# Commands used to build and install an old-style archive.
4469
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4470
old_postinstall_cmds=$lt_old_postinstall_cmds
4471
old_postuninstall_cmds=$lt_old_postuninstall_cmds
4473
# Create an old-style archive from a shared archive.
4474
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4476
# Create a temporary old-style archive to link instead of a shared archive.
4477
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4479
# Commands used to build and install a shared archive.
4480
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4481
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4482
postinstall_cmds=$lt_postinstall_cmds
4483
postuninstall_cmds=$lt_postuninstall_cmds
4485
# Commands used to build a loadable module (assumed same as above if empty)
4486
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4487
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4489
# Commands to strip libraries.
4490
old_striplib=$lt_old_striplib
4491
striplib=$lt_striplib
4493
# Dependencies to place before the objects being linked to create a
4495
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4497
# Dependencies to place after the objects being linked to create a
4499
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4501
# Dependencies to place before the objects being linked to create a
4503
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4505
# Dependencies to place after the objects being linked to create a
4507
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4509
# The library search path used internally by the compiler when linking
4511
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4513
# Method to check whether dependent libraries are shared objects.
4514
deplibs_check_method=$lt_deplibs_check_method
4516
# Command to use when deplibs_check_method == file_magic.
4517
file_magic_cmd=$lt_file_magic_cmd
4519
# Flag that allows shared libraries with undefined symbols to be built.
4520
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4522
# Flag that forces no undefined symbols.
4523
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4525
# Commands used to finish a libtool library installation in a directory.
4526
finish_cmds=$lt_finish_cmds
4528
# Same as above, but a single script fragment to be evaled but not shown.
4529
finish_eval=$lt_finish_eval
4531
# Take the output of nm and produce a listing of raw symbols and C names.
4532
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4534
# Transform the output of nm in a proper C declaration
4535
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4537
# Transform the output of nm in a C name address pair
4538
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4540
# This is the shared library runtime path variable.
4541
runpath_var=$runpath_var
4543
# This is the shared library path variable.
4544
shlibpath_var=$shlibpath_var
4546
# Is shlibpath searched before the hard-coded library search path?
4547
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4549
# How to hardcode a shared library path into an executable.
4550
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4552
# Whether we should hardcode library paths into libraries.
4553
hardcode_into_libs=$hardcode_into_libs
4555
# Flag to hardcode \$libdir into a binary during linking.
4556
# This must work even if \$libdir does not exist.
4557
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4559
# If ld is used when linking, flag to hardcode \$libdir into
4560
# a binary during linking. This must work even if \$libdir does
4562
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4564
# Whether we need a single -rpath flag with a separated argument.
4565
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4567
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4569
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4571
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4573
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4575
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4576
# the resulting binary.
4577
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4579
# Set to yes if building a shared library automatically hardcodes DIR into the library
4580
# and all subsequent libraries and executables linked against it.
4581
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4583
# Variables whose values should be saved in libtool wrapper scripts and
4584
# restored at relink time.
4585
variables_saved_for_relink="$variables_saved_for_relink"
4587
# Whether libtool must link a program against all its dependency libraries.
4588
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4590
# Compile-time system search path for libraries
4591
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4593
# Run-time system search path for libraries
4594
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4596
# Fix the shell variable \$srcfile for the compiler.
4597
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4599
# Set to yes if exported symbols are required.
4600
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4602
# The commands to list exported symbols.
4603
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4605
# The commands to extract the exported symbol list from a shared archive.
4606
extract_expsyms_cmds=$lt_extract_expsyms_cmds
4608
# Symbols that should not be listed in the preloaded symbols.
4609
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4611
# Symbols that must always be exported.
4612
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4615
[# ### END LIBTOOL CONFIG],
4616
[# ### END LIBTOOL TAG CONFIG: $tagname])
4623
cat <<\EOF >> "$cfgfile"
4625
# AIX sometimes has problems with the GCC collect2 program. For some
4626
# reason, if we set the COLLECT_NAMES environment variable, the problems
4627
# vanish in a puff of smoke.
4628
if test "X${COLLECT_NAMES+set}" != Xset; then
4630
export COLLECT_NAMES
4636
# We use sed instead of cat because bash on DJGPP gets confused if
4637
# if finds mixed CR/LF and LF-only lines. Since sed operates in
4638
# text mode, it properly converts lines to CR/LF. This bash problem
4639
# is reportedly fixed, but why not run on old versions too?
4640
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4642
mv -f "$cfgfile" "$ofile" || \
4643
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4647
# If there is no Makefile yet, we rely on a make rule to execute
4648
# `config.status --recheck' to rerun these tests and create the
4649
# libtool script then.
4650
test -f Makefile && make "$ltmain"
4652
])# AC_LIBTOOL_CONFIG
4655
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4656
# -------------------------------------------
4657
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4658
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4660
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4662
if test "$GCC" = yes; then
4663
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4665
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4666
lt_cv_prog_compiler_rtti_exceptions,
4667
[-fno-rtti -fno-exceptions], [],
4668
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4670
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4673
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4674
# ---------------------------------
4675
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4676
[AC_REQUIRE([AC_CANONICAL_HOST])
4677
AC_REQUIRE([AC_PROG_NM])
4678
AC_REQUIRE([AC_OBJEXT])
4679
# Check for command to grab the raw symbol name followed by C symbol from nm.
4680
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4681
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4683
# These are sane defaults that work on at least a few old systems.
4684
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4686
# Character class describing NM global symbol codes.
4687
symcode='[[BCDEGRST]]'
4689
# Regexp to match symbols that can be accessed directly from C.
4690
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4692
# Transform the above into a raw symbol and a C symbol.
4693
symxfrm='\1 \2\3 \3'
4695
# Transform an extracted symbol line into a proper C declaration
4696
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4698
# Transform an extracted symbol line into symbol name and symbol address
4699
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4701
# Define system-specific variables.
4706
cygwin* | mingw* | pw32*)
4707
symcode='[[ABCDGISTW]]'
4709
hpux*) # Its linker distinguishes data from code symbols
4710
if test "$host_cpu" = ia64; then
4711
symcode='[[ABCDEGRST]]'
4713
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4714
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4717
symcode='[[BCDEGRST]]'
4720
symcode='[[BCDEGQRST]]'
4726
symcode='[[DFNSTU]]'
4730
# Handle CRLF in mingw tool chain
4734
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4738
# If we're using GNU nm, then use its standard symbol codes.
4739
case `$NM -V 2>&1` in
4740
*GNU* | *'with BFD'*)
4741
symcode='[[ABCDGIRSTW]]' ;;
4744
# Try without a prefix undercore, then with it.
4745
for ac_symprfx in "" "_"; do
4747
# Write the raw and C identifiers.
4748
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4750
# Check to see that the pipe works correctly.
4754
cat > conftest.$ac_ext <<EOF
4759
void nm_test_func(){}
4763
int main(){nm_test_var='a';nm_test_func();return(0);}
4766
if AC_TRY_EVAL(ac_compile); then
4767
# Now try to grab the symbols.
4769
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4770
# Try sorting and uniquifying the output.
4771
if sort "$nlist" | uniq > "$nlist"T; then
4772
mv -f "$nlist"T "$nlist"
4777
# Make sure that we snagged all the symbols we need.
4778
if grep ' nm_test_var$' "$nlist" >/dev/null; then
4779
if grep ' nm_test_func$' "$nlist" >/dev/null; then
4780
cat <<EOF > conftest.$ac_ext
4786
# Now generate the symbol file.
4787
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4789
cat <<EOF >> conftest.$ac_ext
4790
#if defined (__STDC__) && __STDC__
4791
# define lt_ptr_t void *
4793
# define lt_ptr_t char *
4797
/* The mapping between symbol names and symbols. */
4802
lt_preloaded_symbols[[]] =
4805
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4806
cat <<\EOF >> conftest.$ac_ext
4814
# Now try linking the two files.
4815
mv conftest.$ac_objext conftstm.$ac_objext
4816
lt_save_LIBS="$LIBS"
4817
lt_save_CFLAGS="$CFLAGS"
4818
LIBS="conftstm.$ac_objext"
4819
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4820
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4823
LIBS="$lt_save_LIBS"
4824
CFLAGS="$lt_save_CFLAGS"
4826
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4829
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4832
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4835
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4836
cat conftest.$ac_ext >&5
4838
rm -f conftest* conftst*
4840
# Do not use the global_symbol_pipe unless it works.
4841
if test "$pipe_works" = yes; then
4844
lt_cv_sys_global_symbol_pipe=
4848
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4849
lt_cv_sys_global_symbol_to_cdecl=
4851
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4852
AC_MSG_RESULT(failed)
4856
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4859
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4860
# ---------------------------------------
4861
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4862
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4863
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4864
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4866
AC_MSG_CHECKING([for $compiler option to produce PIC])
4868
# C++ specific cases for pic, static, wl, etc.
4869
if test "$GXX" = yes; then
4870
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4871
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4875
# All AIX code is PIC.
4876
if test "$host_cpu" = ia64; then
4877
# AIX 5 now supports IA64 processor
4878
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4882
# FIXME: we need at least 68020 code to build shared libraries, but
4883
# adding the `-m68020' flag to GCC prevents building anything better,
4885
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4887
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4888
# PIC is the default for these OSes.
4890
mingw* | os2* | pw32*)
4891
# This hack is so that the source file can tell whether it is being
4892
# built for inclusion in a dll (and should export symbols for example).
4893
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4895
darwin* | rhapsody*)
4896
# PIC is the default on this platform
4897
# Common symbols not allowed in MH_DYLIB files
4898
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4901
# DJGPP does not support shared libraries at all
4902
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4905
if test -d /usr/nec; then
4906
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4910
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4916
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4921
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4927
# All AIX code is PIC.
4928
if test "$host_cpu" = ia64; then
4929
# AIX 5 now supports IA64 processor
4930
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4932
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4936
case $cc_basename in
4938
# Green Hills C++ Compiler
4939
# _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4944
case $cc_basename in
4946
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4949
# Green Hills C++ Compiler
4950
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4957
# FreeBSD uses GNU C++
4959
hpux9* | hpux10* | hpux11*)
4960
case $cc_basename in
4962
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4963
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4964
if test "$host_cpu" != ia64; then
4965
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4969
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4970
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4976
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4984
irix5* | irix6* | nonstopux*)
4985
case $cc_basename in
4987
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4988
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4989
# CC pic flag -KPIC is the default.
4996
case $cc_basename in
4999
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5000
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5004
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5005
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5006
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5010
# Make sure the PIC flag is empty. It appears that all Alpha
5011
# Linux and Compaq Tru64 Unix objects are PIC.
5012
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5013
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5024
case $cc_basename in
5026
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5034
osf3* | osf4* | osf5*)
5035
case $cc_basename in
5037
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5040
# Rational C++ 2.4.1
5041
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5044
# Digital/Compaq C++
5045
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5046
# Make sure the PIC flag is empty. It appears that all Alpha
5047
# Linux and Compaq Tru64 Unix objects are PIC.
5048
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5049
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5058
case $cc_basename in
5060
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5067
case $cc_basename in
5069
# Sun C++ 4.2, 5.x and Centerline C++
5070
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5071
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5072
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5075
# Green Hills C++ Compiler
5076
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5083
case $cc_basename in
5086
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5087
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5091
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5098
case $cc_basename in
5100
# NonStop-UX NCC 3.20
5101
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5112
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5118
if test "$GCC" = yes; then
5119
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5120
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5124
# All AIX code is PIC.
5125
if test "$host_cpu" = ia64; then
5126
# AIX 5 now supports IA64 processor
5127
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5132
# FIXME: we need at least 68020 code to build shared libraries, but
5133
# adding the `-m68020' flag to GCC prevents building anything better,
5135
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5138
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5139
# PIC is the default for these OSes.
5142
mingw* | pw32* | os2*)
5143
# This hack is so that the source file can tell whether it is being
5144
# built for inclusion in a dll (and should export symbols for example).
5145
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5148
darwin* | rhapsody*)
5149
# PIC is the default on this platform
5150
# Common symbols not allowed in MH_DYLIB files
5151
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5155
# Just because we use GCC doesn't mean we suddenly get shared libraries
5156
# on systems that don't support them.
5157
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5162
if test -d /usr/nec; then
5163
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5168
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5175
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5181
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5185
# PORTME Check for flag to pass linker flags through the system compiler.
5188
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5189
if test "$host_cpu" = ia64; then
5190
# AIX 5 now supports IA64 processor
5191
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5193
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5197
mingw* | pw32* | os2*)
5198
# This hack is so that the source file can tell whether it is being
5199
# built for inclusion in a dll (and should export symbols for example).
5200
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5203
hpux9* | hpux10* | hpux11*)
5204
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5205
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5212
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5215
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5216
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5219
irix5* | irix6* | nonstopux*)
5220
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5221
# PIC (with -KPIC) is the default.
5222
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5226
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5227
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5233
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5234
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5235
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5238
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5239
# All Alpha code is PIC.
5240
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5245
osf3* | osf4* | osf5*)
5246
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5247
# All OSF/1 code is PIC.
5248
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5252
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5253
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5257
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5258
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5259
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5263
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5264
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5265
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5268
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5269
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5270
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5271
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5275
if test -d /usr/nec ;then
5276
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5277
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5282
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5283
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5287
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5292
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5295
# Check to make sure the PIC flag actually works.
5297
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5298
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5299
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5300
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5301
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5303
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5305
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5306
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5309
# For platforms which do not support PIC, -DPIC is meaningless:
5311
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5314
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5320
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5321
# ------------------------------------
5322
# See if the linker supports building shared libraries.
5323
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5324
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5326
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5329
# If we're using GNU nm, then we don't want the "-C" option.
5330
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5331
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5332
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5334
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5338
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5341
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5344
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5349
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5350
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5351
_LT_AC_TAGVAR(archive_cmds, $1)=
5352
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5353
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5354
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5355
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5356
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5357
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5358
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5359
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5360
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5361
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5362
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5363
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5364
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5365
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5366
_LT_AC_TAGVAR(module_cmds, $1)=
5367
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5368
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5369
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5370
# include_expsyms should be a list of space-separated symbols to be *always*
5371
# included in the symbol list
5372
_LT_AC_TAGVAR(include_expsyms, $1)=
5373
# exclude_expsyms can be an extended regexp of symbols to exclude
5374
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5375
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5376
# as well as any symbol that contains `d'.
5377
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5378
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5379
# platforms (ab)use it in PIC code, but their linkers get confused if
5380
# the symbol is explicitly referenced. Since portable code cannot
5381
# rely on this symbol name, it's probably fine to never include it in
5382
# preloaded symbol tables.
5383
extract_expsyms_cmds=
5386
cygwin* | mingw* | pw32*)
5387
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5388
# When not using gcc, we currently assume that we are using
5389
# Microsoft Visual C++.
5390
if test "$GCC" != yes; then
5399
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5400
if test "$with_gnu_ld" = yes; then
5401
# If archive_cmds runs LD, not CC, wlarc should be empty
5404
# See if GNU ld supports shared libraries.
5406
aix3* | aix4* | aix5*)
5407
# On AIX/PPC, the GNU linker is very broken
5408
if test "$host_cpu" != ia64; then
5409
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5412
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5413
*** to be unable to reliably create shared libraries on AIX.
5414
*** Therefore, libtool is disabling shared libraries support. If you
5415
*** really care for shared libraries, you may want to modify your PATH
5416
*** so that a non-GNU linker is found, and then restart.
5423
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5424
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5425
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5427
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5428
# that the semantics of dynamic libraries on AmigaOS, at least up
5429
# to version 4, is to share data among multiple programs linked
5430
# with the same dynamic library. Since this doesn't match the
5431
# behavior of shared libraries on other platforms, we can't use
5433
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5437
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5438
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5439
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5440
# support --undefined. This deserves some investigation. FIXME
5441
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5443
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5447
cygwin* | mingw* | pw32*)
5448
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5449
# as there is no search path for DLLs.
5450
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5451
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5452
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5453
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5454
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5456
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5457
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5458
# If the export-symbols file already is a .def file (1st line
5459
# is EXPORTS), use it as is; otherwise, prepend...
5460
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5461
cp $export_symbols $output_objdir/$soname.def;
5463
echo EXPORTS > $output_objdir/$soname.def;
5464
cat $export_symbols >> $output_objdir/$soname.def;
5466
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5473
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5474
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5477
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5478
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5483
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5484
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5487
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5488
*** create shared libraries on Solaris systems. Therefore, libtool
5489
*** is disabling shared libraries support. We urge you to upgrade GNU
5490
*** binutils to release 2.9.1 or newer. Another option is to modify
5491
*** your PATH or compiler configuration so that the native linker is
5492
*** used, and then restart.
5495
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5496
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5497
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5499
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5504
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5506
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5507
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5511
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5512
tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5513
_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
5514
supports_anon_versioning=no
5515
case `$LD -v 2>/dev/null` in
5516
*\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5517
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5518
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5519
*\ 2.11.*) ;; # other 2.11 versions
5520
*) supports_anon_versioning=yes ;;
5522
if test $supports_anon_versioning = yes; then
5523
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5524
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5525
$echo "local: *; };" >> $output_objdir/$libname.ver~
5526
$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5528
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
5531
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5536
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5537
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5538
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5540
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5545
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5546
runpath_var=LD_RUN_PATH
5547
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5548
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5549
# ancient GNU ld didn't support --whole-archive et. al.
5550
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5551
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5553
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5557
# PORTME fill in a description of your system's linker (not GNU ld)
5560
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5561
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5562
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5563
# Note: this linker hardcodes the directories in LIBPATH if there
5564
# are no directories specified by -L.
5565
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5566
if test "$GCC" = yes && test -z "$link_static_flag"; then
5567
# Neither direct hardcoding nor static linking is supported with a
5569
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5574
if test "$host_cpu" = ia64; then
5575
# On IA64, the linker does run time linking by default, so we don't
5576
# have to do anything special.
5577
aix_use_runtimelinking=no
5578
exp_sym_flag='-Bexport'
5581
# If we're using GNU nm, then we don't want the "-C" option.
5582
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5583
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5584
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5586
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5588
aix_use_runtimelinking=no
5590
# Test if we are trying to use run time linking or normal
5591
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5592
# need to do runtime linking.
5593
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5594
for ld_flag in $LDFLAGS; do
5595
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5596
aix_use_runtimelinking=yes
5602
exp_sym_flag='-bexport'
5603
no_entry_flag='-bnoentry'
5606
# When large executables or shared objects are built, AIX ld can
5607
# have problems creating the table of contents. If linking a library
5608
# or program results in "error TOC overflow" add -mminimal-toc to
5609
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5610
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5612
_LT_AC_TAGVAR(archive_cmds, $1)=''
5613
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5614
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5615
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5617
if test "$GCC" = yes; then
5618
case $host_os in aix4.[012]|aix4.[012].*)
5619
# We only want to do this on AIX 4.2 and lower, the check
5620
# below for broken collect2 doesn't work under 4.3+
5621
collect2name=`${CC} -print-prog-name=collect2`
5622
if test -f "$collect2name" && \
5623
strings "$collect2name" | grep resolve_lib_name >/dev/null
5625
# We have reworked collect2
5626
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5628
# We have old collect2
5629
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5630
# It fails to find uninstalled libraries when the uninstalled
5631
# path is not listed in the libpath. Setting hardcode_minus_L
5632
# to unsupported forces relinking
5633
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5634
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5635
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5638
shared_flag='-shared'
5641
if test "$host_cpu" = ia64; then
5642
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5643
# chokes on -Wl,-G. The following line is correct:
5646
if test "$aix_use_runtimelinking" = yes; then
5647
shared_flag='${wl}-G'
5649
shared_flag='${wl}-bM:SRE'
5654
# It seems that -bexpall does not export symbols beginning with
5655
# underscore (_), so it is better to generate a list of symbols to export.
5656
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5657
if test "$aix_use_runtimelinking" = yes; then
5658
# Warning - without using the other runtime loading flags (-brtl),
5659
# -berok will link without error, but may produce a broken library.
5660
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5661
# Determine the default libpath from the value encoded in an empty executable.
5662
_LT_AC_SYS_LIBPATH_AIX
5663
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5664
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5666
if test "$host_cpu" = ia64; then
5667
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5668
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5669
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5671
# Determine the default libpath from the value encoded in an empty executable.
5672
_LT_AC_SYS_LIBPATH_AIX
5673
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5674
# Warning - without using the other run time loading flags,
5675
# -berok will link without error, but may produce a broken library.
5676
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5677
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5678
# -bexpall does not export symbols beginning with underscore (_)
5679
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5680
# Exported symbols can be pulled into shared objects from archives
5681
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5682
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5683
# This is similar to how AIX traditionally builds it's shared libraries.
5684
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5690
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5691
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5692
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5693
# see comment about different semantics on the GNU ld section
5694
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5698
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5701
cygwin* | mingw* | pw32*)
5702
# When not using gcc, we currently assume that we are using
5703
# Microsoft Visual C++.
5704
# hardcode_libdir_flag_spec is actually meaningless, as there is
5705
# no search path for DLLs.
5706
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5707
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5708
# Tell ltmain to make .lib files, not .a files.
5710
# Tell ltmain to make .dll files, not .so files.
5712
# FIXME: Setting linknames here is a bad hack.
5713
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5714
# The linker will automatically build a .lib file if we build a DLL.
5715
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5716
# FIXME: Should let the user specify the lib program.
5717
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5718
fix_srcfile_path='`cygpath -w "$srcfile"`'
5719
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5722
darwin* | rhapsody*)
5723
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
5724
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5726
rhapsody* | darwin1.[[012]])
5727
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5730
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5733
# FIXME: Relying on posixy $() will cause problems for
5734
# cross-compilation, but unfortunately the echo tests do not
5735
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
5736
# `"' quotes if we put them in here... so don't!
5737
lt_int_apple_cc_single_mod=no
5738
output_verbose_link_cmd='echo'
5739
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
5740
lt_int_apple_cc_single_mod=yes
5742
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5743
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5745
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5747
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
5748
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5749
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5750
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5752
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5754
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5755
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5756
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5757
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5758
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5759
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5764
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5765
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5766
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5770
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5773
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5774
# support. Future versions do this automatically, but an explicit c++rt0.o
5775
# does not break anything, and helps significantly (at the cost of a little
5778
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5779
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5780
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5781
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5784
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
5786
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5787
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5788
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5789
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5792
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5794
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5795
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5796
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5797
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5801
if test "$GCC" = yes; then
5802
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5804
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5806
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5807
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5808
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5810
# hardcode_minus_L: Not really in the search PATH,
5811
# but as the default location of the library.
5812
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5813
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5817
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5820
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5823
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5829
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5832
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5836
if test "$with_gnu_ld" = no; then
5839
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5840
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5841
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5842
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5843
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5846
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5847
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5848
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5850
# hardcode_minus_L: Not really in the search PATH,
5851
# but as the default location of the library.
5852
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5855
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5856
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5857
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5858
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5860
# hardcode_minus_L: Not really in the search PATH,
5861
# but as the default location of the library.
5862
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5868
irix5* | irix6* | nonstopux*)
5869
if test "$GCC" = yes; then
5870
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5872
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5873
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5875
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5876
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5877
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5881
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5882
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5884
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5886
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5887
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5888
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5892
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5893
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5894
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5895
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5896
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5900
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5901
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5902
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5903
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5904
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5905
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5908
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5909
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5910
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5913
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5914
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5921
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5922
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5923
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5924
_LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5925
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5929
if test "$GCC" = yes; then
5930
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5931
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5933
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5934
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5936
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5937
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5940
osf4* | osf5*) # as osf3* with the addition of -msym flag
5941
if test "$GCC" = yes; then
5942
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5943
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5944
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5946
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5947
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5948
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5949
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
5951
# Both c and cxx compiler support -rpath directly
5952
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5954
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5958
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5959
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5960
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5961
runpath_var=LD_RUN_PATH
5962
hardcode_runpath_var=yes
5966
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5967
if test "$GCC" = yes; then
5968
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5969
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5970
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5972
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5973
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5974
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5976
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5977
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5979
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5980
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
5981
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5983
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5987
if test "x$host_vendor" = xsequent; then
5988
# Use $CC to link under sequent, because it throws in some extra .o
5989
# files that make .init and .fini sections work.
5990
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5992
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5994
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5995
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5996
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5997
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6001
case $host_vendor in
6003
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6004
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6007
## LD is ld it makes a PLAMLIB
6008
## CC just makes a GrossModule.
6009
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6010
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6011
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6014
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6015
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6018
runpath_var='LD_RUN_PATH'
6019
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6023
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6024
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6025
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6029
if test -d /usr/nec; then
6030
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6031
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6032
runpath_var=LD_RUN_PATH
6033
hardcode_runpath_var=yes
6034
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6039
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6040
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6041
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6042
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6043
hardcode_runpath_var=yes
6044
runpath_var=LD_RUN_PATH
6047
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6048
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6049
if test "$GCC" = yes; then
6050
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6052
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6054
runpath_var='LD_RUN_PATH'
6055
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6059
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6060
# $CC -shared without GNU ld will not create a library from C++
6061
# object files and a static libstdc++, better avoid it by now
6062
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6063
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6064
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6065
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6066
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6067
runpath_var='LD_RUN_PATH'
6071
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6072
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6073
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6077
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6082
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6083
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6085
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6086
if test "$GCC" = yes; then
6087
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6091
# Do we need to explicitly link libc?
6093
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6095
# Assume -lc should be added
6096
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6098
if test "$enable_shared" = yes && test "$GCC" = yes; then
6099
case $_LT_AC_TAGVAR(archive_cmds, $1) in
6101
# FIXME: we may have to deal with multi-command sequences.
6104
# Test whether the compiler implicitly links with -lc since on some
6105
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6106
# to ld, don't add -lc before -lgcc.
6107
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6109
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6111
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6114
libobjs=conftest.$ac_objext
6116
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6122
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6123
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6124
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6126
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6128
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6130
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6132
cat conftest.err 1>&5
6135
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6141
])# AC_LIBTOOL_PROG_LD_SHLIBS
6144
# _LT_AC_FILE_LTDLL_C
6145
# -------------------
6146
# Be careful that the start marker always follows a newline.
6147
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6148
# /* ltdll.c starts here */
6149
# #define WIN32_LEAN_AND_MEAN
6150
# #include <windows.h>
6151
# #undef WIN32_LEAN_AND_MEAN
6152
# #include <stdio.h>
6154
# #ifndef __CYGWIN__
6155
# # ifdef __CYGWIN32__
6156
# # define __CYGWIN__ __CYGWIN32__
6160
# #ifdef __cplusplus
6163
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6164
# #ifdef __cplusplus
6169
# #include <cygwin/cygwin_dll.h>
6170
# DECLARE_CYGWIN_DLL( DllMain );
6172
# HINSTANCE __hDllInstance_base;
6175
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6177
# __hDllInstance_base = hInst;
6180
# /* ltdll.c ends here */
6181
])# _LT_AC_FILE_LTDLL_C
6184
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6185
# ---------------------------------
6186
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6190
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6191
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6192
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6193
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6194
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6195
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6196
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6198
# This is just to silence aclocal about the macro not being used
6199
ifelse([AC_DISABLE_FAST_INSTALL])
6201
AC_DEFUN([LT_AC_PROG_GCJ],
6202
[AC_CHECK_TOOL(GCJ, gcj, no)
6203
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6207
AC_DEFUN([LT_AC_PROG_RC],
6208
[AC_CHECK_TOOL(RC, windres, no)
6211
# NOTE: This macro has been submitted for inclusion into #
6212
# GNU Autoconf as AC_PROG_SED. When it is available in #
6213
# a released version of Autoconf we should remove this #
6214
# macro and use it instead. #
6217
# Check for a fully-functional sed program, that truncates
6218
# as few characters as possible. Prefer GNU sed if found.
6219
AC_DEFUN([LT_AC_PROG_SED],
6220
[AC_MSG_CHECKING([for a sed that does not truncate output])
6221
AC_CACHE_VAL(lt_cv_path_SED,
6222
[# Loop through the user's path and test for sed and gsed.
6223
# Then use that list of sed's as ones to test for truncation.
6224
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228
test -z "$as_dir" && as_dir=.
6229
for lt_ac_prog in sed gsed; do
6230
for ac_exec_ext in '' $ac_executable_extensions; do
6231
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6232
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6239
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6240
# along with /bin/sed that truncates output.
6241
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6242
test ! -f $lt_ac_sed && break
6243
cat /dev/null > conftest.in
6245
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6246
# Check for GNU sed and select it if it is found.
6247
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6248
lt_cv_path_SED=$lt_ac_sed
6252
cat conftest.in conftest.in >conftest.tmp
6253
mv conftest.tmp conftest.in
6254
cp conftest.in conftest.nl
6256
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6257
cmp -s conftest.out conftest.nl || break
6258
# 10000 chars as input seems more than enough
6259
test $lt_ac_count -gt 10 && break
6260
lt_ac_count=`expr $lt_ac_count + 1`
6261
if test $lt_ac_count -gt $lt_ac_max; then
6262
lt_ac_max=$lt_ac_count
6263
lt_cv_path_SED=$lt_ac_sed
6269
AC_MSG_RESULT([$SED])
6273
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
6274
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
6275
dnl also defines GSTUFF_PKG_ERRORS on error
6276
AC_DEFUN(PKG_CHECK_MODULES, [
6279
if test -z "$PKG_CONFIG"; then
6280
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
6283
if test "$PKG_CONFIG" = "no" ; then
6284
echo "*** The pkg-config script could not be found. Make sure it is"
6285
echo "*** in your path, or set the PKG_CONFIG environment variable"
6286
echo "*** to the full path to pkg-config."
6287
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
6289
PKG_CONFIG_MIN_VERSION=0.9.0
6290
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6291
AC_MSG_CHECKING(for $2)
6293
if $PKG_CONFIG --exists "$2" ; then
6297
AC_MSG_CHECKING($1_CFLAGS)
6298
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
6299
AC_MSG_RESULT($$1_CFLAGS)
6301
AC_MSG_CHECKING($1_LIBS)
6302
$1_LIBS=`$PKG_CONFIG --libs "$2"`
6303
AC_MSG_RESULT($$1_LIBS)
6307
## If we have a custom action on failure, don't print errors, but
6308
## do set a variable so people can do so.
6309
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6310
ifelse([$4], ,echo $$1_PKG_ERRORS,)
6316
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6317
echo "*** See http://www.freedesktop.org/software/pkgconfig"
6321
if test $succeeded = yes; then
6322
ifelse([$3], , :, [$3])
6324
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
6331
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
6332
# Generated from amversion.in; do not edit by hand.
6334
# This program is free software; you can redistribute it and/or modify
6335
# it under the terms of the GNU General Public License as published by
6336
# the Free Software Foundation; either version 2, or (at your option)
6337
# any later version.
6339
# This program is distributed in the hope that it will be useful,
6340
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6341
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6342
# GNU General Public License for more details.
6344
# You should have received a copy of the GNU General Public License
6345
# along with this program; if not, write to the Free Software
6346
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6348
# AM_AUTOMAKE_VERSION(VERSION)
6349
# ----------------------------
6350
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6351
# generated from the m4 files accompanying Automake X.Y.
6352
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
6354
# AM_SET_CURRENT_AUTOMAKE_VERSION
6355
# -------------------------------
6356
# Call AM_AUTOMAKE_VERSION so it can be traced.
6357
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6358
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6359
[AM_AUTOMAKE_VERSION([1.8.2])])
6363
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6365
# This program is free software; you can redistribute it and/or modify
6366
# it under the terms of the GNU General Public License as published by
6367
# the Free Software Foundation; either version 2, or (at your option)
6368
# any later version.
6370
# This program is distributed in the hope that it will be useful,
6371
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6372
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6373
# GNU General Public License for more details.
6375
# You should have received a copy of the GNU General Public License
6376
# along with this program; if not, write to the Free Software
6377
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6380
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6381
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6382
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6384
# Of course, Automake must honor this variable whenever it calls a
6385
# tool from the auxiliary directory. The problem is that $srcdir (and
6386
# therefore $ac_aux_dir as well) can be either absolute or relative,
6387
# depending on how configure is run. This is pretty annoying, since
6388
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6389
# source directory, any form will work fine, but in subdirectories a
6390
# relative path needs to be adjusted first.
6392
# $ac_aux_dir/missing
6393
# fails when called from a subdirectory if $ac_aux_dir is relative
6394
# $top_srcdir/$ac_aux_dir/missing
6395
# fails if $ac_aux_dir is absolute,
6396
# fails when called from a subdirectory in a VPATH build with
6397
# a relative $ac_aux_dir
6399
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6400
# are both prefixed by $srcdir. In an in-source build this is usually
6401
# harmless because $srcdir is `.', but things will broke when you
6402
# start a VPATH build or use an absolute $srcdir.
6404
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6405
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6406
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6407
# and then we would define $MISSING as
6408
# MISSING="\${SHELL} $am_aux_dir/missing"
6409
# This will work as long as MISSING is not called from configure, because
6410
# unfortunately $(top_srcdir) has no meaning in configure.
6411
# However there are other variables, like CC, which are often used in
6412
# configure, and could therefore not use this "fixed" $ac_aux_dir.
6414
# Another solution, used here, is to always expand $ac_aux_dir to an
6415
# absolute PATH. The drawback is that using absolute paths prevent a
6416
# configured tree to be moved without reconfiguration.
6418
AC_DEFUN([AM_AUX_DIR_EXPAND],
6419
[dnl Rely on autoconf to set up CDPATH properly.
6420
AC_PREREQ([2.50])dnl
6421
# expand $ac_aux_dir to an absolute path
6422
am_aux_dir=`cd $ac_aux_dir && pwd`
6425
# AM_CONDITIONAL -*- Autoconf -*-
6427
# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6429
# This program is free software; you can redistribute it and/or modify
6430
# it under the terms of the GNU General Public License as published by
6431
# the Free Software Foundation; either version 2, or (at your option)
6432
# any later version.
6434
# This program is distributed in the hope that it will be useful,
6435
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6436
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6437
# GNU General Public License for more details.
6439
# You should have received a copy of the GNU General Public License
6440
# along with this program; if not, write to the Free Software
6441
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6446
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6447
# -------------------------------------
6448
# Define a conditional.
6449
AC_DEFUN([AM_CONDITIONAL],
6451
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6452
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6454
AC_SUBST([$1_FALSE])
6462
AC_CONFIG_COMMANDS_PRE(
6463
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6464
AC_MSG_ERROR([conditional "$1" was never defined.
6465
Usually this means the macro was only invoked conditionally.])
6468
# serial 6 -*- Autoconf -*-
6470
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
6471
# Free Software Foundation, Inc.
6473
# This program is free software; you can redistribute it and/or modify
6474
# it under the terms of the GNU General Public License as published by
6475
# the Free Software Foundation; either version 2, or (at your option)
6476
# any later version.
6478
# This program is distributed in the hope that it will be useful,
6479
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6480
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6481
# GNU General Public License for more details.
6483
# You should have received a copy of the GNU General Public License
6484
# along with this program; if not, write to the Free Software
6485
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6489
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6490
# written in clear, in which case automake, when reading aclocal.m4,
6491
# will think it sees a *use*, and therefore will trigger all it's
6492
# C support machinery. Also note that it means that autoscan, seeing
6493
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6497
# _AM_DEPENDENCIES(NAME)
6498
# ----------------------
6499
# See how the compiler implements dependency checking.
6500
# NAME is "CC", "CXX", "GCJ", or "OBJC".
6501
# We try a few techniques and use that to set a single cache variable.
6503
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6504
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6505
# dependency, and given that the user is not expected to run this macro,
6506
# just rely on AC_PROG_CC.
6507
AC_DEFUN([_AM_DEPENDENCIES],
6508
[AC_REQUIRE([AM_SET_DEPDIR])dnl
6509
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6510
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6511
AC_REQUIRE([AM_DEP_TRACK])dnl
6513
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6514
[$1], CXX, [depcc="$CXX" am_compiler_list=],
6515
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6516
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6517
[depcc="$$1" am_compiler_list=])
6519
AC_CACHE_CHECK([dependency style of $depcc],
6520
[am_cv_$1_dependencies_compiler_type],
6521
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6522
# We make a subdir and do the tests there. Otherwise we can end up
6523
# making bogus files that we don't know about and never remove. For
6524
# instance it was reported that on HP-UX the gcc test will end up
6525
# making a dummy file named `D' -- because `-MD' means `put the output
6528
# Copy depcomp to subdir because otherwise we won't find it if we're
6529
# using a relative directory.
6530
cp "$am_depcomp" conftest.dir
6532
# We will build objects and dependencies in a subdirectory because
6533
# it helps to detect inapplicable dependency modes. For instance
6534
# both Tru64's cc and ICC support -MD to output dependencies as a
6535
# side effect of compilation, but ICC will put the dependencies in
6536
# the current directory while Tru64 will put them in the object
6540
am_cv_$1_dependencies_compiler_type=none
6541
if test "$am_compiler_list" = ""; then
6542
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6544
for depmode in $am_compiler_list; do
6545
# Setup a source with many dependencies, because some compilers
6546
# like to wrap large dependency lists on column 80 (with \), and
6547
# we should not choose a depcomp mode which is confused by this.
6549
# We need to recreate these files for each test, as the compiler may
6550
# overwrite some of them when testing with obscure command lines.
6551
# This happens at least with the AIX C compiler.
6553
for i in 1 2 3 4 5 6; do
6554
echo '#include "conftst'$i'.h"' >> sub/conftest.c
6557
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6561
# after this tag, mechanisms are not by side-effect, so they'll
6562
# only be used when explicitly requested
6563
if test "x$enable_dependency_tracking" = xyes; then
6571
# We check with `-c' and `-o' for the sake of the "dashmstdout"
6572
# mode. It turns out that the SunPro C++ compiler does not properly
6573
# handle `-M -o', and we need to detect this.
6574
if depmode=$depmode \
6575
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6576
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6577
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6578
>/dev/null 2>conftest.err &&
6579
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6580
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6581
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6582
# icc doesn't choke on unknown options, it will just issue warnings
6583
# (even with -Werror). So we grep stderr for any message
6584
# that says an option was ignored.
6585
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
6586
am_cv_$1_dependencies_compiler_type=$depmode
6595
am_cv_$1_dependencies_compiler_type=none
6598
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6599
AM_CONDITIONAL([am__fastdep$1], [
6600
test "x$enable_dependency_tracking" != xno \
6601
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6607
# Choose a directory name for dependency files.
6608
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6609
AC_DEFUN([AM_SET_DEPDIR],
6610
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6611
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6617
AC_DEFUN([AM_DEP_TRACK],
6618
[AC_ARG_ENABLE(dependency-tracking,
6619
[ --disable-dependency-tracking speeds up one-time build
6620
--enable-dependency-tracking do not reject slow dependency extractors])
6621
if test "x$enable_dependency_tracking" != xno; then
6622
am_depcomp="$ac_aux_dir/depcomp"
6625
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6626
AC_SUBST([AMDEPBACKSLASH])
6629
# Generate code to set up dependency tracking. -*- Autoconf -*-
6631
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
6633
# This program is free software; you can redistribute it and/or modify
6634
# it under the terms of the GNU General Public License as published by
6635
# the Free Software Foundation; either version 2, or (at your option)
6636
# any later version.
6638
# This program is distributed in the hope that it will be useful,
6639
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6640
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6641
# GNU General Public License for more details.
6643
# You should have received a copy of the GNU General Public License
6644
# along with this program; if not, write to the Free Software
6645
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6650
# _AM_OUTPUT_DEPENDENCY_COMMANDS
6651
# ------------------------------
6652
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6653
[for mf in $CONFIG_FILES; do
6654
# Strip MF so we end up with the name of the file.
6655
mf=`echo "$mf" | sed -e 's/:.*$//'`
6656
# Check whether this is an Automake generated Makefile or not.
6657
# We used to match only the files named `Makefile.in', but
6658
# some people rename them; so instead we look at the file content.
6659
# Grep'ing the first line is not enough: some people post-process
6660
# each Makefile.in and add a new line on top of each file to say so.
6661
# So let's grep whole file.
6662
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6663
dirpart=`AS_DIRNAME("$mf")`
6667
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
6668
# Extract the definition of DEP_FILES from the Makefile without
6670
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
6671
test -z "$DEPDIR" && continue
6672
# When using ansi2knr, U may be empty or an underscore; expand it
6673
U=`sed -n -e '/^U = / s///p' < "$mf"`
6674
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
6675
# We invoke sed twice because it is the simplest approach to
6676
# changing $(DEPDIR) to its actual value in the expansion.
6677
for file in `sed -n -e '
6678
/^DEP_FILES = .*\\\\$/ {
6687
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
6688
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6689
# Make sure the directory exists.
6690
test -f "$dirpart/$file" && continue
6691
fdir=`AS_DIRNAME(["$file"])`
6692
AS_MKDIR_P([$dirpart/$fdir])
6693
# echo "creating $dirpart/$file"
6694
echo '# dummy' > "$dirpart/$file"
6697
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6700
# AM_OUTPUT_DEPENDENCY_COMMANDS
6701
# -----------------------------
6702
# This macro should only be invoked once -- use via AC_REQUIRE.
6704
# This code is only required when automatic dependency tracking
6705
# is enabled. FIXME. This creates each `.P' file that we will
6706
# need in order to bootstrap the dependency handling code.
6707
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6708
[AC_CONFIG_COMMANDS([depfiles],
6709
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6710
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6713
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
6715
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6717
# This program is free software; you can redistribute it and/or modify
6718
# it under the terms of the GNU General Public License as published by
6719
# the Free Software Foundation; either version 2, or (at your option)
6720
# any later version.
6722
# This program is distributed in the hope that it will be useful,
6723
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6724
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6725
# GNU General Public License for more details.
6727
# You should have received a copy of the GNU General Public License
6728
# along with this program; if not, write to the Free Software
6729
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6734
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6735
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6737
# Do all the work for Automake. -*- Autoconf -*-
6739
# This macro actually does too much some checks are only needed if
6740
# your package does certain things. But this isn't really a big deal.
6742
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
6743
# Free Software Foundation, Inc.
6745
# This program is free software; you can redistribute it and/or modify
6746
# it under the terms of the GNU General Public License as published by
6747
# the Free Software Foundation; either version 2, or (at your option)
6748
# any later version.
6750
# This program is distributed in the hope that it will be useful,
6751
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6752
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6753
# GNU General Public License for more details.
6755
# You should have received a copy of the GNU General Public License
6756
# along with this program; if not, write to the Free Software
6757
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6762
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6763
# AM_INIT_AUTOMAKE([OPTIONS])
6764
# -----------------------------------------------
6765
# The call with PACKAGE and VERSION arguments is the old style
6766
# call (pre autoconf-2.50), which is being phased out. PACKAGE
6767
# and VERSION should now be passed to AC_INIT and removed from
6768
# the call to AM_INIT_AUTOMAKE.
6769
# We support both call styles for the transition. After
6770
# the next Automake release, Autoconf can make the AC_INIT
6771
# arguments mandatory, and then we can depend on a new Autoconf
6772
# release and drop the old call support.
6773
AC_DEFUN([AM_INIT_AUTOMAKE],
6774
[AC_PREREQ([2.58])dnl
6775
dnl Autoconf wants to disallow AM_ names. We explicitly allow
6776
dnl the ones we care about.
6777
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6778
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6779
AC_REQUIRE([AC_PROG_INSTALL])dnl
6780
# test to see if srcdir already configured
6781
if test "`cd $srcdir && pwd`" != "`pwd`" &&
6782
test -f $srcdir/config.status; then
6783
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6786
# test whether we have cygpath
6787
if test -z "$CYGPATH_W"; then
6788
if (cygpath --version) >/dev/null 2>/dev/null; then
6789
CYGPATH_W='cygpath -w'
6794
AC_SUBST([CYGPATH_W])
6796
# Define the identity of the package.
6797
dnl Distinguish between old-style and new-style calls.
6799
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6800
AC_SUBST([PACKAGE], [$1])dnl
6801
AC_SUBST([VERSION], [$2])],
6802
[_AM_SET_OPTIONS([$1])dnl
6803
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6804
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6806
_AM_IF_OPTION([no-define],,
6807
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6808
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6810
# Some tools Automake needs.
6811
AC_REQUIRE([AM_SANITY_CHECK])dnl
6812
AC_REQUIRE([AC_ARG_PROGRAM])dnl
6813
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6814
AM_MISSING_PROG(AUTOCONF, autoconf)
6815
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6816
AM_MISSING_PROG(AUTOHEADER, autoheader)
6817
AM_MISSING_PROG(MAKEINFO, makeinfo)
6818
AM_MISSING_PROG(AMTAR, tar)
6820
AM_PROG_INSTALL_STRIP
6821
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6822
# We need awk for the "check" target. The system "awk" is bad on
6824
AC_REQUIRE([AC_PROG_AWK])dnl
6825
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6826
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6828
_AM_IF_OPTION([no-dependencies],,
6829
[AC_PROVIDE_IFELSE([AC_PROG_CC],
6830
[_AM_DEPENDENCIES(CC)],
6831
[define([AC_PROG_CC],
6832
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6833
AC_PROVIDE_IFELSE([AC_PROG_CXX],
6834
[_AM_DEPENDENCIES(CXX)],
6835
[define([AC_PROG_CXX],
6836
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6841
# When config.status generates a header, we must update the stamp-h file.
6842
# This file resides in the same directory as the config header
6843
# that is generated. The stamp files are numbered to have different names.
6845
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6846
# loop where config.status creates the headers, so we can generate
6847
# our stamp files there.
6848
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6849
[# Compute $1's index in $config_headers.
6851
for _am_header in $config_headers :; do
6856
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
6859
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6861
# AM_PROG_INSTALL_SH
6862
# ------------------
6863
# Define $install_sh.
6865
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6867
# This program is free software; you can redistribute it and/or modify
6868
# it under the terms of the GNU General Public License as published by
6869
# the Free Software Foundation; either version 2, or (at your option)
6870
# any later version.
6872
# This program is distributed in the hope that it will be useful,
6873
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6874
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6875
# GNU General Public License for more details.
6877
# You should have received a copy of the GNU General Public License
6878
# along with this program; if not, write to the Free Software
6879
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6882
AC_DEFUN([AM_PROG_INSTALL_SH],
6883
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6884
install_sh=${install_sh-"$am_aux_dir/install-sh"}
6885
AC_SUBST(install_sh)])
6888
# Copyright (C) 2003 Free Software Foundation, Inc.
6890
# This program is free software; you can redistribute it and/or modify
6891
# it under the terms of the GNU General Public License as published by
6892
# the Free Software Foundation; either version 2, or (at your option)
6893
# any later version.
6895
# This program is distributed in the hope that it will be useful,
6896
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6897
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6898
# GNU General Public License for more details.
6900
# You should have received a copy of the GNU General Public License
6901
# along with this program; if not, write to the Free Software
6902
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6907
# Check whether the underlying file-system supports filenames
6908
# with a leading dot. For instance MS-DOS doesn't.
6909
AC_DEFUN([AM_SET_LEADING_DOT],
6910
[rm -rf .tst 2>/dev/null
6911
mkdir .tst 2>/dev/null
6912
if test -d .tst; then
6917
rmdir .tst 2>/dev/null
6918
AC_SUBST([am__leading_dot])])
6920
# Add --enable-maintainer-mode option to configure.
6923
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
6924
# Free Software Foundation, Inc.
6926
# This program is free software; you can redistribute it and/or modify
6927
# it under the terms of the GNU General Public License as published by
6928
# the Free Software Foundation; either version 2, or (at your option)
6929
# any later version.
6931
# This program is distributed in the hope that it will be useful,
6932
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6933
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6934
# GNU General Public License for more details.
6936
# You should have received a copy of the GNU General Public License
6937
# along with this program; if not, write to the Free Software
6938
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6943
AC_DEFUN([AM_MAINTAINER_MODE],
6944
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
6945
dnl maintainer-mode is disabled by default
6946
AC_ARG_ENABLE(maintainer-mode,
6947
[ --enable-maintainer-mode enable make rules and dependencies not useful
6948
(and sometimes confusing) to the casual installer],
6949
USE_MAINTAINER_MODE=$enableval,
6950
USE_MAINTAINER_MODE=no)
6951
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6952
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
6953
MAINT=$MAINTAINER_MODE_TRUE
6958
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6960
# Check to see how 'make' treats includes. -*- Autoconf -*-
6962
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
6964
# This program is free software; you can redistribute it and/or modify
6965
# it under the terms of the GNU General Public License as published by
6966
# the Free Software Foundation; either version 2, or (at your option)
6967
# any later version.
6969
# This program is distributed in the hope that it will be useful,
6970
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6971
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6972
# GNU General Public License for more details.
6974
# You should have received a copy of the GNU General Public License
6975
# along with this program; if not, write to the Free Software
6976
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6983
# Check to see how make treats includes.
6984
AC_DEFUN([AM_MAKE_INCLUDE],
6985
[am_make=${MAKE-make}
6986
cat > confinc << 'END'
6991
# If we don't find an include directive, just comment out the code.
6992
AC_MSG_CHECKING([for style of include used by $am_make])
6996
# First try GNU make style include.
6997
echo "include confinc" > confmf
6998
# We grep out `Entering directory' and `Leaving directory'
6999
# messages which can occur if `w' ends up in MAKEFLAGS.
7000
# In particular we don't look at `^make:' because GNU make might
7001
# be invoked under some other name (usually "gmake"), in which
7002
# case it prints its new name instead of `make'.
7003
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7008
# Now try BSD make style include.
7009
if test "$am__include" = "#"; then
7010
echo '.include "confinc"' > confmf
7011
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7012
am__include=.include
7017
AC_SUBST([am__include])
7018
AC_SUBST([am__quote])
7019
AC_MSG_RESULT([$_am_result])
7020
rm -f confinc confmf
7026
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
7028
# This program is free software; you can redistribute it and/or modify
7029
# it under the terms of the GNU General Public License as published by
7030
# the Free Software Foundation; either version 2, or (at your option)
7031
# any later version.
7033
# This program is distributed in the hope that it will be useful,
7034
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7035
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7036
# GNU General Public License for more details.
7038
# You should have received a copy of the GNU General Public License
7039
# along with this program; if not, write to the Free Software
7040
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7045
# AM_MISSING_PROG(NAME, PROGRAM)
7046
# ------------------------------
7047
AC_DEFUN([AM_MISSING_PROG],
7048
[AC_REQUIRE([AM_MISSING_HAS_RUN])
7049
$1=${$1-"${am_missing_run}$2"}
7053
# AM_MISSING_HAS_RUN
7054
# ------------------
7055
# Define MISSING if not defined so far and test if it supports --run.
7056
# If it does, set am_missing_run to use it, otherwise, to nothing.
7057
AC_DEFUN([AM_MISSING_HAS_RUN],
7058
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7059
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7060
# Use eval to expand $SHELL
7061
if eval "$MISSING --run true"; then
7062
am_missing_run="$MISSING --run "
7065
AC_MSG_WARN([`missing' script is too old or missing])
7071
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7073
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
7075
# This program is free software; you can redistribute it and/or modify
7076
# it under the terms of the GNU General Public License as published by
7077
# the Free Software Foundation; either version 2, or (at your option)
7078
# any later version.
7080
# This program is distributed in the hope that it will be useful,
7081
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7082
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7083
# GNU General Public License for more details.
7085
# You should have received a copy of the GNU General Public License
7086
# along with this program; if not, write to the Free Software
7087
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7090
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7091
# created by `make install' are always world readable, even if the
7092
# installer happens to have an overly restrictive umask (e.g. 077).
7093
# This was a mistake. There are at least two reasons why we must not
7095
# - it causes special bits like SGID to be ignored,
7096
# - it may be too restrictive (some setups expect 775 directories).
7098
# Do not use -m 0755 and let people choose whatever they expect by
7100
AC_DEFUN([AM_PROG_MKDIR_P],
7101
[if mkdir -p -- . 2>/dev/null; then
7102
# Keeping the `.' argument allows $(mkdir_p) to be used without
7103
# argument. Indeed, we sometimes output rules like
7104
# $(mkdir_p) $(somedir)
7105
# where $(somedir) is conditionally defined.
7106
# (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
7107
# expensive solution, as it forces Make to start a sub-shell.)
7108
mkdir_p='mkdir -p -- .'
7110
# On NextStep and OpenStep, the `mkdir' command does not
7111
# recognize any option. It will interpret all options as
7112
# directories to create, and then abort because `.' already
7116
test -d $d && rmdir $d
7118
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7119
if test -f "$ac_aux_dir/mkinstalldirs"; then
7120
mkdir_p='$(mkinstalldirs)'
7122
mkdir_p='$(install_sh) -d'
7125
AC_SUBST([mkdir_p])])
7127
# Helper functions for option handling. -*- Autoconf -*-
7129
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7131
# This program is free software; you can redistribute it and/or modify
7132
# it under the terms of the GNU General Public License as published by
7133
# the Free Software Foundation; either version 2, or (at your option)
7134
# any later version.
7136
# This program is distributed in the hope that it will be useful,
7137
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7138
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7139
# GNU General Public License for more details.
7141
# You should have received a copy of the GNU General Public License
7142
# along with this program; if not, write to the Free Software
7143
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7148
# _AM_MANGLE_OPTION(NAME)
7149
# -----------------------
7150
AC_DEFUN([_AM_MANGLE_OPTION],
7151
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7153
# _AM_SET_OPTION(NAME)
7154
# ------------------------------
7155
# Set option NAME. Presently that only means defining a flag for this option.
7156
AC_DEFUN([_AM_SET_OPTION],
7157
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7159
# _AM_SET_OPTIONS(OPTIONS)
7160
# ----------------------------------
7161
# OPTIONS is a space-separated list of Automake options.
7162
AC_DEFUN([_AM_SET_OPTIONS],
7163
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7165
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7166
# -------------------------------------------
7167
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7168
AC_DEFUN([_AM_IF_OPTION],
7169
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7172
# Check to make sure that the build environment is sane.
7175
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7177
# This program is free software; you can redistribute it and/or modify
7178
# it under the terms of the GNU General Public License as published by
7179
# the Free Software Foundation; either version 2, or (at your option)
7180
# any later version.
7182
# This program is distributed in the hope that it will be useful,
7183
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7184
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7185
# GNU General Public License for more details.
7187
# You should have received a copy of the GNU General Public License
7188
# along with this program; if not, write to the Free Software
7189
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7196
AC_DEFUN([AM_SANITY_CHECK],
7197
[AC_MSG_CHECKING([whether build environment is sane])
7200
echo timestamp > conftest.file
7201
# Do `set' in a subshell so we don't clobber the current shell's
7202
# arguments. Must try -L first in case configure is actually a
7203
# symlink; some systems play weird games with the mod time of symlinks
7204
# (eg FreeBSD returns the mod time of the symlink's containing
7207
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7208
if test "$[*]" = "X"; then
7210
set X `ls -t $srcdir/configure conftest.file`
7213
if test "$[*]" != "X $srcdir/configure conftest.file" \
7214
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
7216
# If neither matched, then we have a broken ls. This can happen
7217
# if, for instance, CONFIG_SHELL is bash and it inherits a
7218
# broken ls alias from the environment. This has actually
7219
# happened. Such a system could not be considered "sane".
7220
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7221
alias in your environment])
7224
test "$[2]" = conftest.file
7230
AC_MSG_ERROR([newly created file is older than distributed files!
7231
Check your system clock])
7233
AC_MSG_RESULT(yes)])
7235
# AM_PROG_INSTALL_STRIP
7237
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7239
# This program is free software; you can redistribute it and/or modify
7240
# it under the terms of the GNU General Public License as published by
7241
# the Free Software Foundation; either version 2, or (at your option)
7242
# any later version.
7244
# This program is distributed in the hope that it will be useful,
7245
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7246
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7247
# GNU General Public License for more details.
7249
# You should have received a copy of the GNU General Public License
7250
# along with this program; if not, write to the Free Software
7251
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7254
# One issue with vendor `install' (even GNU) is that you can't
7255
# specify the program used to strip binaries. This is especially
7256
# annoying in cross-compiling environments, where the build's strip
7257
# is unlikely to handle the host's binaries.
7258
# Fortunately install-sh will honor a STRIPPROG variable, so we
7259
# always use install-sh in `make install-strip', and initialize
7260
# STRIPPROG with the value of the STRIP variable (set by the user).
7261
AC_DEFUN([AM_PROG_INSTALL_STRIP],
7262
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7263
# Installed binaries are usually stripped using `strip' when the user
7264
# run `make install-strip'. However `strip' might not be the right
7265
# tool to use in cross-compilation environments, therefore Automake
7266
# will honor the `STRIP' environment variable to overrule this program.
7267
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7268
if test "$cross_compiling" != no; then
7269
AC_CHECK_TOOL([STRIP], [strip], :)
7271
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7272
AC_SUBST([INSTALL_STRIP_PROGRAM])])
7274
m4_include([m4/X11.m4])
7275
m4_include([m4/debug.m4])
7276
m4_include([m4/depends.m4])
7277
m4_include([m4/i18n.m4])