~muktupavels/metacity/adwaita-icon-theme-lp-1414613

1.2.58 by Didier Roche
Import upstream version 2.30.0
1
# generated automatically by aclocal 1.11 -*- Autoconf -*-
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
2
1.2.28 by Daniel Holbach
Import upstream version 2.19.5
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1.2.58 by Didier Roche
Import upstream version 2.30.0
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
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.
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
8
9
# This program is distributed in the hope that it will be useful,
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
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
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1.2.57 by Didier Roche
Import upstream version 2.28.1
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17
[m4_warning([this file was generated for autoconf 2.63.
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
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'.])])
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
21
1.2.58 by Didier Roche
Import upstream version 2.30.0
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23
#
24
# This file is free software; the Free Software Foundation
25
# gives unlimited permission to copy and/or distribute it,
26
# with or without modifications, as long as this notice is preserved.
27
28
# AM_AUTOMAKE_VERSION(VERSION)
29
# ----------------------------
30
# Automake X.Y traces this macro to ensure aclocal.m4 has been
31
# generated from the m4 files accompanying Automake X.Y.
32
# (This private macro should not be called outside this file.)
33
AC_DEFUN([AM_AUTOMAKE_VERSION],
34
[am__api_version='1.11'
35
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36
dnl require some minimum version.  Point them to the right macro.
37
m4_if([$1], [1.11], [],
38
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39
])
40
41
# _AM_AUTOCONF_VERSION(VERSION)
42
# -----------------------------
43
# aclocal traces this macro to find the Autoconf version.
44
# This is a private macro too.  Using m4_define simplifies
45
# the logic in aclocal, which can simply ignore this definition.
46
m4_define([_AM_AUTOCONF_VERSION], [])
47
48
# AM_SET_CURRENT_AUTOMAKE_VERSION
49
# -------------------------------
50
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
[AM_AUTOMAKE_VERSION([1.11])dnl
54
m4_ifndef([AC_AUTOCONF_VERSION],
55
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
60
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61
#
62
# This file is free software; the Free Software Foundation
63
# gives unlimited permission to copy and/or distribute it,
64
# with or without modifications, as long as this notice is preserved.
65
66
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69
#
70
# Of course, Automake must honor this variable whenever it calls a
71
# tool from the auxiliary directory.  The problem is that $srcdir (and
72
# therefore $ac_aux_dir as well) can be either absolute or relative,
73
# depending on how configure is run.  This is pretty annoying, since
74
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75
# source directory, any form will work fine, but in subdirectories a
76
# relative path needs to be adjusted first.
77
#
78
# $ac_aux_dir/missing
79
#    fails when called from a subdirectory if $ac_aux_dir is relative
80
# $top_srcdir/$ac_aux_dir/missing
81
#    fails if $ac_aux_dir is absolute,
82
#    fails when called from a subdirectory in a VPATH build with
83
#          a relative $ac_aux_dir
84
#
85
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86
# are both prefixed by $srcdir.  In an in-source build this is usually
87
# harmless because $srcdir is `.', but things will broke when you
88
# start a VPATH build or use an absolute $srcdir.
89
#
90
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93
# and then we would define $MISSING as
94
#   MISSING="\${SHELL} $am_aux_dir/missing"
95
# This will work as long as MISSING is not called from configure, because
96
# unfortunately $(top_srcdir) has no meaning in configure.
97
# However there are other variables, like CC, which are often used in
98
# configure, and could therefore not use this "fixed" $ac_aux_dir.
99
#
100
# Another solution, used here, is to always expand $ac_aux_dir to an
101
# absolute PATH.  The drawback is that using absolute paths prevent a
102
# configured tree to be moved without reconfiguration.
103
104
AC_DEFUN([AM_AUX_DIR_EXPAND],
105
[dnl Rely on autoconf to set up CDPATH properly.
106
AC_PREREQ([2.50])dnl
107
# expand $ac_aux_dir to an absolute path
108
am_aux_dir=`cd $ac_aux_dir && pwd`
109
])
110
111
# AM_CONDITIONAL                                            -*- Autoconf -*-
112
113
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114
# Free Software Foundation, Inc.
115
#
116
# This file is free software; the Free Software Foundation
117
# gives unlimited permission to copy and/or distribute it,
118
# with or without modifications, as long as this notice is preserved.
119
120
# serial 9
121
122
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123
# -------------------------------------
124
# Define a conditional.
125
AC_DEFUN([AM_CONDITIONAL],
126
[AC_PREREQ(2.52)dnl
127
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129
AC_SUBST([$1_TRUE])dnl
130
AC_SUBST([$1_FALSE])dnl
131
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
133
m4_define([_AM_COND_VALUE_$1], [$2])dnl
134
if $2; then
135
  $1_TRUE=
136
  $1_FALSE='#'
137
else
138
  $1_TRUE='#'
139
  $1_FALSE=
140
fi
141
AC_CONFIG_COMMANDS_PRE(
142
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143
  AC_MSG_ERROR([[conditional "$1" was never defined.
144
Usually this means the macro was only invoked conditionally.]])
145
fi])])
146
147
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148
# Free Software Foundation, Inc.
149
#
150
# This file is free software; the Free Software Foundation
151
# gives unlimited permission to copy and/or distribute it,
152
# with or without modifications, as long as this notice is preserved.
153
154
# serial 10
155
156
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157
# written in clear, in which case automake, when reading aclocal.m4,
158
# will think it sees a *use*, and therefore will trigger all it's
159
# C support machinery.  Also note that it means that autoscan, seeing
160
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161
162
163
# _AM_DEPENDENCIES(NAME)
164
# ----------------------
165
# See how the compiler implements dependency checking.
166
# NAME is "CC", "CXX", "GCJ", or "OBJC".
167
# We try a few techniques and use that to set a single cache variable.
168
#
169
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171
# dependency, and given that the user is not expected to run this macro,
172
# just rely on AC_PROG_CC.
173
AC_DEFUN([_AM_DEPENDENCIES],
174
[AC_REQUIRE([AM_SET_DEPDIR])dnl
175
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177
AC_REQUIRE([AM_DEP_TRACK])dnl
178
179
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184
                   [depcc="$$1"   am_compiler_list=])
185
186
AC_CACHE_CHECK([dependency style of $depcc],
187
               [am_cv_$1_dependencies_compiler_type],
188
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189
  # We make a subdir and do the tests there.  Otherwise we can end up
190
  # making bogus files that we don't know about and never remove.  For
191
  # instance it was reported that on HP-UX the gcc test will end up
192
  # making a dummy file named `D' -- because `-MD' means `put the output
193
  # in D'.
194
  mkdir conftest.dir
195
  # Copy depcomp to subdir because otherwise we won't find it if we're
196
  # using a relative directory.
197
  cp "$am_depcomp" conftest.dir
198
  cd conftest.dir
199
  # We will build objects and dependencies in a subdirectory because
200
  # it helps to detect inapplicable dependency modes.  For instance
201
  # both Tru64's cc and ICC support -MD to output dependencies as a
202
  # side effect of compilation, but ICC will put the dependencies in
203
  # the current directory while Tru64 will put them in the object
204
  # directory.
205
  mkdir sub
206
207
  am_cv_$1_dependencies_compiler_type=none
208
  if test "$am_compiler_list" = ""; then
209
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210
  fi
211
  am__universal=false
212
  m4_case([$1], [CC],
213
    [case " $depcc " in #(
214
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
215
     esac],
216
    [CXX],
217
    [case " $depcc " in #(
218
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
219
     esac])
220
221
  for depmode in $am_compiler_list; do
222
    # Setup a source with many dependencies, because some compilers
223
    # like to wrap large dependency lists on column 80 (with \), and
224
    # we should not choose a depcomp mode which is confused by this.
225
    #
226
    # We need to recreate these files for each test, as the compiler may
227
    # overwrite some of them when testing with obscure command lines.
228
    # This happens at least with the AIX C compiler.
229
    : > sub/conftest.c
230
    for i in 1 2 3 4 5 6; do
231
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
232
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233
      # Solaris 8's {/usr,}/bin/sh.
234
      touch sub/conftst$i.h
235
    done
236
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237
238
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
239
    # mode.  It turns out that the SunPro C++ compiler does not properly
240
    # handle `-M -o', and we need to detect this.  Also, some Intel
241
    # versions had trouble with output in subdirs
242
    am__obj=sub/conftest.${OBJEXT-o}
243
    am__minus_obj="-o $am__obj"
244
    case $depmode in
245
    gcc)
246
      # This depmode causes a compiler race in universal mode.
247
      test "$am__universal" = false || continue
248
      ;;
249
    nosideeffect)
250
      # after this tag, mechanisms are not by side-effect, so they'll
251
      # only be used when explicitly requested
252
      if test "x$enable_dependency_tracking" = xyes; then
253
	continue
254
      else
255
	break
256
      fi
257
      ;;
258
    msvisualcpp | msvcmsys)
259
      # This compiler won't grok `-c -o', but also, the minuso test has
260
      # not run yet.  These depmodes are late enough in the game, and
261
      # so weak that their functioning should not be impacted.
262
      am__obj=conftest.${OBJEXT-o}
263
      am__minus_obj=
264
      ;;
265
    none) break ;;
266
    esac
267
    if depmode=$depmode \
268
       source=sub/conftest.c object=$am__obj \
269
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271
         >/dev/null 2>conftest.err &&
272
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276
      # icc doesn't choke on unknown options, it will just issue warnings
277
      # or remarks (even with -Werror).  So we grep stderr for any message
278
      # that says an option was ignored or not supported.
279
      # When given -MP, icc 7.0 and 7.1 complain thusly:
280
      #   icc: Command line warning: ignoring option '-M'; no argument required
281
      # The diagnosis changed in icc 8.0:
282
      #   icc: Command line remark: option '-MP' not supported
283
      if (grep 'ignoring option' conftest.err ||
284
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285
        am_cv_$1_dependencies_compiler_type=$depmode
286
        break
287
      fi
288
    fi
289
  done
290
291
  cd ..
292
  rm -rf conftest.dir
293
else
294
  am_cv_$1_dependencies_compiler_type=none
295
fi
296
])
297
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298
AM_CONDITIONAL([am__fastdep$1], [
299
  test "x$enable_dependency_tracking" != xno \
300
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
301
])
302
303
304
# AM_SET_DEPDIR
305
# -------------
306
# Choose a directory name for dependency files.
307
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
308
AC_DEFUN([AM_SET_DEPDIR],
309
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
311
])
312
313
314
# AM_DEP_TRACK
315
# ------------
316
AC_DEFUN([AM_DEP_TRACK],
317
[AC_ARG_ENABLE(dependency-tracking,
318
[  --disable-dependency-tracking  speeds up one-time build
319
  --enable-dependency-tracking   do not reject slow dependency extractors])
320
if test "x$enable_dependency_tracking" != xno; then
321
  am_depcomp="$ac_aux_dir/depcomp"
322
  AMDEPBACKSLASH='\'
323
fi
324
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325
AC_SUBST([AMDEPBACKSLASH])dnl
326
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
327
])
328
329
# Generate code to set up dependency tracking.              -*- Autoconf -*-
330
331
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332
# Free Software Foundation, Inc.
333
#
334
# This file is free software; the Free Software Foundation
335
# gives unlimited permission to copy and/or distribute it,
336
# with or without modifications, as long as this notice is preserved.
337
338
#serial 5
339
340
# _AM_OUTPUT_DEPENDENCY_COMMANDS
341
# ------------------------------
342
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343
[{
344
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
345
  # are listed without --file.  Let's play safe and only enable the eval
346
  # if we detect the quoting.
347
  case $CONFIG_FILES in
348
  *\'*) eval set x "$CONFIG_FILES" ;;
349
  *)   set x $CONFIG_FILES ;;
350
  esac
351
  shift
352
  for mf
353
  do
354
    # Strip MF so we end up with the name of the file.
355
    mf=`echo "$mf" | sed -e 's/:.*$//'`
356
    # Check whether this is an Automake generated Makefile or not.
357
    # We used to match only the files named `Makefile.in', but
358
    # some people rename them; so instead we look at the file content.
359
    # Grep'ing the first line is not enough: some people post-process
360
    # each Makefile.in and add a new line on top of each file to say so.
361
    # Grep'ing the whole file is not good either: AIX grep has a line
362
    # limit of 2048, but all sed's we know have understand at least 4000.
363
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364
      dirpart=`AS_DIRNAME("$mf")`
365
    else
366
      continue
367
    fi
368
    # Extract the definition of DEPDIR, am__include, and am__quote
369
    # from the Makefile without running `make'.
370
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371
    test -z "$DEPDIR" && continue
372
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
373
    test -z "am__include" && continue
374
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375
    # When using ansi2knr, U may be empty or an underscore; expand it
376
    U=`sed -n 's/^U = //p' < "$mf"`
377
    # Find all dependency output files, they are included files with
378
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
379
    # simplest approach to changing $(DEPDIR) to its actual value in the
380
    # expansion.
381
    for file in `sed -n "
382
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384
      # Make sure the directory exists.
385
      test -f "$dirpart/$file" && continue
386
      fdir=`AS_DIRNAME(["$file"])`
387
      AS_MKDIR_P([$dirpart/$fdir])
388
      # echo "creating $dirpart/$file"
389
      echo '# dummy' > "$dirpart/$file"
390
    done
391
  done
392
}
393
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394
395
396
# AM_OUTPUT_DEPENDENCY_COMMANDS
397
# -----------------------------
398
# This macro should only be invoked once -- use via AC_REQUIRE.
399
#
400
# This code is only required when automatic dependency tracking
401
# is enabled.  FIXME.  This creates each `.P' file that we will
402
# need in order to bootstrap the dependency handling code.
403
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404
[AC_CONFIG_COMMANDS([depfiles],
405
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407
])
408
409
# Do all the work for Automake.                             -*- Autoconf -*-
410
411
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
413
#
414
# This file is free software; the Free Software Foundation
415
# gives unlimited permission to copy and/or distribute it,
416
# with or without modifications, as long as this notice is preserved.
417
418
# serial 16
419
420
# This macro actually does too much.  Some checks are only needed if
421
# your package does certain things.  But this isn't really a big deal.
422
423
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424
# AM_INIT_AUTOMAKE([OPTIONS])
425
# -----------------------------------------------
426
# The call with PACKAGE and VERSION arguments is the old style
427
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
428
# and VERSION should now be passed to AC_INIT and removed from
429
# the call to AM_INIT_AUTOMAKE.
430
# We support both call styles for the transition.  After
431
# the next Automake release, Autoconf can make the AC_INIT
432
# arguments mandatory, and then we can depend on a new Autoconf
433
# release and drop the old call support.
434
AC_DEFUN([AM_INIT_AUTOMAKE],
435
[AC_PREREQ([2.62])dnl
436
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
437
dnl the ones we care about.
438
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
439
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
440
AC_REQUIRE([AC_PROG_INSTALL])dnl
441
if test "`cd $srcdir && pwd`" != "`pwd`"; then
442
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
443
  # is not polluted with repeated "-I."
444
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
445
  # test to see if srcdir already configured
446
  if test -f $srcdir/config.status; then
447
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
448
  fi
449
fi
450
451
# test whether we have cygpath
452
if test -z "$CYGPATH_W"; then
453
  if (cygpath --version) >/dev/null 2>/dev/null; then
454
    CYGPATH_W='cygpath -w'
455
  else
456
    CYGPATH_W=echo
457
  fi
458
fi
459
AC_SUBST([CYGPATH_W])
460
461
# Define the identity of the package.
462
dnl Distinguish between old-style and new-style calls.
463
m4_ifval([$2],
464
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465
 AC_SUBST([PACKAGE], [$1])dnl
466
 AC_SUBST([VERSION], [$2])],
467
[_AM_SET_OPTIONS([$1])dnl
468
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
470
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
473
474
_AM_IF_OPTION([no-define],,
475
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
477
478
# Some tools Automake needs.
479
AC_REQUIRE([AM_SANITY_CHECK])dnl
480
AC_REQUIRE([AC_ARG_PROGRAM])dnl
481
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482
AM_MISSING_PROG(AUTOCONF, autoconf)
483
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484
AM_MISSING_PROG(AUTOHEADER, autoheader)
485
AM_MISSING_PROG(MAKEINFO, makeinfo)
486
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
489
# We need awk for the "check" target.  The system "awk" is bad on
490
# some platforms.
491
AC_REQUIRE([AC_PROG_AWK])dnl
492
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
493
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
494
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
495
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
496
			     [_AM_PROG_TAR([v7])])])
497
_AM_IF_OPTION([no-dependencies],,
498
[AC_PROVIDE_IFELSE([AC_PROG_CC],
499
		  [_AM_DEPENDENCIES(CC)],
500
		  [define([AC_PROG_CC],
501
			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
502
AC_PROVIDE_IFELSE([AC_PROG_CXX],
503
		  [_AM_DEPENDENCIES(CXX)],
504
		  [define([AC_PROG_CXX],
505
			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
506
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507
		  [_AM_DEPENDENCIES(OBJC)],
508
		  [define([AC_PROG_OBJC],
509
			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
510
])
511
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
514
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515
AC_CONFIG_COMMANDS_PRE(dnl
516
[m4_provide_if([_AM_COMPILER_EXEEXT],
517
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
518
])
519
520
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
521
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522
dnl mangled by Autoconf and run in a shell conditional statement.
523
m4_define([_AC_COMPILER_EXEEXT],
524
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
525
526
527
# When config.status generates a header, we must update the stamp-h file.
528
# This file resides in the same directory as the config header
529
# that is generated.  The stamp files are numbered to have different names.
530
531
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532
# loop where config.status creates the headers, so we can generate
533
# our stamp files there.
534
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535
[# Compute $1's index in $config_headers.
536
_am_arg=$1
537
_am_stamp_count=1
538
for _am_header in $config_headers :; do
539
  case $_am_header in
540
    $_am_arg | $_am_arg:* )
541
      break ;;
542
    * )
543
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
544
  esac
545
done
546
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
547
548
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
549
#
550
# This file is free software; the Free Software Foundation
551
# gives unlimited permission to copy and/or distribute it,
552
# with or without modifications, as long as this notice is preserved.
553
554
# AM_PROG_INSTALL_SH
555
# ------------------
556
# Define $install_sh.
557
AC_DEFUN([AM_PROG_INSTALL_SH],
558
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
559
if test x"${install_sh}" != xset; then
560
  case $am_aux_dir in
561
  *\ * | *\	*)
562
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
563
  *)
564
    install_sh="\${SHELL} $am_aux_dir/install-sh"
565
  esac
566
fi
567
AC_SUBST(install_sh)])
568
569
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
570
#
571
# This file is free software; the Free Software Foundation
572
# gives unlimited permission to copy and/or distribute it,
573
# with or without modifications, as long as this notice is preserved.
574
575
# serial 2
576
577
# Check whether the underlying file-system supports filenames
578
# with a leading dot.  For instance MS-DOS doesn't.
579
AC_DEFUN([AM_SET_LEADING_DOT],
580
[rm -rf .tst 2>/dev/null
581
mkdir .tst 2>/dev/null
582
if test -d .tst; then
583
  am__leading_dot=.
584
else
585
  am__leading_dot=_
586
fi
587
rmdir .tst 2>/dev/null
588
AC_SUBST([am__leading_dot])])
589
590
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
591
# From Jim Meyering
592
593
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594
# Free Software Foundation, Inc.
595
#
596
# This file is free software; the Free Software Foundation
597
# gives unlimited permission to copy and/or distribute it,
598
# with or without modifications, as long as this notice is preserved.
599
600
# serial 5
601
602
# AM_MAINTAINER_MODE([DEFAULT-MODE])
603
# ----------------------------------
604
# Control maintainer-specific portions of Makefiles.
605
# Default is to disable them, unless `enable' is passed literally.
606
# For symmetry, `disable' may be passed as well.  Anyway, the user
607
# can override the default with the --enable/--disable switch.
608
AC_DEFUN([AM_MAINTAINER_MODE],
609
[m4_case(m4_default([$1], [disable]),
610
       [enable], [m4_define([am_maintainer_other], [disable])],
611
       [disable], [m4_define([am_maintainer_other], [enable])],
612
       [m4_define([am_maintainer_other], [enable])
613
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616
  AC_ARG_ENABLE([maintainer-mode],
617
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
618
			  (and sometimes confusing) to the casual installer],
619
      [USE_MAINTAINER_MODE=$enableval],
620
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623
  MAINT=$MAINTAINER_MODE_TRUE
624
  AC_SUBST([MAINT])dnl
625
]
626
)
627
628
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
629
630
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
631
632
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
633
#
634
# This file is free software; the Free Software Foundation
635
# gives unlimited permission to copy and/or distribute it,
636
# with or without modifications, as long as this notice is preserved.
637
638
# serial 4
639
640
# AM_MAKE_INCLUDE()
641
# -----------------
642
# Check to see how make treats includes.
643
AC_DEFUN([AM_MAKE_INCLUDE],
644
[am_make=${MAKE-make}
645
cat > confinc << 'END'
646
am__doit:
647
	@echo this is the am__doit target
648
.PHONY: am__doit
649
END
650
# If we don't find an include directive, just comment out the code.
651
AC_MSG_CHECKING([for style of include used by $am_make])
652
am__include="#"
653
am__quote=
654
_am_result=none
655
# First try GNU make style include.
656
echo "include confinc" > confmf
657
# Ignore all kinds of additional output from `make'.
658
case `$am_make -s -f confmf 2> /dev/null` in #(
659
*the\ am__doit\ target*)
660
  am__include=include
661
  am__quote=
662
  _am_result=GNU
663
  ;;
664
esac
665
# Now try BSD make style include.
666
if test "$am__include" = "#"; then
667
   echo '.include "confinc"' > confmf
668
   case `$am_make -s -f confmf 2> /dev/null` in #(
669
   *the\ am__doit\ target*)
670
     am__include=.include
671
     am__quote="\""
672
     _am_result=BSD
673
     ;;
674
   esac
675
fi
676
AC_SUBST([am__include])
677
AC_SUBST([am__quote])
678
AC_MSG_RESULT([$_am_result])
679
rm -f confinc confmf
680
])
681
682
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
683
684
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685
# Free Software Foundation, Inc.
686
#
687
# This file is free software; the Free Software Foundation
688
# gives unlimited permission to copy and/or distribute it,
689
# with or without modifications, as long as this notice is preserved.
690
691
# serial 6
692
693
# AM_MISSING_PROG(NAME, PROGRAM)
694
# ------------------------------
695
AC_DEFUN([AM_MISSING_PROG],
696
[AC_REQUIRE([AM_MISSING_HAS_RUN])
697
$1=${$1-"${am_missing_run}$2"}
698
AC_SUBST($1)])
699
700
701
# AM_MISSING_HAS_RUN
702
# ------------------
703
# Define MISSING if not defined so far and test if it supports --run.
704
# If it does, set am_missing_run to use it, otherwise, to nothing.
705
AC_DEFUN([AM_MISSING_HAS_RUN],
706
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707
AC_REQUIRE_AUX_FILE([missing])dnl
708
if test x"${MISSING+set}" != xset; then
709
  case $am_aux_dir in
710
  *\ * | *\	*)
711
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
712
  *)
713
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
714
  esac
715
fi
716
# Use eval to expand $SHELL
717
if eval "$MISSING --run true"; then
718
  am_missing_run="$MISSING --run "
719
else
720
  am_missing_run=
721
  AC_MSG_WARN([`missing' script is too old or missing])
722
fi
723
])
724
725
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
726
#
727
# This file is free software; the Free Software Foundation
728
# gives unlimited permission to copy and/or distribute it,
729
# with or without modifications, as long as this notice is preserved.
730
731
# AM_PROG_MKDIR_P
732
# ---------------
733
# Check for `mkdir -p'.
734
AC_DEFUN([AM_PROG_MKDIR_P],
735
[AC_PREREQ([2.60])dnl
736
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
737
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
738
dnl while keeping a definition of mkdir_p for backward compatibility.
739
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741
dnl Makefile.ins that do not define MKDIR_P, so we do our own
742
dnl adjustment using top_builddir (which is defined more often than
743
dnl MKDIR_P).
744
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
745
case $mkdir_p in
746
  [[\\/$]]* | ?:[[\\/]]*) ;;
747
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
748
esac
749
])
750
751
# Helper functions for option handling.                     -*- Autoconf -*-
752
753
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
754
#
755
# This file is free software; the Free Software Foundation
756
# gives unlimited permission to copy and/or distribute it,
757
# with or without modifications, as long as this notice is preserved.
758
759
# serial 4
760
761
# _AM_MANGLE_OPTION(NAME)
762
# -----------------------
763
AC_DEFUN([_AM_MANGLE_OPTION],
764
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
765
766
# _AM_SET_OPTION(NAME)
767
# ------------------------------
768
# Set option NAME.  Presently that only means defining a flag for this option.
769
AC_DEFUN([_AM_SET_OPTION],
770
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
771
772
# _AM_SET_OPTIONS(OPTIONS)
773
# ----------------------------------
774
# OPTIONS is a space-separated list of Automake options.
775
AC_DEFUN([_AM_SET_OPTIONS],
776
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
777
778
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
779
# -------------------------------------------
780
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
781
AC_DEFUN([_AM_IF_OPTION],
782
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
783
784
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
785
786
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787
# Free Software Foundation, Inc.
788
#
789
# This file is free software; the Free Software Foundation
790
# gives unlimited permission to copy and/or distribute it,
791
# with or without modifications, as long as this notice is preserved.
792
793
# serial 5
794
795
# AM_SANITY_CHECK
796
# ---------------
797
AC_DEFUN([AM_SANITY_CHECK],
798
[AC_MSG_CHECKING([whether build environment is sane])
799
# Just in case
800
sleep 1
801
echo timestamp > conftest.file
802
# Reject unsafe characters in $srcdir or the absolute working directory
803
# name.  Accept space and tab only in the latter.
804
am_lf='
805
'
806
case `pwd` in
807
  *[[\\\"\#\$\&\'\`$am_lf]]*)
808
    AC_MSG_ERROR([unsafe absolute working directory name]);;
809
esac
810
case $srcdir in
811
  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
812
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
813
esac
814
815
# Do `set' in a subshell so we don't clobber the current shell's
816
# arguments.  Must try -L first in case configure is actually a
817
# symlink; some systems play weird games with the mod time of symlinks
818
# (eg FreeBSD returns the mod time of the symlink's containing
819
# directory).
820
if (
821
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822
   if test "$[*]" = "X"; then
823
      # -L didn't work.
824
      set X `ls -t "$srcdir/configure" conftest.file`
825
   fi
826
   rm -f conftest.file
827
   if test "$[*]" != "X $srcdir/configure conftest.file" \
828
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
829
830
      # If neither matched, then we have a broken ls.  This can happen
831
      # if, for instance, CONFIG_SHELL is bash and it inherits a
832
      # broken ls alias from the environment.  This has actually
833
      # happened.  Such a system could not be considered "sane".
834
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
835
alias in your environment])
836
   fi
837
838
   test "$[2]" = conftest.file
839
   )
840
then
841
   # Ok.
842
   :
843
else
844
   AC_MSG_ERROR([newly created file is older than distributed files!
845
Check your system clock])
846
fi
847
AC_MSG_RESULT(yes)])
848
849
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
850
#
851
# This file is free software; the Free Software Foundation
852
# gives unlimited permission to copy and/or distribute it,
853
# with or without modifications, as long as this notice is preserved.
854
855
# AM_PROG_INSTALL_STRIP
856
# ---------------------
857
# One issue with vendor `install' (even GNU) is that you can't
858
# specify the program used to strip binaries.  This is especially
859
# annoying in cross-compiling environments, where the build's strip
860
# is unlikely to handle the host's binaries.
861
# Fortunately install-sh will honor a STRIPPROG variable, so we
862
# always use install-sh in `make install-strip', and initialize
863
# STRIPPROG with the value of the STRIP variable (set by the user).
864
AC_DEFUN([AM_PROG_INSTALL_STRIP],
865
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
866
# Installed binaries are usually stripped using `strip' when the user
867
# run `make install-strip'.  However `strip' might not be the right
868
# tool to use in cross-compilation environments, therefore Automake
869
# will honor the `STRIP' environment variable to overrule this program.
870
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
871
if test "$cross_compiling" != no; then
872
  AC_CHECK_TOOL([STRIP], [strip], :)
873
fi
874
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
875
AC_SUBST([INSTALL_STRIP_PROGRAM])])
876
877
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
878
#
879
# This file is free software; the Free Software Foundation
880
# gives unlimited permission to copy and/or distribute it,
881
# with or without modifications, as long as this notice is preserved.
882
883
# serial 2
884
885
# _AM_SUBST_NOTMAKE(VARIABLE)
886
# ---------------------------
887
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
888
# This macro is traced by Automake.
889
AC_DEFUN([_AM_SUBST_NOTMAKE])
890
891
# AM_SUBST_NOTMAKE(VARIABLE)
892
# ---------------------------
893
# Public sister of _AM_SUBST_NOTMAKE.
894
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
895
896
# Check how to create a tarball.                            -*- Autoconf -*-
897
898
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
899
#
900
# This file is free software; the Free Software Foundation
901
# gives unlimited permission to copy and/or distribute it,
902
# with or without modifications, as long as this notice is preserved.
903
904
# serial 2
905
906
# _AM_PROG_TAR(FORMAT)
907
# --------------------
908
# Check how to create a tarball in format FORMAT.
909
# FORMAT should be one of `v7', `ustar', or `pax'.
910
#
911
# Substitute a variable $(am__tar) that is a command
912
# writing to stdout a FORMAT-tarball containing the directory
913
# $tardir.
914
#     tardir=directory && $(am__tar) > result.tar
915
#
916
# Substitute a variable $(am__untar) that extract such
917
# a tarball read from stdin.
918
#     $(am__untar) < result.tar
919
AC_DEFUN([_AM_PROG_TAR],
920
[# Always define AMTAR for backward compatibility.
921
AM_MISSING_PROG([AMTAR], [tar])
922
m4_if([$1], [v7],
923
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
924
     [m4_case([$1], [ustar],, [pax],,
925
              [m4_fatal([Unknown tar format])])
926
AC_MSG_CHECKING([how to create a $1 tar archive])
927
# Loop over all known methods to create a tar archive until one works.
928
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
929
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
930
# Do not fold the above two line into one, because Tru64 sh and
931
# Solaris sh will not grok spaces in the rhs of `-'.
932
for _am_tool in $_am_tools
933
do
934
  case $_am_tool in
935
  gnutar)
936
    for _am_tar in tar gnutar gtar;
937
    do
938
      AM_RUN_LOG([$_am_tar --version]) && break
939
    done
940
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
941
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
942
    am__untar="$_am_tar -xf -"
943
    ;;
944
  plaintar)
945
    # Must skip GNU tar: if it does not support --format= it doesn't create
946
    # ustar tarball either.
947
    (tar --version) >/dev/null 2>&1 && continue
948
    am__tar='tar chf - "$$tardir"'
949
    am__tar_='tar chf - "$tardir"'
950
    am__untar='tar xf -'
951
    ;;
952
  pax)
953
    am__tar='pax -L -x $1 -w "$$tardir"'
954
    am__tar_='pax -L -x $1 -w "$tardir"'
955
    am__untar='pax -r'
956
    ;;
957
  cpio)
958
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
959
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
960
    am__untar='cpio -i -H $1 -d'
961
    ;;
962
  none)
963
    am__tar=false
964
    am__tar_=false
965
    am__untar=false
966
    ;;
967
  esac
968
969
  # If the value was cached, stop now.  We just wanted to have am__tar
970
  # and am__untar set.
971
  test -n "${am_cv_prog_tar_$1}" && break
972
973
  # tar/untar a dummy directory, and stop if the command works
974
  rm -rf conftest.dir
975
  mkdir conftest.dir
976
  echo GrepMe > conftest.dir/file
977
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
978
  rm -rf conftest.dir
979
  if test -s conftest.tar; then
980
    AM_RUN_LOG([$am__untar <conftest.tar])
981
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
982
  fi
983
done
984
rm -rf conftest.dir
985
986
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
987
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
988
AC_SUBST([am__tar])
989
AC_SUBST([am__untar])
990
]) # _AM_PROG_TAR
991
1.2.57 by Didier Roche
Import upstream version 2.28.1
992
dnl AM_GCONF_SOURCE_2
993
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
994
dnl  (i.e. pass to gconftool-2
995
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
996
dnl  you should install foo.schemas files
997
dnl
998
999
AC_DEFUN([AM_GCONF_SOURCE_2],
1000
[
1001
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
1002
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
1003
  else
1004
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
1005
  fi
1006
1007
  AC_ARG_WITH([gconf-source],
1008
	      AC_HELP_STRING([--with-gconf-source=sourceaddress],
1009
			     [Config database for installing schema files.]),
1010
	      [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
1011
1012
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
1013
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
1014
1015
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
1016
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
1017
  fi
1018
1019
  AC_ARG_WITH([gconf-schema-file-dir],
1020
	      AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
1021
			     [Directory for installing schema files.]),
1022
	      [GCONF_SCHEMA_FILE_DIR="$withval"],)
1023
1024
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
1025
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
1026
1027
  AC_ARG_ENABLE(schemas-install,
1.2.58 by Didier Roche
Import upstream version 2.30.0
1028
  	AC_HELP_STRING([--disable-schemas-install],
1029
		       [Disable the schemas installation]),
1.2.57 by Didier Roche
Import upstream version 2.28.1
1030
     [case ${enableval} in
1031
       yes|no) ;;
1.2.58 by Didier Roche
Import upstream version 2.30.0
1032
       *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
1.2.57 by Didier Roche
Import upstream version 2.28.1
1033
      esac])
1034
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
1035
])
1036
1037
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1038
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1039
#
1040
# This file is free software, distributed under the terms of the GNU
1041
# General Public License.  As a special exception to the GNU General
1042
# Public License, this file may be distributed as part of a program
1043
# that contains a configuration script generated by Autoconf, under
1044
# the same distribution terms as the rest of that program.
1045
#
1046
# This file can be copied and used freely without restrictions.  It can
1047
# be used in projects which are not available under the GNU Public License
1048
# but which still want to provide support for the GNU gettext functionality.
1049
#
1050
# Macro to add for using GNU gettext.
1051
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1052
#
1053
# Modified to never use included libintl. 
1054
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1055
#
1056
# Major rework to remove unused code
1057
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1058
#
1059
# Added better handling of ALL_LINGUAS from GNU gettext version 
1060
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1061
#
1062
# Modified to require ngettext
1063
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1064
#
1065
# We need this here as well, since someone might use autoconf-2.5x
1066
# to configure GLib then an older version to configure a package
1067
# using AM_GLIB_GNU_GETTEXT
1068
AC_PREREQ(2.53)
1069
1070
dnl
1071
dnl We go to great lengths to make sure that aclocal won't 
1072
dnl try to pull in the installed version of these macros
1073
dnl when running aclocal in the glib directory.
1074
dnl
1075
m4_copy([AC_DEFUN],[glib_DEFUN])
1076
m4_copy([AC_REQUIRE],[glib_REQUIRE])
1077
dnl
1078
dnl At the end, if we're not within glib, we'll define the public
1079
dnl definitions in terms of our private definitions.
1080
dnl
1081
1082
# GLIB_LC_MESSAGES
1083
#--------------------
1084
glib_DEFUN([GLIB_LC_MESSAGES],
1085
  [AC_CHECK_HEADERS([locale.h])
1086
    if test $ac_cv_header_locale_h = yes; then
1087
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1088
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1089
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1090
    if test $am_cv_val_LC_MESSAGES = yes; then
1091
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
1092
        [Define if your <locale.h> file defines LC_MESSAGES.])
1093
    fi
1094
  fi])
1095
1096
# GLIB_PATH_PROG_WITH_TEST
1097
#----------------------------
1098
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1099
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1100
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1101
[# Extract the first word of "$2", so it can be a program name with args.
1102
set dummy $2; ac_word=[$]2
1103
AC_MSG_CHECKING([for $ac_word])
1104
AC_CACHE_VAL(ac_cv_path_$1,
1105
[case "[$]$1" in
1106
  /*)
1107
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1108
  ;;
1109
  *)
1110
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1111
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
1112
    test -z "$ac_dir" && ac_dir=.
1113
    if test -f $ac_dir/$ac_word; then
1114
      if [$3]; then
1115
	ac_cv_path_$1="$ac_dir/$ac_word"
1116
	break
1117
      fi
1118
    fi
1119
  done
1120
  IFS="$ac_save_ifs"
1121
dnl If no 4th arg is given, leave the cache variable unset,
1122
dnl so AC_PATH_PROGS will keep looking.
1123
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1124
])dnl
1125
  ;;
1126
esac])dnl
1127
$1="$ac_cv_path_$1"
1128
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1129
  AC_MSG_RESULT([$]$1)
1130
else
1131
  AC_MSG_RESULT(no)
1132
fi
1133
AC_SUBST($1)dnl
1134
])
1135
1136
# GLIB_WITH_NLS
1137
#-----------------
1138
glib_DEFUN([GLIB_WITH_NLS],
1139
  dnl NLS is obligatory
1140
  [USE_NLS=yes
1141
    AC_SUBST(USE_NLS)
1142
1143
    gt_cv_have_gettext=no
1144
1145
    CATOBJEXT=NONE
1146
    XGETTEXT=:
1147
    INTLLIBS=
1148
1149
    AC_CHECK_HEADER(libintl.h,
1150
     [gt_cv_func_dgettext_libintl="no"
1151
      libintl_extra_libs=""
1152
1153
      #
1154
      # First check in libc
1155
      #
1156
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1157
        [AC_TRY_LINK([
1158
#include <libintl.h>
1159
],
1160
         [return !ngettext ("","", 1)],
1161
	  gt_cv_func_ngettext_libc=yes,
1162
          gt_cv_func_ngettext_libc=no)
1163
        ])
1164
  
1165
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1166
	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1167
        	[AC_TRY_LINK([
1168
#include <libintl.h>
1169
],
1170
	          [return !dgettext ("","")],
1171
		  gt_cv_func_dgettext_libc=yes,
1172
	          gt_cv_func_dgettext_libc=no)
1173
        	])
1174
      fi
1175
  
1176
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1177
        AC_CHECK_FUNCS(bind_textdomain_codeset)
1178
      fi
1179
1180
      #
1181
      # If we don't have everything we want, check in libintl
1182
      #
1183
      if test "$gt_cv_func_dgettext_libc" != "yes" \
1184
	 || test "$gt_cv_func_ngettext_libc" != "yes" \
1185
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1186
        
1187
        AC_CHECK_LIB(intl, bindtextdomain,
1188
	    [AC_CHECK_LIB(intl, ngettext,
1189
		    [AC_CHECK_LIB(intl, dgettext,
1190
			          gt_cv_func_dgettext_libintl=yes)])])
1191
1192
	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1193
	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
1194
	  AC_MSG_RESULT([])
1195
  	  AC_CHECK_LIB(intl, ngettext,
1196
          	[AC_CHECK_LIB(intl, dcgettext,
1197
		       [gt_cv_func_dgettext_libintl=yes
1198
			libintl_extra_libs=-liconv],
1199
			:,-liconv)],
1200
		:,-liconv)
1201
        fi
1202
1203
        #
1204
        # If we found libintl, then check in it for bind_textdomain_codeset();
1205
        # we'll prefer libc if neither have bind_textdomain_codeset(),
1206
        # and both have dgettext and ngettext
1207
        #
1208
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1209
          glib_save_LIBS="$LIBS"
1210
          LIBS="$LIBS -lintl $libintl_extra_libs"
1211
          unset ac_cv_func_bind_textdomain_codeset
1212
          AC_CHECK_FUNCS(bind_textdomain_codeset)
1213
          LIBS="$glib_save_LIBS"
1214
1215
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1216
            gt_cv_func_dgettext_libc=no
1217
          else
1218
            if test "$gt_cv_func_dgettext_libc" = "yes" \
1219
		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
1220
              gt_cv_func_dgettext_libintl=no
1221
            fi
1222
          fi
1223
        fi
1224
      fi
1225
1226
      if test "$gt_cv_func_dgettext_libc" = "yes" \
1227
	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
1228
        gt_cv_have_gettext=yes
1229
      fi
1230
  
1231
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1232
        INTLLIBS="-lintl $libintl_extra_libs"
1233
      fi
1234
  
1235
      if test "$gt_cv_have_gettext" = "yes"; then
1236
	AC_DEFINE(HAVE_GETTEXT,1,
1237
	  [Define if the GNU gettext() function is already present or preinstalled.])
1238
	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1239
	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1240
	if test "$MSGFMT" != "no"; then
1241
          glib_save_LIBS="$LIBS"
1242
          LIBS="$LIBS $INTLLIBS"
1243
	  AC_CHECK_FUNCS(dcgettext)
1244
	  MSGFMT_OPTS=
1245
	  AC_MSG_CHECKING([if msgfmt accepts -c])
1246
	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1247
msgid ""
1248
msgstr ""
1249
"Content-Type: text/plain; charset=UTF-8\n"
1250
"Project-Id-Version: test 1.0\n"
1251
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1252
"Last-Translator: test <foo@bar.xx>\n"
1253
"Language-Team: C <LL@li.org>\n"
1254
"MIME-Version: 1.0\n"
1255
"Content-Transfer-Encoding: 8bit\n"
1256
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1257
	  AC_SUBST(MSGFMT_OPTS)
1258
	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1259
	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1260
	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1261
	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1262
			 return _nl_msg_cat_cntr],
1263
	    [CATOBJEXT=.gmo 
1264
             DATADIRNAME=share],
1265
	    [case $host in
1266
	    *-*-solaris*)
1267
	    dnl On Solaris, if bind_textdomain_codeset is in libc,
1268
	    dnl GNU format message catalog is always supported,
1269
            dnl since both are added to the libc all together.
1270
	    dnl Hence, we'd like to go with DATADIRNAME=share and
1271
	    dnl and CATOBJEXT=.gmo in this case.
1272
            AC_CHECK_FUNC(bind_textdomain_codeset,
1273
	      [CATOBJEXT=.gmo 
1274
               DATADIRNAME=share],
1275
	      [CATOBJEXT=.mo
1276
               DATADIRNAME=lib])
1277
	    ;;
1278
	    *)
1279
	    CATOBJEXT=.mo
1280
            DATADIRNAME=lib
1281
	    ;;
1282
	    esac])
1283
          LIBS="$glib_save_LIBS"
1284
	  INSTOBJEXT=.mo
1285
	else
1286
	  gt_cv_have_gettext=no
1287
	fi
1288
      fi
1289
    ])
1290
1291
    if test "$gt_cv_have_gettext" = "yes" ; then
1292
      AC_DEFINE(ENABLE_NLS, 1,
1293
        [always defined to indicate that i18n is enabled])
1294
    fi
1295
1296
    dnl Test whether we really found GNU xgettext.
1297
    if test "$XGETTEXT" != ":"; then
1298
      dnl If it is not GNU xgettext we define it as : so that the
1299
      dnl Makefiles still can work.
1300
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1301
        : ;
1302
      else
1303
        AC_MSG_RESULT(
1304
	  [found xgettext program is not GNU xgettext; ignore it])
1305
        XGETTEXT=":"
1306
      fi
1307
    fi
1308
1309
    # We need to process the po/ directory.
1310
    POSUB=po
1311
1312
    AC_OUTPUT_COMMANDS(
1313
      [case "$CONFIG_FILES" in *po/Makefile.in*)
1314
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1315
      esac])
1316
1317
    dnl These rules are solely for the distribution goal.  While doing this
1318
    dnl we only have to keep exactly one list of the available catalogs
1319
    dnl in configure.in.
1320
    for lang in $ALL_LINGUAS; do
1321
      GMOFILES="$GMOFILES $lang.gmo"
1322
      POFILES="$POFILES $lang.po"
1323
    done
1324
1325
    dnl Make all variables we use known to autoconf.
1326
    AC_SUBST(CATALOGS)
1327
    AC_SUBST(CATOBJEXT)
1328
    AC_SUBST(DATADIRNAME)
1329
    AC_SUBST(GMOFILES)
1330
    AC_SUBST(INSTOBJEXT)
1331
    AC_SUBST(INTLLIBS)
1332
    AC_SUBST(PO_IN_DATADIR_TRUE)
1333
    AC_SUBST(PO_IN_DATADIR_FALSE)
1334
    AC_SUBST(POFILES)
1335
    AC_SUBST(POSUB)
1336
  ])
1337
1338
# AM_GLIB_GNU_GETTEXT
1339
# -------------------
1340
# Do checks necessary for use of gettext. If a suitable implementation 
1341
# of gettext is found in either in libintl or in the C library,
1342
# it will set INTLLIBS to the libraries needed for use of gettext
1343
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1344
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1345
# on various variables needed by the Makefile.in.in installed by 
1346
# glib-gettextize.
1347
dnl
1348
glib_DEFUN([GLIB_GNU_GETTEXT],
1349
  [AC_REQUIRE([AC_PROG_CC])dnl
1350
   AC_REQUIRE([AC_HEADER_STDC])dnl
1351
   
1352
   GLIB_LC_MESSAGES
1353
   GLIB_WITH_NLS
1354
1355
   if test "$gt_cv_have_gettext" = "yes"; then
1356
     if test "x$ALL_LINGUAS" = "x"; then
1357
       LINGUAS=
1358
     else
1359
       AC_MSG_CHECKING(for catalogs to be installed)
1360
       NEW_LINGUAS=
1361
       for presentlang in $ALL_LINGUAS; do
1362
         useit=no
1363
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1364
           desiredlanguages="$LINGUAS"
1365
         else
1366
           desiredlanguages="$ALL_LINGUAS"
1367
         fi
1368
         for desiredlang in $desiredlanguages; do
1369
 	   # Use the presentlang catalog if desiredlang is
1370
           #   a. equal to presentlang, or
1371
           #   b. a variant of presentlang (because in this case,
1372
           #      presentlang can be used as a fallback for messages
1373
           #      which are not translated in the desiredlang catalog).
1374
           case "$desiredlang" in
1375
             "$presentlang"*) useit=yes;;
1376
           esac
1377
         done
1378
         if test $useit = yes; then
1379
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1380
         fi
1381
       done
1382
       LINGUAS=$NEW_LINGUAS
1383
       AC_MSG_RESULT($LINGUAS)
1384
     fi
1385
1386
     dnl Construct list of names of catalog files to be constructed.
1387
     if test -n "$LINGUAS"; then
1388
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1389
     fi
1390
   fi
1391
1392
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1393
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1394
   dnl Try to locate is.
1395
   MKINSTALLDIRS=
1396
   if test -n "$ac_aux_dir"; then
1397
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1398
   fi
1399
   if test -z "$MKINSTALLDIRS"; then
1400
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1401
   fi
1402
   AC_SUBST(MKINSTALLDIRS)
1403
1404
   dnl Generate list of files to be processed by xgettext which will
1405
   dnl be included in po/Makefile.
1406
   test -d po || mkdir po
1407
   if test "x$srcdir" != "x."; then
1408
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1409
       posrcprefix="$srcdir/"
1410
     else
1411
       posrcprefix="../$srcdir/"
1412
     fi
1413
   else
1414
     posrcprefix="../"
1415
   fi
1416
   rm -f po/POTFILES
1417
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1418
	< $srcdir/po/POTFILES.in > po/POTFILES
1419
  ])
1420
1421
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1422
# -------------------------------
1423
# Define VARIABLE to the location where catalog files will
1424
# be installed by po/Makefile.
1425
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1426
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1427
glib_save_prefix="$prefix"
1428
glib_save_exec_prefix="$exec_prefix"
1429
glib_save_datarootdir="$datarootdir"
1430
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1431
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1432
datarootdir=`eval echo "${datarootdir}"`
1433
if test "x$CATOBJEXT" = "x.mo" ; then
1434
  localedir=`eval echo "${libdir}/locale"`
1435
else
1436
  localedir=`eval echo "${datadir}/locale"`
1437
fi
1438
prefix="$glib_save_prefix"
1439
exec_prefix="$glib_save_exec_prefix"
1440
datarootdir="$glib_save_datarootdir"
1441
AC_DEFINE_UNQUOTED($1, "$localedir",
1442
  [Define the location where the catalogs will be installed])
1443
])
1444
1445
dnl
1446
dnl Now the definitions that aclocal will find
1447
dnl
1448
ifdef(glib_configure_in,[],[
1449
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1450
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1451
])dnl
1452
1453
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1454
# 
1455
# Create a temporary file with TEST-FILE as its contents and pass the
1456
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
1457
# 0 and perform ACTION-IF-FAIL for any other exit status.
1458
AC_DEFUN([GLIB_RUN_PROG],
1459
[cat >conftest.foo <<_ACEOF
1460
$2
1461
_ACEOF
1462
if AC_RUN_LOG([$1 conftest.foo]); then
1463
  m4_ifval([$3], [$3], [:])
1464
m4_ifvaln([$4], [else $4])dnl
1465
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1466
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1467
fi])
1468
1469
1470
dnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
1471
dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
1472
AC_DEFUN([GNOME_DOC_DEFINES],
1473
[
1474
AC_ARG_WITH([help-dir],
1475
  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
1476
  [with_help_dir='${datadir}/gnome/help'])
1477
HELP_DIR="$with_help_dir"
1478
AC_SUBST(HELP_DIR)
1479
1480
AC_ARG_WITH([omf-dir],
1481
  AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
1482
  [with_omf_dir='${datadir}/omf'])
1483
OMF_DIR="$with_omf_dir"
1484
AC_SUBST(OMF_DIR)
1485
1486
AC_ARG_WITH([help-formats],
1487
  AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
1488
  [with_help_formats=''])
1489
DOC_USER_FORMATS="$with_help_formats"
1490
AC_SUBST(DOC_USER_FORMATS)
1491
1492
AC_ARG_ENABLE([scrollkeeper],
1493
	[AC_HELP_STRING([--disable-scrollkeeper],
1494
			[do not make updates to the scrollkeeper database])],,
1495
	enable_scrollkeeper=yes)
1496
AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
1497
1498
dnl disable scrollkeeper automatically for distcheck
1499
DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
1500
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
1501
1502
AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
1503
])
1504
1505
# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
1506
#
1507
AC_DEFUN([GNOME_DOC_INIT],
1508
[AC_REQUIRE([AC_PROG_LN_S])dnl
1509
1510
ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
1511
1512
AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
1513
PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
1514
	[gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
1515
1516
if test "$gdu_cv_have_gdu" = "yes"; then
1517
	AC_MSG_RESULT([yes])
1518
	ifelse([$2],,[:],[$2])
1519
else
1520
	AC_MSG_RESULT([no])
1521
	ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
1522
fi
1523
1524
GNOME_DOC_DEFINES
1525
])
1526
1527
1528
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1529
# serial 40 IT_PROG_INTLTOOL
1530
AC_DEFUN([IT_PROG_INTLTOOL], [
1531
AC_PREREQ([2.50])dnl
1532
AC_REQUIRE([AM_NLS])dnl
1533
1534
case "$am__api_version" in
1535
    1.[01234])
1536
	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1537
    ;;
1538
    *)
1539
    ;;
1540
esac
1541
1542
if test -n "$1"; then
1543
    AC_MSG_CHECKING([for intltool >= $1])
1544
1545
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1546
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1547
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1548
    ]
1549
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1550
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1551
	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
1552
fi
1553
1554
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1555
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1556
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1557
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1558
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1559
fi
1560
1561
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1562
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1563
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1564
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1565
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1566
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1567
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1568
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1569
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1570
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1571
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1572
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
1573
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1574
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1575
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1576
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1577
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1578
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1579
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1580
1581
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1582
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1583
_IT_SUBST(INTLTOOL_KEYS_RULE)
1584
_IT_SUBST(INTLTOOL_PROP_RULE)
1585
_IT_SUBST(INTLTOOL_OAF_RULE)
1586
_IT_SUBST(INTLTOOL_PONG_RULE)
1587
_IT_SUBST(INTLTOOL_SERVER_RULE)
1588
_IT_SUBST(INTLTOOL_SHEET_RULE)
1589
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1590
_IT_SUBST(INTLTOOL_UI_RULE)
1591
_IT_SUBST(INTLTOOL_XAM_RULE)
1592
_IT_SUBST(INTLTOOL_KBD_RULE)
1593
_IT_SUBST(INTLTOOL_XML_RULE)
1594
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1595
_IT_SUBST(INTLTOOL_CAVES_RULE)
1596
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1597
_IT_SUBST(INTLTOOL_THEME_RULE)
1598
_IT_SUBST(INTLTOOL_SERVICE_RULE)
1599
_IT_SUBST(INTLTOOL_POLICY_RULE)
1600
1601
# Check the gettext tools to make sure they are GNU
1602
AC_PATH_PROG(XGETTEXT, xgettext)
1603
AC_PATH_PROG(MSGMERGE, msgmerge)
1604
AC_PATH_PROG(MSGFMT, msgfmt)
1605
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1606
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1607
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1608
fi
1609
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1610
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1611
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1612
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1613
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1614
fi
1615
1616
AC_PATH_PROG(INTLTOOL_PERL, perl)
1617
if test -z "$INTLTOOL_PERL"; then
1618
   AC_MSG_ERROR([perl not found])
1619
fi
1620
AC_MSG_CHECKING([for perl >= 5.8.1])
1621
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1622
if test $? -ne 0; then
1623
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1624
else
1625
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
1626
   AC_MSG_RESULT([$IT_PERL_VERSION])
1627
fi
1628
if test "x$2" != "xno-xml"; then
1629
   AC_MSG_CHECKING([for XML::Parser])
1630
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1631
       AC_MSG_RESULT([ok])
1632
   else
1633
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1634
   fi
1635
fi
1636
1637
# Substitute ALL_LINGUAS so we can use it in po/Makefile
1638
AC_SUBST(ALL_LINGUAS)
1639
1640
# Set DATADIRNAME correctly if it is not set yet
1641
# (copied from glib-gettext.m4)
1642
if test -z "$DATADIRNAME"; then
1643
  AC_LINK_IFELSE(
1644
    [AC_LANG_PROGRAM([[]],
1645
                     [[extern int _nl_msg_cat_cntr;
1646
                       return _nl_msg_cat_cntr]])],
1647
    [DATADIRNAME=share],
1648
    [case $host in
1649
    *-*-solaris*)
1650
    dnl On Solaris, if bind_textdomain_codeset is in libc,
1651
    dnl GNU format message catalog is always supported,
1652
    dnl since both are added to the libc all together.
1653
    dnl Hence, we'd like to go with DATADIRNAME=share
1654
    dnl in this case.
1655
    AC_CHECK_FUNC(bind_textdomain_codeset,
1656
      [DATADIRNAME=share], [DATADIRNAME=lib])
1657
    ;;
1658
    *)
1659
    [DATADIRNAME=lib]
1660
    ;;
1661
    esac])
1662
fi
1663
AC_SUBST(DATADIRNAME)
1664
1665
IT_PO_SUBDIR([po])
1666
1667
])
1668
1669
1670
# IT_PO_SUBDIR(DIRNAME)
1671
# ---------------------
1672
# All po subdirs have to be declared with this macro; the subdir "po" is
1673
# declared by IT_PROG_INTLTOOL.
1674
#
1675
AC_DEFUN([IT_PO_SUBDIR],
1676
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1677
dnl
1678
dnl The following CONFIG_COMMANDS should be exetuted at the very end
1679
dnl of config.status.
1680
AC_CONFIG_COMMANDS_PRE([
1681
  AC_CONFIG_COMMANDS([$1/stamp-it], [
1682
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1683
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1684
    fi
1685
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1686
    >"$1/stamp-it.tmp"
1687
    [sed '/^#/d
1688
	 s/^[[].*] *//
1689
	 /^[ 	]*$/d
1690
	'"s|^|	$ac_top_srcdir/|" \
1691
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1692
    ]
1693
    [sed '/^POTFILES =/,/[^\\]$/ {
1694
		/^POTFILES =/!d
1695
		r $1/POTFILES
1696
	  }
1697
	 ' "$1/Makefile.in" >"$1/Makefile"]
1698
    rm -f "$1/Makefile.tmp"
1699
    mv "$1/stamp-it.tmp" "$1/stamp-it"
1700
  ])
1701
])dnl
1702
])
1703
1704
# _IT_SUBST(VARIABLE)
1705
# -------------------
1706
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1707
#
1708
AC_DEFUN([_IT_SUBST],
1709
[
1710
AC_SUBST([$1])
1711
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1712
]
1713
)
1714
1715
# deprecated macros
1716
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1717
# A hint is needed for aclocal from Automake <= 1.9.4:
1718
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1719
1720
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1721
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1722
#
1723
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1724
#                 2006, 2007, 2008 Free Software Foundation, Inc.
1725
#   Written by Gordon Matzigkeit, 1996
1726
#
1727
# This file is free software; the Free Software Foundation gives
1728
# unlimited permission to copy and/or distribute it, with or without
1729
# modifications, as long as this notice is preserved.
1730
1731
m4_define([_LT_COPYING], [dnl
1732
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1733
#                 2006, 2007, 2008 Free Software Foundation, Inc.
1734
#   Written by Gordon Matzigkeit, 1996
1735
#
1736
#   This file is part of GNU Libtool.
1737
#
1738
# GNU Libtool is free software; you can redistribute it and/or
1739
# modify it under the terms of the GNU General Public License as
1740
# published by the Free Software Foundation; either version 2 of
1741
# the License, or (at your option) any later version.
1742
#
1743
# As a special exception to the GNU General Public License,
1744
# if you distribute this file as part of a program or library that
1745
# is built using GNU Libtool, you may include this file under the
1746
# same distribution terms that you use for the rest of that program.
1747
#
1748
# GNU Libtool is distributed in the hope that it will be useful,
1749
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1750
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1751
# GNU General Public License for more details.
1752
#
1753
# You should have received a copy of the GNU General Public License
1754
# along with GNU Libtool; see the file COPYING.  If not, a copy
1755
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1756
# obtained by writing to the Free Software Foundation, Inc.,
1757
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1758
])
1759
1760
# serial 56 LT_INIT
1761
1762
1763
# LT_PREREQ(VERSION)
1764
# ------------------
1765
# Complain and exit if this libtool version is less that VERSION.
1766
m4_defun([LT_PREREQ],
1767
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1768
       [m4_default([$3],
1769
		   [m4_fatal([Libtool version $1 or higher is required],
1770
		             63)])],
1771
       [$2])])
1772
1773
1774
# _LT_CHECK_BUILDDIR
1775
# ------------------
1776
# Complain if the absolute build directory name contains unusual characters
1777
m4_defun([_LT_CHECK_BUILDDIR],
1778
[case `pwd` in
1779
  *\ * | *\	*)
1780
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1781
esac
1782
])
1783
1784
1785
# LT_INIT([OPTIONS])
1786
# ------------------
1787
AC_DEFUN([LT_INIT],
1788
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1789
AC_BEFORE([$0], [LT_LANG])dnl
1790
AC_BEFORE([$0], [LT_OUTPUT])dnl
1791
AC_BEFORE([$0], [LTDL_INIT])dnl
1792
m4_require([_LT_CHECK_BUILDDIR])dnl
1793
1794
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1795
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1796
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1797
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1798
dnl unless we require an AC_DEFUNed macro:
1799
AC_REQUIRE([LTOPTIONS_VERSION])dnl
1800
AC_REQUIRE([LTSUGAR_VERSION])dnl
1801
AC_REQUIRE([LTVERSION_VERSION])dnl
1802
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1803
m4_require([_LT_PROG_LTMAIN])dnl
1804
1805
dnl Parse OPTIONS
1806
_LT_SET_OPTIONS([$0], [$1])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1807
1808
# This can be used to rebuild libtool when needed
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1809
LIBTOOL_DEPS="$ltmain"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1810
1811
# Always use our own libtool.
1812
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1813
AC_SUBST(LIBTOOL)dnl
1814
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1815
_LT_SETUP
1816
1817
# Only expand once:
1818
m4_define([LT_INIT])
1819
])# LT_INIT
1820
1821
# Old names:
1822
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1823
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1824
dnl aclocal-1.4 backwards compatibility:
1825
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1826
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1827
1828
1829
# _LT_CC_BASENAME(CC)
1830
# -------------------
1831
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1832
m4_defun([_LT_CC_BASENAME],
1833
[for cc_temp in $1""; do
1834
  case $cc_temp in
1835
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1836
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1837
    \-*) ;;
1838
    *) break;;
1839
  esac
1840
done
1841
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1842
])
1843
1844
1845
# _LT_FILEUTILS_DEFAULTS
1846
# ----------------------
1847
# It is okay to use these file commands and assume they have been set
1848
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1849
m4_defun([_LT_FILEUTILS_DEFAULTS],
1850
[: ${CP="cp -f"}
1851
: ${MV="mv -f"}
1852
: ${RM="rm -f"}
1853
])# _LT_FILEUTILS_DEFAULTS
1854
1855
1856
# _LT_SETUP
1857
# ---------
1858
m4_defun([_LT_SETUP],
1859
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1860
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1861
_LT_DECL([], [host_alias], [0], [The host system])dnl
1862
_LT_DECL([], [host], [0])dnl
1863
_LT_DECL([], [host_os], [0])dnl
1864
dnl
1865
_LT_DECL([], [build_alias], [0], [The build system])dnl
1866
_LT_DECL([], [build], [0])dnl
1867
_LT_DECL([], [build_os], [0])dnl
1868
dnl
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1869
AC_REQUIRE([AC_PROG_CC])dnl
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1870
AC_REQUIRE([LT_PATH_LD])dnl
1871
AC_REQUIRE([LT_PATH_NM])dnl
1872
dnl
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1873
AC_REQUIRE([AC_PROG_LN_S])dnl
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1874
test -z "$LN_S" && LN_S="ln -s"
1875
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1876
dnl
1877
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1878
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1879
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1880
dnl
1881
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1882
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1883
m4_require([_LT_CMD_RELOAD])dnl
1884
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1885
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1886
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1887
1888
_LT_CONFIG_LIBTOOL_INIT([
1889
# See if we are running on zsh, and set the options which allow our
1890
# commands through without removal of \ escapes INIT.
1891
if test -n "\${ZSH_VERSION+set}" ; then
1892
   setopt NO_GLOB_SUBST
1893
fi
1894
])
1895
if test -n "${ZSH_VERSION+set}" ; then
1896
   setopt NO_GLOB_SUBST
1897
fi
1898
1899
_LT_CHECK_OBJDIR
1900
1901
m4_require([_LT_TAG_COMPILER])dnl
1902
_LT_PROG_ECHO_BACKSLASH
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1903
1904
case $host_os in
1905
aix3*)
1906
  # AIX sometimes has problems with the GCC collect2 program.  For some
