~lfaraone/pygtksheet/trunk

1 by Víctor M. Hernández
Initial commit
1
# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
2
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
8
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
# PARTICULAR PURPOSE.
13
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17
[m4_warning([this file was generated for autoconf 2.63.
18
You have another version of autoconf.  It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22
# Configure paths for GTK+
23
# Owen Taylor     1997-2001
24
25
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
26
dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, 
27
dnl pass to pkg-config
28
dnl
29
AC_DEFUN([AM_PATH_GTK_2_0],
30
[dnl 
31
dnl Get the cflags and libraries from pkg-config
32
dnl
33
AC_ARG_ENABLE(gtktest, [  --disable-gtktest       do not try to compile and run a test GTK+ program],
34
		    , enable_gtktest=yes)
35
36
  pkg_config_args=gtk+-2.0
37
  for module in . $4
38
  do
39
      case "$module" in
40
         gthread) 
41
             pkg_config_args="$pkg_config_args gthread-2.0"
42
         ;;
43
      esac
44
  done
45
46
  no_gtk=""
47
48
  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
49
50
  if test x$PKG_CONFIG != xno ; then
51
    if pkg-config --atleast-pkgconfig-version 0.7 ; then
52
      :
53
    else
54
      echo "*** pkg-config too old; version 0.7 or better required."
55
      no_gtk=yes
56
      PKG_CONFIG=no
57
    fi
58
  else
59
    no_gtk=yes
60
  fi
61
62
  min_gtk_version=ifelse([$1], ,2.0.0,$1)
63
  AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
64
65
  if test x$PKG_CONFIG != xno ; then
66
    ## don't try to run the test against uninstalled libtool libs
67
    if $PKG_CONFIG --uninstalled $pkg_config_args; then
68
	  echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
69
	  enable_gtktest=no
70
    fi
71
72
    if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
73
	  :
74
    else
75
	  no_gtk=yes
76
    fi
77
  fi
78
79
  if test x"$no_gtk" = x ; then
80
    GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
81
    GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
82
    gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
83
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
84
    gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
85
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
86
    gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
87
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
88
    if test "x$enable_gtktest" = "xyes" ; then
89
      ac_save_CFLAGS="$CFLAGS"
90
      ac_save_LIBS="$LIBS"
91
      CFLAGS="$CFLAGS $GTK_CFLAGS"
92
      LIBS="$GTK_LIBS $LIBS"
93
dnl
94
dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
95
dnl checks the results of pkg-config to some extent)
96
dnl
97
      rm -f conf.gtktest
98
      AC_TRY_RUN([
99
#include <gtk/gtk.h>
100
#include <stdio.h>
101
#include <stdlib.h>
102
103
int 
104
main ()
105
{
106
  int major, minor, micro;
107
  char *tmp_version;
108
109
  system ("touch conf.gtktest");
110
111
  /* HP/UX 9 (%@#!) writes to sscanf strings */
112
  tmp_version = g_strdup("$min_gtk_version");
113
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
114
     printf("%s, bad version string\n", "$min_gtk_version");
115
     exit(1);
116
   }
117
118
  if ((gtk_major_version != $gtk_config_major_version) ||
119
      (gtk_minor_version != $gtk_config_minor_version) ||
120
      (gtk_micro_version != $gtk_config_micro_version))
121
    {
122
      printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
123
             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
124
             gtk_major_version, gtk_minor_version, gtk_micro_version);
125
      printf ("*** was found! If pkg-config was correct, then it is best\n");
126
      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
127
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
128
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
129
      printf("*** required on your system.\n");
130
      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
131
      printf("*** to point to the correct configuration files\n");
132
    } 
133
  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
134
	   (gtk_minor_version != GTK_MINOR_VERSION) ||
135
           (gtk_micro_version != GTK_MICRO_VERSION))
136
    {
137
      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
138
	     GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
139
      printf("*** library (version %d.%d.%d)\n",
140
	     gtk_major_version, gtk_minor_version, gtk_micro_version);
141
    }
142
  else
143
    {
144
      if ((gtk_major_version > major) ||
145
        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
146
        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
147
      {
148
        return 0;
149
       }
150
     else
151
      {
152
        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
153
               gtk_major_version, gtk_minor_version, gtk_micro_version);
154
        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
155
	       major, minor, micro);
156
        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
157
        printf("***\n");
158
        printf("*** If you have already installed a sufficiently new version, this error\n");
159
        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
160
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
161
        printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
162
        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
163
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
164
        printf("*** so that the correct libraries are found at run-time))\n");
165
      }
166
    }
167
  return 1;
168
}
169
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
170
       CFLAGS="$ac_save_CFLAGS"
171
       LIBS="$ac_save_LIBS"
172
     fi
173
  fi
174
  if test "x$no_gtk" = x ; then
175
     AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
176
     ifelse([$2], , :, [$2])     
177
  else
178
     AC_MSG_RESULT(no)
179
     if test "$PKG_CONFIG" = "no" ; then
180
       echo "*** A new enough version of pkg-config was not found."
181
       echo "*** See http://pkgconfig.sourceforge.net"
182
     else
183
       if test -f conf.gtktest ; then
184
        :
185
       else
186
          echo "*** Could not run GTK+ test program, checking why..."
187
	  ac_save_CFLAGS="$CFLAGS"
188
	  ac_save_LIBS="$LIBS"
189
          CFLAGS="$CFLAGS $GTK_CFLAGS"
190
          LIBS="$LIBS $GTK_LIBS"
191
          AC_TRY_LINK([
192
#include <gtk/gtk.h>
193
#include <stdio.h>
194
],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
195
        [ echo "*** The test program compiled, but did not run. This usually means"
196
          echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
197
          echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
198
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
199
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
200
          echo "*** is required on your system"
201
	  echo "***"
202
          echo "*** If you have an old version installed, it is best to remove it, although"
203
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
204
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
205
          echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
206
          CFLAGS="$ac_save_CFLAGS"
207
          LIBS="$ac_save_LIBS"
208
       fi
209
     fi
210
     GTK_CFLAGS=""
211
     GTK_LIBS=""
212
     ifelse([$3], , :, [$3])
213
  fi
214
  AC_SUBST(GTK_CFLAGS)
215
  AC_SUBST(GTK_LIBS)
216
  rm -f conf.gtktest
217
])
218
219
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
220
#
221
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
222
#                 2006, 2007, 2008 Free Software Foundation, Inc.
223
#   Written by Gordon Matzigkeit, 1996
224
#
225
# This file is free software; the Free Software Foundation gives
226
# unlimited permission to copy and/or distribute it, with or without
227
# modifications, as long as this notice is preserved.
228
229
m4_define([_LT_COPYING], [dnl
230
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
231
#                 2006, 2007, 2008 Free Software Foundation, Inc.
232
#   Written by Gordon Matzigkeit, 1996
233
#
234
#   This file is part of GNU Libtool.
235
#
236
# GNU Libtool is free software; you can redistribute it and/or
237
# modify it under the terms of the GNU General Public License as
238
# published by the Free Software Foundation; either version 2 of
239
# the License, or (at your option) any later version.
240
#
241
# As a special exception to the GNU General Public License,
242
# if you distribute this file as part of a program or library that
243
# is built using GNU Libtool, you may include this file under the
244
# same distribution terms that you use for the rest of that program.
245
#
246
# GNU Libtool is distributed in the hope that it will be useful,
247
# but WITHOUT ANY WARRANTY; without even the implied warranty of
248
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
249
# GNU General Public License for more details.
250
#
251
# You should have received a copy of the GNU General Public License
252
# along with GNU Libtool; see the file COPYING.  If not, a copy
253
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
254
# obtained by writing to the Free Software Foundation, Inc.,
255
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
256
])
257
258
# serial 56 LT_INIT
259
260
261
# LT_PREREQ(VERSION)
262
# ------------------
263
# Complain and exit if this libtool version is less that VERSION.
264
m4_defun([LT_PREREQ],
265
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
266
       [m4_default([$3],
267
		   [m4_fatal([Libtool version $1 or higher is required],
268
		             63)])],
269
       [$2])])
270
271
272
# _LT_CHECK_BUILDDIR
273
# ------------------
274
# Complain if the absolute build directory name contains unusual characters
275
m4_defun([_LT_CHECK_BUILDDIR],
276
[case `pwd` in
277
  *\ * | *\	*)
278
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
279
esac
280
])
281
282
283
# LT_INIT([OPTIONS])
284
# ------------------
285
AC_DEFUN([LT_INIT],
286
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
287
AC_BEFORE([$0], [LT_LANG])dnl
288
AC_BEFORE([$0], [LT_OUTPUT])dnl
289
AC_BEFORE([$0], [LTDL_INIT])dnl
290
m4_require([_LT_CHECK_BUILDDIR])dnl
291
292
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
293
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
294
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
295
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
296
dnl unless we require an AC_DEFUNed macro:
297
AC_REQUIRE([LTOPTIONS_VERSION])dnl
298
AC_REQUIRE([LTSUGAR_VERSION])dnl
299
AC_REQUIRE([LTVERSION_VERSION])dnl
300
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
301
m4_require([_LT_PROG_LTMAIN])dnl
302
303
dnl Parse OPTIONS
304
_LT_SET_OPTIONS([$0], [$1])
305
306
# This can be used to rebuild libtool when needed
307
LIBTOOL_DEPS="$ltmain"
308
309
# Always use our own libtool.
310
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
311
AC_SUBST(LIBTOOL)dnl
312
313
_LT_SETUP
314
315
# Only expand once:
316
m4_define([LT_INIT])
317
])# LT_INIT
318
319
# Old names:
320
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
321
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
322
dnl aclocal-1.4 backwards compatibility:
323
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
324
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
325
326
327
# _LT_CC_BASENAME(CC)
328
# -------------------
329
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
330
m4_defun([_LT_CC_BASENAME],
331
[for cc_temp in $1""; do
332
  case $cc_temp in
333
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
334
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
335
    \-*) ;;
336
    *) break;;
337
  esac
338
done
339
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
340
])
341
342
343
# _LT_FILEUTILS_DEFAULTS
344
# ----------------------
345
# It is okay to use these file commands and assume they have been set
346
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
347
m4_defun([_LT_FILEUTILS_DEFAULTS],
348
[: ${CP="cp -f"}
349
: ${MV="mv -f"}
350
: ${RM="rm -f"}
351
])# _LT_FILEUTILS_DEFAULTS
352
353
354
# _LT_SETUP
355
# ---------
356
m4_defun([_LT_SETUP],
357
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
358
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
359
_LT_DECL([], [host_alias], [0], [The host system])dnl
360
_LT_DECL([], [host], [0])dnl
361
_LT_DECL([], [host_os], [0])dnl
362
dnl
363
_LT_DECL([], [build_alias], [0], [The build system])dnl
364
_LT_DECL([], [build], [0])dnl
365
_LT_DECL([], [build_os], [0])dnl
366
dnl
367
AC_REQUIRE([AC_PROG_CC])dnl
368
AC_REQUIRE([LT_PATH_LD])dnl
369
AC_REQUIRE([LT_PATH_NM])dnl
370
dnl
371
AC_REQUIRE([AC_PROG_LN_S])dnl
372
test -z "$LN_S" && LN_S="ln -s"
373
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
374
dnl
375
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
376
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
377
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
378
dnl
379
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
380
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
381
m4_require([_LT_CMD_RELOAD])dnl
382
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
383
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
384
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
385
386
_LT_CONFIG_LIBTOOL_INIT([
387
# See if we are running on zsh, and set the options which allow our
388
# commands through without removal of \ escapes INIT.
389
if test -n "\${ZSH_VERSION+set}" ; then
390
   setopt NO_GLOB_SUBST
391
fi
392
])
393
if test -n "${ZSH_VERSION+set}" ; then
394
   setopt NO_GLOB_SUBST
395
fi
396
397
_LT_CHECK_OBJDIR
398
399
m4_require([_LT_TAG_COMPILER])dnl
400
_LT_PROG_ECHO_BACKSLASH
401
402
case $host_os in
403
aix3*)
404
  # AIX sometimes has problems with the GCC collect2 program.  For some
405
  # reason, if we set the COLLECT_NAMES environment variable, the problems
406
  # vanish in a puff of smoke.
407
  if test "X${COLLECT_NAMES+set}" != Xset; then
408
    COLLECT_NAMES=
409
    export COLLECT_NAMES
410
  fi
411
  ;;
412
esac
413
414
# Sed substitution that helps us do robust quoting.  It backslashifies
415
# metacharacters that are still active within double-quoted strings.
416
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
417
418
# Same as above, but do not quote variable references.
419
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
420
421
# Sed substitution to delay expansion of an escaped shell variable in a
422
# double_quote_subst'ed string.
423
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
424
425
# Sed substitution to delay expansion of an escaped single quote.
426
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
427
428
# Sed substitution to avoid accidental globbing in evaled expressions
429
no_glob_subst='s/\*/\\\*/g'
430
431
# Global variables:
432
ofile=libtool
433
can_build_shared=yes
434
435
# All known linkers require a `.a' archive for static linking (except MSVC,
436
# which needs '.lib').
437
libext=a
438
439
with_gnu_ld="$lt_cv_prog_gnu_ld"
440
441
old_CC="$CC"
442
old_CFLAGS="$CFLAGS"
443
444
# Set sane defaults for various variables
445
test -z "$CC" && CC=cc
446
test -z "$LTCC" && LTCC=$CC
447
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
448
test -z "$LD" && LD=ld
449
test -z "$ac_objext" && ac_objext=o
450
451
_LT_CC_BASENAME([$compiler])
452
453
# Only perform the check for file, if the check method requires it
454
test -z "$MAGIC_CMD" && MAGIC_CMD=file
455
case $deplibs_check_method in
456
file_magic*)
457
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
458
    _LT_PATH_MAGIC
459
  fi
460
  ;;
461
esac
462
463
# Use C for the default configuration in the libtool script
464
LT_SUPPORTED_TAG([CC])
465
_LT_LANG_C_CONFIG
466
_LT_LANG_DEFAULT_CONFIG
467
_LT_CONFIG_COMMANDS
468
])# _LT_SETUP
469
470
471
# _LT_PROG_LTMAIN
472
# ---------------
473
# Note that this code is called both from `configure', and `config.status'
474
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
475
# `config.status' has no value for ac_aux_dir unless we are using Automake,
476
# so we pass a copy along to make sure it has a sensible value anyway.
477
m4_defun([_LT_PROG_LTMAIN],
478
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
479
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
480
ltmain="$ac_aux_dir/ltmain.sh"
481
])# _LT_PROG_LTMAIN
482
483
484
485
# So that we can recreate a full libtool script including additional
486
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
487
# in macros and then make a single call at the end using the `libtool'
488
# label.
489
490
491
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
492
# ----------------------------------------
493
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
494
m4_define([_LT_CONFIG_LIBTOOL_INIT],
495
[m4_ifval([$1],
496
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
497
                     [$1
498
])])])
499
500
# Initialize.
501
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
502
503
504
# _LT_CONFIG_LIBTOOL([COMMANDS])
505
# ------------------------------
506
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
507
m4_define([_LT_CONFIG_LIBTOOL],
508
[m4_ifval([$1],
509
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
510
                     [$1
511
])])])
512
513
# Initialize.
514
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
515
516
517
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
518
# -----------------------------------------------------
519
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
520
[_LT_CONFIG_LIBTOOL([$1])
521
_LT_CONFIG_LIBTOOL_INIT([$2])
522
])
523
524
525
# _LT_FORMAT_COMMENT([COMMENT])
526
# -----------------------------
527
# Add leading comment marks to the start of each line, and a trailing
528
# full-stop to the whole comment if one is not present already.
529
m4_define([_LT_FORMAT_COMMENT],
530
[m4_ifval([$1], [
531
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
532
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
533
)])
534
535
536
537
538
539
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
540
# -------------------------------------------------------------------
541
# CONFIGNAME is the name given to the value in the libtool script.
542
# VARNAME is the (base) name used in the configure script.
543
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
544
# VARNAME.  Any other value will be used directly.
545
m4_define([_LT_DECL],
546
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
547
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
548
	[m4_ifval([$1], [$1], [$2])])
549
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
550
    m4_ifval([$4],
551
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
552
    lt_dict_add_subkey([lt_decl_dict], [$2],
553
	[tagged?], [m4_ifval([$5], [yes], [no])])])
