1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005 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
15
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
16
dnl (i.e. pass to gconftool-2
17
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
18
dnl you should install foo.schemas files
21
AC_DEFUN([AM_GCONF_SOURCE_2],
23
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
24
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
26
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
29
AC_ARG_WITH(gconf-source,
30
[ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
32
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
33
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
35
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
36
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
39
AC_ARG_WITH(gconf-schema-file-dir,
40
[ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
42
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
43
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
45
AC_ARG_ENABLE(schemas-install,
46
[ --disable-schemas-install Disable the schemas installation],
49
*) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
51
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
54
# Configure paths for GLIB
55
# Owen Taylor 1997-2001
57
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
58
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
59
dnl gthread is specified in MODULES, pass to pkg-config
61
AC_DEFUN([AM_PATH_GLIB_2_0],
63
dnl Get the cflags and libraries from pkg-config
65
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
66
, enable_glibtest=yes)
68
pkg_config_args=glib-2.0
73
pkg_config_args="$pkg_config_args gmodule-2.0"
76
pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
79
pkg_config_args="$pkg_config_args gobject-2.0"
82
pkg_config_args="$pkg_config_args gthread-2.0"
87
PKG_PROG_PKG_CONFIG([0.7])
91
if test "x$PKG_CONFIG" = x ; then
96
min_glib_version=ifelse([$1], ,2.0.0,$1)
97
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
99
if test x$PKG_CONFIG != xno ; then
100
## don't try to run the test against uninstalled libtool libs
101
if $PKG_CONFIG --uninstalled $pkg_config_args; then
102
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
106
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
113
if test x"$no_glib" = x ; then
114
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
115
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
116
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
118
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
119
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
120
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
121
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
122
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
123
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
124
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
125
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
126
if test "x$enable_glibtest" = "xyes" ; then
127
ac_save_CFLAGS="$CFLAGS"
129
CFLAGS="$CFLAGS $GLIB_CFLAGS"
130
LIBS="$GLIB_LIBS $LIBS"
132
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
133
dnl checks the results of pkg-config to some extent)
144
int major, minor, micro;
147
system ("touch conf.glibtest");
149
/* HP/UX 9 (%@#!) writes to sscanf strings */
150
tmp_version = g_strdup("$min_glib_version");
151
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
152
printf("%s, bad version string\n", "$min_glib_version");
156
if ((glib_major_version != $glib_config_major_version) ||
157
(glib_minor_version != $glib_config_minor_version) ||
158
(glib_micro_version != $glib_config_micro_version))
160
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
161
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
162
glib_major_version, glib_minor_version, glib_micro_version);
163
printf ("*** was found! If pkg-config was correct, then it is best\n");
164
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
165
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
166
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
167
printf("*** required on your system.\n");
168
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
169
printf("*** to point to the correct configuration files\n");
171
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
172
(glib_minor_version != GLIB_MINOR_VERSION) ||
173
(glib_micro_version != GLIB_MICRO_VERSION))
175
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
176
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
177
printf("*** library (version %d.%d.%d)\n",
178
glib_major_version, glib_minor_version, glib_micro_version);
182
if ((glib_major_version > major) ||
183
((glib_major_version == major) && (glib_minor_version > minor)) ||
184
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
190
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
191
glib_major_version, glib_minor_version, glib_micro_version);
192
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
193
major, minor, micro);
194
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
196
printf("*** If you have already installed a sufficiently new version, this error\n");
197
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
198
printf("*** being found. The easiest way to fix this is to remove the old version\n");
199
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
200
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
201
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
202
printf("*** so that the correct libraries are found at run-time))\n");
207
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
208
CFLAGS="$ac_save_CFLAGS"
212
if test "x$no_glib" = x ; then
213
AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
214
ifelse([$2], , :, [$2])
217
if test "$PKG_CONFIG" = "no" ; then
218
echo "*** A new enough version of pkg-config was not found."
219
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
221
if test -f conf.glibtest ; then
224
echo "*** Could not run GLIB test program, checking why..."
225
ac_save_CFLAGS="$CFLAGS"
227
CFLAGS="$CFLAGS $GLIB_CFLAGS"
228
LIBS="$LIBS $GLIB_LIBS"
232
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
233
[ echo "*** The test program compiled, but did not run. This usually means"
234
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
235
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
236
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
237
echo "*** to the installed location Also, make sure you have run ldconfig if that"
238
echo "*** is required on your system"
240
echo "*** If you have an old version installed, it is best to remove it, although"
241
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
242
[ echo "*** The test program failed to compile or link. See the file config.log for the"
243
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
244
CFLAGS="$ac_save_CFLAGS"
253
ifelse([$3], , :, [$3])
255
AC_SUBST(GLIB_CFLAGS)
257
AC_SUBST(GLIB_GENMARSHAL)
258
AC_SUBST(GOBJECT_QUERY)
259
AC_SUBST(GLIB_MKENUMS)
263
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
264
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
266
# This file is free software, distributed under the terms of the GNU
267
# General Public License. As a special exception to the GNU General
268
# Public License, this file may be distributed as part of a program
269
# that contains a configuration script generated by Autoconf, under
270
# the same distribution terms as the rest of that program.
272
# This file can be copied and used freely without restrictions. It can
273
# be used in projects which are not available under the GNU Public License
274
# but which still want to provide support for the GNU gettext functionality.
276
# Macro to add for using GNU gettext.
277
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
279
# Modified to never use included libintl.
280
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
282
# Major rework to remove unused code
283
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
285
# Added better handling of ALL_LINGUAS from GNU gettext version
286
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
288
# Modified to require ngettext
289
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
291
# We need this here as well, since someone might use autoconf-2.5x
292
# to configure GLib then an older version to configure a package
293
# using AM_GLIB_GNU_GETTEXT
297
dnl We go to great lengths to make sure that aclocal won't
298
dnl try to pull in the installed version of these macros
299
dnl when running aclocal in the glib directory.
301
m4_copy([AC_DEFUN],[glib_DEFUN])
302
m4_copy([AC_REQUIRE],[glib_REQUIRE])
304
dnl At the end, if we're not within glib, we'll define the public
305
dnl definitions in terms of our private definitions.
309
#--------------------
310
glib_DEFUN([GLIB_LC_MESSAGES],
311
[AC_CHECK_HEADERS([locale.h])
312
if test $ac_cv_header_locale_h = yes; then
313
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
314
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
315
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
316
if test $am_cv_val_LC_MESSAGES = yes; then
317
AC_DEFINE(HAVE_LC_MESSAGES, 1,
318
[Define if your <locale.h> file defines LC_MESSAGES.])
322
# GLIB_PATH_PROG_WITH_TEST
323
#----------------------------
324
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
325
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
326
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
327
[# Extract the first word of "$2", so it can be a program name with args.
328
set dummy $2; ac_word=[$]2
329
AC_MSG_CHECKING([for $ac_word])
330
AC_CACHE_VAL(ac_cv_path_$1,
333
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
336
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
337
for ac_dir in ifelse([$5], , $PATH, [$5]); do
338
test -z "$ac_dir" && ac_dir=.
339
if test -f $ac_dir/$ac_word; then
341
ac_cv_path_$1="$ac_dir/$ac_word"
347
dnl If no 4th arg is given, leave the cache variable unset,
348
dnl so AC_PATH_PROGS will keep looking.
349
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
354
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
364
glib_DEFUN([GLIB_WITH_NLS],
365
dnl NLS is obligatory
366
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
370
gt_cv_have_gettext=no
376
AC_CHECK_HEADER(libintl.h,
377
[gt_cv_func_dgettext_libintl="no"
378
libintl_extra_libs=""
381
# First check in libc
383
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
387
[return !ngettext ("","", 1)],
388
gt_cv_func_ngettext_libc=yes,
389
gt_cv_func_ngettext_libc=no)
392
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
393
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
397
[return !dgettext ("","")],
398
gt_cv_func_dgettext_libc=yes,
399
gt_cv_func_dgettext_libc=no)
403
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
404
AC_CHECK_FUNCS(bind_textdomain_codeset)
408
# If we don't have everything we want, check in libintl
410
if test "$gt_cv_func_dgettext_libc" != "yes" \
411
|| test "$gt_cv_func_ngettext_libc" != "yes" \
412
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
414
AC_CHECK_LIB(intl, bindtextdomain,
415
[AC_CHECK_LIB(intl, ngettext,
416
[AC_CHECK_LIB(intl, dgettext,
417
gt_cv_func_dgettext_libintl=yes)])])
419
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
420
AC_MSG_CHECKING([if -liconv is needed to use gettext])
422
AC_CHECK_LIB(intl, ngettext,
423
[AC_CHECK_LIB(intl, dcgettext,
424
[gt_cv_func_dgettext_libintl=yes
425
libintl_extra_libs=-liconv],
431
# If we found libintl, then check in it for bind_textdomain_codeset();
432
# we'll prefer libc if neither have bind_textdomain_codeset(),
433
# and both have dgettext and ngettext
435
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
436
glib_save_LIBS="$LIBS"
437
LIBS="$LIBS -lintl $libintl_extra_libs"
438
unset ac_cv_func_bind_textdomain_codeset
439
AC_CHECK_FUNCS(bind_textdomain_codeset)
440
LIBS="$glib_save_LIBS"
442
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
443
gt_cv_func_dgettext_libc=no
445
if test "$gt_cv_func_dgettext_libc" = "yes" \
446
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
447
gt_cv_func_dgettext_libintl=no
453
if test "$gt_cv_func_dgettext_libc" = "yes" \
454
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
455
gt_cv_have_gettext=yes
458
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
459
INTLLIBS="-lintl $libintl_extra_libs"
462
if test "$gt_cv_have_gettext" = "yes"; then
463
AC_DEFINE(HAVE_GETTEXT,1,
464
[Define if the GNU gettext() function is already present or preinstalled.])
465
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
466
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
467
if test "$MSGFMT" != "no"; then
468
glib_save_LIBS="$LIBS"
469
LIBS="$LIBS $INTLLIBS"
470
AC_CHECK_FUNCS(dcgettext)
472
AC_MSG_CHECKING([if msgfmt accepts -c])
473
GLIB_RUN_PROG([msgfmt -c -o /dev/null],[
476
"Content-Type: text/plain; charset=UTF-8\n"
477
"Project-Id-Version: test 1.0\n"
478
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
479
"Last-Translator: test <foo@bar.xx>\n"
480
"Language-Team: C <LL@li.org>\n"
481
"MIME-Version: 1.0\n"
482
"Content-Transfer-Encoding: 8bit\n"
483
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
484
AC_SUBST(MSGFMT_OPTS)
485
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
486
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
487
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
488
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
489
return _nl_msg_cat_cntr],
494
dnl On Solaris, if bind_textdomain_codeset is in libc,
495
dnl GNU format message catalog is always supported,
496
dnl since both are added to the libc all together.
497
dnl Hence, we'd like to go with DATADIRNAME=share and
498
dnl and CATOBJEXT=.gmo in this case.
499
AC_CHECK_FUNC(bind_textdomain_codeset,
510
LIBS="$glib_save_LIBS"
513
gt_cv_have_gettext=no
518
if test "$gt_cv_have_gettext" = "yes" ; then
519
AC_DEFINE(ENABLE_NLS, 1,
520
[always defined to indicate that i18n is enabled])
523
dnl Test whether we really found GNU xgettext.
524
if test "$XGETTEXT" != ":"; then
525
dnl If it is not GNU xgettext we define it as : so that the
526
dnl Makefiles still can work.
527
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
531
[found xgettext program is not GNU xgettext; ignore it])
536
# We need to process the po/ directory.
540
[case "$CONFIG_FILES" in *po/Makefile.in*)
541
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
544
dnl These rules are solely for the distribution goal. While doing this
545
dnl we only have to keep exactly one list of the available catalogs
547
for lang in $ALL_LINGUAS; do
548
GMOFILES="$GMOFILES $lang.gmo"
549
POFILES="$POFILES $lang.po"
552
dnl Make all variables we use known to autoconf.
555
AC_SUBST(DATADIRNAME)
559
AC_SUBST(PO_IN_DATADIR_TRUE)
560
AC_SUBST(PO_IN_DATADIR_FALSE)
565
# AM_GLIB_GNU_GETTEXT
566
# -------------------
567
# Do checks necessary for use of gettext. If a suitable implementation
568
# of gettext is found in either in libintl or in the C library,
569
# it will set INTLLIBS to the libraries needed for use of gettext
570
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
571
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
572
# on various variables needed by the Makefile.in.in installed by
575
glib_DEFUN([GLIB_GNU_GETTEXT],
576
[AC_REQUIRE([AC_PROG_CC])dnl
577
AC_REQUIRE([AC_HEADER_STDC])dnl
582
if test "$gt_cv_have_gettext" = "yes"; then
583
if test "x$ALL_LINGUAS" = "x"; then
586
AC_MSG_CHECKING(for catalogs to be installed)
588
for presentlang in $ALL_LINGUAS; do
590
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
591
desiredlanguages="$LINGUAS"
593
desiredlanguages="$ALL_LINGUAS"
595
for desiredlang in $desiredlanguages; do
596
# Use the presentlang catalog if desiredlang is
597
# a. equal to presentlang, or
598
# b. a variant of presentlang (because in this case,
599
# presentlang can be used as a fallback for messages
600
# which are not translated in the desiredlang catalog).
601
case "$desiredlang" in
602
"$presentlang"*) useit=yes;;
605
if test $useit = yes; then
606
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
610
AC_MSG_RESULT($LINGUAS)
613
dnl Construct list of names of catalog files to be constructed.
614
if test -n "$LINGUAS"; then
615
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
619
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
620
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
621
dnl Try to locate is.
623
if test -n "$ac_aux_dir"; then
624
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
626
if test -z "$MKINSTALLDIRS"; then
627
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
629
AC_SUBST(MKINSTALLDIRS)
631
dnl Generate list of files to be processed by xgettext which will
632
dnl be included in po/Makefile.
633
test -d po || mkdir po
634
if test "x$srcdir" != "x."; then
635
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
636
posrcprefix="$srcdir/"
638
posrcprefix="../$srcdir/"
644
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
645
< $srcdir/po/POTFILES.in > po/POTFILES
648
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
649
# -------------------------------
650
# Define VARIABLE to the location where catalog files will
651
# be installed by po/Makefile.
652
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
653
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
654
glib_save_prefix="$prefix"
655
glib_save_exec_prefix="$exec_prefix"
656
glib_save_datarootdir="$datarootdir"
657
test "x$prefix" = xNONE && prefix=$ac_default_prefix
658
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
659
datarootdir=`eval echo "${datarootdir}"`
660
if test "x$CATOBJEXT" = "x.mo" ; then
661
localedir=`eval echo "${libdir}/locale"`
663
localedir=`eval echo "${datadir}/locale"`
665
prefix="$glib_save_prefix"
666
exec_prefix="$glib_save_exec_prefix"
667
datarootdir="$glib_save_datarootdir"
668
AC_DEFINE_UNQUOTED($1, "$localedir",
669
[Define the location where the catalogs will be installed])
673
dnl Now the definitions that aclocal will find
675
ifdef(glib_configure_in,[],[
676
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
677
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
680
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
682
# Create a temporary file with TEST-FILE as its contents and pass the
683
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
684
# 0 and perform ACTION-IF-FAIL for any other exit status.
685
AC_DEFUN([GLIB_RUN_PROG],
686
[cat >conftest.foo <<_ACEOF
689
if AC_RUN_LOG([$1 conftest.foo]); then
690
m4_ifval([$3], [$3], [:])
691
m4_ifvaln([$4], [else $4])dnl
692
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
693
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
698
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
699
# serial 35 IT_PROG_INTLTOOL
700
AC_DEFUN([IT_PROG_INTLTOOL],
701
[AC_PREREQ([2.50])dnl
703
case "$am__api_version" in
705
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
711
if test -n "$1"; then
712
AC_MSG_CHECKING(for intltool >= $1)
714
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
715
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
716
[INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
718
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
719
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
720
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
723
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
724
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
725
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
726
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
727
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
728
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
729
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
730
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
731
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
732
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
733
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
734
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
735
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
736
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
737
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
738
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
739
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
740
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
742
AC_SUBST(INTLTOOL_DESKTOP_RULE)
743
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
744
AC_SUBST(INTLTOOL_KEYS_RULE)
745
AC_SUBST(INTLTOOL_PROP_RULE)
746
AC_SUBST(INTLTOOL_OAF_RULE)
747
AC_SUBST(INTLTOOL_PONG_RULE)
748
AC_SUBST(INTLTOOL_SERVER_RULE)
749
AC_SUBST(INTLTOOL_SHEET_RULE)
750
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
751
AC_SUBST(INTLTOOL_UI_RULE)
752
AC_SUBST(INTLTOOL_XAM_RULE)
753
AC_SUBST(INTLTOOL_KBD_RULE)
754
AC_SUBST(INTLTOOL_XML_RULE)
755
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
756
AC_SUBST(INTLTOOL_CAVES_RULE)
757
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
758
AC_SUBST(INTLTOOL_THEME_RULE)
759
AC_SUBST(INTLTOOL_SERVICE_RULE)
761
# Use the tools built into the package, not the ones that are installed.
762
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
763
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
764
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
766
AC_PATH_PROG(INTLTOOL_PERL, perl)
767
if test -z "$INTLTOOL_PERL"; then
768
AC_MSG_ERROR([perl not found; required for intltool])
770
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
771
AC_MSG_ERROR([perl 5.x required for intltool])
773
if test "x$2" != "xno-xml"; then
774
AC_MSG_CHECKING([for XML::Parser])
775
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
778
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
782
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
783
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
784
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
785
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
787
# Substitute ALL_LINGUAS so we can use it in po/Makefile
788
AC_SUBST(ALL_LINGUAS)
790
# Set DATADIRNAME correctly if it is not set yet
791
# (copied from glib-gettext.m4)
792
if test -z "$DATADIRNAME"; then
793
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
794
return _nl_msg_cat_cntr],
798
dnl On Solaris, if bind_textdomain_codeset is in libc,
799
dnl GNU format message catalog is always supported,
800
dnl since both are added to the libc all together.
801
dnl Hence, we'd like to go with DATADIRNAME=share
803
AC_CHECK_FUNC(bind_textdomain_codeset,
804
[DATADIRNAME=share], [DATADIRNAME=lib])
811
AC_SUBST(DATADIRNAME)
815
dnl The following is very similar to
817
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
819
dnl with the following slight differences:
820
dnl - the *.in files are in ac_aux_dir,
821
dnl - if the file haven't changed upon reconfigure, it's not touched,
822
dnl - the evaluation of the third parameter enables a hack which computes
823
dnl the actual value of $libdir,
824
dnl - the user sees "executing intltool commands", instead of
825
dnl "creating intltool-extract" and such.
827
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
830
AC_CONFIG_COMMANDS([intltool], [
832
for file in intltool-extract intltool-merge intltool-update; do
833
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
834
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
835
-e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
836
-e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
837
-e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
838
-e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
839
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
840
< ${ac_aux_dir}/${file}.in > ${file}.out
841
if cmp -s ${file} ${file}.out 2>/dev/null; then
844
mv -f ${file}.out ${file}
851
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
852
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
853
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
854
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
855
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
860
# IT_PO_SUBDIR(DIRNAME)
861
# ---------------------
862
# All po subdirs have to be declared with this macro; the subdir "po" is
863
# declared by IT_PROG_INTLTOOL.
865
AC_DEFUN([IT_PO_SUBDIR],
866
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
868
dnl The following CONFIG_COMMANDS should be exetuted at the very end
869
dnl of config.status.
870
AC_CONFIG_COMMANDS_PRE([
871
AC_CONFIG_COMMANDS([$1/stamp-it], [
872
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
877
'"s|^| $ac_top_srcdir/|" \
878
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
880
if test ! -f "$1/Makefile"; then
881
AC_MSG_ERROR([$1/Makefile is not ready.])
883
mv "$1/Makefile" "$1/Makefile.tmp"
884
[sed '/^POTFILES =/,/[^\\]$/ {
888
' "$1/Makefile.tmp" >"$1/Makefile"]
889
rm -f "$1/Makefile.tmp"
890
mv "$1/stamp-it.tmp" "$1/stamp-it"
897
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
898
# A hint is needed for aclocal from Automake <= 1.9.4:
899
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
902
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
904
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
907
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
908
# -----------------------------------------------------------
909
# If this macro is not defined by Autoconf, define it here.
910
m4_ifdef([AC_PROVIDE_IFELSE],
912
[m4_define([AC_PROVIDE_IFELSE],
913
[m4_ifdef([AC_PROVIDE_$1],
919
AC_DEFUN([AC_PROG_LIBTOOL],
920
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
921
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
922
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
923
AC_PROVIDE_IFELSE([AC_PROG_CXX],
925
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
927
dnl And a similar setup for Fortran 77 support
928
AC_PROVIDE_IFELSE([AC_PROG_F77],
930
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
933
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
934
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
935
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
936
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
938
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
940
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
942
[ifdef([AC_PROG_GCJ],
943
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
944
ifdef([A][M_PROG_GCJ],
945
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
946
ifdef([LT_AC_PROG_GCJ],
947
[define([LT_AC_PROG_GCJ],
948
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
949
])])# AC_PROG_LIBTOOL
954
AC_DEFUN([_AC_PROG_LIBTOOL],
955
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
956
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
957
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
958
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
960
# This can be used to rebuild libtool when needed
961
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
963
# Always use our own libtool.
964
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
967
# Prevent multiple expansion
968
define([AC_PROG_LIBTOOL], [])
974
AC_DEFUN([AC_LIBTOOL_SETUP],
976
AC_REQUIRE([AC_ENABLE_SHARED])dnl
977
AC_REQUIRE([AC_ENABLE_STATIC])dnl
978
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
979
AC_REQUIRE([AC_CANONICAL_HOST])dnl
980
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
981
AC_REQUIRE([AC_PROG_CC])dnl
982
AC_REQUIRE([AC_PROG_LD])dnl
983
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
984
AC_REQUIRE([AC_PROG_NM])dnl
986
AC_REQUIRE([AC_PROG_LN_S])dnl
987
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
988
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
989
AC_REQUIRE([AC_OBJEXT])dnl
990
AC_REQUIRE([AC_EXEEXT])dnl
993
AC_LIBTOOL_SYS_MAX_CMD_LEN
994
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
997
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
998
_LT_AC_PROG_ECHO_BACKSLASH
1002
# AIX sometimes has problems with the GCC collect2 program. For some
1003
# reason, if we set the COLLECT_NAMES environment variable, the problems
1004
# vanish in a puff of smoke.
1005
if test "X${COLLECT_NAMES+set}" != Xset; then
1007
export COLLECT_NAMES
1012
# Sed substitution that helps us do robust quoting. It backslashifies
1013
# metacharacters that are still active within double-quoted strings.
1014
Xsed='sed -e 1s/^X//'
1015
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1017
# Same as above, but do not quote variable references.
1018
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1020
# Sed substitution to delay expansion of an escaped shell variable in a
1021
# double_quote_subst'ed string.
1022
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1024
# Sed substitution to avoid accidental globbing in evaled expressions
1025
no_glob_subst='s/\*/\\\*/g'
1031
default_ofile=libtool
1032
can_build_shared=yes
1034
# All known linkers require a `.a' archive for static linking (except MSVC,
1035
# which needs '.lib').
1037
ltmain="$ac_aux_dir/ltmain.sh"
1038
ofile="$default_ofile"
1039
with_gnu_ld="$lt_cv_prog_gnu_ld"
1041
AC_CHECK_TOOL(AR, ar, false)
1042
AC_CHECK_TOOL(RANLIB, ranlib, :)
1043
AC_CHECK_TOOL(STRIP, strip, :)
1046
old_CFLAGS="$CFLAGS"
1048
# Set sane defaults for various variables
1049
test -z "$AR" && AR=ar
1050
test -z "$AR_FLAGS" && AR_FLAGS=cru
1051
test -z "$AS" && AS=as
1052
test -z "$CC" && CC=cc
1053
test -z "$LTCC" && LTCC=$CC
1054
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1055
test -z "$DLLTOOL" && DLLTOOL=dlltool
1056
test -z "$LD" && LD=ld
1057
test -z "$LN_S" && LN_S="ln -s"
1058
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1059
test -z "$NM" && NM=nm
1060
test -z "$SED" && SED=sed
1061
test -z "$OBJDUMP" && OBJDUMP=objdump
1062
test -z "$RANLIB" && RANLIB=:
1063
test -z "$STRIP" && STRIP=:
1064
test -z "$ac_objext" && ac_objext=o
1066
# Determine commands to create old-style static archives.
1067
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1068
old_postinstall_cmds='chmod 644 $oldlib'
1069
old_postuninstall_cmds=
1071
if test -n "$RANLIB"; then
1074
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1077
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1080
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1083
_LT_CC_BASENAME([$compiler])
1085
# Only perform the check for file, if the check method requires it
1086
case $deplibs_check_method in
1088
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1094
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1095
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1096
enable_win32_dll=yes, enable_win32_dll=no)
1098
AC_ARG_ENABLE([libtool-lock],
1099
[AC_HELP_STRING([--disable-libtool-lock],
1100
[avoid locking (might break parallel builds)])])
1101
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1104
[AC_HELP_STRING([--with-pic],
1105
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1106
[pic_mode="$withval"],
1108
test -z "$pic_mode" && pic_mode=default
1110
# Use C for the default configuration in the libtool script
1112
AC_LIBTOOL_LANG_C_CONFIG
1114
])# AC_LIBTOOL_SETUP
1117
# _LT_AC_SYS_COMPILER
1118
# -------------------
1119
AC_DEFUN([_LT_AC_SYS_COMPILER],
1120
[AC_REQUIRE([AC_PROG_CC])dnl
1122
# If no C compiler was specified, use CC.
1125
# If no C compiler flags were specified, use CFLAGS.
1126
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1128
# Allow CC to be a program name with arguments.
1130
])# _LT_AC_SYS_COMPILER
1133
# _LT_CC_BASENAME(CC)
1134
# -------------------
1135
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1136
AC_DEFUN([_LT_CC_BASENAME],
1137
[for cc_temp in $1""; do
1139
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1140
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1145
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1149
# _LT_COMPILER_BOILERPLATE
1150
# ------------------------
1151
# Check for compiler boilerplate output or warnings with
1152
# the simple compiler test code.
1153
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1154
[ac_outfile=conftest.$ac_objext
1155
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1156
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1157
_lt_compiler_boilerplate=`cat conftest.err`
1159
])# _LT_COMPILER_BOILERPLATE
1162
# _LT_LINKER_BOILERPLATE
1163
# ----------------------
1164
# Check for linker boilerplate output or warnings with
1165
# the simple link test code.
1166
AC_DEFUN([_LT_LINKER_BOILERPLATE],
1167
[ac_outfile=conftest.$ac_objext
1168
printf "$lt_simple_link_test_code" >conftest.$ac_ext
1169
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1170
_lt_linker_boilerplate=`cat conftest.err`
1172
])# _LT_LINKER_BOILERPLATE
1175
# _LT_AC_SYS_LIBPATH_AIX
1176
# ----------------------
1177
# Links a minimal program and checks the executable
1178
# for the system default hardcoded library path. In most cases,
1179
# this is /usr/lib:/lib, but when the MPI compilers are used
1180
# the location of the communication and MPI libs are included too.
1181
# If we don't find anything, use the default library path according
1182
# to the aix ld manual.
1183
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1184
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1185
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1187
# Check for a 64-bit object if we didn't find anything.
1188
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; }
1190
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1191
])# _LT_AC_SYS_LIBPATH_AIX
1194
# _LT_AC_SHELL_INIT(ARG)
1195
# ----------------------
1196
AC_DEFUN([_LT_AC_SHELL_INIT],
1197
[ifdef([AC_DIVERSION_NOTICE],
1198
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1199
[AC_DIVERT_PUSH(NOTICE)])
1202
])# _LT_AC_SHELL_INIT
1205
# _LT_AC_PROG_ECHO_BACKSLASH
1206
# --------------------------
1207
# Add some code to the start of the generated configure script which
1208
# will find an echo command which doesn't interpret backslashes.
1209
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1210
[_LT_AC_SHELL_INIT([
1211
# Check that we are running under the correct shell.
1212
SHELL=${CONFIG_SHELL-/bin/sh}
1216
# Remove one level of quotation (which was required for Make).
1217
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1222
if test "X[$]1" = X--no-reexec; then
1223
# Discard the --no-reexec flag, and continue.
1225
elif test "X[$]1" = X--fallback-echo; then
1226
# Avoid inline document here, it may be left over
1228
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1229
# Yippee, $echo works!
1232
# Restart under the correct shell.
1233
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1236
if test "X[$]1" = X--fallback-echo; then
1237
# used as fallback echo
1245
# The HP-UX ksh and POSIX shell print the target directory to stdout
1247
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1249
if test -z "$ECHO"; then
1250
if test "X${echo_test_string+set}" != Xset; then
1251
# find a string as large as possible, as long as the shell can cope with it
1252
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1253
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1254
if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1255
echo_test_string=`eval $cmd` &&
1256
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1263
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1264
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1265
test "X$echo_testing_string" = "X$echo_test_string"; then
1268
# The Solaris, AIX, and Digital Unix default echo programs unquote
1269
# backslashes. This makes it impossible to quote backslashes using
1270
# echo "$something" | sed 's/\\/\\\\/g'
1272
# So, first we look for a working echo in the user's PATH.
1274
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1275
for dir in $PATH /usr/ucb; do
1277
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1278
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1279
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1280
test "X$echo_testing_string" = "X$echo_test_string"; then
1287
if test "X$echo" = Xecho; then
1288
# We didn't find a better echo, so look for alternatives.
1289
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1290
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1291
test "X$echo_testing_string" = "X$echo_test_string"; then
1292
# This shell has a builtin print -r that does the trick.
1294
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1295
test "X$CONFIG_SHELL" != X/bin/ksh; then
1296
# If we have ksh, try running configure again with it.
1297
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1298
export ORIGINAL_CONFIG_SHELL
1299
CONFIG_SHELL=/bin/ksh
1301
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1305
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1306
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1307
test "X$echo_testing_string" = "X$echo_test_string"; then
1308
# Cool, printf works
1310
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1311
test "X$echo_testing_string" = 'X\t' &&
1312
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1313
test "X$echo_testing_string" = "X$echo_test_string"; then
1314
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1316
SHELL="$CONFIG_SHELL"
1318
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1319
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1320
test "X$echo_testing_string" = 'X\t' &&
1321
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1322
test "X$echo_testing_string" = "X$echo_test_string"; then
1323
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1325
# maybe with a smaller string...
1328
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1329
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1336
if test "$prev" != 'sed 50q "[$]0"'; then
1337
echo_test_string=`eval $prev`
1338
export echo_test_string
1339
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1341
# Oops. We lost completely, so just stick with echo.
1350
# Copy echo and quote the copy suitably for passing to libtool from
1351
# the Makefile, instead of quoting the original, which is used later.
1353
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1354
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1358
])])# _LT_AC_PROG_ECHO_BACKSLASH
1363
AC_DEFUN([_LT_AC_LOCK],
1364
[AC_ARG_ENABLE([libtool-lock],
1365
[AC_HELP_STRING([--disable-libtool-lock],
1366
[avoid locking (might break parallel builds)])])
1367
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1369
# Some flags need to be propagated to the compiler or linker for good
1373
# Find out which ABI we are using.
1374
echo 'int i;' > conftest.$ac_ext
1375
if AC_TRY_EVAL(ac_compile); then
1376
case `/usr/bin/file conftest.$ac_objext` in
1388
# Find out which ABI we are using.
1389
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1390
if AC_TRY_EVAL(ac_compile); then
1391
if test "$lt_cv_prog_gnu_ld" = yes; then
1392
case `/usr/bin/file conftest.$ac_objext` in
1394
LD="${LD-ld} -melf32bsmip"
1397
LD="${LD-ld} -melf32bmipn32"
1400
LD="${LD-ld} -melf64bmip"
1404
case `/usr/bin/file conftest.$ac_objext` in
1420
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1421
# Find out which ABI we are using.
1422
echo 'int i;' > conftest.$ac_ext
1423
if AC_TRY_EVAL(ac_compile); then
1424
case `/usr/bin/file conftest.o` in
1428
LD="${LD-ld} -m elf_i386"
1430
ppc64-*linux*|powerpc64-*linux*)
1431
LD="${LD-ld} -m elf32ppclinux"
1434
LD="${LD-ld} -m elf_s390"
1437
LD="${LD-ld} -m elf32_sparc"
1444
LD="${LD-ld} -m elf_x86_64"
1446
ppc*-*linux*|powerpc*-*linux*)
1447
LD="${LD-ld} -m elf64ppc"
1450
LD="${LD-ld} -m elf64_s390"
1453
LD="${LD-ld} -m elf64_sparc"
1463
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
1464
SAVE_CFLAGS="$CFLAGS"
1465
CFLAGS="$CFLAGS -belf"
1466
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1468
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1470
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1471
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1472
CFLAGS="$SAVE_CFLAGS"
1476
# Find out which ABI we are using.
1477
echo 'int i;' > conftest.$ac_ext
1478
if AC_TRY_EVAL(ac_compile); then
1479
case `/usr/bin/file conftest.o` in
1481
case $lt_cv_prog_gnu_ld in
1482
yes*) LD="${LD-ld} -m elf64_sparc" ;;
1483
*) LD="${LD-ld} -64" ;;
1491
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1492
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1493
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1494
AC_CHECK_TOOL(AS, as, false)
1495
AC_CHECK_TOOL(OBJDUMP, objdump, false)
1500
need_locks="$enable_libtool_lock"
1505
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1506
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1507
# ----------------------------------------------------------------
1508
# Check whether the given compiler option works
1509
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1510
[AC_REQUIRE([LT_AC_PROG_SED])
1511
AC_CACHE_CHECK([$1], [$2],
1513
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1514
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1515
lt_compiler_flag="$3"
1516
# Insert the option either (1) after the last *FLAGS variable, or
1517
# (2) before a word containing "conftest.", or (3) at the end.
1518
# Note that $ac_compile itself does not contain backslashes and begins
1519
# with a dollar sign (not a hyphen), so the echo should work correctly.
1520
# The option is referenced via a variable to avoid confusing sed.
1521
lt_compile=`echo "$ac_compile" | $SED \
1522
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1523
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1524
-e 's:$: $lt_compiler_flag:'`
1525
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1526
(eval "$lt_compile" 2>conftest.err)
1528
cat conftest.err >&AS_MESSAGE_LOG_FD
1529
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1530
if (exit $ac_status) && test -s "$ac_outfile"; then
1531
# The compiler can only warn and ignore the option if not recognized
1532
# So say no if there are warnings other than the usual output.
1533
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1534
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1535
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1542
if test x"[$]$2" = xyes; then
1543
ifelse([$5], , :, [$5])
1545
ifelse([$6], , :, [$6])
1547
])# AC_LIBTOOL_COMPILER_OPTION
1550
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1551
# [ACTION-SUCCESS], [ACTION-FAILURE])
1552
# ------------------------------------------------------------
1553
# Check whether the given compiler option works
1554
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1555
[AC_CACHE_CHECK([$1], [$2],
1557
save_LDFLAGS="$LDFLAGS"
1558
LDFLAGS="$LDFLAGS $3"
1559
printf "$lt_simple_link_test_code" > conftest.$ac_ext
1560
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1561
# The linker can only warn and ignore the option if not recognized
1562
# So say no if there are warnings
1563
if test -s conftest.err; then
1564
# Append any errors to the config.log.
1565
cat conftest.err 1>&AS_MESSAGE_LOG_FD
1566
$echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1567
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1568
if diff conftest.exp conftest.er2 >/dev/null; then
1576
LDFLAGS="$save_LDFLAGS"
1579
if test x"[$]$2" = xyes; then
1580
ifelse([$4], , :, [$4])
1582
ifelse([$5], , :, [$5])
1584
])# AC_LIBTOOL_LINKER_OPTION
1587
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1588
# --------------------------
1589
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1590
[# find the maximum length of command line arguments
1591
AC_MSG_CHECKING([the maximum length of command line arguments])
1592
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1598
# On DJGPP, this test can blow up pretty badly due to problems in libc
1599
# (any single argument exceeding 2000 bytes causes a buffer overrun
1600
# during glob expansion). Even if it were fixed, the result of this
1601
# check would be larger than it should be.
1602
lt_cv_sys_max_cmd_len=12288; # 12K is about right
1606
# Under GNU Hurd, this test is not required because there is
1607
# no limit to the length of command line arguments.
1608
# Libtool will interpret -1 as no limit whatsoever
1609
lt_cv_sys_max_cmd_len=-1;
1613
# On Win9x/ME, this test blows up -- it succeeds, but takes
1614
# about 5 minutes as the teststring grows exponentially.
1615
# Worse, since 9x/ME are not pre-emptively multitasking,
1616
# you end up with a "frozen" computer, even though with patience
1617
# the test eventually succeeds (with a max line length of 256k).
1618
# Instead, let's just punt: use the minimum linelength reported by
1619
# all of the supported platforms: 8192 (on NT/2K/XP).
1620
lt_cv_sys_max_cmd_len=8192;
1624
# On AmigaOS with pdksh, this test takes hours, literally.
1625
# So we just punt and use a minimum line length of 8192.
1626
lt_cv_sys_max_cmd_len=8192;
1629
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1630
# This has been around since 386BSD, at least. Likely further.
1631
if test -x /sbin/sysctl; then
1632
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1633
elif test -x /usr/sbin/sysctl; then
1634
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1636
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1638
# And add a safety zone
1639
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1640
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1644
# We know the value 262144 and hardcode it with a safety zone (like BSD)
1645
lt_cv_sys_max_cmd_len=196608
1649
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1650
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1651
# nice to cause kernel panics so lets avoid the loop below.
1652
# First set a reasonable default.
1653
lt_cv_sys_max_cmd_len=16384
1655
if test -x /sbin/sysconfig; then
1656
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1657
*1*) lt_cv_sys_max_cmd_len=-1 ;;
1662
lt_cv_sys_max_cmd_len=102400
1664
sysv5* | sco5v6* | sysv4.2uw2*)
1665
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1666
if test -n "$kargmax"; then
1667
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1669
lt_cv_sys_max_cmd_len=32768
1673
# If test is not a shell built-in, we'll probably end up computing a
1674
# maximum length that is only half of the actual maximum length, but
1676
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1677
while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1678
= "XX$teststring") >/dev/null 2>&1 &&
1679
new_result=`expr "X$teststring" : ".*" 2>&1` &&
1680
lt_cv_sys_max_cmd_len=$new_result &&
1681
test $i != 17 # 1/2 MB should be enough
1684
teststring=$teststring$teststring
1687
# Add a significant safety factor because C++ compilers can tack on massive
1688
# amounts of additional arguments before passing them to the linker.
1689
# It appears as though 1/2 is a usable value.
1690
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1694
if test -n $lt_cv_sys_max_cmd_len ; then
1695
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1699
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1702
# _LT_AC_CHECK_DLFCN
1703
# ------------------
1704
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1705
[AC_CHECK_HEADERS(dlfcn.h)dnl
1706
])# _LT_AC_CHECK_DLFCN
1709
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1710
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1711
# ---------------------------------------------------------------------
1712
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1713
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1714
if test "$cross_compiling" = yes; then :
1717
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1718
lt_status=$lt_dlunknown
1719
cat > conftest.$ac_ext <<EOF
1720
[#line __oline__ "configure"
1721
#include "confdefs.h"
1730
# define LT_DLGLOBAL RTLD_GLOBAL
1733
# define LT_DLGLOBAL DL_GLOBAL
1735
# define LT_DLGLOBAL 0
1739
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1740
find out it does not work in some platform. */
1741
#ifndef LT_DLLAZY_OR_NOW
1743
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1746
# define LT_DLLAZY_OR_NOW DL_LAZY
1749
# define LT_DLLAZY_OR_NOW RTLD_NOW
1752
# define LT_DLLAZY_OR_NOW DL_NOW
1754
# define LT_DLLAZY_OR_NOW 0
1762
extern "C" void exit (int);
1765
void fnord() { int i=42;}
1768
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1769
int status = $lt_dlunknown;
1773
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1774
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1775
/* dlclose (self); */
1783
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1784
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1787
x$lt_dlno_uscore) $1 ;;
1788
x$lt_dlneed_uscore) $2 ;;
1789
x$lt_dlunknown|x*) $3 ;;
1792
# compilation failed
1797
])# _LT_AC_TRY_DLOPEN_SELF
1800
# AC_LIBTOOL_DLOPEN_SELF
1801
# ----------------------
1802
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1803
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1804
if test "x$enable_dlopen" != xyes; then
1805
enable_dlopen=unknown
1806
enable_dlopen_self=unknown
1807
enable_dlopen_self_static=unknown
1814
lt_cv_dlopen="load_add_on"
1816
lt_cv_dlopen_self=yes
1820
lt_cv_dlopen="LoadLibrary"
1825
lt_cv_dlopen="dlopen"
1830
# if libdl is installed we need to link against it
1831
AC_CHECK_LIB([dl], [dlopen],
1832
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1835
lt_cv_dlopen_self=yes
1840
AC_CHECK_FUNC([shl_load],
1841
[lt_cv_dlopen="shl_load"],
1842
[AC_CHECK_LIB([dld], [shl_load],
1843
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1844
[AC_CHECK_FUNC([dlopen],
1845
[lt_cv_dlopen="dlopen"],
1846
[AC_CHECK_LIB([dl], [dlopen],
1847
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1848
[AC_CHECK_LIB([svld], [dlopen],
1849
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1850
[AC_CHECK_LIB([dld], [dld_link],
1851
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1860
if test "x$lt_cv_dlopen" != xno; then
1866
case $lt_cv_dlopen in
1868
save_CPPFLAGS="$CPPFLAGS"
1869
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1871
save_LDFLAGS="$LDFLAGS"
1872
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1875
LIBS="$lt_cv_dlopen_libs $LIBS"
1877
AC_CACHE_CHECK([whether a program can dlopen itself],
1878
lt_cv_dlopen_self, [dnl
1879
_LT_AC_TRY_DLOPEN_SELF(
1880
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1881
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1884
if test "x$lt_cv_dlopen_self" = xyes; then
1885
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1886
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1887
lt_cv_dlopen_self_static, [dnl
1888
_LT_AC_TRY_DLOPEN_SELF(
1889
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1890
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1894
CPPFLAGS="$save_CPPFLAGS"
1895
LDFLAGS="$save_LDFLAGS"
1900
case $lt_cv_dlopen_self in
1901
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1902
*) enable_dlopen_self=unknown ;;
1905
case $lt_cv_dlopen_self_static in
1906
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1907
*) enable_dlopen_self_static=unknown ;;
1910
])# AC_LIBTOOL_DLOPEN_SELF
1913
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1914
# ---------------------------------
1915
# Check to see if options -c and -o are simultaneously supported by compiler
1916
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1917
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1918
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1919
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1920
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1921
$rm -r conftest 2>/dev/null
1925
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1927
lt_compiler_flag="-o out/conftest2.$ac_objext"
1928
# Insert the option either (1) after the last *FLAGS variable, or
1929
# (2) before a word containing "conftest.", or (3) at the end.
1930
# Note that $ac_compile itself does not contain backslashes and begins
1931
# with a dollar sign (not a hyphen), so the echo should work correctly.
1932
lt_compile=`echo "$ac_compile" | $SED \
1933
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1934
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1935
-e 's:$: $lt_compiler_flag:'`
1936
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1937
(eval "$lt_compile" 2>out/conftest.err)
1939
cat out/conftest.err >&AS_MESSAGE_LOG_FD
1940
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1941
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1943
# The compiler can only warn and ignore the option if not recognized
1944
# So say no if there are warnings
1945
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1946
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1947
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1948
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1951
chmod u+w . 2>&AS_MESSAGE_LOG_FD
1953
# SGI C++ compiler will create directory out/ii_files/ for
1954
# template instantiation
1955
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1956
$rm out/* && rmdir out
1961
])# AC_LIBTOOL_PROG_CC_C_O
1964
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1965
# -----------------------------------------
1966
# Check to see if we can do hard links to lock some files if needed
1967
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1968
[AC_REQUIRE([_LT_AC_LOCK])dnl
1970
hard_links="nottested"
1971
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1972
# do not overwrite the value of need_locks provided by the user
1973
AC_MSG_CHECKING([if we can lock with hard links])
1976
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1978
ln conftest.a conftest.b 2>&5 || hard_links=no
1979
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1980
AC_MSG_RESULT([$hard_links])
1981
if test "$hard_links" = no; then
1982
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1988
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1993
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1994
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1995
[rm -f .libs 2>/dev/null
1996
mkdir .libs 2>/dev/null
1997
if test -d .libs; then
2000
# MS-DOS does not allow filenames that begin with a dot.
2003
rmdir .libs 2>/dev/null])
2004
objdir=$lt_cv_objdir
2005
])# AC_LIBTOOL_OBJDIR
2008
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2009
# ----------------------------------------------
2010
# Check hardcoding attributes.
2011
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2012
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2013
_LT_AC_TAGVAR(hardcode_action, $1)=
2014
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2015
test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2016
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2018
# We can hardcode non-existant directories.
2019
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2020
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2021
# have to relink, otherwise we might link with an installed library
2022
# when we should be linking with a yet-to-be-installed one
2023
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2024
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2025
# Linking always hardcodes the temporary library directory.
2026
_LT_AC_TAGVAR(hardcode_action, $1)=relink
2028
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2029
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
2032
# We cannot hardcode anything, or else we can only hardcode existing
2034
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2036
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2038
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2039
# Fast installation is not supported
2040
enable_fast_install=no
2041
elif test "$shlibpath_overrides_runpath" = yes ||
2042
test "$enable_shared" = no; then
2043
# Fast installation is not necessary
2044
enable_fast_install=needless
2046
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2049
# AC_LIBTOOL_SYS_LIB_STRIP
2050
# ------------------------
2051
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2054
AC_MSG_CHECKING([whether stripping libraries is possible])
2055
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2056
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2057
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2058
AC_MSG_RESULT([yes])
2060
# FIXME - insert some real tests, host_os isn't really good enough
2063
if test -n "$STRIP" ; then
2064
striplib="$STRIP -x"
2065
AC_MSG_RESULT([yes])
2075
])# AC_LIBTOOL_SYS_LIB_STRIP
2078
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2079
# -----------------------------
2080
# PORTME Fill in your ld.so characteristics
2081
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2082
[AC_MSG_CHECKING([dynamic linker characteristics])
2084
libname_spec='lib$name'
2092
shlibpath_overrides_runpath=unknown
2094
dynamic_linker="$host_os ld.so"
2095
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2096
if test "$GCC" = yes; then
2097
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2098
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2099
# if the path contains ";" then we assume it to be the separator
2100
# otherwise default to the standard path separator (i.e. ":") - it is
2101
# assumed that no part of a normal pathname contains ";" but that should
2102
# okay in the real world where ";" in dirpaths is itself problematic.
2103
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2105
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2108
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2110
need_lib_prefix=unknown
2111
hardcode_into_libs=no
2113
# when you set need_version to no, make sure it does not cause -set_version
2114
# flags to be left without arguments
2115
need_version=unknown
2120
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2121
shlibpath_var=LIBPATH
2123
# AIX 3 has no versioning support, so we append a major version to the name.
2124
soname_spec='${libname}${release}${shared_ext}$major'
2131
hardcode_into_libs=yes
2132
if test "$host_cpu" = ia64; then
2133
# AIX 5 supports IA64
2134
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2135
shlibpath_var=LD_LIBRARY_PATH
2137
# With GCC up to 2.95.x, collect2 would create an import file
2138
# for dependence libraries. The import file would start with
2139
# the line `#! .'. This would cause the generated library to
2140
# depend on `.', always an invalid library. This was fixed in
2141
# development snapshots of GCC prior to 3.0.
2143
aix4 | aix4.[[01]] | aix4.[[01]].*)
2144
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2146
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2153
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2154
# soname into executable. Probably we can add versioning support to
2155
# collect2, so additional links can be useful in future.
2156
if test "$aix_use_runtimelinking" = yes; then
2157
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2158
# instead of lib<name>.a to let people know that these are not
2159
# typical AIX shared libraries.
2160
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2162
# We preserve .a as extension for shared libraries through AIX4.2
2163
# and later when we are not doing run time linking.
2164
library_names_spec='${libname}${release}.a $libname.a'
2165
soname_spec='${libname}${release}${shared_ext}$major'
2167
shlibpath_var=LIBPATH
2172
library_names_spec='$libname.ixlibrary $libname.a'
2173
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2174
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'
2178
library_names_spec='${libname}${shared_ext}'
2179
dynamic_linker="$host_os ld.so"
2180
shlibpath_var=LIBRARY_PATH
2186
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2187
soname_spec='${libname}${release}${shared_ext}$major'
2188
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2189
shlibpath_var=LD_LIBRARY_PATH
2190
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2191
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2192
# the default ld.so.conf also contains /usr/contrib/lib and
2193
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2194
# libtool to hard-code these into programs
2197
cygwin* | mingw* | pw32*)
2198
version_type=windows
2203
case $GCC,$host_os in
2204
yes,cygwin* | yes,mingw* | yes,pw32*)
2205
library_names_spec='$libname.dll.a'
2206
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2207
postinstall_cmds='base_file=`basename \${file}`~
2208
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2209
dldir=$destdir/`dirname \$dlpath`~
2210
test -d \$dldir || mkdir -p \$dldir~
2211
$install_prog $dir/$dlname \$dldir/$dlname~
2212
chmod a+x \$dldir/$dlname'
2213
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2214
dlpath=$dir/\$dldll~
2216
shlibpath_overrides_runpath=yes
2220
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
2221
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2222
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2225
# MinGW DLLs use traditional 'lib' prefix
2226
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2227
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2228
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2229
# It is most probably a Windows format PATH printed by
2230
# mingw gcc, but we are running on Cygwin. Gcc prints its search
2231
# path with ; separators, and with drive letters. We can handle the
2232
# drive letters (cygwin fileutils understands them), so leave them,
2233
# especially as we might pass files found there to a mingw objdump,
2234
# which wouldn't understand a cygwinified path. Ahh.
2235
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2237
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2241
# pw32 DLLs use 'pw' prefix rather than 'lib'
2242
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2248
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2251
dynamic_linker='Win32 ld.exe'
2252
# FIXME: first we should search . and the directory the executable is in
2256
darwin* | rhapsody*)
2257
dynamic_linker="$host_os dyld"
2261
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2262
soname_spec='${libname}${release}${major}$shared_ext'
2263
shlibpath_overrides_runpath=yes
2264
shlibpath_var=DYLD_LIBRARY_PATH
2265
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2266
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2267
if test "$GCC" = yes; then
2268
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"`
2270
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2272
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2279
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2280
soname_spec='${libname}${release}${shared_ext}$major'
2281
shlibpath_var=LD_LIBRARY_PATH
2288
freebsd* | dragonfly*)
2289
# DragonFly does not have aout. When/if they implement a new
2290
# versioning mechanism, adjust this.
2291
if test -x /usr/bin/objformat; then
2292
objformat=`/usr/bin/objformat`
2295
freebsd[[123]]*) objformat=aout ;;
2299
version_type=freebsd-$objformat
2300
case $version_type in
2302
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2307
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2311
shlibpath_var=LD_LIBRARY_PATH
2314
shlibpath_overrides_runpath=yes
2316
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2317
shlibpath_overrides_runpath=yes
2318
hardcode_into_libs=yes
2320
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2321
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2322
shlibpath_overrides_runpath=no
2323
hardcode_into_libs=yes
2325
freebsd*) # from 4.6 on
2326
shlibpath_overrides_runpath=yes
2327
hardcode_into_libs=yes
2336
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2337
soname_spec='${libname}${release}${shared_ext}$major'
2338
shlibpath_var=LD_LIBRARY_PATH
2339
hardcode_into_libs=yes
2342
hpux9* | hpux10* | hpux11*)
2343
# Give a soname corresponding to the major version so that dld.sl refuses to
2344
# link against other versions.
2351
hardcode_into_libs=yes
2352
dynamic_linker="$host_os dld.so"
2353
shlibpath_var=LD_LIBRARY_PATH
2354
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2355
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2356
soname_spec='${libname}${release}${shared_ext}$major'
2357
if test "X$HPUX_IA64_MODE" = X32; then
2358
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2360
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2362
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2366
hardcode_into_libs=yes
2367
dynamic_linker="$host_os dld.sl"
2368
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2369
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2370
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2371
soname_spec='${libname}${release}${shared_ext}$major'
2372
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2373
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2377
dynamic_linker="$host_os dld.sl"
2378
shlibpath_var=SHLIB_PATH
2379
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2380
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2381
soname_spec='${libname}${release}${shared_ext}$major'
2384
# HP-UX runs *really* slowly unless shared libraries are mode 555.
2385
postinstall_cmds='chmod 555 $lib'
2392
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2393
soname_spec='${libname}${release}${shared_ext}$major'
2394
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2395
shlibpath_var=LD_LIBRARY_PATH
2396
shlibpath_overrides_runpath=no
2397
hardcode_into_libs=yes
2400
irix5* | irix6* | nonstopux*)
2402
nonstopux*) version_type=nonstopux ;;
2404
if test "$lt_cv_prog_gnu_ld" = yes; then
2412
soname_spec='${libname}${release}${shared_ext}$major'
2413
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2415
irix5* | nonstopux*)
2419
case $LD in # libtool.m4 will add one of these switches to LD
2420
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2421
libsuff= shlibsuff= libmagic=32-bit;;
2422
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2423
libsuff=32 shlibsuff=N32 libmagic=N32;;
2424
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2425
libsuff=64 shlibsuff=64 libmagic=64-bit;;
2426
*) libsuff= shlibsuff= libmagic=never-match;;
2430
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2431
shlibpath_overrides_runpath=no
2432
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2433
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2434
hardcode_into_libs=yes
2437
# No shared lib support for Linux oldld, aout, or coff.
2438
linux*oldld* | linux*aout* | linux*coff*)
2442
# This must be Linux ELF.
2443
linux* | k*bsd*-gnu)
2447
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2448
soname_spec='${libname}${release}${shared_ext}$major'
2449
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2450
shlibpath_var=LD_LIBRARY_PATH
2451
shlibpath_overrides_runpath=no
2452
# This implies no fast_install, which is unacceptable.
2453
# Some rework will be needed to allow for fast_install
2454
# before this can be enabled.
2455
hardcode_into_libs=yes
2457
# Append ld.so.conf contents to the search path
2458
if test -f /etc/ld.so.conf; then
2459
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2460
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2463
# We used to test for /lib/ld.so.1 and disable shared libraries on
2464
# powerpc, because MkLinux only supported shared libraries with the
2465
# GNU dynamic linker. Since this was broken with cross compilers,
2466
# most powerpc-linux boxes support dynamic linking these days and
2467
# people can always --disable-shared, the test was removed, and we
2468
# assume the GNU/Linux dynamic linker is in use.
2469
dynamic_linker='GNU/Linux ld.so'
2476
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2477
soname_spec='${libname}${release}${shared_ext}$major'
2478
shlibpath_var=LD_LIBRARY_PATH
2479
shlibpath_overrides_runpath=no
2480
hardcode_into_libs=yes
2481
dynamic_linker='NetBSD ld.elf_so'
2488
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2489
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2490
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2491
dynamic_linker='NetBSD (a.out) ld.so'
2493
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2494
soname_spec='${libname}${release}${shared_ext}$major'
2495
dynamic_linker='NetBSD ld.elf_so'
2497
shlibpath_var=LD_LIBRARY_PATH
2498
shlibpath_overrides_runpath=yes
2499
hardcode_into_libs=yes
2504
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2505
shlibpath_var=LD_LIBRARY_PATH
2506
shlibpath_overrides_runpath=yes
2513
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2514
soname_spec='${libname}${release}${shared_ext}$major'
2515
shlibpath_var=LD_LIBRARY_PATH
2516
shlibpath_overrides_runpath=yes
2521
sys_lib_dlsearch_path_spec="/usr/lib"
2523
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2525
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2526
*) need_version=no ;;
2528
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2529
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2530
shlibpath_var=LD_LIBRARY_PATH
2531
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2533
openbsd2.[[89]] | openbsd2.[[89]].*)
2534
shlibpath_overrides_runpath=no
2537
shlibpath_overrides_runpath=yes
2541
shlibpath_overrides_runpath=yes
2546
libname_spec='$name'
2549
library_names_spec='$libname${shared_ext} $libname.a'
2550
dynamic_linker='OS/2 ld.exe'
2551
shlibpath_var=LIBPATH
2554
osf3* | osf4* | osf5*)
2558
soname_spec='${libname}${release}${shared_ext}$major'
2559
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2560
shlibpath_var=LD_LIBRARY_PATH
2561
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2562
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2569
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2570
soname_spec='${libname}${release}${shared_ext}$major'
2571
shlibpath_var=LD_LIBRARY_PATH
2572
shlibpath_overrides_runpath=yes
2573
hardcode_into_libs=yes
2574
# ldd complains unless libraries are executable
2575
postinstall_cmds='chmod +x $lib'
2580
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2581
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2582
shlibpath_var=LD_LIBRARY_PATH
2583
shlibpath_overrides_runpath=yes
2584
if test "$with_gnu_ld" = yes; then
2592
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2593
soname_spec='${libname}${release}${shared_ext}$major'
2594
shlibpath_var=LD_LIBRARY_PATH
2595
case $host_vendor in
2597
shlibpath_overrides_runpath=no
2599
export_dynamic_flag_spec='${wl}-Blargedynsym'
2600
runpath_var=LD_RUN_PATH
2608
shlibpath_overrides_runpath=no
2609
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2615
if test -d /usr/nec ;then
2617
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2618
soname_spec='$libname${shared_ext}.$major'
2619
shlibpath_var=LD_LIBRARY_PATH
2623
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2624
version_type=freebsd-elf
2627
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2628
soname_spec='${libname}${release}${shared_ext}$major'
2629
shlibpath_var=LD_LIBRARY_PATH
2630
hardcode_into_libs=yes
2631
if test "$with_gnu_ld" = yes; then
2632
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2633
shlibpath_overrides_runpath=no
2635
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2636
shlibpath_overrides_runpath=yes
2639
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2643
sys_lib_dlsearch_path_spec='/usr/lib'
2648
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2649
soname_spec='${libname}${release}${shared_ext}$major'
2650
shlibpath_var=LD_LIBRARY_PATH
2657
AC_MSG_RESULT([$dynamic_linker])
2658
test "$dynamic_linker" = no && can_build_shared=no
2660
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2661
if test "$GCC" = yes; then
2662
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2664
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2669
AC_DEFUN([_LT_AC_TAGCONFIG],
2670
[AC_ARG_WITH([tags],
2671
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2672
[include additional configurations @<:@automatic@:>@])],
2673
[tagnames="$withval"])
2675
if test -f "$ltmain" && test -n "$tagnames"; then
2676
if test ! -f "${ofile}"; then
2677
AC_MSG_WARN([output file `$ofile' does not exist])
2680
if test -z "$LTCC"; then
2681
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2682
if test -z "$LTCC"; then
2683
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2685
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2688
if test -z "$LTCFLAGS"; then
2689
eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2692
# Extract list of available tagged configurations in $ofile.
2693
# Note that this assumes the entire list is on one line.
2694
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2696
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2697
for tagname in $tagnames; do
2699
# Check whether tagname contains only valid characters
2700
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2702
*) AC_MSG_ERROR([invalid tag name: $tagname])
2706
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2708
AC_MSG_ERROR([tag name \"$tagname\" already exists])
2711
# Update the list of available tags.
2712
if test -n "$tagname"; then
2713
echo appending configuration tag \"$tagname\" to $ofile
2717
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2718
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2719
(test "X$CXX" != "Xg++"))) ; then
2720
AC_LIBTOOL_LANG_CXX_CONFIG
2727
if test -n "$F77" && test "X$F77" != "Xno"; then
2728
AC_LIBTOOL_LANG_F77_CONFIG
2735
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2736
AC_LIBTOOL_LANG_GCJ_CONFIG
2743
AC_LIBTOOL_LANG_RC_CONFIG
2747
AC_MSG_ERROR([Unsupported tag name: $tagname])
2751
# Append the new tag name to the list of available tags.
2752
if test -n "$tagname" ; then
2753
available_tags="$available_tags $tagname"
2759
# Now substitute the updated list of available tags.
2760
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2761
mv "${ofile}T" "$ofile"
2765
AC_MSG_ERROR([unable to update list of available tagged configurations.])
2768
])# _LT_AC_TAGCONFIG
2773
# enable checks for dlopen support
2774
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2775
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2776
])# AC_LIBTOOL_DLOPEN
2779
# AC_LIBTOOL_WIN32_DLL
2780
# --------------------
2781
# declare package support for building win32 DLLs
2782
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2783
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2784
])# AC_LIBTOOL_WIN32_DLL
2787
# AC_ENABLE_SHARED([DEFAULT])
2788
# ---------------------------
2789
# implement the --enable-shared flag
2790
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2791
AC_DEFUN([AC_ENABLE_SHARED],
2792
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2793
AC_ARG_ENABLE([shared],
2794
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2795
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2796
[p=${PACKAGE-default}
2798
yes) enable_shared=yes ;;
2799
no) enable_shared=no ;;
2802
# Look at the argument we got. We use all the common list separators.
2803
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2804
for pkg in $enableval; do
2806
if test "X$pkg" = "X$p"; then
2813
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2814
])# AC_ENABLE_SHARED
2819
# set the default shared flag to --disable-shared
2820
AC_DEFUN([AC_DISABLE_SHARED],
2821
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2822
AC_ENABLE_SHARED(no)
2823
])# AC_DISABLE_SHARED
2826
# AC_ENABLE_STATIC([DEFAULT])
2827
# ---------------------------
2828
# implement the --enable-static flag
2829
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2830
AC_DEFUN([AC_ENABLE_STATIC],
2831
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2832
AC_ARG_ENABLE([static],
2833
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2834
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2835
[p=${PACKAGE-default}
2837
yes) enable_static=yes ;;
2838
no) enable_static=no ;;
2841
# Look at the argument we got. We use all the common list separators.
2842
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2843
for pkg in $enableval; do
2845
if test "X$pkg" = "X$p"; then
2852
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
2853
])# AC_ENABLE_STATIC
2858
# set the default static flag to --disable-static
2859
AC_DEFUN([AC_DISABLE_STATIC],
2860
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2861
AC_ENABLE_STATIC(no)
2862
])# AC_DISABLE_STATIC
2865
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2866
# ---------------------------------
2867
# implement the --enable-fast-install flag
2868
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2869
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2870
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2871
AC_ARG_ENABLE([fast-install],
2872
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2873
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2874
[p=${PACKAGE-default}
2876
yes) enable_fast_install=yes ;;
2877
no) enable_fast_install=no ;;
2879
enable_fast_install=no
2880
# Look at the argument we got. We use all the common list separators.
2881
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2882
for pkg in $enableval; do
2884
if test "X$pkg" = "X$p"; then
2885
enable_fast_install=yes
2891
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2892
])# AC_ENABLE_FAST_INSTALL
2895
# AC_DISABLE_FAST_INSTALL
2896
# -----------------------
2897
# set the default to --disable-fast-install
2898
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2899
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2900
AC_ENABLE_FAST_INSTALL(no)
2901
])# AC_DISABLE_FAST_INSTALL
2904
# AC_LIBTOOL_PICMODE([MODE])
2905
# --------------------------
2906
# implement the --with-pic flag
2907
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2908
AC_DEFUN([AC_LIBTOOL_PICMODE],
2909
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2910
pic_mode=ifelse($#,1,$1,default)
2911
])# AC_LIBTOOL_PICMODE
2916
# This is predefined starting with Autoconf 2.54, so this conditional
2917
# definition can be removed once we require Autoconf 2.54 or later.
2918
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2919
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2920
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2921
then ac_cv_prog_egrep='grep -E'
2922
else ac_cv_prog_egrep='egrep'
2924
EGREP=$ac_cv_prog_egrep
2929
# AC_PATH_TOOL_PREFIX
2930
# -------------------
2931
# find a file program which can recognise shared library
2932
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2933
[AC_REQUIRE([AC_PROG_EGREP])dnl
2934
AC_MSG_CHECKING([for $1])
2935
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2937
[[\\/*] | ?:[\\/]*])
2938
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2941
lt_save_MAGIC_CMD="$MAGIC_CMD"
2942
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2943
dnl $ac_dummy forces splitting on constant user-supplied paths.
2944
dnl POSIX.2 word splitting is done only on the output of word expansions,
2945
dnl not every word. This closes a longstanding sh security hole.
2946
ac_dummy="ifelse([$2], , $PATH, [$2])"
2947
for ac_dir in $ac_dummy; do
2949
test -z "$ac_dir" && ac_dir=.
2950
if test -f $ac_dir/$1; then
2951
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2952
if test -n "$file_magic_test_file"; then
2953
case $deplibs_check_method in
2955
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2956
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2957
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2958
$EGREP "$file_magic_regex" > /dev/null; then
2963
*** Warning: the command libtool uses to detect shared libraries,
2964
*** $file_magic_cmd, produces output that libtool cannot recognize.
2965
*** The result is that libtool may fail to recognize shared libraries
2966
*** as such. This will affect the creation of libtool libraries that
2967
*** depend on shared libraries, but programs linked with such libtool
2968
*** libraries will work regardless of this problem. Nevertheless, you
2969
*** may want to report the problem to your system manager and/or to
2970
*** bug-libtool@gnu.org
2980
MAGIC_CMD="$lt_save_MAGIC_CMD"
2983
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2984
if test -n "$MAGIC_CMD"; then
2985
AC_MSG_RESULT($MAGIC_CMD)
2989
])# AC_PATH_TOOL_PREFIX
2994
# find a file program which can recognise a shared library
2995
AC_DEFUN([AC_PATH_MAGIC],
2996
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2997
if test -z "$lt_cv_path_MAGIC_CMD"; then
2998
if test -n "$ac_tool_prefix"; then
2999
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3009
# find the pathname to the GNU or non-GNU linker
3010
AC_DEFUN([AC_PROG_LD],
3011
[AC_ARG_WITH([gnu-ld],
3012
[AC_HELP_STRING([--with-gnu-ld],
3013
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3014
[test "$withval" = no || with_gnu_ld=yes],
3016
AC_REQUIRE([LT_AC_PROG_SED])dnl
3017
AC_REQUIRE([AC_PROG_CC])dnl
3018
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3019
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3021
if test "$GCC" = yes; then
3022
# Check if gcc -print-prog-name=ld gives a path.
3023
AC_MSG_CHECKING([for ld used by $CC])
3026
# gcc leaves a trailing carriage return which upsets mingw
3027
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3029
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3032
# Accept absolute paths.
3033
[[\\/]]* | ?:[[\\/]]*)
3034
re_direlt='/[[^/]][[^/]]*/\.\./'
3035
# Canonicalize the pathname of ld
3036
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3037
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3038
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3040
test -z "$LD" && LD="$ac_prog"
3043
# If it fails, then pretend we aren't using GCC.
3047
# If it is relative, then search for the first ld in PATH.
3051
elif test "$with_gnu_ld" = yes; then
3052
AC_MSG_CHECKING([for GNU ld])
3054
AC_MSG_CHECKING([for non-GNU ld])
3056
AC_CACHE_VAL(lt_cv_path_LD,
3057
[if test -z "$LD"; then
3058
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3059
for ac_dir in $PATH; do
3061
test -z "$ac_dir" && ac_dir=.
3062
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3063
lt_cv_path_LD="$ac_dir/$ac_prog"
3064
# Check to see if the program is GNU ld. I'd rather use --version,
3065
# but apparently some variants of GNU ld only accept -v.
3066
# Break only if it was the GNU/non-GNU ld that we prefer.
3067
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3068
*GNU* | *'with BFD'*)
3069
test "$with_gnu_ld" != no && break
3072
test "$with_gnu_ld" != yes && break
3079
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3082
if test -n "$LD"; then
3087
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3094
AC_DEFUN([AC_PROG_LD_GNU],
3095
[AC_REQUIRE([AC_PROG_EGREP])dnl
3096
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3097
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3098
case `$LD -v 2>&1 </dev/null` in
3099
*GNU* | *'with BFD'*)
3100
lt_cv_prog_gnu_ld=yes
3103
lt_cv_prog_gnu_ld=no
3106
with_gnu_ld=$lt_cv_prog_gnu_ld
3110
# AC_PROG_LD_RELOAD_FLAG
3111
# ----------------------
3112
# find reload flag for linker
3113
# -- PORTME Some linkers may need a different reload flag.
3114
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3115
[AC_CACHE_CHECK([for $LD option to reload object files],
3116
lt_cv_ld_reload_flag,
3117
[lt_cv_ld_reload_flag='-r'])
3118
reload_flag=$lt_cv_ld_reload_flag
3119
case $reload_flag in
3121
*) reload_flag=" $reload_flag" ;;
3123
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3126
if test "$GCC" = yes; then
3127
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3129
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3133
])# AC_PROG_LD_RELOAD_FLAG
3136
# AC_DEPLIBS_CHECK_METHOD
3137
# -----------------------
3138
# how to check for library dependencies
3139
# -- PORTME fill in with the dynamic library characteristics
3140
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3141
[AC_CACHE_CHECK([how to recognise dependent libraries],
3142
lt_cv_deplibs_check_method,
3143
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3144
lt_cv_file_magic_test_file=
3145
lt_cv_deplibs_check_method='unknown'
3146
# Need to set the preceding variable on all platforms that support
3147
# interlibrary dependencies.
3148
# 'none' -- dependencies not supported.
3149
# `unknown' -- same as none, but documents that we really don't know.
3150
# 'pass_all' -- all dependencies passed with no checks.
3151
# 'test_compile' -- check by making test program.
3152
# 'file_magic [[regex]]' -- check by looking for files in library path
3153
# which responds to the $file_magic_cmd with a given extended regex.
3154
# If you have `file' or equivalent on your system and you're not sure
3155
# whether `pass_all' will *always* work, you probably want this one.
3159
lt_cv_deplibs_check_method=pass_all
3163
lt_cv_deplibs_check_method=pass_all
3167
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3168
lt_cv_file_magic_cmd='/usr/bin/file -L'
3169
lt_cv_file_magic_test_file=/shlib/libc.so
3173
# func_win32_libid is a shell function defined in ltmain.sh
3174
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3175
lt_cv_file_magic_cmd='func_win32_libid'
3179
# Base MSYS/MinGW do not provide the 'file' command needed by
3180
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
3181
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3182
lt_cv_file_magic_cmd='$OBJDUMP -f'
3185
darwin* | rhapsody*)
3186
lt_cv_deplibs_check_method=pass_all
3189
freebsd* | dragonfly*)
3190
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3193
# Not sure whether the presence of OpenBSD here was a mistake.
3194
# Let's accept both of them until this is cleared up.
3195
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3196
lt_cv_file_magic_cmd=/usr/bin/file
3197
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3201
lt_cv_deplibs_check_method=pass_all
3206
lt_cv_deplibs_check_method=pass_all
3209
hpux10.20* | hpux11*)
3210
lt_cv_file_magic_cmd=/usr/bin/file
3213
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3214
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3217
[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]']
3218
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3221
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3222
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3228
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3229
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3232
irix5* | irix6* | nonstopux*)
3234
*-32|*"-32 ") libmagic=32-bit;;
3235
*-n32|*"-n32 ") libmagic=N32;;
3236
*-64|*"-64 ") libmagic=64-bit;;
3237
*) libmagic=never-match;;
3239
lt_cv_deplibs_check_method=pass_all
3242
# This must be Linux ELF.
3243
linux* | k*bsd*-gnu)
3244
lt_cv_deplibs_check_method=pass_all
3247
netbsd* | netbsdelf*-gnu)
3248
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3249
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3251
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3256
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3257
lt_cv_file_magic_cmd=/usr/bin/file
3258
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3262
lt_cv_deplibs_check_method=unknown
3266
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3267
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3269
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3273
osf3* | osf4* | osf5*)
3274
lt_cv_deplibs_check_method=pass_all
3278
lt_cv_deplibs_check_method=pass_all
3282
case $host_vendor in
3284
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]]'
3285
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3288
lt_cv_deplibs_check_method=pass_all
3291
lt_cv_file_magic_cmd='/bin/file'
3292
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3295
lt_cv_file_magic_cmd='/bin/file'
3296
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3297
lt_cv_file_magic_test_file=/lib/libc.so
3300
lt_cv_deplibs_check_method=pass_all
3303
lt_cv_deplibs_check_method=pass_all
3308
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3309
lt_cv_deplibs_check_method=pass_all
3313
file_magic_cmd=$lt_cv_file_magic_cmd
3314
deplibs_check_method=$lt_cv_deplibs_check_method
3315
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3316
])# AC_DEPLIBS_CHECK_METHOD
3321
# find the pathname to a BSD-compatible name lister
3322
AC_DEFUN([AC_PROG_NM],
3323
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3324
[if test -n "$NM"; then
3325
# Let the user override the test.
3328
lt_nm_to_check="${ac_tool_prefix}nm"
3329
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3330
lt_nm_to_check="$lt_nm_to_check nm"
3332
for lt_tmp_nm in $lt_nm_to_check; do
3333
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3334
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3336
test -z "$ac_dir" && ac_dir=.
3337
tmp_nm="$ac_dir/$lt_tmp_nm"
3338
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3339
# Check to see if the nm accepts a BSD-compat flag.
3340
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3341
# nm: unknown option "B" ignored
3342
# Tru64's nm complains that /dev/null is an invalid object file
3343
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3344
*/dev/null* | *'Invalid file or object type'*)
3345
lt_cv_path_NM="$tmp_nm -B"
3349
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3351
lt_cv_path_NM="$tmp_nm -p"
3355
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3356
continue # so that we can try to find one that supports BSD flags
3365
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3373
# check for math library
3374
AC_DEFUN([AC_CHECK_LIBM],
3375
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3378
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3379
# These system don't have libm, or don't need it
3382
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3383
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3386
AC_CHECK_LIB(m, cos, LIBM="-lm")
3392
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3393
# -----------------------------------
3394
# sets LIBLTDL to the link flags for the libltdl convenience library and
3395
# LTDLINCL to the include flags for the libltdl header and adds
3396
# --enable-ltdl-convenience to the configure arguments. Note that
3397
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3398
# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3399
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3400
# (note the single quotes!). If your package is not flat and you're not
3401
# using automake, define top_builddir and top_srcdir appropriately in
3403
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3404
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3405
case $enable_ltdl_convenience in
3406
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3407
"") enable_ltdl_convenience=yes
3408
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3410
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3411
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3412
# For backwards non-gettext consistent compatibility...
3414
])# AC_LIBLTDL_CONVENIENCE
3417
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3418
# -----------------------------------
3419
# sets LIBLTDL to the link flags for the libltdl installable library and
3420
# LTDLINCL to the include flags for the libltdl header and adds
3421
# --enable-ltdl-install to the configure arguments. Note that
3422
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3423
# and an installed libltdl is not found, it is assumed to be `libltdl'.
3424
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3425
# '${top_srcdir}/' (note the single quotes!). If your package is not
3426
# flat and you're not using automake, define top_builddir and top_srcdir
3427
# appropriately in the Makefiles.
3428
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3429
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3430
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3431
AC_CHECK_LIB(ltdl, lt_dlinit,
3432
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3433
[if test x"$enable_ltdl_install" = xno; then
3434
AC_MSG_WARN([libltdl not installed, but installation disabled])
3436
enable_ltdl_install=yes
3439
if test x"$enable_ltdl_install" = x"yes"; then
3440
ac_configure_args="$ac_configure_args --enable-ltdl-install"
3441
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3442
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3444
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3448
# For backwards non-gettext consistent compatibility...
3450
])# AC_LIBLTDL_INSTALLABLE
3455
# enable support for C++ libraries
3456
AC_DEFUN([AC_LIBTOOL_CXX],
3457
[AC_REQUIRE([_LT_AC_LANG_CXX])
3463
AC_DEFUN([_LT_AC_LANG_CXX],
3464
[AC_REQUIRE([AC_PROG_CXX])
3465
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3466
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3469
# _LT_AC_PROG_CXXCPP
3470
# ------------------
3471
AC_DEFUN([_LT_AC_PROG_CXXCPP],
3473
AC_REQUIRE([AC_PROG_CXX])
3474
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3475
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3476
(test "X$CXX" != "Xg++"))) ; then
3479
])# _LT_AC_PROG_CXXCPP
3483
# enable support for Fortran 77 libraries
3484
AC_DEFUN([AC_LIBTOOL_F77],
3485
[AC_REQUIRE([_LT_AC_LANG_F77])
3491
AC_DEFUN([_LT_AC_LANG_F77],
3492
[AC_REQUIRE([AC_PROG_F77])
3493
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3499
# enable support for GCJ libraries
3500
AC_DEFUN([AC_LIBTOOL_GCJ],
3501
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3507
AC_DEFUN([_LT_AC_LANG_GCJ],
3508
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3509
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3510
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3511
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3512
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3513
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3514
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3520
# enable support for Windows resource files
3521
AC_DEFUN([AC_LIBTOOL_RC],
3522
[AC_REQUIRE([LT_AC_PROG_RC])
3523
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3527
# AC_LIBTOOL_LANG_C_CONFIG
3528
# ------------------------
3529
# Ensure that the configuration vars for the C compiler are
3530
# suitably defined. Those variables are subsequently used by
3531
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3532
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3533
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3537
# Source file extension for C test sources.
3540
# Object file extension for compiled C test sources.
3542
_LT_AC_TAGVAR(objext, $1)=$objext
3544
# Code to be used in simple compile tests
3545
lt_simple_compile_test_code="int some_variable = 0;\n"
3547
# Code to be used in simple link tests
3548
lt_simple_link_test_code='int main(){return(0);}\n'
3552
# save warnings/boilerplate of simple test code
3553
_LT_COMPILER_BOILERPLATE
3554
_LT_LINKER_BOILERPLATE
3556
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3557
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3558
AC_LIBTOOL_PROG_CC_C_O($1)
3559
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3560
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3561
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3562
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3563
AC_LIBTOOL_SYS_LIB_STRIP
3564
AC_LIBTOOL_DLOPEN_SELF
3566
# Report which library types will actually be built
3567
AC_MSG_CHECKING([if libtool supports shared libraries])
3568
AC_MSG_RESULT([$can_build_shared])
3570
AC_MSG_CHECKING([whether to build shared libraries])
3571
test "$can_build_shared" = "no" && enable_shared=no
3573
# On AIX, shared libraries and static libraries use the same namespace, and
3574
# are all built from PIC.
3577
test "$enable_shared" = yes && enable_static=no
3578
if test -n "$RANLIB"; then
3579
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3580
postinstall_cmds='$RANLIB $lib'
3585
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3586
test "$enable_shared" = yes && enable_static=no
3590
AC_MSG_RESULT([$enable_shared])
3592
AC_MSG_CHECKING([whether to build static libraries])
3593
# Make sure either enable_shared or enable_static is yes.
3594
test "$enable_shared" = yes || enable_static=yes
3595
AC_MSG_RESULT([$enable_static])
3597
AC_LIBTOOL_CONFIG($1)
3601
])# AC_LIBTOOL_LANG_C_CONFIG
3604
# AC_LIBTOOL_LANG_CXX_CONFIG
3605
# --------------------------
3606
# Ensure that the configuration vars for the C compiler are
3607
# suitably defined. Those variables are subsequently used by
3608
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3609
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3610
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3612
AC_REQUIRE([AC_PROG_CXX])
3613
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3615
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3616
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3617
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3618
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3619
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3620
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3621
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3622
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3623
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3624
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3625
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3626
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3627
_LT_AC_TAGVAR(module_cmds, $1)=
3628
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3629
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3630
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3631
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3632
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3633
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3635
# Dependencies to place before and after the object being linked:
3636
_LT_AC_TAGVAR(predep_objects, $1)=
3637
_LT_AC_TAGVAR(postdep_objects, $1)=
3638
_LT_AC_TAGVAR(predeps, $1)=
3639
_LT_AC_TAGVAR(postdeps, $1)=
3640
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3642
# Source file extension for C++ test sources.
3645
# Object file extension for compiled C++ test sources.
3647
_LT_AC_TAGVAR(objext, $1)=$objext
3649
# Code to be used in simple compile tests
3650
lt_simple_compile_test_code="int some_variable = 0;\n"
3652
# Code to be used in simple link tests
3653
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
3655
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3658
# save warnings/boilerplate of simple test code
3659
_LT_COMPILER_BOILERPLATE
3660
_LT_LINKER_BOILERPLATE
3662
# Allow CC to be a program name with arguments.
3667
lt_save_with_gnu_ld=$with_gnu_ld
3668
lt_save_path_LD=$lt_cv_path_LD
3669
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3670
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3672
$as_unset lt_cv_prog_gnu_ld
3674
if test -n "${lt_cv_path_LDCXX+set}"; then
3675
lt_cv_path_LD=$lt_cv_path_LDCXX
3677
$as_unset lt_cv_path_LD
3679
test -z "${LDCXX+set}" || LD=$LDCXX
3682
_LT_AC_TAGVAR(compiler, $1)=$CC
3683
_LT_CC_BASENAME([$compiler])
3685
# We don't want -fno-exception wen compiling C++ code, so set the
3686
# no_builtin_flag separately
3687
if test "$GXX" = yes; then
3688
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3690
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3693
if test "$GXX" = yes; then
3694
# Set up default GNU C++ configuration
3698
# Check if GNU C++ uses GNU ld as the underlying linker, since the
3699
# archiving commands below assume that GNU ld is being used.
3700
if test "$with_gnu_ld" = yes; then
3701
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3702
_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'
3704
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3705
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3707
# If archive_cmds runs LD, not CC, wlarc should be empty
3708
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3709
# investigate it a little bit more. (MM)
3712
# ancient GNU ld didn't support --whole-archive et. al.
3713
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3714
grep 'no-whole-archive' > /dev/null; then
3715
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3717
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3723
# A generic and very simple default shared library creation
3724
# command for GNU C++ for the case where it uses the native
3725
# linker, instead of GNU ld. If possible, this setting should
3726
# overridden to take advantage of the native linker features on
3727
# the platform it is being used on.
3728
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3731
# Commands to make compiler produce verbose output that lists
3732
# what "hidden" libraries, object files and flags are used when
3733
# linking a shared library.
3734
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3742
# PORTME: fill in a description of your system's C++ link characteristics
3743
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3744
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3747
# FIXME: insert proper C++ library support
3748
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3751
if test "$host_cpu" = ia64; then
3752
# On IA64, the linker does run time linking by default, so we don't
3753
# have to do anything special.
3754
aix_use_runtimelinking=no
3755
exp_sym_flag='-Bexport'
3758
aix_use_runtimelinking=no
3760
# Test if we are trying to use run time linking or normal
3761
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
3762
# need to do runtime linking.
3763
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3764
for ld_flag in $LDFLAGS; do
3767
aix_use_runtimelinking=yes
3775
exp_sym_flag='-bexport'
3776
no_entry_flag='-bnoentry'
3779
# When large executables or shared objects are built, AIX ld can
3780
# have problems creating the table of contents. If linking a library
3781
# or program results in "error TOC overflow" add -mminimal-toc to
3782
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3783
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3785
_LT_AC_TAGVAR(archive_cmds, $1)=''
3786
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3787
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3788
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3790
if test "$GXX" = yes; then
3791
case $host_os in aix4.[[012]]|aix4.[[012]].*)
3792
# We only want to do this on AIX 4.2 and lower, the check
3793
# below for broken collect2 doesn't work under 4.3+
3794
collect2name=`${CC} -print-prog-name=collect2`
3795
if test -f "$collect2name" && \
3796
strings "$collect2name" | grep resolve_lib_name >/dev/null
3798
# We have reworked collect2
3799
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3801
# We have old collect2
3802
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3803
# It fails to find uninstalled libraries when the uninstalled
3804
# path is not listed in the libpath. Setting hardcode_minus_L
3805
# to unsupported forces relinking
3806
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3807
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3808
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3812
shared_flag='-shared'
3813
if test "$aix_use_runtimelinking" = yes; then
3814
shared_flag="$shared_flag "'${wl}-G'
3818
if test "$host_cpu" = ia64; then
3819
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3820
# chokes on -Wl,-G. The following line is correct:
3823
if test "$aix_use_runtimelinking" = yes; then
3824
shared_flag='${wl}-G'
3826
shared_flag='${wl}-bM:SRE'
3831
# It seems that -bexpall does not export symbols beginning with
3832
# underscore (_), so it is better to generate a list of symbols to export.
3833
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3834
if test "$aix_use_runtimelinking" = yes; then
3835
# Warning - without using the other runtime loading flags (-brtl),
3836
# -berok will link without error, but may produce a broken library.
3837
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3838
# Determine the default libpath from the value encoded in an empty executable.
3839
_LT_AC_SYS_LIBPATH_AIX
3840
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3842
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3844
if test "$host_cpu" = ia64; then
3845
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3846
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3847
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3849
# Determine the default libpath from the value encoded in an empty executable.
3850
_LT_AC_SYS_LIBPATH_AIX
3851
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3852
# Warning - without using the other run time loading flags,
3853
# -berok will link without error, but may produce a broken library.
3854
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3855
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3856
# Exported symbols can be pulled into shared objects from archives
3857
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3858
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3859
# This is similar to how AIX traditionally builds its shared libraries.
3860
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3866
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3867
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3868
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3869
# support --undefined. This deserves some investigation. FIXME
3870
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3872
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3877
case $cc_basename in
3879
# FIXME: insert proper C++ library support
3880
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3885
cygwin* | mingw* | pw32*)
3886
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3887
# as there is no search path for DLLs.
3888
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3889
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3890
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3891
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3893
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3894
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3895
# If the export-symbols file already is a .def file (1st line
3896
# is EXPORTS), use it as is; otherwise, prepend...
3897
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3898
cp $export_symbols $output_objdir/$soname.def;
3900
echo EXPORTS > $output_objdir/$soname.def;
3901
cat $export_symbols >> $output_objdir/$soname.def;
3903
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3905
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3908
darwin* | rhapsody*)
3910
rhapsody* | darwin1.[[012]])
3911
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3914
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3915
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3917
case ${MACOSX_DEPLOYMENT_TARGET} in
3919
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3922
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3928
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3929
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3930
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3931
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3932
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3933
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3935
if test "$GXX" = yes ; then
3936
lt_int_apple_cc_single_mod=no
3937
output_verbose_link_cmd='echo'
3938
if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3939
lt_int_apple_cc_single_mod=yes
3941
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3942
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3944
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3946
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3947
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3948
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3949
_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}'
3951
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3953
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3955
case $cc_basename in
3957
output_verbose_link_cmd='echo'
3958
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3959
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3960
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3961
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3962
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3965
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3972
case $cc_basename in
3974
# FIXME: insert proper C++ library support
3975
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3978
# Green Hills C++ Compiler
3979
# FIXME: insert proper C++ library support
3980
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3983
# FIXME: insert proper C++ library support
3984
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3989
# C++ shared libraries reported to be fairly broken before switch to ELF
3990
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3993
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3995
freebsd* | dragonfly*)
3996
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3998
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4003
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4004
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4005
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4006
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4007
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4008
# but as the default
4009
# location of the library.
4011
case $cc_basename in
4013
# FIXME: insert proper C++ library support
4014
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4017
_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'
4018
# Commands to make compiler produce verbose output that lists
4019
# what "hidden" libraries, object files and flags are used when
4020
# linking a shared library.
4022
# There doesn't appear to be a way to prevent this compiler from
4023
# explicitly linking system object files so we need to strip them
4024
# from the output so that they don't get included in the library
4026
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'
4029
if test "$GXX" = yes; then
4030
_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'
4032
# FIXME: insert proper C++ library support
4033
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4039
if test $with_gnu_ld = no; then
4040
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4041
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4045
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4048
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4054
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4055
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4058
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4059
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4060
# but as the default
4061
# location of the library.
4065
case $cc_basename in
4067
# FIXME: insert proper C++ library support
4068
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4073
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4076
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4079
_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'
4082
# Commands to make compiler produce verbose output that lists
4083
# what "hidden" libraries, object files and flags are used when
4084
# linking a shared library.
4086
# There doesn't appear to be a way to prevent this compiler from
4087
# explicitly linking system object files so we need to strip them
4088
# from the output so that they don't get included in the library
4090
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'
4093
if test "$GXX" = yes; then
4094
if test $with_gnu_ld = no; then
4097
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4100
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4103
_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'
4108
# FIXME: insert proper C++ library support
4109
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4115
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4116
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4117
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4118
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4119
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4120
# Instead, shared libraries are loaded at an image base (0x10000000 by
4121
# default) and relocated if they conflict, which is a slow very memory
4122
# consuming and fragmenting process. To avoid this, we pick a random,
4123
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4124
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
4125
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4126
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4129
case $cc_basename in
4132
_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 ${output_objdir}/so_locations -o $lib'
4134
# Archives containing C++ object files must be created using
4135
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
4136
# necessary to make sure instantiated templates are included
4138
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4141
if test "$GXX" = yes; then
4142
if test "$with_gnu_ld" = no; then
4143
_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}${output_objdir}/so_locations -o $lib'
4145
_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'
4148
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4151
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4152
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4154
linux* | k*bsd*-gnu)
4155
case $cc_basename in
4157
# Kuck and Associates, Inc. (KAI) C++ Compiler
4159
# KCC will only create a shared library if the output file
4160
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4161
# to its proper name (with version) after linking.
4162
_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'
4163
_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'
4164
# Commands to make compiler produce verbose output that lists
4165
# what "hidden" libraries, object files and flags are used when
4166
# linking a shared library.
4168
# There doesn't appear to be a way to prevent this compiler from
4169
# explicitly linking system object files so we need to strip them
4170
# from the output so that they don't get included in the library
4172
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'
4174
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4175
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4177
# Archives containing C++ object files must be created using
4178
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4179
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4184
# version 8.0 and above of icpc choke on multiply defined symbols
4185
# if we add $predep_objects and $postdep_objects, however 7.1 and
4186
# earlier do not add the objects themselves.
4187
case `$CC -V 2>&1` in
4189
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4190
_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'
4192
*) # Version 8.0 or newer
4195
ia64*) tmp_idyn=' -i_dynamic';;
4197
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4198
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4201
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4202
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4203
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4204
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4207
# Portland Group C++ compiler
4208
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4209
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4211
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4212
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4213
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4217
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4218
_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'
4220
runpath_var=LD_RUN_PATH
4221
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4222
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4224
# Commands to make compiler produce verbose output that lists
4225
# what "hidden" libraries, object files and flags are used when
4226
# linking a shared library.
4228
# There doesn't appear to be a way to prevent this compiler from
4229
# explicitly linking system object files so we need to strip them
4230
# from the output so that they don't get included in the library
4232
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'
4237
# FIXME: insert proper C++ library support
4238
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4241
# FIXME: insert proper C++ library support
4242
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4245
case $cc_basename in
4247
# FIXME: insert proper C++ library support
4248
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4251
# FIXME: insert proper C++ library support
4252
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4256
netbsd* | netbsdelf*-gnu)
4257
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4258
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4260
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4261
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4262
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4264
# Workaround some broken pre-1.5 toolchains
4265
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4268
# C++ shared libraries are fairly broken
4269
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4272
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4273
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4274
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4275
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4276
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4277
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4278
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4279
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4281
output_verbose_link_cmd='echo'
4284
case $cc_basename in
4286
# Kuck and Associates, Inc. (KAI) C++ Compiler
4288
# KCC will only create a shared library if the output file
4289
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4290
# to its proper name (with version) after linking.
4291
_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'
4293
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4294
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4296
# Archives containing C++ object files must be created using
4297
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4298
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4302
# Rational C++ 2.4.1
4303
# FIXME: insert proper C++ library support
4304
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4307
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4308
_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 ${output_objdir}/so_locations -o $lib'
4310
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4311
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4313
# Commands to make compiler produce verbose output that lists
4314
# what "hidden" libraries, object files and flags are used when
4315
# linking a shared library.
4317
# There doesn't appear to be a way to prevent this compiler from
4318
# explicitly linking system object files so we need to strip them
4319
# from the output so that they don't get included in the library
4321
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'
4324
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4325
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4326
_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}${output_objdir}/so_locations -o $lib'
4328
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4329
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4331
# Commands to make compiler produce verbose output that lists
4332
# what "hidden" libraries, object files and flags are used when
4333
# linking a shared library.
4334
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4337
# FIXME: insert proper C++ library support
4338
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4344
case $cc_basename in
4346
# Kuck and Associates, Inc. (KAI) C++ Compiler
4348
# KCC will only create a shared library if the output file
4349
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4350
# to its proper name (with version) after linking.
4351
_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'
4353
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4354
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4356
# Archives containing C++ object files must be created using
4357
# the KAI C++ compiler.
4358
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4361
# Rational C++ 2.4.1
4362
# FIXME: insert proper C++ library support
4363
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4366
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4367
_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 ${output_objdir}/so_locations -o $lib'
4368
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4369
echo "-hidden">> $lib.exp~
4370
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4373
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4374
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4376
# Commands to make compiler produce verbose output that lists
4377
# what "hidden" libraries, object files and flags are used when
4378
# linking a shared library.
4380
# There doesn't appear to be a way to prevent this compiler from
4381
# explicitly linking system object files so we need to strip them
4382
# from the output so that they don't get included in the library
4384
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'
4387
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4388
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4389
_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}${output_objdir}/so_locations -o $lib'
4391
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4392
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4394
# Commands to make compiler produce verbose output that lists
4395
# what "hidden" libraries, object files and flags are used when
4396
# linking a shared library.
4397
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4400
# FIXME: insert proper C++ library support
4401
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4407
# FIXME: insert proper C++ library support
4408
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4411
case $cc_basename in
4414
# FIXME: insert proper C++ library support
4415
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4419
# FIXME: insert proper C++ library support
4420
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4423
# FIXME: insert proper C++ library support
4424
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4429
case $cc_basename in
4431
# Sun C++ 4.2, 5.x and Centerline C++
4432
_LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4433
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4434
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4435
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4436
$CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4438
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4439
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4441
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4443
# The C++ compiler is used as linker so we must use $wl
4444
# flag to pass the commands to the underlying system
4445
# linker. We must also pass each convience library through
4446
# to the system linker between allextract/defaultextract.
4447
# The C++ compiler will combine linker options so we
4448
# cannot just pass the convience library names through
4450
# Supported since Solaris 2.6 (maybe 2.5.1?)
4451
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4454
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4456
output_verbose_link_cmd='echo'
4458
# Archives containing C++ object files must be created using
4459
# "CC -xar", where "CC" is the Sun C++ compiler. This is
4460
# necessary to make sure instantiated templates are included
4462
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4465
# Green Hills C++ Compiler
4466
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4468
# The C++ compiler must be used to create the archive.
4469
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4472
# GNU C++ compiler with Solaris linker
4473
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4474
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4475
if $CC --version | grep -v '^2\.7' > /dev/null; then
4476
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4477
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4478
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4480
# Commands to make compiler produce verbose output that lists
4481
# what "hidden" libraries, object files and flags are used when
4482
# linking a shared library.
4483
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4485
# g++ 2.7 appears to require `-G' NOT `-shared' on this
4487
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4488
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4489
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4491
# Commands to make compiler produce verbose output that lists
4492
# what "hidden" libraries, object files and flags are used when
4493
# linking a shared library.
4494
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4497
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4502
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4503
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4504
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4505
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4506
runpath_var='LD_RUN_PATH'
4508
case $cc_basename in
4510
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4511
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4514
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4515
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4519
sysv5* | sco3.2v5* | sco5v6*)
4520
# Note: We can NOT use -z defs as we might desire, because we do not
4521
# link with -lc, and that would cause any symbols used from libc to
4522
# always be unresolved, which means just about no library would
4523
# ever link correctly. If we're not using GNU ld we use -z text
4524
# though, which does catch some bad symbols but isn't as heavy-handed
4526
# For security reasons, it is highly recommended that you always
4527
# use absolute paths for naming shared libraries, and exclude the
4528
# DT_RUNPATH tag from executables and libraries. But doing so
4529
# requires that you compile everything twice, which is a pain.
4530
# So that behaviour is only enabled if SCOABSPATH is set to a
4531
# non-empty value in the environment. Most likely only useful for
4532
# creating official distributions of packages.
4533
# This is a hack until libtool officially supports absolute path
4534
# names for shared libraries.
4535
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4536
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4537
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4538
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4539
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4540
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4541
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4542
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4543
runpath_var='LD_RUN_PATH'
4545
case $cc_basename in
4547
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4548
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4551
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4552
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4557
case $cc_basename in
4559
# NonStop-UX NCC 3.20
4560
# FIXME: insert proper C++ library support
4561
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4564
# FIXME: insert proper C++ library support
4565
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4570
# FIXME: insert proper C++ library support
4571
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4574
# FIXME: insert proper C++ library support
4575
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4578
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4579
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4581
_LT_AC_TAGVAR(GCC, $1)="$GXX"
4582
_LT_AC_TAGVAR(LD, $1)="$LD"
4584
AC_LIBTOOL_POSTDEP_PREDEP($1)
4585
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4586
AC_LIBTOOL_PROG_CC_C_O($1)
4587
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4588
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4589
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4590
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4592
AC_LIBTOOL_CONFIG($1)
4599
with_gnu_ldcxx=$with_gnu_ld
4600
with_gnu_ld=$lt_save_with_gnu_ld
4601
lt_cv_path_LDCXX=$lt_cv_path_LD
4602
lt_cv_path_LD=$lt_save_path_LD
4603
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4604
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4605
])# AC_LIBTOOL_LANG_CXX_CONFIG
4607
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4608
# ------------------------------------
4609
# Figure out "hidden" library dependencies from verbose
4610
# compiler output when linking a shared library.
4611
# Parse the compiler output and extract the necessary
4612
# objects, libraries and library flags.
4613
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4614
dnl we can't use the lt_simple_compile_test_code here,
4615
dnl because it contains code intended for an executable,
4616
dnl not a library. It's possible we should let each
4617
dnl tag define a new lt_????_link_test_code variable,
4618
dnl but it's only used here...
4619
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4621
void foo (void) { a = 0; }
4623
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4627
Foo (void) { a = 0; }
4632
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4640
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4643
public void bar (void) {
4649
dnl Parse the compiler output and extract the necessary
4650
dnl objects, libraries and library flags.
4651
if AC_TRY_EVAL(ac_compile); then
4652
# Parse the compiler output and extract the necessary
4653
# objects, libraries and library flags.
4655
# Sentinel used to keep track of whether or not we are before
4656
# the conftest object file.
4657
pre_test_object_deps_done=no
4659
# The `*' in the case matches for architectures that use `case' in
4660
# $output_verbose_cmd can trigger glob expansion during the loop
4661
# eval without this substitution.
4662
output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4664
for p in `eval $output_verbose_link_cmd`; do
4668
# Some compilers place space between "-{L,R}" and the path.
4671
|| test $p = "-R"; then
4678
if test "$pre_test_object_deps_done" = no; then
4681
# Internal compiler library paths should come after those
4682
# provided the user. The postdeps already come after the
4683
# user supplied libs so there is no need to process them.
4684
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4685
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4687
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4690
# The "-l" case would never come before the object being
4691
# linked, so don't bother handling this case.
4694
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4695
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4697
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4703
# This assumes that the test object file only shows up
4704
# once in the compiler output.
4705
if test "$p" = "conftest.$objext"; then
4706
pre_test_object_deps_done=yes
4710
if test "$pre_test_object_deps_done" = no; then
4711
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4712
_LT_AC_TAGVAR(predep_objects, $1)="$p"
4714
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4717
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4718
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
4720
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4725
*) ;; # Ignore the rest.
4733
echo "libtool.m4: error: problem compiling $1 test program"
4736
$rm -f confest.$objext
4738
# PORTME: override above test on systems where it is broken
4742
# Interix 3.5 installs completely hosed .la files for C++, so rather than
4743
# hack all around it, let's just trust "g++" to DTRT.
4744
_LT_AC_TAGVAR(predep_objects,$1)=
4745
_LT_AC_TAGVAR(postdep_objects,$1)=
4746
_LT_AC_TAGVAR(postdeps,$1)=
4750
case $cc_basename in
4752
# Adding this requires a known-good setup of shared libraries for
4753
# Sun compiler versions before 5.6, else PIC objects from an old
4754
# archive will be linked into the output, leading to subtle bugs.
4755
_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4762
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4763
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4765
])# AC_LIBTOOL_POSTDEP_PREDEP
4767
# AC_LIBTOOL_LANG_F77_CONFIG
4768
# --------------------------
4769
# Ensure that the configuration vars for the C compiler are
4770
# suitably defined. Those variables are subsequently used by
4771
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4772
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4773
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4774
[AC_REQUIRE([AC_PROG_F77])
4775
AC_LANG_PUSH(Fortran 77)
4777
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4778
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4779
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4780
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4781
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4782
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4783
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4784
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4785
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4786
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4787
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4788
_LT_AC_TAGVAR(module_cmds, $1)=
4789
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4790
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4791
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4792
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4793
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4794
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4796
# Source file extension for f77 test sources.
4799
# Object file extension for compiled f77 test sources.
4801
_LT_AC_TAGVAR(objext, $1)=$objext
4803
# Code to be used in simple compile tests
4804
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4806
# Code to be used in simple link tests
4807
lt_simple_link_test_code=" program t\n end\n"
4809
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4812
# save warnings/boilerplate of simple test code
4813
_LT_COMPILER_BOILERPLATE
4814
_LT_LINKER_BOILERPLATE
4816
# Allow CC to be a program name with arguments.
4820
_LT_AC_TAGVAR(compiler, $1)=$CC
4821
_LT_CC_BASENAME([$compiler])
4823
AC_MSG_CHECKING([if libtool supports shared libraries])
4824
AC_MSG_RESULT([$can_build_shared])
4826
AC_MSG_CHECKING([whether to build shared libraries])
4827
test "$can_build_shared" = "no" && enable_shared=no
4829
# On AIX, shared libraries and static libraries use the same namespace, and
4830
# are all built from PIC.
4833
test "$enable_shared" = yes && enable_static=no
4834
if test -n "$RANLIB"; then
4835
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4836
postinstall_cmds='$RANLIB $lib'
4840
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4841
test "$enable_shared" = yes && enable_static=no
4845
AC_MSG_RESULT([$enable_shared])
4847
AC_MSG_CHECKING([whether to build static libraries])
4848
# Make sure either enable_shared or enable_static is yes.
4849
test "$enable_shared" = yes || enable_static=yes
4850
AC_MSG_RESULT([$enable_static])
4852
_LT_AC_TAGVAR(GCC, $1)="$G77"
4853
_LT_AC_TAGVAR(LD, $1)="$LD"
4855
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4856
AC_LIBTOOL_PROG_CC_C_O($1)
4857
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4858
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4859
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4860
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4862
AC_LIBTOOL_CONFIG($1)
4866
])# AC_LIBTOOL_LANG_F77_CONFIG
4869
# AC_LIBTOOL_LANG_GCJ_CONFIG
4870
# --------------------------
4871
# Ensure that the configuration vars for the C compiler are
4872
# suitably defined. Those variables are subsequently used by
4873
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4874
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4875
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4878
# Source file extension for Java test sources.
4881
# Object file extension for compiled Java test sources.
4883
_LT_AC_TAGVAR(objext, $1)=$objext
4885
# Code to be used in simple compile tests
4886
lt_simple_compile_test_code="class foo {}\n"
4888
# Code to be used in simple link tests
4889
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4891
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4894
# save warnings/boilerplate of simple test code
4895
_LT_COMPILER_BOILERPLATE
4896
_LT_LINKER_BOILERPLATE
4898
# Allow CC to be a program name with arguments.
4902
_LT_AC_TAGVAR(compiler, $1)=$CC
4903
_LT_CC_BASENAME([$compiler])
4905
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4906
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4908
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4910
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4911
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4912
AC_LIBTOOL_PROG_CC_C_O($1)
4913
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4914
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4915
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4916
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4918
AC_LIBTOOL_CONFIG($1)
4922
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4925
# AC_LIBTOOL_LANG_RC_CONFIG
4926
# -------------------------
4927
# Ensure that the configuration vars for the Windows resource compiler are
4928
# suitably defined. Those variables are subsequently used by
4929
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4930
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4931
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4934
# Source file extension for RC test sources.
4937
# Object file extension for compiled RC test sources.
4939
_LT_AC_TAGVAR(objext, $1)=$objext
4941
# Code to be used in simple compile tests
4942
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4944
# Code to be used in simple link tests
4945
lt_simple_link_test_code="$lt_simple_compile_test_code"
4947
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4950
# save warnings/boilerplate of simple test code
4951
_LT_COMPILER_BOILERPLATE
4952
_LT_LINKER_BOILERPLATE
4954
# Allow CC to be a program name with arguments.
4958
_LT_AC_TAGVAR(compiler, $1)=$CC
4959
_LT_CC_BASENAME([$compiler])
4960
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4962
AC_LIBTOOL_CONFIG($1)
4966
])# AC_LIBTOOL_LANG_RC_CONFIG
4969
# AC_LIBTOOL_CONFIG([TAGNAME])
4970
# ----------------------------
4971
# If TAGNAME is not passed, then create an initial libtool script
4972
# with a default configuration from the untagged config vars. Otherwise
4973
# add code to config.status for appending the configuration named by
4974
# TAGNAME from the matching tagged config vars.
4975
AC_DEFUN([AC_LIBTOOL_CONFIG],
4976
[# The else clause should only fire when bootstrapping the
4977
# libtool distribution, otherwise you forgot to ship ltmain.sh
4978
# with your package, and you will get complaints that there are
4979
# no rules to generate ltmain.sh.
4980
if test -f "$ltmain"; then
4981
# See if we are running on zsh, and set the options which allow our commands through
4982
# without removal of \ escapes.
4983
if test -n "${ZSH_VERSION+set}" ; then
4984
setopt NO_GLOB_SUBST
4986
# Now quote all the things that may contain metacharacters while being
4987
# careful not to overquote the AC_SUBSTed values. We take copies of the
4988
# variables and quote the copies for generation of the libtool script.
4989
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4991
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4992
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4993
deplibs_check_method reload_flag reload_cmds need_locks \
4994
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4995
lt_cv_sys_global_symbol_to_c_name_address \
4996
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4997
old_postinstall_cmds old_postuninstall_cmds \
4998
_LT_AC_TAGVAR(compiler, $1) \
4999
_LT_AC_TAGVAR(CC, $1) \
5000
_LT_AC_TAGVAR(LD, $1) \
5001
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5002
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5003
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5004
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5005
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5006
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5007
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5008
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5009
_LT_AC_TAGVAR(old_archive_cmds, $1) \
5010
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5011
_LT_AC_TAGVAR(predep_objects, $1) \
5012
_LT_AC_TAGVAR(postdep_objects, $1) \
5013
_LT_AC_TAGVAR(predeps, $1) \
5014
_LT_AC_TAGVAR(postdeps, $1) \
5015
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5016
_LT_AC_TAGVAR(archive_cmds, $1) \
5017
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5018
_LT_AC_TAGVAR(postinstall_cmds, $1) \
5019
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
5020
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5021
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
5022
_LT_AC_TAGVAR(no_undefined_flag, $1) \
5023
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
5024
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5025
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5026
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5027
_LT_AC_TAGVAR(hardcode_automatic, $1) \
5028
_LT_AC_TAGVAR(module_cmds, $1) \
5029
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
5030
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5031
_LT_AC_TAGVAR(exclude_expsyms, $1) \
5032
_LT_AC_TAGVAR(include_expsyms, $1); do
5035
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
5036
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5037
_LT_AC_TAGVAR(archive_cmds, $1) | \
5038
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5039
_LT_AC_TAGVAR(module_cmds, $1) | \
5040
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5041
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5042
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5043
extract_expsyms_cmds | reload_cmds | finish_cmds | \
5044
postinstall_cmds | postuninstall_cmds | \
5045
old_postinstall_cmds | old_postuninstall_cmds | \
5046
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5047
# Double-quote double-evaled strings.
5048
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5051
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5057
*'\[$]0 --fallback-echo"')
5058
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5063
[cfgfile="${ofile}T"
5064
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5066
AC_MSG_NOTICE([creating $ofile])],
5069
cat <<__EOF__ >> "$cfgfile"
5073
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5074
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5075
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5077
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5078
# Free Software Foundation, Inc.
5080
# This file is part of GNU Libtool:
5081
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5083
# This program is free software; you can redistribute it and/or modify
5084
# it under the terms of the GNU General Public License as published by
5085
# the Free Software Foundation; either version 2 of the License, or
5086
# (at your option) any later version.
5088
# This program is distributed in the hope that it will be useful, but
5089
# WITHOUT ANY WARRANTY; without even the implied warranty of
5090
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5091
# General Public License for more details.
5093
# You should have received a copy of the GNU General Public License
5094
# along with this program; if not, write to the Free Software
5095
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5097
# As a special exception to the GNU General Public License, if you
5098
# distribute this file as part of a program that contains a
5099
# configuration script generated by Autoconf, you may include it under
5100
# the same distribution terms that you use for the rest of that program.
5102
# A sed program that does not truncate output.
5105
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
5106
Xsed="$SED -e 1s/^X//"
5108
# The HP-UX ksh and POSIX shell print the target directory to stdout
5110
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5112
# The names of the tagged configurations supported by this script.
5115
# ### BEGIN LIBTOOL CONFIG],
5116
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5118
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5120
# Shell to use when invoking shell scripts.
5123
# Whether or not to build shared libraries.
5124
build_libtool_libs=$enable_shared
5126
# Whether or not to build static libraries.
5127
build_old_libs=$enable_static
5129
# Whether or not to add -lc for building shared libraries.
5130
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5132
# Whether or not to disallow shared libs when runtime libs are static
5133
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5135
# Whether or not to optimize for fast installation.
5136
fast_install=$enable_fast_install
5139
host_alias=$host_alias
5144
build_alias=$build_alias
5148
# An echo program that does not interpret backslashes.
5153
AR_FLAGS=$lt_AR_FLAGS
5158
# LTCC compiler flags.
5159
LTCFLAGS=$lt_LTCFLAGS
5161
# A language-specific compiler.
5162
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5164
# Is the compiler the GNU C compiler?
5165
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5170
# The linker used to build libraries.
5171
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5173
# Whether we need hard or soft links.
5176
# A BSD-compatible nm program.
5179
# A symbol stripping program
5182
# Used to examine libraries when file_magic_cmd begins "file"
5183
MAGIC_CMD=$MAGIC_CMD
5185
# Used on cygwin: DLL creation program.
5188
# Used on cygwin: object dumper.
5191
# Used on cygwin: assembler.
5194
# The name of the directory that contains temporary libtool files.
5197
# How to create reloadable object files.
5198
reload_flag=$lt_reload_flag
5199
reload_cmds=$lt_reload_cmds
5201
# How to pass a linker flag through the compiler.
5202
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5204
# Object file suffix (normally "o").
5207
# Old archive suffix (normally "a").
5210
# Shared library suffix (normally ".so").
5211
shrext_cmds='$shrext_cmds'
5213
# Executable file suffix (normally "").
5216
# Additional compiler flags for building library objects.
5217
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5220
# What is the maximum length of a command?
5221
max_cmd_len=$lt_cv_sys_max_cmd_len
5223
# Does compiler simultaneously support -c and -o options?
5224
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5226
# Must we lock files when doing compilation?
5227
need_locks=$lt_need_locks
5229
# Do we need the lib prefix for modules?
5230
need_lib_prefix=$need_lib_prefix
5232
# Do we need a version for libraries?
5233
need_version=$need_version
5235
# Whether dlopen is supported.
5236
dlopen_support=$enable_dlopen
5238
# Whether dlopen of programs is supported.
5239
dlopen_self=$enable_dlopen_self
5241
# Whether dlopen of statically linked programs is supported.
5242
dlopen_self_static=$enable_dlopen_self_static
5244
# Compiler flag to prevent dynamic linking.
5245
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5247
# Compiler flag to turn off builtin functions.
5248
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5250
# Compiler flag to allow reflexive dlopens.
5251
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5253
# Compiler flag to generate shared objects directly from archives.
5254
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5256
# Compiler flag to generate thread-safe objects.
5257
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5259
# Library versioning type.
5260
version_type=$version_type
5262
# Format of library name prefix.
5263
libname_spec=$lt_libname_spec
5265
# List of archive names. First name is the real one, the rest are links.
5266
# The last name is the one that the linker finds with -lNAME.
5267
library_names_spec=$lt_library_names_spec
5269
# The coded name of the library, if different from the real name.
5270
soname_spec=$lt_soname_spec
5272
# Commands used to build and install an old-style archive.
5274
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5275
old_postinstall_cmds=$lt_old_postinstall_cmds
5276
old_postuninstall_cmds=$lt_old_postuninstall_cmds
5278
# Create an old-style archive from a shared archive.
5279
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5281
# Create a temporary old-style archive to link instead of a shared archive.
5282
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5284
# Commands used to build and install a shared archive.
5285
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5286
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5287
postinstall_cmds=$lt_postinstall_cmds
5288
postuninstall_cmds=$lt_postuninstall_cmds
5290
# Commands used to build a loadable module (assumed same as above if empty)
5291
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5292
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5294
# Commands to strip libraries.
5295
old_striplib=$lt_old_striplib
5296
striplib=$lt_striplib
5298
# Dependencies to place before the objects being linked to create a
5300
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5302
# Dependencies to place after the objects being linked to create a
5304
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5306
# Dependencies to place before the objects being linked to create a
5308
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5310
# Dependencies to place after the objects being linked to create a
5312
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5314
# The library search path used internally by the compiler when linking
5316
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5318
# Method to check whether dependent libraries are shared objects.
5319
deplibs_check_method=$lt_deplibs_check_method
5321
# Command to use when deplibs_check_method == file_magic.
5322
file_magic_cmd=$lt_file_magic_cmd
5324
# Flag that allows shared libraries with undefined symbols to be built.
5325
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5327
# Flag that forces no undefined symbols.
5328
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5330
# Commands used to finish a libtool library installation in a directory.
5331
finish_cmds=$lt_finish_cmds
5333
# Same as above, but a single script fragment to be evaled but not shown.
5334
finish_eval=$lt_finish_eval
5336
# Take the output of nm and produce a listing of raw symbols and C names.
5337
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5339
# Transform the output of nm in a proper C declaration
5340
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5342
# Transform the output of nm in a C name address pair
5343
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5345
# This is the shared library runtime path variable.
5346
runpath_var=$runpath_var
5348
# This is the shared library path variable.
5349
shlibpath_var=$shlibpath_var
5351
# Is shlibpath searched before the hard-coded library search path?
5352
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5354
# How to hardcode a shared library path into an executable.
5355
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5357
# Whether we should hardcode library paths into libraries.
5358
hardcode_into_libs=$hardcode_into_libs
5360
# Flag to hardcode \$libdir into a binary during linking.
5361
# This must work even if \$libdir does not exist.
5362
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5364
# If ld is used when linking, flag to hardcode \$libdir into
5365
# a binary during linking. This must work even if \$libdir does
5367
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5369
# Whether we need a single -rpath flag with a separated argument.
5370
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5372
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5374
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5376
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5378
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5380
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5381
# the resulting binary.
5382
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5384
# Set to yes if building a shared library automatically hardcodes DIR into the library
5385
# and all subsequent libraries and executables linked against it.
5386
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5388
# Variables whose values should be saved in libtool wrapper scripts and
5389
# restored at relink time.
5390
variables_saved_for_relink="$variables_saved_for_relink"
5392
# Whether libtool must link a program against all its dependency libraries.
5393
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5395
# Compile-time system search path for libraries
5396
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5398
# Run-time system search path for libraries
5399
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5401
# Fix the shell variable \$srcfile for the compiler.
5402
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5404
# Set to yes if exported symbols are required.
5405
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5407
# The commands to list exported symbols.
5408
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5410
# The commands to extract the exported symbol list from a shared archive.
5411
extract_expsyms_cmds=$lt_extract_expsyms_cmds
5413
# Symbols that should not be listed in the preloaded symbols.
5414
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5416
# Symbols that must always be exported.
5417
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5420
[# ### END LIBTOOL CONFIG],
5421
[# ### END LIBTOOL TAG CONFIG: $tagname])
5428
cat <<\EOF >> "$cfgfile"
5430
# AIX sometimes has problems with the GCC collect2 program. For some
5431
# reason, if we set the COLLECT_NAMES environment variable, the problems
5432
# vanish in a puff of smoke.
5433
if test "X${COLLECT_NAMES+set}" != Xset; then
5435
export COLLECT_NAMES
5441
# We use sed instead of cat because bash on DJGPP gets confused if
5442
# if finds mixed CR/LF and LF-only lines. Since sed operates in
5443
# text mode, it properly converts lines to CR/LF. This bash problem
5444
# is reportedly fixed, but why not run on old versions too?
5445
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5447
mv -f "$cfgfile" "$ofile" || \
5448
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5452
# If there is no Makefile yet, we rely on a make rule to execute
5453
# `config.status --recheck' to rerun these tests and create the
5454
# libtool script then.
5455
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5456
if test -f "$ltmain_in"; then
5457
test -f Makefile && make "$ltmain"
5460
])# AC_LIBTOOL_CONFIG
5463
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5464
# -------------------------------------------
5465
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5466
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5468
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5470
if test "$GCC" = yes; then
5471
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5473
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5474
lt_cv_prog_compiler_rtti_exceptions,
5475
[-fno-rtti -fno-exceptions], [],
5476
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5478
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5481
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5482
# ---------------------------------
5483
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5484
[AC_REQUIRE([AC_CANONICAL_HOST])
5485
AC_REQUIRE([AC_PROG_NM])
5486
AC_REQUIRE([AC_OBJEXT])
5487
# Check for command to grab the raw symbol name followed by C symbol from nm.
5488
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5489
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5491
# These are sane defaults that work on at least a few old systems.
5492
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5494
# Character class describing NM global symbol codes.
5495
symcode='[[BCDEGRST]]'
5497
# Regexp to match symbols that can be accessed directly from C.
5498
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5500
# Transform an extracted symbol line into a proper C declaration
5501
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5503
# Transform an extracted symbol line into symbol name and symbol address
5504
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'"
5506
# Define system-specific variables.
5511
cygwin* | mingw* | pw32*)
5512
symcode='[[ABCDGISTW]]'
5514
hpux*) # Its linker distinguishes data from code symbols
5515
if test "$host_cpu" = ia64; then
5516
symcode='[[ABCDEGRST]]'
5518
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5519
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'"
5521
linux* | k*bsd*-gnu)
5522
if test "$host_cpu" = ia64; then
5523
symcode='[[ABCDGIRSTW]]'
5524
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5525
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'"
5529
symcode='[[BCDEGRST]]'
5532
symcode='[[BCDEGQRST]]'
5543
sysv5* | sco5v6* | unixware* | OpenUNIX*)
5547
symcode='[[DFNSTU]]'
5551
# Handle CRLF in mingw tool chain
5555
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5559
# If we're using GNU nm, then use its standard symbol codes.
5560
case `$NM -V 2>&1` in
5561
*GNU* | *'with BFD'*)
5562
symcode='[[ABCDGIRSTW]]' ;;
5565
# Try without a prefix undercore, then with it.
5566
for ac_symprfx in "" "_"; do
5568
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5569
symxfrm="\\1 $ac_symprfx\\2 \\2"
5571
# Write the raw and C identifiers.
5572
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5574
# Check to see that the pipe works correctly.
5578
cat > conftest.$ac_ext <<EOF
5583
void nm_test_func(){}
5587
int main(){nm_test_var='a';nm_test_func();return(0);}
5590
if AC_TRY_EVAL(ac_compile); then
5591
# Now try to grab the symbols.
5593
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5594
# Try sorting and uniquifying the output.
5595
if sort "$nlist" | uniq > "$nlist"T; then
5596
mv -f "$nlist"T "$nlist"
5601
# Make sure that we snagged all the symbols we need.
5602
if grep ' nm_test_var$' "$nlist" >/dev/null; then
5603
if grep ' nm_test_func$' "$nlist" >/dev/null; then
5604
cat <<EOF > conftest.$ac_ext
5610
# Now generate the symbol file.
5611
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5613
cat <<EOF >> conftest.$ac_ext
5614
#if defined (__STDC__) && __STDC__
5615
# define lt_ptr_t void *
5617
# define lt_ptr_t char *
5621
/* The mapping between symbol names and symbols. */
5626
lt_preloaded_symbols[[]] =
5629
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5630
cat <<\EOF >> conftest.$ac_ext
5638
# Now try linking the two files.
5639
mv conftest.$ac_objext conftstm.$ac_objext
5640
lt_save_LIBS="$LIBS"
5641
lt_save_CFLAGS="$CFLAGS"
5642
LIBS="conftstm.$ac_objext"
5643
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5644
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5647
LIBS="$lt_save_LIBS"
5648
CFLAGS="$lt_save_CFLAGS"
5650
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5653
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5656
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5659
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5660
cat conftest.$ac_ext >&5
5662
rm -f conftest* conftst*
5664
# Do not use the global_symbol_pipe unless it works.
5665
if test "$pipe_works" = yes; then
5668
lt_cv_sys_global_symbol_pipe=
5672
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5673
lt_cv_sys_global_symbol_to_cdecl=
5675
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5676
AC_MSG_RESULT(failed)
5680
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5683
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5684
# ---------------------------------------
5685
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5686
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5687
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5688
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5690
AC_MSG_CHECKING([for $compiler option to produce PIC])
5692
# C++ specific cases for pic, static, wl, etc.
5693
if test "$GXX" = yes; then
5694
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5695
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5699
# All AIX code is PIC.
5700
if test "$host_cpu" = ia64; then
5701
# AIX 5 now supports IA64 processor
5702
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5706
# FIXME: we need at least 68020 code to build shared libraries, but
5707
# adding the `-m68020' flag to GCC prevents building anything better,
5709
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5711
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5712
# PIC is the default for these OSes.
5714
mingw* | os2* | pw32*)
5715
# This hack is so that the source file can tell whether it is being
5716
# built for inclusion in a dll (and should export symbols for example).
5717
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5719
darwin* | rhapsody*)
5720
# PIC is the default on this platform
5721
# Common symbols not allowed in MH_DYLIB files
5722
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5725
# DJGPP does not support shared libraries at all
5726
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5729
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
5730
# Instead, we relocate shared libraries at runtime.
5733
if test -d /usr/nec; then
5734
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5738
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5744
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5749
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5755
# All AIX code is PIC.
5756
if test "$host_cpu" = ia64; then
5757
# AIX 5 now supports IA64 processor
5758
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5760
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5764
case $cc_basename in
5766
# Green Hills C++ Compiler
5767
# _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"
5772
# PIC is the default on this platform
5773
# Common symbols not allowed in MH_DYLIB files
5774
case $cc_basename in
5776
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5777
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5782
case $cc_basename in
5784
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5787
# Green Hills C++ Compiler
5788
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5794
freebsd* | dragonfly*)
5795
# FreeBSD uses GNU C++
5797
hpux9* | hpux10* | hpux11*)
5798
case $cc_basename in
5800
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5801
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5802
if test "$host_cpu" != ia64; then
5803
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5807
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5808
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5814
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5823
# This is c89, which is MS Visual C++ (no shared libs)
5824
# Anyone wants to do a port?
5826
irix5* | irix6* | nonstopux*)
5827
case $cc_basename in
5829
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5830
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5831
# CC pic flag -KPIC is the default.
5837
linux* | k*bsd*-gnu)
5838
case $cc_basename in
5841
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5842
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5846
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5847
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5848
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5851
# Portland Group C++ compiler.
5852
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5853
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5854
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5858
# Make sure the PIC flag is empty. It appears that all Alpha
5859
# Linux and Compaq Tru64 Unix objects are PIC.
5860
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5861
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5872
case $cc_basename in
5874
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5880
netbsd* | netbsdelf*-gnu)
5882
osf3* | osf4* | osf5*)
5883
case $cc_basename in
5885
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5888
# Rational C++ 2.4.1
5889
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5892
# Digital/Compaq C++
5893
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5894
# Make sure the PIC flag is empty. It appears that all Alpha
5895
# Linux and Compaq Tru64 Unix objects are PIC.
5896
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5897
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5906
case $cc_basename in
5908
# Sun C++ 4.2, 5.x and Centerline C++
5909
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5910
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5911
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5914
# Green Hills C++ Compiler
5915
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5922
case $cc_basename in
5925
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5926
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5930
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5937
case $cc_basename in
5939
# NonStop-UX NCC 3.20
5940
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5946
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5947
case $cc_basename in
5949
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5950
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5951
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5958
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5964
if test "$GCC" = yes; then
5965
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5966
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5970
# All AIX code is PIC.
5971
if test "$host_cpu" = ia64; then
5972
# AIX 5 now supports IA64 processor
5973
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5978
# FIXME: we need at least 68020 code to build shared libraries, but
5979
# adding the `-m68020' flag to GCC prevents building anything better,
5981
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5984
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5985
# PIC is the default for these OSes.
5988
mingw* | pw32* | os2*)
5989
# This hack is so that the source file can tell whether it is being
5990
# built for inclusion in a dll (and should export symbols for example).
5991
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5994
darwin* | rhapsody*)
5995
# PIC is the default on this platform
5996
# Common symbols not allowed in MH_DYLIB files
5997
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6001
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
6002
# Instead, we relocate shared libraries at runtime.
6006
# Just because we use GCC doesn't mean we suddenly get shared libraries
6007
# on systems that don't support them.
6008
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6013
if test -d /usr/nec; then
6014
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6019
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6026
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6032
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6036
# PORTME Check for flag to pass linker flags through the system compiler.
6039
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6040
if test "$host_cpu" = ia64; then
6041
# AIX 5 now supports IA64 processor
6042
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6044
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6048
# PIC is the default on this platform
6049
# Common symbols not allowed in MH_DYLIB files
6050
case $cc_basename in
6052
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6053
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6058
mingw* | pw32* | os2*)
6059
# This hack is so that the source file can tell whether it is being
6060
# built for inclusion in a dll (and should export symbols for example).
6061
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6064
hpux9* | hpux10* | hpux11*)
6065
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6066
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6073
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6076
# Is there a better lt_prog_compiler_static that works with the bundled CC?
6077
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6080
irix5* | irix6* | nonstopux*)
6081
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6082
# PIC (with -KPIC) is the default.
6083
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6087
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6088
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6091
linux* | k*bsd*-gnu)
6092
case $cc_basename in
6094
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6095
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6096
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6098
pgcc* | pgf77* | pgf90* | pgf95*)
6099
# Portland Group compilers (*not* the Pentium gcc compiler,
6100
# which looks to be a dead project)
6101
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6102
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6103
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6106
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6107
# All Alpha code is PIC.
6108
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6113
osf3* | osf4* | osf5*)
6114
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6115
# All OSF/1 code is PIC.
6116
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6120
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6121
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6122
case $cc_basename in
6124
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6126
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6131
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6132
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6133
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6136
sysv4 | sysv4.2uw2* | sysv4.3*)
6137
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6138
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6139
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6143
if test -d /usr/nec ;then
6144
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6145
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6149
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6150
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6151
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6152
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6156
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6157
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6161
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6162
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6166
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6171
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6174
# Check to make sure the PIC flag actually works.
6176
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6177
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6178
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6179
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6180
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6182
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6184
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6185
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6188
# For platforms which do not support PIC, -DPIC is meaningless:
6190
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6193
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6198
# Check to make sure the static flag actually works.
6200
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6201
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6202
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6203
$lt_tmp_static_flag,
6205
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6209
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6210
# ------------------------------------
6211
# See if the linker supports building shared libraries.
6212
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6213
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6215
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6218
# If we're using GNU nm, then we don't want the "-C" option.
6219
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6220
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6221
_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'
6223
_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'
6227
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6230
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6232
linux* | k*bsd*-gnu)
6233
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
6236
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6241
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6242
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6243
_LT_AC_TAGVAR(archive_cmds, $1)=
6244
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6245
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6246
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6247
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6248
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6249
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6250
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6251
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6252
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6253
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6254
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6255
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6256
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6257
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
6258
_LT_AC_TAGVAR(module_cmds, $1)=
6259
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
6260
_LT_AC_TAGVAR(always_export_symbols, $1)=no
6261
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6262
# include_expsyms should be a list of space-separated symbols to be *always*
6263
# included in the symbol list
6264
_LT_AC_TAGVAR(include_expsyms, $1)=
6265
# exclude_expsyms can be an extended regexp of symbols to exclude
6266
# it will be wrapped by ` (' and `)$', so one must not match beginning or
6267
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6268
# as well as any symbol that contains `d'.
6269
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6270
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6271
# platforms (ab)use it in PIC code, but their linkers get confused if
6272
# the symbol is explicitly referenced. Since portable code cannot
6273
# rely on this symbol name, it's probably fine to never include it in
6274
# preloaded symbol tables.
6275
extract_expsyms_cmds=
6276
# Just being paranoid about ensuring that cc_basename is set.
6277
_LT_CC_BASENAME([$compiler])
6279
cygwin* | mingw* | pw32*)
6280
# FIXME: the MSVC++ port hasn't been tested in a loooong time
6281
# When not using gcc, we currently assume that we are using
6282
# Microsoft Visual C++.
6283
if test "$GCC" != yes; then
6288
# we just hope/assume this is gcc and not c89 (= MSVC++)
6296
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6297
if test "$with_gnu_ld" = yes; then
6298
# If archive_cmds runs LD, not CC, wlarc should be empty
6301
# Set some defaults for GNU ld with shared library support. These
6302
# are reset later if shared libraries are not supported. Putting them
6303
# here allows them to be overridden if necessary.
6304
runpath_var=LD_RUN_PATH
6305
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6306
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6307
# ancient GNU ld didn't support --whole-archive et. al.
6308
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6309
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6311
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6313
supports_anon_versioning=no
6314
case `$LD -v 2>/dev/null` in
6315
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6316
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6317
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6318
*\ 2.11.*) ;; # other 2.11 versions
6319
*) supports_anon_versioning=yes ;;
6322
# See if GNU ld supports shared libraries.
6324
aix3* | aix4* | aix5*)
6325
# On AIX/PPC, the GNU linker is very broken
6326
if test "$host_cpu" != ia64; then
6327
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6330
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6331
*** to be unable to reliably create shared libraries on AIX.
6332
*** Therefore, libtool is disabling shared libraries support. If you
6333
*** really care for shared libraries, you may want to modify your PATH
6334
*** so that a non-GNU linker is found, and then restart.
6341
_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)'
6342
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6343
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6345
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6346
# that the semantics of dynamic libraries on AmigaOS, at least up
6347
# to version 4, is to share data among multiple programs linked
6348
# with the same dynamic library. Since this doesn't match the
6349
# behavior of shared libraries on other platforms, we can't use
6351
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6355
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6356
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6357
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6358
# support --undefined. This deserves some investigation. FIXME
6359
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6361
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6365
cygwin* | mingw* | pw32*)
6366
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6367
# as there is no search path for DLLs.
6368
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6369
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6370
_LT_AC_TAGVAR(always_export_symbols, $1)=no
6371
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6372
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6374
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6375
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6376
# If the export-symbols file already is a .def file (1st line
6377
# is EXPORTS), use it as is; otherwise, prepend...
6378
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6379
cp $export_symbols $output_objdir/$soname.def;
6381
echo EXPORTS > $output_objdir/$soname.def;
6382
cat $export_symbols >> $output_objdir/$soname.def;
6384
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6386
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6391
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6392
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6393
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6394
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6395
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6396
# Instead, shared libraries are loaded at an image base (0x10000000 by
6397
# default) and relocated if they conflict, which is a slow very memory
6398
# consuming and fragmenting process. To avoid this, we pick a random,
6399
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6400
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
6401
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6402
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6405
linux* | k*bsd*-gnu)
6406
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6408
case $cc_basename,$host_cpu in
6409
pgcc*) # Portland Group C compiler
6410
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6411
tmp_addflag=' $pic_flag'
6413
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6414
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6415
tmp_addflag=' $pic_flag -Mnomain' ;;
6416
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6417
tmp_addflag=' -i_dynamic' ;;
6418
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6419
tmp_addflag=' -i_dynamic -nofor_main' ;;
6420
ifc* | ifort*) # Intel Fortran compiler
6421
tmp_addflag=' -nofor_main' ;;
6423
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6425
if test $supports_anon_versioning = yes; then
6426
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6427
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6428
$echo "local: *; };" >> $output_objdir/$libname.ver~
6429
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6431
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
6433
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6437
netbsd* | netbsdelf*-gnu)
6438
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6439
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6442
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6443
_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'
6448
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6449
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6452
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6453
*** create shared libraries on Solaris systems. Therefore, libtool
6454
*** is disabling shared libraries support. We urge you to upgrade GNU
6455
*** binutils to release 2.9.1 or newer. Another option is to modify
6456
*** your PATH or compiler configuration so that the native linker is
6457
*** used, and then restart.
6460
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6461
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6462
_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'
6464
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6468
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6469
case `$LD -v 2>&1` in
6470
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6471
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6474
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6475
*** reliably create shared libraries on SCO systems. Therefore, libtool
6476
*** is disabling shared libraries support. We urge you to upgrade GNU
6477
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6478
*** your PATH or compiler configuration so that the native linker is
6479
*** used, and then restart.
6484
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6485
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6486
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6487
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6489
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6496
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6498
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6499
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6503
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6504
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6505
_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'
6507
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6512
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6514
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6515
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6516
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6519
# PORTME fill in a description of your system's linker (not GNU ld)
6522
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6523
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6524
_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'
6525
# Note: this linker hardcodes the directories in LIBPATH if there
6526
# are no directories specified by -L.
6527
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6528
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6529
# Neither direct hardcoding nor static linking is supported with a
6531
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6536
if test "$host_cpu" = ia64; then
6537
# On IA64, the linker does run time linking by default, so we don't
6538
# have to do anything special.
6539
aix_use_runtimelinking=no
6540
exp_sym_flag='-Bexport'
6543
# If we're using GNU nm, then we don't want the "-C" option.
6544
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6545
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6546
_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'
6548
_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'
6550
aix_use_runtimelinking=no
6552
# Test if we are trying to use run time linking or normal
6553
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6554
# need to do runtime linking.
6555
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6556
for ld_flag in $LDFLAGS; do
6557
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6558
aix_use_runtimelinking=yes
6565
exp_sym_flag='-bexport'
6566
no_entry_flag='-bnoentry'
6569
# When large executables or shared objects are built, AIX ld can
6570
# have problems creating the table of contents. If linking a library
6571
# or program results in "error TOC overflow" add -mminimal-toc to
6572
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6573
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6575
_LT_AC_TAGVAR(archive_cmds, $1)=''
6576
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6577
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6578
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6580
if test "$GCC" = yes; then
6581
case $host_os in aix4.[[012]]|aix4.[[012]].*)
6582
# We only want to do this on AIX 4.2 and lower, the check
6583
# below for broken collect2 doesn't work under 4.3+
6584
collect2name=`${CC} -print-prog-name=collect2`
6585
if test -f "$collect2name" && \
6586
strings "$collect2name" | grep resolve_lib_name >/dev/null
6588
# We have reworked collect2
6589
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6591
# We have old collect2
6592
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6593
# It fails to find uninstalled libraries when the uninstalled
6594
# path is not listed in the libpath. Setting hardcode_minus_L
6595
# to unsupported forces relinking
6596
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6597
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6598
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6602
shared_flag='-shared'
6603
if test "$aix_use_runtimelinking" = yes; then
6604
shared_flag="$shared_flag "'${wl}-G'
6608
if test "$host_cpu" = ia64; then
6609
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6610
# chokes on -Wl,-G. The following line is correct:
6613
if test "$aix_use_runtimelinking" = yes; then
6614
shared_flag='${wl}-G'
6616
shared_flag='${wl}-bM:SRE'
6621
# It seems that -bexpall does not export symbols beginning with
6622
# underscore (_), so it is better to generate a list of symbols to export.
6623
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6624
if test "$aix_use_runtimelinking" = yes; then
6625
# Warning - without using the other runtime loading flags (-brtl),
6626
# -berok will link without error, but may produce a broken library.
6627
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6628
# Determine the default libpath from the value encoded in an empty executable.
6629
_LT_AC_SYS_LIBPATH_AIX
6630
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6631
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6633
if test "$host_cpu" = ia64; then
6634
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6635
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6636
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6638
# Determine the default libpath from the value encoded in an empty executable.
6639
_LT_AC_SYS_LIBPATH_AIX
6640
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6641
# Warning - without using the other run time loading flags,
6642
# -berok will link without error, but may produce a broken library.
6643
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6644
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6645
# Exported symbols can be pulled into shared objects from archives
6646
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6647
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6648
# This is similar to how AIX traditionally builds its shared libraries.
6649
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6655
_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)'
6656
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6657
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6658
# see comment about different semantics on the GNU ld section
6659
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6663
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6666
cygwin* | mingw* | pw32*)
6667
# When not using gcc, we currently assume that we are using
6668
# Microsoft Visual C++.
6669
# hardcode_libdir_flag_spec is actually meaningless, as there is
6670
# no search path for DLLs.
6671
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6672
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6673
# Tell ltmain to make .lib files, not .a files.
6675
# Tell ltmain to make .dll files, not .so files.
6677
# FIXME: Setting linknames here is a bad hack.
6678
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6679
# The linker will automatically build a .lib file if we build a DLL.
6680
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6681
# FIXME: Should let the user specify the lib program.
6682
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6683
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6684
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6687
darwin* | rhapsody*)
6689
rhapsody* | darwin1.[[012]])
6690
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6693
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6694
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6696
case ${MACOSX_DEPLOYMENT_TARGET} in
6698
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6701
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6707
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6708
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6709
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6710
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6711
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6712
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6713
if test "$GCC" = yes ; then
6714
output_verbose_link_cmd='echo'
6715
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6716
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6717
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6718
_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}'
6719
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6721
case $cc_basename in
6723
output_verbose_link_cmd='echo'
6724
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6725
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6726
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6727
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6728
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6731
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6738
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6739
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6740
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6744
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6747
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6748
# support. Future versions do this automatically, but an explicit c++rt0.o
6749
# does not break anything, and helps significantly (at the cost of a little
6752
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6753
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6754
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6755
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6758
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
6760
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6761
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6762
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6763
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6766
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6767
freebsd* | dragonfly*)
6768
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6769
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6770
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6771
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6775
if test "$GCC" = yes; then
6776
_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'
6778
_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'
6780
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6781
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6782
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6784
# hardcode_minus_L: Not really in the search PATH,
6785
# but as the default location of the library.
6786
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6787
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6791
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6792
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6794
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6796
if test "$with_gnu_ld" = no; then
6797
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6798
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6800
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6801
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6803
# hardcode_minus_L: Not really in the search PATH,
6804
# but as the default location of the library.
6805
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6810
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6813
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6816
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6819
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6825
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6828
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6831
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6835
if test "$with_gnu_ld" = no; then
6836
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6837
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6841
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6842
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6843
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6846
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6847
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6849
# hardcode_minus_L: Not really in the search PATH,
6850
# but as the default location of the library.
6851
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6857
irix5* | irix6* | nonstopux*)
6858
if test "$GCC" = yes; then
6859
_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'
6861
_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'
6862
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6864
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6865
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6866
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6869
netbsd* | netbsdelf*-gnu)
6870
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6871
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6873
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6875
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6876
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6877
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6881
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6882
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6883
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6884
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6885
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6889
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6890
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6891
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6892
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6893
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6894
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6895
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6898
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6899
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6900
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6903
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6904
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6911
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6912
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6913
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6914
_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'
6915
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6919
if test "$GCC" = yes; then
6920
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6921
_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'
6923
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6924
_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'
6926
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6927
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6930
osf4* | osf5*) # as osf3* with the addition of -msym flag
6931
if test "$GCC" = yes; then
6932
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6933
_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'
6934
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6936
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6937
_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'
6938
_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~
6939
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6941
# Both c and cxx compiler support -rpath directly
6942
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6944
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6948
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6949
if test "$GCC" = yes; then
6951
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6952
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6953
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6956
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6957
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6958
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6960
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6961
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6963
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6965
# The compiler driver will combine linker options so we
6966
# cannot just pass the convience library names through
6967
# without $wl, iff we do not link with $LD.
6968
# Luckily, gcc supports the same syntax we need for Sun Studio.
6969
# Supported since Solaris 2.6 (maybe 2.5.1?)
6972
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6974
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6977
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6981
if test "x$host_vendor" = xsequent; then
6982
# Use $CC to link under sequent, because it throws in some extra .o
6983
# files that make .init and .fini sections work.
6984
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6986
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6988
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6989
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6990
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6991
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6995
case $host_vendor in
6997
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6998
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7001
## LD is ld it makes a PLAMLIB
7002
## CC just makes a GrossModule.
7003
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7004
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7005
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7008
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7009
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7012
runpath_var='LD_RUN_PATH'
7013
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7017
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7018
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7019
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7023
if test -d /usr/nec; then
7024
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7025
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7026
runpath_var=LD_RUN_PATH
7027
hardcode_runpath_var=yes
7028
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7032
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7033
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7034
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7035
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7036
runpath_var='LD_RUN_PATH'
7038
if test "$GCC" = yes; then
7039
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7040
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7042
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7043
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7047
sysv5* | sco3.2v5* | sco5v6*)
7048
# Note: We can NOT use -z defs as we might desire, because we do not
7049
# link with -lc, and that would cause any symbols used from libc to
7050
# always be unresolved, which means just about no library would
7051
# ever link correctly. If we're not using GNU ld we use -z text
7052
# though, which does catch some bad symbols but isn't as heavy-handed
7054
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7055
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7056
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7057
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7058
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7059
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7060
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7061
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7062
runpath_var='LD_RUN_PATH'
7064
if test "$GCC" = yes; then
7065
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7066
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7068
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7069
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7074
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7075
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7076
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7080
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7085
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7086
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7089
# Do we need to explicitly link libc?
7091
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7093
# Assume -lc should be added
7094
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7096
if test "$enable_shared" = yes && test "$GCC" = yes; then
7097
case $_LT_AC_TAGVAR(archive_cmds, $1) in
7099
# FIXME: we may have to deal with multi-command sequences.
7102
# Test whether the compiler implicitly links with -lc since on some
7103
# systems, -lgcc has to come before -lc. If gcc already passes -lc
7104
# to ld, don't add -lc before -lgcc.
7105
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7107
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7109
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7112
libobjs=conftest.$ac_objext
7114
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7115
pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7121
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7122
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7123
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7125
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7127
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7129
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7131
cat conftest.err 1>&5
7134
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7140
])# AC_LIBTOOL_PROG_LD_SHLIBS
7143
# _LT_AC_FILE_LTDLL_C
7144
# -------------------
7145
# Be careful that the start marker always follows a newline.
7146
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7147
# /* ltdll.c starts here */
7148
# #define WIN32_LEAN_AND_MEAN
7149
# #include <windows.h>
7150
# #undef WIN32_LEAN_AND_MEAN
7151
# #include <stdio.h>
7153
# #ifndef __CYGWIN__
7154
# # ifdef __CYGWIN32__
7155
# # define __CYGWIN__ __CYGWIN32__
7159
# #ifdef __cplusplus
7162
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7163
# #ifdef __cplusplus
7168
# #include <cygwin/cygwin_dll.h>
7169
# DECLARE_CYGWIN_DLL( DllMain );
7171
# HINSTANCE __hDllInstance_base;
7174
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7176
# __hDllInstance_base = hInst;
7179
# /* ltdll.c ends here */
7180
])# _LT_AC_FILE_LTDLL_C
7183
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7184
# ---------------------------------
7185
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7189
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7190
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7191
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7192
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7193
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7194
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7195
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7197
# This is just to silence aclocal about the macro not being used
7198
ifelse([AC_DISABLE_FAST_INSTALL])
7200
AC_DEFUN([LT_AC_PROG_GCJ],
7201
[AC_CHECK_TOOL(GCJ, gcj, no)
7202
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7206
AC_DEFUN([LT_AC_PROG_RC],
7207
[AC_CHECK_TOOL(RC, windres, no)
7210
# NOTE: This macro has been submitted for inclusion into #
7211
# GNU Autoconf as AC_PROG_SED. When it is available in #
7212
# a released version of Autoconf we should remove this #
7213
# macro and use it instead. #
7216
# Check for a fully-functional sed program, that truncates
7217
# as few characters as possible. Prefer GNU sed if found.
7218
AC_DEFUN([LT_AC_PROG_SED],
7219
[AC_MSG_CHECKING([for a sed that does not truncate output])
7220
AC_CACHE_VAL(lt_cv_path_SED,
7221
[# Loop through the user's path and test for sed and gsed.
7222
# Then use that list of sed's as ones to test for truncation.
7223
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7227
test -z "$as_dir" && as_dir=.
7228
for lt_ac_prog in sed gsed; do
7229
for ac_exec_ext in '' $ac_executable_extensions; do
7230
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7231
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7238
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7239
# along with /bin/sed that truncates output.
7240
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7241
test ! -f $lt_ac_sed && continue
7242
cat /dev/null > conftest.in
7244
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7245
# Check for GNU sed and select it if it is found.
7246
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7247
lt_cv_path_SED=$lt_ac_sed
7251
cat conftest.in conftest.in >conftest.tmp
7252
mv conftest.tmp conftest.in
7253
cp conftest.in conftest.nl
7255
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7256
cmp -s conftest.out conftest.nl || break
7257
# 10000 chars as input seems more than enough
7258
test $lt_ac_count -gt 10 && break
7259
lt_ac_count=`expr $lt_ac_count + 1`
7260
if test $lt_ac_count -gt $lt_ac_max; then
7261
lt_ac_max=$lt_ac_count
7262
lt_cv_path_SED=$lt_ac_sed
7268
AC_MSG_RESULT([$SED])
7271
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
7273
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
7275
# This program is free software; you can redistribute it and/or modify
7276
# it under the terms of the GNU General Public License as published by
7277
# the Free Software Foundation; either version 2 of the License, or
7278
# (at your option) any later version.
7280
# This program is distributed in the hope that it will be useful, but
7281
# WITHOUT ANY WARRANTY; without even the implied warranty of
7282
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7283
# General Public License for more details.
7285
# You should have received a copy of the GNU General Public License
7286
# along with this program; if not, write to the Free Software
7287
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7289
# As a special exception to the GNU General Public License, if you
7290
# distribute this file as part of a program that contains a
7291
# configuration script generated by Autoconf, you may include it under
7292
# the same distribution terms that you use for the rest of that program.
7294
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7295
# ----------------------------------
7296
AC_DEFUN([PKG_PROG_PKG_CONFIG],
7297
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7298
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7299
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7300
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7301
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7303
if test -n "$PKG_CONFIG"; then
7304
_pkg_min_version=m4_default([$1], [0.9.0])
7305
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7306
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7307
AC_MSG_RESULT([yes])
7314
])# PKG_PROG_PKG_CONFIG
7316
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7318
# Check to see whether a particular set of modules exists. Similar
7319
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
7322
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
7323
# this or PKG_CHECK_MODULES is called, or make sure to call
7324
# PKG_CHECK_EXISTS manually
7325
# --------------------------------------------------------------
7326
AC_DEFUN([PKG_CHECK_EXISTS],
7327
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7328
if test -n "$PKG_CONFIG" && \
7329
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7330
m4_ifval([$2], [$2], [:])
7331
m4_ifvaln([$3], [else
7336
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7337
# ---------------------------------------------
7338
m4_define([_PKG_CONFIG],
7339
[if test -n "$PKG_CONFIG"; then
7340
if test -n "$$1"; then
7343
PKG_CHECK_EXISTS([$3],
7344
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7352
# _PKG_SHORT_ERRORS_SUPPORTED
7353
# -----------------------------
7354
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
7355
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
7356
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7357
_pkg_short_errors_supported=yes
7359
_pkg_short_errors_supported=no
7361
])# _PKG_SHORT_ERRORS_SUPPORTED
7364
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7365
# [ACTION-IF-NOT-FOUND])
7368
# Note that if there is a possibility the first call to
7369
# PKG_CHECK_MODULES might not happen, you should be sure to include an
7370
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7373
# --------------------------------------------------------------
7374
AC_DEFUN([PKG_CHECK_MODULES],
7375
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7376
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7377
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7380
AC_MSG_CHECKING([for $1])
7382
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7383
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
7385
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
7386
and $1[]_LIBS to avoid the need to call pkg-config.
7387
See the pkg-config man page for more details.])
7389
if test $pkg_failed = yes; then
7390
_PKG_SHORT_ERRORS_SUPPORTED
7391
if test $_pkg_short_errors_supported = yes; then
7392
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
7394
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7396
# Put the nasty error message in config.log where it belongs
7397
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
7399
ifelse([$4], , [AC_MSG_ERROR(dnl
7400
[Package requirements ($2) were not met:
7404
Consider adjusting the PKG_CONFIG_PATH environment variable if you
7405
installed software in a non-standard prefix.
7409
[AC_MSG_RESULT([no])
7411
elif test $pkg_failed = untried; then
7412
ifelse([$4], , [AC_MSG_FAILURE(dnl
7413
[The pkg-config script could not be found or is too old. Make sure it
7414
is in your PATH or set the PKG_CONFIG environment variable to the full
7419
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
7422
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7423
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7424
AC_MSG_RESULT([yes])
7425
ifelse([$3], , :, [$3])
7427
])# PKG_CHECK_MODULES
7429
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
7431
# This file is free software; the Free Software Foundation
7432
# gives unlimited permission to copy and/or distribute it,
7433
# with or without modifications, as long as this notice is preserved.
7435
# AM_AUTOMAKE_VERSION(VERSION)
7436
# ----------------------------
7437
# Automake X.Y traces this macro to ensure aclocal.m4 has been
7438
# generated from the m4 files accompanying Automake X.Y.
7439
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
7441
# AM_SET_CURRENT_AUTOMAKE_VERSION
7442
# -------------------------------
7443
# Call AM_AUTOMAKE_VERSION so it can be traced.
7444
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
7445
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
7446
[AM_AUTOMAKE_VERSION([1.9.6])])
7448
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
7450
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7452
# This file is free software; the Free Software Foundation
7453
# gives unlimited permission to copy and/or distribute it,
7454
# with or without modifications, as long as this notice is preserved.
7456
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
7457
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
7458
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
7460
# Of course, Automake must honor this variable whenever it calls a
7461
# tool from the auxiliary directory. The problem is that $srcdir (and
7462
# therefore $ac_aux_dir as well) can be either absolute or relative,
7463
# depending on how configure is run. This is pretty annoying, since
7464
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7465
# source directory, any form will work fine, but in subdirectories a
7466
# relative path needs to be adjusted first.
7468
# $ac_aux_dir/missing
7469
# fails when called from a subdirectory if $ac_aux_dir is relative
7470
# $top_srcdir/$ac_aux_dir/missing
7471
# fails if $ac_aux_dir is absolute,
7472
# fails when called from a subdirectory in a VPATH build with
7473
# a relative $ac_aux_dir
7475
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
7476
# are both prefixed by $srcdir. In an in-source build this is usually
7477
# harmless because $srcdir is `.', but things will broke when you
7478
# start a VPATH build or use an absolute $srcdir.
7480
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
7481
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
7482
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
7483
# and then we would define $MISSING as
7484
# MISSING="\${SHELL} $am_aux_dir/missing"
7485
# This will work as long as MISSING is not called from configure, because
7486
# unfortunately $(top_srcdir) has no meaning in configure.
7487
# However there are other variables, like CC, which are often used in
7488
# configure, and could therefore not use this "fixed" $ac_aux_dir.
7490
# Another solution, used here, is to always expand $ac_aux_dir to an
7491
# absolute PATH. The drawback is that using absolute paths prevent a
7492
# configured tree to be moved without reconfiguration.
7494
AC_DEFUN([AM_AUX_DIR_EXPAND],
7495
[dnl Rely on autoconf to set up CDPATH properly.
7496
AC_PREREQ([2.50])dnl
7497
# expand $ac_aux_dir to an absolute path
7498
am_aux_dir=`cd $ac_aux_dir && pwd`
7501
# AM_CONDITIONAL -*- Autoconf -*-
7503
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
7504
# Free Software Foundation, Inc.
7506
# This file is free software; the Free Software Foundation
7507
# gives unlimited permission to copy and/or distribute it,
7508
# with or without modifications, as long as this notice is preserved.
7512
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
7513
# -------------------------------------
7514
# Define a conditional.
7515
AC_DEFUN([AM_CONDITIONAL],
7517
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
7518
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
7520
AC_SUBST([$1_FALSE])
7528
AC_CONFIG_COMMANDS_PRE(
7529
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
7530
AC_MSG_ERROR([[conditional "$1" was never defined.
7531
Usually this means the macro was only invoked conditionally.]])
7535
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
7536
# Free Software Foundation, Inc.
7538
# This file is free software; the Free Software Foundation
7539
# gives unlimited permission to copy and/or distribute it,
7540
# with or without modifications, as long as this notice is preserved.
7544
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
7545
# written in clear, in which case automake, when reading aclocal.m4,
7546
# will think it sees a *use*, and therefore will trigger all it's
7547
# C support machinery. Also note that it means that autoscan, seeing
7548
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
7551
# _AM_DEPENDENCIES(NAME)
7552
# ----------------------
7553
# See how the compiler implements dependency checking.
7554
# NAME is "CC", "CXX", "GCJ", or "OBJC".
7555
# We try a few techniques and use that to set a single cache variable.
7557
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
7558
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
7559
# dependency, and given that the user is not expected to run this macro,
7560
# just rely on AC_PROG_CC.
7561
AC_DEFUN([_AM_DEPENDENCIES],
7562
[AC_REQUIRE([AM_SET_DEPDIR])dnl
7563
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
7564
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
7565
AC_REQUIRE([AM_DEP_TRACK])dnl
7567
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
7568
[$1], CXX, [depcc="$CXX" am_compiler_list=],
7569
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
7570
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
7571
[depcc="$$1" am_compiler_list=])
7573
AC_CACHE_CHECK([dependency style of $depcc],
7574
[am_cv_$1_dependencies_compiler_type],
7575
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7576
# We make a subdir and do the tests there. Otherwise we can end up
7577
# making bogus files that we don't know about and never remove. For
7578
# instance it was reported that on HP-UX the gcc test will end up
7579
# making a dummy file named `D' -- because `-MD' means `put the output
7582
# Copy depcomp to subdir because otherwise we won't find it if we're
7583
# using a relative directory.
7584
cp "$am_depcomp" conftest.dir
7586
# We will build objects and dependencies in a subdirectory because
7587
# it helps to detect inapplicable dependency modes. For instance
7588
# both Tru64's cc and ICC support -MD to output dependencies as a
7589
# side effect of compilation, but ICC will put the dependencies in
7590
# the current directory while Tru64 will put them in the object
7594
am_cv_$1_dependencies_compiler_type=none
7595
if test "$am_compiler_list" = ""; then
7596
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7598
for depmode in $am_compiler_list; do
7599
# Setup a source with many dependencies, because some compilers
7600
# like to wrap large dependency lists on column 80 (with \), and
7601
# we should not choose a depcomp mode which is confused by this.
7603
# We need to recreate these files for each test, as the compiler may
7604
# overwrite some of them when testing with obscure command lines.
7605
# This happens at least with the AIX C compiler.
7607
for i in 1 2 3 4 5 6; do
7608
echo '#include "conftst'$i'.h"' >> sub/conftest.c
7609
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7610
# Solaris 8's {/usr,}/bin/sh.
7611
touch sub/conftst$i.h
7613
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7617
# after this tag, mechanisms are not by side-effect, so they'll
7618
# only be used when explicitly requested
7619
if test "x$enable_dependency_tracking" = xyes; then
7627
# We check with `-c' and `-o' for the sake of the "dashmstdout"
7628
# mode. It turns out that the SunPro C++ compiler does not properly
7629
# handle `-M -o', and we need to detect this.
7630
if depmode=$depmode \
7631
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7632
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7633
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7634
>/dev/null 2>conftest.err &&
7635
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7636
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7637
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7638
# icc doesn't choke on unknown options, it will just issue warnings
7639
# or remarks (even with -Werror). So we grep stderr for any message
7640
# that says an option was ignored or not supported.
7641
# When given -MP, icc 7.0 and 7.1 complain thusly:
7642
# icc: Command line warning: ignoring option '-M'; no argument required
7643
# The diagnosis changed in icc 8.0:
7644
# icc: Command line remark: option '-MP' not supported
7645
if (grep 'ignoring option' conftest.err ||
7646
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7647
am_cv_$1_dependencies_compiler_type=$depmode
7656
am_cv_$1_dependencies_compiler_type=none
7659
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7660
AM_CONDITIONAL([am__fastdep$1], [
7661
test "x$enable_dependency_tracking" != xno \
7662
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7668
# Choose a directory name for dependency files.
7669
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
7670
AC_DEFUN([AM_SET_DEPDIR],
7671
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7672
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7678
AC_DEFUN([AM_DEP_TRACK],
7679
[AC_ARG_ENABLE(dependency-tracking,
7680
[ --disable-dependency-tracking speeds up one-time build
7681
--enable-dependency-tracking do not reject slow dependency extractors])
7682
if test "x$enable_dependency_tracking" != xno; then
7683
am_depcomp="$ac_aux_dir/depcomp"
7686
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7687
AC_SUBST([AMDEPBACKSLASH])
7690
# Generate code to set up dependency tracking. -*- Autoconf -*-
7692
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
7693
# Free Software Foundation, Inc.
7695
# This file is free software; the Free Software Foundation
7696
# gives unlimited permission to copy and/or distribute it,
7697
# with or without modifications, as long as this notice is preserved.
7701
# _AM_OUTPUT_DEPENDENCY_COMMANDS
7702
# ------------------------------
7703
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7704
[for mf in $CONFIG_FILES; do
7705
# Strip MF so we end up with the name of the file.
7706
mf=`echo "$mf" | sed -e 's/:.*$//'`
7707
# Check whether this is an Automake generated Makefile or not.
7708
# We used to match only the files named `Makefile.in', but
7709
# some people rename them; so instead we look at the file content.
7710
# Grep'ing the first line is not enough: some people post-process
7711
# each Makefile.in and add a new line on top of each file to say so.
7712
# So let's grep whole file.
7713
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
7714
dirpart=`AS_DIRNAME("$mf")`
7718
# Extract the definition of DEPDIR, am__include, and am__quote
7719
# from the Makefile without running `make'.
7720
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7721
test -z "$DEPDIR" && continue
7722
am__include=`sed -n 's/^am__include = //p' < "$mf"`
7723
test -z "am__include" && continue
7724
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7725
# When using ansi2knr, U may be empty or an underscore; expand it
7726
U=`sed -n 's/^U = //p' < "$mf"`
7727
# Find all dependency output files, they are included files with
7728
# $(DEPDIR) in their names. We invoke sed twice because it is the
7729
# simplest approach to changing $(DEPDIR) to its actual value in the
7731
for file in `sed -n "
7732
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7733
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7734
# Make sure the directory exists.
7735
test -f "$dirpart/$file" && continue
7736
fdir=`AS_DIRNAME(["$file"])`
7737
AS_MKDIR_P([$dirpart/$fdir])
7738
# echo "creating $dirpart/$file"
7739
echo '# dummy' > "$dirpart/$file"
7742
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7745
# AM_OUTPUT_DEPENDENCY_COMMANDS
7746
# -----------------------------
7747
# This macro should only be invoked once -- use via AC_REQUIRE.
7749
# This code is only required when automatic dependency tracking
7750
# is enabled. FIXME. This creates each `.P' file that we will
7751
# need in order to bootstrap the dependency handling code.
7752
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7753
[AC_CONFIG_COMMANDS([depfiles],
7754
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7755
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7758
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7759
# Free Software Foundation, Inc.
7761
# This file is free software; the Free Software Foundation
7762
# gives unlimited permission to copy and/or distribute it,
7763
# with or without modifications, as long as this notice is preserved.
7767
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
7768
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7770
# Do all the work for Automake. -*- Autoconf -*-
7772
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
7773
# Free Software Foundation, Inc.
7775
# This file is free software; the Free Software Foundation
7776
# gives unlimited permission to copy and/or distribute it,
7777
# with or without modifications, as long as this notice is preserved.
7781
# This macro actually does too much. Some checks are only needed if
7782
# your package does certain things. But this isn't really a big deal.
7784
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7785
# AM_INIT_AUTOMAKE([OPTIONS])
7786
# -----------------------------------------------
7787
# The call with PACKAGE and VERSION arguments is the old style
7788
# call (pre autoconf-2.50), which is being phased out. PACKAGE
7789
# and VERSION should now be passed to AC_INIT and removed from
7790
# the call to AM_INIT_AUTOMAKE.
7791
# We support both call styles for the transition. After
7792
# the next Automake release, Autoconf can make the AC_INIT
7793
# arguments mandatory, and then we can depend on a new Autoconf
7794
# release and drop the old call support.
7795
AC_DEFUN([AM_INIT_AUTOMAKE],
7796
[AC_PREREQ([2.58])dnl
7797
dnl Autoconf wants to disallow AM_ names. We explicitly allow
7798
dnl the ones we care about.
7799
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7800
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7801
AC_REQUIRE([AC_PROG_INSTALL])dnl
7802
# test to see if srcdir already configured
7803
if test "`cd $srcdir && pwd`" != "`pwd`" &&
7804
test -f $srcdir/config.status; then
7805
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7808
# test whether we have cygpath
7809
if test -z "$CYGPATH_W"; then
7810
if (cygpath --version) >/dev/null 2>/dev/null; then
7811
CYGPATH_W='cygpath -w'
7816
AC_SUBST([CYGPATH_W])
7818
# Define the identity of the package.
7819
dnl Distinguish between old-style and new-style calls.
7821
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7822
AC_SUBST([PACKAGE], [$1])dnl
7823
AC_SUBST([VERSION], [$2])],
7824
[_AM_SET_OPTIONS([$1])dnl
7825
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7826
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7828
_AM_IF_OPTION([no-define],,
7829
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7830
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7832
# Some tools Automake needs.
7833
AC_REQUIRE([AM_SANITY_CHECK])dnl
7834
AC_REQUIRE([AC_ARG_PROGRAM])dnl
7835
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7836
AM_MISSING_PROG(AUTOCONF, autoconf)
7837
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7838
AM_MISSING_PROG(AUTOHEADER, autoheader)
7839
AM_MISSING_PROG(MAKEINFO, makeinfo)
7841
AM_PROG_INSTALL_STRIP
7842
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
7843
# We need awk for the "check" target. The system "awk" is bad on
7845
AC_REQUIRE([AC_PROG_AWK])dnl
7846
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7847
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7848
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7849
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7850
[_AM_PROG_TAR([v7])])])
7851
_AM_IF_OPTION([no-dependencies],,
7852
[AC_PROVIDE_IFELSE([AC_PROG_CC],
7853
[_AM_DEPENDENCIES(CC)],
7854
[define([AC_PROG_CC],
7855
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7856
AC_PROVIDE_IFELSE([AC_PROG_CXX],
7857
[_AM_DEPENDENCIES(CXX)],
7858
[define([AC_PROG_CXX],
7859
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7864
# When config.status generates a header, we must update the stamp-h file.
7865
# This file resides in the same directory as the config header
7866
# that is generated. The stamp files are numbered to have different names.
7868
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7869
# loop where config.status creates the headers, so we can generate
7870
# our stamp files there.
7871
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7872
[# Compute $1's index in $config_headers.
7874
for _am_header in $config_headers :; do
7879
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
7882
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
7884
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7886
# This file is free software; the Free Software Foundation
7887
# gives unlimited permission to copy and/or distribute it,
7888
# with or without modifications, as long as this notice is preserved.
7890
# AM_PROG_INSTALL_SH
7891
# ------------------
7892
# Define $install_sh.
7893
AC_DEFUN([AM_PROG_INSTALL_SH],
7894
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7895
install_sh=${install_sh-"$am_aux_dir/install-sh"}
7896
AC_SUBST(install_sh)])
7898
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
7900
# This file is free software; the Free Software Foundation
7901
# gives unlimited permission to copy and/or distribute it,
7902
# with or without modifications, as long as this notice is preserved.
7906
# Check whether the underlying file-system supports filenames
7907
# with a leading dot. For instance MS-DOS doesn't.
7908
AC_DEFUN([AM_SET_LEADING_DOT],
7909
[rm -rf .tst 2>/dev/null
7910
mkdir .tst 2>/dev/null
7911
if test -d .tst; then
7916
rmdir .tst 2>/dev/null
7917
AC_SUBST([am__leading_dot])])
7919
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
7922
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
7923
# Free Software Foundation, Inc.
7925
# This file is free software; the Free Software Foundation
7926
# gives unlimited permission to copy and/or distribute it,
7927
# with or without modifications, as long as this notice is preserved.
7931
AC_DEFUN([AM_MAINTAINER_MODE],
7932
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7933
dnl maintainer-mode is disabled by default
7934
AC_ARG_ENABLE(maintainer-mode,
7935
[ --enable-maintainer-mode enable make rules and dependencies not useful
7936
(and sometimes confusing) to the casual installer],
7937
USE_MAINTAINER_MODE=$enableval,
7938
USE_MAINTAINER_MODE=no)
7939
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7940
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7941
MAINT=$MAINTAINER_MODE_TRUE
7946
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7948
# Check to see how 'make' treats includes. -*- Autoconf -*-
7950
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7952
# This file is free software; the Free Software Foundation
7953
# gives unlimited permission to copy and/or distribute it,
7954
# with or without modifications, as long as this notice is preserved.
7960
# Check to see how make treats includes.
7961
AC_DEFUN([AM_MAKE_INCLUDE],
7962
[am_make=${MAKE-make}
7963
cat > confinc << 'END'
7968
# If we don't find an include directive, just comment out the code.
7969
AC_MSG_CHECKING([for style of include used by $am_make])
7973
# First try GNU make style include.
7974
echo "include confinc" > confmf
7975
# We grep out `Entering directory' and `Leaving directory'
7976
# messages which can occur if `w' ends up in MAKEFLAGS.
7977
# In particular we don't look at `^make:' because GNU make might
7978
# be invoked under some other name (usually "gmake"), in which
7979
# case it prints its new name instead of `make'.
7980
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7985
# Now try BSD make style include.
7986
if test "$am__include" = "#"; then
7987
echo '.include "confinc"' > confmf
7988
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7989
am__include=.include
7994
AC_SUBST([am__include])
7995
AC_SUBST([am__quote])
7996
AC_MSG_RESULT([$_am_result])
7997
rm -f confinc confmf
8000
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
8002
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
8003
# Free Software Foundation, Inc.
8005
# This file is free software; the Free Software Foundation
8006
# gives unlimited permission to copy and/or distribute it,
8007
# with or without modifications, as long as this notice is preserved.
8011
# AM_MISSING_PROG(NAME, PROGRAM)
8012
# ------------------------------
8013
AC_DEFUN([AM_MISSING_PROG],
8014
[AC_REQUIRE([AM_MISSING_HAS_RUN])
8015
$1=${$1-"${am_missing_run}$2"}
8019
# AM_MISSING_HAS_RUN
8020
# ------------------
8021
# Define MISSING if not defined so far and test if it supports --run.
8022
# If it does, set am_missing_run to use it, otherwise, to nothing.
8023
AC_DEFUN([AM_MISSING_HAS_RUN],
8024
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8025
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
8026
# Use eval to expand $SHELL
8027
if eval "$MISSING --run true"; then
8028
am_missing_run="$MISSING --run "
8031
AC_MSG_WARN([`missing' script is too old or missing])
8035
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
8037
# This file is free software; the Free Software Foundation
8038
# gives unlimited permission to copy and/or distribute it,
8039
# with or without modifications, as long as this notice is preserved.
8043
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
8045
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
8046
# created by `make install' are always world readable, even if the
8047
# installer happens to have an overly restrictive umask (e.g. 077).
8048
# This was a mistake. There are at least two reasons why we must not
8050
# - it causes special bits like SGID to be ignored,
8051
# - it may be too restrictive (some setups expect 775 directories).
8053
# Do not use -m 0755 and let people choose whatever they expect by
8056
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
8057
# Some implementations (such as Solaris 8's) are not thread-safe: if a
8058
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
8059
# concurrently, both version can detect that a/ is missing, but only
8060
# one can create it and the other will error out. Consequently we
8061
# restrict ourselves to GNU make (using the --version option ensures
8063
AC_DEFUN([AM_PROG_MKDIR_P],
8064
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
8065
# We used to keeping the `.' as first argument, in order to
8066
# allow $(mkdir_p) to be used without argument. As in
8067
# $(mkdir_p) $(somedir)
8068
# where $(somedir) is conditionally defined. However this is wrong
8070
# 1. if the package is installed by a user who cannot write `.'
8071
# make install will fail,
8072
# 2. the above comment should most certainly read
8073
# $(mkdir_p) $(DESTDIR)$(somedir)
8074
# so it does not work when $(somedir) is undefined and
8075
# $(DESTDIR) is not.
8076
# To support the latter case, we have to write
8077
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
8078
# so the `.' trick is pointless.
8079
mkdir_p='mkdir -p --'
8081
# On NextStep and OpenStep, the `mkdir' command does not
8082
# recognize any option. It will interpret all options as
8083
# directories to create, and then abort because `.' already
8085
for d in ./-p ./--version;
8087
test -d $d && rmdir $d
8089
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
8090
if test -f "$ac_aux_dir/mkinstalldirs"; then
8091
mkdir_p='$(mkinstalldirs)'
8093
mkdir_p='$(install_sh) -d'
8096
AC_SUBST([mkdir_p])])
8098
# Helper functions for option handling. -*- Autoconf -*-
8100
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
8102
# This file is free software; the Free Software Foundation
8103
# gives unlimited permission to copy and/or distribute it,
8104
# with or without modifications, as long as this notice is preserved.
8108
# _AM_MANGLE_OPTION(NAME)
8109
# -----------------------
8110
AC_DEFUN([_AM_MANGLE_OPTION],
8111
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8113
# _AM_SET_OPTION(NAME)
8114
# ------------------------------
8115
# Set option NAME. Presently that only means defining a flag for this option.
8116
AC_DEFUN([_AM_SET_OPTION],
8117
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8119
# _AM_SET_OPTIONS(OPTIONS)
8120
# ----------------------------------
8121
# OPTIONS is a space-separated list of Automake options.
8122
AC_DEFUN([_AM_SET_OPTIONS],
8123
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8125
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8126
# -------------------------------------------
8127
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8128
AC_DEFUN([_AM_IF_OPTION],
8129
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8131
# Check to make sure that the build environment is sane. -*- Autoconf -*-
8133
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
8134
# Free Software Foundation, Inc.
8136
# This file is free software; the Free Software Foundation
8137
# gives unlimited permission to copy and/or distribute it,
8138
# with or without modifications, as long as this notice is preserved.
8144
AC_DEFUN([AM_SANITY_CHECK],
8145
[AC_MSG_CHECKING([whether build environment is sane])
8148
echo timestamp > conftest.file
8149
# Do `set' in a subshell so we don't clobber the current shell's
8150
# arguments. Must try -L first in case configure is actually a
8151
# symlink; some systems play weird games with the mod time of symlinks
8152
# (eg FreeBSD returns the mod time of the symlink's containing
8155
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
8156
if test "$[*]" = "X"; then
8158
set X `ls -t $srcdir/configure conftest.file`
8161
if test "$[*]" != "X $srcdir/configure conftest.file" \
8162
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
8164
# If neither matched, then we have a broken ls. This can happen
8165
# if, for instance, CONFIG_SHELL is bash and it inherits a
8166
# broken ls alias from the environment. This has actually
8167
# happened. Such a system could not be considered "sane".
8168
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
8169
alias in your environment])
8172
test "$[2]" = conftest.file
8178
AC_MSG_ERROR([newly created file is older than distributed files!
8179
Check your system clock])
8181
AC_MSG_RESULT(yes)])
8183
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8185
# This file is free software; the Free Software Foundation
8186
# gives unlimited permission to copy and/or distribute it,
8187
# with or without modifications, as long as this notice is preserved.
8189
# AM_PROG_INSTALL_STRIP
8190
# ---------------------
8191
# One issue with vendor `install' (even GNU) is that you can't
8192
# specify the program used to strip binaries. This is especially
8193
# annoying in cross-compiling environments, where the build's strip
8194
# is unlikely to handle the host's binaries.
8195
# Fortunately install-sh will honor a STRIPPROG variable, so we
8196
# always use install-sh in `make install-strip', and initialize
8197
# STRIPPROG with the value of the STRIP variable (set by the user).
8198
AC_DEFUN([AM_PROG_INSTALL_STRIP],
8199
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8200
# Installed binaries are usually stripped using `strip' when the user
8201
# run `make install-strip'. However `strip' might not be the right
8202
# tool to use in cross-compilation environments, therefore Automake
8203
# will honor the `STRIP' environment variable to overrule this program.
8204
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
8205
if test "$cross_compiling" != no; then
8206
AC_CHECK_TOOL([STRIP], [strip], :)
8208
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
8209
AC_SUBST([INSTALL_STRIP_PROGRAM])])
8211
# Check how to create a tarball. -*- Autoconf -*-
8213
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
8215
# This file is free software; the Free Software Foundation
8216
# gives unlimited permission to copy and/or distribute it,
8217
# with or without modifications, as long as this notice is preserved.
8221
# _AM_PROG_TAR(FORMAT)
8222
# --------------------
8223
# Check how to create a tarball in format FORMAT.
8224
# FORMAT should be one of `v7', `ustar', or `pax'.
8226
# Substitute a variable $(am__tar) that is a command
8227
# writing to stdout a FORMAT-tarball containing the directory
8229
# tardir=directory && $(am__tar) > result.tar
8231
# Substitute a variable $(am__untar) that extract such
8232
# a tarball read from stdin.
8233
# $(am__untar) < result.tar
8234
AC_DEFUN([_AM_PROG_TAR],
8235
[# Always define AMTAR for backward compatibility.
8236
AM_MISSING_PROG([AMTAR], [tar])
8238
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
8239
[m4_case([$1], [ustar],, [pax],,
8240
[m4_fatal([Unknown tar format])])
8241
AC_MSG_CHECKING([how to create a $1 tar archive])
8242
# Loop over all known methods to create a tar archive until one works.
8243
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
8244
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
8245
# Do not fold the above two line into one, because Tru64 sh and
8246
# Solaris sh will not grok spaces in the rhs of `-'.
8247
for _am_tool in $_am_tools
8251
for _am_tar in tar gnutar gtar;
8253
AM_RUN_LOG([$_am_tar --version]) && break
8255
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
8256
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
8257
am__untar="$_am_tar -xf -"
8260
# Must skip GNU tar: if it does not support --format= it doesn't create
8261
# ustar tarball either.
8262
(tar --version) >/dev/null 2>&1 && continue
8263
am__tar='tar chf - "$$tardir"'
8264
am__tar_='tar chf - "$tardir"'
8265
am__untar='tar xf -'
8268
am__tar='pax -L -x $1 -w "$$tardir"'
8269
am__tar_='pax -L -x $1 -w "$tardir"'
8273
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
8274
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
8275
am__untar='cpio -i -H $1 -d'
8284
# If the value was cached, stop now. We just wanted to have am__tar
8285
# and am__untar set.
8286
test -n "${am_cv_prog_tar_$1}" && break
8288
# tar/untar a dummy directory, and stop if the command works
8291
echo GrepMe > conftest.dir/file
8292
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
8294
if test -s conftest.tar; then
8295
AM_RUN_LOG([$am__untar <conftest.tar])
8296
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
8301
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
8302
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
8304
AC_SUBST([am__untar])
8307
m4_include([acinclude.m4])