1907
  # reason, if we set the COLLECT_NAMES environment variable, the problems
1908
  # vanish in a puff of smoke.
1909
  if test "X${COLLECT_NAMES+set}" != Xset; then
1910
    COLLECT_NAMES=
1911
    export COLLECT_NAMES
1912
  fi
1913
  ;;
1914
esac
1915
1916
# Sed substitution that helps us do robust quoting.  It backslashifies
1917
# metacharacters that are still active within double-quoted strings.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1918
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1919
1920
# Same as above, but do not quote variable references.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1921
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1922
1923
# Sed substitution to delay expansion of an escaped shell variable in a
1924
# double_quote_subst'ed string.
1925
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1926
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1927
# Sed substitution to delay expansion of an escaped single quote.
1928
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1929
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1930
# Sed substitution to avoid accidental globbing in evaled expressions
1931
no_glob_subst='s/\*/\\\*/g'
1932
1933
# Global variables:
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1934
ofile=libtool
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1935
can_build_shared=yes
1936
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
1937
# All known linkers require a `.a' archive for static linking (except MSVC,
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1938
# which needs '.lib').
1939
libext=a
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1940
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1941
with_gnu_ld="$lt_cv_prog_gnu_ld"
1942
1943
old_CC="$CC"
1944
old_CFLAGS="$CFLAGS"
1945
1946
# Set sane defaults for various variables
1947
test -z "$CC" && CC=cc
1948
test -z "$LTCC" && LTCC=$CC
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
1949
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1950
test -z "$LD" && LD=ld
1951
test -z "$ac_objext" && ac_objext=o
1952
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
1953
_LT_CC_BASENAME([$compiler])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1954
1955
# Only perform the check for file, if the check method requires it
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1956
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1957
case $deplibs_check_method in
1958
file_magic*)
1959
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1960
    _LT_PATH_MAGIC
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
1961
  fi
1962
  ;;
1963
esac
1964
1965
# Use C for the default configuration in the libtool script
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
1966
LT_SUPPORTED_TAG([CC])
1967
_LT_LANG_C_CONFIG
1968
_LT_LANG_DEFAULT_CONFIG
1969
_LT_CONFIG_COMMANDS
1970
])# _LT_SETUP
1971
1972
1973
# _LT_PROG_LTMAIN
1974
# ---------------
1975
# Note that this code is called both from `configure', and `config.status'
1976
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1977
# `config.status' has no value for ac_aux_dir unless we are using Automake,
1978
# so we pass a copy along to make sure it has a sensible value anyway.
1979
m4_defun([_LT_PROG_LTMAIN],
1980
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1981
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1982
ltmain="$ac_aux_dir/ltmain.sh"
1983
])# _LT_PROG_LTMAIN
1984
1985
1986
1987
# So that we can recreate a full libtool script including additional
1988
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1989
# in macros and then make a single call at the end using the `libtool'
1990
# label.
1991
1992
1993
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1994
# ----------------------------------------
1995
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1996
m4_define([_LT_CONFIG_LIBTOOL_INIT],
1997
[m4_ifval([$1],
1998
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1999
                     [$1
2000
])])])
2001
2002
# Initialize.
2003
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2004
2005
2006
# _LT_CONFIG_LIBTOOL([COMMANDS])
2007
# ------------------------------
2008
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2009
m4_define([_LT_CONFIG_LIBTOOL],
2010
[m4_ifval([$1],
2011
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2012
                     [$1
2013
])])])
2014
2015
# Initialize.
2016
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2017
2018
2019
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2020
# -----------------------------------------------------
2021
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2022
[_LT_CONFIG_LIBTOOL([$1])
2023
_LT_CONFIG_LIBTOOL_INIT([$2])
2024
])
2025
2026
2027
# _LT_FORMAT_COMMENT([COMMENT])
2028
# -----------------------------
2029
# Add leading comment marks to the start of each line, and a trailing
2030
# full-stop to the whole comment if one is not present already.
2031
m4_define([_LT_FORMAT_COMMENT],
2032
[m4_ifval([$1], [
2033
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2034
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2035
)])
2036
2037
2038
2039
2040
2041
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2042
# -------------------------------------------------------------------
2043
# CONFIGNAME is the name given to the value in the libtool script.
2044
# VARNAME is the (base) name used in the configure script.
2045
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2046
# VARNAME.  Any other value will be used directly.
2047
m4_define([_LT_DECL],
2048
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2049
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2050
	[m4_ifval([$1], [$1], [$2])])
2051
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2052
    m4_ifval([$4],
2053
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2054
    lt_dict_add_subkey([lt_decl_dict], [$2],
2055
	[tagged?], [m4_ifval([$5], [yes], [no])])])
