~ubuntu-branches/ubuntu/trusty/xserver-xorg-video-siliconmotion/trusty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Cyril Brulebois
  • Date: 2012-05-01 19:05:51 UTC
  • mfrom: (1.5.6 sid)
  • Revision ID: package-import@ubuntu.com-20120501190551-tp35ai5pnmsiehvk
Tags: 1:1.7.6-1
* New upstream release:
  - Fix FTBFS against X server 1.12.
* Drop unused x11proto-randr-dev and x11proto-render-dev build-deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
 
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
17
 
[m4_warning([this file was generated for autoconf 2.67.
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
 
17
[m4_warning([this file was generated for autoconf 2.68.
18
18
You have another version of autoconf.  It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
21
 
 
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.1], [],
 
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.1])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) 2009  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
# serial 1
 
856
 
 
857
# AM_SILENT_RULES([DEFAULT])
 
858
# --------------------------
 
859
# Enable less verbose build rules; with the default set to DEFAULT
 
860
# (`yes' being less verbose, `no' or empty being verbose).
 
861
AC_DEFUN([AM_SILENT_RULES],
 
862
[AC_ARG_ENABLE([silent-rules],
 
863
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
 
864
  --disable-silent-rules         verbose build output (undo: `make V=0')])
 
865
case $enable_silent_rules in
 
866
yes) AM_DEFAULT_VERBOSITY=0;;
 
867
no)  AM_DEFAULT_VERBOSITY=1;;
 
868
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 
869
esac
 
870
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 
871
AM_BACKSLASH='\'
 
872
AC_SUBST([AM_BACKSLASH])dnl
 
873
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 
874
])
 
875
 
 
876
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
877
#
 
878
# This file is free software; the Free Software Foundation
 
879
# gives unlimited permission to copy and/or distribute it,
 
880
# with or without modifications, as long as this notice is preserved.
 
881
 
 
882
# AM_PROG_INSTALL_STRIP
 
883
# ---------------------
 
884
# One issue with vendor `install' (even GNU) is that you can't
 
885
# specify the program used to strip binaries.  This is especially
 
886
# annoying in cross-compiling environments, where the build's strip
 
887
# is unlikely to handle the host's binaries.
 
888
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
889
# always use install-sh in `make install-strip', and initialize
 
890
# STRIPPROG with the value of the STRIP variable (set by the user).
 
891
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
892
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
893
# Installed binaries are usually stripped using `strip' when the user
 
894
# run `make install-strip'.  However `strip' might not be the right
 
895
# tool to use in cross-compilation environments, therefore Automake
 
896
# will honor the `STRIP' environment variable to overrule this program.
 
897
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
898
if test "$cross_compiling" != no; then
 
899
  AC_CHECK_TOOL([STRIP], [strip], :)
 
900
fi
 
901
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
902
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
903
 
 
904
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
905
#
 
906
# This file is free software; the Free Software Foundation
 
907
# gives unlimited permission to copy and/or distribute it,
 
908
# with or without modifications, as long as this notice is preserved.
 
909
 
 
910
# serial 2
 
911
 
 
912
# _AM_SUBST_NOTMAKE(VARIABLE)
 
913
# ---------------------------
 
914
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 
915
# This macro is traced by Automake.
 
916
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
917
 
 
918
# AM_SUBST_NOTMAKE(VARIABLE)
 
919
# ---------------------------
 
920
# Public sister of _AM_SUBST_NOTMAKE.
 
921
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
922
 
 
923
# Check how to create a tarball.                            -*- Autoconf -*-
 
924
 
 
925
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
926
#
 
927
# This file is free software; the Free Software Foundation
 
928
# gives unlimited permission to copy and/or distribute it,
 
929
# with or without modifications, as long as this notice is preserved.
 
930
 
 
931
# serial 2
 
932
 
 
933
# _AM_PROG_TAR(FORMAT)
 
934
# --------------------
 
935
# Check how to create a tarball in format FORMAT.
 
936
# FORMAT should be one of `v7', `ustar', or `pax'.
 
937
#
 
938
# Substitute a variable $(am__tar) that is a command
 
939
# writing to stdout a FORMAT-tarball containing the directory
 
940
# $tardir.
 
941
#     tardir=directory && $(am__tar) > result.tar
 
942
#
 
943
# Substitute a variable $(am__untar) that extract such
 
944
# a tarball read from stdin.
 
945
#     $(am__untar) < result.tar
 
946
AC_DEFUN([_AM_PROG_TAR],
 
947
[# Always define AMTAR for backward compatibility.
 
948
AM_MISSING_PROG([AMTAR], [tar])
 
949
m4_if([$1], [v7],
 
950
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
951
     [m4_case([$1], [ustar],, [pax],,
 
952
              [m4_fatal([Unknown tar format])])
 
953
AC_MSG_CHECKING([how to create a $1 tar archive])
 
954
# Loop over all known methods to create a tar archive until one works.
 
955
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
956
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
957
# Do not fold the above two line into one, because Tru64 sh and
 
958
# Solaris sh will not grok spaces in the rhs of `-'.
 
959
for _am_tool in $_am_tools
 
960
do
 
961
  case $_am_tool in
 
962
  gnutar)
 
963
    for _am_tar in tar gnutar gtar;
 
964
    do
 
965
      AM_RUN_LOG([$_am_tar --version]) && break
 
966
    done
 
967
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
968
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
969
    am__untar="$_am_tar -xf -"
 
970
    ;;
 
971
  plaintar)
 
972
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
973
    # ustar tarball either.
 
974
    (tar --version) >/dev/null 2>&1 && continue
 
975
    am__tar='tar chf - "$$tardir"'
 
976
    am__tar_='tar chf - "$tardir"'
 
977
    am__untar='tar xf -'
 
978
    ;;
 
979
  pax)
 
980
    am__tar='pax -L -x $1 -w "$$tardir"'
 
981
    am__tar_='pax -L -x $1 -w "$tardir"'
 
982
    am__untar='pax -r'
 
983
    ;;
 
984
  cpio)
 
985
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
986
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
987
    am__untar='cpio -i -H $1 -d'
 
988
    ;;
 
989
  none)
 
990
    am__tar=false
 
991
    am__tar_=false
 
992
    am__untar=false
 
993
    ;;
 
994
  esac
 
995
 
 
996
  # If the value was cached, stop now.  We just wanted to have am__tar
 
997
  # and am__untar set.
 
998
  test -n "${am_cv_prog_tar_$1}" && break
 
999
 
 
1000
  # tar/untar a dummy directory, and stop if the command works
 
1001
  rm -rf conftest.dir
 
1002
  mkdir conftest.dir
 
1003
  echo GrepMe > conftest.dir/file
 
1004
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
1005
  rm -rf conftest.dir
 
1006
  if test -s conftest.tar; then
 
1007
    AM_RUN_LOG([$am__untar <conftest.tar])
 
1008
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
1009
  fi
 
1010
done
 
1011
rm -rf conftest.dir
 
1012
 
 
1013
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
1014
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1015
AC_SUBST([am__tar])
 
1016
AC_SUBST([am__untar])
 
1017
]) # _AM_PROG_TAR
 
1018
 
 
1019
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
1020
 
1021
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
1022
#
 
1023
# This program is free software; you can redistribute it and/or modify
 
1024
# it under the terms of the GNU General Public License as published by
 
1025
# the Free Software Foundation; either version 2 of the License, or
 
1026
# (at your option) any later version.
 
1027
#
 
1028
# This program is distributed in the hope that it will be useful, but
 
1029
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
1030
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
1031
# General Public License for more details.
 
1032
#
 
1033
# You should have received a copy of the GNU General Public License
 
1034
# along with this program; if not, write to the Free Software
 
1035
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
1036
#
 
1037
# As a special exception to the GNU General Public License, if you
 
1038
# distribute this file as part of a program that contains a
 
1039
# configuration script generated by Autoconf, you may include it under
 
1040
# the same distribution terms that you use for the rest of that program.
 
1041
 
 
1042
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
1043
# ----------------------------------
 
1044
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
1045
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
1046
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
1047
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
1048
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
1049
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
1050
fi
 
1051
if test -n "$PKG_CONFIG"; then
 
1052
        _pkg_min_version=m4_default([$1], [0.9.0])
 
1053
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
1054
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
1055
                AC_MSG_RESULT([yes])
 
1056
        else
 
1057
                AC_MSG_RESULT([no])
 
1058
                PKG_CONFIG=""
 
1059
        fi
 
1060
                
 
1061
fi[]dnl
 
1062
])# PKG_PROG_PKG_CONFIG
 
1063
 
 
1064
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
1065
#
 
1066
# Check to see whether a particular set of modules exists.  Similar
 
1067
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
1068
#
 
1069
#
 
1070
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
1071
# this or PKG_CHECK_MODULES is called, or make sure to call
 
1072
# PKG_CHECK_EXISTS manually
 
1073
# --------------------------------------------------------------
 
1074
AC_DEFUN([PKG_CHECK_EXISTS],
 
1075
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
1076
if test -n "$PKG_CONFIG" && \
 
1077
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
1078
  m4_ifval([$2], [$2], [:])
 
1079
m4_ifvaln([$3], [else
 
1080
  $3])dnl
 
1081
fi])
 
1082
 
 
1083
 
 
1084
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
1085
# ---------------------------------------------
 
1086
m4_define([_PKG_CONFIG],
 
1087
[if test -n "$$1"; then
 
1088
    pkg_cv_[]$1="$$1"
 
1089
 elif test -n "$PKG_CONFIG"; then
 
1090
    PKG_CHECK_EXISTS([$3],
 
1091
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
1092
                     [pkg_failed=yes])
 
1093
 else
 
1094
    pkg_failed=untried
 
1095
fi[]dnl
 
1096
])# _PKG_CONFIG
 
1097
 
 
1098
# _PKG_SHORT_ERRORS_SUPPORTED
 
1099
# -----------------------------
 
1100
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
1101
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
1102
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
1103
        _pkg_short_errors_supported=yes
 
1104
else
 
1105
        _pkg_short_errors_supported=no
 
1106
fi[]dnl
 
1107
])# _PKG_SHORT_ERRORS_SUPPORTED
 
1108
 
 
1109
 
 
1110
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
1111
# [ACTION-IF-NOT-FOUND])
 
1112
#
 
1113
#
 
1114
# Note that if there is a possibility the first call to
 
1115
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
1116
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
1117
#
 
1118
#
 
1119
# --------------------------------------------------------------
 
1120
AC_DEFUN([PKG_CHECK_MODULES],
 
1121
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
1122
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
1123
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
1124
 
 
1125
pkg_failed=no
 
1126
AC_MSG_CHECKING([for $1])
 
1127
 
 
1128
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
1129
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
1130
 
 
1131
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
1132
and $1[]_LIBS to avoid the need to call pkg-config.
 
1133
See the pkg-config man page for more details.])
 
1134
 
 
1135
if test $pkg_failed = yes; then
 
1136
        _PKG_SHORT_ERRORS_SUPPORTED
 
1137
        if test $_pkg_short_errors_supported = yes; then
 
1138
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
1139
        else 
 
1140
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
1141
        fi
 
1142
        # Put the nasty error message in config.log where it belongs
 
1143
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
1144
 
 
1145
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
1146
[Package requirements ($2) were not met:
 
1147
 
 
1148
$$1_PKG_ERRORS
 
1149
 
 
1150
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
1151
installed software in a non-standard prefix.
 
1152
 
 
1153
_PKG_TEXT
 
1154
])],
 
1155
                [AC_MSG_RESULT([no])
 
1156
                $4])
 
1157
elif test $pkg_failed = untried; then
 
1158
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
1159
[The pkg-config script could not be found or is too old.  Make sure it
 
1160
is in your PATH or set the PKG_CONFIG environment variable to the full
 
1161
path to pkg-config.
 
1162
 
 
1163
_PKG_TEXT
 
1164
 
 
1165
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
 
1166
                [$4])
 
1167
else
 
1168
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
1169
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
1170
        AC_MSG_RESULT([yes])
 
1171
        ifelse([$3], , :, [$3])
 
1172
fi[]dnl
 
1173
])# PKG_CHECK_MODULES
 
1174
 
22
1175
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23
1176
#
24
1177
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25
 
#                 2006, 2007, 2008 Free Software Foundation, Inc.
 
1178
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 
1179
#                 Inc.
26
1180
#   Written by Gordon Matzigkeit, 1996
27
1181
#
28
1182
# This file is free software; the Free Software Foundation gives
31
1185
 
32
1186
m4_define([_LT_COPYING], [dnl
33
1187
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
34
 
#                 2006, 2007, 2008 Free Software Foundation, Inc.
 
1188
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 
1189
#                 Inc.
35
1190
#   Written by Gordon Matzigkeit, 1996
36
1191
#
37
1192
#   This file is part of GNU Libtool.
58
1213
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
59
1214
])
60
1215
 
61
 
# serial 56 LT_INIT
 
1216
# serial 57 LT_INIT
62
1217
 
63
1218
 
64
1219
# LT_PREREQ(VERSION)
87
1242
# ------------------
88
1243
AC_DEFUN([LT_INIT],
89
1244
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
 
1245
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
90
1246
AC_BEFORE([$0], [LT_LANG])dnl
91
1247
AC_BEFORE([$0], [LT_OUTPUT])dnl
92
1248
AC_BEFORE([$0], [LTDL_INIT])dnl
103
1259
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
104
1260
m4_require([_LT_PROG_LTMAIN])dnl
105
1261
 
 
1262
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
 
1263
 
106
1264
dnl Parse OPTIONS
107
1265
_LT_SET_OPTIONS([$0], [$1])
108
1266
 
139
1297
    *) break;;
140
1298
  esac
141
1299
done
142
 
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
1300
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
143
1301
])
144
1302
 
145
1303
 
159
1317
m4_defun([_LT_SETUP],
160
1318
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
161
1319
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
1320
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
 
1321
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
 
1322
 
162
1323
_LT_DECL([], [host_alias], [0], [The host system])dnl
163
1324
_LT_DECL([], [host], [0])dnl
164
1325
_LT_DECL([], [host_os], [0])dnl
181
1342
dnl
182
1343
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
183
1344
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
1345
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
184
1346
m4_require([_LT_CMD_RELOAD])dnl
185
1347
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 
1348
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
186
1349
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
187
1350
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
1351
m4_require([_LT_WITH_SYSROOT])dnl
188
1352
 
189
1353
_LT_CONFIG_LIBTOOL_INIT([
190
1354
# See if we are running on zsh, and set the options which allow our
200
1364
_LT_CHECK_OBJDIR
201
1365
 
202
1366
m4_require([_LT_TAG_COMPILER])dnl
203
 
_LT_PROG_ECHO_BACKSLASH
204
1367
 
205
1368
case $host_os in
206
1369
aix3*)
214
1377
  ;;
215
1378
esac
216
1379
 
217
 
# Sed substitution that helps us do robust quoting.  It backslashifies
218
 
# metacharacters that are still active within double-quoted strings.
219
 
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
220
 
 
221
 
# Same as above, but do not quote variable references.
222
 
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
223
 
 
224
 
# Sed substitution to delay expansion of an escaped shell variable in a
225
 
# double_quote_subst'ed string.
226
 
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
227
 
 
228
 
# Sed substitution to delay expansion of an escaped single quote.
229
 
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
230
 
 
231
 
# Sed substitution to avoid accidental globbing in evaled expressions
232
 
no_glob_subst='s/\*/\\\*/g'
233
 
 
234
1380
# Global variables:
235
1381
ofile=libtool
236
1382
can_build_shared=yes
271
1417
])# _LT_SETUP
272
1418
 
273
1419
 
 
1420
# _LT_PREPARE_SED_QUOTE_VARS
 
1421
# --------------------------
 
1422
# Define a few sed substitution that help us do robust quoting.
 
1423
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
 
1424
[# Backslashify metacharacters that are still active within
 
1425
# double-quoted strings.
 
1426
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
1427
 
 
1428
# Same as above, but do not quote variable references.
 
1429
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
 
1430
 
 
1431
# Sed substitution to delay expansion of an escaped shell variable in a
 
1432
# double_quote_subst'ed string.
 
1433
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
1434
 
 
1435
# Sed substitution to delay expansion of an escaped single quote.
 
1436
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
1437
 
 
1438
# Sed substitution to avoid accidental globbing in evaled expressions
 
1439
no_glob_subst='s/\*/\\\*/g'
 
1440
])
 
1441
 
274
1442
# _LT_PROG_LTMAIN
275
1443
# ---------------
276
1444
# Note that this code is called both from `configure', and `config.status'
423
1591
# declaration there will have the same value as in `configure'.  VARNAME
424
1592
# must have a single quote delimited value for this to work.
425
1593
m4_define([_LT_CONFIG_STATUS_DECLARE],
426
 
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
 
1594
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
427
1595
 
428
1596
 
429
1597
# _LT_CONFIG_STATUS_DECLARATIONS
433
1601
# embedded single quotes properly.  In configure, this macro expands
434
1602
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
435
1603
#
436
 
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
 
1604
#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
437
1605
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
438
1606
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
439
1607
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
532
1700
LTCFLAGS='$LTCFLAGS'
533
1701
compiler='$compiler_DEFAULT'
534
1702
 
 
1703
# A function that is used when there is no print builtin or printf.
 
1704
func_fallback_echo ()
 
1705
{
 
1706
  eval 'cat <<_LTECHO_EOF
 
1707
\$[]1
 
1708
_LTECHO_EOF'
 
1709
}
 
1710
 
535
1711
# Quote evaled strings.
536
1712
for var in lt_decl_all_varnames([[ \
537
1713
]], lt_decl_quote_varnames); do
538
 
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
 
1714
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
539
1715
    *[[\\\\\\\`\\"\\\$]]*)
540
 
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
 
1716
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
541
1717
      ;;
542
1718
    *)
543
1719
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
548
1724
# Double-quote double-evaled strings.
549
1725
for var in lt_decl_all_varnames([[ \
550
1726
]], lt_decl_dquote_varnames); do
551
 
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
 
1727
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
552
1728
    *[[\\\\\\\`\\"\\\$]]*)
553
 
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
 
1729
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
554
1730
      ;;
555
1731
    *)
556
1732
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
558
1734
    esac
559
1735
done
560
1736
 
561
 
# Fix-up fallback echo if it was mangled by the above quoting rules.
562
 
case \$lt_ECHO in
563
 
*'\\\[$]0 --fallback-echo"')dnl "
564
 
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
565
 
  ;;
566
 
esac
567
 
 
568
1737
_LT_OUTPUT_LIBTOOL_INIT
569
1738
])
570
1739
 
 
1740
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
 
1741
# ------------------------------------
 
1742
# Generate a child script FILE with all initialization necessary to
 
1743
# reuse the environment learned by the parent script, and make the
 
1744
# file executable.  If COMMENT is supplied, it is inserted after the
 
1745
# `#!' sequence but before initialization text begins.  After this
 
1746
# macro, additional text can be appended to FILE to form the body of
 
1747
# the child script.  The macro ends with non-zero status if the
 
1748
# file could not be fully written (such as if the disk is full).
 
1749
m4_ifdef([AS_INIT_GENERATED],
 
1750
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
 
1751
[m4_defun([_LT_GENERATED_FILE_INIT],
 
1752
[m4_require([AS_PREPARE])]dnl
 
1753
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
 
1754
[lt_write_fail=0
 
1755
cat >$1 <<_ASEOF || lt_write_fail=1
 
1756
#! $SHELL
 
1757
# Generated by $as_me.
 
1758
$2
 
1759
SHELL=\${CONFIG_SHELL-$SHELL}
 
1760
export SHELL
 
1761
_ASEOF
 
1762
cat >>$1 <<\_ASEOF || lt_write_fail=1
 
1763
AS_SHELL_SANITIZE
 
1764
_AS_PREPARE
 
1765
exec AS_MESSAGE_FD>&1
 
1766
_ASEOF
 
1767
test $lt_write_fail = 0 && chmod +x $1[]dnl
 
1768
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
571
1769
 
572
1770
# LT_OUTPUT
573
1771
# ---------
577
1775
AC_DEFUN([LT_OUTPUT],
578
1776
[: ${CONFIG_LT=./config.lt}
579
1777
AC_MSG_NOTICE([creating $CONFIG_LT])
580
 
cat >"$CONFIG_LT" <<_LTEOF
581
 
#! $SHELL
582
 
# Generated by $as_me.
583
 
# Run this file to recreate a libtool stub with the current configuration.
 
1778
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
 
1779
[# Run this file to recreate a libtool stub with the current configuration.])
584
1780
 
 
1781
cat >>"$CONFIG_LT" <<\_LTEOF
585
1782
lt_cl_silent=false
586
 
SHELL=\${CONFIG_SHELL-$SHELL}
587
 
_LTEOF
588
 
 
589
 
cat >>"$CONFIG_LT" <<\_LTEOF
590
 
AS_SHELL_SANITIZE
591
 
_AS_PREPARE
592
 
 
593
 
exec AS_MESSAGE_FD>&1
594
1783
exec AS_MESSAGE_LOG_FD>>config.log
595
1784
{
596
1785
  echo
616
1805
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
617
1806
configured by $[0], generated by m4_PACKAGE_STRING.
618
1807
 
619
 
Copyright (C) 2008 Free Software Foundation, Inc.
 
1808
Copyright (C) 2010 Free Software Foundation, Inc.
620
1809
This config.lt script is free software; the Free Software Foundation
621
1810
gives unlimited permision to copy, distribute and modify it."
622
1811
 
661
1850
# appending to config.log, which fails on DOS, as config.log is still kept
662
1851
# open by configure.  Here we exec the FD to /dev/null, effectively closing
663
1852
# config.log, so it can be properly (re)opened and appended to by config.lt.
664
 
if test "$no_create" != yes; then
665
 
  lt_cl_success=:
666
 
  test "$silent" = yes &&
667
 
    lt_config_lt_args="$lt_config_lt_args --quiet"
668
 
  exec AS_MESSAGE_LOG_FD>/dev/null
669
 
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
670
 
  exec AS_MESSAGE_LOG_FD>>config.log
671
 
  $lt_cl_success || AS_EXIT(1)
672
 
fi
 
1853
lt_cl_success=:
 
1854
test "$silent" = yes &&
 
1855
  lt_config_lt_args="$lt_config_lt_args --quiet"
 
1856
exec AS_MESSAGE_LOG_FD>/dev/null
 
1857
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
 
1858
exec AS_MESSAGE_LOG_FD>>config.log
 
1859
$lt_cl_success || AS_EXIT(1)
673
1860
])# LT_OUTPUT
674
1861
 
675
1862
 
732
1919
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
733
1920
  # text mode, it properly converts lines to CR/LF.  This bash problem
734
1921
  # is reportedly fixed, but why not run on old versions too?
735
 
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
736
 
    || (rm -f "$cfgfile"; exit 1)
737
 
 
738
 
  _LT_PROG_XSI_SHELLFNS
739
 
 
740
 
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
741
 
    || (rm -f "$cfgfile"; exit 1)
742
 
 
743
 
  mv -f "$cfgfile" "$ofile" ||
 
1922
  sed '$q' "$ltmain" >> "$cfgfile" \
 
1923
     || (rm -f "$cfgfile"; exit 1)
 
1924
 
 
1925
  _LT_PROG_REPLACE_SHELLFNS
 
1926
 
 
1927
   mv -f "$cfgfile" "$ofile" ||
744
1928
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
745
1929
  chmod +x "$ofile"
746
1930
],
846
2030
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
847
2031
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
848
2032
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
 
2033
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
849
2034
dnl aclocal-1.4 backwards compatibility:
850
2035
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
851
2036
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
852
2037
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
853
2038
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
 
2039
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
854
2040
 
855
2041
 
856
2042
# _LT_TAG_COMPILER
955
2141
        [lt_cv_ld_exported_symbols_list=no])
956
2142
        LDFLAGS="$save_LDFLAGS"
957
2143
    ])
 
2144
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
 
2145
      [lt_cv_ld_force_load=no
 
2146
      cat > conftest.c << _LT_EOF
 
2147
int forced_loaded() { return 2;}
 
2148
_LT_EOF
 
2149
      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
 
2150
      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
 
2151
      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
 
2152
      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
 
2153
      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
 
2154
      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
 
2155
      cat > conftest.c << _LT_EOF
 
2156
int main() { return 0;}
 
2157
_LT_EOF
 
2158
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
 
2159
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
 
2160
      _lt_result=$?
 
2161
      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
 
2162
        lt_cv_ld_force_load=yes
 
2163
      else
 
2164
        cat conftest.err >&AS_MESSAGE_LOG_FD
 
2165
      fi
 
2166
        rm -f conftest.err libconftest.a conftest conftest.c
 
2167
        rm -rf conftest.dSYM
 
2168
    ])
958
2169
    case $host_os in
959
2170
    rhapsody* | darwin1.[[012]])
960
2171
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
982
2193
    else
983
2194
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984
2195
    fi
985
 
    if test "$DSYMUTIL" != ":"; then
 
2196
    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
986
2197
      _lt_dsymutil='~$DSYMUTIL $lib || :'
987
2198
    else
988
2199
      _lt_dsymutil=
1002
2213
  _LT_TAGVAR(hardcode_direct, $1)=no
1003
2214
  _LT_TAGVAR(hardcode_automatic, $1)=yes
1004
2215
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1005
 
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
 
2216
  if test "$lt_cv_ld_force_load" = "yes"; then
 
2217
    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
 
2218
  else
 
2219
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
 
2220
  fi
1006
2221
  _LT_TAGVAR(link_all_deplibs, $1)=yes
1007
2222
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1008
2223
  case $cc_basename in
1010
2225
     *) _lt_dar_can_shared=$GCC ;;
1011
2226
  esac
1012
2227
  if test "$_lt_dar_can_shared" = "yes"; then
1013
 
    output_verbose_link_cmd=echo
 
2228
    output_verbose_link_cmd=func_echo_all
1014
2229
    _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}"
1015
2230
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1016
2231
    _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}"
1026
2241
  fi
1027
2242
])
1028
2243
 
1029
 
# _LT_SYS_MODULE_PATH_AIX
1030
 
# -----------------------
 
2244
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
 
2245
# ----------------------------------
1031
2246
# Links a minimal program and checks the executable
1032
2247
# for the system default hardcoded library path. In most cases,
1033
2248
# this is /usr/lib:/lib, but when the MPI compilers are used
1034
2249
# the location of the communication and MPI libs are included too.
1035
2250
# If we don't find anything, use the default library path according
1036
2251
# to the aix ld manual.
 
2252
# Store the results from the different compilers for each TAGNAME.
 
2253
# Allow to override them for all tags through lt_cv_aix_libpath.
1037
2254
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1038
2255
[m4_require([_LT_DECL_SED])dnl
1039
 
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040
 
lt_aix_libpath_sed='
1041
 
    /Import File Strings/,/^$/ {
1042
 
        /^0/ {
1043
 
            s/^0  *\(.*\)$/\1/
1044
 
            p
1045
 
        }
1046
 
    }'
1047
 
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1048
 
# Check for a 64-bit object if we didn't find anything.
1049
 
if test -z "$aix_libpath"; then
1050
 
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051
 
fi],[])
1052
 
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
2256
if test "${lt_cv_aix_libpath+set}" = set; then
 
2257
  aix_libpath=$lt_cv_aix_libpath
 
2258
else
 
2259
  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
 
2260
  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
 
2261
  lt_aix_libpath_sed='[
 
2262
      /Import File Strings/,/^$/ {
 
2263
          /^0/ {
 
2264
              s/^0  *\([^ ]*\) *$/\1/
 
2265
              p
 
2266
          }
 
2267
      }]'
 
2268
  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
2269
  # Check for a 64-bit object if we didn't find anything.
 
2270
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
 
2271
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
2272
  fi],[])
 
2273
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
 
2274
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
 
2275
  fi
 
2276
  ])
 
2277
  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
 
2278
fi
1053
2279
])# _LT_SYS_MODULE_PATH_AIX
1054
2280
 
1055
2281
 
1056
2282
# _LT_SHELL_INIT(ARG)
1057
2283
# -------------------
1058
2284
m4_define([_LT_SHELL_INIT],
1059
 
[ifdef([AC_DIVERSION_NOTICE],
1060
 
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1061
 
         [AC_DIVERT_PUSH(NOTICE)])
1062
 
$1
1063
 
AC_DIVERT_POP
1064
 
])# _LT_SHELL_INIT
 