554
])
555
556
557
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
558
# --------------------------------------------------------
559
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
560
561
562
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
563
# ------------------------------------------------
564
m4_define([lt_decl_tag_varnames],
565
[_lt_decl_filter([tagged?], [yes], $@)])
566
567
568
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
569
# ---------------------------------------------------------
570
m4_define([_lt_decl_filter],
571
[m4_case([$#],
572
  [0], [m4_fatal([$0: too few arguments: $#])],
573
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
574
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
575
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
576
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
577
])
578
579
580
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
581
# --------------------------------------------------
582
m4_define([lt_decl_quote_varnames],
583
[_lt_decl_filter([value], [1], $@)])
584
585
586
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
587
# ---------------------------------------------------
588
m4_define([lt_decl_dquote_varnames],
589
[_lt_decl_filter([value], [2], $@)])
590
591
592
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
593
# ---------------------------------------------------
594
m4_define([lt_decl_varnames_tagged],
595
[m4_assert([$# <= 2])dnl
596
_$0(m4_quote(m4_default([$1], [[, ]])),
597
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
598
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
599
m4_define([_lt_decl_varnames_tagged],
600
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
601
602
603
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
604
# ------------------------------------------------
605
m4_define([lt_decl_all_varnames],
606
[_$0(m4_quote(m4_default([$1], [[, ]])),
607
     m4_if([$2], [],
608
	   m4_quote(lt_decl_varnames),
609
	m4_quote(m4_shift($@))))[]dnl
610
])
611
m4_define([_lt_decl_all_varnames],
612
[lt_join($@, lt_decl_varnames_tagged([$1],
613
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
614
])
615
616
617
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
618
# ------------------------------------
619
# Quote a variable value, and forward it to `config.status' so that its
620
# declaration there will have the same value as in `configure'.  VARNAME
621
# must have a single quote delimited value for this to work.
622
m4_define([_LT_CONFIG_STATUS_DECLARE],
623
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
624
625
626
# _LT_CONFIG_STATUS_DECLARATIONS
627
# ------------------------------
628
# We delimit libtool config variables with single quotes, so when
629
# we write them to config.status, we have to be sure to quote all
630
# embedded single quotes properly.  In configure, this macro expands
631
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
632
#
633
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
634
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
635
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
636
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
637
638
639
# _LT_LIBTOOL_TAGS
640
# ----------------
641
# Output comment and list of tags supported by the script
642
m4_defun([_LT_LIBTOOL_TAGS],
643
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
644
available_tags="_LT_TAGS"dnl
645
])
646
647
648
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
649
# -----------------------------------
650
# Extract the dictionary values for VARNAME (optionally with TAG) and
651
# expand to a commented shell variable setting:
652
#
653
#    # Some comment about what VAR is for.
654
#    visible_name=$lt_internal_name
655
m4_define([_LT_LIBTOOL_DECLARE],
656
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
657
					   [description])))[]dnl
658
m4_pushdef([_libtool_name],
659
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
660
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
661
    [0], [_libtool_name=[$]$1],
662
    [1], [_libtool_name=$lt_[]$1],
663
    [2], [_libtool_name=$lt_[]$1],
664
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
665
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
666
])
667
668
669
# _LT_LIBTOOL_CONFIG_VARS
670
# -----------------------
671
# Produce commented declarations of non-tagged libtool config variables
672
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
673
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
674
# section) are produced by _LT_LIBTOOL_TAG_VARS.
675
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
676
[m4_foreach([_lt_var],
677
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
678
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
679
680
681
# _LT_LIBTOOL_TAG_VARS(TAG)
682
# -------------------------
683
m4_define([_LT_LIBTOOL_TAG_VARS],
684
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
685
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
686
687
688
# _LT_TAGVAR(VARNAME, [TAGNAME])
689
# ------------------------------
690
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
691
692
693
# _LT_CONFIG_COMMANDS
694
# -------------------
695
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
696
# variables for single and double quote escaping we saved from calls
697
# to _LT_DECL, we can put quote escaped variables declarations
698
# into `config.status', and then the shell code to quote escape them in
699
# for loops in `config.status'.  Finally, any additional code accumulated
700
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
701
m4_defun([_LT_CONFIG_COMMANDS],
702
[AC_PROVIDE_IFELSE([LT_OUTPUT],
703
	dnl If the libtool generation code has been placed in $CONFIG_LT,
704
	dnl instead of duplicating it all over again into config.status,
705
	dnl then we will have config.status run $CONFIG_LT later, so it
706
	dnl needs to know what name is stored there:
707
        [AC_CONFIG_COMMANDS([libtool],
708
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
709
    dnl If the libtool generation code is destined for config.status,
710
    dnl expand the accumulated commands and init code now:
711
    [AC_CONFIG_COMMANDS([libtool],
712
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
713
])#_LT_CONFIG_COMMANDS
714
715
716
# Initialize.
717
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
718
[
719
720
# The HP-UX ksh and POSIX shell print the target directory to stdout
721
# if CDPATH is set.
722
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
723
724
sed_quote_subst='$sed_quote_subst'
725
double_quote_subst='$double_quote_subst'
726
delay_variable_subst='$delay_variable_subst'
727
_LT_CONFIG_STATUS_DECLARATIONS
728
LTCC='$LTCC'
729
LTCFLAGS='$LTCFLAGS'
730
compiler='$compiler_DEFAULT'
731
732
# Quote evaled strings.
733
for var in lt_decl_all_varnames([[ \
734
]], lt_decl_quote_varnames); do
735
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
736
    *[[\\\\\\\`\\"\\\$]]*)
737
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
738
      ;;
739
    *)
740
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
741
      ;;
742
    esac
743
done
744
745
# Double-quote double-evaled strings.
746
for var in lt_decl_all_varnames([[ \
747
]], lt_decl_dquote_varnames); do
748
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
749
    *[[\\\\\\\`\\"\\\$]]*)
750
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
751
      ;;
752
    *)
753
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
754
      ;;
755
    esac
756
done
757
758
# Fix-up fallback echo if it was mangled by the above quoting rules.
759
case \$lt_ECHO in
760
*'\\\[$]0 --fallback-echo"')dnl "
761
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
762
  ;;
763
esac
764
765
_LT_OUTPUT_LIBTOOL_INIT
766
])
767
768
769
# LT_OUTPUT
770
# ---------
771
# This macro allows early generation of the libtool script (before
772
# AC_OUTPUT is called), incase it is used in configure for compilation
773
# tests.
774
AC_DEFUN([LT_OUTPUT],
775
[: ${CONFIG_LT=./config.lt}
776
AC_MSG_NOTICE([creating $CONFIG_LT])
777
cat >"$CONFIG_LT" <<_LTEOF
778
#! $SHELL
779
# Generated by $as_me.
780
# Run this file to recreate a libtool stub with the current configuration.
781
782
lt_cl_silent=false
783
SHELL=\${CONFIG_SHELL-$SHELL}
784
_LTEOF
785
786
cat >>"$CONFIG_LT" <<\_LTEOF
787
AS_SHELL_SANITIZE
788
_AS_PREPARE
789
790
exec AS_MESSAGE_FD>&1
791
exec AS_MESSAGE_LOG_FD>>config.log
792
{
793
  echo
794
  AS_BOX([Running $as_me.])
795
} >&AS_MESSAGE_LOG_FD
796
797
lt_cl_help="\
798
\`$as_me' creates a local libtool stub from the current configuration,
799
for use in further configure time tests before the real libtool is
800
generated.
801
802
Usage: $[0] [[OPTIONS]]
803
804
  -h, --help      print this help, then exit
805
  -V, --version   print version number, then exit
806
  -q, --quiet     do not print progress messages
807
  -d, --debug     don't remove temporary files
808
809
Report bugs to <bug-libtool@gnu.org>."
810
811
lt_cl_version="\
812
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
813
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
814
configured by $[0], generated by m4_PACKAGE_STRING.
815
816
Copyright (C) 2008 Free Software Foundation, Inc.
817
This config.lt script is free software; the Free Software Foundation
818
gives unlimited permision to copy, distribute and modify it."
819
820
while test $[#] != 0
821
do
822
  case $[1] in
823
    --version | --v* | -V )
824
      echo "$lt_cl_version"; exit 0 ;;
825
    --help | --h* | -h )
826
      echo "$lt_cl_help"; exit 0 ;;
827
    --debug | --d* | -d )
828
      debug=: ;;
829
    --quiet | --q* | --silent | --s* | -q )
830
      lt_cl_silent=: ;;
831
832
    -*) AC_MSG_ERROR([unrecognized option: $[1]
833
Try \`$[0] --help' for more information.]) ;;
834
835
    *) AC_MSG_ERROR([unrecognized argument: $[1]
836
Try \`$[0] --help' for more information.]) ;;
837
  esac
838
  shift
839
done
840
841
if $lt_cl_silent; then
842
  exec AS_MESSAGE_FD>/dev/null
843
fi
844
_LTEOF
845
846
cat >>"$CONFIG_LT" <<_LTEOF
847
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
848
_LTEOF
849
850
cat >>"$CONFIG_LT" <<\_LTEOF
851
AC_MSG_NOTICE([creating $ofile])
852
_LT_OUTPUT_LIBTOOL_COMMANDS
853
AS_EXIT(0)
854
_LTEOF
855
chmod +x "$CONFIG_LT"
856
857
# configure is writing to config.log, but config.lt does its own redirection,
858
# appending to config.log, which fails on DOS, as config.log is still kept
859
# open by configure.  Here we exec the FD to /dev/null, effectively closing
860
# config.log, so it can be properly (re)opened and appended to by config.lt.
861
if test "$no_create" != yes; then
862
  lt_cl_success=:
863
  test "$silent" = yes &&
864
    lt_config_lt_args="$lt_config_lt_args --quiet"
865
  exec AS_MESSAGE_LOG_FD>/dev/null
866
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
867
  exec AS_MESSAGE_LOG_FD>>config.log
868
  $lt_cl_success || AS_EXIT(1)
869
fi
870
])# LT_OUTPUT
871
872
873
# _LT_CONFIG(TAG)
874
# ---------------
875
# If TAG is the built-in tag, create an initial libtool script with a
876
# default configuration from the untagged config vars.  Otherwise add code
877
# to config.status for appending the configuration named by TAG from the
878
# matching tagged config vars.
879
m4_defun([_LT_CONFIG],
880
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
881
_LT_CONFIG_SAVE_COMMANDS([
882
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
883
  m4_if(_LT_TAG, [C], [
884
    # See if we are running on zsh, and set the options which allow our
885
    # commands through without removal of \ escapes.
886
    if test -n "${ZSH_VERSION+set}" ; then
887
      setopt NO_GLOB_SUBST
888
    fi
889
890
    cfgfile="${ofile}T"
891
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
892
    $RM "$cfgfile"
893
894
    cat <<_LT_EOF >> "$cfgfile"
895
#! $SHELL
896
897
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
898
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
899
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
900
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
901
#
902
_LT_COPYING
903
_LT_LIBTOOL_TAGS
904
905
# ### BEGIN LIBTOOL CONFIG
906
_LT_LIBTOOL_CONFIG_VARS
907
_LT_LIBTOOL_TAG_VARS
908
# ### END LIBTOOL CONFIG
909
910
_LT_EOF
911
912
  case $host_os in
913
  aix3*)
914
    cat <<\_LT_EOF >> "$cfgfile"
915
# AIX sometimes has problems with the GCC collect2 program.  For some
916
# reason, if we set the COLLECT_NAMES environment variable, the problems
917
# vanish in a puff of smoke.
918
if test "X${COLLECT_NAMES+set}" != Xset; then
919
  COLLECT_NAMES=
920
  export COLLECT_NAMES
921
fi
922
_LT_EOF
923
    ;;
924
  esac
925
926
  _LT_PROG_LTMAIN
927
928
  # We use sed instead of cat because bash on DJGPP gets confused if
929
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
930
  # text mode, it properly converts lines to CR/LF.  This bash problem
931
  # is reportedly fixed, but why not run on old versions too?
932
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
933
    || (rm -f "$cfgfile"; exit 1)
934
935
  _LT_PROG_XSI_SHELLFNS
936
937
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
938
    || (rm -f "$cfgfile"; exit 1)
939
940
  mv -f "$cfgfile" "$ofile" ||
941
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
942
  chmod +x "$ofile"
943
],
944
[cat <<_LT_EOF >> "$ofile"
945
946
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
947
dnl in a comment (ie after a #).
948
# ### BEGIN LIBTOOL TAG CONFIG: $1
949
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
950
# ### END LIBTOOL TAG CONFIG: $1
951
_LT_EOF
952
])dnl /m4_if
953
],
954
[m4_if([$1], [], [
955
    PACKAGE='$PACKAGE'
956
    VERSION='$VERSION'
957
    TIMESTAMP='$TIMESTAMP'
958
    RM='$RM'
959
    ofile='$ofile'], [])
960
])dnl /_LT_CONFIG_SAVE_COMMANDS
961
])# _LT_CONFIG
962
963
964
# LT_SUPPORTED_TAG(TAG)
965
# ---------------------
966
# Trace this macro to discover what tags are supported by the libtool
967
# --tag option, using:
968
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
969
AC_DEFUN([LT_SUPPORTED_TAG], [])
970
971
972
# C support is built-in for now
973
m4_define([_LT_LANG_C_enabled], [])
974
m4_define([_LT_TAGS], [])
975
976
977
# LT_LANG(LANG)
978
# -------------
979
# Enable libtool support for the given language if not already enabled.
980
AC_DEFUN([LT_LANG],
981
[AC_BEFORE([$0], [LT_OUTPUT])dnl
982
m4_case([$1],
983
  [C],			[_LT_LANG(C)],
984
  [C++],		[_LT_LANG(CXX)],
985
  [Java],		[_LT_LANG(GCJ)],
986
  [Fortran 77],		[_LT_LANG(F77)],
987
  [Fortran],		[_LT_LANG(FC)],
988
  [Windows Resource],	[_LT_LANG(RC)],
989
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
990
    [_LT_LANG($1)],
991
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
992
])# LT_LANG
993
994
995
# _LT_LANG(LANGNAME)
996
# ------------------
997
m4_defun([_LT_LANG],
998
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
999
  [LT_SUPPORTED_TAG([$1])dnl
1000
  m4_append([_LT_TAGS], [$1 ])dnl
1001
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1002
  _LT_LANG_$1_CONFIG($1)])dnl
1003
])# _LT_LANG
1004
1005
1006
# _LT_LANG_DEFAULT_CONFIG
1007
# -----------------------
1008
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1009
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1010
  [LT_LANG(CXX)],
1011
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1012
1013
AC_PROVIDE_IFELSE([AC_PROG_F77],
1014
  [LT_LANG(F77)],
1015
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1016
1017
AC_PROVIDE_IFELSE([AC_PROG_FC],
1018
  [LT_LANG(FC)],
1019
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1020
1021
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1022
dnl pulling things in needlessly.
1023
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1024
  [LT_LANG(GCJ)],
1025
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1026
    [LT_LANG(GCJ)],
1027
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1028
      [LT_LANG(GCJ)],
1029
      [m4_ifdef([AC_PROG_GCJ],
1030
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1031
       m4_ifdef([A][M_PROG_GCJ],
1032
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1033
       m4_ifdef([LT_PROG_GCJ],
1034
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1035
1036
AC_PROVIDE_IFELSE([LT_PROG_RC],
1037
  [LT_LANG(RC)],
1038
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1039
])# _LT_LANG_DEFAULT_CONFIG
1040
1041
# Obsolete macros:
1042
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1043
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1044
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1045
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1046
dnl aclocal-1.4 backwards compatibility:
1047
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1048
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1049
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1050
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1051
1052
1053
# _LT_TAG_COMPILER
1054
# ----------------
1055
m4_defun([_LT_TAG_COMPILER],
1056
[AC_REQUIRE([AC_PROG_CC])dnl
1057
1058
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1059
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1060
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1061
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1062
1063
# If no C compiler was specified, use CC.
1064
LTCC=${LTCC-"$CC"}
1065
1066
# If no C compiler flags were specified, use CFLAGS.
1067
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1068
1069
# Allow CC to be a program name with arguments.
1070
compiler=$CC
1071
])# _LT_TAG_COMPILER
1072
1073
1074
# _LT_COMPILER_BOILERPLATE
1075
# ------------------------
1076
# Check for compiler boilerplate output or warnings with
1077
# the simple compiler test code.
1078
m4_defun([_LT_COMPILER_BOILERPLATE],
1079
[m4_require([_LT_DECL_SED])dnl
1080
ac_outfile=conftest.$ac_objext
1081
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1082
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1083
_lt_compiler_boilerplate=`cat conftest.err`
1084
$RM conftest*
1085
])# _LT_COMPILER_BOILERPLATE
1086
1087
1088
# _LT_LINKER_BOILERPLATE
1089
# ----------------------
1090
# Check for linker boilerplate output or warnings with
1091
# the simple link test code.
1092
m4_defun([_LT_LINKER_BOILERPLATE],
1093
[m4_require([_LT_DECL_SED])dnl
1094
ac_outfile=conftest.$ac_objext
1095
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1096
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1097
_lt_linker_boilerplate=`cat conftest.err`
1098
$RM -r conftest*
1099
])# _LT_LINKER_BOILERPLATE
1100
1101
# _LT_REQUIRED_DARWIN_CHECKS
1102
# -------------------------
1103
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1104
  case $host_os in
1105
    rhapsody* | darwin*)
1106
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1107
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1108
    AC_CHECK_TOOL([LIPO], [lipo], [:])
1109
    AC_CHECK_TOOL([OTOOL], [otool], [:])
1110
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1111
    _LT_DECL([], [DSYMUTIL], [1],
1112
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1113
    _LT_DECL([], [NMEDIT], [1],
1114
      [Tool to change global to local symbols on Mac OS X])
1115
    _LT_DECL([], [LIPO], [1],
1116
      [Tool to manipulate fat objects and archives on Mac OS X])
1117
    _LT_DECL([], [OTOOL], [1],
1118
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1119
    _LT_DECL([], [OTOOL64], [1],
1120
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1121
1122
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1123
      [lt_cv_apple_cc_single_mod=no
1124
      if test -z "${LT_MULTI_MODULE}"; then
1125
	# By default we will add the -single_module flag. You can override
1126
	# by either setting the environment variable LT_MULTI_MODULE
1127
	# non-empty at configure time, or by adding -multi_module to the
1128
	# link flags.
1129
	rm -rf libconftest.dylib*
1130
	echo "int foo(void){return 1;}" > conftest.c
1131
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1132
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1133
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1134
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1135
        _lt_result=$?
1136
	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1137
	  lt_cv_apple_cc_single_mod=yes
1138
	else
1139
	  cat conftest.err >&AS_MESSAGE_LOG_FD
1140
	fi
1141
	rm -rf libconftest.dylib*
1142
	rm -f conftest.*
1143
      fi])
1144
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1145
      [lt_cv_ld_exported_symbols_list],
1146
      [lt_cv_ld_exported_symbols_list=no
1147
      save_LDFLAGS=$LDFLAGS
1148
      echo "_main" > conftest.sym
1149
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1150
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1151
	[lt_cv_ld_exported_symbols_list=yes],
1152
	[lt_cv_ld_exported_symbols_list=no])
1153
	LDFLAGS="$save_LDFLAGS"
1154
    ])
1155
    case $host_os in
1156
    rhapsody* | darwin1.[[012]])
1157
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1158
    darwin1.*)
1159
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1160
    darwin*) # darwin 5.x on
1161
      # if running on 10.5 or later, the deployment target defaults
1162
      # to the OS version, if on x86, and 10.4, the deployment
1163
      # target defaults to 10.4. Don't you love it?
1164
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1165
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1166
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1167
	10.[[012]]*)
1168
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1169
	10.*)
1170
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1171
      esac
1172
    ;;
1173
  esac
1174
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1175
      _lt_dar_single_mod='$single_module'
1176
    fi
1177
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1178
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1179
    else
1180
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1181
    fi
1182
    if test "$DSYMUTIL" != ":"; then
1183
      _lt_dsymutil='~$DSYMUTIL $lib || :'
1184
    else
1185
      _lt_dsymutil=
1186
    fi
1187
    ;;
1188
  esac
1189
])
1190
1191
1192
# _LT_DARWIN_LINKER_FEATURES
1193
# --------------------------
1194
# Checks for linker and compiler features on darwin
1195
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1196
[
1197
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1198
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1199
  _LT_TAGVAR(hardcode_direct, $1)=no
1200
  _LT_TAGVAR(hardcode_automatic, $1)=yes
1201
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1202
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1203
  _LT_TAGVAR(link_all_deplibs, $1)=yes
1204
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1205
  case $cc_basename in
1206
     ifort*) _lt_dar_can_shared=yes ;;
1207
     *) _lt_dar_can_shared=$GCC ;;
1208
  esac
1209
  if test "$_lt_dar_can_shared" = "yes"; then
1210
    output_verbose_link_cmd=echo
1211
    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1212
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1213
    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1214
    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1215
    m4_if([$1], [CXX],
1216
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1217
      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1218
      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1219
    fi
1220
],[])
1221
  else
1222
  _LT_TAGVAR(ld_shlibs, $1)=no
1223
  fi
1224
])
1225
1226
# _LT_SYS_MODULE_PATH_AIX
1227
# -----------------------
1228
# Links a minimal program and checks the executable
1229
# for the system default hardcoded library path. In most cases,
1230
# this is /usr/lib:/lib, but when the MPI compilers are used
1231
# the location of the communication and MPI libs are included too.
1232
# If we don't find anything, use the default library path according
1233
# to the aix ld manual.
1234
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1235
[m4_require([_LT_DECL_SED])dnl
1236
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1237
lt_aix_libpath_sed='
1238
    /Import File Strings/,/^$/ {
1239
	/^0/ {
1240
	    s/^0  *\(.*\)$/\1/
1241
	    p
1242
	}
1243
    }'
1244
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1245
# Check for a 64-bit object if we didn't find anything.
1246
if test -z "$aix_libpath"; then
1247
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1248
fi],[])
1249
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1250
])# _LT_SYS_MODULE_PATH_AIX
1251
1252
1253
# _LT_SHELL_INIT(ARG)
1254
# -------------------
1255
m4_define([_LT_SHELL_INIT],
1256
[ifdef([AC_DIVERSION_NOTICE],
1257
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1258
	 [AC_DIVERT_PUSH(NOTICE)])
1259
$1
1260
AC_DIVERT_POP
1261
])# _LT_SHELL_INIT
1262
1263
1264
# _LT_PROG_ECHO_BACKSLASH
1265
# -----------------------
1266
# Add some code to the start of the generated configure script which
1267
# will find an echo command which doesn't interpret backslashes.
1268
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1269
[_LT_SHELL_INIT([
1270
# Check that we are running under the correct shell.
1271
SHELL=${CONFIG_SHELL-/bin/sh}
1272
1273
case X$lt_ECHO in
1274
X*--fallback-echo)
1275
  # Remove one level of quotation (which was required for Make).
1276
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1277
  ;;
1278
esac
1279
1280
ECHO=${lt_ECHO-echo}
1281
if test "X[$]1" = X--no-reexec; then
1282
  # Discard the --no-reexec flag, and continue.
1283
  shift
1284
elif test "X[$]1" = X--fallback-echo; then
1285
  # Avoid inline document here, it may be left over
1286
  :
1287
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1288
  # Yippee, $ECHO works!
1289
  :
1290
else
1291
  # Restart under the correct shell.
1292
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1293
fi
1294
1295
if test "X[$]1" = X--fallback-echo; then
1296
  # used as fallback echo
1297
  shift
1298
  cat <<_LT_EOF
1299
[$]*
1300
_LT_EOF
1301
  exit 0
1302
fi
1303
1304
# The HP-UX ksh and POSIX shell print the target directory to stdout
1305
# if CDPATH is set.
1306
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1307
1308
if test -z "$lt_ECHO"; then
1309
  if test "X${echo_test_string+set}" != Xset; then
1310
    # find a string as large as possible, as long as the shell can cope with it
1311
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1312
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1313
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1314
	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1315
      then
1316
        break
1317
      fi
1318
    done
1319
  fi
1320
1321
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1322
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1323
     test "X$echo_testing_string" = "X$echo_test_string"; then
1324
    :
1325
  else
1326
    # The Solaris, AIX, and Digital Unix default echo programs unquote
1327
    # backslashes.  This makes it impossible to quote backslashes using
1328
    #   echo "$something" | sed 's/\\/\\\\/g'
1329
    #
1330
    # So, first we look for a working echo in the user's PATH.
1331
1332
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1333
    for dir in $PATH /usr/ucb; do
1334
      IFS="$lt_save_ifs"
1335
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1336
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1337
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1338
         test "X$echo_testing_string" = "X$echo_test_string"; then
1339
        ECHO="$dir/echo"
1340
        break
1341
      fi
1342
    done
1343
    IFS="$lt_save_ifs"
1344
1345
    if test "X$ECHO" = Xecho; then
1346
      # We didn't find a better echo, so look for alternatives.
1347
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1348
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1349
         test "X$echo_testing_string" = "X$echo_test_string"; then
1350
        # This shell has a builtin print -r that does the trick.
1351
        ECHO='print -r'
1352
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1353
	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1354
        # If we have ksh, try running configure again with it.
1355
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1356
        export ORIGINAL_CONFIG_SHELL
1357
        CONFIG_SHELL=/bin/ksh
1358
        export CONFIG_SHELL
1359
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1360
      else
1361
        # Try using printf.
1362
        ECHO='printf %s\n'
1363
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1364
	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1365
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1366
	  # Cool, printf works
1367
	  :
1368
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1369
	     test "X$echo_testing_string" = 'X\t' &&
1370
	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1371
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1372
	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1373
	  export CONFIG_SHELL
1374
	  SHELL="$CONFIG_SHELL"
1375
	  export SHELL
1376
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1377
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1378
	     test "X$echo_testing_string" = 'X\t' &&
1379
	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1380
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1381
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1382
        else
1383
	  # maybe with a smaller string...
1384
	  prev=:
1385
1386
	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1387
	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1388
	    then
1389
	      break
1390
	    fi
1391
	    prev="$cmd"
1392
	  done
1393
1394
	  if test "$prev" != 'sed 50q "[$]0"'; then
1395
	    echo_test_string=`eval $prev`
1396
	    export echo_test_string
1397
	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1398
	  else
1399
	    # Oops.  We lost completely, so just stick with echo.
1400
	    ECHO=echo
1401
	  fi
1402
        fi
1403
      fi
1404
    fi
1405
  fi
1406
fi
1407
1408
# Copy echo and quote the copy suitably for passing to libtool from
1409
# the Makefile, instead of quoting the original, which is used later.
1410
lt_ECHO=$ECHO
1411
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1412
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1413
fi
1414
1415
AC_SUBST(lt_ECHO)
1416
])
1417
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1418
_LT_DECL([], [ECHO], [1],
1419
    [An echo program that does not interpret backslashes])
1420
])# _LT_PROG_ECHO_BACKSLASH
1421
1422
1423
# _LT_ENABLE_LOCK
1424
# ---------------
1425
m4_defun([_LT_ENABLE_LOCK],
1426
[AC_ARG_ENABLE([libtool-lock],
1427
  [AS_HELP_STRING([--disable-libtool-lock],
1428
    [avoid locking (might break parallel builds)])])
1429
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1430
1431
# Some flags need to be propagated to the compiler or linker for good
1432
# libtool support.
1433
case $host in
1434
ia64-*-hpux*)
1435
  # Find out which ABI we are using.
1436
  echo 'int i;' > conftest.$ac_ext
1437
  if AC_TRY_EVAL(ac_compile); then
1438
    case `/usr/bin/file conftest.$ac_objext` in
1439
      *ELF-32*)
1440
	HPUX_IA64_MODE="32"
1441
	;;
1442
      *ELF-64*)
1443
	HPUX_IA64_MODE="64"
1444
	;;
1445
    esac
1446
  fi
1447
  rm -rf conftest*
1448
  ;;
1449
*-*-irix6*)
1450
  # Find out which ABI we are using.
1451
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1452
  if AC_TRY_EVAL(ac_compile); then
1453
    if test "$lt_cv_prog_gnu_ld" = yes; then
1454
      case `/usr/bin/file conftest.$ac_objext` in
1455
	*32-bit*)
1456
	  LD="${LD-ld} -melf32bsmip"
1457
	  ;;
1458
	*N32*)
1459
	  LD="${LD-ld} -melf32bmipn32"
1460
	  ;;
1461
	*64-bit*)
1462
	  LD="${LD-ld} -melf64bmip"
1463
	;;
1464
      esac
1465
    else
1466
      case `/usr/bin/file conftest.$ac_objext` in
1467
	*32-bit*)
1468
	  LD="${LD-ld} -32"
1469
	  ;;
1470
	*N32*)
1471
	  LD="${LD-ld} -n32"
1472
	  ;;
1473
	*64-bit*)
1474
	  LD="${LD-ld} -64"
1475
	  ;;
1476
      esac
1477
    fi
1478
  fi
1479
  rm -rf conftest*
1480
  ;;
1481
1482
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1483
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1484
  # Find out which ABI we are using.
1485
  echo 'int i;' > conftest.$ac_ext
1486
  if AC_TRY_EVAL(ac_compile); then
1487
    case `/usr/bin/file conftest.o` in
1488
      *32-bit*)
1489
	case $host in
1490
	  x86_64-*kfreebsd*-gnu)
1491
	    LD="${LD-ld} -m elf_i386_fbsd"
1492
	    ;;
1493
	  x86_64-*linux*)
1494
	    LD="${LD-ld} -m elf_i386"
1495
	    ;;
1496
	  ppc64-*linux*|powerpc64-*linux*)
1497
	    LD="${LD-ld} -m elf32ppclinux"
1498
	    ;;
1499
	  s390x-*linux*)
1500
	    LD="${LD-ld} -m elf_s390"
1501
	    ;;
1502
	  sparc64-*linux*)
1503
	    LD="${LD-ld} -m elf32_sparc"
1504
	    ;;
1505
	esac
1506
	;;
1507
      *64-bit*)
1508
	case $host in
1509
	  x86_64-*kfreebsd*-gnu)
1510
	    LD="${LD-ld} -m elf_x86_64_fbsd"
1511
	    ;;
1512
	  x86_64-*linux*)
1513
	    LD="${LD-ld} -m elf_x86_64"
1514
	    ;;
1515
	  ppc*-*linux*|powerpc*-*linux*)
1516
	    LD="${LD-ld} -m elf64ppc"
1517
	    ;;
1518
	  s390*-*linux*|s390*-*tpf*)
1519
	    LD="${LD-ld} -m elf64_s390"
1520
	    ;;
1521
	  sparc*-*linux*)
1522
	    LD="${LD-ld} -m elf64_sparc"
1523
	    ;;
1524
	esac
1525
	;;
1526
    esac
1527
  fi
1528
  rm -rf conftest*
1529
  ;;
1530
1531
*-*-sco3.2v5*)
1532
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1533
  SAVE_CFLAGS="$CFLAGS"
1534
  CFLAGS="$CFLAGS -belf"
1535
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1536
    [AC_LANG_PUSH(C)
1537
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1538
     AC_LANG_POP])
1539
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1540
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1541
    CFLAGS="$SAVE_CFLAGS"
1542
  fi
1543
  ;;
1544
sparc*-*solaris*)
1545
  # Find out which ABI we are using.
1546
  echo 'int i;' > conftest.$ac_ext
1547
  if AC_TRY_EVAL(ac_compile); then
1548
    case `/usr/bin/file conftest.o` in
1549
    *64-bit*)
1550
      case $lt_cv_prog_gnu_ld in
1551
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1552
      *)
1553
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1554
	  LD="${LD-ld} -64"
1555
	fi
1556
	;;
1557
      esac
1558
      ;;
1559
    esac
1560
  fi
1561
  rm -rf conftest*
1562
  ;;
1563
esac
1564
1565
need_locks="$enable_libtool_lock"
1566
])# _LT_ENABLE_LOCK
1567
1568
1569
# _LT_CMD_OLD_ARCHIVE
1570
# -------------------
1571
m4_defun([_LT_CMD_OLD_ARCHIVE],
1572
[AC_CHECK_TOOL(AR, ar, false)
1573
test -z "$AR" && AR=ar
1574
test -z "$AR_FLAGS" && AR_FLAGS=cru
1575
_LT_DECL([], [AR], [1], [The archiver])
1576
_LT_DECL([], [AR_FLAGS], [1])
1577
1578
AC_CHECK_TOOL(STRIP, strip, :)
1579
test -z "$STRIP" && STRIP=:
1580
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1581
1582
AC_CHECK_TOOL(RANLIB, ranlib, :)
1583
test -z "$RANLIB" && RANLIB=:
1584
_LT_DECL([], [RANLIB], [1],
1585
    [Commands used to install an old-style archive])
1586
1587
# Determine commands to create old-style static archives.
1588
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1589
old_postinstall_cmds='chmod 644 $oldlib'
1590
old_postuninstall_cmds=
1591
1592
if test -n "$RANLIB"; then
1593
  case $host_os in
1594
  openbsd*)
1595
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1596
    ;;
1597
  *)
1598
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1599
    ;;
1600
  esac
1601
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1602
fi
1603
_LT_DECL([], [old_postinstall_cmds], [2])
1604
_LT_DECL([], [old_postuninstall_cmds], [2])
1605
_LT_TAGDECL([], [old_archive_cmds], [2],
1606
    [Commands used to build an old-style archive])
1607
])# _LT_CMD_OLD_ARCHIVE
1608
1609
1610
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1611
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1612
# ----------------------------------------------------------------
1613
# Check whether the given compiler option works
1614
AC_DEFUN([_LT_COMPILER_OPTION],
1615
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1616
m4_require([_LT_DECL_SED])dnl
1617
AC_CACHE_CHECK([$1], [$2],
1618
  [$2=no
1619
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1620
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1621
   lt_compiler_flag="$3"
1622
   # Insert the option either (1) after the last *FLAGS variable, or
1623
   # (2) before a word containing "conftest.", or (3) at the end.
1624
   # Note that $ac_compile itself does not contain backslashes and begins
1625
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1626
   # The option is referenced via a variable to avoid confusing sed.
1627
   lt_compile=`echo "$ac_compile" | $SED \
1628
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1629
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1630
   -e 's:$: $lt_compiler_flag:'`
1631
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1632
   (eval "$lt_compile" 2>conftest.err)
1633
   ac_status=$?
1634
   cat conftest.err >&AS_MESSAGE_LOG_FD
1635
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1636
   if (exit $ac_status) && test -s "$ac_outfile"; then
1637
     # The compiler can only warn and ignore the option if not recognized
1638
     # So say no if there are warnings other than the usual output.
1639
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1640
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1641
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1642
       $2=yes
1643
     fi
1644
   fi
1645
   $RM conftest*
1646
])
1647
1648
if test x"[$]$2" = xyes; then
1649
    m4_if([$5], , :, [$5])
1650
else
1651
    m4_if([$6], , :, [$6])
1652
fi
1653
])# _LT_COMPILER_OPTION
1654
1655
# Old name:
1656
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1657
dnl aclocal-1.4 backwards compatibility:
1658
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1659
1660
1661
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1662
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1663
# ----------------------------------------------------
1664
# Check whether the given linker option works
1665
AC_DEFUN([_LT_LINKER_OPTION],
1666
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1667
m4_require([_LT_DECL_SED])dnl
1668
AC_CACHE_CHECK([$1], [$2],
1669
  [$2=no
1670
   save_LDFLAGS="$LDFLAGS"
1671
   LDFLAGS="$LDFLAGS $3"
1672
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1673
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1674
     # The linker can only warn and ignore the option if not recognized
1675
     # So say no if there are warnings
1676
     if test -s conftest.err; then
1677
       # Append any errors to the config.log.
1678
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1679
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1680
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1681
       if diff conftest.exp conftest.er2 >/dev/null; then
1682
         $2=yes
1683
       fi
1684
     else
1685
       $2=yes
1686
     fi
1687
   fi
1688
   $RM -r conftest*
1689
   LDFLAGS="$save_LDFLAGS"
1690
])
1691
1692
if test x"[$]$2" = xyes; then
1693
    m4_if([$4], , :, [$4])
1694
else
1695
    m4_if([$5], , :, [$5])
1696
fi
1697
])# _LT_LINKER_OPTION
1698
1699
# Old name:
1700
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1701
dnl aclocal-1.4 backwards compatibility:
1702
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1703
1704
1705
# LT_CMD_MAX_LEN
1706
#---------------
1707
AC_DEFUN([LT_CMD_MAX_LEN],
1708
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1709
# find the maximum length of command line arguments
1710
AC_MSG_CHECKING([the maximum length of command line arguments])
1711
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1712
  i=0
1713
  teststring="ABCD"
1714
1715
  case $build_os in
1716
  msdosdjgpp*)
1717
    # On DJGPP, this test can blow up pretty badly due to problems in libc
1718
    # (any single argument exceeding 2000 bytes causes a buffer overrun
1719
    # during glob expansion).  Even if it were fixed, the result of this
1720
    # check would be larger than it should be.
1721
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1722
    ;;
1723
1724
  gnu*)
1725
    # Under GNU Hurd, this test is not required because there is
1726
    # no limit to the length of command line arguments.
1727
    # Libtool will interpret -1 as no limit whatsoever
1728
    lt_cv_sys_max_cmd_len=-1;
1729
    ;;
1730
1731
  cygwin* | mingw* | cegcc*)
1732
    # On Win9x/ME, this test blows up -- it succeeds, but takes
1733
    # about 5 minutes as the teststring grows exponentially.
1734
    # Worse, since 9x/ME are not pre-emptively multitasking,
1735
    # you end up with a "frozen" computer, even though with patience
1736
    # the test eventually succeeds (with a max line length of 256k).
1737
    # Instead, let's just punt: use the minimum linelength reported by
1738
    # all of the supported platforms: 8192 (on NT/2K/XP).
1739
    lt_cv_sys_max_cmd_len=8192;
1740
    ;;
1741
1742
  amigaos*)
1743
    # On AmigaOS with pdksh, this test takes hours, literally.
1744
    # So we just punt and use a minimum line length of 8192.
1745
    lt_cv_sys_max_cmd_len=8192;
1746
    ;;
1747
1748
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1749
    # This has been around since 386BSD, at least.  Likely further.
1750
    if test -x /sbin/sysctl; then
1751
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1752
    elif test -x /usr/sbin/sysctl; then
1753
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1754
    else
1755
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1756
    fi
1757
    # And add a safety zone
1758
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1759
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1760
    ;;
1761
1762
  interix*)
1763
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1764
    lt_cv_sys_max_cmd_len=196608
1765
    ;;
1766
1767
  osf*)
1768
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1769
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1770
    # nice to cause kernel panics so lets avoid the loop below.
1771
    # First set a reasonable default.
1772
    lt_cv_sys_max_cmd_len=16384
1773
    #
1774
    if test -x /sbin/sysconfig; then
1775
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1776
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1777
      esac
1778
    fi
1779
    ;;
1780
  sco3.2v5*)
1781
    lt_cv_sys_max_cmd_len=102400
1782
    ;;
1783
  sysv5* | sco5v6* | sysv4.2uw2*)
1784
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1785
    if test -n "$kargmax"; then
1786
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1787
    else
1788
      lt_cv_sys_max_cmd_len=32768
1789
    fi
1790
    ;;
1791
  *)
1792
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1793
    if test -n "$lt_cv_sys_max_cmd_len"; then
1794
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1795
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1796
    else
1797
      # Make teststring a little bigger before we do anything with it.
1798
      # a 1K string should be a reasonable start.
1799
      for i in 1 2 3 4 5 6 7 8 ; do
1800
        teststring=$teststring$teststring
1801
      done
1802
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1803
      # If test is not a shell built-in, we'll probably end up computing a
1804
      # maximum length that is only half of the actual maximum length, but
1805
      # we can't tell.
1806
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1807
	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1808
	      test $i != 17 # 1/2 MB should be enough
1809
      do
1810
        i=`expr $i + 1`
1811
        teststring=$teststring$teststring
1812
      done
1813
      # Only check the string length outside the loop.
1814
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1815
      teststring=
1816
      # Add a significant safety factor because C++ compilers can tack on
1817
      # massive amounts of additional arguments before passing them to the
1818
      # linker.  It appears as though 1/2 is a usable value.
1819
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1820
    fi
1821
    ;;
1822
  esac
1823
])
1824
if test -n $lt_cv_sys_max_cmd_len ; then
1825
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1826
else
1827
  AC_MSG_RESULT(none)
1828
fi
1829
max_cmd_len=$lt_cv_sys_max_cmd_len
1830
_LT_DECL([], [max_cmd_len], [0],
1831
    [What is the maximum length of a command?])
1832
])# LT_CMD_MAX_LEN
1833
1834
# Old name:
1835
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1836
dnl aclocal-1.4 backwards compatibility:
1837
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1838
1839
1840
# _LT_HEADER_DLFCN
1841
# ----------------
1842
m4_defun([_LT_HEADER_DLFCN],
1843
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1844
])# _LT_HEADER_DLFCN
1845
1846
1847
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1848
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1849
# ----------------------------------------------------------------
1850
m4_defun([_LT_TRY_DLOPEN_SELF],
1851
[m4_require([_LT_HEADER_DLFCN])dnl
1852
if test "$cross_compiling" = yes; then :
1853
  [$4]
1854
else
1855
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1856
  lt_status=$lt_dlunknown
1857
  cat > conftest.$ac_ext <<_LT_EOF
1858
[#line __oline__ "configure"
1859
#include "confdefs.h"
1860
1861
#if HAVE_DLFCN_H
1862
#include <dlfcn.h>
1863
#endif
1864
1865
#include <stdio.h>
1866
1867
#ifdef RTLD_GLOBAL
1868
#  define LT_DLGLOBAL		RTLD_GLOBAL
1869
#else
1870
#  ifdef DL_GLOBAL
1871
#    define LT_DLGLOBAL		DL_GLOBAL
1872
#  else
1873
#    define LT_DLGLOBAL		0
1874
#  endif
1875
#endif
1876
1877
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1878
   find out it does not work in some platform. */
1879
#ifndef LT_DLLAZY_OR_NOW
1880
#  ifdef RTLD_LAZY
1881
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1882
#  else
1883
#    ifdef DL_LAZY
1884
#      define LT_DLLAZY_OR_NOW		DL_LAZY
1885
#    else
1886
#      ifdef RTLD_NOW
1887
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1888
#      else
1889
#        ifdef DL_NOW
1890
#          define LT_DLLAZY_OR_NOW	DL_NOW
1891
#        else
1892
#          define LT_DLLAZY_OR_NOW	0
1893
#        endif
1894
#      endif
1895
#    endif
1896
#  endif
1897
#endif
1898
1899
void fnord() { int i=42;}
1900
int main ()
1901
{
1902
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1903
  int status = $lt_dlunknown;
1904
1905
  if (self)
1906
    {
1907
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1908
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1909
      /* dlclose (self); */
1910
    }
1911
  else
1912
    puts (dlerror ());
1913
1914
  return status;
1915
}]
1916
_LT_EOF
1917
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1918
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1919
    lt_status=$?
1920
    case x$lt_status in
1921
      x$lt_dlno_uscore) $1 ;;
1922
      x$lt_dlneed_uscore) $2 ;;
1923
      x$lt_dlunknown|x*) $3 ;;
1924
    esac
1925
  else :
1926
    # compilation failed
1927
    $3
1928
  fi
1929
fi
1930
rm -fr conftest*
1931
])# _LT_TRY_DLOPEN_SELF
1932
1933
1934
# LT_SYS_DLOPEN_SELF
1935
# ------------------
1936
AC_DEFUN([LT_SYS_DLOPEN_SELF],
1937
[m4_require([_LT_HEADER_DLFCN])dnl
1938
if test "x$enable_dlopen" != xyes; then
1939
  enable_dlopen=unknown
1940
  enable_dlopen_self=unknown
1941
  enable_dlopen_self_static=unknown
1942
else
1943
  lt_cv_dlopen=no
1944
  lt_cv_dlopen_libs=
1945
1946
  case $host_os in
1947
  beos*)
1948
    lt_cv_dlopen="load_add_on"
1949
    lt_cv_dlopen_libs=
1950
    lt_cv_dlopen_self=yes
1951
    ;;
1952
1953
  mingw* | pw32* | cegcc*)
1954
    lt_cv_dlopen="LoadLibrary"
1955
    lt_cv_dlopen_libs=
1956
    ;;
1957
1958
  cygwin*)
1959
    lt_cv_dlopen="dlopen"
1960
    lt_cv_dlopen_libs=
1961
    ;;
1962
1963
  darwin*)
1964
  # if libdl is installed we need to link against it
1965
    AC_CHECK_LIB([dl], [dlopen],
1966
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1967
    lt_cv_dlopen="dyld"
1968
    lt_cv_dlopen_libs=
1969
    lt_cv_dlopen_self=yes
1970
    ])
1971
    ;;
1972
1973
  *)
1974
    AC_CHECK_FUNC([shl_load],
1975
	  [lt_cv_dlopen="shl_load"],
1976
      [AC_CHECK_LIB([dld], [shl_load],
1977
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1978
	[AC_CHECK_FUNC([dlopen],
1979
	      [lt_cv_dlopen="dlopen"],
1980
	  [AC_CHECK_LIB([dl], [dlopen],
1981
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1982
	    [AC_CHECK_LIB([svld], [dlopen],
1983
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1984
	      [AC_CHECK_LIB([dld], [dld_link],
1985
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1986
	      ])
1987
	    ])
1988
	  ])
1989
	])
1990
      ])
1991
    ;;
1992
  esac
1993
1994
  if test "x$lt_cv_dlopen" != xno; then
1995
    enable_dlopen=yes
1996
  else
1997
    enable_dlopen=no
1998
  fi
1999
2000
  case $lt_cv_dlopen in
2001
  dlopen)
2002
    save_CPPFLAGS="$CPPFLAGS"
2003
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2004
2005
    save_LDFLAGS="$LDFLAGS"
2006
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2007
2008
    save_LIBS="$LIBS"
2009
    LIBS="$lt_cv_dlopen_libs $LIBS"
2010
2011
    AC_CACHE_CHECK([whether a program can dlopen itself],
2012
	  lt_cv_dlopen_self, [dnl
2013
	  _LT_TRY_DLOPEN_SELF(
2014
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2015
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2016
    ])
2017
2018
    if test "x$lt_cv_dlopen_self" = xyes; then
2019
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2020
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2021
	  lt_cv_dlopen_self_static, [dnl
2022
	  _LT_TRY_DLOPEN_SELF(
2023
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2024
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2025
      ])
2026
    fi
2027
2028
    CPPFLAGS="$save_CPPFLAGS"
2029
    LDFLAGS="$save_LDFLAGS"
2030
    LIBS="$save_LIBS"
2031
    ;;
2032
  esac
2033
2034
  case $lt_cv_dlopen_self in
2035
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2036
  *) enable_dlopen_self=unknown ;;
2037
  esac
2038
2039
  case $lt_cv_dlopen_self_static in
2040
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2041
  *) enable_dlopen_self_static=unknown ;;
2042
  esac
2043
fi
2044
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2045
	 [Whether dlopen is supported])
2046
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2047
	 [Whether dlopen of programs is supported])
2048
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2049
	 [Whether dlopen of statically linked programs is supported])
2050
])# LT_SYS_DLOPEN_SELF
2051
2052
# Old name:
2053
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2054
dnl aclocal-1.4 backwards compatibility:
2055
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2056
2057
2058
# _LT_COMPILER_C_O([TAGNAME])
2059
# ---------------------------
2060
# Check to see if options -c and -o are simultaneously supported by compiler.
2061
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2062
m4_defun([_LT_COMPILER_C_O],
2063
[m4_require([_LT_DECL_SED])dnl
2064
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2065
m4_require([_LT_TAG_COMPILER])dnl
2066
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2067
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2068
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2069
   $RM -r conftest 2>/dev/null
2070
   mkdir conftest
2071
   cd conftest
2072
   mkdir out
2073
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2074
2075
   lt_compiler_flag="-o out/conftest2.$ac_objext"
2076
   # Insert the option either (1) after the last *FLAGS variable, or
2077
   # (2) before a word containing "conftest.", or (3) at the end.
2078
   # Note that $ac_compile itself does not contain backslashes and begins
2079
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2080
   lt_compile=`echo "$ac_compile" | $SED \
2081
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2082
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2083
   -e 's:$: $lt_compiler_flag:'`
2084
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2085
   (eval "$lt_compile" 2>out/conftest.err)
2086
   ac_status=$?
2087
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2088
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2089
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2090
   then
2091
     # The compiler can only warn and ignore the option if not recognized
2092
     # So say no if there are warnings
2093
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2094
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2095
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2096
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2097
     fi
2098
   fi
2099
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2100
   $RM conftest*
2101
   # SGI C++ compiler will create directory out/ii_files/ for
2102
   # template instantiation
2103
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2104
   $RM out/* && rmdir out
2105
   cd ..
2106
   $RM -r conftest
2107
   $RM conftest*
2108
])
2109
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2110
	[Does compiler simultaneously support -c and -o options?])
2111
])# _LT_COMPILER_C_O
2112
2113
2114
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2115
# ----------------------------------
2116
# Check to see if we can do hard links to lock some files if needed
2117
m4_defun([_LT_COMPILER_FILE_LOCKS],
2118
[m4_require([_LT_ENABLE_LOCK])dnl
2119
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2120
_LT_COMPILER_C_O([$1])
2121
2122
hard_links="nottested"
2123
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2124
  # do not overwrite the value of need_locks provided by the user
2125
  AC_MSG_CHECKING([if we can lock with hard links])
2126
  hard_links=yes
2127
  $RM conftest*
2128
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2129
  touch conftest.a
2130
  ln conftest.a conftest.b 2>&5 || hard_links=no
2131
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2132
  AC_MSG_RESULT([$hard_links])
2133
  if test "$hard_links" = no; then
2134
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2135
    need_locks=warn
2136
  fi
2137
else
2138
  need_locks=no
2139
fi
2140
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2141
])# _LT_COMPILER_FILE_LOCKS
2142
2143
2144
# _LT_CHECK_OBJDIR
2145
# ----------------
2146
m4_defun([_LT_CHECK_OBJDIR],
2147
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2148
[rm -f .libs 2>/dev/null
2149
mkdir .libs 2>/dev/null
2150
if test -d .libs; then
2151
  lt_cv_objdir=.libs
2152
else
2153
  # MS-DOS does not allow filenames that begin with a dot.
2154
  lt_cv_objdir=_libs
2155
fi
2156
rmdir .libs 2>/dev/null])
2157
objdir=$lt_cv_objdir
2158
_LT_DECL([], [objdir], [0],
2159
         [The name of the directory that contains temporary libtool files])dnl
2160
m4_pattern_allow([LT_OBJDIR])dnl
2161
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2162
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2163
])# _LT_CHECK_OBJDIR
2164
2165
2166
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2167
# --------------------------------------
2168
# Check hardcoding attributes.
2169
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2170
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2171
_LT_TAGVAR(hardcode_action, $1)=
2172
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2173
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2174
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2175
2176
  # We can hardcode non-existent directories.
2177
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2178
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2179
     # have to relink, otherwise we might link with an installed library
2180
     # when we should be linking with a yet-to-be-installed one
2181
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2182
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2183
    # Linking always hardcodes the temporary library directory.
2184
    _LT_TAGVAR(hardcode_action, $1)=relink
2185
  else
2186
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2187
    _LT_TAGVAR(hardcode_action, $1)=immediate
2188
  fi
2189
else
2190
  # We cannot hardcode anything, or else we can only hardcode existing
2191
  # directories.
2192
  _LT_TAGVAR(hardcode_action, $1)=unsupported
2193
fi
2194
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2195
2196
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2197
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2198
  # Fast installation is not supported
2199
  enable_fast_install=no
2200
elif test "$shlibpath_overrides_runpath" = yes ||
2201
     test "$enable_shared" = no; then
2202
  # Fast installation is not necessary
2203
  enable_fast_install=needless
2204
fi
2205
_LT_TAGDECL([], [hardcode_action], [0],
2206
    [How to hardcode a shared library path into an executable])
2207
])# _LT_LINKER_HARDCODE_LIBPATH
2208
2209
2210
# _LT_CMD_STRIPLIB
2211
# ----------------
2212
m4_defun([_LT_CMD_STRIPLIB],
2213
[m4_require([_LT_DECL_EGREP])
2214
striplib=
2215
old_striplib=
2216
AC_MSG_CHECKING([whether stripping libraries is possible])
2217
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2218
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2219
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2220
  AC_MSG_RESULT([yes])
2221
else
2222
# FIXME - insert some real tests, host_os isn't really good enough
2223
  case $host_os in
2224
  darwin*)
2225
    if test -n "$STRIP" ; then
2226
      striplib="$STRIP -x"
2227
      old_striplib="$STRIP -S"
2228
      AC_MSG_RESULT([yes])
2229
    else
2230
      AC_MSG_RESULT([no])
2231
    fi
2232
    ;;
2233
  *)
2234
    AC_MSG_RESULT([no])
2235
    ;;
2236
  esac
2237
fi
2238
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2239
_LT_DECL([], [striplib], [1])
2240
])# _LT_CMD_STRIPLIB
2241
2242
2243
# _LT_SYS_DYNAMIC_LINKER([TAG])
2244
# -----------------------------
2245
# PORTME Fill in your ld.so characteristics
2246
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2247
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2248
m4_require([_LT_DECL_EGREP])dnl
2249
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2250
m4_require([_LT_DECL_OBJDUMP])dnl
2251
m4_require([_LT_DECL_SED])dnl
2252
AC_MSG_CHECKING([dynamic linker characteristics])
2253
m4_if([$1],
2254
	[], [
2255
if test "$GCC" = yes; then
2256
  case $host_os in
2257
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2258
    *) lt_awk_arg="/^libraries:/" ;;
2259
  esac
2260
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2261
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2262
    # if the path contains ";" then we assume it to be the separator
2263
    # otherwise default to the standard path separator (i.e. ":") - it is
2264
    # assumed that no part of a normal pathname contains ";" but that should
2265
    # okay in the real world where ";" in dirpaths is itself problematic.
2266
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2267
  else
2268
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2269
  fi
2270
  # Ok, now we have the path, separated by spaces, we can step through it
2271
  # and add multilib dir if necessary.
2272
  lt_tmp_lt_search_path_spec=
2273
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2274
  for lt_sys_path in $lt_search_path_spec; do
2275
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2276
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2277
    else
2278
      test -d "$lt_sys_path" && \
2279
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2280
    fi
2281
  done
2282
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2283
BEGIN {RS=" "; FS="/|\n";} {
2284
  lt_foo="";
2285
  lt_count=0;
2286
  for (lt_i = NF; lt_i > 0; lt_i--) {
2287
    if ($lt_i != "" && $lt_i != ".") {
2288
      if ($lt_i == "..") {
2289
        lt_count++;
2290
      } else {
2291
        if (lt_count == 0) {
2292
          lt_foo="/" $lt_i lt_foo;
2293
        } else {
2294
          lt_count--;
2295
        }
2296
      }
2297
    }
2298
  }
2299
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2300
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2301
}'`
2302
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2303
else
2304
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2305
fi])
2306
library_names_spec=
2307
libname_spec='lib$name'
2308
soname_spec=
2309
shrext_cmds=".so"
2310
postinstall_cmds=
2311
postuninstall_cmds=
2312
finish_cmds=
2313
finish_eval=
2314
shlibpath_var=
2315
shlibpath_overrides_runpath=unknown
2316
version_type=none
2317
dynamic_linker="$host_os ld.so"
2318
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2319
need_lib_prefix=unknown
2320
hardcode_into_libs=no
2321
2322
# when you set need_version to no, make sure it does not cause -set_version
2323
# flags to be left without arguments
2324
need_version=unknown
2325
2326
case $host_os in
2327
aix3*)
2328
  version_type=linux
2329
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2330
  shlibpath_var=LIBPATH
2331
2332
  # AIX 3 has no versioning support, so we append a major version to the name.
2333
  soname_spec='${libname}${release}${shared_ext}$major'
2334
  ;;
2335
2336
aix[[4-9]]*)
2337
  version_type=linux
2338
  need_lib_prefix=no
2339
  need_version=no
2340
  hardcode_into_libs=yes
2341
  if test "$host_cpu" = ia64; then
2342
    # AIX 5 supports IA64
2343
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2344
    shlibpath_var=LD_LIBRARY_PATH
2345
  else
2346
    # With GCC up to 2.95.x, collect2 would create an import file
2347
    # for dependence libraries.  The import file would start with
2348
    # the line `#! .'.  This would cause the generated library to
2349
    # depend on `.', always an invalid library.  This was fixed in
2350
    # development snapshots of GCC prior to 3.0.
2351
    case $host_os in
2352
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2353
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2354
	   echo ' yes '
2355
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2356
	:
2357
      else
2358
	can_build_shared=no
2359
      fi
2360
      ;;
2361
    esac
2362
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2363
    # soname into executable. Probably we can add versioning support to
2364
    # collect2, so additional links can be useful in future.
2365
    if test "$aix_use_runtimelinking" = yes; then
2366
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2367
      # instead of lib<name>.a to let people know that these are not
2368
      # typical AIX shared libraries.
2369
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2370
    else
2371
      # We preserve .a as extension for shared libraries through AIX4.2
2372
      # and later when we are not doing run time linking.
2373
      library_names_spec='${libname}${release}.a $libname.a'
2374
      soname_spec='${libname}${release}${shared_ext}$major'
2375
    fi
2376
    shlibpath_var=LIBPATH
2377
  fi
2378
  ;;
2379
2380
amigaos*)
2381
  case $host_cpu in
2382
  powerpc)
2383
    # Since July 2007 AmigaOS4 officially supports .so libraries.
2384
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2385
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2386
    ;;
2387
  m68k)
2388
    library_names_spec='$libname.ixlibrary $libname.a'
2389
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2390
    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'
2391
    ;;
2392
  esac
2393
  ;;
2394
2395
beos*)
2396
  library_names_spec='${libname}${shared_ext}'
2397
  dynamic_linker="$host_os ld.so"
2398
  shlibpath_var=LIBRARY_PATH
2399
  ;;
2400
2401
bsdi[[45]]*)
2402
  version_type=linux
2403
  need_version=no
2404
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2405
  soname_spec='${libname}${release}${shared_ext}$major'
2406
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2407
  shlibpath_var=LD_LIBRARY_PATH
2408
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2409
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2410
  # the default ld.so.conf also contains /usr/contrib/lib and
2411
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2412
  # libtool to hard-code these into programs
2413
  ;;
2414
2415
cygwin* | mingw* | pw32* | cegcc*)
2416
  version_type=windows
2417
  shrext_cmds=".dll"
2418
  need_version=no
2419
  need_lib_prefix=no
2420
2421
  case $GCC,$host_os in
2422
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2423
    library_names_spec='$libname.dll.a'
2424
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2425
    postinstall_cmds='base_file=`basename \${file}`~
2426
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2427
      dldir=$destdir/`dirname \$dlpath`~
2428
      test -d \$dldir || mkdir -p \$dldir~
2429
      $install_prog $dir/$dlname \$dldir/$dlname~
2430
      chmod a+x \$dldir/$dlname~
2431
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2432
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2433
      fi'
2434
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2435
      dlpath=$dir/\$dldll~
2436
       $RM \$dlpath'
2437
    shlibpath_overrides_runpath=yes
2438
2439
    case $host_os in
2440
    cygwin*)
2441
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2442
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2443
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2444
      ;;
2445
    mingw* | cegcc*)
2446
      # MinGW DLLs use traditional 'lib' prefix
2447
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2448
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2449
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2450
        # It is most probably a Windows format PATH printed by
2451
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2452
        # path with ; separators, and with drive letters. We can handle the
2453
        # drive letters (cygwin fileutils understands them), so leave them,
2454
        # especially as we might pass files found there to a mingw objdump,
2455
        # which wouldn't understand a cygwinified path. Ahh.
2456
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2457
      else
2458
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2459
      fi
2460
      ;;
2461
    pw32*)
2462
      # pw32 DLLs use 'pw' prefix rather than 'lib'
2463
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2464
      ;;
2465
    esac
2466
    ;;
2467
2468
  *)
2469
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2470
    ;;
2471
  esac
2472
  dynamic_linker='Win32 ld.exe'
2473
  # FIXME: first we should search . and the directory the executable is in
2474
  shlibpath_var=PATH
2475
  ;;
2476
2477
darwin* | rhapsody*)
2478
  dynamic_linker="$host_os dyld"
2479
  version_type=darwin
2480
  need_lib_prefix=no
2481
  need_version=no
2482
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2483
  soname_spec='${libname}${release}${major}$shared_ext'
2484
  shlibpath_overrides_runpath=yes
2485
  shlibpath_var=DYLD_LIBRARY_PATH
2486
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2487
m4_if([$1], [],[
2488
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2489
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2490
  ;;
2491
2492
dgux*)
2493
  version_type=linux
2494
  need_lib_prefix=no
2495
  need_version=no
2496
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2497
  soname_spec='${libname}${release}${shared_ext}$major'
2498
  shlibpath_var=LD_LIBRARY_PATH
2499
  ;;
2500
2501
freebsd1*)
2502
  dynamic_linker=no
2503
  ;;
2504
2505
freebsd* | dragonfly*)
2506
  # DragonFly does not have aout.  When/if they implement a new
2507
  # versioning mechanism, adjust this.
2508
  if test -x /usr/bin/objformat; then
2509
    objformat=`/usr/bin/objformat`
2510
  else
2511
    case $host_os in
2512
    freebsd[[123]]*) objformat=aout ;;
2513
    *) objformat=elf ;;
2514
    esac
2515
  fi
2516
  version_type=freebsd-$objformat
2517
  case $version_type in
2518
    freebsd-elf*)
2519
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2520
      need_version=no
2521
      need_lib_prefix=no
2522
      ;;
2523
    freebsd-*)
2524
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2525
      need_version=yes
2526
      ;;
2527
  esac
2528
  shlibpath_var=LD_LIBRARY_PATH
2529
  case $host_os in
2530
  freebsd2*)