2056
])
2057
2058
2059
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2060
# --------------------------------------------------------
2061
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2062
2063
2064
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2065
# ------------------------------------------------
2066
m4_define([lt_decl_tag_varnames],
2067
[_lt_decl_filter([tagged?], [yes], $@)])
2068
2069
2070
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2071
# ---------------------------------------------------------
2072
m4_define([_lt_decl_filter],
2073
[m4_case([$#],
2074
  [0], [m4_fatal([$0: too few arguments: $#])],
2075
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
2076
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2077
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2078
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2079
])
2080
2081
2082
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2083
# --------------------------------------------------
2084
m4_define([lt_decl_quote_varnames],
2085
[_lt_decl_filter([value], [1], $@)])
2086
2087
2088
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2089
# ---------------------------------------------------
2090
m4_define([lt_decl_dquote_varnames],
2091
[_lt_decl_filter([value], [2], $@)])
2092
2093
2094
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2095
# ---------------------------------------------------
2096
m4_define([lt_decl_varnames_tagged],
1.2.55 by Robert Ancell
Import upstream version 2.27.1
2097
[m4_assert([$# <= 2])dnl
2098
_$0(m4_quote(m4_default([$1], [[, ]])),
2099
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2100
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2101
m4_define([_lt_decl_varnames_tagged],
2102
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2103
2104
2105
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2106
# ------------------------------------------------
2107
m4_define([lt_decl_all_varnames],
2108
[_$0(m4_quote(m4_default([$1], [[, ]])),
2109
     m4_if([$2], [],
2110
	   m4_quote(lt_decl_varnames),
2111
	m4_quote(m4_shift($@))))[]dnl
2112
])
2113
m4_define([_lt_decl_all_varnames],
2114
[lt_join($@, lt_decl_varnames_tagged([$1],
2115
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2116
])
2117
2118
2119
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2120
# ------------------------------------
2121
# Quote a variable value, and forward it to `config.status' so that its
2122
# declaration there will have the same value as in `configure'.  VARNAME
2123
# must have a single quote delimited value for this to work.
2124
m4_define([_LT_CONFIG_STATUS_DECLARE],
2125
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2126
2127
2128
# _LT_CONFIG_STATUS_DECLARATIONS
2129
# ------------------------------
2130
# We delimit libtool config variables with single quotes, so when
2131
# we write them to config.status, we have to be sure to quote all
2132
# embedded single quotes properly.  In configure, this macro expands
2133
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2134
#
2135
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2136
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2137
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2138
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2139
2140
2141
# _LT_LIBTOOL_TAGS
2142
# ----------------
2143
# Output comment and list of tags supported by the script
2144
m4_defun([_LT_LIBTOOL_TAGS],
2145
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2146
available_tags="_LT_TAGS"dnl
2147
])
2148
2149
2150
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2151
# -----------------------------------
2152
# Extract the dictionary values for VARNAME (optionally with TAG) and
2153
# expand to a commented shell variable setting:
2154
#
2155
#    # Some comment about what VAR is for.
2156
#    visible_name=$lt_internal_name
2157
m4_define([_LT_LIBTOOL_DECLARE],
2158
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2159
					   [description])))[]dnl
2160
m4_pushdef([_libtool_name],
2161
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2162
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2163
    [0], [_libtool_name=[$]$1],
2164
    [1], [_libtool_name=$lt_[]$1],
2165
    [2], [_libtool_name=$lt_[]$1],
2166
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2167
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2168
])
2169
2170
2171
# _LT_LIBTOOL_CONFIG_VARS
2172
# -----------------------
2173
# Produce commented declarations of non-tagged libtool config variables
2174
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2175
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2176
# section) are produced by _LT_LIBTOOL_TAG_VARS.
2177
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2178
[m4_foreach([_lt_var],
2179
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2180
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2181
2182
2183
# _LT_LIBTOOL_TAG_VARS(TAG)
2184
# -------------------------
2185
m4_define([_LT_LIBTOOL_TAG_VARS],
2186
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2187
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2188
2189
2190
# _LT_TAGVAR(VARNAME, [TAGNAME])
2191
# ------------------------------
2192
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2193
2194
2195
# _LT_CONFIG_COMMANDS
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2196
# -------------------
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2197
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2198
# variables for single and double quote escaping we saved from calls
2199
# to _LT_DECL, we can put quote escaped variables declarations
2200
# into `config.status', and then the shell code to quote escape them in
2201
# for loops in `config.status'.  Finally, any additional code accumulated
2202
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2203
m4_defun([_LT_CONFIG_COMMANDS],
2204
[AC_PROVIDE_IFELSE([LT_OUTPUT],
2205
	dnl If the libtool generation code has been placed in $CONFIG_LT,
2206
	dnl instead of duplicating it all over again into config.status,
2207
	dnl then we will have config.status run $CONFIG_LT later, so it
2208
	dnl needs to know what name is stored there:
2209
        [AC_CONFIG_COMMANDS([libtool],
2210
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2211
    dnl If the libtool generation code is destined for config.status,
2212
    dnl expand the accumulated commands and init code now:
2213
    [AC_CONFIG_COMMANDS([libtool],
2214
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2215
])#_LT_CONFIG_COMMANDS
2216
2217
2218
# Initialize.
2219
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2220
[
2221
2222
# The HP-UX ksh and POSIX shell print the target directory to stdout
2223
# if CDPATH is set.
2224
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2225
2226
sed_quote_subst='$sed_quote_subst'
2227
double_quote_subst='$double_quote_subst'
2228
delay_variable_subst='$delay_variable_subst'
2229
_LT_CONFIG_STATUS_DECLARATIONS
2230
LTCC='$LTCC'
2231
LTCFLAGS='$LTCFLAGS'
2232
compiler='$compiler_DEFAULT'
2233
2234
# Quote evaled strings.
2235
for var in lt_decl_all_varnames([[ \
2236
]], lt_decl_quote_varnames); do
2237
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2238
    *[[\\\\\\\`\\"\\\$]]*)
2239
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2240
      ;;
2241
    *)
2242
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2243
      ;;
2244
    esac
2245
done
2246
2247
# Double-quote double-evaled strings.
2248
for var in lt_decl_all_varnames([[ \
2249
]], lt_decl_dquote_varnames); do
2250
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2251
    *[[\\\\\\\`\\"\\\$]]*)
2252
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2253
      ;;
2254
    *)
2255
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2256
      ;;
2257
    esac
2258
done
2259
2260
# Fix-up fallback echo if it was mangled by the above quoting rules.
2261
case \$lt_ECHO in
2262
*'\\\[$]0 --fallback-echo"')dnl "
2263
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2264
  ;;
2265
esac
2266
2267
_LT_OUTPUT_LIBTOOL_INIT
2268
])
2269
2270
2271
# LT_OUTPUT
2272
# ---------
2273
# This macro allows early generation of the libtool script (before
2274
# AC_OUTPUT is called), incase it is used in configure for compilation
2275
# tests.
2276
AC_DEFUN([LT_OUTPUT],
2277
[: ${CONFIG_LT=./config.lt}
2278
AC_MSG_NOTICE([creating $CONFIG_LT])
2279
cat >"$CONFIG_LT" <<_LTEOF
2280
#! $SHELL
2281
# Generated by $as_me.
2282
# Run this file to recreate a libtool stub with the current configuration.
2283
2284
lt_cl_silent=false
2285
SHELL=\${CONFIG_SHELL-$SHELL}
2286
_LTEOF
2287
2288
cat >>"$CONFIG_LT" <<\_LTEOF
2289
AS_SHELL_SANITIZE
2290
_AS_PREPARE
2291
2292
exec AS_MESSAGE_FD>&1
2293
exec AS_MESSAGE_LOG_FD>>config.log
2294
{
2295
  echo
2296
  AS_BOX([Running $as_me.])
2297
} >&AS_MESSAGE_LOG_FD
2298
2299
lt_cl_help="\
2300
\`$as_me' creates a local libtool stub from the current configuration,
2301
for use in further configure time tests before the real libtool is
2302
generated.
2303
2304
Usage: $[0] [[OPTIONS]]
2305
2306
  -h, --help      print this help, then exit
2307
  -V, --version   print version number, then exit
2308
  -q, --quiet     do not print progress messages
2309
  -d, --debug     don't remove temporary files
2310
2311
Report bugs to <bug-libtool@gnu.org>."
2312
2313
lt_cl_version="\
2314
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2315
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2316
configured by $[0], generated by m4_PACKAGE_STRING.
2317
2318
Copyright (C) 2008 Free Software Foundation, Inc.
2319
This config.lt script is free software; the Free Software Foundation
2320
gives unlimited permision to copy, distribute and modify it."
2321
2322
while test $[#] != 0
2323
do
2324
  case $[1] in
2325
    --version | --v* | -V )
2326
      echo "$lt_cl_version"; exit 0 ;;
2327
    --help | --h* | -h )
2328
      echo "$lt_cl_help"; exit 0 ;;
2329
    --debug | --d* | -d )
2330
      debug=: ;;
2331
    --quiet | --q* | --silent | --s* | -q )
2332
      lt_cl_silent=: ;;
2333
2334
    -*) AC_MSG_ERROR([unrecognized option: $[1]
2335
Try \`$[0] --help' for more information.]) ;;
2336
2337
    *) AC_MSG_ERROR([unrecognized argument: $[1]
2338
Try \`$[0] --help' for more information.]) ;;
2339
  esac
2340
  shift
2341
done
2342
2343
if $lt_cl_silent; then
2344
  exec AS_MESSAGE_FD>/dev/null
2345
fi
2346
_LTEOF
2347
2348
cat >>"$CONFIG_LT" <<_LTEOF
2349
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2350
_LTEOF
2351
2352
cat >>"$CONFIG_LT" <<\_LTEOF
2353
AC_MSG_NOTICE([creating $ofile])
2354
_LT_OUTPUT_LIBTOOL_COMMANDS
2355
AS_EXIT(0)
2356
_LTEOF
2357
chmod +x "$CONFIG_LT"
2358
2359
# configure is writing to config.log, but config.lt does its own redirection,
2360
# appending to config.log, which fails on DOS, as config.log is still kept
2361
# open by configure.  Here we exec the FD to /dev/null, effectively closing
2362
# config.log, so it can be properly (re)opened and appended to by config.lt.
2363
if test "$no_create" != yes; then
2364
  lt_cl_success=:
2365
  test "$silent" = yes &&
2366
    lt_config_lt_args="$lt_config_lt_args --quiet"
2367
  exec AS_MESSAGE_LOG_FD>/dev/null
2368
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2369
  exec AS_MESSAGE_LOG_FD>>config.log
2370
  $lt_cl_success || AS_EXIT(1)
2371
fi
2372
])# LT_OUTPUT
2373
2374
2375
# _LT_CONFIG(TAG)
2376
# ---------------
2377
# If TAG is the built-in tag, create an initial libtool script with a
2378
# default configuration from the untagged config vars.  Otherwise add code
2379
# to config.status for appending the configuration named by TAG from the
2380
# matching tagged config vars.
2381
m4_defun([_LT_CONFIG],
2382
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2383
_LT_CONFIG_SAVE_COMMANDS([
2384
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2385
  m4_if(_LT_TAG, [C], [
2386
    # See if we are running on zsh, and set the options which allow our
2387
    # commands through without removal of \ escapes.
2388
    if test -n "${ZSH_VERSION+set}" ; then
2389
      setopt NO_GLOB_SUBST
2390
    fi
2391
2392
    cfgfile="${ofile}T"
2393
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2394
    $RM "$cfgfile"
2395
2396
    cat <<_LT_EOF >> "$cfgfile"
2397
#! $SHELL
2398
2399
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2400
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2401
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2402
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2403
#
2404
_LT_COPYING
2405
_LT_LIBTOOL_TAGS
2406
2407
# ### BEGIN LIBTOOL CONFIG
2408
_LT_LIBTOOL_CONFIG_VARS
2409
_LT_LIBTOOL_TAG_VARS
2410
# ### END LIBTOOL CONFIG
2411
2412
_LT_EOF
2413
2414
  case $host_os in
2415
  aix3*)
2416
    cat <<\_LT_EOF >> "$cfgfile"
2417
# AIX sometimes has problems with the GCC collect2 program.  For some
2418
# reason, if we set the COLLECT_NAMES environment variable, the problems
2419
# vanish in a puff of smoke.
2420
if test "X${COLLECT_NAMES+set}" != Xset; then
2421
  COLLECT_NAMES=
2422
  export COLLECT_NAMES
2423
fi
2424
_LT_EOF
2425
    ;;
2426
  esac
2427
2428
  _LT_PROG_LTMAIN
2429
2430
  # We use sed instead of cat because bash on DJGPP gets confused if
2431
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2432
  # text mode, it properly converts lines to CR/LF.  This bash problem
2433
  # is reportedly fixed, but why not run on old versions too?
2434
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2435
    || (rm -f "$cfgfile"; exit 1)
2436
2437
  _LT_PROG_XSI_SHELLFNS
2438
2439
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2440
    || (rm -f "$cfgfile"; exit 1)
2441
2442
  mv -f "$cfgfile" "$ofile" ||
2443
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2444
  chmod +x "$ofile"
2445
],
2446
[cat <<_LT_EOF >> "$ofile"
2447
2448
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2449
dnl in a comment (ie after a #).
2450
# ### BEGIN LIBTOOL TAG CONFIG: $1
2451
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2452
# ### END LIBTOOL TAG CONFIG: $1
2453
_LT_EOF
2454
])dnl /m4_if
2455
],
2456
[m4_if([$1], [], [
2457
    PACKAGE='$PACKAGE'
2458
    VERSION='$VERSION'
2459
    TIMESTAMP='$TIMESTAMP'
2460
    RM='$RM'
2461
    ofile='$ofile'], [])
2462
])dnl /_LT_CONFIG_SAVE_COMMANDS
2463
])# _LT_CONFIG
2464
2465
2466
# LT_SUPPORTED_TAG(TAG)
2467
# ---------------------
2468
# Trace this macro to discover what tags are supported by the libtool
2469
# --tag option, using:
2470
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2471
AC_DEFUN([LT_SUPPORTED_TAG], [])
2472
2473
2474
# C support is built-in for now
2475
m4_define([_LT_LANG_C_enabled], [])
2476
m4_define([_LT_TAGS], [])
2477
2478
2479
# LT_LANG(LANG)
2480
# -------------
2481
# Enable libtool support for the given language if not already enabled.
2482
AC_DEFUN([LT_LANG],
2483
[AC_BEFORE([$0], [LT_OUTPUT])dnl
2484
m4_case([$1],
2485
  [C],			[_LT_LANG(C)],
2486
  [C++],		[_LT_LANG(CXX)],
2487
  [Java],		[_LT_LANG(GCJ)],
2488
  [Fortran 77],		[_LT_LANG(F77)],
2489
  [Fortran],		[_LT_LANG(FC)],
2490
  [Windows Resource],	[_LT_LANG(RC)],
2491
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2492
    [_LT_LANG($1)],
2493
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
2494
])# LT_LANG
2495
2496
2497
# _LT_LANG(LANGNAME)
2498
# ------------------
2499
m4_defun([_LT_LANG],
2500
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2501
  [LT_SUPPORTED_TAG([$1])dnl
2502
  m4_append([_LT_TAGS], [$1 ])dnl
2503
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
2504
  _LT_LANG_$1_CONFIG($1)])dnl
2505
])# _LT_LANG
2506
2507
2508
# _LT_LANG_DEFAULT_CONFIG
2509
# -----------------------
2510
m4_defun([_LT_LANG_DEFAULT_CONFIG],
2511
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2512
  [LT_LANG(CXX)],
2513
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2514
2515
AC_PROVIDE_IFELSE([AC_PROG_F77],
2516
  [LT_LANG(F77)],
2517
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2518
2519
AC_PROVIDE_IFELSE([AC_PROG_FC],
2520
  [LT_LANG(FC)],
2521
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2522
2523
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2524
dnl pulling things in needlessly.
2525
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2526
  [LT_LANG(GCJ)],
2527
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2528
    [LT_LANG(GCJ)],
2529
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2530
      [LT_LANG(GCJ)],
2531
      [m4_ifdef([AC_PROG_GCJ],
2532
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2533
       m4_ifdef([A][M_PROG_GCJ],
2534
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2535
       m4_ifdef([LT_PROG_GCJ],
2536
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2537
2538
AC_PROVIDE_IFELSE([LT_PROG_RC],
2539
  [LT_LANG(RC)],
2540
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2541
])# _LT_LANG_DEFAULT_CONFIG
2542
2543
# Obsolete macros:
2544
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2545
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2546
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2547
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2548
dnl aclocal-1.4 backwards compatibility:
2549
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2550
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2551
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2552
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2553
2554
2555
# _LT_TAG_COMPILER
2556
# ----------------
2557
m4_defun([_LT_TAG_COMPILER],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2558
[AC_REQUIRE([AC_PROG_CC])dnl
2559
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2560
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2561
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2562
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2563
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2564
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2565
# If no C compiler was specified, use CC.
2566
LTCC=${LTCC-"$CC"}
2567
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
2568
# If no C compiler flags were specified, use CFLAGS.
2569
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2570
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2571
# Allow CC to be a program name with arguments.
2572
compiler=$CC
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2573
])# _LT_TAG_COMPILER
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
2574
2575
2576
# _LT_COMPILER_BOILERPLATE
2577
# ------------------------
2578
# Check for compiler boilerplate output or warnings with
2579
# the simple compiler test code.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2580
m4_defun([_LT_COMPILER_BOILERPLATE],
2581
[m4_require([_LT_DECL_SED])dnl
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
2582
ac_outfile=conftest.$ac_objext
2583
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
2584
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
2585
_lt_compiler_boilerplate=`cat conftest.err`
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2586
$RM conftest*
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
2587
])# _LT_COMPILER_BOILERPLATE
2588
2589
2590
# _LT_LINKER_BOILERPLATE
2591
# ----------------------
2592
# Check for linker boilerplate output or warnings with
2593
# the simple link test code.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2594
m4_defun([_LT_LINKER_BOILERPLATE],
2595
[m4_require([_LT_DECL_SED])dnl
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
2596
ac_outfile=conftest.$ac_objext
2597
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
2598
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
2599
_lt_linker_boilerplate=`cat conftest.err`
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2600
$RM -r conftest*
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
2601
])# _LT_LINKER_BOILERPLATE
2602
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2603
# _LT_REQUIRED_DARWIN_CHECKS
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2604
# -------------------------
2605
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2606
  case $host_os in
2607
    rhapsody* | darwin*)
2608
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2609
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2610
    AC_CHECK_TOOL([LIPO], [lipo], [:])
2611
    AC_CHECK_TOOL([OTOOL], [otool], [:])
2612
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2613
    _LT_DECL([], [DSYMUTIL], [1],
2614
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2615
    _LT_DECL([], [NMEDIT], [1],
2616
      [Tool to change global to local symbols on Mac OS X])
2617
    _LT_DECL([], [LIPO], [1],
2618
      [Tool to manipulate fat objects and archives on Mac OS X])
2619
    _LT_DECL([], [OTOOL], [1],
2620
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2621
    _LT_DECL([], [OTOOL64], [1],
2622
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2623
2624
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2625
      [lt_cv_apple_cc_single_mod=no
2626
      if test -z "${LT_MULTI_MODULE}"; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2627
	# By default we will add the -single_module flag. You can override
2628
	# by either setting the environment variable LT_MULTI_MODULE
2629
	# non-empty at configure time, or by adding -multi_module to the
2630
	# link flags.
2631
	rm -rf libconftest.dylib*
2632
	echo "int foo(void){return 1;}" > conftest.c
2633
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2634
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2635
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2636
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2637
        _lt_result=$?
2638
	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2639
	  lt_cv_apple_cc_single_mod=yes
2640
	else
2641
	  cat conftest.err >&AS_MESSAGE_LOG_FD
2642
	fi
2643
	rm -rf libconftest.dylib*
2644
	rm -f conftest.*
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2645
      fi])
2646
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2647
      [lt_cv_ld_exported_symbols_list],
2648
      [lt_cv_ld_exported_symbols_list=no
2649
      save_LDFLAGS=$LDFLAGS
2650
      echo "_main" > conftest.sym
2651
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2652
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2653
	[lt_cv_ld_exported_symbols_list=yes],
2654
	[lt_cv_ld_exported_symbols_list=no])
2655
	LDFLAGS="$save_LDFLAGS"
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2656
    ])
2657
    case $host_os in
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2658
    rhapsody* | darwin1.[[012]])
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2659
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2660
    darwin1.*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2661
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1.2.55 by Robert Ancell
Import upstream version 2.27.1
2662
    darwin*) # darwin 5.x on
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2663
      # if running on 10.5 or later, the deployment target defaults
2664
      # to the OS version, if on x86, and 10.4, the deployment
1.2.55 by Robert Ancell
Import upstream version 2.27.1
2665
      # target defaults to 10.4. Don't you love it?
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2666
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2667
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2668
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2669
	10.[[012]]*)
2670
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2671
	10.*)
2672
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2673
      esac
2674
    ;;
2675
  esac
2676
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2677
      _lt_dar_single_mod='$single_module'
2678
    fi
2679
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2680
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2681
    else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2682
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2683
    fi
2684
    if test "$DSYMUTIL" != ":"; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2685
      _lt_dsymutil='~$DSYMUTIL $lib || :'
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
2686
    else
2687
      _lt_dsymutil=
2688
    fi
2689
    ;;
2690
  esac
2691
])
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
2692
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2693
2694
# _LT_DARWIN_LINKER_FEATURES
2695
# --------------------------
2696
# Checks for linker and compiler features on darwin
2697
m4_defun([_LT_DARWIN_LINKER_FEATURES],
2698
[
2699
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2700
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2701
  _LT_TAGVAR(hardcode_direct, $1)=no
2702
  _LT_TAGVAR(hardcode_automatic, $1)=yes
2703
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2704
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2705
  _LT_TAGVAR(link_all_deplibs, $1)=yes
2706
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1.2.55 by Robert Ancell
Import upstream version 2.27.1
2707
  case $cc_basename in
2708
     ifort*) _lt_dar_can_shared=yes ;;
2709
     *) _lt_dar_can_shared=$GCC ;;
2710
  esac
2711
  if test "$_lt_dar_can_shared" = "yes"; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2712
    output_verbose_link_cmd=echo
2713
    _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}"
2714
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2715
    _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}"
2716
    _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}"
2717
    m4_if([$1], [CXX],
2718
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2719
      _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}"
2720
      _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}"
2721
    fi
2722
],[])
2723
  else
2724
  _LT_TAGVAR(ld_shlibs, $1)=no
2725
  fi
2726
])
2727
2728
# _LT_SYS_MODULE_PATH_AIX
2729
# -----------------------
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2730
# Links a minimal program and checks the executable
2731
# for the system default hardcoded library path. In most cases,
2732
# this is /usr/lib:/lib, but when the MPI compilers are used
2733
# the location of the communication and MPI libs are included too.
2734
# If we don't find anything, use the default library path according
2735
# to the aix ld manual.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2736
m4_defun([_LT_SYS_MODULE_PATH_AIX],
2737
[m4_require([_LT_DECL_SED])dnl
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
2738
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2739
lt_aix_libpath_sed='
2740
    /Import File Strings/,/^$/ {
2741
	/^0/ {
2742
	    s/^0  *\(.*\)$/\1/
2743
	    p
2744
	}
2745
    }'
2746
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2747
# Check for a 64-bit object if we didn't find anything.
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
2748
if test -z "$aix_libpath"; then
2749
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2750
fi],[])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2751
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2752
])# _LT_SYS_MODULE_PATH_AIX
2753
2754
2755
# _LT_SHELL_INIT(ARG)
2756
# -------------------
2757
m4_define([_LT_SHELL_INIT],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2758
[ifdef([AC_DIVERSION_NOTICE],
2759
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2760
	 [AC_DIVERT_PUSH(NOTICE)])
2761
$1
2762
AC_DIVERT_POP
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2763
])# _LT_SHELL_INIT
2764
2765
2766
# _LT_PROG_ECHO_BACKSLASH
2767
# -----------------------
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2768
# Add some code to the start of the generated configure script which
2769
# will find an echo command which doesn't interpret backslashes.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2770
m4_defun([_LT_PROG_ECHO_BACKSLASH],
2771
[_LT_SHELL_INIT([
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2772
# Check that we are running under the correct shell.
2773
SHELL=${CONFIG_SHELL-/bin/sh}
2774
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2775
case X$lt_ECHO in
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2776
X*--fallback-echo)
2777
  # Remove one level of quotation (which was required for Make).
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2778
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2779
  ;;
2780
esac
2781
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2782
ECHO=${lt_ECHO-echo}
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2783
if test "X[$]1" = X--no-reexec; then
2784
  # Discard the --no-reexec flag, and continue.
2785
  shift
2786
elif test "X[$]1" = X--fallback-echo; then
2787
  # Avoid inline document here, it may be left over
2788
  :
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2789
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2790
  # Yippee, $ECHO works!
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2791
  :
2792
else
2793
  # Restart under the correct shell.
2794
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2795
fi
2796
2797
if test "X[$]1" = X--fallback-echo; then
2798
  # used as fallback echo
2799
  shift
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2800
  cat <<_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2801
[$]*
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2802
_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2803
  exit 0
2804
fi
2805
2806
# The HP-UX ksh and POSIX shell print the target directory to stdout
2807
# if CDPATH is set.
2808
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2809
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2810
if test -z "$lt_ECHO"; then
2811
  if test "X${echo_test_string+set}" != Xset; then
2812
    # find a string as large as possible, as long as the shell can cope with it
2813
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2814
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2815
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2816
	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2817
      then
2818
        break
2819
      fi
2820
    done
2821
  fi
2822
2823
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2824
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2825
     test "X$echo_testing_string" = "X$echo_test_string"; then
2826
    :
2827
  else
2828
    # The Solaris, AIX, and Digital Unix default echo programs unquote
2829
    # backslashes.  This makes it impossible to quote backslashes using
2830
    #   echo "$something" | sed 's/\\/\\\\/g'
2831
    #
2832
    # So, first we look for a working echo in the user's PATH.
2833
2834
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2835
    for dir in $PATH /usr/ucb; do
2836
      IFS="$lt_save_ifs"
2837
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2838
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2839
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2840
         test "X$echo_testing_string" = "X$echo_test_string"; then
2841
        ECHO="$dir/echo"
2842
        break
2843
      fi
2844
    done
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2845
    IFS="$lt_save_ifs"
2846
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2847
    if test "X$ECHO" = Xecho; then
2848
      # We didn't find a better echo, so look for alternatives.
2849
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2850
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2851
         test "X$echo_testing_string" = "X$echo_test_string"; then
2852
        # This shell has a builtin print -r that does the trick.
2853
        ECHO='print -r'
2854
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2855
	   test "X$CONFIG_SHELL" != X/bin/ksh; then
2856
        # If we have ksh, try running configure again with it.
2857
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2858
        export ORIGINAL_CONFIG_SHELL
2859
        CONFIG_SHELL=/bin/ksh
2860
        export CONFIG_SHELL
2861
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2862
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2863
        # Try using printf.
2864
        ECHO='printf %s\n'
2865
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2866
	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2867
	   test "X$echo_testing_string" = "X$echo_test_string"; then
2868
	  # Cool, printf works
2869
	  :
2870
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2871
	     test "X$echo_testing_string" = 'X\t' &&
2872
	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2873
	     test "X$echo_testing_string" = "X$echo_test_string"; then
2874
	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2875
	  export CONFIG_SHELL
2876
	  SHELL="$CONFIG_SHELL"
2877
	  export SHELL
2878
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2879
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2880
	     test "X$echo_testing_string" = 'X\t' &&
2881
	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2882
	     test "X$echo_testing_string" = "X$echo_test_string"; then
2883
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2884
        else
2885
	  # maybe with a smaller string...
2886
	  prev=:
2887
2888
	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2889
	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2890
	    then
2891
	      break
2892
	    fi
2893
	    prev="$cmd"
2894
	  done
2895
2896
	  if test "$prev" != 'sed 50q "[$]0"'; then
2897
	    echo_test_string=`eval $prev`
2898
	    export echo_test_string
2899
	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2900
	  else
2901
	    # Oops.  We lost completely, so just stick with echo.
2902
	    ECHO=echo
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2903
	  fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2904
        fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2905
      fi
2906
    fi
2907
  fi
2908
fi
2909
2910
# Copy echo and quote the copy suitably for passing to libtool from
2911
# the Makefile, instead of quoting the original, which is used later.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2912
lt_ECHO=$ECHO
2913
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2914
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2915
fi
2916
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2917
AC_SUBST(lt_ECHO)
2918
])
2919
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2920
_LT_DECL([], [ECHO], [1],
2921
    [An echo program that does not interpret backslashes])
2922
])# _LT_PROG_ECHO_BACKSLASH
2923
2924
2925
# _LT_ENABLE_LOCK
2926
# ---------------
2927
m4_defun([_LT_ENABLE_LOCK],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2928
[AC_ARG_ENABLE([libtool-lock],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2929
  [AS_HELP_STRING([--disable-libtool-lock],
2930
    [avoid locking (might break parallel builds)])])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2931
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2932
2933
# Some flags need to be propagated to the compiler or linker for good
2934
# libtool support.
2935
case $host in
2936
ia64-*-hpux*)
2937
  # Find out which ABI we are using.
2938
  echo 'int i;' > conftest.$ac_ext
2939
  if AC_TRY_EVAL(ac_compile); then
2940
    case `/usr/bin/file conftest.$ac_objext` in
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2941
      *ELF-32*)
2942
	HPUX_IA64_MODE="32"
2943
	;;
2944
      *ELF-64*)
2945
	HPUX_IA64_MODE="64"
2946
	;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2947
    esac
2948
  fi
2949
  rm -rf conftest*
2950
  ;;
2951
*-*-irix6*)
2952
  # Find out which ABI we are using.
2953
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2954
  if AC_TRY_EVAL(ac_compile); then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2955
    if test "$lt_cv_prog_gnu_ld" = yes; then
2956
      case `/usr/bin/file conftest.$ac_objext` in
2957
	*32-bit*)
2958
	  LD="${LD-ld} -melf32bsmip"
2959
	  ;;
2960
	*N32*)
2961
	  LD="${LD-ld} -melf32bmipn32"
2962
	  ;;
2963
	*64-bit*)
2964
	  LD="${LD-ld} -melf64bmip"
2965
	;;
2966
      esac
2967
    else
2968
      case `/usr/bin/file conftest.$ac_objext` in
2969
	*32-bit*)
2970
	  LD="${LD-ld} -32"
2971
	  ;;
2972
	*N32*)
2973
	  LD="${LD-ld} -n32"
2974
	  ;;
2975
	*64-bit*)
2976
	  LD="${LD-ld} -64"
2977
	  ;;
2978
      esac
2979
    fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2980
  fi
2981
  rm -rf conftest*
2982
  ;;
2983
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
2984
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2985
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
2986
  # Find out which ABI we are using.
2987
  echo 'int i;' > conftest.$ac_ext
2988
  if AC_TRY_EVAL(ac_compile); then
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
2989
    case `/usr/bin/file conftest.o` in
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
2990
      *32-bit*)
2991
	case $host in
2992
	  x86_64-*kfreebsd*-gnu)
2993
	    LD="${LD-ld} -m elf_i386_fbsd"
2994
	    ;;
2995
	  x86_64-*linux*)
2996
	    LD="${LD-ld} -m elf_i386"
2997
	    ;;
2998
	  ppc64-*linux*|powerpc64-*linux*)
2999
	    LD="${LD-ld} -m elf32ppclinux"
3000
	    ;;
3001
	  s390x-*linux*)
3002
	    LD="${LD-ld} -m elf_s390"
3003
	    ;;
3004
	  sparc64-*linux*)
3005
	    LD="${LD-ld} -m elf32_sparc"
3006
	    ;;
3007
	esac
3008
	;;
3009
      *64-bit*)
3010
	case $host in
3011
	  x86_64-*kfreebsd*-gnu)
3012
	    LD="${LD-ld} -m elf_x86_64_fbsd"
3013
	    ;;
3014
	  x86_64-*linux*)
3015
	    LD="${LD-ld} -m elf_x86_64"
3016
	    ;;
3017
	  ppc*-*linux*|powerpc*-*linux*)
3018
	    LD="${LD-ld} -m elf64ppc"
3019
	    ;;
3020
	  s390*-*linux*|s390*-*tpf*)
3021
	    LD="${LD-ld} -m elf64_s390"
3022
	    ;;
3023
	  sparc*-*linux*)
3024
	    LD="${LD-ld} -m elf64_sparc"
3025
	    ;;
3026
	esac
3027
	;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3028
    esac
3029
  fi
3030
  rm -rf conftest*
3031
  ;;
3032
3033
*-*-sco3.2v5*)
3034
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3035
  SAVE_CFLAGS="$CFLAGS"
3036
  CFLAGS="$CFLAGS -belf"
3037
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3038
    [AC_LANG_PUSH(C)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3039
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3040
     AC_LANG_POP])
3041
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3042
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3043
    CFLAGS="$SAVE_CFLAGS"
3044
  fi
3045
  ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3046
sparc*-*solaris*)
3047
  # Find out which ABI we are using.
3048
  echo 'int i;' > conftest.$ac_ext
3049
  if AC_TRY_EVAL(ac_compile); then
3050
    case `/usr/bin/file conftest.o` in
3051
    *64-bit*)
3052
      case $lt_cv_prog_gnu_ld in
3053
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
3054
      *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3055
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
3056
	  LD="${LD-ld} -64"
3057
	fi
3058
	;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3059
      esac
3060
      ;;
3061
    esac
3062
  fi
3063
  rm -rf conftest*
3064
  ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3065
esac
3066
3067
need_locks="$enable_libtool_lock"
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3068
])# _LT_ENABLE_LOCK
3069
3070
3071
# _LT_CMD_OLD_ARCHIVE
3072
# -------------------
3073
m4_defun([_LT_CMD_OLD_ARCHIVE],
3074
[AC_CHECK_TOOL(AR, ar, false)
3075
test -z "$AR" && AR=ar
3076
test -z "$AR_FLAGS" && AR_FLAGS=cru
3077
_LT_DECL([], [AR], [1], [The archiver])
3078
_LT_DECL([], [AR_FLAGS], [1])
3079
3080
AC_CHECK_TOOL(STRIP, strip, :)
3081
test -z "$STRIP" && STRIP=:
3082
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3083
3084
AC_CHECK_TOOL(RANLIB, ranlib, :)
3085
test -z "$RANLIB" && RANLIB=:
3086
_LT_DECL([], [RANLIB], [1],
3087
    [Commands used to install an old-style archive])
3088
3089
# Determine commands to create old-style static archives.
3090
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3091
old_postinstall_cmds='chmod 644 $oldlib'
3092
old_postuninstall_cmds=
3093
3094
if test -n "$RANLIB"; then
3095
  case $host_os in
3096
  openbsd*)
3097
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3098
    ;;
3099
  *)
3100
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3101
    ;;
3102
  esac
3103
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3104
fi
3105
_LT_DECL([], [old_postinstall_cmds], [2])
3106
_LT_DECL([], [old_postuninstall_cmds], [2])
3107
_LT_TAGDECL([], [old_archive_cmds], [2],
3108
    [Commands used to build an old-style archive])
3109
])# _LT_CMD_OLD_ARCHIVE
3110
3111
3112
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3113
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3114
# ----------------------------------------------------------------
3115
# Check whether the given compiler option works
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3116
AC_DEFUN([_LT_COMPILER_OPTION],
3117
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3118
m4_require([_LT_DECL_SED])dnl
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3119
AC_CACHE_CHECK([$1], [$2],
3120
  [$2=no
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3121
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3122
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3123
   lt_compiler_flag="$3"
3124
   # Insert the option either (1) after the last *FLAGS variable, or
3125
   # (2) before a word containing "conftest.", or (3) at the end.
3126
   # Note that $ac_compile itself does not contain backslashes and begins
3127
   # with a dollar sign (not a hyphen), so the echo should work correctly.
3128
   # The option is referenced via a variable to avoid confusing sed.
3129
   lt_compile=`echo "$ac_compile" | $SED \
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3130
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3131
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3132
   -e 's:$: $lt_compiler_flag:'`
3133
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3134
   (eval "$lt_compile" 2>conftest.err)
3135
   ac_status=$?
3136
   cat conftest.err >&AS_MESSAGE_LOG_FD
3137
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3138
   if (exit $ac_status) && test -s "$ac_outfile"; then
3139
     # The compiler can only warn and ignore the option if not recognized
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
3140
     # So say no if there are warnings other than the usual output.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3141
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3142
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3143
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3144
       $2=yes
3145
     fi
3146
   fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3147
   $RM conftest*
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3148
])
3149
3150
if test x"[$]$2" = xyes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3151
    m4_if([$5], , :, [$5])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3152
else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3153
    m4_if([$6], , :, [$6])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3154
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3155
])# _LT_COMPILER_OPTION
3156
3157
# Old name:
3158
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3159
dnl aclocal-1.4 backwards compatibility:
3160
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3161
3162
3163
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3164
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3165
# ----------------------------------------------------
3166
# Check whether the given linker option works
3167
AC_DEFUN([_LT_LINKER_OPTION],
3168
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3169
m4_require([_LT_DECL_SED])dnl
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3170
AC_CACHE_CHECK([$1], [$2],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3171
  [$2=no
3172
   save_LDFLAGS="$LDFLAGS"
3173
   LDFLAGS="$LDFLAGS $3"
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3174
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3175
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3176
     # The linker can only warn and ignore the option if not recognized
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3177
     # So say no if there are warnings
3178
     if test -s conftest.err; then
3179
       # Append any errors to the config.log.
3180
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3181
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3182
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
3183
       if diff conftest.exp conftest.er2 >/dev/null; then
3184
         $2=yes
3185
       fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3186
     else
3187
       $2=yes
3188
     fi
3189
   fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3190
   $RM -r conftest*
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3191
   LDFLAGS="$save_LDFLAGS"
3192
])
3193
3194
if test x"[$]$2" = xyes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3195
    m4_if([$4], , :, [$4])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3196
else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3197
    m4_if([$5], , :, [$5])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3198
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3199
])# _LT_LINKER_OPTION
3200
3201
# Old name:
3202
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3203
dnl aclocal-1.4 backwards compatibility:
3204
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3205
3206
3207
# LT_CMD_MAX_LEN
3208
#---------------
3209
AC_DEFUN([LT_CMD_MAX_LEN],
3210
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3211
# find the maximum length of command line arguments
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3212
AC_MSG_CHECKING([the maximum length of command line arguments])
3213
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3214
  i=0
3215
  teststring="ABCD"
3216
3217
  case $build_os in
3218
  msdosdjgpp*)
3219
    # On DJGPP, this test can blow up pretty badly due to problems in libc
3220
    # (any single argument exceeding 2000 bytes causes a buffer overrun
3221
    # during glob expansion).  Even if it were fixed, the result of this
3222
    # check would be larger than it should be.
3223
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3224
    ;;
3225
3226
  gnu*)
3227
    # Under GNU Hurd, this test is not required because there is
3228
    # no limit to the length of command line arguments.
3229
    # Libtool will interpret -1 as no limit whatsoever
3230
    lt_cv_sys_max_cmd_len=-1;
3231
    ;;
3232
1.2.55 by Robert Ancell
Import upstream version 2.27.1
3233
  cygwin* | mingw* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3234
    # On Win9x/ME, this test blows up -- it succeeds, but takes
3235
    # about 5 minutes as the teststring grows exponentially.
3236
    # Worse, since 9x/ME are not pre-emptively multitasking,
3237
    # you end up with a "frozen" computer, even though with patience
3238
    # the test eventually succeeds (with a max line length of 256k).
3239
    # Instead, let's just punt: use the minimum linelength reported by
3240
    # all of the supported platforms: 8192 (on NT/2K/XP).
3241
    lt_cv_sys_max_cmd_len=8192;
3242
    ;;
3243
3244
  amigaos*)
3245
    # On AmigaOS with pdksh, this test takes hours, literally.
3246
    # So we just punt and use a minimum line length of 8192.
3247
    lt_cv_sys_max_cmd_len=8192;
3248
    ;;
3249
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
3250
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3251
    # This has been around since 386BSD, at least.  Likely further.
3252
    if test -x /sbin/sysctl; then
3253
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3254
    elif test -x /usr/sbin/sysctl; then
3255
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3256
    else
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3257
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3258
    fi
3259
    # And add a safety zone
3260
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
3261
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3262
    ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3263
3264
  interix*)
3265
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3266
    lt_cv_sys_max_cmd_len=196608
3267
    ;;
3268
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
3269
  osf*)
3270
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3271
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3272
    # nice to cause kernel panics so lets avoid the loop below.
3273
    # First set a reasonable default.
3274
    lt_cv_sys_max_cmd_len=16384
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3275
    #
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
3276
    if test -x /sbin/sysconfig; then
3277
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3278
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3279
      esac
3280
    fi
3281
    ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3282
  sco3.2v5*)
3283
    lt_cv_sys_max_cmd_len=102400
3284
    ;;
3285
  sysv5* | sco5v6* | sysv4.2uw2*)
3286
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3287
    if test -n "$kargmax"; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3288
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3289
    else
3290
      lt_cv_sys_max_cmd_len=32768
3291
    fi
3292
    ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
3293
  *)
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3294
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3295
    if test -n "$lt_cv_sys_max_cmd_len"; then
3296
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3297
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3298
    else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3299
      # Make teststring a little bigger before we do anything with it.
3300
      # a 1K string should be a reasonable start.
3301
      for i in 1 2 3 4 5 6 7 8 ; do
3302
        teststring=$teststring$teststring
3303
      done
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3304
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3305
      # If test is not a shell built-in, we'll probably end up computing a
3306
      # maximum length that is only half of the actual maximum length, but
3307
      # we can't tell.
3308
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3309
	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3310
	      test $i != 17 # 1/2 MB should be enough
3311
      do
3312
        i=`expr $i + 1`
3313
        teststring=$teststring$teststring
3314
      done
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3315
      # Only check the string length outside the loop.
3316
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3317
      teststring=
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3318
      # Add a significant safety factor because C++ compilers can tack on
3319
      # massive amounts of additional arguments before passing them to the
3320
      # linker.  It appears as though 1/2 is a usable value.
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3321
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3322
    fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3323
    ;;
3324
  esac
3325
])
3326
if test -n $lt_cv_sys_max_cmd_len ; then
3327
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3328
else
3329
  AC_MSG_RESULT(none)
3330
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3331
max_cmd_len=$lt_cv_sys_max_cmd_len
3332
_LT_DECL([], [max_cmd_len], [0],
3333
    [What is the maximum length of a command?])
3334
])# LT_CMD_MAX_LEN
3335
3336
# Old name:
3337
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3338
dnl aclocal-1.4 backwards compatibility:
3339
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3340
3341
3342
# _LT_HEADER_DLFCN
3343
# ----------------
3344
m4_defun([_LT_HEADER_DLFCN],
3345
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3346
])# _LT_HEADER_DLFCN
3347
3348
3349
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3350
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3351
# ----------------------------------------------------------------
3352
m4_defun([_LT_TRY_DLOPEN_SELF],
3353
[m4_require([_LT_HEADER_DLFCN])dnl
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3354
if test "$cross_compiling" = yes; then :
3355
  [$4]
3356
else
3357
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3358
  lt_status=$lt_dlunknown
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3359
  cat > conftest.$ac_ext <<_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3360
[#line __oline__ "configure"
3361
#include "confdefs.h"
3362
3363
#if HAVE_DLFCN_H
3364
#include <dlfcn.h>
3365
#endif
3366
3367
#include <stdio.h>
3368
3369
#ifdef RTLD_GLOBAL
3370
#  define LT_DLGLOBAL		RTLD_GLOBAL
3371
#else
3372
#  ifdef DL_GLOBAL
3373
#    define LT_DLGLOBAL		DL_GLOBAL
3374
#  else
3375
#    define LT_DLGLOBAL		0
3376
#  endif
3377
#endif
3378
3379
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3380
   find out it does not work in some platform. */
3381
#ifndef LT_DLLAZY_OR_NOW
3382
#  ifdef RTLD_LAZY
3383
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3384
#  else
3385
#    ifdef DL_LAZY
3386
#      define LT_DLLAZY_OR_NOW		DL_LAZY
3387
#    else
3388
#      ifdef RTLD_NOW
3389
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3390
#      else
3391
#        ifdef DL_NOW
3392
#          define LT_DLLAZY_OR_NOW	DL_NOW
3393
#        else
3394
#          define LT_DLLAZY_OR_NOW	0
3395
#        endif
3396
#      endif
3397
#    endif
3398
#  endif
3399
#endif
3400
3401
void fnord() { int i=42;}
3402
int main ()
3403
{
3404
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3405
  int status = $lt_dlunknown;
3406
3407
  if (self)
3408
    {
3409
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3410
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3411
      /* dlclose (self); */
3412
    }
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3413
  else
3414
    puts (dlerror ());
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3415
1.2.55 by Robert Ancell
Import upstream version 2.27.1
3416
  return status;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3417
}]
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3418
_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3419
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3420
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3421
    lt_status=$?
3422
    case x$lt_status in
3423
      x$lt_dlno_uscore) $1 ;;
3424
      x$lt_dlneed_uscore) $2 ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3425
      x$lt_dlunknown|x*) $3 ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3426
    esac
3427
  else :
3428
    # compilation failed
3429
    $3
3430
  fi
3431
fi
3432
rm -fr conftest*
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3433
])# _LT_TRY_DLOPEN_SELF
3434
3435
3436
# LT_SYS_DLOPEN_SELF
3437
# ------------------
3438
AC_DEFUN([LT_SYS_DLOPEN_SELF],
3439
[m4_require([_LT_HEADER_DLFCN])dnl
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3440
if test "x$enable_dlopen" != xyes; then
3441
  enable_dlopen=unknown
3442
  enable_dlopen_self=unknown
3443
  enable_dlopen_self_static=unknown
3444
else
3445
  lt_cv_dlopen=no
3446
  lt_cv_dlopen_libs=
3447
3448
  case $host_os in
3449
  beos*)
3450
    lt_cv_dlopen="load_add_on"
3451
    lt_cv_dlopen_libs=
3452
    lt_cv_dlopen_self=yes
3453
    ;;
3454
1.2.55 by Robert Ancell
Import upstream version 2.27.1
3455
  mingw* | pw32* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3456
    lt_cv_dlopen="LoadLibrary"
3457
    lt_cv_dlopen_libs=
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3458
    ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3459
3460
  cygwin*)
3461
    lt_cv_dlopen="dlopen"
3462
    lt_cv_dlopen_libs=
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3463
    ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3464
3465
  darwin*)
3466
  # if libdl is installed we need to link against it
3467
    AC_CHECK_LIB([dl], [dlopen],
3468
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3469
    lt_cv_dlopen="dyld"
3470
    lt_cv_dlopen_libs=
3471
    lt_cv_dlopen_self=yes
3472
    ])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3473
    ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3474
3475
  *)
3476
    AC_CHECK_FUNC([shl_load],
3477
	  [lt_cv_dlopen="shl_load"],
3478
      [AC_CHECK_LIB([dld], [shl_load],
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
3479
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3480
	[AC_CHECK_FUNC([dlopen],
3481
	      [lt_cv_dlopen="dlopen"],
3482
	  [AC_CHECK_LIB([dl], [dlopen],
3483
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3484
	    [AC_CHECK_LIB([svld], [dlopen],
3485
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3486
	      [AC_CHECK_LIB([dld], [dld_link],
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
3487
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3488
	      ])
3489
	    ])
3490
	  ])
3491
	])
3492
      ])
3493
    ;;
3494
  esac
3495
3496
  if test "x$lt_cv_dlopen" != xno; then
3497
    enable_dlopen=yes
3498
  else
3499
    enable_dlopen=no
3500
  fi
3501
3502
  case $lt_cv_dlopen in
3503
  dlopen)
3504
    save_CPPFLAGS="$CPPFLAGS"
3505
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3506
3507
    save_LDFLAGS="$LDFLAGS"
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3508
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3509
3510
    save_LIBS="$LIBS"
3511
    LIBS="$lt_cv_dlopen_libs $LIBS"
3512
3513
    AC_CACHE_CHECK([whether a program can dlopen itself],
3514
	  lt_cv_dlopen_self, [dnl
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3515
	  _LT_TRY_DLOPEN_SELF(
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3516
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3517
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3518
    ])
3519
3520
    if test "x$lt_cv_dlopen_self" = xyes; then
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3521
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3522
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3523
	  lt_cv_dlopen_self_static, [dnl
3524
	  _LT_TRY_DLOPEN_SELF(
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3525
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3526
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3527
      ])
3528
    fi
3529
3530
    CPPFLAGS="$save_CPPFLAGS"
3531
    LDFLAGS="$save_LDFLAGS"
3532
    LIBS="$save_LIBS"
3533
    ;;
3534
  esac
3535
3536
  case $lt_cv_dlopen_self in
3537
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3538
  *) enable_dlopen_self=unknown ;;
3539
  esac
3540
3541
  case $lt_cv_dlopen_self_static in
3542
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3543
  *) enable_dlopen_self_static=unknown ;;
3544
  esac
3545
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3546
_LT_DECL([dlopen_support], [enable_dlopen], [0],
3547
	 [Whether dlopen is supported])
3548
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3549
	 [Whether dlopen of programs is supported])
3550
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3551
	 [Whether dlopen of statically linked programs is supported])
3552
])# LT_SYS_DLOPEN_SELF
3553
3554
# Old name:
3555
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3556
dnl aclocal-1.4 backwards compatibility:
3557
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3558
3559
3560
# _LT_COMPILER_C_O([TAGNAME])
3561
# ---------------------------
3562
# Check to see if options -c and -o are simultaneously supported by compiler.
3563
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3564
m4_defun([_LT_COMPILER_C_O],
3565
[m4_require([_LT_DECL_SED])dnl
3566
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3567
m4_require([_LT_TAG_COMPILER])dnl
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3568
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3569
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3570
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3571
   $RM -r conftest 2>/dev/null
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3572
   mkdir conftest
3573
   cd conftest
3574
   mkdir out
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3575
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3576
3577
   lt_compiler_flag="-o out/conftest2.$ac_objext"
3578
   # Insert the option either (1) after the last *FLAGS variable, or
3579
   # (2) before a word containing "conftest.", or (3) at the end.
3580
   # Note that $ac_compile itself does not contain backslashes and begins
3581
   # with a dollar sign (not a hyphen), so the echo should work correctly.
3582
   lt_compile=`echo "$ac_compile" | $SED \
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3583
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3584
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3585
   -e 's:$: $lt_compiler_flag:'`
3586
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3587
   (eval "$lt_compile" 2>out/conftest.err)
3588
   ac_status=$?
3589
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3590
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3591
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3592
   then
3593
     # The compiler can only warn and ignore the option if not recognized
3594
     # So say no if there are warnings
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3595
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3596
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3597
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3598
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3599
     fi
3600
   fi
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3601
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3602
   $RM conftest*
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3603
   # SGI C++ compiler will create directory out/ii_files/ for
3604
   # template instantiation
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3605
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3606
   $RM out/* && rmdir out
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3607
   cd ..
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3608
   $RM -r conftest
3609
   $RM conftest*
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3610
])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3611
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3612
	[Does compiler simultaneously support -c and -o options?])
3613
])# _LT_COMPILER_C_O
3614
3615
3616
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3617
# ----------------------------------
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3618
# Check to see if we can do hard links to lock some files if needed
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3619
m4_defun([_LT_COMPILER_FILE_LOCKS],
3620
[m4_require([_LT_ENABLE_LOCK])dnl
3621
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3622
_LT_COMPILER_C_O([$1])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3623
3624
hard_links="nottested"
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3625
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3626
  # do not overwrite the value of need_locks provided by the user
3627
  AC_MSG_CHECKING([if we can lock with hard links])
3628
  hard_links=yes
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3629
  $RM conftest*
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3630
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3631
  touch conftest.a
3632
  ln conftest.a conftest.b 2>&5 || hard_links=no
3633
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3634
  AC_MSG_RESULT([$hard_links])
3635
  if test "$hard_links" = no; then
3636
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3637
    need_locks=warn
3638
  fi
3639
else
3640
  need_locks=no
3641
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3642
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3643
])# _LT_COMPILER_FILE_LOCKS
3644
3645
3646
# _LT_CHECK_OBJDIR
3647
# ----------------
3648
m4_defun([_LT_CHECK_OBJDIR],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3649
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3650
[rm -f .libs 2>/dev/null
3651
mkdir .libs 2>/dev/null
3652
if test -d .libs; then
3653
  lt_cv_objdir=.libs
3654
else
3655
  # MS-DOS does not allow filenames that begin with a dot.
3656
  lt_cv_objdir=_libs
3657
fi
3658
rmdir .libs 2>/dev/null])
3659
objdir=$lt_cv_objdir
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3660
_LT_DECL([], [objdir], [0],
3661
         [The name of the directory that contains temporary libtool files])dnl
3662
m4_pattern_allow([LT_OBJDIR])dnl
3663
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3664
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3665
])# _LT_CHECK_OBJDIR
3666
3667
3668
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3669
# --------------------------------------
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3670
# Check hardcoding attributes.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3671
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3672
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3673
_LT_TAGVAR(hardcode_action, $1)=
3674
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3675
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3676
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3677
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3678
  # We can hardcode non-existent directories.
3679
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3680
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3681
     # have to relink, otherwise we might link with an installed library
3682
     # when we should be linking with a yet-to-be-installed one
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3683
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3684
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3685
    # Linking always hardcodes the temporary library directory.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3686
    _LT_TAGVAR(hardcode_action, $1)=relink
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3687
  else
3688
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3689
    _LT_TAGVAR(hardcode_action, $1)=immediate
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3690
  fi
3691
else
3692
  # We cannot hardcode anything, or else we can only hardcode existing
3693
  # directories.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3694
  _LT_TAGVAR(hardcode_action, $1)=unsupported
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3695
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3696
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3697
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3698
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3699
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3700
  # Fast installation is not supported
3701
  enable_fast_install=no
3702
elif test "$shlibpath_overrides_runpath" = yes ||
3703
     test "$enable_shared" = no; then
3704
  # Fast installation is not necessary
3705
  enable_fast_install=needless
3706
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3707
_LT_TAGDECL([], [hardcode_action], [0],
3708
    [How to hardcode a shared library path into an executable])
3709
])# _LT_LINKER_HARDCODE_LIBPATH
3710
3711
3712
# _LT_CMD_STRIPLIB
3713
# ----------------
3714
m4_defun([_LT_CMD_STRIPLIB],
3715
[m4_require([_LT_DECL_EGREP])
3716
striplib=
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3717
old_striplib=
3718
AC_MSG_CHECKING([whether stripping libraries is possible])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3719
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3720
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3721
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3722
  AC_MSG_RESULT([yes])
3723
else
3724
# FIXME - insert some real tests, host_os isn't really good enough
3725
  case $host_os in
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3726
  darwin*)
3727
    if test -n "$STRIP" ; then
3728
      striplib="$STRIP -x"
3729
      old_striplib="$STRIP -S"
3730
      AC_MSG_RESULT([yes])
3731
    else
3732
      AC_MSG_RESULT([no])
3733
    fi
3734
    ;;
3735
  *)
3736
    AC_MSG_RESULT([no])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3737
    ;;
3738
  esac
3739
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3740
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3741
_LT_DECL([], [striplib], [1])
3742
])# _LT_CMD_STRIPLIB
3743
3744
3745
# _LT_SYS_DYNAMIC_LINKER([TAG])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3746
# -----------------------------
3747
# PORTME Fill in your ld.so characteristics
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3748
m4_defun([_LT_SYS_DYNAMIC_LINKER],
3749
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3750
m4_require([_LT_DECL_EGREP])dnl
3751
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1.2.55 by Robert Ancell
Import upstream version 2.27.1
3752
m4_require([_LT_DECL_OBJDUMP])dnl
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3753
m4_require([_LT_DECL_SED])dnl
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3754
AC_MSG_CHECKING([dynamic linker characteristics])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3755
m4_if([$1],
3756
	[], [
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3757
if test "$GCC" = yes; then
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3758
  case $host_os in
3759
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3760
    *) lt_awk_arg="/^libraries:/" ;;
3761
  esac
3762
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3763
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3764
    # if the path contains ";" then we assume it to be the separator
3765
    # otherwise default to the standard path separator (i.e. ":") - it is
3766
    # assumed that no part of a normal pathname contains ";" but that should
3767
    # okay in the real world where ";" in dirpaths is itself problematic.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3768
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3769
  else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3770
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3771
  fi
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3772
  # Ok, now we have the path, separated by spaces, we can step through it
3773
  # and add multilib dir if necessary.
3774
  lt_tmp_lt_search_path_spec=
3775
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3776
  for lt_sys_path in $lt_search_path_spec; do
3777
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3778
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3779
    else
3780
      test -d "$lt_sys_path" && \
3781
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3782
    fi
3783
  done
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3784
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3785
BEGIN {RS=" "; FS="/|\n";} {
3786
  lt_foo="";
3787
  lt_count=0;
3788
  for (lt_i = NF; lt_i > 0; lt_i--) {
3789
    if ($lt_i != "" && $lt_i != ".") {
3790
      if ($lt_i == "..") {
3791
        lt_count++;
3792
      } else {
3793
        if (lt_count == 0) {
3794
          lt_foo="/" $lt_i lt_foo;
3795
        } else {
3796
          lt_count--;
3797
        }
3798
      }
3799
    }
3800
  }
3801
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3802
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3803
}'`
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3804
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3805
else
3806
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
3807
fi])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3808
library_names_spec=
3809
libname_spec='lib$name'
3810
soname_spec=
3811
shrext_cmds=".so"
3812
postinstall_cmds=
3813
postuninstall_cmds=
3814
finish_cmds=
3815
finish_eval=
3816
shlibpath_var=
3817
shlibpath_overrides_runpath=unknown
3818
version_type=none
3819
dynamic_linker="$host_os ld.so"
3820
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3821
need_lib_prefix=unknown
3822
hardcode_into_libs=no
3823
3824
# when you set need_version to no, make sure it does not cause -set_version
3825
# flags to be left without arguments
3826
need_version=unknown
3827
3828
case $host_os in
3829
aix3*)
3830
  version_type=linux
3831
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3832
  shlibpath_var=LIBPATH
3833
3834
  # AIX 3 has no versioning support, so we append a major version to the name.
3835
  soname_spec='${libname}${release}${shared_ext}$major'
3836
  ;;
3837
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
3838
aix[[4-9]]*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3839
  version_type=linux
3840
  need_lib_prefix=no
3841
  need_version=no
3842
  hardcode_into_libs=yes
3843
  if test "$host_cpu" = ia64; then
3844
    # AIX 5 supports IA64
3845
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3846
    shlibpath_var=LD_LIBRARY_PATH
3847
  else
3848
    # With GCC up to 2.95.x, collect2 would create an import file
3849
    # for dependence libraries.  The import file would start with
3850
    # the line `#! .'.  This would cause the generated library to
3851
    # depend on `.', always an invalid library.  This was fixed in
3852
    # development snapshots of GCC prior to 3.0.
3853
    case $host_os in
3854
      aix4 | aix4.[[01]] | aix4.[[01]].*)
3855
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3856
	   echo ' yes '
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3857
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3858
	:
3859
      else
3860
	can_build_shared=no
3861
      fi
3862
      ;;
3863
    esac
3864
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3865
    # soname into executable. Probably we can add versioning support to
3866
    # collect2, so additional links can be useful in future.
3867
    if test "$aix_use_runtimelinking" = yes; then
3868
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3869
      # instead of lib<name>.a to let people know that these are not
3870
      # typical AIX shared libraries.
3871
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3872
    else
3873
      # We preserve .a as extension for shared libraries through AIX4.2
3874
      # and later when we are not doing run time linking.
3875
      library_names_spec='${libname}${release}.a $libname.a'
3876
      soname_spec='${libname}${release}${shared_ext}$major'
3877
    fi
3878
    shlibpath_var=LIBPATH
3879
  fi
3880
  ;;
3881
3882
amigaos*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3883
  case $host_cpu in
3884
  powerpc)
3885
    # Since July 2007 AmigaOS4 officially supports .so libraries.
3886
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3887
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3888
    ;;
3889
  m68k)
3890
    library_names_spec='$libname.ixlibrary $libname.a'
3891
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3892
    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'
3893
    ;;
3894
  esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3895
  ;;
3896
3897
beos*)
3898
  library_names_spec='${libname}${shared_ext}'
3899
  dynamic_linker="$host_os ld.so"
3900
  shlibpath_var=LIBRARY_PATH
3901
  ;;
3902
3903
bsdi[[45]]*)
3904
  version_type=linux
3905
  need_version=no
3906
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3907
  soname_spec='${libname}${release}${shared_ext}$major'
3908
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3909
  shlibpath_var=LD_LIBRARY_PATH
3910
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3911
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3912
  # the default ld.so.conf also contains /usr/contrib/lib and
3913
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3914
  # libtool to hard-code these into programs
3915
  ;;
3916
1.2.55 by Robert Ancell
Import upstream version 2.27.1
3917
cygwin* | mingw* | pw32* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3918
  version_type=windows
3919
  shrext_cmds=".dll"
3920
  need_version=no
3921
  need_lib_prefix=no
3922
3923
  case $GCC,$host_os in
1.2.55 by Robert Ancell
Import upstream version 2.27.1
3924
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3925
    library_names_spec='$libname.dll.a'
3926
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3927
    postinstall_cmds='base_file=`basename \${file}`~
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3928
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3929
      dldir=$destdir/`dirname \$dlpath`~
3930
      test -d \$dldir || mkdir -p \$dldir~
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3931
      $install_prog $dir/$dlname \$dldir/$dlname~
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3932
      chmod a+x \$dldir/$dlname~
3933
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3934
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3935
      fi'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3936
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3937
      dlpath=$dir/\$dldll~
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3938
       $RM \$dlpath'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3939
    shlibpath_overrides_runpath=yes
3940
3941
    case $host_os in
3942
    cygwin*)
3943
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3944
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3945
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3946
      ;;
1.2.55 by Robert Ancell
Import upstream version 2.27.1
3947
    mingw* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3948
      # MinGW DLLs use traditional 'lib' prefix
3949
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3950
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3951
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3952
        # It is most probably a Windows format PATH printed by
3953
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3954
        # path with ; separators, and with drive letters. We can handle the
3955
        # drive letters (cygwin fileutils understands them), so leave them,
3956
        # especially as we might pass files found there to a mingw objdump,
3957
        # which wouldn't understand a cygwinified path. Ahh.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3958
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3959
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3960
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3961
      fi
3962
      ;;
3963
    pw32*)
3964
      # pw32 DLLs use 'pw' prefix rather than 'lib'
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
3965
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3966
      ;;
3967
    esac
3968
    ;;
3969
3970
  *)
3971
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3972
    ;;
3973
  esac
3974
  dynamic_linker='Win32 ld.exe'
3975
  # FIXME: first we should search . and the directory the executable is in
3976
  shlibpath_var=PATH
3977
  ;;
3978
3979
darwin* | rhapsody*)
3980
  dynamic_linker="$host_os dyld"
3981
  version_type=darwin
3982
  need_lib_prefix=no
3983
  need_version=no
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3984
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3985
  soname_spec='${libname}${release}${major}$shared_ext'
3986
  shlibpath_overrides_runpath=yes
3987
  shlibpath_var=DYLD_LIBRARY_PATH
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
3988
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
3989
m4_if([$1], [],[
3990
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
3991
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3992
  ;;
3993
3994
dgux*)
3995
  version_type=linux
3996
  need_lib_prefix=no
3997
  need_version=no
3998
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3999
  soname_spec='${libname}${release}${shared_ext}$major'
4000
  shlibpath_var=LD_LIBRARY_PATH
4001
  ;;
4002
4003
freebsd1*)
4004
  dynamic_linker=no
4005
  ;;
4006
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
4007
freebsd* | dragonfly*)
4008
  # DragonFly does not have aout.  When/if they implement a new
4009
  # versioning mechanism, adjust this.
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4010
  if test -x /usr/bin/objformat; then
4011
    objformat=`/usr/bin/objformat`
4012
  else
4013
    case $host_os in
4014
    freebsd[[123]]*) objformat=aout ;;
4015
    *) objformat=elf ;;
4016
    esac
4017
  fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4018
  version_type=freebsd-$objformat
4019
  case $version_type in
4020
    freebsd-elf*)
4021
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4022
      need_version=no
4023
      need_lib_prefix=no
4024
      ;;
4025
    freebsd-*)
4026
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4027
      need_version=yes
4028
      ;;
4029
  esac
4030
  shlibpath_var=LD_LIBRARY_PATH
4031
  case $host_os in
4032
  freebsd2*)
4033
    shlibpath_overrides_runpath=yes
4034
    ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
4035
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4036
    shlibpath_overrides_runpath=yes
4037
    hardcode_into_libs=yes
4038
    ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4039
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4040
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4041
    shlibpath_overrides_runpath=no
4042
    hardcode_into_libs=yes
4043
    ;;
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
4044
  *) # from 4.6 on, and DragonFly
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4045
    shlibpath_overrides_runpath=yes
4046
    hardcode_into_libs=yes
4047
    ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4048
  esac
4049
  ;;
4050
4051
gnu*)
4052
  version_type=linux
4053
  need_lib_prefix=no
4054
  need_version=no
4055
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4056
  soname_spec='${libname}${release}${shared_ext}$major'
4057
  shlibpath_var=LD_LIBRARY_PATH
4058
  hardcode_into_libs=yes
4059
  ;;
4060
4061
hpux9* | hpux10* | hpux11*)
4062
  # Give a soname corresponding to the major version so that dld.sl refuses to