2285
[m4_divert_text([M4SH-INIT], [$1
 
2286
])])# _LT_SHELL_INIT
 
2287
 
1065
2288
 
1066
2289
 
1067
2290
# _LT_PROG_ECHO_BACKSLASH
1068
2291
# -----------------------
1069
 
# Add some code to the start of the generated configure script which
1070
 
# will find an echo command which doesn't interpret backslashes.
 
2292
# Find how we can fake an echo command that does not interpret backslash.
 
2293
# In particular, with Autoconf 2.60 or later we add some code to the start
 
2294
# of the generated configure script which will find a shell with a builtin
 
2295
# printf (which we can use as an echo command).
1071
2296
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1072
 
[_LT_SHELL_INIT([
1073
 
# Check that we are running under the correct shell.
1074
 
SHELL=${CONFIG_SHELL-/bin/sh}
1075
 
 
1076
 
case X$lt_ECHO in
1077
 
X*--fallback-echo)
1078
 
  # Remove one level of quotation (which was required for Make).
1079
 
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1080
 
  ;;
 
2297
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
2298
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
2299
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
2300
 
 
2301
AC_MSG_CHECKING([how to print strings])
 
2302
# Test print first, because it will be a builtin if present.
 
2303
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
 
2304
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
 
2305
  ECHO='print -r --'
 
2306
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
 
2307
  ECHO='printf %s\n'
 
2308
else
 
2309
  # Use this function as a fallback that always works.
 
2310
  func_fallback_echo ()
 
2311
  {
 
2312
    eval 'cat <<_LTECHO_EOF
 
2313
$[]1
 
2314
_LTECHO_EOF'
 
2315
  }
 
2316
  ECHO='func_fallback_echo'
 
2317
fi
 
2318
 
 
2319
# func_echo_all arg...
 
2320
# Invoke $ECHO with all args, space-separated.
 
2321
func_echo_all ()
 
2322
{
 
2323
    $ECHO "$*" 
 
2324
}
 
2325
 
 
2326
case "$ECHO" in
 
2327
  printf*) AC_MSG_RESULT([printf]) ;;
 
2328
  print*) AC_MSG_RESULT([print -r]) ;;
 
2329
  *) AC_MSG_RESULT([cat]) ;;
1081
2330
esac
1082
2331
 
1083
 
ECHO=${lt_ECHO-echo}
1084
 
if test "X[$]1" = X--no-reexec; then
1085
 
  # Discard the --no-reexec flag, and continue.
1086
 
  shift
1087
 
elif test "X[$]1" = X--fallback-echo; then
1088
 
  # Avoid inline document here, it may be left over
1089
 
  :
1090
 
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091
 
  # Yippee, $ECHO works!
1092
 
  :
1093
 
else
1094
 
  # Restart under the correct shell.
1095
 
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1096
 
fi
1097
 
 
1098
 
if test "X[$]1" = X--fallback-echo; then
1099
 
  # used as fallback echo
1100
 
  shift
1101
 
  cat <<_LT_EOF
1102
 
[$]*
1103
 
_LT_EOF
1104
 
  exit 0
1105
 
fi
1106
 
 
1107
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
1108
 
# if CDPATH is set.
1109
 
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1110
 
 
1111
 
if test -z "$lt_ECHO"; then
1112
 
  if test "X${echo_test_string+set}" != Xset; then
1113
 
    # find a string as large as possible, as long as the shell can cope with it
1114
 
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115
 
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116
 
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117
 
         { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1118
 
      then
1119
 
        break
1120
 
      fi
1121
 
    done
1122
 
  fi
1123
 
 
1124
 
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125
 
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126
 
     test "X$echo_testing_string" = "X$echo_test_string"; then
1127
 
    :
1128
 
  else
1129
 
    # The Solaris, AIX, and Digital Unix default echo programs unquote
1130
 
    # backslashes.  This makes it impossible to quote backslashes using
1131
 
    #   echo "$something" | sed 's/\\/\\\\/g'
1132
 
    #
1133
 
    # So, first we look for a working echo in the user's PATH.
1134
 
 
1135
 
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136
 
    for dir in $PATH /usr/ucb; do
1137
 
      IFS="$lt_save_ifs"
1138
 
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139
 
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140
 
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141
 
         test "X$echo_testing_string" = "X$echo_test_string"; then
1142
 
        ECHO="$dir/echo"
1143
 
        break
1144
 
      fi
1145
 
    done
1146
 
    IFS="$lt_save_ifs"
1147
 
 
1148
 
    if test "X$ECHO" = Xecho; then
1149
 
      # We didn't find a better echo, so look for alternatives.
1150
 
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151
 
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152
 
         test "X$echo_testing_string" = "X$echo_test_string"; then
1153
 
        # This shell has a builtin print -r that does the trick.
1154
 
        ECHO='print -r'
1155
 
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156
 
           test "X$CONFIG_SHELL" != X/bin/ksh; then
1157
 
        # If we have ksh, try running configure again with it.
1158
 
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159
 
        export ORIGINAL_CONFIG_SHELL
1160
 
        CONFIG_SHELL=/bin/ksh
1161
 
        export CONFIG_SHELL
1162
 
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1163
 
      else
1164
 
        # Try using printf.
1165
 
        ECHO='printf %s\n'
1166
 
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167
 
           echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168
 
           test "X$echo_testing_string" = "X$echo_test_string"; then
1169
 
          # Cool, printf works
1170
 
          :
1171
 
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172
 
             test "X$echo_testing_string" = 'X\t' &&
1173
 
             echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174
 
             test "X$echo_testing_string" = "X$echo_test_string"; then
1175
 
          CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1176
 
          export CONFIG_SHELL
1177
 
          SHELL="$CONFIG_SHELL"
1178
 
          export SHELL
1179
 
          ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180
 
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181
 
             test "X$echo_testing_string" = 'X\t' &&
1182
 
             echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183
 
             test "X$echo_testing_string" = "X$echo_test_string"; then
1184
 
          ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1185
 
        else
1186
 
          # maybe with a smaller string...
1187
 
          prev=:
1188
 
 
1189
 
          for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190
 
            if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1191
 
            then
1192
 
              break
1193
 
            fi
1194
 
            prev="$cmd"
1195
 
          done
1196
 
 
1197
 
          if test "$prev" != 'sed 50q "[$]0"'; then
1198
 
            echo_test_string=`eval $prev`
1199
 
            export echo_test_string
1200
 
            exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1201
 
          else
1202
 
            # Oops.  We lost completely, so just stick with echo.
1203
 
            ECHO=echo
1204
 
          fi
1205
 
        fi
1206
 
      fi
1207
 
    fi
1208
 
  fi
1209
 
fi
1210
 
 
1211
 
# Copy echo and quote the copy suitably for passing to libtool from
1212
 
# the Makefile, instead of quoting the original, which is used later.
1213
 
lt_ECHO=$ECHO
1214
 
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215
 
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1216
 
fi
1217
 
 
1218
 
AC_SUBST(lt_ECHO)
1219
 
])
 
2332
m4_ifdef([_AS_DETECT_SUGGESTED],
 
2333
[_AS_DETECT_SUGGESTED([
 
2334
  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
 
2335
    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
2336
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
2337
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
2338
    PATH=/empty FPATH=/empty; export PATH FPATH
 
2339
    test "X`printf %s $ECHO`" = "X$ECHO" \
 
2340
      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
2341
 
1220
2342
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221
 
_LT_DECL([], [ECHO], [1],
1222
 
    [An echo program that does not interpret backslashes])
 
2343
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1223
2344
])# _LT_PROG_ECHO_BACKSLASH
1224
2345
 
1225
2346
 
 
2347
# _LT_WITH_SYSROOT
 
2348
# ----------------
 
2349
AC_DEFUN([_LT_WITH_SYSROOT],
 
2350
[AC_MSG_CHECKING([for sysroot])
 
2351
AC_ARG_WITH([sysroot],
 
2352
[  --with-sysroot[=DIR] Search for dependent libraries within DIR
 
2353
                        (or the compiler's sysroot if not specified).],
 
2354
[], [with_sysroot=no])
 
2355
 
 
2356
dnl lt_sysroot will always be passed unquoted.  We quote it here
 
2357
dnl in case the user passed a directory name.
 
2358
lt_sysroot=
 
2359
case ${with_sysroot} in #(
 
2360
 yes)
 
2361
   if test "$GCC" = yes; then
 
2362
     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
 
2363
   fi
 
2364
   ;; #(
 
2365
 /*)
 
2366
   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
 
2367
   ;; #(
 
2368
 no|'')
 
2369
   ;; #(
 
2370
 *)
 
2371
   AC_MSG_RESULT([${with_sysroot}])
 
2372
   AC_MSG_ERROR([The sysroot must be an absolute path.])
 
2373
   ;;
 
2374
esac
 
2375
 
 
2376
 AC_MSG_RESULT([${lt_sysroot:-no}])
 
2377
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
 
2378
[dependent libraries, and in which our libraries should be installed.])])
 
2379
 
1226
2380
# _LT_ENABLE_LOCK
1227
2381
# ---------------
1228
2382
m4_defun([_LT_ENABLE_LOCK],
1251
2405
  ;;
1252
2406
*-*-irix6*)
1253
2407
  # Find out which ABI we are using.
1254
 
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
2408
  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1255
2409
  if AC_TRY_EVAL(ac_compile); then
1256
2410
    if test "$lt_cv_prog_gnu_ld" = yes; then
1257
2411
      case `/usr/bin/file conftest.$ac_objext` in
1369
2523
])# _LT_ENABLE_LOCK
1370
2524
 
1371
2525
 
 
2526
# _LT_PROG_AR
 
2527
# -----------
 
2528
m4_defun([_LT_PROG_AR],
 
2529
[AC_CHECK_TOOLS(AR, [ar], false)
 
2530
: ${AR=ar}
 
2531
: ${AR_FLAGS=cru}
 
2532
_LT_DECL([], [AR], [1], [The archiver])
 
2533
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
 
2534
 
 
2535
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
 
2536
  [lt_cv_ar_at_file=no
 
2537
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
 
2538
     [echo conftest.$ac_objext > conftest.lst
 
2539
      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
 
2540
      AC_TRY_EVAL([lt_ar_try])
 
2541
      if test "$ac_status" -eq 0; then
 
2542
        # Ensure the archiver fails upon bogus file names.
 
2543
        rm -f conftest.$ac_objext libconftest.a
 
2544
        AC_TRY_EVAL([lt_ar_try])
 
2545
        if test "$ac_status" -ne 0; then
 
2546
          lt_cv_ar_at_file=@
 
2547
        fi
 
2548
      fi
 
2549
      rm -f conftest.* libconftest.a
 
2550
     ])
 
2551
  ])
 
2552
 
 
2553
if test "x$lt_cv_ar_at_file" = xno; then
 
2554
  archiver_list_spec=
 
2555
else
 
2556
  archiver_list_spec=$lt_cv_ar_at_file
 
2557
fi
 
2558
_LT_DECL([], [archiver_list_spec], [1],
 
2559
  [How to feed a file listing to the archiver])
 
2560
])# _LT_PROG_AR
 
2561
 
 
2562
 
1372
2563
# _LT_CMD_OLD_ARCHIVE
1373
2564
# -------------------
1374
2565
m4_defun([_LT_CMD_OLD_ARCHIVE],
1375
 
[AC_CHECK_TOOL(AR, ar, false)
1376
 
test -z "$AR" && AR=ar
1377
 
test -z "$AR_FLAGS" && AR_FLAGS=cru
1378
 
_LT_DECL([], [AR], [1], [The archiver])
1379
 
_LT_DECL([], [AR_FLAGS], [1])
 
2566
[_LT_PROG_AR
1380
2567
 
1381
2568
AC_CHECK_TOOL(STRIP, strip, :)
1382
2569
test -z "$STRIP" && STRIP=:
1403
2590
  esac
1404
2591
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1405
2592
fi
 
2593
 
 
2594
case $host_os in
 
2595
  darwin*)
 
2596
    lock_old_archive_extraction=yes ;;
 
2597
  *)
 
2598
    lock_old_archive_extraction=no ;;
 
2599
esac
1406
2600
_LT_DECL([], [old_postinstall_cmds], [2])
1407
2601
_LT_DECL([], [old_postuninstall_cmds], [2])
1408
2602
_LT_TAGDECL([], [old_archive_cmds], [2],
1409
2603
    [Commands used to build an old-style archive])
 
2604
_LT_DECL([], [lock_old_archive_extraction], [0],
 
2605
    [Whether to use a lock for old archive extraction])
1410
2606
])# _LT_CMD_OLD_ARCHIVE
1411
2607
 
1412
2608
 
1431
2627
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1432
2628
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1433
2629
   -e 's:$: $lt_compiler_flag:'`
1434
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
2630
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1435
2631
   (eval "$lt_compile" 2>conftest.err)
1436
2632
   ac_status=$?
1437
2633
   cat conftest.err >&AS_MESSAGE_LOG_FD
1438
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
2634
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1439
2635
   if (exit $ac_status) && test -s "$ac_outfile"; then
1440
2636
     # The compiler can only warn and ignore the option if not recognized
1441
2637
     # So say no if there are warnings other than the usual output.
1442
 
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
 
2638
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1443
2639
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1444
2640
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1445
2641
       $2=yes
1479
2675
     if test -s conftest.err; then
1480
2676
       # Append any errors to the config.log.
1481
2677
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1482
 
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
 
2678
       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1483
2679
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1484
2680
       if diff conftest.exp conftest.er2 >/dev/null; then
1485
2681
         $2=yes
1542
2738
    lt_cv_sys_max_cmd_len=8192;
1543
2739
    ;;
1544
2740
 
 
2741
  mint*)
 
2742
    # On MiNT this can take a long time and run out of memory.
 
2743
    lt_cv_sys_max_cmd_len=8192;
 
2744
    ;;
 
2745
 
1545
2746
  amigaos*)
1546
2747
    # On AmigaOS with pdksh, this test takes hours, literally.
1547
2748
    # So we just punt and use a minimum line length of 8192.
1606
2807
      # If test is not a shell built-in, we'll probably end up computing a
1607
2808
      # maximum length that is only half of the actual maximum length, but
1608
2809
      # we can't tell.
1609
 
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1610
 
                 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
 
2810
      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
 
2811
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1611
2812
              test $i != 17 # 1/2 MB should be enough
1612
2813
      do
1613
2814
        i=`expr $i + 1`
1658
2859
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1659
2860
  lt_status=$lt_dlunknown
1660
2861
  cat > conftest.$ac_ext <<_LT_EOF
1661
 
[#line __oline__ "configure"
 
2862
[#line $LINENO "configure"
1662
2863
#include "confdefs.h"
1663
2864
 
1664
2865
#if HAVE_DLFCN_H
1699
2900
#  endif
1700
2901
#endif
1701
2902
 
1702
 
void fnord() { int i=42;}
 
2903
/* When -fvisbility=hidden is used, assume the code has been annotated
 
2904
   correspondingly for the symbols needed.  */
 
2905
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 
2906
int fnord () __attribute__((visibility("default")));
 
2907
#endif
 
2908
 
 
2909
int fnord () { return 42; }
1703
2910
int main ()
1704
2911
{
1705
2912
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1708
2915
  if (self)
1709
2916
    {
1710
2917
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1711
 
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
2918
      else
 
2919
        {
 
2920
          if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
 
2921
          else puts (dlerror ());
 
2922
        }
1712
2923
      /* dlclose (self); */
1713
2924
    }
1714
2925
  else
1884
3095
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1885
3096
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1886
3097
   -e 's:$: $lt_compiler_flag:'`
1887
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
3098
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1888
3099
   (eval "$lt_compile" 2>out/conftest.err)
1889
3100
   ac_status=$?
1890
3101
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1891
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
3102
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1892
3103
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1893
3104
   then
1894
3105
     # The compiler can only warn and ignore the option if not recognized
1895
3106
     # So say no if there are warnings
1896
 
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
 
3107
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
1897
3108
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1898
3109
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1899
3110
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2052
3263
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2053
3264
m4_require([_LT_DECL_OBJDUMP])dnl
2054
3265
m4_require([_LT_DECL_SED])dnl
 
3266
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2055
3267
AC_MSG_CHECKING([dynamic linker characteristics])
2056
3268
m4_if([$1],
2057
3269
        [], [
2060
3272
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061
3273
    *) lt_awk_arg="/^libraries:/" ;;
2062
3274
  esac
2063
 
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2064
 
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
 
3275
  case $host_os in
 
3276
    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
 
3277
    *) lt_sed_strip_eq="s,=/,/,g" ;;
 
3278
  esac
 
3279
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
 
3280
  case $lt_search_path_spec in
 
3281
  *\;*)
2065
3282
    # if the path contains ";" then we assume it to be the separator
2066
3283
    # otherwise default to the standard path separator (i.e. ":") - it is
2067
3284
    # assumed that no part of a normal pathname contains ";" but that should
2068
3285
    # okay in the real world where ";" in dirpaths is itself problematic.
2069
 
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2070
 
  else
2071
 
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2072
 
  fi
 
3286
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
 
3287
    ;;
 
3288
  *)
 
3289
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
 
3290
    ;;
 
3291
  esac
2073
3292
  # Ok, now we have the path, separated by spaces, we can step through it
2074
3293
  # and add multilib dir if necessary.
2075
3294
  lt_tmp_lt_search_path_spec=
2082
3301
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083
3302
    fi
2084
3303
  done
2085
 
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
 
3304
  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2086
3305
BEGIN {RS=" "; FS="/|\n";} {
2087
3306
  lt_foo="";
2088
3307
  lt_count=0;
2102
3321
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103
3322
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104
3323
}'`
2105
 
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
 
3324
  # AWK program above erroneously prepends '/' to C:/dos/paths
 
3325
  # for these hosts.
 
3326
  case $host_os in
 
3327
    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
 
3328
      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
 
3329
  esac
 
3330
  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2106
3331
else
2107
3332
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108
3333
fi])
2190
3415
  m68k)
2191
3416
    library_names_spec='$libname.ixlibrary $libname.a'
2192
3417
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2193
 
    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'
 
3418
    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2194
3419
    ;;
2195
3420
  esac
2196
3421
  ;;
2221
3446
  need_version=no
2222
3447
  need_lib_prefix=no
2223
3448
 
2224
 
  case $GCC,$host_os in
2225
 
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
 
3449
  case $GCC,$cc_basename in
 
3450
  yes,*)
 
3451
    # gcc
2226
3452
    library_names_spec='$libname.dll.a'
2227
3453
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2228
3454
    postinstall_cmds='base_file=`basename \${file}`~
2243
3469
    cygwin*)
2244
3470
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2245
3471
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2246
 
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
3472
m4_if([$1], [],[
 
3473
      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2247
3474
      ;;
2248
3475
    mingw* | cegcc*)
2249
3476
      # MinGW DLLs use traditional 'lib' prefix
2250
3477
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251
 
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2252
 
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2253
 
        # It is most probably a Windows format PATH printed by
2254
 
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2255
 
        # path with ; separators, and with drive letters. We can handle the
2256
 
        # drive letters (cygwin fileutils understands them), so leave them,
2257
 
        # especially as we might pass files found there to a mingw objdump,
2258
 
        # which wouldn't understand a cygwinified path. Ahh.
2259
 
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2260
 
      else
2261
 
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2262
 
      fi
2263
3478
      ;;
2264
3479
    pw32*)
2265
3480
      # pw32 DLLs use 'pw' prefix rather than 'lib'
2266
3481
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2267
3482
      ;;
2268
3483
    esac
 
3484
    dynamic_linker='Win32 ld.exe'
 
3485
    ;;
 
3486
 
 
3487
  *,cl*)
 
3488
    # Native MSVC
 
3489
    libname_spec='$name'
 
3490
    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3491
    library_names_spec='${libname}.dll.lib'
 
3492
 
 
3493
    case $build_os in
 
3494
    mingw*)
 
3495
      sys_lib_search_path_spec=
 
3496
      lt_save_ifs=$IFS
 
3497
      IFS=';'
 
3498
      for lt_path in $LIB
 
3499
      do
 
3500
        IFS=$lt_save_ifs
 
3501
        # Let DOS variable expansion print the short 8.3 style file name.
 
3502
        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
 
3503
        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
 
3504
      done
 
3505
      IFS=$lt_save_ifs
 
3506
      # Convert to MSYS style.
 
3507
      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
 
3508
      ;;
 
3509
    cygwin*)
 
3510
      # Convert to unix form, then to dos form, then back to unix form
 
3511
      # but this time dos style (no spaces!) so that the unix form looks
 
3512
      # like /cygdrive/c/PROGRA~1:/cygdr...
 
3513
      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
 
3514
      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
 
3515
      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
 
3516
      ;;
 
3517
    *)
 
3518
      sys_lib_search_path_spec="$LIB"
 
3519
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
 
3520
        # It is most probably a Windows format PATH.
 
3521
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
3522
      else
 
3523
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
 
3524
      fi
 
3525
      # FIXME: find the short name or the path components, as spaces are
 
3526
      # common. (e.g. "Program Files" -> "PROGRA~1")
 
3527
      ;;
 
3528
    esac
 
3529
 
 
3530
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
3531
    postinstall_cmds='base_file=`basename \${file}`~
 
3532
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
 
3533
      dldir=$destdir/`dirname \$dlpath`~
 
3534
      test -d \$dldir || mkdir -p \$dldir~
 
3535
      $install_prog $dir/$dlname \$dldir/$dlname'
 
3536
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
3537
      dlpath=$dir/\$dldll~
 
3538
       $RM \$dlpath'
 
3539
    shlibpath_overrides_runpath=yes
 
3540
    dynamic_linker='Win32 link.exe'
2269
3541
    ;;
2270
3542
 
2271
3543
  *)
 
3544
    # Assume MSVC wrapper
2272
3545
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
3546
    dynamic_linker='Win32 ld.exe'
2273
3547
    ;;
2274
3548
  esac
2275
 
  dynamic_linker='Win32 ld.exe'
2276
3549
  # FIXME: first we should search . and the directory the executable is in
2277
3550
  shlibpath_var=PATH
2278
3551
  ;;
2359
3632
  hardcode_into_libs=yes
2360
3633
  ;;
2361
3634
 
 
3635
haiku*)
 
3636
  version_type=linux
 
3637
  need_lib_prefix=no
 
3638
  need_version=no
 
3639
  dynamic_linker="$host_os runtime_loader"
 
3640
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
3641
  soname_spec='${libname}${release}${shared_ext}$major'
 
3642
  shlibpath_var=LIBRARY_PATH
 
3643
  shlibpath_overrides_runpath=yes
 
3644
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
 
3645
  hardcode_into_libs=yes
 
3646
  ;;
 
3647
 
2362
3648
hpux9* | hpux10* | hpux11*)
2363
3649
  # Give a soname corresponding to the major version so that dld.sl refuses to
2364
3650
  # link against other versions.
2401
3687
    soname_spec='${libname}${release}${shared_ext}$major'
2402
3688
    ;;
2403
3689
  esac
2404
 
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
3690
  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2405
3691
  postinstall_cmds='chmod 555 $lib'
 
3692
  # or fails outright, so override atomically:
 
3693
  install_override_mode=555
2406
3694
  ;;
2407
3695
 
2408
3696
interix[[3-9]]*)
2469
3757
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2470
3758
  shlibpath_var=LD_LIBRARY_PATH
2471
3759
  shlibpath_overrides_runpath=no
 
3760
 
2472
3761
  # Some binutils ld are patched to set DT_RUNPATH
2473
 
  save_LDFLAGS=$LDFLAGS
2474
 
  save_libdir=$libdir
2475
 
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2476
 
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2477
 
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2478
 
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2479
 
       [shlibpath_overrides_runpath=yes])])
2480
 
  LDFLAGS=$save_LDFLAGS
2481
 
  libdir=$save_libdir
 
3762
  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
 
3763
    [lt_cv_shlibpath_overrides_runpath=no
 
3764
    save_LDFLAGS=$LDFLAGS
 
3765
    save_libdir=$libdir
 
3766
    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
 
3767
         LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
 
3768
    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
3769
      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
 
3770
         [lt_cv_shlibpath_overrides_runpath=yes])])
 
3771
    LDFLAGS=$save_LDFLAGS
 
3772
    libdir=$save_libdir
 
3773
    ])
 
3774
  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2482
3775
 
2483
3776
  # This implies no fast_install, which is unacceptable.
2484
3777
  # Some rework will be needed to allow for fast_install
2487
3780
 
2488
3781
  # Append ld.so.conf contents to the search path
2489
3782
  if test -f /etc/ld.so.conf; then
2490
 
    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' ' '`
 
3783
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2491
3784
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2492
3785
  fi
2493
3786
 
2500
3793
  dynamic_linker='GNU/Linux ld.so'
2501
3794
  ;;
2502
3795
 
2503
 
netbsdelf*-gnu)
2504
 
  version_type=linux
2505
 
  need_lib_prefix=no
2506
 
  need_version=no
2507
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2508
 
  soname_spec='${libname}${release}${shared_ext}$major'
2509
 
  shlibpath_var=LD_LIBRARY_PATH
2510
 
  shlibpath_overrides_runpath=no
2511
 
  hardcode_into_libs=yes
2512
 
  dynamic_linker='NetBSD ld.elf_so'
2513
 
  ;;
2514
 
 
2515
3796
netbsd*)
2516
3797
  version_type=sunos
2517
3798
  need_lib_prefix=no
2732
4013
    The last name is the one that the linker finds with -lNAME]])
2733
4014
_LT_DECL([], [soname_spec], [1],
2734
4015
    [[The coded name of the library, if different from the real name]])
 
4016
_LT_DECL([], [install_override_mode], [1],
 
4017
    [Permission mode override for installation of shared libraries])
2735
4018
_LT_DECL([], [postinstall_cmds], [2],
2736
4019
    [Command to use after installation of a shared archive])
2737
4020
_LT_DECL([], [postuninstall_cmds], [2],
2844
4127
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2845
4128
m4_require([_LT_DECL_SED])dnl
2846
4129
m4_require([_LT_DECL_EGREP])dnl
 
4130
m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
2847
4131
 
2848
4132
AC_ARG_WITH([gnu-ld],
2849
4133
    [AS_HELP_STRING([--with-gnu-ld],
2965
4249
esac
2966
4250
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2967
4251
case $host_os in
 
4252
  cygwin* | mingw* | pw32* | cegcc*)
 
4253
    if test "$GCC" != yes; then
 
4254
      reload_cmds=false
 
4255
    fi
 
4256
    ;;
2968
4257
  darwin*)
2969
4258
    if test "$GCC" = yes; then
2970
4259
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2973
4262
    fi
2974
4263
    ;;
2975
4264
esac
2976
 
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2977
 
_LT_DECL([], [reload_cmds], [2])dnl
 
4265
_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
 
4266
_LT_TAGDECL([], [reload_cmds], [2])dnl
2978
4267
])# _LT_CMD_RELOAD
2979
4268
 
2980
4269
 
3026
4315
  # Base MSYS/MinGW do not provide the 'file' command needed by
3027
4316
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3028
4317
  # unless we find 'file', for example because we are cross-compiling.
3029
 
  if ( file / ) >/dev/null 2>&1; then
 
4318
  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
 
4319
  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3030
4320
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3031
4321
    lt_cv_file_magic_cmd='func_win32_libid'
3032
4322
  else
3033
 
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
4323
    # Keep this pattern in sync with the one in func_win32_libid.
 
4324
    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3034
4325
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3035
4326
  fi
3036
4327
  ;;
3037
4328
 
3038
 
cegcc)
 
4329
cegcc*)
3039
4330
  # use the weaker test based on 'objdump'. See mingw*.
3040
4331
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3041
4332
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3065
4356
  lt_cv_deplibs_check_method=pass_all
3066
4357
  ;;
3067
4358
 
 
4359
haiku*)
 
4360
  lt_cv_deplibs_check_method=pass_all
 
4361
  ;;
 
4362
 
3068
4363
hpux10.20* | hpux11*)
3069
4364
  lt_cv_file_magic_cmd=/usr/bin/file
3070
4365
  case $host_cpu in
3073
4368
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3074
4369
    ;;
3075
4370
  hppa*64*)
3076
 
    [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]']
 
4371
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3077
4372
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3078
4373
    ;;
3079
4374
  *)
3080
 
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
4375
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3081
4376
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3082
4377
    ;;