2531
    shlibpath_overrides_runpath=yes
2532
    ;;
2533
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2534
    shlibpath_overrides_runpath=yes
2535
    hardcode_into_libs=yes
2536
    ;;
2537
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2538
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2539
    shlibpath_overrides_runpath=no
2540
    hardcode_into_libs=yes
2541
    ;;
2542
  *) # from 4.6 on, and DragonFly
2543
    shlibpath_overrides_runpath=yes
2544
    hardcode_into_libs=yes
2545
    ;;
2546
  esac
2547
  ;;
2548
2549
gnu*)
2550
  version_type=linux
2551
  need_lib_prefix=no
2552
  need_version=no
2553
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2554
  soname_spec='${libname}${release}${shared_ext}$major'
2555
  shlibpath_var=LD_LIBRARY_PATH
2556
  hardcode_into_libs=yes
2557
  ;;
2558
2559
hpux9* | hpux10* | hpux11*)
2560
  # Give a soname corresponding to the major version so that dld.sl refuses to
2561
  # link against other versions.
2562
  version_type=sunos
2563
  need_lib_prefix=no
2564
  need_version=no
2565
  case $host_cpu in
2566
  ia64*)
2567
    shrext_cmds='.so'
2568
    hardcode_into_libs=yes
2569
    dynamic_linker="$host_os dld.so"
2570
    shlibpath_var=LD_LIBRARY_PATH
2571
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2572
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2573
    soname_spec='${libname}${release}${shared_ext}$major'
2574
    if test "X$HPUX_IA64_MODE" = X32; then
2575
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2576
    else
2577
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2578
    fi
2579
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2580
    ;;
2581
  hppa*64*)
2582
    shrext_cmds='.sl'
2583
    hardcode_into_libs=yes
2584
    dynamic_linker="$host_os dld.sl"
2585
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2586
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2587
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2588
    soname_spec='${libname}${release}${shared_ext}$major'
2589
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2590
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2591
    ;;
2592
  *)
2593
    shrext_cmds='.sl'
2594
    dynamic_linker="$host_os dld.sl"
2595
    shlibpath_var=SHLIB_PATH
2596
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2597
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2598
    soname_spec='${libname}${release}${shared_ext}$major'
2599
    ;;
2600
  esac
2601
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2602
  postinstall_cmds='chmod 555 $lib'
2603
  ;;
2604
2605
interix[[3-9]]*)
2606
  version_type=linux
2607
  need_lib_prefix=no
2608
  need_version=no
2609
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2610
  soname_spec='${libname}${release}${shared_ext}$major'
2611
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2612
  shlibpath_var=LD_LIBRARY_PATH
2613
  shlibpath_overrides_runpath=no
2614
  hardcode_into_libs=yes
2615
  ;;
2616
2617
irix5* | irix6* | nonstopux*)
2618
  case $host_os in
2619
    nonstopux*) version_type=nonstopux ;;
2620
    *)
2621
	if test "$lt_cv_prog_gnu_ld" = yes; then
2622
		version_type=linux
2623
	else
2624
		version_type=irix
2625
	fi ;;
2626
  esac
2627
  need_lib_prefix=no
2628
  need_version=no
2629
  soname_spec='${libname}${release}${shared_ext}$major'
2630
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2631
  case $host_os in
2632
  irix5* | nonstopux*)
2633
    libsuff= shlibsuff=
2634
    ;;
2635
  *)
2636
    case $LD in # libtool.m4 will add one of these switches to LD
2637
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2638
      libsuff= shlibsuff= libmagic=32-bit;;
2639
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2640
      libsuff=32 shlibsuff=N32 libmagic=N32;;
2641
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2642
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2643
    *) libsuff= shlibsuff= libmagic=never-match;;
2644
    esac
2645
    ;;
2646
  esac
2647
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2648
  shlibpath_overrides_runpath=no
2649
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2650
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2651
  hardcode_into_libs=yes
2652
  ;;
2653
2654
# No shared lib support for Linux oldld, aout, or coff.
2655
linux*oldld* | linux*aout* | linux*coff*)
2656
  dynamic_linker=no
2657
  ;;
2658
2659
# This must be Linux ELF.
2660
linux* | k*bsd*-gnu)
2661
  version_type=linux
2662
  need_lib_prefix=no
2663
  need_version=no
2664
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2665
  soname_spec='${libname}${release}${shared_ext}$major'
2666
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2667
  shlibpath_var=LD_LIBRARY_PATH
2668
  shlibpath_overrides_runpath=no
2669
  # Some binutils ld are patched to set DT_RUNPATH
2670
  save_LDFLAGS=$LDFLAGS
2671
  save_libdir=$libdir
2672
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2673
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2674
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2675
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2676
       [shlibpath_overrides_runpath=yes])])
2677
  LDFLAGS=$save_LDFLAGS
2678
  libdir=$save_libdir
2679
2680
  # This implies no fast_install, which is unacceptable.
2681
  # Some rework will be needed to allow for fast_install
2682
  # before this can be enabled.
2683
  hardcode_into_libs=yes
2684
2685
  # Append ld.so.conf contents to the search path
2686
  if test -f /etc/ld.so.conf; then
2687
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2688
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2689
  fi
2690
2691
  # We used to test for /lib/ld.so.1 and disable shared libraries on
2692
  # powerpc, because MkLinux only supported shared libraries with the
2693
  # GNU dynamic linker.  Since this was broken with cross compilers,
2694
  # most powerpc-linux boxes support dynamic linking these days and
2695
  # people can always --disable-shared, the test was removed, and we
2696
  # assume the GNU/Linux dynamic linker is in use.
2697
  dynamic_linker='GNU/Linux ld.so'
2698
  ;;
2699
2700
netbsdelf*-gnu)
2701
  version_type=linux
2702
  need_lib_prefix=no
2703
  need_version=no
2704
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2705
  soname_spec='${libname}${release}${shared_ext}$major'
2706
  shlibpath_var=LD_LIBRARY_PATH
2707
  shlibpath_overrides_runpath=no
2708
  hardcode_into_libs=yes
2709
  dynamic_linker='NetBSD ld.elf_so'
2710
  ;;
2711
2712
netbsd*)
2713
  version_type=sunos
2714
  need_lib_prefix=no
2715
  need_version=no
2716
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2717
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2718
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2719
    dynamic_linker='NetBSD (a.out) ld.so'
2720
  else
2721
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2722
    soname_spec='${libname}${release}${shared_ext}$major'
2723
    dynamic_linker='NetBSD ld.elf_so'
2724
  fi
2725
  shlibpath_var=LD_LIBRARY_PATH
2726
  shlibpath_overrides_runpath=yes
2727
  hardcode_into_libs=yes
2728
  ;;
2729
2730
newsos6)
2731
  version_type=linux
2732
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2733
  shlibpath_var=LD_LIBRARY_PATH
2734
  shlibpath_overrides_runpath=yes
2735
  ;;
2736
2737
*nto* | *qnx*)
2738
  version_type=qnx
2739
  need_lib_prefix=no
2740
  need_version=no
2741
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2742
  soname_spec='${libname}${release}${shared_ext}$major'
2743
  shlibpath_var=LD_LIBRARY_PATH
2744
  shlibpath_overrides_runpath=no
2745
  hardcode_into_libs=yes
2746
  dynamic_linker='ldqnx.so'
2747
  ;;
2748
2749
openbsd*)
2750
  version_type=sunos
2751
  sys_lib_dlsearch_path_spec="/usr/lib"
2752
  need_lib_prefix=no
2753
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2754
  case $host_os in
2755
    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2756
    *)				need_version=no  ;;
2757
  esac
2758
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2759
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2760
  shlibpath_var=LD_LIBRARY_PATH
2761
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2762
    case $host_os in
2763
      openbsd2.[[89]] | openbsd2.[[89]].*)
2764
	shlibpath_overrides_runpath=no
2765
	;;
2766
      *)
2767
	shlibpath_overrides_runpath=yes
2768
	;;
2769
      esac
2770
  else
2771
    shlibpath_overrides_runpath=yes
2772
  fi
2773
  ;;
2774
2775
os2*)
2776
  libname_spec='$name'
2777
  shrext_cmds=".dll"
2778
  need_lib_prefix=no
2779
  library_names_spec='$libname${shared_ext} $libname.a'
2780
  dynamic_linker='OS/2 ld.exe'
2781
  shlibpath_var=LIBPATH
2782
  ;;
2783
2784
osf3* | osf4* | osf5*)
2785
  version_type=osf
2786
  need_lib_prefix=no
2787
  need_version=no
2788
  soname_spec='${libname}${release}${shared_ext}$major'
2789
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2790
  shlibpath_var=LD_LIBRARY_PATH
2791
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2792
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2793
  ;;
2794
2795
rdos*)
2796
  dynamic_linker=no
2797
  ;;
2798
2799
solaris*)
2800
  version_type=linux
2801
  need_lib_prefix=no
2802
  need_version=no
2803
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2804
  soname_spec='${libname}${release}${shared_ext}$major'
2805
  shlibpath_var=LD_LIBRARY_PATH
2806
  shlibpath_overrides_runpath=yes
2807
  hardcode_into_libs=yes
2808
  # ldd complains unless libraries are executable
2809
  postinstall_cmds='chmod +x $lib'
2810
  ;;
2811
2812
sunos4*)
2813
  version_type=sunos
2814
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2815
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2816
  shlibpath_var=LD_LIBRARY_PATH
2817
  shlibpath_overrides_runpath=yes
2818
  if test "$with_gnu_ld" = yes; then
2819
    need_lib_prefix=no
2820
  fi
2821
  need_version=yes
2822
  ;;
2823
2824
sysv4 | sysv4.3*)
2825
  version_type=linux
2826
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2827
  soname_spec='${libname}${release}${shared_ext}$major'
2828
  shlibpath_var=LD_LIBRARY_PATH
2829
  case $host_vendor in
2830
    sni)
2831
      shlibpath_overrides_runpath=no
2832
      need_lib_prefix=no
2833
      runpath_var=LD_RUN_PATH
2834
      ;;
2835
    siemens)
2836
      need_lib_prefix=no
2837
      ;;
2838
    motorola)
2839
      need_lib_prefix=no
2840
      need_version=no
2841
      shlibpath_overrides_runpath=no
2842
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2843
      ;;
2844
  esac
2845
  ;;
2846
2847
sysv4*MP*)
2848
  if test -d /usr/nec ;then
2849
    version_type=linux
2850
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2851
    soname_spec='$libname${shared_ext}.$major'
2852
    shlibpath_var=LD_LIBRARY_PATH
2853
  fi
2854
  ;;
2855
2856
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2857
  version_type=freebsd-elf
2858
  need_lib_prefix=no
2859
  need_version=no
2860
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2861
  soname_spec='${libname}${release}${shared_ext}$major'
2862
  shlibpath_var=LD_LIBRARY_PATH
2863
  shlibpath_overrides_runpath=yes
2864
  hardcode_into_libs=yes
2865
  if test "$with_gnu_ld" = yes; then
2866
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2867
  else
2868
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2869
    case $host_os in
2870
      sco3.2v5*)
2871
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2872
	;;
2873
    esac
2874
  fi
2875
  sys_lib_dlsearch_path_spec='/usr/lib'
2876
  ;;
2877
2878
tpf*)
2879
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2880
  version_type=linux
2881
  need_lib_prefix=no
2882
  need_version=no
2883
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2884
  shlibpath_var=LD_LIBRARY_PATH
2885
  shlibpath_overrides_runpath=no
2886
  hardcode_into_libs=yes
2887
  ;;
2888
2889
uts4*)
2890
  version_type=linux
2891
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2892
  soname_spec='${libname}${release}${shared_ext}$major'
2893
  shlibpath_var=LD_LIBRARY_PATH
2894
  ;;
2895
2896
*)
2897
  dynamic_linker=no
2898
  ;;
2899
esac
2900
AC_MSG_RESULT([$dynamic_linker])
2901
test "$dynamic_linker" = no && can_build_shared=no
2902
2903
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2904
if test "$GCC" = yes; then
2905
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2906
fi
2907
2908
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2909
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2910
fi
2911
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2912
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2913
fi
2914
2915
_LT_DECL([], [variables_saved_for_relink], [1],
2916
    [Variables whose values should be saved in libtool wrapper scripts and
2917
    restored at link time])
2918
_LT_DECL([], [need_lib_prefix], [0],
2919
    [Do we need the "lib" prefix for modules?])
2920
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2921
_LT_DECL([], [version_type], [0], [Library versioning type])
2922
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2923
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2924
_LT_DECL([], [shlibpath_overrides_runpath], [0],
2925
    [Is shlibpath searched before the hard-coded library search path?])
2926
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2927
_LT_DECL([], [library_names_spec], [1],
2928
    [[List of archive names.  First name is the real one, the rest are links.
2929
    The last name is the one that the linker finds with -lNAME]])
2930
_LT_DECL([], [soname_spec], [1],
2931
    [[The coded name of the library, if different from the real name]])
2932
_LT_DECL([], [postinstall_cmds], [2],
2933
    [Command to use after installation of a shared archive])
2934
_LT_DECL([], [postuninstall_cmds], [2],
2935
    [Command to use after uninstallation of a shared archive])
2936
_LT_DECL([], [finish_cmds], [2],
2937
    [Commands used to finish a libtool library installation in a directory])
2938
_LT_DECL([], [finish_eval], [1],
2939
    [[As "finish_cmds", except a single script fragment to be evaled but
2940
    not shown]])
2941
_LT_DECL([], [hardcode_into_libs], [0],
2942
    [Whether we should hardcode library paths into libraries])
2943
_LT_DECL([], [sys_lib_search_path_spec], [2],
2944
    [Compile-time system search path for libraries])
2945
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2946
    [Run-time system search path for libraries])
2947
])# _LT_SYS_DYNAMIC_LINKER
2948
2949
2950
# _LT_PATH_TOOL_PREFIX(TOOL)
2951
# --------------------------
2952
# find a file program which can recognize shared library
2953
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2954
[m4_require([_LT_DECL_EGREP])dnl
2955
AC_MSG_CHECKING([for $1])
2956
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2957
[case $MAGIC_CMD in
2958
[[\\/*] |  ?:[\\/]*])
2959
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2960
  ;;
2961
*)
2962
  lt_save_MAGIC_CMD="$MAGIC_CMD"
2963
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2964
dnl $ac_dummy forces splitting on constant user-supplied paths.
2965
dnl POSIX.2 word splitting is done only on the output of word expansions,
2966
dnl not every word.  This closes a longstanding sh security hole.
2967
  ac_dummy="m4_if([$2], , $PATH, [$2])"
2968
  for ac_dir in $ac_dummy; do
2969
    IFS="$lt_save_ifs"
2970
    test -z "$ac_dir" && ac_dir=.
2971
    if test -f $ac_dir/$1; then
2972
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2973
      if test -n "$file_magic_test_file"; then
2974
	case $deplibs_check_method in
2975
	"file_magic "*)
2976
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2977
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2978
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2979
	    $EGREP "$file_magic_regex" > /dev/null; then
2980
	    :
2981
	  else
2982
	    cat <<_LT_EOF 1>&2
2983
2984
*** Warning: the command libtool uses to detect shared libraries,
2985
*** $file_magic_cmd, produces output that libtool cannot recognize.
2986
*** The result is that libtool may fail to recognize shared libraries
2987
*** as such.  This will affect the creation of libtool libraries that
2988
*** depend on shared libraries, but programs linked with such libtool
2989
*** libraries will work regardless of this problem.  Nevertheless, you
2990
*** may want to report the problem to your system manager and/or to
2991
*** bug-libtool@gnu.org
2992
2993
_LT_EOF
2994
	  fi ;;
2995
	esac
2996
      fi
2997
      break
2998
    fi
2999
  done
3000
  IFS="$lt_save_ifs"
3001
  MAGIC_CMD="$lt_save_MAGIC_CMD"
3002
  ;;
3003
esac])
3004
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3005
if test -n "$MAGIC_CMD"; then
3006
  AC_MSG_RESULT($MAGIC_CMD)
3007
else
3008
  AC_MSG_RESULT(no)
3009
fi
3010
_LT_DECL([], [MAGIC_CMD], [0],
3011
	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3012
])# _LT_PATH_TOOL_PREFIX
3013
3014
# Old name:
3015
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3016
dnl aclocal-1.4 backwards compatibility:
3017
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3018
3019
3020
# _LT_PATH_MAGIC
3021
# --------------
3022
# find a file program which can recognize a shared library
3023
m4_defun([_LT_PATH_MAGIC],
3024
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3025
if test -z "$lt_cv_path_MAGIC_CMD"; then
3026
  if test -n "$ac_tool_prefix"; then
3027
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3028
  else
3029
    MAGIC_CMD=:
3030
  fi
3031
fi
3032
])# _LT_PATH_MAGIC
3033
3034
3035
# LT_PATH_LD
3036
# ----------
3037
# find the pathname to the GNU or non-GNU linker
3038
AC_DEFUN([LT_PATH_LD],
3039
[AC_REQUIRE([AC_PROG_CC])dnl
3040
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3041
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3042
m4_require([_LT_DECL_SED])dnl
3043
m4_require([_LT_DECL_EGREP])dnl
3044
3045
AC_ARG_WITH([gnu-ld],
3046
    [AS_HELP_STRING([--with-gnu-ld],
3047
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3048
    [test "$withval" = no || with_gnu_ld=yes],
3049
    [with_gnu_ld=no])dnl
3050
3051
ac_prog=ld
3052
if test "$GCC" = yes; then
3053
  # Check if gcc -print-prog-name=ld gives a path.
3054
  AC_MSG_CHECKING([for ld used by $CC])
3055
  case $host in
3056
  *-*-mingw*)
3057
    # gcc leaves a trailing carriage return which upsets mingw
3058
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3059
  *)
3060
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3061
  esac
3062
  case $ac_prog in
3063
    # Accept absolute paths.
3064
    [[\\/]]* | ?:[[\\/]]*)
3065
      re_direlt='/[[^/]][[^/]]*/\.\./'
3066
      # Canonicalize the pathname of ld
3067
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3068
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3069
	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3070
      done
3071
      test -z "$LD" && LD="$ac_prog"
3072
      ;;
3073
  "")
3074
    # If it fails, then pretend we aren't using GCC.
3075
    ac_prog=ld
3076
    ;;
3077
  *)
3078
    # If it is relative, then search for the first ld in PATH.
3079
    with_gnu_ld=unknown
3080
    ;;
3081
  esac
3082
elif test "$with_gnu_ld" = yes; then
3083
  AC_MSG_CHECKING([for GNU ld])
3084
else
3085
  AC_MSG_CHECKING([for non-GNU ld])
3086
fi
3087
AC_CACHE_VAL(lt_cv_path_LD,
3088
[if test -z "$LD"; then
3089
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3090
  for ac_dir in $PATH; do
3091
    IFS="$lt_save_ifs"
3092
    test -z "$ac_dir" && ac_dir=.
3093
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3094
      lt_cv_path_LD="$ac_dir/$ac_prog"
3095
      # Check to see if the program is GNU ld.  I'd rather use --version,
3096
      # but apparently some variants of GNU ld only accept -v.
3097
      # Break only if it was the GNU/non-GNU ld that we prefer.
3098
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3099
      *GNU* | *'with BFD'*)
3100
	test "$with_gnu_ld" != no && break
3101
	;;
3102
      *)
3103
	test "$with_gnu_ld" != yes && break
3104
	;;
3105
      esac
3106
    fi
3107
  done
3108
  IFS="$lt_save_ifs"
3109
else
3110
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3111
fi])
3112
LD="$lt_cv_path_LD"
3113
if test -n "$LD"; then
3114
  AC_MSG_RESULT($LD)
3115
else
3116
  AC_MSG_RESULT(no)
3117
fi
3118
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3119
_LT_PATH_LD_GNU
3120
AC_SUBST([LD])
3121
3122
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3123
])# LT_PATH_LD
3124
3125
# Old names:
3126
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3127
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3128
dnl aclocal-1.4 backwards compatibility:
3129
dnl AC_DEFUN([AM_PROG_LD], [])
3130
dnl AC_DEFUN([AC_PROG_LD], [])
3131
3132
3133
# _LT_PATH_LD_GNU
3134
#- --------------
3135
m4_defun([_LT_PATH_LD_GNU],
3136
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3137
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3138
case `$LD -v 2>&1 </dev/null` in
3139
*GNU* | *'with BFD'*)
3140
  lt_cv_prog_gnu_ld=yes
3141
  ;;
3142
*)
3143
  lt_cv_prog_gnu_ld=no
3144
  ;;
3145
esac])
3146
with_gnu_ld=$lt_cv_prog_gnu_ld
3147
])# _LT_PATH_LD_GNU
3148
3149
3150
# _LT_CMD_RELOAD
3151
# --------------
3152
# find reload flag for linker
3153
#   -- PORTME Some linkers may need a different reload flag.
3154
m4_defun([_LT_CMD_RELOAD],
3155
[AC_CACHE_CHECK([for $LD option to reload object files],
3156
  lt_cv_ld_reload_flag,
3157
  [lt_cv_ld_reload_flag='-r'])
3158
reload_flag=$lt_cv_ld_reload_flag
3159
case $reload_flag in
3160
"" | " "*) ;;
3161
*) reload_flag=" $reload_flag" ;;
3162
esac
3163
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3164
case $host_os in
3165
  darwin*)
3166
    if test "$GCC" = yes; then
3167
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3168
    else
3169
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3170
    fi
3171
    ;;
3172
esac
3173
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3174
_LT_DECL([], [reload_cmds], [2])dnl
3175
])# _LT_CMD_RELOAD
3176
3177
3178
# _LT_CHECK_MAGIC_METHOD
3179
# ----------------------
3180
# how to check for library dependencies
3181
#  -- PORTME fill in with the dynamic library characteristics
3182
m4_defun([_LT_CHECK_MAGIC_METHOD],
3183
[m4_require([_LT_DECL_EGREP])
3184
m4_require([_LT_DECL_OBJDUMP])
3185
AC_CACHE_CHECK([how to recognize dependent libraries],
3186
lt_cv_deplibs_check_method,
3187
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3188
lt_cv_file_magic_test_file=
3189
lt_cv_deplibs_check_method='unknown'
3190
# Need to set the preceding variable on all platforms that support
3191
# interlibrary dependencies.
3192
# 'none' -- dependencies not supported.
3193
# `unknown' -- same as none, but documents that we really don't know.
3194
# 'pass_all' -- all dependencies passed with no checks.
3195
# 'test_compile' -- check by making test program.
3196
# 'file_magic [[regex]]' -- check by looking for files in library path
3197
# which responds to the $file_magic_cmd with a given extended regex.
3198
# If you have `file' or equivalent on your system and you're not sure
3199
# whether `pass_all' will *always* work, you probably want this one.
3200
3201
case $host_os in
3202
aix[[4-9]]*)
3203
  lt_cv_deplibs_check_method=pass_all
3204
  ;;
3205
3206
beos*)
3207
  lt_cv_deplibs_check_method=pass_all
3208
  ;;
3209
3210
bsdi[[45]]*)
3211
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3212
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3213
  lt_cv_file_magic_test_file=/shlib/libc.so
3214
  ;;
3215
3216
cygwin*)
3217
  # func_win32_libid is a shell function defined in ltmain.sh
3218
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3219
  lt_cv_file_magic_cmd='func_win32_libid'
3220
  ;;
3221
3222
mingw* | pw32*)
3223
  # Base MSYS/MinGW do not provide the 'file' command needed by
3224
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3225
  # unless we find 'file', for example because we are cross-compiling.
3226
  if ( file / ) >/dev/null 2>&1; then
3227
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3228
    lt_cv_file_magic_cmd='func_win32_libid'
3229
  else
3230
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3231
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3232
  fi
3233
  ;;
3234
3235
cegcc)
3236
  # use the weaker test based on 'objdump'. See mingw*.
3237
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3238
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3239
  ;;
3240
3241
darwin* | rhapsody*)
3242
  lt_cv_deplibs_check_method=pass_all
3243
  ;;
3244
3245
freebsd* | dragonfly*)
3246
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3247
    case $host_cpu in
3248
    i*86 )
3249
      # Not sure whether the presence of OpenBSD here was a mistake.
3250
      # Let's accept both of them until this is cleared up.
3251
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3252
      lt_cv_file_magic_cmd=/usr/bin/file
3253
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3254
      ;;
3255
    esac
3256
  else
3257
    lt_cv_deplibs_check_method=pass_all
3258
  fi
3259
  ;;
3260
3261
gnu*)
3262
  lt_cv_deplibs_check_method=pass_all
3263
  ;;
3264
3265
hpux10.20* | hpux11*)
3266
  lt_cv_file_magic_cmd=/usr/bin/file
3267
  case $host_cpu in
3268
  ia64*)
3269
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3270
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3271
    ;;
3272
  hppa*64*)
3273
    [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]']
3274
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3275
    ;;
3276
  *)
3277
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3278
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3279
    ;;
3280
  esac
3281
  ;;
3282
3283
interix[[3-9]]*)
3284
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3285
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3286
  ;;
3287
3288
irix5* | irix6* | nonstopux*)
3289
  case $LD in
3290
  *-32|*"-32 ") libmagic=32-bit;;
3291
  *-n32|*"-n32 ") libmagic=N32;;
3292
  *-64|*"-64 ") libmagic=64-bit;;
3293
  *) libmagic=never-match;;
3294
  esac
3295
  lt_cv_deplibs_check_method=pass_all
3296
  ;;
3297
3298
# This must be Linux ELF.
3299
linux* | k*bsd*-gnu)
3300
  lt_cv_deplibs_check_method=pass_all
3301
  ;;
3302
3303
netbsd* | netbsdelf*-gnu)
3304
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3305
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3306
  else
3307
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3308
  fi
3309
  ;;
3310
3311
newos6*)
3312
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3313
  lt_cv_file_magic_cmd=/usr/bin/file
3314
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3315
  ;;
3316
3317
*nto* | *qnx*)
3318
  lt_cv_deplibs_check_method=pass_all
3319
  ;;
3320
3321
openbsd*)
3322
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3323
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3324
  else
3325
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3326
  fi
3327
  ;;
3328
3329
osf3* | osf4* | osf5*)
3330
  lt_cv_deplibs_check_method=pass_all
3331
  ;;
3332
3333
rdos*)
3334
  lt_cv_deplibs_check_method=pass_all
3335
  ;;
3336
3337
solaris*)
3338
  lt_cv_deplibs_check_method=pass_all
3339
  ;;
3340
3341
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3342
  lt_cv_deplibs_check_method=pass_all
3343
  ;;
3344
3345
sysv4 | sysv4.3*)
3346
  case $host_vendor in
3347
  motorola)
3348
    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]]'
3349
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3350
    ;;
3351
  ncr)
3352
    lt_cv_deplibs_check_method=pass_all
3353
    ;;
3354
  sequent)
3355
    lt_cv_file_magic_cmd='/bin/file'
3356
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3357
    ;;
3358
  sni)
3359
    lt_cv_file_magic_cmd='/bin/file'
3360
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3361
    lt_cv_file_magic_test_file=/lib/libc.so
3362
    ;;
3363
  siemens)
3364
    lt_cv_deplibs_check_method=pass_all
3365
    ;;
3366
  pc)
3367
    lt_cv_deplibs_check_method=pass_all
3368
    ;;
3369
  esac
3370
  ;;
3371
3372
tpf*)
3373
  lt_cv_deplibs_check_method=pass_all
3374
  ;;
3375
esac
3376
])
3377
file_magic_cmd=$lt_cv_file_magic_cmd
3378
deplibs_check_method=$lt_cv_deplibs_check_method
3379
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3380
3381
_LT_DECL([], [deplibs_check_method], [1],
3382
    [Method to check whether dependent libraries are shared objects])
3383
_LT_DECL([], [file_magic_cmd], [1],
3384
    [Command to use when deplibs_check_method == "file_magic"])
3385
])# _LT_CHECK_MAGIC_METHOD
3386
3387
3388
# LT_PATH_NM
3389
# ----------
3390
# find the pathname to a BSD- or MS-compatible name lister
3391
AC_DEFUN([LT_PATH_NM],
3392
[AC_REQUIRE([AC_PROG_CC])dnl
3393
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3394
[if test -n "$NM"; then
3395
  # Let the user override the test.
3396
  lt_cv_path_NM="$NM"
3397
else
3398
  lt_nm_to_check="${ac_tool_prefix}nm"
3399
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3400
    lt_nm_to_check="$lt_nm_to_check nm"
3401
  fi
3402
  for lt_tmp_nm in $lt_nm_to_check; do
3403
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3404
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3405
      IFS="$lt_save_ifs"
3406
      test -z "$ac_dir" && ac_dir=.
3407
      tmp_nm="$ac_dir/$lt_tmp_nm"
3408
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3409
	# Check to see if the nm accepts a BSD-compat flag.
3410
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3411
	#   nm: unknown option "B" ignored
3412
	# Tru64's nm complains that /dev/null is an invalid object file
3413
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3414
	*/dev/null* | *'Invalid file or object type'*)
3415
	  lt_cv_path_NM="$tmp_nm -B"
3416
	  break
3417
	  ;;
3418
	*)
3419
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3420
	  */dev/null*)
3421
	    lt_cv_path_NM="$tmp_nm -p"
3422
	    break
3423
	    ;;
3424
	  *)
3425
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3426
	    continue # so that we can try to find one that supports BSD flags
3427
	    ;;
3428
	  esac
3429
	  ;;
3430
	esac
3431
      fi
3432
    done
3433
    IFS="$lt_save_ifs"
3434
  done
3435
  : ${lt_cv_path_NM=no}
3436
fi])
3437
if test "$lt_cv_path_NM" != "no"; then
3438
  NM="$lt_cv_path_NM"