4063
  # link against other versions.
4064
  version_type=sunos
4065
  need_lib_prefix=no
4066
  need_version=no
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4067
  case $host_cpu in
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4068
  ia64*)
4069
    shrext_cmds='.so'
4070
    hardcode_into_libs=yes
4071
    dynamic_linker="$host_os dld.so"
4072
    shlibpath_var=LD_LIBRARY_PATH
4073
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4074
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4075
    soname_spec='${libname}${release}${shared_ext}$major'
4076
    if test "X$HPUX_IA64_MODE" = X32; then
4077
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4078
    else
4079
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4080
    fi
4081
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4082
    ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4083
  hppa*64*)
4084
    shrext_cmds='.sl'
4085
    hardcode_into_libs=yes
4086
    dynamic_linker="$host_os dld.sl"
4087
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4088
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4089
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4090
    soname_spec='${libname}${release}${shared_ext}$major'
4091
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4092
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4093
    ;;
4094
  *)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4095
    shrext_cmds='.sl'
4096
    dynamic_linker="$host_os dld.sl"
4097
    shlibpath_var=SHLIB_PATH
4098
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4099
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4100
    soname_spec='${libname}${release}${shared_ext}$major'
4101
    ;;
4102
  esac
4103
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
4104
  postinstall_cmds='chmod 555 $lib'
4105
  ;;
4106
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
4107
interix[[3-9]]*)
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4108
  version_type=linux
4109
  need_lib_prefix=no
4110
  need_version=no
4111
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4112
  soname_spec='${libname}${release}${shared_ext}$major'
4113
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4114
  shlibpath_var=LD_LIBRARY_PATH
4115
  shlibpath_overrides_runpath=no
4116
  hardcode_into_libs=yes
4117
  ;;
4118
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4119
irix5* | irix6* | nonstopux*)
4120
  case $host_os in
4121
    nonstopux*) version_type=nonstopux ;;
4122
    *)
4123
	if test "$lt_cv_prog_gnu_ld" = yes; then
4124
		version_type=linux
4125
	else
4126
		version_type=irix
4127
	fi ;;
4128
  esac
4129
  need_lib_prefix=no
4130
  need_version=no
4131
  soname_spec='${libname}${release}${shared_ext}$major'
4132
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4133
  case $host_os in
4134
  irix5* | nonstopux*)
4135
    libsuff= shlibsuff=
4136
    ;;
4137
  *)
4138
    case $LD in # libtool.m4 will add one of these switches to LD
4139
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4140
      libsuff= shlibsuff= libmagic=32-bit;;
4141
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4142
      libsuff=32 shlibsuff=N32 libmagic=N32;;
4143
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4144
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4145
    *) libsuff= shlibsuff= libmagic=never-match;;
4146
    esac
4147
    ;;
4148
  esac
4149
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4150
  shlibpath_overrides_runpath=no
4151
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4152
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4153
  hardcode_into_libs=yes
4154
  ;;
4155
4156
# No shared lib support for Linux oldld, aout, or coff.
4157
linux*oldld* | linux*aout* | linux*coff*)
4158
  dynamic_linker=no
4159
  ;;
4160
4161
# This must be Linux ELF.
1.2.35 by Sebastien Bacher
Import upstream version 2.21.2
4162
linux* | k*bsd*-gnu)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4163
  version_type=linux
4164
  need_lib_prefix=no
4165
  need_version=no
4166
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4167
  soname_spec='${libname}${release}${shared_ext}$major'
4168
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4169
  shlibpath_var=LD_LIBRARY_PATH
4170
  shlibpath_overrides_runpath=no
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4171
  # Some binutils ld are patched to set DT_RUNPATH
4172
  save_LDFLAGS=$LDFLAGS
4173
  save_libdir=$libdir
4174
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4175
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4176
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4177
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4178
       [shlibpath_overrides_runpath=yes])])
4179
  LDFLAGS=$save_LDFLAGS
4180
  libdir=$save_libdir
4181
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4182
  # This implies no fast_install, which is unacceptable.
4183
  # Some rework will be needed to allow for fast_install
4184
  # before this can be enabled.
4185
  hardcode_into_libs=yes
4186
4187
  # Append ld.so.conf contents to the search path
4188
  if test -f /etc/ld.so.conf; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4189
    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' ' '`
1.2.35 by Sebastien Bacher
Import upstream version 2.21.2
4190
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4191
  fi
4192
4193
  # We used to test for /lib/ld.so.1 and disable shared libraries on
4194
  # powerpc, because MkLinux only supported shared libraries with the
4195
  # GNU dynamic linker.  Since this was broken with cross compilers,
4196
  # most powerpc-linux boxes support dynamic linking these days and
4197
  # people can always --disable-shared, the test was removed, and we
4198
  # assume the GNU/Linux dynamic linker is in use.
4199
  dynamic_linker='GNU/Linux ld.so'
4200
  ;;
4201
4202
netbsd*)
4203
  version_type=sunos
4204
  need_lib_prefix=no
4205
  need_version=no
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4206
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4207
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4208
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4209
    dynamic_linker='NetBSD (a.out) ld.so'
4210
  else
4211
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4212
    soname_spec='${libname}${release}${shared_ext}$major'
4213
    dynamic_linker='NetBSD ld.elf_so'
4214
  fi
4215
  shlibpath_var=LD_LIBRARY_PATH
4216
  shlibpath_overrides_runpath=yes
4217
  hardcode_into_libs=yes
4218
  ;;
4219
4220
newsos6)
4221
  version_type=linux
4222
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4223
  shlibpath_var=LD_LIBRARY_PATH
4224
  shlibpath_overrides_runpath=yes
4225
  ;;
4226
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4227
*nto* | *qnx*)
4228
  version_type=qnx
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4229
  need_lib_prefix=no
4230
  need_version=no
4231
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4232
  soname_spec='${libname}${release}${shared_ext}$major'
4233
  shlibpath_var=LD_LIBRARY_PATH
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4234
  shlibpath_overrides_runpath=no
4235
  hardcode_into_libs=yes
4236
  dynamic_linker='ldqnx.so'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4237
  ;;
4238
4239
openbsd*)
4240
  version_type=sunos
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4241
  sys_lib_dlsearch_path_spec="/usr/lib"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4242
  need_lib_prefix=no
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
4243
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4244
  case $host_os in
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4245
    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
4246
    *)				need_version=no  ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
4247
  esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4248
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4249
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4250
  shlibpath_var=LD_LIBRARY_PATH
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4251
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4252
    case $host_os in
4253
      openbsd2.[[89]] | openbsd2.[[89]].*)
4254
	shlibpath_overrides_runpath=no
4255
	;;
4256
      *)
4257
	shlibpath_overrides_runpath=yes
4258
	;;
4259
      esac
4260
  else
4261
    shlibpath_overrides_runpath=yes
4262
  fi
4263
  ;;
4264
4265
os2*)
4266
  libname_spec='$name'
4267
  shrext_cmds=".dll"
4268
  need_lib_prefix=no
4269
  library_names_spec='$libname${shared_ext} $libname.a'
4270
  dynamic_linker='OS/2 ld.exe'
4271
  shlibpath_var=LIBPATH
4272
  ;;
4273
4274
osf3* | osf4* | osf5*)
4275
  version_type=osf
4276
  need_lib_prefix=no
4277
  need_version=no
4278
  soname_spec='${libname}${release}${shared_ext}$major'
4279
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4280
  shlibpath_var=LD_LIBRARY_PATH
4281
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4282
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4283
  ;;
4284
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
4285
rdos*)
4286
  dynamic_linker=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4287
  ;;
4288
4289
solaris*)
4290
  version_type=linux
4291
  need_lib_prefix=no
4292
  need_version=no
4293
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4294
  soname_spec='${libname}${release}${shared_ext}$major'
4295
  shlibpath_var=LD_LIBRARY_PATH
4296
  shlibpath_overrides_runpath=yes
4297
  hardcode_into_libs=yes
4298
  # ldd complains unless libraries are executable
4299
  postinstall_cmds='chmod +x $lib'
4300
  ;;
4301
4302
sunos4*)
4303
  version_type=sunos
4304
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4305
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4306
  shlibpath_var=LD_LIBRARY_PATH
4307
  shlibpath_overrides_runpath=yes
4308
  if test "$with_gnu_ld" = yes; then
4309
    need_lib_prefix=no
4310
  fi
4311
  need_version=yes
4312
  ;;
4313
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4314
sysv4 | sysv4.3*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4315
  version_type=linux
4316
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4317
  soname_spec='${libname}${release}${shared_ext}$major'
4318
  shlibpath_var=LD_LIBRARY_PATH
4319
  case $host_vendor in
4320
    sni)
4321
      shlibpath_overrides_runpath=no
4322
      need_lib_prefix=no
4323
      runpath_var=LD_RUN_PATH
4324
      ;;
4325
    siemens)
4326
      need_lib_prefix=no
4327
      ;;
4328
    motorola)
4329
      need_lib_prefix=no
4330
      need_version=no
4331
      shlibpath_overrides_runpath=no
4332
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4333
      ;;
4334
  esac
4335
  ;;
4336
4337
sysv4*MP*)
4338
  if test -d /usr/nec ;then
4339
    version_type=linux
4340
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4341
    soname_spec='$libname${shared_ext}.$major'
4342
    shlibpath_var=LD_LIBRARY_PATH
4343
  fi
4344
  ;;
4345
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4346
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4347
  version_type=freebsd-elf
4348
  need_lib_prefix=no
4349
  need_version=no
4350
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4351
  soname_spec='${libname}${release}${shared_ext}$major'
4352
  shlibpath_var=LD_LIBRARY_PATH
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4353
  shlibpath_overrides_runpath=yes
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4354
  hardcode_into_libs=yes
4355
  if test "$with_gnu_ld" = yes; then
4356
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4357
  else
4358
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4359
    case $host_os in
4360
      sco3.2v5*)
4361
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4362
	;;
4363
    esac
4364
  fi
4365
  sys_lib_dlsearch_path_spec='/usr/lib'
4366
  ;;
4367
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4368
tpf*)
4369
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4370
  version_type=linux
4371
  need_lib_prefix=no
4372
  need_version=no
1.2.55 by Robert Ancell
Import upstream version 2.27.1
4373
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4374
  shlibpath_var=LD_LIBRARY_PATH
4375
  shlibpath_overrides_runpath=no
4376
  hardcode_into_libs=yes
4377
  ;;
4378
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4379
uts4*)
4380
  version_type=linux
4381
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4382
  soname_spec='${libname}${release}${shared_ext}$major'
4383
  shlibpath_var=LD_LIBRARY_PATH
4384
  ;;
4385
4386
*)
4387
  dynamic_linker=no
4388
  ;;
4389
esac
4390
AC_MSG_RESULT([$dynamic_linker])
4391
test "$dynamic_linker" = no && can_build_shared=no
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4392
4393
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4394
if test "$GCC" = yes; then
4395
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4396
fi
1.2.55 by Robert Ancell
Import upstream version 2.27.1
4397
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4398
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4399
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4400
fi
4401
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4402
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4403
fi
4404
4405
_LT_DECL([], [variables_saved_for_relink], [1],
4406
    [Variables whose values should be saved in libtool wrapper scripts and
4407
    restored at link time])
4408
_LT_DECL([], [need_lib_prefix], [0],
4409
    [Do we need the "lib" prefix for modules?])
4410
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4411
_LT_DECL([], [version_type], [0], [Library versioning type])
4412
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4413
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4414
_LT_DECL([], [shlibpath_overrides_runpath], [0],
4415
    [Is shlibpath searched before the hard-coded library search path?])
4416
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4417
_LT_DECL([], [library_names_spec], [1],
4418
    [[List of archive names.  First name is the real one, the rest are links.
4419
    The last name is the one that the linker finds with -lNAME]])
4420
_LT_DECL([], [soname_spec], [1],
4421
    [[The coded name of the library, if different from the real name]])
4422
_LT_DECL([], [postinstall_cmds], [2],
4423
    [Command to use after installation of a shared archive])
4424
_LT_DECL([], [postuninstall_cmds], [2],
4425
    [Command to use after uninstallation of a shared archive])
4426
_LT_DECL([], [finish_cmds], [2],
4427
    [Commands used to finish a libtool library installation in a directory])
4428
_LT_DECL([], [finish_eval], [1],
4429
    [[As "finish_cmds", except a single script fragment to be evaled but
4430
    not shown]])
4431
_LT_DECL([], [hardcode_into_libs], [0],
4432
    [Whether we should hardcode library paths into libraries])
4433
_LT_DECL([], [sys_lib_search_path_spec], [2],
4434
    [Compile-time system search path for libraries])
4435
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4436
    [Run-time system search path for libraries])
4437
])# _LT_SYS_DYNAMIC_LINKER
4438
4439
4440
# _LT_PATH_TOOL_PREFIX(TOOL)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4441
# --------------------------
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
4442
# find a file program which can recognize shared library
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4443
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4444
[m4_require([_LT_DECL_EGREP])dnl
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4445
AC_MSG_CHECKING([for $1])
4446
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4447
[case $MAGIC_CMD in
4448
[[\\/*] |  ?:[\\/]*])
4449
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4450
  ;;
4451
*)
4452
  lt_save_MAGIC_CMD="$MAGIC_CMD"
4453
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4454
dnl $ac_dummy forces splitting on constant user-supplied paths.
4455
dnl POSIX.2 word splitting is done only on the output of word expansions,
4456
dnl not every word.  This closes a longstanding sh security hole.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4457
  ac_dummy="m4_if([$2], , $PATH, [$2])"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4458
  for ac_dir in $ac_dummy; do
4459
    IFS="$lt_save_ifs"
4460
    test -z "$ac_dir" && ac_dir=.
4461
    if test -f $ac_dir/$1; then
4462
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4463
      if test -n "$file_magic_test_file"; then
4464
	case $deplibs_check_method in
4465
	"file_magic "*)
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4466
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4467
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4468
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4469
	    $EGREP "$file_magic_regex" > /dev/null; then
4470
	    :
4471
	  else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4472
	    cat <<_LT_EOF 1>&2
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4473
4474
*** Warning: the command libtool uses to detect shared libraries,
4475
*** $file_magic_cmd, produces output that libtool cannot recognize.
4476
*** The result is that libtool may fail to recognize shared libraries
4477
*** as such.  This will affect the creation of libtool libraries that
4478
*** depend on shared libraries, but programs linked with such libtool
4479
*** libraries will work regardless of this problem.  Nevertheless, you
4480
*** may want to report the problem to your system manager and/or to
4481
*** bug-libtool@gnu.org
4482
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4483
_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4484
	  fi ;;
4485
	esac
4486
      fi
4487
      break
4488
    fi
4489
  done
4490
  IFS="$lt_save_ifs"
4491
  MAGIC_CMD="$lt_save_MAGIC_CMD"
4492
  ;;
4493
esac])
4494
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4495
if test -n "$MAGIC_CMD"; then
4496
  AC_MSG_RESULT($MAGIC_CMD)
4497
else
4498
  AC_MSG_RESULT(no)
4499
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4500
_LT_DECL([], [MAGIC_CMD], [0],
4501
	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4502
])# _LT_PATH_TOOL_PREFIX
4503
4504
# Old name:
4505
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4506
dnl aclocal-1.4 backwards compatibility:
4507
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4508
4509
4510
# _LT_PATH_MAGIC
4511
# --------------
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
4512
# find a file program which can recognize a shared library
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4513
m4_defun([_LT_PATH_MAGIC],
4514
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4515
if test -z "$lt_cv_path_MAGIC_CMD"; then
4516
  if test -n "$ac_tool_prefix"; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4517
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4518
  else
4519
    MAGIC_CMD=:
4520
  fi
4521
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4522
])# _LT_PATH_MAGIC
4523
4524
4525
# LT_PATH_LD
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4526
# ----------
4527
# find the pathname to the GNU or non-GNU linker
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4528
AC_DEFUN([LT_PATH_LD],
4529
[AC_REQUIRE([AC_PROG_CC])dnl
4530
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4531
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4532
m4_require([_LT_DECL_SED])dnl
4533
m4_require([_LT_DECL_EGREP])dnl
4534
4535
AC_ARG_WITH([gnu-ld],
4536
    [AS_HELP_STRING([--with-gnu-ld],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4537
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4538
    [test "$withval" = no || with_gnu_ld=yes],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4539
    [with_gnu_ld=no])dnl
4540
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4541
ac_prog=ld
4542
if test "$GCC" = yes; then
4543
  # Check if gcc -print-prog-name=ld gives a path.
4544
  AC_MSG_CHECKING([for ld used by $CC])
4545
  case $host in
4546
  *-*-mingw*)
4547
    # gcc leaves a trailing carriage return which upsets mingw
4548
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4549
  *)
4550
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4551
  esac
4552
  case $ac_prog in
4553
    # Accept absolute paths.
4554
    [[\\/]]* | ?:[[\\/]]*)
4555
      re_direlt='/[[^/]][[^/]]*/\.\./'
4556
      # Canonicalize the pathname of ld
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4557
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4558
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4559
	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4560
      done
4561
      test -z "$LD" && LD="$ac_prog"
4562
      ;;
4563
  "")
4564
    # If it fails, then pretend we aren't using GCC.
4565
    ac_prog=ld
4566
    ;;
4567
  *)
4568
    # If it is relative, then search for the first ld in PATH.
4569
    with_gnu_ld=unknown
4570
    ;;
4571
  esac
4572
elif test "$with_gnu_ld" = yes; then
4573
  AC_MSG_CHECKING([for GNU ld])
4574
else
4575
  AC_MSG_CHECKING([for non-GNU ld])
4576
fi
4577
AC_CACHE_VAL(lt_cv_path_LD,
4578
[if test -z "$LD"; then
4579
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4580
  for ac_dir in $PATH; do
4581
    IFS="$lt_save_ifs"
4582
    test -z "$ac_dir" && ac_dir=.
4583
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4584
      lt_cv_path_LD="$ac_dir/$ac_prog"
4585
      # Check to see if the program is GNU ld.  I'd rather use --version,
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4586
      # but apparently some variants of GNU ld only accept -v.
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4587
      # Break only if it was the GNU/non-GNU ld that we prefer.
4588
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4589
      *GNU* | *'with BFD'*)
4590
	test "$with_gnu_ld" != no && break
4591
	;;
4592
      *)
4593
	test "$with_gnu_ld" != yes && break
4594
	;;
4595
      esac
4596
    fi
4597
  done
4598
  IFS="$lt_save_ifs"
4599
else
4600
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4601
fi])
4602
LD="$lt_cv_path_LD"
4603
if test -n "$LD"; then
4604
  AC_MSG_RESULT($LD)
4605
else
4606
  AC_MSG_RESULT(no)
4607
fi
4608
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4609
_LT_PATH_LD_GNU
4610
AC_SUBST([LD])
4611
4612
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4613
])# LT_PATH_LD
4614
4615
# Old names:
4616
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4617
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4618
dnl aclocal-1.4 backwards compatibility:
4619
dnl AC_DEFUN([AM_PROG_LD], [])
4620
dnl AC_DEFUN([AC_PROG_LD], [])
4621
4622
4623
# _LT_PATH_LD_GNU
4624
#- --------------
4625
m4_defun([_LT_PATH_LD_GNU],
4626
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4627
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4628
case `$LD -v 2>&1 </dev/null` in
4629
*GNU* | *'with BFD'*)
4630
  lt_cv_prog_gnu_ld=yes
4631
  ;;
4632
*)
4633
  lt_cv_prog_gnu_ld=no
4634
  ;;
4635
esac])
4636
with_gnu_ld=$lt_cv_prog_gnu_ld
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4637
])# _LT_PATH_LD_GNU
4638
4639
4640
# _LT_CMD_RELOAD
4641
# --------------
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4642
# find reload flag for linker
4643
#   -- PORTME Some linkers may need a different reload flag.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4644
m4_defun([_LT_CMD_RELOAD],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4645
[AC_CACHE_CHECK([for $LD option to reload object files],
4646
  lt_cv_ld_reload_flag,
4647
  [lt_cv_ld_reload_flag='-r'])
4648
reload_flag=$lt_cv_ld_reload_flag
4649
case $reload_flag in
4650
"" | " "*) ;;
4651
*) reload_flag=" $reload_flag" ;;
4652
esac
4653
reload_cmds='$LD$reload_flag -o $output$reload_objs'
4654
case $host_os in
4655
  darwin*)
4656
    if test "$GCC" = yes; then
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4657
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4658
    else
4659
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4660
    fi
4661
    ;;
4662
esac
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4663
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4664
_LT_DECL([], [reload_cmds], [2])dnl
4665
])# _LT_CMD_RELOAD
4666
4667
4668
# _LT_CHECK_MAGIC_METHOD
4669
# ----------------------
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4670
# how to check for library dependencies
4671
#  -- PORTME fill in with the dynamic library characteristics
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4672
m4_defun([_LT_CHECK_MAGIC_METHOD],
4673
[m4_require([_LT_DECL_EGREP])
1.2.55 by Robert Ancell
Import upstream version 2.27.1
4674
m4_require([_LT_DECL_OBJDUMP])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4675
AC_CACHE_CHECK([how to recognize dependent libraries],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4676
lt_cv_deplibs_check_method,
4677
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4678
lt_cv_file_magic_test_file=
4679
lt_cv_deplibs_check_method='unknown'
4680
# Need to set the preceding variable on all platforms that support
4681
# interlibrary dependencies.
4682
# 'none' -- dependencies not supported.
4683
# `unknown' -- same as none, but documents that we really don't know.
4684
# 'pass_all' -- all dependencies passed with no checks.
4685
# 'test_compile' -- check by making test program.
4686
# 'file_magic [[regex]]' -- check by looking for files in library path
4687
# which responds to the $file_magic_cmd with a given extended regex.
4688
# If you have `file' or equivalent on your system and you're not sure
4689
# whether `pass_all' will *always* work, you probably want this one.
4690
4691
case $host_os in
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
4692
aix[[4-9]]*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4693
  lt_cv_deplibs_check_method=pass_all
4694
  ;;
4695
4696
beos*)
4697
  lt_cv_deplibs_check_method=pass_all
4698
  ;;
4699
4700
bsdi[[45]]*)
4701
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4702
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4703
  lt_cv_file_magic_test_file=/shlib/libc.so
4704
  ;;
4705
4706
cygwin*)
4707
  # func_win32_libid is a shell function defined in ltmain.sh