3083
4378
  esac
3103
4398
  lt_cv_deplibs_check_method=pass_all
3104
4399
  ;;
3105
4400
 
3106
 
netbsd* | netbsdelf*-gnu)
 
4401
netbsd*)
3107
4402
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3108
4403
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3109
4404
  else
3177
4472
  ;;
3178
4473
esac
3179
4474
])
 
4475
 
 
4476
file_magic_glob=
 
4477
want_nocaseglob=no
 
4478
if test "$build" = "$host"; then
 
4479
  case $host_os in
 
4480
  mingw* | pw32*)
 
4481
    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
 
4482
      want_nocaseglob=yes
 
4483
    else
 
4484
      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
 
4485
    fi
 
4486
    ;;
 
4487
  esac
 
4488
fi
 
4489
 
3180
4490
file_magic_cmd=$lt_cv_file_magic_cmd
3181
4491
deplibs_check_method=$lt_cv_deplibs_check_method
3182
4492
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3184
4494
_LT_DECL([], [deplibs_check_method], [1],
3185
4495
    [Method to check whether dependent libraries are shared objects])
3186
4496
_LT_DECL([], [file_magic_cmd], [1],
3187
 
    [Command to use when deplibs_check_method == "file_magic"])
 
4497
    [Command to use when deplibs_check_method = "file_magic"])
 
4498
_LT_DECL([], [file_magic_glob], [1],
 
4499
    [How to find potential files when deplibs_check_method = "file_magic"])
 
4500
_LT_DECL([], [want_nocaseglob], [1],
 
4501
    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3188
4502
])# _LT_CHECK_MAGIC_METHOD
3189
4503
 
3190
4504
 
3241
4555
  NM="$lt_cv_path_NM"
3242
4556
else
3243
4557
  # Didn't find any BSD compatible name lister, look for dumpbin.
3244
 
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
 
4558
  if test -n "$DUMPBIN"; then :
 
4559
    # Let the user override the test.
 
4560
  else
 
4561
    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
 
4562
    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
 
4563
    *COFF*)
 
4564
      DUMPBIN="$DUMPBIN -symbols"
 
4565
      ;;
 
4566
    *)
 
4567
      DUMPBIN=:
 
4568
      ;;
 
4569
    esac
 
4570
  fi
3245
4571
  AC_SUBST([DUMPBIN])
3246
4572
  if test "$DUMPBIN" != ":"; then
3247
4573
    NM="$DUMPBIN"
3254
4580
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3255
4581
  [lt_cv_nm_interface="BSD nm"
3256
4582
  echo "int some_variable = 0;" > conftest.$ac_ext
3257
 
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
 
4583
  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3258
4584
  (eval "$ac_compile" 2>conftest.err)
3259
4585
  cat conftest.err >&AS_MESSAGE_LOG_FD
3260
 
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
 
4586
  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3261
4587
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3262
4588
  cat conftest.err >&AS_MESSAGE_LOG_FD
3263
 
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
 
4589
  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3264
4590
  cat conftest.out >&AS_MESSAGE_LOG_FD
3265
4591
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3266
4592
    lt_cv_nm_interface="MS dumpbin"
3275
4601
dnl AC_DEFUN([AM_PROG_NM], [])
3276
4602
dnl AC_DEFUN([AC_PROG_NM], [])
3277
4603
 
 
4604
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
 
4605
# --------------------------------
 
4606
# how to determine the name of the shared library
 
4607
# associated with a specific link library.
 
4608
#  -- PORTME fill in with the dynamic library characteristics
 
4609
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
 
4610
[m4_require([_LT_DECL_EGREP])
 
4611
m4_require([_LT_DECL_OBJDUMP])
 
4612
m4_require([_LT_DECL_DLLTOOL])
 
4613
AC_CACHE_CHECK([how to associate runtime and link libraries],
 
4614
lt_cv_sharedlib_from_linklib_cmd,
 
4615
[lt_cv_sharedlib_from_linklib_cmd='unknown'
 
4616
 
 
4617
case $host_os in
 
4618
cygwin* | mingw* | pw32* | cegcc*)
 
4619
  # two different shell functions defined in ltmain.sh
 
4620
  # decide which to use based on capabilities of $DLLTOOL
 
4621
  case `$DLLTOOL --help 2>&1` in
 
4622
  *--identify-strict*)
 
4623
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
 
4624
    ;;
 
4625
  *)
 
4626
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
 
4627
    ;;
 
4628
  esac
 
4629
  ;;
 
4630
*)
 
4631
  # fallback: assume linklib IS sharedlib
 
4632
  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
 
4633
  ;;
 
4634
esac
 
4635
])
 
4636
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
 
4637
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
 
4638
 
 
4639
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
 
4640
    [Command to associate shared and link libraries])
 
4641
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
 
4642
 
 
4643
 
 
4644
# _LT_PATH_MANIFEST_TOOL
 
4645
# ----------------------
 
4646
# locate the manifest tool
 
4647
m4_defun([_LT_PATH_MANIFEST_TOOL],
 
4648
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
 
4649
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
 
4650
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
 
4651
  [lt_cv_path_mainfest_tool=no
 
4652
  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
 
4653
  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
 
4654
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
4655
  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
 
4656
    lt_cv_path_mainfest_tool=yes
 
4657
  fi
 
4658
  rm -f conftest*])
 
4659
if test "x$lt_cv_path_mainfest_tool" != xyes; then
 
4660
  MANIFEST_TOOL=:
 
4661
fi
 
4662
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
 
4663
])# _LT_PATH_MANIFEST_TOOL
 
4664
 
3278
4665
 
3279
4666
# LT_LIB_M
3280
4667
# --------
3283
4670
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3284
4671
LIBM=
3285
4672
case $host in
3286
 
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
4673
*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3287
4674
  # These system don't have libm, or don't need it
3288
4675
  ;;
3289
4676
*-ncr-sysv4.3*)
3311
4698
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3312
4699
 
3313
4700
if test "$GCC" = yes; then
3314
 
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
4701
  case $cc_basename in
 
4702
  nvcc*)
 
4703
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
 
4704
  *)
 
4705
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
 
4706
  esac
3315
4707
 
3316
4708
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3317
4709
    lt_cv_prog_compiler_rtti_exceptions,
3328
4720
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3329
4721
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3330
4722
AC_REQUIRE([AC_PROG_CC])dnl
 
4723
AC_REQUIRE([AC_PROG_AWK])dnl
3331
4724
AC_REQUIRE([LT_PATH_NM])dnl
3332
4725
AC_REQUIRE([LT_PATH_LD])dnl
3333
4726
m4_require([_LT_DECL_SED])dnl
3395
4788
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3396
4789
 
3397
4790
# Transform an extracted symbol line into symbol name and symbol address
3398
 
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3399
 
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'"
 
4791
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
4792
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'"
3400
4793
 
3401
4794
# Handle CRLF in mingw tool chain
3402
4795
opt_cr=
3432
4825
  else
3433
4826
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3434
4827
  fi
 
4828
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3435
4829
 
3436
4830
  # Check to see that the pipe works correctly.
3437
4831
  pipe_works=no
3453
4847
  if AC_TRY_EVAL(ac_compile); then
3454
4848
    # Now try to grab the symbols.
3455
4849
    nlist=conftest.nm
3456
 
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
4850
    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3457
4851
      # Try sorting and uniquifying the output.
3458
4852
      if sort "$nlist" | uniq > "$nlist"T; then
3459
4853
        mv -f "$nlist"T "$nlist"
3465
4859
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3466
4860
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3467
4861
          cat <<_LT_EOF > conftest.$ac_ext
 
4862
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
 
4863
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
 
4864
/* DATA imports from DLLs on WIN32 con't be const, because runtime
 
4865
   relocations are performed -- see ld's documentation on pseudo-relocs.  */
 
4866
# define LT@&t@_DLSYM_CONST
 
4867
#elif defined(__osf__)
 
4868
/* This system does not cope well with relocations in const data.  */
 
4869
# define LT@&t@_DLSYM_CONST
 
4870
#else
 
4871
# define LT@&t@_DLSYM_CONST const
 
4872
#endif
 
4873
 
3468
4874
#ifdef __cplusplus
3469
4875
extern "C" {
3470
4876
#endif
3476
4882
          cat <<_LT_EOF >> conftest.$ac_ext
3477
4883
 
3478
4884
/* The mapping between symbol names and symbols.  */
3479
 
const struct {
 
4885
LT@&t@_DLSYM_CONST struct {
3480
4886
  const char *name;
3481
4887
  void       *address;
3482
4888
}
3502
4908
_LT_EOF
3503
4909
          # Now try linking the two files.
3504
4910
          mv conftest.$ac_objext conftstm.$ac_objext
3505
 
          lt_save_LIBS="$LIBS"
3506
 
          lt_save_CFLAGS="$CFLAGS"
 
4911
          lt_globsym_save_LIBS=$LIBS
 
4912
          lt_globsym_save_CFLAGS=$CFLAGS
3507
4913
          LIBS="conftstm.$ac_objext"
3508
4914
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3509
4915
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3510
4916
            pipe_works=yes
3511
4917
          fi
3512
 
          LIBS="$lt_save_LIBS"
3513
 
          CFLAGS="$lt_save_CFLAGS"
 
4918
          LIBS=$lt_globsym_save_LIBS
 
4919
          CFLAGS=$lt_globsym_save_CFLAGS
3514
4920
        else
3515
4921
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3516
4922
        fi
3543
4949
  AC_MSG_RESULT(ok)
3544
4950
fi
3545
4951
 
 
4952
# Response file support.
 
4953
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
 
4954
  nm_file_list_spec='@'
 
4955
elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
 
4956
  nm_file_list_spec='@'
 
4957
fi
 
4958
 
3546
4959
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3547
4960
    [Take the output of nm and produce a listing of raw symbols and C names])
3548
4961
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3553
4966
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3554
4967
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3555
4968
    [Transform the output of nm in a C name address pair when lib prefix is needed])
 
4969
_LT_DECL([], [nm_file_list_spec], [1],
 
4970
    [Specify filename containing input files for $NM])
3556
4971
]) # _LT_CMD_GLOBAL_SYMBOLS
3557
4972
 
3558
4973
 
3564
4979
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3565
4980
_LT_TAGVAR(lt_prog_compiler_static, $1)=
3566
4981
 
3567
 
AC_MSG_CHECKING([for $compiler option to produce PIC])
3568
4982
m4_if([$1], [CXX], [
3569
4983
  # C++ specific cases for pic, static, wl, etc.
3570
4984
  if test "$GXX" = yes; then
3615
5029
      # DJGPP does not support shared libraries at all
3616
5030
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3617
5031
      ;;
 
5032
    haiku*)
 
5033
      # PIC is the default for Haiku.
 
5034
      # The "-static" flag exists, but is broken.
 
5035
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
5036
      ;;
3618
5037
    interix[[3-9]]*)
3619
5038
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3620
5039
      # Instead, we relocate shared libraries at runtime.
3664
5083
          ;;
3665
5084
        esac
3666
5085
        ;;
 
5086
      mingw* | cygwin* | os2* | pw32* | cegcc*)
 
5087
        # This hack is so that the source file can tell whether it is being
 
5088
        # built for inclusion in a dll (and should export symbols for example).
 
5089
        m4_if([$1], [GCJ], [],
 
5090
          [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
5091
        ;;
3667
5092
      dgux*)
3668
5093
        case $cc_basename in
3669
5094
          ec++*)
3753
5178
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3754
5179
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3755
5180
            ;;
3756
 
          xlc* | xlC*)
3757
 
            # IBM XL 8.0 on PPC
 
5181
          xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
 
5182
            # IBM XL 8.0, 9.0 on PPC and BlueGene
3758
5183
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3759
5184
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3760
5185
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3784
5209
            ;;
3785
5210
        esac
3786
5211
        ;;
3787
 
      netbsd* | netbsdelf*-gnu)
 
5212
      netbsd*)
3788
5213
        ;;
3789
5214
      *qnx* | *nto*)
3790
5215
        # QNX uses GNU C++, but need to define -shared option too, otherwise
3816
5241
        ;;
3817
5242
      solaris*)
3818
5243
        case $cc_basename in
3819
 
          CC*)
 
5244
          CC* | sunCC*)
3820
5245
            # Sun C++ 4.2, 5.x and Centerline C++
3821
5246
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3822
5247
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3920
5345
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3921
5346
      ;;
3922
5347
 
 
5348
    haiku*)
 
5349
      # PIC is the default for Haiku.
 
5350
      # The "-static" flag exists, but is broken.
 
5351
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
5352
      ;;
 
5353
 
3923
5354
    hpux*)
3924
5355
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3925
5356
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3962
5393
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3963
5394
      ;;
3964
5395
    esac
 
5396
 
 
5397
    case $cc_basename in
 
5398
    nvcc*) # Cuda Compiler Driver 2.2
 
5399
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
 
5400
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
 
5401
      ;;
 
5402
    esac
3965
5403
  else
3966
5404
    # PORTME Check for flag to pass linker flags through the system compiler.
3967
5405
    case $host_os in
4025
5463
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4026
5464
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4027
5465
        ;;
4028
 
      pgcc* | pgf77* | pgf90* | pgf95*)
 
5466
      nagfor*)
 
5467
        # NAG Fortran compiler
 
5468
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
 
5469
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5470
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5471
        ;;
 
5472
      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4029
5473
        # Portland Group compilers (*not* the Pentium gcc compiler,
4030
5474
        # which looks to be a dead project)
4031
5475
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4037
5481
        # All Alpha code is PIC.
4038
5482
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4039
5483
        ;;
4040
 
      xl*)
4041
 
        # IBM XL C 8.0/Fortran 10.1 on PPC
 
5484
      xl* | bgxl* | bgf* | mpixl*)
 
5485
        # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4042
5486
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4043
5487
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4044
5488
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4045
5489
        ;;
4046
5490
      *)
4047
5491
        case `$CC -V 2>&1 | sed 5q` in
 
5492
        *Sun\ F* | *Sun*Fortran*)
 
5493
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
 
5494
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5495
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5496
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 
5497
          ;;
4048
5498
        *Sun\ C*)
4049
5499
          # Sun C 5.9
4050
5500
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4051
5501
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4052
5502
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4053
5503
          ;;
4054
 
        *Sun\ F*)
4055
 
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
4056
 
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4057
 
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4058
 
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4059
 
          ;;
4060
5504
        esac
4061
5505
        ;;
4062
5506
      esac
4087
5531
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4088
5532
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4089
5533
      case $cc_basename in
4090
 
      f77* | f90* | f95*)
 
5534
      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4091
5535
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4092
5536
      *)
4093
5537
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4144
5588
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4145
5589
    ;;
4146
5590
esac
4147
 
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4148
 
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4149
 
        [How to pass a linker flag through the compiler])
 
5591
 
 
5592
AC_CACHE_CHECK([for $compiler option to produce PIC],
 
5593
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
 
5594
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
 
5595
_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4150
5596
 
4151
5597
#
4152
5598
# Check to make sure the PIC flag actually works.
4165
5611
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4166
5612
        [Additional compiler flags for building library objects])
4167
5613
 
 
5614
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
 
5615
        [How to pass a linker flag through the compiler])
4168
5616
#
4169
5617
# Check to make sure the static flag actually works.
4170
5618
#
4185
5633
m4_defun([_LT_LINKER_SHLIBS],
4186
5634
[AC_REQUIRE([LT_PATH_LD])dnl
4187
5635
AC_REQUIRE([LT_PATH_NM])dnl
 
5636
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4188
5637
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4189
5638
m4_require([_LT_DECL_EGREP])dnl
4190
5639
m4_require([_LT_DECL_SED])dnl
4193
5642
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4194
5643
m4_if([$1], [CXX], [
4195
5644
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5645
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4196
5646
  case $host_os in
4197
5647
  aix[[4-9]]*)
4198
5648
    # If we're using GNU nm, then we don't want the "-C" option.
4199
5649
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5650
    # Also, AIX nm treats weak defined symbols like other global defined
 
5651
    # symbols, whereas GNU nm marks them as "W".
4200
5652
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4201
 
      _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'
 
5653
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4202
5654
    else
4203
5655
      _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'
4204
5656
    fi
4205
5657
    ;;
4206
5658
  pw32*)
4207
5659
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4208
 
  ;;
 
5660
    ;;
4209
5661
  cygwin* | mingw* | cegcc*)
4210
 
    _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'
4211
 
  ;;
4212
 
  linux* | k*bsd*-gnu)
4213
 
    _LT_TAGVAR(link_all_deplibs, $1)=no
4214
 
  ;;
 
5662
    case $cc_basename in
 
5663
    cl*) ;;
 
5664
    *)
 
5665
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
 
5666
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
5667
      ;;
 
5668
    esac
 
5669
    ;;
4215
5670
  *)
4216
5671
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4217
 
  ;;
 
5672
    ;;
4218
5673
  esac
4219
 
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4220
5674
], [
4221
5675
  runpath_var=
4222
5676
  _LT_TAGVAR(allow_undefined_flag, $1)=
4276
5730
  openbsd*)
4277
5731
    with_gnu_ld=no
4278
5732
    ;;
4279
 
  linux* | k*bsd*-gnu)
4280
 
    _LT_TAGVAR(link_all_deplibs, $1)=no
4281
 
    ;;
4282
5733
  esac
4283
5734
 
4284
5735
  _LT_TAGVAR(ld_shlibs, $1)=yes
 
5736
 
 
5737
  # On some targets, GNU ld is compatible enough with the native linker
 
5738
  # that we're better off using the native interface for both.
 
5739
  lt_use_gnu_ld_interface=no
4285
5740
  if test "$with_gnu_ld" = yes; then
 
5741
    case $host_os in
 
5742
      aix*)
 
5743
        # The AIX port of GNU ld has always aspired to compatibility
 
5744
        # with the native linker.  However, as the warning in the GNU ld
 
5745
        # block says, versions before 2.19.5* couldn't really create working
 
5746
        # shared libraries, regardless of the interface used.
 
5747
        case `$LD -v 2>&1` in
 
5748
          *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
 
5749
          *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
 
5750
          *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
 
5751
          *)
 
5752
            lt_use_gnu_ld_interface=yes
 
5753
            ;;
 
5754
        esac
 
5755
        ;;
 
5756
      *)
 
5757
        lt_use_gnu_ld_interface=yes
 
5758
        ;;
 
5759
    esac
 
5760
  fi
 
5761
 
 
5762
  if test "$lt_use_gnu_ld_interface" = yes; then
4286
5763
    # If archive_cmds runs LD, not CC, wlarc should be empty
4287
5764
    wlarc='${wl}'
4288
5765
 
4316
5793
        _LT_TAGVAR(ld_shlibs, $1)=no
4317
5794
        cat <<_LT_EOF 1>&2
4318
5795
 
4319
 
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
5796
*** Warning: the GNU linker, at least up to release 2.19, is reported
4320
5797
*** to be unable to reliably create shared libraries on AIX.
4321
5798
*** Therefore, libtool is disabling shared libraries support.  If you
4322
 
*** really care for shared libraries, you may want to modify your PATH
4323
 
*** so that a non-GNU linker is found, and then restart.
 
5799
*** really care for shared libraries, you may want to install binutils
 
5800
*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
 
5801
*** You will then need to restart the configuration process.
4324
5802
 
4325
5803
_LT_EOF
4326
5804
      fi
4356
5834
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4357
5835
      # as there is no search path for DLLs.
4358
5836
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5837
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4359
5838
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4360
5839
      _LT_TAGVAR(always_export_symbols, $1)=no
4361
5840
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4362
 
      _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'
 
5841
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
 
5842
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4363
5843
 
4364
5844
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4365
5845
        _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'
4377
5857
      fi
4378
5858
      ;;
4379
5859
 
 
5860
    haiku*)
 
5861
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5862
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
5863
      ;;
 
5864
 
4380
5865
    interix[[3-9]]*)
4381
5866
      _LT_TAGVAR(hardcode_direct, $1)=no
4382
5867
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4402
5887
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4403
5888
         && test "$tmp_diet" = no
4404
5889
      then
4405
 
        tmp_addflag=
 
5890
        tmp_addflag=' $pic_flag'
4406
5891
        tmp_sharedflag='-shared'
4407
5892
        case $cc_basename,$host_cpu in
4408
5893
        pgcc*)                          # Portland Group C compiler
4409
 
          _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'
 
5894
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4410
5895
          tmp_addflag=' $pic_flag'
4411
5896
          ;;
4412
 
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
4413
 
          _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'
 
5897
        pgf77* | pgf90* | pgf95* | pgfortran*)
 
5898
                                        # Portland Group f77 and f90 compilers
 
5899
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4414
5900
          tmp_addflag=' $pic_flag -Mnomain' ;;
4415
5901
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
4416
5902
          tmp_addflag=' -i_dynamic' ;;
4421
5907
        lf95*)                          # Lahey Fortran 8.1
4422
5908
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
4423
5909
          tmp_sharedflag='--shared' ;;
4424
 
        xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
 
5910
        xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4425
5911
          tmp_sharedflag='-qmkshrobj'
4426
5912
          tmp_addflag= ;;
 
5913
        nvcc*)  # Cuda Compiler Driver 2.2
 
5914
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
5915
          _LT_TAGVAR(compiler_needs_object, $1)=yes
 
5916
          ;;
4427
5917
        esac
4428
5918
        case `$CC -V 2>&1 | sed 5q` in
4429
5919
        *Sun\ C*)                       # Sun C 5.9
4430
 
          _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'
 
5920
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4431
5921
          _LT_TAGVAR(compiler_needs_object, $1)=yes
4432
5922
          tmp_sharedflag='-G' ;;
4433
5923
        *Sun\ F*)                       # Sun Fortran 8.3
4443
5933
        fi
4444
5934
 
4445
5935
        case $cc_basename in
4446
 
        xlf*)
 
5936
        xlf* | bgf* | bgxlf* | mpixlf*)
4447
5937
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4448
5938
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4449
5939
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4450
5940
          _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4451
 
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
 
5941
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4452
5942
          if test "x$supports_anon_versioning" = xyes; then
4453
5943
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4454
5944
              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4455
5945
              echo "local: *; };" >> $output_objdir/$libname.ver~
4456
 
              $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 
5946
              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4457
5947
          fi
4458
5948
          ;;
4459
5949
        esac
4462
5952
      fi
4463
5953
      ;;
4464
5954
 
4465
 
    netbsd* | netbsdelf*-gnu)
 
5955
    netbsd*)
4466
5956
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4467
5957
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4468
5958
        wlarc=
4469
5959
      else
4470
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4471
 
        _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'
 
5960
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5961
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4472
5962
      fi
4473
5963
      ;;
4474
5964
 
4486
5976
 
4487
5977
_LT_EOF
4488
5978
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4489
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4490
 
        _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'
 
5979
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5980
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4491
5981
      else
4492
5982
        _LT_TAGVAR(ld_shlibs, $1)=no
4493
5983
      fi
4533
6023
 
4534
6024
    *)
4535
6025
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4536
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4537
 
        _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'
 
6026
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6027
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4538
6028
      else
4539
6029
        _LT_TAGVAR(ld_shlibs, $1)=no
4540
6030
      fi
4574
6064
      else
4575
6065
        # If we're using GNU nm, then we don't want the "-C" option.
4576
6066
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
6067
        # Also, AIX nm treats weak defined symbols like other global
 
6068
        # defined symbols, whereas GNU nm marks them as "W".
4577
6069
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4578
 
          _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'
 
6070
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4579
6071
        else
4580
6072
          _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'
4581
6073
        fi
4637
6129
        if test "$aix_use_runtimelinking" = yes; then
4638
6130
          shared_flag="$shared_flag "'${wl}-G'
4639
6131
        fi
4640
 
        _LT_TAGVAR(link_all_deplibs, $1)=no
4641
6132
      else
4642
6133
        # not using gcc
4643
6134
        if test "$host_cpu" = ia64; then
4663
6154
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4664
6155
        # Determine the default libpath from the value encoded in an
4665
6156
        # empty executable.
4666
 
        _LT_SYS_MODULE_PATH_AIX
 
6157
        _LT_SYS_MODULE_PATH_AIX([$1])
4667
6158
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4668
 
        _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"
 
6159
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4669
6160
      else
4670
6161
        if test "$host_cpu" = ia64; then
4671
6162
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4674
6165
        else
4675
6166
         # Determine the default libpath from the value encoded in an
4676
6167
         # empty executable.
4677
 
         _LT_SYS_MODULE_PATH_AIX
 
6168
         _LT_SYS_MODULE_PATH_AIX([$1])
4678
6169
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4679
6170
          # Warning - without using the other run time loading flags,
4680
6171
          # -berok will link without error, but may produce a broken library.
4681
6172
          _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4682
6173
          _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4683
 
          # Exported symbols can be pulled into shared objects from archives
4684
 
          _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
6174
          if test "$with_gnu_ld" = yes; then
 
6175
            # We only use this code for GNU lds that support --whole-archive.
 
6176
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
6177
          else
 
6178
            # Exported symbols can be pulled into shared objects from archives
 
6179
            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
6180
          fi
4685
6181
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4686
6182
          # This is similar to how AIX traditionally builds its shared libraries.
4687
6183
          _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'
4713
6209
      # Microsoft Visual C++.
4714
6210
      # hardcode_libdir_flag_spec is actually meaningless, as there is
4715
6211
      # no search path for DLLs.
4716
 
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4717
 
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4718
 
      # Tell ltmain to make .lib files, not .a files.
4719
 
      libext=lib
4720
 
      # Tell ltmain to make .dll files, not .so files.
4721
 
      shrext_cmds=".dll"
4722
 
      # FIXME: Setting linknames here is a bad hack.
4723
 
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4724
 
      # The linker will automatically build a .lib file if we build a DLL.
4725
 
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4726
 
      # FIXME: Should let the user specify the lib program.
4727
 
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4728
 
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4729
 
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6212
      case $cc_basename in
 
6213
      cl*)
 
6214
        # Native MSVC
 
6215
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
6216
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6217
        _LT_TAGVAR(always_export_symbols, $1)=yes
 
6218
        _LT_TAGVAR(file_list_spec, $1)='@'
 
6219
        # Tell ltmain to make .lib files, not .a files.
 
6220
        libext=lib
 
6221
        # Tell ltmain to make .dll files, not .so files.
 
6222
        shrext_cmds=".dll"
 
6223
        # FIXME: Setting linknames here is a bad hack.
 
6224
        _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
 
6225
        _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
6226
            sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
 
6227
          else
 
6228
            sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
 
6229
          fi~
 
6230
          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
 
6231
          linknames='
 
6232
        # The linker will not automatically build a static lib if we build a DLL.
 
6233
        # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
6234
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6235
        _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'
 
6236
        # Don't use ranlib
 
6237
        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 
6238
        _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
 
6239
          lt_tool_outputfile="@TOOL_OUTPUT@"~
 
6240
          case $lt_outputfile in
 
6241
            *.exe|*.EXE) ;;
 
6242
            *)
 
6243
              lt_outputfile="$lt_outputfile.exe"
 
6244
              lt_tool_outputfile="$lt_tool_outputfile.exe"
 
6245
              ;;
 
6246
          esac~
 
6247
          if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
 
6248
            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
 
6249
            $RM "$lt_outputfile.manifest";
 
6250
          fi'
 
6251
        ;;
 
6252
      *)
 
6253
        # Assume MSVC wrapper
 
6254
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
6255
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6256
        # Tell ltmain to make .lib files, not .a files.
 
6257
        libext=lib
 
6258
        # Tell ltmain to make .dll files, not .so files.
 
6259
        shrext_cmds=".dll"
 
6260
        # FIXME: Setting linknames here is a bad hack.
 
6261
        _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
 
6262
        # The linker will automatically build a .lib file if we build a DLL.
 
6263
        _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
6264
        # FIXME: Should let the user specify the lib program.
 
6265
        _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
 
6266
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6267
        ;;
 
6268
      esac
4730
6269
      ;;
4731
6270
 
4732
6271
    darwin* | rhapsody*)
4764
6303
 
4765
6304
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4766
6305
    freebsd* | dragonfly*)
4767
 
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
6306
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4768
6307
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4769
6308
      _LT_TAGVAR(hardcode_direct, $1)=yes
4770
6309
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4772
6311
 
4773
6312
    hpux9*)
4774
6313
      if test "$GCC" = yes; then