3439
else
3440
  # Didn't find any BSD compatible name lister, look for dumpbin.
3441
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3442
  AC_SUBST([DUMPBIN])
3443
  if test "$DUMPBIN" != ":"; then
3444
    NM="$DUMPBIN"
3445
  fi
3446
fi
3447
test -z "$NM" && NM=nm
3448
AC_SUBST([NM])
3449
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3450
3451
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3452
  [lt_cv_nm_interface="BSD nm"
3453
  echo "int some_variable = 0;" > conftest.$ac_ext
3454
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3455
  (eval "$ac_compile" 2>conftest.err)
3456
  cat conftest.err >&AS_MESSAGE_LOG_FD
3457
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3458
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3459
  cat conftest.err >&AS_MESSAGE_LOG_FD
3460
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3461
  cat conftest.out >&AS_MESSAGE_LOG_FD
3462
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3463
    lt_cv_nm_interface="MS dumpbin"
3464
  fi
3465
  rm -f conftest*])
3466
])# LT_PATH_NM
3467
3468
# Old names:
3469
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3470
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3471
dnl aclocal-1.4 backwards compatibility:
3472
dnl AC_DEFUN([AM_PROG_NM], [])
3473
dnl AC_DEFUN([AC_PROG_NM], [])
3474
3475
3476
# LT_LIB_M
3477
# --------
3478
# check for math library
3479
AC_DEFUN([LT_LIB_M],
3480
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3481
LIBM=
3482
case $host in
3483
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3484
  # These system don't have libm, or don't need it
3485
  ;;
3486
*-ncr-sysv4.3*)
3487
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3488
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3489
  ;;
3490
*)
3491
  AC_CHECK_LIB(m, cos, LIBM="-lm")
3492
  ;;
3493
esac
3494
AC_SUBST([LIBM])
3495
])# LT_LIB_M
3496
3497
# Old name:
3498
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3499
dnl aclocal-1.4 backwards compatibility:
3500
dnl AC_DEFUN([AC_CHECK_LIBM], [])
3501
3502
3503
# _LT_COMPILER_NO_RTTI([TAGNAME])
3504
# -------------------------------
3505
m4_defun([_LT_COMPILER_NO_RTTI],
3506
[m4_require([_LT_TAG_COMPILER])dnl
3507
3508
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3509
3510
if test "$GCC" = yes; then
3511
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3512
3513
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3514
    lt_cv_prog_compiler_rtti_exceptions,
3515
    [-fno-rtti -fno-exceptions], [],
3516
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3517
fi
3518
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3519
	[Compiler flag to turn off builtin functions])
3520
])# _LT_COMPILER_NO_RTTI
3521
3522
3523
# _LT_CMD_GLOBAL_SYMBOLS
3524
# ----------------------
3525
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3526
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3527
AC_REQUIRE([AC_PROG_CC])dnl
3528
AC_REQUIRE([LT_PATH_NM])dnl
3529
AC_REQUIRE([LT_PATH_LD])dnl
3530
m4_require([_LT_DECL_SED])dnl
3531
m4_require([_LT_DECL_EGREP])dnl
3532
m4_require([_LT_TAG_COMPILER])dnl
3533
3534
# Check for command to grab the raw symbol name followed by C symbol from nm.
3535
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3536
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3537
[
3538
# These are sane defaults that work on at least a few old systems.
3539
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3540
3541
# Character class describing NM global symbol codes.
3542
symcode='[[BCDEGRST]]'
3543
3544
# Regexp to match symbols that can be accessed directly from C.
3545
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3546
3547
# Define system-specific variables.
3548
case $host_os in
3549
aix*)
3550
  symcode='[[BCDT]]'
3551
  ;;
3552
cygwin* | mingw* | pw32* | cegcc*)
3553
  symcode='[[ABCDGISTW]]'
3554
  ;;
3555
hpux*)
3556
  if test "$host_cpu" = ia64; then
3557
    symcode='[[ABCDEGRST]]'
3558
  fi
3559
  ;;
3560
irix* | nonstopux*)
3561
  symcode='[[BCDEGRST]]'
3562
  ;;
3563
osf*)
3564
  symcode='[[BCDEGQRST]]'
3565
  ;;
3566
solaris*)
3567
  symcode='[[BDRT]]'
3568
  ;;
3569
sco3.2v5*)
3570
  symcode='[[DT]]'
3571
  ;;
3572
sysv4.2uw2*)
3573
  symcode='[[DT]]'
3574
  ;;
3575
sysv5* | sco5v6* | unixware* | OpenUNIX*)
3576
  symcode='[[ABDT]]'
3577
  ;;
3578
sysv4)
3579
  symcode='[[DFNSTU]]'
3580
  ;;
3581
esac
3582
3583
# If we're using GNU nm, then use its standard symbol codes.
3584
case `$NM -V 2>&1` in
3585
*GNU* | *'with BFD'*)
3586
  symcode='[[ABCDGIRSTW]]' ;;
3587
esac
3588
3589
# Transform an extracted symbol line into a proper C declaration.
3590
# Some systems (esp. on ia64) link data and code symbols differently,
3591
# so use this general approach.
3592
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3593
3594
# Transform an extracted symbol line into symbol name and symbol address
3595
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3596
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
3597
3598
# Handle CRLF in mingw tool chain
3599
opt_cr=
3600
case $build_os in
3601
mingw*)
3602
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3603
  ;;
3604
esac
3605
3606
# Try without a prefix underscore, then with it.
3607
for ac_symprfx in "" "_"; do
3608
3609
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3610
  symxfrm="\\1 $ac_symprfx\\2 \\2"
3611
3612
  # Write the raw and C identifiers.
3613
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3614
    # Fake it for dumpbin and say T for any non-static function
3615
    # and D for any global variable.
3616
    # Also find C++ and __fastcall symbols from MSVC++,
3617
    # which start with @ or ?.
3618
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3619
"     {last_section=section; section=\$ 3};"\
3620
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3621
"     \$ 0!~/External *\|/{next};"\
3622
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3623
"     {if(hide[section]) next};"\
3624
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3625
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3626
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3627
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3628
"     ' prfx=^$ac_symprfx]"
3629
  else
3630
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3631
  fi
3632
3633
  # Check to see that the pipe works correctly.
3634
  pipe_works=no
3635
3636
  rm -f conftest*
3637
  cat > conftest.$ac_ext <<_LT_EOF
3638
#ifdef __cplusplus
3639
extern "C" {
3640
#endif
3641
char nm_test_var;
3642
void nm_test_func(void);
3643
void nm_test_func(void){}
3644
#ifdef __cplusplus
3645
}
3646
#endif
3647
int main(){nm_test_var='a';nm_test_func();return(0);}
3648
_LT_EOF
3649
3650
  if AC_TRY_EVAL(ac_compile); then
3651
    # Now try to grab the symbols.
3652
    nlist=conftest.nm
3653
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3654
      # Try sorting and uniquifying the output.
3655
      if sort "$nlist" | uniq > "$nlist"T; then
3656
	mv -f "$nlist"T "$nlist"
3657
      else
3658
	rm -f "$nlist"T
3659
      fi
3660
3661
      # Make sure that we snagged all the symbols we need.
3662
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3663
	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3664
	  cat <<_LT_EOF > conftest.$ac_ext
3665
#ifdef __cplusplus
3666
extern "C" {
3667
#endif
3668
3669
_LT_EOF
3670
	  # Now generate the symbol file.
3671
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3672
3673
	  cat <<_LT_EOF >> conftest.$ac_ext
3674
3675
/* The mapping between symbol names and symbols.  */
3676
const struct {
3677
  const char *name;
3678
  void       *address;
3679
}
3680
lt__PROGRAM__LTX_preloaded_symbols[[]] =
3681
{
3682
  { "@PROGRAM@", (void *) 0 },
3683
_LT_EOF
3684
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3685
	  cat <<\_LT_EOF >> conftest.$ac_ext
3686
  {0, (void *) 0}
3687
};
3688
3689
/* This works around a problem in FreeBSD linker */
3690
#ifdef FREEBSD_WORKAROUND
3691
static const void *lt_preloaded_setup() {
3692
  return lt__PROGRAM__LTX_preloaded_symbols;
3693
}
3694
#endif
3695
3696
#ifdef __cplusplus
3697
}
3698
#endif
3699
_LT_EOF
3700
	  # Now try linking the two files.
3701
	  mv conftest.$ac_objext conftstm.$ac_objext
3702
	  lt_save_LIBS="$LIBS"
3703
	  lt_save_CFLAGS="$CFLAGS"
3704
	  LIBS="conftstm.$ac_objext"
3705
	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3706
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3707
	    pipe_works=yes
3708
	  fi
3709
	  LIBS="$lt_save_LIBS"
3710
	  CFLAGS="$lt_save_CFLAGS"
3711
	else
3712
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3713
	fi
3714
      else
3715
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3716
      fi
3717
    else
3718
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3719
    fi
3720
  else
3721
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3722
    cat conftest.$ac_ext >&5
3723
  fi
3724
  rm -rf conftest* conftst*
3725
3726
  # Do not use the global_symbol_pipe unless it works.
3727
  if test "$pipe_works" = yes; then
3728
    break
3729
  else
3730
    lt_cv_sys_global_symbol_pipe=
3731
  fi
3732
done
3733
])
3734
if test -z "$lt_cv_sys_global_symbol_pipe"; then
3735
  lt_cv_sys_global_symbol_to_cdecl=
3736
fi
3737
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3738
  AC_MSG_RESULT(failed)
3739
else
3740
  AC_MSG_RESULT(ok)
3741
fi
3742
3743
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3744
    [Take the output of nm and produce a listing of raw symbols and C names])
3745
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3746
    [Transform the output of nm in a proper C declaration])
3747
_LT_DECL([global_symbol_to_c_name_address],
3748
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3749
    [Transform the output of nm in a C name address pair])
3750
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3751
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3752
    [Transform the output of nm in a C name address pair when lib prefix is needed])
3753
]) # _LT_CMD_GLOBAL_SYMBOLS
3754
3755
3756
# _LT_COMPILER_PIC([TAGNAME])
3757
# ---------------------------
3758
m4_defun([_LT_COMPILER_PIC],
3759
[m4_require([_LT_TAG_COMPILER])dnl
3760
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3761
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3762
_LT_TAGVAR(lt_prog_compiler_static, $1)=
3763
3764
AC_MSG_CHECKING([for $compiler option to produce PIC])
3765
m4_if([$1], [CXX], [
3766
  # C++ specific cases for pic, static, wl, etc.
3767
  if test "$GXX" = yes; then
3768
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3769
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3770
3771
    case $host_os in
3772
    aix*)
3773
      # All AIX code is PIC.
3774
      if test "$host_cpu" = ia64; then
3775
	# AIX 5 now supports IA64 processor
3776
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3777
      fi
3778
      ;;
3779
3780
    amigaos*)
3781
      case $host_cpu in
3782
      powerpc)
3783
            # see comment about AmigaOS4 .so support
3784
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3785
        ;;
3786
      m68k)
3787
            # FIXME: we need at least 68020 code to build shared libraries, but
3788
            # adding the `-m68020' flag to GCC prevents building anything better,
3789
            # like `-m68040'.
3790
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3791
        ;;
3792
      esac
3793
      ;;
3794
3795
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3796
      # PIC is the default for these OSes.
3797
      ;;
3798
    mingw* | cygwin* | os2* | pw32* | cegcc*)
3799
      # This hack is so that the source file can tell whether it is being
3800
      # built for inclusion in a dll (and should export symbols for example).
3801
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3802
      # (--disable-auto-import) libraries
3803
      m4_if([$1], [GCJ], [],
3804
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3805
      ;;
3806
    darwin* | rhapsody*)
3807
      # PIC is the default on this platform
3808
      # Common symbols not allowed in MH_DYLIB files
3809
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3810
      ;;
3811
    *djgpp*)
3812
      # DJGPP does not support shared libraries at all
3813
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3814
      ;;
3815
    interix[[3-9]]*)
3816
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3817
      # Instead, we relocate shared libraries at runtime.
3818
      ;;
3819
    sysv4*MP*)
3820
      if test -d /usr/nec; then
3821
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3822
      fi
3823
      ;;
3824
    hpux*)
3825
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3826
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3827
      # sets the default TLS model and affects inlining.
3828
      case $host_cpu in
3829
      hppa*64*)
3830
	;;
3831
      *)
3832
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3833
	;;
3834
      esac
3835
      ;;
3836
    *qnx* | *nto*)
3837
      # QNX uses GNU C++, but need to define -shared option too, otherwise
3838
      # it will coredump.
3839
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3840
      ;;
3841
    *)
3842
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3843
      ;;
3844
    esac
3845
  else
3846
    case $host_os in
3847
      aix[[4-9]]*)
3848
	# All AIX code is PIC.
3849
	if test "$host_cpu" = ia64; then
3850
	  # AIX 5 now supports IA64 processor
3851
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3852
	else
3853
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3854
	fi
3855
	;;
3856
      chorus*)
3857
	case $cc_basename in
3858
	cxch68*)
3859
	  # Green Hills C++ Compiler
3860
	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3861
	  ;;
3862
	esac
3863
	;;
3864
      dgux*)
3865
	case $cc_basename in
3866
	  ec++*)
3867
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3868
	    ;;
3869
	  ghcx*)
3870
	    # Green Hills C++ Compiler
3871
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3872
	    ;;
3873
	  *)
3874
	    ;;
3875
	esac
3876
	;;
3877
      freebsd* | dragonfly*)
3878
	# FreeBSD uses GNU C++
3879
	;;
3880
      hpux9* | hpux10* | hpux11*)
3881
	case $cc_basename in
3882
	  CC*)
3883
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3884
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3885
	    if test "$host_cpu" != ia64; then
3886
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3887
	    fi
3888
	    ;;
3889
	  aCC*)
3890
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3891
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3892
	    case $host_cpu in
3893
	    hppa*64*|ia64*)
3894
	      # +Z the default
3895
	      ;;
3896
	    *)
3897
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3898
	      ;;
3899
	    esac
3900
	    ;;
3901
	  *)
3902
	    ;;
3903
	esac
3904
	;;
3905
      interix*)
3906
	# This is c89, which is MS Visual C++ (no shared libs)
3907
	# Anyone wants to do a port?
3908
	;;
3909
      irix5* | irix6* | nonstopux*)
3910
	case $cc_basename in
3911
	  CC*)
3912
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3913
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3914
	    # CC pic flag -KPIC is the default.
3915
	    ;;
3916
	  *)
3917
	    ;;
3918
	esac
3919
	;;
3920
      linux* | k*bsd*-gnu)
3921
	case $cc_basename in
3922
	  KCC*)
3923
	    # KAI C++ Compiler
3924
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3925
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3926
	    ;;
3927
	  ecpc* )
3928
	    # old Intel C++ for x86_64 which still supported -KPIC.
3929
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3930
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3931
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3932
	    ;;
3933
	  icpc* )
3934
	    # Intel C++, used to be incompatible with GCC.
3935
	    # ICC 10 doesn't accept -KPIC any more.
3936
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3937
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3938
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3939
	    ;;
3940
	  pgCC* | pgcpp*)
3941
	    # Portland Group C++ compiler
3942
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3943
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3944
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3945
	    ;;
3946
	  cxx*)
3947
	    # Compaq C++
3948
	    # Make sure the PIC flag is empty.  It appears that all Alpha
3949
	    # Linux and Compaq Tru64 Unix objects are PIC.
3950
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3951
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3952
	    ;;
3953
	  xlc* | xlC*)
3954
	    # IBM XL 8.0 on PPC
3955
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3956
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3957
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3958
	    ;;
3959
	  *)
3960
	    case `$CC -V 2>&1 | sed 5q` in
3961
	    *Sun\ C*)
3962
	      # Sun C++ 5.9
3963
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3964
	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3965
	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3966
	      ;;
3967
	    esac
3968
	    ;;
3969
	esac
3970
	;;
3971
      lynxos*)
3972
	;;
3973
      m88k*)
3974
	;;
3975
      mvs*)
3976
	case $cc_basename in
3977
	  cxx*)
3978
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3979
	    ;;
3980
	  *)
3981
	    ;;
3982
	esac
3983
	;;
3984
      netbsd* | netbsdelf*-gnu)
3985
	;;
3986
      *qnx* | *nto*)
3987
        # QNX uses GNU C++, but need to define -shared option too, otherwise
3988
        # it will coredump.
3989
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3990
        ;;
3991
      osf3* | osf4* | osf5*)
3992
	case $cc_basename in
3993
	  KCC*)
3994
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3995
	    ;;
3996
	  RCC*)
3997
	    # Rational C++ 2.4.1
3998
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3999
	    ;;
4000
	  cxx*)
4001
	    # Digital/Compaq C++
4002
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4003
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4004
	    # Linux and Compaq Tru64 Unix objects are PIC.
4005
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4006
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4007
	    ;;
4008
	  *)
4009
	    ;;
4010
	esac
4011
	;;
4012
      psos*)
4013
	;;
4014
      solaris*)
4015
	case $cc_basename in
4016
	  CC*)
4017
	    # Sun C++ 4.2, 5.x and Centerline C++
4018
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4019
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4020
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4021
	    ;;
4022
	  gcx*)
4023
	    # Green Hills C++ Compiler
4024
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4025
	    ;;
4026
	  *)
4027
	    ;;
4028
	esac
4029
	;;
4030
      sunos4*)
4031
	case $cc_basename in
4032
	  CC*)
4033
	    # Sun C++ 4.x
4034
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4035
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4036
	    ;;
4037
	  lcc*)
4038
	    # Lucid
4039
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4040
	    ;;
4041
	  *)
4042
	    ;;
4043
	esac
4044
	;;
4045
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4046
	case $cc_basename in
4047
	  CC*)
4048
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4049
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4050
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4051
	    ;;
4052
	esac
4053
	;;
4054
      tandem*)
4055
	case $cc_basename in
4056
	  NCC*)
4057
	    # NonStop-UX NCC 3.20
4058
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4059
	    ;;
4060
	  *)
4061
	    ;;
4062
	esac
4063
	;;
4064
      vxworks*)
4065
	;;
4066
      *)
4067
	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4068
	;;
4069
    esac
4070
  fi
4071
],
4072
[
4073
  if test "$GCC" = yes; then
4074
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4075
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4076
4077
    case $host_os in
4078
      aix*)
4079
      # All AIX code is PIC.
4080
      if test "$host_cpu" = ia64; then
4081
	# AIX 5 now supports IA64 processor
4082
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4083
      fi
4084
      ;;
4085
4086
    amigaos*)
4087
      case $host_cpu in
4088
      powerpc)
4089
            # see comment about AmigaOS4 .so support
4090
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4091
        ;;
4092
      m68k)
4093
            # FIXME: we need at least 68020 code to build shared libraries, but
4094
            # adding the `-m68020' flag to GCC prevents building anything better,
4095
            # like `-m68040'.
4096
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4097
        ;;
4098
      esac
4099
      ;;
4100
4101
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4102
      # PIC is the default for these OSes.
4103
      ;;
4104
4105
    mingw* | cygwin* | pw32* | os2* | cegcc*)
4106
      # This hack is so that the source file can tell whether it is being
4107
      # built for inclusion in a dll (and should export symbols for example).
4108
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4109
      # (--disable-auto-import) libraries
4110
      m4_if([$1], [GCJ], [],
4111
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4112
      ;;
4113
4114
    darwin* | rhapsody*)
4115
      # PIC is the default on this platform
4116
      # Common symbols not allowed in MH_DYLIB files
4117
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4118
      ;;
4119
4120
    hpux*)
4121
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4122
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4123
      # sets the default TLS model and affects inlining.
4124
      case $host_cpu in
4125
      hppa*64*)
4126
	# +Z the default
4127
	;;
4128
      *)
4129
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4130
	;;
4131
      esac
4132
      ;;
4133
4134
    interix[[3-9]]*)
4135
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4136
      # Instead, we relocate shared libraries at runtime.
4137
      ;;
4138
4139
    msdosdjgpp*)
4140
      # Just because we use GCC doesn't mean we suddenly get shared libraries
4141
      # on systems that don't support them.
4142
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4143
      enable_shared=no
4144
      ;;
4145
4146
    *nto* | *qnx*)
4147
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4148
      # it will coredump.
4149
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4150
      ;;
4151
4152
    sysv4*MP*)
4153
      if test -d /usr/nec; then
4154
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4155
      fi
4156
      ;;
4157
4158
    *)
4159
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4160
      ;;
4161
    esac
4162
  else
4163
    # PORTME Check for flag to pass linker flags through the system compiler.
4164
    case $host_os in
4165
    aix*)
4166
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4167
      if test "$host_cpu" = ia64; then
4168
	# AIX 5 now supports IA64 processor
4169
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4170
      else
4171
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4172
      fi
4173
      ;;
4174
4175
    mingw* | cygwin* | pw32* | os2* | cegcc*)
4176
      # This hack is so that the source file can tell whether it is being
4177
      # built for inclusion in a dll (and should export symbols for example).
4178
      m4_if([$1], [GCJ], [],
4179
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4180
      ;;
4181
4182
    hpux9* | hpux10* | hpux11*)
4183
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4184
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4185
      # not for PA HP-UX.
4186
      case $host_cpu in
4187
      hppa*64*|ia64*)
4188
	# +Z the default
4189
	;;
4190
      *)
4191
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4192
	;;
4193
      esac
4194
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4195
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4196
      ;;
4197
4198
    irix5* | irix6* | nonstopux*)
4199
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4200
      # PIC (with -KPIC) is the default.
4201
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4202
      ;;
4203
4204
    linux* | k*bsd*-gnu)
4205
      case $cc_basename in
4206
      # old Intel for x86_64 which still supported -KPIC.
4207
      ecc*)
4208
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4209
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4210
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4211
        ;;
4212
      # icc used to be incompatible with GCC.
4213
      # ICC 10 doesn't accept -KPIC any more.
4214
      icc* | ifort*)
4215
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4216
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4217
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4218
        ;;
4219
      # Lahey Fortran 8.1.
4220
      lf95*)
4221
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4222
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4223
	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4224
	;;
4225
      pgcc* | pgf77* | pgf90* | pgf95*)
4226
        # Portland Group compilers (*not* the Pentium gcc compiler,
4227
	# which looks to be a dead project)
4228
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4229
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4230
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4231
        ;;
4232
      ccc*)
4233
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4234
        # All Alpha code is PIC.
4235
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4236
        ;;
4237
      xl*)
4238
	# IBM XL C 8.0/Fortran 10.1 on PPC
4239
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4240
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4241
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4242
	;;
4243
      *)
4244
	case `$CC -V 2>&1 | sed 5q` in
4245
	*Sun\ C*)
4246
	  # Sun C 5.9
4247
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4248
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4249
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4250
	  ;;
4251
	*Sun\ F*)
4252
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4253
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4254
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4255
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4256
	  ;;
4257
	esac
4258
	;;
4259
      esac
4260
      ;;
4261
4262
    newsos6)
4263
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4264
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4265
      ;;
4266
4267
    *nto* | *qnx*)
4268
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4269
      # it will coredump.
4270
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4271
      ;;
4272
4273
    osf3* | osf4* | osf5*)
4274
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4275
      # All OSF/1 code is PIC.
4276
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4277
      ;;
4278
4279
    rdos*)
4280
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4281
      ;;
4282
4283
    solaris*)
4284
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4285
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4286
      case $cc_basename in
4287
      f77* | f90* | f95*)
4288
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4289
      *)
4290
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4291
      esac
4292
      ;;
4293
4294
    sunos4*)
4295
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4296
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4297
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4298
      ;;
4299
4300
    sysv4 | sysv4.2uw2* | sysv4.3*)
4301
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4302
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4303
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4304
      ;;
4305
4306
    sysv4*MP*)
4307
      if test -d /usr/nec ;then
4308
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4309
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4310
      fi
4311
      ;;
4312
4313
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4314
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4315
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4316
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4317
      ;;
4318
4319
    unicos*)
4320
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4321
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4322
      ;;
4323
4324
    uts4*)
4325
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4326
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4327
      ;;
4328
4329
    *)
4330
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4331
      ;;
4332
    esac
4333
  fi
4334
])
4335
case $host_os in
4336
  # For platforms which do not support PIC, -DPIC is meaningless:
4337
  *djgpp*)
4338
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4339
    ;;
4340
  *)
4341
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4342
    ;;
4343
esac
4344
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4345
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4346
	[How to pass a linker flag through the compiler])
4347
4348
#
4349
# Check to make sure the PIC flag actually works.
4350
#
4351
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4352
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4353
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4354
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4355
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4356
     "" | " "*) ;;
4357
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4358
     esac],
4359
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4360
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4361
fi
4362
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4363
	[Additional compiler flags for building library objects])
4364
4365
#
4366
# Check to make sure the static flag actually works.
4367
#
4368
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4369
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4370
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4371
  $lt_tmp_static_flag,
4372
  [],
4373
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4374
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4375
	[Compiler flag to prevent dynamic linking])
4376
])# _LT_COMPILER_PIC
4377
4378
4379
# _LT_LINKER_SHLIBS([TAGNAME])
4380
# ----------------------------
4381
# See if the linker supports building shared libraries.
4382
m4_defun([_LT_LINKER_SHLIBS],
4383
[AC_REQUIRE([LT_PATH_LD])dnl
4384
AC_REQUIRE([LT_PATH_NM])dnl
4385
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4386
m4_require([_LT_DECL_EGREP])dnl
4387
m4_require([_LT_DECL_SED])dnl
4388
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4389
m4_require([_LT_TAG_COMPILER])dnl
4390
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4391
m4_if([$1], [CXX], [
4392
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4393
  case $host_os in
4394
  aix[[4-9]]*)
4395
    # If we're using GNU nm, then we don't want the "-C" option.
4396
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4397
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4398
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4399
    else
4400
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4401
    fi
4402
    ;;
4403
  pw32*)
4404
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4405
  ;;
4406
  cygwin* | mingw* | cegcc*)
4407
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4408
  ;;
4409
  linux* | k*bsd*-gnu)
4410
    _LT_TAGVAR(link_all_deplibs, $1)=no
4411
  ;;
4412
  *)
4413
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4414
  ;;
4415
  esac
4416
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4417
], [
4418
  runpath_var=
4419
  _LT_TAGVAR(allow_undefined_flag, $1)=
4420
  _LT_TAGVAR(always_export_symbols, $1)=no
4421
  _LT_TAGVAR(archive_cmds, $1)=
4422
  _LT_TAGVAR(archive_expsym_cmds, $1)=
4423
  _LT_TAGVAR(compiler_needs_object, $1)=no
4424
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4425
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4426
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4427
  _LT_TAGVAR(hardcode_automatic, $1)=no
4428
  _LT_TAGVAR(hardcode_direct, $1)=no
4429
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4430
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4431
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4432
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4433
  _LT_TAGVAR(hardcode_minus_L, $1)=no
4434
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4435
  _LT_TAGVAR(inherit_rpath, $1)=no
4436
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4437
  _LT_TAGVAR(module_cmds, $1)=
4438
  _LT_TAGVAR(module_expsym_cmds, $1)=
4439
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4440
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4441
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4442
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4443
  # include_expsyms should be a list of space-separated symbols to be *always*
4444
  # included in the symbol list
4445
  _LT_TAGVAR(include_expsyms, $1)=
4446
  # exclude_expsyms can be an extended regexp of symbols to exclude
4447
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4448
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4449
  # as well as any symbol that contains `d'.
4450
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4451
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4452
  # platforms (ab)use it in PIC code, but their linkers get confused if
4453
  # the symbol is explicitly referenced.  Since portable code cannot
4454
  # rely on this symbol name, it's probably fine to never include it in
4455
  # preloaded symbol tables.
4456
  # Exclude shared library initialization/finalization symbols.
4457
dnl Note also adjust exclude_expsyms for C++ above.
4458
  extract_expsyms_cmds=
4459
4460
  case $host_os in
4461
  cygwin* | mingw* | pw32* | cegcc*)
4462
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4463
    # When not using gcc, we currently assume that we are using
4464
    # Microsoft Visual C++.
4465
    if test "$GCC" != yes; then
4466
      with_gnu_ld=no
4467
    fi
4468
    ;;
4469
  interix*)
4470
    # we just hope/assume this is gcc and not c89 (= MSVC++)
4471
    with_gnu_ld=yes
4472
    ;;
4473
  openbsd*)
4474
    with_gnu_ld=no
4475
    ;;
4476
  esac
4477
4478
  _LT_TAGVAR(ld_shlibs, $1)=yes
4479
  if test "$with_gnu_ld" = yes; then
4480
    # If archive_cmds runs LD, not CC, wlarc should be empty
4481
    wlarc='${wl}'
4482
4483
    # Set some defaults for GNU ld with shared library support. These
4484
    # are reset later if shared libraries are not supported. Putting them
4485
    # here allows them to be overridden if necessary.
4486
    runpath_var=LD_RUN_PATH
4487
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4488
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4489
    # ancient GNU ld didn't support --whole-archive et. al.
4490
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4491
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4492
    else
4493
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4494
    fi
4495
    supports_anon_versioning=no
4496
    case `$LD -v 2>&1` in
4497
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4498
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4499
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4500
      *\ 2.11.*) ;; # other 2.11 versions
4501
      *) supports_anon_versioning=yes ;;
4502
    esac
4503
4504
    # See if GNU ld supports shared libraries.
4505
    case $host_os in
4506
    aix[[3-9]]*)
4507
      # On AIX/PPC, the GNU linker is very broken
4508
      if test "$host_cpu" != ia64; then
4509
	_LT_TAGVAR(ld_shlibs, $1)=no
4510
	cat <<_LT_EOF 1>&2
4511
4512
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4513
*** to be unable to reliably create shared libraries on AIX.
4514
*** Therefore, libtool is disabling shared libraries support.  If you
4515
*** really care for shared libraries, you may want to modify your PATH
4516
*** so that a non-GNU linker is found, and then restart.
4517
4518
_LT_EOF
4519
      fi
4520
      ;;
4521
4522
    amigaos*)
4523
      case $host_cpu in
4524
      powerpc)
4525
            # see comment about AmigaOS4 .so support
4526
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4527
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4528
        ;;
4529
      m68k)
4530
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4531
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4532
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4533
        ;;
4534
      esac
4535
      ;;
4536
4537
    beos*)
4538
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4539
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4540
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4541
	# support --undefined.  This deserves some investigation.  FIXME
4542
	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4543
      else
4544
	_LT_TAGVAR(ld_shlibs, $1)=no
4545
      fi
4546
      ;;
4547
4548
    cygwin* | mingw* | pw32* | cegcc*)
4549
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4550
      # as there is no search path for DLLs.
4551
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4552
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4553
      _LT_TAGVAR(always_export_symbols, $1)=no
4554
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4555
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
4556
4557
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4558
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4559
	# If the export-symbols file already is a .def file (1st line
4560
	# is EXPORTS), use it as is; otherwise, prepend...
4561
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4562
	  cp $export_symbols $output_objdir/$soname.def;
4563
	else
4564
	  echo EXPORTS > $output_objdir/$soname.def;
4565
	  cat $export_symbols >> $output_objdir/$soname.def;
4566
	fi~
4567
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4568
      else
4569
	_LT_TAGVAR(ld_shlibs, $1)=no
4570
      fi
4571
      ;;
4572
4573
    interix[[3-9]]*)
4574
      _LT_TAGVAR(hardcode_direct, $1)=no
4575
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4576
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4577
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4578
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4579
      # Instead, shared libraries are loaded at an image base (0x10000000 by
4580
      # default) and relocated if they conflict, which is a slow very memory
4581
      # consuming and fragmenting process.  To avoid this, we pick a random,
4582
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4583
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4584
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4585
      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4586
      ;;
4587
4588
    gnu* | linux* | tpf* | k*bsd*-gnu)
4589
      tmp_diet=no
4590
      if test "$host_os" = linux-dietlibc; then
4591
	case $cc_basename in
4592
	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4593
	esac
4594
      fi
4595
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4596
	 && test "$tmp_diet" = no
4597
      then
4598
	tmp_addflag=
4599
	tmp_sharedflag='-shared'
4600
	case $cc_basename,$host_cpu in
4601
        pgcc*)				# Portland Group C compiler
4602
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4603
	  tmp_addflag=' $pic_flag'
4604
	  ;;
4605
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
4606
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4607
	  tmp_addflag=' $pic_flag -Mnomain' ;;
4608
	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4609
	  tmp_addflag=' -i_dynamic' ;;
4610
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4611
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4612
	ifc* | ifort*)			# Intel Fortran compiler
4613
	  tmp_addflag=' -nofor_main' ;;
4614
	lf95*)				# Lahey Fortran 8.1
4615
	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4616
	  tmp_sharedflag='--shared' ;;
4617
	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
4618
	  tmp_sharedflag='-qmkshrobj'
4619
	  tmp_addflag= ;;
4620
	esac
4621
	case `$CC -V 2>&1 | sed 5q` in
4622
	*Sun\ C*)			# Sun C 5.9
4623
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4624
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4625
	  tmp_sharedflag='-G' ;;
4626
	*Sun\ F*)			# Sun Fortran 8.3
4627
	  tmp_sharedflag='-G' ;;
4628
	esac
4629
	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4630
4631
        if test "x$supports_anon_versioning" = xyes; then
4632
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4633
	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4634
	    echo "local: *; };" >> $output_objdir/$libname.ver~
4635
	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4636
        fi
4637
4638
	case $cc_basename in
4639
	xlf*)
4640
	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4641
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4642
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4643
	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4644
	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4645
	  if test "x$supports_anon_versioning" = xyes; then
4646
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4647
	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4648
	      echo "local: *; };" >> $output_objdir/$libname.ver~
4649
	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4650
	  fi
4651
	  ;;
4652
	esac
4653
      else
4654
        _LT_TAGVAR(ld_shlibs, $1)=no
4655
      fi
4656
      ;;
4657
4658
    netbsd* | netbsdelf*-gnu)
4659
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4660
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4661
	wlarc=
4662
      else
4663
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4664
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4665
      fi
4666
      ;;
4667
4668
    solaris*)
4669
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4670
	_LT_TAGVAR(ld_shlibs, $1)=no
4671
	cat <<_LT_EOF 1>&2
4672
4673
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4674
*** create shared libraries on Solaris systems.  Therefore, libtool
4675
*** is disabling shared libraries support.  We urge you to upgrade GNU
4676
*** binutils to release 2.9.1 or newer.  Another option is to modify
4677
*** your PATH or compiler configuration so that the native linker is
4678
*** used, and then restart.
4679
4680
_LT_EOF
4681
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4682
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4683
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4684
      else
4685
	_LT_TAGVAR(ld_shlibs, $1)=no
4686
      fi
4687
      ;;
4688
4689
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4690
      case `$LD -v 2>&1` in
4691
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4692
	_LT_TAGVAR(ld_shlibs, $1)=no
4693
	cat <<_LT_EOF 1>&2
4694
4695
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4696
*** reliably create shared libraries on SCO systems.  Therefore, libtool
4697
*** is disabling shared libraries support.  We urge you to upgrade GNU
4698
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4699
*** your PATH or compiler configuration so that the native linker is
4700
*** used, and then restart.
4701
4702
_LT_EOF
4703
	;;
4704
	*)
4705
	  # For security reasons, it is highly recommended that you always
4706
	  # use absolute paths for naming shared libraries, and exclude the
4707
	  # DT_RUNPATH tag from executables and libraries.  But doing so
4708
	  # requires that you compile everything twice, which is a pain.
4709
	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4710
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4711
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4712
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4713
	  else
4714
	    _LT_TAGVAR(ld_shlibs, $1)=no
4715
	  fi
4716
	;;
4717
      esac
4718
      ;;
4719
4720
    sunos4*)
4721
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4722
      wlarc=
4723
      _LT_TAGVAR(hardcode_direct, $1)=yes
4724
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4725
      ;;
4726
4727
    *)
4728
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4729
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4730
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4731
      else
4732
	_LT_TAGVAR(ld_shlibs, $1)=no
4733
      fi