4708
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4709
  lt_cv_file_magic_cmd='func_win32_libid'
4710
  ;;
4711
4712
mingw* | pw32*)
4713
  # Base MSYS/MinGW do not provide the 'file' command needed by
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
4714
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4715
  # unless we find 'file', for example because we are cross-compiling.
4716
  if ( file / ) >/dev/null 2>&1; then
4717
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4718
    lt_cv_file_magic_cmd='func_win32_libid'
4719
  else
4720
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4721
    lt_cv_file_magic_cmd='$OBJDUMP -f'
4722
  fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4723
  ;;
4724
1.2.55 by Robert Ancell
Import upstream version 2.27.1
4725
cegcc)
4726
  # use the weaker test based on 'objdump'. See mingw*.
4727
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4728
  lt_cv_file_magic_cmd='$OBJDUMP -f'
4729
  ;;
4730
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4731
darwin* | rhapsody*)
4732
  lt_cv_deplibs_check_method=pass_all
4733
  ;;
4734
1.2.35 by Sebastien Bacher
Import upstream version 2.21.2
4735
freebsd* | dragonfly*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4736
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4737
    case $host_cpu in
4738
    i*86 )
4739
      # Not sure whether the presence of OpenBSD here was a mistake.
4740
      # Let's accept both of them until this is cleared up.
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
4741
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4742
      lt_cv_file_magic_cmd=/usr/bin/file
4743
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4744
      ;;
4745
    esac
4746
  else
4747
    lt_cv_deplibs_check_method=pass_all
4748
  fi
4749
  ;;
4750
4751
gnu*)
4752
  lt_cv_deplibs_check_method=pass_all
4753
  ;;
4754
4755
hpux10.20* | hpux11*)
4756
  lt_cv_file_magic_cmd=/usr/bin/file
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4757
  case $host_cpu in
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4758
  ia64*)
4759
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4760
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4761
    ;;
4762
  hppa*64*)
4763
    [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]']
4764
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4765
    ;;
4766
  *)
4767
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4768
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4769
    ;;
4770
  esac
4771
  ;;
4772
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
4773
interix[[3-9]]*)
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4774
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4775
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4776
  ;;
4777
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4778
irix5* | irix6* | nonstopux*)
4779
  case $LD in
4780
  *-32|*"-32 ") libmagic=32-bit;;
4781
  *-n32|*"-n32 ") libmagic=N32;;
4782
  *-64|*"-64 ") libmagic=64-bit;;
4783
  *) libmagic=never-match;;
4784
  esac
4785
  lt_cv_deplibs_check_method=pass_all
4786
  ;;
4787
4788
# This must be Linux ELF.
1.2.35 by Sebastien Bacher
Import upstream version 2.21.2
4789
linux* | k*bsd*-gnu)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4790
  lt_cv_deplibs_check_method=pass_all
4791
  ;;
4792
1.2.58 by Didier Roche
Import upstream version 2.30.0
4793
netbsd*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4794
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4795
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4796
  else
4797
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4798
  fi
4799
  ;;
4800
4801
newos6*)
4802
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4803
  lt_cv_file_magic_cmd=/usr/bin/file
4804
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4805
  ;;
4806
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4807
*nto* | *qnx*)
4808
  lt_cv_deplibs_check_method=pass_all
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4809
  ;;
4810
4811
openbsd*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4812
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4813
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4814
  else
4815
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4816
  fi
4817
  ;;
4818
4819
osf3* | osf4* | osf5*)
4820
  lt_cv_deplibs_check_method=pass_all
4821
  ;;
4822
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
4823
rdos*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4824
  lt_cv_deplibs_check_method=pass_all
4825
  ;;
4826
4827
solaris*)
4828
  lt_cv_deplibs_check_method=pass_all
4829
  ;;
4830
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4831
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4832
  lt_cv_deplibs_check_method=pass_all
4833
  ;;
4834
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4835
sysv4 | sysv4.3*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4836
  case $host_vendor in
4837
  motorola)
4838
    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]]'
4839
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4840
    ;;
4841
  ncr)
4842
    lt_cv_deplibs_check_method=pass_all
4843
    ;;
4844
  sequent)
4845
    lt_cv_file_magic_cmd='/bin/file'
4846
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4847
    ;;
4848
  sni)
4849
    lt_cv_file_magic_cmd='/bin/file'
4850
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4851
    lt_cv_file_magic_test_file=/lib/libc.so
4852
    ;;
4853
  siemens)
4854
    lt_cv_deplibs_check_method=pass_all
4855
    ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4856
  pc)
4857
    lt_cv_deplibs_check_method=pass_all
4858
    ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4859
  esac
4860
  ;;
4861
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4862
tpf*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4863
  lt_cv_deplibs_check_method=pass_all
4864
  ;;
4865
esac
4866
])
4867
file_magic_cmd=$lt_cv_file_magic_cmd
4868
deplibs_check_method=$lt_cv_deplibs_check_method
4869
test -z "$deplibs_check_method" && deplibs_check_method=unknown
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4870
4871
_LT_DECL([], [deplibs_check_method], [1],
4872
    [Method to check whether dependent libraries are shared objects])
4873
_LT_DECL([], [file_magic_cmd], [1],
4874
    [Command to use when deplibs_check_method == "file_magic"])
4875
])# _LT_CHECK_MAGIC_METHOD
4876
4877
4878
# LT_PATH_NM
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4879
# ----------
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4880
# find the pathname to a BSD- or MS-compatible name lister
4881
AC_DEFUN([LT_PATH_NM],
4882
[AC_REQUIRE([AC_PROG_CC])dnl
4883
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4884
[if test -n "$NM"; then
4885
  # Let the user override the test.
4886
  lt_cv_path_NM="$NM"
4887
else
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4888
  lt_nm_to_check="${ac_tool_prefix}nm"
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
4889
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4890
    lt_nm_to_check="$lt_nm_to_check nm"
4891
  fi
4892
  for lt_tmp_nm in $lt_nm_to_check; do
4893
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4894
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4895
      IFS="$lt_save_ifs"
4896
      test -z "$ac_dir" && ac_dir=.
4897
      tmp_nm="$ac_dir/$lt_tmp_nm"
4898
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4899
	# Check to see if the nm accepts a BSD-compat flag.
4900
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4901
	#   nm: unknown option "B" ignored
4902
	# Tru64's nm complains that /dev/null is an invalid object file
4903
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4904
	*/dev/null* | *'Invalid file or object type'*)
4905
	  lt_cv_path_NM="$tmp_nm -B"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4906
	  break
4907
	  ;;
4908
	*)
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4909
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4910
	  */dev/null*)
4911
	    lt_cv_path_NM="$tmp_nm -p"
4912
	    break
4913
	    ;;
4914
	  *)
4915
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4916
	    continue # so that we can try to find one that supports BSD flags
4917
	    ;;
4918
	  esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4919
	  ;;
4920
	esac
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
4921
      fi
4922
    done
4923
    IFS="$lt_save_ifs"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4924
  done
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4925
  : ${lt_cv_path_NM=no}
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4926
fi])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4927
if test "$lt_cv_path_NM" != "no"; then
4928
  NM="$lt_cv_path_NM"
4929
else
4930
  # Didn't find any BSD compatible name lister, look for dumpbin.
4931
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4932
  AC_SUBST([DUMPBIN])
4933
  if test "$DUMPBIN" != ":"; then
4934
    NM="$DUMPBIN"
4935
  fi
4936
fi
4937
test -z "$NM" && NM=nm
4938
AC_SUBST([NM])
4939
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4940
4941
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4942
  [lt_cv_nm_interface="BSD nm"
4943
  echo "int some_variable = 0;" > conftest.$ac_ext
4944
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4945
  (eval "$ac_compile" 2>conftest.err)
4946
  cat conftest.err >&AS_MESSAGE_LOG_FD
4947
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4948
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4949
  cat conftest.err >&AS_MESSAGE_LOG_FD
4950
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4951
  cat conftest.out >&AS_MESSAGE_LOG_FD
4952
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4953
    lt_cv_nm_interface="MS dumpbin"
4954
  fi
4955
  rm -f conftest*])
4956
])# LT_PATH_NM
4957
4958
# Old names:
4959
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4960
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4961
dnl aclocal-1.4 backwards compatibility:
4962
dnl AC_DEFUN([AM_PROG_NM], [])
4963
dnl AC_DEFUN([AC_PROG_NM], [])
4964
4965
4966
# LT_LIB_M
4967
# --------
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4968
# check for math library
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4969
AC_DEFUN([LT_LIB_M],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4970
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4971
LIBM=
4972
case $host in
4973
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4974
  # These system don't have libm, or don't need it
4975
  ;;
4976
*-ncr-sysv4.3*)
4977
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4978
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4979
  ;;
4980
*)
4981
  AC_CHECK_LIB(m, cos, LIBM="-lm")
4982
  ;;
4983
esac
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
4984
AC_SUBST([LIBM])
4985
])# LT_LIB_M
4986
4987
# Old name:
4988
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4989
dnl aclocal-1.4 backwards compatibility:
4990
dnl AC_DEFUN([AC_CHECK_LIBM], [])
4991
4992
4993
# _LT_COMPILER_NO_RTTI([TAGNAME])
4994
# -------------------------------
4995
m4_defun([_LT_COMPILER_NO_RTTI],
4996
[m4_require([_LT_TAG_COMPILER])dnl
4997
4998
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
4999
5000
if test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5001
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5002
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5003
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5004
    lt_cv_prog_compiler_rtti_exceptions,
5005
    [-fno-rtti -fno-exceptions], [],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5006
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5007
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5008
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5009
	[Compiler flag to turn off builtin functions])
5010
])# _LT_COMPILER_NO_RTTI
5011
5012
5013
# _LT_CMD_GLOBAL_SYMBOLS
5014
# ----------------------
5015
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5016
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5017
AC_REQUIRE([AC_PROG_CC])dnl
5018
AC_REQUIRE([LT_PATH_NM])dnl
5019
AC_REQUIRE([LT_PATH_LD])dnl
5020
m4_require([_LT_DECL_SED])dnl
5021
m4_require([_LT_DECL_EGREP])dnl
5022
m4_require([_LT_TAG_COMPILER])dnl
5023
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5024
# Check for command to grab the raw symbol name followed by C symbol from nm.
5025
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5026
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5027
[
5028
# These are sane defaults that work on at least a few old systems.
5029
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5030
5031
# Character class describing NM global symbol codes.
5032
symcode='[[BCDEGRST]]'
5033
5034
# Regexp to match symbols that can be accessed directly from C.
5035
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5036
5037
# Define system-specific variables.
5038
case $host_os in
5039
aix*)
5040
  symcode='[[BCDT]]'
5041
  ;;
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5042
cygwin* | mingw* | pw32* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5043
  symcode='[[ABCDGISTW]]'
5044
  ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5045
hpux*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5046
  if test "$host_cpu" = ia64; then
5047
    symcode='[[ABCDEGRST]]'
5048
  fi
5049
  ;;
5050
irix* | nonstopux*)
5051
  symcode='[[BCDEGRST]]'
5052
  ;;
5053
osf*)
5054
  symcode='[[BCDEGQRST]]'
5055
  ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5056
solaris*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5057
  symcode='[[BDRT]]'
5058
  ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5059
sco3.2v5*)
5060
  symcode='[[DT]]'
5061
  ;;
5062
sysv4.2uw2*)
5063
  symcode='[[DT]]'
5064
  ;;
5065
sysv5* | sco5v6* | unixware* | OpenUNIX*)
5066
  symcode='[[ABDT]]'
5067
  ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5068
sysv4)
5069
  symcode='[[DFNSTU]]'
5070
  ;;
5071
esac
5072
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5073
# If we're using GNU nm, then use its standard symbol codes.
5074
case `$NM -V 2>&1` in
5075
*GNU* | *'with BFD'*)
5076
  symcode='[[ABCDGIRSTW]]' ;;
5077
esac
5078
5079
# Transform an extracted symbol line into a proper C declaration.
5080
# Some systems (esp. on ia64) link data and code symbols differently,
5081
# so use this general approach.
5082
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5083
5084
# Transform an extracted symbol line into symbol name and symbol address
5085
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5086
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'"
5087
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5088
# Handle CRLF in mingw tool chain
5089
opt_cr=
5090
case $build_os in
5091
mingw*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5092
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5093
  ;;
5094
esac
5095
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5096
# Try without a prefix underscore, then with it.
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5097
for ac_symprfx in "" "_"; do
5098
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5099
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5100
  symxfrm="\\1 $ac_symprfx\\2 \\2"
5101
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5102
  # Write the raw and C identifiers.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5103
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5104
    # Fake it for dumpbin and say T for any non-static function
5105
    # and D for any global variable.
5106
    # Also find C++ and __fastcall symbols from MSVC++,
5107
    # which start with @ or ?.
5108
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
5109
"     {last_section=section; section=\$ 3};"\
5110
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5111
"     \$ 0!~/External *\|/{next};"\
5112
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5113
"     {if(hide[section]) next};"\
5114
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5115
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5116
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5117
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5118
"     ' prfx=^$ac_symprfx]"
5119
  else
5120
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5121
  fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5122
5123
  # Check to see that the pipe works correctly.
5124
  pipe_works=no
5125
5126
  rm -f conftest*
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5127
  cat > conftest.$ac_ext <<_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5128
#ifdef __cplusplus
5129
extern "C" {
5130
#endif
5131
char nm_test_var;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5132
void nm_test_func(void);
5133
void nm_test_func(void){}
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5134
#ifdef __cplusplus
5135
}
5136
#endif
5137
int main(){nm_test_var='a';nm_test_func();return(0);}
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5138
_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5139
5140
  if AC_TRY_EVAL(ac_compile); then
5141
    # Now try to grab the symbols.
5142
    nlist=conftest.nm
5143
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5144
      # Try sorting and uniquifying the output.
5145
      if sort "$nlist" | uniq > "$nlist"T; then
5146
	mv -f "$nlist"T "$nlist"
5147
      else
5148
	rm -f "$nlist"T
5149
      fi
5150
5151
      # Make sure that we snagged all the symbols we need.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5152
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5153
	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5154
	  cat <<_LT_EOF > conftest.$ac_ext
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5155
#ifdef __cplusplus
5156
extern "C" {
5157
#endif
5158
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5159
_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5160
	  # Now generate the symbol file.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5161
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5162
5163
	  cat <<_LT_EOF >> conftest.$ac_ext
5164
5165
/* The mapping between symbol names and symbols.  */
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5166
const struct {
5167
  const char *name;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5168
  void       *address;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5169
}
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5170
lt__PROGRAM__LTX_preloaded_symbols[[]] =
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5171
{
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5172
  { "@PROGRAM@", (void *) 0 },
5173
_LT_EOF
5174
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5175
	  cat <<\_LT_EOF >> conftest.$ac_ext
5176
  {0, (void *) 0}
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5177
};
5178
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5179
/* This works around a problem in FreeBSD linker */
5180
#ifdef FREEBSD_WORKAROUND
5181
static const void *lt_preloaded_setup() {
5182
  return lt__PROGRAM__LTX_preloaded_symbols;
5183
}
5184
#endif
5185
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5186
#ifdef __cplusplus
5187
}
5188
#endif
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5189
_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5190
	  # Now try linking the two files.
5191
	  mv conftest.$ac_objext conftstm.$ac_objext
5192
	  lt_save_LIBS="$LIBS"
5193
	  lt_save_CFLAGS="$CFLAGS"
5194
	  LIBS="conftstm.$ac_objext"
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5195
	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5196
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5197
	    pipe_works=yes
5198
	  fi
5199
	  LIBS="$lt_save_LIBS"
5200
	  CFLAGS="$lt_save_CFLAGS"
5201
	else
5202
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5203
	fi
5204
      else
5205
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5206
      fi
5207
    else
5208
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5209
    fi
5210
  else
5211
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5212
    cat conftest.$ac_ext >&5
5213
  fi
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
5214
  rm -rf conftest* conftst*
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5215
5216
  # Do not use the global_symbol_pipe unless it works.
5217
  if test "$pipe_works" = yes; then
5218
    break
5219
  else
5220
    lt_cv_sys_global_symbol_pipe=
5221
  fi
5222
done
5223
])
5224
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5225
  lt_cv_sys_global_symbol_to_cdecl=
5226
fi
5227
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5228
  AC_MSG_RESULT(failed)
5229
else
5230
  AC_MSG_RESULT(ok)
5231
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5232
5233
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5234
    [Take the output of nm and produce a listing of raw symbols and C names])
5235
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5236
    [Transform the output of nm in a proper C declaration])
5237
_LT_DECL([global_symbol_to_c_name_address],
5238
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5239
    [Transform the output of nm in a C name address pair])
5240
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5241
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5242
    [Transform the output of nm in a C name address pair when lib prefix is needed])
5243
]) # _LT_CMD_GLOBAL_SYMBOLS
5244
5245
5246
# _LT_COMPILER_PIC([TAGNAME])
5247
# ---------------------------
5248
m4_defun([_LT_COMPILER_PIC],
5249
[m4_require([_LT_TAG_COMPILER])dnl
5250
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5251
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5252
_LT_TAGVAR(lt_prog_compiler_static, $1)=
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5253
5254
AC_MSG_CHECKING([for $compiler option to produce PIC])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5255
m4_if([$1], [CXX], [
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5256
  # C++ specific cases for pic, static, wl, etc.
5257
  if test "$GXX" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5258
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5259
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5260
5261
    case $host_os in
5262
    aix*)
5263
      # All AIX code is PIC.
5264
      if test "$host_cpu" = ia64; then
5265
	# AIX 5 now supports IA64 processor
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5266
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5267
      fi
5268
      ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5269
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5270
    amigaos*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5271
      case $host_cpu in
5272
      powerpc)
5273
            # see comment about AmigaOS4 .so support
5274
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5275
        ;;
5276
      m68k)
5277
            # FIXME: we need at least 68020 code to build shared libraries, but
5278
            # adding the `-m68020' flag to GCC prevents building anything better,
5279
            # like `-m68040'.
5280
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5281
        ;;
5282
      esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5283
      ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5284
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5285
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5286
      # PIC is the default for these OSes.
5287
      ;;
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5288
    mingw* | cygwin* | os2* | pw32* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5289
      # This hack is so that the source file can tell whether it is being
5290
      # built for inclusion in a dll (and should export symbols for example).
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5291
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5292
      # (--disable-auto-import) libraries
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
5293
      m4_if([$1], [GCJ], [],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5294
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5295
      ;;
5296
    darwin* | rhapsody*)
5297
      # PIC is the default on this platform
5298
      # Common symbols not allowed in MH_DYLIB files
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5299
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5300
      ;;
5301
    *djgpp*)
5302
      # DJGPP does not support shared libraries at all
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5303
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5304
      ;;
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5305
    interix[[3-9]]*)
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5306
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5307
      # Instead, we relocate shared libraries at runtime.
5308
      ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5309
    sysv4*MP*)
5310
      if test -d /usr/nec; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5311
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5312
      fi
5313
      ;;
5314
    hpux*)
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5315
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5316
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5317
      # sets the default TLS model and affects inlining.
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5318
      case $host_cpu in
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5319
      hppa*64*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5320
	;;
5321
      *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5322
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5323
	;;
5324
      esac
5325
      ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5326
    *qnx* | *nto*)
5327
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5328
      # it will coredump.
5329
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5330
      ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5331
    *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5332
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5333
      ;;
5334
    esac
5335
  else
5336
    case $host_os in
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
5337
      aix[[4-9]]*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5338
	# All AIX code is PIC.
5339
	if test "$host_cpu" = ia64; then
5340
	  # AIX 5 now supports IA64 processor
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5341
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5342
	else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5343
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5344
	fi
5345
	;;
5346
      chorus*)
5347
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5348
	cxch68*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5349
	  # Green Hills C++ Compiler
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5350
	  # _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"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5351
	  ;;
5352
	esac
5353
	;;
5354
      dgux*)
5355
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5356
	  ec++*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5357
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5358
	    ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5359
	  ghcx*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5360
	    # Green Hills C++ Compiler
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5361
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5362
	    ;;
5363
	  *)
5364
	    ;;
5365
	esac
5366
	;;
1.2.35 by Sebastien Bacher
Import upstream version 2.21.2
5367
      freebsd* | dragonfly*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5368
	# FreeBSD uses GNU C++
5369
	;;
5370
      hpux9* | hpux10* | hpux11*)
5371
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5372
	  CC*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5373
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5374
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5375
	    if test "$host_cpu" != ia64; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5376
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5377
	    fi
5378
	    ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5379
	  aCC*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5380
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5381
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5382
	    case $host_cpu in
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5383
	    hppa*64*|ia64*)
5384
	      # +Z the default
5385
	      ;;
5386
	    *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5387
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5388
	      ;;
5389
	    esac
5390
	    ;;
5391
	  *)
5392
	    ;;
5393
	esac
5394
	;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5395
      interix*)
5396
	# This is c89, which is MS Visual C++ (no shared libs)
5397
	# Anyone wants to do a port?
5398
	;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5399
      irix5* | irix6* | nonstopux*)
5400
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5401
	  CC*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5402
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5403
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5404
	    # CC pic flag -KPIC is the default.
5405
	    ;;
5406
	  *)
5407
	    ;;
5408
	esac
5409
	;;
1.2.35 by Sebastien Bacher
Import upstream version 2.21.2
5410
      linux* | k*bsd*-gnu)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5411
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5412
	  KCC*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5413
	    # KAI C++ Compiler
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5414
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5415
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5416
	    ;;
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5417
	  ecpc* )
5418
	    # old Intel C++ for x86_64 which still supported -KPIC.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5419
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5420
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5421
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5422
	    ;;
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5423
	  icpc* )
5424
	    # Intel C++, used to be incompatible with GCC.
5425
	    # ICC 10 doesn't accept -KPIC any more.
5426
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5427
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5428
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5429
	    ;;
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
5430
	  pgCC* | pgcpp*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5431
	    # Portland Group C++ compiler
5432
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5433
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5434
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5435
	    ;;
5436
	  cxx*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5437
	    # Compaq C++
5438
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5439
	    # Linux and Compaq Tru64 Unix objects are PIC.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5440
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5441
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5442
	    ;;
5443
	  xlc* | xlC*)
5444
	    # IBM XL 8.0 on PPC
5445
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5446
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5447
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5448
	    ;;
5449
	  *)
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5450
	    case `$CC -V 2>&1 | sed 5q` in
5451
	    *Sun\ C*)
5452
	      # Sun C++ 5.9
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5453
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5454
	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5455
	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5456
	      ;;
5457
	    esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5458
	    ;;
5459
	esac
5460
	;;
5461
      lynxos*)
5462
	;;
5463
      m88k*)
5464
	;;
5465
      mvs*)
5466
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5467
	  cxx*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5468
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5469
	    ;;
5470
	  *)
5471
	    ;;
5472
	esac
5473
	;;
1.2.58 by Didier Roche
Import upstream version 2.30.0
5474
      netbsd*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5475
	;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5476
      *qnx* | *nto*)
5477
        # QNX uses GNU C++, but need to define -shared option too, otherwise
5478
        # it will coredump.
5479
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5480
        ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5481
      osf3* | osf4* | osf5*)
5482
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5483
	  KCC*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5484
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5485
	    ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5486
	  RCC*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5487
	    # Rational C++ 2.4.1
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5488
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5489
	    ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5490
	  cxx*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5491
	    # Digital/Compaq C++
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5492
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5493
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5494
	    # Linux and Compaq Tru64 Unix objects are PIC.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5495
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5496
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5497
	    ;;
5498
	  *)
5499
	    ;;
5500
	esac
5501
	;;
5502
      psos*)
5503
	;;
5504
      solaris*)
5505
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5506
	  CC*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5507
	    # Sun C++ 4.2, 5.x and Centerline C++
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5508
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5509
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5510
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5511
	    ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5512
	  gcx*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5513
	    # Green Hills C++ Compiler
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5514
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5515
	    ;;
5516
	  *)
5517
	    ;;
5518
	esac
5519
	;;
5520
      sunos4*)
5521
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5522
	  CC*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5523
	    # Sun C++ 4.x
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5524
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5525
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5526
	    ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5527
	  lcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5528
	    # Lucid
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5529
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5530
	    ;;
5531
	  *)
5532
	    ;;
5533
	esac
5534
	;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5535
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5536
	case $cc_basename in
5537
	  CC*)
5538
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5539
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5540
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5541
	    ;;
5542
	esac
5543
	;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5544
      tandem*)
5545
	case $cc_basename in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5546
	  NCC*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5547
	    # NonStop-UX NCC 3.20
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5548
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5549
	    ;;
5550
	  *)
5551
	    ;;
5552
	esac
5553
	;;
5554
      vxworks*)
5555
	;;
5556
      *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5557
	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5558
	;;
5559
    esac
5560
  fi
5561
],
5562
[
5563
  if test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5564
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5565
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5566
5567
    case $host_os in
5568
      aix*)
5569
      # All AIX code is PIC.
5570
      if test "$host_cpu" = ia64; then
5571
	# AIX 5 now supports IA64 processor
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5572
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5573
      fi
5574
      ;;
5575
5576
    amigaos*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5577
      case $host_cpu in
5578
      powerpc)
5579
            # see comment about AmigaOS4 .so support
5580
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5581
        ;;
5582
      m68k)
5583
            # FIXME: we need at least 68020 code to build shared libraries, but
5584
            # adding the `-m68020' flag to GCC prevents building anything better,
5585
            # like `-m68040'.
5586
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5587
        ;;
5588
      esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5589
      ;;
5590
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5591
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5592
      # PIC is the default for these OSes.
5593
      ;;
5594
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5595
    mingw* | cygwin* | pw32* | os2* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5596
      # This hack is so that the source file can tell whether it is being
5597
      # built for inclusion in a dll (and should export symbols for example).
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5598
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5599
      # (--disable-auto-import) libraries
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
5600
      m4_if([$1], [GCJ], [],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5601
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5602
      ;;
5603
5604
    darwin* | rhapsody*)
5605
      # PIC is the default on this platform
5606
      # Common symbols not allowed in MH_DYLIB files
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5607
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5608
      ;;
5609
5610
    hpux*)
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5611
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5612
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5613
      # sets the default TLS model and affects inlining.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5614
      case $host_cpu in
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5615
      hppa*64*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5616
	# +Z the default
5617
	;;
5618
      *)
5619
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5620
	;;
5621
      esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5622
      ;;
5623
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5624
    interix[[3-9]]*)
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5625
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5626
      # Instead, we relocate shared libraries at runtime.
5627
      ;;
5628
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5629
    msdosdjgpp*)
5630
      # Just because we use GCC doesn't mean we suddenly get shared libraries
5631
      # on systems that don't support them.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5632
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5633
      enable_shared=no
5634
      ;;
5635
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5636
    *nto* | *qnx*)
5637
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5638
      # it will coredump.
5639
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5640
      ;;
5641
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5642
    sysv4*MP*)
5643
      if test -d /usr/nec; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5644
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5645
      fi
5646
      ;;
5647
5648
    *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5649
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5650
      ;;
5651
    esac
5652
  else
5653
    # PORTME Check for flag to pass linker flags through the system compiler.
5654
    case $host_os in
5655
    aix*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5656
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5657
      if test "$host_cpu" = ia64; then
5658
	# AIX 5 now supports IA64 processor
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5659
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5660
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5661
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5662
      fi
5663
      ;;
5664
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5665
    mingw* | cygwin* | pw32* | os2* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5666
      # This hack is so that the source file can tell whether it is being
5667
      # built for inclusion in a dll (and should export symbols for example).
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
5668
      m4_if([$1], [GCJ], [],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5669
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5670
      ;;
5671
5672
    hpux9* | hpux10* | hpux11*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5673
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5674
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5675
      # not for PA HP-UX.
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5676
      case $host_cpu in
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5677
      hppa*64*|ia64*)
5678
	# +Z the default
5679
	;;
5680
      *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5681
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5682
	;;
5683
      esac
5684
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5685
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5686
      ;;
5687
5688
    irix5* | irix6* | nonstopux*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5689
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5690
      # PIC (with -KPIC) is the default.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5691
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5692
      ;;
5693
1.2.35 by Sebastien Bacher
Import upstream version 2.21.2
5694
    linux* | k*bsd*-gnu)
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5695
      case $cc_basename in
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5696
      # old Intel for x86_64 which still supported -KPIC.
5697
      ecc*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5698
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5699
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5700
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5701
        ;;
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5702
      # icc used to be incompatible with GCC.
5703
      # ICC 10 doesn't accept -KPIC any more.
5704
      icc* | ifort*)
5705
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5706
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5707
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5708
        ;;
5709
      # Lahey Fortran 8.1.
5710
      lf95*)
5711
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5712
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5713
	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5714
	;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5715
      pgcc* | pgf77* | pgf90* | pgf95*)
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5716
        # Portland Group compilers (*not* the Pentium gcc compiler,
5717
	# which looks to be a dead project)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5718
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5719
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5720
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5721
        ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5722
      ccc*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5723
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5724
        # All Alpha code is PIC.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5725
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5726
        ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5727
      xl*)
5728
	# IBM XL C 8.0/Fortran 10.1 on PPC
5729
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5730
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5731
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5732
	;;
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5733
      *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5734
	case `$CC -V 2>&1 | sed 5q` in
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5735
	*Sun\ C*)
5736
	  # Sun C 5.9
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5737
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5738
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5739
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5740
	  ;;
5741
	*Sun\ F*)
5742
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5743
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5744
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5745
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5746
	  ;;
5747
	esac
5748
	;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5749
      esac
5750
      ;;
5751
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5752
    newsos6)
5753
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5754
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5755
      ;;
5756
5757
    *nto* | *qnx*)
5758
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5759
      # it will coredump.
5760
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5761
      ;;
5762
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5763
    osf3* | osf4* | osf5*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5764
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5765
      # All OSF/1 code is PIC.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5766
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5767
      ;;
5768
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5769
    rdos*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5770
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5771
      ;;
5772
5773
    solaris*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5774
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5775
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5776
      case $cc_basename in
5777
      f77* | f90* | f95*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5778
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5779
      *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5780
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5781
      esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5782
      ;;
5783
5784
    sunos4*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5785
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5786
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5787
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5788
      ;;
5789
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5790
    sysv4 | sysv4.2uw2* | sysv4.3*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5791
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5792
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5793
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5794
      ;;
5795
5796
    sysv4*MP*)
5797
      if test -d /usr/nec ;then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5798
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5799
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5800
      fi
5801
      ;;
5802
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5803
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5804
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5805
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5806
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5807
      ;;
5808
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5809
    unicos*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5810
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5811
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5812
      ;;
5813
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5814
    uts4*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5815
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5816
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5817
      ;;
5818
5819
    *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5820
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5821
      ;;
5822
    esac
5823
  fi
5824
])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5825
case $host_os in
5826
  # For platforms which do not support PIC, -DPIC is meaningless:
5827
  *djgpp*)
5828
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5829
    ;;
5830
  *)
5831
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5832
    ;;
5833
esac
5834
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5835
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5836
	[How to pass a linker flag through the compiler])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5837
5838
#
5839
# Check to make sure the PIC flag actually works.
5840
#
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5841
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5842
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5843
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5844
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5845
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5846
     "" | " "*) ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5847
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5848
     esac],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5849
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5850
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5851
fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5852
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5853
	[Additional compiler flags for building library objects])
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5854
5855
#
5856
# Check to make sure the static flag actually works.
5857
#
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5858
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5859
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5860
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5861
  $lt_tmp_static_flag,
5862
  [],
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5863
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5864
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5865
	[Compiler flag to prevent dynamic linking])
5866
])# _LT_COMPILER_PIC
5867
5868
5869
# _LT_LINKER_SHLIBS([TAGNAME])
5870
# ----------------------------
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5871
# See if the linker supports building shared libraries.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5872
m4_defun([_LT_LINKER_SHLIBS],
5873
[AC_REQUIRE([LT_PATH_LD])dnl
5874
AC_REQUIRE([LT_PATH_NM])dnl
5875
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5876
m4_require([_LT_DECL_EGREP])dnl
5877
m4_require([_LT_DECL_SED])dnl
5878
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5879
m4_require([_LT_TAG_COMPILER])dnl
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
5880
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5881
m4_if([$1], [CXX], [
5882
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5883
  case $host_os in
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
5884
  aix[[4-9]]*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5885
    # If we're using GNU nm, then we don't want the "-C" option.
5886
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5887
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5888
      _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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5889
    else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5890
      _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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5891
    fi
5892
    ;;
5893
  pw32*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5894
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5895
  ;;
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5896
  cygwin* | mingw* | cegcc*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5897
    _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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5898
  ;;
5899
  *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5900
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5901
  ;;
5902
  esac
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5903
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5904
], [
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5905
  runpath_var=
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5906
  _LT_TAGVAR(allow_undefined_flag, $1)=
5907
  _LT_TAGVAR(always_export_symbols, $1)=no
5908
  _LT_TAGVAR(archive_cmds, $1)=
5909
  _LT_TAGVAR(archive_expsym_cmds, $1)=
5910
  _LT_TAGVAR(compiler_needs_object, $1)=no
5911
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5912
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5913
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5914
  _LT_TAGVAR(hardcode_automatic, $1)=no
5915
  _LT_TAGVAR(hardcode_direct, $1)=no
5916
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5917
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5918
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5919
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5920
  _LT_TAGVAR(hardcode_minus_L, $1)=no
5921
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5922
  _LT_TAGVAR(inherit_rpath, $1)=no
5923
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5924
  _LT_TAGVAR(module_cmds, $1)=
5925
  _LT_TAGVAR(module_expsym_cmds, $1)=
5926
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5927
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5928
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5929
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5930
  # include_expsyms should be a list of space-separated symbols to be *always*
5931
  # included in the symbol list
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5932
  _LT_TAGVAR(include_expsyms, $1)=
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5933
  # exclude_expsyms can be an extended regexp of symbols to exclude
5934
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5935
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5936
  # as well as any symbol that contains `d'.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5937
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5938
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5939
  # platforms (ab)use it in PIC code, but their linkers get confused if
5940
  # the symbol is explicitly referenced.  Since portable code cannot
5941
  # rely on this symbol name, it's probably fine to never include it in
5942
  # preloaded symbol tables.
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
5943
  # Exclude shared library initialization/finalization symbols.
5944
dnl Note also adjust exclude_expsyms for C++ above.
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5945
  extract_expsyms_cmds=
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5946
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5947
  case $host_os in
1.2.55 by Robert Ancell
Import upstream version 2.27.1
5948
  cygwin* | mingw* | pw32* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5949
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5950
    # When not using gcc, we currently assume that we are using
5951
    # Microsoft Visual C++.
5952
    if test "$GCC" != yes; then
5953
      with_gnu_ld=no
5954
    fi
5955
    ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5956
  interix*)
5957
    # we just hope/assume this is gcc and not c89 (= MSVC++)
5958
    with_gnu_ld=yes
5959
    ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5960
  openbsd*)
5961
    with_gnu_ld=no
5962
    ;;
5963
  esac
5964
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5965
  _LT_TAGVAR(ld_shlibs, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5966
  if test "$with_gnu_ld" = yes; then
5967
    # If archive_cmds runs LD, not CC, wlarc should be empty
5968
    wlarc='${wl}'
5969
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5970
    # Set some defaults for GNU ld with shared library support. These
5971
    # are reset later if shared libraries are not supported. Putting them
5972
    # here allows them to be overridden if necessary.
5973
    runpath_var=LD_RUN_PATH
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5974
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5975
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5976
    # ancient GNU ld didn't support --whole-archive et. al.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5977
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5978
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5979
    else
5980
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5981
    fi
5982
    supports_anon_versioning=no
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5983
    case `$LD -v 2>&1` in
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
5984
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5985
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5986
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5987
      *\ 2.11.*) ;; # other 2.11 versions
5988
      *) supports_anon_versioning=yes ;;
5989
    esac
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
5990
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5991
    # See if GNU ld supports shared libraries.
5992
    case $host_os in
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
5993
    aix[[3-9]]*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5994
      # On AIX/PPC, the GNU linker is very broken
5995
      if test "$host_cpu" != ia64; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
5996
	_LT_TAGVAR(ld_shlibs, $1)=no
5997
	cat <<_LT_EOF 1>&2
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
5998
5999
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6000
*** to be unable to reliably create shared libraries on AIX.
6001
*** Therefore, libtool is disabling shared libraries support.  If you
6002
*** really care for shared libraries, you may want to modify your PATH
6003
*** so that a non-GNU linker is found, and then restart.
6004
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6005
_LT_EOF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6006
      fi
6007
      ;;
6008
6009
    amigaos*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6010
      case $host_cpu in
6011
      powerpc)
6012
            # see comment about AmigaOS4 .so support
6013
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6014
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6015
        ;;
6016
      m68k)
6017
            _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)'
6018
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6019
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6020
        ;;
6021
      esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6022
      ;;
6023
6024
    beos*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6025
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6026
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6027
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6028
	# support --undefined.  This deserves some investigation.  FIXME
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6029
	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6030
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6031
	_LT_TAGVAR(ld_shlibs, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6032
      fi
6033
      ;;
6034
1.2.55 by Robert Ancell
Import upstream version 2.27.1
6035
    cygwin* | mingw* | pw32* | cegcc*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6036
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6037
      # as there is no search path for DLLs.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6038
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6039
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6040
      _LT_TAGVAR(always_export_symbols, $1)=no
6041
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6042
      _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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6043
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6044
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6045
        _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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6046
	# If the export-symbols file already is a .def file (1st line
6047
	# is EXPORTS), use it as is; otherwise, prepend...
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6048
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6049
	  cp $export_symbols $output_objdir/$soname.def;
6050
	else
6051
	  echo EXPORTS > $output_objdir/$soname.def;
6052
	  cat $export_symbols >> $output_objdir/$soname.def;
6053
	fi~
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6054
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6055
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6056
	_LT_TAGVAR(ld_shlibs, $1)=no
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6057
      fi
6058
      ;;
6059
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6060
    interix[[3-9]]*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6061
      _LT_TAGVAR(hardcode_direct, $1)=no
6062
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6063
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6064
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6065
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6066
      # Instead, shared libraries are loaded at an image base (0x10000000 by
6067
      # default) and relocated if they conflict, which is a slow very memory
6068
      # consuming and fragmenting process.  To avoid this, we pick a random,
6069
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6070
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6071
      _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'
6072
      _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'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6073
      ;;
6074
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6075
    gnu* | linux* | tpf* | k*bsd*-gnu)