4775
 
        _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'
 
6314
        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4776
6315
      else
4777
6316
        _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'
4778
6317
      fi
4787
6326
      ;;
4788
6327
 
4789
6328
    hpux10*)
4790
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4791
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6329
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 
6330
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4792
6331
      else
4793
6332
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4794
6333
      fi
4806
6345
      ;;
4807
6346
 
4808
6347
    hpux11*)
4809
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6348
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
4810
6349
        case $host_cpu in
4811
6350
        hppa*64*)
4812
6351
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4813
6352
          ;;
4814
6353
        ia64*)
4815
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
6354
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4816
6355
          ;;
4817
6356
        *)
4818
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6357
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4819
6358
          ;;
4820
6359
        esac
4821
6360
      else
4827
6366
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4828
6367
          ;;
4829
6368
        *)
4830
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6369
        m4_if($1, [], [
 
6370
          # Older versions of the 11.00 compiler do not understand -b yet
 
6371
          # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
 
6372
          _LT_LINKER_OPTION([if $CC understands -b],
 
6373
            _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
 
6374
            [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
 
6375
            [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
 
6376
          [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
4831
6377
          ;;
4832
6378
        esac
4833
6379
      fi
4855
6401
 
4856
6402
    irix5* | irix6* | nonstopux*)
4857
6403
      if test "$GCC" = yes; then
4858
 
        _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'
 
6404
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4859
6405
        # Try to use the -exported_symbol ld option, if it does not
4860
6406
        # work, assume that -exports_file does not work either and
4861
6407
        # implicitly export all symbols.
4862
 
        save_LDFLAGS="$LDFLAGS"
4863
 
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4864
 
        AC_LINK_IFELSE(int foo(void) {},
4865
 
          _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'
4866
 
        )
4867
 
        LDFLAGS="$save_LDFLAGS"
 
6408
        # This should be the same for all languages, so no per-tag cache variable.
 
6409
        AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
 
6410
          [lt_cv_irix_exported_symbol],
 
6411
          [save_LDFLAGS="$LDFLAGS"
 
6412
           LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
 
6413
           AC_LINK_IFELSE(
 
6414
             [AC_LANG_SOURCE(
 
6415
                [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
 
6416
                              [C++], [[int foo (void) { return 0; }]],
 
6417
                              [Fortran 77], [[
 
6418
      subroutine foo
 
6419
      end]],
 
6420
                              [Fortran], [[
 
6421
      subroutine foo
 
6422
      end]])])],
 
6423
              [lt_cv_irix_exported_symbol=yes],
 
6424
              [lt_cv_irix_exported_symbol=no])
 
6425
           LDFLAGS="$save_LDFLAGS"])
 
6426
        if test "$lt_cv_irix_exported_symbol" = yes; then
 
6427
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
6428
        fi
4868
6429
      else
4869
 
        _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'
4870
 
        _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'
 
6430
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
6431
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4871
6432
      fi
4872
6433
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4873
6434
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4876
6437
      _LT_TAGVAR(link_all_deplibs, $1)=yes
4877
6438
      ;;
4878
6439
 
4879
 
    netbsd* | netbsdelf*-gnu)
 
6440
    netbsd*)
4880
6441
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4881
6442
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4882
6443
      else
4929
6490
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4930
6491
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4931
6492
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4932
 
      _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'
 
6493
      _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'
4933
6494
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4934
6495
      ;;
4935
6496
 
4936
6497
    osf3*)
4937
6498
      if test "$GCC" = yes; then
4938
6499
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4939
 
        _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'
 
6500
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4940
6501
      else
4941
6502
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4942
 
        _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'
 
6503
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
4943
6504
      fi
4944
6505
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4945
6506
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4949
6510
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
4950
6511
      if test "$GCC" = yes; then
4951
6512
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4952
 
        _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'
 
6513
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4953
6514
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4954
6515
      else
4955
6516
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4956
 
        _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'
 
6517
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
4957
6518
        _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~
4958
 
        $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'
 
6519
        $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4959
6520
 
4960
6521
        # Both c and cxx compiler support -rpath directly
4961
6522
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4968
6529
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4969
6530
      if test "$GCC" = yes; then
4970
6531
        wlarc='${wl}'
4971
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6532
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4972
6533
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4973
 
          $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
6534
          $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4974
6535
      else
4975
6536
        case `$CC -V 2>&1` in
4976
6537
        *"Compilers 5.0"*)
5146
6707
      # Test whether the compiler implicitly links with -lc since on some
5147
6708
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5148
6709
      # to ld, don't add -lc before -lgcc.
5149
 
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5150
 
      $RM conftest*
5151
 
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6710
      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
 
6711
        [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
 
6712
        [$RM conftest*
 
6713
        echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5152
6714
 
5153
 
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5154
 
        soname=conftest
5155
 
        lib=conftest
5156
 
        libobjs=conftest.$ac_objext
5157
 
        deplibs=
5158
 
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5159
 
        pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5160
 
        compiler_flags=-v
5161
 
        linker_flags=-v
5162
 
        verstring=
5163
 
        output_objdir=.
5164
 
        libname=conftest
5165
 
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5166
 
        _LT_TAGVAR(allow_undefined_flag, $1)=
5167
 
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5168
 
        then
5169
 
          _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5170
 
        else
5171
 
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5172
 
        fi
5173
 
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5174
 
      else
5175
 
        cat conftest.err 1>&5
5176
 
      fi
5177
 
      $RM conftest*
5178
 
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
 
6715
        if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
6716
          soname=conftest
 
6717
          lib=conftest
 
6718
          libobjs=conftest.$ac_objext
 
6719
          deplibs=
 
6720
          wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
 
6721
          pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
 
6722
          compiler_flags=-v
 
6723
          linker_flags=-v
 
6724
          verstring=
 
6725
          output_objdir=.
 
6726
          libname=conftest
 
6727
          lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
 
6728
          _LT_TAGVAR(allow_undefined_flag, $1)=
 
6729
          if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
 
6730
          then
 
6731
            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6732
          else
 
6733
            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6734
          fi
 
6735
          _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
6736
        else
 
6737
          cat conftest.err 1>&5
 
6738
        fi
 
6739
        $RM conftest*
 
6740
        ])
 
6741
      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5179
6742
      ;;
5180
6743
    esac
5181
6744
  fi
5240
6803
    to runtime path list])
5241
6804
_LT_TAGDECL([], [link_all_deplibs], [0],
5242
6805
    [Whether libtool must link a program against all its dependency libraries])
5243
 
_LT_TAGDECL([], [fix_srcfile_path], [1],
5244
 
    [Fix the shell variable $srcfile for the compiler])
5245
6806
_LT_TAGDECL([], [always_export_symbols], [0],
5246
6807
    [Set to "yes" if exported symbols are required])
5247
6808
_LT_TAGDECL([], [export_symbols_cmds], [2],
5252
6813
    [Symbols that must always be exported])
5253
6814
_LT_TAGDECL([], [prelink_cmds], [2],
5254
6815
    [Commands necessary for linking programs (against libraries) with templates])
 
6816
_LT_TAGDECL([], [postlink_cmds], [2],
 
6817
    [Commands necessary for finishing linking programs])
5255
6818
_LT_TAGDECL([], [file_list_spec], [1],
5256
6819
    [Specify filename containing input files])
5257
6820
dnl FIXME: Not yet implemented
5341
6904
])# _LT_LANG_C_CONFIG
5342
6905
 
5343
6906
 
5344
 
# _LT_PROG_CXX
5345
 
# ------------
5346
 
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5347
 
# compiler, we have our own version here.
5348
 
m4_defun([_LT_PROG_CXX],
5349
 
[
5350
 
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5351
 
AC_PROG_CXX
 
6907
# _LT_LANG_CXX_CONFIG([TAG])
 
6908
# --------------------------
 
6909
# Ensure that the configuration variables for a C++ compiler are suitably
 
6910
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
6911
# the compiler configuration to `libtool'.
 
6912
m4_defun([_LT_LANG_CXX_CONFIG],
 
6913
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
6914
m4_require([_LT_DECL_EGREP])dnl
 
6915
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5352
6916
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5353
6917
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5354
6918
    (test "X$CXX" != "Xg++"))) ; then
5356
6920
else
5357
6921
  _lt_caught_CXX_error=yes
5358
6922
fi
5359
 
popdef([AC_MSG_ERROR])
5360
 
])# _LT_PROG_CXX
5361
 
 
5362
 
dnl aclocal-1.4 backwards compatibility:
5363
 
dnl AC_DEFUN([_LT_PROG_CXX], [])
5364
 
 
5365
 
 
5366
 
# _LT_LANG_CXX_CONFIG([TAG])
5367
 
# --------------------------
5368
 
# Ensure that the configuration variables for a C++ compiler are suitably
5369
 
# defined.  These variables are subsequently used by _LT_CONFIG to write
5370
 
# the compiler configuration to `libtool'.
5371
 
m4_defun([_LT_LANG_CXX_CONFIG],
5372
 
[AC_REQUIRE([_LT_PROG_CXX])dnl
5373
 
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5374
 
m4_require([_LT_DECL_EGREP])dnl
5375
6923
 
5376
6924
AC_LANG_PUSH(C++)
5377
6925
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5393
6941
_LT_TAGVAR(module_expsym_cmds, $1)=
5394
6942
_LT_TAGVAR(link_all_deplibs, $1)=unknown
5395
6943
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
6944
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
6945
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5396
6946
_LT_TAGVAR(no_undefined_flag, $1)=
5397
6947
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5398
6948
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5424
6974
 
5425
6975
  # Allow CC to be a program name with arguments.
5426
6976
  lt_save_CC=$CC
 
6977
  lt_save_CFLAGS=$CFLAGS
5427
6978
  lt_save_LD=$LD
5428
6979
  lt_save_GCC=$GCC
5429
6980
  GCC=$GXX
5441
6992
  fi
5442
6993
  test -z "${LDCXX+set}" || LD=$LDCXX
5443
6994
  CC=${CXX-"c++"}
 
6995
  CFLAGS=$CXXFLAGS
5444
6996
  compiler=$CC
5445
6997
  _LT_TAGVAR(compiler, $1)=$CC
5446
6998
  _LT_CC_BASENAME([$compiler])
5462
7014
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5463
7015
      # archiving commands below assume that GNU ld is being used.
5464
7016
      if test "$with_gnu_ld" = yes; then
5465
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5466
 
        _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'
 
7017
        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7018
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5467
7019
 
5468
7020
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5469
7021
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5495
7047
      # Commands to make compiler produce verbose output that lists
5496
7048
      # what "hidden" libraries, object files and flags are used when
5497
7049
      # linking a shared library.
5498
 
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
7050
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5499
7051
 
5500
7052
    else
5501
7053
      GXX=no
5604
7156
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5605
7157
          # Determine the default libpath from the value encoded in an empty
5606
7158
          # executable.
5607
 
          _LT_SYS_MODULE_PATH_AIX
 
7159
          _LT_SYS_MODULE_PATH_AIX([$1])
5608
7160
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5609
7161
 
5610
 
          _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"
 
7162
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5611
7163
        else
5612
7164
          if test "$host_cpu" = ia64; then
5613
7165
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5616
7168
          else
5617
7169
            # Determine the default libpath from the value encoded in an
5618
7170
            # empty executable.
5619
 
            _LT_SYS_MODULE_PATH_AIX
 
7171
            _LT_SYS_MODULE_PATH_AIX([$1])
5620
7172
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5621
7173
            # Warning - without using the other run time loading flags,
5622
7174
            # -berok will link without error, but may produce a broken library.
5623
7175
            _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5624
7176
            _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5625
 
            # Exported symbols can be pulled into shared objects from archives
5626
 
            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
7177
            if test "$with_gnu_ld" = yes; then
 
7178
              # We only use this code for GNU lds that support --whole-archive.
 
7179
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
7180
            else
 
7181
              # Exported symbols can be pulled into shared objects from archives
 
7182
              _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
7183
            fi
5627
7184
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5628
7185
            # This is similar to how AIX traditionally builds its shared
5629
7186
            # libraries.
5653
7210
        ;;
5654
7211
 
5655
7212
      cygwin* | mingw* | pw32* | cegcc*)
5656
 
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5657
 
        # as there is no search path for DLLs.
5658
 
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5659
 
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5660
 
        _LT_TAGVAR(always_export_symbols, $1)=no
5661
 
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
7213
        case $GXX,$cc_basename in
 
7214
        ,cl* | no,cl*)
 
7215
          # Native MSVC
 
7216
          # hardcode_libdir_flag_spec is actually meaningless, as there is
 
7217
          # no search path for DLLs.
 
7218
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
7219
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7220
          _LT_TAGVAR(always_export_symbols, $1)=yes
 
7221
          _LT_TAGVAR(file_list_spec, $1)='@'
 
7222
          # Tell ltmain to make .lib files, not .a files.
 
7223
          libext=lib
 
7224
          # Tell ltmain to make .dll files, not .so files.
 
7225
          shrext_cmds=".dll"
 
7226
          # FIXME: Setting linknames here is a bad hack.
 
7227
          _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
 
7228
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
7229
              $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
 
7230
            else
 
7231
              $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
 
7232
            fi~
 
7233
            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
 
7234
            linknames='
 
7235
          # The linker will not automatically build a static lib if we build a DLL.
 
7236
          # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
7237
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
7238
          # Don't use ranlib
 
7239
          _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 
7240
          _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
 
7241
            lt_tool_outputfile="@TOOL_OUTPUT@"~
 
7242
            case $lt_outputfile in
 
7243
              *.exe|*.EXE) ;;
 
7244
              *)
 
7245
                lt_outputfile="$lt_outputfile.exe"
 
7246
                lt_tool_outputfile="$lt_tool_outputfile.exe"
 
7247
                ;;
 
7248
            esac~
 
7249
            func_to_tool_file "$lt_outputfile"~
 
7250
            if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
 
7251
              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
 
7252
              $RM "$lt_outputfile.manifest";
 
7253
            fi'
 
7254
          ;;
 
7255
        *)
 
7256
          # g++
 
7257
          # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
7258
          # as there is no search path for DLLs.
 
7259
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7260
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
 
7261
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7262
          _LT_TAGVAR(always_export_symbols, $1)=no
 
7263
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5662
7264
 
5663
 
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5664
 
          _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'
5665
 
          # If the export-symbols file already is a .def file (1st line
5666
 
          # is EXPORTS), use it as is; otherwise, prepend...
5667
 
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5668
 
            cp $export_symbols $output_objdir/$soname.def;
5669
 
          else
5670
 
            echo EXPORTS > $output_objdir/$soname.def;
5671
 
            cat $export_symbols >> $output_objdir/$soname.def;
5672
 
          fi~
5673
 
          $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'
5674
 
        else
5675
 
          _LT_TAGVAR(ld_shlibs, $1)=no
5676
 
        fi
5677
 
        ;;
 
7265
          if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
7266
            _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'
 
7267
            # If the export-symbols file already is a .def file (1st line
 
7268
            # is EXPORTS), use it as is; otherwise, prepend...
 
7269
            _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
7270
              cp $export_symbols $output_objdir/$soname.def;
 
7271
            else
 
7272
              echo EXPORTS > $output_objdir/$soname.def;
 
7273
              cat $export_symbols >> $output_objdir/$soname.def;
 
7274
            fi~
 
7275
            $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'
 
7276
          else
 
7277
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7278
          fi
 
7279
          ;;
 
7280
        esac
 
7281
        ;;
5678
7282
      darwin* | rhapsody*)
5679
7283
        _LT_DARWIN_LINKER_FEATURES($1)
5680
7284
        ;;
5716
7320
      gnu*)
5717
7321
        ;;
5718
7322
 
 
7323
      haiku*)
 
7324
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7325
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7326
        ;;
 
7327
 
5719
7328
      hpux9*)
5720
7329
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5721
7330
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5740
7349
            # explicitly linking system object files so we need to strip them
5741
7350
            # from the output so that they don't get included in the library
5742
7351
            # dependencies.
5743
 
            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'
 
7352
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
5744
7353
            ;;
5745
7354
          *)
5746
7355
            if test "$GXX" = yes; then
5747
 
              _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'
 
7356
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5748
7357
            else
5749
7358
              # FIXME: insert proper C++ library support
5750
7359
              _LT_TAGVAR(ld_shlibs, $1)=no
5805
7414
            # explicitly linking system object files so we need to strip them
5806
7415
            # from the output so that they don't get included in the library
5807
7416
            # dependencies.
5808
 
            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'
 
7417
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
5809
7418
            ;;
5810
7419
          *)
5811
7420
            if test "$GXX" = yes; then
5815
7424
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5816
7425
                    ;;
5817
7426
                  ia64*)
5818
 
                    _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'
 
7427
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5819
7428
                    ;;
5820
7429
                  *)
5821
 
                    _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'
 
7430
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5822
7431
                    ;;
5823
7432
                esac
5824
7433
              fi
5848
7457
        case $cc_basename in
5849
7458
          CC*)
5850
7459
            # SGI C++
5851
 
            _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'
 
7460
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5852
7461
 
5853
7462
            # Archives containing C++ object files must be created using
5854
7463
            # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5859
7468
          *)
5860
7469
            if test "$GXX" = yes; then
5861
7470
              if test "$with_gnu_ld" = no; then
5862
 
                _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'
 
7471
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5863
7472
              else
5864
 
                _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'
 
7473
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
5865
7474
              fi
5866
7475
            fi
5867
7476
            _LT_TAGVAR(link_all_deplibs, $1)=yes
5890
7499
            # explicitly linking system object files so we need to strip them
5891
7500
            # from the output so that they don't get included in the library
5892
7501
            # dependencies.
5893
 
            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'
 
7502
            output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
5894
7503
 
5895
7504
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5896
7505
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5927
7536
          pgCC* | pgcpp*)
5928
7537
            # Portland Group C++ compiler
5929
7538
            case `$CC -V` in
5930
 
            *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
 
7539
            *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
5931
7540
              _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5932
7541
                rm -rf $tpldir~
5933
7542
                $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5934
 
                compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
 
7543
                compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
5935
7544
              _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5936
7545
                rm -rf $tpldir~
5937
7546
                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5938
 
                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
 
7547
                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
5939
7548
                $RANLIB $oldlib'
5940
7549
              _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5941
7550
                rm -rf $tpldir~
5942
7551
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5943
 
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
7552
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5944
7553
              _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5945
7554
                rm -rf $tpldir~
5946
7555
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5947
 
                $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'
 
7556
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5948
7557
              ;;
5949
 
            *) # Version 6 will use weak symbols
 
7558
            *) # Version 6 and above use weak symbols
5950
7559
              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5951
7560
              _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'
5952
7561
              ;;
5954
7563
 
5955
7564
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5956
7565
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5957
 
            _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'
 
7566
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5958
7567
            ;;
5959
7568
          cxx*)
5960
7569
            # Compaq C++
5973
7582
            # explicitly linking system object files so we need to strip them
5974
7583
            # from the output so that they don't get included in the library
5975
7584
            # dependencies.
5976
 
            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'
 
7585
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
5977
7586
            ;;
5978
 
          xl*)
 
7587
          xl* | mpixl* | bgxl*)
5979
7588
            # IBM XL 8.0 on PPC, with GNU ld
5980
7589
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5981
7590
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5995
7604
              _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5996
7605
              _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'
5997
7606
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5998
 
              _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'
 
7607
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5999
7608
              _LT_TAGVAR(compiler_needs_object, $1)=yes
6000
7609
 
6001
7610
              # Not sure whether something based on
6002
7611
              # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6003
7612
              # would be better.
6004
 
              output_verbose_link_cmd='echo'
 
7613
              output_verbose_link_cmd='func_echo_all'
6005
7614
 
6006
7615
              # Archives containing C++ object files must be created using
6007
7616
              # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6070
7679
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6071
7680
            _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6072
7681
          fi
6073
 
          output_verbose_link_cmd=echo
 
7682
          output_verbose_link_cmd=func_echo_all
6074
7683
        else
6075
7684
          _LT_TAGVAR(ld_shlibs, $1)=no
6076
7685
        fi
6105
7714
            case $host in
6106
7715
              osf3*)
6107
7716
                _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6108
 
                _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'
 
7717
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6109
7718
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6110
7719
                ;;
6111
7720
              *)
6112
7721
                _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6113
 
                _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'
 
7722
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6114
7723
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6115
7724
                  echo "-hidden">> $lib.exp~
6116
 
                  $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~
 
7725
                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6117
7726
                  $RM $lib.exp'
6118
7727
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6119
7728
                ;;
6129
7738
            # explicitly linking system object files so we need to strip them
6130
7739
            # from the output so that they don't get included in the library
6131
7740
            # dependencies.
6132
 
            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'
 
7741
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6133
7742
            ;;
6134
7743
          *)
6135
7744
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6136
7745
              _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6137
7746
              case $host in
6138
7747
                osf3*)
6139
 
                  _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'
 
7748
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6140
7749
                  ;;
6141
7750
                *)
6142
 
                  _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'
 
7751
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6143
7752
                  ;;
6144
7753
              esac
6145
7754
 
6149
7758
              # Commands to make compiler produce verbose output that lists
6150
7759
              # what "hidden" libraries, object files and flags are used when
6151
7760
              # linking a shared library.
6152
 
              output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
7761
              output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6153
7762
 
6154
7763
            else
6155
7764
              # FIXME: insert proper C++ library support
6185
7794
 
6186
7795
      solaris*)
6187
7796
        case $cc_basename in
6188
 
          CC*)
 
7797
          CC* | sunCC*)
6189
7798
            # Sun C++ 4.2, 5.x and Centerline C++
6190
7799
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6191
7800
            _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6206
7815
            esac
6207
7816
            _LT_TAGVAR(link_all_deplibs, $1)=yes
6208
7817
 
6209
 
            output_verbose_link_cmd='echo'
 
7818
            output_verbose_link_cmd='func_echo_all'
6210
7819
 
6211
7820
            # Archives containing C++ object files must be created using
6212
7821
            # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6226
7835
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6227
7836
              _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6228
7837
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6229
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
7838
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6230
7839
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6231
 
                  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
7840
                  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6232
7841
 
6233
7842
                # Commands to make compiler produce verbose output that lists
6234
7843
                # what "hidden" libraries, object files and flags are used when
6235
7844
                # linking a shared library.
6236
 
                output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
7845
                output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6237
7846
              else
6238
7847
                # g++ 2.7 appears to require `-G' NOT `-shared' on this
6239
7848
                # platform.
6244
7853
                # Commands to make compiler produce verbose output that lists
6245
7854
                # what "hidden" libraries, object files and flags are used when
6246
7855
                # linking a shared library.
6247
 
                output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
7856
                output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6248
7857
              fi
6249
7858
 
6250
7859
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6298
7907
          CC*)
6299
7908
            _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6300
7909
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7910
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
 
7911
              '"$_LT_TAGVAR(old_archive_cmds, $1)"
 
7912
            _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
 
7913
              '"$_LT_TAGVAR(reload_cmds, $1)"
6301
7914
            ;;
6302
7915
          *)
6303
7916
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6353
7966
  fi # test -n "$compiler"
6354
7967
 
6355
7968
  CC=$lt_save_CC
 
7969
  CFLAGS=$lt_save_CFLAGS
6356
7970
  LDCXX=$LD
6357
7971
  LD=$lt_save_LD
6358
7972
  GCC=$lt_save_GCC
6367
7981
])# _LT_LANG_CXX_CONFIG
6368
7982
 
6369
7983
 
 
7984
# _LT_FUNC_STRIPNAME_CNF
 
7985
# ----------------------
 
7986
# func_stripname_cnf prefix suffix name
 
7987
# strip PREFIX and SUFFIX off of NAME.
 
7988
# PREFIX and SUFFIX must not contain globbing or regex special
 
7989
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
7990
# dot (in which case that matches only a dot).
 
7991
#
 
7992
# This function is identical to the (non-XSI) version of func_stripname,
 
7993
# except this one can be used by m4 code that may be executed by configure,
 
7994
# rather than the libtool script.
 
7995
m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
 
7996
AC_REQUIRE([_LT_DECL_SED])
 
7997
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
 
7998
func_stripname_cnf ()
 
7999
{
 
8000
  case ${2} in
 
8001
  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
 
8002
  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
 
8003
  esac
 
8004
} # func_stripname_cnf
 
8005
])# _LT_FUNC_STRIPNAME_CNF
 
8006
 
6370
8007
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6371
8008
# ---------------------------------
6372
8009
# Figure out "hidden" library dependencies from verbose
6375
8012
# objects, libraries and library flags.
6376
8013
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6377
8014
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
8015
AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6378
8016
# Dependencies to place before and after the object being linked:
6379
8017
_LT_TAGVAR(predep_objects, $1)=
6380
8018
_LT_TAGVAR(postdep_objects, $1)=
6425
8063
};
6426
8064
_LT_EOF
6427
8065
])
 
8066
 
 
8067
_lt_libdeps_save_CFLAGS=$CFLAGS
 
8068
case "$CC $CFLAGS " in #(
 
8069
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 
8070
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
 
8071
esac
 
8072
 
6428
8073
dnl Parse the compiler output and extract the necessary
6429
8074
dnl objects, libraries and library flags.
6430
8075
if AC_TRY_EVAL(ac_compile); then
6436
8081
  pre_test_object_deps_done=no
6437
8082
 
6438
8083
  for p in `eval "$output_verbose_link_cmd"`; do
6439
 
    case $p in
 
8084
    case ${prev}${p} in
6440
8085
 
6441
8086
    -L* | -R* | -l*)
6442
8087
       # Some compilers place space between "-{L,R}" and the path.
6445
8090
          test $p = "-R"; then
6446
8091
         prev=$p
6447
8092
         continue
6448
 
       else
6449
 
         prev=
6450
8093
       fi
6451
8094
 
 
8095
       # Expand the sysroot to ease extracting the directories later.
 
8096
       if test -z "$prev"; then
 
8097
         case $p in
 
8098
         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
 
8099
         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
 
8100
         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
 
8101
         esac
 
8102
       fi
 
8103
       case $p in
 
8104
       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
 
8105
       esac
6452
8106
       if test "$pre_test_object_deps_done" = no; then
6453
 
         case $p in
6454
 
         -L* | -R*)
 
8107
         case ${prev} in
 
8108
         -L | -R)
6455
8109
           # Internal compiler library paths should come after those
6456
8110
           # provided the user.  The postdeps already come after the
6457
8111
           # user supplied libs so there is no need to process them.
6471
8125
           _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6472
8126
         fi
6473
8127
       fi
 
8128
       prev=
6474
8129
       ;;
6475
8130
 
 
8131
    *.lto.$objext) ;; # Ignore GCC LTO objects
6476
8132
    *.$objext)
6477
8133
       # This assumes that the test object file only shows up
6478
8134
       # once in the compiler output.
6508
8164
fi
6509
8165
 
6510
8166
$RM -f confest.$objext
 
8167
CFLAGS=$_lt_libdeps_save_CFLAGS
6511
8168
 
6512
8169
# PORTME: override above test on systems where it is broken
6513
8170
m4_if([$1], [CXX],
6544
8201
 
6545
8202
solaris*)
6546
8203
  case $cc_basename in
6547
 
  CC*)
 
8204
  CC* | sunCC*)
6548
8205
    # The more standards-conforming stlport4 library is
6549
8206
    # incompatible with the Cstd library. Avoid specifying
6550
8207
    # it if it's in CXXFLAGS. Ignore libCrun as
6588
8245
])# _LT_SYS_HIDDEN_LIBDEPS
6589
8246
 
6590
8247
 
6591
 
# _LT_PROG_F77
6592
 
# ------------
6593
 
# Since AC_PROG_F77 is broken, in that it returns the empty string
6594
 
# if there is no fortran compiler, we have our own version here.
6595
 
m4_defun([_LT_PROG_F77],
6596
 
[
6597
 
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6598
 
AC_PROG_F77
6599
 
if test -z "$F77" || test "X$F77" = "Xno"; then
6600
 
  _lt_disable_F77=yes
6601
 
fi
6602
 
popdef([AC_MSG_ERROR])
6603
 
])# _LT_PROG_F77
6604
 
 
6605
 
dnl aclocal-1.4 backwards compatibility:
6606
 