4734
      ;;
4735
    esac
4736
4737
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4738
      runpath_var=
4739
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4740
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4741
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4742
    fi
4743
  else
4744
    # PORTME fill in a description of your system's linker (not GNU ld)
4745
    case $host_os in
4746
    aix3*)
4747
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4748
      _LT_TAGVAR(always_export_symbols, $1)=yes
4749
      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4750
      # Note: this linker hardcodes the directories in LIBPATH if there
4751
      # are no directories specified by -L.
4752
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4753
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4754
	# Neither direct hardcoding nor static linking is supported with a
4755
	# broken collect2.
4756
	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4757
      fi
4758
      ;;
4759
4760
    aix[[4-9]]*)
4761
      if test "$host_cpu" = ia64; then
4762
	# On IA64, the linker does run time linking by default, so we don't
4763
	# have to do anything special.
4764
	aix_use_runtimelinking=no
4765
	exp_sym_flag='-Bexport'
4766
	no_entry_flag=""
4767
      else
4768
	# If we're using GNU nm, then we don't want the "-C" option.
4769
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4770
	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4771
	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4772
	else
4773
	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4774
	fi
4775
	aix_use_runtimelinking=no
4776
4777
	# Test if we are trying to use run time linking or normal
4778
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4779
	# need to do runtime linking.
4780
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4781
	  for ld_flag in $LDFLAGS; do
4782
	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4783
	    aix_use_runtimelinking=yes
4784
	    break
4785
	  fi
4786
	  done
4787
	  ;;
4788
	esac
4789
4790
	exp_sym_flag='-bexport'
4791
	no_entry_flag='-bnoentry'
4792
      fi
4793
4794
      # When large executables or shared objects are built, AIX ld can
4795
      # have problems creating the table of contents.  If linking a library
4796
      # or program results in "error TOC overflow" add -mminimal-toc to
4797
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4798
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4799
4800
      _LT_TAGVAR(archive_cmds, $1)=''
4801
      _LT_TAGVAR(hardcode_direct, $1)=yes
4802
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4803
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4804
      _LT_TAGVAR(link_all_deplibs, $1)=yes
4805
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4806
4807
      if test "$GCC" = yes; then
4808
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
4809
	# We only want to do this on AIX 4.2 and lower, the check
4810
	# below for broken collect2 doesn't work under 4.3+
4811
	  collect2name=`${CC} -print-prog-name=collect2`
4812
	  if test -f "$collect2name" &&
4813
	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4814
	  then
4815
	  # We have reworked collect2
4816
	  :
4817
	  else
4818
	  # We have old collect2
4819
	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
4820
	  # It fails to find uninstalled libraries when the uninstalled
4821
	  # path is not listed in the libpath.  Setting hardcode_minus_L
4822
	  # to unsupported forces relinking
4823
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4824
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4825
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4826
	  fi
4827
	  ;;
4828
	esac
4829
	shared_flag='-shared'
4830
	if test "$aix_use_runtimelinking" = yes; then
4831
	  shared_flag="$shared_flag "'${wl}-G'
4832
	fi
4833
	_LT_TAGVAR(link_all_deplibs, $1)=no
4834
      else
4835
	# not using gcc
4836
	if test "$host_cpu" = ia64; then
4837
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4838
	# chokes on -Wl,-G. The following line is correct:
4839
	  shared_flag='-G'
4840
	else
4841
	  if test "$aix_use_runtimelinking" = yes; then
4842
	    shared_flag='${wl}-G'
4843
	  else
4844
	    shared_flag='${wl}-bM:SRE'
4845
	  fi
4846
	fi
4847
      fi
4848
4849
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4850
      # It seems that -bexpall does not export symbols beginning with
4851
      # underscore (_), so it is better to generate a list of symbols to export.
4852
      _LT_TAGVAR(always_export_symbols, $1)=yes
4853
      if test "$aix_use_runtimelinking" = yes; then
4854
	# Warning - without using the other runtime loading flags (-brtl),
4855
	# -berok will link without error, but may produce a broken library.
4856
	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4857
        # Determine the default libpath from the value encoded in an
4858
        # empty executable.
4859
        _LT_SYS_MODULE_PATH_AIX
4860
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4861
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4862
      else
4863
	if test "$host_cpu" = ia64; then
4864
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4865
	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4866
	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4867
	else
4868
	 # Determine the default libpath from the value encoded in an
4869
	 # empty executable.
4870
	 _LT_SYS_MODULE_PATH_AIX
4871
	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4872
	  # Warning - without using the other run time loading flags,
4873
	  # -berok will link without error, but may produce a broken library.
4874
	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4875
	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4876
	  # Exported symbols can be pulled into shared objects from archives
4877
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4878
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4879
	  # This is similar to how AIX traditionally builds its shared libraries.
4880
	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4881
	fi
4882
      fi
4883
      ;;
4884
4885
    amigaos*)
4886
      case $host_cpu in
4887
      powerpc)
4888
            # see comment about AmigaOS4 .so support
4889
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4890
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4891
        ;;
4892
      m68k)
4893
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4894
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4895
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4896
        ;;
4897
      esac
4898
      ;;
4899
4900
    bsdi[[45]]*)
4901
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4902
      ;;
4903
4904
    cygwin* | mingw* | pw32* | cegcc*)
4905
      # When not using gcc, we currently assume that we are using
4906
      # Microsoft Visual C++.
4907
      # hardcode_libdir_flag_spec is actually meaningless, as there is
4908
      # no search path for DLLs.
4909
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4910
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4911
      # Tell ltmain to make .lib files, not .a files.
4912
      libext=lib
4913
      # Tell ltmain to make .dll files, not .so files.
4914
      shrext_cmds=".dll"
4915
      # FIXME: Setting linknames here is a bad hack.
4916
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4917
      # The linker will automatically build a .lib file if we build a DLL.
4918
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4919
      # FIXME: Should let the user specify the lib program.
4920
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4921
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4922
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4923
      ;;
4924
4925
    darwin* | rhapsody*)
4926
      _LT_DARWIN_LINKER_FEATURES($1)
4927
      ;;
4928
4929
    dgux*)
4930
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4931
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4932
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4933
      ;;
4934
4935
    freebsd1*)
4936
      _LT_TAGVAR(ld_shlibs, $1)=no
4937
      ;;
4938
4939
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4940
    # support.  Future versions do this automatically, but an explicit c++rt0.o
4941
    # does not break anything, and helps significantly (at the cost of a little
4942
    # extra space).
4943
    freebsd2.2*)
4944
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4945
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4946
      _LT_TAGVAR(hardcode_direct, $1)=yes
4947
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4948
      ;;
4949
4950
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4951
    freebsd2*)
4952
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4953
      _LT_TAGVAR(hardcode_direct, $1)=yes
4954
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4955
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4956
      ;;
4957
4958
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4959
    freebsd* | dragonfly*)
4960
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4961
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4962
      _LT_TAGVAR(hardcode_direct, $1)=yes
4963
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4964
      ;;
4965
4966
    hpux9*)
4967
      if test "$GCC" = yes; then
4968
	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4969
      else
4970
	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4971
      fi
4972
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4973
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4974
      _LT_TAGVAR(hardcode_direct, $1)=yes
4975
4976
      # hardcode_minus_L: Not really in the search PATH,
4977
      # but as the default location of the library.
4978
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4979
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4980
      ;;
4981
4982
    hpux10*)
4983
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4984
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4985
      else
4986
	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4987
      fi
4988
      if test "$with_gnu_ld" = no; then
4989
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4990
	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4991
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4992
	_LT_TAGVAR(hardcode_direct, $1)=yes
4993
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4994
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4995
	# hardcode_minus_L: Not really in the search PATH,
4996
	# but as the default location of the library.
4997
	_LT_TAGVAR(hardcode_minus_L, $1)=yes
4998
      fi
4999
      ;;
5000
5001
    hpux11*)
5002
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5003
	case $host_cpu in
5004
	hppa*64*)
5005
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5006
	  ;;
5007
	ia64*)
5008
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5009
	  ;;
5010
	*)
5011
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5012
	  ;;
5013
	esac
5014
      else
5015
	case $host_cpu in
5016
	hppa*64*)
5017
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5018
	  ;;
5019
	ia64*)
5020
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5021
	  ;;
5022
	*)
5023
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5024
	  ;;
5025
	esac
5026
      fi
5027
      if test "$with_gnu_ld" = no; then
5028
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5029
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5030
5031
	case $host_cpu in
5032
	hppa*64*|ia64*)
5033
	  _LT_TAGVAR(hardcode_direct, $1)=no
5034
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5035
	  ;;
5036
	*)
5037
	  _LT_TAGVAR(hardcode_direct, $1)=yes
5038
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5039
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5040
5041
	  # hardcode_minus_L: Not really in the search PATH,
5042
	  # but as the default location of the library.
5043
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5044
	  ;;
5045
	esac
5046
      fi
5047
      ;;
5048
5049
    irix5* | irix6* | nonstopux*)
5050
      if test "$GCC" = yes; then
5051
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5052
	# Try to use the -exported_symbol ld option, if it does not
5053
	# work, assume that -exports_file does not work either and
5054
	# implicitly export all symbols.
5055
        save_LDFLAGS="$LDFLAGS"
5056
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5057
        AC_LINK_IFELSE(int foo(void) {},
5058
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5059
        )
5060
        LDFLAGS="$save_LDFLAGS"
5061
      else
5062
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5063
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5064
      fi
5065
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5066
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5067
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5068
      _LT_TAGVAR(inherit_rpath, $1)=yes
5069
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5070
      ;;
5071
5072
    netbsd* | netbsdelf*-gnu)
5073
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5074
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5075
      else
5076
	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5077
      fi
5078
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5079
      _LT_TAGVAR(hardcode_direct, $1)=yes
5080
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5081
      ;;
5082
5083
    newsos6)
5084
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5085
      _LT_TAGVAR(hardcode_direct, $1)=yes
5086
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5087
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5088
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5089
      ;;
5090
5091
    *nto* | *qnx*)
5092
      ;;
5093
5094
    openbsd*)
5095
      if test -f /usr/libexec/ld.so; then
5096
	_LT_TAGVAR(hardcode_direct, $1)=yes
5097
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5098
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5099
	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5100
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5101
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5102
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5103
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5104
	else
5105
	  case $host_os in
5106
	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5107
	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5108
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5109
	     ;;
5110
	   *)
5111
	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5112
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5113
	     ;;
5114
	  esac
5115
	fi
5116
      else
5117
	_LT_TAGVAR(ld_shlibs, $1)=no
5118
      fi
5119
      ;;
5120
5121
    os2*)
5122
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5123
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5124
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5125
      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5126
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5127
      ;;
5128
5129
    osf3*)
5130
      if test "$GCC" = yes; then
5131
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5132
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5133
      else
5134
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5135
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5136
      fi
5137
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5138
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5139
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5140
      ;;
5141
5142
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5143
      if test "$GCC" = yes; then
5144
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5145
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5146
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5147
      else
5148
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5149
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5150
	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5151
	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5152
5153
	# Both c and cxx compiler support -rpath directly
5154
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5155
      fi
5156
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5157
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5158
      ;;
5159
5160
    solaris*)
5161
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5162
      if test "$GCC" = yes; then
5163
	wlarc='${wl}'
5164
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5165
	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5166
	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5167
      else
5168
	case `$CC -V 2>&1` in
5169
	*"Compilers 5.0"*)
5170
	  wlarc=''
5171
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5172
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5173
	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5174
	  ;;
5175
	*)
5176
	  wlarc='${wl}'
5177
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5178
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5179
	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5180
	  ;;
5181
	esac
5182
      fi
5183
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5184
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5185
      case $host_os in
5186
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5187
      *)
5188
	# The compiler driver will combine and reorder linker options,
5189
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5190
	# but is careful enough not to reorder.
5191
	# Supported since Solaris 2.6 (maybe 2.5.1?)
5192
	if test "$GCC" = yes; then
5193
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5194
	else
5195
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5196
	fi
5197
	;;
5198
      esac
5199
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5200
      ;;
5201
5202
    sunos4*)
5203
      if test "x$host_vendor" = xsequent; then
5204
	# Use $CC to link under sequent, because it throws in some extra .o
5205
	# files that make .init and .fini sections work.
5206
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5207
      else
5208
	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5209
      fi
5210
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5211
      _LT_TAGVAR(hardcode_direct, $1)=yes
5212
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5213
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5214
      ;;
5215
5216
    sysv4)
5217
      case $host_vendor in
5218
	sni)
5219
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5220
	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5221
	;;
5222
	siemens)
5223
	  ## LD is ld it makes a PLAMLIB
5224
	  ## CC just makes a GrossModule.
5225
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5226
	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5227
	  _LT_TAGVAR(hardcode_direct, $1)=no
5228
        ;;
5229
	motorola)
5230
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5231
	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5232
	;;
5233
      esac
5234
      runpath_var='LD_RUN_PATH'
5235
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5236
      ;;
5237
5238
    sysv4.3*)
5239
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5240
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5241
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5242
      ;;
5243
5244
    sysv4*MP*)
5245
      if test -d /usr/nec; then
5246
	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5247
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5248
	runpath_var=LD_RUN_PATH
5249
	hardcode_runpath_var=yes
5250
	_LT_TAGVAR(ld_shlibs, $1)=yes
5251
      fi
5252
      ;;
5253
5254
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5255
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5256
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5257
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5258
      runpath_var='LD_RUN_PATH'
5259
5260
      if test "$GCC" = yes; then
5261
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5262
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5263
      else
5264
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5265
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5266
      fi
5267
      ;;
5268
5269
    sysv5* | sco3.2v5* | sco5v6*)
5270
      # Note: We can NOT use -z defs as we might desire, because we do not
5271
      # link with -lc, and that would cause any symbols used from libc to
5272
      # always be unresolved, which means just about no library would
5273
      # ever link correctly.  If we're not using GNU ld we use -z text
5274
      # though, which does catch some bad symbols but isn't as heavy-handed
5275
      # as -z defs.
5276
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5277
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5278
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5279
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5280
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5281
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5282
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5283
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5284
      runpath_var='LD_RUN_PATH'
5285
5286
      if test "$GCC" = yes; then
5287
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5288
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5289
      else
5290
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5291
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5292
      fi
5293
      ;;
5294
5295
    uts4*)
5296
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5297
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5298
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5299
      ;;
5300
5301
    *)
5302
      _LT_TAGVAR(ld_shlibs, $1)=no
5303
      ;;
5304
    esac
5305
5306
    if test x$host_vendor = xsni; then
5307
      case $host in
5308
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5309
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5310
	;;
5311
      esac
5312
    fi
5313
  fi
5314
])
5315
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5316
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5317
5318
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5319
5320
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5321
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5322
_LT_DECL([], [extract_expsyms_cmds], [2],
5323
    [The commands to extract the exported symbol list from a shared archive])
5324
5325
#
5326
# Do we need to explicitly link libc?
5327
#
5328
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5329
x|xyes)
5330
  # Assume -lc should be added
5331
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5332
5333
  if test "$enable_shared" = yes && test "$GCC" = yes; then
5334
    case $_LT_TAGVAR(archive_cmds, $1) in
5335
    *'~'*)
5336
      # FIXME: we may have to deal with multi-command sequences.
5337
      ;;
5338
    '$CC '*)
5339
      # Test whether the compiler implicitly links with -lc since on some
5340
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5341
      # to ld, don't add -lc before -lgcc.
5342
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5343
      $RM conftest*
5344
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5345
5346
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5347
        soname=conftest
5348
        lib=conftest
5349
        libobjs=conftest.$ac_objext
5350
        deplibs=
5351
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5352
	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5353
        compiler_flags=-v
5354
        linker_flags=-v
5355
        verstring=
5356
        output_objdir=.
5357
        libname=conftest
5358
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5359
        _LT_TAGVAR(allow_undefined_flag, $1)=
5360
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5361
        then
5362
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5363
        else
5364
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5365
        fi
5366
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5367
      else
5368
        cat conftest.err 1>&5
5369
      fi
5370
      $RM conftest*
5371
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5372
      ;;
5373
    esac
5374
  fi
5375
  ;;
5376
esac
5377
5378
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5379
    [Whether or not to add -lc for building shared libraries])
5380
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5381
    [enable_shared_with_static_runtimes], [0],
5382
    [Whether or not to disallow shared libs when runtime libs are static])
5383
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5384
    [Compiler flag to allow reflexive dlopens])
5385
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5386
    [Compiler flag to generate shared objects directly from archives])
5387
_LT_TAGDECL([], [compiler_needs_object], [1],
5388
    [Whether the compiler copes with passing no objects directly])
5389
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5390
    [Create an old-style archive from a shared archive])
5391
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5392
    [Create a temporary old-style archive to link instead of a shared archive])
5393
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5394
_LT_TAGDECL([], [archive_expsym_cmds], [2])
5395
_LT_TAGDECL([], [module_cmds], [2],
5396
    [Commands used to build a loadable module if different from building
5397
    a shared archive.])
5398
_LT_TAGDECL([], [module_expsym_cmds], [2])
5399
_LT_TAGDECL([], [with_gnu_ld], [1],
5400
    [Whether we are building with GNU ld or not])
5401
_LT_TAGDECL([], [allow_undefined_flag], [1],
5402
    [Flag that allows shared libraries with undefined symbols to be built])
5403
_LT_TAGDECL([], [no_undefined_flag], [1],
5404
    [Flag that enforces no undefined symbols])
5405
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5406
    [Flag to hardcode $libdir into a binary during linking.
5407
    This must work even if $libdir does not exist])
5408
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5409
    [[If ld is used when linking, flag to hardcode $libdir into a binary
5410
    during linking.  This must work even if $libdir does not exist]])
5411
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5412
    [Whether we need a single "-rpath" flag with a separated argument])
5413
_LT_TAGDECL([], [hardcode_direct], [0],
5414
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5415
    DIR into the resulting binary])
5416
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5417
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5418
    DIR into the resulting binary and the resulting library dependency is
5419
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5420
    library is relocated])
5421
_LT_TAGDECL([], [hardcode_minus_L], [0],
5422
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5423
    into the resulting binary])
5424
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5425
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5426
    into the resulting binary])
5427
_LT_TAGDECL([], [hardcode_automatic], [0],
5428
    [Set to "yes" if building a shared library automatically hardcodes DIR
5429
    into the library and all subsequent libraries and executables linked
5430
    against it])
5431
_LT_TAGDECL([], [inherit_rpath], [0],
5432
    [Set to yes if linker adds runtime paths of dependent libraries
5433
    to runtime path list])
5434
_LT_TAGDECL([], [link_all_deplibs], [0],
5435
    [Whether libtool must link a program against all its dependency libraries])
5436
_LT_TAGDECL([], [fix_srcfile_path], [1],
5437
    [Fix the shell variable $srcfile for the compiler])
5438
_LT_TAGDECL([], [always_export_symbols], [0],
5439
    [Set to "yes" if exported symbols are required])
5440
_LT_TAGDECL([], [export_symbols_cmds], [2],
5441
    [The commands to list exported symbols])
5442
_LT_TAGDECL([], [exclude_expsyms], [1],
5443
    [Symbols that should not be listed in the preloaded symbols])
5444
_LT_TAGDECL([], [include_expsyms], [1],
5445
    [Symbols that must always be exported])
5446
_LT_TAGDECL([], [prelink_cmds], [2],
5447
    [Commands necessary for linking programs (against libraries) with templates])
5448
_LT_TAGDECL([], [file_list_spec], [1],
5449
    [Specify filename containing input files])
5450
dnl FIXME: Not yet implemented
5451
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5452
dnl    [Compiler flag to generate thread safe objects])
5453
])# _LT_LINKER_SHLIBS
5454
5455
5456
# _LT_LANG_C_CONFIG([TAG])
5457
# ------------------------
5458
# Ensure that the configuration variables for a C compiler are suitably
5459
# defined.  These variables are subsequently used by _LT_CONFIG to write
5460
# the compiler configuration to `libtool'.
5461
m4_defun([_LT_LANG_C_CONFIG],
5462
[m4_require([_LT_DECL_EGREP])dnl
5463
lt_save_CC="$CC"
5464
AC_LANG_PUSH(C)
5465
5466
# Source file extension for C test sources.
5467
ac_ext=c
5468
5469
# Object file extension for compiled C test sources.
5470
objext=o
5471
_LT_TAGVAR(objext, $1)=$objext
5472
5473
# Code to be used in simple compile tests
5474
lt_simple_compile_test_code="int some_variable = 0;"
5475
5476
# Code to be used in simple link tests
5477
lt_simple_link_test_code='int main(){return(0);}'
5478
5479
_LT_TAG_COMPILER
5480
# Save the default compiler, since it gets overwritten when the other
5481
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5482
compiler_DEFAULT=$CC
5483
5484
# save warnings/boilerplate of simple test code
5485
_LT_COMPILER_BOILERPLATE
5486
_LT_LINKER_BOILERPLATE
5487
5488
if test -n "$compiler"; then
5489
  _LT_COMPILER_NO_RTTI($1)
5490
  _LT_COMPILER_PIC($1)
5491
  _LT_COMPILER_C_O($1)
5492
  _LT_COMPILER_FILE_LOCKS($1)
5493
  _LT_LINKER_SHLIBS($1)
5494
  _LT_SYS_DYNAMIC_LINKER($1)
5495
  _LT_LINKER_HARDCODE_LIBPATH($1)
5496
  LT_SYS_DLOPEN_SELF
5497
  _LT_CMD_STRIPLIB
5498
5499
  # Report which library types will actually be built
5500
  AC_MSG_CHECKING([if libtool supports shared libraries])
5501
  AC_MSG_RESULT([$can_build_shared])
5502
5503
  AC_MSG_CHECKING([whether to build shared libraries])
5504
  test "$can_build_shared" = "no" && enable_shared=no
5505
5506
  # On AIX, shared libraries and static libraries use the same namespace, and
5507
  # are all built from PIC.
5508
  case $host_os in
5509
  aix3*)
5510
    test "$enable_shared" = yes && enable_static=no
5511
    if test -n "$RANLIB"; then
5512
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5513
      postinstall_cmds='$RANLIB $lib'
5514
    fi
5515
    ;;
5516
5517
  aix[[4-9]]*)
5518
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5519
      test "$enable_shared" = yes && enable_static=no
5520
    fi
5521
    ;;
5522
  esac
5523
  AC_MSG_RESULT([$enable_shared])
5524
5525
  AC_MSG_CHECKING([whether to build static libraries])
5526
  # Make sure either enable_shared or enable_static is yes.
5527
  test "$enable_shared" = yes || enable_static=yes
5528
  AC_MSG_RESULT([$enable_static])
5529
5530
  _LT_CONFIG($1)
5531
fi
5532
AC_LANG_POP
5533
CC="$lt_save_CC"
5534
])# _LT_LANG_C_CONFIG
5535
5536
5537
# _LT_PROG_CXX
5538
# ------------
5539
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5540
# compiler, we have our own version here.
5541
m4_defun([_LT_PROG_CXX],
5542
[
5543
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5544
AC_PROG_CXX
5545
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5546
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5547
    (test "X$CXX" != "Xg++"))) ; then
5548
  AC_PROG_CXXCPP
5549
else
5550
  _lt_caught_CXX_error=yes
5551
fi
5552
popdef([AC_MSG_ERROR])
5553
])# _LT_PROG_CXX
5554
5555
dnl aclocal-1.4 backwards compatibility:
5556
dnl AC_DEFUN([_LT_PROG_CXX], [])
5557
5558
5559
# _LT_LANG_CXX_CONFIG([TAG])
5560
# --------------------------
5561
# Ensure that the configuration variables for a C++ compiler are suitably
5562
# defined.  These variables are subsequently used by _LT_CONFIG to write
5563
# the compiler configuration to `libtool'.
5564
m4_defun([_LT_LANG_CXX_CONFIG],
5565
[AC_REQUIRE([_LT_PROG_CXX])dnl
5566
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5567
m4_require([_LT_DECL_EGREP])dnl
5568
5569
AC_LANG_PUSH(C++)
5570
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5571
_LT_TAGVAR(allow_undefined_flag, $1)=
5572
_LT_TAGVAR(always_export_symbols, $1)=no
5573
_LT_TAGVAR(archive_expsym_cmds, $1)=
5574
_LT_TAGVAR(compiler_needs_object, $1)=no
5575
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5576
_LT_TAGVAR(hardcode_direct, $1)=no
5577
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5578
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5579
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5580
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5581
_LT_TAGVAR(hardcode_minus_L, $1)=no
5582
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5583
_LT_TAGVAR(hardcode_automatic, $1)=no
5584
_LT_TAGVAR(inherit_rpath, $1)=no
5585
_LT_TAGVAR(module_cmds, $1)=
5586
_LT_TAGVAR(module_expsym_cmds, $1)=
5587
_LT_TAGVAR(link_all_deplibs, $1)=unknown
5588
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5589
_LT_TAGVAR(no_undefined_flag, $1)=
5590
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5591
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5592
5593
# Source file extension for C++ test sources.
5594
ac_ext=cpp
5595
5596
# Object file extension for compiled C++ test sources.
5597
objext=o
5598
_LT_TAGVAR(objext, $1)=$objext
5599
5600
# No sense in running all these tests if we already determined that
5601
# the CXX compiler isn't working.  Some variables (like enable_shared)
5602
# are currently assumed to apply to all compilers on this platform,
5603
# and will be corrupted by setting them based on a non-working compiler.
5604
if test "$_lt_caught_CXX_error" != yes; then
5605
  # Code to be used in simple compile tests
5606
  lt_simple_compile_test_code="int some_variable = 0;"
5607
5608
  # Code to be used in simple link tests
5609
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5610
5611
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5612
  _LT_TAG_COMPILER
5613
5614
  # save warnings/boilerplate of simple test code
5615
  _LT_COMPILER_BOILERPLATE
5616
  _LT_LINKER_BOILERPLATE
5617
5618
  # Allow CC to be a program name with arguments.
5619
  lt_save_CC=$CC
5620
  lt_save_LD=$LD
5621
  lt_save_GCC=$GCC
5622
  GCC=$GXX
5623
  lt_save_with_gnu_ld=$with_gnu_ld
5624
  lt_save_path_LD=$lt_cv_path_LD
5625
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5626
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5627
  else
5628
    $as_unset lt_cv_prog_gnu_ld
5629
  fi
5630
  if test -n "${lt_cv_path_LDCXX+set}"; then
5631
    lt_cv_path_LD=$lt_cv_path_LDCXX
5632
  else
5633
    $as_unset lt_cv_path_LD
5634
  fi
5635
  test -z "${LDCXX+set}" || LD=$LDCXX
5636
  CC=${CXX-"c++"}
5637
  compiler=$CC
5638
  _LT_TAGVAR(compiler, $1)=$CC
5639
  _LT_CC_BASENAME([$compiler])
5640
5641
  if test -n "$compiler"; then
5642
    # We don't want -fno-exception when compiling C++ code, so set the
5643
    # no_builtin_flag separately
5644
    if test "$GXX" = yes; then
5645
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5646
    else
5647
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5648
    fi
5649
5650
    if test "$GXX" = yes; then
5651
      # Set up default GNU C++ configuration
5652
5653
      LT_PATH_LD
5654
5655
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5656
      # archiving commands below assume that GNU ld is being used.
5657
      if test "$with_gnu_ld" = yes; then
5658
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5659
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5660
5661
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5662
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5663
5664
        # If archive_cmds runs LD, not CC, wlarc should be empty
5665
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5666
        #     investigate it a little bit more. (MM)
5667
        wlarc='${wl}'
5668
5669
        # ancient GNU ld didn't support --whole-archive et. al.
5670
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5671
	  $GREP 'no-whole-archive' > /dev/null; then
5672
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5673
        else
5674
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5675
        fi
5676
      else
5677
        with_gnu_ld=no
5678
        wlarc=
5679
5680
        # A generic and very simple default shared library creation
5681
        # command for GNU C++ for the case where it uses the native
5682
        # linker, instead of GNU ld.  If possible, this setting should
5683
        # overridden to take advantage of the native linker features on
5684
        # the platform it is being used on.
5685
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5686
      fi
5687
5688
      # Commands to make compiler produce verbose output that lists
5689
      # what "hidden" libraries, object files and flags are used when
5690
      # linking a shared library.
5691
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5692
5693
    else
5694
      GXX=no
5695
      with_gnu_ld=no
5696
      wlarc=
5697
    fi
5698
5699
    # PORTME: fill in a description of your system's C++ link characteristics
5700
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5701
    _LT_TAGVAR(ld_shlibs, $1)=yes
5702
    case $host_os in
5703
      aix3*)
5704
        # FIXME: insert proper C++ library support
5705
        _LT_TAGVAR(ld_shlibs, $1)=no
5706
        ;;
5707
      aix[[4-9]]*)
5708
        if test "$host_cpu" = ia64; then
5709
          # On IA64, the linker does run time linking by default, so we don't
5710
          # have to do anything special.
5711
          aix_use_runtimelinking=no
5712
          exp_sym_flag='-Bexport'
5713
          no_entry_flag=""
5714
        else
5715
          aix_use_runtimelinking=no
5716
5717
          # Test if we are trying to use run time linking or normal
5718
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5719
          # need to do runtime linking.
5720
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5721
	    for ld_flag in $LDFLAGS; do
5722
	      case $ld_flag in
5723
	      *-brtl*)
5724
	        aix_use_runtimelinking=yes
5725
	        break
5726
	        ;;
5727
	      esac
5728
	    done
5729
	    ;;
5730
          esac
5731
5732
          exp_sym_flag='-bexport'
5733
          no_entry_flag='-bnoentry'
5734
        fi
5735
5736
        # When large executables or shared objects are built, AIX ld can
5737
        # have problems creating the table of contents.  If linking a library
5738
        # or program results in "error TOC overflow" add -mminimal-toc to
5739
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5740
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5741
5742
        _LT_TAGVAR(archive_cmds, $1)=''
5743
        _LT_TAGVAR(hardcode_direct, $1)=yes
5744
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5745
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5746
        _LT_TAGVAR(link_all_deplibs, $1)=yes
5747
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5748
5749
        if test "$GXX" = yes; then
5750
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
5751
          # We only want to do this on AIX 4.2 and lower, the check
5752
          # below for broken collect2 doesn't work under 4.3+
5753
	  collect2name=`${CC} -print-prog-name=collect2`
5754
	  if test -f "$collect2name" &&
5755
	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5756
	  then
5757
	    # We have reworked collect2
5758
	    :
5759
	  else
5760
	    # We have old collect2
5761
	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
5762
	    # It fails to find uninstalled libraries when the uninstalled
5763
	    # path is not listed in the libpath.  Setting hardcode_minus_L
5764
	    # to unsupported forces relinking
5765
	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
5766
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5767
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
5768
	  fi
5769
          esac
5770
          shared_flag='-shared'
5771
	  if test "$aix_use_runtimelinking" = yes; then
5772
	    shared_flag="$shared_flag "'${wl}-G'
5773
	  fi
5774
        else
5775
          # not using gcc
5776
          if test "$host_cpu" = ia64; then
5777
	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5778
	  # chokes on -Wl,-G. The following line is correct:
5779
	  shared_flag='-G'
5780
          else
5781
	    if test "$aix_use_runtimelinking" = yes; then
5782
	      shared_flag='${wl}-G'
5783
	    else
5784
	      shared_flag='${wl}-bM:SRE'
5785
	    fi
5786
          fi
5787
        fi
5788
5789
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5790
        # It seems that -bexpall does not export symbols beginning with
5791
        # underscore (_), so it is better to generate a list of symbols to
5792
	# export.
5793
        _LT_TAGVAR(always_export_symbols, $1)=yes
5794
        if test "$aix_use_runtimelinking" = yes; then
5795
          # Warning - without using the other runtime loading flags (-brtl),
5796
          # -berok will link without error, but may produce a broken library.
5797
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5798
          # Determine the default libpath from the value encoded in an empty
5799
          # executable.
5800
          _LT_SYS_MODULE_PATH_AIX
5801
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5802
5803
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5804
        else
5805
          if test "$host_cpu" = ia64; then
5806
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5807
	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5808
	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5809
          else
5810
	    # Determine the default libpath from the value encoded in an
5811
	    # empty executable.
5812
	    _LT_SYS_MODULE_PATH_AIX
5813
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5814
	    # Warning - without using the other run time loading flags,
5815
	    # -berok will link without error, but may produce a broken library.
5816
	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5817
	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5818
	    # Exported symbols can be pulled into shared objects from archives
5819
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5820
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5821
	    # This is similar to how AIX traditionally builds its shared
5822
	    # libraries.
5823
	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5824
          fi
5825
        fi
5826
        ;;
5827
5828
      beos*)
5829
	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5830
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5831
	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5832
	  # support --undefined.  This deserves some investigation.  FIXME
5833
	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5834
	else
5835
	  _LT_TAGVAR(ld_shlibs, $1)=no
5836
	fi
5837
	;;
5838
5839
      chorus*)
5840
        case $cc_basename in
5841
          *)
5842
	  # FIXME: insert proper C++ library support
5843
	  _LT_TAGVAR(ld_shlibs, $1)=no
5844
	  ;;
5845
        esac
5846
        ;;
5847
5848
      cygwin* | mingw* | pw32* | cegcc*)
5849
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5850
        # as there is no search path for DLLs.
5851
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5852
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5853
        _LT_TAGVAR(always_export_symbols, $1)=no
5854
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5855
5856
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5857
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5858
          # If the export-symbols file already is a .def file (1st line
5859
          # is EXPORTS), use it as is; otherwise, prepend...
5860
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5861
	    cp $export_symbols $output_objdir/$soname.def;
5862
          else
5863
	    echo EXPORTS > $output_objdir/$soname.def;
5864
	    cat $export_symbols >> $output_objdir/$soname.def;
5865
          fi~
5866
          $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'
5867
        else
5868
          _LT_TAGVAR(ld_shlibs, $1)=no
5869
        fi
5870
        ;;
5871
      darwin* | rhapsody*)
5872
        _LT_DARWIN_LINKER_FEATURES($1)
5873
	;;
5874
5875
      dgux*)
5876
        case $cc_basename in
5877
          ec++*)
5878
	    # FIXME: insert proper C++ library support
5879
	    _LT_TAGVAR(ld_shlibs, $1)=no
5880
	    ;;
5881
          ghcx*)
5882
	    # Green Hills C++ Compiler
5883
	    # FIXME: insert proper C++ library support
5884
	    _LT_TAGVAR(ld_shlibs, $1)=no
5885
	    ;;
5886
          *)
5887
	    # FIXME: insert proper C++ library support
5888
	    _LT_TAGVAR(ld_shlibs, $1)=no
5889
	    ;;
5890
        esac
5891
        ;;
5892
5893
      freebsd[[12]]*)
5894
        # C++ shared libraries reported to be fairly broken before
5895
	# switch to ELF
5896
        _LT_TAGVAR(ld_shlibs, $1)=no
5897
        ;;
5898
5899
      freebsd-elf*)
5900
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5901
        ;;
5902
5903
      freebsd* | dragonfly*)
5904
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5905
        # conventions
5906
        _LT_TAGVAR(ld_shlibs, $1)=yes
5907
        ;;
5908
5909
      gnu*)
5910
        ;;
5911
5912
      hpux9*)
5913
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5914
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5915
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5916
        _LT_TAGVAR(hardcode_direct, $1)=yes
5917
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5918
				             # but as the default
5919
				             # location of the library.
5920
5921
        case $cc_basename in
5922
          CC*)
5923
            # FIXME: insert proper C++ library support
5924
            _LT_TAGVAR(ld_shlibs, $1)=no
5925
            ;;
5926
          aCC*)
5927
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5928
            # Commands to make compiler produce verbose output that lists
5929
            # what "hidden" libraries, object files and flags are used when
5930
            # linking a shared library.
5931
            #
5932
            # There doesn't appear to be a way to prevent this compiler from
5933
            # explicitly linking system object files so we need to strip them
5934
            # from the output so that they don't get included in the library
5935
            # dependencies.
5936
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5937
            ;;
5938
          *)
5939
            if test "$GXX" = yes; then