6076
      tmp_diet=no
6077
      if test "$host_os" = linux-dietlibc; then
6078
	case $cc_basename in
6079
	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
6080
	esac
6081
      fi
6082
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6083
	 && test "$tmp_diet" = no
6084
      then
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6085
	tmp_addflag=
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6086
	tmp_sharedflag='-shared'
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6087
	case $cc_basename,$host_cpu in
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6088
        pgcc*)				# Portland Group C compiler
6089
	  _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'
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6090
	  tmp_addflag=' $pic_flag'
6091
	  ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6092
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6093
	  _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'
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6094
	  tmp_addflag=' $pic_flag -Mnomain' ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6095
	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6096
	  tmp_addflag=' -i_dynamic' ;;
6097
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6098
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6099
	ifc* | ifort*)			# Intel Fortran compiler
6100
	  tmp_addflag=' -nofor_main' ;;
1.2.55 by Robert Ancell
Import upstream version 2.27.1
6101
	lf95*)				# Lahey Fortran 8.1
6102
	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6103
	  tmp_sharedflag='--shared' ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6104
	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
6105
	  tmp_sharedflag='-qmkshrobj'
6106
	  tmp_addflag= ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6107
	esac
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6108
	case `$CC -V 2>&1 | sed 5q` in
6109
	*Sun\ C*)			# Sun C 5.9
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6110
	  _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'
6111
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6112
	  tmp_sharedflag='-G' ;;
6113
	*Sun\ F*)			# Sun Fortran 8.3
6114
	  tmp_sharedflag='-G' ;;
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6115
	esac
6116
	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6117
6118
        if test "x$supports_anon_versioning" = xyes; then
6119
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6120
	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6121
	    echo "local: *; };" >> $output_objdir/$libname.ver~
6122
	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6123
        fi
6124
6125
	case $cc_basename in
6126
	xlf*)
6127
	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6128
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6129
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6130
	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6131
	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6132
	  if test "x$supports_anon_versioning" = xyes; then
6133
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6134
	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6135
	      echo "local: *; };" >> $output_objdir/$libname.ver~
6136
	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6137
	  fi
6138
	  ;;
6139
	esac
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6140
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6141
        _LT_TAGVAR(ld_shlibs, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6142
      fi
6143
      ;;
6144
1.2.58 by Didier Roche
Import upstream version 2.30.0
6145
    netbsd*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6146
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6147
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6148
	wlarc=
6149
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6150
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6151
	_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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6152
      fi
6153
      ;;
6154
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6155
    solaris*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6156
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6157
	_LT_TAGVAR(ld_shlibs, $1)=no
6158
	cat <<_LT_EOF 1>&2
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6159
6160
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6161
*** create shared libraries on Solaris systems.  Therefore, libtool
6162
*** is disabling shared libraries support.  We urge you to upgrade GNU
6163
*** binutils to release 2.9.1 or newer.  Another option is to modify
6164
*** your PATH or compiler configuration so that the native linker is
6165
*** used, and then restart.
6166
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6167
_LT_EOF
6168
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6169
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6170
	_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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6171
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6172
	_LT_TAGVAR(ld_shlibs, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6173
      fi
6174
      ;;
6175
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6176
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6177
      case `$LD -v 2>&1` in
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6178
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6179
	_LT_TAGVAR(ld_shlibs, $1)=no
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6180
	cat <<_LT_EOF 1>&2
6181
6182
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6183
*** reliably create shared libraries on SCO systems.  Therefore, libtool
6184
*** is disabling shared libraries support.  We urge you to upgrade GNU
6185
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6186
*** your PATH or compiler configuration so that the native linker is
6187
*** used, and then restart.
6188
6189
_LT_EOF
6190
	;;
6191
	*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6192
	  # For security reasons, it is highly recommended that you always
6193
	  # use absolute paths for naming shared libraries, and exclude the
6194
	  # DT_RUNPATH tag from executables and libraries.  But doing so
6195
	  # requires that you compile everything twice, which is a pain.
6196
	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6197
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6198
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6199
	    _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'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6200
	  else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6201
	    _LT_TAGVAR(ld_shlibs, $1)=no
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6202
	  fi
6203
	;;
6204
      esac
6205
      ;;
6206
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6207
    sunos4*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6208
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6209
      wlarc=
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6210
      _LT_TAGVAR(hardcode_direct, $1)=yes
6211
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6212
      ;;
6213
6214
    *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6215
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6216
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6217
	_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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6218
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6219
	_LT_TAGVAR(ld_shlibs, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6220
      fi
6221
      ;;
6222
    esac
6223
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6224
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6225
      runpath_var=
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6226
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6227
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6228
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6229
    fi
6230
  else
6231
    # PORTME fill in a description of your system's linker (not GNU ld)
6232
    case $host_os in
6233
    aix3*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6234
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6235
      _LT_TAGVAR(always_export_symbols, $1)=yes
6236
      _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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6237
      # Note: this linker hardcodes the directories in LIBPATH if there
6238
      # are no directories specified by -L.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6239
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6240
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6241
	# Neither direct hardcoding nor static linking is supported with a
6242
	# broken collect2.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6243
	_LT_TAGVAR(hardcode_direct, $1)=unsupported
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6244
      fi
6245
      ;;
6246
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
6247
    aix[[4-9]]*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6248
      if test "$host_cpu" = ia64; then
6249
	# On IA64, the linker does run time linking by default, so we don't
6250
	# have to do anything special.
6251
	aix_use_runtimelinking=no
6252
	exp_sym_flag='-Bexport'
6253
	no_entry_flag=""
6254
      else
6255
	# If we're using GNU nm, then we don't want the "-C" option.
6256
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6257
	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6258
	  _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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6259
	else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6260
	  _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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6261
	fi
6262
	aix_use_runtimelinking=no
6263
6264
	# Test if we are trying to use run time linking or normal
6265
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6266
	# need to do runtime linking.
1.2.41 by Pedro Fragoso
Import upstream version 2.23.21
6267
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6268
	  for ld_flag in $LDFLAGS; do
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6269
	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6270
	    aix_use_runtimelinking=yes
6271
	    break
6272
	  fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6273
	  done
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6274
	  ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6275
	esac
6276
6277
	exp_sym_flag='-bexport'
6278
	no_entry_flag='-bnoentry'
6279
      fi
6280
6281
      # When large executables or shared objects are built, AIX ld can
6282
      # have problems creating the table of contents.  If linking a library
6283
      # or program results in "error TOC overflow" add -mminimal-toc to
6284
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6285
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6286
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6287
      _LT_TAGVAR(archive_cmds, $1)=''
6288
      _LT_TAGVAR(hardcode_direct, $1)=yes
6289
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6290
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6291
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6292
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6293
6294
      if test "$GCC" = yes; then
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6295
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6296
	# We only want to do this on AIX 4.2 and lower, the check
6297
	# below for broken collect2 doesn't work under 4.3+
6298
	  collect2name=`${CC} -print-prog-name=collect2`
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6299
	  if test -f "$collect2name" &&
6300
	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6301
	  then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6302
	  # We have reworked collect2
6303
	  :
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6304
	  else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6305
	  # We have old collect2
6306
	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
6307
	  # It fails to find uninstalled libraries when the uninstalled
6308
	  # path is not listed in the libpath.  Setting hardcode_minus_L
6309
	  # to unsupported forces relinking
6310
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6311
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6312
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6313
	  fi
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6314
	  ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6315
	esac
6316
	shared_flag='-shared'
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6317
	if test "$aix_use_runtimelinking" = yes; then
6318
	  shared_flag="$shared_flag "'${wl}-G'
6319
	fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6320
      else
6321
	# not using gcc
6322
	if test "$host_cpu" = ia64; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6323
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6324
	# chokes on -Wl,-G. The following line is correct:
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6325
	  shared_flag='-G'
6326
	else
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6327
	  if test "$aix_use_runtimelinking" = yes; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6328
	    shared_flag='${wl}-G'
6329
	  else
6330
	    shared_flag='${wl}-bM:SRE'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6331
	  fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6332
	fi
6333
      fi
6334
1.2.55 by Robert Ancell
Import upstream version 2.27.1
6335
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6336
      # It seems that -bexpall does not export symbols beginning with
6337
      # underscore (_), so it is better to generate a list of symbols to export.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6338
      _LT_TAGVAR(always_export_symbols, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6339
      if test "$aix_use_runtimelinking" = yes; then
6340
	# Warning - without using the other runtime loading flags (-brtl),
6341
	# -berok will link without error, but may produce a broken library.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6342
	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6343
        # Determine the default libpath from the value encoded in an
6344
        # empty executable.
6345
        _LT_SYS_MODULE_PATH_AIX
6346
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6347
        _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"
6348
      else
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6349
	if test "$host_cpu" = ia64; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6350
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6351
	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6352
	  _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"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6353
	else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6354
	 # Determine the default libpath from the value encoded in an
6355
	 # empty executable.
6356
	 _LT_SYS_MODULE_PATH_AIX
6357
	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6358
	  # Warning - without using the other run time loading flags,
6359
	  # -berok will link without error, but may produce a broken library.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6360
	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6361
	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6362
	  # Exported symbols can be pulled into shared objects from archives
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6363
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6364
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6365
	  # This is similar to how AIX traditionally builds its shared libraries.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6366
	  _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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6367
	fi
6368
      fi
6369
      ;;
6370
6371
    amigaos*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6372
      case $host_cpu in
6373
      powerpc)
6374
            # see comment about AmigaOS4 .so support
6375
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6376
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6377
        ;;
6378
      m68k)
6379
            _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)'
6380
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6381
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6382
        ;;
6383
      esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6384
      ;;
6385
6386
    bsdi[[45]]*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6387
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6388
      ;;
6389
1.2.55 by Robert Ancell
Import upstream version 2.27.1
6390
    cygwin* | mingw* | pw32* | cegcc*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6391
      # When not using gcc, we currently assume that we are using
6392
      # Microsoft Visual C++.
6393
      # hardcode_libdir_flag_spec is actually meaningless, as there is
6394
      # no search path for DLLs.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6395
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6396
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6397
      # Tell ltmain to make .lib files, not .a files.
6398
      libext=lib
6399
      # Tell ltmain to make .dll files, not .so files.
6400
      shrext_cmds=".dll"
6401
      # FIXME: Setting linknames here is a bad hack.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6402
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6403
      # The linker will automatically build a .lib file if we build a DLL.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6404
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6405
      # FIXME: Should let the user specify the lib program.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6406
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6407
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6408
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6409
      ;;
6410
6411
    darwin* | rhapsody*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6412
      _LT_DARWIN_LINKER_FEATURES($1)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6413
      ;;
6414
6415
    dgux*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6416
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6417
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6418
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6419
      ;;
6420
6421
    freebsd1*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6422
      _LT_TAGVAR(ld_shlibs, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6423
      ;;
6424
6425
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6426
    # support.  Future versions do this automatically, but an explicit c++rt0.o
6427
    # does not break anything, and helps significantly (at the cost of a little
6428
    # extra space).
6429
    freebsd2.2*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6430
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6431
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6432
      _LT_TAGVAR(hardcode_direct, $1)=yes
6433
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6434
      ;;
6435
6436
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6437
    freebsd2*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6438
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6439
      _LT_TAGVAR(hardcode_direct, $1)=yes
6440
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6441
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6442
      ;;
6443
6444
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1.2.35 by Sebastien Bacher
Import upstream version 2.21.2
6445
    freebsd* | dragonfly*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6446
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6447
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6448
      _LT_TAGVAR(hardcode_direct, $1)=yes
6449
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6450
      ;;
6451
6452
    hpux9*)
6453
      if test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6454
	_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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6455
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6456
	_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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6457
      fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6458
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6459
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6460
      _LT_TAGVAR(hardcode_direct, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6461
6462
      # hardcode_minus_L: Not really in the search PATH,
6463
      # but as the default location of the library.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6464
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6465
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6466
      ;;
6467
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6468
    hpux10*)
6469
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6470
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6471
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6472
	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6473
      fi
6474
      if test "$with_gnu_ld" = no; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6475
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6476
	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6477
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6478
	_LT_TAGVAR(hardcode_direct, $1)=yes
6479
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6480
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6481
	# hardcode_minus_L: Not really in the search PATH,
6482
	# but as the default location of the library.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6483
	_LT_TAGVAR(hardcode_minus_L, $1)=yes
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6484
      fi
6485
      ;;
6486
6487
    hpux11*)
6488
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6489
	case $host_cpu in
6490
	hppa*64*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6491
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6492
	  ;;
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6493
	ia64*)
1.2.55 by Robert Ancell
Import upstream version 2.27.1
6494
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6495
	  ;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6496
	*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6497
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6498
	  ;;
6499
	esac
6500
      else
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6501
	case $host_cpu in
6502
	hppa*64*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6503
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6504
	  ;;
6505
	ia64*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6506
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6507
	  ;;
6508
	*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6509
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6510
	  ;;
6511
	esac
6512
      fi
6513
      if test "$with_gnu_ld" = no; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6514
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6515
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6516
6517
	case $host_cpu in
6518
	hppa*64*|ia64*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6519
	  _LT_TAGVAR(hardcode_direct, $1)=no
6520
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6521
	  ;;
6522
	*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6523
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6524
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6525
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6526
6527
	  # hardcode_minus_L: Not really in the search PATH,
6528
	  # but as the default location of the library.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6529
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6530
	  ;;
6531
	esac
6532
      fi
6533
      ;;
6534
6535
    irix5* | irix6* | nonstopux*)
6536
      if test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6537
	_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'
6538
	# Try to use the -exported_symbol ld option, if it does not
6539
	# work, assume that -exports_file does not work either and
6540
	# implicitly export all symbols.
6541
        save_LDFLAGS="$LDFLAGS"
6542
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6543
        AC_LINK_IFELSE(int foo(void) {},
6544
          _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'
6545
        )
6546
        LDFLAGS="$save_LDFLAGS"
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6547
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6548
	_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'
6549
	_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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6550
      fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6551
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6552
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6553
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6554
      _LT_TAGVAR(inherit_rpath, $1)=yes
6555
      _LT_TAGVAR(link_all_deplibs, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6556
      ;;
6557
1.2.58 by Didier Roche
Import upstream version 2.30.0
6558
    netbsd*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6559
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6560
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6561
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6562
	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6563
      fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6564
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6565
      _LT_TAGVAR(hardcode_direct, $1)=yes
6566
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6567
      ;;
6568
6569
    newsos6)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6570
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6571
      _LT_TAGVAR(hardcode_direct, $1)=yes
6572
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6573
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6574
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6575
      ;;
6576
6577
    *nto* | *qnx*)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6578
      ;;
6579
6580
    openbsd*)
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6581
      if test -f /usr/libexec/ld.so; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6582
	_LT_TAGVAR(hardcode_direct, $1)=yes
6583
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6584
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6585
	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6586
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6587
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6588
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6589
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6590
	else
6591
	  case $host_os in
6592
	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6593
	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6594
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6595
	     ;;
6596
	   *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6597
	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6598
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6599
	     ;;
6600
	  esac
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6601
	fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6602
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6603
	_LT_TAGVAR(ld_shlibs, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6604
      fi
6605
      ;;
6606
6607
    os2*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6608
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6609
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6610
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6611
      _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'
6612
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6613
      ;;
6614
6615
    osf3*)
6616
      if test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6617
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6618
	_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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6619
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6620
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6621
	_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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6622
      fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6623
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6624
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6625
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6626
      ;;
6627
6628
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6629
      if test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6630
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6631
	_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'
6632
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6633
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6634
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6635
	_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'
6636
	_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~
6637
	$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'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6638
6639
	# Both c and cxx compiler support -rpath directly
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6640
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6641
      fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6642
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6643
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6644
      ;;
6645
6646
    solaris*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6647
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6648
      if test "$GCC" = yes; then
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6649
	wlarc='${wl}'
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6650
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6651
	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6652
	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6653
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6654
	case `$CC -V 2>&1` in
6655
	*"Compilers 5.0"*)
6656
	  wlarc=''
6657
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6658
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6659
	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6660
	  ;;
6661
	*)
6662
	  wlarc='${wl}'
6663
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6664
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6665
	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6666
	  ;;
6667
	esac
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6668
      fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6669
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6670
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6671
      case $host_os in
6672
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
6673
      *)
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6674
	# The compiler driver will combine and reorder linker options,
6675
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6676
	# but is careful enough not to reorder.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6677
	# Supported since Solaris 2.6 (maybe 2.5.1?)
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6678
	if test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6679
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6680
	else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6681
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6682
	fi
6683
	;;
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6684
      esac
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6685
      _LT_TAGVAR(link_all_deplibs, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6686
      ;;
6687
6688
    sunos4*)
6689
      if test "x$host_vendor" = xsequent; then
6690
	# Use $CC to link under sequent, because it throws in some extra .o
6691
	# files that make .init and .fini sections work.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6692
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6693
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6694
	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6695
      fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6696
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6697
      _LT_TAGVAR(hardcode_direct, $1)=yes
6698
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6699
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6700
      ;;
6701
6702
    sysv4)
6703
      case $host_vendor in
6704
	sni)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6705
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6706
	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6707
	;;
6708
	siemens)
6709
	  ## LD is ld it makes a PLAMLIB
6710
	  ## CC just makes a GrossModule.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6711
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6712
	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6713
	  _LT_TAGVAR(hardcode_direct, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6714
        ;;
6715
	motorola)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6716
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6717
	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6718
	;;
6719
      esac
6720
      runpath_var='LD_RUN_PATH'
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6721
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6722
      ;;
6723
6724
    sysv4.3*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6725
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6726
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6727
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6728
      ;;
6729
6730
    sysv4*MP*)
6731
      if test -d /usr/nec; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6732
	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6733
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6734
	runpath_var=LD_RUN_PATH
6735
	hardcode_runpath_var=yes
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6736
	_LT_TAGVAR(ld_shlibs, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6737
      fi
6738
      ;;
6739
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6740
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6741
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6742
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6743
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6744
      runpath_var='LD_RUN_PATH'
6745
6746
      if test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6747
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6748
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6749
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6750
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6751
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6752
      fi
6753
      ;;
6754
6755
    sysv5* | sco3.2v5* | sco5v6*)
6756
      # Note: We can NOT use -z defs as we might desire, because we do not
6757
      # link with -lc, and that would cause any symbols used from libc to
6758
      # always be unresolved, which means just about no library would
6759
      # ever link correctly.  If we're not using GNU ld we use -z text
6760
      # though, which does catch some bad symbols but isn't as heavy-handed
6761
      # as -z defs.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6762
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6763
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6764
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6765
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6766
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6767
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6768
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6769
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6770
      runpath_var='LD_RUN_PATH'
6771
6772
      if test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6773
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6774
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6775
      else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6776
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6777
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
6778
      fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6779
      ;;
6780
6781
    uts4*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6782
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6783
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6784
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6785
      ;;
6786
6787
    *)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6788
      _LT_TAGVAR(ld_shlibs, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6789
      ;;
6790
    esac
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6791
6792
    if test x$host_vendor = xsni; then
6793
      case $host in
6794
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6795
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6796
	;;
6797
      esac
6798
    fi
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6799
  fi
6800
])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6801
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6802
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6803
6804
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6805
6806
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6807
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6808
_LT_DECL([], [extract_expsyms_cmds], [2],
6809
    [The commands to extract the exported symbol list from a shared archive])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6810
6811
#
6812
# Do we need to explicitly link libc?
6813
#
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6814
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6815
x|xyes)
6816
  # Assume -lc should be added
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6817
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6818
6819
  if test "$enable_shared" = yes && test "$GCC" = yes; then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6820
    case $_LT_TAGVAR(archive_cmds, $1) in
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6821
    *'~'*)
6822
      # FIXME: we may have to deal with multi-command sequences.
6823
      ;;
6824
    '$CC '*)
6825
      # Test whether the compiler implicitly links with -lc since on some
6826
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6827
      # to ld, don't add -lc before -lgcc.
6828
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6829
      $RM conftest*
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
6830
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6831
6832
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6833
        soname=conftest
6834
        lib=conftest
6835
        libobjs=conftest.$ac_objext
6836
        deplibs=
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6837
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6838
	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6839
        compiler_flags=-v
6840
        linker_flags=-v
6841
        verstring=
6842
        output_objdir=.
6843
        libname=conftest
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6844
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6845
        _LT_TAGVAR(allow_undefined_flag, $1)=
6846
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6847
        then
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6848
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6849
        else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6850
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6851
        fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6852
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6853
      else
6854
        cat conftest.err 1>&5
6855
      fi
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6856
      $RM conftest*
6857
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
6858
      ;;
6859
    esac
6860
  fi
6861
  ;;
6862
esac
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
6863
6864
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6865
    [Whether or not to add -lc for building shared libraries])
6866
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6867
    [enable_shared_with_static_runtimes], [0],
6868
    [Whether or not to disallow shared libs when runtime libs are static])
6869
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6870
    [Compiler flag to allow reflexive dlopens])
6871
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6872
    [Compiler flag to generate shared objects directly from archives])
6873
_LT_TAGDECL([], [compiler_needs_object], [1],
6874
    [Whether the compiler copes with passing no objects directly])
6875
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6876
    [Create an old-style archive from a shared archive])
6877
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6878
    [Create a temporary old-style archive to link instead of a shared archive])
6879
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6880
_LT_TAGDECL([], [archive_expsym_cmds], [2])
6881
_LT_TAGDECL([], [module_cmds], [2],
6882
    [Commands used to build a loadable module if different from building
6883
    a shared archive.])
6884
_LT_TAGDECL([], [module_expsym_cmds], [2])
6885
_LT_TAGDECL([], [with_gnu_ld], [1],
6886
    [Whether we are building with GNU ld or not])
6887
_LT_TAGDECL([], [allow_undefined_flag], [1],
6888
    [Flag that allows shared libraries with undefined symbols to be built])
6889
_LT_TAGDECL([], [no_undefined_flag], [1],
6890
    [Flag that enforces no undefined symbols])
6891
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6892
    [Flag to hardcode $libdir into a binary during linking.
6893
    This must work even if $libdir does not exist])
6894
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6895
    [[If ld is used when linking, flag to hardcode $libdir into a binary
6896
    during linking.  This must work even if $libdir does not exist]])
6897
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6898
    [Whether we need a single "-rpath" flag with a separated argument])
6899
_LT_TAGDECL([], [hardcode_direct], [0],
6900
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6901
    DIR into the resulting binary])
6902
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6903
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6904
    DIR into the resulting binary and the resulting library dependency is
6905
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6906
    library is relocated])
6907
_LT_TAGDECL([], [hardcode_minus_L], [0],
6908
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6909
    into the resulting binary])
6910
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6911
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6912
    into the resulting binary])
6913
_LT_TAGDECL([], [hardcode_automatic], [0],
6914
    [Set to "yes" if building a shared library automatically hardcodes DIR
6915
    into the library and all subsequent libraries and executables linked
6916
    against it])
6917
_LT_TAGDECL([], [inherit_rpath], [0],
6918
    [Set to yes if linker adds runtime paths of dependent libraries
6919
    to runtime path list])
6920
_LT_TAGDECL([], [link_all_deplibs], [0],
6921
    [Whether libtool must link a program against all its dependency libraries])
6922
_LT_TAGDECL([], [fix_srcfile_path], [1],
6923
    [Fix the shell variable $srcfile for the compiler])
6924
_LT_TAGDECL([], [always_export_symbols], [0],
6925
    [Set to "yes" if exported symbols are required])
6926
_LT_TAGDECL([], [export_symbols_cmds], [2],
6927
    [The commands to list exported symbols])
6928
_LT_TAGDECL([], [exclude_expsyms], [1],
6929
    [Symbols that should not be listed in the preloaded symbols])
6930
_LT_TAGDECL([], [include_expsyms], [1],
6931
    [Symbols that must always be exported])
6932
_LT_TAGDECL([], [prelink_cmds], [2],
6933
    [Commands necessary for linking programs (against libraries) with templates])
6934
_LT_TAGDECL([], [file_list_spec], [1],
6935
    [Specify filename containing input files])
6936
dnl FIXME: Not yet implemented
6937
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6938
dnl    [Compiler flag to generate thread safe objects])
6939
])# _LT_LINKER_SHLIBS
6940
6941
6942
# _LT_LANG_C_CONFIG([TAG])
6943
# ------------------------
6944
# Ensure that the configuration variables for a C compiler are suitably
6945
# defined.  These variables are subsequently used by _LT_CONFIG to write
6946
# the compiler configuration to `libtool'.
6947
m4_defun([_LT_LANG_C_CONFIG],
6948
[m4_require([_LT_DECL_EGREP])dnl
6949
lt_save_CC="$CC"
6950
AC_LANG_PUSH(C)
6951
6952
# Source file extension for C test sources.
6953
ac_ext=c
6954
6955
# Object file extension for compiled C test sources.
6956
objext=o
6957
_LT_TAGVAR(objext, $1)=$objext
6958
6959
# Code to be used in simple compile tests
6960
lt_simple_compile_test_code="int some_variable = 0;"
6961
6962
# Code to be used in simple link tests
6963
lt_simple_link_test_code='int main(){return(0);}'
6964
6965
_LT_TAG_COMPILER
6966
# Save the default compiler, since it gets overwritten when the other
6967
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6968
compiler_DEFAULT=$CC
6969
6970
# save warnings/boilerplate of simple test code
6971
_LT_COMPILER_BOILERPLATE
6972
_LT_LINKER_BOILERPLATE
6973
6974
if test -n "$compiler"; then
6975
  _LT_COMPILER_NO_RTTI($1)
6976
  _LT_COMPILER_PIC($1)
6977
  _LT_COMPILER_C_O($1)
6978
  _LT_COMPILER_FILE_LOCKS($1)
6979
  _LT_LINKER_SHLIBS($1)
6980
  _LT_SYS_DYNAMIC_LINKER($1)
6981
  _LT_LINKER_HARDCODE_LIBPATH($1)
6982
  LT_SYS_DLOPEN_SELF
6983
  _LT_CMD_STRIPLIB
6984
6985
  # Report which library types will actually be built
6986
  AC_MSG_CHECKING([if libtool supports shared libraries])
6987
  AC_MSG_RESULT([$can_build_shared])
6988
6989
  AC_MSG_CHECKING([whether to build shared libraries])
6990
  test "$can_build_shared" = "no" && enable_shared=no
6991
6992
  # On AIX, shared libraries and static libraries use the same namespace, and
6993
  # are all built from PIC.
6994
  case $host_os in
6995
  aix3*)
6996
    test "$enable_shared" = yes && enable_static=no
6997
    if test -n "$RANLIB"; then
6998
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6999
      postinstall_cmds='$RANLIB $lib'
7000
    fi
7001
    ;;
7002
7003
  aix[[4-9]]*)
7004
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7005
      test "$enable_shared" = yes && enable_static=no
7006
    fi
7007
    ;;
7008
  esac
7009
  AC_MSG_RESULT([$enable_shared])
7010
7011
  AC_MSG_CHECKING([whether to build static libraries])
7012
  # Make sure either enable_shared or enable_static is yes.
7013
  test "$enable_shared" = yes || enable_static=yes
7014
  AC_MSG_RESULT([$enable_static])
7015
7016
  _LT_CONFIG($1)
7017
fi
7018
AC_LANG_POP
7019
CC="$lt_save_CC"
7020
])# _LT_LANG_C_CONFIG
7021
7022
7023
# _LT_PROG_CXX
7024
# ------------
7025
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
7026
# compiler, we have our own version here.
7027
m4_defun([_LT_PROG_CXX],
7028
[
7029
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
7030
AC_PROG_CXX
7031
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7032
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7033
    (test "X$CXX" != "Xg++"))) ; then
7034
  AC_PROG_CXXCPP
7035
else
7036
  _lt_caught_CXX_error=yes
7037
fi
7038
popdef([AC_MSG_ERROR])
7039
])# _LT_PROG_CXX
7040
7041
dnl aclocal-1.4 backwards compatibility:
7042
dnl AC_DEFUN([_LT_PROG_CXX], [])
7043
7044
7045
# _LT_LANG_CXX_CONFIG([TAG])
7046
# --------------------------
7047
# Ensure that the configuration variables for a C++ compiler are suitably
7048
# defined.  These variables are subsequently used by _LT_CONFIG to write
7049
# the compiler configuration to `libtool'.
7050
m4_defun([_LT_LANG_CXX_CONFIG],
7051
[AC_REQUIRE([_LT_PROG_CXX])dnl
7052
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7053
m4_require([_LT_DECL_EGREP])dnl
7054
7055
AC_LANG_PUSH(C++)
7056
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7057
_LT_TAGVAR(allow_undefined_flag, $1)=
7058
_LT_TAGVAR(always_export_symbols, $1)=no
7059
_LT_TAGVAR(archive_expsym_cmds, $1)=
7060
_LT_TAGVAR(compiler_needs_object, $1)=no
7061
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7062
_LT_TAGVAR(hardcode_direct, $1)=no
7063
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7064
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7065
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7066
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7067
_LT_TAGVAR(hardcode_minus_L, $1)=no
7068
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7069
_LT_TAGVAR(hardcode_automatic, $1)=no
7070
_LT_TAGVAR(inherit_rpath, $1)=no
7071
_LT_TAGVAR(module_cmds, $1)=
7072
_LT_TAGVAR(module_expsym_cmds, $1)=
7073
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7074
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7075
_LT_TAGVAR(no_undefined_flag, $1)=
7076
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7077
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7078
7079
# Source file extension for C++ test sources.
7080
ac_ext=cpp
7081
7082
# Object file extension for compiled C++ test sources.
7083
objext=o
7084
_LT_TAGVAR(objext, $1)=$objext
7085
7086
# No sense in running all these tests if we already determined that
7087
# the CXX compiler isn't working.  Some variables (like enable_shared)
7088
# are currently assumed to apply to all compilers on this platform,
7089
# and will be corrupted by setting them based on a non-working compiler.
7090
if test "$_lt_caught_CXX_error" != yes; then
7091
  # Code to be used in simple compile tests
7092
  lt_simple_compile_test_code="int some_variable = 0;"
7093
7094
  # Code to be used in simple link tests
7095
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7096
7097
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7098
  _LT_TAG_COMPILER
7099
7100
  # save warnings/boilerplate of simple test code
7101
  _LT_COMPILER_BOILERPLATE
7102
  _LT_LINKER_BOILERPLATE
7103
7104
  # Allow CC to be a program name with arguments.
7105
  lt_save_CC=$CC
7106
  lt_save_LD=$LD
7107
  lt_save_GCC=$GCC
7108
  GCC=$GXX
7109
  lt_save_with_gnu_ld=$with_gnu_ld
7110
  lt_save_path_LD=$lt_cv_path_LD
7111
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7112
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7113
  else
7114
    $as_unset lt_cv_prog_gnu_ld
7115
  fi
7116
  if test -n "${lt_cv_path_LDCXX+set}"; then
7117
    lt_cv_path_LD=$lt_cv_path_LDCXX
7118
  else
7119
    $as_unset lt_cv_path_LD
7120
  fi
7121
  test -z "${LDCXX+set}" || LD=$LDCXX
7122
  CC=${CXX-"c++"}
7123
  compiler=$CC
7124
  _LT_TAGVAR(compiler, $1)=$CC
7125
  _LT_CC_BASENAME([$compiler])
7126
7127
  if test -n "$compiler"; then
7128
    # We don't want -fno-exception when compiling C++ code, so set the
7129
    # no_builtin_flag separately
7130
    if test "$GXX" = yes; then
7131
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7132
    else
7133
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7134
    fi
7135
7136
    if test "$GXX" = yes; then
7137
      # Set up default GNU C++ configuration
7138
7139
      LT_PATH_LD
7140
7141
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7142
      # archiving commands below assume that GNU ld is being used.
7143
      if test "$with_gnu_ld" = yes; then
7144
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7145
        _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'
7146
7147
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7148
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7149
7150
        # If archive_cmds runs LD, not CC, wlarc should be empty
7151
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7152
        #     investigate it a little bit more. (MM)
7153
        wlarc='${wl}'
7154
7155
        # ancient GNU ld didn't support --whole-archive et. al.
7156
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7157
	  $GREP 'no-whole-archive' > /dev/null; then
7158
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7159
        else
7160
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7161
        fi
7162
      else
7163
        with_gnu_ld=no
7164
        wlarc=
7165
7166
        # A generic and very simple default shared library creation
7167
        # command for GNU C++ for the case where it uses the native
7168
        # linker, instead of GNU ld.  If possible, this setting should
7169
        # overridden to take advantage of the native linker features on
7170
        # the platform it is being used on.
7171
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7172
      fi
7173
7174
      # Commands to make compiler produce verbose output that lists
7175
      # what "hidden" libraries, object files and flags are used when
7176
      # linking a shared library.
7177
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7178
7179
    else
7180
      GXX=no
7181
      with_gnu_ld=no
7182
      wlarc=
7183
    fi
7184
7185
    # PORTME: fill in a description of your system's C++ link characteristics
7186
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7187
    _LT_TAGVAR(ld_shlibs, $1)=yes
7188
    case $host_os in
7189
      aix3*)
7190
        # FIXME: insert proper C++ library support
7191
        _LT_TAGVAR(ld_shlibs, $1)=no
7192
        ;;
7193
      aix[[4-9]]*)
7194
        if test "$host_cpu" = ia64; then
7195
          # On IA64, the linker does run time linking by default, so we don't
7196
          # have to do anything special.
7197
          aix_use_runtimelinking=no
7198
          exp_sym_flag='-Bexport'
7199
          no_entry_flag=""
7200
        else
7201
          aix_use_runtimelinking=no
7202
7203
          # Test if we are trying to use run time linking or normal
7204
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7205
          # need to do runtime linking.
7206
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7207
	    for ld_flag in $LDFLAGS; do
7208
	      case $ld_flag in
7209
	      *-brtl*)
7210
	        aix_use_runtimelinking=yes
7211
	        break
7212
	        ;;
7213
	      esac
7214
	    done
7215
	    ;;
7216
          esac
7217
7218
          exp_sym_flag='-bexport'
7219
          no_entry_flag='-bnoentry'
7220
        fi
7221
7222
        # When large executables or shared objects are built, AIX ld can
7223
        # have problems creating the table of contents.  If linking a library
7224
        # or program results in "error TOC overflow" add -mminimal-toc to
7225
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7226
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7227
7228
        _LT_TAGVAR(archive_cmds, $1)=''
7229
        _LT_TAGVAR(hardcode_direct, $1)=yes
7230
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7231
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7232
        _LT_TAGVAR(link_all_deplibs, $1)=yes
7233
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7234
7235
        if test "$GXX" = yes; then
7236
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7237
          # We only want to do this on AIX 4.2 and lower, the check
7238
          # below for broken collect2 doesn't work under 4.3+
7239
	  collect2name=`${CC} -print-prog-name=collect2`
7240
	  if test -f "$collect2name" &&
7241
	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7242
	  then
7243
	    # We have reworked collect2
7244
	    :
7245
	  else
7246
	    # We have old collect2
7247
	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7248
	    # It fails to find uninstalled libraries when the uninstalled
7249
	    # path is not listed in the libpath.  Setting hardcode_minus_L
7250
	    # to unsupported forces relinking
7251
	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7252
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7253
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7254
	  fi
7255
          esac
7256
          shared_flag='-shared'
7257
	  if test "$aix_use_runtimelinking" = yes; then
7258
	    shared_flag="$shared_flag "'${wl}-G'
7259
	  fi
7260
        else
7261
          # not using gcc
7262
          if test "$host_cpu" = ia64; then
7263
	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7264
	  # chokes on -Wl,-G. The following line is correct:
7265
	  shared_flag='-G'
7266
          else
7267
	    if test "$aix_use_runtimelinking" = yes; then
7268
	      shared_flag='${wl}-G'
7269
	    else
7270
	      shared_flag='${wl}-bM:SRE'
7271
	    fi
7272
          fi
7273
        fi
7274
1.2.55 by Robert Ancell
Import upstream version 2.27.1
7275
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
7276
        # It seems that -bexpall does not export symbols beginning with
7277
        # underscore (_), so it is better to generate a list of symbols to
7278
	# export.
7279
        _LT_TAGVAR(always_export_symbols, $1)=yes
7280
        if test "$aix_use_runtimelinking" = yes; then
7281
          # Warning - without using the other runtime loading flags (-brtl),
7282
          # -berok will link without error, but may produce a broken library.
7283
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7284
          # Determine the default libpath from the value encoded in an empty
7285
          # executable.
7286
          _LT_SYS_MODULE_PATH_AIX
7287
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7288
7289
          _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"
7290
        else
7291
          if test "$host_cpu" = ia64; then
7292
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7293
	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7294
	    _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"
7295
          else
7296
	    # Determine the default libpath from the value encoded in an
7297
	    # empty executable.
7298
	    _LT_SYS_MODULE_PATH_AIX
7299
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7300
	    # Warning - without using the other run time loading flags,
7301
	    # -berok will link without error, but may produce a broken library.
7302
	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7303
	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7304
	    # Exported symbols can be pulled into shared objects from archives
7305
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7306
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7307
	    # This is similar to how AIX traditionally builds its shared
7308
	    # libraries.
7309
	    _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'
7310
          fi
7311
        fi
7312
        ;;
7313
7314
      beos*)
7315
	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7316
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7317
	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7318
	  # support --undefined.  This deserves some investigation.  FIXME
7319
	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7320
	else
7321
	  _LT_TAGVAR(ld_shlibs, $1)=no
7322
	fi
7323
	;;
7324
7325
      chorus*)
7326
        case $cc_basename in
7327
          *)
7328
	  # FIXME: insert proper C++ library support
7329
	  _LT_TAGVAR(ld_shlibs, $1)=no
7330
	  ;;
7331
        esac
7332
        ;;
7333
1.2.55 by Robert Ancell
Import upstream version 2.27.1
7334
      cygwin* | mingw* | pw32* | cegcc*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
7335
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7336
        # as there is no search path for DLLs.
7337
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7338
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7339
        _LT_TAGVAR(always_export_symbols, $1)=no
7340
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7341
7342
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7343
          _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'
7344
          # If the export-symbols file already is a .def file (1st line