dnl AC_DEFUN([_LT_PROG_F77], [])
6607
 
 
6608
 
 
6609
8248
# _LT_LANG_F77_CONFIG([TAG])
6610
8249
# --------------------------
6611
8250
# Ensure that the configuration variables for a Fortran 77 compiler are
6612
8251
# suitably defined.  These variables are subsequently used by _LT_CONFIG
6613
8252
# to write the compiler configuration to `libtool'.
6614
8253
m4_defun([_LT_LANG_F77_CONFIG],
6615
 
[AC_REQUIRE([_LT_PROG_F77])dnl
6616
 
AC_LANG_PUSH(Fortran 77)
 
8254
[AC_LANG_PUSH(Fortran 77)
 
8255
if test -z "$F77" || test "X$F77" = "Xno"; then
 
8256
  _lt_disable_F77=yes
 
8257
fi
6617
8258
 
6618
8259
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6619
8260
_LT_TAGVAR(allow_undefined_flag, $1)=
6632
8273
_LT_TAGVAR(module_expsym_cmds, $1)=
6633
8274
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6634
8275
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8276
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
8277
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6635
8278
_LT_TAGVAR(no_undefined_flag, $1)=
6636
8279
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6637
8280
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6671
8314
  # Allow CC to be a program name with arguments.
6672
8315
  lt_save_CC="$CC"
6673
8316
  lt_save_GCC=$GCC
 
8317
  lt_save_CFLAGS=$CFLAGS
6674
8318
  CC=${F77-"f77"}
 
8319
  CFLAGS=$FFLAGS
6675
8320
  compiler=$CC
6676
8321
  _LT_TAGVAR(compiler, $1)=$CC
6677
8322
  _LT_CC_BASENAME([$compiler])
6725
8370
 
6726
8371
  GCC=$lt_save_GCC
6727
8372
  CC="$lt_save_CC"
 
8373
  CFLAGS="$lt_save_CFLAGS"
6728
8374
fi # test "$_lt_disable_F77" != yes
6729
8375
 
6730
8376
AC_LANG_POP
6731
8377
])# _LT_LANG_F77_CONFIG
6732
8378
 
6733
8379
 
6734
 
# _LT_PROG_FC
6735
 
# -----------
6736
 
# Since AC_PROG_FC is broken, in that it returns the empty string
6737
 
# if there is no fortran compiler, we have our own version here.
6738
 
m4_defun([_LT_PROG_FC],
6739
 
[
6740
 
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6741
 
AC_PROG_FC
6742
 
if test -z "$FC" || test "X$FC" = "Xno"; then
6743
 
  _lt_disable_FC=yes
6744
 
fi
6745
 
popdef([AC_MSG_ERROR])
6746
 
])# _LT_PROG_FC
6747
 
 
6748
 
dnl aclocal-1.4 backwards compatibility:
6749
 
dnl AC_DEFUN([_LT_PROG_FC], [])
6750
 
 
6751
 
 
6752
8380
# _LT_LANG_FC_CONFIG([TAG])
6753
8381
# -------------------------
6754
8382
# Ensure that the configuration variables for a Fortran compiler are
6755
8383
# suitably defined.  These variables are subsequently used by _LT_CONFIG
6756
8384
# to write the compiler configuration to `libtool'.
6757
8385
m4_defun([_LT_LANG_FC_CONFIG],
6758
 
[AC_REQUIRE([_LT_PROG_FC])dnl
6759
 
AC_LANG_PUSH(Fortran)
 
8386
[AC_LANG_PUSH(Fortran)
 
8387
 
 
8388
if test -z "$FC" || test "X$FC" = "Xno"; then
 
8389
  _lt_disable_FC=yes
 
8390
fi
6760
8391
 
6761
8392
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6762
8393
_LT_TAGVAR(allow_undefined_flag, $1)=
6775
8406
_LT_TAGVAR(module_expsym_cmds, $1)=
6776
8407
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6777
8408
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8409
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
8410
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6778
8411
_LT_TAGVAR(no_undefined_flag, $1)=
6779
8412
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6780
8413
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6814
8447
  # Allow CC to be a program name with arguments.
6815
8448
  lt_save_CC="$CC"
6816
8449
  lt_save_GCC=$GCC
 
8450
  lt_save_CFLAGS=$CFLAGS
6817
8451
  CC=${FC-"f95"}
 
8452
  CFLAGS=$FCFLAGS
6818
8453
  compiler=$CC
6819
8454
  GCC=$ac_cv_fc_compiler_gnu
6820
8455
 
6870
8505
  fi # test -n "$compiler"
6871
8506
 
6872
8507
  GCC=$lt_save_GCC
6873
 
  CC="$lt_save_CC"
 
8508
  CC=$lt_save_CC
 
8509
  CFLAGS=$lt_save_CFLAGS
6874
8510
fi # test "$_lt_disable_FC" != yes
6875
8511
 
6876
8512
AC_LANG_POP
6907
8543
_LT_LINKER_BOILERPLATE
6908
8544
 
6909
8545
# Allow CC to be a program name with arguments.
6910
 
lt_save_CC="$CC"
 
8546
lt_save_CC=$CC
 
8547
lt_save_CFLAGS=$CFLAGS
6911
8548
lt_save_GCC=$GCC
6912
8549
GCC=yes
6913
8550
CC=${GCJ-"gcj"}
 
8551
CFLAGS=$GCJFLAGS
6914
8552
compiler=$CC
6915
8553
_LT_TAGVAR(compiler, $1)=$CC
6916
8554
_LT_TAGVAR(LD, $1)="$LD"
6920
8558
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6921
8559
 
6922
8560
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8561
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
8562
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6923
8563
 
6924
8564
if test -n "$compiler"; then
6925
8565
  _LT_COMPILER_NO_RTTI($1)
6935
8575
AC_LANG_RESTORE
6936
8576
 
6937
8577
GCC=$lt_save_GCC
6938
 
CC="$lt_save_CC"
 
8578
CC=$lt_save_CC
 
8579
CFLAGS=$lt_save_CFLAGS
6939
8580
])# _LT_LANG_GCJ_CONFIG
6940
8581
 
6941
8582
 
6970
8611
 
6971
8612
# Allow CC to be a program name with arguments.
6972
8613
lt_save_CC="$CC"
 
8614
lt_save_CFLAGS=$CFLAGS
6973
8615
lt_save_GCC=$GCC
6974
8616
GCC=
6975
8617
CC=${RC-"windres"}
 
8618
CFLAGS=
6976
8619
compiler=$CC
6977
8620
_LT_TAGVAR(compiler, $1)=$CC
6978
8621
_LT_CC_BASENAME([$compiler])
6985
8628
 
6986
8629
GCC=$lt_save_GCC
6987
8630
AC_LANG_RESTORE
6988
 
CC="$lt_save_CC"
 
8631
CC=$lt_save_CC
 
8632
CFLAGS=$lt_save_CFLAGS
6989
8633
])# _LT_LANG_RC_CONFIG
6990
8634
 
6991
8635
 
7044
8688
AC_SUBST([OBJDUMP])
7045
8689
])
7046
8690
 
 
8691
# _LT_DECL_DLLTOOL
 
8692
# ----------------
 
8693
# Ensure DLLTOOL variable is set.
 
8694
m4_defun([_LT_DECL_DLLTOOL],
 
8695
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
8696
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
8697
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
 
8698
AC_SUBST([DLLTOOL])
 
8699
])
7047
8700
 
7048
8701
# _LT_DECL_SED
7049
8702
# ------------
7135
8788
# Try some XSI features
7136
8789
xsi_shell=no
7137
8790
( _lt_dummy="a/b/c"
7138
 
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7139
 
      = c,a/b,, \
 
8791
  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
 
8792
      = c,a/b,b/c, \
7140
8793
    && eval 'test $(( 1 + 1 )) -eq 2 \
7141
8794
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7142
8795
  && xsi_shell=yes
7175
8828
])# _LT_CHECK_SHELL_FEATURES
7176
8829
 
7177
8830
 
7178
 
# _LT_PROG_XSI_SHELLFNS
7179
 
# ---------------------
7180
 
# Bourne and XSI compatible variants of some useful shell functions.
7181
 
m4_defun([_LT_PROG_XSI_SHELLFNS],
7182
 
[case $xsi_shell in
7183
 
  yes)
7184
 
    cat << \_LT_EOF >> "$cfgfile"
7185
 
 
7186
 
# func_dirname file append nondir_replacement
7187
 
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7188
 
# otherwise set result to NONDIR_REPLACEMENT.
7189
 
func_dirname ()
7190
 
{
7191
 
  case ${1} in
7192
 
    */*) func_dirname_result="${1%/*}${2}" ;;
7193
 
    *  ) func_dirname_result="${3}" ;;
7194
 
  esac
7195
 
}
7196
 
 
7197
 
# func_basename file
7198
 
func_basename ()
7199
 
{
7200
 
  func_basename_result="${1##*/}"
7201
 
}
7202
 
 
7203
 
# func_dirname_and_basename file append nondir_replacement
7204
 
# perform func_basename and func_dirname in a single function
7205
 
# call:
7206
 
#   dirname:  Compute the dirname of FILE.  If nonempty,
7207
 
#             add APPEND to the result, otherwise set result
7208
 
#             to NONDIR_REPLACEMENT.
7209
 
#             value returned in "$func_dirname_result"
7210
 
#   basename: Compute filename of FILE.
7211
 
#             value retuned in "$func_basename_result"
7212
 
# Implementation must be kept synchronized with func_dirname
7213
 
# and func_basename. For efficiency, we do not delegate to
7214
 
# those functions but instead duplicate the functionality here.
7215
 
func_dirname_and_basename ()
7216
 
{
7217
 
  case ${1} in
7218
 
    */*) func_dirname_result="${1%/*}${2}" ;;
7219
 
    *  ) func_dirname_result="${3}" ;;
7220
 
  esac
7221
 
  func_basename_result="${1##*/}"
7222
 
}
7223
 
 
7224
 
# func_stripname prefix suffix name
7225
 
# strip PREFIX and SUFFIX off of NAME.
7226
 
# PREFIX and SUFFIX must not contain globbing or regex special
7227
 
# characters, hashes, percent signs, but SUFFIX may contain a leading
7228
 
# dot (in which case that matches only a dot).
7229
 
func_stripname ()
7230
 
{
7231
 
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7232
 
  # positional parameters, so assign one to ordinary parameter first.
7233
 
  func_stripname_result=${3}
7234
 
  func_stripname_result=${func_stripname_result#"${1}"}
7235
 
  func_stripname_result=${func_stripname_result%"${2}"}
7236
 
}
7237
 
 
7238
 
# func_opt_split
7239
 
func_opt_split ()
7240
 
{
7241
 
  func_opt_split_opt=${1%%=*}
7242
 
  func_opt_split_arg=${1#*=}
7243
 
}
7244
 
 
7245
 
# func_lo2o object
7246
 
func_lo2o ()
7247
 
{
7248
 
  case ${1} in
7249
 
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7250
 
    *)    func_lo2o_result=${1} ;;
7251
 
  esac
7252
 
}
7253
 
 
7254
 
# func_xform libobj-or-source
7255
 
func_xform ()
7256
 
{
7257
 
  func_xform_result=${1%.*}.lo
7258
 
}
7259
 
 
7260
 
# func_arith arithmetic-term...
7261
 
func_arith ()
7262
 
{
7263
 
  func_arith_result=$(( $[*] ))
7264
 
}
7265
 
 
7266
 
# func_len string
7267
 
# STRING may not start with a hyphen.
7268
 
func_len ()
7269
 
{
7270
 
  func_len_result=${#1}
7271
 
}
7272
 
 
7273
 
_LT_EOF
7274
 
    ;;
7275
 
  *) # Bourne compatible functions.
7276
 
    cat << \_LT_EOF >> "$cfgfile"
7277
 
 
7278
 
# func_dirname file append nondir_replacement
7279
 
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7280
 
# otherwise set result to NONDIR_REPLACEMENT.
7281
 
func_dirname ()
7282
 
{
7283
 
  # Extract subdirectory from the argument.
7284
 
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7285
 
  if test "X$func_dirname_result" = "X${1}"; then
7286
 
    func_dirname_result="${3}"
7287
 
  else
7288
 
    func_dirname_result="$func_dirname_result${2}"
7289
 
  fi
7290
 
}
7291
 
 
7292
 
# func_basename file
7293
 
func_basename ()
7294
 
{
7295
 
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7296
 
}
7297
 
 
7298
 
dnl func_dirname_and_basename
7299
 
dnl A portable version of this function is already defined in general.m4sh
7300
 
dnl so there is no need for it here.
7301
 
 
7302
 
# func_stripname prefix suffix name
7303
 
# strip PREFIX and SUFFIX off of NAME.
7304
 
# PREFIX and SUFFIX must not contain globbing or regex special
7305
 
# characters, hashes, percent signs, but SUFFIX may contain a leading
7306
 
# dot (in which case that matches only a dot).
7307
 
# func_strip_suffix prefix name
7308
 
func_stripname ()
7309
 
{
7310
 
  case ${2} in
7311
 
    .*) func_stripname_result=`$ECHO "X${3}" \
7312
 
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7313
 
    *)  func_stripname_result=`$ECHO "X${3}" \
7314
 
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7315
 
  esac
7316
 
}
7317
 
 
7318
 
# sed scripts:
7319
 
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7320
 
my_sed_long_arg='1s/^-[[^=]]*=//'
7321
 
 
7322
 
# func_opt_split
7323
 
func_opt_split ()
7324
 
{
7325
 
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7326
 
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7327
 
}
7328
 
 
7329
 
# func_lo2o object
7330
 
func_lo2o ()
7331
 
{
7332
 
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7333
 
}
7334
 
 
7335
 
# func_xform libobj-or-source
7336
 
func_xform ()
7337
 
{
7338
 
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7339
 
}
7340
 
 
7341
 
# func_arith arithmetic-term...
7342
 
func_arith ()
7343
 
{
7344
 
  func_arith_result=`expr "$[@]"`
7345
 
}
7346
 
 
7347
 
# func_len string
7348
 
# STRING may not start with a hyphen.
7349
 
func_len ()
7350
 
{
7351
 
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7352
 
}
7353
 
 
7354
 
_LT_EOF
7355
 
esac
7356
 
 
7357
 
case $lt_shell_append in
7358
 
  yes)
7359
 
    cat << \_LT_EOF >> "$cfgfile"
7360
 
 
7361
 
# func_append var value
7362
 
# Append VALUE to the end of shell variable VAR.
7363
 
func_append ()
7364
 
{
7365
 
  eval "$[1]+=\$[2]"
7366
 
}
7367
 
_LT_EOF
7368
 
    ;;
7369
 
  *)
7370
 
    cat << \_LT_EOF >> "$cfgfile"
7371
 
 
7372
 
# func_append var value
7373
 
# Append VALUE to the end of shell variable VAR.
7374
 
func_append ()
7375
 
{
7376
 
  eval "$[1]=\$$[1]\$[2]"
7377
 
}
7378
 
 
7379
 
_LT_EOF
7380
 
    ;;
7381
 
  esac
7382
 
])
 
8831
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
 
8832
# ------------------------------------------------------
 
8833
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
 
8834
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
 
8835
m4_defun([_LT_PROG_FUNCTION_REPLACE],
 
8836
[dnl {
 
8837
sed -e '/^$1 ()$/,/^} # $1 /c\
 
8838
$1 ()\
 
8839
{\
 
8840
m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
 
8841
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
 
8842
  && mv -f "$cfgfile.tmp" "$cfgfile" \
 
8843
    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
 
8844
test 0 -eq $? || _lt_function_replace_fail=:
 
8845
])
 
8846
 
 
8847
 
 
8848
# _LT_PROG_REPLACE_SHELLFNS
 
8849
# -------------------------
 
8850
# Replace existing portable implementations of several shell functions with
 
8851
# equivalent extended shell implementations where those features are available..
 
8852
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
 
8853
[if test x"$xsi_shell" = xyes; then
 
8854
  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
 
8855
    case ${1} in
 
8856
      */*) func_dirname_result="${1%/*}${2}" ;;
 
8857
      *  ) func_dirname_result="${3}" ;;
 
8858
    esac])
 
8859
 
 
8860
  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
 
8861
    func_basename_result="${1##*/}"])
 
8862
 
 
8863
  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
 
8864
    case ${1} in
 
8865
      */*) func_dirname_result="${1%/*}${2}" ;;
 
8866
      *  ) func_dirname_result="${3}" ;;
 
8867
    esac
 
8868
    func_basename_result="${1##*/}"])
 
8869
 
 
8870
  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
 
8871
    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
 
8872
    # positional parameters, so assign one to ordinary parameter first.
 
8873
    func_stripname_result=${3}
 
8874
    func_stripname_result=${func_stripname_result#"${1}"}
 
8875
    func_stripname_result=${func_stripname_result%"${2}"}])
 
8876
 
 
8877
  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
 
8878
    func_split_long_opt_name=${1%%=*}
 
8879
    func_split_long_opt_arg=${1#*=}])
 
8880
 
 
8881
  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
 
8882
    func_split_short_opt_arg=${1#??}
 
8883
    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
 
8884
 
 
8885
  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
 
8886
    case ${1} in
 
8887
      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
 
8888
      *)    func_lo2o_result=${1} ;;
 
8889
    esac])
 
8890
 
 
8891
  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
 
8892
 
 
8893
  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
 
8894
 
 
8895
  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
 
8896
fi
 
8897
 
 
8898
if test x"$lt_shell_append" = xyes; then
 
8899
  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
 
8900
 
 
8901
  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
 
8902
    func_quote_for_eval "${2}"
 
8903
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
 
8904
    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
 
8905
 
 
8906
  # Save a `func_append' function call where possible by direct use of '+='
 
8907
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
 
8908
    && mv -f "$cfgfile.tmp" "$cfgfile" \
 
8909
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
 
8910
  test 0 -eq $? || _lt_function_replace_fail=:
 
8911
else
 
8912
  # Save a `func_append' function call even when '+=' is not available
 
8913
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
 
8914
    && mv -f "$cfgfile.tmp" "$cfgfile" \
 
8915
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
 
8916
  test 0 -eq $? || _lt_function_replace_fail=:
 
8917
fi
 
8918
 
 
8919
if test x"$_lt_function_replace_fail" = x":"; then
 
8920
  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
 
8921
fi
 
8922
])
 
8923
 
 
8924
# _LT_PATH_CONVERSION_FUNCTIONS
 
8925
# -----------------------------
 
8926
# Determine which file name conversion functions should be used by
 
8927
# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
 
8928
# for certain cross-compile configurations and native mingw.
 
8929
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
 
8930
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
8931
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
8932
AC_MSG_CHECKING([how to convert $build file names to $host format])
 
8933
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
 
8934
[case $host in
 
8935
  *-*-mingw* )
 
8936
    case $build in
 
8937
      *-*-mingw* ) # actually msys
 
8938
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
 
8939
        ;;
 
8940
      *-*-cygwin* )
 
8941
        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
 
8942
        ;;
 
8943
      * ) # otherwise, assume *nix
 
8944
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
 
8945
        ;;
 
8946
    esac
 
8947
    ;;
 
8948
  *-*-cygwin* )
 
8949
    case $build in
 
8950
      *-*-mingw* ) # actually msys
 
8951
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
 
8952
        ;;
 
8953
      *-*-cygwin* )
 
8954
        lt_cv_to_host_file_cmd=func_convert_file_noop
 
8955
        ;;
 
8956
      * ) # otherwise, assume *nix
 
8957
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
 
8958
        ;;
 
8959
    esac
 
8960
    ;;
 
8961
  * ) # unhandled hosts (and "normal" native builds)
 
8962
    lt_cv_to_host_file_cmd=func_convert_file_noop
 
8963
    ;;
 
8964
esac
 
8965
])
 
8966
to_host_file_cmd=$lt_cv_to_host_file_cmd
 
8967
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
 
8968
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
 
8969
         [0], [convert $build file names to $host format])dnl
 
8970
 
 
8971
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
 
8972
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
 
8973
[#assume ordinary cross tools, or native build.
 
8974
lt_cv_to_tool_file_cmd=func_convert_file_noop
 
8975
case $host in
 
8976
  *-*-mingw* )
 
8977
    case $build in
 
8978
      *-*-mingw* ) # actually msys
 
8979
        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
 
8980
        ;;
 
8981
    esac
 
8982
    ;;
 
8983
esac
 
8984
])
 
8985
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
8986
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
 
8987
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
 
8988
         [0], [convert $build files to toolchain format])dnl
 
8989
])# _LT_PATH_CONVERSION_FUNCTIONS
7383
8990
 
7384
8991
# Helper functions for option handling.                    -*- Autoconf -*-
7385
8992
#
7386
 
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
8993
#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
 
8994
#   Inc.
7387
8995
#   Written by Gary V. Vaughan, 2004
7388
8996
#
7389
8997
# This file is free software; the Free Software Foundation gives
7390
8998
# unlimited permission to copy and/or distribute it, with or without
7391
8999
# modifications, as long as this notice is preserved.
7392
9000
 
7393
 
# serial 6 ltoptions.m4
 
9001
# serial 7 ltoptions.m4
7394
9002
 
7395
9003
# This is to help aclocal find these macros, as it can't see m4_define.
7396
9004
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7505
9113
[enable_win32_dll=yes
7506
9114
 
7507
9115
case $host in
7508
 
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
 
9116
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
7509
9117
  AC_CHECK_TOOL(AS, as, false)
7510
9118
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7511
9119
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7513
9121
esac
7514
9122
 
7515
9123
test -z "$AS" && AS=as
7516
 
_LT_DECL([], [AS],      [0], [Assembler program])dnl
 
9124
_LT_DECL([], [AS],      [1], [Assembler program])dnl
7517
9125
 
7518
9126
test -z "$DLLTOOL" && DLLTOOL=dlltool
7519
 
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
 
9127
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
7520
9128
 
7521
9129
test -z "$OBJDUMP" && OBJDUMP=objdump
7522
 
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
 
9130
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
7523
9131
])# win32-dll
7524
9132
 
7525
9133
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7877
9485
# unlimited permission to copy and/or distribute it, with or without
7878
9486
# modifications, as long as this notice is preserved.
7879
9487
 
7880
 
# Generated from ltversion.in.
 
9488
# @configure_input@
7881
9489
 
7882
 
# serial 3017 ltversion.m4
 
9490
# serial 3293 ltversion.m4
7883
9491
# This file is part of GNU Libtool
7884
9492
 
7885
 
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
7886
 
m4_define([LT_PACKAGE_REVISION], [1.3017])
 
9493
m4_define([LT_PACKAGE_VERSION], [2.4])
 
9494
m4_define([LT_PACKAGE_REVISION], [1.3293])
7887
9495
 
7888
9496
AC_DEFUN([LTVERSION_VERSION],
7889
 
[macro_version='2.2.6b'
7890
 
macro_revision='1.3017'
 
9497
[macro_version='2.4'
 
9498
macro_revision='1.3293'
7891
9499
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7892
9500
_LT_DECL(, macro_revision, 0)
7893
9501
])
7894
9502
 
7895
9503
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
7896
9504
#
7897
 
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
 
9505
#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
7898
9506
#   Written by Scott James Remnant, 2004.
7899
9507
#
7900
9508
# This file is free software; the Free Software Foundation gives
7901
9509
# unlimited permission to copy and/or distribute it, with or without
7902
9510
# modifications, as long as this notice is preserved.
7903
9511
 
7904
 
# serial 4 lt~obsolete.m4
 
9512
# serial 5 lt~obsolete.m4
7905
9513
 
7906
9514
# These exist entirely to fool aclocal when bootstrapping libtool.
7907
9515
#
7971
9579
m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
7972
9580
m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
7973
9581
m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
7974
 
m4_ifndef([AC_LIBTOOL_RC],              [AC_DEFUN([AC_LIBTOOL_RC])])
7975
9582
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7976
9583
m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7977
9584
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7984
9591
m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7985
9592
m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
7986
9593
m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7987
 
 
7988
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7989
 
# serial 1 (pkg-config-0.24)
7990
 
7991
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7992
 
#
7993
 
# This program is free software; you can redistribute it and/or modify
7994
 
# it under the terms of the GNU General Public License as published by
7995
 
# the Free Software Foundation; either version 2 of the License, or
7996
 
# (at your option) any later version.
7997
 
#
7998
 
# This program is distributed in the hope that it will be useful, but
7999
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
8000
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8001
 
# General Public License for more details.
8002
 
#
8003
 
# You should have received a copy of the GNU General Public License
8004
 
# along with this program; if not, write to the Free Software
8005
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8006
 
#
8007
 
# As a special exception to the GNU General Public License, if you
8008
 
# distribute this file as part of a program that contains a
8009
 
# configuration script generated by Autoconf, you may include it under
8010
 
# the same distribution terms that you use for the rest of that program.
8011
 
 
8012
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8013
 
# ----------------------------------
8014
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8015
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8016
 
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8017
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
8018
 
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
8019
 
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
8020
 
 
8021
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8022
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8023
 
fi
8024
 
if test -n "$PKG_CONFIG"; then
8025
 
        _pkg_min_version=m4_default([$1], [0.9.0])
8026
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8027
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8028
 
                AC_MSG_RESULT([yes])
8029
 
        else
8030
 
                AC_MSG_RESULT([no])
8031
 
                PKG_CONFIG=""
8032
 
        fi
8033
 
fi[]dnl
8034
 
])# PKG_PROG_PKG_CONFIG
8035
 
 
8036
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8037
 
#
8038
 
# Check to see whether a particular set of modules exists.  Similar
8039
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8040
 
#
8041
 
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8042
 
# only at the first occurence in configure.ac, so if the first place
8043
 
# it's called might be skipped (such as if it is within an "if", you
8044
 
# have to call PKG_CHECK_EXISTS manually
8045
 
# --------------------------------------------------------------
8046
 
AC_DEFUN([PKG_CHECK_EXISTS],
8047
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8048
 
if test -n "$PKG_CONFIG" && \
8049
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8050
 
  m4_default([$2], [:])
8051
 
m4_ifvaln([$3], [else
8052
 
  $3])dnl
8053
 
fi])
8054
 
 
8055
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8056
 
# ---------------------------------------------
8057
 
m4_define([_PKG_CONFIG],
8058
 
[if test -n "$$1"; then
8059
 
    pkg_cv_[]$1="$$1"
8060
 
 elif test -n "$PKG_CONFIG"; then
8061
 
    PKG_CHECK_EXISTS([$3],
8062
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8063
 
                     [pkg_failed=yes])
8064
 
 else
8065
 
    pkg_failed=untried
8066
 
fi[]dnl
8067
 
])# _PKG_CONFIG
8068
 
 
8069
 
# _PKG_SHORT_ERRORS_SUPPORTED
8070
 
# -----------------------------
8071
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8072
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8073
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8074
 
        _pkg_short_errors_supported=yes
8075
 
else
8076
 
        _pkg_short_errors_supported=no
8077
 
fi[]dnl
8078
 
])# _PKG_SHORT_ERRORS_SUPPORTED
8079
 
 
8080
 
 
8081
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8082
 
# [ACTION-IF-NOT-FOUND])
8083
 
#
8084
 
#
8085
 
# Note that if there is a possibility the first call to
8086
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
8087
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8088
 
#
8089
 
#
8090
 
# --------------------------------------------------------------
8091
 
AC_DEFUN([PKG_CHECK_MODULES],
8092
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8093
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8094
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8095
 
 
8096
 
pkg_failed=no
8097
 
AC_MSG_CHECKING([for $1])
8098
 
 
8099
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8100
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8101
 
 
8102
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8103
 
and $1[]_LIBS to avoid the need to call pkg-config.
8104
 
See the pkg-config man page for more details.])
8105
 
 
8106
 
if test $pkg_failed = yes; then
8107
 
        AC_MSG_RESULT([no])
8108
 
        _PKG_SHORT_ERRORS_SUPPORTED
8109
 
        if test $_pkg_short_errors_supported = yes; then
8110
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8111
 
        else 
8112
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8113
 
        fi
8114
 
        # Put the nasty error message in config.log where it belongs
8115
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8116
 
 
8117
 
        m4_default([$4], [AC_MSG_ERROR(
8118
 
[Package requirements ($2) were not met:
8119
 
 
8120
 
$$1_PKG_ERRORS
8121
 
 
8122
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8123
 
installed software in a non-standard prefix.
8124
 
 
8125
 
_PKG_TEXT])[]dnl
8126
 
        ])
8127
 
elif test $pkg_failed = untried; then
8128
 
        AC_MSG_RESULT([no])