5940
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5941
            else
5942
              # FIXME: insert proper C++ library support
5943
              _LT_TAGVAR(ld_shlibs, $1)=no
5944
            fi
5945
            ;;
5946
        esac
5947
        ;;
5948
5949
      hpux10*|hpux11*)
5950
        if test $with_gnu_ld = no; then
5951
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5952
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5953
5954
          case $host_cpu in
5955
            hppa*64*|ia64*)
5956
              ;;
5957
            *)
5958
	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5959
              ;;
5960
          esac
5961
        fi
5962
        case $host_cpu in
5963
          hppa*64*|ia64*)
5964
            _LT_TAGVAR(hardcode_direct, $1)=no
5965
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5966
            ;;
5967
          *)
5968
            _LT_TAGVAR(hardcode_direct, $1)=yes
5969
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5970
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5971
					         # but as the default
5972
					         # location of the library.
5973
            ;;
5974
        esac
5975
5976
        case $cc_basename in
5977
          CC*)
5978
	    # FIXME: insert proper C++ library support
5979
	    _LT_TAGVAR(ld_shlibs, $1)=no
5980
	    ;;
5981
          aCC*)
5982
	    case $host_cpu in
5983
	      hppa*64*)
5984
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5985
	        ;;
5986
	      ia64*)
5987
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5988
	        ;;
5989
	      *)
5990
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5991
	        ;;
5992
	    esac
5993
	    # Commands to make compiler produce verbose output that lists
5994
	    # what "hidden" libraries, object files and flags are used when
5995
	    # linking a shared library.
5996
	    #
5997
	    # There doesn't appear to be a way to prevent this compiler from
5998
	    # explicitly linking system object files so we need to strip them
5999
	    # from the output so that they don't get included in the library
6000
	    # dependencies.
6001
	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6002
	    ;;
6003
          *)
6004
	    if test "$GXX" = yes; then
6005
	      if test $with_gnu_ld = no; then
6006
	        case $host_cpu in
6007
	          hppa*64*)
6008
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6009
	            ;;
6010
	          ia64*)
6011
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6012
	            ;;
6013
	          *)
6014
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6015
	            ;;
6016
	        esac
6017
	      fi
6018
	    else
6019
	      # FIXME: insert proper C++ library support
6020
	      _LT_TAGVAR(ld_shlibs, $1)=no
6021
	    fi
6022
	    ;;
6023
        esac
6024
        ;;
6025
6026
      interix[[3-9]]*)
6027
	_LT_TAGVAR(hardcode_direct, $1)=no
6028
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6029
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6030
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6031
	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6032
	# Instead, shared libraries are loaded at an image base (0x10000000 by
6033
	# default) and relocated if they conflict, which is a slow very memory
6034
	# consuming and fragmenting process.  To avoid this, we pick a random,
6035
	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6036
	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6037
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6038
	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6039
	;;
6040
      irix5* | irix6*)
6041
        case $cc_basename in
6042
          CC*)
6043
	    # SGI C++
6044
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6045
6046
	    # Archives containing C++ object files must be created using
6047
	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6048
	    # necessary to make sure instantiated templates are included
6049
	    # in the archive.
6050
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6051
	    ;;
6052
          *)
6053
	    if test "$GXX" = yes; then
6054
	      if test "$with_gnu_ld" = no; then
6055
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6056
	      else
6057
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
6058
	      fi
6059
	    fi
6060
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6061
	    ;;
6062
        esac
6063
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6064
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6065
        _LT_TAGVAR(inherit_rpath, $1)=yes
6066
        ;;
6067
6068
      linux* | k*bsd*-gnu)
6069
        case $cc_basename in
6070
          KCC*)
6071
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6072
6073
	    # KCC will only create a shared library if the output file
6074
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6075
	    # to its proper name (with version) after linking.
6076
	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6077
	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6078
	    # Commands to make compiler produce verbose output that lists
6079
	    # what "hidden" libraries, object files and flags are used when
6080
	    # linking a shared library.
6081
	    #
6082
	    # There doesn't appear to be a way to prevent this compiler from
6083
	    # explicitly linking system object files so we need to strip them
6084
	    # from the output so that they don't get included in the library
6085
	    # dependencies.
6086
	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6087
6088
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6089
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6090
6091
	    # Archives containing C++ object files must be created using
6092
	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6093
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6094
	    ;;
6095
	  icpc* | ecpc* )
6096
	    # Intel C++
6097
	    with_gnu_ld=yes
6098
	    # version 8.0 and above of icpc choke on multiply defined symbols
6099
	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6100
	    # earlier do not add the objects themselves.
6101
	    case `$CC -V 2>&1` in
6102
	      *"Version 7."*)
6103
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6104
		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6105
		;;
6106
	      *)  # Version 8.0 or newer
6107
	        tmp_idyn=
6108
	        case $host_cpu in
6109
		  ia64*) tmp_idyn=' -i_dynamic';;
6110
		esac
6111
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6112
		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6113
		;;
6114
	    esac
6115
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6116
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6117
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6118
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6119
	    ;;
6120
          pgCC* | pgcpp*)
6121
            # Portland Group C++ compiler
6122
	    case `$CC -V` in
6123
	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6124
	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6125
		rm -rf $tpldir~
6126
		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6127
		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6128
	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6129
		rm -rf $tpldir~
6130
		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6131
		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6132
		$RANLIB $oldlib'
6133
	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6134
		rm -rf $tpldir~
6135
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6136
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6137
	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6138
		rm -rf $tpldir~
6139
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6140
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6141
	      ;;
6142
	    *) # Version 6 will use weak symbols
6143
	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6144
	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6145
	      ;;
6146
	    esac
6147
6148
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6149
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6150
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6151
            ;;
6152
	  cxx*)
6153
	    # Compaq C++
6154
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6155
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6156
6157
	    runpath_var=LD_RUN_PATH
6158
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6159
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6160
6161
	    # Commands to make compiler produce verbose output that lists
6162
	    # what "hidden" libraries, object files and flags are used when
6163
	    # linking a shared library.
6164
	    #
6165
	    # There doesn't appear to be a way to prevent this compiler from
6166
	    # explicitly linking system object files so we need to strip them
6167
	    # from the output so that they don't get included in the library
6168
	    # dependencies.
6169
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6170
	    ;;
6171
	  xl*)
6172
	    # IBM XL 8.0 on PPC, with GNU ld
6173
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6174
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6175
	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6176
	    if test "x$supports_anon_versioning" = xyes; then
6177
	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6178
		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6179
		echo "local: *; };" >> $output_objdir/$libname.ver~
6180
		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6181
	    fi
6182
	    ;;
6183
	  *)
6184
	    case `$CC -V 2>&1 | sed 5q` in
6185
	    *Sun\ C*)
6186
	      # Sun C++ 5.9
6187
	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6188
	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6189
	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6190
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6191
	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6192
	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6193
6194
	      # Not sure whether something based on
6195
	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6196
	      # would be better.
6197
	      output_verbose_link_cmd='echo'
6198
6199
	      # Archives containing C++ object files must be created using
6200
	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6201
	      # necessary to make sure instantiated templates are included
6202
	      # in the archive.
6203
	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6204
	      ;;
6205
	    esac
6206
	    ;;
6207
	esac
6208
	;;
6209
6210
      lynxos*)
6211
        # FIXME: insert proper C++ library support
6212
	_LT_TAGVAR(ld_shlibs, $1)=no
6213
	;;
6214
6215
      m88k*)
6216
        # FIXME: insert proper C++ library support
6217
        _LT_TAGVAR(ld_shlibs, $1)=no
6218
	;;
6219
6220
      mvs*)
6221
        case $cc_basename in
6222
          cxx*)
6223
	    # FIXME: insert proper C++ library support
6224
	    _LT_TAGVAR(ld_shlibs, $1)=no
6225
	    ;;
6226
	  *)
6227
	    # FIXME: insert proper C++ library support
6228
	    _LT_TAGVAR(ld_shlibs, $1)=no
6229
	    ;;
6230
	esac
6231
	;;
6232
6233
      netbsd*)
6234
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6235
	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6236
	  wlarc=
6237
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6238
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6239
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6240
	fi
6241
	# Workaround some broken pre-1.5 toolchains
6242
	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6243
	;;
6244
6245
      *nto* | *qnx*)
6246
        _LT_TAGVAR(ld_shlibs, $1)=yes
6247
	;;
6248
6249
      openbsd2*)
6250
        # C++ shared libraries are fairly broken
6251
	_LT_TAGVAR(ld_shlibs, $1)=no
6252
	;;
6253
6254
      openbsd*)
6255
	if test -f /usr/libexec/ld.so; then
6256
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6257
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6258
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6259
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6260
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6261
	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6262
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6263
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6264
	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6265
	  fi
6266
	  output_verbose_link_cmd=echo
6267
	else
6268
	  _LT_TAGVAR(ld_shlibs, $1)=no
6269
	fi
6270
	;;
6271
6272
      osf3* | osf4* | osf5*)
6273
        case $cc_basename in
6274
          KCC*)
6275
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6276
6277
	    # KCC will only create a shared library if the output file
6278
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6279
	    # to its proper name (with version) after linking.
6280
	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6281
6282
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6283
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6284
6285
	    # Archives containing C++ object files must be created using
6286
	    # the KAI C++ compiler.
6287
	    case $host in
6288
	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6289
	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6290
	    esac
6291
	    ;;
6292
          RCC*)
6293
	    # Rational C++ 2.4.1
6294
	    # FIXME: insert proper C++ library support
6295
	    _LT_TAGVAR(ld_shlibs, $1)=no
6296
	    ;;
6297
          cxx*)
6298
	    case $host in
6299
	      osf3*)
6300
	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6301
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6302
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6303
		;;
6304
	      *)
6305
	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6306
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6307
	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6308
	          echo "-hidden">> $lib.exp~
6309
	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6310
	          $RM $lib.exp'
6311
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6312
		;;
6313
	    esac
6314
6315
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6316
6317
	    # Commands to make compiler produce verbose output that lists
6318
	    # what "hidden" libraries, object files and flags are used when
6319
	    # linking a shared library.
6320
	    #
6321
	    # There doesn't appear to be a way to prevent this compiler from
6322
	    # explicitly linking system object files so we need to strip them
6323
	    # from the output so that they don't get included in the library
6324
	    # dependencies.
6325
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6326
	    ;;
6327
	  *)
6328
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6329
	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6330
	      case $host in
6331
	        osf3*)
6332
	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6333
		  ;;
6334
	        *)
6335
	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6336
		  ;;
6337
	      esac
6338
6339
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6340
	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6341
6342
	      # Commands to make compiler produce verbose output that lists
6343
	      # what "hidden" libraries, object files and flags are used when
6344
	      # linking a shared library.
6345
	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6346
6347
	    else
6348
	      # FIXME: insert proper C++ library support
6349
	      _LT_TAGVAR(ld_shlibs, $1)=no
6350
	    fi
6351
	    ;;
6352
        esac
6353
        ;;
6354
6355
      psos*)
6356
        # FIXME: insert proper C++ library support
6357
        _LT_TAGVAR(ld_shlibs, $1)=no
6358
        ;;
6359
6360
      sunos4*)
6361
        case $cc_basename in
6362
          CC*)
6363
	    # Sun C++ 4.x
6364
	    # FIXME: insert proper C++ library support
6365
	    _LT_TAGVAR(ld_shlibs, $1)=no
6366
	    ;;
6367
          lcc*)
6368
	    # Lucid
6369
	    # FIXME: insert proper C++ library support
6370
	    _LT_TAGVAR(ld_shlibs, $1)=no
6371
	    ;;
6372
          *)
6373
	    # FIXME: insert proper C++ library support
6374
	    _LT_TAGVAR(ld_shlibs, $1)=no
6375
	    ;;
6376
        esac
6377
        ;;
6378
6379
      solaris*)
6380
        case $cc_basename in
6381
          CC*)
6382
	    # Sun C++ 4.2, 5.x and Centerline C++
6383
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6384
	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6385
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6386
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6387
	      $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'
6388
6389
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6390
	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6391
	    case $host_os in
6392
	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6393
	      *)
6394
		# The compiler driver will combine and reorder linker options,
6395
		# but understands `-z linker_flag'.
6396
	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6397
		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6398
	        ;;
6399
	    esac
6400
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6401
6402
	    output_verbose_link_cmd='echo'
6403
6404
	    # Archives containing C++ object files must be created using
6405
	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6406
	    # necessary to make sure instantiated templates are included
6407
	    # in the archive.
6408
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6409
	    ;;
6410
          gcx*)
6411
	    # Green Hills C++ Compiler
6412
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6413
6414
	    # The C++ compiler must be used to create the archive.
6415
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6416
	    ;;
6417
          *)
6418
	    # GNU C++ compiler with Solaris linker
6419
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6420
	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6421
	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6422
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6423
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6424
		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6425
6426
	        # Commands to make compiler produce verbose output that lists
6427
	        # what "hidden" libraries, object files and flags are used when
6428
	        # linking a shared library.
6429
	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6430
	      else
6431
	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6432
	        # platform.
6433
	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6434
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6435
		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6436
6437
	        # Commands to make compiler produce verbose output that lists
6438
	        # what "hidden" libraries, object files and flags are used when
6439
	        # linking a shared library.
6440
	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6441
	      fi
6442
6443
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6444
	      case $host_os in
6445
		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6446
		*)
6447
		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6448
		  ;;
6449
	      esac
6450
	    fi
6451
	    ;;
6452
        esac
6453
        ;;
6454
6455
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6456
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6457
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6458
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6459
      runpath_var='LD_RUN_PATH'
6460
6461
      case $cc_basename in
6462
        CC*)
6463
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6464
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6465
	  ;;
6466
	*)
6467
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6468
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6469
	  ;;
6470
      esac
6471
      ;;
6472
6473
      sysv5* | sco3.2v5* | sco5v6*)
6474
	# Note: We can NOT use -z defs as we might desire, because we do not
6475
	# link with -lc, and that would cause any symbols used from libc to
6476
	# always be unresolved, which means just about no library would
6477
	# ever link correctly.  If we're not using GNU ld we use -z text
6478
	# though, which does catch some bad symbols but isn't as heavy-handed
6479
	# as -z defs.
6480
	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6481
	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6482
	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6483
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6484
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6485
	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6486
	_LT_TAGVAR(link_all_deplibs, $1)=yes
6487
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6488
	runpath_var='LD_RUN_PATH'
6489
6490
	case $cc_basename in
6491
          CC*)
6492
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6493
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6494
	    ;;
6495
	  *)
6496
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6497
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6498
	    ;;
6499
	esac
6500
      ;;
6501
6502
      tandem*)
6503
        case $cc_basename in
6504
          NCC*)
6505
	    # NonStop-UX NCC 3.20
6506
	    # FIXME: insert proper C++ library support
6507
	    _LT_TAGVAR(ld_shlibs, $1)=no
6508
	    ;;
6509
          *)
6510
	    # FIXME: insert proper C++ library support
6511
	    _LT_TAGVAR(ld_shlibs, $1)=no
6512
	    ;;
6513
        esac
6514
        ;;
6515
6516
      vxworks*)
6517
        # FIXME: insert proper C++ library support
6518
        _LT_TAGVAR(ld_shlibs, $1)=no
6519
        ;;
6520
6521
      *)
6522
        # FIXME: insert proper C++ library support
6523
        _LT_TAGVAR(ld_shlibs, $1)=no
6524
        ;;
6525
    esac
6526
6527
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6528
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6529
6530
    _LT_TAGVAR(GCC, $1)="$GXX"
6531
    _LT_TAGVAR(LD, $1)="$LD"
6532
6533
    ## CAVEAT EMPTOR:
6534
    ## There is no encapsulation within the following macros, do not change
6535
    ## the running order or otherwise move them around unless you know exactly
6536
    ## what you are doing...
6537
    _LT_SYS_HIDDEN_LIBDEPS($1)
6538
    _LT_COMPILER_PIC($1)
6539
    _LT_COMPILER_C_O($1)
6540
    _LT_COMPILER_FILE_LOCKS($1)
6541
    _LT_LINKER_SHLIBS($1)
6542
    _LT_SYS_DYNAMIC_LINKER($1)
6543
    _LT_LINKER_HARDCODE_LIBPATH($1)
6544
6545
    _LT_CONFIG($1)
6546
  fi # test -n "$compiler"
6547
6548
  CC=$lt_save_CC
6549
  LDCXX=$LD
6550
  LD=$lt_save_LD
6551
  GCC=$lt_save_GCC
6552
  with_gnu_ld=$lt_save_with_gnu_ld
6553
  lt_cv_path_LDCXX=$lt_cv_path_LD
6554
  lt_cv_path_LD=$lt_save_path_LD
6555
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6556
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6557
fi # test "$_lt_caught_CXX_error" != yes
6558
6559
AC_LANG_POP
6560
])# _LT_LANG_CXX_CONFIG
6561
6562
6563
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6564
# ---------------------------------
6565
# Figure out "hidden" library dependencies from verbose
6566
# compiler output when linking a shared library.
6567
# Parse the compiler output and extract the necessary
6568
# objects, libraries and library flags.
6569
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6570
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6571
# Dependencies to place before and after the object being linked:
6572
_LT_TAGVAR(predep_objects, $1)=
6573
_LT_TAGVAR(postdep_objects, $1)=
6574
_LT_TAGVAR(predeps, $1)=
6575
_LT_TAGVAR(postdeps, $1)=
6576
_LT_TAGVAR(compiler_lib_search_path, $1)=
6577
6578
dnl we can't use the lt_simple_compile_test_code here,
6579
dnl because it contains code intended for an executable,
6580
dnl not a library.  It's possible we should let each
6581
dnl tag define a new lt_????_link_test_code variable,
6582
dnl but it's only used here...
6583
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6584
int a;
6585
void foo (void) { a = 0; }
6586
_LT_EOF
6587
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6588
class Foo
6589
{
6590
public:
6591
  Foo (void) { a = 0; }
6592
private:
6593
  int a;
6594
};
6595
_LT_EOF
6596
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6597
      subroutine foo
6598
      implicit none
6599
      integer*4 a
6600
      a=0
6601
      return
6602
      end
6603
_LT_EOF
6604
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6605
      subroutine foo
6606
      implicit none
6607
      integer a
6608
      a=0
6609
      return
6610
      end
6611
_LT_EOF
6612
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6613
public class foo {
6614
  private int a;
6615
  public void bar (void) {
6616
    a = 0;
6617
  }
6618
};
6619
_LT_EOF
6620
])
6621
dnl Parse the compiler output and extract the necessary
6622
dnl objects, libraries and library flags.
6623
if AC_TRY_EVAL(ac_compile); then
6624
  # Parse the compiler output and extract the necessary
6625
  # objects, libraries and library flags.
6626
6627
  # Sentinel used to keep track of whether or not we are before
6628
  # the conftest object file.
6629
  pre_test_object_deps_done=no
6630
6631
  for p in `eval "$output_verbose_link_cmd"`; do
6632
    case $p in
6633
6634
    -L* | -R* | -l*)
6635
       # Some compilers place space between "-{L,R}" and the path.
6636
       # Remove the space.
6637
       if test $p = "-L" ||
6638
          test $p = "-R"; then
6639
	 prev=$p
6640
	 continue
6641
       else
6642
	 prev=
6643
       fi
6644
6645
       if test "$pre_test_object_deps_done" = no; then
6646
	 case $p in
6647
	 -L* | -R*)
6648
	   # Internal compiler library paths should come after those
6649
	   # provided the user.  The postdeps already come after the
6650
	   # user supplied libs so there is no need to process them.
6651
	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6652
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6653
	   else
6654
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6655
	   fi
6656
	   ;;
6657
	 # The "-l" case would never come before the object being
6658
	 # linked, so don't bother handling this case.
6659
	 esac
6660
       else
6661
	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6662
	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6663
	 else
6664
	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6665
	 fi
6666
       fi
6667
       ;;
6668
6669
    *.$objext)
6670
       # This assumes that the test object file only shows up
6671
       # once in the compiler output.
6672
       if test "$p" = "conftest.$objext"; then
6673
	 pre_test_object_deps_done=yes
6674
	 continue
6675
       fi
6676
6677
       if test "$pre_test_object_deps_done" = no; then
6678
	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6679
	   _LT_TAGVAR(predep_objects, $1)="$p"
6680
	 else
6681
	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6682
	 fi
6683
       else
6684
	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6685
	   _LT_TAGVAR(postdep_objects, $1)="$p"
6686
	 else
6687
	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6688
	 fi
6689
       fi
6690
       ;;
6691
6692
    *) ;; # Ignore the rest.
6693
6694
    esac
6695
  done
6696
6697
  # Clean up.
6698
  rm -f a.out a.exe
6699
else
6700
  echo "libtool.m4: error: problem compiling $1 test program"
6701
fi
6702
6703
$RM -f confest.$objext
6704
6705
# PORTME: override above test on systems where it is broken
6706
m4_if([$1], [CXX],
6707
[case $host_os in
6708
interix[[3-9]]*)
6709
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
6710
  # hack all around it, let's just trust "g++" to DTRT.
6711
  _LT_TAGVAR(predep_objects,$1)=
6712
  _LT_TAGVAR(postdep_objects,$1)=
6713
  _LT_TAGVAR(postdeps,$1)=
6714
  ;;
6715
6716
linux*)
6717
  case `$CC -V 2>&1 | sed 5q` in
6718
  *Sun\ C*)
6719
    # Sun C++ 5.9
6720
6721
    # The more standards-conforming stlport4 library is
6722
    # incompatible with the Cstd library. Avoid specifying
6723
    # it if it's in CXXFLAGS. Ignore libCrun as
6724
    # -library=stlport4 depends on it.
6725
    case " $CXX $CXXFLAGS " in
6726
    *" -library=stlport4 "*)
6727
      solaris_use_stlport4=yes
6728
      ;;
6729
    esac
6730
6731
    if test "$solaris_use_stlport4" != yes; then
6732
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6733
    fi
6734
    ;;
6735
  esac
6736
  ;;
6737
6738
solaris*)
6739
  case $cc_basename in
6740
  CC*)
6741
    # The more standards-conforming stlport4 library is
6742
    # incompatible with the Cstd library. Avoid specifying
6743
    # it if it's in CXXFLAGS. Ignore libCrun as
6744
    # -library=stlport4 depends on it.
6745
    case " $CXX $CXXFLAGS " in
6746
    *" -library=stlport4 "*)
6747
      solaris_use_stlport4=yes
6748
      ;;
6749
    esac
6750
6751
    # Adding this requires a known-good setup of shared libraries for
6752
    # Sun compiler versions before 5.6, else PIC objects from an old
6753
    # archive will be linked into the output, leading to subtle bugs.
6754
    if test "$solaris_use_stlport4" != yes; then
6755
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6756
    fi
6757
    ;;
6758
  esac
6759
  ;;
6760
esac
6761
])
6762
6763
case " $_LT_TAGVAR(postdeps, $1) " in
6764
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6765
esac
6766
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6767
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6768
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6769
fi
6770
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6771
    [The directories searched by this compiler when creating a shared library])
6772
_LT_TAGDECL([], [predep_objects], [1],
6773
    [Dependencies to place before and after the objects being linked to
6774
    create a shared library])
6775
_LT_TAGDECL([], [postdep_objects], [1])
6776
_LT_TAGDECL([], [predeps], [1])
6777
_LT_TAGDECL([], [postdeps], [1])
6778
_LT_TAGDECL([], [compiler_lib_search_path], [1],
6779
    [The library search path used internally by the compiler when linking
6780
    a shared library])
6781
])# _LT_SYS_HIDDEN_LIBDEPS
6782
6783
6784
# _LT_PROG_F77
6785
# ------------
6786
# Since AC_PROG_F77 is broken, in that it returns the empty string
6787
# if there is no fortran compiler, we have our own version here.
6788
m4_defun([_LT_PROG_F77],
6789
[
6790
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6791
AC_PROG_F77
6792
if test -z "$F77" || test "X$F77" = "Xno"; then
6793
  _lt_disable_F77=yes
6794
fi
6795
popdef([AC_MSG_ERROR])
6796
])# _LT_PROG_F77
6797
6798
dnl aclocal-1.4 backwards compatibility:
6799
dnl AC_DEFUN([_LT_PROG_F77], [])
6800
6801
6802
# _LT_LANG_F77_CONFIG([TAG])
6803
# --------------------------
6804
# Ensure that the configuration variables for a Fortran 77 compiler are
6805
# suitably defined.  These variables are subsequently used by _LT_CONFIG
6806
# to write the compiler configuration to `libtool'.
6807
m4_defun([_LT_LANG_F77_CONFIG],
6808
[AC_REQUIRE([_LT_PROG_F77])dnl
6809
AC_LANG_PUSH(Fortran 77)
6810
6811
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6812
_LT_TAGVAR(allow_undefined_flag, $1)=
6813
_LT_TAGVAR(always_export_symbols, $1)=no
6814
_LT_TAGVAR(archive_expsym_cmds, $1)=
6815
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6816
_LT_TAGVAR(hardcode_direct, $1)=no
6817
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6818
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6819
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6820
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6821
_LT_TAGVAR(hardcode_minus_L, $1)=no
6822
_LT_TAGVAR(hardcode_automatic, $1)=no
6823
_LT_TAGVAR(inherit_rpath, $1)=no
6824
_LT_TAGVAR(module_cmds, $1)=
6825
_LT_TAGVAR(module_expsym_cmds, $1)=
6826
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6827
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6828
_LT_TAGVAR(no_undefined_flag, $1)=
6829
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6830
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6831
6832
# Source file extension for f77 test sources.
6833
ac_ext=f
6834
6835
# Object file extension for compiled f77 test sources.
6836
objext=o
6837
_LT_TAGVAR(objext, $1)=$objext
6838
6839
# No sense in running all these tests if we already determined that
6840
# the F77 compiler isn't working.  Some variables (like enable_shared)
6841
# are currently assumed to apply to all compilers on this platform,
6842
# and will be corrupted by setting them based on a non-working compiler.
6843
if test "$_lt_disable_F77" != yes; then
6844
  # Code to be used in simple compile tests
6845
  lt_simple_compile_test_code="\
6846
      subroutine t
6847
      return
6848
      end
6849
"
6850
6851
  # Code to be used in simple link tests
6852
  lt_simple_link_test_code="\
6853
      program t
6854
      end
6855
"
6856
6857
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6858
  _LT_TAG_COMPILER
6859
6860
  # save warnings/boilerplate of simple test code
6861
  _LT_COMPILER_BOILERPLATE
6862
  _LT_LINKER_BOILERPLATE
6863
6864
  # Allow CC to be a program name with arguments.
6865
  lt_save_CC="$CC"
6866
  lt_save_GCC=$GCC
6867
  CC=${F77-"f77"}
6868
  compiler=$CC
6869
  _LT_TAGVAR(compiler, $1)=$CC
6870
  _LT_CC_BASENAME([$compiler])
6871
  GCC=$G77
6872
  if test -n "$compiler"; then
6873
    AC_MSG_CHECKING([if libtool supports shared libraries])
6874
    AC_MSG_RESULT([$can_build_shared])
6875
6876
    AC_MSG_CHECKING([whether to build shared libraries])
6877
    test "$can_build_shared" = "no" && enable_shared=no
6878
6879
    # On AIX, shared libraries and static libraries use the same namespace, and
6880
    # are all built from PIC.
6881
    case $host_os in
6882
      aix3*)
6883
        test "$enable_shared" = yes && enable_static=no
6884
        if test -n "$RANLIB"; then
6885
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6886
          postinstall_cmds='$RANLIB $lib'
6887
        fi
6888
        ;;
6889
      aix[[4-9]]*)
6890
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6891
	  test "$enable_shared" = yes && enable_static=no
6892
	fi
6893
        ;;
6894
    esac
6895
    AC_MSG_RESULT([$enable_shared])
6896
6897
    AC_MSG_CHECKING([whether to build static libraries])
6898
    # Make sure either enable_shared or enable_static is yes.
6899
    test "$enable_shared" = yes || enable_static=yes
6900
    AC_MSG_RESULT([$enable_static])
6901
6902
    _LT_TAGVAR(GCC, $1)="$G77"
6903
    _LT_TAGVAR(LD, $1)="$LD"
6904
6905
    ## CAVEAT EMPTOR:
6906
    ## There is no encapsulation within the following macros, do not change
6907
    ## the running order or otherwise move them around unless you know exactly
6908
    ## what you are doing...
6909
    _LT_COMPILER_PIC($1)
6910
    _LT_COMPILER_C_O($1)
6911
    _LT_COMPILER_FILE_LOCKS($1)
6912
    _LT_LINKER_SHLIBS($1)
6913
    _LT_SYS_DYNAMIC_LINKER($1)
6914
    _LT_LINKER_HARDCODE_LIBPATH($1)
6915
6916
    _LT_CONFIG($1)
6917
  fi # test -n "$compiler"
6918
6919
  GCC=$lt_save_GCC
6920
  CC="$lt_save_CC"
6921
fi # test "$_lt_disable_F77" != yes
6922
6923
AC_LANG_POP
6924
])# _LT_LANG_F77_CONFIG
6925
6926
6927
# _LT_PROG_FC
6928
# -----------
6929
# Since AC_PROG_FC is broken, in that it returns the empty string
6930
# if there is no fortran compiler, we have our own version here.
6931
m4_defun([_LT_PROG_FC],
6932
[
6933
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6934
AC_PROG_FC
6935
if test -z "$FC" || test "X$FC" = "Xno"; then
6936
  _lt_disable_FC=yes
6937
fi
6938
popdef([AC_MSG_ERROR])
6939
])# _LT_PROG_FC
6940
6941
dnl aclocal-1.4 backwards compatibility:
6942
dnl AC_DEFUN([_LT_PROG_FC], [])
6943
6944
6945
# _LT_LANG_FC_CONFIG([TAG])
6946
# -------------------------
6947
# Ensure that the configuration variables for a Fortran compiler are
6948
# suitably defined.  These variables are subsequently used by _LT_CONFIG
6949
# to write the compiler configuration to `libtool'.
6950
m4_defun([_LT_LANG_FC_CONFIG],
6951
[AC_REQUIRE([_LT_PROG_FC])dnl
6952
AC_LANG_PUSH(Fortran)
6953
6954
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6955
_LT_TAGVAR(allow_undefined_flag, $1)=
6956
_LT_TAGVAR(always_export_symbols, $1)=no
6957
_LT_TAGVAR(archive_expsym_cmds, $1)=
6958
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6959
_LT_TAGVAR(hardcode_direct, $1)=no
6960
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6961
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6962
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6963
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6964
_LT_TAGVAR(hardcode_minus_L, $1)=no
6965
_LT_TAGVAR(hardcode_automatic, $1)=no
6966
_LT_TAGVAR(inherit_rpath, $1)=no
6967
_LT_TAGVAR(module_cmds, $1)=
6968
_LT_TAGVAR(module_expsym_cmds, $1)=
6969
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6970
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6971
_LT_TAGVAR(no_undefined_flag, $1)=
6972
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6973
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6974
6975
# Source file extension for fc test sources.
6976
ac_ext=${ac_fc_srcext-f}
6977
6978
# Object file extension for compiled fc test sources.
6979
objext=o
6980
_LT_TAGVAR(objext, $1)=$objext
6981
6982
# No sense in running all these tests if we already determined that
6983
# the FC compiler isn't working.  Some variables (like enable_shared)
6984
# are currently assumed to apply to all compilers on this platform,
6985
# and will be corrupted by setting them based on a non-working compiler.
6986
if test "$_lt_disable_FC" != yes; then
6987
  # Code to be used in simple compile tests
6988
  lt_simple_compile_test_code="\
6989
      subroutine t
6990
      return
6991
      end
6992
"
6993
6994
  # Code to be used in simple link tests
6995
  lt_simple_link_test_code="\
6996
      program t
6997
      end
6998
"
6999
7000
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7001
  _LT_TAG_COMPILER
7002
7003
  # save warnings/boilerplate of simple test code
7004
  _LT_COMPILER_BOILERPLATE
7005
  _LT_LINKER_BOILERPLATE
7006
7007
  # Allow CC to be a program name with arguments.
7008
  lt_save_CC="$CC"
7009
  lt_save_GCC=$GCC
7010
  CC=${FC-"f95"}
7011
  compiler=$CC
7012
  GCC=$ac_cv_fc_compiler_gnu
7013
7014
  _LT_TAGVAR(compiler, $1)=$CC
7015
  _LT_CC_BASENAME([$compiler])
7016
7017
  if test -n "$compiler"; then
7018
    AC_MSG_CHECKING([if libtool supports shared libraries])
7019
    AC_MSG_RESULT([$can_build_shared])
7020
7021
    AC_MSG_CHECKING([whether to build shared libraries])
7022
    test "$can_build_shared" = "no" && enable_shared=no
7023
7024
    # On AIX, shared libraries and static libraries use the same namespace, and
7025
    # are all built from PIC.
7026
    case $host_os in
7027
      aix3*)
7028
        test "$enable_shared" = yes && enable_static=no
7029
        if test -n "$RANLIB"; then
7030
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7031
          postinstall_cmds='$RANLIB $lib'
7032
        fi
7033
        ;;
7034
      aix[[4-9]]*)
7035
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7036
	  test "$enable_shared" = yes && enable_static=no
7037
	fi
7038
        ;;
7039
    esac
7040
    AC_MSG_RESULT([$enable_shared])
7041
7042
    AC_MSG_CHECKING([whether to build static libraries])
7043
    # Make sure either enable_shared or enable_static is yes.
7044
    test "$enable_shared" = yes || enable_static=yes
7045
    AC_MSG_RESULT([$enable_static])
7046
7047
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7048
    _LT_TAGVAR(LD, $1)="$LD"
7049
7050
    ## CAVEAT EMPTOR:
7051
    ## There is no encapsulation within the following macros, do not change
7052
    ## the running order or otherwise move them around unless you know exactly
7053
    ## what you are doing...
7054
    _LT_SYS_HIDDEN_LIBDEPS($1)
7055
    _LT_COMPILER_PIC($1)
7056
    _LT_COMPILER_C_O($1)
7057
    _LT_COMPILER_FILE_LOCKS($1)
7058
    _LT_LINKER_SHLIBS($1)
7059
    _LT_SYS_DYNAMIC_LINKER($1)
7060
    _LT_LINKER_HARDCODE_LIBPATH($1)
7061
7062
    _LT_CONFIG($1)
7063
  fi # test -n "$compiler"
7064
7065
  GCC=$lt_save_GCC
7066
  CC="$lt_save_CC"