7345
          # is EXPORTS), use it as is; otherwise, prepend...
7346
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7347
	    cp $export_symbols $output_objdir/$soname.def;
7348
          else
7349
	    echo EXPORTS > $output_objdir/$soname.def;
7350
	    cat $export_symbols >> $output_objdir/$soname.def;
7351
          fi~
7352
          $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'
7353
        else
7354
          _LT_TAGVAR(ld_shlibs, $1)=no
7355
        fi
7356
        ;;
7357
      darwin* | rhapsody*)
7358
        _LT_DARWIN_LINKER_FEATURES($1)
7359
	;;
7360
7361
      dgux*)
7362
        case $cc_basename in
7363
          ec++*)
7364
	    # FIXME: insert proper C++ library support
7365
	    _LT_TAGVAR(ld_shlibs, $1)=no
7366
	    ;;
7367
          ghcx*)
7368
	    # Green Hills C++ Compiler
7369
	    # FIXME: insert proper C++ library support
7370
	    _LT_TAGVAR(ld_shlibs, $1)=no
7371
	    ;;
7372
          *)
7373
	    # FIXME: insert proper C++ library support
7374
	    _LT_TAGVAR(ld_shlibs, $1)=no
7375
	    ;;
7376
        esac
7377
        ;;
7378
7379
      freebsd[[12]]*)
7380
        # C++ shared libraries reported to be fairly broken before
7381
	# switch to ELF
7382
        _LT_TAGVAR(ld_shlibs, $1)=no
7383
        ;;
7384
7385
      freebsd-elf*)
7386
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7387
        ;;
7388
7389
      freebsd* | dragonfly*)
7390
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7391
        # conventions
7392
        _LT_TAGVAR(ld_shlibs, $1)=yes
7393
        ;;
7394
7395
      gnu*)
7396
        ;;
7397
7398
      hpux9*)
7399
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7400
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7401
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7402
        _LT_TAGVAR(hardcode_direct, $1)=yes
7403
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7404
				             # but as the default
7405
				             # location of the library.
7406
7407
        case $cc_basename in
7408
          CC*)
7409
            # FIXME: insert proper C++ library support
7410
            _LT_TAGVAR(ld_shlibs, $1)=no
7411
            ;;
7412
          aCC*)
7413
            _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'
7414
            # Commands to make compiler produce verbose output that lists
7415
            # what "hidden" libraries, object files and flags are used when
7416
            # linking a shared library.
7417
            #
7418
            # There doesn't appear to be a way to prevent this compiler from
7419
            # explicitly linking system object files so we need to strip them
7420
            # from the output so that they don't get included in the library
7421
            # dependencies.
7422
            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'
7423
            ;;
7424
          *)
7425
            if test "$GXX" = yes; then
7426
              _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'
7427
            else
7428
              # FIXME: insert proper C++ library support
7429
              _LT_TAGVAR(ld_shlibs, $1)=no
7430
            fi
7431
            ;;
7432
        esac
7433
        ;;
7434
7435
      hpux10*|hpux11*)
7436
        if test $with_gnu_ld = no; then
7437
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7438
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7439
7440
          case $host_cpu in
7441
            hppa*64*|ia64*)
7442
              ;;
7443
            *)
7444
	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7445
              ;;
7446
          esac
7447
        fi
7448
        case $host_cpu in
7449
          hppa*64*|ia64*)
7450
            _LT_TAGVAR(hardcode_direct, $1)=no
7451
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7452
            ;;
7453
          *)
7454
            _LT_TAGVAR(hardcode_direct, $1)=yes
7455
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7456
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7457
					         # but as the default
7458
					         # location of the library.
7459
            ;;
7460
        esac
7461
7462
        case $cc_basename in
7463
          CC*)
7464
	    # FIXME: insert proper C++ library support
7465
	    _LT_TAGVAR(ld_shlibs, $1)=no
7466
	    ;;
7467
          aCC*)
7468
	    case $host_cpu in
7469
	      hppa*64*)
7470
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7471
	        ;;
7472
	      ia64*)
7473
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7474
	        ;;
7475
	      *)
7476
	        _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'
7477
	        ;;
7478
	    esac
7479
	    # Commands to make compiler produce verbose output that lists
7480
	    # what "hidden" libraries, object files and flags are used when
7481
	    # linking a shared library.
7482
	    #
7483
	    # There doesn't appear to be a way to prevent this compiler from
7484
	    # explicitly linking system object files so we need to strip them
7485
	    # from the output so that they don't get included in the library
7486
	    # dependencies.
7487
	    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'
7488
	    ;;
7489
          *)
7490
	    if test "$GXX" = yes; then
7491
	      if test $with_gnu_ld = no; then
7492
	        case $host_cpu in
7493
	          hppa*64*)
7494
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7495
	            ;;
7496
	          ia64*)
7497
	            _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'
7498
	            ;;
7499
	          *)
7500
	            _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'
7501
	            ;;
7502
	        esac
7503
	      fi
7504
	    else
7505
	      # FIXME: insert proper C++ library support
7506
	      _LT_TAGVAR(ld_shlibs, $1)=no
7507
	    fi
7508
	    ;;
7509
        esac
7510
        ;;
7511
7512
      interix[[3-9]]*)
7513
	_LT_TAGVAR(hardcode_direct, $1)=no
7514
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7515
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7516
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7517
	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7518
	# Instead, shared libraries are loaded at an image base (0x10000000 by
7519
	# default) and relocated if they conflict, which is a slow very memory
7520
	# consuming and fragmenting process.  To avoid this, we pick a random,
7521
	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7522
	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7523
	_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'
7524
	_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'
7525
	;;
7526
      irix5* | irix6*)
7527
        case $cc_basename in
7528
          CC*)
7529
	    # SGI C++
7530
	    _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'
7531
7532
	    # Archives containing C++ object files must be created using
7533
	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7534
	    # necessary to make sure instantiated templates are included
7535
	    # in the archive.
7536
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7537
	    ;;
7538
          *)
7539
	    if test "$GXX" = yes; then
7540
	      if test "$with_gnu_ld" = no; then
7541
	        _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'
7542
	      else
7543
	        _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'
7544
	      fi
7545
	    fi
7546
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7547
	    ;;
7548
        esac
7549
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7550
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7551
        _LT_TAGVAR(inherit_rpath, $1)=yes
7552
        ;;
7553
7554
      linux* | k*bsd*-gnu)
7555
        case $cc_basename in
7556
          KCC*)
7557
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7558
7559
	    # KCC will only create a shared library if the output file
7560
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7561
	    # to its proper name (with version) after linking.
7562
	    _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'
7563
	    _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'
7564
	    # Commands to make compiler produce verbose output that lists
7565
	    # what "hidden" libraries, object files and flags are used when
7566
	    # linking a shared library.
7567
	    #
7568
	    # There doesn't appear to be a way to prevent this compiler from
7569
	    # explicitly linking system object files so we need to strip them
7570
	    # from the output so that they don't get included in the library
7571
	    # dependencies.
7572
	    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'
7573
7574
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7575
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7576
7577
	    # Archives containing C++ object files must be created using
7578
	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7579
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7580
	    ;;
7581
	  icpc* | ecpc* )
7582
	    # Intel C++
7583
	    with_gnu_ld=yes
7584
	    # version 8.0 and above of icpc choke on multiply defined symbols
7585
	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7586
	    # earlier do not add the objects themselves.
7587
	    case `$CC -V 2>&1` in
7588
	      *"Version 7."*)
7589
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7590
		_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'
7591
		;;
7592
	      *)  # Version 8.0 or newer
7593
	        tmp_idyn=
7594
	        case $host_cpu in
7595
		  ia64*) tmp_idyn=' -i_dynamic';;
7596
		esac
7597
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7598
		_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'
7599
		;;
7600
	    esac
7601
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7602
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7603
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7604
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7605
	    ;;
7606
          pgCC* | pgcpp*)
7607
            # Portland Group C++ compiler
7608
	    case `$CC -V` in
7609
	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7610
	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7611
		rm -rf $tpldir~
7612
		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7613
		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7614
	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7615
		rm -rf $tpldir~
7616
		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7617
		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7618
		$RANLIB $oldlib'
7619
	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7620
		rm -rf $tpldir~
7621
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7622
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7623
	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7624
		rm -rf $tpldir~
7625
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7626
		$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'
7627
	      ;;
7628
	    *) # Version 6 will use weak symbols
7629
	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7630
	      _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'
7631
	      ;;
7632
	    esac
7633
7634
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7635
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7636
	    _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'
7637
            ;;
7638
	  cxx*)
7639
	    # Compaq C++
7640
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7641
	    _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'
7642
7643
	    runpath_var=LD_RUN_PATH
7644
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7645
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7646
7647
	    # Commands to make compiler produce verbose output that lists
7648
	    # what "hidden" libraries, object files and flags are used when
7649
	    # linking a shared library.
7650
	    #
7651
	    # There doesn't appear to be a way to prevent this compiler from
7652
	    # explicitly linking system object files so we need to strip them
7653
	    # from the output so that they don't get included in the library
7654
	    # dependencies.
7655
	    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'
7656
	    ;;
7657
	  xl*)
7658
	    # IBM XL 8.0 on PPC, with GNU ld
7659
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7660
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7661
	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7662
	    if test "x$supports_anon_versioning" = xyes; then
7663
	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7664
		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7665
		echo "local: *; };" >> $output_objdir/$libname.ver~
7666
		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7667
	    fi
7668
	    ;;
7669
	  *)
7670
	    case `$CC -V 2>&1 | sed 5q` in
7671
	    *Sun\ C*)
7672
	      # Sun C++ 5.9
7673
	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7674
	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7675
	      _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'
7676
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7677
	      _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'
7678
	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7679
7680
	      # Not sure whether something based on
7681
	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7682
	      # would be better.
7683
	      output_verbose_link_cmd='echo'
7684
7685
	      # Archives containing C++ object files must be created using
7686
	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7687
	      # necessary to make sure instantiated templates are included
7688
	      # in the archive.
7689
	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7690
	      ;;
7691
	    esac
7692
	    ;;
7693
	esac
7694
	;;
7695
7696
      lynxos*)
7697
        # FIXME: insert proper C++ library support
7698
	_LT_TAGVAR(ld_shlibs, $1)=no
7699
	;;
7700
7701
      m88k*)
7702
        # FIXME: insert proper C++ library support
7703
        _LT_TAGVAR(ld_shlibs, $1)=no
7704
	;;
7705
7706
      mvs*)
7707
        case $cc_basename in
7708
          cxx*)
7709
	    # FIXME: insert proper C++ library support
7710
	    _LT_TAGVAR(ld_shlibs, $1)=no
7711
	    ;;
7712
	  *)
7713
	    # FIXME: insert proper C++ library support
7714
	    _LT_TAGVAR(ld_shlibs, $1)=no
7715
	    ;;
7716
	esac
7717
	;;
7718
7719
      netbsd*)
7720
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7721
	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7722
	  wlarc=
7723
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7724
	  _LT_TAGVAR(hardcode_direct, $1)=yes
7725
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7726
	fi
7727
	# Workaround some broken pre-1.5 toolchains
7728
	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7729
	;;
7730
7731
      *nto* | *qnx*)
7732
        _LT_TAGVAR(ld_shlibs, $1)=yes
7733
	;;
7734
7735
      openbsd2*)
7736
        # C++ shared libraries are fairly broken
7737
	_LT_TAGVAR(ld_shlibs, $1)=no
7738
	;;
7739
7740
      openbsd*)
7741
	if test -f /usr/libexec/ld.so; then
7742
	  _LT_TAGVAR(hardcode_direct, $1)=yes
7743
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7744
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7745
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7746
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7747
	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7748
	    _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'
7749
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7750
	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7751
	  fi
7752
	  output_verbose_link_cmd=echo
7753
	else
7754
	  _LT_TAGVAR(ld_shlibs, $1)=no
7755
	fi
7756
	;;
7757
7758
      osf3* | osf4* | osf5*)
7759
        case $cc_basename in
7760
          KCC*)
7761
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7762
7763
	    # KCC will only create a shared library if the output file
7764
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7765
	    # to its proper name (with version) after linking.
7766
	    _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'
7767
7768
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7769
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7770
7771
	    # Archives containing C++ object files must be created using
7772
	    # the KAI C++ compiler.
7773
	    case $host in
7774
	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7775
	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7776
	    esac
7777
	    ;;
7778
          RCC*)
7779
	    # Rational C++ 2.4.1
7780
	    # FIXME: insert proper C++ library support
7781
	    _LT_TAGVAR(ld_shlibs, $1)=no
7782
	    ;;
7783
          cxx*)
7784
	    case $host in
7785
	      osf3*)
7786
	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7787
	        _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'
7788
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7789
		;;
7790
	      *)
7791
	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7792
	        _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'
7793
	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7794
	          echo "-hidden">> $lib.exp~
7795
	          $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~
7796
	          $RM $lib.exp'
7797
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7798
		;;
7799
	    esac
7800
7801
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7802
7803
	    # Commands to make compiler produce verbose output that lists
7804
	    # what "hidden" libraries, object files and flags are used when
7805
	    # linking a shared library.
7806
	    #
7807
	    # There doesn't appear to be a way to prevent this compiler from
7808
	    # explicitly linking system object files so we need to strip them
7809
	    # from the output so that they don't get included in the library
7810
	    # dependencies.
7811
	    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'
7812
	    ;;
7813
	  *)
7814
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7815
	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7816
	      case $host in
7817
	        osf3*)
7818
	          _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'
7819
		  ;;
7820
	        *)
7821
	          _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'
7822
		  ;;
7823
	      esac
7824
7825
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7826
	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7827
7828
	      # Commands to make compiler produce verbose output that lists
7829
	      # what "hidden" libraries, object files and flags are used when
7830
	      # linking a shared library.
7831
	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7832
7833
	    else
7834
	      # FIXME: insert proper C++ library support
7835
	      _LT_TAGVAR(ld_shlibs, $1)=no
7836
	    fi
7837
	    ;;
7838
        esac
7839
        ;;
7840
7841
      psos*)
7842
        # FIXME: insert proper C++ library support
7843
        _LT_TAGVAR(ld_shlibs, $1)=no
7844
        ;;
7845
7846
      sunos4*)
7847
        case $cc_basename in
7848
          CC*)
7849
	    # Sun C++ 4.x
7850
	    # FIXME: insert proper C++ library support
7851
	    _LT_TAGVAR(ld_shlibs, $1)=no
7852
	    ;;
7853
          lcc*)
7854
	    # Lucid
7855
	    # FIXME: insert proper C++ library support
7856
	    _LT_TAGVAR(ld_shlibs, $1)=no
7857
	    ;;
7858
          *)
7859
	    # FIXME: insert proper C++ library support
7860
	    _LT_TAGVAR(ld_shlibs, $1)=no
7861
	    ;;
7862
        esac
7863
        ;;
7864
7865
      solaris*)
7866
        case $cc_basename in
7867
          CC*)
7868
	    # Sun C++ 4.2, 5.x and Centerline C++
7869
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7870
	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7871
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7872
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7873
	      $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'
7874
7875
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7876
	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7877
	    case $host_os in
7878
	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7879
	      *)
7880
		# The compiler driver will combine and reorder linker options,
7881
		# but understands `-z linker_flag'.
7882
	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7883
		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7884
	        ;;
7885
	    esac
7886
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7887
7888
	    output_verbose_link_cmd='echo'
7889
7890
	    # Archives containing C++ object files must be created using
7891
	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7892
	    # necessary to make sure instantiated templates are included
7893
	    # in the archive.
7894
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7895
	    ;;
7896
          gcx*)
7897
	    # Green Hills C++ Compiler
7898
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7899
7900
	    # The C++ compiler must be used to create the archive.
7901
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7902
	    ;;
7903
          *)
7904
	    # GNU C++ compiler with Solaris linker
7905
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7906
	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7907
	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7908
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7909
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7910
		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7911
7912
	        # Commands to make compiler produce verbose output that lists
7913
	        # what "hidden" libraries, object files and flags are used when
7914
	        # linking a shared library.
7915
	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7916
	      else
7917
	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7918
	        # platform.
7919
	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7920
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7921
		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7922
7923
	        # Commands to make compiler produce verbose output that lists
7924
	        # what "hidden" libraries, object files and flags are used when
7925
	        # linking a shared library.
7926
	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7927
	      fi
7928
7929
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7930
	      case $host_os in
7931
		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7932
		*)
7933
		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7934
		  ;;
7935
	      esac
7936
	    fi
7937
	    ;;
7938
        esac
7939
        ;;
7940
7941
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7942
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7943
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7944
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7945
      runpath_var='LD_RUN_PATH'
7946
7947
      case $cc_basename in
7948
        CC*)
7949
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7950
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7951
	  ;;
7952
	*)
7953
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7954
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7955
	  ;;
7956
      esac
7957
      ;;
7958
7959
      sysv5* | sco3.2v5* | sco5v6*)
7960
	# Note: We can NOT use -z defs as we might desire, because we do not
7961
	# link with -lc, and that would cause any symbols used from libc to
7962
	# always be unresolved, which means just about no library would
7963
	# ever link correctly.  If we're not using GNU ld we use -z text
7964
	# though, which does catch some bad symbols but isn't as heavy-handed
7965
	# as -z defs.
7966
	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7967
	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7968
	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7969
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7970
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7971
	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7972
	_LT_TAGVAR(link_all_deplibs, $1)=yes
7973
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7974
	runpath_var='LD_RUN_PATH'
7975
7976
	case $cc_basename in
7977
          CC*)
7978
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7979
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7980
	    ;;
7981
	  *)
7982
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7983
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7984
	    ;;
7985
	esac
7986
      ;;
7987
7988
      tandem*)
7989
        case $cc_basename in
7990
          NCC*)
7991
	    # NonStop-UX NCC 3.20
7992
	    # FIXME: insert proper C++ library support
7993
	    _LT_TAGVAR(ld_shlibs, $1)=no
7994
	    ;;
7995
          *)
7996
	    # FIXME: insert proper C++ library support
7997
	    _LT_TAGVAR(ld_shlibs, $1)=no
7998
	    ;;
7999
        esac
8000
        ;;
8001
8002
      vxworks*)
8003
        # FIXME: insert proper C++ library support
8004
        _LT_TAGVAR(ld_shlibs, $1)=no
8005
        ;;
8006
8007
      *)
8008
        # FIXME: insert proper C++ library support
8009
        _LT_TAGVAR(ld_shlibs, $1)=no
8010
        ;;
8011
    esac
8012
8013
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8014
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8015
8016
    _LT_TAGVAR(GCC, $1)="$GXX"
8017
    _LT_TAGVAR(LD, $1)="$LD"
8018
8019
    ## CAVEAT EMPTOR:
8020
    ## There is no encapsulation within the following macros, do not change
8021
    ## the running order or otherwise move them around unless you know exactly
8022
    ## what you are doing...
8023
    _LT_SYS_HIDDEN_LIBDEPS($1)
8024
    _LT_COMPILER_PIC($1)
8025
    _LT_COMPILER_C_O($1)
8026
    _LT_COMPILER_FILE_LOCKS($1)
8027
    _LT_LINKER_SHLIBS($1)
8028
    _LT_SYS_DYNAMIC_LINKER($1)
8029
    _LT_LINKER_HARDCODE_LIBPATH($1)
8030
8031
    _LT_CONFIG($1)
8032
  fi # test -n "$compiler"
8033
8034
  CC=$lt_save_CC
8035
  LDCXX=$LD
8036
  LD=$lt_save_LD
8037
  GCC=$lt_save_GCC
8038
  with_gnu_ld=$lt_save_with_gnu_ld
8039
  lt_cv_path_LDCXX=$lt_cv_path_LD
8040
  lt_cv_path_LD=$lt_save_path_LD
8041
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8042
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8043
fi # test "$_lt_caught_CXX_error" != yes
8044
8045
AC_LANG_POP
8046
])# _LT_LANG_CXX_CONFIG
8047
8048
8049
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
8050
# ---------------------------------
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
8051
# Figure out "hidden" library dependencies from verbose
8052
# compiler output when linking a shared library.
8053
# Parse the compiler output and extract the necessary
8054
# objects, libraries and library flags.
8055
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8056
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8057
# Dependencies to place before and after the object being linked:
8058
_LT_TAGVAR(predep_objects, $1)=
8059
_LT_TAGVAR(postdep_objects, $1)=
8060
_LT_TAGVAR(predeps, $1)=
8061
_LT_TAGVAR(postdeps, $1)=
8062
_LT_TAGVAR(compiler_lib_search_path, $1)=
8063
8064
dnl we can't use the lt_simple_compile_test_code here,
8065
dnl because it contains code intended for an executable,
8066
dnl not a library.  It's possible we should let each
8067
dnl tag define a new lt_????_link_test_code variable,
8068
dnl but it's only used here...
8069
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8070
int a;
8071
void foo (void) { a = 0; }
8072
_LT_EOF
8073
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8074
class Foo
8075
{
8076
public:
8077
  Foo (void) { a = 0; }
8078
private:
8079
  int a;
8080
};
8081
_LT_EOF
8082
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8083
      subroutine foo
8084
      implicit none
8085
      integer*4 a
8086
      a=0
8087
      return
8088
      end
8089
_LT_EOF
8090
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8091
      subroutine foo
8092
      implicit none
8093
      integer a
8094
      a=0
8095
      return
8096
      end
8097
_LT_EOF
8098
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8099
public class foo {
8100
  private int a;
8101
  public void bar (void) {
8102
    a = 0;
8103
  }
8104
};
8105
_LT_EOF
8106
])
8107
dnl Parse the compiler output and extract the necessary
8108
dnl objects, libraries and library flags.
8109
if AC_TRY_EVAL(ac_compile); then
8110
  # Parse the compiler output and extract the necessary
8111
  # objects, libraries and library flags.
8112
8113
  # Sentinel used to keep track of whether or not we are before
8114
  # the conftest object file.
8115
  pre_test_object_deps_done=no
8116
8117
  for p in `eval "$output_verbose_link_cmd"`; do
8118
    case $p in
8119
8120
    -L* | -R* | -l*)
8121
       # Some compilers place space between "-{L,R}" and the path.
8122
       # Remove the space.
8123
       if test $p = "-L" ||
8124
          test $p = "-R"; then
8125
	 prev=$p
8126
	 continue
8127
       else
8128
	 prev=
8129
       fi
8130
8131
       if test "$pre_test_object_deps_done" = no; then
8132
	 case $p in
8133
	 -L* | -R*)
8134
	   # Internal compiler library paths should come after those
8135
	   # provided the user.  The postdeps already come after the
8136
	   # user supplied libs so there is no need to process them.
8137
	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8138
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8139
	   else
8140
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8141
	   fi
8142
	   ;;
8143
	 # The "-l" case would never come before the object being
8144
	 # linked, so don't bother handling this case.
8145
	 esac
8146
       else
8147
	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8148
	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8149
	 else
8150
	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8151
	 fi
8152
       fi
8153
       ;;
8154
8155
    *.$objext)
8156
       # This assumes that the test object file only shows up
8157
       # once in the compiler output.
8158
       if test "$p" = "conftest.$objext"; then
8159
	 pre_test_object_deps_done=yes
8160
	 continue
8161
       fi
8162
8163
       if test "$pre_test_object_deps_done" = no; then
8164
	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8165
	   _LT_TAGVAR(predep_objects, $1)="$p"
8166
	 else
8167
	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8168
	 fi
8169
       else
8170
	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8171
	   _LT_TAGVAR(postdep_objects, $1)="$p"
8172
	 else
8173
	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8174
	 fi
8175
       fi
8176
       ;;
8177
8178
    *) ;; # Ignore the rest.
8179
8180
    esac
8181
  done
8182
8183
  # Clean up.
8184
  rm -f a.out a.exe
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
8185
else
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
8186
  echo "libtool.m4: error: problem compiling $1 test program"
8187
fi
8188
8189
$RM -f confest.$objext
8190
8191
# PORTME: override above test on systems where it is broken
8192
m4_if([$1], [CXX],
8193
[case $host_os in
8194
interix[[3-9]]*)
8195
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8196
  # hack all around it, let's just trust "g++" to DTRT.
8197
  _LT_TAGVAR(predep_objects,$1)=
8198
  _LT_TAGVAR(postdep_objects,$1)=
8199
  _LT_TAGVAR(postdeps,$1)=
8200
  ;;
8201
8202
linux*)
8203
  case `$CC -V 2>&1 | sed 5q` in
8204
  *Sun\ C*)
8205
    # Sun C++ 5.9
8206
8207
    # The more standards-conforming stlport4 library is
8208
    # incompatible with the Cstd library. Avoid specifying
8209
    # it if it's in CXXFLAGS. Ignore libCrun as
8210
    # -library=stlport4 depends on it.
8211
    case " $CXX $CXXFLAGS " in
8212
    *" -library=stlport4 "*)
8213
      solaris_use_stlport4=yes
8214
      ;;
8215
    esac
8216
8217
    if test "$solaris_use_stlport4" != yes; then
8218
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8219
    fi
8220
    ;;
8221
  esac
8222
  ;;
8223
8224
solaris*)
8225
  case $cc_basename in
8226
  CC*)
8227
    # The more standards-conforming stlport4 library is
8228
    # incompatible with the Cstd library. Avoid specifying
8229
    # it if it's in CXXFLAGS. Ignore libCrun as
8230
    # -library=stlport4 depends on it.
8231
    case " $CXX $CXXFLAGS " in
8232
    *" -library=stlport4 "*)
8233
      solaris_use_stlport4=yes
8234
      ;;
8235
    esac
8236
8237
    # Adding this requires a known-good setup of shared libraries for
8238
    # Sun compiler versions before 5.6, else PIC objects from an old
8239
    # archive will be linked into the output, leading to subtle bugs.
8240
    if test "$solaris_use_stlport4" != yes; then
8241
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8242
    fi
8243
    ;;
8244
  esac
8245
  ;;
8246
esac
8247
])
8248
8249
case " $_LT_TAGVAR(postdeps, $1) " in
8250
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8251
esac
8252
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8253
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8254
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8255
fi
8256
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8257
    [The directories searched by this compiler when creating a shared library])
8258
_LT_TAGDECL([], [predep_objects], [1],
8259
    [Dependencies to place before and after the objects being linked to
8260
    create a shared library])
8261
_LT_TAGDECL([], [postdep_objects], [1])
8262
_LT_TAGDECL([], [predeps], [1])
8263
_LT_TAGDECL([], [postdeps], [1])
8264
_LT_TAGDECL([], [compiler_lib_search_path], [1],
8265
    [The library search path used internally by the compiler when linking
8266
    a shared library])
8267
])# _LT_SYS_HIDDEN_LIBDEPS
8268
8269
8270
# _LT_PROG_F77
8271
# ------------
8272
# Since AC_PROG_F77 is broken, in that it returns the empty string
8273
# if there is no fortran compiler, we have our own version here.
8274
m4_defun([_LT_PROG_F77],
8275
[
8276
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8277
AC_PROG_F77
8278
if test -z "$F77" || test "X$F77" = "Xno"; then
8279
  _lt_disable_F77=yes
8280
fi
8281
popdef([AC_MSG_ERROR])
8282
])# _LT_PROG_F77
8283
8284
dnl aclocal-1.4 backwards compatibility:
8285
dnl AC_DEFUN([_LT_PROG_F77], [])
8286
8287
8288
# _LT_LANG_F77_CONFIG([TAG])
8289
# --------------------------
8290
# Ensure that the configuration variables for a Fortran 77 compiler are
8291
# suitably defined.  These variables are subsequently used by _LT_CONFIG
8292
# to write the compiler configuration to `libtool'.
8293
m4_defun([_LT_LANG_F77_CONFIG],
8294
[AC_REQUIRE([_LT_PROG_F77])dnl
8295
AC_LANG_PUSH(Fortran 77)
8296
8297
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8298
_LT_TAGVAR(allow_undefined_flag, $1)=
8299
_LT_TAGVAR(always_export_symbols, $1)=no
8300
_LT_TAGVAR(archive_expsym_cmds, $1)=
8301
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8302
_LT_TAGVAR(hardcode_direct, $1)=no
8303
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8304
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8305
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8306
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8307
_LT_TAGVAR(hardcode_minus_L, $1)=no
8308
_LT_TAGVAR(hardcode_automatic, $1)=no
8309
_LT_TAGVAR(inherit_rpath, $1)=no
8310
_LT_TAGVAR(module_cmds, $1)=
8311
_LT_TAGVAR(module_expsym_cmds, $1)=
8312
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8313
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8314
_LT_TAGVAR(no_undefined_flag, $1)=
8315
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8316
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8317
8318
# Source file extension for f77 test sources.
8319
ac_ext=f
8320
8321
# Object file extension for compiled f77 test sources.
8322
objext=o
8323
_LT_TAGVAR(objext, $1)=$objext
8324
8325
# No sense in running all these tests if we already determined that
8326
# the F77 compiler isn't working.  Some variables (like enable_shared)
8327
# are currently assumed to apply to all compilers on this platform,
8328
# and will be corrupted by setting them based on a non-working compiler.
8329
if test "$_lt_disable_F77" != yes; then
8330
  # Code to be used in simple compile tests
8331
  lt_simple_compile_test_code="\
8332
      subroutine t
8333
      return
8334
      end
8335
"
8336
8337
  # Code to be used in simple link tests
8338
  lt_simple_link_test_code="\
8339
      program t
8340
      end
8341
"
8342
8343
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8344
  _LT_TAG_COMPILER
8345
8346
  # save warnings/boilerplate of simple test code
8347
  _LT_COMPILER_BOILERPLATE
8348
  _LT_LINKER_BOILERPLATE
8349
8350
  # Allow CC to be a program name with arguments.
8351
  lt_save_CC="$CC"
8352
  lt_save_GCC=$GCC
8353
  CC=${F77-"f77"}
8354
  compiler=$CC
8355
  _LT_TAGVAR(compiler, $1)=$CC
8356
  _LT_CC_BASENAME([$compiler])
8357
  GCC=$G77
8358
  if test -n "$compiler"; then
8359
    AC_MSG_CHECKING([if libtool supports shared libraries])
8360
    AC_MSG_RESULT([$can_build_shared])
8361
8362
    AC_MSG_CHECKING([whether to build shared libraries])
8363
    test "$can_build_shared" = "no" && enable_shared=no
8364
8365
    # On AIX, shared libraries and static libraries use the same namespace, and
8366
    # are all built from PIC.
8367
    case $host_os in
8368
      aix3*)
8369
        test "$enable_shared" = yes && enable_static=no
8370
        if test -n "$RANLIB"; then
8371
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8372
          postinstall_cmds='$RANLIB $lib'
8373
        fi
8374
        ;;
8375
      aix[[4-9]]*)
8376
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8377
	  test "$enable_shared" = yes && enable_static=no
8378
	fi
8379
        ;;
8380
    esac
8381
    AC_MSG_RESULT([$enable_shared])
8382
8383
    AC_MSG_CHECKING([whether to build static libraries])
8384
    # Make sure either enable_shared or enable_static is yes.
8385
    test "$enable_shared" = yes || enable_static=yes
8386
    AC_MSG_RESULT([$enable_static])
8387
8388
    _LT_TAGVAR(GCC, $1)="$G77"
8389
    _LT_TAGVAR(LD, $1)="$LD"
8390
8391
    ## CAVEAT EMPTOR:
8392
    ## There is no encapsulation within the following macros, do not change
8393
    ## the running order or otherwise move them around unless you know exactly
8394
    ## what you are doing...
8395
    _LT_COMPILER_PIC($1)
8396
    _LT_COMPILER_C_O($1)
8397
    _LT_COMPILER_FILE_LOCKS($1)
8398
    _LT_LINKER_SHLIBS($1)
8399
    _LT_SYS_DYNAMIC_LINKER($1)
8400
    _LT_LINKER_HARDCODE_LIBPATH($1)
8401
8402
    _LT_CONFIG($1)
8403
  fi # test -n "$compiler"
8404
8405
  GCC=$lt_save_GCC
8406
  CC="$lt_save_CC"
8407
fi # test "$_lt_disable_F77" != yes
8408
8409
AC_LANG_POP
8410
])# _LT_LANG_F77_CONFIG
8411
8412
8413
# _LT_PROG_FC
8414
# -----------
8415
# Since AC_PROG_FC is broken, in that it returns the empty string
8416
# if there is no fortran compiler, we have our own version here.
8417
m4_defun([_LT_PROG_FC],
8418
[
8419
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8420
AC_PROG_FC
8421
if test -z "$FC" || test "X$FC" = "Xno"; then
8422
  _lt_disable_FC=yes
8423
fi
8424
popdef([AC_MSG_ERROR])
8425
])# _LT_PROG_FC
8426
8427
dnl aclocal-1.4 backwards compatibility:
8428
dnl AC_DEFUN([_LT_PROG_FC], [])
8429
8430
8431
# _LT_LANG_FC_CONFIG([TAG])
8432
# -------------------------
8433
# Ensure that the configuration variables for a Fortran compiler are
8434
# suitably defined.  These variables are subsequently used by _LT_CONFIG
8435
# to write the compiler configuration to `libtool'.
8436
m4_defun([_LT_LANG_FC_CONFIG],
8437
[AC_REQUIRE([_LT_PROG_FC])dnl
8438
AC_LANG_PUSH(Fortran)
8439
8440
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8441
_LT_TAGVAR(allow_undefined_flag, $1)=
8442
_LT_TAGVAR(always_export_symbols, $1)=no
8443
_LT_TAGVAR(archive_expsym_cmds, $1)=
8444
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8445
_LT_TAGVAR(hardcode_direct, $1)=no
8446
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8447
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8448
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8449
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8450
_LT_TAGVAR(hardcode_minus_L, $1)=no
8451
_LT_TAGVAR(hardcode_automatic, $1)=no
8452
_LT_TAGVAR(inherit_rpath, $1)=no
8453
_LT_TAGVAR(module_cmds, $1)=
8454
_LT_TAGVAR(module_expsym_cmds, $1)=
8455
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8456
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8457
_LT_TAGVAR(no_undefined_flag, $1)=
8458
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8459
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8460
8461
# Source file extension for fc test sources.
8462
ac_ext=${ac_fc_srcext-f}
8463
8464
# Object file extension for compiled fc test sources.
8465
objext=o
8466
_LT_TAGVAR(objext, $1)=$objext
8467
8468
# No sense in running all these tests if we already determined that
8469
# the FC compiler isn't working.  Some variables (like enable_shared)
8470
# are currently assumed to apply to all compilers on this platform,
8471
# and will be corrupted by setting them based on a non-working compiler.
8472
if test "$_lt_disable_FC" != yes; then
8473
  # Code to be used in simple compile tests
8474
  lt_simple_compile_test_code="\
8475
      subroutine t
8476
      return
8477
      end
8478
"
8479
8480
  # Code to be used in simple link tests
8481
  lt_simple_link_test_code="\
8482
      program t
8483
      end
8484
"
8485
8486
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8487
  _LT_TAG_COMPILER
8488
8489
  # save warnings/boilerplate of simple test code
8490
  _LT_COMPILER_BOILERPLATE
8491
  _LT_LINKER_BOILERPLATE
8492
8493
  # Allow CC to be a program name with arguments.
8494
  lt_save_CC="$CC"
8495
  lt_save_GCC=$GCC
8496
  CC=${FC-"f95"}
8497
  compiler=$CC
8498
  GCC=$ac_cv_fc_compiler_gnu
8499
8500
  _LT_TAGVAR(compiler, $1)=$CC
8501
  _LT_CC_BASENAME([$compiler])
8502
8503
  if test -n "$compiler"; then
8504
    AC_MSG_CHECKING([if libtool supports shared libraries])
8505
    AC_MSG_RESULT([$can_build_shared])
8506
8507
    AC_MSG_CHECKING([whether to build shared libraries])
8508
    test "$can_build_shared" = "no" && enable_shared=no
8509
8510
    # On AIX, shared libraries and static libraries use the same namespace, and
8511
    # are all built from PIC.
8512
    case $host_os in
8513
      aix3*)
8514
        test "$enable_shared" = yes && enable_static=no
8515
        if test -n "$RANLIB"; then
8516
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8517
          postinstall_cmds='$RANLIB $lib'
8518
        fi
8519
        ;;
8520
      aix[[4-9]]*)
8521
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8522
	  test "$enable_shared" = yes && enable_static=no
8523
	fi
8524
        ;;
8525
    esac
8526
    AC_MSG_RESULT([$enable_shared])
8527
8528
    AC_MSG_CHECKING([whether to build static libraries])
8529
    # Make sure either enable_shared or enable_static is yes.
8530
    test "$enable_shared" = yes || enable_static=yes
8531
    AC_MSG_RESULT([$enable_static])
8532
8533
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8534
    _LT_TAGVAR(LD, $1)="$LD"
8535
8536
    ## CAVEAT EMPTOR:
8537
    ## There is no encapsulation within the following macros, do not change
8538
    ## the running order or otherwise move them around unless you know exactly
8539
    ## what you are doing...
8540
    _LT_SYS_HIDDEN_LIBDEPS($1)
8541
    _LT_COMPILER_PIC($1)
8542
    _LT_COMPILER_C_O($1)
8543
    _LT_COMPILER_FILE_LOCKS($1)
8544
    _LT_LINKER_SHLIBS($1)
8545
    _LT_SYS_DYNAMIC_LINKER($1)
8546
    _LT_LINKER_HARDCODE_LIBPATH($1)
8547
8548
    _LT_CONFIG($1)
8549
  fi # test -n "$compiler"
8550
8551
  GCC=$lt_save_GCC
8552
  CC="$lt_save_CC"