8129
 
        m4_default([$4], [AC_MSG_FAILURE(
8130
 
[The pkg-config script could not be found or is too old.  Make sure it
8131
 
is in your PATH or set the PKG_CONFIG environment variable to the full
8132
 
path to pkg-config.
8133
 
 
8134
 
_PKG_TEXT
8135
 
 
8136
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
8137
 
        ])
8138
 
else
8139
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8140
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8141
 
        AC_MSG_RESULT([yes])
8142
 
        $3
8143
 
fi[]dnl
8144
 
])# PKG_CHECK_MODULES
 
9594
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
 
9595
m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
 
9596
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
 
9597
m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
 
9598
m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
 
9599
m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
 
9600
m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
8145
9601
 
8146
9602
dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
8147
9603
dnl
8148
 
dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
 
9604
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
8149
9605
dnl 
8150
9606
dnl Permission is hereby granted, free of charge, to any person obtaining a
8151
9607
dnl copy of this software and associated documentation files (the "Software"),
8182
9638
# See the "minimum version" comment for each macro you use to see what 
8183
9639
# version you require.
8184
9640
m4_defun([XORG_MACROS_VERSION],[
8185
 
m4_define([vers_have], [1.10.0])
 
9641
m4_define([vers_have], [1.17])
8186
9642
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
8187
9643
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
8188
9644
m4_if(m4_cmp(maj_have, maj_needed), 0,,
8209
9665
# which is not the best choice for supporting other OS'es, but covers most
8210
9666
# of the ones we need for now.
8211
9667
AC_MSG_CHECKING([if $RAWCPP requires -undef])
8212
 
AC_LANG_CONFTEST([Does cpp redefine unix ?])
 
9668
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
8213
9669
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
8214
9670
        AC_MSG_RESULT([no])
8215
9671
else
8227
9683
rm -f conftest.$ac_ext
8228
9684
 
8229
9685
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
8230
 
AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
 
9686
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
8231
9687
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
8232
9688
        AC_MSG_RESULT([no])
8233
9689
else
8333
9789
        -e 's|__xservername__|Xorg|g' \
8334
9790
        -e 's|__xconfigfile__|xorg.conf|g' \
8335
9791
        -e 's|__projectroot__|\$(prefix)|g' \
 
9792
        -e 's|__apploaddir__|\$(appdefaultdir)|g' \
8336
9793
        -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
8337
9794
        -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
8338
9795
        -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
8490
9947
AC_SUBST(MAKE_HTML)
8491
9948
]) # XORG_CHECK_DOCBOOK
8492
9949
 
8493
 
# XORG_WITH_XMLTO([MIN-VERSION])
 
9950
# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
8494
9951
# ----------------
8495
9952
# Minimum version: 1.5.0
 
9953
# Minimum version for optional DEFAULT argument: 1.11.0
8496
9954
#
8497
9955
# Documentation tools are not always available on all platforms and sometimes
8498
9956
# not at the appropriate level. This macro enables a module to test for the
8499
9957
# presence of the tool and obtain it's path in separate variables. Coupled with
8500
9958
# the --with-xmlto option, it allows maximum flexibilty in making decisions
8501
 
# as whether or not to use the xmlto package.
 
9959
# as whether or not to use the xmlto package. When DEFAULT is not specified,
 
9960
# --with-xmlto assumes 'auto'.
8502
9961
#
8503
9962
# Interface to module:
8504
9963
# HAVE_XMLTO:   used in makefiles to conditionally generate documentation
8515
9974
#
8516
9975
AC_DEFUN([XORG_WITH_XMLTO],[
8517
9976
AC_ARG_VAR([XMLTO], [Path to xmlto command])
 
9977
m4_define([_defopt], m4_default([$2], [auto]))
8518
9978
AC_ARG_WITH(xmlto,
8519
9979
        AS_HELP_STRING([--with-xmlto],
8520
 
           [Use xmlto to regenerate documentation (default: yes, if installed)]),
8521
 
           [use_xmlto=$withval], [use_xmlto=auto])
 
9980
           [Use xmlto to regenerate documentation (default: ]_defopt[)]),
 
9981
           [use_xmlto=$withval], [use_xmlto=]_defopt)
 
9982
m4_undefine([_defopt])
8522
9983
 
8523
9984
if test "x$use_xmlto" = x"auto"; then
8524
9985
   AC_PATH_PROG([XMLTO], [xmlto])
8572
10033
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
8573
10034
]) # XORG_WITH_XMLTO
8574
10035
 
8575
 
# XORG_WITH_ASCIIDOC([MIN-VERSION])
 
10036
# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
 
10037
# --------------------------------------------
 
10038
# Minimum version: 1.12.0
 
10039
# Minimum version for optional DEFAULT argument: 1.12.0
 
10040
#
 
10041
# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
 
10042
# XML-based language used for the transformation of XML documents.
 
10043
# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
 
10044
# It is used under the cover by xmlto to generate html files from DocBook/XML.
 
10045
# The XSLT processor is often used as a standalone tool for transformations.
 
10046
# It should not be assumed that this tool is used only to work with documnetation.
 
10047
# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
 
10048
#
 
10049
# Interface to module:
 
10050
# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
 
10051
# XSLTPROC:      returns the path of the xsltproc program found
 
10052
#                returns the path set by the user in the environment
 
10053
# --with-xsltproc: 'yes' user instructs the module to use xsltproc
 
10054
#                 'no' user instructs the module not to use xsltproc
 
10055
# have_xsltproc: returns yes if xsltproc found in PATH or no
 
10056
#
 
10057
# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
 
10058
#
 
10059
AC_DEFUN([XORG_WITH_XSLTPROC],[
 
10060
AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
 
10061
# Preserves the interface, should it be implemented later
 
10062
m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
 
10063
m4_define([_defopt], m4_default([$2], [auto]))
 
10064
AC_ARG_WITH(xsltproc,
 
10065
        AS_HELP_STRING([--with-xsltproc],
 
10066
           [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
 
10067
           [use_xsltproc=$withval], [use_xsltproc=]_defopt)
 
10068
m4_undefine([_defopt])
 
10069
 
 
10070
if test "x$use_xsltproc" = x"auto"; then
 
10071
   AC_PATH_PROG([XSLTPROC], [xsltproc])
 
10072
   if test "x$XSLTPROC" = "x"; then
 
10073
        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
 
10074
        have_xsltproc=no
 
10075
   else
 
10076
        have_xsltproc=yes
 
10077
   fi
 
10078
elif test "x$use_xsltproc" = x"yes" ; then
 
10079
   AC_PATH_PROG([XSLTPROC], [xsltproc])
 
10080
   if test "x$XSLTPROC" = "x"; then
 
10081
        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
 
10082
   fi
 
10083
   have_xsltproc=yes
 
10084
elif test "x$use_xsltproc" = x"no" ; then
 
10085
   if test "x$XSLTPROC" != "x"; then
 
10086
      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
 
10087
   fi
 
10088
   have_xsltproc=no
 
10089
else
 
10090
   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
 
10091
fi
 
10092
 
 
10093
AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
 
10094
]) # XORG_WITH_XSLTPROC
 
10095
 
 
10096
# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
 
10097
# ----------------------------------------
 
10098
# Minimum version: 1.15.0
 
10099
#
 
10100
# PERL (Practical Extraction and Report Language) is a language optimized for
 
10101
# scanning arbitrary text files, extracting information from those text files,
 
10102
# and printing reports based on that information.
 
10103
#
 
10104
# When DEFAULT is not specified, --with-perl assumes 'auto'.
 
10105
#
 
10106
# Interface to module:
 
10107
# HAVE_PERL: used in makefiles to conditionally scan text files
 
10108
# PERL:      returns the path of the perl program found
 
10109
#            returns the path set by the user in the environment
 
10110
# --with-perl: 'yes' user instructs the module to use perl
 
10111
#              'no' user instructs the module not to use perl
 
10112
# have_perl: returns yes if perl found in PATH or no
 
10113
#
 
10114
# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
 
10115
#
 
10116
AC_DEFUN([XORG_WITH_PERL],[
 
10117
AC_ARG_VAR([PERL], [Path to perl command])
 
10118
# Preserves the interface, should it be implemented later
 
10119
m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
 
10120
m4_define([_defopt], m4_default([$2], [auto]))
 
10121
AC_ARG_WITH(perl,
 
10122
        AS_HELP_STRING([--with-perl],
 
10123
           [Use perl for extracting information from files (default: ]_defopt[)]),
 
10124
           [use_perl=$withval], [use_perl=]_defopt)
 
10125
m4_undefine([_defopt])
 
10126
 
 
10127
if test "x$use_perl" = x"auto"; then
 
10128
   AC_PATH_PROG([PERL], [perl])
 
10129
   if test "x$PERL" = "x"; then
 
10130
        AC_MSG_WARN([perl not found - cannot extract information and report])
 
10131
        have_perl=no
 
10132
   else
 
10133
        have_perl=yes
 
10134
   fi
 
10135
elif test "x$use_perl" = x"yes" ; then
 
10136
   AC_PATH_PROG([PERL], [perl])
 
10137
   if test "x$PERL" = "x"; then
 
10138
        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
 
10139
   fi
 
10140
   have_perl=yes
 
10141
elif test "x$use_perl" = x"no" ; then
 
10142
   if test "x$PERL" != "x"; then
 
10143
      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
 
10144
   fi
 
10145
   have_perl=no
 
10146
else
 
10147
   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
 
10148
fi
 
10149
 
 
10150
AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
 
10151
]) # XORG_WITH_PERL
 
10152
 
 
10153
# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
8576
10154
# ----------------
8577
10155
# Minimum version: 1.5.0
 
10156
# Minimum version for optional DEFAULT argument: 1.11.0
8578
10157
#
8579
10158
# Documentation tools are not always available on all platforms and sometimes
8580
10159
# not at the appropriate level. This macro enables a module to test for the
8581
10160
# presence of the tool and obtain it's path in separate variables. Coupled with
8582
10161
# the --with-asciidoc option, it allows maximum flexibilty in making decisions
8583
 
# as whether or not to use the asciidoc package.
 
10162
# as whether or not to use the asciidoc package. When DEFAULT is not specified,
 
10163
# --with-asciidoc assumes 'auto'.
8584
10164
#
8585
10165
# Interface to module:
8586
10166
# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
8593
10173
#
8594
10174
AC_DEFUN([XORG_WITH_ASCIIDOC],[
8595
10175
AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
 
10176
m4_define([_defopt], m4_default([$2], [auto]))
8596
10177
AC_ARG_WITH(asciidoc,
8597
10178
        AS_HELP_STRING([--with-asciidoc],
8598
 
           [Use asciidoc to regenerate documentation (default: yes, if installed)]),
8599
 
           [use_asciidoc=$withval], [use_asciidoc=auto])
 
10179
           [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
 
10180
           [use_asciidoc=$withval], [use_asciidoc=]_defopt)
 
10181
m4_undefine([_defopt])
8600
10182
 
8601
10183
if test "x$use_asciidoc" = x"auto"; then
8602
10184
   AC_PATH_PROG([ASCIIDOC], [asciidoc])
8637
10219
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
8638
10220
]) # XORG_WITH_ASCIIDOC
8639
10221
 
8640
 
# XORG_WITH_DOXYGEN([MIN-VERSION])
 
10222
# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
8641
10223
# --------------------------------
8642
10224
# Minimum version: 1.5.0
 
10225
# Minimum version for optional DEFAULT argument: 1.11.0
8643
10226
#
8644
10227
# Documentation tools are not always available on all platforms and sometimes
8645
10228
# not at the appropriate level. This macro enables a module to test for the
8646
10229
# presence of the tool and obtain it's path in separate variables. Coupled with
8647
10230
# the --with-doxygen option, it allows maximum flexibilty in making decisions
8648
 
# as whether or not to use the doxygen package.
 
10231
# as whether or not to use the doxygen package. When DEFAULT is not specified,
 
10232
# --with-doxygen assumes 'auto'.
8649
10233
#
8650
10234
# Interface to module:
8651
10235
# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
8658
10242
#
8659
10243
AC_DEFUN([XORG_WITH_DOXYGEN],[
8660
10244
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
 
10245
m4_define([_defopt], m4_default([$2], [auto]))
8661
10246
AC_ARG_WITH(doxygen,
8662
10247
        AS_HELP_STRING([--with-doxygen],
8663
 
           [Use doxygen to regenerate documentation (default: yes, if installed)]),
8664
 
           [use_doxygen=$withval], [use_doxygen=auto])
 
10248
           [Use doxygen to regenerate documentation (default: ]_defopt[)]),
 
10249
           [use_doxygen=$withval], [use_doxygen=]_defopt)
 
10250
m4_undefine([_defopt])
8665
10251
 
8666
10252
if test "x$use_doxygen" = x"auto"; then
8667
10253
   AC_PATH_PROG([DOXYGEN], [doxygen])
8702
10288
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
8703
10289
]) # XORG_WITH_DOXYGEN
8704
10290
 
8705
 
# XORG_WITH_GROFF
 
10291
# XORG_WITH_GROFF([DEFAULT])
8706
10292
# ----------------
8707
10293
# Minimum version: 1.6.0
 
10294
# Minimum version for optional DEFAULT argument: 1.11.0
8708
10295
#
8709
10296
# Documentation tools are not always available on all platforms and sometimes
8710
10297
# not at the appropriate level. This macro enables a module to test for the
8711
10298
# presence of the tool and obtain it's path in separate variables. Coupled with
8712
10299
# the --with-groff option, it allows maximum flexibilty in making decisions
8713
 
# as whether or not to use the groff package.
 
10300
# as whether or not to use the groff package. When DEFAULT is not specified,
 
10301
# --with-groff assumes 'auto'.
8714
10302
#
8715
10303
# Interface to module:
8716
10304
# HAVE_GROFF:    used in makefiles to conditionally generate documentation
8739
10327
#
8740
10328
AC_DEFUN([XORG_WITH_GROFF],[
8741
10329
AC_ARG_VAR([GROFF], [Path to groff command])
 
10330
m4_define([_defopt], m4_default([$1], [auto]))
8742
10331
AC_ARG_WITH(groff,
8743
10332
        AS_HELP_STRING([--with-groff],
8744
 
           [Use groff to regenerate documentation (default: yes, if installed)]),
8745
 
           [use_groff=$withval], [use_groff=auto])
 
10333
           [Use groff to regenerate documentation (default: ]_defopt[)]),
 
10334
           [use_groff=$withval], [use_groff=]_defopt)
 
10335
m4_undefine([_defopt])
8746
10336
 
8747
10337
if test "x$use_groff" = x"auto"; then
8748
10338
   AC_PATH_PROG([GROFF], [groff])
8805
10395
AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
8806
10396
]) # XORG_WITH_GROFF
8807
10397
 
8808
 
# XORG_WITH_FOP
8809
 
# ----------------
 
10398
# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
 
10399
# ---------------------------------------
8810
10400
# Minimum version: 1.6.0
 
10401
# Minimum version for optional DEFAULT argument: 1.11.0
 
10402
# Minimum version for optional MIN-VERSION argument: 1.15.0
8811
10403
#
8812
10404
# Documentation tools are not always available on all platforms and sometimes
8813
10405
# not at the appropriate level. This macro enables a module to test for the
8814
10406
# presence of the tool and obtain it's path in separate variables. Coupled with
8815
10407
# the --with-fop option, it allows maximum flexibilty in making decisions
8816
 
# as whether or not to use the fop package.
 
10408
# as whether or not to use the fop package. When DEFAULT is not specified,
 
10409
# --with-fop assumes 'auto'.
8817
10410
#
8818
10411
# Interface to module:
8819
10412
# HAVE_FOP:     used in makefiles to conditionally generate documentation
8826
10419
#
8827
10420
AC_DEFUN([XORG_WITH_FOP],[
8828
10421
AC_ARG_VAR([FOP], [Path to fop command])
 
10422
m4_define([_defopt], m4_default([$2], [auto]))
8829
10423
AC_ARG_WITH(fop,
8830
10424
        AS_HELP_STRING([--with-fop],
8831
 
           [Use fop to regenerate documentation (default: yes, if installed)]),
8832
 
           [use_fop=$withval], [use_fop=auto])
 
10425
           [Use fop to regenerate documentation (default: ]_defopt[)]),
 
10426
           [use_fop=$withval], [use_fop=]_defopt)
 
10427
m4_undefine([_defopt])
8833
10428
 
8834
10429
if test "x$use_fop" = x"auto"; then
8835
10430
   AC_PATH_PROG([FOP], [fop])
8853
10448
else
8854
10449
   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
8855
10450
fi
 
10451
 
 
10452
# Test for a minimum version of fop, if provided.
 
10453
m4_ifval([$1],
 
10454
[if test "$have_fop" = yes; then
 
10455
    # scrape the fop version
 
10456
    AC_MSG_CHECKING([for fop minimum version])
 
10457
    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
 
10458
    AC_MSG_RESULT([$fop_version])
 
10459
    AS_VERSION_COMPARE([$fop_version], [$1],
 
10460
        [if test "x$use_fop" = xauto; then
 
10461
            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
 
10462
            have_fop=no
 
10463
        else
 
10464
            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
 
10465
        fi])
 
10466
fi])
8856
10467
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
8857
10468
]) # XORG_WITH_FOP
8858
10469
 
8859
 
# XORG_WITH_PS2PDF
 
10470
# XORG_WITH_PS2PDF([DEFAULT])
8860
10471
# ----------------
8861
10472
# Minimum version: 1.6.0
 
10473
# Minimum version for optional DEFAULT argument: 1.11.0
8862
10474
#
8863
10475
# Documentation tools are not always available on all platforms and sometimes
8864
10476
# not at the appropriate level. This macro enables a module to test for the
8865
10477
# presence of the tool and obtain it's path in separate variables. Coupled with
8866
10478
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
8867
 
# as whether or not to use the ps2pdf package.
 
10479
# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
 
10480
# --with-ps2pdf assumes 'auto'.
8868
10481
#
8869
10482
# Interface to module:
8870
10483
# HAVE_PS2PDF:  used in makefiles to conditionally generate documentation
8877
10490
#
8878
10491
AC_DEFUN([XORG_WITH_PS2PDF],[
8879
10492
AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
 
10493
m4_define([_defopt], m4_default([$1], [auto]))
8880
10494
AC_ARG_WITH(ps2pdf,
8881
10495
        AS_HELP_STRING([--with-ps2pdf],
8882
 
           [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
8883
 
           [use_ps2pdf=$withval], [use_ps2pdf=auto])
 
10496
           [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
 
10497
           [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
 
10498
m4_undefine([_defopt])
8884
10499
 
8885
10500
if test "x$use_ps2pdf" = x"auto"; then
8886
10501
   AC_PATH_PROG([PS2PDF], [ps2pdf])
8931
10546
# parm1:        specify the default value, yes or no.
8932
10547
#
8933
10548
AC_DEFUN([XORG_ENABLE_DOCS],[
8934
 
default=$1
8935
 
if test "x$default" = x ; then
8936
 
  default="yes"
8937
 
fi
 
10549
m4_define([docs_default], m4_default([$1], [yes]))
8938
10550
AC_ARG_ENABLE(docs,
8939
10551
        AS_HELP_STRING([--enable-docs],
8940
 
           [Enable building the documentation (default: yes)]),
8941
 
           [build_docs=$enableval], [build_docs=$default])
 
10552
           [Enable building the documentation (default: ]docs_default[)]),
 
10553
           [build_docs=$enableval], [build_docs=]docs_default)
 
10554
m4_undefine([docs_default])
8942
10555
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
8943
10556
AC_MSG_CHECKING([whether to build documentation])
8944
10557
AC_MSG_RESULT([$build_docs])
8966
10579
# parm1:                specify the default value, yes or no.
8967
10580
#
8968
10581
AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
8969
 
devel_default=$1
8970
 
if test "x$devel_default" = x ; then
8971
 
  devel_default="yes"
8972
 
fi
 
10582
m4_define([devel_default], m4_default([$1], [yes]))
8973
10583
AC_ARG_ENABLE(devel-docs,
8974
10584
        AS_HELP_STRING([--enable-devel-docs],
8975
 
           [Enable building the developer documentation (default: yes)]),
8976
 
           [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
 
10585
           [Enable building the developer documentation (default: ]devel_default[)]),
 
10586
           [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
 
10587
m4_undefine([devel_default])
8977
10588
AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
8978
10589
AC_MSG_CHECKING([whether to build developer documentation])
8979
10590
AC_MSG_RESULT([$build_devel_docs])
9001
10612
# parm1:                specify the default value, yes or no.
9002
10613
#
9003
10614
AC_DEFUN([XORG_ENABLE_SPECS],[
9004
 
spec_default=$1
9005
 
if test "x$spec_default" = x ; then
9006
 
  spec_default="yes"
9007
 
fi
 
10615
m4_define([spec_default], m4_default([$1], [yes]))
9008
10616
AC_ARG_ENABLE(specs,
9009
10617
        AS_HELP_STRING([--enable-specs],
9010
 
           [Enable building the specs (default: yes)]),
9011
 
           [build_specs=$enableval], [build_specs=$spec_default])
 
10618
           [Enable building the specs (default: ]spec_default[)]),
 
10619
           [build_specs=$enableval], [build_specs=]spec_default)
 
10620
m4_undefine([spec_default])
9012
10621
AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
9013
10622
AC_MSG_CHECKING([whether to build functional specifications])
9014
10623
AC_MSG_RESULT([$build_specs])
9015
10624
]) # XORG_ENABLE_SPECS
9016
10625
 
 
10626
# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
 
10627
# ----------------------------------------------
 
10628
# Minimum version: 1.13.0
 
10629
#
 
10630
# This macro enables a builder to enable/disable unit testing
 
10631
# It makes no assumption about the test cases implementation
 
10632
# Test cases may or may not use Automake "Support for test suites"
 
10633
# They may or may not use the software utility library GLib
 
10634
#
 
10635
# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
 
10636
# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
 
10637
# The variable enable_unit_tests is used by other macros in this file.
 
10638
#
 
10639
# Interface to module:
 
10640
# ENABLE_UNIT_TESTS:    used in makefiles to conditionally build tests
 
10641
# enable_unit_tests:    used in configure.ac for additional configuration
 
10642
# --enable-unit-tests:  'yes' user instructs the module to build tests
 
10643
#                       'no' user instructs the module not to build tests
 
10644
# parm1:                specify the default value, yes or no.
 
10645
#
 
10646
AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
 
10647
AC_BEFORE([$0], [XORG_WITH_GLIB])
 
10648
AC_BEFORE([$0], [XORG_LD_WRAP])
 
10649
AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
 
10650
m4_define([_defopt], m4_default([$1], [auto]))
 
10651
AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
 
10652
        [Enable building unit test cases (default: ]_defopt[)]),
 
10653
        [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
 
10654
m4_undefine([_defopt])
 
10655
AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
 
10656
AC_MSG_CHECKING([whether to build unit test cases])
 
10657
AC_MSG_RESULT([$enable_unit_tests])
 
10658
]) # XORG_ENABLE_UNIT_TESTS
 
10659
 
 
10660
# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
 
10661
# ------------------------------------------------------
 
10662
# Minimum version: 1.17.0
 
10663
#
 
10664
# This macro enables a builder to enable/disable integration testing
 
10665
# It makes no assumption about the test cases' implementation
 
10666
# Test cases may or may not use Automake "Support for test suites"
 
10667
#
 
10668
# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
 
10669
# usually requires less dependencies and may be built and run under less
 
10670
# stringent environments than integration tests.
 
10671
#
 
10672
# Interface to module:
 
10673
# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
 
10674
# enable_integration_tests:   used in configure.ac for additional configuration
 
10675
# --enable-integration-tests: 'yes' user instructs the module to build tests
 
10676
#                             'no' user instructs the module not to build tests
 
10677
# parm1:                      specify the default value, yes or no.
 
10678
#
 
10679
AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
 
10680
AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
 
10681
m4_define([_defopt], m4_default([$1], [auto]))
 
10682
AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
 
10683
        [Enable building integration test cases (default: ]_defopt[)]),
 
10684
        [enable_integration_tests=$enableval],
 
10685
        [enable_integration_tests=]_defopt)
 
10686
m4_undefine([_defopt])
 
10687
AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
 
10688
        [test "x$enable_integration_tests" != xno])
 
10689
AC_MSG_CHECKING([whether to build unit test cases])
 
10690
AC_MSG_RESULT([$enable_integration_tests])
 
10691
]) # XORG_ENABLE_INTEGRATION_TESTS
 
10692
 
 
10693
# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
 
10694
# ----------------------------------------
 
10695
# Minimum version: 1.13.0
 
10696
#
 
10697
# GLib is a library which provides advanced data structures and functions.
 
10698
# This macro enables a module to test for the presence of Glib.
 
10699
#
 
10700
# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
 
10701
# Otherwise the value of $enable_unit_tests is blank.
 
10702
#
 
10703
# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
 
10704
# test support usually requires less dependencies and may be built and run under
 
10705
# less stringent environments than integration tests.
 
10706
#
 
10707
# Interface to module:
 
10708
# HAVE_GLIB: used in makefiles to conditionally build targets
 
10709
# with_glib: used in configure.ac to know if GLib has been found
 
10710
# --with-glib:  'yes' user instructs the module to use glib
 
10711
#               'no' user instructs the module not to use glib
 
10712
#
 
10713
AC_DEFUN([XORG_WITH_GLIB],[
 
10714
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
10715
m4_define([_defopt], m4_default([$2], [auto]))
 
10716
AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
 
10717
        [Use GLib library for unit testing (default: ]_defopt[)]),
 
10718
        [with_glib=$withval], [with_glib=]_defopt)
 
10719
m4_undefine([_defopt])
 
10720
 
 
10721
have_glib=no
 
10722
# Do not probe GLib if user explicitly disabled unit testing
 
10723
if test "x$enable_unit_tests" != x"no"; then
 
10724
  # Do not probe GLib if user explicitly disabled it
 
10725
  if test "x$with_glib" != x"no"; then
 
10726
    m4_ifval(
 
10727
      [$1],
 
10728
      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
 
10729
      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
 
10730
    )
 
10731
  fi
 
10732
fi
 
10733
 
 
10734
# Not having GLib when unit testing has been explicitly requested is an error
 
10735
if test "x$enable_unit_tests" = x"yes"; then
 
10736
  if test "x$have_glib" = x"no"; then
 
10737
    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
 
10738
  fi
 
10739
fi
 
10740
 
 
10741
# Having unit testing disabled when GLib has been explicitly requested is an error
 
10742
if test "x$enable_unit_tests" = x"no"; then
 
10743
  if test "x$with_glib" = x"yes"; then
 
10744
    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
 
10745
  fi
 
10746
fi
 
10747
 
 
10748
# Not having GLib when it has been explicitly requested is an error
 
10749
if test "x$with_glib" = x"yes"; then
 
10750
  if test "x$have_glib" = x"no"; then
 
10751
    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
 
10752
  fi
 
10753
fi
 
10754
 
 
10755
AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
 
10756
]) # XORG_WITH_GLIB
 
10757
 
 
10758
# XORG_LD_WRAP([required|optional])
 
10759
# ---------------------------------
 
10760
# Minimum version: 1.13.0
 
10761
#
 
10762
# Check if linker supports -wrap, passed via compiler flags
 
10763
#
 
10764
# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
 
10765
# Otherwise the value of $enable_unit_tests is blank.
 
10766
#
 
10767
# Argument added in 1.16.0 - default is "required", to match existing behavior
 
10768
# of returning an error if enable_unit_tests is yes, and ld -wrap is not
 
10769
# available, an argument of "optional" allows use when some unit tests require
 
10770
# ld -wrap and others do not.
 
10771
#
 
10772
AC_DEFUN([XORG_LD_WRAP],[
 
10773
XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
 
10774
    [AC_LANG_PROGRAM([#include <stdlib.h>
 
10775
                      void __wrap_exit(int status) { return; }],
 
10776
                     [exit(0);])])
 
10777
# Not having ld wrap when unit testing has been explicitly requested is an error
 
10778
if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
 
10779
  if test "x$have_ld_wrap" = x"no"; then
 
10780
    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
 
10781
  fi
 
10782
fi
 
10783
AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
 
10784
#
 
10785
]) # XORG_LD_WRAP
 
10786
 
 
10787
# XORG_CHECK_LINKER_FLAGS
 