7067
fi # test "$_lt_disable_FC" != yes
7068
7069
AC_LANG_POP
7070
])# _LT_LANG_FC_CONFIG
7071
7072
7073
# _LT_LANG_GCJ_CONFIG([TAG])
7074
# --------------------------
7075
# Ensure that the configuration variables for the GNU Java Compiler compiler
7076
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7077
# to write the compiler configuration to `libtool'.
7078
m4_defun([_LT_LANG_GCJ_CONFIG],
7079
[AC_REQUIRE([LT_PROG_GCJ])dnl
7080
AC_LANG_SAVE
7081
7082
# Source file extension for Java test sources.
7083
ac_ext=java
7084
7085
# Object file extension for compiled Java test sources.
7086
objext=o
7087
_LT_TAGVAR(objext, $1)=$objext
7088
7089
# Code to be used in simple compile tests
7090
lt_simple_compile_test_code="class foo {}"
7091
7092
# Code to be used in simple link tests
7093
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7094
7095
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7096
_LT_TAG_COMPILER
7097
7098
# save warnings/boilerplate of simple test code
7099
_LT_COMPILER_BOILERPLATE
7100
_LT_LINKER_BOILERPLATE
7101
7102
# Allow CC to be a program name with arguments.
7103
lt_save_CC="$CC"
7104
lt_save_GCC=$GCC
7105
GCC=yes
7106
CC=${GCJ-"gcj"}
7107
compiler=$CC
7108
_LT_TAGVAR(compiler, $1)=$CC
7109
_LT_TAGVAR(LD, $1)="$LD"
7110
_LT_CC_BASENAME([$compiler])
7111
7112
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7113
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7114
7115
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7116
7117
if test -n "$compiler"; then
7118
  _LT_COMPILER_NO_RTTI($1)
7119
  _LT_COMPILER_PIC($1)
7120
  _LT_COMPILER_C_O($1)
7121
  _LT_COMPILER_FILE_LOCKS($1)
7122
  _LT_LINKER_SHLIBS($1)
7123
  _LT_LINKER_HARDCODE_LIBPATH($1)
7124
7125
  _LT_CONFIG($1)
7126
fi
7127
7128
AC_LANG_RESTORE
7129
7130
GCC=$lt_save_GCC
7131
CC="$lt_save_CC"
7132
])# _LT_LANG_GCJ_CONFIG
7133
7134
7135
# _LT_LANG_RC_CONFIG([TAG])
7136
# -------------------------
7137
# Ensure that the configuration variables for the Windows resource compiler
7138
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7139
# to write the compiler configuration to `libtool'.
7140
m4_defun([_LT_LANG_RC_CONFIG],
7141
[AC_REQUIRE([LT_PROG_RC])dnl
7142
AC_LANG_SAVE
7143
7144
# Source file extension for RC test sources.
7145
ac_ext=rc
7146
7147
# Object file extension for compiled RC test sources.
7148
objext=o
7149
_LT_TAGVAR(objext, $1)=$objext
7150
7151
# Code to be used in simple compile tests
7152
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7153
7154
# Code to be used in simple link tests
7155
lt_simple_link_test_code="$lt_simple_compile_test_code"
7156
7157
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7158
_LT_TAG_COMPILER
7159
7160
# save warnings/boilerplate of simple test code
7161
_LT_COMPILER_BOILERPLATE
7162
_LT_LINKER_BOILERPLATE
7163
7164
# Allow CC to be a program name with arguments.
7165
lt_save_CC="$CC"
7166
lt_save_GCC=$GCC
7167
GCC=
7168
CC=${RC-"windres"}
7169
compiler=$CC
7170
_LT_TAGVAR(compiler, $1)=$CC
7171
_LT_CC_BASENAME([$compiler])
7172
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7173
7174
if test -n "$compiler"; then
7175
  :
7176
  _LT_CONFIG($1)
7177
fi
7178
7179
GCC=$lt_save_GCC
7180
AC_LANG_RESTORE
7181
CC="$lt_save_CC"
7182
])# _LT_LANG_RC_CONFIG
7183
7184
7185
# LT_PROG_GCJ
7186
# -----------
7187
AC_DEFUN([LT_PROG_GCJ],
7188
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7189
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7190
    [AC_CHECK_TOOL(GCJ, gcj,)
7191
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7192
      AC_SUBST(GCJFLAGS)])])[]dnl
7193
])
7194
7195
# Old name:
7196
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7197
dnl aclocal-1.4 backwards compatibility:
7198
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7199
7200
7201
# LT_PROG_RC
7202
# ----------
7203
AC_DEFUN([LT_PROG_RC],
7204
[AC_CHECK_TOOL(RC, windres,)
7205
])
7206
7207
# Old name:
7208
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7209
dnl aclocal-1.4 backwards compatibility:
7210
dnl AC_DEFUN([LT_AC_PROG_RC], [])
7211
7212
7213
# _LT_DECL_EGREP
7214
# --------------
7215
# If we don't have a new enough Autoconf to choose the best grep
7216
# available, choose the one first in the user's PATH.
7217
m4_defun([_LT_DECL_EGREP],
7218
[AC_REQUIRE([AC_PROG_EGREP])dnl
7219
AC_REQUIRE([AC_PROG_FGREP])dnl
7220
test -z "$GREP" && GREP=grep
7221
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7222
_LT_DECL([], [EGREP], [1], [An ERE matcher])
7223
_LT_DECL([], [FGREP], [1], [A literal string matcher])
7224
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7225
AC_SUBST([GREP])
7226
])
7227
7228
7229
# _LT_DECL_OBJDUMP
7230
# --------------
7231
# If we don't have a new enough Autoconf to choose the best objdump
7232
# available, choose the one first in the user's PATH.
7233
m4_defun([_LT_DECL_OBJDUMP],
7234
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7235
test -z "$OBJDUMP" && OBJDUMP=objdump
7236
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7237
AC_SUBST([OBJDUMP])
7238
])
7239
7240
7241
# _LT_DECL_SED
7242
# ------------
7243
# Check for a fully-functional sed program, that truncates
7244
# as few characters as possible.  Prefer GNU sed if found.
7245
m4_defun([_LT_DECL_SED],
7246
[AC_PROG_SED
7247
test -z "$SED" && SED=sed
7248
Xsed="$SED -e 1s/^X//"
7249
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7250
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7251
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7252
])# _LT_DECL_SED
7253
7254
m4_ifndef([AC_PROG_SED], [
7255
# NOTE: This macro has been submitted for inclusion into   #
7256
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7257
#  a released version of Autoconf we should remove this    #
7258
#  macro and use it instead.                               #
7259
7260
m4_defun([AC_PROG_SED],
7261
[AC_MSG_CHECKING([for a sed that does not truncate output])
7262
AC_CACHE_VAL(lt_cv_path_SED,
7263
[# Loop through the user's path and test for sed and gsed.
7264
# Then use that list of sed's as ones to test for truncation.
7265
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7266
for as_dir in $PATH
7267
do
7268
  IFS=$as_save_IFS
7269
  test -z "$as_dir" && as_dir=.
7270
  for lt_ac_prog in sed gsed; do
7271
    for ac_exec_ext in '' $ac_executable_extensions; do
7272
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7273
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7274
      fi
7275
    done
7276
  done
7277
done
7278
IFS=$as_save_IFS
7279
lt_ac_max=0
7280
lt_ac_count=0
7281
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7282
# along with /bin/sed that truncates output.
7283
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7284
  test ! -f $lt_ac_sed && continue
7285
  cat /dev/null > conftest.in
7286
  lt_ac_count=0
7287
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7288
  # Check for GNU sed and select it if it is found.
7289
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7290
    lt_cv_path_SED=$lt_ac_sed
7291
    break
7292
  fi
7293
  while true; do
7294
    cat conftest.in conftest.in >conftest.tmp
7295
    mv conftest.tmp conftest.in
7296
    cp conftest.in conftest.nl
7297
    echo >>conftest.nl
7298
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7299
    cmp -s conftest.out conftest.nl || break
7300
    # 10000 chars as input seems more than enough
7301
    test $lt_ac_count -gt 10 && break
7302
    lt_ac_count=`expr $lt_ac_count + 1`
7303
    if test $lt_ac_count -gt $lt_ac_max; then
7304
      lt_ac_max=$lt_ac_count
7305
      lt_cv_path_SED=$lt_ac_sed
7306
    fi
7307
  done
7308
done
7309
])
7310
SED=$lt_cv_path_SED
7311
AC_SUBST([SED])
7312
AC_MSG_RESULT([$SED])
7313
])#AC_PROG_SED
7314
])#m4_ifndef
7315
7316
# Old name:
7317
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7318
dnl aclocal-1.4 backwards compatibility:
7319
dnl AC_DEFUN([LT_AC_PROG_SED], [])
7320
7321
7322
# _LT_CHECK_SHELL_FEATURES
7323
# ------------------------
7324
# Find out whether the shell is Bourne or XSI compatible,
7325
# or has some other useful features.
7326
m4_defun([_LT_CHECK_SHELL_FEATURES],
7327
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7328
# Try some XSI features
7329
xsi_shell=no
7330
( _lt_dummy="a/b/c"
7331
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7332
      = c,a/b,, \
7333
    && eval 'test $(( 1 + 1 )) -eq 2 \
7334
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7335
  && xsi_shell=yes
7336
AC_MSG_RESULT([$xsi_shell])
7337
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7338
7339
AC_MSG_CHECKING([whether the shell understands "+="])
7340
lt_shell_append=no
7341
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7342
    >/dev/null 2>&1 \
7343
  && lt_shell_append=yes
7344
AC_MSG_RESULT([$lt_shell_append])
7345
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7346
7347
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7348
  lt_unset=unset
7349
else
7350
  lt_unset=false
7351
fi
7352
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7353
7354
# test EBCDIC or ASCII
7355
case `echo X|tr X '\101'` in
7356
 A) # ASCII based system
7357
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7358
  lt_SP2NL='tr \040 \012'
7359
  lt_NL2SP='tr \015\012 \040\040'
7360
  ;;
7361
 *) # EBCDIC based system
7362
  lt_SP2NL='tr \100 \n'
7363
  lt_NL2SP='tr \r\n \100\100'
7364
  ;;
7365
esac
7366
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7367
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7368
])# _LT_CHECK_SHELL_FEATURES
7369
7370
7371
# _LT_PROG_XSI_SHELLFNS
7372
# ---------------------
7373
# Bourne and XSI compatible variants of some useful shell functions.
7374
m4_defun([_LT_PROG_XSI_SHELLFNS],
7375
[case $xsi_shell in
7376
  yes)
7377
    cat << \_LT_EOF >> "$cfgfile"
7378
7379
# func_dirname file append nondir_replacement
7380
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7381
# otherwise set result to NONDIR_REPLACEMENT.
7382
func_dirname ()
7383
{
7384
  case ${1} in
7385
    */*) func_dirname_result="${1%/*}${2}" ;;
7386
    *  ) func_dirname_result="${3}" ;;
7387
  esac
7388
}
7389
7390
# func_basename file
7391
func_basename ()
7392
{
7393
  func_basename_result="${1##*/}"
7394
}
7395
7396
# func_dirname_and_basename file append nondir_replacement
7397
# perform func_basename and func_dirname in a single function
7398
# call:
7399
#   dirname:  Compute the dirname of FILE.  If nonempty,
7400
#             add APPEND to the result, otherwise set result
7401
#             to NONDIR_REPLACEMENT.
7402
#             value returned in "$func_dirname_result"
7403
#   basename: Compute filename of FILE.
7404
#             value retuned in "$func_basename_result"
7405
# Implementation must be kept synchronized with func_dirname
7406
# and func_basename. For efficiency, we do not delegate to
7407
# those functions but instead duplicate the functionality here.
7408
func_dirname_and_basename ()
7409
{
7410
  case ${1} in
7411
    */*) func_dirname_result="${1%/*}${2}" ;;
7412
    *  ) func_dirname_result="${3}" ;;
7413
  esac
7414
  func_basename_result="${1##*/}"
7415
}
7416
7417
# func_stripname prefix suffix name
7418
# strip PREFIX and SUFFIX off of NAME.
7419
# PREFIX and SUFFIX must not contain globbing or regex special
7420
# characters, hashes, percent signs, but SUFFIX may contain a leading
7421
# dot (in which case that matches only a dot).
7422
func_stripname ()
7423
{
7424
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7425
  # positional parameters, so assign one to ordinary parameter first.
7426
  func_stripname_result=${3}
7427
  func_stripname_result=${func_stripname_result#"${1}"}
7428
  func_stripname_result=${func_stripname_result%"${2}"}
7429
}
7430
7431
# func_opt_split
7432
func_opt_split ()
7433
{
7434
  func_opt_split_opt=${1%%=*}
7435
  func_opt_split_arg=${1#*=}
7436
}
7437
7438
# func_lo2o object
7439
func_lo2o ()
7440
{
7441
  case ${1} in
7442
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7443
    *)    func_lo2o_result=${1} ;;
7444
  esac
7445
}
7446
7447
# func_xform libobj-or-source
7448
func_xform ()
7449
{
7450
  func_xform_result=${1%.*}.lo
7451
}
7452
7453
# func_arith arithmetic-term...
7454
func_arith ()
7455
{
7456
  func_arith_result=$(( $[*] ))
7457
}
7458
7459
# func_len string
7460
# STRING may not start with a hyphen.
7461
func_len ()
7462
{
7463
  func_len_result=${#1}
7464
}
7465
7466
_LT_EOF
7467
    ;;
7468
  *) # Bourne compatible functions.
7469
    cat << \_LT_EOF >> "$cfgfile"
7470
7471
# func_dirname file append nondir_replacement
7472
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7473
# otherwise set result to NONDIR_REPLACEMENT.
7474
func_dirname ()
7475
{
7476
  # Extract subdirectory from the argument.
7477
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7478
  if test "X$func_dirname_result" = "X${1}"; then
7479
    func_dirname_result="${3}"
7480
  else
7481
    func_dirname_result="$func_dirname_result${2}"
7482
  fi
7483
}
7484
7485
# func_basename file
7486
func_basename ()
7487
{
7488
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7489
}
7490
7491
dnl func_dirname_and_basename
7492
dnl A portable version of this function is already defined in general.m4sh
7493
dnl so there is no need for it here.
7494
7495
# func_stripname prefix suffix name
7496
# strip PREFIX and SUFFIX off of NAME.
7497
# PREFIX and SUFFIX must not contain globbing or regex special
7498
# characters, hashes, percent signs, but SUFFIX may contain a leading
7499
# dot (in which case that matches only a dot).
7500
# func_strip_suffix prefix name
7501
func_stripname ()
7502
{
7503
  case ${2} in
7504
    .*) func_stripname_result=`$ECHO "X${3}" \
7505
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7506
    *)  func_stripname_result=`$ECHO "X${3}" \
7507
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7508
  esac
7509
}
7510
7511
# sed scripts:
7512
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7513
my_sed_long_arg='1s/^-[[^=]]*=//'
7514
7515
# func_opt_split
7516
func_opt_split ()
7517
{
7518
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7519
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7520
}
7521
7522
# func_lo2o object
7523
func_lo2o ()
7524
{
7525
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7526
}
7527
7528
# func_xform libobj-or-source
7529
func_xform ()
7530
{
7531
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7532
}
7533
7534
# func_arith arithmetic-term...
7535
func_arith ()
7536
{
7537
  func_arith_result=`expr "$[@]"`
7538
}
7539
7540
# func_len string
7541
# STRING may not start with a hyphen.
7542
func_len ()
7543
{
7544
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7545
}
7546
7547
_LT_EOF
7548
esac
7549
7550
case $lt_shell_append in
7551
  yes)
7552
    cat << \_LT_EOF >> "$cfgfile"
7553
7554
# func_append var value
7555
# Append VALUE to the end of shell variable VAR.
7556
func_append ()
7557
{
7558
  eval "$[1]+=\$[2]"
7559
}
7560
_LT_EOF
7561
    ;;
7562
  *)
7563
    cat << \_LT_EOF >> "$cfgfile"
7564
7565
# func_append var value
7566
# Append VALUE to the end of shell variable VAR.
7567
func_append ()
7568
{
7569
  eval "$[1]=\$$[1]\$[2]"
7570
}
7571
7572
_LT_EOF
7573
    ;;
7574
  esac
7575
])
7576
7577
# Helper functions for option handling.                    -*- Autoconf -*-
7578
#
7579
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7580
#   Written by Gary V. Vaughan, 2004
7581
#
7582
# This file is free software; the Free Software Foundation gives
7583
# unlimited permission to copy and/or distribute it, with or without
7584
# modifications, as long as this notice is preserved.
7585
7586
# serial 6 ltoptions.m4
7587
7588
# This is to help aclocal find these macros, as it can't see m4_define.
7589
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7590
7591
7592
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7593
# ------------------------------------------
7594
m4_define([_LT_MANGLE_OPTION],
7595
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7596
7597
7598
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7599
# ---------------------------------------
7600
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7601
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
7602
# saved as a flag.
7603
m4_define([_LT_SET_OPTION],
7604
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7605
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7606
        _LT_MANGLE_DEFUN([$1], [$2]),
7607
    [m4_warning([Unknown $1 option `$2'])])[]dnl
7608
])
7609
7610
7611
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7612
# ------------------------------------------------------------
7613
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7614
m4_define([_LT_IF_OPTION],
7615
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7616
7617
7618
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7619
# -------------------------------------------------------
7620
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7621
# are set.
7622
m4_define([_LT_UNLESS_OPTIONS],
7623
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7624
	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7625
		      [m4_define([$0_found])])])[]dnl
7626
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7627
])[]dnl
7628
])
7629
7630
7631
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7632
# ----------------------------------------
7633
# OPTION-LIST is a space-separated list of Libtool options associated
7634
# with MACRO-NAME.  If any OPTION has a matching handler declared with
7635
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7636
# the unknown option and exit.
7637
m4_defun([_LT_SET_OPTIONS],
7638
[# Set options
7639
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7640
    [_LT_SET_OPTION([$1], _LT_Option)])
7641
7642
m4_if([$1],[LT_INIT],[
7643
  dnl
7644
  dnl Simply set some default values (i.e off) if boolean options were not
7645
  dnl specified:
7646
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7647
  ])
7648
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7649
  ])
7650
  dnl
7651
  dnl If no reference was made to various pairs of opposing options, then
7652
  dnl we run the default mode handler for the pair.  For example, if neither
7653
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
7654
  dnl archives by default:
7655
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7656
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7657
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7658
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7659
  		   [_LT_ENABLE_FAST_INSTALL])
7660
  ])
7661
])# _LT_SET_OPTIONS
7662
7663
7664
7665
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7666
# -----------------------------------------
7667
m4_define([_LT_MANGLE_DEFUN],
7668
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7669
7670
7671
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7672
# -----------------------------------------------
7673
m4_define([LT_OPTION_DEFINE],
7674
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7675
])# LT_OPTION_DEFINE
7676
7677
7678
# dlopen
7679
# ------
7680
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7681
])
7682
7683
AU_DEFUN([AC_LIBTOOL_DLOPEN],
7684
[_LT_SET_OPTION([LT_INIT], [dlopen])
7685
AC_DIAGNOSE([obsolete],
7686
[$0: Remove this warning and the call to _LT_SET_OPTION when you
7687
put the `dlopen' option into LT_INIT's first parameter.])
7688
])
7689
7690
dnl aclocal-1.4 backwards compatibility:
7691
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7692
7693
7694
# win32-dll
7695
# ---------
7696
# Declare package support for building win32 dll's.
7697
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
7698
[enable_win32_dll=yes
7699
7700
case $host in
7701
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7702
  AC_CHECK_TOOL(AS, as, false)
7703
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7704
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7705
  ;;
7706
esac
7707
7708
test -z "$AS" && AS=as
7709
_LT_DECL([], [AS],      [0], [Assembler program])dnl
7710
7711
test -z "$DLLTOOL" && DLLTOOL=dlltool
7712
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7713
7714
test -z "$OBJDUMP" && OBJDUMP=objdump
7715
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7716
])# win32-dll
7717
7718
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7719
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7720
_LT_SET_OPTION([LT_INIT], [win32-dll])
7721
AC_DIAGNOSE([obsolete],
7722
[$0: Remove this warning and the call to _LT_SET_OPTION when you
7723
put the `win32-dll' option into LT_INIT's first parameter.])
7724
])
7725
7726
dnl aclocal-1.4 backwards compatibility:
7727
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7728
7729
7730
# _LT_ENABLE_SHARED([DEFAULT])
7731
# ----------------------------
7732
# implement the --enable-shared flag, and supports the `shared' and
7733
# `disable-shared' LT_INIT options.
7734
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7735
m4_define([_LT_ENABLE_SHARED],
7736
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7737
AC_ARG_ENABLE([shared],
7738
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7739
	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7740
    [p=${PACKAGE-default}
7741
    case $enableval in
7742
    yes) enable_shared=yes ;;
7743
    no) enable_shared=no ;;
7744
    *)
7745
      enable_shared=no
7746
      # Look at the argument we got.  We use all the common list separators.
7747
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7748
      for pkg in $enableval; do
7749
	IFS="$lt_save_ifs"
7750
	if test "X$pkg" = "X$p"; then
7751
	  enable_shared=yes
7752
	fi
7753
      done
7754
      IFS="$lt_save_ifs"
7755
      ;;
7756
    esac],
7757
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7758
7759
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
7760
	[Whether or not to build shared libraries])
7761
])# _LT_ENABLE_SHARED
7762
7763
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7764
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7765
7766
# Old names:
7767
AC_DEFUN([AC_ENABLE_SHARED],
7768
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7769
])
7770
7771
AC_DEFUN([AC_DISABLE_SHARED],
7772
[_LT_SET_OPTION([LT_INIT], [disable-shared])
7773
])
7774
7775
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7776
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7777
7778
dnl aclocal-1.4 backwards compatibility:
7779
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
7780
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
7781
7782
7783
7784
# _LT_ENABLE_STATIC([DEFAULT])
7785
# ----------------------------
7786
# implement the --enable-static flag, and support the `static' and
7787
# `disable-static' LT_INIT options.
7788
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7789
m4_define([_LT_ENABLE_STATIC],
7790
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7791
AC_ARG_ENABLE([static],
7792
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7793
	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7794
    [p=${PACKAGE-default}
7795
    case $enableval in
7796
    yes) enable_static=yes ;;
7797
    no) enable_static=no ;;
7798
    *)
7799
     enable_static=no
7800
      # Look at the argument we got.  We use all the common list separators.
7801
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7802
      for pkg in $enableval; do
7803
	IFS="$lt_save_ifs"
7804
	if test "X$pkg" = "X$p"; then
7805
	  enable_static=yes
7806
	fi
7807
      done
7808
      IFS="$lt_save_ifs"
7809
      ;;
7810
    esac],
7811
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7812
7813
    _LT_DECL([build_old_libs], [enable_static], [0],
7814
	[Whether or not to build static libraries])
7815
])# _LT_ENABLE_STATIC
7816
7817
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7818
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7819
7820
# Old names:
7821
AC_DEFUN([AC_ENABLE_STATIC],
7822
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7823
])
7824
7825
AC_DEFUN([AC_DISABLE_STATIC],
7826
[_LT_SET_OPTION([LT_INIT], [disable-static])
7827
])
7828
7829
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7830
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7831
7832
dnl aclocal-1.4 backwards compatibility:
7833
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
7834
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
7835
7836
7837
7838
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
7839
# ----------------------------------
7840
# implement the --enable-fast-install flag, and support the `fast-install'
7841
# and `disable-fast-install' LT_INIT options.
7842
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7843
m4_define([_LT_ENABLE_FAST_INSTALL],
7844
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7845
AC_ARG_ENABLE([fast-install],
7846
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7847
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7848
    [p=${PACKAGE-default}
7849
    case $enableval in
7850
    yes) enable_fast_install=yes ;;
7851
    no) enable_fast_install=no ;;
7852
    *)
7853
      enable_fast_install=no
7854
      # Look at the argument we got.  We use all the common list separators.
7855
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7856
      for pkg in $enableval; do
7857
	IFS="$lt_save_ifs"
7858
	if test "X$pkg" = "X$p"; then
7859
	  enable_fast_install=yes
7860
	fi
7861
      done
7862
      IFS="$lt_save_ifs"
7863
      ;;
7864
    esac],
7865
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7866
7867
_LT_DECL([fast_install], [enable_fast_install], [0],
7868
	 [Whether or not to optimize for fast installation])dnl