8553
fi # test "$_lt_disable_FC" != yes
8554
8555
AC_LANG_POP
8556
])# _LT_LANG_FC_CONFIG
8557
8558
8559
# _LT_LANG_GCJ_CONFIG([TAG])
8560
# --------------------------
8561
# Ensure that the configuration variables for the GNU Java Compiler compiler
8562
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8563
# to write the compiler configuration to `libtool'.
8564
m4_defun([_LT_LANG_GCJ_CONFIG],
8565
[AC_REQUIRE([LT_PROG_GCJ])dnl
8566
AC_LANG_SAVE
8567
8568
# Source file extension for Java test sources.
8569
ac_ext=java
8570
8571
# Object file extension for compiled Java test sources.
8572
objext=o
8573
_LT_TAGVAR(objext, $1)=$objext
8574
8575
# Code to be used in simple compile tests
8576
lt_simple_compile_test_code="class foo {}"
8577
8578
# Code to be used in simple link tests
8579
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8580
8581
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8582
_LT_TAG_COMPILER
8583
8584
# save warnings/boilerplate of simple test code
8585
_LT_COMPILER_BOILERPLATE
8586
_LT_LINKER_BOILERPLATE
8587
8588
# Allow CC to be a program name with arguments.
8589
lt_save_CC="$CC"
8590
lt_save_GCC=$GCC
8591
GCC=yes
8592
CC=${GCJ-"gcj"}
8593
compiler=$CC
8594
_LT_TAGVAR(compiler, $1)=$CC
8595
_LT_TAGVAR(LD, $1)="$LD"
8596
_LT_CC_BASENAME([$compiler])
8597
8598
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8599
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8600
8601
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8602
8603
if test -n "$compiler"; then
8604
  _LT_COMPILER_NO_RTTI($1)
8605
  _LT_COMPILER_PIC($1)
8606
  _LT_COMPILER_C_O($1)
8607
  _LT_COMPILER_FILE_LOCKS($1)
8608
  _LT_LINKER_SHLIBS($1)
8609
  _LT_LINKER_HARDCODE_LIBPATH($1)
8610
8611
  _LT_CONFIG($1)
8612
fi
8613
8614
AC_LANG_RESTORE
8615
8616
GCC=$lt_save_GCC
8617
CC="$lt_save_CC"
8618
])# _LT_LANG_GCJ_CONFIG
8619
8620
8621
# _LT_LANG_RC_CONFIG([TAG])
8622
# -------------------------
8623
# Ensure that the configuration variables for the Windows resource compiler
8624
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8625
# to write the compiler configuration to `libtool'.
8626
m4_defun([_LT_LANG_RC_CONFIG],
8627
[AC_REQUIRE([LT_PROG_RC])dnl
8628
AC_LANG_SAVE
8629
8630
# Source file extension for RC test sources.
8631
ac_ext=rc
8632
8633
# Object file extension for compiled RC test sources.
8634
objext=o
8635
_LT_TAGVAR(objext, $1)=$objext
8636
8637
# Code to be used in simple compile tests
8638
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8639
8640
# Code to be used in simple link tests
8641
lt_simple_link_test_code="$lt_simple_compile_test_code"
8642
8643
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8644
_LT_TAG_COMPILER
8645
8646
# save warnings/boilerplate of simple test code
8647
_LT_COMPILER_BOILERPLATE
8648
_LT_LINKER_BOILERPLATE
8649
8650
# Allow CC to be a program name with arguments.
8651
lt_save_CC="$CC"
8652
lt_save_GCC=$GCC
8653
GCC=
8654
CC=${RC-"windres"}
8655
compiler=$CC
8656
_LT_TAGVAR(compiler, $1)=$CC
8657
_LT_CC_BASENAME([$compiler])
8658
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8659
8660
if test -n "$compiler"; then
8661
  :
8662
  _LT_CONFIG($1)
8663
fi
8664
8665
GCC=$lt_save_GCC
8666
AC_LANG_RESTORE
8667
CC="$lt_save_CC"
8668
])# _LT_LANG_RC_CONFIG
8669
8670
8671
# LT_PROG_GCJ
8672
# -----------
8673
AC_DEFUN([LT_PROG_GCJ],
8674
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8675
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8676
    [AC_CHECK_TOOL(GCJ, gcj,)
8677
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8678
      AC_SUBST(GCJFLAGS)])])[]dnl
8679
])
8680
8681
# Old name:
8682
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8683
dnl aclocal-1.4 backwards compatibility:
8684
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8685
8686
8687
# LT_PROG_RC
8688
# ----------
8689
AC_DEFUN([LT_PROG_RC],
8690
[AC_CHECK_TOOL(RC, windres,)
8691
])
8692
8693
# Old name:
8694
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8695
dnl aclocal-1.4 backwards compatibility:
8696
dnl AC_DEFUN([LT_AC_PROG_RC], [])
8697
8698
8699
# _LT_DECL_EGREP
8700
# --------------
8701
# If we don't have a new enough Autoconf to choose the best grep
8702
# available, choose the one first in the user's PATH.
8703
m4_defun([_LT_DECL_EGREP],
8704
[AC_REQUIRE([AC_PROG_EGREP])dnl
8705
AC_REQUIRE([AC_PROG_FGREP])dnl
8706
test -z "$GREP" && GREP=grep
8707
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8708
_LT_DECL([], [EGREP], [1], [An ERE matcher])
8709
_LT_DECL([], [FGREP], [1], [A literal string matcher])
8710
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8711
AC_SUBST([GREP])
8712
])
8713
8714
1.2.55 by Robert Ancell
Import upstream version 2.27.1
8715
# _LT_DECL_OBJDUMP
8716
# --------------
8717
# If we don't have a new enough Autoconf to choose the best objdump
8718
# available, choose the one first in the user's PATH.
8719
m4_defun([_LT_DECL_OBJDUMP],
8720
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8721
test -z "$OBJDUMP" && OBJDUMP=objdump
8722
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8723
AC_SUBST([OBJDUMP])
8724
])
8725
8726
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
8727
# _LT_DECL_SED
8728
# ------------
8729
# Check for a fully-functional sed program, that truncates
8730
# as few characters as possible.  Prefer GNU sed if found.
8731
m4_defun([_LT_DECL_SED],
8732
[AC_PROG_SED
8733
test -z "$SED" && SED=sed
8734
Xsed="$SED -e 1s/^X//"
8735
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8736
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8737
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8738
])# _LT_DECL_SED
8739
8740
m4_ifndef([AC_PROG_SED], [
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
8741
# NOTE: This macro has been submitted for inclusion into   #
8742
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8743
#  a released version of Autoconf we should remove this    #
8744
#  macro and use it instead.                               #
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
8745
8746
m4_defun([AC_PROG_SED],
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
8747
[AC_MSG_CHECKING([for a sed that does not truncate output])
8748
AC_CACHE_VAL(lt_cv_path_SED,
8749
[# Loop through the user's path and test for sed and gsed.
8750
# Then use that list of sed's as ones to test for truncation.
8751
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8752
for as_dir in $PATH
8753
do
8754
  IFS=$as_save_IFS
8755
  test -z "$as_dir" && as_dir=.
8756
  for lt_ac_prog in sed gsed; do
8757
    for ac_exec_ext in '' $ac_executable_extensions; do
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
8758
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
8759
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8760
      fi
8761
    done
8762
  done
8763
done
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
8764
IFS=$as_save_IFS
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
8765
lt_ac_max=0
8766
lt_ac_count=0
8767
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8768
# along with /bin/sed that truncates output.
8769
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
1.2.1 by Daniel Holbach
Import upstream version 2.12.1
8770
  test ! -f $lt_ac_sed && continue
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
8771
  cat /dev/null > conftest.in
8772
  lt_ac_count=0
8773
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8774
  # Check for GNU sed and select it if it is found.
8775
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8776
    lt_cv_path_SED=$lt_ac_sed
8777
    break
8778
  fi
8779
  while true; do
8780
    cat conftest.in conftest.in >conftest.tmp
8781
    mv conftest.tmp conftest.in
8782
    cp conftest.in conftest.nl
8783
    echo >>conftest.nl
8784
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8785
    cmp -s conftest.out conftest.nl || break
8786
    # 10000 chars as input seems more than enough
8787
    test $lt_ac_count -gt 10 && break
8788
    lt_ac_count=`expr $lt_ac_count + 1`
8789
    if test $lt_ac_count -gt $lt_ac_max; then
8790
      lt_ac_max=$lt_ac_count
8791
      lt_cv_path_SED=$lt_ac_sed
8792
    fi
8793
  done
8794
done
8795
])
8796
SED=$lt_cv_path_SED
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
8797
AC_SUBST([SED])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
8798
AC_MSG_RESULT([$SED])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
8799
])#AC_PROG_SED
8800
])#m4_ifndef
8801
8802
# Old name:
8803
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8804
dnl aclocal-1.4 backwards compatibility:
8805
dnl AC_DEFUN([LT_AC_PROG_SED], [])
8806
8807
8808
# _LT_CHECK_SHELL_FEATURES
8809
# ------------------------
8810
# Find out whether the shell is Bourne or XSI compatible,
8811
# or has some other useful features.
8812
m4_defun([_LT_CHECK_SHELL_FEATURES],
8813
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8814
# Try some XSI features
8815
xsi_shell=no
8816
( _lt_dummy="a/b/c"
8817
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8818
      = c,a/b,, \
8819
    && eval 'test $(( 1 + 1 )) -eq 2 \
8820
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8821
  && xsi_shell=yes
8822
AC_MSG_RESULT([$xsi_shell])
8823
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8824
8825
AC_MSG_CHECKING([whether the shell understands "+="])
8826
lt_shell_append=no
8827
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8828
    >/dev/null 2>&1 \
8829
  && lt_shell_append=yes
8830
AC_MSG_RESULT([$lt_shell_append])
8831
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8832
8833
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8834
  lt_unset=unset
8835
else
8836
  lt_unset=false
8837
fi
8838
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8839
8840
# test EBCDIC or ASCII
8841
case `echo X|tr X '\101'` in
8842
 A) # ASCII based system
8843
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8844
  lt_SP2NL='tr \040 \012'
8845
  lt_NL2SP='tr \015\012 \040\040'
8846
  ;;
8847
 *) # EBCDIC based system
8848
  lt_SP2NL='tr \100 \n'
8849
  lt_NL2SP='tr \r\n \100\100'
8850
  ;;
8851
esac
8852
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8853
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8854
])# _LT_CHECK_SHELL_FEATURES
8855
8856
8857
# _LT_PROG_XSI_SHELLFNS
8858
# ---------------------
8859
# Bourne and XSI compatible variants of some useful shell functions.
8860
m4_defun([_LT_PROG_XSI_SHELLFNS],
8861
[case $xsi_shell in
8862
  yes)
8863
    cat << \_LT_EOF >> "$cfgfile"
8864
8865
# func_dirname file append nondir_replacement
8866
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8867
# otherwise set result to NONDIR_REPLACEMENT.
8868
func_dirname ()
8869
{
8870
  case ${1} in
8871
    */*) func_dirname_result="${1%/*}${2}" ;;
8872
    *  ) func_dirname_result="${3}" ;;
8873
  esac
8874
}
8875
8876
# func_basename file
8877
func_basename ()
8878
{
8879
  func_basename_result="${1##*/}"
8880
}
8881
8882
# func_dirname_and_basename file append nondir_replacement
8883
# perform func_basename and func_dirname in a single function
8884
# call:
8885
#   dirname:  Compute the dirname of FILE.  If nonempty,
8886
#             add APPEND to the result, otherwise set result
8887
#             to NONDIR_REPLACEMENT.
8888
#             value returned in "$func_dirname_result"
8889
#   basename: Compute filename of FILE.
8890
#             value retuned in "$func_basename_result"
8891
# Implementation must be kept synchronized with func_dirname
8892
# and func_basename. For efficiency, we do not delegate to
8893
# those functions but instead duplicate the functionality here.
8894
func_dirname_and_basename ()
8895
{
8896
  case ${1} in
8897
    */*) func_dirname_result="${1%/*}${2}" ;;
8898
    *  ) func_dirname_result="${3}" ;;
8899
  esac
8900
  func_basename_result="${1##*/}"
8901
}
8902
8903
# func_stripname prefix suffix name
8904
# strip PREFIX and SUFFIX off of NAME.
8905
# PREFIX and SUFFIX must not contain globbing or regex special
8906
# characters, hashes, percent signs, but SUFFIX may contain a leading
8907
# dot (in which case that matches only a dot).
8908
func_stripname ()
8909
{
8910
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8911
  # positional parameters, so assign one to ordinary parameter first.
8912
  func_stripname_result=${3}
8913
  func_stripname_result=${func_stripname_result#"${1}"}
8914
  func_stripname_result=${func_stripname_result%"${2}"}
8915
}
8916
8917
# func_opt_split
8918
func_opt_split ()
8919
{
8920
  func_opt_split_opt=${1%%=*}
8921
  func_opt_split_arg=${1#*=}
8922
}
8923
8924
# func_lo2o object
8925
func_lo2o ()
8926
{
8927
  case ${1} in
8928
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8929
    *)    func_lo2o_result=${1} ;;
8930
  esac
8931
}
8932
8933
# func_xform libobj-or-source
8934
func_xform ()
8935
{
8936
  func_xform_result=${1%.*}.lo
8937
}
8938
8939
# func_arith arithmetic-term...
8940
func_arith ()
8941
{
8942
  func_arith_result=$(( $[*] ))
8943
}
8944
8945
# func_len string
8946
# STRING may not start with a hyphen.
8947
func_len ()
8948
{
8949
  func_len_result=${#1}
8950
}
8951
8952
_LT_EOF
8953
    ;;
8954
  *) # Bourne compatible functions.
8955
    cat << \_LT_EOF >> "$cfgfile"
8956
8957
# func_dirname file append nondir_replacement
8958
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8959
# otherwise set result to NONDIR_REPLACEMENT.
8960
func_dirname ()
8961
{
8962
  # Extract subdirectory from the argument.
8963
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8964
  if test "X$func_dirname_result" = "X${1}"; then
8965
    func_dirname_result="${3}"
8966
  else
8967
    func_dirname_result="$func_dirname_result${2}"
8968
  fi
8969
}
8970
8971
# func_basename file
8972
func_basename ()
8973
{
8974
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8975
}
8976
8977
dnl func_dirname_and_basename
8978
dnl A portable version of this function is already defined in general.m4sh
8979
dnl so there is no need for it here.
8980
8981
# func_stripname prefix suffix name
8982
# strip PREFIX and SUFFIX off of NAME.
8983
# PREFIX and SUFFIX must not contain globbing or regex special
8984
# characters, hashes, percent signs, but SUFFIX may contain a leading
8985
# dot (in which case that matches only a dot).
8986
# func_strip_suffix prefix name
8987
func_stripname ()
8988
{
8989
  case ${2} in
8990
    .*) func_stripname_result=`$ECHO "X${3}" \
8991
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8992
    *)  func_stripname_result=`$ECHO "X${3}" \
8993
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8994
  esac
8995
}
8996
8997
# sed scripts:
8998
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8999
my_sed_long_arg='1s/^-[[^=]]*=//'
9000
9001
# func_opt_split
9002
func_opt_split ()
9003
{
9004
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
9005
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
9006
}
9007
9008
# func_lo2o object
9009
func_lo2o ()
9010
{
9011
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
9012
}
9013
9014
# func_xform libobj-or-source
9015
func_xform ()
9016
{
9017
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
9018
}
9019
9020
# func_arith arithmetic-term...
9021
func_arith ()
9022
{
9023
  func_arith_result=`expr "$[@]"`
9024
}
9025
9026
# func_len string
9027
# STRING may not start with a hyphen.
9028
func_len ()
9029
{
9030
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9031
}
9032
9033
_LT_EOF
9034
esac
9035
9036
case $lt_shell_append in
9037
  yes)
9038
    cat << \_LT_EOF >> "$cfgfile"
9039
9040
# func_append var value
9041
# Append VALUE to the end of shell variable VAR.
9042
func_append ()
9043
{
9044
  eval "$[1]+=\$[2]"
9045
}
9046
_LT_EOF
9047
    ;;
9048
  *)
9049
    cat << \_LT_EOF >> "$cfgfile"
9050
9051
# func_append var value
9052
# Append VALUE to the end of shell variable VAR.
9053
func_append ()
9054
{
9055
  eval "$[1]=\$$[1]\$[2]"
9056
}
9057
9058
_LT_EOF
9059
    ;;
9060
  esac
9061
])
9062
9063
# Helper functions for option handling.                    -*- Autoconf -*-
9064
#
9065
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9066
#   Written by Gary V. Vaughan, 2004
9067
#
9068
# This file is free software; the Free Software Foundation gives
9069
# unlimited permission to copy and/or distribute it, with or without
9070
# modifications, as long as this notice is preserved.
9071
9072
# serial 6 ltoptions.m4
9073
9074
# This is to help aclocal find these macros, as it can't see m4_define.
9075
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9076
9077
9078
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9079
# ------------------------------------------
9080
m4_define([_LT_MANGLE_OPTION],
9081
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9082
9083
9084
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9085
# ---------------------------------------
9086
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9087
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9088
# saved as a flag.
9089
m4_define([_LT_SET_OPTION],
9090
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9091
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9092
        _LT_MANGLE_DEFUN([$1], [$2]),
9093
    [m4_warning([Unknown $1 option `$2'])])[]dnl
9094
])
9095
9096
9097
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9098
# ------------------------------------------------------------
9099
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9100
m4_define([_LT_IF_OPTION],
9101
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9102
9103
9104
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9105
# -------------------------------------------------------
9106
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9107
# are set.
9108
m4_define([_LT_UNLESS_OPTIONS],
9109
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9110
	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9111
		      [m4_define([$0_found])])])[]dnl
9112
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9113
])[]dnl
9114
])
9115
9116
9117
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9118
# ----------------------------------------
9119
# OPTION-LIST is a space-separated list of Libtool options associated
9120
# with MACRO-NAME.  If any OPTION has a matching handler declared with
9121
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9122
# the unknown option and exit.
9123
m4_defun([_LT_SET_OPTIONS],
9124
[# Set options
9125
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9126
    [_LT_SET_OPTION([$1], _LT_Option)])
9127
9128
m4_if([$1],[LT_INIT],[
9129
  dnl
9130
  dnl Simply set some default values (i.e off) if boolean options were not
9131
  dnl specified:
9132
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9133
  ])
9134
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9135
  ])
9136
  dnl
9137
  dnl If no reference was made to various pairs of opposing options, then
9138
  dnl we run the default mode handler for the pair.  For example, if neither
9139
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
9140
  dnl archives by default:
9141
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9142
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9143
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9144
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9145
  		   [_LT_ENABLE_FAST_INSTALL])
9146
  ])
9147
])# _LT_SET_OPTIONS
9148
9149
9150
9151
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9152
# -----------------------------------------
9153
m4_define([_LT_MANGLE_DEFUN],
9154
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9155
9156
9157
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9158
# -----------------------------------------------
9159
m4_define([LT_OPTION_DEFINE],
9160
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9161
])# LT_OPTION_DEFINE
9162
9163
9164
# dlopen
9165
# ------
9166
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9167
])
9168
9169
AU_DEFUN([AC_LIBTOOL_DLOPEN],
9170
[_LT_SET_OPTION([LT_INIT], [dlopen])
9171
AC_DIAGNOSE([obsolete],
9172
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9173
put the `dlopen' option into LT_INIT's first parameter.])
9174
])
9175
9176
dnl aclocal-1.4 backwards compatibility:
9177
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9178
9179
9180
# win32-dll
9181
# ---------
9182
# Declare package support for building win32 dll's.
9183
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9184
[enable_win32_dll=yes
9185
9186
case $host in
1.2.55 by Robert Ancell
Import upstream version 2.27.1
9187
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
9188
  AC_CHECK_TOOL(AS, as, false)
9189
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9190
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9191
  ;;
9192
esac
9193
9194
test -z "$AS" && AS=as
9195
_LT_DECL([], [AS],      [0], [Assembler program])dnl
9196
9197
test -z "$DLLTOOL" && DLLTOOL=dlltool
9198
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9199
9200
test -z "$OBJDUMP" && OBJDUMP=objdump
9201
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9202
])# win32-dll
9203
9204
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9205
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9206
_LT_SET_OPTION([LT_INIT], [win32-dll])
9207
AC_DIAGNOSE([obsolete],
9208
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9209
put the `win32-dll' option into LT_INIT's first parameter.])
9210
])
9211
9212
dnl aclocal-1.4 backwards compatibility:
9213
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9214
9215
9216
# _LT_ENABLE_SHARED([DEFAULT])
9217
# ----------------------------
9218
# implement the --enable-shared flag, and supports the `shared' and
9219
# `disable-shared' LT_INIT options.
9220
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9221
m4_define([_LT_ENABLE_SHARED],
9222
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9223
AC_ARG_ENABLE([shared],
9224
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9225
	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9226
    [p=${PACKAGE-default}
9227
    case $enableval in
9228
    yes) enable_shared=yes ;;
9229
    no) enable_shared=no ;;
9230
    *)
9231
      enable_shared=no
9232
      # Look at the argument we got.  We use all the common list separators.
9233
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9234
      for pkg in $enableval; do
9235
	IFS="$lt_save_ifs"
9236
	if test "X$pkg" = "X$p"; then
9237
	  enable_shared=yes
9238
	fi
9239
      done
9240
      IFS="$lt_save_ifs"
9241
      ;;
9242
    esac],
9243
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9244
9245
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9246
	[Whether or not to build shared libraries])
9247
])# _LT_ENABLE_SHARED
9248
9249
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9250
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9251
9252
# Old names:
9253
AC_DEFUN([AC_ENABLE_SHARED],
9254
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9255
])
9256
9257
AC_DEFUN([AC_DISABLE_SHARED],
9258
[_LT_SET_OPTION([LT_INIT], [disable-shared])
9259
])
9260
9261
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9262
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9263
9264
dnl aclocal-1.4 backwards compatibility:
9265
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9266
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9267
9268
9269
9270
# _LT_ENABLE_STATIC([DEFAULT])
9271
# ----------------------------
9272
# implement the --enable-static flag, and support the `static' and
9273
# `disable-static' LT_INIT options.
9274
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9275
m4_define([_LT_ENABLE_STATIC],
9276
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9277
AC_ARG_ENABLE([static],
9278
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9279
	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9280
    [p=${PACKAGE-default}
9281
    case $enableval in
9282
    yes) enable_static=yes ;;
9283
    no) enable_static=no ;;
9284
    *)
9285
     enable_static=no
9286
      # Look at the argument we got.  We use all the common list separators.
9287
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9288
      for pkg in $enableval; do
9289
	IFS="$lt_save_ifs"
9290
	if test "X$pkg" = "X$p"; then
9291
	  enable_static=yes
9292
	fi
9293
      done
9294
      IFS="$lt_save_ifs"
9295
      ;;
9296
    esac],
9297
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9298
9299
    _LT_DECL([build_old_libs], [enable_static], [0],
9300
	[Whether or not to build static libraries])
9301
])# _LT_ENABLE_STATIC
9302
9303
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9304
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9305
9306
# Old names:
9307
AC_DEFUN([AC_ENABLE_STATIC],
9308
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9309
])
9310
9311
AC_DEFUN([AC_DISABLE_STATIC],
9312
[_LT_SET_OPTION([LT_INIT], [disable-static])
9313
])
9314
9315
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9316
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9317
9318
dnl aclocal-1.4 backwards compatibility:
9319
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9320
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9321
9322
9323
9324
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9325
# ----------------------------------
9326
# implement the --enable-fast-install flag, and support the `fast-install'
9327
# and `disable-fast-install' LT_INIT options.
9328
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9329
m4_define([_LT_ENABLE_FAST_INSTALL],
9330
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9331
AC_ARG_ENABLE([fast-install],
9332
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9333
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9334
    [p=${PACKAGE-default}
9335
    case $enableval in
9336
    yes) enable_fast_install=yes ;;
9337
    no) enable_fast_install=no ;;
9338
    *)
9339
      enable_fast_install=no
9340
      # Look at the argument we got.  We use all the common list separators.
9341
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9342
      for pkg in $enableval; do
9343
	IFS="$lt_save_ifs"
9344
	if test "X$pkg" = "X$p"; then
9345
	  enable_fast_install=yes
9346
	fi
9347
      done
9348
      IFS="$lt_save_ifs"
9349
      ;;
9350
    esac],
9351
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9352
9353
_LT_DECL([fast_install], [enable_fast_install], [0],
9354
	 [Whether or not to optimize for fast installation])dnl
9355
])# _LT_ENABLE_FAST_INSTALL
9356
9357
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9358
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9359
9360
# Old names:
9361
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9362
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9363
AC_DIAGNOSE([obsolete],
9364
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9365
the `fast-install' option into LT_INIT's first parameter.])
9366
])
9367
9368
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9369
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9370
AC_DIAGNOSE([obsolete],
9371
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9372
the `disable-fast-install' option into LT_INIT's first parameter.])
9373
])
9374
9375
dnl aclocal-1.4 backwards compatibility:
9376
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9377
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9378
9379
9380
# _LT_WITH_PIC([MODE])
9381
# --------------------
9382
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9383
# LT_INIT options.
9384
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9385
m4_define([_LT_WITH_PIC],
9386
[AC_ARG_WITH([pic],
9387
    [AS_HELP_STRING([--with-pic],
9388
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9389
    [pic_mode="$withval"],
9390
    [pic_mode=default])
9391
9392
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9393
9394
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9395
])# _LT_WITH_PIC
9396
9397
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9398
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9399
9400
# Old name:
9401
AU_DEFUN([AC_LIBTOOL_PICMODE],
9402
[_LT_SET_OPTION([LT_INIT], [pic-only])
9403
AC_DIAGNOSE([obsolete],
9404
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9405
put the `pic-only' option into LT_INIT's first parameter.])
9406
])
9407
9408
dnl aclocal-1.4 backwards compatibility:
9409
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9410
9411
9412
m4_define([_LTDL_MODE], [])
9413
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9414
		 [m4_define([_LTDL_MODE], [nonrecursive])])
9415
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9416
		 [m4_define([_LTDL_MODE], [recursive])])
9417
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9418
		 [m4_define([_LTDL_MODE], [subproject])])
9419
9420
m4_define([_LTDL_TYPE], [])
9421
LT_OPTION_DEFINE([LTDL_INIT], [installable],
9422
		 [m4_define([_LTDL_TYPE], [installable])])
9423
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9424
		 [m4_define([_LTDL_TYPE], [convenience])])
9425
9426
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9427
#
1.2.55 by Robert Ancell
Import upstream version 2.27.1
9428
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9429
# Written by Gary V. Vaughan, 2004
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
9430
#
9431
# This file is free software; the Free Software Foundation gives
9432
# unlimited permission to copy and/or distribute it, with or without
9433
# modifications, as long as this notice is preserved.
9434
1.2.55 by Robert Ancell
Import upstream version 2.27.1
9435
# serial 6 ltsugar.m4
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
9436
9437
# This is to help aclocal find these macros, as it can't see m4_define.
9438
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9439
9440
9441
# lt_join(SEP, ARG1, [ARG2...])
9442
# -----------------------------
9443
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9444
# associated separator.
9445
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9446
# versions in m4sugar had bugs.
9447
m4_define([lt_join],
9448
[m4_if([$#], [1], [],
9449
       [$#], [2], [[$2]],
9450
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9451
m4_define([_lt_join],
9452
[m4_if([$#$2], [2], [],
9453
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9454
9455
9456
# lt_car(LIST)
9457
# lt_cdr(LIST)
9458
# ------------
9459
# Manipulate m4 lists.
9460
# These macros are necessary as long as will still need to support
9461
# Autoconf-2.59 which quotes differently.
9462
m4_define([lt_car], [[$1]])
9463
m4_define([lt_cdr],
9464
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9465
       [$#], 1, [],
9466
       [m4_dquote(m4_shift($@))])])
9467
m4_define([lt_unquote], $1)
9468
9469
9470
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9471
# ------------------------------------------
9472
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9473
# Note that neither SEPARATOR nor STRING are expanded; they are appended
9474
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9475
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9476
# than defined and empty).
9477
#
9478
# This macro is needed until we can rely on Autoconf 2.62, since earlier
9479
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9480
m4_define([lt_append],
9481
[m4_define([$1],
9482
	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9483
9484
9485
9486
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9487
# ----------------------------------------------------------
9488
# Produce a SEP delimited list of all paired combinations of elements of
9489
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9490
# has the form PREFIXmINFIXSUFFIXn.
1.2.55 by Robert Ancell
Import upstream version 2.27.1
9491
# Needed until we can rely on m4_combine added in Autoconf 2.62.
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
9492
m4_define([lt_combine],
1.2.55 by Robert Ancell
Import upstream version 2.27.1
9493
[m4_if(m4_eval([$# > 3]), [1],
9494
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9495
[[m4_foreach([_Lt_prefix], [$2],
9496
	     [m4_foreach([_Lt_suffix],
9497
		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9498
	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
9499
9500
9501
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9502
# -----------------------------------------------------------------------
9503
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9504
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9505
m4_define([lt_if_append_uniq],
9506
[m4_ifdef([$1],
9507
	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9508
		 [lt_append([$1], [$2], [$3])$4],
9509
		 [$5])],
9510
	  [lt_append([$1], [$2], [$3])$4])])
9511
9512
9513
# lt_dict_add(DICT, KEY, VALUE)
9514
# -----------------------------
9515
m4_define([lt_dict_add],
9516
[m4_define([$1($2)], [$3])])
9517
9518
9519
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9520
# --------------------------------------------
9521
m4_define([lt_dict_add_subkey],
9522
[m4_define([$1($2:$3)], [$4])])
9523
9524
9525
# lt_dict_fetch(DICT, KEY, [SUBKEY])
9526
# ----------------------------------
9527
m4_define([lt_dict_fetch],
9528
[m4_ifval([$3],
9529
	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9530
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9531
9532
9533
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9534
# -----------------------------------------------------------------
9535
m4_define([lt_if_dict_fetch],
9536
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9537
	[$5],
9538
    [$6])])
9539
9540
9541
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9542
# --------------------------------------------------------------
9543
m4_define([lt_dict_filter],
9544
[m4_if([$5], [], [],
9545
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9546
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9547
		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9548
])
9549
9550
# ltversion.m4 -- version numbers			-*- Autoconf -*-
9551
#
9552
#   Copyright (C) 2004 Free Software Foundation, Inc.
9553
#   Written by Scott James Remnant, 2004
9554
#
9555
# This file is free software; the Free Software Foundation gives
9556
# unlimited permission to copy and/or distribute it, with or without
9557
# modifications, as long as this notice is preserved.
9558
9559
# Generated from ltversion.in.
9560
1.2.55 by Robert Ancell
Import upstream version 2.27.1
9561
# serial 3012 ltversion.m4
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
9562
# This file is part of GNU Libtool
9563
1.2.55 by Robert Ancell
Import upstream version 2.27.1
9564
m4_define([LT_PACKAGE_VERSION], [2.2.6])
9565
m4_define([LT_PACKAGE_REVISION], [1.3012])
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
9566
9567
AC_DEFUN([LTVERSION_VERSION],
1.2.55 by Robert Ancell
Import upstream version 2.27.1
9568
[macro_version='2.2.6'
9569
macro_revision='1.3012'
1.2.48 by Pedro Fragoso
Import upstream version 2.25.8
9570
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9571
_LT_DECL(, macro_revision, 0)
9572
])
9573
9574
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9575
#
9576
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9577
#   Written by Scott James Remnant, 2004.
9578
#
9579
# This file is free software; the Free Software Foundation gives
9580
# unlimited permission to copy and/or distribute it, with or without
9581
# modifications, as long as this notice is preserved.
9582
9583
# serial 4 lt~obsolete.m4
9584
9585
# These exist entirely to fool aclocal when bootstrapping libtool.
9586
#
9587
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9588
# which have later been changed to m4_define as they aren't part of the
9589
# exported API, or moved to Autoconf or Automake where they belong.
9590
#
9591
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9592
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9593
# using a macro with the same name in our local m4/libtool.m4 it'll
9594
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9595
# and doesn't know about Autoconf macros at all.)
9596
#
9597
# So we provide this file, which has a silly filename so it's always
9598
# included after everything else.  This provides aclocal with the
9599
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9600
# because those macros already exist, or will be overwritten later.
9601
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9602
#
9603
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9604
# Yes, that means every name once taken will need to remain here until
9605
# we give up compatibility with versions before 1.7, at which point
9606
# we need to keep only those names which we still refer to.
9607
9608
# This is to help aclocal find these macros, as it can't see m4_define.
9609
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9610
9611
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9612
m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9613
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9614
m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9615
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9616
m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9617
m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9618
m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9619
m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9620
m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9621
m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9622
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9623
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9624
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9625
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9626
m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9627
m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9628
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9629
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9630
m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9631
m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9632
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9633
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9634
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9635
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9636
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9637
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9638
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9639
m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9640
m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9641
m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9642
m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9643
m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9644
m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9645
m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9646
m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9647
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9648
m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9649
m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9650
m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9651
m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9652
m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9653
m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
9654
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9655
m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9656
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9657
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9658
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9659
m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9660
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9661
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9662
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9663
m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9664
m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9665
m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9666
9667
# nls.m4 serial 3 (gettext-0.15)
9668
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
9669
dnl This file is free software; the Free Software Foundation
9670
dnl gives unlimited permission to copy and/or distribute it,
9671
dnl with or without modifications, as long as this notice is preserved.
9672
dnl
9673
dnl This file can can be used in projects which are not available under
9674
dnl the GNU General Public License or the GNU Library General Public
9675
dnl License but which still want to provide support for the GNU gettext
9676
dnl functionality.
9677
dnl Please note that the actual code of the GNU gettext library is covered
9678
dnl by the GNU Library General Public License, and the rest of the GNU
9679
dnl gettext package package is covered by the GNU General Public License.
9680
dnl They are *not* in the public domain.
9681
9682
dnl Authors:
9683
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9684
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9685
9686
AC_PREREQ(2.50)
9687
9688
AC_DEFUN([AM_NLS],
9689
[
9690
  AC_MSG_CHECKING([whether NLS is requested])
9691
  dnl Default is enabled NLS
9692
  AC_ARG_ENABLE(nls,
9693
    [  --disable-nls           do not use Native Language Support],
9694
    USE_NLS=$enableval, USE_NLS=yes)
9695
  AC_MSG_RESULT($USE_NLS)
9696
  AC_SUBST(USE_NLS)
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
9697
])
9698
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9699
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9700
# 
9701
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9702
#
9703
# This program is free software; you can redistribute it and/or modify
9704
# it under the terms of the GNU General Public License as published by
9705
# the Free Software Foundation; either version 2 of the License, or
9706
# (at your option) any later version.
9707
#
9708
# This program is distributed in the hope that it will be useful, but
9709
# WITHOUT ANY WARRANTY; without even the implied warranty of
9710
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9711
# General Public License for more details.
9712
#
9713
# You should have received a copy of the GNU General Public License
9714
# along with this program; if not, write to the Free Software
9715
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9716
#
9717
# As a special exception to the GNU General Public License, if you
9718
# distribute this file as part of a program that contains a
9719
# configuration script generated by Autoconf, you may include it under
9720
# the same distribution terms that you use for the rest of that program.
9721
9722
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9723
# ----------------------------------
9724
AC_DEFUN([PKG_PROG_PKG_CONFIG],
9725
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9726
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9727
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9728
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9729
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
9730
fi
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9731
if test -n "$PKG_CONFIG"; then
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9732
	_pkg_min_version=m4_default([$1], [0.9.0])
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9733
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9734
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9735
		AC_MSG_RESULT([yes])
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
9736
	else
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9737
		AC_MSG_RESULT([no])
9738
		PKG_CONFIG=""
1.1.1 by Jordi Mallach
Import upstream version 2.8.8
9739
	fi
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9740
		
9741
fi[]dnl
9742
])# PKG_PROG_PKG_CONFIG
9743
9744
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9745
#
9746
# Check to see whether a particular set of modules exists.  Similar
9747
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9748
#
9749
#
9750
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
9751
# this or PKG_CHECK_MODULES is called, or make sure to call
9752
# PKG_CHECK_EXISTS manually
9753
# --------------------------------------------------------------
9754
AC_DEFUN([PKG_CHECK_EXISTS],
9755
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9756
if test -n "$PKG_CONFIG" && \
9757
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9758
  m4_ifval([$2], [$2], [:])
9759
m4_ifvaln([$3], [else
9760
  $3])dnl
9761
fi])
9762
9763
9764
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9765
# ---------------------------------------------
9766
m4_define([_PKG_CONFIG],
1.2.58 by Didier Roche
Import upstream version 2.30.0
9767
[if test -n "$$1"; then
9768
    pkg_cv_[]$1="$$1"
9769
 elif test -n "$PKG_CONFIG"; then
9770
    PKG_CHECK_EXISTS([$3],
9771
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9772
		     [pkg_failed=yes])
9773
 else
9774
    pkg_failed=untried
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9775
fi[]dnl
9776
])# _PKG_CONFIG
9777
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9778
# _PKG_SHORT_ERRORS_SUPPORTED
9779
# -----------------------------
9780
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9781
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9782
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9783
        _pkg_short_errors_supported=yes
9784
else
9785
        _pkg_short_errors_supported=no
9786
fi[]dnl
9787
])# _PKG_SHORT_ERRORS_SUPPORTED
9788
9789
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9790
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9791
# [ACTION-IF-NOT-FOUND])
9792
#
9793
#
9794
# Note that if there is a possibility the first call to
9795
# PKG_CHECK_MODULES might not happen, you should be sure to include an
9796
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9797
#
9798
#
9799
# --------------------------------------------------------------
9800
AC_DEFUN([PKG_CHECK_MODULES],
9801
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9802
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9803
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9804
9805
pkg_failed=no
9806
AC_MSG_CHECKING([for $1])
9807
9808
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9809
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9810
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9811
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9812
and $1[]_LIBS to avoid the need to call pkg-config.
9813
See the pkg-config man page for more details.])
9814
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9815
if test $pkg_failed = yes; then
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9816
        _PKG_SHORT_ERRORS_SUPPORTED
9817
        if test $_pkg_short_errors_supported = yes; then
1.2.58 by Didier Roche
Import upstream version 2.30.0
9818
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9819
        else 
1.2.58 by Didier Roche
Import upstream version 2.30.0
9820
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9821
        fi
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9822
	# Put the nasty error message in config.log where it belongs
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9823
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9824
9825
	ifelse([$4], , [AC_MSG_ERROR(dnl
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9826
[Package requirements ($2) were not met:
9827
9828
$$1_PKG_ERRORS
9829
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9830
Consider adjusting the PKG_CONFIG_PATH environment variable if you
9831
installed software in a non-standard prefix.
9832
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9833
_PKG_TEXT
9834
])],
9835
		[AC_MSG_RESULT([no])
9836
                $4])
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9837
elif test $pkg_failed = untried; then
9838
	ifelse([$4], , [AC_MSG_FAILURE(dnl
9839
[The pkg-config script could not be found or is too old.  Make sure it
9840
is in your PATH or set the PKG_CONFIG environment variable to the full
9841
path to pkg-config.
9842
1.2.29 by Baptiste Mille-Mathias
Import upstream version 2.19.8
9843
_PKG_TEXT
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9844
1.2.36 by Pedro Fragoso
Import upstream version 2.21.5
9845
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1.2.24 by Sebastien Bacher
Import upstream version 2.17.8
9846
		[$4])
9847
else
9848
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9849
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9850
        AC_MSG_RESULT([yes])
9851
	ifelse([$3], , :, [$3])
9852
fi[]dnl
9853
])# PKG_CHECK_MODULES
9854