10788
# -----------------------
 
10789
# SYNOPSIS
 
10790
#
 
10791
#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
 
10792
#
 
10793
# DESCRIPTION
 
10794
#
 
10795
#   Check whether the given linker FLAGS work with the current language's
 
10796
#   linker, or whether they give an error.
 
10797
#
 
10798
#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
 
10799
#   success/failure.
 
10800
#
 
10801
#   PROGRAM-SOURCE is the program source to link with, if needed
 
10802
#
 
10803
#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
 
10804
#
 
10805
# LICENSE
 
10806
#
 
10807
#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
 
10808
#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
 
10809
#   Copyright (c) 2009 Matteo Frigo
 
10810
#
 
10811
#   This program is free software: you can redistribute it and/or modify it
 
10812
#   under the terms of the GNU General Public License as published by the
 
10813
#   Free Software Foundation, either version 3 of the License, or (at your
 
10814
#   option) any later version.
 
10815
#
 
10816
#   This program is distributed in the hope that it will be useful, but
 
10817
#   WITHOUT ANY WARRANTY; without even the implied warranty of
 
10818
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 
10819
#   Public License for more details.
 
10820
#
 
10821
#   You should have received a copy of the GNU General Public License along
 
10822
#   with this program. If not, see <http://www.gnu.org/licenses/>.
 
10823
#
 
10824
#   As a special exception, the respective Autoconf Macro's copyright owner
 
10825
#   gives unlimited permission to copy, distribute and modify the configure
 
10826
#   scripts that are the output of Autoconf when processing the Macro. You
 
10827
#   need not follow the terms of the GNU General Public License when using
 
10828
#   or distributing such scripts, even though portions of the text of the
 
10829
#   Macro appear in them. The GNU General Public License (GPL) does govern
 
10830
#   all other use of the material that constitutes the Autoconf Macro.
 
10831
#
 
10832
#   This special exception to the GPL applies to versions of the Autoconf
 
10833
#   Macro released by the Autoconf Archive. When you make and distribute a
 
10834
#   modified version of the Autoconf Macro, you may extend this special
 
10835
#   exception to the GPL to apply to your modified version as well.#
 
10836
AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
 
10837
[AC_MSG_CHECKING([whether the linker accepts $1])
 
10838
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
 
10839
AS_LITERAL_IF([$1],
 
10840
  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
 
10841
      ax_save_FLAGS=$LDFLAGS
 
10842
      LDFLAGS="$1"
 
10843
      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
 
10844
        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
 
10845
        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
 
10846
      LDFLAGS=$ax_save_FLAGS])],
 
10847
  [ax_save_FLAGS=$LDFLAGS
 
10848
   LDFLAGS="$1"
 
10849
   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
 
10850
     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
 
10851
     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
 
10852
   LDFLAGS=$ax_save_FLAGS])
 
10853
eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
 
10854
AC_MSG_RESULT($xorg_check_linker_flags)
 
10855
if test "x$xorg_check_linker_flags" = xyes; then
 
10856
        m4_default([$2], :)
 
10857
else
 
10858
        m4_default([$3], :)
 
10859
fi
 
10860
]) # XORG_CHECK_LINKER_FLAGS
 
10861
 
 
10862
# XORG_MEMORY_CHECK_FLAGS
 
10863
# -----------------------
 
10864
# Minimum version: 1.16.0
 
10865
#
 
10866
# This macro attempts to find appropriate memory checking functionality
 
10867
# for various platforms which unit testing code may use to catch various
 
10868
# forms of memory allocation and access errors in testing.
 
10869
#
 
10870
# Interface to module:
 
10871
# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
 
10872
#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
 
10873
#
 
10874
# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
 
10875
#
 
10876
AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
 
10877
 
 
10878
AC_REQUIRE([AC_CANONICAL_HOST])
 
10879
AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
 
10880
           [Environment variables to enable memory checking in tests])
 
10881
 
 
10882
# Check for different types of support on different platforms
 
10883
case $host_os in
 
10884
    solaris*)
 
10885
        AC_CHECK_LIB([umem], [umem_alloc],
 
10886
            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
 
10887
        ;;
 
10888
    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
 
10889
        # both directly and inverted, so should not be 0 or 255.
 
10890
        malloc_debug_env='MALLOC_PERTURB_=15'
 
10891
        ;;
 
10892
    darwin*)
 
10893
        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
 
10894
        ;;
 
10895
    *bsd*)
 
10896
        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
 
10897
        ;;
 
10898
esac
 
10899
 
 
10900
# User supplied flags override default flags
 
10901
if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
 
10902
    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
 
10903
fi
 
10904
 
 
10905
AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
 
10906
]) # XORG_WITH_LINT
 
10907
 
9017
10908
# XORG_CHECK_MALLOC_ZERO
9018
10909
# ----------------------
9019
10910
# Minimum version: 1.0.0
9030
10921
 
9031
10922
AC_MSG_CHECKING([whether malloc(0) returns NULL])
9032
10923
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
9033
 
        AC_RUN_IFELSE([
9034
 
char *malloc();
9035
 
char *realloc();
9036
 
char *calloc();
9037
 
main() {
 
10924
        AC_RUN_IFELSE([AC_LANG_PROGRAM([
 
10925
#include <stdlib.h>
 
10926
],[
9038
10927
    char *m0, *r0, *c0, *p;
9039
10928
    m0 = malloc(0);
9040
10929
    p = malloc(10);
9041
10930
    r0 = realloc(p,0);
9042
 
    c0 = calloc(0);
9043
 
    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
9044
 
}],
 
10931
    c0 = calloc(0,10);
 
10932
    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
 
10933
])],
9045
10934
                [MALLOC_ZERO_RETURNS_NULL=yes],
9046
10935
                [MALLOC_ZERO_RETURNS_NULL=no],
9047
10936
                [MALLOC_ZERO_RETURNS_NULL=yes])
9167
11056
 
9168
11057
]) # XORG_LINT_LIBRARY
9169
11058
 
 
11059
# XORG_COMPILER_BRAND
 
11060
# -------------------
 
11061
# Minimum version: 1.14.0
 
11062
#
 
11063
# Checks for various brands of compilers and sets flags as appropriate:
 
11064
#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
 
11065
#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
 
11066
#   clang compiler - sets CLANGCC to "yes"
 
11067
#   Intel compiler - sets INTELCC to "yes"
 
11068
#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
 
11069
#
 
11070
AC_DEFUN([XORG_COMPILER_BRAND], [
 
11071
AC_LANG_CASE(
 
11072
        [C], [
 
11073
                AC_REQUIRE([AC_PROG_CC_C99])
 
11074
        ],
 
11075
        [C++], [
 
11076
                AC_REQUIRE([AC_PROG_CXX])
 
11077
        ]
 
11078
)
 
11079
AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
 
11080
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
 
11081
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
 
11082
]) # XORG_COMPILER_BRAND
 
11083
 
 
11084
# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
 
11085
# ---------------
 
11086
# Minimum version: 1.16.0
 
11087
#
 
11088
# Test if the compiler works when passed the given flag as a command line argument.
 
11089
# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
 
11090
# next flag in the list until there are no more options.
 
11091
#
 
11092
# Note that this does not guarantee that the compiler supports the flag as some
 
11093
# compilers will simply ignore arguments that they do not understand, but we do
 
11094
# attempt to weed out false positives by using -Werror=unknown-warning-option and
 
11095
# -Werror=unused-command-line-argument
 
11096
#
 