7869
])# _LT_ENABLE_FAST_INSTALL
7870
7871
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7872
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7873
7874
# Old names:
7875
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
7876
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7877
AC_DIAGNOSE([obsolete],
7878
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7879
the `fast-install' option into LT_INIT's first parameter.])
7880
])
7881
7882
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
7883
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7884
AC_DIAGNOSE([obsolete],
7885
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7886
the `disable-fast-install' option into LT_INIT's first parameter.])
7887
])
7888
7889
dnl aclocal-1.4 backwards compatibility:
7890
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7891
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7892
7893
7894
# _LT_WITH_PIC([MODE])
7895
# --------------------
7896
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
7897
# LT_INIT options.
7898
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7899
m4_define([_LT_WITH_PIC],
7900
[AC_ARG_WITH([pic],
7901
    [AS_HELP_STRING([--with-pic],
7902
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7903
    [pic_mode="$withval"],
7904
    [pic_mode=default])
7905
7906
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7907
7908
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7909
])# _LT_WITH_PIC
7910
7911
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7912
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7913
7914
# Old name:
7915
AU_DEFUN([AC_LIBTOOL_PICMODE],
7916
[_LT_SET_OPTION([LT_INIT], [pic-only])
7917
AC_DIAGNOSE([obsolete],
7918
[$0: Remove this warning and the call to _LT_SET_OPTION when you
7919
put the `pic-only' option into LT_INIT's first parameter.])
7920
])
7921
7922
dnl aclocal-1.4 backwards compatibility:
7923
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7924
7925
7926
m4_define([_LTDL_MODE], [])
7927
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7928
		 [m4_define([_LTDL_MODE], [nonrecursive])])
7929
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
7930
		 [m4_define([_LTDL_MODE], [recursive])])
7931
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
7932
		 [m4_define([_LTDL_MODE], [subproject])])
7933
7934
m4_define([_LTDL_TYPE], [])
7935
LT_OPTION_DEFINE([LTDL_INIT], [installable],
7936
		 [m4_define([_LTDL_TYPE], [installable])])
7937
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
7938
		 [m4_define([_LTDL_TYPE], [convenience])])
7939
7940
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
7941
#
7942
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7943
# Written by Gary V. Vaughan, 2004
7944
#
7945
# This file is free software; the Free Software Foundation gives
7946
# unlimited permission to copy and/or distribute it, with or without
7947
# modifications, as long as this notice is preserved.
7948
7949
# serial 6 ltsugar.m4
7950
7951
# This is to help aclocal find these macros, as it can't see m4_define.
7952
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7953
7954
7955
# lt_join(SEP, ARG1, [ARG2...])
7956
# -----------------------------
7957
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7958
# associated separator.
7959
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7960
# versions in m4sugar had bugs.
7961
m4_define([lt_join],
7962
[m4_if([$#], [1], [],
7963
       [$#], [2], [[$2]],
7964
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7965
m4_define([_lt_join],
7966
[m4_if([$#$2], [2], [],
7967
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7968
7969
7970
# lt_car(LIST)
7971
# lt_cdr(LIST)
7972
# ------------
7973
# Manipulate m4 lists.
7974
# These macros are necessary as long as will still need to support
7975
# Autoconf-2.59 which quotes differently.
7976
m4_define([lt_car], [[$1]])
7977
m4_define([lt_cdr],
7978
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7979
       [$#], 1, [],
7980
       [m4_dquote(m4_shift($@))])])
7981
m4_define([lt_unquote], $1)
7982
7983
7984
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
7985
# ------------------------------------------
7986
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7987
# Note that neither SEPARATOR nor STRING are expanded; they are appended
7988
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7989
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
7990
# than defined and empty).
7991
#
7992
# This macro is needed until we can rely on Autoconf 2.62, since earlier
7993
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7994
m4_define([lt_append],
7995
[m4_define([$1],
7996
	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7997
7998
7999
8000
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8001
# ----------------------------------------------------------
8002
# Produce a SEP delimited list of all paired combinations of elements of
8003
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8004
# has the form PREFIXmINFIXSUFFIXn.
8005
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8006
m4_define([lt_combine],
8007
[m4_if(m4_eval([$# > 3]), [1],
8008
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8009
[[m4_foreach([_Lt_prefix], [$2],
8010
	     [m4_foreach([_Lt_suffix],
8011
		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8012
	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8013
8014
8015
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8016
# -----------------------------------------------------------------------
8017
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8018
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8019
m4_define([lt_if_append_uniq],
8020
[m4_ifdef([$1],
8021
	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8022
		 [lt_append([$1], [$2], [$3])$4],
8023
		 [$5])],
8024
	  [lt_append([$1], [$2], [$3])$4])])
8025
8026
8027
# lt_dict_add(DICT, KEY, VALUE)
8028
# -----------------------------
8029
m4_define([lt_dict_add],
8030
[m4_define([$1($2)], [$3])])
8031
8032
8033
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8034
# --------------------------------------------
8035
m4_define([lt_dict_add_subkey],
8036
[m4_define([$1($2:$3)], [$4])])
8037
8038
8039
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8040
# ----------------------------------
8041
m4_define([lt_dict_fetch],
8042
[m4_ifval([$3],
8043
	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8044
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8045
8046
8047
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8048
# -----------------------------------------------------------------
8049
m4_define([lt_if_dict_fetch],
8050
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8051
	[$5],
8052
    [$6])])
8053
8054
8055
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8056
# --------------------------------------------------------------
8057
m4_define([lt_dict_filter],
8058
[m4_if([$5], [], [],
8059
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
8060
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8061
		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8062
])
8063
8064
# ltversion.m4 -- version numbers			-*- Autoconf -*-
8065
#
8066
#   Copyright (C) 2004 Free Software Foundation, Inc.
8067
#   Written by Scott James Remnant, 2004
8068
#
8069
# This file is free software; the Free Software Foundation gives
8070
# unlimited permission to copy and/or distribute it, with or without
8071
# modifications, as long as this notice is preserved.
8072
8073
# Generated from ltversion.in.
8074
8075
# serial 3012 ltversion.m4
8076
# This file is part of GNU Libtool
8077
8078
m4_define([LT_PACKAGE_VERSION], [2.2.6])
8079
m4_define([LT_PACKAGE_REVISION], [1.3012])
8080
8081
AC_DEFUN([LTVERSION_VERSION],
8082
[macro_version='2.2.6'
8083
macro_revision='1.3012'
8084
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8085
_LT_DECL(, macro_revision, 0)
8086
])
8087
8088
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8089
#
8090
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8091
#   Written by Scott James Remnant, 2004.
8092
#
8093
# This file is free software; the Free Software Foundation gives
8094
# unlimited permission to copy and/or distribute it, with or without
8095
# modifications, as long as this notice is preserved.
8096
8097
# serial 4 lt~obsolete.m4
8098
8099
# These exist entirely to fool aclocal when bootstrapping libtool.
8100
#
8101
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8102
# which have later been changed to m4_define as they aren't part of the
8103
# exported API, or moved to Autoconf or Automake where they belong.
8104
#
8105
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8106
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8107
# using a macro with the same name in our local m4/libtool.m4 it'll
8108
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8109
# and doesn't know about Autoconf macros at all.)
8110
#
8111
# So we provide this file, which has a silly filename so it's always
8112
# included after everything else.  This provides aclocal with the
8113
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8114
# because those macros already exist, or will be overwritten later.
8115
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
8116
#
8117
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8118
# Yes, that means every name once taken will need to remain here until
8119
# we give up compatibility with versions before 1.7, at which point
8120
# we need to keep only those names which we still refer to.
8121
8122
# This is to help aclocal find these macros, as it can't see m4_define.
8123
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8124
8125
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8126
m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
8127
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8128
m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
8129
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8130
m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
8131
m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
8132
m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8133
m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
8134
m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
8135
m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
8136
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8137
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8138
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8139
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8140
m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8141
m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
8142
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8143
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8144
m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
8145
m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
8146
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8147
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8148
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8149
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8150
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8151
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8152
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8153
m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
8154
m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
8155
m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
8156
m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8157
m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8158
m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
8159
m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
8160
m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8161
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8162
m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
8163
m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8164
m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
8165
m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
8166
m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
8167
m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
8168
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8169
m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8170
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8171
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8172
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8173
m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8174
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8175
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8176
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8177
m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8178
m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
8179
m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8180
8181
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8182
# 
8183
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8184
#
8185
# This program is free software; you can redistribute it and/or modify
8186
# it under the terms of the GNU General Public License as published by
8187
# the Free Software Foundation; either version 2 of the License, or
8188
# (at your option) any later version.
8189
#
8190
# This program is distributed in the hope that it will be useful, but
8191
# WITHOUT ANY WARRANTY; without even the implied warranty of
8192
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8193
# General Public License for more details.
8194
#
8195
# You should have received a copy of the GNU General Public License
8196
# along with this program; if not, write to the Free Software
8197
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8198
#
8199
# As a special exception to the GNU General Public License, if you
8200
# distribute this file as part of a program that contains a
8201
# configuration script generated by Autoconf, you may include it under
8202
# the same distribution terms that you use for the rest of that program.
8203
8204
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8205
# ----------------------------------
8206
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8207
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8208
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8209
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8210
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8211
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8212
fi
8213
if test -n "$PKG_CONFIG"; then
8214
	_pkg_min_version=m4_default([$1], [0.9.0])
8215
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8216
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8217
		AC_MSG_RESULT([yes])
8218
	else
8219
		AC_MSG_RESULT([no])
8220
		PKG_CONFIG=""
8221
	fi
8222
		
8223
fi[]dnl
8224
])# PKG_PROG_PKG_CONFIG
8225
8226
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8227
#
8228
# Check to see whether a particular set of modules exists.  Similar
8229
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8230
#
8231
#
8232
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8233
# this or PKG_CHECK_MODULES is called, or make sure to call
8234
# PKG_CHECK_EXISTS manually
8235
# --------------------------------------------------------------
8236
AC_DEFUN([PKG_CHECK_EXISTS],
8237
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8238
if test -n "$PKG_CONFIG" && \
8239
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8240
  m4_ifval([$2], [$2], [:])
8241
m4_ifvaln([$3], [else
8242
  $3])dnl
8243
fi])
8244
8245
8246
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8247
# ---------------------------------------------
8248
m4_define([_PKG_CONFIG],
8249
[if test -n "$PKG_CONFIG"; then
8250
    if test -n "$$1"; then
8251
        pkg_cv_[]$1="$$1"
8252
    else
8253
        PKG_CHECK_EXISTS([$3],
8254
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8255
			 [pkg_failed=yes])
8256
    fi
8257
else
8258
	pkg_failed=untried
8259
fi[]dnl
8260
])# _PKG_CONFIG
8261
8262
# _PKG_SHORT_ERRORS_SUPPORTED
8263
# -----------------------------
8264
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8265
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8266
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8267
        _pkg_short_errors_supported=yes
8268
else
8269
        _pkg_short_errors_supported=no
8270
fi[]dnl
8271
])# _PKG_SHORT_ERRORS_SUPPORTED
8272
8273
8274
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8275
# [ACTION-IF-NOT-FOUND])
8276
#
8277
#
8278
# Note that if there is a possibility the first call to
8279
# PKG_CHECK_MODULES might not happen, you should be sure to include an
8280
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8281
#
8282
#
8283
# --------------------------------------------------------------
8284
AC_DEFUN([PKG_CHECK_MODULES],
8285
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8286
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8287
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8288
8289
pkg_failed=no
8290
AC_MSG_CHECKING([for $1])
8291
8292
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8293
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8294
8295
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8296
and $1[]_LIBS to avoid the need to call pkg-config.
8297
See the pkg-config man page for more details.])
8298
8299
if test $pkg_failed = yes; then
8300
        _PKG_SHORT_ERRORS_SUPPORTED
8301
        if test $_pkg_short_errors_supported = yes; then
8302
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
8303
        else 
8304
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8305
        fi
8306
	# Put the nasty error message in config.log where it belongs
8307
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8308
8309
	ifelse([$4], , [AC_MSG_ERROR(dnl
8310
[Package requirements ($2) were not met:
8311
8312
$$1_PKG_ERRORS
8313
8314
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8315
installed software in a non-standard prefix.
8316
8317
_PKG_TEXT
8318
])],
8319
		[AC_MSG_RESULT([no])
8320
                $4])
8321
elif test $pkg_failed = untried; then
8322
	ifelse([$4], , [AC_MSG_FAILURE(dnl
8323
[The pkg-config script could not be found or is too old.  Make sure it
8324
is in your PATH or set the PKG_CONFIG environment variable to the full
8325
path to pkg-config.
8326
8327
_PKG_TEXT
8328
8329
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8330
		[$4])
8331
else
8332
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8333
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8334
        AC_MSG_RESULT([yes])
8335
	ifelse([$3], , :, [$3])
8336
fi[]dnl
8337
])# PKG_CHECK_MODULES
8338
8339
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8340
#
8341
# This file is free software; the Free Software Foundation
8342
# gives unlimited permission to copy and/or distribute it,
8343
# with or without modifications, as long as this notice is preserved.
8344
8345
# AM_AUTOMAKE_VERSION(VERSION)
8346
# ----------------------------
8347
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8348
# generated from the m4 files accompanying Automake X.Y.
8349
# (This private macro should not be called outside this file.)
8350
AC_DEFUN([AM_AUTOMAKE_VERSION],
8351
[am__api_version='1.10'
8352
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8353
dnl require some minimum version.  Point them to the right macro.
8354
m4_if([$1], [1.10.2], [],
8355
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8356
])
8357
8358
# _AM_AUTOCONF_VERSION(VERSION)
8359
# -----------------------------
8360
# aclocal traces this macro to find the Autoconf version.
8361
# This is a private macro too.  Using m4_define simplifies
8362
# the logic in aclocal, which can simply ignore this definition.
8363
m4_define([_AM_AUTOCONF_VERSION], [])
8364
8365
# AM_SET_CURRENT_AUTOMAKE_VERSION
8366
# -------------------------------
8367
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8368
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8369
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8370
[AM_AUTOMAKE_VERSION([1.10.2])dnl
8371
m4_ifndef([AC_AUTOCONF_VERSION],
8372
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8373
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8374
8375
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8376
8377
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8378
#
8379
# This file is free software; the Free Software Foundation
8380
# gives unlimited permission to copy and/or distribute it,
8381
# with or without modifications, as long as this notice is preserved.
8382
8383
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8384
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8385
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8386
#
8387
# Of course, Automake must honor this variable whenever it calls a
8388
# tool from the auxiliary directory.  The problem is that $srcdir (and
8389
# therefore $ac_aux_dir as well) can be either absolute or relative,
8390
# depending on how configure is run.  This is pretty annoying, since
8391
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8392
# source directory, any form will work fine, but in subdirectories a
8393
# relative path needs to be adjusted first.
8394
#
8395
# $ac_aux_dir/missing
8396
#    fails when called from a subdirectory if $ac_aux_dir is relative
8397
# $top_srcdir/$ac_aux_dir/missing
8398
#    fails if $ac_aux_dir is absolute,
8399
#    fails when called from a subdirectory in a VPATH build with
8400
#          a relative $ac_aux_dir
8401
#
8402
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8403
# are both prefixed by $srcdir.  In an in-source build this is usually
8404
# harmless because $srcdir is `.', but things will broke when you
8405
# start a VPATH build or use an absolute $srcdir.
8406
#
8407
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8408
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8409
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8410
# and then we would define $MISSING as
8411
#   MISSING="\${SHELL} $am_aux_dir/missing"
8412
# This will work as long as MISSING is not called from configure, because
8413
# unfortunately $(top_srcdir) has no meaning in configure.
8414
# However there are other variables, like CC, which are often used in
8415
# configure, and could therefore not use this "fixed" $ac_aux_dir.
8416
#
8417
# Another solution, used here, is to always expand $ac_aux_dir to an
8418
# absolute PATH.  The drawback is that using absolute paths prevent a
8419
# configured tree to be moved without reconfiguration.
8420
8421
AC_DEFUN([AM_AUX_DIR_EXPAND],
8422
[dnl Rely on autoconf to set up CDPATH properly.
8423
AC_PREREQ([2.50])dnl
8424
# expand $ac_aux_dir to an absolute path
8425
am_aux_dir=`cd $ac_aux_dir && pwd`
8426
])
8427
8428
# AM_CONDITIONAL                                            -*- Autoconf -*-
8429
8430
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
8431
# Free Software Foundation, Inc.
8432
#
8433
# This file is free software; the Free Software Foundation
8434
# gives unlimited permission to copy and/or distribute it,
8435
# with or without modifications, as long as this notice is preserved.
8436
8437
# serial 8
8438
8439
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8440
# -------------------------------------
8441
# Define a conditional.
8442
AC_DEFUN([AM_CONDITIONAL],
8443
[AC_PREREQ(2.52)dnl
8444
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8445
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8446
AC_SUBST([$1_TRUE])dnl
8447
AC_SUBST([$1_FALSE])dnl
8448
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8449
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8450
if $2; then
8451
  $1_TRUE=
8452
  $1_FALSE='#'
8453
else
8454
  $1_TRUE='#'
8455
  $1_FALSE=
8456
fi
8457
AC_CONFIG_COMMANDS_PRE(
8458
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8459
  AC_MSG_ERROR([[conditional "$1" was never defined.
8460
Usually this means the macro was only invoked conditionally.]])
8461
fi])])
8462
8463
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
8464
# Free Software Foundation, Inc.
8465
#
8466
# This file is free software; the Free Software Foundation
8467
# gives unlimited permission to copy and/or distribute it,
8468
# with or without modifications, as long as this notice is preserved.
8469
8470
# serial 9
8471
8472
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8473
# written in clear, in which case automake, when reading aclocal.m4,
8474
# will think it sees a *use*, and therefore will trigger all it's
8475
# C support machinery.  Also note that it means that autoscan, seeing
8476
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8477
8478
8479
# _AM_DEPENDENCIES(NAME)
8480
# ----------------------
8481
# See how the compiler implements dependency checking.
8482
# NAME is "CC", "CXX", "GCJ", or "OBJC".
8483
# We try a few techniques and use that to set a single cache variable.
8484
#
8485
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8486
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8487
# dependency, and given that the user is not expected to run this macro,
8488
# just rely on AC_PROG_CC.
8489
AC_DEFUN([_AM_DEPENDENCIES],
8490
[AC_REQUIRE([AM_SET_DEPDIR])dnl
8491
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8492
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
8493
AC_REQUIRE([AM_DEP_TRACK])dnl
8494
8495
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8496
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8497
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8498
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8499
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8500
                   [depcc="$$1"   am_compiler_list=])
8501
8502
AC_CACHE_CHECK([dependency style of $depcc],
8503
               [am_cv_$1_dependencies_compiler_type],
8504
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8505
  # We make a subdir and do the tests there.  Otherwise we can end up
8506
  # making bogus files that we don't know about and never remove.  For
8507
  # instance it was reported that on HP-UX the gcc test will end up
8508
  # making a dummy file named `D' -- because `-MD' means `put the output
8509
  # in D'.
8510
  mkdir conftest.dir
8511
  # Copy depcomp to subdir because otherwise we won't find it if we're
8512
  # using a relative directory.
8513
  cp "$am_depcomp" conftest.dir
8514
  cd conftest.dir
8515
  # We will build objects and dependencies in a subdirectory because
8516
  # it helps to detect inapplicable dependency modes.  For instance
8517
  # both Tru64's cc and ICC support -MD to output dependencies as a
8518
  # side effect of compilation, but ICC will put the dependencies in
8519
  # the current directory while Tru64 will put them in the object
8520
  # directory.
8521
  mkdir sub
8522
8523
  am_cv_$1_dependencies_compiler_type=none
8524
  if test "$am_compiler_list" = ""; then
8525
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8526
  fi
8527
  for depmode in $am_compiler_list; do
8528
    # Setup a source with many dependencies, because some compilers
8529
    # like to wrap large dependency lists on column 80 (with \), and
8530
    # we should not choose a depcomp mode which is confused by this.
8531
    #
8532
    # We need to recreate these files for each test, as the compiler may
8533
    # overwrite some of them when testing with obscure command lines.
8534
    # This happens at least with the AIX C compiler.
8535
    : > sub/conftest.c
8536
    for i in 1 2 3 4 5 6; do
8537
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
8538
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8539
      # Solaris 8's {/usr,}/bin/sh.
8540
      touch sub/conftst$i.h
8541
    done
8542
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8543
8544
    case $depmode in
8545
    nosideeffect)
8546
      # after this tag, mechanisms are not by side-effect, so they'll
8547
      # only be used when explicitly requested
8548
      if test "x$enable_dependency_tracking" = xyes; then
8549
	continue
8550
      else
8551
	break
8552
      fi
8553
      ;;
8554
    none) break ;;
8555
    esac
8556
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
8557
    # mode.  It turns out that the SunPro C++ compiler does not properly
8558
    # handle `-M -o', and we need to detect this.
8559
    if depmode=$depmode \
8560
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
8561
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8562
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
8563
         >/dev/null 2>conftest.err &&
8564
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8565
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8566
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
8567
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8568
      # icc doesn't choke on unknown options, it will just issue warnings
8569
      # or remarks (even with -Werror).  So we grep stderr for any message
8570
      # that says an option was ignored or not supported.
8571
      # When given -MP, icc 7.0 and 7.1 complain thusly:
8572
      #   icc: Command line warning: ignoring option '-M'; no argument required
8573
      # The diagnosis changed in icc 8.0:
8574
      #   icc: Command line remark: option '-MP' not supported
8575
      if (grep 'ignoring option' conftest.err ||
8576
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8577
        am_cv_$1_dependencies_compiler_type=$depmode
8578
        break
8579
      fi
8580
    fi
8581
  done
8582
8583
  cd ..
8584
  rm -rf conftest.dir
8585
else
8586
  am_cv_$1_dependencies_compiler_type=none
8587
fi
8588
])
8589
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
8590
AM_CONDITIONAL([am__fastdep$1], [
8591
  test "x$enable_dependency_tracking" != xno \
8592
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
8593
])
8594
8595
8596
# AM_SET_DEPDIR
8597
# -------------
8598
# Choose a directory name for dependency files.
8599
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
8600
AC_DEFUN([AM_SET_DEPDIR],
8601
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8602
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
8603
])
8604
8605
8606
# AM_DEP_TRACK
8607
# ------------
8608
AC_DEFUN([AM_DEP_TRACK],
8609
[AC_ARG_ENABLE(dependency-tracking,
8610
[  --disable-dependency-tracking  speeds up one-time build
8611
  --enable-dependency-tracking   do not reject slow dependency extractors])
8612
if test "x$enable_dependency_tracking" != xno; then
8613
  am_depcomp="$ac_aux_dir/depcomp"
8614
  AMDEPBACKSLASH='\'
8615
fi
8616
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8617
AC_SUBST([AMDEPBACKSLASH])dnl
8618
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
8619
])
8620
8621
# Generate code to set up dependency tracking.              -*- Autoconf -*-
8622
8623
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8624
# Free Software Foundation, Inc.
8625
#
8626
# This file is free software; the Free Software Foundation
8627
# gives unlimited permission to copy and/or distribute it,
8628
# with or without modifications, as long as this notice is preserved.
8629
8630
#serial 5
8631
8632
# _AM_OUTPUT_DEPENDENCY_COMMANDS
8633
# ------------------------------
8634
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8635
[{
8636
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
8637
  # are listed without --file.  Let's play safe and only enable the eval
8638
  # if we detect the quoting.
8639
  case $CONFIG_FILES in
8640
  *\'*) eval set x "$CONFIG_FILES" ;;
8641
  *)   set x $CONFIG_FILES ;;
8642
  esac
8643
  shift
8644
  for mf
8645
  do
8646
    # Strip MF so we end up with the name of the file.
8647
    mf=`echo "$mf" | sed -e 's/:.*$//'`
8648
    # Check whether this is an Automake generated Makefile or not.
8649
    # We used to match only the files named `Makefile.in', but
8650
    # some people rename them; so instead we look at the file content.
8651
    # Grep'ing the first line is not enough: some people post-process
8652
    # each Makefile.in and add a new line on top of each file to say so.
8653
    # Grep'ing the whole file is not good either: AIX grep has a line
8654
    # limit of 2048, but all sed's we know have understand at least 4000.
8655
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
8656
      dirpart=`AS_DIRNAME("$mf")`
8657
    else
8658
      continue
8659
    fi
8660
    # Extract the definition of DEPDIR, am__include, and am__quote
8661
    # from the Makefile without running `make'.
8662
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8663
    test -z "$DEPDIR" && continue
8664
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
8665
    test -z "am__include" && continue
8666
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8667
    # When using ansi2knr, U may be empty or an underscore; expand it
8668
    U=`sed -n 's/^U = //p' < "$mf"`
8669
    # Find all dependency output files, they are included files with
8670
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
8671
    # simplest approach to changing $(DEPDIR) to its actual value in the
8672
    # expansion.
8673
    for file in `sed -n "
8674
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8675
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8676
      # Make sure the directory exists.
8677
      test -f "$dirpart/$file" && continue
8678
      fdir=`AS_DIRNAME(["$file"])`
8679
      AS_MKDIR_P([$dirpart/$fdir])
8680
      # echo "creating $dirpart/$file"
8681
      echo '# dummy' > "$dirpart/$file"
8682
    done
8683
  done
8684
}
8685
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
8686
8687
8688
# AM_OUTPUT_DEPENDENCY_COMMANDS
8689
# -----------------------------
8690
# This macro should only be invoked once -- use via AC_REQUIRE.
8691
#
8692
# This code is only required when automatic dependency tracking
8693
# is enabled.  FIXME.  This creates each `.P' file that we will
8694
# need in order to bootstrap the dependency handling code.
8695
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
8696
[AC_CONFIG_COMMANDS([depfiles],
8697
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
8698
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
8699
])
8700
8701
# Do all the work for Automake.                             -*- Autoconf -*-
8702
8703
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
8704
# 2005, 2006, 2008 Free Software Foundation, Inc.
8705
#
8706
# This file is free software; the Free Software Foundation
8707
# gives unlimited permission to copy and/or distribute it,
8708
# with or without modifications, as long as this notice is preserved.
8709
8710
# serial 13
8711
8712
# This macro actually does too much.  Some checks are only needed if
8713
# your package does certain things.  But this isn't really a big deal.
8714
8715
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
8716
# AM_INIT_AUTOMAKE([OPTIONS])
8717
# -----------------------------------------------
8718
# The call with PACKAGE and VERSION arguments is the old style
8719
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
8720
# and VERSION should now be passed to AC_INIT and removed from
8721
# the call to AM_INIT_AUTOMAKE.
8722
# We support both call styles for the transition.  After
8723
# the next Automake release, Autoconf can make the AC_INIT
8724
# arguments mandatory, and then we can depend on a new Autoconf
8725
# release and drop the old call support.
8726
AC_DEFUN([AM_INIT_AUTOMAKE],
8727
[AC_PREREQ([2.60])dnl
8728
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
8729
dnl the ones we care about.
8730
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
8731
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
8732
AC_REQUIRE([AC_PROG_INSTALL])dnl
8733
if test "`cd $srcdir && pwd`" != "`pwd`"; then
8734
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
8735
  # is not polluted with repeated "-I."
8736
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
8737
  # test to see if srcdir already configured
8738
  if test -f $srcdir/config.status; then
8739
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8740
  fi
8741
fi
8742
8743
# test whether we have cygpath
8744
if test -z "$CYGPATH_W"; then
8745
  if (cygpath --version) >/dev/null 2>/dev/null; then
8746
    CYGPATH_W='cygpath -w'
8747
  else
8748
    CYGPATH_W=echo
8749
  fi
8750
fi
8751
AC_SUBST([CYGPATH_W])
8752
8753
# Define the identity of the package.
8754
dnl Distinguish between old-style and new-style calls.
8755
m4_ifval([$2],
8756
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
8757
 AC_SUBST([PACKAGE], [$1])dnl
8758
 AC_SUBST([VERSION], [$2])],
8759
[_AM_SET_OPTIONS([$1])dnl
8760
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
8761
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
8762
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
8763
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
8764
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
8765
8766
_AM_IF_OPTION([no-define],,
8767
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
8768
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
8769
8770
# Some tools Automake needs.
8771
AC_REQUIRE([AM_SANITY_CHECK])dnl
8772
AC_REQUIRE([AC_ARG_PROGRAM])dnl
8773
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
8774
AM_MISSING_PROG(AUTOCONF, autoconf)
8775
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
8776
AM_MISSING_PROG(AUTOHEADER, autoheader)
8777
AM_MISSING_PROG(MAKEINFO, makeinfo)
8778
AM_PROG_INSTALL_SH
8779
AM_PROG_INSTALL_STRIP
8780
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
8781
# We need awk for the "check" target.  The system "awk" is bad on
8782
# some platforms.
8783
AC_REQUIRE([AC_PROG_AWK])dnl
8784
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
8785
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8786
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8787
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
8788
	      		     [_AM_PROG_TAR([v7])])])
8789
_AM_IF_OPTION([no-dependencies],,
8790
[AC_PROVIDE_IFELSE([AC_PROG_CC],
8791
                  [_AM_DEPENDENCIES(CC)],
8792
                  [define([AC_PROG_CC],
8793
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
8794
AC_PROVIDE_IFELSE([AC_PROG_CXX],
8795
                  [_AM_DEPENDENCIES(CXX)],
8796
                  [define([AC_PROG_CXX],
8797
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
8798
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
8799
                  [_AM_DEPENDENCIES(OBJC)],
8800
                  [define([AC_PROG_OBJC],
8801
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
8802
])
8803
])
8804
8805
8806
# When config.status generates a header, we must update the stamp-h file.
8807
# This file resides in the same directory as the config header
8808
# that is generated.  The stamp files are numbered to have different names.
8809
8810
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
8811
# loop where config.status creates the headers, so we can generate
8812
# our stamp files there.
8813
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
8814
[# Compute $1's index in $config_headers.
8815
_am_arg=$1
8816
_am_stamp_count=1
8817
for _am_header in $config_headers :; do
8818
  case $_am_header in
8819
    $_am_arg | $_am_arg:* )
8820
      break ;;
8821
    * )
8822
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
8823
  esac
8824
done
8825
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
8826
8827
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8828
#
8829
# This file is free software; the Free Software Foundation
8830
# gives unlimited permission to copy and/or distribute it,
8831
# with or without modifications, as long as this notice is preserved.
8832
8833
# AM_PROG_INSTALL_SH
8834
# ------------------
8835
# Define $install_sh.
8836
AC_DEFUN([AM_PROG_INSTALL_SH],
8837
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8838
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
8839
AC_SUBST(install_sh)])
8840
8841
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
8842
#
8843
# This file is free software; the Free Software Foundation
8844
# gives unlimited permission to copy and/or distribute it,
8845
# with or without modifications, as long as this notice is preserved.
8846
8847
# serial 2
8848
8849
# Check whether the underlying file-system supports filenames
8850
# with a leading dot.  For instance MS-DOS doesn't.
8851
AC_DEFUN([AM_SET_LEADING_DOT],
8852
[rm -rf .tst 2>/dev/null
8853
mkdir .tst 2>/dev/null
8854
if test -d .tst; then
8855
  am__leading_dot=.
8856
else
8857
  am__leading_dot=_
8858
fi
8859
rmdir .tst 2>/dev/null
8860
AC_SUBST([am__leading_dot])])
8861
8862
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
8863
8864
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
8865
#
8866
# This file is free software; the Free Software Foundation
8867
# gives unlimited permission to copy and/or distribute it,
8868
# with or without modifications, as long as this notice is preserved.
8869
8870
# serial 3
8871
8872
# AM_MAKE_INCLUDE()
8873
# -----------------
8874
# Check to see how make treats includes.
8875
AC_DEFUN([AM_MAKE_INCLUDE],
8876
[am_make=${MAKE-make}
8877
cat > confinc << 'END'
8878
am__doit:
8879
	@echo done
8880
.PHONY: am__doit
8881
END
8882
# If we don't find an include directive, just comment out the code.
8883
AC_MSG_CHECKING([for style of include used by $am_make])
8884
am__include="#"
8885
am__quote=
8886
_am_result=none
8887
# First try GNU make style include.
8888
echo "include confinc" > confmf
8889
# We grep out `Entering directory' and `Leaving directory'
8890
# messages which can occur if `w' ends up in MAKEFLAGS.
8891
# In particular we don't look at `^make:' because GNU make might
8892
# be invoked under some other name (usually "gmake"), in which
8893
# case it prints its new name instead of `make'.
8894
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
8895
   am__include=include
8896
   am__quote=
8897
   _am_result=GNU
8898
fi
8899
# Now try BSD make style include.
8900
if test "$am__include" = "#"; then
8901
   echo '.include "confinc"' > confmf
8902
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
8903
      am__include=.include
8904
      am__quote="\""
8905
      _am_result=BSD
8906
   fi
8907
fi
8908
AC_SUBST([am__include])
8909
AC_SUBST([am__quote])
8910
AC_MSG_RESULT([$_am_result])
8911
rm -f confinc confmf
8912
])
8913
8914
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
8915
8916
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
8917
# Free Software Foundation, Inc.
8918
#
8919
# This file is free software; the Free Software Foundation
8920
# gives unlimited permission to copy and/or distribute it,
8921
# with or without modifications, as long as this notice is preserved.
8922
8923
# serial 5
8924
8925
# AM_MISSING_PROG(NAME, PROGRAM)
8926
# ------------------------------
8927
AC_DEFUN([AM_MISSING_PROG],
8928
[AC_REQUIRE([AM_MISSING_HAS_RUN])
8929
$1=${$1-"${am_missing_run}$2"}
8930
AC_SUBST($1)])
8931
8932
8933
# AM_MISSING_HAS_RUN
8934
# ------------------
8935
# Define MISSING if not defined so far and test if it supports --run.
8936
# If it does, set am_missing_run to use it, otherwise, to nothing.
8937
AC_DEFUN([AM_MISSING_HAS_RUN],
8938
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8939
AC_REQUIRE_AUX_FILE([missing])dnl
8940
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
8941
# Use eval to expand $SHELL
8942
if eval "$MISSING --run true"; then
8943
  am_missing_run="$MISSING --run "
8944
else
8945
  am_missing_run=
8946
  AC_MSG_WARN([`missing' script is too old or missing])
8947
fi
8948
])
8949
8950
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
8951
#
8952
# This file is free software; the Free Software Foundation
8953
# gives unlimited permission to copy and/or distribute it,
8954
# with or without modifications, as long as this notice is preserved.
8955
8956
# AM_PROG_MKDIR_P
8957
# ---------------
8958
# Check for `mkdir -p'.
8959
AC_DEFUN([AM_PROG_MKDIR_P],
8960
[AC_PREREQ([2.60])dnl
8961
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
8962
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
8963
dnl while keeping a definition of mkdir_p for backward compatibility.
8964
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8965
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8966
dnl Makefile.ins that do not define MKDIR_P, so we do our own
8967
dnl adjustment using top_builddir (which is defined more often than
8968
dnl MKDIR_P).
8969
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8970
case $mkdir_p in
8971
  [[\\/$]]* | ?:[[\\/]]*) ;;
8972
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8973
esac
8974
])
8975
8976
# Helper functions for option handling.                     -*- Autoconf -*-
8977
8978
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
8979
#
8980
# This file is free software; the Free Software Foundation
8981
# gives unlimited permission to copy and/or distribute it,
8982
# with or without modifications, as long as this notice is preserved.
8983
8984
# serial 4
8985
8986
# _AM_MANGLE_OPTION(NAME)
8987
# -----------------------
8988
AC_DEFUN([_AM_MANGLE_OPTION],
8989
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8990
8991
# _AM_SET_OPTION(NAME)
8992
# ------------------------------
8993
# Set option NAME.  Presently that only means defining a flag for this option.
8994
AC_DEFUN([_AM_SET_OPTION],
8995
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8996
8997
# _AM_SET_OPTIONS(OPTIONS)
8998
# ----------------------------------
8999
# OPTIONS is a space-separated list of Automake options.
9000
AC_DEFUN([_AM_SET_OPTIONS],
9001
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9002
9003
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9004
# -------------------------------------------
9005
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9006
AC_DEFUN([_AM_IF_OPTION],
9007
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9008
9009
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
9010
# Free Software Foundation, Inc.
9011
#
9012
# This file is free software; the Free Software Foundation
9013
# gives unlimited permission to copy and/or distribute it,
9014
# with or without modifications, as long as this notice is preserved.
9015
9016
# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9017
# ---------------------------------------------------------------------------
9018
# Adds support for distributing Python modules and packages.  To
9019
# install modules, copy them to $(pythondir), using the python_PYTHON
9020
# automake variable.  To install a package with the same name as the
9021
# automake package, install to $(pkgpythondir), or use the
9022
# pkgpython_PYTHON automake variable.
9023
#
9024
# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
9025
# locations to install python extension modules (shared libraries).
9026
# Another macro is required to find the appropriate flags to compile
9027
# extension modules.
9028
#
9029
# If your package is configured with a different prefix to python,
9030
# users will have to add the install directory to the PYTHONPATH
9031
# environment variable, or create a .pth file (see the python
9032
# documentation for details).
9033
#
9034
# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
9035
# cause an error if the version of python installed on the system
9036
# doesn't meet the requirement.  MINIMUM-VERSION should consist of
9037
# numbers and dots only.
9038
AC_DEFUN([AM_PATH_PYTHON],
9039
 [
9040
  dnl Find a Python interpreter.  Python versions prior to 1.5 are not
9041
  dnl supported because the default installation locations changed from
9042
  dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
9043
  dnl in 1.5.
9044
  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
9045
                    [python python2 python2.5 python2.4 python2.3 python2.2 dnl
9046
python2.1 python2.0 python1.6 python1.5])
9047
9048
  m4_if([$1],[],[
9049
    dnl No version check is needed.
9050
    # Find any Python interpreter.
9051
    if test -z "$PYTHON"; then
9052
      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
9053
    fi
9054
    am_display_PYTHON=python
9055
  ], [
9056
    dnl A version check is needed.
9057
    if test -n "$PYTHON"; then
9058
      # If the user set $PYTHON, use it and don't search something else.
9059
      AC_MSG_CHECKING([whether $PYTHON version >= $1])
9060
      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
9061
			      [AC_MSG_RESULT(yes)],
9062
			      [AC_MSG_ERROR(too old)])
9063
      am_display_PYTHON=$PYTHON
9064
    else
9065
      # Otherwise, try each interpreter until we find one that satisfies
9066
      # VERSION.
9067
      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
9068
	[am_cv_pathless_PYTHON],[
9069
	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
9070
	  test "$am_cv_pathless_PYTHON" = none && break
9071
	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
9072
	done])
9073
      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
9074
      if test "$am_cv_pathless_PYTHON" = none; then
9075
	PYTHON=:
9076
      else
9077
        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
9078
      fi
9079
      am_display_PYTHON=$am_cv_pathless_PYTHON
9080
    fi
9081
  ])
9082
9083
  if test "$PYTHON" = :; then
9084
  dnl Run any user-specified action, or abort.
9085
    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
9086
  else
9087
9088
  dnl Query Python for its version number.  Getting [:3] seems to be
9089
  dnl the best way to do this; it's what "site.py" does in the standard
9090
  dnl library.
9091
9092
  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
9093
    [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
9094
  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
9095
9096
  dnl Use the values of $prefix and $exec_prefix for the corresponding
9097
  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
9098
  dnl distinct variables so they can be overridden if need be.  However,
9099
  dnl general consensus is that you shouldn't need this ability.
9100
9101
  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
9102
  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
9103
9104
  dnl At times (like when building shared libraries) you may want
9105
  dnl to know which OS platform Python thinks this is.
9106
9107
  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
9108
    [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
9109
  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
9110
9111
9112
  dnl Set up 4 directories:
9113
9114
  dnl pythondir -- where to install python scripts.  This is the
9115
  dnl   site-packages directory, not the python standard library
9116
  dnl   directory like in previous automake betas.  This behavior
9117
  dnl   is more consistent with lispdir.m4 for example.
9118
  dnl Query distutils for this directory.  distutils does not exist in
9119
  dnl Python 1.5, so we fall back to the hardcoded directory if it
9120
  dnl doesn't work.
9121
  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
9122
    [am_cv_python_pythondir],
9123
    [if test "x$prefix" = xNONE
9124
     then
9125
       py_prefix_arg=
9126
     else
9127
       py_prefix_arg=",prefix='$prefix'"
9128
     fi
9129
     am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0$py_prefix_arg)" -n -q install $py_prefix_arg 2>/dev/null ||
9130
     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
9131
  AC_SUBST([pythondir], [$am_cv_python_pythondir])
9132
9133
  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
9134
  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
9135
  dnl   more consistent with the rest of automake.
9136
9137
  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
9138
9139
  dnl pyexecdir -- directory for installing python extension modules
9140
  dnl   (shared libraries)
9141
  dnl Query distutils for this directory.  distutils does not exist in
9142
  dnl Python 1.5, so we fall back to the hardcoded directory if it
9143
  dnl doesn't work.
9144
  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
9145
    [am_cv_python_pyexecdir],
9146
    [if test "x$exec_prefix" = xNONE
9147
     then
9148
       py_exec_prefix_arg=$py_prefix_arg
9149
     else
9150
       py_exec_prefix_arg=",prefix='$exec_prefix'"
9151
     fi
9152
     am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0$py_exec_prefix_arg)" -n -q install $py_exec_prefix_arg 2>/dev/null ||
9153
     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
9154
  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
9155
9156
  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
9157
9158
  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
9159
9160
  dnl Run any user-specified action.
9161
  $2
9162
  fi
9163
9164
])
9165
9166
9167
# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
9168
# ---------------------------------------------------------------------------
9169
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
9170
# Run ACTION-IF-FALSE otherwise.
9171
# This test uses sys.hexversion instead of the string equivalent (first
9172
# word of sys.version), in order to cope with versions such as 2.2c1.
9173
# hexversion has been introduced in Python 1.5.2; it's probably not
9174
# worth to support older versions (1.5.1 was released on October 31, 1998).
9175
AC_DEFUN([AM_PYTHON_CHECK_VERSION],
9176
 [prog="import sys, string
9177
# split strings by '.' and convert to numeric.  Append some zeros
9178
# because we need at least 4 digits for the hex conversion.
9179
minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
9180
minverhex = 0
9181
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
9182
sys.exit(sys.hexversion < minverhex)"
9183
  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
9184
9185
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9186
9187
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9188
# Free Software Foundation, Inc.
9189
#
9190
# This file is free software; the Free Software Foundation
9191
# gives unlimited permission to copy and/or distribute it,
9192
# with or without modifications, as long as this notice is preserved.
9193
9194
# serial 4
9195
9196
# AM_SANITY_CHECK
9197
# ---------------
9198
AC_DEFUN([AM_SANITY_CHECK],
9199
[AC_MSG_CHECKING([whether build environment is sane])
9200
# Just in case
9201
sleep 1
9202
echo timestamp > conftest.file
9203
# Do `set' in a subshell so we don't clobber the current shell's
9204
# arguments.  Must try -L first in case configure is actually a
9205
# symlink; some systems play weird games with the mod time of symlinks
9206
# (eg FreeBSD returns the mod time of the symlink's containing
9207
# directory).
9208
if (
9209
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
9210
   if test "$[*]" = "X"; then
9211
      # -L didn't work.
9212
      set X `ls -t $srcdir/configure conftest.file`
9213
   fi
9214
   rm -f conftest.file
9215
   if test "$[*]" != "X $srcdir/configure conftest.file" \
9216
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
9217
9218
      # If neither matched, then we have a broken ls.  This can happen
9219
      # if, for instance, CONFIG_SHELL is bash and it inherits a
9220
      # broken ls alias from the environment.  This has actually
9221
      # happened.  Such a system could not be considered "sane".
9222
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9223
alias in your environment])
9224
   fi
9225
9226
   test "$[2]" = conftest.file
9227
   )
9228
then
9229
   # Ok.
9230
   :
9231
else
9232
   AC_MSG_ERROR([newly created file is older than distributed files!
9233
Check your system clock])
9234
fi
9235
AC_MSG_RESULT(yes)])
9236
9237
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9238
#
9239
# This file is free software; the Free Software Foundation
9240
# gives unlimited permission to copy and/or distribute it,
9241
# with or without modifications, as long as this notice is preserved.
9242
9243
# AM_PROG_INSTALL_STRIP
9244
# ---------------------
9245
# One issue with vendor `install' (even GNU) is that you can't
9246
# specify the program used to strip binaries.  This is especially
9247
# annoying in cross-compiling environments, where the build's strip
9248
# is unlikely to handle the host's binaries.
9249
# Fortunately install-sh will honor a STRIPPROG variable, so we
9250
# always use install-sh in `make install-strip', and initialize
9251
# STRIPPROG with the value of the STRIP variable (set by the user).
9252
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9253
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9254
# Installed binaries are usually stripped using `strip' when the user
9255
# run `make install-strip'.  However `strip' might not be the right
9256
# tool to use in cross-compilation environments, therefore Automake
9257
# will honor the `STRIP' environment variable to overrule this program.
9258
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9259
if test "$cross_compiling" != no; then
9260
  AC_CHECK_TOOL([STRIP], [strip], :)
9261
fi
9262
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9263
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9264
9265
# Copyright (C) 2006  Free Software Foundation, Inc.
9266
#
9267
# This file is free software; the Free Software Foundation
9268
# gives unlimited permission to copy and/or distribute it,
9269
# with or without modifications, as long as this notice is preserved.
9270
9271
# _AM_SUBST_NOTMAKE(VARIABLE)
9272
# ---------------------------
9273
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9274
# This macro is traced by Automake.
9275
AC_DEFUN([_AM_SUBST_NOTMAKE])
9276
9277
# Check how to create a tarball.                            -*- Autoconf -*-
9278
9279
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9280
#
9281
# This file is free software; the Free Software Foundation
9282
# gives unlimited permission to copy and/or distribute it,
9283
# with or without modifications, as long as this notice is preserved.
9284
9285
# serial 2
9286
9287
# _AM_PROG_TAR(FORMAT)
9288
# --------------------
9289
# Check how to create a tarball in format FORMAT.
9290
# FORMAT should be one of `v7', `ustar', or `pax'.
9291
#
9292
# Substitute a variable $(am__tar) that is a command
9293
# writing to stdout a FORMAT-tarball containing the directory
9294
# $tardir.
9295
#     tardir=directory && $(am__tar) > result.tar
9296
#
9297
# Substitute a variable $(am__untar) that extract such
9298
# a tarball read from stdin.
9299
#     $(am__untar) < result.tar
9300
AC_DEFUN([_AM_PROG_TAR],
9301
[# Always define AMTAR for backward compatibility.
9302
AM_MISSING_PROG([AMTAR], [tar])
9303
m4_if([$1], [v7],
9304
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9305
     [m4_case([$1], [ustar],, [pax],,
9306
              [m4_fatal([Unknown tar format])])
9307
AC_MSG_CHECKING([how to create a $1 tar archive])
9308
# Loop over all known methods to create a tar archive until one works.
9309
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9310
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9311
# Do not fold the above two line into one, because Tru64 sh and
9312
# Solaris sh will not grok spaces in the rhs of `-'.
9313
for _am_tool in $_am_tools
9314
do
9315
  case $_am_tool in
9316
  gnutar)
9317
    for _am_tar in tar gnutar gtar;
9318
    do
9319
      AM_RUN_LOG([$_am_tar --version]) && break
9320
    done
9321
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9322
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9323
    am__untar="$_am_tar -xf -"
9324
    ;;
9325
  plaintar)
9326
    # Must skip GNU tar: if it does not support --format= it doesn't create
9327
    # ustar tarball either.
9328
    (tar --version) >/dev/null 2>&1 && continue
9329
    am__tar='tar chf - "$$tardir"'
9330
    am__tar_='tar chf - "$tardir"'
9331
    am__untar='tar xf -'
9332
    ;;
9333
  pax)
9334
    am__tar='pax -L -x $1 -w "$$tardir"'
9335
    am__tar_='pax -L -x $1 -w "$tardir"'
9336
    am__untar='pax -r'
9337
    ;;
9338
  cpio)
9339
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9340
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9341
    am__untar='cpio -i -H $1 -d'
9342
    ;;
9343
  none)
9344
    am__tar=false
9345
    am__tar_=false
9346
    am__untar=false
9347
    ;;
9348
  esac
9349
9350
  # If the value was cached, stop now.  We just wanted to have am__tar
9351
  # and am__untar set.
9352
  test -n "${am_cv_prog_tar_$1}" && break
9353
9354
  # tar/untar a dummy directory, and stop if the command works
9355
  rm -rf conftest.dir
9356
  mkdir conftest.dir
9357
  echo GrepMe > conftest.dir/file
9358
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9359
  rm -rf conftest.dir
9360
  if test -s conftest.tar; then
9361
    AM_RUN_LOG([$am__untar <conftest.tar])
9362
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9363
  fi
9364
done
9365
rm -rf conftest.dir
9366
9367
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9368
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9369
AC_SUBST([am__tar])
9370
AC_SUBST([am__untar])
9371
]) # _AM_PROG_TAR
9372
9373
m4_include([m4/python.m4])