11097
AC_DEFUN([XORG_TESTSET_CFLAG], [
 
11098
m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
 
11099
m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
 
11100
 
 
11101
AC_LANG_COMPILER_REQUIRE
 
11102
 
 
11103
AC_LANG_CASE(
 
11104
        [C], [
 
11105
                AC_REQUIRE([AC_PROG_CC_C99])
 
11106
                define([PREFIX], [C])
 
11107
                define([CACHE_PREFIX], [cc])
 
11108
                define([COMPILER], [$CC])
 
11109
        ],
 
11110
        [C++], [
 
11111
                define([PREFIX], [CXX])
 
11112
                define([CACHE_PREFIX], [cxx])
 
11113
                define([COMPILER], [$CXX])
 
11114
        ]
 
11115
)
 
11116
 
 
11117
[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
 
11118
 
 
11119
if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
 
11120
        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
 
11121
        AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
 
11122
                        [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
 
11123
                        AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
 
11124
                                          [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
 
11125
                                          [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
 
11126
        [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
 
11127
        PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
 
11128
fi
 
11129
 
 
11130
if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
 
11131
        if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
 
11132
                PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
 
11133
        fi
 
11134
        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
 
11135
        AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
 
11136
                        [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
 
11137
                        AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
 
11138
                                          [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
 
11139
                                          [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
 
11140
        [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
 
11141
        PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
 
11142
fi
 
11143
 
 
11144
found="no"
 
11145
m4_foreach([flag], m4_cdr($@), [
 
11146
        if test $found = "no" ; then
 
11147
                if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
 
11148
                        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
 
11149
                fi
 
11150
 
 
11151
                if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
 
11152
                        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
 
11153
                fi
 
11154
 
 
11155
                PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
 
11156
 
 
11157
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
 
11158
                AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
 
11159
                cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
 
11160
                AC_CACHE_VAL($cacheid,
 
11161
                             [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
 
11162
                                             [eval $cacheid=yes],
 
11163
                                             [eval $cacheid=no])])
 
11164
 
 
11165
                PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
 
11166
 
 
11167
                eval supported=\$$cacheid
 
11168
                AC_MSG_RESULT([$supported])
 
11169
                if test "$supported" = "yes" ; then
 
11170
                        $1="$$1 ]flag["
 
11171
                        found="yes"
 
11172
                fi
 
11173
        fi
 
11174
])
 
11175
]) # XORG_TESTSET_CFLAG
 
11176
 
 
11177
# XORG_COMPILER_FLAGS
 
11178
# ---------------
 
11179
# Minimum version: 1.16.0
 
11180
#
 
11181
# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
 
11182
# arguments supported by the selected compiler which do NOT alter the generated
 
11183
# code.  These arguments will cause the compiler to print various warnings
 
11184
# during compilation AND turn a conservative set of warnings into errors.
 
11185
#
 
11186
# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
 
11187
# future versions of util-macros as options are added to new compilers.
 
11188
#
 
11189
AC_DEFUN([XORG_COMPILER_FLAGS], [
 
11190
AC_REQUIRE([XORG_COMPILER_BRAND])
 
11191
 
 
11192
AC_ARG_ENABLE(selective-werror,
 
11193
              AS_HELP_STRING([--disable-selective-werror],
 
11194
                             [Turn off selective compiler errors. (default: enabled)]),
 
11195
              [SELECTIVE_WERROR=$enableval],
 
11196
              [SELECTIVE_WERROR=yes])
 
11197
 
 
11198
AC_LANG_CASE(
 
11199
        [C], [
 
11200
                define([PREFIX], [C])
 
11201
        ],
 
11202
        [C++], [
 
11203
                define([PREFIX], [CXX])
 
11204
        ]
 
11205
)
 
11206
# -v is too short to test reliably with XORG_TESTSET_CFLAG
 
11207
if test "x$SUNCC" = "xyes"; then
 
11208
    [BASE_]PREFIX[FLAGS]="-v"
 
11209
else
 
11210
    [BASE_]PREFIX[FLAGS]=""
 
11211
fi
 
11212
 
 
11213
# This chunk of warnings were those that existed in the legacy CWARNFLAGS
 
11214
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
 
11215
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
 
11216
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
 
11217
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
 
11218
 
 
11219
AC_LANG_CASE(
 
11220
        [C], [
 
11221
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
 
11222
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
 
11223
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
 
11224
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
 
11225
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
 
11226
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
 
11227
        ]
 
11228
)
 
11229
 
 
11230
# This chunk adds additional warnings that could catch undesired effects.
 
11231
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
 
11232
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
 
11233
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
 
11234
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
 
11235
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
 
11236
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
 
11237
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
 
11238
 
 
11239
# These are currently disabled because they are noisy.  They will be enabled
 
11240
# in the future once the codebase is sufficiently modernized to silence
 
11241
# them.  For now, I don't want them to drown out the other warnings.
 
11242
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
 
11243
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
 
11244
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
 
11245
 
 
11246
# Turn some warnings into errors, so we don't accidently get successful builds
 
11247
# when there are problems that should be fixed.
 
11248
 
 
11249
if test "x$SELECTIVE_WERROR" = "xyes" ; then
 
11250
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
 
11251
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
 
11252
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
 
11253
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
 
11254
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
 
11255
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
 
11256
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
 
11257
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
 
11258
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
 
11259
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
 
11260
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
 
11261
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
 
11262
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
 
11263
else
 
11264
AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
 
11265
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
 
11266
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
 
11267
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
 
11268
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
 
11269
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
 
11270
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
 
11271
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
 
11272
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
 
11273
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
 
11274
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
 
11275
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
 
11276
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
 
11277
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
 
11278
fi
 
11279
 
 
11280
AC_SUBST([BASE_]PREFIX[FLAGS])
 
11281
]) # XORG_COMPILER_FLAGS
 
11282
 
9170
11283
# XORG_CWARNFLAGS
9171
11284
# ---------------
9172
11285
# Minimum version: 1.2.0
 
11286
# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
9173
11287
#
9174
11288
# Defines CWARNFLAGS to enable C compiler warnings.
9175
11289
#
 
11290
# This function is deprecated because it defines -fno-strict-aliasing
 
11291
# which alters the code generated by the compiler.  If -fno-strict-aliasing
 
11292
# is needed, then it should be added explicitly in the module when
 
11293
# it is updated to use BASE_CFLAGS.
 
11294
#
9176
11295
AC_DEFUN([XORG_CWARNFLAGS], [
9177
 
AC_REQUIRE([AC_PROG_CC_C99])
9178
 
if  test "x$GCC" = xyes ; then
9179
 
    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
9180
 
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
9181
 
-Wbad-function-cast -Wformat=2"
9182
 
    case `$CC -dumpversion` in
9183
 
    3.4.* | 4.*)
9184
 
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
9185
 
        ;;
9186
 
    esac
9187
 
else
9188
 
    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
9189
 
    if test "x$SUNCC" = "xyes"; then
9190
 
        CWARNFLAGS="-v"
9191
 
    fi
9192
 
fi
9193
 
AC_SUBST(CWARNFLAGS)
 
11296
AC_REQUIRE([XORG_COMPILER_FLAGS])
 
11297
AC_REQUIRE([XORG_COMPILER_BRAND])
 
11298
AC_LANG_CASE(
 
11299
        [C], [
 
11300
                CWARNFLAGS="$BASE_CFLAGS"
 
11301
                if  test "x$GCC" = xyes ; then
 
11302
                    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
 
11303
                fi
 
11304
                AC_SUBST(CWARNFLAGS)
 
11305
        ]
 
11306
)
9194
11307
]) # XORG_CWARNFLAGS
9195
11308
 
9196
11309
# XORG_STRICT_OPTION
9197
11310
# -----------------------
9198
11311
# Minimum version: 1.3.0
9199
11312
#
9200
 
# Add configure option to enable strict compilation
 
11313
# Add configure option to enable strict compilation flags, such as treating
 
11314
# warnings as fatal errors.
 
11315
# If --enable-strict-compilation is passed to configure, adds strict flags to
 
11316
# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
 
11317
#
 
11318
# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
 
11319
# when strict compilation is unconditionally desired.
9201
11320
AC_DEFUN([XORG_STRICT_OPTION], [
9202
 
# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
9203
 
AC_REQUIRE([AC_PROG_CC_C99])
9204
11321
AC_REQUIRE([XORG_CWARNFLAGS])
 
11322
AC_REQUIRE([XORG_COMPILER_FLAGS])
9205
11323
 
9206
11324
AC_ARG_ENABLE(strict-compilation,
9207
11325
                          AS_HELP_STRING([--enable-strict-compilation],
9208
11326
                          [Enable all warnings from compiler and make them errors (default: disabled)]),
9209
11327
                          [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
 
11328
 
 
11329
AC_LANG_CASE(
 
11330
        [C], [
 
11331
                define([PREFIX], [C])
 
11332
        ],
 
11333
        [C++], [
 
11334
                define([PREFIX], [CXX])
 
11335
        ]
 
11336
)
 
11337
 
 
11338
[STRICT_]PREFIX[FLAGS]=""
 
11339
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
 
11340
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
 
11341
 
 
11342
# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
 
11343
# activate it with -Werror, so we add it here explicitly.
 
11344
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
 
11345
 
9210
11346
if test "x$STRICT_COMPILE" = "xyes"; then
9211
 
        AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
9212
 
        AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
9213
 
        if test "x$GCC" = xyes ; then
9214
 
                STRICT_CFLAGS="-pedantic -Werror"
9215
 
        elif test "x$SUNCC" = "xyes"; then
9216
 
                STRICT_CFLAGS="-errwarn"
9217
 
    elif test "x$INTELCC" = "xyes"; then
9218
 
                STRICT_CFLAGS="-Werror"
9219
 
        fi
 
11347
    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
 
11348
    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
9220
11349
fi
9221
 
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
9222
 
AC_SUBST([CWARNFLAGS])
 
11350
AC_SUBST([STRICT_]PREFIX[FLAGS])
 
11351
AC_SUBST([BASE_]PREFIX[FLAGS])
 
11352
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
9223
11353
]) # XORG_STRICT_OPTION
9224
11354
 
9225
11355
# XORG_DEFAULT_OPTIONS
9230
11360
#
9231
11361
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
9232
11362
AC_REQUIRE([AC_PROG_INSTALL])
 
11363
XORG_COMPILER_FLAGS
9233
11364
XORG_CWARNFLAGS
9234
11365
XORG_STRICT_OPTION
9235
11366
XORG_RELEASE_VERSION
9371
11502
        fi
9372
11503
])
9373
11504
 
9374
 
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
9375
 
#
9376
 
# This file is free software; the Free Software Foundation
9377
 
# gives unlimited permission to copy and/or distribute it,
9378
 
# with or without modifications, as long as this notice is preserved.
9379
 
 
9380
 
# AM_AUTOMAKE_VERSION(VERSION)
9381
 
# ----------------------------
9382
 
# Automake X.Y traces this macro to ensure aclocal.m4 has been
9383
 
# generated from the m4 files accompanying Automake X.Y.
9384
 
# (This private macro should not be called outside this file.)
9385
 
AC_DEFUN([AM_AUTOMAKE_VERSION],
9386
 
[am__api_version='1.11'
9387
 
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9388
 
dnl require some minimum version.  Point them to the right macro.
9389
 
m4_if([$1], [1.11.1], [],
9390
 
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9391
 
])
9392
 
 
9393
 
# _AM_AUTOCONF_VERSION(VERSION)
9394
 
# -----------------------------
9395
 
# aclocal traces this macro to find the Autoconf version.
9396
 
# This is a private macro too.  Using m4_define simplifies
9397
 
# the logic in aclocal, which can simply ignore this definition.
9398
 
m4_define([_AM_AUTOCONF_VERSION], [])
9399
 
 
9400
 
# AM_SET_CURRENT_AUTOMAKE_VERSION
9401
 
# -------------------------------
9402
 
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9403
 
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9404
 
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9405
 
[AM_AUTOMAKE_VERSION([1.11.1])dnl
9406
 
m4_ifndef([AC_AUTOCONF_VERSION],
9407
 
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9408
 
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9409
 
 
9410
 
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9411
 
 
9412
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9413
 
#
9414
 
# This file is free software; the Free Software Foundation
9415
 
# gives unlimited permission to copy and/or distribute it,
9416
 
# with or without modifications, as long as this notice is preserved.
9417
 
 
9418
 
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9419
 
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
9420
 
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9421
 
#
9422
 
# Of course, Automake must honor this variable whenever it calls a
9423
 
# tool from the auxiliary directory.  The problem is that $srcdir (and
9424
 
# therefore $ac_aux_dir as well) can be either absolute or relative,
9425
 
# depending on how configure is run.  This is pretty annoying, since
9426
 
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9427
 
# source directory, any form will work fine, but in subdirectories a
9428
 
# relative path needs to be adjusted first.
9429
 
#
9430
 
# $ac_aux_dir/missing
9431
 
#    fails when called from a subdirectory if $ac_aux_dir is relative
9432
 
# $top_srcdir/$ac_aux_dir/missing
9433
 
#    fails if $ac_aux_dir is absolute,
9434
 
#    fails when called from a subdirectory in a VPATH build with
9435
 
#          a relative $ac_aux_dir
9436
 
#
9437
 
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9438
 
# are both prefixed by $srcdir.  In an in-source build this is usually
9439
 
# harmless because $srcdir is `.', but things will broke when you
9440
 
# start a VPATH build or use an absolute $srcdir.
9441
 
#
9442
 
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9443
 
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9444
 
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9445
 
# and then we would define $MISSING as
9446
 
#   MISSING="\${SHELL} $am_aux_dir/missing"
9447
 
# This will work as long as MISSING is not called from configure, because
9448
 
# unfortunately $(top_srcdir) has no meaning in configure.
9449
 
# However there are other variables, like CC, which are often used in
9450
 
# configure, and could therefore not use this "fixed" $ac_aux_dir.
9451
 
#
9452
 
# Another solution, used here, is to always expand $ac_aux_dir to an
9453
 
# absolute PATH.  The drawback is that using absolute paths prevent a
9454
 
# configured tree to be moved without reconfiguration.
9455
 
 
9456
 
AC_DEFUN([AM_AUX_DIR_EXPAND],
9457
 
[dnl Rely on autoconf to set up CDPATH properly.
9458
 
AC_PREREQ([2.50])dnl
9459
 
# expand $ac_aux_dir to an absolute path
9460
 
am_aux_dir=`cd $ac_aux_dir && pwd`
9461
 
])
9462
 
 
9463
 
# AM_CONDITIONAL                                            -*- Autoconf -*-
9464
 
 
9465
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9466
 
# Free Software Foundation, Inc.
9467
 
#
9468
 
# This file is free software; the Free Software Foundation
9469
 
# gives unlimited permission to copy and/or distribute it,
9470
 
# with or without modifications, as long as this notice is preserved.
9471
 
 
9472
 
# serial 9
9473
 
 
9474
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9475
 
# -------------------------------------
9476
 
# Define a conditional.
9477
 
AC_DEFUN([AM_CONDITIONAL],
9478
 
[AC_PREREQ(2.52)dnl
9479
 
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9480
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9481
 
AC_SUBST([$1_TRUE])dnl
9482
 
AC_SUBST([$1_FALSE])dnl
9483
 
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9484
 
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9485
 
m4_define([_AM_COND_VALUE_$1], [$2])dnl
9486
 
if $2; then
9487
 
  $1_TRUE=
9488
 
  $1_FALSE='#'
9489
 
else
9490
 
  $1_TRUE='#'
9491
 
  $1_FALSE=
9492
 
fi
9493
 
AC_CONFIG_COMMANDS_PRE(
9494
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9495
 
  AC_MSG_ERROR([[conditional "$1" was never defined.
9496
 
Usually this means the macro was only invoked conditionally.]])
9497
 
fi])])
9498
 
 
9499
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9500
 
# Free Software Foundation, Inc.
9501
 
#
9502
 
# This file is free software; the Free Software Foundation
9503
 
# gives unlimited permission to copy and/or distribute it,
9504
 
# with or without modifications, as long as this notice is preserved.
9505
 
 
9506
 
# serial 10
9507
 
 
9508
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9509
 
# written in clear, in which case automake, when reading aclocal.m4,
9510
 
# will think it sees a *use*, and therefore will trigger all it's
9511
 
# C support machinery.  Also note that it means that autoscan, seeing
9512
 
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9513
 
 
9514
 
 
9515
 
# _AM_DEPENDENCIES(NAME)
9516
 
# ----------------------
9517
 
# See how the compiler implements dependency checking.
9518
 
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9519
 
# We try a few techniques and use that to set a single cache variable.
9520
 
#
9521
 
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9522
 
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9523
 
# dependency, and given that the user is not expected to run this macro,
9524
 
# just rely on AC_PROG_CC.
9525
 
AC_DEFUN([_AM_DEPENDENCIES],
9526
 
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9527
 
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9528
 
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9529
 
AC_REQUIRE([AM_DEP_TRACK])dnl
9530
 
 
9531
 
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9532
 
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9533
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9534
 
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9535
 
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9536
 
                   [depcc="$$1"   am_compiler_list=])
9537
 
 
9538
 
AC_CACHE_CHECK([dependency style of $depcc],
9539
 
               [am_cv_$1_dependencies_compiler_type],
9540
 
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9541
 
  # We make a subdir and do the tests there.  Otherwise we can end up
9542
 
  # making bogus files that we don't know about and never remove.  For
9543
 
  # instance it was reported that on HP-UX the gcc test will end up
9544
 
  # making a dummy file named `D' -- because `-MD' means `put the output
9545
 
  # in D'.
9546
 
  mkdir conftest.dir
9547
 
  # Copy depcomp to subdir because otherwise we won't find it if we're
9548
 
  # using a relative directory.
9549
 
  cp "$am_depcomp" conftest.dir
9550
 
  cd conftest.dir
9551
 
  # We will build objects and dependencies in a subdirectory because
9552
 
  # it helps to detect inapplicable dependency modes.  For instance
9553
 
  # both Tru64's cc and ICC support -MD to output dependencies as a
9554
 
  # side effect of compilation, but ICC will put the dependencies in
9555
 
  # the current directory while Tru64 will put them in the object
9556
 
  # directory.
9557
 
  mkdir sub
9558
 
 
9559
 
  am_cv_$1_dependencies_compiler_type=none
9560
 
  if test "$am_compiler_list" = ""; then
9561
 
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9562
 
  fi
9563
 
  am__universal=false
9564
 
  m4_case([$1], [CC],
9565
 
    [case " $depcc " in #(
9566
 
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9567
 
     esac],
9568
 
    [CXX],
9569
 
    [case " $depcc " in #(
9570
 
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9571
 
     esac])
9572
 
 
9573
 
  for depmode in $am_compiler_list; do
9574
 
    # Setup a source with many dependencies, because some compilers
9575
 
    # like to wrap large dependency lists on column 80 (with \), and
9576
 
    # we should not choose a depcomp mode which is confused by this.
9577
 
    #
9578
 
    # We need to recreate these files for each test, as the compiler may
9579
 
    # overwrite some of them when testing with obscure command lines.
9580
 
    # This happens at least with the AIX C compiler.
9581
 
    : > sub/conftest.c
9582
 
    for i in 1 2 3 4 5 6; do
9583
 
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9584
 
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9585
 
      # Solaris 8's {/usr,}/bin/sh.
9586
 
      touch sub/conftst$i.h
9587
 
    done
9588
 
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9589
 
 
9590
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9591
 
    # mode.  It turns out that the SunPro C++ compiler does not properly
9592
 
    # handle `-M -o', and we need to detect this.  Also, some Intel
9593
 
    # versions had trouble with output in subdirs
9594
 
    am__obj=sub/conftest.${OBJEXT-o}
9595
 
    am__minus_obj="-o $am__obj"
9596
 
    case $depmode in
9597
 
    gcc)
9598
 
      # This depmode causes a compiler race in universal mode.
9599
 
      test "$am__universal" = false || continue
9600
 
      ;;
9601
 
    nosideeffect)
9602
 
      # after this tag, mechanisms are not by side-effect, so they'll
9603
 
      # only be used when explicitly requested
9604
 
      if test "x$enable_dependency_tracking" = xyes; then
9605
 
        continue
9606
 
      else
9607
 
        break
9608
 
      fi
9609
 
      ;;
9610
 
    msvisualcpp | msvcmsys)
9611
 
      # This compiler won't grok `-c -o', but also, the minuso test has
9612
 
      # not run yet.  These depmodes are late enough in the game, and
9613
 
      # so weak that their functioning should not be impacted.
9614
 
      am__obj=conftest.${OBJEXT-o}
9615
 
      am__minus_obj=
9616
 
      ;;
9617
 
    none) break ;;
9618
 
    esac
9619
 
    if depmode=$depmode \
9620
 
       source=sub/conftest.c object=$am__obj \
9621
 
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9622
 
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9623
 
         >/dev/null 2>conftest.err &&
9624
 
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9625
 
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9626
 
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9627
 
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9628
 
      # icc doesn't choke on unknown options, it will just issue warnings
9629
 
      # or remarks (even with -Werror).  So we grep stderr for any message
9630
 
      # that says an option was ignored or not supported.
9631
 
      # When given -MP, icc 7.0 and 7.1 complain thusly:
9632
 
      #   icc: Command line warning: ignoring option '-M'; no argument required
9633
 
      # The diagnosis changed in icc 8.0:
9634
 
      #   icc: Command line remark: option '-MP' not supported
9635
 
      if (grep 'ignoring option' conftest.err ||
9636
 
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9637
 
        am_cv_$1_dependencies_compiler_type=$depmode
9638
 
        break
9639
 
      fi
9640
 
    fi
9641
 
  done
9642
 
 
9643
 
  cd ..
9644
 
  rm -rf conftest.dir
9645
 
else
9646
 
  am_cv_$1_dependencies_compiler_type=none
9647
 
fi
9648
 
])
9649
 
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9650
 
AM_CONDITIONAL([am__fastdep$1], [
9651
 
  test "x$enable_dependency_tracking" != xno \
9652
 
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9653
 
])
9654
 
 
9655
 
 
9656
 
# AM_SET_DEPDIR
9657
 
# -------------
9658
 
# Choose a directory name for dependency files.
9659
 
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9660
 
AC_DEFUN([AM_SET_DEPDIR],
9661
 
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9662
 
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9663
 
])
9664
 
 
9665
 
 
9666
 
# AM_DEP_TRACK
9667
 
# ------------
9668
 
AC_DEFUN([AM_DEP_TRACK],
9669
 
[AC_ARG_ENABLE(dependency-tracking,
9670
 
[  --disable-dependency-tracking  speeds up one-time build
9671
 
  --enable-dependency-tracking   do not reject slow dependency extractors])
9672
 
if test "x$enable_dependency_tracking" != xno; then
9673
 
  am_depcomp="$ac_aux_dir/depcomp"
9674
 
  AMDEPBACKSLASH='\'
9675
 
fi
9676
 
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9677
 
AC_SUBST([AMDEPBACKSLASH])dnl
9678
 
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9679
 
])
9680
 
 
9681
 
# Generate code to set up dependency tracking.              -*- Autoconf -*-
9682
 
 
9683
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9684
 
# Free Software Foundation, Inc.
9685
 
#
9686
 
# This file is free software; the Free Software Foundation
9687
 
# gives unlimited permission to copy and/or distribute it,
9688
 
# with or without modifications, as long as this notice is preserved.
9689
 
 
9690
 
#serial 5
9691
 
 
9692
 
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9693
 
# ------------------------------
9694
 
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9695
 
[{
9696
 
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
9697
 
  # are listed without --file.  Let's play safe and only enable the eval
9698
 
  # if we detect the quoting.
9699
 
  case $CONFIG_FILES in
9700
 
  *\'*) eval set x "$CONFIG_FILES" ;;
9701
 
  *)   set x $CONFIG_FILES ;;
9702
 
  esac
9703
 
  shift
9704
 
  for mf
9705
 
  do
9706
 
    # Strip MF so we end up with the name of the file.
9707
 
    mf=`echo "$mf" | sed -e 's/:.*$//'`
9708
 
    # Check whether this is an Automake generated Makefile or not.
9709
 
    # We used to match only the files named `Makefile.in', but
9710
 
    # some people rename them; so instead we look at the file content.
9711
 
    # Grep'ing the first line is not enough: some people post-process
9712
 
    # each Makefile.in and add a new line on top of each file to say so.
9713
 
    # Grep'ing the whole file is not good either: AIX grep has a line
9714
 
    # limit of 2048, but all sed's we know have understand at least 4000.
9715
 
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9716
 
      dirpart=`AS_DIRNAME("$mf")`
9717
 
    else
9718
 
      continue
9719
 
    fi
9720
 
    # Extract the definition of DEPDIR, am__include, and am__quote
9721
 
    # from the Makefile without running `make'.
9722
 
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9723
 
    test -z "$DEPDIR" && continue
9724
 
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
9725
 
    test -z "am__include" && continue
9726
 
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9727
 
    # When using ansi2knr, U may be empty or an underscore; expand it
9728
 
    U=`sed -n 's/^U = //p' < "$mf"`
9729
 
    # Find all dependency output files, they are included files with
9730
 
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
9731
 
    # simplest approach to changing $(DEPDIR) to its actual value in the
9732
 
    # expansion.
9733
 
    for file in `sed -n "
9734
 
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9735
 
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9736
 
      # Make sure the directory exists.
9737
 
      test -f "$dirpart/$file" && continue
9738
 
      fdir=`AS_DIRNAME(["$file"])`
9739
 
      AS_MKDIR_P([$dirpart/$fdir])
9740
 
      # echo "creating $dirpart/$file"
9741
 
      echo '# dummy' > "$dirpart/$file"
9742
 
    done
9743
 
  done
9744
 
}
9745
 
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9746
 
 
9747
 
 
9748
 
# AM_OUTPUT_DEPENDENCY_COMMANDS
9749
 
# -----------------------------
9750
 
# This macro should only be invoked once -- use via AC_REQUIRE.
9751
 
#
9752
 
# This code is only required when automatic dependency tracking
9753
 
# is enabled.  FIXME.  This creates each `.P' file that we will
9754
 
# need in order to bootstrap the dependency handling code.
9755
 
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9756
 
[AC_CONFIG_COMMANDS([depfiles],
9757
 
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9758
 
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9759
 
])
9760
 
 
9761
 
# Do all the work for Automake.                             -*- Autoconf -*-
9762
 
 
9763
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9764
 
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9765
 
#
9766
 
# This file is free software; the Free Software Foundation
9767
 
# gives unlimited permission to copy and/or distribute it,
9768
 
# with or without modifications, as long as this notice is preserved.
9769
 
 
9770
 
# serial 16
9771
 
 
9772
 
# This macro actually does too much.  Some checks are only needed if
9773
 
# your package does certain things.  But this isn't really a big deal.
9774
 
 
9775
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9776
 
# AM_INIT_AUTOMAKE([OPTIONS])
9777
 
# -----------------------------------------------
9778
 
# The call with PACKAGE and VERSION arguments is the old style
9779
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9780
 
# and VERSION should now be passed to AC_INIT and removed from
9781
 
# the call to AM_INIT_AUTOMAKE.
9782
 
# We support both call styles for the transition.  After
9783
 
# the next Automake release, Autoconf can make the AC_INIT
9784
 
# arguments mandatory, and then we can depend on a new Autoconf
9785
 
# release and drop the old call support.
9786
 
AC_DEFUN([AM_INIT_AUTOMAKE],
9787
 
[AC_PREREQ([2.62])dnl
9788
 
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9789
 
dnl the ones we care about.
9790
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9791
 
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9792
 
AC_REQUIRE([AC_PROG_INSTALL])dnl
9793
 
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9794
 
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9795
 
  # is not polluted with repeated "-I."
9796
 
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9797
 
  # test to see if srcdir already configured
9798
 
  if test -f $srcdir/config.status; then
9799
 
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9800
 
  fi
9801
 
fi
9802
 
 
9803
 
# test whether we have cygpath
9804
 
if test -z "$CYGPATH_W"; then
9805
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
9806
 
    CYGPATH_W='cygpath -w'
9807
 
  else
9808
 
    CYGPATH_W=echo
9809
 
  fi
9810
 
fi
9811
 
AC_SUBST([CYGPATH_W])
9812
 
 
9813
 
# Define the identity of the package.
9814
 
dnl Distinguish between old-style and new-style calls.
9815
 
m4_ifval([$2],
9816
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9817
 
 AC_SUBST([PACKAGE], [$1])dnl
9818
 
 AC_SUBST([VERSION], [$2])],
9819
 
[_AM_SET_OPTIONS([$1])dnl
9820
 
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9821
 
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9822
 
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9823
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9824
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9825
 
 
9826
 
_AM_IF_OPTION([no-define],,
9827
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9828
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9829
 
 
9830
 
# Some tools Automake needs.
9831
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
9832
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9833
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9834
 
AM_MISSING_PROG(AUTOCONF, autoconf)
9835
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9836
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
9837
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
9838
 
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9839
 
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9840
 
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9841
 
# We need awk for the "check" target.  The system "awk" is bad on
9842
 
# some platforms.
9843
 
AC_REQUIRE([AC_PROG_AWK])dnl
9844
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9845
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9846
 
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9847
 
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9848
 
                             [_AM_PROG_TAR([v7])])])
9849
 
_AM_IF_OPTION([no-dependencies],,
9850
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9851
 
                  [_AM_DEPENDENCIES(CC)],
9852
 
                  [define([AC_PROG_CC],
9853
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9854
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9855
 
                  [_AM_DEPENDENCIES(CXX)],
9856
 
                  [define([AC_PROG_CXX],
9857
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9858
 
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9859
 
                  [_AM_DEPENDENCIES(OBJC)],
9860
 
                  [define([AC_PROG_OBJC],
9861
 
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9862
 
])
9863
 
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9864
 
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9865
 
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
9866
 
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9867
 
AC_CONFIG_COMMANDS_PRE(dnl
9868
 
[m4_provide_if([_AM_COMPILER_EXEEXT],
9869
 
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9870
 
])
9871
 
 
9872
 
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9873
 
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9874
 
dnl mangled by Autoconf and run in a shell conditional statement.
9875
 
m4_define([_AC_COMPILER_EXEEXT],
9876
 
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9877
 
 
9878
 
 
9879
 
# When config.status generates a header, we must update the stamp-h file.
9880
 
# This file resides in the same directory as the config header
9881
 
# that is generated.  The stamp files are numbered to have different names.
9882
 
 
9883
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9884
 
# loop where config.status creates the headers, so we can generate
9885
 
# our stamp files there.
9886
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9887
 
[# Compute $1's index in $config_headers.
9888
 
_am_arg=$1
9889
 
_am_stamp_count=1
9890
 
for _am_header in $config_headers :; do
9891
 
  case $_am_header in
9892
 
    $_am_arg | $_am_arg:* )
9893
 
      break ;;
9894
 
    * )
9895
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9896
 
  esac
9897
 
done
9898
 
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9899
 
 
9900
 
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
9901
 
#
9902
 
# This file is free software; the Free Software Foundation
9903
 
# gives unlimited permission to copy and/or distribute it,
9904
 
# with or without modifications, as long as this notice is preserved.
9905
 
 
9906
 
# AM_PROG_INSTALL_SH
9907
 
# ------------------
9908
 
# Define $install_sh.
9909
 
AC_DEFUN([AM_PROG_INSTALL_SH],
9910
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9911
 
if test x"${install_sh}" != xset; then
9912
 
  case $am_aux_dir in
9913
 
  *\ * | *\     *)
9914
 
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9915
 
  *)
9916
 
    install_sh="\${SHELL} $am_aux_dir/install-sh"
9917
 
  esac
9918
 
fi
9919
 
AC_SUBST(install_sh)])
9920
 
 
9921
 
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9922
 
#
9923
 
# This file is free software; the Free Software Foundation
9924
 
# gives unlimited permission to copy and/or distribute it,
9925
 
# with or without modifications, as long as this notice is preserved.
9926
 
 
9927
 
# serial 2
9928
 
 
9929
 
# Check whether the underlying file-system supports filenames
9930
 
# with a leading dot.  For instance MS-DOS doesn't.
9931
 
AC_DEFUN([AM_SET_LEADING_DOT],
9932
 
[rm -rf .tst 2>/dev/null
9933
 
mkdir .tst 2>/dev/null
9934
 
if test -d .tst; then
9935
 
  am__leading_dot=.
9936
 
else
9937
 
  am__leading_dot=_
9938
 
fi
9939
 
rmdir .tst 2>/dev/null
9940
 
AC_SUBST([am__leading_dot])])
9941
 
 
9942
 
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9943
 
# From Jim Meyering
9944
 
 
9945
 
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9946
 
# Free Software Foundation, Inc.
9947
 
#
9948
 
# This file is free software; the Free Software Foundation
9949
 
# gives unlimited permission to copy and/or distribute it,
9950
 
# with or without modifications, as long as this notice is preserved.
9951
 
 
9952
 
# serial 5
9953
 
 
9954
 
# AM_MAINTAINER_MODE([DEFAULT-MODE])
9955
 
# ----------------------------------
9956
 
# Control maintainer-specific portions of Makefiles.
9957
 
# Default is to disable them, unless `enable' is passed literally.
9958
 
# For symmetry, `disable' may be passed as well.  Anyway, the user
9959
 
# can override the default with the --enable/--disable switch.
9960
 
AC_DEFUN([AM_MAINTAINER_MODE],
9961
 
[m4_case(m4_default([$1], [disable]),
9962
 
       [enable], [m4_define([am_maintainer_other], [disable])],
9963
 
       [disable], [m4_define([am_maintainer_other], [enable])],
9964
 
       [m4_define([am_maintainer_other], [enable])
9965
 
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9966
 
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9967
 
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9968
 
  AC_ARG_ENABLE([maintainer-mode],
9969
 
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
9970
 
                          (and sometimes confusing) to the casual installer],
9971
 
      [USE_MAINTAINER_MODE=$enableval],
9972
 
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9973
 
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9974
 
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9975
 
  MAINT=$MAINTAINER_MODE_TRUE
9976
 
  AC_SUBST([MAINT])dnl
9977
 
]
9978
 
)
9979
 
 
9980
 
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9981
 
 
9982
 
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
9983
 
 
9984
 
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
9985
 
#
9986
 
# This file is free software; the Free Software Foundation
9987
 
# gives unlimited permission to copy and/or distribute it,
9988
 
# with or without modifications, as long as this notice is preserved.
9989
 
 
9990
 
# serial 4
9991
 
 
9992
 
# AM_MAKE_INCLUDE()
9993
 
# -----------------
9994
 
# Check to see how make treats includes.
9995
 
AC_DEFUN([AM_MAKE_INCLUDE],
9996
 
[am_make=${MAKE-make}
9997
 
cat > confinc << 'END'
9998
 
am__doit:
9999
 
        @echo this is the am__doit target
10000
 
.PHONY: am__doit
10001
 
END
10002
 
# If we don't find an include directive, just comment out the code.
10003
 
AC_MSG_CHECKING([for style of include used by $am_make])
10004
 
am__include="#"
10005
 
am__quote=
10006
 
_am_result=none
10007
 
# First try GNU make style include.
10008
 
echo "include confinc" > confmf
10009
 
# Ignore all kinds of additional output from `make'.
10010
 
case `$am_make -s -f confmf 2> /dev/null` in #(
10011
 
*the\ am__doit\ target*)
10012
 
  am__include=include
10013
 
  am__quote=
10014
 
  _am_result=GNU
10015
 
  ;;
10016
 
esac
10017
 
# Now try BSD make style include.
10018
 
if test "$am__include" = "#"; then
10019
 
   echo '.include "confinc"' > confmf
10020
 
   case `$am_make -s -f confmf 2> /dev/null` in #(
10021
 
   *the\ am__doit\ target*)
10022
 
     am__include=.include
10023
 
     am__quote="\""
10024
 
     _am_result=BSD
10025
 
     ;;
10026
 
   esac
10027
 
fi
10028
 
AC_SUBST([am__include])
10029
 
AC_SUBST([am__quote])
10030
 
AC_MSG_RESULT([$_am_result])
10031
 
rm -f confinc confmf
10032
 
])
10033
 
 
10034
 
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10035
 
 
10036
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
10037
 
# Free Software Foundation, Inc.
10038
 
#
10039
 
# This file is free software; the Free Software Foundation
10040
 
# gives unlimited permission to copy and/or distribute it,
10041
 
# with or without modifications, as long as this notice is preserved.
10042
 
 
10043
 
# serial 6
10044
 
 
10045
 
# AM_MISSING_PROG(NAME, PROGRAM)
10046
 
# ------------------------------
10047
 
AC_DEFUN([AM_MISSING_PROG],
10048
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
10049
 
$1=${$1-"${am_missing_run}$2"}
10050
 
AC_SUBST($1)])
10051
 
 
10052
 
 
10053
 
# AM_MISSING_HAS_RUN
10054
 
# ------------------
10055
 
# Define MISSING if not defined so far and test if it supports --run.
10056
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
10057
 
AC_DEFUN([AM_MISSING_HAS_RUN],
10058
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10059
 
AC_REQUIRE_AUX_FILE([missing])dnl
10060
 
if test x"${MISSING+set}" != xset; then
10061
 
  case $am_aux_dir in
10062
 
  *\ * | *\     *)
10063
 
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10064
 
  *)
10065
 
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
10066
 
  esac
10067
 
fi
10068
 
# Use eval to expand $SHELL
10069
 
if eval "$MISSING --run true"; then
10070
 
  am_missing_run="$MISSING --run "
10071
 
else
10072
 
  am_missing_run=
10073
 
  AC_MSG_WARN([`missing' script is too old or missing])
10074
 
fi
10075
 
])
10076
 
 
10077
 
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
10078
 
#
10079
 
# This file is free software; the Free Software Foundation
10080
 
# gives unlimited permission to copy and/or distribute it,
10081
 
# with or without modifications, as long as this notice is preserved.
10082
 
 
10083
 
# AM_PROG_MKDIR_P
10084
 
# ---------------
10085
 
# Check for `mkdir -p'.
10086
 
AC_DEFUN([AM_PROG_MKDIR_P],
10087
 
[AC_PREREQ([2.60])dnl
10088
 
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10089
 
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10090
 
dnl while keeping a definition of mkdir_p for backward compatibility.
10091
 
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10092
 
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10093
 
dnl Makefile.ins that do not define MKDIR_P, so we do our own
10094
 
dnl adjustment using top_builddir (which is defined more often than
10095
 
dnl MKDIR_P).
10096
 
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10097
 
case $mkdir_p in
10098
 
  [[\\/$]]* | ?:[[\\/]]*) ;;
10099
 
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10100
 
esac
10101
 
])
10102
 
 
10103
 
# Helper functions for option handling.                     -*- Autoconf -*-
10104
 
 
10105
 
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
10106
 
#
10107
 
# This file is free software; the Free Software Foundation
10108
 
# gives unlimited permission to copy and/or distribute it,
10109
 
# with or without modifications, as long as this notice is preserved.
10110
 
 
10111
 
# serial 4
10112
 
 
10113
 
# _AM_MANGLE_OPTION(NAME)
10114
 
# -----------------------
10115
 
AC_DEFUN([_AM_MANGLE_OPTION],
10116
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10117
 
 
10118
 
# _AM_SET_OPTION(NAME)
10119
 
# ------------------------------
10120
 
# Set option NAME.  Presently that only means defining a flag for this option.
10121
 
AC_DEFUN([_AM_SET_OPTION],
10122
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10123
 
 
10124
 
# _AM_SET_OPTIONS(OPTIONS)
10125
 
# ----------------------------------
10126
 
# OPTIONS is a space-separated list of Automake options.
10127
 
AC_DEFUN([_AM_SET_OPTIONS],
10128
 
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10129
 
 
10130
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10131
 
# -------------------------------------------
10132
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10133
 
AC_DEFUN([_AM_IF_OPTION],
10134
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10135
 
 
10136
 
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
10137
 
 
10138
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10139
 
# Free Software Foundation, Inc.
10140
 
#
10141
 
# This file is free software; the Free Software Foundation
10142
 
# gives unlimited permission to copy and/or distribute it,
10143
 
# with or without modifications, as long as this notice is preserved.
10144
 
 
10145
 
# serial 5
10146
 
 
10147
 
# AM_SANITY_CHECK
10148
 
# ---------------
10149
 
AC_DEFUN([AM_SANITY_CHECK],
10150
 
[AC_MSG_CHECKING([whether build environment is sane])
10151
 
# Just in case
10152
 
sleep 1
10153
 
echo timestamp > conftest.file
10154
 
# Reject unsafe characters in $srcdir or the absolute working directory
10155
 
# name.  Accept space and tab only in the latter.
10156
 
am_lf='
10157
 
'
10158
 
case `pwd` in
10159
 
  *[[\\\"\#\$\&\'\`$am_lf]]*)
10160
 
    AC_MSG_ERROR([unsafe absolute working directory name]);;
10161
 
esac
10162
 
case $srcdir in
10163
 
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
10164
 
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10165
 
esac
10166
 
 
10167
 
# Do `set' in a subshell so we don't clobber the current shell's
10168
 
# arguments.  Must try -L first in case configure is actually a
10169
 
# symlink; some systems play weird games with the mod time of symlinks
10170
 
# (eg FreeBSD returns the mod time of the symlink's containing
10171
 
# directory).
10172
 
if (
10173
 
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10174
 
   if test "$[*]" = "X"; then
10175
 
      # -L didn't work.
10176
 
      set X `ls -t "$srcdir/configure" conftest.file`
10177
 
   fi
10178
 
   rm -f conftest.file
10179
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
10180
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
10181
 
 
10182
 
      # If neither matched, then we have a broken ls.  This can happen
10183
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
10184
 
      # broken ls alias from the environment.  This has actually
10185
 
      # happened.  Such a system could not be considered "sane".
10186
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10187
 
alias in your environment])
10188
 
   fi
10189
 
 
10190
 
   test "$[2]" = conftest.file
10191
 
   )
10192
 
then
10193
 
   # Ok.
10194
 
   :
10195
 
else
10196
 
   AC_MSG_ERROR([newly created file is older than distributed files!
10197
 
Check your system clock])
10198
 
fi
10199
 
AC_MSG_RESULT(yes)])
10200
 
 
10201
 
# Copyright (C) 2009  Free Software Foundation, Inc.
10202
 
#
10203
 
# This file is free software; the Free Software Foundation
10204
 
# gives unlimited permission to copy and/or distribute it,
10205
 
# with or without modifications, as long as this notice is preserved.
10206
 
 
10207
 
# serial 1
10208
 
 
10209
 
# AM_SILENT_RULES([DEFAULT])
10210
 
# --------------------------
10211
 
# Enable less verbose build rules; with the default set to DEFAULT
10212
 
# (`yes' being less verbose, `no' or empty being verbose).
10213
 
AC_DEFUN([AM_SILENT_RULES],
10214
 
[AC_ARG_ENABLE([silent-rules],
10215
 
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
10216
 
  --disable-silent-rules         verbose build output (undo: `make V=0')])
10217
 
case $enable_silent_rules in
10218
 
yes) AM_DEFAULT_VERBOSITY=0;;
10219
 
no)  AM_DEFAULT_VERBOSITY=1;;
10220
 
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10221
 
esac
10222
 
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10223
 
AM_BACKSLASH='\'
10224
 
AC_SUBST([AM_BACKSLASH])dnl
10225
 
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10226
 
])
10227
 
 
10228
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10229
 
#
10230
 
# This file is free software; the Free Software Foundation
10231
 
# gives unlimited permission to copy and/or distribute it,
10232
 
# with or without modifications, as long as this notice is preserved.
10233
 
 
10234
 
# AM_PROG_INSTALL_STRIP
10235
 
# ---------------------
10236
 
# One issue with vendor `install' (even GNU) is that you can't
10237
 
# specify the program used to strip binaries.  This is especially
10238
 
# annoying in cross-compiling environments, where the build's strip
10239
 
# is unlikely to handle the host's binaries.
10240
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
10241
 
# always use install-sh in `make install-strip', and initialize
10242
 
# STRIPPROG with the value of the STRIP variable (set by the user).
10243
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
10244
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10245
 
# Installed binaries are usually stripped using `strip' when the user
10246
 
# run `make install-strip'.  However `strip' might not be the right
10247
 
# tool to use in cross-compilation environments, therefore Automake
10248
 
# will honor the `STRIP' environment variable to overrule this program.
10249
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10250
 
if test "$cross_compiling" != no; then
10251
 
  AC_CHECK_TOOL([STRIP], [strip], :)
10252
 
fi
10253
 
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10254
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
10255
 
 
10256
 
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
10257
 
#
10258
 
# This file is free software; the Free Software Foundation
10259
 
# gives unlimited permission to copy and/or distribute it,
10260
 
# with or without modifications, as long as this notice is preserved.
10261
 
 
10262
 
# serial 2
10263
 
 
10264
 
# _AM_SUBST_NOTMAKE(VARIABLE)
10265
 
# ---------------------------
10266
 
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10267
 
# This macro is traced by Automake.
10268
 
AC_DEFUN([_AM_SUBST_NOTMAKE])
10269
 
 
10270
 
# AM_SUBST_NOTMAKE(VARIABLE)
10271
 
# ---------------------------
10272
 
# Public sister of _AM_SUBST_NOTMAKE.
10273
 
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10274
 
 
10275
 
# Check how to create a tarball.                            -*- Autoconf -*-
10276
 
 
10277
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
10278
 
#
10279
 
# This file is free software; the Free Software Foundation
10280
 
# gives unlimited permission to copy and/or distribute it,
10281
 
# with or without modifications, as long as this notice is preserved.
10282
 
 
10283
 
# serial 2
10284
 
 
10285
 
# _AM_PROG_TAR(FORMAT)
10286
 
# --------------------
10287
 
# Check how to create a tarball in format FORMAT.
10288
 
# FORMAT should be one of `v7', `ustar', or `pax'.
10289
 
#
10290
 
# Substitute a variable $(am__tar) that is a command
10291
 
# writing to stdout a FORMAT-tarball containing the directory
10292
 
# $tardir.
10293
 
#     tardir=directory && $(am__tar) > result.tar
10294
 
#
10295
 
# Substitute a variable $(am__untar) that extract such
10296
 
# a tarball read from stdin.
10297
 
#     $(am__untar) < result.tar
10298
 
AC_DEFUN([_AM_PROG_TAR],
10299
 
[# Always define AMTAR for backward compatibility.
10300
 
AM_MISSING_PROG([AMTAR], [tar])
10301
 
m4_if([$1], [v7],
10302
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10303
 
     [m4_case([$1], [ustar],, [pax],,
10304
 
              [m4_fatal([Unknown tar format])])
10305
 
AC_MSG_CHECKING([how to create a $1 tar archive])
10306
 
# Loop over all known methods to create a tar archive until one works.
10307
 
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10308
 
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
10309
 
# Do not fold the above two line into one, because Tru64 sh and
10310
 
# Solaris sh will not grok spaces in the rhs of `-'.
10311
 
for _am_tool in $_am_tools
10312
 
do
10313
 
  case $_am_tool in
10314
 
  gnutar)
10315
 
    for _am_tar in tar gnutar gtar;
10316
 
    do
10317
 
      AM_RUN_LOG([$_am_tar --version]) && break
10318
 
    done
10319
 
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10320
 
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10321
 
    am__untar="$_am_tar -xf -"
10322
 
    ;;
10323
 
  plaintar)
10324
 
    # Must skip GNU tar: if it does not support --format= it doesn't create
10325
 
    # ustar tarball either.
10326
 
    (tar --version) >/dev/null 2>&1 && continue
10327
 
    am__tar='tar chf - "$$tardir"'
10328
 
    am__tar_='tar chf - "$tardir"'
10329
 
    am__untar='tar xf -'
10330
 
    ;;
10331
 
  pax)
10332
 
    am__tar='pax -L -x $1 -w "$$tardir"'
10333
 
    am__tar_='pax -L -x $1 -w "$tardir"'
10334
 
    am__untar='pax -r'
10335
 
    ;;
10336
 
  cpio)
10337
 
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10338
 
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10339
 
    am__untar='cpio -i -H $1 -d'
10340
 
    ;;
10341
 
  none)
10342
 
    am__tar=false
10343
 
    am__tar_=false
10344
 
    am__untar=false
10345
 
    ;;
10346
 
  esac
10347
 
 
10348
 
  # If the value was cached, stop now.  We just wanted to have am__tar
10349
 
  # and am__untar set.
10350
 
  test -n "${am_cv_prog_tar_$1}" && break
10351
 
 
10352
 
  # tar/untar a dummy directory, and stop if the command works
10353
 
  rm -rf conftest.dir
10354
 
  mkdir conftest.dir
10355
 
  echo GrepMe > conftest.dir/file
10356
 
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10357
 
  rm -rf conftest.dir
10358
 
  if test -s conftest.tar; then
10359
 
    AM_RUN_LOG([$am__untar <conftest.tar])
10360
 
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10361
 
  fi
10362
 
done
10363
 
rm -rf conftest.dir
10364
 
 
10365
 
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10366
 
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10367
 
AC_SUBST([am__tar])
10368
 
AC_SUBST([am__untar])
10369
 
]) # _AM_PROG_TAR
10370